[
  {
    "path": ".changeset/config.json",
    "content": "{\n  \"$schema\": \"https://unpkg.com/@changesets/config@3.1.1/schema.json\",\n  \"changelog\": \"@changesets/cli/changelog\",\n  \"commit\": false,\n  \"fixed\": [[\"babel-preset-granite\", \"create-granite-app\", \"@granite-js/*\"]],\n  \"linked\": [],\n  \"access\": \"public\",\n  \"baseBranch\": \"main\",\n  \"updateInternalDependencies\": \"patch\",\n  \"ignore\": [\"@granite-app/*\", \"@granite-internal/*\", \"granite-docs\"]\n}\n"
  },
  {
    "path": ".cursorignore",
    "content": "# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)\n**/devtools-frontend\n**/.yarn\n**/.pnp.*\n**/dist\n**/esm\nyarn.lock\n"
  },
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\nend_of_line = lf\ninsert_final_newline = true\n\n[*.{js,json,yml}]\ncharset = utf-8\nindent_style = space\nindent_size = 2\n"
  },
  {
    "path": ".gitattributes",
    "content": "/.yarn/**            linguist-vendored\n/.yarn/releases/*    binary\n/.yarn/plugins/**/*  binary\n/.pnp.*              binary linguist-generated\n\npackages/mpack/**/*.js linguist-generated\npackages/devtools-frontend/**/*.js linguist-generated"
  },
  {
    "path": ".github/CODEOWNERS",
    "content": "* @raon0211 @gronxb @heecheolman @l2hyunwoo @intmain @leegeunhyeok @jingjing2222\n"
  },
  {
    "path": ".github/actions/setup-node-yarn/action.yml",
    "content": "name: Setup Node & Yarn\ndescription: Setup Node & Yarn\n\nruns:\n  using: composite\n  steps:\n    - name: Setup Node\n      uses: actions/setup-node@v4\n      with:\n        node-version-file: .nvmrc\n\n    - name: Setup Yarn\n      run: corepack enable\n      shell: bash\n\n    - name: Install dependencies\n      run: yarn install --immutable\n      shell: bash\n"
  },
  {
    "path": ".github/labeler.yml",
    "content": "'docs':\n  - 'docs/**/*'\n'@granite-js/deployment-manager':\n  - 'infra/deployment-manager/**/*'\n'@granite-js/forge-cli':\n  - 'infra/forge-cli/**/*'\n'@granite-js/pulumi-aws':\n  - 'infra/pulumi-aws/**/*'\n'babel-preset-granite':\n  - 'packages/babel-preset-granite/**/*'\n'@granite-js/cli':\n  - 'packages/cli/**/*'\n'create-granite-app':\n  - 'packages/create-granite-app/**/*'\n'@granite-js/devtools-frontend':\n  - 'packages/devtools-frontend/**/*'\n'@granite-js/image':\n  - 'packages/image/**/*'\n'@granite-js/jest':\n  - 'packages/jest/**/*'\n'@granite-js/mpack':\n  - 'packages/mpack/**/*'\n'@granite-js/native':\n  - 'packages/native/**/*'\n'@granite-js/plugin-core':\n  - 'packages/plugin-core/**/*'\n'@granite-js/plugin-env':\n  - 'packages/plugin-env/**/*'\n'@granite-js/plugin-hermes':\n  - 'packages/plugin-hermes/**/*'\n'@granite-js/plugin-router':\n  - 'packages/plugin-router/**/*'\n'@granite-js/plugin-sentry':\n  - 'packages/plugin-sentry/**/*'\n'@granite-js/react-native':\n  - 'packages/react-native/**/*'\n'@granite-js/style-utils':\n  - 'packages/style-utils/**/*'\n'services':\n  - 'services/**/*'\n'shared':\n  - 'shared/**/*'\n'@granite-internal/tools':\n  - 'tools/**/*'\n'@granite-js/utils':\n  - 'packages/utils/**/*'\n'dependencies':\n  - 'yarn.lock'\n'workflows':\n  - '.github/workflows/**/*'\n"
  },
  {
    "path": ".github/workflows/docs-workflow.yaml",
    "content": "name: docs-workflow\n\non:\n  push:\n    branches: [main]\n  workflow_dispatch:\n\npermissions:\n  contents: read\n  pages: write\n  id-token: write\n\n# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.\n# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.\nconcurrency:\n  group: 'pages'\n  cancel-in-progress: false\n\njobs:\n  # Build job\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - uses: ./.github/actions/setup-node-yarn\n        name: Setup\n\n      - name: Setup Pages\n        uses: actions/configure-pages@v5\n\n      - name: Build VitePress\n        run: yarn docs:build\n        working-directory: ./docs\n\n      - name: Check build output\n        run: |\n          if [ ! -f \"docs/.vitepress/dist/index.html\" ]; then\n            echo \"Vitepress build failed - index.html file not found\"\n            exit 1\n          fi\n\n      - name: Upload artifact\n        uses: actions/upload-pages-artifact@v3\n        with:\n          path: ./docs/.vitepress/dist\n\n  # Deployment job\n  deploy:\n    environment:\n      name: github-pages\n      url: ${{ steps.deployment.outputs.page_url }}\n    needs: build\n    runs-on: ubuntu-latest\n    name: Deploy\n    steps:\n      - name: Deploy to GitHub Pages\n        id: deployment\n        uses: actions/deploy-pages@v4\n"
  },
  {
    "path": ".github/workflows/integrations.yaml",
    "content": "name: Integrations\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  setup:\n    name: Setup\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Cache node modules and dist\n        uses: actions/cache@v4\n        id: yarn-cache\n        with:\n          path: |\n            node_modules\n            .yarn/cache\n            .yarn/unplugged\n            .nx\n            packages/*/dist\n            tools/dist\n          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}\n          restore-keys: |\n            ${{ runner.os }}-yarn-\n\n      - uses: ./.github/actions/setup-node-yarn\n        name: Setup\n\n      - name: Build All\n        run: yarn build:all\n      - name: Upload build artifacts\n        uses: actions/upload-artifact@v4\n        with:\n          name: build-artifacts\n          path: |\n            packages/*/dist\n            tools/dist\n          retention-days: 1\n\n  lint:\n    name: Lint\n    needs: setup\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Cache node modules and dist\n        uses: actions/cache@v4\n        id: yarn-cache\n        with:\n          path: |\n            node_modules\n            .yarn/cache\n            .yarn/unplugged\n            .nx\n            packages/*/dist\n            tools/dist\n          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}\n          restore-keys: |\n            ${{ runner.os }}-yarn-\n\n      - name: Download build artifacts\n        uses: actions/download-artifact@v4\n        with:\n          name: build-artifacts\n          path: .\n\n      - uses: ./.github/actions/setup-node-yarn\n        name: Setup\n      - name: Check lint\n        run: yarn lint\n\n  type-check:\n    name: Type check\n    needs: setup\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Cache node modules and dist\n        uses: actions/cache@v4\n        id: yarn-cache\n        with:\n          path: |\n            node_modules\n            .yarn/cache\n            .yarn/unplugged\n            .nx\n            packages/*/dist\n            tools/dist\n          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}\n          restore-keys: |\n            ${{ runner.os }}-yarn-\n\n      - name: Download build artifacts\n        uses: actions/download-artifact@v4\n        with:\n          name: build-artifacts\n          path: .\n\n      - uses: ./.github/actions/setup-node-yarn\n        name: Setup\n      - name: Check types\n        run: yarn typecheck:all\n\n  test:\n    name: Test\n    needs: setup\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Cache node modules and dist\n        uses: actions/cache@v4\n        id: yarn-cache\n        with:\n          path: |\n            node_modules\n            .yarn/cache\n            .yarn/unplugged\n            .nx\n            packages/*/dist\n            tools/dist\n          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}\n          restore-keys: |\n            ${{ runner.os }}-yarn-\n\n      - name: Download build artifacts\n        uses: actions/download-artifact@v4\n        with:\n          name: build-artifacts\n          path: .\n\n      - uses: ./.github/actions/setup-node-yarn\n        name: Setup\n      - name: Run tests\n        run: yarn test:all\n"
  },
  {
    "path": ".github/workflows/labeler.yml",
    "content": "name: Labeler\n\non:\n  - pull_request_target\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.ref }}\n  cancel-in-progress: true\n\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/labeler@v4\n        with:\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/release.yaml",
    "content": "name: Release\n\non:\n  push:\n    branches:\n      - main\n\nenv:\n  BASE_BRANCH: 'main'\n\nconcurrency: ${{ github.workflow }}-${{ github.ref }}\n\njobs:\n  release:\n    name: Release\n    runs-on: ubuntu-latest\n    permissions:\n      id-token: write\n      contents: write\n      pull-requests: write\n\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Setup\n        uses: ./.github/actions/setup-node-yarn\n\n      - name: Run Build with Nx\n        run: |\n          yarn build:all\n\n      - name: Create PR or Publish\n        id: release\n        uses: changesets/action@v1\n        with:\n          title: |\n            chore: version packages ${{ env.BASE_BRANCH }}\n          commit: 'chore: version packages'\n          version: yarn changeset version\n          publish: bash ./.scripts/publish-packages.sh\n        env:\n          BASE_BRANCH: ${{ env.BASE_BRANCH }}\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".gitignore",
    "content": ".yarn/*\n!.yarn/patches\n!.yarn/plugins\n!.yarn/releases\n!.yarn/sdks\n!.yarn/versions\n\n# Swap the comments on the following lines if you don't wish to use zero-installs\n# Documentation here: https://yarnpkg.com/features/zero-installs\n# !.yarn/cache\n.pnp.*\ndist\nesm\n*.tgz\n*.tsbuildinfo\n.next\nnode_modules\n.env\n.envrc\n.DS_Store\n\n.idea/\n\n#rn\n.swc\n.granite\n\n# testing\ntest-meta\n.vitest\ncoverage\n__screenshots__\nvitest.config.ts.timestamp*\ntsconfig.vitest-temp.json\n\n.nx/cache\n.nx/workspace-data\n\n# mpack\nperf.json\n\n# bundle\n*.ait\n\n# analyze\nreport-*.json\nreport-*.html\n\n# rust\ntarget\n*.wasm\n\n# React Native example builds\n**/android/build/\n**/example/android/app/.cxx\n**/example/android/build/\n**/example/android/app/build/\n**/example/android/.gradle/\n**/example/ios/build/\n**/example/ios/Pods/\n**/example/ios/*.xcworkspace/xcuserdata/\n**/example/vendor/bundle/\n.metro-health-check*\n\n.classpath\n.cxx\n.gradle\n.idea\n.project\n.settings\nlocal.properties\n**/local.properties\nandroid.iml\n\n.xcode.env.local\n"
  },
  {
    "path": ".nvmrc",
    "content": "v24.13.0\n"
  },
  {
    "path": ".prettierignore",
    "content": ".github\n.yarn\n**/coverage\n**/dist\npackages/devtools-frontend/src/front_end\n"
  },
  {
    "path": ".prettierrc",
    "content": "{\n  \"printWidth\": 120,\n  \"singleQuote\": true,\n  \"trailingComma\": \"es5\"\n}\n"
  },
  {
    "path": ".scripts/check-constraints-yarn-4.sh",
    "content": "if [[ \"$OSTYPE\" == \"darwin\"* ]]; then\n  sed -i '' \"/  - path: \\.yarn\\/plugins\\/@yarnpkg\\/plugin-workspace-since\\.cjs/d\" \".yarnrc.yml\"\n  sed -i '' \"/    spec: \\\"https:\\/\\/raw\\.githubusercontent\\.com\\/toss\\/yarn-plugin-workspace-since\\/main\\/bundles\\/%40yarnpkg\\/plugin-workspace-since\\.js\\\"/d\" \".yarnrc.yml\"\nelse\n  sed -i \"/  - path: \\.yarn\\/plugins\\/@yarnpkg\\/plugin-workspace-since\\.cjs/d\" \".yarnrc.yml\"\n  sed -i \"/    spec: \\\"https:\\/\\/raw\\.githubusercontent\\.com\\/toss\\/yarn-plugin-workspace-since\\/main\\/bundles\\/%40yarnpkg\\/plugin-workspace-since\\.js\\\"/d\" \".yarnrc.yml\"\nfi\n\nyarn --no-immutable --no-immutable-cache\nyarn constraints\n"
  },
  {
    "path": ".scripts/check-exports.mts",
    "content": "import assert from 'node:assert';\nimport { readFile } from 'node:fs/promises';\nimport { relative, join } from 'node:path';\nimport { $ } from 'execa';\n\ninterface PackageInfo {\n  name: string;\n  location: string;\n}\n\ninterface ExportEntry {\n  import?: string;\n  require?: string;\n  types?: string;\n  default?: string;\n}\n\ninterface ExportEntryByType {\n  import: {\n    default?: string;\n    types?: string;\n  };\n  require: {\n    default?: string;\n    types?: string;\n  };\n}\n\ninterface PackageJson {\n  name: string;\n  main?: string;\n  module?: string;\n  types?: string;\n  bin?: string | Record<string, string>;\n  exports?: Record<string, string | ExportEntry | ExportEntryByType>;\n}\n\ninterface PackedFile {\n  location: string;\n}\n\nconst EXCLUDED_PACKAGE_PATTERNS = [/@granite-js\\/docs/];\n\nasync function getPackageList() {\n  const { stdout, stderr, exitCode } = await $`yarn workspaces list --json`;\n\n  if (exitCode !== 0) {\n    throw new Error([stdout, stderr].filter(Boolean).join('\\n'));\n  }\n\n  return (\n    normalizeStdout(stdout)\n      .map((line) => JSON.parse(line.trim()))\n      // avoid workspace root\n      .filter(({ location }) => location !== '.') as PackageInfo[]\n  );\n}\n\nasync function readPackageJson(packagePath: string) {\n  return JSON.parse(await readFile(join(packagePath, 'package.json'), 'utf-8')) as PackageJson;\n}\n\nasync function getPackedFiles(packageName: string) {\n  const { stdout, stderr, exitCode } = await $`yarn workspace ${packageName} pack --dry-run --json`;\n\n  if (exitCode !== 0) {\n    throw new Error([stdout, stderr].filter(Boolean).join('\\n'));\n  }\n\n  return normalizeStdout(stdout)\n    .map((line) => JSON.parse(line.trim()))\n    .filter((data: PackedFile | { base: string }) => 'location' in data)\n    .map(({ location }) => ({ location: relative(process.cwd(), location) })) as PackedFile[];\n}\n\nfunction normalizeStdout(stdout) {\n  return stdout.split('\\n').map((text) => text.trim());\n}\n\nfunction comparePath(path1: string, path2: string) {\n  const base = process.cwd();\n  return relative(base, path1) === relative(base, path2);\n}\n\nfunction shouldVerify(packageJson: PackageJson) {\n  if (EXCLUDED_PACKAGE_PATTERNS.some((pattern) => packageJson.name.match(pattern))) {\n    return false;\n  }\n\n  return (\n    Boolean(Object.keys(packageJson.bin ?? {}).length) ||\n    Boolean(Object.keys(packageJson.exports ?? {}).length) ||\n    Boolean(packageJson.main) ||\n    Boolean(packageJson.module) ||\n    Boolean(packageJson.types)\n  );\n}\nasync function prebuildPackages(packageJsonList: PackageJson[]) {\n  console.log(`Pre-building ${packageJsonList.length} packages (with its dependencies)...`);\n  const includePackages = packageJsonList.map(({ name }) => name).join(',');\n\n  const { stdout, stderr, exitCode } = await $(\n    'yarn',\n    ['nx', 'run-many', '--target=build', `--projects=${includePackages}`],\n    {\n      stdio: 'inherit',\n    }\n  );\n\n  if (exitCode !== 0) {\n    throw new Error([stdout, stderr].filter(Boolean).join('\\n'));\n  }\n}\n\nasync function verifyPackageExports(packageJson: PackageJson) {\n  console.log(`Verifying '${packageJson.name}'...`);\n  const files = await getPackedFiles(packageJson.name);\n\n  if (typeof packageJson.main !== 'undefined') {\n    assert(\n      files.some(({ location }) => comparePath(location, packageJson.main!)),\n      `'main' field is not in the packed files: ${packageJson.main}`\n    );\n    console.log(`  ✅ pkg.main`);\n  }\n\n  if (typeof packageJson.module !== 'undefined') {\n    assert(\n      files.some(({ location }) => comparePath(location, packageJson.module!)),\n      `'module' field is not in the packed files: ${packageJson.module}`\n    );\n    console.log(`  ✅ pkg.module`);\n  }\n\n  if (typeof packageJson.bin !== 'undefined') {\n    if (typeof packageJson.bin === 'string') {\n      assert(\n        files.some(({ location }) => comparePath(location, packageJson.bin as string)),\n        `bin field is not in the packed files: ${packageJson.bin}`\n      );\n      console.log(`  ✅ pkg.bin`);\n    } else {\n      for (const [key, value] of Object.entries(packageJson.bin)) {\n        assert(\n          files.some(({ location }) => comparePath(location, value)),\n          `bin['${key}'] field is not in the packed files: ${value}`\n        );\n        console.log(`  ✅ pkg.bin['${key}']`);\n      }\n    }\n  }\n\n  if (typeof packageJson.exports !== 'undefined') {\n    for (const [key, entry] of Object.entries(packageJson.exports)) {\n      if (typeof entry === 'string') {\n        assert(\n          files.some(({ location }) => comparePath(location, entry)),\n          `exports['${key}'] field is not in the packed files: ${entry}`\n        );\n        console.log(`  ✅ pkg.exports['${key}']`);\n      } else if (typeof entry.import === 'object' && typeof entry.require === 'object') {\n        for (const [type, value] of Object.entries((entry as ExportEntryByType).import)) {\n          assert(\n            files.some(({ location }) => comparePath(location, value)),\n            `exports['${key}'].import.${type} field is not in the packed files: ${value}`\n          );\n          console.log(`  ✅ pkg.exports['${key}'].import.${type}`);\n        }\n\n        for (const [type, value] of Object.entries((entry as ExportEntryByType).require)) {\n          assert(\n            files.some(({ location }) => comparePath(location, value)),\n            `exports['${key}'].require.${type} field is not in the packed files: ${value}`\n          );\n          console.log(`  ✅ pkg.exports['${key}'].require.${type}`);\n        }\n      } else if (['require', 'import', 'types', 'default'].some((key) => key in entry)) {\n        for (const [type, value] of Object.entries(entry as ExportEntry)) {\n          assert(\n            files.some(({ location }) => comparePath(location, value)),\n            `exports['${key}'].${type} field is not in the packed files: ${value}`\n          );\n          console.log(`  ✅ pkg.exports['${key}'].${type}`);\n        }\n      } else {\n        throw new Error(`invalid exports field: ${JSON.stringify(entry)}`);\n      }\n    }\n  }\n\n  console.log(); // nl\n}\n\nasync function runCheckExports() {\n  const packages = await getPackageList();\n  const packageJsonList = await Promise.all(packages.map(({ location }) => readPackageJson(location)));\n\n  try {\n    const targetPackageJsonList = packageJsonList.filter(shouldVerify);\n    await prebuildPackages(targetPackageJsonList);\n\n    for (const packageJson of targetPackageJsonList) {\n      await verifyPackageExports(packageJson);\n    }\n\n    console.log('✅ No invalid package found');\n    process.exit(0);\n  } catch (error) {\n    console.error('❗️ Invalid package found');\n    console.error(error);\n    process.exit(1);\n  }\n}\n\nconst MAIN_BRANCH = 'origin/main';\n\nasync function packageJsonChanged() {\n  const { stdout } = await $`git diff ${MAIN_BRANCH} --name-only`;\n  return stdout.includes('package.json');\n}\n\nasync function main() {\n  try {\n    const changed = await packageJsonChanged();\n\n    if (changed) {\n      await runCheckExports();\n    } else {\n      console.log('✅ No package.json changes found');\n      process.exit(0);\n    }\n  } catch (error) {\n    console.error(error);\n    process.exit(1);\n  }\n}\n\nmain();\n"
  },
  {
    "path": ".scripts/check-peer.sh",
    "content": "OUT=$(yarn | grep -E \"(YN0002|YN0059|YN0060)\")\nif [ -z \"$OUT\" ]; then\n  echo \"No Peer Dependency Errors Found.\"\nelse\n  echo \"$OUT\"\n  echo \"Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code\"\n  exit 1\nfi\n"
  },
  {
    "path": ".scripts/check-platform-specific-files.js",
    "content": "/**\n * @description\n * 지정한 패키지 내에 플랫폼 식별 파일이 존재하는지 확인하는 스크립트입니다.\n *\n * ```bash\n * node .scripts/check-platform-specific-files.js packages/core\n * ```\n */\n\nconst assert = require('assert');\nconst fs = require('fs');\nconst path = require('path');\n\nconst EXCLUDED_FOLDERS = ['__tests__', '__fixtures__'];\nconst PLATFORM_SPECIFIED_PREFIX = ['native', 'android', 'ios'];\nconst EXCLUDED_FILES = ['e2e.ts', 'test.ts'];\n\nconst packageRoot = process.argv[2];\nassert(packageRoot?.startsWith('packages/'), 'packages/* 형식의 패키지 경로를 입력해주세요');\nconst packageSource = path.join(packageRoot, 'src');\nconst packageJson = JSON.parse(fs.readFileSync(path.join(packageRoot, 'package.json'), 'utf-8'));\n\nconst platformSpecifiedFiles = [];\n\nfunction isPlatformSpecified(filePath) {\n  const extension = path.extname(filePath);\n\n  return PLATFORM_SPECIFIED_PREFIX.some((prefix) => filePath.endsWith(`.${prefix}${extension}`));\n}\n\nfunction exploreDirectory(dir) {\n  const filesAndFolders = fs.readdirSync(dir);\n\n  filesAndFolders.forEach((fileOrFolder) => {\n    const fullPath = path.join(dir, fileOrFolder);\n    const stat = fs.statSync(fullPath);\n\n    if (stat.isDirectory()) {\n      if (!EXCLUDED_FOLDERS.includes(fileOrFolder)) {\n        exploreDirectory(fullPath);\n      }\n    } else if (stat.isFile() && isPlatformSpecified(fileOrFolder)) {\n      if (!EXCLUDED_FILES.includes(fileOrFolder)) {\n        platformSpecifiedFiles.push(fullPath);\n      }\n    }\n  });\n}\n\nfunction hasESM(exportsMap) {\n  return JSON.stringify(exportsMap).includes('.mjs');\n}\n\nexploreDirectory(packageSource);\n\nconsole.log('플랫폼 식별 파일 리스트');\nconsole.log(platformSpecifiedFiles, '\\n');\n\nif (platformSpecifiedFiles.length && hasESM(packageJson.exports)) {\n  console.log('❗️ 본 패키지는 exports map 구성에서 ESM 파일을 지정하면 안됩니다');\n  console.log(packageJson.exports);\n  process.exit(1);\n}\n"
  },
  {
    "path": ".scripts/licenses.mjs",
    "content": "import {\n  generateLicenses,\n  targetWorkspaces,\n  consistencyCheckLicenses,\n  getWorkspaces,\n  getLicensesMetaList,\n} from './utils/licenses.mjs';\n\n/**\n * 'check' | 'generate' | 'consistency-check'\n */\nconst command = process.argv[2];\n\n/**\n * List of allowed licenses and their terms links\n */\nconst ALLOWED_LICENSE_MAP = {\n  MIT: 'https://opensource.org/licenses/MIT',\n  'Apache-2.0': 'https://www.apache.org/licenses/LICENSE-2.0',\n  'Apache 2.0': 'https://www.apache.org/licenses/LICENSE-2.0',\n  ISC: 'https://opensource.org/licenses/ISC',\n  'BSD-3-Clause': 'https://opensource.org/licenses/BSD-3-Clause',\n  '(MIT AND Apache-2.0)': 'https://opensource.org/licenses/MIT, https://www.apache.org/licenses/LICENSE-2.0',\n};\n\n/**\n * Packages to check and generate licenses for\n *\n * @type {Array<string | {name: string, license?: 'GPL-3.0' | 'Apache-2.0', extendsLicense: Array<{packageName: string, licenseName: string, repository: string | null}>}>}\n */\nconst FOCUSED_WORKSPACES = [\n  'packages/*',\n  'infra/*',\n  // override\n  {\n    name: '@granite-js/mpack',\n    extendsLicense: [\n      {\n        packageName: 'metro',\n        licenseName: 'MIT',\n        repository: 'https://github.com/facebook/metro',\n      },\n    ],\n  },\n];\n\nasync function runGenerate() {\n  const workspaces = await getWorkspaces();\n  const targetedWorkspaces = await targetWorkspaces(workspaces, FOCUSED_WORKSPACES);\n\n  const generateResults = await Promise.allSettled(\n    targetedWorkspaces.map(({ license, extendsLicense, location, name }) =>\n      generateLicenses({\n        workspaceName: name,\n        location,\n        license,\n        extendsLicense,\n        allowedLicenseMap: ALLOWED_LICENSE_MAP,\n      })\n    )\n  );\n\n  for (const [index, result] of generateResults.entries()) {\n    const { name } = targetedWorkspaces[index];\n    if (result.status === 'fulfilled') {\n      console.log(`✅ ${name}: NOTICE file has been generated.`);\n    } else {\n      console.error(`❌ ${name}: Failed to generate NOTICE file.`);\n      console.error(result.reason);\n    }\n  }\n}\n\nasync function runCheck() {\n  const workspaces = await getWorkspaces();\n  const targetedWorkspaces = await targetWorkspaces(workspaces, FOCUSED_WORKSPACES);\n\n  const checkWorkspaceLicenses = async ({ name }) => {\n    const workspaceLicenses = await getLicensesMetaList({ workspaceName: name });\n    const internalPackages = [\n      // In repository\n      /^@?granite-js/,\n    ];\n\n    const disallowedLicenses = workspaceLicenses.filter(\n      (license) =>\n        !ALLOWED_LICENSE_MAP[license.licenseName] &&\n        !internalPackages.some((regexp) => regexp.test(license.packageName))\n    );\n\n    return {\n      workspaceName: name,\n      isValid: disallowedLicenses.length === 0,\n      licenses: disallowedLicenses,\n    };\n  };\n\n  const workspaceInvalidLicenseMetaList = [];\n  for (const workspace of targetedWorkspaces) {\n    workspaceInvalidLicenseMetaList.push(await checkWorkspaceLicenses(workspace));\n  }\n\n  for (const result of workspaceInvalidLicenseMetaList) {\n    const { workspaceName, isValid, licenses } = result;\n    if (!isValid) {\n      console.error(`❌ ${workspaceName}: License check failed.`);\n      console.error(licenses);\n      process.exit(1);\n    } else {\n      console.log(`✅ ${workspaceName}: License check passed.`);\n    }\n  }\n}\n\nasync function runConsistencyCheck() {\n  const workspaces = await getWorkspaces();\n  const targetedWorkspaces = await targetWorkspaces(workspaces, FOCUSED_WORKSPACES);\n  const consistencyCheckResults = [];\n  for (const { extendsLicense, location, name, license } of targetedWorkspaces) {\n    const result = await consistencyCheckLicenses({\n      workspaceName: name,\n      location,\n      license,\n      extendsLicense,\n      allowedLicenseMap: ALLOWED_LICENSE_MAP,\n    });\n    consistencyCheckResults.push(result);\n  }\n\n  for (let i = 0; i < consistencyCheckResults.length; i++) {\n    const { name } = targetedWorkspaces[i];\n    const isValid = consistencyCheckResults[i];\n    if (isValid) {\n      console.log(`✅ ${name}: NOTICE consistency check passed.`);\n    } else {\n      console.error(`❌ ${name}: NOTICE consistency check failed. Please run 'yarn generate-licenses' command.`);\n      process.exit(1);\n    }\n  }\n}\n\nswitch (command) {\n  case 'check':\n    await runCheck();\n    break;\n  case 'generate':\n    await runGenerate();\n    break;\n  case 'consistency-check':\n    await runConsistencyCheck();\n    break;\n  default:\n    console.error('Invalid Command');\n    process.exit(0);\n}\n"
  },
  {
    "path": ".scripts/publish-dev.sh",
    "content": "#!/bin/bash\nset -e\n\necho \"🔄 yarn install\"\nyarn install --immutable\n\necho \"📦 Build Packages\"\nyarn build:all\n\n# Generate dev version\nCURRENT_VERSION=$(jq -r '.version' packages/react-native/package.json)\nBASE_VERSION=$(echo \"$CURRENT_VERSION\" | grep -oE '^[0-9]+\\.[0-9]+\\.[0-9]+')\nTIMESTAMP=$(date +%y%m%d%H%M)\nDEV_VERSION=\"${BASE_VERSION}-dev.${TIMESTAMP}\"\n\n# Update versions and publish\necho \"📝 Updating versions to ${DEV_VERSION}...\"\nbash .scripts/version.sh \"$DEV_VERSION\"\n\necho \"✅ Publishing...\"\nyarn workspaces foreach --no-private -At exec yarn npm publish --tag dev\n\n# Restore original versions\necho \"🔙 Restoring original versions...\"\nbash .scripts/version.sh \"$CURRENT_VERSION\"\n\necho \"🚀 Dev Release Complete! (${DEV_VERSION})\"\n"
  },
  {
    "path": ".scripts/publish-packages.sh",
    "content": "#!/usr/bin/env bash\n\nfailed=0\n\nwhile IFS= read -r line; do\n  location=$(echo \"$line\" | jq -r '.location')\n  name=$(echo \"$line\" | jq -r '.name')\n\n  echo \"Publishing $name...\"\n  if ! (cd \"$location\" && yarn npm publish --provenance --access public); then\n    echo \"Failed to publish $name, continuing...\"\n    failed=1\n  fi\ndone < <(yarn workspaces list --no-private --json)\n\nexit $failed\n"
  },
  {
    "path": ".scripts/typecheck-rn-68.sh",
    "content": "set -eo pipefail;\n\nROOT_DIR=\"$(pwd)\"\n\n# 서비스 코드에서 사용하는 패키지를 대상으로 타입 체크를 진행합니다\nTARGET_PACKAGES=(\n  \"@granite-js/react-native\"\n  \"@granite-js/image\"\n  \"@granite-js/style-utils\"\n)\n\nINCLUDE_PACKAGES_PATTERN=\"{$(printf \"%s,\" \"${TARGET_PACKAGES[@]}\" | sed 's/,$//')}\"\n\n(\n\ncleanup() {\n  echo \"Git을 초기화합니다.\"\n  git reset --hard\n  git clean -fd\n}\n\ntrap cleanup EXIT\n\necho \"React Native 0.68 설치 시작...\"\n\nunset YARN_NPM_AUTH_TOKEN\n\nyarn -v\n\n\njq '.dependencies[\"react-native\"]=\"0.68.2\" | .devDependencies[\"@types/react-native\"]=\"0.68.2\" | .devDependencies[\"@types/react\"]=\"17.0.2\"' package.json > package.tmp.json\nmv package.tmp.json package.json\n\ncd $ROOT_DIR\njq '.resolutions[\"react-native\"]=\"0.68.2\" | .resolutions[\"@types/react-native\"]=\"0.68.2\" | .resolutions[\"@types/react\"]=\"17.0.2\"' package.json > package.tmp.json\nmv package.tmp.json package.json\n\nyarn install --no-immutable --no-immutable-cache\nyarn workspaces foreach -A --include \"$INCLUDE_PACKAGES_PATTERN\" add -D @types/react-native@0.68.2 @types/react@17.0.2\nyarn workspaces foreach -A --include \"$INCLUDE_PACKAGES_PATTERN\" run build\n\necho \"React Native 0.68 타입 검사 시작...\"\nyarn workspaces foreach -A --include \"$INCLUDE_PACKAGES_PATTERN\" run typecheck\n\n)\n"
  },
  {
    "path": ".scripts/utils/license-templates.mjs",
    "content": "export const apache2 = function (projectName, year, thirdPartyLibraries) {\n  return `NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: ${projectName}\nCopyright ${year} Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n${thirdPartyLibraries}\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated.`;\n};\n\nexport const gpl3 = function (projectName, year, thirdPartyLibraries) {\n  return `NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: ${projectName}\nCopyright ${year} Viva Republica, Inc\n\nLicensed under the GPL, Version 3.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    https://www.gnu.org/licenses/gpl-3.0.html\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n${thirdPartyLibraries}\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated.`;\n};\n"
  },
  {
    "path": ".scripts/utils/licenses.mjs",
    "content": "import fs from 'fs/promises';\nimport path from 'path';\nimport * as licenseTemplates from './license-templates.mjs';\nimport { execa } from 'execa';\n\nexport function $(file, args, options) {\n  return execa(file, args, {\n    cwd: process.cwd(),\n    ...options,\n  });\n}\n\n/**\n * 워크스페이스 목록을 가져옵니다.\n * @returns {Array<{location: string, name: string}>} 워크스페이스 정보 배열\n */\nexport async function getWorkspaces() {\n  const { stdout } = await $('yarn', ['workspaces', 'list', '--json']);\n  return stdout.split('\\n').map((line) => {\n    return JSON.parse(line);\n  });\n}\n\n/**\n * @param {Array<{workspace: string, location: string, extendsLicense: Array<{packageName: string, licenseName: string, repository: string | null}>}>} workspaces\n * @param {Array<string | {name: string, extendsLicense: Array<{packageName: string, licenseName: string, repository: string | null}>}>} focusedWorkspaces\n *\n * @returns {Array<{name: string, location: string, extendsLicense: Array<{packageName: string, licenseName: string, repository: string | null}>}>}\n */\nexport async function targetWorkspaces(workspaces, focusedWorkspaces) {\n  const isFocusedWorkspace = (workspace, focused) => {\n    if (typeof focused === 'string') {\n      // packages/* 같은 패턴인 경우\n      if (focused.includes('*')) {\n        const pattern = focused.replace('*', '[^/]*');\n        const regex = new RegExp(`^${pattern}$`);\n        return regex.test(workspace.location);\n      }\n      return focused === workspace.name;\n    }\n    return focused.name === workspace.name;\n  };\n\n  const focusWorkspace = (workspace) => focusedWorkspaces.findLast((focused) => isFocusedWorkspace(workspace, focused));\n\n  const targetedWorkspaces = workspaces\n    .map((workspace) => {\n      const focusedWorkspace = focusWorkspace(workspace);\n      return focusedWorkspace\n        ? {\n            ...workspace,\n            license: focusedWorkspace?.license,\n            extendsLicense: typeof focusedWorkspace === 'string' ? [] : (focusedWorkspace?.extendsLicense ?? []),\n          }\n        : null;\n    })\n    .filter(Boolean);\n\n  return targetedWorkspaces;\n}\n\nexport function formatLicenses(packages, extendsLicense, allowedLicenseMap) {\n  return [...packages, ...extendsLicense]\n    .filter((pkg) => pkg.licenseName !== 'UNKNOWN' || Object.keys(allowedLicenseMap).includes(pkg.licenseName))\n    .map((pkg, index) =>\n      [\n        `${index + 1}. **${pkg.packageName}**`,\n        '\\t',\n        `   - License: ${pkg.licenseName}`,\n        allowedLicenseMap[pkg.licenseName] && `   - License Text: ${allowedLicenseMap[pkg.licenseName]}`,\n        pkg.repository && `   - Repository: ${pkg.repository}`,\n        '\\t',\n      ]\n        .filter(Boolean)\n        .join('\\n')\n    )\n    .join('\\n');\n}\n\nasync function transformNoticeTemplate({ workspaceName, license, extendsLicense, allowedLicenseMap }) {\n  const { stdout } = await $('yarn', ['licenses', 'list', '--json', '--focus', workspaceName]);\n  const year = new Date().getFullYear();\n\n  const template = (() => {\n    switch (license) {\n      case 'GPL-3.0':\n        return licenseTemplates.gpl3;\n\n      case 'Apache-2.0':\n      default:\n        return licenseTemplates.apache2;\n    }\n  })();\n\n  return template(workspaceName, year, formatLicenses(parseLicenses(stdout), extendsLicense, allowedLicenseMap));\n}\n\nexport async function generateLicenses({ workspaceName, location, license, extendsLicense, allowedLicenseMap }) {\n  const template = await transformNoticeTemplate({ workspaceName, license, extendsLicense, allowedLicenseMap });\n  await fs.writeFile(path.join(location, 'NOTICE'), template);\n}\n\nexport async function consistencyCheckLicenses({\n  workspaceName,\n  location,\n  license,\n  extendsLicense,\n  allowedLicenseMap,\n}) {\n  const template = await transformNoticeTemplate({ workspaceName, license, extendsLicense, allowedLicenseMap });\n  const currentTemplate = await fs.readFile(path.join(location, 'NOTICE'), 'utf-8');\n\n  return template === currentTemplate;\n}\n\nexport async function getLicensesMetaList({ workspaceName }) {\n  const { stdout } = await $('yarn', ['licenses', 'list', '--json', '--focus', workspaceName]);\n\n  const parsedLicenses = parseLicenses(stdout);\n  return parsedLicenses;\n}\n\n/**\n * Parses the output of `yarn licenses list` and returns an array of packages with their licenses and repositories.\n *\n * @param {string} input - The output of `yarn licenses list`.\n * @returns {Array<{packageName: string, licenseName: string, repository: string | null}>} An array of packages with their licenses and repositories.\n */\n\nexport function parseLicenses(stdout) {\n  // Split the stdout by newlines and filter out empty lines\n  const lines = stdout.trim().split('\\n').filter(Boolean);\n\n  const results = [];\n\n  // Each line should be a JSON object with a structure similar to:\n  // {\n  //   \"value\": \"MIT\",\n  //   \"children\": {\n  //     \"packageName@version\": {\n  //       \"value\": { \"locator\": \"packageName@npm:version\", \"descriptor\": \"packageName@...\" },\n  //       \"children\": {\n  //         \"url\": \"https://github.com/...\",\n  //         \"vendorUrl\": \"https://...\",\n  //         \"vendorName\": \"...\",\n  //       }\n  //     },\n  //     ...\n  //   }\n  // }\n\n  for (const line of lines) {\n    let parsed;\n    try {\n      parsed = JSON.parse(line);\n    } catch {\n      // If a line can't be parsed as JSON, skip it.\n      continue;\n    }\n\n    const licenseName = parsed.value || 'UNKNOWN';\n    const packages = parsed.children || {};\n\n    for (const [fullName, pkgData] of Object.entries(packages)) {\n      const value = pkgData.value || {};\n      const children = pkgData.children || {};\n\n      // Extract package name:\n      // The locator might look like \"es-toolkit@npm:1.26.1::__archiveUrl=http...\"\n      // or \"@granite-js/cli@workspace:packages/cli\"\n      // We'll try multiple strategies:\n      let packageName = null;\n      if (value.descriptor) {\n        // descriptor often looks like \"es-toolkit@npm:^1.26.1\" or \"@granite-js/cli@workspace:*\"\n        // We'll split at '@npm:' or '@workspace:' to isolate the package name.\n        const descriptor = value.descriptor;\n        packageName = descriptor.split('@npm:')[0].split('@workspace:')[0];\n        // In some cases, packageName might still contain version/range, handle that:\n        // If descriptor is something like \"es-toolkit@npm:^1.26.1\", packageName might be \"es-toolkit\"\n        // If descriptor is something like \"@granite-js/cli@workspace:*\", packageName might be \"@granite-js/cli\"\n        if (packageName.includes('@')) {\n          // For scoped packages, descriptor might be \"@scope/name@workspace:...\"\n          // Split by '@' but keep scope if it starts with '@'\n          const parts = descriptor.split('@');\n          if (descriptor.startsWith('@') && parts.length > 2) {\n            // E.g. \"@granite-js/cli@workspace:*\"\n            // After splitting by '@' -> ['', 'granite-js/cli', 'workspace:*']\n            // Reconstruct: '@granite-js/cli'\n            packageName = '@' + parts[1];\n          } else {\n            // Non-scoped or other patterns\n            packageName = parts[0];\n          }\n        } else {\n          // If no '@' beyond the first, packageName might already be correct.\n          // Just ensure we strip away possible version range after a `@npm:` or `@workspace:` key.\n          // For safety, we can look at something like \"es-toolkit@npm:^1.26.1\"\n          // Actually, we already split at '@npm:' above, so packageName should be \"es-toolkit\".\n        }\n        packageName = packageName.trim();\n      } else if (value.locator) {\n        // fallback if descriptor not available\n        const locator = value.locator;\n        packageName = locator.split('@npm:')[0].split('@workspace:')[0].trim();\n        if (packageName.startsWith('@')) {\n          // It's a scoped package, so it might need similar handling\n          const parts = locator.split('@');\n          if (locator.startsWith('@') && parts.length > 2) {\n            packageName = '@' + parts[1];\n          } else {\n            packageName = parts[0];\n          }\n        }\n      } else {\n        // If neither descriptor nor locator is found (unlikely), fallback to fullName\n        // fullName might look like \"es-toolkit@npm:1.26.1...\"\n        // We'll strip off the version and source info\n        packageName = fullName.split('@npm:')[0].split('@workspace:')[0].trim();\n        if (!packageName) {\n          packageName = fullName; // as a last resort\n        }\n      }\n\n      // Extract repository URL:\n      // The children object might have `url`, `vendorUrl`, or similar fields.\n      // We'll try `url` first, then `vendorUrl`.\n      let repository = children.url || children.vendorUrl || null;\n      if (repository && repository.startsWith('git+')) {\n        // normalize repository if needed\n        // repository might be 'git+https://github.com/...'\n        // It's usually fine as is, but if you want to remove 'git+' prefix:\n        // repository = repository.replace(/^git\\+/, '');\n      }\n\n      results.push({\n        packageName,\n        licenseName,\n        repository,\n      });\n    }\n  }\n\n  return results;\n}\n"
  },
  {
    "path": ".scripts/utils/parse-licenses.spec.ts",
    "content": "import { describe, it, expect } from 'vitest';\nimport { parseLicenses } from './licenses.mjs';\n\ndescribe('parseLicenses', () => {\n  //  yarn licenses list --json  --focus @granite-js/react-native\n  const stdout = `\n{\"value\":\"MIT\",\"children\":{\"@babel/core@npm:7.24.9::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40babel%2Fcore%2F-%2Fcore-7.24.9.tgz\":{\"value\":{\"locator\":\"@babel/core@npm:7.24.9::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40babel%2Fcore%2F-%2Fcore-7.24.9.tgz\",\"descriptor\":\"@babel/core@npm:^7.24.9\"},\"children\":{\"url\":\"https://github.com/babel/babel.git\",\"vendorName\":\"The Babel Team\",\"vendorUrl\":\"https://babel.dev/docs/en/next/babel-core\"}},\"@babel/preset-env@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:7.24.8::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40babel%2Fpreset-env%2F-%2Fpreset-env-7.24.8.tgz\":{\"value\":{\"locator\":\"@babel/preset-env@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:7.24.8::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40babel%2Fpreset-env%2F-%2Fpreset-env-7.24.8.tgz\",\"descriptor\":\"@babel/preset-env@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:^7.24.8\"},\"children\":{\"url\":\"https://github.com/babel/babel.git\",\"vendorName\":\"The Babel Team\",\"vendorUrl\":\"https://babel.dev/docs/en/next/babel-preset-env\"}},\"@babel/preset-typescript@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:7.24.7::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40babel%2Fpreset-typescript%2F-%2Fpreset-typescript-7.24.7.tgz\":{\"value\":{\"locator\":\"@babel/preset-typescript@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:7.24.7::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40babel%2Fpreset-typescript%2F-%2Fpreset-typescript-7.24.7.tgz\",\"descriptor\":\"@babel/preset-typescript@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:^7.24.7\"},\"children\":{\"url\":\"https://github.com/babel/babel.git\",\"vendorName\":\"The Babel Team\",\"vendorUrl\":\"https://babel.dev/docs/en/next/babel-preset-typescript\"}},\"@types/babel__core@npm:7.20.5::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Fbabel__core%2F-%2Fbabel__core-7.20.5.tgz\":{\"value\":{\"locator\":\"@types/babel__core@npm:7.20.5::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Fbabel__core%2F-%2Fbabel__core-7.20.5.tgz\",\"descriptor\":\"@types/babel__core@npm:^7\"},\"children\":{\"url\":\"https://github.com/DefinitelyTyped/DefinitelyTyped.git\",\"vendorUrl\":\"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core\"}},\"@types/babel__preset-env@npm:7.9.7::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Fbabel__preset-env%2F-%2Fbabel__preset-env-7.9.7.tgz\":{\"value\":{\"locator\":\"@types/babel__preset-env@npm:7.9.7::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Fbabel__preset-env%2F-%2Fbabel__preset-env-7.9.7.tgz\",\"descriptor\":\"@types/babel__preset-env@npm:^7\"},\"children\":{\"url\":\"https://github.com/DefinitelyTyped/DefinitelyTyped.git\",\"vendorUrl\":\"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__preset-env\"}},\"@types/debug@npm:4.1.12::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Fdebug%2F-%2Fdebug-4.1.12.tgz\":{\"value\":{\"locator\":\"@types/debug@npm:4.1.12::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Fdebug%2F-%2Fdebug-4.1.12.tgz\",\"descriptor\":\"@types/debug@npm:^4\"},\"children\":{\"url\":\"https://github.com/DefinitelyTyped/DefinitelyTyped.git\",\"vendorUrl\":\"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debug\"}},\"@types/lodash.debounce@npm:4.0.9::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Flodash.debounce%2F-%2Flodash.debounce-4.0.9.tgz\":{\"value\":{\"locator\":\"@types/lodash.debounce@npm:4.0.9::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Flodash.debounce%2F-%2Flodash.debounce-4.0.9.tgz\",\"descriptor\":\"@types/lodash.debounce@npm:^4\"},\"children\":{\"url\":\"https://github.com/DefinitelyTyped/DefinitelyTyped.git\",\"vendorUrl\":\"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash.debounce\"}},\"@types/lodash.throttle@npm:4.1.9::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Flodash.throttle%2F-%2Flodash.throttle-4.1.9.tgz\":{\"value\":{\"locator\":\"@types/lodash.throttle@npm:4.1.9::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Flodash.throttle%2F-%2Flodash.throttle-4.1.9.tgz\",\"descriptor\":\"@types/lodash.throttle@npm:^4\"},\"children\":{\"url\":\"https://github.com/DefinitelyTyped/DefinitelyTyped.git\",\"vendorUrl\":\"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash.throttle\"}},\"@types/node@npm:22.10.2::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Fnode%2F-%2Fnode-22.10.2.tgz\":{\"value\":{\"locator\":\"@types/node@npm:22.10.2::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Fnode%2F-%2Fnode-22.10.2.tgz\",\"descriptor\":\"@types/node@npm:^22.10.2\"},\"children\":{\"url\":\"https://github.com/DefinitelyTyped/DefinitelyTyped.git\",\"vendorUrl\":\"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node\"}},\"@types/react@npm:18.3.3::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Freact%2F-%2Freact-18.3.3.tgz\":{\"value\":{\"locator\":\"@types/react@npm:18.3.3::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2F%40types%2Freact%2F-%2Freact-18.3.3.tgz\",\"descriptor\":\"@types/react@npm:18.3.3\"},\"children\":{\"url\":\"https://github.com/DefinitelyTyped/DefinitelyTyped.git\",\"vendorUrl\":\"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react\"}},\"debug@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:4.3.7::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Fdebug%2F-%2Fdebug-4.3.7.tgz\":{\"value\":{\"locator\":\"debug@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:4.3.7::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Fdebug%2F-%2Fdebug-4.3.7.tgz\",\"descriptor\":\"debug@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:^4.3.7\"},\"children\":{\"url\":\"git://github.com/debug-js/debug.git\",\"vendorName\":\"Josh Junon\",\"vendorUrl\":\"https://github.com/qix-\"}},\"es-toolkit@npm:1.26.1::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Fes-toolkit%2F-%2Fes-toolkit-1.26.1.tgz\":{\"value\":{\"locator\":\"es-toolkit@npm:1.26.1::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Fes-toolkit%2F-%2Fes-toolkit-1.26.1.tgz\",\"descriptor\":\"es-toolkit@npm:^1.26.1\"},\"children\":{\"url\":\"https://github.com/toss/es-toolkit.git\",\"vendorUrl\":\"https://es-toolkit.slash.page\"}},\"esbuild@npm:0.24.0::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Fesbuild%2F-%2Fesbuild-0.24.0.tgz\":{\"value\":{\"locator\":\"esbuild@npm:0.24.0::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Fesbuild%2F-%2Fesbuild-0.24.0.tgz\",\"descriptor\":\"esbuild@npm:^0.24.0\"},\"children\":{\"url\":\"git+https://github.com/evanw/esbuild.git\"}},\"eslint@npm:9.7.0::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Feslint%2F-%2Feslint-9.7.0.tgz\":{\"value\":{\"locator\":\"eslint@npm:9.7.0::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Feslint%2F-%2Feslint-9.7.0.tgz\",\"descriptor\":\"eslint@npm:^9.7.0\"},\"children\":{\"url\":\"git+https://github.com/eslint/eslint.git\",\"vendorName\":\"Nicholas C. Zakas\",\"vendorUrl\":\"https://eslint.org\"}},\"execa@npm:5.1.1::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Fexeca%2F-%2Fexeca-5.1.1.tgz\":{\"value\":{\"locator\":\"execa@npm:5.1.1::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Fexeca%2F-%2Fexeca-5.1.1.tgz\",\"descriptor\":\"execa@npm:^5.0.0\"},\"children\":{\"url\":\"git+https://github.com/sindresorhus/execa.git\",\"vendorName\":\"Sindre Sorhus\",\"vendorUrl\":\"https://sindresorhus.com\"}},\"lodash.debounce@npm:4.0.8::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Flodash.debounce%2F-%2Flodash.debounce-4.0.8.tgz\":{\"value\":{\"locator\":\"lodash.debounce@npm:4.0.8::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Flodash.debounce%2F-%2Flodash.debounce-4.0.8.tgz\",\"descriptor\":\"lodash.debounce@npm:^4.0.8\"},\"children\":{\"url\":\"git+https://github.com/lodash/lodash.git\",\"vendorName\":\"John-David Dalton\",\"vendorUrl\":\"https://lodash.com/\"}},\"lodash.throttle@npm:4.1.1::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Flodash.throttle%2F-%2Flodash.throttle-4.1.1.tgz\":{\"value\":{\"locator\":\"lodash.throttle@npm:4.1.1::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Flodash.throttle%2F-%2Flodash.throttle-4.1.1.tgz\",\"descriptor\":\"lodash.throttle@npm:^4.1.1\"},\"children\":{\"url\":\"git+https://github.com/lodash/lodash.git\",\"vendorName\":\"John-David Dalton\",\"vendorUrl\":\"https://lodash.com/\"}},\"react@npm:18.2.0::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Freact%2F-%2Freact-18.2.0.tgz\":{\"value\":{\"locator\":\"react@npm:18.2.0::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Freact%2F-%2Freact-18.2.0.tgz\",\"descriptor\":\"react@npm:18.2.0\"},\"children\":{\"url\":\"https://github.com/facebook/react.git\",\"vendorUrl\":\"https://reactjs.org/\"}},\"react-native@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:0.72.6::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Freact-native%2F-%2Freact-native-0.72.6.tgz\":{\"value\":{\"locator\":\"react-native@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:0.72.6::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Freact-native%2F-%2Freact-native-0.72.6.tgz\",\"descriptor\":\"react-native@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:0.72.6\"},\"children\":{\"url\":\"git+https://github.com/facebook/react-native.git\"}},\"react-native-url-polyfill@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:1.3.0::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Freact-native-url-polyfill%2F-%2Freact-native-url-polyfill-1.3.0.tgz\":{\"value\":{\"locator\":\"react-native-url-polyfill@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:1.3.0::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Freact-native-url-polyfill%2F-%2Freact-native-url-polyfill-1.3.0.tgz\",\"descriptor\":\"react-native-url-polyfill@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:1.3.0\"},\"children\":{\"url\":\"https://github.com/charpeni/react-native-url-polyfill.git\",\"vendorName\":\"Nicolas Charpentier\",\"vendorUrl\":\"https://github.com/charpeni/react-native-url-polyfill\"}},\"vitest@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:2.1.8::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Fvitest%2F-%2Fvitest-2.1.8.tgz\":{\"value\":{\"locator\":\"vitest@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:2.1.8::__archiveUrl=http%3A%2F%2F%2Frepository%2Fnpm-group%2Fvitest%2F-%2Fvitest-2.1.8.tgz\",\"descriptor\":\"vitest@virtual:0f7211e995349a0590b75c29c2c512fe56a29503f5041a13b6188c4f65ee99e777df672ba8273eeded2a981b34773eb1332be08189c926a974d5810e49a633cf#npm:^2.1.8\"},\"children\":{\"url\":\"git+https://github.com/vitest-dev/vitest.git\",\"vendorName\":\"Anthony Fu\",\"vendorUrl\":\"https://github.com/vitest-dev/vitest#readme\"}}}}\n{\"value\":\"UNKNOWN\",\"children\":{\"@@granite-js/react-native/cli@workspace:packages/cli\":{\"value\":{\"locator\":\"@@granite-js/react-native/cli@workspace:packages/cli\",\"descriptor\":\"@@granite-js/react-native/cli@workspace:*\"},\"children\":{}},\"@@granite-js/react-native/image@workspace:packages/image\":{\"value\":{\"locator\":\"@@granite-js/react-native/image@workspace:packages/image\",\"descriptor\":\"@@granite-js/react-native/image@workspace:*\"},\"children\":{}},\"@@granite-js/react-native/jest-next@workspace:packages/jest-next\":{\"value\":{\"locator\":\"@@granite-js/react-native/jest-next@workspace:packages/jest-next\",\"descriptor\":\"@@granite-js/react-native/jest-next@workspace:*\"},\"children\":{}},\"@@granite-js/react-native/lottie@workspace:packages/lottie\":{\"value\":{\"locator\":\"@@granite-js/react-native/lottie@workspace:packages/lottie\",\"descriptor\":\"@@granite-js/react-native/lottie@workspace:*\"},\"children\":{}},\"@@granite-js/react-native/mpack-next@workspace:packages/mpack-next\":{\"value\":{\"locator\":\"@@granite-js/react-native/mpack-next@workspace:packages/mpack-next\",\"descriptor\":\"@@granite-js/react-native/mpack-next@workspace:*\"},\"children\":{}},\"@@granite-js/react-native/native@workspace:packages/native\":{\"value\":{\"locator\":\"@@granite-js/react-native/native@workspace:packages/native\",\"descriptor\":\"@@granite-js/react-native/native@workspace:*\"},\"children\":{}},\"@@granite-js/react-native/style-utils@workspace:packages/style-utils\":{\"value\":{\"locator\":\"@@granite-js/react-native/style-utils@workspace:packages/style-utils\",\"descriptor\":\"@@granite-js/react-native/style-utils@workspace:*\"},\"children\":{}},\"@@granite-js/react-native/tools@workspace:packages/tools\":{\"value\":{\"locator\":\"@@granite-js/react-native/tools@workspace:packages/tools\",\"descriptor\":\"@@granite-js/react-native/tools@workspace:*\"},\"children\":{}},\"@granite-js/react-native@workspace:packages/@granite-js/react-native\":{\"value\":{\"locator\":\"@granite-js/react-native@workspace:packages/@granite-js/react-native\",\"descriptor\":\"@granite-js/react-native@workspace:packages/@granite-js/react-native\"},\"children\":{}}}}\n{\"value\":\"Apache-2.0\",\"children\":{\"typescript@patch:typescript@npm%3A4.9.5%3A%3A__archiveUrl=http%253A%252F%252F%252Frepository%252Fnpm-group%252Ftypescript%252F-%252Ftypescript-4.9.5.tgz#optional!builtin<compat/typescript>::version=4.9.5&hash=289587\":{\"value\":{\"locator\":\"typescript@patch:typescript@npm%3A4.9.5%3A%3A__archiveUrl=http%253A%252F%252F%252Frepository%252Fnpm-group%252Ftypescript%252F-%252Ftypescript-4.9.5.tgz#optional!builtin<compat/typescript>::version=4.9.5&hash=289587\",\"descriptor\":\"typescript@patch:typescript@npm%3A4.9.5#optional!builtin<compat/typescript>\"},\"children\":{\"url\":\"https://github.com/Microsoft/TypeScript.git\",\"vendorName\":\"Microsoft Corp.\",\"vendorUrl\":\"https://www.typescriptlang.org/\"}}}}\n`;\n\n  it('should parse licenses', () => {\n    const licenses = parseLicenses(stdout);\n    console.log(licenses);\n    expect(licenses).toEqual([\n      {\n        packageName: '@babel/core',\n        licenseName: 'MIT',\n        repository: 'https://github.com/babel/babel.git',\n      },\n      {\n        licenseName: 'MIT',\n        packageName: '@babel/preset-env',\n        repository: 'https://github.com/babel/babel.git',\n      },\n      {\n        licenseName: 'MIT',\n        packageName: '@babel/preset-typescript',\n        repository: 'https://github.com/babel/babel.git',\n      },\n      {\n        packageName: '@types/babel__core',\n        licenseName: 'MIT',\n        repository: 'https://github.com/DefinitelyTyped/DefinitelyTyped.git',\n      },\n      {\n        packageName: '@types/babel__preset-env',\n        licenseName: 'MIT',\n        repository: 'https://github.com/DefinitelyTyped/DefinitelyTyped.git',\n      },\n      {\n        packageName: '@types/debug',\n        licenseName: 'MIT',\n        repository: 'https://github.com/DefinitelyTyped/DefinitelyTyped.git',\n      },\n      {\n        packageName: '@types/lodash.debounce',\n        licenseName: 'MIT',\n        repository: 'https://github.com/DefinitelyTyped/DefinitelyTyped.git',\n      },\n      {\n        packageName: '@types/lodash.throttle',\n        licenseName: 'MIT',\n        repository: 'https://github.com/DefinitelyTyped/DefinitelyTyped.git',\n      },\n      {\n        packageName: '@types/node',\n        licenseName: 'MIT',\n        repository: 'https://github.com/DefinitelyTyped/DefinitelyTyped.git',\n      },\n      {\n        packageName: '@types/react',\n        licenseName: 'MIT',\n        repository: 'https://github.com/DefinitelyTyped/DefinitelyTyped.git',\n      },\n      {\n        licenseName: 'MIT',\n        packageName: 'debug',\n        repository: 'git://github.com/debug-js/debug.git',\n      },\n      {\n        packageName: 'es-toolkit',\n        licenseName: 'MIT',\n        repository: 'https://github.com/toss/es-toolkit.git',\n      },\n      {\n        packageName: 'esbuild',\n        licenseName: 'MIT',\n        repository: 'git+https://github.com/evanw/esbuild.git',\n      },\n      {\n        packageName: 'eslint',\n        licenseName: 'MIT',\n        repository: 'git+https://github.com/eslint/eslint.git',\n      },\n      {\n        packageName: 'execa',\n        licenseName: 'MIT',\n        repository: 'git+https://github.com/sindresorhus/execa.git',\n      },\n      {\n        packageName: 'lodash.debounce',\n        licenseName: 'MIT',\n        repository: 'git+https://github.com/lodash/lodash.git',\n      },\n      {\n        packageName: 'lodash.throttle',\n        licenseName: 'MIT',\n        repository: 'git+https://github.com/lodash/lodash.git',\n      },\n      {\n        packageName: 'react',\n        licenseName: 'MIT',\n        repository: 'https://github.com/facebook/react.git',\n      },\n      {\n        licenseName: 'MIT',\n        packageName: 'react-native',\n        repository: 'git+https://github.com/facebook/react-native.git',\n      },\n      {\n        licenseName: 'MIT',\n        packageName: 'react-native-url-polyfill',\n        repository: 'https://github.com/charpeni/react-native-url-polyfill.git',\n      },\n      {\n        licenseName: 'MIT',\n        packageName: 'vitest',\n        repository: 'git+https://github.com/vitest-dev/vitest.git',\n      },\n      {\n        packageName: '@@granite-js/react-native/cli',\n        licenseName: 'UNKNOWN',\n        repository: null,\n      },\n      {\n        packageName: '@@granite-js/react-native/image',\n        licenseName: 'UNKNOWN',\n        repository: null,\n      },\n      {\n        packageName: '@@granite-js/react-native/jest-next',\n        licenseName: 'UNKNOWN',\n        repository: null,\n      },\n      {\n        packageName: '@@granite-js/react-native/lottie',\n        licenseName: 'UNKNOWN',\n        repository: null,\n      },\n      {\n        packageName: '@@granite-js/react-native/mpack-next',\n        licenseName: 'UNKNOWN',\n        repository: null,\n      },\n      {\n        packageName: '@@granite-js/react-native/native',\n        licenseName: 'UNKNOWN',\n        repository: null,\n      },\n      {\n        packageName: '@@granite-js/react-native/style-utils',\n        licenseName: 'UNKNOWN',\n        repository: null,\n      },\n      {\n        packageName: '@@granite-js/react-native/tools',\n        licenseName: 'UNKNOWN',\n        repository: null,\n      },\n      {\n        packageName: '@granite-js/react-native',\n        licenseName: 'UNKNOWN',\n        repository: null,\n      },\n      {\n        packageName: 'typescript',\n        licenseName: 'Apache-2.0',\n        repository: 'https://github.com/Microsoft/TypeScript.git',\n      },\n    ]);\n  });\n});\n"
  },
  {
    "path": ".scripts/version.sh",
    "content": "#!/bin/bash\n\nset -e\n\nfunction get_dev_version() {\n  local current_version=$(jq -r '.version' packages/react-native/package.json)\n  local base_version=$(echo \"$current_version\" | grep -oE '^[0-9]+\\.[0-9]+\\.[0-9]+')\n  local timestamp=$(date +%Y%m%d%H%M%S)\n  echo \"${base_version}-dev.${timestamp}\"\n}\n\nif [ -z \"$1\" ]; then\n  echo \"No preset or version provided\"\n  exit 1\nelse\n  if [ \"$1\" = \"dev\" ]; then\n    version=$(get_dev_version)\n    echo \"Setting dev version: $version\"\n  else\n    version=$1\n    echo \"Setting manual version: $version\"\n  fi\nfi\n\nyarn workspaces foreach --all --no-private exec \\\n  node -e \"const p=require('./package.json');p.version='${version}';require('fs').writeFileSync('package.json',JSON.stringify(p,null,2)+'\\n')\""
  },
  {
    "path": ".vscode/extensions.json",
    "content": "{\n  \"recommendations\": [\"arcanis.vscode-zipfs\", \"dbaeumer.vscode-eslint\", \"esbenp.prettier-vscode\", \"Orta.vscode-jest\"]\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n  \"search.exclude\": {\n    \"**/.yarn\": true,\n    \"**/.nx\": true,\n    \"**/.pnp.*\": true,\n    \"**/devtools-frontend\": true,\n    \"**/dist\": true,\n    \"**/esm\": true\n  },\n  \"files.watcherExclude\": {\n    \"**/.git/objects/**\": true,\n    \"**/.git/subtree-cache/**\": true,\n    \"**/node_modules/*/**\": true,\n    \"**/.hg/store/**\": true,\n    \"**/devtools-frontend/**\": true,\n    \"**/dist/**\": true,\n    \"**/esm/**\": true,\n    \"**/.pnp.*\": true\n  },\n  \"eslint.nodePath\": \".yarn/sdks\",\n  \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n  \"eslint.useFlatConfig\": true,\n  \"prettier.prettierPath\": \".yarn/sdks/prettier/index.cjs\",\n  \"typescript.tsdk\": \".yarn/sdks/typescript/lib\",\n  \"typescript.enablePromptUseWorkspaceTsdk\": true,\n  \"jest.enable\": false,\n  \"rust-analyzer.linkedProjects\": [\"Cargo.toml\"],\n  \"git.ignoreLimitWarning\": true\n}\n"
  },
  {
    "path": ".yarn/plugins/@yarnpkg/plugin-catalogs.cjs",
    "content": "/* eslint-disable */\n//prettier-ignore\nmodule.exports = {\nname: \"@yarnpkg/plugin-catalogs\",\nfactory: function (require) {\n\"use strict\";var plugin=(()=>{var Lt=Object.create;var ye=Object.defineProperty;var It=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var kt=Object.getPrototypeOf,wt=Object.prototype.hasOwnProperty;var fe=(e=>typeof require<\"u\"?require:typeof Proxy<\"u\"?new Proxy(e,{get:(r,t)=>(typeof require<\"u\"?require:r)[t]}):e)(function(e){if(typeof require<\"u\")return require.apply(this,arguments);throw Error('Dynamic require of \"'+e+'\" is not supported')});var ae=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Nt=(e,r)=>{for(var t in r)ye(e,t,{get:r[t],enumerable:!0})},Ve=(e,r,t,o)=>{if(r&&typeof r==\"object\"||typeof r==\"function\")for(let n of Ht(r))!wt.call(e,n)&&n!==t&&ye(e,n,{get:()=>r[n],enumerable:!(o=It(r,n))||o.enumerable});return e};var Ee=(e,r,t)=>(t=e!=null?Lt(kt(e)):{},Ve(r||!e||!e.__esModule?ye(t,\"default\",{value:e,enumerable:!0}):t,e)),Dt=e=>Ve(ye({},\"__esModule\",{value:!0}),e);var de=ae((Wr,at)=>{\"use strict\";var z=\"\\\\\\\\/\",ot=`[^${z}]`,te=\"\\\\.\",Zt=\"\\\\+\",zt=\"\\\\?\",Se=\"\\\\/\",Jt=\"(?=.)\",nt=\"[^/]\",Ne=`(?:${Se}|$)`,st=`(?:^|${Se})`,De=`${te}{1,2}${Ne}`,er=`(?!${te})`,tr=`(?!${st}${De})`,rr=`(?!${te}{0,1}${Ne})`,or=`(?!${De})`,nr=`[^.${Se}]`,sr=`${nt}*?`,ir=\"/\",it={DOT_LITERAL:te,PLUS_LITERAL:Zt,QMARK_LITERAL:zt,SLASH_LITERAL:Se,ONE_CHAR:Jt,QMARK:nt,END_ANCHOR:Ne,DOTS_SLASH:De,NO_DOT:er,NO_DOTS:tr,NO_DOT_SLASH:rr,NO_DOTS_SLASH:or,QMARK_NO_DOT:nr,STAR:sr,START_ANCHOR:st,SEP:ir},ar={...it,SLASH_LITERAL:`[${z}]`,QMARK:ot,STAR:`${ot}*?`,DOTS_SLASH:`${te}{1,2}(?:[${z}]|$)`,NO_DOT:`(?!${te})`,NO_DOTS:`(?!(?:^|[${z}])${te}{1,2}(?:[${z}]|$))`,NO_DOT_SLASH:`(?!${te}{0,1}(?:[${z}]|$))`,NO_DOTS_SLASH:`(?!${te}{1,2}(?:[${z}]|$))`,QMARK_NO_DOT:`[^.${z}]`,START_ANCHOR:`(?:^|[${z}])`,END_ANCHOR:`(?:[${z}]|$)`,SEP:\"\\\\\"},ur={alnum:\"a-zA-Z0-9\",alpha:\"a-zA-Z\",ascii:\"\\\\x00-\\\\x7F\",blank:\" \\\\t\",cntrl:\"\\\\x00-\\\\x1F\\\\x7F\",digit:\"0-9\",graph:\"\\\\x21-\\\\x7E\",lower:\"a-z\",print:\"\\\\x20-\\\\x7E \",punct:\"\\\\-!\\\"#$%&'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~\",space:\" \\\\t\\\\r\\\\n\\\\v\\\\f\",upper:\"A-Z\",word:\"A-Za-z0-9_\",xdigit:\"A-Fa-f0-9\"};at.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:ur,REGEX_BACKSLASH:/\\\\(?![*+?^${}(|)[\\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\\].,$*+?^{}()|\\\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\\\?)((\\W)(\\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,REPLACEMENTS:{\"***\":\"*\",\"**/**\":\"**\",\"**/**/**\":\"**\"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{\"!\":{type:\"negate\",open:\"(?:(?!(?:\",close:`))${e.STAR})`},\"?\":{type:\"qmark\",open:\"(?:\",close:\")?\"},\"+\":{type:\"plus\",open:\"(?:\",close:\")+\"},\"*\":{type:\"star\",open:\"(?:\",close:\")*\"},\"@\":{type:\"at\",open:\"(?:\",close:\")\"}}},globChars(e){return e===!0?ar:it}}});var Ae=ae(B=>{\"use strict\";var{REGEX_BACKSLASH:cr,REGEX_REMOVE_BACKSLASH:lr,REGEX_SPECIAL_CHARS:fr,REGEX_SPECIAL_CHARS_GLOBAL:pr}=de();B.isObject=e=>e!==null&&typeof e==\"object\"&&!Array.isArray(e);B.hasRegexChars=e=>fr.test(e);B.isRegexChar=e=>e.length===1&&B.hasRegexChars(e);B.escapeRegex=e=>e.replace(pr,\"\\\\$1\");B.toPosixSlashes=e=>e.replace(cr,\"/\");B.isWindows=()=>{if(typeof navigator<\"u\"&&navigator.platform){let e=navigator.platform.toLowerCase();return e===\"win32\"||e===\"windows\"}return typeof process<\"u\"&&process.platform?process.platform===\"win32\":!1};B.removeBackslashes=e=>e.replace(lr,r=>r===\"\\\\\"?\"\":r);B.escapeLast=(e,r,t)=>{let o=e.lastIndexOf(r,t);return o===-1?e:e[o-1]===\"\\\\\"?B.escapeLast(e,r,o-1):`${e.slice(0,o)}\\\\${e.slice(o)}`};B.removePrefix=(e,r={})=>{let t=e;return t.startsWith(\"./\")&&(t=t.slice(2),r.prefix=\"./\"),t};B.wrapOutput=(e,r={},t={})=>{let o=t.contains?\"\":\"^\",n=t.contains?\"\":\"$\",c=`${o}(?:${e})${n}`;return r.negated===!0&&(c=`(?:^(?!${c}).*$)`),c};B.basename=(e,{windows:r}={})=>{let t=e.split(r?/[\\\\/]/:\"/\"),o=t[t.length-1];return o===\"\"?t[t.length-2]:o}});var dt=ae((Vr,ht)=>{\"use strict\";var ut=Ae(),{CHAR_ASTERISK:Me,CHAR_AT:gr,CHAR_BACKWARD_SLASH:Re,CHAR_COMMA:hr,CHAR_DOT:Pe,CHAR_EXCLAMATION_MARK:Be,CHAR_FORWARD_SLASH:gt,CHAR_LEFT_CURLY_BRACE:Ge,CHAR_LEFT_PARENTHESES:je,CHAR_LEFT_SQUARE_BRACKET:dr,CHAR_PLUS:Ar,CHAR_QUESTION_MARK:ct,CHAR_RIGHT_CURLY_BRACE:Rr,CHAR_RIGHT_PARENTHESES:lt,CHAR_RIGHT_SQUARE_BRACKET:br}=de(),ft=e=>e===gt||e===Re,pt=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},Cr=(e,r)=>{let t=r||{},o=e.length-1,n=t.parts===!0||t.scanToEnd===!0,c=[],u=[],f=[],p=e,h=-1,C=0,L=0,I=!1,G=!1,_=!1,w=!1,oe=!1,Q=!1,E=!1,Z=!1,ne=!1,D=!1,N=0,j,d,R={value:\"\",depth:0,isGlob:!1},a=()=>h>=o,P=()=>p.charCodeAt(h+1),H=()=>(j=d,p.charCodeAt(++h));for(;h<o;){d=H();let y;if(d===Re){E=R.backslashes=!0,d=H(),d===Ge&&(Q=!0);continue}if(Q===!0||d===Ge){for(N++;a()!==!0&&(d=H());){if(d===Re){E=R.backslashes=!0,H();continue}if(d===Ge){N++;continue}if(Q!==!0&&d===Pe&&(d=H())===Pe){if(I=R.isBrace=!0,_=R.isGlob=!0,D=!0,n===!0)continue;break}if(Q!==!0&&d===hr){if(I=R.isBrace=!0,_=R.isGlob=!0,D=!0,n===!0)continue;break}if(d===Rr&&(N--,N===0)){Q=!1,I=R.isBrace=!0,D=!0;break}}if(n===!0)continue;break}if(d===gt){if(c.push(h),u.push(R),R={value:\"\",depth:0,isGlob:!1},D===!0)continue;if(j===Pe&&h===C+1){C+=2;continue}L=h+1;continue}if(t.noext!==!0&&(d===Ar||d===gr||d===Me||d===ct||d===Be)===!0&&P()===je){if(_=R.isGlob=!0,w=R.isExtglob=!0,D=!0,d===Be&&h===C&&(ne=!0),n===!0){for(;a()!==!0&&(d=H());){if(d===Re){E=R.backslashes=!0,d=H();continue}if(d===lt){_=R.isGlob=!0,D=!0;break}}continue}break}if(d===Me){if(j===Me&&(oe=R.isGlobstar=!0),_=R.isGlob=!0,D=!0,n===!0)continue;break}if(d===ct){if(_=R.isGlob=!0,D=!0,n===!0)continue;break}if(d===dr){for(;a()!==!0&&(y=H());){if(y===Re){E=R.backslashes=!0,H();continue}if(y===br){G=R.isBracket=!0,_=R.isGlob=!0,D=!0;break}}if(n===!0)continue;break}if(t.nonegate!==!0&&d===Be&&h===C){Z=R.negated=!0,C++;continue}if(t.noparen!==!0&&d===je){if(_=R.isGlob=!0,n===!0){for(;a()!==!0&&(d=H());){if(d===je){E=R.backslashes=!0,d=H();continue}if(d===lt){D=!0;break}}continue}break}if(_===!0){if(D=!0,n===!0)continue;break}}t.noext===!0&&(w=!1,_=!1);let $=p,s=\"\",i=\"\";C>0&&(s=p.slice(0,C),p=p.slice(C),L-=C),$&&_===!0&&L>0?($=p.slice(0,L),i=p.slice(L)):_===!0?($=\"\",i=p):$=p,$&&$!==\"\"&&$!==\"/\"&&$!==p&&ft($.charCodeAt($.length-1))&&($=$.slice(0,-1)),t.unescape===!0&&(i&&(i=ut.removeBackslashes(i)),$&&E===!0&&($=ut.removeBackslashes($)));let U={prefix:s,input:e,start:C,base:$,glob:i,isBrace:I,isBracket:G,isGlob:_,isExtglob:w,isGlobstar:oe,negated:Z,negatedExtglob:ne};if(t.tokens===!0&&(U.maxDepth=0,ft(d)||u.push(R),U.tokens=u),t.parts===!0||t.tokens===!0){let y;for(let O=0;O<c.length;O++){let ee=y?y+1:C,V=c[O],re=e.slice(ee,V);t.tokens&&(O===0&&C!==0?(u[O].isPrefix=!0,u[O].value=s):u[O].value=re,pt(u[O]),U.maxDepth+=u[O].depth),(O!==0||re!==\"\")&&f.push(re),y=V}if(y&&y+1<e.length){let O=e.slice(y+1);f.push(O),t.tokens&&(u[u.length-1].value=O,pt(u[u.length-1]),U.maxDepth+=u[u.length-1].depth)}U.slashes=c,U.parts=f}return U};ht.exports=Cr});var bt=ae((Kr,Rt)=>{\"use strict\";var Te=de(),J=Ae(),{MAX_LENGTH:$e,POSIX_REGEX_SOURCE:_r,REGEX_NON_SPECIAL_CHARS:yr,REGEX_SPECIAL_CHARS_BACKREF:Er,REPLACEMENTS:At}=Te,mr=(e,r)=>{if(typeof r.expandRange==\"function\")return r.expandRange(...e,r);e.sort();let t=`[${e.join(\"-\")}]`;try{new RegExp(t)}catch{return e.map(n=>J.escapeRegex(n)).join(\"..\")}return t},le=(e,r)=>`Missing ${e}: \"${r}\" - use \"\\\\\\\\${r}\" to match literal characters`,Fe=(e,r)=>{if(typeof e!=\"string\")throw new TypeError(\"Expected a string\");e=At[e]||e;let t={...r},o=typeof t.maxLength==\"number\"?Math.min($e,t.maxLength):$e,n=e.length;if(n>o)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${o}`);let c={type:\"bos\",value:\"\",output:t.prepend||\"\"},u=[c],f=t.capture?\"\":\"?:\",p=Te.globChars(t.windows),h=Te.extglobChars(p),{DOT_LITERAL:C,PLUS_LITERAL:L,SLASH_LITERAL:I,ONE_CHAR:G,DOTS_SLASH:_,NO_DOT:w,NO_DOT_SLASH:oe,NO_DOTS_SLASH:Q,QMARK:E,QMARK_NO_DOT:Z,STAR:ne,START_ANCHOR:D}=p,N=g=>`(${f}(?:(?!${D}${g.dot?_:C}).)*?)`,j=t.dot?\"\":w,d=t.dot?E:Z,R=t.bash===!0?N(t):ne;t.capture&&(R=`(${R})`),typeof t.noext==\"boolean\"&&(t.noextglob=t.noext);let a={input:e,index:-1,start:0,dot:t.dot===!0,consumed:\"\",output:\"\",prefix:\"\",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:u};e=J.removePrefix(e,a),n=e.length;let P=[],H=[],$=[],s=c,i,U=()=>a.index===n-1,y=a.peek=(g=1)=>e[a.index+g],O=a.advance=()=>e[++a.index]||\"\",ee=()=>e.slice(a.index+1),V=(g=\"\",m=0)=>{a.consumed+=g,a.index+=m},re=g=>{a.output+=g.output!=null?g.output:g.value,V(g.value)},$t=()=>{let g=1;for(;y()===\"!\"&&(y(2)!==\"(\"||y(3)===\"?\");)O(),a.start++,g++;return g%2===0?!1:(a.negated=!0,a.start++,!0)},be=g=>{a[g]++,$.push(g)},se=g=>{a[g]--,$.pop()},b=g=>{if(s.type===\"globstar\"){let m=a.braces>0&&(g.type===\"comma\"||g.type===\"brace\"),l=g.extglob===!0||P.length&&(g.type===\"pipe\"||g.type===\"paren\");g.type!==\"slash\"&&g.type!==\"paren\"&&!m&&!l&&(a.output=a.output.slice(0,-s.output.length),s.type=\"star\",s.value=\"*\",s.output=R,a.output+=s.output)}if(P.length&&g.type!==\"paren\"&&(P[P.length-1].inner+=g.value),(g.value||g.output)&&re(g),s&&s.type===\"text\"&&g.type===\"text\"){s.output=(s.output||s.value)+g.value,s.value+=g.value;return}g.prev=s,u.push(g),s=g},Ce=(g,m)=>{let l={...h[m],conditions:1,inner:\"\"};l.prev=s,l.parens=a.parens,l.output=a.output;let A=(t.capture?\"(\":\"\")+l.open;be(\"parens\"),b({type:g,value:m,output:a.output?\"\":G}),b({type:\"paren\",extglob:!0,value:O(),output:A}),P.push(l)},vt=g=>{let m=g.close+(t.capture?\")\":\"\"),l;if(g.type===\"negate\"){let A=R;if(g.inner&&g.inner.length>1&&g.inner.includes(\"/\")&&(A=N(t)),(A!==R||U()||/^\\)+$/.test(ee()))&&(m=g.close=`)$))${A}`),g.inner.includes(\"*\")&&(l=ee())&&/^\\.[^\\\\/.]+$/.test(l)){let S=Fe(l,{...r,fastpaths:!1}).output;m=g.close=`)${S})${A})`}g.prev.type===\"bos\"&&(a.negatedExtglob=!0)}b({type:\"paren\",extglob:!0,value:i,output:m}),se(\"parens\")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\\]{}\"])/.test(e)){let g=!1,m=e.replace(Er,(l,A,S,M,k,Le)=>M===\"\\\\\"?(g=!0,l):M===\"?\"?A?A+M+(k?E.repeat(k.length):\"\"):Le===0?d+(k?E.repeat(k.length):\"\"):E.repeat(S.length):M===\".\"?C.repeat(S.length):M===\"*\"?A?A+M+(k?R:\"\"):R:A?l:`\\\\${l}`);return g===!0&&(t.unescape===!0?m=m.replace(/\\\\/g,\"\"):m=m.replace(/\\\\+/g,l=>l.length%2===0?\"\\\\\\\\\":l?\"\\\\\":\"\")),m===e&&t.contains===!0?(a.output=e,a):(a.output=J.wrapOutput(m,a,r),a)}for(;!U();){if(i=O(),i===\"\\0\")continue;if(i===\"\\\\\"){let l=y();if(l===\"/\"&&t.bash!==!0||l===\".\"||l===\";\")continue;if(!l){i+=\"\\\\\",b({type:\"text\",value:i});continue}let A=/^\\\\+/.exec(ee()),S=0;if(A&&A[0].length>2&&(S=A[0].length,a.index+=S,S%2!==0&&(i+=\"\\\\\")),t.unescape===!0?i=O():i+=O(),a.brackets===0){b({type:\"text\",value:i});continue}}if(a.brackets>0&&(i!==\"]\"||s.value===\"[\"||s.value===\"[^\")){if(t.posix!==!1&&i===\":\"){let l=s.value.slice(1);if(l.includes(\"[\")&&(s.posix=!0,l.includes(\":\"))){let A=s.value.lastIndexOf(\"[\"),S=s.value.slice(0,A),M=s.value.slice(A+2),k=_r[M];if(k){s.value=S+k,a.backtrack=!0,O(),!c.output&&u.indexOf(s)===1&&(c.output=G);continue}}}(i===\"[\"&&y()!==\":\"||i===\"-\"&&y()===\"]\")&&(i=`\\\\${i}`),i===\"]\"&&(s.value===\"[\"||s.value===\"[^\")&&(i=`\\\\${i}`),t.posix===!0&&i===\"!\"&&s.value===\"[\"&&(i=\"^\"),s.value+=i,re({value:i});continue}if(a.quotes===1&&i!=='\"'){i=J.escapeRegex(i),s.value+=i,re({value:i});continue}if(i==='\"'){a.quotes=a.quotes===1?0:1,t.keepQuotes===!0&&b({type:\"text\",value:i});continue}if(i===\"(\"){be(\"parens\"),b({type:\"paren\",value:i});continue}if(i===\")\"){if(a.parens===0&&t.strictBrackets===!0)throw new SyntaxError(le(\"opening\",\"(\"));let l=P[P.length-1];if(l&&a.parens===l.parens+1){vt(P.pop());continue}b({type:\"paren\",value:i,output:a.parens?\")\":\"\\\\)\"}),se(\"parens\");continue}if(i===\"[\"){if(t.nobracket===!0||!ee().includes(\"]\")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(le(\"closing\",\"]\"));i=`\\\\${i}`}else be(\"brackets\");b({type:\"bracket\",value:i});continue}if(i===\"]\"){if(t.nobracket===!0||s&&s.type===\"bracket\"&&s.value.length===1){b({type:\"text\",value:i,output:`\\\\${i}`});continue}if(a.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(le(\"opening\",\"[\"));b({type:\"text\",value:i,output:`\\\\${i}`});continue}se(\"brackets\");let l=s.value.slice(1);if(s.posix!==!0&&l[0]===\"^\"&&!l.includes(\"/\")&&(i=`/${i}`),s.value+=i,re({value:i}),t.literalBrackets===!1||J.hasRegexChars(l))continue;let A=J.escapeRegex(s.value);if(a.output=a.output.slice(0,-s.value.length),t.literalBrackets===!0){a.output+=A,s.value=A;continue}s.value=`(${f}${A}|${s.value})`,a.output+=s.value;continue}if(i===\"{\"&&t.nobrace!==!0){be(\"braces\");let l={type:\"brace\",value:i,output:\"(\",outputIndex:a.output.length,tokensIndex:a.tokens.length};H.push(l),b(l);continue}if(i===\"}\"){let l=H[H.length-1];if(t.nobrace===!0||!l){b({type:\"text\",value:i,output:i});continue}let A=\")\";if(l.dots===!0){let S=u.slice(),M=[];for(let k=S.length-1;k>=0&&(u.pop(),S[k].type!==\"brace\");k--)S[k].type!==\"dots\"&&M.unshift(S[k].value);A=mr(M,t),a.backtrack=!0}if(l.comma!==!0&&l.dots!==!0){let S=a.output.slice(0,l.outputIndex),M=a.tokens.slice(l.tokensIndex);l.value=l.output=\"\\\\{\",i=A=\"\\\\}\",a.output=S;for(let k of M)a.output+=k.output||k.value}b({type:\"brace\",value:i,output:A}),se(\"braces\"),H.pop();continue}if(i===\"|\"){P.length>0&&P[P.length-1].conditions++,b({type:\"text\",value:i});continue}if(i===\",\"){let l=i,A=H[H.length-1];A&&$[$.length-1]===\"braces\"&&(A.comma=!0,l=\"|\"),b({type:\"comma\",value:i,output:l});continue}if(i===\"/\"){if(s.type===\"dot\"&&a.index===a.start+1){a.start=a.index+1,a.consumed=\"\",a.output=\"\",u.pop(),s=c;continue}b({type:\"slash\",value:i,output:I});continue}if(i===\".\"){if(a.braces>0&&s.type===\"dot\"){s.value===\".\"&&(s.output=C);let l=H[H.length-1];s.type=\"dots\",s.output+=i,s.value+=i,l.dots=!0;continue}if(a.braces+a.parens===0&&s.type!==\"bos\"&&s.type!==\"slash\"){b({type:\"text\",value:i,output:C});continue}b({type:\"dot\",value:i,output:C});continue}if(i===\"?\"){if(!(s&&s.value===\"(\")&&t.noextglob!==!0&&y()===\"(\"&&y(2)!==\"?\"){Ce(\"qmark\",i);continue}if(s&&s.type===\"paren\"){let A=y(),S=i;(s.value===\"(\"&&!/[!=<:]/.test(A)||A===\"<\"&&!/<([!=]|\\w+>)/.test(ee()))&&(S=`\\\\${i}`),b({type:\"text\",value:i,output:S});continue}if(t.dot!==!0&&(s.type===\"slash\"||s.type===\"bos\")){b({type:\"qmark\",value:i,output:Z});continue}b({type:\"qmark\",value:i,output:E});continue}if(i===\"!\"){if(t.noextglob!==!0&&y()===\"(\"&&(y(2)!==\"?\"||!/[!=<:]/.test(y(3)))){Ce(\"negate\",i);continue}if(t.nonegate!==!0&&a.index===0){$t();continue}}if(i===\"+\"){if(t.noextglob!==!0&&y()===\"(\"&&y(2)!==\"?\"){Ce(\"plus\",i);continue}if(s&&s.value===\"(\"||t.regex===!1){b({type:\"plus\",value:i,output:L});continue}if(s&&(s.type===\"bracket\"||s.type===\"paren\"||s.type===\"brace\")||a.parens>0){b({type:\"plus\",value:i});continue}b({type:\"plus\",value:L});continue}if(i===\"@\"){if(t.noextglob!==!0&&y()===\"(\"&&y(2)!==\"?\"){b({type:\"at\",extglob:!0,value:i,output:\"\"});continue}b({type:\"text\",value:i});continue}if(i!==\"*\"){(i===\"$\"||i===\"^\")&&(i=`\\\\${i}`);let l=yr.exec(ee());l&&(i+=l[0],a.index+=l[0].length),b({type:\"text\",value:i});continue}if(s&&(s.type===\"globstar\"||s.star===!0)){s.type=\"star\",s.star=!0,s.value+=i,s.output=R,a.backtrack=!0,a.globstar=!0,V(i);continue}let g=ee();if(t.noextglob!==!0&&/^\\([^?]/.test(g)){Ce(\"star\",i);continue}if(s.type===\"star\"){if(t.noglobstar===!0){V(i);continue}let l=s.prev,A=l.prev,S=l.type===\"slash\"||l.type===\"bos\",M=A&&(A.type===\"star\"||A.type===\"globstar\");if(t.bash===!0&&(!S||g[0]&&g[0]!==\"/\")){b({type:\"star\",value:i,output:\"\"});continue}let k=a.braces>0&&(l.type===\"comma\"||l.type===\"brace\"),Le=P.length&&(l.type===\"pipe\"||l.type===\"paren\");if(!S&&l.type!==\"paren\"&&!k&&!Le){b({type:\"star\",value:i,output:\"\"});continue}for(;g.slice(0,3)===\"/**\";){let _e=e[a.index+4];if(_e&&_e!==\"/\")break;g=g.slice(3),V(\"/**\",3)}if(l.type===\"bos\"&&U()){s.type=\"globstar\",s.value+=i,s.output=N(t),a.output=s.output,a.globstar=!0,V(i);continue}if(l.type===\"slash\"&&l.prev.type!==\"bos\"&&!M&&U()){a.output=a.output.slice(0,-(l.output+s.output).length),l.output=`(?:${l.output}`,s.type=\"globstar\",s.output=N(t)+(t.strictSlashes?\")\":\"|$)\"),s.value+=i,a.globstar=!0,a.output+=l.output+s.output,V(i);continue}if(l.type===\"slash\"&&l.prev.type!==\"bos\"&&g[0]===\"/\"){let _e=g[1]!==void 0?\"|$\":\"\";a.output=a.output.slice(0,-(l.output+s.output).length),l.output=`(?:${l.output}`,s.type=\"globstar\",s.output=`${N(t)}${I}|${I}${_e})`,s.value+=i,a.output+=l.output+s.output,a.globstar=!0,V(i+O()),b({type:\"slash\",value:\"/\",output:\"\"});continue}if(l.type===\"bos\"&&g[0]===\"/\"){s.type=\"globstar\",s.value+=i,s.output=`(?:^|${I}|${N(t)}${I})`,a.output=s.output,a.globstar=!0,V(i+O()),b({type:\"slash\",value:\"/\",output:\"\"});continue}a.output=a.output.slice(0,-s.output.length),s.type=\"globstar\",s.output=N(t),s.value+=i,a.output+=s.output,a.globstar=!0,V(i);continue}let m={type:\"star\",value:i,output:R};if(t.bash===!0){m.output=\".*?\",(s.type===\"bos\"||s.type===\"slash\")&&(m.output=j+m.output),b(m);continue}if(s&&(s.type===\"bracket\"||s.type===\"paren\")&&t.regex===!0){m.output=i,b(m);continue}(a.index===a.start||s.type===\"slash\"||s.type===\"dot\")&&(s.type===\"dot\"?(a.output+=oe,s.output+=oe):t.dot===!0?(a.output+=Q,s.output+=Q):(a.output+=j,s.output+=j),y()!==\"*\"&&(a.output+=G,s.output+=G)),b(m)}for(;a.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(le(\"closing\",\"]\"));a.output=J.escapeLast(a.output,\"[\"),se(\"brackets\")}for(;a.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(le(\"closing\",\")\"));a.output=J.escapeLast(a.output,\"(\"),se(\"parens\")}for(;a.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(le(\"closing\",\"}\"));a.output=J.escapeLast(a.output,\"{\"),se(\"braces\")}if(t.strictSlashes!==!0&&(s.type===\"star\"||s.type===\"bracket\")&&b({type:\"maybe_slash\",value:\"\",output:`${I}?`}),a.backtrack===!0){a.output=\"\";for(let g of a.tokens)a.output+=g.output!=null?g.output:g.value,g.suffix&&(a.output+=g.suffix)}return a};Fe.fastpaths=(e,r)=>{let t={...r},o=typeof t.maxLength==\"number\"?Math.min($e,t.maxLength):$e,n=e.length;if(n>o)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${o}`);e=At[e]||e;let{DOT_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:f,DOTS_SLASH:p,NO_DOT:h,NO_DOTS:C,NO_DOTS_SLASH:L,STAR:I,START_ANCHOR:G}=Te.globChars(t.windows),_=t.dot?C:h,w=t.dot?L:h,oe=t.capture?\"\":\"?:\",Q={negated:!1,prefix:\"\"},E=t.bash===!0?\".*?\":I;t.capture&&(E=`(${E})`);let Z=j=>j.noglobstar===!0?E:`(${oe}(?:(?!${G}${j.dot?p:c}).)*?)`,ne=j=>{switch(j){case\"*\":return`${_}${f}${E}`;case\".*\":return`${c}${f}${E}`;case\"*.*\":return`${_}${E}${c}${f}${E}`;case\"*/*\":return`${_}${E}${u}${f}${w}${E}`;case\"**\":return _+Z(t);case\"**/*\":return`(?:${_}${Z(t)}${u})?${w}${f}${E}`;case\"**/*.*\":return`(?:${_}${Z(t)}${u})?${w}${E}${c}${f}${E}`;case\"**/.*\":return`(?:${_}${Z(t)}${u})?${c}${f}${E}`;default:{let d=/^(.*?)\\.(\\w+)$/.exec(j);if(!d)return;let R=ne(d[1]);return R?R+c+d[2]:void 0}}},D=J.removePrefix(e,Q),N=ne(D);return N&&t.strictSlashes!==!0&&(N+=`${u}?`),N};Rt.exports=Fe});var yt=ae((Xr,_t)=>{\"use strict\";var xr=dt(),We=bt(),Ct=Ae(),Or=de(),Sr=e=>e&&typeof e==\"object\"&&!Array.isArray(e),v=(e,r,t=!1)=>{if(Array.isArray(e)){let C=e.map(I=>v(I,r,t));return I=>{for(let G of C){let _=G(I);if(_)return _}return!1}}let o=Sr(e)&&e.tokens&&e.input;if(e===\"\"||typeof e!=\"string\"&&!o)throw new TypeError(\"Expected pattern to be a non-empty string\");let n=r||{},c=n.windows,u=o?v.compileRe(e,r):v.makeRe(e,r,!1,!0),f=u.state;delete u.state;let p=()=>!1;if(n.ignore){let C={...r,ignore:null,onMatch:null,onResult:null};p=v(n.ignore,C,t)}let h=(C,L=!1)=>{let{isMatch:I,match:G,output:_}=v.test(C,u,r,{glob:e,posix:c}),w={glob:e,state:f,regex:u,posix:c,input:C,output:_,match:G,isMatch:I};return typeof n.onResult==\"function\"&&n.onResult(w),I===!1?(w.isMatch=!1,L?w:!1):p(C)?(typeof n.onIgnore==\"function\"&&n.onIgnore(w),w.isMatch=!1,L?w:!1):(typeof n.onMatch==\"function\"&&n.onMatch(w),L?w:!0)};return t&&(h.state=f),h};v.test=(e,r,t,{glob:o,posix:n}={})=>{if(typeof e!=\"string\")throw new TypeError(\"Expected input to be a string\");if(e===\"\")return{isMatch:!1,output:\"\"};let c=t||{},u=c.format||(n?Ct.toPosixSlashes:null),f=e===o,p=f&&u?u(e):e;return f===!1&&(p=u?u(e):e,f=p===o),(f===!1||c.capture===!0)&&(c.matchBase===!0||c.basename===!0?f=v.matchBase(e,r,t,n):f=r.exec(p)),{isMatch:!!f,match:f,output:p}};v.matchBase=(e,r,t)=>(r instanceof RegExp?r:v.makeRe(r,t)).test(Ct.basename(e));v.isMatch=(e,r,t)=>v(r,t)(e);v.parse=(e,r)=>Array.isArray(e)?e.map(t=>v.parse(t,r)):We(e,{...r,fastpaths:!1});v.scan=(e,r)=>xr(e,r);v.compileRe=(e,r,t=!1,o=!1)=>{if(t===!0)return e.output;let n=r||{},c=n.contains?\"\":\"^\",u=n.contains?\"\":\"$\",f=`${c}(?:${e.output})${u}`;e&&e.negated===!0&&(f=`^(?!${f}).*$`);let p=v.toRegex(f,r);return o===!0&&(p.state=e),p};v.makeRe=(e,r={},t=!1,o=!1)=>{if(!e||typeof e!=\"string\")throw new TypeError(\"Expected a non-empty string\");let n={negated:!1,fastpaths:!0};return r.fastpaths!==!1&&(e[0]===\".\"||e[0]===\"*\")&&(n.output=We.fastpaths(e,r)),n.output||(n=We(e,r)),v.compileRe(n,r,t,o)};v.toRegex=(e,r)=>{try{let t=r||{};return new RegExp(e,t.flags||(t.nocase?\"i\":\"\"))}catch(t){if(r&&r.debug===!0)throw t;return/$^/}};v.constants=Or;_t.exports=v});var Ot=ae((qr,xt)=>{\"use strict\";var Et=yt(),Tr=Ae();function mt(e,r,t=!1){return r&&(r.windows===null||r.windows===void 0)&&(r={...r,windows:Tr.isWindows()}),Et(e,r,t)}Object.assign(mt,Et);xt.exports=mt});var Ir={};Nt(Ir,{default:()=>Lr});var W=fe(\"@yarnpkg/core\");var Ke=(e=0)=>r=>`\\x1B[${r+e}m`,Xe=(e=0)=>r=>`\\x1B[${38+e};5;${r}m`,qe=(e=0)=>(r,t,o)=>`\\x1B[${38+e};2;${r};${t};${o}m`,x={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},kr=Object.keys(x.modifier),Mt=Object.keys(x.color),Pt=Object.keys(x.bgColor),wr=[...Mt,...Pt];function Bt(){let e=new Map;for(let[r,t]of Object.entries(x)){for(let[o,n]of Object.entries(t))x[o]={open:`\\x1B[${n[0]}m`,close:`\\x1B[${n[1]}m`},t[o]=x[o],e.set(n[0],n[1]);Object.defineProperty(x,r,{value:t,enumerable:!1})}return Object.defineProperty(x,\"codes\",{value:e,enumerable:!1}),x.color.close=\"\\x1B[39m\",x.bgColor.close=\"\\x1B[49m\",x.color.ansi=Ke(),x.color.ansi256=Xe(),x.color.ansi16m=qe(),x.bgColor.ansi=Ke(10),x.bgColor.ansi256=Xe(10),x.bgColor.ansi16m=qe(10),Object.defineProperties(x,{rgbToAnsi256:{value(r,t,o){return r===t&&t===o?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(t/255*5)+Math.round(o/255*5)},enumerable:!1},hexToRgb:{value(r){let t=/[a-f\\d]{6}|[a-f\\d]{3}/i.exec(r.toString(16));if(!t)return[0,0,0];let[o]=t;o.length===3&&(o=[...o].map(c=>c+c).join(\"\"));let n=Number.parseInt(o,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:r=>x.rgbToAnsi256(...x.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value(r){if(r<8)return 30+r;if(r<16)return 90+(r-8);let t,o,n;if(r>=232)t=((r-232)*10+8)/255,o=t,n=t;else{r-=16;let f=r%36;t=Math.floor(r/36)/5,o=Math.floor(f/6)/5,n=f%6/5}let c=Math.max(t,o,n)*2;if(c===0)return 30;let u=30+(Math.round(n)<<2|Math.round(o)<<1|Math.round(t));return c===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(r,t,o)=>x.ansi256ToAnsi(x.rgbToAnsi256(r,t,o)),enumerable:!1},hexToAnsi:{value:r=>x.ansi256ToAnsi(x.hexToAnsi256(r)),enumerable:!1}}),x}var Gt=Bt(),q=Gt;var xe=Ee(fe(\"process\"),1),Qe=Ee(fe(\"os\"),1),Ie=Ee(fe(\"tty\"),1);function K(e,r=globalThis.Deno?globalThis.Deno.args:xe.default.argv){let t=e.startsWith(\"-\")?\"\":e.length===1?\"-\":\"--\",o=r.indexOf(t+e),n=r.indexOf(\"--\");return o!==-1&&(n===-1||o<n)}var{env:T}=xe.default,me;K(\"no-color\")||K(\"no-colors\")||K(\"color=false\")||K(\"color=never\")?me=0:(K(\"color\")||K(\"colors\")||K(\"color=true\")||K(\"color=always\"))&&(me=1);function jt(){if(\"FORCE_COLOR\"in T)return T.FORCE_COLOR===\"true\"?1:T.FORCE_COLOR===\"false\"?0:T.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(T.FORCE_COLOR,10),3)}function Ft(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Wt(e,{streamIsTTY:r,sniffFlags:t=!0}={}){let o=jt();o!==void 0&&(me=o);let n=t?me:o;if(n===0)return 0;if(t){if(K(\"color=16m\")||K(\"color=full\")||K(\"color=truecolor\"))return 3;if(K(\"color=256\"))return 2}if(\"TF_BUILD\"in T&&\"AGENT_NAME\"in T)return 1;if(e&&!r&&n===void 0)return 0;let c=n||0;if(T.TERM===\"dumb\")return c;if(xe.default.platform===\"win32\"){let u=Qe.default.release().split(\".\");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if(\"CI\"in T)return[\"GITHUB_ACTIONS\",\"GITEA_ACTIONS\",\"CIRCLECI\"].some(u=>u in T)?3:[\"TRAVIS\",\"APPVEYOR\",\"GITLAB_CI\",\"BUILDKITE\",\"DRONE\"].some(u=>u in T)||T.CI_NAME===\"codeship\"?1:c;if(\"TEAMCITY_VERSION\"in T)return/^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(T.TEAMCITY_VERSION)?1:0;if(T.COLORTERM===\"truecolor\"||T.TERM===\"xterm-kitty\")return 3;if(\"TERM_PROGRAM\"in T){let u=Number.parseInt((T.TERM_PROGRAM_VERSION||\"\").split(\".\")[0],10);switch(T.TERM_PROGRAM){case\"iTerm.app\":return u>=3?3:2;case\"Apple_Terminal\":return 2}}return/-256(color)?$/i.test(T.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(T.TERM)||\"COLORTERM\"in T?1:c}function Ye(e,r={}){let t=Wt(e,{streamIsTTY:e&&e.isTTY,...r});return Ft(t)}var Ut={stdout:Ye({isTTY:Ie.default.isatty(1)}),stderr:Ye({isTTY:Ie.default.isatty(2)})},Ze=Ut;function ze(e,r,t){let o=e.indexOf(r);if(o===-1)return e;let n=r.length,c=0,u=\"\";do u+=e.slice(c,o)+r+t,c=o+n,o=e.indexOf(r,c);while(o!==-1);return u+=e.slice(c),u}function Je(e,r,t,o){let n=0,c=\"\";do{let u=e[o-1]===\"\\r\";c+=e.slice(n,u?o-1:o)+r+(u?`\\r\n`:`\n`)+t,n=o+1,o=e.indexOf(`\n`,n)}while(o!==-1);return c+=e.slice(n),c}var{stdout:et,stderr:tt}=Ze,He=Symbol(\"GENERATOR\"),ue=Symbol(\"STYLER\"),pe=Symbol(\"IS_EMPTY\"),rt=[\"ansi\",\"ansi\",\"ansi256\",\"ansi16m\"],ce=Object.create(null),Vt=(e,r={})=>{if(r.level&&!(Number.isInteger(r.level)&&r.level>=0&&r.level<=3))throw new Error(\"The `level` option should be an integer from 0 to 3\");let t=et?et.level:0;e.level=r.level===void 0?t:r.level};var Kt=e=>{let r=(...t)=>t.join(\" \");return Vt(r,e),Object.setPrototypeOf(r,ge.prototype),r};function ge(e){return Kt(e)}Object.setPrototypeOf(ge.prototype,Function.prototype);for(let[e,r]of Object.entries(q))ce[e]={get(){let t=Oe(this,we(r.open,r.close,this[ue]),this[pe]);return Object.defineProperty(this,e,{value:t}),t}};ce.visible={get(){let e=Oe(this,this[ue],!0);return Object.defineProperty(this,\"visible\",{value:e}),e}};var ke=(e,r,t,...o)=>e===\"rgb\"?r===\"ansi16m\"?q[t].ansi16m(...o):r===\"ansi256\"?q[t].ansi256(q.rgbToAnsi256(...o)):q[t].ansi(q.rgbToAnsi(...o)):e===\"hex\"?ke(\"rgb\",r,t,...q.hexToRgb(...o)):q[t][e](...o),Xt=[\"rgb\",\"hex\",\"ansi256\"];for(let e of Xt){ce[e]={get(){let{level:t}=this;return function(...o){let n=we(ke(e,rt[t],\"color\",...o),q.color.close,this[ue]);return Oe(this,n,this[pe])}}};let r=\"bg\"+e[0].toUpperCase()+e.slice(1);ce[r]={get(){let{level:t}=this;return function(...o){let n=we(ke(e,rt[t],\"bgColor\",...o),q.bgColor.close,this[ue]);return Oe(this,n,this[pe])}}}}var qt=Object.defineProperties(()=>{},{...ce,level:{enumerable:!0,get(){return this[He].level},set(e){this[He].level=e}}}),we=(e,r,t)=>{let o,n;return t===void 0?(o=e,n=r):(o=t.openAll+e,n=r+t.closeAll),{open:e,close:r,openAll:o,closeAll:n,parent:t}},Oe=(e,r,t)=>{let o=(...n)=>Yt(o,n.length===1?\"\"+n[0]:n.join(\" \"));return Object.setPrototypeOf(o,qt),o[He]=e,o[ue]=r,o[pe]=t,o},Yt=(e,r)=>{if(e.level<=0||!r)return e[pe]?\"\":r;let t=e[ue];if(t===void 0)return r;let{openAll:o,closeAll:n}=t;if(r.includes(\"\\x1B\"))for(;t!==void 0;)r=ze(r,t.close,t.open),t=t.parent;let c=r.indexOf(`\n`);return c!==-1&&(r=Je(r,n,o,c)),o+r+n};Object.defineProperties(ge.prototype,ce);var Qt=ge(),jr=ge({level:tt?tt.level:0});var he=Qt;var Ue=fe(\"@yarnpkg/core\"),St=Ee(Ot()),ie=\"root\",X=\"catalog:\",F=class extends Error{constructor(t,o){super(t);this.code=o;this.name=\"CatalogConfigurationError\"}static{this.FILE_NOT_FOUND=\"FILE_NOT_FOUND\"}static{this.INVALID_FORMAT=\"INVALID_FORMAT\"}static{this.INVALID_ALIAS=\"INVALID_ALIAS\"}},ve=class{constructor(){this.configCache=new Map}getInheritanceChain(r){let t=r.split(\"/\"),o=[];for(let n=0;n<t.length;n++)o.push(t.slice(0,n+1).join(\"/\"));return o}resolveInheritedRange(r,t,o){let n=this.getInheritanceChain(t);for(let u=n.length-1;u>=0;u--){let f=n[u],p=r.list?.[f];if(p&&typeof p==\"object\"){let h=p[o];if(h)return h}}if(r.list&&typeof r.list==\"object\"){let u=r.list[o];if(typeof u==\"string\")return u}let c=r.list?.[ie];if(c&&typeof c==\"object\"){let u=c[o];if(u)return u}return null}validateInheritanceStructure(r){if(!r.list)return!0;let t=Object.keys(r.list);for(let o of t)if(typeof r.list[o]!=\"string\"&&o.includes(\"/\")){let n=this.getInheritanceChain(o);for(let c=0;c<n.length-1;c++){let u=n[c];if(!t.includes(u)&&u!==ie)return!1}}return!0}async readConfiguration(r){let o=r.cwd,n=this.configCache.get(o);if(n)return n;let c=r.configuration.get(\"catalogs\")||{},u=c;if(c.list?u.list=Object.entries(c.list).reduce((f,[p,h])=>(typeof h==\"string\"?f[ie]={...f[ie]||{},[p]:h}:f[p]=h,f),{}):u.list={},!this.isValidConfiguration(u))throw new F(\"Invalid catalogs configuration format. Expected structure: { options?: { default?: string[] | 'max', ignoredWorkspaces?: string[], validation?: 'warn' | 'strict' }, list: { [alias: string]: { [packageName: string]: string } } }\",F.INVALID_FORMAT);if(!this.validateInheritanceStructure(u))throw new F(\"Invalid inheritance structure in catalogs configuration. Check for missing parent groups.\",F.INVALID_ALIAS);return this.configCache.set(o,u),u}async getRange(r,t,o){let n=await this.readConfiguration(r),c=t.length===0?ie:t,u=this.resolveInheritedRange(n,c,o);if(u)return/^[^:]+:/.test(u)?u:`${r.configuration.get(\"defaultProtocol\")}${u}`;let f=n.list?.[c];if(!f||typeof f==\"string\")throw new F(`Alias \"${c}\" not found in .yarnrc.yml catalogs.`,F.INVALID_ALIAS);let p=f[o];if(!p)throw new F(`Package \"${o}\" not found in alias \"${c}\"`,F.INVALID_ALIAS);return/^[^:]+:/.test(p)?p:`${r.configuration.get(\"defaultProtocol\")}${p}`}async getDefaultAliasGroups(r){let t=await this.readConfiguration(r.project);if(t.options){if(await this.shouldIgnoreWorkspace(r))return[];if(t.options.default){if(Array.isArray(t.options.default))return t.options.default;if(t.options.default===\"max\"){let o=Object.keys(t.list||{}),n=[...r.manifest.dependencies,...r.manifest.devDependencies],c=Object.fromEntries(o.map(f=>[f,0]));for(let[f,p]of n)if(p.range.startsWith(X)){let h=p.range.substring(X.length);c[h]=(c[h]||0)+1}let u=Math.max(...Object.values(c));return Object.keys(c).filter(f=>c[f]===u)}}}return[]}async findDependency(r,t){let o=Ue.structUtils.stringifyIdent(t),n=await this.readConfiguration(r),c=[],u=Object.entries(n.list||{}).filter(([f,p])=>typeof p==\"string\"?o===p:Object.keys(p).includes(o));c.push(...u.map(([f,p])=>{let h=typeof p==\"string\"?p:p[o];return[f,h]}));for(let[f]of Object.entries(n.list||{})){if(c.some(([h])=>h===f))continue;let p=this.resolveInheritedRange(n,f,o);p&&c.push([f,p])}return c}clearCache(r){this.configCache.delete(r)}async shouldIgnoreWorkspace(r){if(!r.manifest.name)return!1;let t=await this.readConfiguration(r.project);return t.options?.ignoredWorkspaces?(0,St.isMatch)(Ue.structUtils.stringifyIdent(r.manifest.name),t.options.ignoredWorkspaces):!1}async getValidationLevel(r){let t=await this.readConfiguration(r.project);return t.options?.validation?t.options.validation:\"warn\"}isValidConfiguration(r){if(!r||typeof r!=\"object\"||!(\"list\"in r)||!r.list||typeof r.list!=\"object\")return!1;for(let[t,o]of Object.entries(r.list)){if(!o||typeof o!=\"object\")return!1;for(let n of Object.values(o))if(typeof n!=\"string\")return!1}if(\"options\"in r&&r.options&&typeof r.options==\"object\"){if(\"ignoredWorkspaces\"in r.options&&r.options.ignoredWorkspaces&&(!Array.isArray(r.options.ignoredWorkspaces)||r.options.ignoredWorkspaces.length===0))return!1;if(\"default\"in r.options&&r.options.default){if(Array.isArray(r.options.default)){if(r.options.default.length===0)return!1;let t=Object.keys(r.list||{});for(let o of r.options.default)if(o!==\"root\"&&!t.includes(o))if(o.includes(\"/\")){let n=this.getInheritanceChain(o),c=!0;for(let u of n)if(u!==\"root\"&&!t.includes(u)){c=!1;break}if(!c)return!1}else return!1}else if(typeof r.options.default!=\"string\"||r.options.default!==\"max\")return!1}if(\"validation\"in r.options&&(typeof r.options.validation!=\"string\"||![\"warn\",\"strict\"].includes(r.options.validation)))return!1}return!0}};var Y=new ve,$r={configuration:{catalogs:{description:\"Define dependency version ranges as reusable constants across your project.\",type:W.SettingsType.ANY,default:{}}},hooks:{validateWorkspace:async(e,r)=>{let t=await Y.shouldIgnoreWorkspace(e);if(!t){let n=await vr(e);if(n.length>0){let c=he.yellow(n.join(\", \")),u=await Y.getValidationLevel(e),f=`The following dependencies are listed in the catalogs but not using the catalog protocol: ${c}. Consider using the catalog protocol instead.`;u===\"strict\"?r.reportError(W.MessageName.INVALID_MANIFEST,f):u===\"warn\"&&r.reportWarning(W.MessageName.INVALID_MANIFEST,f)}}let o=[...Object.values(e.manifest.raw.dependencies||{}),...Object.values(e.manifest.raw.devDependencies||{})].some(n=>n.startsWith(X));t&&o&&r.reportError(W.MessageName.INVALID_MANIFEST,\"Workspace is ignored from the catalogs, but it has dependencies with the catalog protocol. Consider removing the protocol.\")},reduceDependency:async(e,r,...t)=>{let o=e.range.startsWith(X),n=e.range.includes(\"catalog%3A\")&&e.range.startsWith(\"patch:\");if(!o&&!n)return e;try{let c=\"\",u=e.range;if(o)c=e.range.slice(X.length);else if(n){let L=e.range.match(/catalog%3A([^#&]*)/);L&&(c=L[1]||\"\")}let f=W.structUtils.stringifyIdent(e),p=await Y.getRange(r,c,f),h;if(o?h=W.structUtils.makeDescriptor(W.structUtils.makeIdent(e.scope,e.name),p):h=W.structUtils.makeDescriptor(W.structUtils.makeIdent(e.scope,e.name),u.replace(/catalog%3A[^#&]*/,p)),n)return h;let C=await r.configuration.reduceHook(L=>L.reduceDependency,h,r,...t);return C!==h?C:h}catch(c){throw c instanceof F?new Error(`Failed to resolve ${W.structUtils.stringifyDescriptor(e)}: ${c.message}`):c}},afterWorkspaceDependencyAddition:async(e,r,t)=>{Tt(e,t)},afterWorkspaceDependencyReplacement:async(e,r,t,o)=>{Tt(e,o)},beforeWorkspacePacking:async(e,r)=>{if(await Y.shouldIgnoreWorkspace(e))return;let t=[\"dependencies\",\"devDependencies\",\"peerDependencies\",\"optionalDependencies\"];for(let o of t){let n=r[o];if(!(!n||typeof n!=\"object\"))for(let[c,u]of Object.entries(n)){let f=u;if(f.startsWith(X))try{let p=f.slice(X.length),h=await Y.getRange(e.project,p,c);n[c]=h}catch(p){throw p instanceof F?new Error(`Failed to resolve catalog dependency ${c}@${f} during packaging: ${p.message}`):p}}}}}};async function vr(e){let r=await Y.readConfiguration(e.project),t=new Set;if(r.list){for(let[c,u]of Object.entries(r.list))if(typeof u==\"object\")for(let f of Object.keys(u))t.add(f)}let o=[...Object.entries(e.manifest.raw.dependencies||{}),...Object.entries(e.manifest.raw.devDependencies||{})],n=[];for(let[c,u]of o)u.startsWith(X)||t.has(c)&&n.push(c);return n}async function Tt(e,r){if(r.range.startsWith(X)){if(await Y.shouldIgnoreWorkspace(e))throw new Error(he.red(\"The workspace is ignored from the catalogs, but the dependency to add is using the catalog protocol. Consider removing the protocol.\"));return}if(await Y.shouldIgnoreWorkspace(e))return;let t=await Y.findDependency(e.project,r);if(t.length===0)return;let o=await Y.getDefaultAliasGroups(e);if(o.length>0){for(let p of o)if(t.some(([h])=>h===p)){r.range=`${X}${p}`;return}}let n=t.map(([p])=>p===ie?\"\":p),c=n.filter(p=>p!==\"\").length>0?` (${n.join(\", \")})`:\"\",u=await Y.getValidationLevel(e),f=`\\u27A4 ${r.name} is listed in the catalogs config${c}, but it seems you're adding it without the catalog protocol. Consider running 'yarn add ${r.name}@${X}${n[0]}' instead.`;if(u===\"strict\")throw new Error(he.red(f));u===\"warn\"&&console.warn(he.yellow(f))}var Lr=$r;return Dt(Ir);})();\nreturn plugin;\n}\n};\n"
  },
  {
    "path": ".yarn/plugins/plugin-licenses.js",
    "content": "/* eslint-disable */\n//prettier-ignore\nmodule.exports = {\nname: \"@yarnpkg/plugin-licenses\",\nfactory: function (require) {\n\"use strict\";var plugin=(()=>{var It=Object.create;var j=Object.defineProperty;var zt=Object.getOwnPropertyDescriptor;var Mt=Object.getOwnPropertyNames;var Nt=Object.getPrototypeOf,jt=Object.prototype.hasOwnProperty;var A=(s=>typeof require<\"u\"?require:typeof Proxy<\"u\"?new Proxy(s,{get:(t,e)=>(typeof require<\"u\"?require:t)[e]}):s)(function(s){if(typeof require<\"u\")return require.apply(this,arguments);throw Error('Dynamic require of \"'+s+'\" is not supported')});var M=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports),H=(s,t)=>{for(var e in t)j(s,e,{get:t[e],enumerable:!0})},ut=(s,t,e,i)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let n of Mt(t))!jt.call(s,n)&&n!==e&&j(s,n,{get:()=>t[n],enumerable:!(i=zt(t,n))||i.enumerable});return s};var Ht=(s,t,e)=>(e=s!=null?It(Nt(s)):{},ut(t||!s||!s.__esModule?j(e,\"default\",{value:s,enumerable:!0}):e,s)),Gt=s=>ut(j({},\"__esModule\",{value:!0}),s);var wt=M(B=>{\"use strict\";Object.defineProperty(B,\"__esModule\",{value:!0});B.LRUCache=void 0;var D=typeof performance==\"object\"&&performance&&typeof performance.now==\"function\"?performance:Date,pt=new Set,Z=typeof process==\"object\"&&process?process:{},mt=(s,t,e,i)=>{typeof Z.emitWarning==\"function\"?Z.emitWarning(s,t,e,i):console.error(`[${e}] ${t}: ${s}`)},G=globalThis.AbortController,dt=globalThis.AbortSignal;if(typeof G>\"u\"){dt=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},G=class{constructor(){t()}signal=new dt;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i)}}};let s=Z.env?.LRU_CACHE_IGNORE_AC_WARNING!==\"1\",t=()=>{s&&(s=!1,mt(\"AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.\",\"NO_ABORT_CONTROLLER\",\"ENOTSUP\",t))}}var Bt=s=>!pt.has(s),Se=Symbol(\"type\"),E=s=>s&&s===Math.floor(s)&&s>0&&isFinite(s),gt=s=>E(s)?s<=Math.pow(2,8)?Uint8Array:s<=Math.pow(2,16)?Uint16Array:s<=Math.pow(2,32)?Uint32Array:s<=Number.MAX_SAFE_INTEGER?R:null:null,R=class extends Array{constructor(t){super(t),this.fill(0)}},tt=class s{heap;length;static#n=!1;static create(t){let e=gt(t);if(!e)return[];s.#n=!0;let i=new s(t,e);return s.#n=!1,i}constructor(t,e){if(!s.#n)throw new TypeError(\"instantiate Stack using Stack.create(n)\");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},et=class s{#n;#l;#e;#g;#x;#k;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#r;#w;#o;#i;#t;#f;#d;#c;#a;#b;#h;#y;#$;#p;#S;#T;#u;static unsafeExposeInternals(t){return{starts:t.#$,ttls:t.#p,sizes:t.#y,keyMap:t.#o,keyList:t.#i,valList:t.#t,next:t.#f,prev:t.#d,get head(){return t.#c},get tail(){return t.#a},free:t.#b,isBackgroundFetch:e=>t.#s(e),backgroundFetch:(e,i,n,o)=>t.#W(e,i,n,o),moveToTail:e=>t.#E(e),indexes:e=>t.#P(e),rindexes:e=>t.#A(e),isStale:e=>t.#m(e)}}get max(){return this.#n}get maxSize(){return this.#l}get calculatedSize(){return this.#w}get size(){return this.#r}get fetchMethod(){return this.#x}get memoMethod(){return this.#k}get dispose(){return this.#e}get disposeAfter(){return this.#g}constructor(t){let{max:e=0,ttl:i,ttlResolution:n=1,ttlAutopurge:o,updateAgeOnGet:r,updateAgeOnHas:a,allowStale:h,dispose:f,disposeAfter:w,noDisposeOnSet:u,noUpdateTTL:m,maxSize:p=0,maxEntrySize:P=0,sizeCalculation:l,fetchMethod:y,memoMethod:c,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:$,allowStaleOnFetchAbort:v,ignoreFetchAbort:L}=t;if(e!==0&&!E(e))throw new TypeError(\"max option must be a nonnegative integer\");let T=e?gt(e):Array;if(!T)throw new Error(\"invalid max value: \"+e);if(this.#n=e,this.#l=p,this.maxEntrySize=P||this.#l,this.sizeCalculation=l,this.sizeCalculation){if(!this.#l&&!this.maxEntrySize)throw new TypeError(\"cannot set sizeCalculation without setting maxSize or maxEntrySize\");if(typeof this.sizeCalculation!=\"function\")throw new TypeError(\"sizeCalculation set to non-function\")}if(c!==void 0&&typeof c!=\"function\")throw new TypeError(\"memoMethod must be a function if defined\");if(this.#k=c,y!==void 0&&typeof y!=\"function\")throw new TypeError(\"fetchMethod must be a function if specified\");if(this.#x=y,this.#T=!!y,this.#o=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#f=new T(e),this.#d=new T(e),this.#c=0,this.#a=0,this.#b=tt.create(e),this.#r=0,this.#w=0,typeof f==\"function\"&&(this.#e=f),typeof w==\"function\"?(this.#g=w,this.#h=[]):(this.#g=void 0,this.#h=void 0),this.#S=!!this.#e,this.#u=!!this.#g,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!$,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!L,this.maxEntrySize!==0){if(this.#l!==0&&!E(this.#l))throw new TypeError(\"maxSize must be a positive integer if specified\");if(!E(this.maxEntrySize))throw new TypeError(\"maxEntrySize must be a positive integer if specified\");this.#N()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!a,this.ttlResolution=E(n)||n===0?n:1,this.ttlAutopurge=!!o,this.ttl=i||0,this.ttl){if(!E(this.ttl))throw new TypeError(\"ttl must be a positive integer if specified\");this.#U()}if(this.#n===0&&this.ttl===0&&this.#l===0)throw new TypeError(\"At least one of max, maxSize, or ttl is required\");if(!this.ttlAutopurge&&!this.#n&&!this.#l){let U=\"LRU_CACHE_UNBOUNDED\";Bt(U)&&(pt.add(U),mt(\"TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.\",\"UnboundedCacheWarning\",U,s))}}getRemainingTTL(t){return this.#o.has(t)?1/0:0}#U(){let t=new R(this.#n),e=new R(this.#n);this.#p=t,this.#$=e,this.#D=(o,r,a=D.now())=>{if(e[o]=r!==0?a:0,t[o]=r,r!==0&&this.ttlAutopurge){let h=setTimeout(()=>{this.#m(o)&&this.#v(this.#i[o],\"expire\")},r+1);h.unref&&h.unref()}},this.#F=o=>{e[o]=t[o]!==0?D.now():0},this.#O=(o,r)=>{if(t[r]){let a=t[r],h=e[r];if(!a||!h)return;o.ttl=a,o.start=h,o.now=i||n();let f=o.now-h;o.remainingTTL=a-f}};let i=0,n=()=>{let o=D.now();if(this.ttlResolution>0){i=o;let r=setTimeout(()=>i=0,this.ttlResolution);r.unref&&r.unref()}return o};this.getRemainingTTL=o=>{let r=this.#o.get(o);if(r===void 0)return 0;let a=t[r],h=e[r];if(!a||!h)return 1/0;let f=(i||n())-h;return a-f},this.#m=o=>{let r=e[o],a=t[o];return!!a&&!!r&&(i||n())-r>a}}#F=()=>{};#O=()=>{};#D=()=>{};#m=()=>!1;#N(){let t=new R(this.#n);this.#w=0,this.#y=t,this.#_=e=>{this.#w-=t[e],t[e]=0},this.#R=(e,i,n,o)=>{if(this.#s(i))return 0;if(!E(n))if(o){if(typeof o!=\"function\")throw new TypeError(\"sizeCalculation must be a function\");if(n=o(i,e),!E(n))throw new TypeError(\"sizeCalculation return invalid (expect positive integer)\")}else throw new TypeError(\"invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.\");return n},this.#L=(e,i,n)=>{if(t[e]=i,this.#l){let o=this.#l-t[e];for(;this.#w>o;)this.#C(!0)}this.#w+=t[e],n&&(n.entrySize=i,n.totalCalculatedSize=this.#w)}}#_=t=>{};#L=(t,e,i)=>{};#R=(t,e,i,n)=>{if(i||n)throw new TypeError(\"cannot set size without setting maxSize or maxEntrySize on cache\");return 0};*#P({allowStale:t=this.allowStale}={}){if(this.#r)for(let e=this.#a;!(!this.#I(e)||((t||!this.#m(e))&&(yield e),e===this.#c));)e=this.#d[e]}*#A({allowStale:t=this.allowStale}={}){if(this.#r)for(let e=this.#c;!(!this.#I(e)||((t||!this.#m(e))&&(yield e),e===this.#a));)e=this.#f[e]}#I(t){return t!==void 0&&this.#o.get(this.#i[t])===t}*entries(){for(let t of this.#P())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#s(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#s(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#P()){let e=this.#i[t];e!==void 0&&!this.#s(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#s(this.#t[t])&&(yield e)}}*values(){for(let t of this.#P())this.#t[t]!==void 0&&!this.#s(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#s(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=\"LRUCache\";find(t,e={}){for(let i of this.#P()){let n=this.#t[i],o=this.#s(n)?n.__staleWhileFetching:n;if(o!==void 0&&t(o,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#P()){let n=this.#t[i],o=this.#s(n)?n.__staleWhileFetching:n;o!==void 0&&t.call(e,o,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#A()){let n=this.#t[i],o=this.#s(n)?n.__staleWhileFetching:n;o!==void 0&&t.call(e,o,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#A({allowStale:!0}))this.#m(e)&&(this.#v(this.#i[e],\"expire\"),t=!0);return t}info(t){let e=this.#o.get(t);if(e===void 0)return;let i=this.#t[e],n=this.#s(i)?i.__staleWhileFetching:i;if(n===void 0)return;let o={value:n};if(this.#p&&this.#$){let r=this.#p[e],a=this.#$[e];if(r&&a){let h=r-(D.now()-a);o.ttl=h,o.start=Date.now()}}return this.#y&&(o.size=this.#y[e]),o}dump(){let t=[];for(let e of this.#P({allowStale:!0})){let i=this.#i[e],n=this.#t[e],o=this.#s(n)?n.__staleWhileFetching:n;if(o===void 0||i===void 0)continue;let r={value:o};if(this.#p&&this.#$){r.ttl=this.#p[e];let a=D.now()-this.#$[e];r.start=Math.floor(Date.now()-a)}this.#y&&(r.size=this.#y[e]),t.unshift([i,r])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let n=Date.now()-i.start;i.start=D.now()-n}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:n=this.ttl,start:o,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:h}=i,{noUpdateTTL:f=this.noUpdateTTL}=i,w=this.#R(t,e,i.size||0,a);if(this.maxEntrySize&&w>this.maxEntrySize)return h&&(h.set=\"miss\",h.maxEntrySizeExceeded=!0),this.#v(t,\"set\"),this;let u=this.#r===0?void 0:this.#o.get(t);if(u===void 0)u=this.#r===0?this.#a:this.#b.length!==0?this.#b.pop():this.#r===this.#n?this.#C(!1):this.#r,this.#i[u]=t,this.#t[u]=e,this.#o.set(t,u),this.#f[this.#a]=u,this.#d[u]=this.#a,this.#a=u,this.#r++,this.#L(u,w,h),h&&(h.set=\"add\"),f=!1;else{this.#E(u);let m=this.#t[u];if(e!==m){if(this.#T&&this.#s(m)){m.__abortController.abort(new Error(\"replaced\"));let{__staleWhileFetching:p}=m;p!==void 0&&!r&&(this.#S&&this.#e?.(p,t,\"set\"),this.#u&&this.#h?.push([p,t,\"set\"]))}else r||(this.#S&&this.#e?.(m,t,\"set\"),this.#u&&this.#h?.push([m,t,\"set\"]));if(this.#_(u),this.#L(u,w,h),this.#t[u]=e,h){h.set=\"replace\";let p=m&&this.#s(m)?m.__staleWhileFetching:m;p!==void 0&&(h.oldValue=p)}}else h&&(h.set=\"update\")}if(n!==0&&!this.#p&&this.#U(),this.#p&&(f||this.#D(u,n,o),h&&this.#O(h,u)),!r&&this.#u&&this.#h){let m=this.#h,p;for(;p=m?.shift();)this.#g?.(...p)}return this}pop(){try{for(;this.#r;){let t=this.#t[this.#c];if(this.#C(!0),this.#s(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#u&&this.#h){let t=this.#h,e;for(;e=t?.shift();)this.#g?.(...e)}}}#C(t){let e=this.#c,i=this.#i[e],n=this.#t[e];return this.#T&&this.#s(n)?n.__abortController.abort(new Error(\"evicted\")):(this.#S||this.#u)&&(this.#S&&this.#e?.(n,i,\"evict\"),this.#u&&this.#h?.push([n,i,\"evict\"])),this.#_(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#b.push(e)),this.#r===1?(this.#c=this.#a=0,this.#b.length=0):this.#c=this.#f[e],this.#o.delete(i),this.#r--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=e,o=this.#o.get(t);if(o!==void 0){let r=this.#t[o];if(this.#s(r)&&r.__staleWhileFetching===void 0)return!1;if(this.#m(o))n&&(n.has=\"stale\",this.#O(n,o));else return i&&this.#F(o),n&&(n.has=\"hit\",this.#O(n,o)),!0}else n&&(n.has=\"miss\");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,n=this.#o.get(t);if(n===void 0||!i&&this.#m(n))return;let o=this.#t[n];return this.#s(o)?o.__staleWhileFetching:o}#W(t,e,i,n){let o=e===void 0?void 0:this.#t[e];if(this.#s(o))return o;let r=new G,{signal:a}=i;a?.addEventListener(\"abort\",()=>r.abort(a.reason),{signal:r.signal});let h={signal:r.signal,options:i,context:n},f=(l,y=!1)=>{let{aborted:c}=r.signal,S=i.ignoreFetchAbort&&l!==void 0;if(i.status&&(c&&!y?(i.status.fetchAborted=!0,i.status.fetchError=r.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),c&&!S&&!y)return u(r.signal.reason);let O=p;return this.#t[e]===p&&(l===void 0?O.__staleWhileFetching?this.#t[e]=O.__staleWhileFetching:this.#v(t,\"fetch\"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,l,h.options))),l},w=l=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=l),u(l)),u=l=>{let{aborted:y}=r.signal,c=y&&i.allowStaleOnFetchAbort,S=c||i.allowStaleOnFetchRejection,O=S||i.noDeleteOnFetchRejection,$=p;if(this.#t[e]===p&&(!O||$.__staleWhileFetching===void 0?this.#v(t,\"fetch\"):c||(this.#t[e]=$.__staleWhileFetching)),S)return i.status&&$.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),$.__staleWhileFetching;if($.__returned===$)throw l},m=(l,y)=>{let c=this.#x?.(t,o,h);c&&c instanceof Promise&&c.then(S=>l(S===void 0?void 0:S),y),r.signal.addEventListener(\"abort\",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(l(void 0),i.allowStaleOnFetchAbort&&(l=S=>f(S,!0)))})};i.status&&(i.status.fetchDispatched=!0);let p=new Promise(m).then(f,w),P=Object.assign(p,{__abortController:r,__staleWhileFetching:o,__returned:void 0});return e===void 0?(this.set(t,P,{...h.options,status:void 0}),e=this.#o.get(t)):this.#t[e]=P,P}#s(t){if(!this.#T)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty(\"__staleWhileFetching\")&&e.__abortController instanceof G}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:h=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:w=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:P=this.allowStaleOnFetchAbort,context:l,forceRefresh:y=!1,status:c,signal:S}=e;if(!this.#T)return c&&(c.fetch=\"get\"),this.get(t,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:o,status:c});let O={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:o,ttl:r,noDisposeOnSet:a,size:h,sizeCalculation:f,noUpdateTTL:w,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:P,ignoreFetchAbort:p,status:c,signal:S},$=this.#o.get(t);if($===void 0){c&&(c.fetch=\"miss\");let v=this.#W(t,$,O,l);return v.__returned=v}else{let v=this.#t[$];if(this.#s(v)){let ft=i&&v.__staleWhileFetching!==void 0;return c&&(c.fetch=\"inflight\",ft&&(c.returnedStale=!0)),ft?v.__staleWhileFetching:v.__returned=v}let L=this.#m($);if(!y&&!L)return c&&(c.fetch=\"hit\"),this.#E($),n&&this.#F($),c&&this.#O(c,$),v;let T=this.#W(t,$,O,l),Q=T.__staleWhileFetching!==void 0&&i;return c&&(c.fetch=L?\"stale\":\"refresh\",Q&&L&&(c.returnedStale=!0)),Q?T.__staleWhileFetching:T.__returned=T}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error(\"fetch() returned undefined\");return i}memo(t,e={}){let i=this.#k;if(!i)throw new Error(\"no memoMethod provided to constructor\");let{context:n,forceRefresh:o,...r}=e,a=this.get(t,r);if(!o&&a!==void 0)return a;let h=i(t,a,{options:r,context:n});return this.set(t,h,r),h}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:r}=e,a=this.#o.get(t);if(a!==void 0){let h=this.#t[a],f=this.#s(h);return r&&this.#O(r,a),this.#m(a)?(r&&(r.get=\"stale\"),f?(r&&i&&h.__staleWhileFetching!==void 0&&(r.returnedStale=!0),i?h.__staleWhileFetching:void 0):(o||this.#v(t,\"expire\"),r&&i&&(r.returnedStale=!0),i?h:void 0)):(r&&(r.get=\"hit\"),f?h.__staleWhileFetching:(this.#E(a),n&&this.#F(a),h))}else r&&(r.get=\"miss\")}#z(t,e){this.#d[e]=t,this.#f[t]=e}#E(t){t!==this.#a&&(t===this.#c?this.#c=this.#f[t]:this.#z(this.#d[t],this.#f[t]),this.#z(this.#a,t),this.#a=t)}delete(t){return this.#v(t,\"delete\")}#v(t,e){let i=!1;if(this.#r!==0){let n=this.#o.get(t);if(n!==void 0)if(i=!0,this.#r===1)this.#M(e);else{this.#_(n);let o=this.#t[n];if(this.#s(o)?o.__abortController.abort(new Error(\"deleted\")):(this.#S||this.#u)&&(this.#S&&this.#e?.(o,t,e),this.#u&&this.#h?.push([o,t,e])),this.#o.delete(t),this.#i[n]=void 0,this.#t[n]=void 0,n===this.#a)this.#a=this.#d[n];else if(n===this.#c)this.#c=this.#f[n];else{let r=this.#d[n];this.#f[r]=this.#f[n];let a=this.#f[n];this.#d[a]=this.#d[n]}this.#r--,this.#b.push(n)}}if(this.#u&&this.#h?.length){let n=this.#h,o;for(;o=n?.shift();)this.#g?.(...o)}return i}clear(){return this.#M(\"delete\")}#M(t){for(let e of this.#A({allowStale:!0})){let i=this.#t[e];if(this.#s(i))i.__abortController.abort(new Error(\"deleted\"));else{let n=this.#i[e];this.#S&&this.#e?.(i,n,t),this.#u&&this.#h?.push([i,n,t])}}if(this.#o.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#p&&this.#$&&(this.#p.fill(0),this.#$.fill(0)),this.#y&&this.#y.fill(0),this.#c=0,this.#a=0,this.#b.length=0,this.#w=0,this.#r=0,this.#u&&this.#h){let e=this.#h,i;for(;i=e?.shift();)this.#g?.(...i)}}};B.LRUCache=et});var $t=M((Ae,yt)=>{\"use strict\";var d=(...s)=>s.every(t=>t)?s.join(\"\"):\"\",b=s=>s?encodeURIComponent(s):\"\",bt=s=>s.toLowerCase().replace(/^\\W+/g,\"\").replace(/(?<!\\W)\\W+$/,\"\").replace(/\\//g,\"\").replace(/\\W+/g,\"-\"),Vt={sshtemplate:({domain:s,user:t,project:e,committish:i})=>`git@${s}:${t}/${e}.git${d(\"#\",i)}`,sshurltemplate:({domain:s,user:t,project:e,committish:i})=>`git+ssh://git@${s}/${t}/${e}.git${d(\"#\",i)}`,edittemplate:({domain:s,user:t,project:e,committish:i,editpath:n,path:o})=>`https://${s}/${t}/${e}${d(\"/\",n,\"/\",b(i||\"HEAD\"),\"/\",o)}`,browsetemplate:({domain:s,user:t,project:e,committish:i,treepath:n})=>`https://${s}/${t}/${e}${d(\"/\",n,\"/\",b(i))}`,browsetreetemplate:({domain:s,user:t,project:e,committish:i,treepath:n,path:o,fragment:r,hashformat:a})=>`https://${s}/${t}/${e}/${n}/${b(i||\"HEAD\")}/${o}${d(\"#\",a(r||\"\"))}`,browseblobtemplate:({domain:s,user:t,project:e,committish:i,blobpath:n,path:o,fragment:r,hashformat:a})=>`https://${s}/${t}/${e}/${n}/${b(i||\"HEAD\")}/${o}${d(\"#\",a(r||\"\"))}`,docstemplate:({domain:s,user:t,project:e,treepath:i,committish:n})=>`https://${s}/${t}/${e}${d(\"/\",i,\"/\",b(n))}#readme`,httpstemplate:({auth:s,domain:t,user:e,project:i,committish:n})=>`git+https://${d(s,\"@\")}${t}/${e}/${i}.git${d(\"#\",n)}`,filetemplate:({domain:s,user:t,project:e,committish:i,path:n})=>`https://${s}/${t}/${e}/raw/${b(i||\"HEAD\")}/${n}`,shortcuttemplate:({type:s,user:t,project:e,committish:i})=>`${s}:${t}/${e}${d(\"#\",i)}`,pathtemplate:({user:s,project:t,committish:e})=>`${s}/${t}${d(\"#\",e)}`,bugstemplate:({domain:s,user:t,project:e})=>`https://${s}/${t}/${e}/issues`,hashformat:bt},x={};x.github={protocols:[\"git:\",\"http:\",\"git+ssh:\",\"git+https:\",\"ssh:\",\"https:\"],domain:\"github.com\",treepath:\"tree\",blobpath:\"blob\",editpath:\"edit\",filetemplate:({auth:s,user:t,project:e,committish:i,path:n})=>`https://${d(s,\"@\")}raw.githubusercontent.com/${t}/${e}/${b(i||\"HEAD\")}/${n}`,gittemplate:({auth:s,domain:t,user:e,project:i,committish:n})=>`git://${d(s,\"@\")}${t}/${e}/${i}.git${d(\"#\",n)}`,tarballtemplate:({domain:s,user:t,project:e,committish:i})=>`https://codeload.${s}/${t}/${e}/tar.gz/${b(i||\"HEAD\")}`,extract:s=>{let[,t,e,i,n]=s.pathname.split(\"/\",5);if(!(i&&i!==\"tree\")&&(i||(n=s.hash.slice(1)),e&&e.endsWith(\".git\")&&(e=e.slice(0,-4)),!(!t||!e)))return{user:t,project:e,committish:n}}};x.bitbucket={protocols:[\"git+ssh:\",\"git+https:\",\"ssh:\",\"https:\"],domain:\"bitbucket.org\",treepath:\"src\",blobpath:\"src\",editpath:\"?mode=edit\",edittemplate:({domain:s,user:t,project:e,committish:i,treepath:n,path:o,editpath:r})=>`https://${s}/${t}/${e}${d(\"/\",n,\"/\",b(i||\"HEAD\"),\"/\",o,r)}`,tarballtemplate:({domain:s,user:t,project:e,committish:i})=>`https://${s}/${t}/${e}/get/${b(i||\"HEAD\")}.tar.gz`,extract:s=>{let[,t,e,i]=s.pathname.split(\"/\",4);if(![\"get\"].includes(i)&&(e&&e.endsWith(\".git\")&&(e=e.slice(0,-4)),!(!t||!e)))return{user:t,project:e,committish:s.hash.slice(1)}}};x.gitlab={protocols:[\"git+ssh:\",\"git+https:\",\"ssh:\",\"https:\"],domain:\"gitlab.com\",treepath:\"tree\",blobpath:\"tree\",editpath:\"-/edit\",httpstemplate:({auth:s,domain:t,user:e,project:i,committish:n})=>`git+https://${d(s,\"@\")}${t}/${e}/${i}.git${d(\"#\",n)}`,tarballtemplate:({domain:s,user:t,project:e,committish:i})=>`https://${s}/${t}/${e}/repository/archive.tar.gz?ref=${b(i||\"HEAD\")}`,extract:s=>{let t=s.pathname.slice(1);if(t.includes(\"/-/\")||t.includes(\"/archive.tar.gz\"))return;let e=t.split(\"/\"),i=e.pop();i.endsWith(\".git\")&&(i=i.slice(0,-4));let n=e.join(\"/\");if(!(!n||!i))return{user:n,project:i,committish:s.hash.slice(1)}}};x.gist={protocols:[\"git:\",\"git+ssh:\",\"git+https:\",\"ssh:\",\"https:\"],domain:\"gist.github.com\",editpath:\"edit\",sshtemplate:({domain:s,project:t,committish:e})=>`git@${s}:${t}.git${d(\"#\",e)}`,sshurltemplate:({domain:s,project:t,committish:e})=>`git+ssh://git@${s}/${t}.git${d(\"#\",e)}`,edittemplate:({domain:s,user:t,project:e,committish:i,editpath:n})=>`https://${s}/${t}/${e}${d(\"/\",b(i))}/${n}`,browsetemplate:({domain:s,project:t,committish:e})=>`https://${s}/${t}${d(\"/\",b(e))}`,browsetreetemplate:({domain:s,project:t,committish:e,path:i,hashformat:n})=>`https://${s}/${t}${d(\"/\",b(e))}${d(\"#\",n(i))}`,browseblobtemplate:({domain:s,project:t,committish:e,path:i,hashformat:n})=>`https://${s}/${t}${d(\"/\",b(e))}${d(\"#\",n(i))}`,docstemplate:({domain:s,project:t,committish:e})=>`https://${s}/${t}${d(\"/\",b(e))}`,httpstemplate:({domain:s,project:t,committish:e})=>`git+https://${s}/${t}.git${d(\"#\",e)}`,filetemplate:({user:s,project:t,committish:e,path:i})=>`https://gist.githubusercontent.com/${s}/${t}/raw${d(\"/\",b(e))}/${i}`,shortcuttemplate:({type:s,project:t,committish:e})=>`${s}:${t}${d(\"#\",e)}`,pathtemplate:({project:s,committish:t})=>`${s}${d(\"#\",t)}`,bugstemplate:({domain:s,project:t})=>`https://${s}/${t}`,gittemplate:({domain:s,project:t,committish:e})=>`git://${s}/${t}.git${d(\"#\",e)}`,tarballtemplate:({project:s,committish:t})=>`https://codeload.github.com/gist/${s}/tar.gz/${b(t||\"HEAD\")}`,extract:s=>{let[,t,e,i]=s.pathname.split(\"/\",4);if(i!==\"raw\"){if(!e){if(!t)return;e=t,t=null}return e.endsWith(\".git\")&&(e=e.slice(0,-4)),{user:t,project:e,committish:s.hash.slice(1)}}},hashformat:function(s){return s&&\"file-\"+bt(s)}};x.sourcehut={protocols:[\"git+ssh:\",\"https:\"],domain:\"git.sr.ht\",treepath:\"tree\",blobpath:\"tree\",filetemplate:({domain:s,user:t,project:e,committish:i,path:n})=>`https://${s}/${t}/${e}/blob/${b(i)||\"HEAD\"}/${n}`,httpstemplate:({domain:s,user:t,project:e,committish:i})=>`https://${s}/${t}/${e}.git${d(\"#\",i)}`,tarballtemplate:({domain:s,user:t,project:e,committish:i})=>`https://${s}/${t}/${e}/archive/${b(i)||\"HEAD\"}.tar.gz`,bugstemplate:()=>null,extract:s=>{let[,t,e,i]=s.pathname.split(\"/\",4);if(![\"archive\"].includes(i)&&(e&&e.endsWith(\".git\")&&(e=e.slice(0,-4)),!(!t||!e)))return{user:t,project:e,committish:s.hash.slice(1)}}};for(let[s,t]of Object.entries(x))x[s]=Object.assign({},Vt,t);yt.exports=x});var it=M((ve,Pt)=>{var Yt=A(\"url\"),st=(s,t,e)=>{let i=s.indexOf(e);return s.lastIndexOf(t,i>-1?i:1/0)},St=s=>{try{return new Yt.URL(s)}catch{}},qt=(s,t)=>{let e=s.indexOf(\":\"),i=s.slice(0,e+1);if(Object.prototype.hasOwnProperty.call(t,i))return s;let n=s.indexOf(\"@\");return n>-1?n>e?`git+ssh://${s}`:s:s.indexOf(\"//\")===e+1?s:`${s.slice(0,e+1)}//${s.slice(e+1)}`},Jt=s=>{let t=st(s,\"@\",\"#\"),e=st(s,\":\",\"#\");return e>t&&(s=s.slice(0,e)+\"/\"+s.slice(e+1)),st(s,\":\",\"#\")===-1&&s.indexOf(\"//\")===-1&&(s=`git+ssh://${s}`),s};Pt.exports=(s,t)=>{let e=t?qt(s,t):s;return St(e)||St(Jt(e))}});var vt=M((Oe,At)=>{\"use strict\";var Kt=it(),Xt=s=>{let t=s.indexOf(\"#\"),e=s.indexOf(\"/\"),i=s.indexOf(\"/\",e+1),n=s.indexOf(\":\"),o=/\\s/.exec(s),r=s.indexOf(\"@\"),a=!o||t>-1&&o.index>t,h=r===-1||t>-1&&r>t,f=n===-1||t>-1&&n>t,w=i===-1||t>-1&&i>t,u=e>0,m=t>-1?s[t-1]!==\"/\":!s.endsWith(\"/\"),p=!s.startsWith(\".\");return a&&u&&m&&p&&h&&f&&w};At.exports=(s,t,{gitHosts:e,protocols:i})=>{if(!s)return;let n=Xt(s)?`github:${s}`:s,o=Kt(n,i);if(!o)return;let r=e.byShortcut[o.protocol],a=e.byDomain[o.hostname.startsWith(\"www.\")?o.hostname.slice(4):o.hostname],h=r||a;if(!h)return;let f=e[r||a],w=null;i[o.protocol]?.auth&&(o.username||o.password)&&(w=`${o.username}${o.password?\":\"+o.password:\"\"}`);let u=null,m=null,p=null,P=null;try{if(r){let l=o.pathname.startsWith(\"/\")?o.pathname.slice(1):o.pathname,y=l.indexOf(\"@\");y>-1&&(l=l.slice(y+1));let c=l.lastIndexOf(\"/\");c>-1?(m=decodeURIComponent(l.slice(0,c)),m||(m=null),p=decodeURIComponent(l.slice(c+1))):p=decodeURIComponent(l),p.endsWith(\".git\")&&(p=p.slice(0,-4)),o.hash&&(u=decodeURIComponent(o.hash.slice(1))),P=\"shortcut\"}else{if(!f.protocols.includes(o.protocol))return;let l=f.extract(o);if(!l)return;m=l.user&&decodeURIComponent(l.user),p=decodeURIComponent(l.project),u=decodeURIComponent(l.committish),P=i[o.protocol]?.name||o.protocol.slice(0,-1)}}catch(l){if(l instanceof URIError)return;throw l}return[h,m,w,p,u,P,t]}});var Tt=M((Te,Ot)=>{\"use strict\";var{LRUCache:Qt}=wt(),Zt=$t(),te=vt(),ee=it(),nt=new Qt({max:1e3}),V=class s{constructor(t,e,i,n,o,r,a={}){Object.assign(this,s.#n[t],{type:t,user:e,auth:i,project:n,committish:o,default:r,opts:a})}static#n={byShortcut:{},byDomain:{}};static#l={\"git+ssh:\":{name:\"sshurl\"},\"ssh:\":{name:\"sshurl\"},\"git+https:\":{name:\"https\",auth:!0},\"git:\":{auth:!0},\"http:\":{auth:!0},\"https:\":{auth:!0},\"git+http:\":{auth:!0}};static addHost(t,e){s.#n[t]=e,s.#n.byDomain[e.domain]=t,s.#n.byShortcut[`${t}:`]=t,s.#l[`${t}:`]={name:t}}static fromUrl(t,e){if(typeof t!=\"string\")return;let i=t+JSON.stringify(e||{});if(!nt.has(i)){let n=te(t,e,{gitHosts:s.#n,protocols:s.#l});nt.set(i,n?new s(...n):void 0)}return nt.get(i)}static parseUrl(t){return ee(t)}#e(t,e){if(typeof t!=\"function\")return null;let i={...this,...this.opts,...e};i.path||(i.path=\"\"),i.path.startsWith(\"/\")&&(i.path=i.path.slice(1)),i.noCommittish&&(i.committish=null);let n=t(i);return i.noGitPlus&&n.startsWith(\"git+\")?n.slice(4):n}hash(){return this.committish?`#${this.committish}`:\"\"}ssh(t){return this.#e(this.sshtemplate,t)}sshurl(t){return this.#e(this.sshurltemplate,t)}browse(t,...e){return typeof t!=\"string\"?this.#e(this.browsetemplate,t):typeof e[0]!=\"string\"?this.#e(this.browsetreetemplate,{...e[0],path:t}):this.#e(this.browsetreetemplate,{...e[1],fragment:e[0],path:t})}browseFile(t,...e){return typeof e[0]!=\"string\"?this.#e(this.browseblobtemplate,{...e[0],path:t}):this.#e(this.browseblobtemplate,{...e[1],fragment:e[0],path:t})}docs(t){return this.#e(this.docstemplate,t)}bugs(t){return this.#e(this.bugstemplate,t)}https(t){return this.#e(this.httpstemplate,t)}git(t){return this.#e(this.gittemplate,t)}shortcut(t){return this.#e(this.shortcuttemplate,t)}path(t){return this.#e(this.pathtemplate,t)}tarball(t){return this.#e(this.tarballtemplate,{...t,noCommittish:!1})}file(t,e){return this.#e(this.filetemplate,{...e,path:t})}edit(t,e){return this.#e(this.edittemplate,{...e,path:t})}getDefaultRepresentation(){return this.default}toString(t){return this.default&&typeof this[this.default]==\"function\"?this[this.default](t):this.sshurl(t)}};for(let[s,t]of Object.entries(Zt))V.addHost(s,t);Ot.exports=V});var we={};H(we,{default:()=>ge});var Rt=A(\"@yarnpkg/cli\"),z=A(\"@yarnpkg/core\"),_=A(\"clipanion\");var g=A(\"@yarnpkg/core\"),F=A(\"@yarnpkg/fslib\"),Ct=Ht(Tt());var ot={};H(ot,{_getYarnStateAliases:()=>Et,getFs:()=>ne,getPackagePath:()=>se});var C=A(\"@yarnpkg/core\"),k=A(\"@yarnpkg/fslib\"),Ft=A(\"@yarnpkg/parsers\");var I=()=>({os:[process.platform],cpu:[process.arch],libc:[]});var se=async(s,t)=>{if(await ie(s),!C.structUtils.isPackageCompatible(t,I()))return null;let e=C.structUtils.convertPackageToLocator(t),i=C.structUtils.stringifyLocator(e),n=Y[i]||_t[i];if(!n)return null;let o=n.locations[0];return o?k.ppath.join(s.cwd,o):s.cwd},Y,_t,ie=async s=>{if(!Y){let t=k.ppath.join(s.configuration.projectCwd,k.Filename.nodeModules,\".yarn-state.yml\");Y=(0,Ft.parseSyml)(await k.xfs.readFilePromise(t,\"utf8\")),_t=Et(Y)}},ne=()=>k.xfs,Et=s=>Object.entries(s).reduce((t,[e,i])=>{if(!i.aliases)return t;let n=C.structUtils.parseLocator(e);for(let o of i.aliases){let r=C.structUtils.makeLocator(n,o),a=C.structUtils.stringifyLocator(r);t[a]=i}return t},{});var ht={};H(ht,{getFs:()=>ae,getPackagePath:()=>oe});var q=A(\"@yarnpkg/core\"),xt=A(\"@yarnpkg/fslib\"),J=A(\"@yarnpkg/libzip\"),kt=A(\"@yarnpkg/plugin-pnp\");var oe=async(s,t)=>{if(re(s),!q.structUtils.isPackageCompatible(t,I()))return null;let e=q.structUtils.convertPackageToLocator(t),i={name:q.structUtils.stringifyIdent(e),reference:e.reference.startsWith(\"virtual:\")?e.reference.split(\"#\")[1]:e.reference},n=rt.getPackageInformation(i);if(!n)return null;let{packageLocation:o}=n;return o},rt,re=s=>{rt||(rt=module.require((0,kt.getPnpPath)(s).cjs))},ae=()=>(he(),at),at,he=()=>{at||(at=new xt.VirtualFS({baseFs:new J.ZipOpenFS({libzip:(0,J.getLibzipSync)(),readOnlyArchives:!0})}))};var lt={};H(lt,{getFs:()=>ce,getPackagePath:()=>le});var N=A(\"@yarnpkg/core\"),W=A(\"@yarnpkg/fslib\");var le=async(s,t)=>{if(!N.structUtils.isPackageCompatible(t,I()))return null;let e=N.structUtils.convertPackageToLocator(t),i=N.structUtils.slugifyLocator(e),n=N.structUtils.stringifyIdent(e),o=s.tryWorkspaceByLocator(e);return o?o.cwd:W.ppath.join(s.configuration.projectCwd,W.Filename.nodeModules,\".store\",i,W.Filename.nodeModules,n)},ce=()=>W.xfs;var Lt=s=>{switch(s){case\"pnp\":return ht;case\"node-modules\":return ot;case\"pnpm\":return lt;default:throw new Error(\"Unsupported linker\")}};var Je=F.npath.basename(__dirname)===\"@yarnpkg\"?F.ppath.join(F.npath.toPortablePath(__dirname),\"../..\"):F.ppath.join(F.npath.toPortablePath(__dirname),\"..\"),Wt=async(s,t,e,i,n)=>{let o={},r={children:o},a=await fe(s,e,i),h=Lt(s.configuration.get(\"nodeLinker\")),f=h.getFs();for(let[w,u]of a.entries()){let m=await h.getPackagePath(s,u);if(m===null)continue;let p=JSON.parse(await f.readFilePromise(F.ppath.join(m,F.Filename.manifest),\"utf8\")),{license:P,url:l,vendorName:y,vendorUrl:c}=de(p);o[P]||(o[P]={value:g.formatUtils.tuple(g.formatUtils.Type.NO_HINT,P),children:{}});let S=g.structUtils.convertPackageToLocator(u),O=g.formatUtils.tuple(g.formatUtils.Type.DEPENDENT,{locator:S,descriptor:w}),$=n?{}:{...l?{url:{value:g.formatUtils.tuple(g.formatUtils.Type.NO_HINT,ct(\"URL\",l,t))}}:{},...y?{vendorName:{value:g.formatUtils.tuple(g.formatUtils.Type.NO_HINT,ct(\"VendorName\",y,t))}}:{},...c?{vendorUrl:{value:g.formatUtils.tuple(g.formatUtils.Type.NO_HINT,ct(\"VendorUrl\",c,t))}}:{}},v={value:O,children:$},L=g.structUtils.stringifyLocator(S),T=o[P];if(T){let U=T.children;U[L]=v}}return r},fe=async(s,t,e)=>{let i=new Map,n;if(t){if(e){for(let h of s.workspaces)h.manifest.devDependencies.clear();let a=await g.Cache.find(s.configuration);await s.resolveEverything({report:new g.ThrowReport,cache:a})}n=s.storedDescriptors.values()}else n=s.workspaces.flatMap(a=>{let h=[a.anchoredDescriptor];for(let[f,w]of a.anchoredPackage.dependencies.entries())e&&a.manifest.devDependencies.has(f)||h.push(w);return h});let o=g.miscUtils.sortMap(n,[a=>g.structUtils.stringifyIdent(a),a=>g.structUtils.isVirtualDescriptor(a)?\"0\":\"1\",a=>a.range]),r=new Set;for(let a of o.values()){let h=s.storedResolutions.get(a.descriptorHash);if(!h)continue;let f=s.storedPackages.get(h);if(!f)continue;let{descriptorHash:w}=g.structUtils.isVirtualDescriptor(a)?g.structUtils.devirtualizeDescriptor(a):a;r.has(w)||(r.add(w),i.set(a,f))}return i},Ut=async(s,t,e,i)=>{if(!t.length)return;let n=new Set(t.map(r=>s.getWorkspaceByIdent(g.structUtils.parseIdent(r))));if(e)for(let r of n)for(let a of i?[\"dependencies\"]:g.Manifest.hardDependencies)for(let h of r.manifest.getForScope(a).values()){let f=s.tryWorkspaceByDescriptor(h);f!==null&&n.add(f)}for(let r of s.workspaces)n.has(r)||(r.manifest.installConfig=r.manifest.installConfig||{},r.manifest.installConfig.selfReferences=!1,r.manifest.dependencies.clear(),r.manifest.devDependencies.clear(),r.manifest.peerDependencies.clear());s.workspaces=[...n];let o=await g.Cache.find(s.configuration);await s.resolveEverything({report:new g.ThrowReport,cache:o})};function ue(s){let t={},e=s.match(/^([^(<]+)/);if(e){let o=e[0].trim();o&&(t.name=o)}let i=s.match(/<([^>]+)>/);i&&(t.email=i[1]);let n=s.match(/\\(([^)]+)\\)/);return n&&(t.url=n[1]),t}var de=s=>{let{license:t,licenses:e,repository:i,homepage:n,author:o}=s,r=typeof o==\"string\"?ue(o):o;return{license:(()=>{if(t)return K(t);if(e){if(!Array.isArray(e))return K(e);if(e.length===1&&e[0])return K(e[0]);if(e.length>1)return`(${e.map(K).join(\" OR \")})`}return Dt})(),url:pe(i)||n,vendorName:r?.name,vendorUrl:n||r?.url}},Dt=\"UNKNOWN\",K=s=>(typeof s!=\"string\"?s.type:s)||Dt,pe=s=>{let t=typeof s==\"string\"?s:s?.url;if(!t)return t;let e=Ct.fromUrl(t);return!e||e.getDefaultRepresentation()!==\"shortcut\"?t:e.https()},ct=(s,t,e)=>e?t:`${s}: ${t}`;var X=class extends _.Command{static paths=[[\"licenses\",\"list\"]];static usage=_.Command.Usage({description:\"display the licenses for all packages in the project\",details:`\n      This command prints the license information for packages in the project. By default, only direct dependencies are listed.\n\n      If \\`-R,--recursive\\` is set, the listing will include transitive dependencies (dependencies of direct dependencies).\n\n      If \\`--production\\` is set, the listing will exclude development dependencies.\n\n      If \\`--focus\\` is passed, the listing will only include dependencies of the specified workspaces.\n    `,examples:[[\"List all licenses of direct dependencies\",\"$0 licenses list\"],[\"List all licenses of direct and transitive dependencies\",\"$0 licenses list --recursive\"],[\"List all licenses of production dependencies only\",\"$0 licenses list --production\"],[\"List all licenses for specified workspaces only\",\"$0 licenses list --focus <workspace-a> --focus <workspace-b>\"]]});recursive=_.Option.Boolean(\"-R,--recursive\",!1,{description:\"Include transitive dependencies (dependencies of direct dependencies)\"});production=_.Option.Boolean(\"--production\",!1,{description:\"Exclude development dependencies\"});json=_.Option.Boolean(\"--json\",!1,{description:\"Format output as JSON\"});excludeMetadata=_.Option.Boolean(\"--exclude-metadata\",!1,{description:\"Exclude dependency metadata from output\"});focus=_.Option.Array(\"--focus\",[],{description:\"Focus on one or more workspaces\"});async execute(){let t=await z.Configuration.find(this.context.cwd,this.context.plugins),{project:e,workspace:i}=await z.Project.find(t,this.context.cwd);if(!i)throw new Rt.WorkspaceRequiredError(e.cwd,this.context.cwd);await e.restoreInstallState(),await Ut(e,this.focus,this.recursive,this.production);let n=await Wt(e,this.json,this.recursive,this.production,this.excludeMetadata);z.treeUtils.emitTree(n,{configuration:t,stdout:this.context.stdout,json:this.json,separators:1})}};var me={commands:[X]},ge=me;return Gt(we);})();\nreturn plugin;\n}\n};\n"
  },
  {
    "path": ".yarn/releases/yarn-4.12.0.cjs",
    "content": "#!/usr/bin/env node\n/* eslint-disable */\n//prettier-ignore\n(()=>{var xGe=Object.create;var mU=Object.defineProperty;var kGe=Object.getOwnPropertyDescriptor;var QGe=Object.getOwnPropertyNames;var TGe=Object.getPrototypeOf,RGe=Object.prototype.hasOwnProperty;var Ie=(t=>typeof require<\"u\"?require:typeof Proxy<\"u\"?new Proxy(t,{get:(e,r)=>(typeof require<\"u\"?require:e)[r]}):t)(function(t){if(typeof require<\"u\")return require.apply(this,arguments);throw Error('Dynamic require of \"'+t+'\" is not supported')});var Xe=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vt=(t,e)=>{for(var r in e)mU(t,r,{get:e[r],enumerable:!0})},FGe=(t,e,r,s)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let a of QGe(e))!RGe.call(t,a)&&a!==r&&mU(t,a,{get:()=>e[a],enumerable:!(s=kGe(e,a))||s.enumerable});return t};var ut=(t,e,r)=>(r=t!=null?xGe(TGe(t)):{},FGe(e||!t||!t.__esModule?mU(r,\"default\",{value:t,enumerable:!0}):r,t));var fi={};Vt(fi,{SAFE_TIME:()=>WZ,S_IFDIR:()=>JP,S_IFLNK:()=>KP,S_IFMT:()=>Mf,S_IFREG:()=>N2});var Mf,JP,N2,KP,WZ,YZ=Xe(()=>{Mf=61440,JP=16384,N2=32768,KP=40960,WZ=456789e3});var or={};Vt(or,{EBADF:()=>Mo,EBUSY:()=>NGe,EEXIST:()=>HGe,EINVAL:()=>LGe,EISDIR:()=>_Ge,ENOENT:()=>MGe,ENOSYS:()=>OGe,ENOTDIR:()=>UGe,ENOTEMPTY:()=>GGe,EOPNOTSUPP:()=>qGe,EROFS:()=>jGe,ERR_DIR_CLOSED:()=>yU});function Cc(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function NGe(t){return Cc(\"EBUSY\",t)}function OGe(t,e){return Cc(\"ENOSYS\",`${t}, ${e}`)}function LGe(t){return Cc(\"EINVAL\",`invalid argument, ${t}`)}function Mo(t){return Cc(\"EBADF\",`bad file descriptor, ${t}`)}function MGe(t){return Cc(\"ENOENT\",`no such file or directory, ${t}`)}function UGe(t){return Cc(\"ENOTDIR\",`not a directory, ${t}`)}function _Ge(t){return Cc(\"EISDIR\",`illegal operation on a directory, ${t}`)}function HGe(t){return Cc(\"EEXIST\",`file already exists, ${t}`)}function jGe(t){return Cc(\"EROFS\",`read-only filesystem, ${t}`)}function GGe(t){return Cc(\"ENOTEMPTY\",`directory not empty, ${t}`)}function qGe(t){return Cc(\"EOPNOTSUPP\",`operation not supported, ${t}`)}function yU(){return Cc(\"ERR_DIR_CLOSED\",\"Directory handle was closed\")}var zP=Xe(()=>{});var $a={};Vt($a,{BigIntStatsEntry:()=>iE,DEFAULT_MODE:()=>CU,DirEntry:()=>EU,StatEntry:()=>nE,areStatsEqual:()=>wU,clearStats:()=>XP,convertToBigIntStats:()=>YGe,makeDefaultStats:()=>VZ,makeEmptyStats:()=>WGe});function VZ(){return new nE}function WGe(){return XP(VZ())}function XP(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r==\"number\"?t[e]=0:typeof r==\"bigint\"?t[e]=BigInt(0):IU.types.isDate(r)&&(t[e]=new Date(0))}return t}function YGe(t){let e=new iE;for(let r in t)if(Object.hasOwn(t,r)){let s=t[r];typeof s==\"number\"?e[r]=BigInt(s):IU.types.isDate(s)&&(e[r]=new Date(s))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function wU(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,s=e;return!(r.atimeNs!==s.atimeNs||r.mtimeNs!==s.mtimeNs||r.ctimeNs!==s.ctimeNs||r.birthtimeNs!==s.birthtimeNs)}var IU,CU,EU,nE,iE,BU=Xe(()=>{IU=ut(Ie(\"util\")),CU=33188,EU=class{constructor(){this.name=\"\";this.path=\"\";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},nE=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=CU;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},iE=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(CU);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(61440))===BigInt(16384)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(61440))===BigInt(32768)}isSocket(){return!1}isSymbolicLink(){return(this.mode&BigInt(61440))===BigInt(40960)}}});function XGe(t){let e,r;if(e=t.match(KGe))t=e[1];else if(r=t.match(zGe))t=`\\\\\\\\${r[1]?\".\\\\\":\"\"}${r[2]}`;else return t;return t.replace(/\\//g,\"\\\\\")}function ZGe(t){t=t.replace(/\\\\/g,\"/\");let e,r;return(e=t.match(VGe))?t=`/${e[1]}`:(r=t.match(JGe))&&(t=`/unc/${r[1]?\".dot/\":\"\"}${r[2]}`),t}function ZP(t,e){return t===fe?KZ(e):vU(e)}var O2,vt,Er,fe,J,JZ,VGe,JGe,KGe,zGe,vU,KZ,el=Xe(()=>{O2=ut(Ie(\"path\")),vt={root:\"/\",dot:\".\",parent:\"..\"},Er={home:\"~\",nodeModules:\"node_modules\",manifest:\"package.json\",lockfile:\"yarn.lock\",virtual:\"__virtual__\",pnpJs:\".pnp.js\",pnpCjs:\".pnp.cjs\",pnpData:\".pnp.data.json\",pnpEsmLoader:\".pnp.loader.mjs\",rc:\".yarnrc.yml\",env:\".env\"},fe=Object.create(O2.default),J=Object.create(O2.default.posix);fe.cwd=()=>process.cwd();J.cwd=process.platform===\"win32\"?()=>vU(process.cwd()):process.cwd;process.platform===\"win32\"&&(J.resolve=(...t)=>t.length>0&&J.isAbsolute(t[0])?O2.default.posix.resolve(...t):O2.default.posix.resolve(J.cwd(),...t));JZ=function(t,e,r){return e=t.normalize(e),r=t.normalize(r),e===r?\".\":(e.endsWith(t.sep)||(e=e+t.sep),r.startsWith(e)?r.slice(e.length):null)};fe.contains=(t,e)=>JZ(fe,t,e);J.contains=(t,e)=>JZ(J,t,e);VGe=/^([a-zA-Z]:.*)$/,JGe=/^\\/\\/(\\.\\/)?(.*)$/,KGe=/^\\/([a-zA-Z]:.*)$/,zGe=/^\\/unc\\/(\\.dot\\/)?(.*)$/;vU=process.platform===\"win32\"?ZGe:t=>t,KZ=process.platform===\"win32\"?XGe:t=>t;fe.fromPortablePath=KZ;fe.toPortablePath=vU});async function $P(t,e){let r=\"0123456789abcdef\";await t.mkdirPromise(e.indexPath,{recursive:!0});let s=[];for(let a of r)for(let n of r)s.push(t.mkdirPromise(t.pathUtils.join(e.indexPath,`${a}${n}`),{recursive:!0}));return await Promise.all(s),e.indexPath}async function zZ(t,e,r,s,a){let n=t.pathUtils.normalize(e),c=r.pathUtils.normalize(s),f=[],p=[],{atime:h,mtime:E}=a.stableTime?{atime:dd,mtime:dd}:await r.lstatPromise(c);await t.mkdirpPromise(t.pathUtils.dirname(e),{utimes:[h,E]}),await SU(f,p,t,n,r,c,{...a,didParentExist:!0});for(let C of f)await C();await Promise.all(p.map(C=>C()))}async function SU(t,e,r,s,a,n,c){let f=c.didParentExist?await XZ(r,s):null,p=await a.lstatPromise(n),{atime:h,mtime:E}=c.stableTime?{atime:dd,mtime:dd}:p,C;switch(!0){case p.isDirectory():C=await e5e(t,e,r,s,f,a,n,p,c);break;case p.isFile():C=await n5e(t,e,r,s,f,a,n,p,c);break;case p.isSymbolicLink():C=await i5e(t,e,r,s,f,a,n,p,c);break;default:throw new Error(`Unsupported file type (${p.mode})`)}return(c.linkStrategy?.type!==\"HardlinkFromIndex\"||!p.isFile())&&((C||f?.mtime?.getTime()!==E.getTime()||f?.atime?.getTime()!==h.getTime())&&(e.push(()=>r.lutimesPromise(s,h,E)),C=!0),(f===null||(f.mode&511)!==(p.mode&511))&&(e.push(()=>r.chmodPromise(s,p.mode&511)),C=!0)),C}async function XZ(t,e){try{return await t.lstatPromise(e)}catch{return null}}async function e5e(t,e,r,s,a,n,c,f,p){if(a!==null&&!a.isDirectory())if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;let h=!1;a===null&&(t.push(async()=>{try{await r.mkdirPromise(s,{mode:f.mode})}catch(S){if(S.code!==\"EEXIST\")throw S}}),h=!0);let E=await n.readdirPromise(c),C=p.didParentExist&&!a?{...p,didParentExist:!1}:p;if(p.stableSort)for(let S of E.sort())await SU(t,e,r,r.pathUtils.join(s,S),n,n.pathUtils.join(c,S),C)&&(h=!0);else(await Promise.all(E.map(async P=>{await SU(t,e,r,r.pathUtils.join(s,P),n,n.pathUtils.join(c,P),C)}))).some(P=>P)&&(h=!0);return h}async function t5e(t,e,r,s,a,n,c,f,p,h){let E=await n.checksumFilePromise(c,{algorithm:\"sha1\"}),C=420,S=f.mode&511,P=`${E}${S!==C?S.toString(8):\"\"}`,I=r.pathUtils.join(h.indexPath,E.slice(0,2),`${P}.dat`),R;(le=>(le[le.Lock=0]=\"Lock\",le[le.Rename=1]=\"Rename\"))(R||={});let N=1,U=await XZ(r,I);if(a){let ie=U&&a.dev===U.dev&&a.ino===U.ino,ue=U?.mtimeMs!==$Ge;if(ie&&ue&&h.autoRepair&&(N=0,U=null),!ie)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1}let W=!U&&N===1?`${I}.${Math.floor(Math.random()*4294967296).toString(16).padStart(8,\"0\")}`:null,ee=!1;return t.push(async()=>{if(!U&&(N===0&&await r.lockPromise(I,async()=>{let ie=await n.readFilePromise(c);await r.writeFilePromise(I,ie)}),N===1&&W)){let ie=await n.readFilePromise(c);await r.writeFilePromise(W,ie);try{await r.linkPromise(W,I)}catch(ue){if(ue.code===\"EEXIST\")ee=!0,await r.unlinkPromise(W);else throw ue}}a||await r.linkPromise(I,s)}),e.push(async()=>{U||(await r.lutimesPromise(I,dd,dd),S!==C&&await r.chmodPromise(I,S)),W&&!ee&&await r.unlinkPromise(W)}),!1}async function r5e(t,e,r,s,a,n,c,f,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;return t.push(async()=>{let h=await n.readFilePromise(c);await r.writeFilePromise(s,h)}),!0}async function n5e(t,e,r,s,a,n,c,f,p){return p.linkStrategy?.type===\"HardlinkFromIndex\"?t5e(t,e,r,s,a,n,c,f,p,p.linkStrategy):r5e(t,e,r,s,a,n,c,f,p)}async function i5e(t,e,r,s,a,n,c,f,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;return t.push(async()=>{await r.symlinkPromise(ZP(r.pathUtils,await n.readlinkPromise(c)),s)}),!0}var dd,$Ge,DU=Xe(()=>{el();dd=new Date(456789e3*1e3),$Ge=dd.getTime()});function ex(t,e,r,s){let a=()=>{let n=r.shift();if(typeof n>\"u\")return null;let c=t.pathUtils.join(e,n);return Object.assign(t.statSync(c),{name:n,path:void 0})};return new L2(e,a,s)}var L2,ZZ=Xe(()=>{zP();L2=class{constructor(e,r,s={}){this.path=e;this.nextDirent=r;this.opts=s;this.closed=!1}throwIfClosed(){if(this.closed)throw yU()}async*[Symbol.asyncIterator](){try{let e;for(;(e=await this.read())!==null;)yield e}finally{await this.close()}}read(e){let r=this.readSync();return typeof e<\"u\"?e(null,r):Promise.resolve(r)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),typeof e<\"u\"?e(null):Promise.resolve()}closeSync(){this.throwIfClosed(),this.opts.onClose?.(),this.closed=!0}}});function $Z(t,e){if(t!==e)throw new Error(`Invalid StatWatcher status: expected '${e}', got '${t}'`)}var e$,tx,t$=Xe(()=>{e$=Ie(\"events\");BU();tx=class t extends e$.EventEmitter{constructor(r,s,{bigint:a=!1}={}){super();this.status=\"ready\";this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=r,this.path=s,this.bigint=a,this.lastStats=this.stat()}static create(r,s,a){let n=new t(r,s,a);return n.start(),n}start(){$Z(this.status,\"ready\"),this.status=\"running\",this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit(\"change\",this.lastStats,this.lastStats)},3)}stop(){$Z(this.status,\"running\"),this.status=\"stopped\",this.startTimeout!==null&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit(\"stop\")}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch{let r=this.bigint?new iE:new nE;return XP(r)}}makeInterval(r){let s=setInterval(()=>{let a=this.stat(),n=this.lastStats;wU(a,n)||(this.lastStats=a,this.emit(\"change\",a,n))},r.interval);return r.persistent?s:s.unref()}registerChangeListener(r,s){this.addListener(\"change\",r),this.changeListeners.set(r,this.makeInterval(s))}unregisterChangeListener(r){this.removeListener(\"change\",r);let s=this.changeListeners.get(r);typeof s<\"u\"&&clearInterval(s),this.changeListeners.delete(r)}unregisterAllChangeListeners(){for(let r of this.changeListeners.keys())this.unregisterChangeListener(r)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(let r of this.changeListeners.values())r.ref();return this}unref(){for(let r of this.changeListeners.values())r.unref();return this}}});function sE(t,e,r,s){let a,n,c,f;switch(typeof r){case\"function\":a=!1,n=!0,c=5007,f=r;break;default:({bigint:a=!1,persistent:n=!0,interval:c=5007}=r),f=s;break}let p=rx.get(t);typeof p>\"u\"&&rx.set(t,p=new Map);let h=p.get(e);return typeof h>\"u\"&&(h=tx.create(t,e,{bigint:a}),p.set(e,h)),h.registerChangeListener(f,{persistent:n,interval:c}),h}function md(t,e,r){let s=rx.get(t);if(typeof s>\"u\")return;let a=s.get(e);typeof a>\"u\"||(typeof r>\"u\"?a.unregisterAllChangeListeners():a.unregisterChangeListener(r),a.hasChangeListeners()||(a.stop(),s.delete(e)))}function yd(t){let e=rx.get(t);if(!(typeof e>\"u\"))for(let r of e.keys())md(t,r)}var rx,bU=Xe(()=>{t$();rx=new WeakMap});function s5e(t){let e=t.match(/\\r?\\n/g);if(e===null)return n$.EOL;let r=e.filter(a=>a===`\\r\n`).length,s=e.length-r;return r>s?`\\r\n`:`\n`}function Ed(t,e){return e.replace(/\\r?\\n/g,s5e(t))}var r$,n$,mp,Uf,Id=Xe(()=>{r$=Ie(\"crypto\"),n$=Ie(\"os\");DU();el();mp=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let s=[e];for(;s.length>0;){let a=s.shift();if((await this.lstatPromise(a)).isDirectory()){let c=await this.readdirPromise(a);if(r)for(let f of c.sort())s.push(this.pathUtils.join(a,f));else throw new Error(\"Not supported\")}else yield a}}async checksumFilePromise(e,{algorithm:r=\"sha512\"}={}){let s=await this.openPromise(e,\"r\");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,r$.createHash)(r),f=0;for(;(f=await this.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest(\"hex\")}finally{await this.closePromise(s)}}async removePromise(e,{recursive:r=!0,maxRetries:s=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code===\"ENOENT\")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(c=>this.removePromise(this.pathUtils.resolve(e,c))))}for(let n=0;n<=s;n++)try{await this.rmdirPromise(e);break}catch(c){if(c.code!==\"EBUSY\"&&c.code!==\"ENOTEMPTY\")throw c;n<s&&await new Promise(f=>setTimeout(f,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let s;try{s=this.lstatSync(e)}catch(a){if(a.code===\"ENOENT\")return;throw a}if(s.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{await this.mkdirPromise(f)}catch(p){if(p.code===\"EEXIST\")continue;throw p}if(n??=f,r!=null&&await this.chmodPromise(f,r),s!=null)await this.utimesPromise(f,s[0],s[1]);else{let p=await this.statPromise(this.pathUtils.dirname(f));await this.utimesPromise(f,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{this.mkdirSync(f)}catch(p){if(p.code===\"EEXIST\")continue;throw p}if(n??=f,r!=null&&this.chmodSync(f,r),s!=null)this.utimesSync(f,s[0],s[1]);else{let p=this.statSync(this.pathUtils.dirname(f));this.utimesSync(f,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:s=this,overwrite:a=!0,stableSort:n=!1,stableTime:c=!1,linkStrategy:f=null}={}){return await zZ(this,e,s,r,{overwrite:a,stableSort:n,stableTime:c,linkStrategy:f})}copySync(e,r,{baseFs:s=this,overwrite:a=!0}={}){let n=s.lstatSync(r),c=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=s.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),s.pathUtils.join(r,h),{baseFs:s,overwrite:a})}else if(n.isFile()){if(!c||a){c&&this.removeSync(e);let p=s.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!c||a){c&&this.removeSync(e);let p=s.readlinkSync(r);this.symlinkSync(ZP(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,\"0\")})`);let f=n.mode&511;this.chmodSync(e,f)}async changeFilePromise(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,s):this.changeFileTextPromise(e,r,s)}async changeFileBufferPromise(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:s})}async changeFileTextPromise(e,r,{automaticNewlines:s,mode:a}={}){let n=\"\";try{n=await this.readFilePromise(e,\"utf8\")}catch{}let c=s?Ed(n,r):r;n!==c&&await this.writeFilePromise(e,c,{mode:a})}changeFileSync(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,s):this.changeFileTextSync(e,r,s)}changeFileBufferSync(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:s})}changeFileTextSync(e,r,{automaticNewlines:s=!1,mode:a}={}){let n=\"\";try{n=this.readFileSync(e,\"utf8\")}catch{}let c=s?Ed(n,r):r;n!==c&&this.writeFileSync(e,c,{mode:a})}async movePromise(e,r){try{await this.renamePromise(e,r)}catch(s){if(s.code===\"EXDEV\")await this.copyPromise(r,e),await this.removePromise(e);else throw s}}moveSync(e,r){try{this.renameSync(e,r)}catch(s){if(s.code===\"EXDEV\")this.copySync(r,e),this.removeSync(e);else throw s}}async lockPromise(e,r){let s=`${e}.flock`,a=1e3/60,n=Date.now(),c=null,f=async()=>{let p;try{[p]=await this.readJsonPromise(s)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;c===null;)try{c=await this.openPromise(s,\"wx\")}catch(p){if(p.code===\"EEXIST\"){if(!await f())try{await this.unlinkPromise(s);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${s})`)}else throw p}await this.writePromise(c,JSON.stringify([process.pid]));try{return await r()}finally{try{await this.closePromise(c),await this.unlinkPromise(s)}catch{}}}async readJsonPromise(e){let r=await this.readFilePromise(e,\"utf8\");try{return JSON.parse(r)}catch(s){throw s.message+=` (in ${e})`,s}}readJsonSync(e){let r=this.readFileSync(e,\"utf8\");try{return JSON.parse(r)}catch(s){throw s.message+=` (in ${e})`,s}}async writeJsonPromise(e,r,{compact:s=!1}={}){let a=s?0:2;return await this.writeFilePromise(e,`${JSON.stringify(r,null,a)}\n`)}writeJsonSync(e,r,{compact:s=!1}={}){let a=s?0:2;return this.writeFileSync(e,`${JSON.stringify(r,null,a)}\n`)}async preserveTimePromise(e,r){let s=await this.lstatPromise(e),a=await r();typeof a<\"u\"&&(e=a),await this.lutimesPromise(e,s.atime,s.mtime)}async preserveTimeSync(e,r){let s=this.lstatSync(e),a=r();typeof a<\"u\"&&(e=a),this.lutimesSync(e,s.atime,s.mtime)}},Uf=class extends mp{constructor(){super(J)}}});var _s,yp=Xe(()=>{Id();_s=class extends mp{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,s){return this.baseFs.openPromise(this.mapToBase(e),r,s)}openSync(e,r,s){return this.baseFs.openSync(this.mapToBase(e),r,s)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,s,a,n){return await this.baseFs.readPromise(e,r,s,a,n)}readSync(e,r,s,a,n){return this.baseFs.readSync(e,r,s,a,n)}async writePromise(e,r,s,a,n){return typeof r==\"string\"?await this.baseFs.writePromise(e,r,s):await this.baseFs.writePromise(e,r,s,a,n)}writeSync(e,r,s,a,n){return typeof r==\"string\"?this.baseFs.writeSync(e,r,s):this.baseFs.writeSync(e,r,s,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,s){return this.baseFs.fchownPromise(e,r,s)}fchownSync(e,r,s){return this.baseFs.fchownSync(e,r,s)}async chownPromise(e,r,s){return this.baseFs.chownPromise(this.mapToBase(e),r,s)}chownSync(e,r,s){return this.baseFs.chownSync(this.mapToBase(e),r,s)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,s=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),s)}copyFileSync(e,r,s=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),s)}async appendFilePromise(e,r,s){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,s)}appendFileSync(e,r,s){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,s)}async writeFilePromise(e,r,s){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,s)}writeFileSync(e,r,s){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,s)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,s){return this.baseFs.utimesPromise(this.mapToBase(e),r,s)}utimesSync(e,r,s){return this.baseFs.utimesSync(this.mapToBase(e),r,s)}async lutimesPromise(e,r,s){return this.baseFs.lutimesPromise(this.mapToBase(e),r,s)}lutimesSync(e,r,s){return this.baseFs.lutimesSync(this.mapToBase(e),r,s)}async mkdirPromise(e,r){return this.baseFs.mkdirPromise(this.mapToBase(e),r)}mkdirSync(e,r){return this.baseFs.mkdirSync(this.mapToBase(e),r)}async rmdirPromise(e,r){return this.baseFs.rmdirPromise(this.mapToBase(e),r)}rmdirSync(e,r){return this.baseFs.rmdirSync(this.mapToBase(e),r)}async rmPromise(e,r){return this.baseFs.rmPromise(this.mapToBase(e),r)}rmSync(e,r){return this.baseFs.rmSync(this.mapToBase(e),r)}async linkPromise(e,r){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(r))}linkSync(e,r){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(r))}async symlinkPromise(e,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkPromise(c,a,s)}symlinkSync(e,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkSync(this.mapToBase(e),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkSync(c,a,s)}async readFilePromise(e,r){return this.baseFs.readFilePromise(this.fsMapToBase(e),r)}readFileSync(e,r){return this.baseFs.readFileSync(this.fsMapToBase(e),r)}readdirPromise(e,r){return this.baseFs.readdirPromise(this.mapToBase(e),r)}readdirSync(e,r){return this.baseFs.readdirSync(this.mapToBase(e),r)}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}async truncatePromise(e,r){return this.baseFs.truncatePromise(this.mapToBase(e),r)}truncateSync(e,r){return this.baseFs.truncateSync(this.mapToBase(e),r)}async ftruncatePromise(e,r){return this.baseFs.ftruncatePromise(e,r)}ftruncateSync(e,r){return this.baseFs.ftruncateSync(e,r)}watch(e,r,s){return this.baseFs.watch(this.mapToBase(e),r,s)}watchFile(e,r,s){return this.baseFs.watchFile(this.mapToBase(e),r,s)}unwatchFile(e,r){return this.baseFs.unwatchFile(this.mapToBase(e),r)}fsMapToBase(e){return typeof e==\"number\"?e:this.mapToBase(e)}}});var _f,i$=Xe(()=>{yp();_f=class extends _s{constructor(e,{baseFs:r,pathUtils:s}){super(s),this.target=e,this.baseFs=r}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}}});function s$(t){let e=t;return typeof t.path==\"string\"&&(e.path=fe.toPortablePath(t.path)),e}var o$,Yn,Cd=Xe(()=>{o$=ut(Ie(\"fs\"));Id();el();Yn=class extends Uf{constructor(e=o$.default){super(),this.realFs=e}getExtractHint(){return!1}getRealPath(){return vt.root}resolve(e){return J.resolve(e)}async openPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.open(fe.fromPortablePath(e),r,s,this.makeCallback(a,n))})}openSync(e,r,s){return this.realFs.openSync(fe.fromPortablePath(e),r,s)}async opendirPromise(e,r){return await new Promise((s,a)=>{typeof r<\"u\"?this.realFs.opendir(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.opendir(fe.fromPortablePath(e),this.makeCallback(s,a))}).then(s=>{let a=s;return Object.defineProperty(a,\"path\",{value:e,configurable:!0,writable:!0}),a})}opendirSync(e,r){let a=typeof r<\"u\"?this.realFs.opendirSync(fe.fromPortablePath(e),r):this.realFs.opendirSync(fe.fromPortablePath(e));return Object.defineProperty(a,\"path\",{value:e,configurable:!0,writable:!0}),a}async readPromise(e,r,s=0,a=0,n=-1){return await new Promise((c,f)=>{this.realFs.read(e,r,s,a,n,(p,h)=>{p?f(p):c(h)})})}readSync(e,r,s,a,n){return this.realFs.readSync(e,r,s,a,n)}async writePromise(e,r,s,a,n){return await new Promise((c,f)=>typeof r==\"string\"?this.realFs.write(e,r,s,this.makeCallback(c,f)):this.realFs.write(e,r,s,a,n,this.makeCallback(c,f)))}writeSync(e,r,s,a,n){return typeof r==\"string\"?this.realFs.writeSync(e,r,s):this.realFs.writeSync(e,r,s,a,n)}async closePromise(e){await new Promise((r,s)=>{this.realFs.close(e,this.makeCallback(r,s))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,r){let s=e!==null?fe.fromPortablePath(e):e;return this.realFs.createReadStream(s,r)}createWriteStream(e,r){let s=e!==null?fe.fromPortablePath(e):e;return this.realFs.createWriteStream(s,r)}async realpathPromise(e){return await new Promise((r,s)=>{this.realFs.realpath(fe.fromPortablePath(e),{},this.makeCallback(r,s))}).then(r=>fe.toPortablePath(r))}realpathSync(e){return fe.toPortablePath(this.realFs.realpathSync(fe.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(r=>{this.realFs.exists(fe.fromPortablePath(e),r)})}accessSync(e,r){return this.realFs.accessSync(fe.fromPortablePath(e),r)}async accessPromise(e,r){return await new Promise((s,a)=>{this.realFs.access(fe.fromPortablePath(e),r,this.makeCallback(s,a))})}existsSync(e){return this.realFs.existsSync(fe.fromPortablePath(e))}async statPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.stat(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.stat(fe.fromPortablePath(e),this.makeCallback(s,a))})}statSync(e,r){return r?this.realFs.statSync(fe.fromPortablePath(e),r):this.realFs.statSync(fe.fromPortablePath(e))}async fstatPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.fstat(e,r,this.makeCallback(s,a)):this.realFs.fstat(e,this.makeCallback(s,a))})}fstatSync(e,r){return r?this.realFs.fstatSync(e,r):this.realFs.fstatSync(e)}async lstatPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.lstat(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.lstat(fe.fromPortablePath(e),this.makeCallback(s,a))})}lstatSync(e,r){return r?this.realFs.lstatSync(fe.fromPortablePath(e),r):this.realFs.lstatSync(fe.fromPortablePath(e))}async fchmodPromise(e,r){return await new Promise((s,a)=>{this.realFs.fchmod(e,r,this.makeCallback(s,a))})}fchmodSync(e,r){return this.realFs.fchmodSync(e,r)}async chmodPromise(e,r){return await new Promise((s,a)=>{this.realFs.chmod(fe.fromPortablePath(e),r,this.makeCallback(s,a))})}chmodSync(e,r){return this.realFs.chmodSync(fe.fromPortablePath(e),r)}async fchownPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.fchown(e,r,s,this.makeCallback(a,n))})}fchownSync(e,r,s){return this.realFs.fchownSync(e,r,s)}async chownPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.chown(fe.fromPortablePath(e),r,s,this.makeCallback(a,n))})}chownSync(e,r,s){return this.realFs.chownSync(fe.fromPortablePath(e),r,s)}async renamePromise(e,r){return await new Promise((s,a)=>{this.realFs.rename(fe.fromPortablePath(e),fe.fromPortablePath(r),this.makeCallback(s,a))})}renameSync(e,r){return this.realFs.renameSync(fe.fromPortablePath(e),fe.fromPortablePath(r))}async copyFilePromise(e,r,s=0){return await new Promise((a,n)=>{this.realFs.copyFile(fe.fromPortablePath(e),fe.fromPortablePath(r),s,this.makeCallback(a,n))})}copyFileSync(e,r,s=0){return this.realFs.copyFileSync(fe.fromPortablePath(e),fe.fromPortablePath(r),s)}async appendFilePromise(e,r,s){return await new Promise((a,n)=>{let c=typeof e==\"string\"?fe.fromPortablePath(e):e;s?this.realFs.appendFile(c,r,s,this.makeCallback(a,n)):this.realFs.appendFile(c,r,this.makeCallback(a,n))})}appendFileSync(e,r,s){let a=typeof e==\"string\"?fe.fromPortablePath(e):e;s?this.realFs.appendFileSync(a,r,s):this.realFs.appendFileSync(a,r)}async writeFilePromise(e,r,s){return await new Promise((a,n)=>{let c=typeof e==\"string\"?fe.fromPortablePath(e):e;s?this.realFs.writeFile(c,r,s,this.makeCallback(a,n)):this.realFs.writeFile(c,r,this.makeCallback(a,n))})}writeFileSync(e,r,s){let a=typeof e==\"string\"?fe.fromPortablePath(e):e;s?this.realFs.writeFileSync(a,r,s):this.realFs.writeFileSync(a,r)}async unlinkPromise(e){return await new Promise((r,s)=>{this.realFs.unlink(fe.fromPortablePath(e),this.makeCallback(r,s))})}unlinkSync(e){return this.realFs.unlinkSync(fe.fromPortablePath(e))}async utimesPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.utimes(fe.fromPortablePath(e),r,s,this.makeCallback(a,n))})}utimesSync(e,r,s){this.realFs.utimesSync(fe.fromPortablePath(e),r,s)}async lutimesPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.lutimes(fe.fromPortablePath(e),r,s,this.makeCallback(a,n))})}lutimesSync(e,r,s){this.realFs.lutimesSync(fe.fromPortablePath(e),r,s)}async mkdirPromise(e,r){return await new Promise((s,a)=>{this.realFs.mkdir(fe.fromPortablePath(e),r,this.makeCallback(s,a))})}mkdirSync(e,r){return this.realFs.mkdirSync(fe.fromPortablePath(e),r)}async rmdirPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.rmdir(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.rmdir(fe.fromPortablePath(e),this.makeCallback(s,a))})}rmdirSync(e,r){return this.realFs.rmdirSync(fe.fromPortablePath(e),r)}async rmPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.rm(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.rm(fe.fromPortablePath(e),this.makeCallback(s,a))})}rmSync(e,r){return this.realFs.rmSync(fe.fromPortablePath(e),r)}async linkPromise(e,r){return await new Promise((s,a)=>{this.realFs.link(fe.fromPortablePath(e),fe.fromPortablePath(r),this.makeCallback(s,a))})}linkSync(e,r){return this.realFs.linkSync(fe.fromPortablePath(e),fe.fromPortablePath(r))}async symlinkPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.symlink(fe.fromPortablePath(e.replace(/\\/+$/,\"\")),fe.fromPortablePath(r),s,this.makeCallback(a,n))})}symlinkSync(e,r,s){return this.realFs.symlinkSync(fe.fromPortablePath(e.replace(/\\/+$/,\"\")),fe.fromPortablePath(r),s)}async readFilePromise(e,r){return await new Promise((s,a)=>{let n=typeof e==\"string\"?fe.fromPortablePath(e):e;this.realFs.readFile(n,r,this.makeCallback(s,a))})}readFileSync(e,r){let s=typeof e==\"string\"?fe.fromPortablePath(e):e;return this.realFs.readFileSync(s,r)}async readdirPromise(e,r){return await new Promise((s,a)=>{r?r.recursive&&process.platform===\"win32\"?r.withFileTypes?this.realFs.readdir(fe.fromPortablePath(e),r,this.makeCallback(n=>s(n.map(s$)),a)):this.realFs.readdir(fe.fromPortablePath(e),r,this.makeCallback(n=>s(n.map(fe.toPortablePath)),a)):this.realFs.readdir(fe.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.readdir(fe.fromPortablePath(e),this.makeCallback(s,a))})}readdirSync(e,r){return r?r.recursive&&process.platform===\"win32\"?r.withFileTypes?this.realFs.readdirSync(fe.fromPortablePath(e),r).map(s$):this.realFs.readdirSync(fe.fromPortablePath(e),r).map(fe.toPortablePath):this.realFs.readdirSync(fe.fromPortablePath(e),r):this.realFs.readdirSync(fe.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((r,s)=>{this.realFs.readlink(fe.fromPortablePath(e),this.makeCallback(r,s))}).then(r=>fe.toPortablePath(r))}readlinkSync(e){return fe.toPortablePath(this.realFs.readlinkSync(fe.fromPortablePath(e)))}async truncatePromise(e,r){return await new Promise((s,a)=>{this.realFs.truncate(fe.fromPortablePath(e),r,this.makeCallback(s,a))})}truncateSync(e,r){return this.realFs.truncateSync(fe.fromPortablePath(e),r)}async ftruncatePromise(e,r){return await new Promise((s,a)=>{this.realFs.ftruncate(e,r,this.makeCallback(s,a))})}ftruncateSync(e,r){return this.realFs.ftruncateSync(e,r)}watch(e,r,s){return this.realFs.watch(fe.fromPortablePath(e),r,s)}watchFile(e,r,s){return this.realFs.watchFile(fe.fromPortablePath(e),r,s)}unwatchFile(e,r){return this.realFs.unwatchFile(fe.fromPortablePath(e),r)}makeCallback(e,r){return(s,a)=>{s?r(s):e(a)}}}});var Sn,a$=Xe(()=>{Cd();yp();el();Sn=class extends _s{constructor(e,{baseFs:r=new Yn}={}){super(J),this.target=this.pathUtils.normalize(e),this.baseFs=r}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(e){return this.pathUtils.isAbsolute(e)?J.normalize(e):this.baseFs.resolve(J.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}}});var l$,Hf,c$=Xe(()=>{Cd();yp();el();l$=vt.root,Hf=class extends _s{constructor(e,{baseFs:r=new Yn}={}){super(J),this.target=this.pathUtils.resolve(vt.root,e),this.baseFs=r}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(vt.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(e){let r=this.pathUtils.normalize(e);if(this.pathUtils.isAbsolute(e))return this.pathUtils.resolve(this.target,this.pathUtils.relative(l$,e));if(r.match(/^\\.\\.\\/?/))throw new Error(`Resolving this path (${e}) would escape the jail`);return this.pathUtils.resolve(this.target,e)}mapFromBase(e){return this.pathUtils.resolve(l$,this.pathUtils.relative(this.target,e))}}});var oE,u$=Xe(()=>{yp();oE=class extends _s{constructor(r,s){super(s);this.instance=null;this.factory=r}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(r){this.instance=r}mapFromBase(r){return r}mapToBase(r){return r}}});var wd,tl,e0,f$=Xe(()=>{wd=Ie(\"fs\");Id();Cd();bU();zP();el();tl=4278190080,e0=class extends Uf{constructor({baseFs:r=new Yn,filter:s=null,magicByte:a=42,maxOpenFiles:n=1/0,useCache:c=!0,maxAge:f=5e3,typeCheck:p=wd.constants.S_IFREG,getMountPoint:h,factoryPromise:E,factorySync:C}){if(Math.floor(a)!==a||!(a>1&&a<=127))throw new Error(\"The magic byte must be set to a round value between 1 and 127 included\");super();this.fdMap=new Map;this.nextFd=3;this.isMount=new Set;this.notMount=new Set;this.realPaths=new Map;this.limitOpenFilesTimeout=null;this.baseFs=r,this.mountInstances=c?new Map:null,this.factoryPromise=E,this.factorySync=C,this.filter=s,this.getMountPoint=h,this.magic=a<<24,this.maxAge=f,this.maxOpenFiles=n,this.typeCheck=p}getExtractHint(r){return this.baseFs.getExtractHint(r)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){if(yd(this),this.mountInstances)for(let[r,{childFs:s}]of this.mountInstances.entries())s.saveAndClose?.(),this.mountInstances.delete(r)}discardAndClose(){if(yd(this),this.mountInstances)for(let[r,{childFs:s}]of this.mountInstances.entries())s.discardAndClose?.(),this.mountInstances.delete(r)}resolve(r){return this.baseFs.resolve(r)}remapFd(r,s){let a=this.nextFd++|this.magic;return this.fdMap.set(a,[r,s]),a}async openPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.openPromise(r,s,a),async(n,{subPath:c})=>this.remapFd(n,await n.openPromise(c,s,a)))}openSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.openSync(r,s,a),(n,{subPath:c})=>this.remapFd(n,n.openSync(c,s,a)))}async opendirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.opendirPromise(r,s),async(a,{subPath:n})=>await a.opendirPromise(n,s),{requireSubpath:!1})}opendirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.opendirSync(r,s),(a,{subPath:n})=>a.opendirSync(n,s),{requireSubpath:!1})}async readPromise(r,s,a,n,c){if((r&tl)!==this.magic)return await this.baseFs.readPromise(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Mo(\"read\");let[p,h]=f;return await p.readPromise(h,s,a,n,c)}readSync(r,s,a,n,c){if((r&tl)!==this.magic)return this.baseFs.readSync(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Mo(\"readSync\");let[p,h]=f;return p.readSync(h,s,a,n,c)}async writePromise(r,s,a,n,c){if((r&tl)!==this.magic)return typeof s==\"string\"?await this.baseFs.writePromise(r,s,a):await this.baseFs.writePromise(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Mo(\"write\");let[p,h]=f;return typeof s==\"string\"?await p.writePromise(h,s,a):await p.writePromise(h,s,a,n,c)}writeSync(r,s,a,n,c){if((r&tl)!==this.magic)return typeof s==\"string\"?this.baseFs.writeSync(r,s,a):this.baseFs.writeSync(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>\"u\")throw Mo(\"writeSync\");let[p,h]=f;return typeof s==\"string\"?p.writeSync(h,s,a):p.writeSync(h,s,a,n,c)}async closePromise(r){if((r&tl)!==this.magic)return await this.baseFs.closePromise(r);let s=this.fdMap.get(r);if(typeof s>\"u\")throw Mo(\"close\");this.fdMap.delete(r);let[a,n]=s;return await a.closePromise(n)}closeSync(r){if((r&tl)!==this.magic)return this.baseFs.closeSync(r);let s=this.fdMap.get(r);if(typeof s>\"u\")throw Mo(\"closeSync\");this.fdMap.delete(r);let[a,n]=s;return a.closeSync(n)}createReadStream(r,s){return r===null?this.baseFs.createReadStream(r,s):this.makeCallSync(r,()=>this.baseFs.createReadStream(r,s),(a,{archivePath:n,subPath:c})=>{let f=a.createReadStream(c,s);return f.path=fe.fromPortablePath(this.pathUtils.join(n,c)),f})}createWriteStream(r,s){return r===null?this.baseFs.createWriteStream(r,s):this.makeCallSync(r,()=>this.baseFs.createWriteStream(r,s),(a,{subPath:n})=>a.createWriteStream(n,s))}async realpathPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.realpathPromise(r),async(s,{archivePath:a,subPath:n})=>{let c=this.realPaths.get(a);return typeof c>\"u\"&&(c=await this.baseFs.realpathPromise(a),this.realPaths.set(a,c)),this.pathUtils.join(c,this.pathUtils.relative(vt.root,await s.realpathPromise(n)))})}realpathSync(r){return this.makeCallSync(r,()=>this.baseFs.realpathSync(r),(s,{archivePath:a,subPath:n})=>{let c=this.realPaths.get(a);return typeof c>\"u\"&&(c=this.baseFs.realpathSync(a),this.realPaths.set(a,c)),this.pathUtils.join(c,this.pathUtils.relative(vt.root,s.realpathSync(n)))})}async existsPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.existsPromise(r),async(s,{subPath:a})=>await s.existsPromise(a))}existsSync(r){return this.makeCallSync(r,()=>this.baseFs.existsSync(r),(s,{subPath:a})=>s.existsSync(a))}async accessPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.accessPromise(r,s),async(a,{subPath:n})=>await a.accessPromise(n,s))}accessSync(r,s){return this.makeCallSync(r,()=>this.baseFs.accessSync(r,s),(a,{subPath:n})=>a.accessSync(n,s))}async statPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.statPromise(r,s),async(a,{subPath:n})=>await a.statPromise(n,s))}statSync(r,s){return this.makeCallSync(r,()=>this.baseFs.statSync(r,s),(a,{subPath:n})=>a.statSync(n,s))}async fstatPromise(r,s){if((r&tl)!==this.magic)return this.baseFs.fstatPromise(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"fstat\");let[n,c]=a;return n.fstatPromise(c,s)}fstatSync(r,s){if((r&tl)!==this.magic)return this.baseFs.fstatSync(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"fstatSync\");let[n,c]=a;return n.fstatSync(c,s)}async lstatPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.lstatPromise(r,s),async(a,{subPath:n})=>await a.lstatPromise(n,s))}lstatSync(r,s){return this.makeCallSync(r,()=>this.baseFs.lstatSync(r,s),(a,{subPath:n})=>a.lstatSync(n,s))}async fchmodPromise(r,s){if((r&tl)!==this.magic)return this.baseFs.fchmodPromise(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"fchmod\");let[n,c]=a;return n.fchmodPromise(c,s)}fchmodSync(r,s){if((r&tl)!==this.magic)return this.baseFs.fchmodSync(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"fchmodSync\");let[n,c]=a;return n.fchmodSync(c,s)}async chmodPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.chmodPromise(r,s),async(a,{subPath:n})=>await a.chmodPromise(n,s))}chmodSync(r,s){return this.makeCallSync(r,()=>this.baseFs.chmodSync(r,s),(a,{subPath:n})=>a.chmodSync(n,s))}async fchownPromise(r,s,a){if((r&tl)!==this.magic)return this.baseFs.fchownPromise(r,s,a);let n=this.fdMap.get(r);if(typeof n>\"u\")throw Mo(\"fchown\");let[c,f]=n;return c.fchownPromise(f,s,a)}fchownSync(r,s,a){if((r&tl)!==this.magic)return this.baseFs.fchownSync(r,s,a);let n=this.fdMap.get(r);if(typeof n>\"u\")throw Mo(\"fchownSync\");let[c,f]=n;return c.fchownSync(f,s,a)}async chownPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.chownPromise(r,s,a),async(n,{subPath:c})=>await n.chownPromise(c,s,a))}chownSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.chownSync(r,s,a),(n,{subPath:c})=>n.chownSync(c,s,a))}async renamePromise(r,s){return await this.makeCallPromise(r,async()=>await this.makeCallPromise(s,async()=>await this.baseFs.renamePromise(r,s),async()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})}),async(a,{subPath:n})=>await this.makeCallPromise(s,async()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})},async(c,{subPath:f})=>{if(a!==c)throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"});return await a.renamePromise(n,f)}))}renameSync(r,s){return this.makeCallSync(r,()=>this.makeCallSync(s,()=>this.baseFs.renameSync(r,s),()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})}),(a,{subPath:n})=>this.makeCallSync(s,()=>{throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"})},(c,{subPath:f})=>{if(a!==c)throw Object.assign(new Error(\"EEXDEV: cross-device link not permitted\"),{code:\"EEXDEV\"});return a.renameSync(n,f)}))}async copyFilePromise(r,s,a=0){let n=async(c,f,p,h)=>{if(a&wd.constants.COPYFILE_FICLONE_FORCE)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${f}' -> ${h}'`),{code:\"EXDEV\"});if(a&wd.constants.COPYFILE_EXCL&&await this.existsPromise(f))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${f}' -> '${h}'`),{code:\"EEXIST\"});let E;try{E=await c.readFilePromise(f)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${f}' -> '${h}'`),{code:\"EINVAL\"})}await p.writeFilePromise(h,E)};return await this.makeCallPromise(r,async()=>await this.makeCallPromise(s,async()=>await this.baseFs.copyFilePromise(r,s,a),async(c,{subPath:f})=>await n(this.baseFs,r,c,f)),async(c,{subPath:f})=>await this.makeCallPromise(s,async()=>await n(c,f,this.baseFs,s),async(p,{subPath:h})=>c!==p?await n(c,f,p,h):await c.copyFilePromise(f,h,a)))}copyFileSync(r,s,a=0){let n=(c,f,p,h)=>{if(a&wd.constants.COPYFILE_FICLONE_FORCE)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${f}' -> ${h}'`),{code:\"EXDEV\"});if(a&wd.constants.COPYFILE_EXCL&&this.existsSync(f))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${f}' -> '${h}'`),{code:\"EEXIST\"});let E;try{E=c.readFileSync(f)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${f}' -> '${h}'`),{code:\"EINVAL\"})}p.writeFileSync(h,E)};return this.makeCallSync(r,()=>this.makeCallSync(s,()=>this.baseFs.copyFileSync(r,s,a),(c,{subPath:f})=>n(this.baseFs,r,c,f)),(c,{subPath:f})=>this.makeCallSync(s,()=>n(c,f,this.baseFs,s),(p,{subPath:h})=>c!==p?n(c,f,p,h):c.copyFileSync(f,h,a)))}async appendFilePromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.appendFilePromise(r,s,a),async(n,{subPath:c})=>await n.appendFilePromise(c,s,a))}appendFileSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.appendFileSync(r,s,a),(n,{subPath:c})=>n.appendFileSync(c,s,a))}async writeFilePromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.writeFilePromise(r,s,a),async(n,{subPath:c})=>await n.writeFilePromise(c,s,a))}writeFileSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.writeFileSync(r,s,a),(n,{subPath:c})=>n.writeFileSync(c,s,a))}async unlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.unlinkPromise(r),async(s,{subPath:a})=>await s.unlinkPromise(a))}unlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.unlinkSync(r),(s,{subPath:a})=>s.unlinkSync(a))}async utimesPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.utimesPromise(r,s,a),async(n,{subPath:c})=>await n.utimesPromise(c,s,a))}utimesSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.utimesSync(r,s,a),(n,{subPath:c})=>n.utimesSync(c,s,a))}async lutimesPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.lutimesPromise(r,s,a),async(n,{subPath:c})=>await n.lutimesPromise(c,s,a))}lutimesSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.lutimesSync(r,s,a),(n,{subPath:c})=>n.lutimesSync(c,s,a))}async mkdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.mkdirPromise(r,s),async(a,{subPath:n})=>await a.mkdirPromise(n,s))}mkdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.mkdirSync(r,s),(a,{subPath:n})=>a.mkdirSync(n,s))}async rmdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.rmdirPromise(r,s),async(a,{subPath:n})=>await a.rmdirPromise(n,s))}rmdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.rmdirSync(r,s),(a,{subPath:n})=>a.rmdirSync(n,s))}async rmPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.rmPromise(r,s),async(a,{subPath:n})=>await a.rmPromise(n,s))}rmSync(r,s){return this.makeCallSync(r,()=>this.baseFs.rmSync(r,s),(a,{subPath:n})=>a.rmSync(n,s))}async linkPromise(r,s){return await this.makeCallPromise(s,async()=>await this.baseFs.linkPromise(r,s),async(a,{subPath:n})=>await a.linkPromise(r,n))}linkSync(r,s){return this.makeCallSync(s,()=>this.baseFs.linkSync(r,s),(a,{subPath:n})=>a.linkSync(r,n))}async symlinkPromise(r,s,a){return await this.makeCallPromise(s,async()=>await this.baseFs.symlinkPromise(r,s,a),async(n,{subPath:c})=>await n.symlinkPromise(r,c))}symlinkSync(r,s,a){return this.makeCallSync(s,()=>this.baseFs.symlinkSync(r,s,a),(n,{subPath:c})=>n.symlinkSync(r,c))}async readFilePromise(r,s){return this.makeCallPromise(r,async()=>await this.baseFs.readFilePromise(r,s),async(a,{subPath:n})=>await a.readFilePromise(n,s))}readFileSync(r,s){return this.makeCallSync(r,()=>this.baseFs.readFileSync(r,s),(a,{subPath:n})=>a.readFileSync(n,s))}async readdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.readdirPromise(r,s),async(a,{subPath:n})=>await a.readdirPromise(n,s),{requireSubpath:!1})}readdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.readdirSync(r,s),(a,{subPath:n})=>a.readdirSync(n,s),{requireSubpath:!1})}async readlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.readlinkPromise(r),async(s,{subPath:a})=>await s.readlinkPromise(a))}readlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.readlinkSync(r),(s,{subPath:a})=>s.readlinkSync(a))}async truncatePromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.truncatePromise(r,s),async(a,{subPath:n})=>await a.truncatePromise(n,s))}truncateSync(r,s){return this.makeCallSync(r,()=>this.baseFs.truncateSync(r,s),(a,{subPath:n})=>a.truncateSync(n,s))}async ftruncatePromise(r,s){if((r&tl)!==this.magic)return this.baseFs.ftruncatePromise(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"ftruncate\");let[n,c]=a;return n.ftruncatePromise(c,s)}ftruncateSync(r,s){if((r&tl)!==this.magic)return this.baseFs.ftruncateSync(r,s);let a=this.fdMap.get(r);if(typeof a>\"u\")throw Mo(\"ftruncateSync\");let[n,c]=a;return n.ftruncateSync(c,s)}watch(r,s,a){return this.makeCallSync(r,()=>this.baseFs.watch(r,s,a),(n,{subPath:c})=>n.watch(c,s,a))}watchFile(r,s,a){return this.makeCallSync(r,()=>this.baseFs.watchFile(r,s,a),()=>sE(this,r,s,a))}unwatchFile(r,s){return this.makeCallSync(r,()=>this.baseFs.unwatchFile(r,s),()=>md(this,r,s))}async makeCallPromise(r,s,a,{requireSubpath:n=!0}={}){if(typeof r!=\"string\")return await s();let c=this.resolve(r),f=this.findMount(c);return f?n&&f.subPath===\"/\"?await s():await this.getMountPromise(f.archivePath,async p=>await a(p,f)):await s()}makeCallSync(r,s,a,{requireSubpath:n=!0}={}){if(typeof r!=\"string\")return s();let c=this.resolve(r),f=this.findMount(c);return!f||n&&f.subPath===\"/\"?s():this.getMountSync(f.archivePath,p=>a(p,f))}findMount(r){if(this.filter&&!this.filter.test(r))return null;let s=\"\";for(;;){let a=r.substring(s.length),n=this.getMountPoint(a,s);if(!n)return null;if(s=this.pathUtils.join(s,n),!this.isMount.has(s)){if(this.notMount.has(s))continue;try{if(this.typeCheck!==null&&(this.baseFs.statSync(s).mode&wd.constants.S_IFMT)!==this.typeCheck){this.notMount.add(s);continue}}catch{return null}this.isMount.add(s)}return{archivePath:s,subPath:this.pathUtils.join(vt.root,r.substring(s.length))}}}limitOpenFiles(r){if(this.mountInstances===null)return;let s=Date.now(),a=s+this.maxAge,n=r===null?0:this.mountInstances.size-r;for(let[c,{childFs:f,expiresAt:p,refCount:h}]of this.mountInstances.entries())if(!(h!==0||f.hasOpenFileHandles?.())){if(s>=p){f.saveAndClose?.(),this.mountInstances.delete(c),n-=1;continue}else if(r===null||n<=0){a=p;break}f.saveAndClose?.(),this.mountInstances.delete(c),n-=1}this.limitOpenFilesTimeout===null&&(r===null&&this.mountInstances.size>0||r!==null)&&isFinite(a)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},a-s).unref())}async getMountPromise(r,s){if(this.mountInstances){let a=this.mountInstances.get(r);if(!a){let n=await this.factoryPromise(this.baseFs,r);a=this.mountInstances.get(r),a||(a={childFs:n(),expiresAt:0,refCount:0})}this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,a.refCount+=1;try{return await s(a.childFs)}finally{a.refCount-=1}}else{let a=(await this.factoryPromise(this.baseFs,r))();try{return await s(a)}finally{a.saveAndClose?.()}}}getMountSync(r,s){if(this.mountInstances){let a=this.mountInstances.get(r);return a||(a={childFs:this.factorySync(this.baseFs,r),expiresAt:0,refCount:0}),this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,s(a.childFs)}else{let a=this.factorySync(this.baseFs,r);try{return s(a)}finally{a.saveAndClose?.()}}}}});var er,nx,A$=Xe(()=>{Id();el();er=()=>Object.assign(new Error(\"ENOSYS: unsupported filesystem access\"),{code:\"ENOSYS\"}),nx=class t extends mp{static{this.instance=new t}constructor(){super(J)}getExtractHint(){throw er()}getRealPath(){throw er()}resolve(){throw er()}async openPromise(){throw er()}openSync(){throw er()}async opendirPromise(){throw er()}opendirSync(){throw er()}async readPromise(){throw er()}readSync(){throw er()}async writePromise(){throw er()}writeSync(){throw er()}async closePromise(){throw er()}closeSync(){throw er()}createWriteStream(){throw er()}createReadStream(){throw er()}async realpathPromise(){throw er()}realpathSync(){throw er()}async readdirPromise(){throw er()}readdirSync(){throw er()}async existsPromise(e){throw er()}existsSync(e){throw er()}async accessPromise(){throw er()}accessSync(){throw er()}async statPromise(){throw er()}statSync(){throw er()}async fstatPromise(e){throw er()}fstatSync(e){throw er()}async lstatPromise(e){throw er()}lstatSync(e){throw er()}async fchmodPromise(){throw er()}fchmodSync(){throw er()}async chmodPromise(){throw er()}chmodSync(){throw er()}async fchownPromise(){throw er()}fchownSync(){throw er()}async chownPromise(){throw er()}chownSync(){throw er()}async mkdirPromise(){throw er()}mkdirSync(){throw er()}async rmdirPromise(){throw er()}rmdirSync(){throw er()}async rmPromise(){throw er()}rmSync(){throw er()}async linkPromise(){throw er()}linkSync(){throw er()}async symlinkPromise(){throw er()}symlinkSync(){throw er()}async renamePromise(){throw er()}renameSync(){throw er()}async copyFilePromise(){throw er()}copyFileSync(){throw er()}async appendFilePromise(){throw er()}appendFileSync(){throw er()}async writeFilePromise(){throw er()}writeFileSync(){throw er()}async unlinkPromise(){throw er()}unlinkSync(){throw er()}async utimesPromise(){throw er()}utimesSync(){throw er()}async lutimesPromise(){throw er()}lutimesSync(){throw er()}async readFilePromise(){throw er()}readFileSync(){throw er()}async readlinkPromise(){throw er()}readlinkSync(){throw er()}async truncatePromise(){throw er()}truncateSync(){throw er()}async ftruncatePromise(e,r){throw er()}ftruncateSync(e,r){throw er()}watch(){throw er()}watchFile(){throw er()}unwatchFile(){throw er()}}});var t0,p$=Xe(()=>{yp();el();t0=class extends _s{constructor(e){super(fe),this.baseFs=e}mapFromBase(e){return fe.fromPortablePath(e)}mapToBase(e){return fe.toPortablePath(e)}}});var o5e,PU,a5e,uo,h$=Xe(()=>{Cd();yp();el();o5e=/^[0-9]+$/,PU=/^(\\/(?:[^/]+\\/)*?(?:\\$\\$virtual|__virtual__))((?:\\/((?:[^/]+-)?[a-f0-9]+)(?:\\/([^/]+))?)?((?:\\/.*)?))$/,a5e=/^([^/]+-)?[a-f0-9]+$/,uo=class t extends _s{static makeVirtualPath(e,r,s){if(J.basename(e)!==\"__virtual__\")throw new Error('Assertion failed: Virtual folders must be named \"__virtual__\"');if(!J.basename(r).match(a5e))throw new Error(\"Assertion failed: Virtual components must be ended by an hexadecimal hash\");let n=J.relative(J.dirname(e),s).split(\"/\"),c=0;for(;c<n.length&&n[c]===\"..\";)c+=1;let f=n.slice(c);return J.join(e,r,String(c),...f)}static resolveVirtual(e){let r=e.match(PU);if(!r||!r[3]&&r[5])return e;let s=J.dirname(r[1]);if(!r[3]||!r[4])return s;if(!o5e.test(r[4]))return e;let n=Number(r[4]),c=\"../\".repeat(n),f=r[5]||\".\";return t.resolveVirtual(J.join(s,c,f))}constructor({baseFs:e=new Yn}={}){super(J),this.baseFs=e}getExtractHint(e){return this.baseFs.getExtractHint(e)}getRealPath(){return this.baseFs.getRealPath()}realpathSync(e){let r=e.match(PU);if(!r)return this.baseFs.realpathSync(e);if(!r[5])return e;let s=this.baseFs.realpathSync(this.mapToBase(e));return t.makeVirtualPath(r[1],r[3],s)}async realpathPromise(e){let r=e.match(PU);if(!r)return await this.baseFs.realpathPromise(e);if(!r[5])return e;let s=await this.baseFs.realpathPromise(this.mapToBase(e));return t.makeVirtualPath(r[1],r[3],s)}mapToBase(e){if(e===\"\")return e;if(this.pathUtils.isAbsolute(e))return t.resolveVirtual(e);let r=t.resolveVirtual(this.baseFs.resolve(vt.dot)),s=t.resolveVirtual(this.baseFs.resolve(e));return J.relative(r,s)||vt.dot}mapFromBase(e){return e}}});function l5e(t,e){return typeof xU.default.isUtf8<\"u\"?xU.default.isUtf8(t):Buffer.byteLength(e)===t.byteLength}var xU,g$,d$,ix,m$=Xe(()=>{xU=ut(Ie(\"buffer\")),g$=Ie(\"url\"),d$=Ie(\"util\");yp();el();ix=class extends _s{constructor(e){super(fe),this.baseFs=e}mapFromBase(e){return e}mapToBase(e){if(typeof e==\"string\")return e;if(e instanceof URL)return(0,g$.fileURLToPath)(e);if(Buffer.isBuffer(e)){let r=e.toString();if(!l5e(e,r))throw new Error(\"Non-utf8 buffers are not supported at the moment. Please upvote the following issue if you encounter this error: https://github.com/yarnpkg/berry/issues/4942\");return r}throw new Error(`Unsupported path type: ${(0,d$.inspect)(e)}`)}}});var w$,Uo,Ep,r0,sx,ox,aE,Ru,Fu,y$,E$,I$,C$,M2,B$=Xe(()=>{w$=Ie(\"readline\"),Uo=Symbol(\"kBaseFs\"),Ep=Symbol(\"kFd\"),r0=Symbol(\"kClosePromise\"),sx=Symbol(\"kCloseResolve\"),ox=Symbol(\"kCloseReject\"),aE=Symbol(\"kRefs\"),Ru=Symbol(\"kRef\"),Fu=Symbol(\"kUnref\"),M2=class{constructor(e,r){this[C$]=1;this[I$]=void 0;this[E$]=void 0;this[y$]=void 0;this[Uo]=r,this[Ep]=e}get fd(){return this[Ep]}async appendFile(e,r){try{this[Ru](this.appendFile);let s=(typeof r==\"string\"?r:r?.encoding)??void 0;return await this[Uo].appendFilePromise(this.fd,e,s?{encoding:s}:void 0)}finally{this[Fu]()}}async chown(e,r){try{return this[Ru](this.chown),await this[Uo].fchownPromise(this.fd,e,r)}finally{this[Fu]()}}async chmod(e){try{return this[Ru](this.chmod),await this[Uo].fchmodPromise(this.fd,e)}finally{this[Fu]()}}createReadStream(e){return this[Uo].createReadStream(null,{...e,fd:this.fd})}createWriteStream(e){return this[Uo].createWriteStream(null,{...e,fd:this.fd})}datasync(){throw new Error(\"Method not implemented.\")}sync(){throw new Error(\"Method not implemented.\")}async read(e,r,s,a){try{this[Ru](this.read);let n,c;return ArrayBuffer.isView(e)?typeof r==\"object\"&&r!==null?(n=e,c=r?.offset??0,s=r?.length??n.byteLength-c,a=r?.position??null):(n=e,c=r??0,s??=0):(n=e?.buffer??Buffer.alloc(16384),c=e?.offset??0,s=e?.length??n.byteLength-c,a=e?.position??null),s===0?{bytesRead:s,buffer:n}:{bytesRead:await this[Uo].readPromise(this.fd,Buffer.isBuffer(n)?n:Buffer.from(n.buffer,n.byteOffset,n.byteLength),c,s,a),buffer:n}}finally{this[Fu]()}}async readFile(e){try{this[Ru](this.readFile);let r=(typeof e==\"string\"?e:e?.encoding)??void 0;return await this[Uo].readFilePromise(this.fd,r)}finally{this[Fu]()}}readLines(e){return(0,w$.createInterface)({input:this.createReadStream(e),crlfDelay:1/0})}async stat(e){try{return this[Ru](this.stat),await this[Uo].fstatPromise(this.fd,e)}finally{this[Fu]()}}async truncate(e){try{return this[Ru](this.truncate),await this[Uo].ftruncatePromise(this.fd,e)}finally{this[Fu]()}}utimes(e,r){throw new Error(\"Method not implemented.\")}async writeFile(e,r){try{this[Ru](this.writeFile);let s=(typeof r==\"string\"?r:r?.encoding)??void 0;await this[Uo].writeFilePromise(this.fd,e,s)}finally{this[Fu]()}}async write(...e){try{if(this[Ru](this.write),ArrayBuffer.isView(e[0])){let[r,s,a,n]=e;return{bytesWritten:await this[Uo].writePromise(this.fd,r,s??void 0,a??void 0,n??void 0),buffer:r}}else{let[r,s,a]=e;return{bytesWritten:await this[Uo].writePromise(this.fd,r,s,a),buffer:r}}}finally{this[Fu]()}}async writev(e,r){try{this[Ru](this.writev);let s=0;if(typeof r<\"u\")for(let a of e){let n=await this.write(a,void 0,void 0,r);s+=n.bytesWritten,r+=n.bytesWritten}else for(let a of e){let n=await this.write(a);s+=n.bytesWritten}return{buffers:e,bytesWritten:s}}finally{this[Fu]()}}readv(e,r){throw new Error(\"Method not implemented.\")}close(){if(this[Ep]===-1)return Promise.resolve();if(this[r0])return this[r0];if(this[aE]--,this[aE]===0){let e=this[Ep];this[Ep]=-1,this[r0]=this[Uo].closePromise(e).finally(()=>{this[r0]=void 0})}else this[r0]=new Promise((e,r)=>{this[sx]=e,this[ox]=r}).finally(()=>{this[r0]=void 0,this[ox]=void 0,this[sx]=void 0});return this[r0]}[(Uo,Ep,C$=aE,I$=r0,E$=sx,y$=ox,Ru)](e){if(this[Ep]===-1){let r=new Error(\"file closed\");throw r.code=\"EBADF\",r.syscall=e.name,r}this[aE]++}[Fu](){if(this[aE]--,this[aE]===0){let e=this[Ep];this[Ep]=-1,this[Uo].closePromise(e).then(this[sx],this[ox])}}}});function U2(t,e){e=new ix(e);let r=(s,a,n)=>{let c=s[a];s[a]=n,typeof c?.[lE.promisify.custom]<\"u\"&&(n[lE.promisify.custom]=c[lE.promisify.custom])};{r(t,\"exists\",(s,...a)=>{let c=typeof a[a.length-1]==\"function\"?a.pop():()=>{};process.nextTick(()=>{e.existsPromise(s).then(f=>{c(f)},()=>{c(!1)})})}),r(t,\"read\",(...s)=>{let[a,n,c,f,p,h]=s;if(s.length<=3){let E={};s.length<3?h=s[1]:(E=s[1],h=s[2]),{buffer:n=Buffer.alloc(16384),offset:c=0,length:f=n.byteLength,position:p}=E}if(c==null&&(c=0),f|=0,f===0){process.nextTick(()=>{h(null,0,n)});return}p==null&&(p=-1),process.nextTick(()=>{e.readPromise(a,n,c,f,p).then(E=>{h(null,E,n)},E=>{h(E,0,n)})})});for(let s of v$){let a=s.replace(/Promise$/,\"\");if(typeof t[a]>\"u\")continue;let n=e[s];if(typeof n>\"u\")continue;r(t,a,(...f)=>{let h=typeof f[f.length-1]==\"function\"?f.pop():()=>{};process.nextTick(()=>{n.apply(e,f).then(E=>{h(null,E)},E=>{h(E)})})})}t.realpath.native=t.realpath}{r(t,\"existsSync\",s=>{try{return e.existsSync(s)}catch{return!1}}),r(t,\"readSync\",(...s)=>{let[a,n,c,f,p]=s;return s.length<=3&&({offset:c=0,length:f=n.byteLength,position:p}=s[2]||{}),c==null&&(c=0),f|=0,f===0?0:(p==null&&(p=-1),e.readSync(a,n,c,f,p))});for(let s of c5e){let a=s;if(typeof t[a]>\"u\")continue;let n=e[s];typeof n>\"u\"||r(t,a,n.bind(e))}t.realpathSync.native=t.realpathSync}{let s=t.promises;for(let a of v$){let n=a.replace(/Promise$/,\"\");if(typeof s[n]>\"u\")continue;let c=e[a];typeof c>\"u\"||a!==\"open\"&&r(s,n,(f,...p)=>f instanceof M2?f[n].apply(f,p):c.call(e,f,...p))}r(s,\"open\",async(...a)=>{let n=await e.openPromise(...a);return new M2(n,e)})}t.read[lE.promisify.custom]=async(s,a,...n)=>({bytesRead:await e.readPromise(s,a,...n),buffer:a}),t.write[lE.promisify.custom]=async(s,a,...n)=>({bytesWritten:await e.writePromise(s,a,...n),buffer:a})}function ax(t,e){let r=Object.create(t);return U2(r,e),r}var lE,c5e,v$,S$=Xe(()=>{lE=Ie(\"util\");m$();B$();c5e=new Set([\"accessSync\",\"appendFileSync\",\"createReadStream\",\"createWriteStream\",\"chmodSync\",\"fchmodSync\",\"chownSync\",\"fchownSync\",\"closeSync\",\"copyFileSync\",\"linkSync\",\"lstatSync\",\"fstatSync\",\"lutimesSync\",\"mkdirSync\",\"openSync\",\"opendirSync\",\"readlinkSync\",\"readFileSync\",\"readdirSync\",\"readlinkSync\",\"realpathSync\",\"renameSync\",\"rmdirSync\",\"rmSync\",\"statSync\",\"symlinkSync\",\"truncateSync\",\"ftruncateSync\",\"unlinkSync\",\"unwatchFile\",\"utimesSync\",\"watch\",\"watchFile\",\"writeFileSync\",\"writeSync\"]),v$=new Set([\"accessPromise\",\"appendFilePromise\",\"fchmodPromise\",\"chmodPromise\",\"fchownPromise\",\"chownPromise\",\"closePromise\",\"copyFilePromise\",\"linkPromise\",\"fstatPromise\",\"lstatPromise\",\"lutimesPromise\",\"mkdirPromise\",\"openPromise\",\"opendirPromise\",\"readdirPromise\",\"realpathPromise\",\"readFilePromise\",\"readdirPromise\",\"readlinkPromise\",\"renamePromise\",\"rmdirPromise\",\"rmPromise\",\"statPromise\",\"symlinkPromise\",\"truncatePromise\",\"ftruncatePromise\",\"unlinkPromise\",\"utimesPromise\",\"writeFilePromise\",\"writeSync\"])});function D$(t){let e=Math.ceil(Math.random()*4294967296).toString(16).padStart(8,\"0\");return`${t}${e}`}function b$(){if(kU)return kU;let t=fe.toPortablePath(P$.default.tmpdir()),e=ce.realpathSync(t);return process.once(\"exit\",()=>{ce.rmtempSync()}),kU={tmpdir:t,realTmpdir:e}}var P$,Nu,kU,ce,x$=Xe(()=>{P$=ut(Ie(\"os\"));Cd();el();Nu=new Set,kU=null;ce=Object.assign(new Yn,{detachTemp(t){Nu.delete(t)},mktempSync(t){let{tmpdir:e,realTmpdir:r}=b$();for(;;){let s=D$(\"xfs-\");try{this.mkdirSync(J.join(e,s))}catch(n){if(n.code===\"EEXIST\")continue;throw n}let a=J.join(r,s);if(Nu.add(a),typeof t>\"u\")return a;try{return t(a)}finally{if(Nu.has(a)){Nu.delete(a);try{this.removeSync(a)}catch{}}}}},async mktempPromise(t){let{tmpdir:e,realTmpdir:r}=b$();for(;;){let s=D$(\"xfs-\");try{await this.mkdirPromise(J.join(e,s))}catch(n){if(n.code===\"EEXIST\")continue;throw n}let a=J.join(r,s);if(Nu.add(a),typeof t>\"u\")return a;try{return await t(a)}finally{if(Nu.has(a)){Nu.delete(a);try{await this.removePromise(a)}catch{}}}}},async rmtempPromise(){await Promise.all(Array.from(Nu.values()).map(async t=>{try{await ce.removePromise(t,{maxRetries:0}),Nu.delete(t)}catch{}}))},rmtempSync(){for(let t of Nu)try{ce.removeSync(t),Nu.delete(t)}catch{}}})});var _2={};Vt(_2,{AliasFS:()=>_f,BasePortableFakeFS:()=>Uf,CustomDir:()=>L2,CwdFS:()=>Sn,FakeFS:()=>mp,Filename:()=>Er,JailFS:()=>Hf,LazyFS:()=>oE,MountFS:()=>e0,NoFS:()=>nx,NodeFS:()=>Yn,PortablePath:()=>vt,PosixFS:()=>t0,ProxiedFS:()=>_s,VirtualFS:()=>uo,constants:()=>fi,errors:()=>or,extendFs:()=>ax,normalizeLineEndings:()=>Ed,npath:()=>fe,opendir:()=>ex,patchFs:()=>U2,ppath:()=>J,setupCopyIndex:()=>$P,statUtils:()=>$a,unwatchAllFiles:()=>yd,unwatchFile:()=>md,watchFile:()=>sE,xfs:()=>ce});var Dt=Xe(()=>{YZ();zP();BU();DU();ZZ();bU();Id();el();el();i$();Id();a$();c$();u$();f$();A$();Cd();p$();yp();h$();S$();x$()});var F$=_((Dkt,R$)=>{R$.exports=T$;T$.sync=f5e;var k$=Ie(\"fs\");function u5e(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(\";\"),r.indexOf(\"\")!==-1))return!0;for(var s=0;s<r.length;s++){var a=r[s].toLowerCase();if(a&&t.substr(-a.length).toLowerCase()===a)return!0}return!1}function Q$(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:u5e(e,r)}function T$(t,e,r){k$.stat(t,function(s,a){r(s,s?!1:Q$(a,t,e))})}function f5e(t,e){return Q$(k$.statSync(t),t,e)}});var U$=_((bkt,M$)=>{M$.exports=O$;O$.sync=A5e;var N$=Ie(\"fs\");function O$(t,e,r){N$.stat(t,function(s,a){r(s,s?!1:L$(a,e))})}function A5e(t,e){return L$(N$.statSync(t),e)}function L$(t,e){return t.isFile()&&p5e(t,e)}function p5e(t,e){var r=t.mode,s=t.uid,a=t.gid,n=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),c=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),f=parseInt(\"100\",8),p=parseInt(\"010\",8),h=parseInt(\"001\",8),E=f|p,C=r&h||r&p&&a===c||r&f&&s===n||r&E&&n===0;return C}});var H$=_((xkt,_$)=>{var Pkt=Ie(\"fs\"),lx;process.platform===\"win32\"||global.TESTING_WINDOWS?lx=F$():lx=U$();_$.exports=QU;QU.sync=h5e;function QU(t,e,r){if(typeof e==\"function\"&&(r=e,e={}),!r){if(typeof Promise!=\"function\")throw new TypeError(\"callback not provided\");return new Promise(function(s,a){QU(t,e||{},function(n,c){n?a(n):s(c)})})}lx(t,e||{},function(s,a){s&&(s.code===\"EACCES\"||e&&e.ignoreErrors)&&(s=null,a=!1),r(s,a)})}function h5e(t,e){try{return lx.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code===\"EACCES\")return!1;throw r}}});var J$=_((kkt,V$)=>{var cE=process.platform===\"win32\"||process.env.OSTYPE===\"cygwin\"||process.env.OSTYPE===\"msys\",j$=Ie(\"path\"),g5e=cE?\";\":\":\",G$=H$(),q$=t=>Object.assign(new Error(`not found: ${t}`),{code:\"ENOENT\"}),W$=(t,e)=>{let r=e.colon||g5e,s=t.match(/\\//)||cE&&t.match(/\\\\/)?[\"\"]:[...cE?[process.cwd()]:[],...(e.path||process.env.PATH||\"\").split(r)],a=cE?e.pathExt||process.env.PATHEXT||\".EXE;.CMD;.BAT;.COM\":\"\",n=cE?a.split(r):[\"\"];return cE&&t.indexOf(\".\")!==-1&&n[0]!==\"\"&&n.unshift(\"\"),{pathEnv:s,pathExt:n,pathExtExe:a}},Y$=(t,e,r)=>{typeof e==\"function\"&&(r=e,e={}),e||(e={});let{pathEnv:s,pathExt:a,pathExtExe:n}=W$(t,e),c=[],f=h=>new Promise((E,C)=>{if(h===s.length)return e.all&&c.length?E(c):C(q$(t));let S=s[h],P=/^\".*\"$/.test(S)?S.slice(1,-1):S,I=j$.join(P,t),R=!P&&/^\\.[\\\\\\/]/.test(t)?t.slice(0,2)+I:I;E(p(R,h,0))}),p=(h,E,C)=>new Promise((S,P)=>{if(C===a.length)return S(f(E+1));let I=a[C];G$(h+I,{pathExt:n},(R,N)=>{if(!R&&N)if(e.all)c.push(h+I);else return S(h+I);return S(p(h,E,C+1))})});return r?f(0).then(h=>r(null,h),r):f(0)},d5e=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:s,pathExtExe:a}=W$(t,e),n=[];for(let c=0;c<r.length;c++){let f=r[c],p=/^\".*\"$/.test(f)?f.slice(1,-1):f,h=j$.join(p,t),E=!p&&/^\\.[\\\\\\/]/.test(t)?t.slice(0,2)+h:h;for(let C=0;C<s.length;C++){let S=E+s[C];try{if(G$.sync(S,{pathExt:a}))if(e.all)n.push(S);else return S}catch{}}}if(e.all&&n.length)return n;if(e.nothrow)return null;throw q$(t)};V$.exports=Y$;Y$.sync=d5e});var z$=_((Qkt,TU)=>{\"use strict\";var K$=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!==\"win32\"?\"PATH\":Object.keys(e).reverse().find(s=>s.toUpperCase()===\"PATH\")||\"Path\"};TU.exports=K$;TU.exports.default=K$});var eee=_((Tkt,$$)=>{\"use strict\";var X$=Ie(\"path\"),m5e=J$(),y5e=z$();function Z$(t,e){let r=t.options.env||process.env,s=process.cwd(),a=t.options.cwd!=null,n=a&&process.chdir!==void 0&&!process.chdir.disabled;if(n)try{process.chdir(t.options.cwd)}catch{}let c;try{c=m5e.sync(t.command,{path:r[y5e({env:r})],pathExt:e?X$.delimiter:void 0})}catch{}finally{n&&process.chdir(s)}return c&&(c=X$.resolve(a?t.options.cwd:\"\",c)),c}function E5e(t){return Z$(t)||Z$(t,!0)}$$.exports=E5e});var tee=_((Rkt,FU)=>{\"use strict\";var RU=/([()\\][%!^\"`<>&|;, *?])/g;function I5e(t){return t=t.replace(RU,\"^$1\"),t}function C5e(t,e){return t=`${t}`,t=t.replace(/(?=(\\\\+?)?)\\1\"/g,'$1$1\\\\\"'),t=t.replace(/(?=(\\\\+?)?)\\1$/,\"$1$1\"),t=`\"${t}\"`,t=t.replace(RU,\"^$1\"),e&&(t=t.replace(RU,\"^$1\")),t}FU.exports.command=I5e;FU.exports.argument=C5e});var nee=_((Fkt,ree)=>{\"use strict\";ree.exports=/^#!(.*)/});var see=_((Nkt,iee)=>{\"use strict\";var w5e=nee();iee.exports=(t=\"\")=>{let e=t.match(w5e);if(!e)return null;let[r,s]=e[0].replace(/#! ?/,\"\").split(\" \"),a=r.split(\"/\").pop();return a===\"env\"?s:s?`${a} ${s}`:a}});var aee=_((Okt,oee)=>{\"use strict\";var NU=Ie(\"fs\"),B5e=see();function v5e(t){let r=Buffer.alloc(150),s;try{s=NU.openSync(t,\"r\"),NU.readSync(s,r,0,150,0),NU.closeSync(s)}catch{}return B5e(r.toString())}oee.exports=v5e});var fee=_((Lkt,uee)=>{\"use strict\";var S5e=Ie(\"path\"),lee=eee(),cee=tee(),D5e=aee(),b5e=process.platform===\"win32\",P5e=/\\.(?:com|exe)$/i,x5e=/node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;function k5e(t){t.file=lee(t);let e=t.file&&D5e(t.file);return e?(t.args.unshift(t.file),t.command=e,lee(t)):t.file}function Q5e(t){if(!b5e)return t;let e=k5e(t),r=!P5e.test(e);if(t.options.forceShell||r){let s=x5e.test(e);t.command=S5e.normalize(t.command),t.command=cee.command(t.command),t.args=t.args.map(n=>cee.argument(n,s));let a=[t.command].concat(t.args).join(\" \");t.args=[\"/d\",\"/s\",\"/c\",`\"${a}\"`],t.command=process.env.comspec||\"cmd.exe\",t.options.windowsVerbatimArguments=!0}return t}function T5e(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let s={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?s:Q5e(s)}uee.exports=T5e});var hee=_((Mkt,pee)=>{\"use strict\";var OU=process.platform===\"win32\";function LU(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:\"ENOENT\",errno:\"ENOENT\",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function R5e(t,e){if(!OU)return;let r=t.emit;t.emit=function(s,a){if(s===\"exit\"){let n=Aee(a,e);if(n)return r.call(t,\"error\",n)}return r.apply(t,arguments)}}function Aee(t,e){return OU&&t===1&&!e.file?LU(e.original,\"spawn\"):null}function F5e(t,e){return OU&&t===1&&!e.file?LU(e.original,\"spawnSync\"):null}pee.exports={hookChildProcess:R5e,verifyENOENT:Aee,verifyENOENTSync:F5e,notFoundError:LU}});var _U=_((Ukt,uE)=>{\"use strict\";var gee=Ie(\"child_process\"),MU=fee(),UU=hee();function dee(t,e,r){let s=MU(t,e,r),a=gee.spawn(s.command,s.args,s.options);return UU.hookChildProcess(a,s),a}function N5e(t,e,r){let s=MU(t,e,r),a=gee.spawnSync(s.command,s.args,s.options);return a.error=a.error||UU.verifyENOENTSync(a.status,s),a}uE.exports=dee;uE.exports.spawn=dee;uE.exports.sync=N5e;uE.exports._parse=MU;uE.exports._enoent=UU});var yee=_((_kt,mee)=>{\"use strict\";function O5e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Bd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,Bd)}O5e(Bd,Error);Bd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function L5e(t,e){e=e!==void 0?e:{};var r={},s={Start:Wa},a=Wa,n=function(O){return O||[]},c=function(O,K,re){return[{command:O,type:K}].concat(re||[])},f=function(O,K){return[{command:O,type:K||\";\"}]},p=function(O){return O},h=\";\",E=ur(\";\",!1),C=\"&\",S=ur(\"&\",!1),P=function(O,K){return K?{chain:O,then:K}:{chain:O}},I=function(O,K){return{type:O,line:K}},R=\"&&\",N=ur(\"&&\",!1),U=\"||\",W=ur(\"||\",!1),ee=function(O,K){return K?{...O,then:K}:O},ie=function(O,K){return{type:O,chain:K}},ue=\"|&\",le=ur(\"|&\",!1),me=\"|\",pe=ur(\"|\",!1),Be=\"=\",Ce=ur(\"=\",!1),g=function(O,K){return{name:O,args:[K]}},we=function(O){return{name:O,args:[]}},ye=\"(\",Ae=ur(\"(\",!1),se=\")\",Z=ur(\")\",!1),De=function(O,K){return{type:\"subshell\",subshell:O,args:K}},Re=\"{\",mt=ur(\"{\",!1),j=\"}\",rt=ur(\"}\",!1),Fe=function(O,K){return{type:\"group\",group:O,args:K}},Ne=function(O,K){return{type:\"command\",args:K,envs:O}},Pe=function(O){return{type:\"envs\",envs:O}},Ve=function(O){return O},ke=function(O){return O},it=/^[0-9]/,Ue=zi([[\"0\",\"9\"]],!1,!1),x=function(O,K,re){return{type:\"redirection\",subtype:K,fd:O!==null?parseInt(O):null,args:[re]}},w=\">>\",b=ur(\">>\",!1),y=\">&\",F=ur(\">&\",!1),z=\">\",X=ur(\">\",!1),$=\"<<<\",oe=ur(\"<<<\",!1),xe=\"<&\",Te=ur(\"<&\",!1),lt=\"<\",Ct=ur(\"<\",!1),qt=function(O){return{type:\"argument\",segments:[].concat(...O)}},ir=function(O){return O},Pt=\"$'\",gn=ur(\"$'\",!1),Pr=\"'\",Ir=ur(\"'\",!1),Or=function(O){return[{type:\"text\",text:O}]},on='\"\"',ai=ur('\"\"',!1),Io=function(){return{type:\"text\",text:\"\"}},rs='\"',$s=ur('\"',!1),Co=function(O){return O},ji=function(O){return{type:\"arithmetic\",arithmetic:O,quoted:!0}},eo=function(O){return{type:\"shell\",shell:O,quoted:!0}},wo=function(O){return{type:\"variable\",...O,quoted:!0}},QA=function(O){return{type:\"text\",text:O}},Af=function(O){return{type:\"arithmetic\",arithmetic:O,quoted:!1}},dh=function(O){return{type:\"shell\",shell:O,quoted:!1}},mh=function(O){return{type:\"variable\",...O,quoted:!1}},to=function(O){return{type:\"glob\",pattern:O}},jn=/^[^']/,Ts=zi([\"'\"],!0,!1),ro=function(O){return O.join(\"\")},ou=/^[^$\"]/,au=zi([\"$\",'\"'],!0,!1),lu=`\\\\\n`,TA=ur(`\\\\\n`,!1),RA=function(){return\"\"},oa=\"\\\\\",aa=ur(\"\\\\\",!1),FA=/^[\\\\$\"`]/,gr=zi([\"\\\\\",\"$\",'\"',\"`\"],!1,!1),Bo=function(O){return O},Me=\"\\\\a\",cu=ur(\"\\\\a\",!1),Cr=function(){return\"a\"},pf=\"\\\\b\",NA=ur(\"\\\\b\",!1),OA=function(){return\"\\b\"},uu=/^[Ee]/,fu=zi([\"E\",\"e\"],!1,!1),oc=function(){return\"\\x1B\"},ve=\"\\\\f\",Nt=ur(\"\\\\f\",!1),ac=function(){return\"\\f\"},Oi=\"\\\\n\",no=ur(\"\\\\n\",!1),Rt=function(){return`\n`},xn=\"\\\\r\",la=ur(\"\\\\r\",!1),Gi=function(){return\"\\r\"},Li=\"\\\\t\",Na=ur(\"\\\\t\",!1),dn=function(){return\"\t\"},Kn=\"\\\\v\",Au=ur(\"\\\\v\",!1),yh=function(){return\"\\v\"},Oa=/^[\\\\'\"?]/,La=zi([\"\\\\\",\"'\",'\"',\"?\"],!1,!1),Ma=function(O){return String.fromCharCode(parseInt(O,16))},$e=\"\\\\x\",Ua=ur(\"\\\\x\",!1),hf=\"\\\\u\",lc=ur(\"\\\\u\",!1),wn=\"\\\\U\",ca=ur(\"\\\\U\",!1),LA=function(O){return String.fromCodePoint(parseInt(O,16))},MA=/^[0-7]/,ua=zi([[\"0\",\"7\"]],!1,!1),Bl=/^[0-9a-fA-f]/,Mt=zi([[\"0\",\"9\"],[\"a\",\"f\"],[\"A\",\"f\"]],!1,!1),kn=yf(),fa=\"{}\",Ha=ur(\"{}\",!1),ns=function(){return\"{}\"},cc=\"-\",pu=ur(\"-\",!1),uc=\"+\",ja=ur(\"+\",!1),Mi=\".\",Is=ur(\".\",!1),vl=function(O,K,re){return{type:\"number\",value:(O===\"-\"?-1:1)*parseFloat(K.join(\"\")+\".\"+re.join(\"\"))}},gf=function(O,K){return{type:\"number\",value:(O===\"-\"?-1:1)*parseInt(K.join(\"\"))}},fc=function(O){return{type:\"variable\",...O}},wi=function(O){return{type:\"variable\",name:O}},Qn=function(O){return O},Ac=\"*\",Ke=ur(\"*\",!1),st=\"/\",St=ur(\"/\",!1),lr=function(O,K,re){return{type:K===\"*\"?\"multiplication\":\"division\",right:re}},te=function(O,K){return K.reduce((re,de)=>({left:re,...de}),O)},Ee=function(O,K,re){return{type:K===\"+\"?\"addition\":\"subtraction\",right:re}},Oe=\"$((\",dt=ur(\"$((\",!1),Et=\"))\",bt=ur(\"))\",!1),tr=function(O){return O},An=\"$(\",li=ur(\"$(\",!1),qi=function(O){return O},Tn=\"${\",Ga=ur(\"${\",!1),my=\":-\",Z1=ur(\":-\",!1),vo=function(O,K){return{name:O,defaultValue:K}},yy=\":-}\",Eh=ur(\":-}\",!1),$1=function(O){return{name:O,defaultValue:[]}},So=\":+\",Ih=ur(\":+\",!1),Ch=function(O,K){return{name:O,alternativeValue:K}},hu=\":+}\",wh=ur(\":+}\",!1),Fg=function(O){return{name:O,alternativeValue:[]}},Ng=function(O){return{name:O}},Og=\"$\",Ey=ur(\"$\",!1),df=function(O){return e.isGlobPattern(O)},Do=function(O){return O},Sl=/^[a-zA-Z0-9_]/,Bh=zi([[\"a\",\"z\"],[\"A\",\"Z\"],[\"0\",\"9\"],\"_\"],!1,!1),Lg=function(){return By()},Dl=/^[$@*?#a-zA-Z0-9_\\-]/,bl=zi([\"$\",\"@\",\"*\",\"?\",\"#\",[\"a\",\"z\"],[\"A\",\"Z\"],[\"0\",\"9\"],\"_\",\"-\"],!1,!1),Iy=/^[()}<>$|&; \\t\"']/,UA=zi([\"(\",\")\",\"}\",\"<\",\">\",\"$\",\"|\",\"&\",\";\",\" \",\"\t\",'\"',\"'\"],!1,!1),Cy=/^[<>&; \\t\"']/,wy=zi([\"<\",\">\",\"&\",\";\",\" \",\"\t\",'\"',\"'\"],!1,!1),_A=/^[ \\t]/,HA=zi([\" \",\"\t\"],!1,!1),Y=0,xt=0,jA=[{line:1,column:1}],bo=0,mf=[],yt=0,gu;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function By(){return t.substring(xt,Y)}function Mg(){return Ef(xt,Y)}function e2(O,K){throw K=K!==void 0?K:Ef(xt,Y),GA([Ug(O)],t.substring(xt,Y),K)}function vh(O,K){throw K=K!==void 0?K:Ef(xt,Y),di(O,K)}function ur(O,K){return{type:\"literal\",text:O,ignoreCase:K}}function zi(O,K,re){return{type:\"class\",parts:O,inverted:K,ignoreCase:re}}function yf(){return{type:\"any\"}}function qa(){return{type:\"end\"}}function Ug(O){return{type:\"other\",description:O}}function du(O){var K=jA[O],re;if(K)return K;for(re=O-1;!jA[re];)re--;for(K=jA[re],K={line:K.line,column:K.column};re<O;)t.charCodeAt(re)===10?(K.line++,K.column=1):K.column++,re++;return jA[O]=K,K}function Ef(O,K){var re=du(O),de=du(K);return{start:{offset:O,line:re.line,column:re.column},end:{offset:K,line:de.line,column:de.column}}}function wt(O){Y<bo||(Y>bo&&(bo=Y,mf=[]),mf.push(O))}function di(O,K){return new Bd(O,null,null,K)}function GA(O,K,re){return new Bd(Bd.buildMessage(O,K),O,K,re)}function Wa(){var O,K,re;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();return K!==r?(re=Aa(),re===r&&(re=null),re!==r?(xt=O,K=n(re),O=K):(Y=O,O=r)):(Y=O,O=r),O}function Aa(){var O,K,re,de,Je;if(O=Y,K=Sh(),K!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=_g(),de!==r?(Je=Ya(),Je===r&&(Je=null),Je!==r?(xt=O,K=c(K,de,Je),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;if(O===r)if(O=Y,K=Sh(),K!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=_g(),de===r&&(de=null),de!==r?(xt=O,K=f(K,de),O=K):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;return O}function Ya(){var O,K,re,de,Je;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=Aa(),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();de!==r?(xt=O,K=p(re),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;return O}function _g(){var O;return t.charCodeAt(Y)===59?(O=h,Y++):(O=r,yt===0&&wt(E)),O===r&&(t.charCodeAt(Y)===38?(O=C,Y++):(O=r,yt===0&&wt(S))),O}function Sh(){var O,K,re;return O=Y,K=qA(),K!==r?(re=Hg(),re===r&&(re=null),re!==r?(xt=O,K=P(K,re),O=K):(Y=O,O=r)):(Y=O,O=r),O}function Hg(){var O,K,re,de,Je,At,dr;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=vy(),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();if(de!==r)if(Je=Sh(),Je!==r){for(At=[],dr=kt();dr!==r;)At.push(dr),dr=kt();At!==r?(xt=O,K=I(re,Je),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;return O}function vy(){var O;return t.substr(Y,2)===R?(O=R,Y+=2):(O=r,yt===0&&wt(N)),O===r&&(t.substr(Y,2)===U?(O=U,Y+=2):(O=r,yt===0&&wt(W))),O}function qA(){var O,K,re;return O=Y,K=If(),K!==r?(re=jg(),re===r&&(re=null),re!==r?(xt=O,K=ee(K,re),O=K):(Y=O,O=r)):(Y=O,O=r),O}function jg(){var O,K,re,de,Je,At,dr;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=mu(),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();if(de!==r)if(Je=qA(),Je!==r){for(At=[],dr=kt();dr!==r;)At.push(dr),dr=kt();At!==r?(xt=O,K=ie(re,Je),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;return O}function mu(){var O;return t.substr(Y,2)===ue?(O=ue,Y+=2):(O=r,yt===0&&wt(le)),O===r&&(t.charCodeAt(Y)===124?(O=me,Y++):(O=r,yt===0&&wt(pe))),O}function yu(){var O,K,re,de,Je,At;if(O=Y,K=Ph(),K!==r)if(t.charCodeAt(Y)===61?(re=Be,Y++):(re=r,yt===0&&wt(Ce)),re!==r)if(de=WA(),de!==r){for(Je=[],At=kt();At!==r;)Je.push(At),At=kt();Je!==r?(xt=O,K=g(K,de),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;else Y=O,O=r;if(O===r)if(O=Y,K=Ph(),K!==r)if(t.charCodeAt(Y)===61?(re=Be,Y++):(re=r,yt===0&&wt(Ce)),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();de!==r?(xt=O,K=we(K),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;return O}function If(){var O,K,re,de,Je,At,dr,vr,Un,mi,Cs;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(t.charCodeAt(Y)===40?(re=ye,Y++):(re=r,yt===0&&wt(Ae)),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();if(de!==r)if(Je=Aa(),Je!==r){for(At=[],dr=kt();dr!==r;)At.push(dr),dr=kt();if(At!==r)if(t.charCodeAt(Y)===41?(dr=se,Y++):(dr=r,yt===0&&wt(Z)),dr!==r){for(vr=[],Un=kt();Un!==r;)vr.push(Un),Un=kt();if(vr!==r){for(Un=[],mi=Gn();mi!==r;)Un.push(mi),mi=Gn();if(Un!==r){for(mi=[],Cs=kt();Cs!==r;)mi.push(Cs),Cs=kt();mi!==r?(xt=O,K=De(Je,Un),O=K):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;if(O===r){for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(t.charCodeAt(Y)===123?(re=Re,Y++):(re=r,yt===0&&wt(mt)),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();if(de!==r)if(Je=Aa(),Je!==r){for(At=[],dr=kt();dr!==r;)At.push(dr),dr=kt();if(At!==r)if(t.charCodeAt(Y)===125?(dr=j,Y++):(dr=r,yt===0&&wt(rt)),dr!==r){for(vr=[],Un=kt();Un!==r;)vr.push(Un),Un=kt();if(vr!==r){for(Un=[],mi=Gn();mi!==r;)Un.push(mi),mi=Gn();if(Un!==r){for(mi=[],Cs=kt();Cs!==r;)mi.push(Cs),Cs=kt();mi!==r?(xt=O,K=Fe(Je,Un),O=K):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;if(O===r){for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r){for(re=[],de=yu();de!==r;)re.push(de),de=yu();if(re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();if(de!==r){if(Je=[],At=Eu(),At!==r)for(;At!==r;)Je.push(At),At=Eu();else Je=r;if(Je!==r){for(At=[],dr=kt();dr!==r;)At.push(dr),dr=kt();At!==r?(xt=O,K=Ne(re,Je),O=K):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;if(O===r){for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r){if(re=[],de=yu(),de!==r)for(;de!==r;)re.push(de),de=yu();else re=r;if(re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();de!==r?(xt=O,K=Pe(re),O=K):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}}}return O}function Rs(){var O,K,re,de,Je;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r){if(re=[],de=Pi(),de!==r)for(;de!==r;)re.push(de),de=Pi();else re=r;if(re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();de!==r?(xt=O,K=Ve(re),O=K):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r;return O}function Eu(){var O,K,re;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r?(re=Gn(),re!==r?(xt=O,K=ke(re),O=K):(Y=O,O=r)):(Y=O,O=r),O===r){for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();K!==r?(re=Pi(),re!==r?(xt=O,K=ke(re),O=K):(Y=O,O=r)):(Y=O,O=r)}return O}function Gn(){var O,K,re,de,Je;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();return K!==r?(it.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Ue)),re===r&&(re=null),re!==r?(de=is(),de!==r?(Je=Pi(),Je!==r?(xt=O,K=x(re,de,Je),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function is(){var O;return t.substr(Y,2)===w?(O=w,Y+=2):(O=r,yt===0&&wt(b)),O===r&&(t.substr(Y,2)===y?(O=y,Y+=2):(O=r,yt===0&&wt(F)),O===r&&(t.charCodeAt(Y)===62?(O=z,Y++):(O=r,yt===0&&wt(X)),O===r&&(t.substr(Y,3)===$?(O=$,Y+=3):(O=r,yt===0&&wt(oe)),O===r&&(t.substr(Y,2)===xe?(O=xe,Y+=2):(O=r,yt===0&&wt(Te)),O===r&&(t.charCodeAt(Y)===60?(O=lt,Y++):(O=r,yt===0&&wt(Ct))))))),O}function Pi(){var O,K,re;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();return K!==r?(re=WA(),re!==r?(xt=O,K=ke(re),O=K):(Y=O,O=r)):(Y=O,O=r),O}function WA(){var O,K,re;if(O=Y,K=[],re=Cf(),re!==r)for(;re!==r;)K.push(re),re=Cf();else K=r;return K!==r&&(xt=O,K=qt(K)),O=K,O}function Cf(){var O,K;return O=Y,K=mn(),K!==r&&(xt=O,K=ir(K)),O=K,O===r&&(O=Y,K=Gg(),K!==r&&(xt=O,K=ir(K)),O=K,O===r&&(O=Y,K=qg(),K!==r&&(xt=O,K=ir(K)),O=K,O===r&&(O=Y,K=ss(),K!==r&&(xt=O,K=ir(K)),O=K))),O}function mn(){var O,K,re,de;return O=Y,t.substr(Y,2)===Pt?(K=Pt,Y+=2):(K=r,yt===0&&wt(gn)),K!==r?(re=yn(),re!==r?(t.charCodeAt(Y)===39?(de=Pr,Y++):(de=r,yt===0&&wt(Ir)),de!==r?(xt=O,K=Or(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function Gg(){var O,K,re,de;return O=Y,t.charCodeAt(Y)===39?(K=Pr,Y++):(K=r,yt===0&&wt(Ir)),K!==r?(re=wf(),re!==r?(t.charCodeAt(Y)===39?(de=Pr,Y++):(de=r,yt===0&&wt(Ir)),de!==r?(xt=O,K=Or(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function qg(){var O,K,re,de;if(O=Y,t.substr(Y,2)===on?(K=on,Y+=2):(K=r,yt===0&&wt(ai)),K!==r&&(xt=O,K=Io()),O=K,O===r)if(O=Y,t.charCodeAt(Y)===34?(K=rs,Y++):(K=r,yt===0&&wt($s)),K!==r){for(re=[],de=Pl();de!==r;)re.push(de),de=Pl();re!==r?(t.charCodeAt(Y)===34?(de=rs,Y++):(de=r,yt===0&&wt($s)),de!==r?(xt=O,K=Co(re),O=K):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;return O}function ss(){var O,K,re;if(O=Y,K=[],re=Po(),re!==r)for(;re!==r;)K.push(re),re=Po();else K=r;return K!==r&&(xt=O,K=Co(K)),O=K,O}function Pl(){var O,K;return O=Y,K=Zr(),K!==r&&(xt=O,K=ji(K)),O=K,O===r&&(O=Y,K=bh(),K!==r&&(xt=O,K=eo(K)),O=K,O===r&&(O=Y,K=VA(),K!==r&&(xt=O,K=wo(K)),O=K,O===r&&(O=Y,K=Bf(),K!==r&&(xt=O,K=QA(K)),O=K))),O}function Po(){var O,K;return O=Y,K=Zr(),K!==r&&(xt=O,K=Af(K)),O=K,O===r&&(O=Y,K=bh(),K!==r&&(xt=O,K=dh(K)),O=K,O===r&&(O=Y,K=VA(),K!==r&&(xt=O,K=mh(K)),O=K,O===r&&(O=Y,K=Sy(),K!==r&&(xt=O,K=to(K)),O=K,O===r&&(O=Y,K=Dh(),K!==r&&(xt=O,K=QA(K)),O=K)))),O}function wf(){var O,K,re;for(O=Y,K=[],jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Ts));re!==r;)K.push(re),jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Ts));return K!==r&&(xt=O,K=ro(K)),O=K,O}function Bf(){var O,K,re;if(O=Y,K=[],re=xl(),re===r&&(ou.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(au))),re!==r)for(;re!==r;)K.push(re),re=xl(),re===r&&(ou.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(au)));else K=r;return K!==r&&(xt=O,K=ro(K)),O=K,O}function xl(){var O,K,re;return O=Y,t.substr(Y,2)===lu?(K=lu,Y+=2):(K=r,yt===0&&wt(TA)),K!==r&&(xt=O,K=RA()),O=K,O===r&&(O=Y,t.charCodeAt(Y)===92?(K=oa,Y++):(K=r,yt===0&&wt(aa)),K!==r?(FA.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(gr)),re!==r?(xt=O,K=Bo(re),O=K):(Y=O,O=r)):(Y=O,O=r)),O}function yn(){var O,K,re;for(O=Y,K=[],re=xo(),re===r&&(jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Ts)));re!==r;)K.push(re),re=xo(),re===r&&(jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Ts)));return K!==r&&(xt=O,K=ro(K)),O=K,O}function xo(){var O,K,re;return O=Y,t.substr(Y,2)===Me?(K=Me,Y+=2):(K=r,yt===0&&wt(cu)),K!==r&&(xt=O,K=Cr()),O=K,O===r&&(O=Y,t.substr(Y,2)===pf?(K=pf,Y+=2):(K=r,yt===0&&wt(NA)),K!==r&&(xt=O,K=OA()),O=K,O===r&&(O=Y,t.charCodeAt(Y)===92?(K=oa,Y++):(K=r,yt===0&&wt(aa)),K!==r?(uu.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(fu)),re!==r?(xt=O,K=oc(),O=K):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===ve?(K=ve,Y+=2):(K=r,yt===0&&wt(Nt)),K!==r&&(xt=O,K=ac()),O=K,O===r&&(O=Y,t.substr(Y,2)===Oi?(K=Oi,Y+=2):(K=r,yt===0&&wt(no)),K!==r&&(xt=O,K=Rt()),O=K,O===r&&(O=Y,t.substr(Y,2)===xn?(K=xn,Y+=2):(K=r,yt===0&&wt(la)),K!==r&&(xt=O,K=Gi()),O=K,O===r&&(O=Y,t.substr(Y,2)===Li?(K=Li,Y+=2):(K=r,yt===0&&wt(Na)),K!==r&&(xt=O,K=dn()),O=K,O===r&&(O=Y,t.substr(Y,2)===Kn?(K=Kn,Y+=2):(K=r,yt===0&&wt(Au)),K!==r&&(xt=O,K=yh()),O=K,O===r&&(O=Y,t.charCodeAt(Y)===92?(K=oa,Y++):(K=r,yt===0&&wt(aa)),K!==r?(Oa.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(La)),re!==r?(xt=O,K=Bo(re),O=K):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Iu()))))))))),O}function Iu(){var O,K,re,de,Je,At,dr,vr,Un,mi,Cs,JA;return O=Y,t.charCodeAt(Y)===92?(K=oa,Y++):(K=r,yt===0&&wt(aa)),K!==r?(re=pa(),re!==r?(xt=O,K=Ma(re),O=K):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===$e?(K=$e,Y+=2):(K=r,yt===0&&wt(Ua)),K!==r?(re=Y,de=Y,Je=pa(),Je!==r?(At=Fs(),At!==r?(Je=[Je,At],de=Je):(Y=de,de=r)):(Y=de,de=r),de===r&&(de=pa()),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,K=Ma(re),O=K):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===hf?(K=hf,Y+=2):(K=r,yt===0&&wt(lc)),K!==r?(re=Y,de=Y,Je=Fs(),Je!==r?(At=Fs(),At!==r?(dr=Fs(),dr!==r?(vr=Fs(),vr!==r?(Je=[Je,At,dr,vr],de=Je):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,K=Ma(re),O=K):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===wn?(K=wn,Y+=2):(K=r,yt===0&&wt(ca)),K!==r?(re=Y,de=Y,Je=Fs(),Je!==r?(At=Fs(),At!==r?(dr=Fs(),dr!==r?(vr=Fs(),vr!==r?(Un=Fs(),Un!==r?(mi=Fs(),mi!==r?(Cs=Fs(),Cs!==r?(JA=Fs(),JA!==r?(Je=[Je,At,dr,vr,Un,mi,Cs,JA],de=Je):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,K=LA(re),O=K):(Y=O,O=r)):(Y=O,O=r)))),O}function pa(){var O;return MA.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,yt===0&&wt(ua)),O}function Fs(){var O;return Bl.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,yt===0&&wt(Mt)),O}function Dh(){var O,K,re,de,Je;if(O=Y,K=[],re=Y,t.charCodeAt(Y)===92?(de=oa,Y++):(de=r,yt===0&&wt(aa)),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,t.substr(Y,2)===fa?(de=fa,Y+=2):(de=r,yt===0&&wt(Ha)),de!==r&&(xt=re,de=ns()),re=de,re===r&&(re=Y,de=Y,yt++,Je=Dy(),yt--,Je===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r))),re!==r)for(;re!==r;)K.push(re),re=Y,t.charCodeAt(Y)===92?(de=oa,Y++):(de=r,yt===0&&wt(aa)),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,t.substr(Y,2)===fa?(de=fa,Y+=2):(de=r,yt===0&&wt(Ha)),de!==r&&(xt=re,de=ns()),re=de,re===r&&(re=Y,de=Y,yt++,Je=Dy(),yt--,Je===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r)));else K=r;return K!==r&&(xt=O,K=ro(K)),O=K,O}function YA(){var O,K,re,de,Je,At;if(O=Y,t.charCodeAt(Y)===45?(K=cc,Y++):(K=r,yt===0&&wt(pu)),K===r&&(t.charCodeAt(Y)===43?(K=uc,Y++):(K=r,yt===0&&wt(ja))),K===r&&(K=null),K!==r){if(re=[],it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,yt===0&&wt(Ue)),de!==r)for(;de!==r;)re.push(de),it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,yt===0&&wt(Ue));else re=r;if(re!==r)if(t.charCodeAt(Y)===46?(de=Mi,Y++):(de=r,yt===0&&wt(Is)),de!==r){if(Je=[],it.test(t.charAt(Y))?(At=t.charAt(Y),Y++):(At=r,yt===0&&wt(Ue)),At!==r)for(;At!==r;)Je.push(At),it.test(t.charAt(Y))?(At=t.charAt(Y),Y++):(At=r,yt===0&&wt(Ue));else Je=r;Je!==r?(xt=O,K=vl(K,re,Je),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;if(O===r){if(O=Y,t.charCodeAt(Y)===45?(K=cc,Y++):(K=r,yt===0&&wt(pu)),K===r&&(t.charCodeAt(Y)===43?(K=uc,Y++):(K=r,yt===0&&wt(ja))),K===r&&(K=null),K!==r){if(re=[],it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,yt===0&&wt(Ue)),de!==r)for(;de!==r;)re.push(de),it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,yt===0&&wt(Ue));else re=r;re!==r?(xt=O,K=gf(K,re),O=K):(Y=O,O=r)}else Y=O,O=r;if(O===r&&(O=Y,K=VA(),K!==r&&(xt=O,K=fc(K)),O=K,O===r&&(O=Y,K=pc(),K!==r&&(xt=O,K=wi(K)),O=K,O===r)))if(O=Y,t.charCodeAt(Y)===40?(K=ye,Y++):(K=r,yt===0&&wt(Ae)),K!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();if(re!==r)if(de=io(),de!==r){for(Je=[],At=kt();At!==r;)Je.push(At),At=kt();Je!==r?(t.charCodeAt(Y)===41?(At=se,Y++):(At=r,yt===0&&wt(Z)),At!==r?(xt=O,K=Qn(de),O=K):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r}return O}function vf(){var O,K,re,de,Je,At,dr,vr;if(O=Y,K=YA(),K!==r){for(re=[],de=Y,Je=[],At=kt();At!==r;)Je.push(At),At=kt();if(Je!==r)if(t.charCodeAt(Y)===42?(At=Ac,Y++):(At=r,yt===0&&wt(Ke)),At===r&&(t.charCodeAt(Y)===47?(At=st,Y++):(At=r,yt===0&&wt(St))),At!==r){for(dr=[],vr=kt();vr!==r;)dr.push(vr),vr=kt();dr!==r?(vr=YA(),vr!==r?(xt=de,Je=lr(K,At,vr),de=Je):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r;for(;de!==r;){for(re.push(de),de=Y,Je=[],At=kt();At!==r;)Je.push(At),At=kt();if(Je!==r)if(t.charCodeAt(Y)===42?(At=Ac,Y++):(At=r,yt===0&&wt(Ke)),At===r&&(t.charCodeAt(Y)===47?(At=st,Y++):(At=r,yt===0&&wt(St))),At!==r){for(dr=[],vr=kt();vr!==r;)dr.push(vr),vr=kt();dr!==r?(vr=YA(),vr!==r?(xt=de,Je=lr(K,At,vr),de=Je):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r}re!==r?(xt=O,K=te(K,re),O=K):(Y=O,O=r)}else Y=O,O=r;return O}function io(){var O,K,re,de,Je,At,dr,vr;if(O=Y,K=vf(),K!==r){for(re=[],de=Y,Je=[],At=kt();At!==r;)Je.push(At),At=kt();if(Je!==r)if(t.charCodeAt(Y)===43?(At=uc,Y++):(At=r,yt===0&&wt(ja)),At===r&&(t.charCodeAt(Y)===45?(At=cc,Y++):(At=r,yt===0&&wt(pu))),At!==r){for(dr=[],vr=kt();vr!==r;)dr.push(vr),vr=kt();dr!==r?(vr=vf(),vr!==r?(xt=de,Je=Ee(K,At,vr),de=Je):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r;for(;de!==r;){for(re.push(de),de=Y,Je=[],At=kt();At!==r;)Je.push(At),At=kt();if(Je!==r)if(t.charCodeAt(Y)===43?(At=uc,Y++):(At=r,yt===0&&wt(ja)),At===r&&(t.charCodeAt(Y)===45?(At=cc,Y++):(At=r,yt===0&&wt(pu))),At!==r){for(dr=[],vr=kt();vr!==r;)dr.push(vr),vr=kt();dr!==r?(vr=vf(),vr!==r?(xt=de,Je=Ee(K,At,vr),de=Je):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r}re!==r?(xt=O,K=te(K,re),O=K):(Y=O,O=r)}else Y=O,O=r;return O}function Zr(){var O,K,re,de,Je,At;if(O=Y,t.substr(Y,3)===Oe?(K=Oe,Y+=3):(K=r,yt===0&&wt(dt)),K!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();if(re!==r)if(de=io(),de!==r){for(Je=[],At=kt();At!==r;)Je.push(At),At=kt();Je!==r?(t.substr(Y,2)===Et?(At=Et,Y+=2):(At=r,yt===0&&wt(bt)),At!==r?(xt=O,K=tr(de),O=K):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;return O}function bh(){var O,K,re,de;return O=Y,t.substr(Y,2)===An?(K=An,Y+=2):(K=r,yt===0&&wt(li)),K!==r?(re=Aa(),re!==r?(t.charCodeAt(Y)===41?(de=se,Y++):(de=r,yt===0&&wt(Z)),de!==r?(xt=O,K=qi(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function VA(){var O,K,re,de,Je,At;return O=Y,t.substr(Y,2)===Tn?(K=Tn,Y+=2):(K=r,yt===0&&wt(Ga)),K!==r?(re=pc(),re!==r?(t.substr(Y,2)===my?(de=my,Y+=2):(de=r,yt===0&&wt(Z1)),de!==r?(Je=Rs(),Je!==r?(t.charCodeAt(Y)===125?(At=j,Y++):(At=r,yt===0&&wt(rt)),At!==r?(xt=O,K=vo(re,Je),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(K=Tn,Y+=2):(K=r,yt===0&&wt(Ga)),K!==r?(re=pc(),re!==r?(t.substr(Y,3)===yy?(de=yy,Y+=3):(de=r,yt===0&&wt(Eh)),de!==r?(xt=O,K=$1(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(K=Tn,Y+=2):(K=r,yt===0&&wt(Ga)),K!==r?(re=pc(),re!==r?(t.substr(Y,2)===So?(de=So,Y+=2):(de=r,yt===0&&wt(Ih)),de!==r?(Je=Rs(),Je!==r?(t.charCodeAt(Y)===125?(At=j,Y++):(At=r,yt===0&&wt(rt)),At!==r?(xt=O,K=Ch(re,Je),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(K=Tn,Y+=2):(K=r,yt===0&&wt(Ga)),K!==r?(re=pc(),re!==r?(t.substr(Y,3)===hu?(de=hu,Y+=3):(de=r,yt===0&&wt(wh)),de!==r?(xt=O,K=Fg(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(K=Tn,Y+=2):(K=r,yt===0&&wt(Ga)),K!==r?(re=pc(),re!==r?(t.charCodeAt(Y)===125?(de=j,Y++):(de=r,yt===0&&wt(rt)),de!==r?(xt=O,K=Ng(re),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.charCodeAt(Y)===36?(K=Og,Y++):(K=r,yt===0&&wt(Ey)),K!==r?(re=pc(),re!==r?(xt=O,K=Ng(re),O=K):(Y=O,O=r)):(Y=O,O=r)))))),O}function Sy(){var O,K,re;return O=Y,K=Wg(),K!==r?(xt=Y,re=df(K),re?re=void 0:re=r,re!==r?(xt=O,K=Do(K),O=K):(Y=O,O=r)):(Y=O,O=r),O}function Wg(){var O,K,re,de,Je;if(O=Y,K=[],re=Y,de=Y,yt++,Je=xh(),yt--,Je===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r),re!==r)for(;re!==r;)K.push(re),re=Y,de=Y,yt++,Je=xh(),yt--,Je===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Je=t.charAt(Y),Y++):(Je=r,yt===0&&wt(kn)),Je!==r?(xt=re,de=Bo(Je),re=de):(Y=re,re=r)):(Y=re,re=r);else K=r;return K!==r&&(xt=O,K=ro(K)),O=K,O}function Ph(){var O,K,re;if(O=Y,K=[],Sl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Bh)),re!==r)for(;re!==r;)K.push(re),Sl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(Bh));else K=r;return K!==r&&(xt=O,K=Lg()),O=K,O}function pc(){var O,K,re;if(O=Y,K=[],Dl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(bl)),re!==r)for(;re!==r;)K.push(re),Dl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,yt===0&&wt(bl));else K=r;return K!==r&&(xt=O,K=Lg()),O=K,O}function Dy(){var O;return Iy.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,yt===0&&wt(UA)),O}function xh(){var O;return Cy.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,yt===0&&wt(wy)),O}function kt(){var O,K;if(O=[],_A.test(t.charAt(Y))?(K=t.charAt(Y),Y++):(K=r,yt===0&&wt(HA)),K!==r)for(;K!==r;)O.push(K),_A.test(t.charAt(Y))?(K=t.charAt(Y),Y++):(K=r,yt===0&&wt(HA));else O=r;return O}if(gu=a(),gu!==r&&Y===t.length)return gu;throw gu!==r&&Y<t.length&&wt(qa()),GA(mf,bo<t.length?t.charAt(bo):null,bo<t.length?Ef(bo,bo+1):Ef(bo,bo))}mee.exports={SyntaxError:Bd,parse:L5e}});function ux(t,e={isGlobPattern:()=>!1}){try{return(0,Eee.parse)(t,e)}catch(r){throw r.location&&(r.message=r.message.replace(/(\\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function fE(t,{endSemicolon:e=!1}={}){return t.map(({command:r,type:s},a)=>`${fx(r)}${s===\";\"?a!==t.length-1||e?\";\":\"\":\" &\"}`).join(\" \")}function fx(t){return`${AE(t.chain)}${t.then?` ${HU(t.then)}`:\"\"}`}function HU(t){return`${t.type} ${fx(t.line)}`}function AE(t){return`${GU(t)}${t.then?` ${jU(t.then)}`:\"\"}`}function jU(t){return`${t.type} ${AE(t.chain)}`}function GU(t){switch(t.type){case\"command\":return`${t.envs.length>0?`${t.envs.map(e=>cx(e)).join(\" \")} `:\"\"}${t.args.map(e=>qU(e)).join(\" \")}`;case\"subshell\":return`(${fE(t.subshell)})${t.args.length>0?` ${t.args.map(e=>H2(e)).join(\" \")}`:\"\"}`;case\"group\":return`{ ${fE(t.group,{endSemicolon:!0})} }${t.args.length>0?` ${t.args.map(e=>H2(e)).join(\" \")}`:\"\"}`;case\"envs\":return t.envs.map(e=>cx(e)).join(\" \");default:throw new Error(`Unsupported command type:  \"${t.type}\"`)}}function cx(t){return`${t.name}=${t.args[0]?vd(t.args[0]):\"\"}`}function qU(t){switch(t.type){case\"redirection\":return H2(t);case\"argument\":return vd(t);default:throw new Error(`Unsupported argument type: \"${t.type}\"`)}}function H2(t){return`${t.subtype} ${t.args.map(e=>vd(e)).join(\" \")}`}function vd(t){return t.segments.map(e=>WU(e)).join(\"\")}function WU(t){let e=(s,a)=>a?`\"${s}\"`:s,r=s=>s===\"\"?\"''\":s.match(/[()}<>$|&;\"'\\n\\t ]/)?s.match(/['\\t\\p{C}]/u)?s.match(/'/)?`\"${s.replace(/[\"$\\t\\p{C}]/u,U5e)}\"`:`$'${s.replace(/[\\t\\p{C}]/u,Cee)}'`:`'${s}'`:s;switch(t.type){case\"text\":return r(t.text);case\"glob\":return t.pattern;case\"shell\":return e(`$(${fE(t.shell)})`,t.quoted);case\"variable\":return e(typeof t.defaultValue>\"u\"?typeof t.alternativeValue>\"u\"?`\\${${t.name}}`:t.alternativeValue.length===0?`\\${${t.name}:+}`:`\\${${t.name}:+${t.alternativeValue.map(s=>vd(s)).join(\" \")}}`:t.defaultValue.length===0?`\\${${t.name}:-}`:`\\${${t.name}:-${t.defaultValue.map(s=>vd(s)).join(\" \")}}`,t.quoted);case\"arithmetic\":return`$(( ${Ax(t.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: \"${t.type}\"`)}}function Ax(t){let e=a=>{switch(a){case\"addition\":return\"+\";case\"subtraction\":return\"-\";case\"multiplication\":return\"*\";case\"division\":return\"/\";default:throw new Error(`Can't extract operator from arithmetic expression of type \"${a}\"`)}},r=(a,n)=>n?`( ${a} )`:a,s=a=>r(Ax(a),![\"number\",\"variable\"].includes(a.type));switch(t.type){case\"number\":return String(t.value);case\"variable\":return t.name;default:return`${s(t.left)} ${e(t.type)} ${s(t.right)}`}}var Eee,Iee,M5e,Cee,U5e,wee=Xe(()=>{Eee=ut(yee());Iee=new Map([[\"\\f\",\"\\\\f\"],[`\n`,\"\\\\n\"],[\"\\r\",\"\\\\r\"],[\"\t\",\"\\\\t\"],[\"\\v\",\"\\\\v\"],[\"\\0\",\"\\\\0\"]]),M5e=new Map([[\"\\\\\",\"\\\\\\\\\"],[\"$\",\"\\\\$\"],['\"','\\\\\"'],...Array.from(Iee,([t,e])=>[t,`\"$'${e}'\"`])]),Cee=t=>Iee.get(t)??`\\\\x${t.charCodeAt(0).toString(16).padStart(2,\"0\")}`,U5e=t=>M5e.get(t)??`\"$'${Cee(t)}'\"`});var vee=_((eQt,Bee)=>{\"use strict\";function _5e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Sd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,Sd)}_5e(Sd,Error);Sd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function H5e(t,e){e=e!==void 0?e:{};var r={},s={resolution:Ne},a=Ne,n=\"/\",c=ye(\"/\",!1),f=function(Ue,x){return{from:Ue,descriptor:x}},p=function(Ue){return{descriptor:Ue}},h=\"@\",E=ye(\"@\",!1),C=function(Ue,x){return{fullName:Ue,description:x}},S=function(Ue){return{fullName:Ue}},P=function(){return Be()},I=/^[^\\/@]/,R=Ae([\"/\",\"@\"],!0,!1),N=/^[^\\/]/,U=Ae([\"/\"],!0,!1),W=0,ee=0,ie=[{line:1,column:1}],ue=0,le=[],me=0,pe;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function Be(){return t.substring(ee,W)}function Ce(){return mt(ee,W)}function g(Ue,x){throw x=x!==void 0?x:mt(ee,W),Fe([De(Ue)],t.substring(ee,W),x)}function we(Ue,x){throw x=x!==void 0?x:mt(ee,W),rt(Ue,x)}function ye(Ue,x){return{type:\"literal\",text:Ue,ignoreCase:x}}function Ae(Ue,x,w){return{type:\"class\",parts:Ue,inverted:x,ignoreCase:w}}function se(){return{type:\"any\"}}function Z(){return{type:\"end\"}}function De(Ue){return{type:\"other\",description:Ue}}function Re(Ue){var x=ie[Ue],w;if(x)return x;for(w=Ue-1;!ie[w];)w--;for(x=ie[w],x={line:x.line,column:x.column};w<Ue;)t.charCodeAt(w)===10?(x.line++,x.column=1):x.column++,w++;return ie[Ue]=x,x}function mt(Ue,x){var w=Re(Ue),b=Re(x);return{start:{offset:Ue,line:w.line,column:w.column},end:{offset:x,line:b.line,column:b.column}}}function j(Ue){W<ue||(W>ue&&(ue=W,le=[]),le.push(Ue))}function rt(Ue,x){return new Sd(Ue,null,null,x)}function Fe(Ue,x,w){return new Sd(Sd.buildMessage(Ue,x),Ue,x,w)}function Ne(){var Ue,x,w,b;return Ue=W,x=Pe(),x!==r?(t.charCodeAt(W)===47?(w=n,W++):(w=r,me===0&&j(c)),w!==r?(b=Pe(),b!==r?(ee=Ue,x=f(x,b),Ue=x):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r),Ue===r&&(Ue=W,x=Pe(),x!==r&&(ee=Ue,x=p(x)),Ue=x),Ue}function Pe(){var Ue,x,w,b;return Ue=W,x=Ve(),x!==r?(t.charCodeAt(W)===64?(w=h,W++):(w=r,me===0&&j(E)),w!==r?(b=it(),b!==r?(ee=Ue,x=C(x,b),Ue=x):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r),Ue===r&&(Ue=W,x=Ve(),x!==r&&(ee=Ue,x=S(x)),Ue=x),Ue}function Ve(){var Ue,x,w,b,y;return Ue=W,t.charCodeAt(W)===64?(x=h,W++):(x=r,me===0&&j(E)),x!==r?(w=ke(),w!==r?(t.charCodeAt(W)===47?(b=n,W++):(b=r,me===0&&j(c)),b!==r?(y=ke(),y!==r?(ee=Ue,x=P(),Ue=x):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r),Ue===r&&(Ue=W,x=ke(),x!==r&&(ee=Ue,x=P()),Ue=x),Ue}function ke(){var Ue,x,w;if(Ue=W,x=[],I.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(R)),w!==r)for(;w!==r;)x.push(w),I.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(R));else x=r;return x!==r&&(ee=Ue,x=P()),Ue=x,Ue}function it(){var Ue,x,w;if(Ue=W,x=[],N.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(U)),w!==r)for(;w!==r;)x.push(w),N.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(U));else x=r;return x!==r&&(ee=Ue,x=P()),Ue=x,Ue}if(pe=a(),pe!==r&&W===t.length)return pe;throw pe!==r&&W<t.length&&j(Z()),Fe(le,ue<t.length?t.charAt(ue):null,ue<t.length?mt(ue,ue+1):mt(ue,ue))}Bee.exports={SyntaxError:Sd,parse:H5e}});function px(t){let e=t.match(/^\\*{1,2}\\/(.*)/);if(e)throw new Error(`The override for '${t}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${e[1]}' instead.`);try{return(0,See.parse)(t)}catch(r){throw r.location&&(r.message=r.message.replace(/(\\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function hx(t){let e=\"\";return t.from&&(e+=t.from.fullName,t.from.description&&(e+=`@${t.from.description}`),e+=\"/\"),e+=t.descriptor.fullName,t.descriptor.description&&(e+=`@${t.descriptor.description}`),e}var See,Dee=Xe(()=>{See=ut(vee())});var bd=_((rQt,Dd)=>{\"use strict\";function bee(t){return typeof t>\"u\"||t===null}function j5e(t){return typeof t==\"object\"&&t!==null}function G5e(t){return Array.isArray(t)?t:bee(t)?[]:[t]}function q5e(t,e){var r,s,a,n;if(e)for(n=Object.keys(e),r=0,s=n.length;r<s;r+=1)a=n[r],t[a]=e[a];return t}function W5e(t,e){var r=\"\",s;for(s=0;s<e;s+=1)r+=t;return r}function Y5e(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}Dd.exports.isNothing=bee;Dd.exports.isObject=j5e;Dd.exports.toArray=G5e;Dd.exports.repeat=W5e;Dd.exports.isNegativeZero=Y5e;Dd.exports.extend=q5e});var pE=_((nQt,Pee)=>{\"use strict\";function j2(t,e){Error.call(this),this.name=\"YAMLException\",this.reason=t,this.mark=e,this.message=(this.reason||\"(unknown reason)\")+(this.mark?\" \"+this.mark.toString():\"\"),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||\"\"}j2.prototype=Object.create(Error.prototype);j2.prototype.constructor=j2;j2.prototype.toString=function(e){var r=this.name+\": \";return r+=this.reason||\"(unknown reason)\",!e&&this.mark&&(r+=\" \"+this.mark.toString()),r};Pee.exports=j2});var Qee=_((iQt,kee)=>{\"use strict\";var xee=bd();function YU(t,e,r,s,a){this.name=t,this.buffer=e,this.position=r,this.line=s,this.column=a}YU.prototype.getSnippet=function(e,r){var s,a,n,c,f;if(!this.buffer)return null;for(e=e||4,r=r||75,s=\"\",a=this.position;a>0&&`\\0\\r\n\\x85\\u2028\\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){s=\" ... \",a+=5;break}for(n=\"\",c=this.position;c<this.buffer.length&&`\\0\\r\n\\x85\\u2028\\u2029`.indexOf(this.buffer.charAt(c))===-1;)if(c+=1,c-this.position>r/2-1){n=\" ... \",c-=5;break}return f=this.buffer.slice(a,c),xee.repeat(\" \",e)+s+f+n+`\n`+xee.repeat(\" \",e+this.position-a+s.length)+\"^\"};YU.prototype.toString=function(e){var r,s=\"\";return this.name&&(s+='in \"'+this.name+'\" '),s+=\"at line \"+(this.line+1)+\", column \"+(this.column+1),e||(r=this.getSnippet(),r&&(s+=`:\n`+r)),s};kee.exports=YU});var Ss=_((sQt,Ree)=>{\"use strict\";var Tee=pE(),V5e=[\"kind\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"defaultStyle\",\"styleAliases\"],J5e=[\"scalar\",\"sequence\",\"mapping\"];function K5e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(s){e[String(s)]=r})}),e}function z5e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(V5e.indexOf(r)===-1)throw new Tee('Unknown option \"'+r+'\" is met in definition of \"'+t+'\" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=K5e(e.styleAliases||null),J5e.indexOf(this.kind)===-1)throw new Tee('Unknown kind \"'+this.kind+'\" is specified for \"'+t+'\" YAML type.')}Ree.exports=z5e});var Pd=_((oQt,Nee)=>{\"use strict\";var Fee=bd(),gx=pE(),X5e=Ss();function VU(t,e,r){var s=[];return t.include.forEach(function(a){r=VU(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,c){n.tag===a.tag&&n.kind===a.kind&&s.push(c)}),r.push(a)}),r.filter(function(a,n){return s.indexOf(n)===-1})}function Z5e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function s(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(s);return t}function hE(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!==\"scalar\")throw new gx(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\")}),this.compiledImplicit=VU(this,\"implicit\",[]),this.compiledExplicit=VU(this,\"explicit\",[]),this.compiledTypeMap=Z5e(this.compiledImplicit,this.compiledExplicit)}hE.DEFAULT=null;hE.create=function(){var e,r;switch(arguments.length){case 1:e=hE.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new gx(\"Wrong number of arguments for Schema.create function\")}if(e=Fee.toArray(e),r=Fee.toArray(r),!e.every(function(s){return s instanceof hE}))throw new gx(\"Specified list of super schemas (or a single Schema object) contains a non-Schema object.\");if(!r.every(function(s){return s instanceof X5e}))throw new gx(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");return new hE({include:e,explicit:r})};Nee.exports=hE});var Lee=_((aQt,Oee)=>{\"use strict\";var $5e=Ss();Oee.exports=new $5e(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(t){return t!==null?t:\"\"}})});var Uee=_((lQt,Mee)=>{\"use strict\";var eqe=Ss();Mee.exports=new eqe(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(t){return t!==null?t:[]}})});var Hee=_((cQt,_ee)=>{\"use strict\";var tqe=Ss();_ee.exports=new tqe(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(t){return t!==null?t:{}}})});var dx=_((uQt,jee)=>{\"use strict\";var rqe=Pd();jee.exports=new rqe({explicit:[Lee(),Uee(),Hee()]})});var qee=_((fQt,Gee)=>{\"use strict\";var nqe=Ss();function iqe(t){if(t===null)return!0;var e=t.length;return e===1&&t===\"~\"||e===4&&(t===\"null\"||t===\"Null\"||t===\"NULL\")}function sqe(){return null}function oqe(t){return t===null}Gee.exports=new nqe(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:iqe,construct:sqe,predicate:oqe,represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"}},defaultStyle:\"lowercase\"})});var Yee=_((AQt,Wee)=>{\"use strict\";var aqe=Ss();function lqe(t){if(t===null)return!1;var e=t.length;return e===4&&(t===\"true\"||t===\"True\"||t===\"TRUE\")||e===5&&(t===\"false\"||t===\"False\"||t===\"FALSE\")}function cqe(t){return t===\"true\"||t===\"True\"||t===\"TRUE\"}function uqe(t){return Object.prototype.toString.call(t)===\"[object Boolean]\"}Wee.exports=new aqe(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:lqe,construct:cqe,predicate:uqe,represent:{lowercase:function(t){return t?\"true\":\"false\"},uppercase:function(t){return t?\"TRUE\":\"FALSE\"},camelcase:function(t){return t?\"True\":\"False\"}},defaultStyle:\"lowercase\"})});var Jee=_((pQt,Vee)=>{\"use strict\";var fqe=bd(),Aqe=Ss();function pqe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function hqe(t){return 48<=t&&t<=55}function gqe(t){return 48<=t&&t<=57}function dqe(t){if(t===null)return!1;var e=t.length,r=0,s=!1,a;if(!e)return!1;if(a=t[r],(a===\"-\"||a===\"+\")&&(a=t[++r]),a===\"0\"){if(r+1===e)return!0;if(a=t[++r],a===\"b\"){for(r++;r<e;r++)if(a=t[r],a!==\"_\"){if(a!==\"0\"&&a!==\"1\")return!1;s=!0}return s&&a!==\"_\"}if(a===\"x\"){for(r++;r<e;r++)if(a=t[r],a!==\"_\"){if(!pqe(t.charCodeAt(r)))return!1;s=!0}return s&&a!==\"_\"}for(;r<e;r++)if(a=t[r],a!==\"_\"){if(!hqe(t.charCodeAt(r)))return!1;s=!0}return s&&a!==\"_\"}if(a===\"_\")return!1;for(;r<e;r++)if(a=t[r],a!==\"_\"){if(a===\":\")break;if(!gqe(t.charCodeAt(r)))return!1;s=!0}return!s||a===\"_\"?!1:a!==\":\"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r))}function mqe(t){var e=t,r=1,s,a,n=[];return e.indexOf(\"_\")!==-1&&(e=e.replace(/_/g,\"\")),s=e[0],(s===\"-\"||s===\"+\")&&(s===\"-\"&&(r=-1),e=e.slice(1),s=e[0]),e===\"0\"?0:s===\"0\"?e[1]===\"b\"?r*parseInt(e.slice(2),2):e[1]===\"x\"?r*parseInt(e,16):r*parseInt(e,8):e.indexOf(\":\")!==-1?(e.split(\":\").forEach(function(c){n.unshift(parseInt(c,10))}),e=0,a=1,n.forEach(function(c){e+=c*a,a*=60}),r*e):r*parseInt(e,10)}function yqe(t){return Object.prototype.toString.call(t)===\"[object Number]\"&&t%1===0&&!fqe.isNegativeZero(t)}Vee.exports=new Aqe(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:dqe,construct:mqe,predicate:yqe,represent:{binary:function(t){return t>=0?\"0b\"+t.toString(2):\"-0b\"+t.toString(2).slice(1)},octal:function(t){return t>=0?\"0\"+t.toString(8):\"-0\"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?\"0x\"+t.toString(16).toUpperCase():\"-0x\"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}})});var Xee=_((hQt,zee)=>{\"use strict\";var Kee=bd(),Eqe=Ss(),Iqe=new RegExp(\"^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");function Cqe(t){return!(t===null||!Iqe.test(t)||t[t.length-1]===\"_\")}function wqe(t){var e,r,s,a;return e=t.replace(/_/g,\"\").toLowerCase(),r=e[0]===\"-\"?-1:1,a=[],\"+-\".indexOf(e[0])>=0&&(e=e.slice(1)),e===\".inf\"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===\".nan\"?NaN:e.indexOf(\":\")>=0?(e.split(\":\").forEach(function(n){a.unshift(parseFloat(n,10))}),e=0,s=1,a.forEach(function(n){e+=n*s,s*=60}),r*e):r*parseFloat(e,10)}var Bqe=/^[-+]?[0-9]+e/;function vqe(t,e){var r;if(isNaN(t))switch(e){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===t)switch(e){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(Kee.isNegativeZero(t))return\"-0.0\";return r=t.toString(10),Bqe.test(r)?r.replace(\"e\",\".e\"):r}function Sqe(t){return Object.prototype.toString.call(t)===\"[object Number]\"&&(t%1!==0||Kee.isNegativeZero(t))}zee.exports=new Eqe(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:Cqe,construct:wqe,predicate:Sqe,represent:vqe,defaultStyle:\"lowercase\"})});var JU=_((gQt,Zee)=>{\"use strict\";var Dqe=Pd();Zee.exports=new Dqe({include:[dx()],implicit:[qee(),Yee(),Jee(),Xee()]})});var KU=_((dQt,$ee)=>{\"use strict\";var bqe=Pd();$ee.exports=new bqe({include:[JU()]})});var nte=_((mQt,rte)=>{\"use strict\";var Pqe=Ss(),ete=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),tte=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$\");function xqe(t){return t===null?!1:ete.exec(t)!==null||tte.exec(t)!==null}function kqe(t){var e,r,s,a,n,c,f,p=0,h=null,E,C,S;if(e=ete.exec(t),e===null&&(e=tte.exec(t)),e===null)throw new Error(\"Date resolve error\");if(r=+e[1],s=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,s,a));if(n=+e[4],c=+e[5],f=+e[6],e[7]){for(p=e[7].slice(0,3);p.length<3;)p+=\"0\";p=+p}return e[9]&&(E=+e[10],C=+(e[11]||0),h=(E*60+C)*6e4,e[9]===\"-\"&&(h=-h)),S=new Date(Date.UTC(r,s,a,n,c,f,p)),h&&S.setTime(S.getTime()-h),S}function Qqe(t){return t.toISOString()}rte.exports=new Pqe(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:xqe,construct:kqe,instanceOf:Date,represent:Qqe})});var ste=_((yQt,ite)=>{\"use strict\";var Tqe=Ss();function Rqe(t){return t===\"<<\"||t===null}ite.exports=new Tqe(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:Rqe})});var lte=_((EQt,ate)=>{\"use strict\";var xd;try{ote=Ie,xd=ote(\"buffer\").Buffer}catch{}var ote,Fqe=Ss(),zU=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\\r`;function Nqe(t){if(t===null)return!1;var e,r,s=0,a=t.length,n=zU;for(r=0;r<a;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;s+=6}return s%8===0}function Oqe(t){var e,r,s=t.replace(/[\\r\\n=]/g,\"\"),a=s.length,n=zU,c=0,f=[];for(e=0;e<a;e++)e%4===0&&e&&(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)),c=c<<6|n.indexOf(s.charAt(e));return r=a%4*6,r===0?(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)):r===18?(f.push(c>>10&255),f.push(c>>2&255)):r===12&&f.push(c>>4&255),xd?xd.from?xd.from(f):new xd(f):f}function Lqe(t){var e=\"\",r=0,s,a,n=t.length,c=zU;for(s=0;s<n;s++)s%3===0&&s&&(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+t[s];return a=n%3,a===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):a===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):a===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}function Mqe(t){return xd&&xd.isBuffer(t)}ate.exports=new Fqe(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:Nqe,construct:Oqe,predicate:Mqe,represent:Lqe})});var ute=_((CQt,cte)=>{\"use strict\";var Uqe=Ss(),_qe=Object.prototype.hasOwnProperty,Hqe=Object.prototype.toString;function jqe(t){if(t===null)return!0;var e=[],r,s,a,n,c,f=t;for(r=0,s=f.length;r<s;r+=1){if(a=f[r],c=!1,Hqe.call(a)!==\"[object Object]\")return!1;for(n in a)if(_qe.call(a,n))if(!c)c=!0;else return!1;if(!c)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function Gqe(t){return t!==null?t:[]}cte.exports=new Uqe(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:jqe,construct:Gqe})});var Ate=_((wQt,fte)=>{\"use strict\";var qqe=Ss(),Wqe=Object.prototype.toString;function Yqe(t){if(t===null)return!0;var e,r,s,a,n,c=t;for(n=new Array(c.length),e=0,r=c.length;e<r;e+=1){if(s=c[e],Wqe.call(s)!==\"[object Object]\"||(a=Object.keys(s),a.length!==1))return!1;n[e]=[a[0],s[a[0]]]}return!0}function Vqe(t){if(t===null)return[];var e,r,s,a,n,c=t;for(n=new Array(c.length),e=0,r=c.length;e<r;e+=1)s=c[e],a=Object.keys(s),n[e]=[a[0],s[a[0]]];return n}fte.exports=new qqe(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:Yqe,construct:Vqe})});var hte=_((BQt,pte)=>{\"use strict\";var Jqe=Ss(),Kqe=Object.prototype.hasOwnProperty;function zqe(t){if(t===null)return!0;var e,r=t;for(e in r)if(Kqe.call(r,e)&&r[e]!==null)return!1;return!0}function Xqe(t){return t!==null?t:{}}pte.exports=new Jqe(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:zqe,construct:Xqe})});var gE=_((vQt,gte)=>{\"use strict\";var Zqe=Pd();gte.exports=new Zqe({include:[KU()],implicit:[nte(),ste()],explicit:[lte(),ute(),Ate(),hte()]})});var mte=_((SQt,dte)=>{\"use strict\";var $qe=Ss();function e9e(){return!0}function t9e(){}function r9e(){return\"\"}function n9e(t){return typeof t>\"u\"}dte.exports=new $qe(\"tag:yaml.org,2002:js/undefined\",{kind:\"scalar\",resolve:e9e,construct:t9e,predicate:n9e,represent:r9e})});var Ete=_((DQt,yte)=>{\"use strict\";var i9e=Ss();function s9e(t){if(t===null||t.length===0)return!1;var e=t,r=/\\/([gim]*)$/.exec(t),s=\"\";return!(e[0]===\"/\"&&(r&&(s=r[1]),s.length>3||e[e.length-s.length-1]!==\"/\"))}function o9e(t){var e=t,r=/\\/([gim]*)$/.exec(t),s=\"\";return e[0]===\"/\"&&(r&&(s=r[1]),e=e.slice(1,e.length-s.length-1)),new RegExp(e,s)}function a9e(t){var e=\"/\"+t.source+\"/\";return t.global&&(e+=\"g\"),t.multiline&&(e+=\"m\"),t.ignoreCase&&(e+=\"i\"),e}function l9e(t){return Object.prototype.toString.call(t)===\"[object RegExp]\"}yte.exports=new i9e(\"tag:yaml.org,2002:js/regexp\",{kind:\"scalar\",resolve:s9e,construct:o9e,predicate:l9e,represent:a9e})});var wte=_((bQt,Cte)=>{\"use strict\";var mx;try{Ite=Ie,mx=Ite(\"esprima\")}catch{typeof window<\"u\"&&(mx=window.esprima)}var Ite,c9e=Ss();function u9e(t){if(t===null)return!1;try{var e=\"(\"+t+\")\",r=mx.parse(e,{range:!0});return!(r.type!==\"Program\"||r.body.length!==1||r.body[0].type!==\"ExpressionStatement\"||r.body[0].expression.type!==\"ArrowFunctionExpression\"&&r.body[0].expression.type!==\"FunctionExpression\")}catch{return!1}}function f9e(t){var e=\"(\"+t+\")\",r=mx.parse(e,{range:!0}),s=[],a;if(r.type!==\"Program\"||r.body.length!==1||r.body[0].type!==\"ExpressionStatement\"||r.body[0].expression.type!==\"ArrowFunctionExpression\"&&r.body[0].expression.type!==\"FunctionExpression\")throw new Error(\"Failed to resolve function\");return r.body[0].expression.params.forEach(function(n){s.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type===\"BlockStatement\"?new Function(s,e.slice(a[0]+1,a[1]-1)):new Function(s,\"return \"+e.slice(a[0],a[1]))}function A9e(t){return t.toString()}function p9e(t){return Object.prototype.toString.call(t)===\"[object Function]\"}Cte.exports=new c9e(\"tag:yaml.org,2002:js/function\",{kind:\"scalar\",resolve:u9e,construct:f9e,predicate:p9e,represent:A9e})});var G2=_((xQt,vte)=>{\"use strict\";var Bte=Pd();vte.exports=Bte.DEFAULT=new Bte({include:[gE()],explicit:[mte(),Ete(),wte()]})});var Gte=_((kQt,q2)=>{\"use strict\";var Ip=bd(),Qte=pE(),h9e=Qee(),Tte=gE(),g9e=G2(),i0=Object.prototype.hasOwnProperty,yx=1,Rte=2,Fte=3,Ex=4,XU=1,d9e=2,Ste=3,m9e=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,y9e=/[\\x85\\u2028\\u2029]/,E9e=/[,\\[\\]\\{\\}]/,Nte=/^(?:!|!!|![a-z\\-]+!)$/i,Ote=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function Dte(t){return Object.prototype.toString.call(t)}function jf(t){return t===10||t===13}function Qd(t){return t===9||t===32}function rl(t){return t===9||t===32||t===10||t===13}function dE(t){return t===44||t===91||t===93||t===123||t===125}function I9e(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function C9e(t){return t===120?2:t===117?4:t===85?8:0}function w9e(t){return 48<=t&&t<=57?t-48:-1}function bte(t){return t===48?\"\\0\":t===97?\"\\x07\":t===98?\"\\b\":t===116||t===9?\"\t\":t===110?`\n`:t===118?\"\\v\":t===102?\"\\f\":t===114?\"\\r\":t===101?\"\\x1B\":t===32?\" \":t===34?'\"':t===47?\"/\":t===92?\"\\\\\":t===78?\"\\x85\":t===95?\"\\xA0\":t===76?\"\\u2028\":t===80?\"\\u2029\":\"\"}function B9e(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Lte=new Array(256),Mte=new Array(256);for(kd=0;kd<256;kd++)Lte[kd]=bte(kd)?1:0,Mte[kd]=bte(kd);var kd;function v9e(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||g9e,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function Ute(t,e){return new Qte(e,new h9e(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Rr(t,e){throw Ute(t,e)}function Ix(t,e){t.onWarning&&t.onWarning.call(null,Ute(t,e))}var Pte={YAML:function(e,r,s){var a,n,c;e.version!==null&&Rr(e,\"duplication of %YAML directive\"),s.length!==1&&Rr(e,\"YAML directive accepts exactly one argument\"),a=/^([0-9]+)\\.([0-9]+)$/.exec(s[0]),a===null&&Rr(e,\"ill-formed argument of the YAML directive\"),n=parseInt(a[1],10),c=parseInt(a[2],10),n!==1&&Rr(e,\"unacceptable YAML version of the document\"),e.version=s[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&Ix(e,\"unsupported YAML version of the document\")},TAG:function(e,r,s){var a,n;s.length!==2&&Rr(e,\"TAG directive accepts exactly two arguments\"),a=s[0],n=s[1],Nte.test(a)||Rr(e,\"ill-formed tag handle (first argument) of the TAG directive\"),i0.call(e.tagMap,a)&&Rr(e,'there is a previously declared suffix for \"'+a+'\" tag handle'),Ote.test(n)||Rr(e,\"ill-formed tag prefix (second argument) of the TAG directive\"),e.tagMap[a]=n}};function n0(t,e,r,s){var a,n,c,f;if(e<r){if(f=t.input.slice(e,r),s)for(a=0,n=f.length;a<n;a+=1)c=f.charCodeAt(a),c===9||32<=c&&c<=1114111||Rr(t,\"expected valid JSON character\");else m9e.test(f)&&Rr(t,\"the stream contains non-printable characters\");t.result+=f}}function xte(t,e,r,s){var a,n,c,f;for(Ip.isObject(r)||Rr(t,\"cannot merge mappings; the provided source object is unacceptable\"),a=Object.keys(r),c=0,f=a.length;c<f;c+=1)n=a[c],i0.call(e,n)||(e[n]=r[n],s[n]=!0)}function mE(t,e,r,s,a,n,c,f){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&Rr(t,\"nested arrays are not supported inside keys\"),typeof a==\"object\"&&Dte(a[p])===\"[object Object]\"&&(a[p]=\"[object Object]\");if(typeof a==\"object\"&&Dte(a)===\"[object Object]\"&&(a=\"[object Object]\"),a=String(a),e===null&&(e={}),s===\"tag:yaml.org,2002:merge\")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)xte(t,e,n[p],r);else xte(t,e,n,r);else!t.json&&!i0.call(r,a)&&i0.call(e,a)&&(t.line=c||t.line,t.position=f||t.position,Rr(t,\"duplicated mapping key\")),e[a]=n,delete r[a];return e}function ZU(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Rr(t,\"a line break is expected\"),t.line+=1,t.lineStart=t.position}function as(t,e,r){for(var s=0,a=t.input.charCodeAt(t.position);a!==0;){for(;Qd(a);)a=t.input.charCodeAt(++t.position);if(e&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(jf(a))for(ZU(t),a=t.input.charCodeAt(t.position),s++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&s!==0&&t.lineIndent<r&&Ix(t,\"deficient indentation\"),s}function Cx(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||rl(r)))}function $U(t,e){e===1?t.result+=\" \":e>1&&(t.result+=Ip.repeat(`\n`,e-1))}function S9e(t,e,r){var s,a,n,c,f,p,h,E,C=t.kind,S=t.result,P;if(P=t.input.charCodeAt(t.position),rl(P)||dE(P)||P===35||P===38||P===42||P===33||P===124||P===62||P===39||P===34||P===37||P===64||P===96||(P===63||P===45)&&(a=t.input.charCodeAt(t.position+1),rl(a)||r&&dE(a)))return!1;for(t.kind=\"scalar\",t.result=\"\",n=c=t.position,f=!1;P!==0;){if(P===58){if(a=t.input.charCodeAt(t.position+1),rl(a)||r&&dE(a))break}else if(P===35){if(s=t.input.charCodeAt(t.position-1),rl(s))break}else{if(t.position===t.lineStart&&Cx(t)||r&&dE(P))break;if(jf(P))if(p=t.line,h=t.lineStart,E=t.lineIndent,as(t,!1,-1),t.lineIndent>=e){f=!0,P=t.input.charCodeAt(t.position);continue}else{t.position=c,t.line=p,t.lineStart=h,t.lineIndent=E;break}}f&&(n0(t,n,c,!1),$U(t,t.line-p),n=c=t.position,f=!1),Qd(P)||(c=t.position+1),P=t.input.charCodeAt(++t.position)}return n0(t,n,c,!1),t.result?!0:(t.kind=C,t.result=S,!1)}function D9e(t,e){var r,s,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind=\"scalar\",t.result=\"\",t.position++,s=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(n0(t,s,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)s=t.position,t.position++,a=t.position;else return!0;else jf(r)?(n0(t,s,a,!0),$U(t,as(t,!1,e)),s=a=t.position):t.position===t.lineStart&&Cx(t)?Rr(t,\"unexpected end of the document within a single quoted scalar\"):(t.position++,a=t.position);Rr(t,\"unexpected end of the stream within a single quoted scalar\")}function b9e(t,e){var r,s,a,n,c,f;if(f=t.input.charCodeAt(t.position),f!==34)return!1;for(t.kind=\"scalar\",t.result=\"\",t.position++,r=s=t.position;(f=t.input.charCodeAt(t.position))!==0;){if(f===34)return n0(t,r,t.position,!0),t.position++,!0;if(f===92){if(n0(t,r,t.position,!0),f=t.input.charCodeAt(++t.position),jf(f))as(t,!1,e);else if(f<256&&Lte[f])t.result+=Mte[f],t.position++;else if((c=C9e(f))>0){for(a=c,n=0;a>0;a--)f=t.input.charCodeAt(++t.position),(c=I9e(f))>=0?n=(n<<4)+c:Rr(t,\"expected hexadecimal character\");t.result+=B9e(n),t.position++}else Rr(t,\"unknown escape sequence\");r=s=t.position}else jf(f)?(n0(t,r,s,!0),$U(t,as(t,!1,e)),r=s=t.position):t.position===t.lineStart&&Cx(t)?Rr(t,\"unexpected end of the document within a double quoted scalar\"):(t.position++,s=t.position)}Rr(t,\"unexpected end of the stream within a double quoted scalar\")}function P9e(t,e){var r=!0,s,a=t.tag,n,c=t.anchor,f,p,h,E,C,S={},P,I,R,N;if(N=t.input.charCodeAt(t.position),N===91)p=93,C=!1,n=[];else if(N===123)p=125,C=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),N=t.input.charCodeAt(++t.position);N!==0;){if(as(t,!0,e),N=t.input.charCodeAt(t.position),N===p)return t.position++,t.tag=a,t.anchor=c,t.kind=C?\"mapping\":\"sequence\",t.result=n,!0;r||Rr(t,\"missed comma between flow collection entries\"),I=P=R=null,h=E=!1,N===63&&(f=t.input.charCodeAt(t.position+1),rl(f)&&(h=E=!0,t.position++,as(t,!0,e))),s=t.line,yE(t,e,yx,!1,!0),I=t.tag,P=t.result,as(t,!0,e),N=t.input.charCodeAt(t.position),(E||t.line===s)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),as(t,!0,e),yE(t,e,yx,!1,!0),R=t.result),C?mE(t,n,S,I,P,R):h?n.push(mE(t,null,S,I,P,R)):n.push(P),as(t,!0,e),N=t.input.charCodeAt(t.position),N===44?(r=!0,N=t.input.charCodeAt(++t.position)):r=!1}Rr(t,\"unexpected end of the stream within a flow collection\")}function x9e(t,e){var r,s,a=XU,n=!1,c=!1,f=e,p=0,h=!1,E,C;if(C=t.input.charCodeAt(t.position),C===124)s=!1;else if(C===62)s=!0;else return!1;for(t.kind=\"scalar\",t.result=\"\";C!==0;)if(C=t.input.charCodeAt(++t.position),C===43||C===45)XU===a?a=C===43?Ste:d9e:Rr(t,\"repeat of a chomping mode identifier\");else if((E=w9e(C))>=0)E===0?Rr(t,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):c?Rr(t,\"repeat of an indentation width identifier\"):(f=e+E-1,c=!0);else break;if(Qd(C)){do C=t.input.charCodeAt(++t.position);while(Qd(C));if(C===35)do C=t.input.charCodeAt(++t.position);while(!jf(C)&&C!==0)}for(;C!==0;){for(ZU(t),t.lineIndent=0,C=t.input.charCodeAt(t.position);(!c||t.lineIndent<f)&&C===32;)t.lineIndent++,C=t.input.charCodeAt(++t.position);if(!c&&t.lineIndent>f&&(f=t.lineIndent),jf(C)){p++;continue}if(t.lineIndent<f){a===Ste?t.result+=Ip.repeat(`\n`,n?1+p:p):a===XU&&n&&(t.result+=`\n`);break}for(s?Qd(C)?(h=!0,t.result+=Ip.repeat(`\n`,n?1+p:p)):h?(h=!1,t.result+=Ip.repeat(`\n`,p+1)):p===0?n&&(t.result+=\" \"):t.result+=Ip.repeat(`\n`,p):t.result+=Ip.repeat(`\n`,n?1+p:p),n=!0,c=!0,p=0,r=t.position;!jf(C)&&C!==0;)C=t.input.charCodeAt(++t.position);n0(t,r,t.position,!1)}return!0}function kte(t,e){var r,s=t.tag,a=t.anchor,n=[],c,f=!1,p;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(t.position);p!==0&&!(p!==45||(c=t.input.charCodeAt(t.position+1),!rl(c)));){if(f=!0,t.position++,as(t,!0,-1)&&t.lineIndent<=e){n.push(null),p=t.input.charCodeAt(t.position);continue}if(r=t.line,yE(t,e,Fte,!1,!0),n.push(t.result),as(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&p!==0)Rr(t,\"bad indentation of a sequence entry\");else if(t.lineIndent<e)break}return f?(t.tag=s,t.anchor=a,t.kind=\"sequence\",t.result=n,!0):!1}function k9e(t,e,r){var s,a,n,c,f=t.tag,p=t.anchor,h={},E={},C=null,S=null,P=null,I=!1,R=!1,N;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),N=t.input.charCodeAt(t.position);N!==0;){if(s=t.input.charCodeAt(t.position+1),n=t.line,c=t.position,(N===63||N===58)&&rl(s))N===63?(I&&(mE(t,h,E,C,S,null),C=S=P=null),R=!0,I=!0,a=!0):I?(I=!1,a=!0):Rr(t,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),t.position+=1,N=s;else if(yE(t,r,Rte,!1,!0))if(t.line===n){for(N=t.input.charCodeAt(t.position);Qd(N);)N=t.input.charCodeAt(++t.position);if(N===58)N=t.input.charCodeAt(++t.position),rl(N)||Rr(t,\"a whitespace character is expected after the key-value separator within a block mapping\"),I&&(mE(t,h,E,C,S,null),C=S=P=null),R=!0,I=!1,a=!1,C=t.tag,S=t.result;else if(R)Rr(t,\"can not read an implicit mapping pair; a colon is missed\");else return t.tag=f,t.anchor=p,!0}else if(R)Rr(t,\"can not read a block mapping entry; a multiline key may not be an implicit key\");else return t.tag=f,t.anchor=p,!0;else break;if((t.line===n||t.lineIndent>e)&&(yE(t,e,Ex,!0,a)&&(I?S=t.result:P=t.result),I||(mE(t,h,E,C,S,P,n,c),C=S=P=null),as(t,!0,-1),N=t.input.charCodeAt(t.position)),t.lineIndent>e&&N!==0)Rr(t,\"bad indentation of a mapping entry\");else if(t.lineIndent<e)break}return I&&mE(t,h,E,C,S,null),R&&(t.tag=f,t.anchor=p,t.kind=\"mapping\",t.result=h),R}function Q9e(t){var e,r=!1,s=!1,a,n,c;if(c=t.input.charCodeAt(t.position),c!==33)return!1;if(t.tag!==null&&Rr(t,\"duplication of a tag property\"),c=t.input.charCodeAt(++t.position),c===60?(r=!0,c=t.input.charCodeAt(++t.position)):c===33?(s=!0,a=\"!!\",c=t.input.charCodeAt(++t.position)):a=\"!\",e=t.position,r){do c=t.input.charCodeAt(++t.position);while(c!==0&&c!==62);t.position<t.length?(n=t.input.slice(e,t.position),c=t.input.charCodeAt(++t.position)):Rr(t,\"unexpected end of the stream within a verbatim tag\")}else{for(;c!==0&&!rl(c);)c===33&&(s?Rr(t,\"tag suffix cannot contain exclamation marks\"):(a=t.input.slice(e-1,t.position+1),Nte.test(a)||Rr(t,\"named tag handle cannot contain such characters\"),s=!0,e=t.position+1)),c=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),E9e.test(n)&&Rr(t,\"tag suffix cannot contain flow indicator characters\")}return n&&!Ote.test(n)&&Rr(t,\"tag name cannot contain such characters: \"+n),r?t.tag=n:i0.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a===\"!\"?t.tag=\"!\"+n:a===\"!!\"?t.tag=\"tag:yaml.org,2002:\"+n:Rr(t,'undeclared tag handle \"'+a+'\"'),!0}function T9e(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Rr(t,\"duplication of an anchor property\"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!rl(r)&&!dE(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Rr(t,\"name of an anchor node must contain at least one character\"),t.anchor=t.input.slice(e,t.position),!0}function R9e(t){var e,r,s;if(s=t.input.charCodeAt(t.position),s!==42)return!1;for(s=t.input.charCodeAt(++t.position),e=t.position;s!==0&&!rl(s)&&!dE(s);)s=t.input.charCodeAt(++t.position);return t.position===e&&Rr(t,\"name of an alias node must contain at least one character\"),r=t.input.slice(e,t.position),i0.call(t.anchorMap,r)||Rr(t,'unidentified alias \"'+r+'\"'),t.result=t.anchorMap[r],as(t,!0,-1),!0}function yE(t,e,r,s,a){var n,c,f,p=1,h=!1,E=!1,C,S,P,I,R;if(t.listener!==null&&t.listener(\"open\",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=c=f=Ex===r||Fte===r,s&&as(t,!0,-1)&&(h=!0,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)),p===1)for(;Q9e(t)||T9e(t);)as(t,!0,-1)?(h=!0,f=n,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)):f=!1;if(f&&(f=h||a),(p===1||Ex===r)&&(yx===r||Rte===r?I=e:I=e+1,R=t.position-t.lineStart,p===1?f&&(kte(t,R)||k9e(t,R,I))||P9e(t,I)?E=!0:(c&&x9e(t,I)||D9e(t,I)||b9e(t,I)?E=!0:R9e(t)?(E=!0,(t.tag!==null||t.anchor!==null)&&Rr(t,\"alias node should not have any properties\")):S9e(t,I,yx===r)&&(E=!0,t.tag===null&&(t.tag=\"?\")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):p===0&&(E=f&&kte(t,R))),t.tag!==null&&t.tag!==\"!\")if(t.tag===\"?\"){for(t.result!==null&&t.kind!==\"scalar\"&&Rr(t,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+t.kind+'\"'),C=0,S=t.implicitTypes.length;C<S;C+=1)if(P=t.implicitTypes[C],P.resolve(t.result)){t.result=P.construct(t.result),t.tag=P.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else i0.call(t.typeMap[t.kind||\"fallback\"],t.tag)?(P=t.typeMap[t.kind||\"fallback\"][t.tag],t.result!==null&&P.kind!==t.kind&&Rr(t,\"unacceptable node kind for !<\"+t.tag+'> tag; it should be \"'+P.kind+'\", not \"'+t.kind+'\"'),P.resolve(t.result)?(t.result=P.construct(t.result),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Rr(t,\"cannot resolve a node with !<\"+t.tag+\"> explicit tag\")):Rr(t,\"unknown tag !<\"+t.tag+\">\");return t.listener!==null&&t.listener(\"close\",t),t.tag!==null||t.anchor!==null||E}function F9e(t){var e=t.position,r,s,a,n=!1,c;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};(c=t.input.charCodeAt(t.position))!==0&&(as(t,!0,-1),c=t.input.charCodeAt(t.position),!(t.lineIndent>0||c!==37));){for(n=!0,c=t.input.charCodeAt(++t.position),r=t.position;c!==0&&!rl(c);)c=t.input.charCodeAt(++t.position);for(s=t.input.slice(r,t.position),a=[],s.length<1&&Rr(t,\"directive name must not be less than one character in length\");c!==0;){for(;Qd(c);)c=t.input.charCodeAt(++t.position);if(c===35){do c=t.input.charCodeAt(++t.position);while(c!==0&&!jf(c));break}if(jf(c))break;for(r=t.position;c!==0&&!rl(c);)c=t.input.charCodeAt(++t.position);a.push(t.input.slice(r,t.position))}c!==0&&ZU(t),i0.call(Pte,s)?Pte[s](t,s,a):Ix(t,'unknown document directive \"'+s+'\"')}if(as(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,as(t,!0,-1)):n&&Rr(t,\"directives end mark is expected\"),yE(t,t.lineIndent-1,Ex,!1,!0),as(t,!0,-1),t.checkLineBreaks&&y9e.test(t.input.slice(e,t.position))&&Ix(t,\"non-ASCII line breaks are interpreted as content\"),t.documents.push(t.result),t.position===t.lineStart&&Cx(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,as(t,!0,-1));return}if(t.position<t.length-1)Rr(t,\"end of the stream or a document separator is expected\");else return}function _te(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`\n`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new v9e(t,e),s=t.indexOf(\"\\0\");for(s!==-1&&(r.position=s,Rr(r,\"null byte is not allowed in input\")),r.input+=\"\\0\";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)F9e(r);return r.documents}function Hte(t,e,r){e!==null&&typeof e==\"object\"&&typeof r>\"u\"&&(r=e,e=null);var s=_te(t,r);if(typeof e!=\"function\")return s;for(var a=0,n=s.length;a<n;a+=1)e(s[a])}function jte(t,e){var r=_te(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Qte(\"expected a single document in the stream, but found more\")}}function N9e(t,e,r){return typeof e==\"object\"&&e!==null&&typeof r>\"u\"&&(r=e,e=null),Hte(t,e,Ip.extend({schema:Tte},r))}function O9e(t,e){return jte(t,Ip.extend({schema:Tte},e))}q2.exports.loadAll=Hte;q2.exports.load=jte;q2.exports.safeLoadAll=N9e;q2.exports.safeLoad=O9e});var Are=_((QQt,n_)=>{\"use strict\";var Y2=bd(),V2=pE(),L9e=G2(),M9e=gE(),Xte=Object.prototype.toString,Zte=Object.prototype.hasOwnProperty,U9e=9,W2=10,_9e=13,H9e=32,j9e=33,G9e=34,$te=35,q9e=37,W9e=38,Y9e=39,V9e=42,ere=44,J9e=45,tre=58,K9e=61,z9e=62,X9e=63,Z9e=64,rre=91,nre=93,$9e=96,ire=123,eWe=124,sre=125,_o={};_o[0]=\"\\\\0\";_o[7]=\"\\\\a\";_o[8]=\"\\\\b\";_o[9]=\"\\\\t\";_o[10]=\"\\\\n\";_o[11]=\"\\\\v\";_o[12]=\"\\\\f\";_o[13]=\"\\\\r\";_o[27]=\"\\\\e\";_o[34]='\\\\\"';_o[92]=\"\\\\\\\\\";_o[133]=\"\\\\N\";_o[160]=\"\\\\_\";_o[8232]=\"\\\\L\";_o[8233]=\"\\\\P\";var tWe=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"];function rWe(t,e){var r,s,a,n,c,f,p;if(e===null)return{};for(r={},s=Object.keys(e),a=0,n=s.length;a<n;a+=1)c=s[a],f=String(e[c]),c.slice(0,2)===\"!!\"&&(c=\"tag:yaml.org,2002:\"+c.slice(2)),p=t.compiledTypeMap.fallback[c],p&&Zte.call(p.styleAliases,f)&&(f=p.styleAliases[f]),r[c]=f;return r}function qte(t){var e,r,s;if(e=t.toString(16).toUpperCase(),t<=255)r=\"x\",s=2;else if(t<=65535)r=\"u\",s=4;else if(t<=4294967295)r=\"U\",s=8;else throw new V2(\"code point within a string may not be greater than 0xFFFFFFFF\");return\"\\\\\"+r+Y2.repeat(\"0\",s-e.length)+e}function nWe(t){this.schema=t.schema||L9e,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Y2.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=rWe(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function Wte(t,e){for(var r=Y2.repeat(\" \",e),s=0,a=-1,n=\"\",c,f=t.length;s<f;)a=t.indexOf(`\n`,s),a===-1?(c=t.slice(s),s=f):(c=t.slice(s,a+1),s=a+1),c.length&&c!==`\n`&&(n+=r),n+=c;return n}function e_(t,e){return`\n`+Y2.repeat(\" \",t.indent*e)}function iWe(t,e){var r,s,a;for(r=0,s=t.implicitTypes.length;r<s;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}function r_(t){return t===H9e||t===U9e}function EE(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function sWe(t){return EE(t)&&!r_(t)&&t!==65279&&t!==_9e&&t!==W2}function Yte(t,e){return EE(t)&&t!==65279&&t!==ere&&t!==rre&&t!==nre&&t!==ire&&t!==sre&&t!==tre&&(t!==$te||e&&sWe(e))}function oWe(t){return EE(t)&&t!==65279&&!r_(t)&&t!==J9e&&t!==X9e&&t!==tre&&t!==ere&&t!==rre&&t!==nre&&t!==ire&&t!==sre&&t!==$te&&t!==W9e&&t!==V9e&&t!==j9e&&t!==eWe&&t!==K9e&&t!==z9e&&t!==Y9e&&t!==G9e&&t!==q9e&&t!==Z9e&&t!==$9e}function ore(t){var e=/^\\n* /;return e.test(t)}var are=1,lre=2,cre=3,ure=4,wx=5;function aWe(t,e,r,s,a){var n,c,f,p=!1,h=!1,E=s!==-1,C=-1,S=oWe(t.charCodeAt(0))&&!r_(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(c=t.charCodeAt(n),!EE(c))return wx;f=n>0?t.charCodeAt(n-1):null,S=S&&Yte(c,f)}else{for(n=0;n<t.length;n++){if(c=t.charCodeAt(n),c===W2)p=!0,E&&(h=h||n-C-1>s&&t[C+1]!==\" \",C=n);else if(!EE(c))return wx;f=n>0?t.charCodeAt(n-1):null,S=S&&Yte(c,f)}h=h||E&&n-C-1>s&&t[C+1]!==\" \"}return!p&&!h?S&&!a(t)?are:lre:r>9&&ore(t)?wx:h?ure:cre}function lWe(t,e,r,s){t.dump=function(){if(e.length===0)return\"''\";if(!t.noCompatMode&&tWe.indexOf(e)!==-1)return\"'\"+e+\"'\";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),c=s||t.flowLevel>-1&&r>=t.flowLevel;function f(p){return iWe(t,p)}switch(aWe(e,c,t.indent,n,f)){case are:return e;case lre:return\"'\"+e.replace(/'/g,\"''\")+\"'\";case cre:return\"|\"+Vte(e,t.indent)+Jte(Wte(e,a));case ure:return\">\"+Vte(e,t.indent)+Jte(Wte(cWe(e,n),a));case wx:return'\"'+uWe(e,n)+'\"';default:throw new V2(\"impossible error: invalid scalar style\")}}()}function Vte(t,e){var r=ore(t)?String(e):\"\",s=t[t.length-1]===`\n`,a=s&&(t[t.length-2]===`\n`||t===`\n`),n=a?\"+\":s?\"\":\"-\";return r+n+`\n`}function Jte(t){return t[t.length-1]===`\n`?t.slice(0,-1):t}function cWe(t,e){for(var r=/(\\n+)([^\\n]*)/g,s=function(){var h=t.indexOf(`\n`);return h=h!==-1?h:t.length,r.lastIndex=h,Kte(t.slice(0,h),e)}(),a=t[0]===`\n`||t[0]===\" \",n,c;c=r.exec(t);){var f=c[1],p=c[2];n=p[0]===\" \",s+=f+(!a&&!n&&p!==\"\"?`\n`:\"\")+Kte(p,e),a=n}return s}function Kte(t,e){if(t===\"\"||t[0]===\" \")return t;for(var r=/ [^ ]/g,s,a=0,n,c=0,f=0,p=\"\";s=r.exec(t);)f=s.index,f-a>e&&(n=c>a?c:f,p+=`\n`+t.slice(a,n),a=n+1),c=f;return p+=`\n`,t.length-a>e&&c>a?p+=t.slice(a,c)+`\n`+t.slice(c+1):p+=t.slice(a),p.slice(1)}function uWe(t){for(var e=\"\",r,s,a,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(s=t.charCodeAt(n+1),s>=56320&&s<=57343)){e+=qte((r-55296)*1024+s-56320+65536),n++;continue}a=_o[r],e+=!a&&EE(r)?t[n]:a||qte(r)}return e}function fWe(t,e,r){var s=\"\",a=t.tag,n,c;for(n=0,c=r.length;n<c;n+=1)Td(t,e,r[n],!1,!1)&&(n!==0&&(s+=\",\"+(t.condenseFlow?\"\":\" \")),s+=t.dump);t.tag=a,t.dump=\"[\"+s+\"]\"}function AWe(t,e,r,s){var a=\"\",n=t.tag,c,f;for(c=0,f=r.length;c<f;c+=1)Td(t,e+1,r[c],!0,!0)&&((!s||c!==0)&&(a+=e_(t,e)),t.dump&&W2===t.dump.charCodeAt(0)?a+=\"-\":a+=\"- \",a+=t.dump);t.tag=n,t.dump=a||\"[]\"}function pWe(t,e,r){var s=\"\",a=t.tag,n=Object.keys(r),c,f,p,h,E;for(c=0,f=n.length;c<f;c+=1)E=\"\",c!==0&&(E+=\", \"),t.condenseFlow&&(E+='\"'),p=n[c],h=r[p],Td(t,e,p,!1,!1)&&(t.dump.length>1024&&(E+=\"? \"),E+=t.dump+(t.condenseFlow?'\"':\"\")+\":\"+(t.condenseFlow?\"\":\" \"),Td(t,e,h,!1,!1)&&(E+=t.dump,s+=E));t.tag=a,t.dump=\"{\"+s+\"}\"}function hWe(t,e,r,s){var a=\"\",n=t.tag,c=Object.keys(r),f,p,h,E,C,S;if(t.sortKeys===!0)c.sort();else if(typeof t.sortKeys==\"function\")c.sort(t.sortKeys);else if(t.sortKeys)throw new V2(\"sortKeys must be a boolean or a function\");for(f=0,p=c.length;f<p;f+=1)S=\"\",(!s||f!==0)&&(S+=e_(t,e)),h=c[f],E=r[h],Td(t,e+1,h,!0,!0,!0)&&(C=t.tag!==null&&t.tag!==\"?\"||t.dump&&t.dump.length>1024,C&&(t.dump&&W2===t.dump.charCodeAt(0)?S+=\"?\":S+=\"? \"),S+=t.dump,C&&(S+=e_(t,e)),Td(t,e+1,E,!0,C)&&(t.dump&&W2===t.dump.charCodeAt(0)?S+=\":\":S+=\": \",S+=t.dump,a+=S));t.tag=n,t.dump=a||\"{}\"}function zte(t,e,r){var s,a,n,c,f,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,c=a.length;n<c;n+=1)if(f=a[n],(f.instanceOf||f.predicate)&&(!f.instanceOf||typeof e==\"object\"&&e instanceof f.instanceOf)&&(!f.predicate||f.predicate(e))){if(t.tag=r?f.tag:\"?\",f.represent){if(p=t.styleMap[f.tag]||f.defaultStyle,Xte.call(f.represent)===\"[object Function]\")s=f.represent(e,p);else if(Zte.call(f.represent,p))s=f.represent[p](e,p);else throw new V2(\"!<\"+f.tag+'> tag resolver accepts not \"'+p+'\" style');t.dump=s}return!0}return!1}function Td(t,e,r,s,a,n){t.tag=null,t.dump=r,zte(t,r,!1)||zte(t,r,!0);var c=Xte.call(t.dump);s&&(s=t.flowLevel<0||t.flowLevel>e);var f=c===\"[object Object]\"||c===\"[object Array]\",p,h;if(f&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!==\"?\"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump=\"*ref_\"+p;else{if(f&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),c===\"[object Object]\")s&&Object.keys(t.dump).length!==0?(hWe(t,e,t.dump,a),h&&(t.dump=\"&ref_\"+p+t.dump)):(pWe(t,e,t.dump),h&&(t.dump=\"&ref_\"+p+\" \"+t.dump));else if(c===\"[object Array]\"){var E=t.noArrayIndent&&e>0?e-1:e;s&&t.dump.length!==0?(AWe(t,E,t.dump,a),h&&(t.dump=\"&ref_\"+p+t.dump)):(fWe(t,E,t.dump),h&&(t.dump=\"&ref_\"+p+\" \"+t.dump))}else if(c===\"[object String]\")t.tag!==\"?\"&&lWe(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new V2(\"unacceptable kind of an object to dump \"+c)}t.tag!==null&&t.tag!==\"?\"&&(t.dump=\"!<\"+t.tag+\"> \"+t.dump)}return!0}function gWe(t,e){var r=[],s=[],a,n;for(t_(t,r,s),a=0,n=s.length;a<n;a+=1)e.duplicates.push(r[s[a]]);e.usedDuplicates=new Array(n)}function t_(t,e,r){var s,a,n;if(t!==null&&typeof t==\"object\")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)t_(t[a],e,r);else for(s=Object.keys(t),a=0,n=s.length;a<n;a+=1)t_(t[s[a]],e,r)}function fre(t,e){e=e||{};var r=new nWe(e);return r.noRefs||gWe(t,r),Td(r,0,t,!0,!0)?r.dump+`\n`:\"\"}function dWe(t,e){return fre(t,Y2.extend({schema:M9e},e))}n_.exports.dump=fre;n_.exports.safeDump=dWe});var hre=_((TQt,Wi)=>{\"use strict\";var Bx=Gte(),pre=Are();function vx(t){return function(){throw new Error(\"Function \"+t+\" is deprecated and cannot be used.\")}}Wi.exports.Type=Ss();Wi.exports.Schema=Pd();Wi.exports.FAILSAFE_SCHEMA=dx();Wi.exports.JSON_SCHEMA=JU();Wi.exports.CORE_SCHEMA=KU();Wi.exports.DEFAULT_SAFE_SCHEMA=gE();Wi.exports.DEFAULT_FULL_SCHEMA=G2();Wi.exports.load=Bx.load;Wi.exports.loadAll=Bx.loadAll;Wi.exports.safeLoad=Bx.safeLoad;Wi.exports.safeLoadAll=Bx.safeLoadAll;Wi.exports.dump=pre.dump;Wi.exports.safeDump=pre.safeDump;Wi.exports.YAMLException=pE();Wi.exports.MINIMAL_SCHEMA=dx();Wi.exports.SAFE_SCHEMA=gE();Wi.exports.DEFAULT_SCHEMA=G2();Wi.exports.scan=vx(\"scan\");Wi.exports.parse=vx(\"parse\");Wi.exports.compose=vx(\"compose\");Wi.exports.addConstructor=vx(\"addConstructor\")});var dre=_((RQt,gre)=>{\"use strict\";var mWe=hre();gre.exports=mWe});var yre=_((FQt,mre)=>{\"use strict\";function yWe(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Rd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,Rd)}yWe(Rd,Error);Rd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function EWe(t,e){e=e!==void 0?e:{};var r={},s={Start:lc},a=lc,n=function(te){return[].concat(...te)},c=\"-\",f=dn(\"-\",!1),p=function(te){return te},h=function(te){return Object.assign({},...te)},E=\"#\",C=dn(\"#\",!1),S=Au(),P=function(){return{}},I=\":\",R=dn(\":\",!1),N=function(te,Ee){return{[te]:Ee}},U=\",\",W=dn(\",\",!1),ee=function(te,Ee){return Ee},ie=function(te,Ee,Oe){return Object.assign({},...[te].concat(Ee).map(dt=>({[dt]:Oe})))},ue=function(te){return te},le=function(te){return te},me=Oa(\"correct indentation\"),pe=\" \",Be=dn(\" \",!1),Ce=function(te){return te.length===lr*St},g=function(te){return te.length===(lr+1)*St},we=function(){return lr++,!0},ye=function(){return lr--,!0},Ae=function(){return la()},se=Oa(\"pseudostring\"),Z=/^[^\\r\\n\\t ?:,\\][{}#&*!|>'\"%@`\\-]/,De=Kn([\"\\r\",`\n`,\"\t\",\" \",\"?\",\":\",\",\",\"]\",\"[\",\"{\",\"}\",\"#\",\"&\",\"*\",\"!\",\"|\",\">\",\"'\",'\"',\"%\",\"@\",\"`\",\"-\"],!0,!1),Re=/^[^\\r\\n\\t ,\\][{}:#\"']/,mt=Kn([\"\\r\",`\n`,\"\t\",\" \",\",\",\"]\",\"[\",\"{\",\"}\",\":\",\"#\",'\"',\"'\"],!0,!1),j=function(){return la().replace(/^ *| *$/g,\"\")},rt=\"--\",Fe=dn(\"--\",!1),Ne=/^[a-zA-Z\\/0-9]/,Pe=Kn([[\"a\",\"z\"],[\"A\",\"Z\"],\"/\",[\"0\",\"9\"]],!1,!1),Ve=/^[^\\r\\n\\t :,]/,ke=Kn([\"\\r\",`\n`,\"\t\",\" \",\":\",\",\"],!0,!1),it=\"null\",Ue=dn(\"null\",!1),x=function(){return null},w=\"true\",b=dn(\"true\",!1),y=function(){return!0},F=\"false\",z=dn(\"false\",!1),X=function(){return!1},$=Oa(\"string\"),oe='\"',xe=dn('\"',!1),Te=function(){return\"\"},lt=function(te){return te},Ct=function(te){return te.join(\"\")},qt=/^[^\"\\\\\\0-\\x1F\\x7F]/,ir=Kn(['\"',\"\\\\\",[\"\\0\",\"\u001f\"],\"\\x7F\"],!0,!1),Pt='\\\\\"',gn=dn('\\\\\"',!1),Pr=function(){return'\"'},Ir=\"\\\\\\\\\",Or=dn(\"\\\\\\\\\",!1),on=function(){return\"\\\\\"},ai=\"\\\\/\",Io=dn(\"\\\\/\",!1),rs=function(){return\"/\"},$s=\"\\\\b\",Co=dn(\"\\\\b\",!1),ji=function(){return\"\\b\"},eo=\"\\\\f\",wo=dn(\"\\\\f\",!1),QA=function(){return\"\\f\"},Af=\"\\\\n\",dh=dn(\"\\\\n\",!1),mh=function(){return`\n`},to=\"\\\\r\",jn=dn(\"\\\\r\",!1),Ts=function(){return\"\\r\"},ro=\"\\\\t\",ou=dn(\"\\\\t\",!1),au=function(){return\"\t\"},lu=\"\\\\u\",TA=dn(\"\\\\u\",!1),RA=function(te,Ee,Oe,dt){return String.fromCharCode(parseInt(`0x${te}${Ee}${Oe}${dt}`))},oa=/^[0-9a-fA-F]/,aa=Kn([[\"0\",\"9\"],[\"a\",\"f\"],[\"A\",\"F\"]],!1,!1),FA=Oa(\"blank space\"),gr=/^[ \\t]/,Bo=Kn([\" \",\"\t\"],!1,!1),Me=Oa(\"white space\"),cu=/^[ \\t\\n\\r]/,Cr=Kn([\" \",\"\t\",`\n`,\"\\r\"],!1,!1),pf=`\\r\n`,NA=dn(`\\r\n`,!1),OA=`\n`,uu=dn(`\n`,!1),fu=\"\\r\",oc=dn(\"\\r\",!1),ve=0,Nt=0,ac=[{line:1,column:1}],Oi=0,no=[],Rt=0,xn;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function la(){return t.substring(Nt,ve)}function Gi(){return Ma(Nt,ve)}function Li(te,Ee){throw Ee=Ee!==void 0?Ee:Ma(Nt,ve),hf([Oa(te)],t.substring(Nt,ve),Ee)}function Na(te,Ee){throw Ee=Ee!==void 0?Ee:Ma(Nt,ve),Ua(te,Ee)}function dn(te,Ee){return{type:\"literal\",text:te,ignoreCase:Ee}}function Kn(te,Ee,Oe){return{type:\"class\",parts:te,inverted:Ee,ignoreCase:Oe}}function Au(){return{type:\"any\"}}function yh(){return{type:\"end\"}}function Oa(te){return{type:\"other\",description:te}}function La(te){var Ee=ac[te],Oe;if(Ee)return Ee;for(Oe=te-1;!ac[Oe];)Oe--;for(Ee=ac[Oe],Ee={line:Ee.line,column:Ee.column};Oe<te;)t.charCodeAt(Oe)===10?(Ee.line++,Ee.column=1):Ee.column++,Oe++;return ac[te]=Ee,Ee}function Ma(te,Ee){var Oe=La(te),dt=La(Ee);return{start:{offset:te,line:Oe.line,column:Oe.column},end:{offset:Ee,line:dt.line,column:dt.column}}}function $e(te){ve<Oi||(ve>Oi&&(Oi=ve,no=[]),no.push(te))}function Ua(te,Ee){return new Rd(te,null,null,Ee)}function hf(te,Ee,Oe){return new Rd(Rd.buildMessage(te,Ee),te,Ee,Oe)}function lc(){var te;return te=LA(),te}function wn(){var te,Ee,Oe;for(te=ve,Ee=[],Oe=ca();Oe!==r;)Ee.push(Oe),Oe=ca();return Ee!==r&&(Nt=te,Ee=n(Ee)),te=Ee,te}function ca(){var te,Ee,Oe,dt,Et;return te=ve,Ee=Bl(),Ee!==r?(t.charCodeAt(ve)===45?(Oe=c,ve++):(Oe=r,Rt===0&&$e(f)),Oe!==r?(dt=Qn(),dt!==r?(Et=ua(),Et!==r?(Nt=te,Ee=p(Et),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te}function LA(){var te,Ee,Oe;for(te=ve,Ee=[],Oe=MA();Oe!==r;)Ee.push(Oe),Oe=MA();return Ee!==r&&(Nt=te,Ee=h(Ee)),te=Ee,te}function MA(){var te,Ee,Oe,dt,Et,bt,tr,An,li;if(te=ve,Ee=Qn(),Ee===r&&(Ee=null),Ee!==r){if(Oe=ve,t.charCodeAt(ve)===35?(dt=E,ve++):(dt=r,Rt===0&&$e(C)),dt!==r){if(Et=[],bt=ve,tr=ve,Rt++,An=st(),Rt--,An===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(An=t.charAt(ve),ve++):(An=r,Rt===0&&$e(S)),An!==r?(tr=[tr,An],bt=tr):(ve=bt,bt=r)):(ve=bt,bt=r),bt!==r)for(;bt!==r;)Et.push(bt),bt=ve,tr=ve,Rt++,An=st(),Rt--,An===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(An=t.charAt(ve),ve++):(An=r,Rt===0&&$e(S)),An!==r?(tr=[tr,An],bt=tr):(ve=bt,bt=r)):(ve=bt,bt=r);else Et=r;Et!==r?(dt=[dt,Et],Oe=dt):(ve=Oe,Oe=r)}else ve=Oe,Oe=r;if(Oe===r&&(Oe=null),Oe!==r){if(dt=[],Et=Ke(),Et!==r)for(;Et!==r;)dt.push(Et),Et=Ke();else dt=r;dt!==r?(Nt=te,Ee=P(),te=Ee):(ve=te,te=r)}else ve=te,te=r}else ve=te,te=r;if(te===r&&(te=ve,Ee=Bl(),Ee!==r?(Oe=Ha(),Oe!==r?(dt=Qn(),dt===r&&(dt=null),dt!==r?(t.charCodeAt(ve)===58?(Et=I,ve++):(Et=r,Rt===0&&$e(R)),Et!==r?(bt=Qn(),bt===r&&(bt=null),bt!==r?(tr=ua(),tr!==r?(Nt=te,Ee=N(Oe,tr),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r&&(te=ve,Ee=Bl(),Ee!==r?(Oe=ns(),Oe!==r?(dt=Qn(),dt===r&&(dt=null),dt!==r?(t.charCodeAt(ve)===58?(Et=I,ve++):(Et=r,Rt===0&&$e(R)),Et!==r?(bt=Qn(),bt===r&&(bt=null),bt!==r?(tr=ua(),tr!==r?(Nt=te,Ee=N(Oe,tr),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r))){if(te=ve,Ee=Bl(),Ee!==r)if(Oe=ns(),Oe!==r)if(dt=Qn(),dt!==r)if(Et=pu(),Et!==r){if(bt=[],tr=Ke(),tr!==r)for(;tr!==r;)bt.push(tr),tr=Ke();else bt=r;bt!==r?(Nt=te,Ee=N(Oe,Et),te=Ee):(ve=te,te=r)}else ve=te,te=r;else ve=te,te=r;else ve=te,te=r;else ve=te,te=r;if(te===r)if(te=ve,Ee=Bl(),Ee!==r)if(Oe=ns(),Oe!==r){if(dt=[],Et=ve,bt=Qn(),bt===r&&(bt=null),bt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Rt===0&&$e(W)),tr!==r?(An=Qn(),An===r&&(An=null),An!==r?(li=ns(),li!==r?(Nt=Et,bt=ee(Oe,li),Et=bt):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r),Et!==r)for(;Et!==r;)dt.push(Et),Et=ve,bt=Qn(),bt===r&&(bt=null),bt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Rt===0&&$e(W)),tr!==r?(An=Qn(),An===r&&(An=null),An!==r?(li=ns(),li!==r?(Nt=Et,bt=ee(Oe,li),Et=bt):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r);else dt=r;dt!==r?(Et=Qn(),Et===r&&(Et=null),Et!==r?(t.charCodeAt(ve)===58?(bt=I,ve++):(bt=r,Rt===0&&$e(R)),bt!==r?(tr=Qn(),tr===r&&(tr=null),tr!==r?(An=ua(),An!==r?(Nt=te,Ee=ie(Oe,dt,An),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)}else ve=te,te=r;else ve=te,te=r}return te}function ua(){var te,Ee,Oe,dt,Et,bt,tr;if(te=ve,Ee=ve,Rt++,Oe=ve,dt=st(),dt!==r?(Et=Mt(),Et!==r?(t.charCodeAt(ve)===45?(bt=c,ve++):(bt=r,Rt===0&&$e(f)),bt!==r?(tr=Qn(),tr!==r?(dt=[dt,Et,bt,tr],Oe=dt):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r),Rt--,Oe!==r?(ve=Ee,Ee=void 0):Ee=r,Ee!==r?(Oe=Ke(),Oe!==r?(dt=kn(),dt!==r?(Et=wn(),Et!==r?(bt=fa(),bt!==r?(Nt=te,Ee=ue(Et),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r&&(te=ve,Ee=st(),Ee!==r?(Oe=kn(),Oe!==r?(dt=LA(),dt!==r?(Et=fa(),Et!==r?(Nt=te,Ee=ue(dt),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r))if(te=ve,Ee=cc(),Ee!==r){if(Oe=[],dt=Ke(),dt!==r)for(;dt!==r;)Oe.push(dt),dt=Ke();else Oe=r;Oe!==r?(Nt=te,Ee=le(Ee),te=Ee):(ve=te,te=r)}else ve=te,te=r;return te}function Bl(){var te,Ee,Oe;for(Rt++,te=ve,Ee=[],t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&$e(Be));Oe!==r;)Ee.push(Oe),t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&$e(Be));return Ee!==r?(Nt=ve,Oe=Ce(Ee),Oe?Oe=void 0:Oe=r,Oe!==r?(Ee=[Ee,Oe],te=Ee):(ve=te,te=r)):(ve=te,te=r),Rt--,te===r&&(Ee=r,Rt===0&&$e(me)),te}function Mt(){var te,Ee,Oe;for(te=ve,Ee=[],t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&$e(Be));Oe!==r;)Ee.push(Oe),t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&$e(Be));return Ee!==r?(Nt=ve,Oe=g(Ee),Oe?Oe=void 0:Oe=r,Oe!==r?(Ee=[Ee,Oe],te=Ee):(ve=te,te=r)):(ve=te,te=r),te}function kn(){var te;return Nt=ve,te=we(),te?te=void 0:te=r,te}function fa(){var te;return Nt=ve,te=ye(),te?te=void 0:te=r,te}function Ha(){var te;return te=vl(),te===r&&(te=uc()),te}function ns(){var te,Ee,Oe;if(te=vl(),te===r){if(te=ve,Ee=[],Oe=ja(),Oe!==r)for(;Oe!==r;)Ee.push(Oe),Oe=ja();else Ee=r;Ee!==r&&(Nt=te,Ee=Ae()),te=Ee}return te}function cc(){var te;return te=Mi(),te===r&&(te=Is(),te===r&&(te=vl(),te===r&&(te=uc()))),te}function pu(){var te;return te=Mi(),te===r&&(te=vl(),te===r&&(te=ja())),te}function uc(){var te,Ee,Oe,dt,Et,bt;if(Rt++,te=ve,Z.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&$e(De)),Ee!==r){for(Oe=[],dt=ve,Et=Qn(),Et===r&&(Et=null),Et!==r?(Re.test(t.charAt(ve))?(bt=t.charAt(ve),ve++):(bt=r,Rt===0&&$e(mt)),bt!==r?(Et=[Et,bt],dt=Et):(ve=dt,dt=r)):(ve=dt,dt=r);dt!==r;)Oe.push(dt),dt=ve,Et=Qn(),Et===r&&(Et=null),Et!==r?(Re.test(t.charAt(ve))?(bt=t.charAt(ve),ve++):(bt=r,Rt===0&&$e(mt)),bt!==r?(Et=[Et,bt],dt=Et):(ve=dt,dt=r)):(ve=dt,dt=r);Oe!==r?(Nt=te,Ee=j(),te=Ee):(ve=te,te=r)}else ve=te,te=r;return Rt--,te===r&&(Ee=r,Rt===0&&$e(se)),te}function ja(){var te,Ee,Oe,dt,Et;if(te=ve,t.substr(ve,2)===rt?(Ee=rt,ve+=2):(Ee=r,Rt===0&&$e(Fe)),Ee===r&&(Ee=null),Ee!==r)if(Ne.test(t.charAt(ve))?(Oe=t.charAt(ve),ve++):(Oe=r,Rt===0&&$e(Pe)),Oe!==r){for(dt=[],Ve.test(t.charAt(ve))?(Et=t.charAt(ve),ve++):(Et=r,Rt===0&&$e(ke));Et!==r;)dt.push(Et),Ve.test(t.charAt(ve))?(Et=t.charAt(ve),ve++):(Et=r,Rt===0&&$e(ke));dt!==r?(Nt=te,Ee=j(),te=Ee):(ve=te,te=r)}else ve=te,te=r;else ve=te,te=r;return te}function Mi(){var te,Ee;return te=ve,t.substr(ve,4)===it?(Ee=it,ve+=4):(Ee=r,Rt===0&&$e(Ue)),Ee!==r&&(Nt=te,Ee=x()),te=Ee,te}function Is(){var te,Ee;return te=ve,t.substr(ve,4)===w?(Ee=w,ve+=4):(Ee=r,Rt===0&&$e(b)),Ee!==r&&(Nt=te,Ee=y()),te=Ee,te===r&&(te=ve,t.substr(ve,5)===F?(Ee=F,ve+=5):(Ee=r,Rt===0&&$e(z)),Ee!==r&&(Nt=te,Ee=X()),te=Ee),te}function vl(){var te,Ee,Oe,dt;return Rt++,te=ve,t.charCodeAt(ve)===34?(Ee=oe,ve++):(Ee=r,Rt===0&&$e(xe)),Ee!==r?(t.charCodeAt(ve)===34?(Oe=oe,ve++):(Oe=r,Rt===0&&$e(xe)),Oe!==r?(Nt=te,Ee=Te(),te=Ee):(ve=te,te=r)):(ve=te,te=r),te===r&&(te=ve,t.charCodeAt(ve)===34?(Ee=oe,ve++):(Ee=r,Rt===0&&$e(xe)),Ee!==r?(Oe=gf(),Oe!==r?(t.charCodeAt(ve)===34?(dt=oe,ve++):(dt=r,Rt===0&&$e(xe)),dt!==r?(Nt=te,Ee=lt(Oe),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)),Rt--,te===r&&(Ee=r,Rt===0&&$e($)),te}function gf(){var te,Ee,Oe;if(te=ve,Ee=[],Oe=fc(),Oe!==r)for(;Oe!==r;)Ee.push(Oe),Oe=fc();else Ee=r;return Ee!==r&&(Nt=te,Ee=Ct(Ee)),te=Ee,te}function fc(){var te,Ee,Oe,dt,Et,bt;return qt.test(t.charAt(ve))?(te=t.charAt(ve),ve++):(te=r,Rt===0&&$e(ir)),te===r&&(te=ve,t.substr(ve,2)===Pt?(Ee=Pt,ve+=2):(Ee=r,Rt===0&&$e(gn)),Ee!==r&&(Nt=te,Ee=Pr()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===Ir?(Ee=Ir,ve+=2):(Ee=r,Rt===0&&$e(Or)),Ee!==r&&(Nt=te,Ee=on()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===ai?(Ee=ai,ve+=2):(Ee=r,Rt===0&&$e(Io)),Ee!==r&&(Nt=te,Ee=rs()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===$s?(Ee=$s,ve+=2):(Ee=r,Rt===0&&$e(Co)),Ee!==r&&(Nt=te,Ee=ji()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===eo?(Ee=eo,ve+=2):(Ee=r,Rt===0&&$e(wo)),Ee!==r&&(Nt=te,Ee=QA()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===Af?(Ee=Af,ve+=2):(Ee=r,Rt===0&&$e(dh)),Ee!==r&&(Nt=te,Ee=mh()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===to?(Ee=to,ve+=2):(Ee=r,Rt===0&&$e(jn)),Ee!==r&&(Nt=te,Ee=Ts()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===ro?(Ee=ro,ve+=2):(Ee=r,Rt===0&&$e(ou)),Ee!==r&&(Nt=te,Ee=au()),te=Ee,te===r&&(te=ve,t.substr(ve,2)===lu?(Ee=lu,ve+=2):(Ee=r,Rt===0&&$e(TA)),Ee!==r?(Oe=wi(),Oe!==r?(dt=wi(),dt!==r?(Et=wi(),Et!==r?(bt=wi(),bt!==r?(Nt=te,Ee=RA(Oe,dt,Et,bt),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)))))))))),te}function wi(){var te;return oa.test(t.charAt(ve))?(te=t.charAt(ve),ve++):(te=r,Rt===0&&$e(aa)),te}function Qn(){var te,Ee;if(Rt++,te=[],gr.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&$e(Bo)),Ee!==r)for(;Ee!==r;)te.push(Ee),gr.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&$e(Bo));else te=r;return Rt--,te===r&&(Ee=r,Rt===0&&$e(FA)),te}function Ac(){var te,Ee;if(Rt++,te=[],cu.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&$e(Cr)),Ee!==r)for(;Ee!==r;)te.push(Ee),cu.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&$e(Cr));else te=r;return Rt--,te===r&&(Ee=r,Rt===0&&$e(Me)),te}function Ke(){var te,Ee,Oe,dt,Et,bt;if(te=ve,Ee=st(),Ee!==r){for(Oe=[],dt=ve,Et=Qn(),Et===r&&(Et=null),Et!==r?(bt=st(),bt!==r?(Et=[Et,bt],dt=Et):(ve=dt,dt=r)):(ve=dt,dt=r);dt!==r;)Oe.push(dt),dt=ve,Et=Qn(),Et===r&&(Et=null),Et!==r?(bt=st(),bt!==r?(Et=[Et,bt],dt=Et):(ve=dt,dt=r)):(ve=dt,dt=r);Oe!==r?(Ee=[Ee,Oe],te=Ee):(ve=te,te=r)}else ve=te,te=r;return te}function st(){var te;return t.substr(ve,2)===pf?(te=pf,ve+=2):(te=r,Rt===0&&$e(NA)),te===r&&(t.charCodeAt(ve)===10?(te=OA,ve++):(te=r,Rt===0&&$e(uu)),te===r&&(t.charCodeAt(ve)===13?(te=fu,ve++):(te=r,Rt===0&&$e(oc)))),te}let St=2,lr=0;if(xn=a(),xn!==r&&ve===t.length)return xn;throw xn!==r&&ve<t.length&&$e(yh()),hf(no,Oi<t.length?t.charAt(Oi):null,Oi<t.length?Ma(Oi,Oi+1):Ma(Oi,Oi))}mre.exports={SyntaxError:Rd,parse:EWe}});function Ire(t){return t.match(IWe)?t:JSON.stringify(t)}function wre(t){return typeof t>\"u\"?!0:typeof t==\"object\"&&t!==null&&!Array.isArray(t)?Object.keys(t).every(e=>wre(t[e])):!1}function i_(t,e,r){if(t===null)return`null\n`;if(typeof t==\"number\"||typeof t==\"boolean\")return`${t.toString()}\n`;if(typeof t==\"string\")return`${Ire(t)}\n`;if(Array.isArray(t)){if(t.length===0)return`[]\n`;let s=\"  \".repeat(e);return`\n${t.map(n=>`${s}- ${i_(n,e+1,!1)}`).join(\"\")}`}if(typeof t==\"object\"&&t){let[s,a]=t instanceof Sx?[t.data,!1]:[t,!0],n=\"  \".repeat(e),c=Object.keys(s);a&&c.sort((p,h)=>{let E=Ere.indexOf(p),C=Ere.indexOf(h);return E===-1&&C===-1?p<h?-1:p>h?1:0:E!==-1&&C===-1?-1:E===-1&&C!==-1?1:E-C});let f=c.filter(p=>!wre(s[p])).map((p,h)=>{let E=s[p],C=Ire(p),S=i_(E,e+1,!0),P=h>0||r?n:\"\",I=C.length>1024?`? ${C}\n${P}:`:`${C}:`,R=S.startsWith(`\n`)?S:` ${S}`;return`${P}${I}${R}`}).join(e===0?`\n`:\"\")||`\n`;return r?`\n${f}`:`${f}`}throw new Error(`Unsupported value type (${t})`)}function nl(t){try{let e=i_(t,0,!1);return e!==`\n`?e:\"\"}catch(e){throw e.location&&(e.message=e.message.replace(/(\\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function CWe(t){return t.endsWith(`\n`)||(t+=`\n`),(0,Cre.parse)(t)}function BWe(t){if(wWe.test(t))return CWe(t);let e=(0,Dx.safeLoad)(t,{schema:Dx.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!=\"object\")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error(\"Expected an indexed object, got an array instead. Does your file follow Yaml's rules?\");return e}function ls(t){return BWe(t)}var Dx,Cre,IWe,Ere,Sx,wWe,Bre=Xe(()=>{Dx=ut(dre()),Cre=ut(yre()),IWe=/^(?![-?:,\\][{}#&*!|>'\"%@` \\t\\r\\n]).([ \\t]*(?![,\\][{}:# \\t\\r\\n]).)*$/,Ere=[\"__metadata\",\"version\",\"resolution\",\"dependencies\",\"peerDependencies\",\"dependenciesMeta\",\"peerDependenciesMeta\",\"binaries\"],Sx=class{constructor(e){this.data=e}};nl.PreserveOrdering=Sx;wWe=/^(#.*(\\r?\\n))*?#\\s+yarn\\s+lockfile\\s+v1\\r?\\n/i});var J2={};Vt(J2,{parseResolution:()=>px,parseShell:()=>ux,parseSyml:()=>ls,stringifyArgument:()=>qU,stringifyArgumentSegment:()=>WU,stringifyArithmeticExpression:()=>Ax,stringifyCommand:()=>GU,stringifyCommandChain:()=>AE,stringifyCommandChainThen:()=>jU,stringifyCommandLine:()=>fx,stringifyCommandLineThen:()=>HU,stringifyEnvSegment:()=>cx,stringifyRedirectArgument:()=>H2,stringifyResolution:()=>hx,stringifyShell:()=>fE,stringifyShellLine:()=>fE,stringifySyml:()=>nl,stringifyValueArgument:()=>vd});var wc=Xe(()=>{wee();Dee();Bre()});var Sre=_((UQt,s_)=>{\"use strict\";var vWe=t=>{let e=!1,r=!1,s=!1;for(let a=0;a<t.length;a++){let n=t[a];e&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(t=t.slice(0,a)+\"-\"+t.slice(a),e=!1,s=r,r=!0,a++):r&&s&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,a-1)+\"-\"+t.slice(a-1),s=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,s=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},vre=(t,e)=>{if(!(typeof t==\"string\"||Array.isArray(t)))throw new TypeError(\"Expected the input to be `string | string[]`\");e=Object.assign({pascalCase:!1},e);let r=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join(\"-\"):t=t.trim(),t.length===0?\"\":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=vWe(t)),t=t.replace(/^[_.\\- ]+/,\"\").toLowerCase().replace(/[_.\\- ]+(\\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\\d+(\\w|$)/g,a=>a.toUpperCase()),r(t))};s_.exports=vre;s_.exports.default=vre});var Dre=_((_Qt,SWe)=>{SWe.exports=[{name:\"Agola CI\",constant:\"AGOLA\",env:\"AGOLA_GIT_REF\",pr:\"AGOLA_PULL_REQUEST_ID\"},{name:\"Appcircle\",constant:\"APPCIRCLE\",env:\"AC_APPCIRCLE\"},{name:\"AppVeyor\",constant:\"APPVEYOR\",env:\"APPVEYOR\",pr:\"APPVEYOR_PULL_REQUEST_NUMBER\"},{name:\"AWS CodeBuild\",constant:\"CODEBUILD\",env:\"CODEBUILD_BUILD_ARN\"},{name:\"Azure Pipelines\",constant:\"AZURE_PIPELINES\",env:\"TF_BUILD\",pr:{BUILD_REASON:\"PullRequest\"}},{name:\"Bamboo\",constant:\"BAMBOO\",env:\"bamboo_planKey\"},{name:\"Bitbucket Pipelines\",constant:\"BITBUCKET\",env:\"BITBUCKET_COMMIT\",pr:\"BITBUCKET_PR_ID\"},{name:\"Bitrise\",constant:\"BITRISE\",env:\"BITRISE_IO\",pr:\"BITRISE_PULL_REQUEST\"},{name:\"Buddy\",constant:\"BUDDY\",env:\"BUDDY_WORKSPACE_ID\",pr:\"BUDDY_EXECUTION_PULL_REQUEST_ID\"},{name:\"Buildkite\",constant:\"BUILDKITE\",env:\"BUILDKITE\",pr:{env:\"BUILDKITE_PULL_REQUEST\",ne:\"false\"}},{name:\"CircleCI\",constant:\"CIRCLE\",env:\"CIRCLECI\",pr:\"CIRCLE_PULL_REQUEST\"},{name:\"Cirrus CI\",constant:\"CIRRUS\",env:\"CIRRUS_CI\",pr:\"CIRRUS_PR\"},{name:\"Codefresh\",constant:\"CODEFRESH\",env:\"CF_BUILD_ID\",pr:{any:[\"CF_PULL_REQUEST_NUMBER\",\"CF_PULL_REQUEST_ID\"]}},{name:\"Codemagic\",constant:\"CODEMAGIC\",env:\"CM_BUILD_ID\",pr:\"CM_PULL_REQUEST\"},{name:\"Codeship\",constant:\"CODESHIP\",env:{CI_NAME:\"codeship\"}},{name:\"Drone\",constant:\"DRONE\",env:\"DRONE\",pr:{DRONE_BUILD_EVENT:\"pull_request\"}},{name:\"dsari\",constant:\"DSARI\",env:\"DSARI\"},{name:\"Earthly\",constant:\"EARTHLY\",env:\"EARTHLY_CI\"},{name:\"Expo Application Services\",constant:\"EAS\",env:\"EAS_BUILD\"},{name:\"Gerrit\",constant:\"GERRIT\",env:\"GERRIT_PROJECT\"},{name:\"Gitea Actions\",constant:\"GITEA_ACTIONS\",env:\"GITEA_ACTIONS\"},{name:\"GitHub Actions\",constant:\"GITHUB_ACTIONS\",env:\"GITHUB_ACTIONS\",pr:{GITHUB_EVENT_NAME:\"pull_request\"}},{name:\"GitLab CI\",constant:\"GITLAB\",env:\"GITLAB_CI\",pr:\"CI_MERGE_REQUEST_ID\"},{name:\"GoCD\",constant:\"GOCD\",env:\"GO_PIPELINE_LABEL\"},{name:\"Google Cloud Build\",constant:\"GOOGLE_CLOUD_BUILD\",env:\"BUILDER_OUTPUT\"},{name:\"Harness CI\",constant:\"HARNESS\",env:\"HARNESS_BUILD_ID\"},{name:\"Heroku\",constant:\"HEROKU\",env:{env:\"NODE\",includes:\"/app/.heroku/node/bin/node\"}},{name:\"Hudson\",constant:\"HUDSON\",env:\"HUDSON_URL\"},{name:\"Jenkins\",constant:\"JENKINS\",env:[\"JENKINS_URL\",\"BUILD_ID\"],pr:{any:[\"ghprbPullId\",\"CHANGE_ID\"]}},{name:\"LayerCI\",constant:\"LAYERCI\",env:\"LAYERCI\",pr:\"LAYERCI_PULL_REQUEST\"},{name:\"Magnum CI\",constant:\"MAGNUM\",env:\"MAGNUM\"},{name:\"Netlify CI\",constant:\"NETLIFY\",env:\"NETLIFY\",pr:{env:\"PULL_REQUEST\",ne:\"false\"}},{name:\"Nevercode\",constant:\"NEVERCODE\",env:\"NEVERCODE\",pr:{env:\"NEVERCODE_PULL_REQUEST\",ne:\"false\"}},{name:\"Prow\",constant:\"PROW\",env:\"PROW_JOB_ID\"},{name:\"ReleaseHub\",constant:\"RELEASEHUB\",env:\"RELEASE_BUILD_ID\"},{name:\"Render\",constant:\"RENDER\",env:\"RENDER\",pr:{IS_PULL_REQUEST:\"true\"}},{name:\"Sail CI\",constant:\"SAIL\",env:\"SAILCI\",pr:\"SAIL_PULL_REQUEST_NUMBER\"},{name:\"Screwdriver\",constant:\"SCREWDRIVER\",env:\"SCREWDRIVER\",pr:{env:\"SD_PULL_REQUEST\",ne:\"false\"}},{name:\"Semaphore\",constant:\"SEMAPHORE\",env:\"SEMAPHORE\",pr:\"PULL_REQUEST_NUMBER\"},{name:\"Sourcehut\",constant:\"SOURCEHUT\",env:{CI_NAME:\"sourcehut\"}},{name:\"Strider CD\",constant:\"STRIDER\",env:\"STRIDER\"},{name:\"TaskCluster\",constant:\"TASKCLUSTER\",env:[\"TASK_ID\",\"RUN_ID\"]},{name:\"TeamCity\",constant:\"TEAMCITY\",env:\"TEAMCITY_VERSION\"},{name:\"Travis CI\",constant:\"TRAVIS\",env:\"TRAVIS\",pr:{env:\"TRAVIS_PULL_REQUEST\",ne:\"false\"}},{name:\"Vela\",constant:\"VELA\",env:\"VELA\",pr:{VELA_PULL_REQUEST:\"1\"}},{name:\"Vercel\",constant:\"VERCEL\",env:{any:[\"NOW_BUILDER\",\"VERCEL\"]},pr:\"VERCEL_GIT_PULL_REQUEST_ID\"},{name:\"Visual Studio App Center\",constant:\"APPCENTER\",env:\"APPCENTER_BUILD_ID\"},{name:\"Woodpecker\",constant:\"WOODPECKER\",env:{CI:\"woodpecker\"},pr:{CI_BUILD_EVENT:\"pull_request\"}},{name:\"Xcode Cloud\",constant:\"XCODE_CLOUD\",env:\"CI_XCODE_PROJECT\",pr:\"CI_PULL_REQUEST_NUMBER\"},{name:\"Xcode Server\",constant:\"XCODE_SERVER\",env:\"XCS\"}]});var Fd=_(Ml=>{\"use strict\";var Pre=Dre(),Ds=process.env;Object.defineProperty(Ml,\"_vendors\",{value:Pre.map(function(t){return t.constant})});Ml.name=null;Ml.isPR=null;Pre.forEach(function(t){let r=(Array.isArray(t.env)?t.env:[t.env]).every(function(s){return bre(s)});if(Ml[t.constant]=r,!!r)switch(Ml.name=t.name,typeof t.pr){case\"string\":Ml.isPR=!!Ds[t.pr];break;case\"object\":\"env\"in t.pr?Ml.isPR=t.pr.env in Ds&&Ds[t.pr.env]!==t.pr.ne:\"any\"in t.pr?Ml.isPR=t.pr.any.some(function(s){return!!Ds[s]}):Ml.isPR=bre(t.pr);break;default:Ml.isPR=null}});Ml.isCI=!!(Ds.CI!==\"false\"&&(Ds.BUILD_ID||Ds.BUILD_NUMBER||Ds.CI||Ds.CI_APP_ID||Ds.CI_BUILD_ID||Ds.CI_BUILD_NUMBER||Ds.CI_NAME||Ds.CONTINUOUS_INTEGRATION||Ds.RUN_ID||Ml.name));function bre(t){return typeof t==\"string\"?!!Ds[t]:\"env\"in t?Ds[t.env]&&Ds[t.env].includes(t.includes):\"any\"in t?t.any.some(function(e){return!!Ds[e]}):Object.keys(t).every(function(e){return Ds[e]===t[e]})}});var ei,En,Nd,o_,bx,xre,a_,l_,Px=Xe(()=>{(function(t){t.StartOfInput=\"\\0\",t.EndOfInput=\"\u0001\",t.EndOfPartialInput=\"\u0002\"})(ei||(ei={}));(function(t){t[t.InitialNode=0]=\"InitialNode\",t[t.SuccessNode=1]=\"SuccessNode\",t[t.ErrorNode=2]=\"ErrorNode\",t[t.CustomNode=3]=\"CustomNode\"})(En||(En={}));Nd=-1,o_=/^(-h|--help)(?:=([0-9]+))?$/,bx=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,xre=/^-[a-zA-Z]{2,}$/,a_=/^([^=]+)=([\\s\\S]*)$/,l_=process.env.DEBUG_CLI===\"1\"});var nt,IE,xx,c_,kx=Xe(()=>{Px();nt=class extends Error{constructor(e){super(e),this.clipanion={type:\"usage\"},this.name=\"UsageError\"}},IE=class extends Error{constructor(e,r){if(super(),this.input=e,this.candidates=r,this.clipanion={type:\"none\"},this.name=\"UnknownSyntaxError\",this.candidates.length===0)this.message=\"Command not found, but we're not sure what's the alternative.\";else if(this.candidates.every(s=>s.reason!==null&&s.reason===r[0].reason)){let[{reason:s}]=this.candidates;this.message=`${s}\n\n${this.candidates.map(({usage:a})=>`$ ${a}`).join(`\n`)}`}else if(this.candidates.length===1){let[{usage:s}]=this.candidates;this.message=`Command not found; did you mean:\n\n$ ${s}\n${c_(e)}`}else this.message=`Command not found; did you mean one of:\n\n${this.candidates.map(({usage:s},a)=>`${`${a}.`.padStart(4)} ${s}`).join(`\n`)}\n\n${c_(e)}`}},xx=class extends Error{constructor(e,r){super(),this.input=e,this.usages=r,this.clipanion={type:\"none\"},this.name=\"AmbiguousSyntaxError\",this.message=`Cannot find which to pick amongst the following alternatives:\n\n${this.usages.map((s,a)=>`${`${a}.`.padStart(4)} ${s}`).join(`\n`)}\n\n${c_(e)}`}},c_=t=>`While running ${t.filter(e=>e!==ei.EndOfInput&&e!==ei.EndOfPartialInput).map(e=>{let r=JSON.stringify(e);return e.match(/\\s/)||e.length===0||r!==`\"${e}\"`?r:e}).join(\" \")}`});function DWe(t){let e=t.split(`\n`),r=e.filter(a=>a.match(/\\S/)),s=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(s).trimRight()).join(`\n`)}function Ho(t,{format:e,paragraphs:r}){return t=t.replace(/\\r\\n?/g,`\n`),t=DWe(t),t=t.replace(/^\\n+|\\n+$/g,\"\"),t=t.replace(/^(\\s*)-([^\\n]*?)\\n+/gm,`$1-$2\n\n`),t=t.replace(/\\n(\\n)?\\n*/g,(s,a)=>a||\" \"),r&&(t=t.split(/\\n/).map(s=>{let a=s.match(/^\\s*[*-][\\t ]+(.*)/);if(!a)return s.match(/(.{1,80})(?: |$)/g).join(`\n`);let n=s.length-s.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,\"g\")).map((c,f)=>\" \".repeat(n)+(f===0?\"- \":\"  \")+c).join(`\n`)}).join(`\n\n`)),t=t.replace(/(`+)((?:.|[\\n])*?)\\1/g,(s,a,n)=>e.code(a+n+a)),t=t.replace(/(\\*\\*)((?:.|[\\n])*?)\\1/g,(s,a,n)=>e.bold(a+n+a)),t?`${t}\n`:\"\"}var u_,kre,Qre,f_=Xe(()=>{u_=Array(80).fill(\"\\u2501\");for(let t=0;t<=24;++t)u_[u_.length-t]=`\\x1B[38;5;${232+t}m\\u2501`;kre={header:t=>`\\x1B[1m\\u2501\\u2501\\u2501 ${t}${t.length<75?` ${u_.slice(t.length+5).join(\"\")}`:\":\"}\\x1B[0m`,bold:t=>`\\x1B[1m${t}\\x1B[22m`,error:t=>`\\x1B[31m\\x1B[1m${t}\\x1B[22m\\x1B[39m`,code:t=>`\\x1B[36m${t}\\x1B[39m`},Qre={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function ya(t){return{...t,[K2]:!0}}function Gf(t,e){return typeof t>\"u\"?[t,e]:typeof t==\"object\"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function Qx(t,{mergeName:e=!1}={}){let r=t.match(/^([^:]+): (.*)$/m);if(!r)return\"validation failed\";let[,s,a]=r;return e&&(a=a[0].toLowerCase()+a.slice(1)),a=s!==\".\"||!e?`${s.replace(/^\\.(\\[|$)/,\"$1\")}: ${a}`:`: ${a}`,a}function z2(t,e){return e.length===1?new nt(`${t}${Qx(e[0],{mergeName:!0})}`):new nt(`${t}:\n${e.map(r=>`\n- ${Qx(r)}`).join(\"\")}`)}function Od(t,e,r){if(typeof r>\"u\")return e;let s=[],a=[],n=f=>{let p=e;return e=f,n.bind(null,p)};if(!r(e,{errors:s,coercions:a,coercion:n}))throw z2(`Invalid value for ${t}`,s);for(let[,f]of a)f();return e}var K2,Cp=Xe(()=>{kx();K2=Symbol(\"clipanion/isOption\")});var Ea={};Vt(Ea,{KeyRelationship:()=>qf,TypeAssertionError:()=>o0,applyCascade:()=>$2,as:()=>WWe,assert:()=>jWe,assertWithErrors:()=>GWe,cascade:()=>Nx,fn:()=>YWe,hasAtLeastOneKey:()=>y_,hasExactLength:()=>Ore,hasForbiddenKeys:()=>fYe,hasKeyRelationship:()=>tB,hasMaxLength:()=>JWe,hasMinLength:()=>VWe,hasMutuallyExclusiveKeys:()=>AYe,hasRequiredKeys:()=>uYe,hasUniqueItems:()=>KWe,isArray:()=>Tx,isAtLeast:()=>d_,isAtMost:()=>ZWe,isBase64:()=>oYe,isBoolean:()=>FWe,isDate:()=>OWe,isDict:()=>UWe,isEnum:()=>fo,isHexColor:()=>sYe,isISO8601:()=>iYe,isInExclusiveRange:()=>eYe,isInInclusiveRange:()=>$We,isInstanceOf:()=>HWe,isInteger:()=>m_,isJSON:()=>aYe,isLiteral:()=>Rre,isLowerCase:()=>tYe,isMap:()=>MWe,isNegative:()=>zWe,isNullable:()=>cYe,isNumber:()=>h_,isObject:()=>Fre,isOneOf:()=>g_,isOptional:()=>lYe,isPartial:()=>_We,isPayload:()=>NWe,isPositive:()=>XWe,isRecord:()=>Fx,isSet:()=>LWe,isString:()=>wE,isTuple:()=>Rx,isUUID4:()=>nYe,isUnknown:()=>p_,isUpperCase:()=>rYe,makeTrait:()=>Nre,makeValidator:()=>Wr,matchesRegExp:()=>Z2,softAssert:()=>qWe});function ti(t){return t===null?\"null\":t===void 0?\"undefined\":t===\"\"?\"an empty string\":typeof t==\"symbol\"?`<${t.toString()}>`:Array.isArray(t)?\"an array\":JSON.stringify(t)}function CE(t,e){if(t.length===0)return\"nothing\";if(t.length===1)return ti(t[0]);let r=t.slice(0,-1),s=t[t.length-1],a=t.length>2?`, ${e} `:` ${e} `;return`${r.map(n=>ti(n)).join(\", \")}${a}${ti(s)}`}function s0(t,e){var r,s,a;return typeof e==\"number\"?`${(r=t?.p)!==null&&r!==void 0?r:\".\"}[${e}]`:bWe.test(e)?`${(s=t?.p)!==null&&s!==void 0?s:\"\"}.${e}`:`${(a=t?.p)!==null&&a!==void 0?a:\".\"}[${JSON.stringify(e)}]`}function A_(t,e,r){return t===1?e:r}function mr({errors:t,p:e}={},r){return t?.push(`${e??\".\"}: ${r}`),!1}function TWe(t,e){return r=>{t[e]=r}}function Wf(t,e){return r=>{let s=t[e];return t[e]=r,Wf(t,e).bind(null,s)}}function X2(t,e,r){let s=()=>(t(r()),a),a=()=>(t(e),s);return s}function p_(){return Wr({test:(t,e)=>!0})}function Rre(t){return Wr({test:(e,r)=>e!==t?mr(r,`Expected ${ti(t)} (got ${ti(e)})`):!0})}function wE(){return Wr({test:(t,e)=>typeof t!=\"string\"?mr(e,`Expected a string (got ${ti(t)})`):!0})}function fo(t){let e=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeof a==\"string\"||typeof a==\"number\"),s=new Set(e);return s.size===1?Rre([...s][0]):Wr({test:(a,n)=>s.has(a)?!0:r?mr(n,`Expected one of ${CE(e,\"or\")} (got ${ti(a)})`):mr(n,`Expected a valid enumeration value (got ${ti(a)})`)})}function FWe(){return Wr({test:(t,e)=>{var r;if(typeof t!=\"boolean\"){if(typeof e?.coercions<\"u\"){if(typeof e?.coercion>\"u\")return mr(e,\"Unbound coercion result\");let s=RWe.get(t);if(typeof s<\"u\")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:\".\",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a boolean (got ${ti(t)})`)}return!0}})}function h_(){return Wr({test:(t,e)=>{var r;if(typeof t!=\"number\"){if(typeof e?.coercions<\"u\"){if(typeof e?.coercion>\"u\")return mr(e,\"Unbound coercion result\");let s;if(typeof t==\"string\"){let a;try{a=JSON.parse(t)}catch{}if(typeof a==\"number\")if(JSON.stringify(a)===t)s=a;else return mr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof s<\"u\")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:\".\",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a number (got ${ti(t)})`)}return!0}})}function NWe(t){return Wr({test:(e,r)=>{var s;if(typeof r?.coercions>\"u\")return mr(r,\"The isPayload predicate can only be used with coercion enabled\");if(typeof r.coercion>\"u\")return mr(r,\"Unbound coercion result\");if(typeof e!=\"string\")return mr(r,`Expected a string (got ${ti(e)})`);let a;try{a=JSON.parse(e)}catch{return mr(r,`Expected a JSON string (got ${ti(e)})`)}let n={value:a};return t(a,Object.assign(Object.assign({},r),{coercion:Wf(n,\"value\")}))?(r.coercions.push([(s=r.p)!==null&&s!==void 0?s:\".\",r.coercion.bind(null,n.value)]),!0):!1}})}function OWe(){return Wr({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof e?.coercions<\"u\"){if(typeof e?.coercion>\"u\")return mr(e,\"Unbound coercion result\");let s;if(typeof t==\"string\"&&Tre.test(t))s=new Date(t);else{let a;if(typeof t==\"string\"){let n;try{n=JSON.parse(t)}catch{}typeof n==\"number\"&&(a=n)}else typeof t==\"number\"&&(a=t);if(typeof a<\"u\")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))s=new Date(a*1e3);else return mr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof s<\"u\")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:\".\",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a date (got ${ti(t)})`)}return!0}})}function Tx(t,{delimiter:e}={}){return Wr({test:(r,s)=>{var a;let n=r;if(typeof r==\"string\"&&typeof e<\"u\"&&typeof s?.coercions<\"u\"){if(typeof s?.coercion>\"u\")return mr(s,\"Unbound coercion result\");r=r.split(e)}if(!Array.isArray(r))return mr(s,`Expected an array (got ${ti(r)})`);let c=!0;for(let f=0,p=r.length;f<p&&(c=t(r[f],Object.assign(Object.assign({},s),{p:s0(s,f),coercion:Wf(r,f)}))&&c,!(!c&&s?.errors==null));++f);return r!==n&&s.coercions.push([(a=s.p)!==null&&a!==void 0?a:\".\",s.coercion.bind(null,r)]),c}})}function LWe(t,{delimiter:e}={}){let r=Tx(t,{delimiter:e});return Wr({test:(s,a)=>{var n,c;if(Object.getPrototypeOf(s).toString()===\"[object Set]\")if(typeof a?.coercions<\"u\"){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");let f=[...s],p=[...s];if(!r(p,Object.assign(Object.assign({},a),{coercion:void 0})))return!1;let h=()=>p.some((E,C)=>E!==f[C])?new Set(p):s;return a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",X2(a.coercion,s,h)]),!0}else{let f=!0;for(let p of s)if(f=t(p,Object.assign({},a))&&f,!f&&a?.errors==null)break;return f}if(typeof a?.coercions<\"u\"){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");let f={value:s};return r(s,Object.assign(Object.assign({},a),{coercion:Wf(f,\"value\")}))?(a.coercions.push([(c=a.p)!==null&&c!==void 0?c:\".\",X2(a.coercion,s,()=>new Set(f.value))]),!0):!1}return mr(a,`Expected a set (got ${ti(s)})`)}})}function MWe(t,e){let r=Tx(Rx([t,e])),s=Fx(e,{keys:t});return Wr({test:(a,n)=>{var c,f,p;if(Object.getPrototypeOf(a).toString()===\"[object Map]\")if(typeof n?.coercions<\"u\"){if(typeof n?.coercion>\"u\")return mr(n,\"Unbound coercion result\");let h=[...a],E=[...a];if(!r(E,Object.assign(Object.assign({},n),{coercion:void 0})))return!1;let C=()=>E.some((S,P)=>S[0]!==h[P][0]||S[1]!==h[P][1])?new Map(E):a;return n.coercions.push([(c=n.p)!==null&&c!==void 0?c:\".\",X2(n.coercion,a,C)]),!0}else{let h=!0;for(let[E,C]of a)if(h=t(E,Object.assign({},n))&&h,!h&&n?.errors==null||(h=e(C,Object.assign(Object.assign({},n),{p:s0(n,E)}))&&h,!h&&n?.errors==null))break;return h}if(typeof n?.coercions<\"u\"){if(typeof n?.coercion>\"u\")return mr(n,\"Unbound coercion result\");let h={value:a};return Array.isArray(a)?r(a,Object.assign(Object.assign({},n),{coercion:void 0}))?(n.coercions.push([(f=n.p)!==null&&f!==void 0?f:\".\",X2(n.coercion,a,()=>new Map(h.value))]),!0):!1:s(a,Object.assign(Object.assign({},n),{coercion:Wf(h,\"value\")}))?(n.coercions.push([(p=n.p)!==null&&p!==void 0?p:\".\",X2(n.coercion,a,()=>new Map(Object.entries(h.value)))]),!0):!1}return mr(n,`Expected a map (got ${ti(a)})`)}})}function Rx(t,{delimiter:e}={}){let r=Ore(t.length);return Wr({test:(s,a)=>{var n;if(typeof s==\"string\"&&typeof e<\"u\"&&typeof a?.coercions<\"u\"){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");s=s.split(e),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",a.coercion.bind(null,s)])}if(!Array.isArray(s))return mr(a,`Expected a tuple (got ${ti(s)})`);let c=r(s,Object.assign({},a));for(let f=0,p=s.length;f<p&&f<t.length&&(c=t[f](s[f],Object.assign(Object.assign({},a),{p:s0(a,f),coercion:Wf(s,f)}))&&c,!(!c&&a?.errors==null));++f);return c}})}function Fx(t,{keys:e=null}={}){let r=Tx(Rx([e??wE(),t]));return Wr({test:(s,a)=>{var n;if(Array.isArray(s)&&typeof a?.coercions<\"u\")return typeof a?.coercion>\"u\"?mr(a,\"Unbound coercion result\"):r(s,Object.assign(Object.assign({},a),{coercion:void 0}))?(s=Object.fromEntries(s),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",a.coercion.bind(null,s)]),!0):!1;if(typeof s!=\"object\"||s===null)return mr(a,`Expected an object (got ${ti(s)})`);let c=Object.keys(s),f=!0;for(let p=0,h=c.length;p<h&&(f||a?.errors!=null);++p){let E=c[p],C=s[E];if(E===\"__proto__\"||E===\"constructor\"){f=mr(Object.assign(Object.assign({},a),{p:s0(a,E)}),\"Unsafe property name\");continue}if(e!==null&&!e(E,a)){f=!1;continue}if(!t(C,Object.assign(Object.assign({},a),{p:s0(a,E),coercion:Wf(s,E)}))){f=!1;continue}}return f}})}function UWe(t,e={}){return Fx(t,e)}function Fre(t,{extra:e=null}={}){let r=Object.keys(t),s=Wr({test:(a,n)=>{if(typeof a!=\"object\"||a===null)return mr(n,`Expected an object (got ${ti(a)})`);let c=new Set([...r,...Object.keys(a)]),f={},p=!0;for(let h of c){if(h===\"constructor\"||h===\"__proto__\")p=mr(Object.assign(Object.assign({},n),{p:s0(n,h)}),\"Unsafe property name\");else{let E=Object.prototype.hasOwnProperty.call(t,h)?t[h]:void 0,C=Object.prototype.hasOwnProperty.call(a,h)?a[h]:void 0;typeof E<\"u\"?p=E(C,Object.assign(Object.assign({},n),{p:s0(n,h),coercion:Wf(a,h)}))&&p:e===null?p=mr(Object.assign(Object.assign({},n),{p:s0(n,h)}),`Extraneous property (got ${ti(C)})`):Object.defineProperty(f,h,{enumerable:!0,get:()=>C,set:TWe(a,h)})}if(!p&&n?.errors==null)break}return e!==null&&(p||n?.errors!=null)&&(p=e(f,n)&&p),p}});return Object.assign(s,{properties:t})}function _We(t){return Fre(t,{extra:Fx(p_())})}function Nre(t){return()=>t}function Wr({test:t}){return Nre(t)()}function jWe(t,e){if(!e(t))throw new o0}function GWe(t,e){let r=[];if(!e(t,{errors:r}))throw new o0({errors:r})}function qWe(t,e){}function WWe(t,e,{coerce:r=!1,errors:s,throw:a}={}){let n=s?[]:void 0;if(!r){if(e(t,{errors:n}))return a?t:{value:t,errors:void 0};if(a)throw new o0({errors:n});return{value:void 0,errors:n??!0}}let c={value:t},f=Wf(c,\"value\"),p=[];if(!e(t,{errors:n,coercion:f,coercions:p})){if(a)throw new o0({errors:n});return{value:void 0,errors:n??!0}}for(let[,h]of p)h();return a?c.value:{value:c.value,errors:void 0}}function YWe(t,e){let r=Rx(t);return(...s)=>{if(!r(s))throw new o0;return e(...s)}}function VWe(t){return Wr({test:(e,r)=>e.length>=t?!0:mr(r,`Expected to have a length of at least ${t} elements (got ${e.length})`)})}function JWe(t){return Wr({test:(e,r)=>e.length<=t?!0:mr(r,`Expected to have a length of at most ${t} elements (got ${e.length})`)})}function Ore(t){return Wr({test:(e,r)=>e.length!==t?mr(r,`Expected to have a length of exactly ${t} elements (got ${e.length})`):!0})}function KWe({map:t}={}){return Wr({test:(e,r)=>{let s=new Set,a=new Set;for(let n=0,c=e.length;n<c;++n){let f=e[n],p=typeof t<\"u\"?t(f):f;if(s.has(p)){if(a.has(p))continue;mr(r,`Expected to contain unique elements; got a duplicate with ${ti(e)}`),a.add(p)}else s.add(p)}return a.size===0}})}function zWe(){return Wr({test:(t,e)=>t<=0?!0:mr(e,`Expected to be negative (got ${t})`)})}function XWe(){return Wr({test:(t,e)=>t>=0?!0:mr(e,`Expected to be positive (got ${t})`)})}function d_(t){return Wr({test:(e,r)=>e>=t?!0:mr(r,`Expected to be at least ${t} (got ${e})`)})}function ZWe(t){return Wr({test:(e,r)=>e<=t?!0:mr(r,`Expected to be at most ${t} (got ${e})`)})}function $We(t,e){return Wr({test:(r,s)=>r>=t&&r<=e?!0:mr(s,`Expected to be in the [${t}; ${e}] range (got ${r})`)})}function eYe(t,e){return Wr({test:(r,s)=>r>=t&&r<e?!0:mr(s,`Expected to be in the [${t}; ${e}[ range (got ${r})`)})}function m_({unsafe:t=!1}={}){return Wr({test:(e,r)=>e!==Math.round(e)?mr(r,`Expected to be an integer (got ${e})`):!t&&!Number.isSafeInteger(e)?mr(r,`Expected to be a safe integer (got ${e})`):!0})}function Z2(t){return Wr({test:(e,r)=>t.test(e)?!0:mr(r,`Expected to match the pattern ${t.toString()} (got ${ti(e)})`)})}function tYe(){return Wr({test:(t,e)=>t!==t.toLowerCase()?mr(e,`Expected to be all-lowercase (got ${t})`):!0})}function rYe(){return Wr({test:(t,e)=>t!==t.toUpperCase()?mr(e,`Expected to be all-uppercase (got ${t})`):!0})}function nYe(){return Wr({test:(t,e)=>QWe.test(t)?!0:mr(e,`Expected to be a valid UUID v4 (got ${ti(t)})`)})}function iYe(){return Wr({test:(t,e)=>Tre.test(t)?!0:mr(e,`Expected to be a valid ISO 8601 date string (got ${ti(t)})`)})}function sYe({alpha:t=!1}){return Wr({test:(e,r)=>(t?PWe.test(e):xWe.test(e))?!0:mr(r,`Expected to be a valid hexadecimal color string (got ${ti(e)})`)})}function oYe(){return Wr({test:(t,e)=>kWe.test(t)?!0:mr(e,`Expected to be a valid base 64 string (got ${ti(t)})`)})}function aYe(t=p_()){return Wr({test:(e,r)=>{let s;try{s=JSON.parse(e)}catch{return mr(r,`Expected to be a valid JSON string (got ${ti(e)})`)}return t(s,r)}})}function Nx(t,...e){let r=Array.isArray(e[0])?e[0]:e;return Wr({test:(s,a)=>{var n,c;let f={value:s},p=typeof a?.coercions<\"u\"?Wf(f,\"value\"):void 0,h=typeof a?.coercions<\"u\"?[]:void 0;if(!t(s,Object.assign(Object.assign({},a),{coercion:p,coercions:h})))return!1;let E=[];if(typeof h<\"u\")for(let[,C]of h)E.push(C());try{if(typeof a?.coercions<\"u\"){if(f.value!==s){if(typeof a?.coercion>\"u\")return mr(a,\"Unbound coercion result\");a.coercions.push([(n=a.p)!==null&&n!==void 0?n:\".\",a.coercion.bind(null,f.value)])}(c=a?.coercions)===null||c===void 0||c.push(...h)}return r.every(C=>C(f.value,a))}finally{for(let C of E)C()}}})}function $2(t,...e){let r=Array.isArray(e[0])?e[0]:e;return Nx(t,r)}function lYe(t){return Wr({test:(e,r)=>typeof e>\"u\"?!0:t(e,r)})}function cYe(t){return Wr({test:(e,r)=>e===null?!0:t(e,r)})}function uYe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)||p.push(h);return p.length>0?mr(c,`Missing required ${A_(p.length,\"property\",\"properties\")} ${CE(p,\"and\")}`):!0}})}function y_(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>Object.keys(n).some(h=>a(s,h,n))?!0:mr(c,`Missing at least one property from ${CE(Array.from(s),\"or\")}`)})}function fYe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)&&p.push(h);return p.length>0?mr(c,`Forbidden ${A_(p.length,\"property\",\"properties\")} ${CE(p,\"and\")}`):!0}})}function AYe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:\"missing\"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)&&p.push(h);return p.length>1?mr(c,`Mutually exclusive properties ${CE(p,\"and\")}`):!0}})}function tB(t,e,r,s){var a,n;let c=new Set((a=s?.ignore)!==null&&a!==void 0?a:[]),f=eB[(n=s?.missingIf)!==null&&n!==void 0?n:\"missing\"],p=new Set(r),h=pYe[e],E=e===qf.Forbids?\"or\":\"and\";return Wr({test:(C,S)=>{let P=new Set(Object.keys(C));if(!f(P,t,C)||c.has(C[t]))return!0;let I=[];for(let R of p)(f(P,R,C)&&!c.has(C[R]))!==h.expect&&I.push(R);return I.length>=1?mr(S,`Property \"${t}\" ${h.message} ${A_(I.length,\"property\",\"properties\")} ${CE(I,E)}`):!0}})}var bWe,PWe,xWe,kWe,QWe,Tre,RWe,HWe,g_,o0,eB,qf,pYe,Ul=Xe(()=>{bWe=/^[a-zA-Z_][a-zA-Z0-9_]*$/;PWe=/^#[0-9a-f]{6}$/i,xWe=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,kWe=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,QWe=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,Tre=/^(?:[1-9]\\d{3}(-?)(?:(?:0[1-9]|1[0-2])\\1(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])\\1(?:29|30)|(?:0[13578]|1[02])(?:\\1)31|00[1-9]|0[1-9]\\d|[12]\\d{2}|3(?:[0-5]\\d|6[0-5]))|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\\2)29|-?366))T(?:[01]\\d|2[0-3])(:?)[0-5]\\d(?:\\3[0-5]\\d)?(?:Z|[+-][01]\\d(?:\\3[0-5]\\d)?)$/;RWe=new Map([[\"true\",!0],[\"True\",!0],[\"1\",!0],[1,!0],[\"false\",!1],[\"False\",!1],[\"0\",!1],[0,!1]]);HWe=t=>Wr({test:(e,r)=>e instanceof t?!0:mr(r,`Expected an instance of ${t.name} (got ${ti(e)})`)}),g_=(t,{exclusive:e=!1}={})=>Wr({test:(r,s)=>{var a,n,c;let f=[],p=typeof s?.errors<\"u\"?[]:void 0;for(let h=0,E=t.length;h<E;++h){let C=typeof s?.errors<\"u\"?[]:void 0,S=typeof s?.coercions<\"u\"?[]:void 0;if(t[h](r,Object.assign(Object.assign({},s),{errors:C,coercions:S,p:`${(a=s?.p)!==null&&a!==void 0?a:\".\"}#${h+1}`}))){if(f.push([`#${h+1}`,S]),!e)break}else p?.push(C[0])}if(f.length===1){let[,h]=f[0];return typeof h<\"u\"&&((n=s?.coercions)===null||n===void 0||n.push(...h)),!0}return f.length>1?mr(s,`Expected to match exactly a single predicate (matched ${f.join(\", \")})`):(c=s?.errors)===null||c===void 0||c.push(...p),!1}});o0=class extends Error{constructor({errors:e}={}){let r=\"Type mismatch\";if(e&&e.length>0){r+=`\n`;for(let s of e)r+=`\n- ${s}`}super(r)}};eB={missing:(t,e)=>t.has(e),undefined:(t,e,r)=>t.has(e)&&typeof r[e]<\"u\",nil:(t,e,r)=>t.has(e)&&r[e]!=null,falsy:(t,e,r)=>t.has(e)&&!!r[e]};(function(t){t.Forbids=\"Forbids\",t.Requires=\"Requires\"})(qf||(qf={}));pYe={[qf.Forbids]:{expect:!1,message:\"forbids using\"},[qf.Requires]:{expect:!0,message:\"requires using\"}}});var ot,a0=Xe(()=>{Cp();ot=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:c}=await Promise.resolve().then(()=>(Ul(),Ea)),f=c(a(n()),r),p=[],h=[];if(!f(this,{errors:p,coercions:h}))throw z2(\"Invalid option schema\",p);for(let[,C]of h)C()}else if(r!=null)throw new Error(\"Invalid command schema\");let s=await this.execute();return typeof s<\"u\"?s:0}};ot.isOption=K2;ot.Default=[]});function il(t){l_&&console.log(t)}function Mre(){let t={nodes:[]};for(let e=0;e<En.CustomNode;++e)t.nodes.push(_l());return t}function hYe(t){let e=Mre(),r=[],s=e.nodes.length;for(let a of t){r.push(s);for(let n=0;n<a.nodes.length;++n)_re(n)||e.nodes.push(wYe(a.nodes[n],s));s+=a.nodes.length-En.CustomNode+1}for(let a of r)BE(e,En.InitialNode,a);return e}function Ou(t,e){return t.nodes.push(e),t.nodes.length-1}function gYe(t){let e=new Set,r=s=>{if(e.has(s))return;e.add(s);let a=t.nodes[s];for(let c of Object.values(a.statics))for(let{to:f}of c)r(f);for(let[,{to:c}]of a.dynamics)r(c);for(let{to:c}of a.shortcuts)r(c);let n=new Set(a.shortcuts.map(({to:c})=>c));for(;a.shortcuts.length>0;){let{to:c}=a.shortcuts.shift(),f=t.nodes[c];for(let[p,h]of Object.entries(f.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let C of h)E.some(({to:S})=>C.to===S)||E.push(C)}for(let[p,h]of f.dynamics)a.dynamics.some(([E,{to:C}])=>p===E&&h.to===C)||a.dynamics.push([p,h]);for(let p of f.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(En.InitialNode)}function dYe(t,{prefix:e=\"\"}={}){if(l_){il(`${e}Nodes are:`);for(let r=0;r<t.nodes.length;++r)il(`${e}  ${r}: ${JSON.stringify(t.nodes[r])}`)}}function mYe(t,e,r=!1){il(`Running a vm on ${JSON.stringify(e)}`);let s=[{node:En.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];dYe(t,{prefix:\"  \"});let a=[ei.StartOfInput,...e];for(let n=0;n<a.length;++n){let c=a[n],f=c===ei.EndOfInput||c===ei.EndOfPartialInput,p=n-1;il(`  Processing ${JSON.stringify(c)}`);let h=[];for(let{node:E,state:C}of s){il(`    Current node is ${E}`);let S=t.nodes[E];if(E===En.ErrorNode){h.push({node:E,state:C});continue}console.assert(S.shortcuts.length===0,\"Shortcuts should have been eliminated by now\");let P=Object.prototype.hasOwnProperty.call(S.statics,c);if(!r||n<a.length-1||P)if(P){let I=S.statics[c];for(let{to:R,reducer:N}of I)h.push({node:R,state:typeof N<\"u\"?Ox(I_,N,C,c,p):C}),il(`      Static transition to ${R} found`)}else il(\"      No static transition found\");else{let I=!1;for(let R of Object.keys(S.statics))if(R.startsWith(c)){if(c===R)for(let{to:N,reducer:U}of S.statics[R])h.push({node:N,state:typeof U<\"u\"?Ox(I_,U,C,c,p):C}),il(`      Static transition to ${N} found`);else for(let{to:N}of S.statics[R])h.push({node:N,state:{...C,remainder:R.slice(c.length)}}),il(`      Static transition to ${N} found (partial match)`);I=!0}I||il(\"      No partial static transition found\")}if(!f)for(let[I,{to:R,reducer:N}]of S.dynamics)Ox(BYe,I,C,c,p)&&(h.push({node:R,state:typeof N<\"u\"?Ox(I_,N,C,c,p):C}),il(`      Dynamic transition to ${R} found (via ${I})`))}if(h.length===0&&f&&e.length===1)return[{node:En.InitialNode,state:Lre}];if(h.length===0)throw new IE(e,s.filter(({node:E})=>E!==En.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===En.ErrorNode))throw new IE(e,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));s=EYe(h)}if(s.length>0){il(\"  Results:\");for(let n of s)il(`    - ${n.node} -> ${JSON.stringify(n.state)}`)}else il(\"  No results\");return s}function yYe(t,e,{endToken:r=ei.EndOfInput}={}){let s=mYe(t,[...e,r]);return IYe(e,s.map(({state:a})=>a))}function EYe(t){let e=0;for(let{state:r}of t)r.path.length>e&&(e=r.path.length);return t.filter(({state:r})=>r.path.length===e)}function IYe(t,e){let r=e.filter(S=>S.selectedIndex!==null),s=r.filter(S=>!S.partial);if(s.length>0&&(r=s),r.length===0)throw new Error;let a=r.filter(S=>S.selectedIndex===Nd||S.requiredOptions.every(P=>P.some(I=>S.options.find(R=>R.name===I))));if(a.length===0)throw new IE(t,r.map(S=>({usage:S.candidateUsage,reason:null})));let n=0;for(let S of a)S.path.length>n&&(n=S.path.length);let c=a.filter(S=>S.path.length===n),f=S=>S.positionals.filter(({extra:P})=>!P).length+S.options.length,p=c.map(S=>({state:S,positionalCount:f(S)})),h=0;for(let{positionalCount:S}of p)S>h&&(h=S);let E=p.filter(({positionalCount:S})=>S===h).map(({state:S})=>S),C=CYe(E);if(C.length>1)throw new xx(t,C.map(S=>S.candidateUsage));return C[0]}function CYe(t){let e=[],r=[];for(let s of t)s.selectedIndex===Nd?r.push(s):e.push(s);return r.length>0&&e.push({...Lre,path:Ure(...r.map(s=>s.path)),options:r.reduce((s,a)=>s.concat(a.options),[])}),e}function Ure(t,e,...r){return e===void 0?Array.from(t):Ure(t.filter((s,a)=>s===e[a]),...r)}function _l(){return{dynamics:[],shortcuts:[],statics:{}}}function _re(t){return t===En.SuccessNode||t===En.ErrorNode}function E_(t,e=0){return{to:_re(t.to)?t.to:t.to>=En.CustomNode?t.to+e-En.CustomNode+1:t.to+e,reducer:t.reducer}}function wYe(t,e=0){let r=_l();for(let[s,a]of t.dynamics)r.dynamics.push([s,E_(a,e)]);for(let s of t.shortcuts)r.shortcuts.push(E_(s,e));for(let[s,a]of Object.entries(t.statics))r.statics[s]=a.map(n=>E_(n,e));return r}function Hs(t,e,r,s,a){t.nodes[e].dynamics.push([r,{to:s,reducer:a}])}function BE(t,e,r,s){t.nodes[e].shortcuts.push({to:r,reducer:s})}function Ia(t,e,r,s,a){(Object.prototype.hasOwnProperty.call(t.nodes[e].statics,r)?t.nodes[e].statics[r]:t.nodes[e].statics[r]=[]).push({to:s,reducer:a})}function Ox(t,e,r,s,a){if(Array.isArray(e)){let[n,...c]=e;return t[n](r,s,a,...c)}else return t[e](r,s,a)}var Lre,BYe,I_,Hl,C_,Lx,Mx=Xe(()=>{Px();kx();Lre={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:Nd,partial:!1,tokens:[]};BYe={always:()=>!0,isOptionLike:(t,e)=>!t.ignoreOptions&&e!==\"-\"&&e.startsWith(\"-\"),isNotOptionLike:(t,e)=>t.ignoreOptions||e===\"-\"||!e.startsWith(\"-\"),isOption:(t,e,r,s)=>!t.ignoreOptions&&e===s,isBatchOption:(t,e,r,s)=>!t.ignoreOptions&&xre.test(e)&&[...e.slice(1)].every(a=>s.has(`-${a}`)),isBoundOption:(t,e,r,s,a)=>{let n=e.match(a_);return!t.ignoreOptions&&!!n&&bx.test(n[1])&&s.has(n[1])&&a.filter(c=>c.nameSet.includes(n[1])).every(c=>c.allowBinding)},isNegatedOption:(t,e,r,s)=>!t.ignoreOptions&&e===`--no-${s.slice(2)}`,isHelp:(t,e)=>!t.ignoreOptions&&o_.test(e),isUnsupportedOption:(t,e,r,s)=>!t.ignoreOptions&&e.startsWith(\"-\")&&bx.test(e)&&!s.has(e),isInvalidOption:(t,e)=>!t.ignoreOptions&&e.startsWith(\"-\")&&!bx.test(e)},I_={setCandidateState:(t,e,r,s)=>({...t,...s}),setSelectedIndex:(t,e,r,s)=>({...t,selectedIndex:s}),setPartialIndex:(t,e,r,s)=>({...t,selectedIndex:s,partial:!0}),pushBatch:(t,e,r,s)=>{let a=t.options.slice(),n=t.tokens.slice();for(let c=1;c<e.length;++c){let f=s.get(`-${e[c]}`),p=c===1?[0,2]:[c,c+1];a.push({name:f,value:!0}),n.push({segmentIndex:r,type:\"option\",option:f,slice:p})}return{...t,options:a,tokens:n}},pushBound:(t,e,r)=>{let[,s,a]=e.match(a_),n=t.options.concat({name:s,value:a}),c=t.tokens.concat([{segmentIndex:r,type:\"option\",slice:[0,s.length],option:s},{segmentIndex:r,type:\"assign\",slice:[s.length,s.length+1]},{segmentIndex:r,type:\"value\",slice:[s.length+1,s.length+a.length+1]}]);return{...t,options:n,tokens:c}},pushPath:(t,e,r)=>{let s=t.path.concat(e),a=t.tokens.concat({segmentIndex:r,type:\"path\"});return{...t,path:s,tokens:a}},pushPositional:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:!1}),a=t.tokens.concat({segmentIndex:r,type:\"positional\"});return{...t,positionals:s,tokens:a}},pushExtra:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:!0}),a=t.tokens.concat({segmentIndex:r,type:\"positional\"});return{...t,positionals:s,tokens:a}},pushExtraNoLimits:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:Hl}),a=t.tokens.concat({segmentIndex:r,type:\"positional\"});return{...t,positionals:s,tokens:a}},pushTrue:(t,e,r,s)=>{let a=t.options.concat({name:s,value:!0}),n=t.tokens.concat({segmentIndex:r,type:\"option\",option:s});return{...t,options:a,tokens:n}},pushFalse:(t,e,r,s)=>{let a=t.options.concat({name:s,value:!1}),n=t.tokens.concat({segmentIndex:r,type:\"option\",option:s});return{...t,options:a,tokens:n}},pushUndefined:(t,e,r,s)=>{let a=t.options.concat({name:e,value:void 0}),n=t.tokens.concat({segmentIndex:r,type:\"option\",option:e});return{...t,options:a,tokens:n}},pushStringValue:(t,e,r)=>{var s;let a=t.options[t.options.length-1],n=t.options.slice(),c=t.tokens.concat({segmentIndex:r,type:\"value\"});return a.value=((s=a.value)!==null&&s!==void 0?s:[]).concat([e]),{...t,options:n,tokens:c}},setStringValue:(t,e,r)=>{let s=t.options[t.options.length-1],a=t.options.slice(),n=t.tokens.concat({segmentIndex:r,type:\"value\"});return s.value=e,{...t,options:a,tokens:n}},inhibateOptions:t=>({...t,ignoreOptions:!0}),useHelp:(t,e,r,s)=>{let[,,a]=e.match(o_);return typeof a<\"u\"?{...t,options:[{name:\"-c\",value:String(s)},{name:\"-i\",value:a}]}:{...t,options:[{name:\"-c\",value:String(s)}]}},setError:(t,e,r,s)=>e===ei.EndOfInput||e===ei.EndOfPartialInput?{...t,errorMessage:`${s}.`}:{...t,errorMessage:`${s} (\"${e}\").`},setOptionArityError:(t,e)=>{let r=t.options[t.options.length-1];return{...t,errorMessage:`Not enough arguments to option ${r.name}.`}}},Hl=Symbol(),C_=class{constructor(e,r){this.allOptionNames=new Map,this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=r}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:r=this.arity.trailing,extra:s=this.arity.extra,proxy:a=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:r,extra:s,proxy:a})}addPositional({name:e=\"arg\",required:r=!0}={}){if(!r&&this.arity.extra===Hl)throw new Error(\"Optional parameters cannot be declared when using .rest() or .proxy()\");if(!r&&this.arity.trailing.length>0)throw new Error(\"Optional parameters cannot be declared after the required trailing positional arguments\");!r&&this.arity.extra!==Hl?this.arity.extra.push(e):this.arity.extra!==Hl&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e=\"arg\",required:r=0}={}){if(this.arity.extra===Hl)throw new Error(\"Infinite lists cannot be declared multiple times in the same command\");if(this.arity.trailing.length>0)throw new Error(\"Infinite lists cannot be declared after the required trailing positional arguments\");for(let s=0;s<r;++s)this.addPositional({name:e});this.arity.extra=Hl}addProxy({required:e=0}={}){this.addRest({required:e}),this.arity.proxy=!0}addOption({names:e,description:r,arity:s=0,hidden:a=!1,required:n=!1,allowBinding:c=!0}){if(!c&&s>1)throw new Error(\"The arity cannot be higher than 1 when the option only supports the --arg=value syntax\");if(!Number.isInteger(s))throw new Error(`The arity must be an integer, got ${s}`);if(s<0)throw new Error(`The arity must be positive, got ${s}`);let f=e.reduce((p,h)=>h.length>p.length?h:p,\"\");for(let p of e)this.allOptionNames.set(p,f);this.options.push({preferredName:f,nameSet:e,description:r,arity:s,hidden:a,required:n,allowBinding:c})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:r=!0}={}){let s=[this.cliOpts.binaryName],a=[];if(this.paths.length>0&&s.push(...this.paths[0]),e){for(let{preferredName:c,nameSet:f,arity:p,hidden:h,description:E,required:C}of this.options){if(h)continue;let S=[];for(let I=0;I<p;++I)S.push(` #${I}`);let P=`${f.join(\",\")}${S.join(\"\")}`;!r&&E?a.push({preferredName:c,nameSet:f,definition:P,description:E,required:C}):s.push(C?`<${P}>`:`[${P}]`)}s.push(...this.arity.leading.map(c=>`<${c}>`)),this.arity.extra===Hl?s.push(\"...\"):s.push(...this.arity.extra.map(c=>`[${c}]`)),s.push(...this.arity.trailing.map(c=>`<${c}>`))}return{usage:s.join(\" \"),options:a}}compile(){if(typeof this.context>\"u\")throw new Error(\"Assertion failed: No context attached\");let e=Mre(),r=En.InitialNode,s=this.usage().usage,a=this.options.filter(f=>f.required).map(f=>f.nameSet);r=Ou(e,_l()),Ia(e,En.InitialNode,ei.StartOfInput,r,[\"setCandidateState\",{candidateUsage:s,requiredOptions:a}]);let n=this.arity.proxy?\"always\":\"isNotOptionLike\",c=this.paths.length>0?this.paths:[[]];for(let f of c){let p=r;if(f.length>0){let S=Ou(e,_l());BE(e,p,S),this.registerOptions(e,S),p=S}for(let S=0;S<f.length;++S){let P=Ou(e,_l());Ia(e,p,f[S],P,\"pushPath\"),p=P}if(this.arity.leading.length>0||!this.arity.proxy){let S=Ou(e,_l());Hs(e,p,\"isHelp\",S,[\"useHelp\",this.cliIndex]),Hs(e,S,\"always\",S,\"pushExtra\"),Ia(e,S,ei.EndOfInput,En.SuccessNode,[\"setSelectedIndex\",Nd]),this.registerOptions(e,p)}this.arity.leading.length>0&&(Ia(e,p,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ia(e,p,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex]));let h=p;for(let S=0;S<this.arity.leading.length;++S){let P=Ou(e,_l());(!this.arity.proxy||S+1!==this.arity.leading.length)&&this.registerOptions(e,P),(this.arity.trailing.length>0||S+1!==this.arity.leading.length)&&(Ia(e,P,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ia(e,P,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex])),Hs(e,h,\"isNotOptionLike\",P,\"pushPositional\"),h=P}let E=h;if(this.arity.extra===Hl||this.arity.extra.length>0){let S=Ou(e,_l());if(BE(e,h,S),this.arity.extra===Hl){let P=Ou(e,_l());this.arity.proxy||this.registerOptions(e,P),Hs(e,h,n,P,\"pushExtraNoLimits\"),Hs(e,P,n,P,\"pushExtraNoLimits\"),BE(e,P,S)}else for(let P=0;P<this.arity.extra.length;++P){let I=Ou(e,_l());(!this.arity.proxy||P>0)&&this.registerOptions(e,I),Hs(e,E,n,I,\"pushExtra\"),BE(e,I,S),E=I}E=S}this.arity.trailing.length>0&&(Ia(e,E,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ia(e,E,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex]));let C=E;for(let S=0;S<this.arity.trailing.length;++S){let P=Ou(e,_l());this.arity.proxy||this.registerOptions(e,P),S+1<this.arity.trailing.length&&(Ia(e,P,ei.EndOfInput,En.ErrorNode,[\"setError\",\"Not enough positional arguments\"]),Ia(e,P,ei.EndOfPartialInput,En.SuccessNode,[\"setPartialIndex\",this.cliIndex])),Hs(e,C,\"isNotOptionLike\",P,\"pushPositional\"),C=P}Hs(e,C,n,En.ErrorNode,[\"setError\",\"Extraneous positional argument\"]),Ia(e,C,ei.EndOfInput,En.SuccessNode,[\"setSelectedIndex\",this.cliIndex]),Ia(e,C,ei.EndOfPartialInput,En.SuccessNode,[\"setSelectedIndex\",this.cliIndex])}return{machine:e,context:this.context}}registerOptions(e,r){Hs(e,r,[\"isOption\",\"--\"],r,\"inhibateOptions\"),Hs(e,r,[\"isBatchOption\",this.allOptionNames],r,[\"pushBatch\",this.allOptionNames]),Hs(e,r,[\"isBoundOption\",this.allOptionNames,this.options],r,\"pushBound\"),Hs(e,r,[\"isUnsupportedOption\",this.allOptionNames],En.ErrorNode,[\"setError\",\"Unsupported option name\"]),Hs(e,r,[\"isInvalidOption\"],En.ErrorNode,[\"setError\",\"Invalid option name\"]);for(let s of this.options)if(s.arity===0)for(let a of s.nameSet)Hs(e,r,[\"isOption\",a],r,[\"pushTrue\",s.preferredName]),a.startsWith(\"--\")&&!a.startsWith(\"--no-\")&&Hs(e,r,[\"isNegatedOption\",a],r,[\"pushFalse\",s.preferredName]);else{let a=Ou(e,_l());for(let n of s.nameSet)Hs(e,r,[\"isOption\",n],a,[\"pushUndefined\",s.preferredName]);for(let n=0;n<s.arity;++n){let c=Ou(e,_l());Ia(e,a,ei.EndOfInput,En.ErrorNode,\"setOptionArityError\"),Ia(e,a,ei.EndOfPartialInput,En.ErrorNode,\"setOptionArityError\"),Hs(e,a,\"isOptionLike\",En.ErrorNode,\"setOptionArityError\");let f=s.arity===1?\"setStringValue\":\"pushStringValue\";Hs(e,a,\"isNotOptionLike\",c,f),a=c}BE(e,a,r)}}},Lx=class t{constructor({binaryName:e=\"...\"}={}){this.builders=[],this.opts={binaryName:e}}static build(e,r={}){return new t(r).commands(e).compile()}getBuilderByIndex(e){if(!(e>=0&&e<this.builders.length))throw new Error(`Assertion failed: Out-of-bound command index (${e})`);return this.builders[e]}commands(e){for(let r of e)r(this.command());return this}command(){let e=new C_(this.builders.length,this.opts);return this.builders.push(e),e}compile(){let e=[],r=[];for(let a of this.builders){let{machine:n,context:c}=a.compile();e.push(n),r.push(c)}let s=hYe(e);return gYe(s),{machine:s,contexts:r,process:(a,{partial:n}={})=>{let c=n?ei.EndOfPartialInput:ei.EndOfInput;return yYe(s,a,{endToken:c})}}}}});function jre(){return Ux.default&&\"getColorDepth\"in Ux.default.WriteStream.prototype?Ux.default.WriteStream.prototype.getColorDepth():process.env.FORCE_COLOR===\"0\"?1:process.env.FORCE_COLOR===\"1\"||typeof process.stdout<\"u\"&&process.stdout.isTTY?8:1}function Gre(t){let e=Hre;if(typeof e>\"u\"){if(t.stdout===process.stdout&&t.stderr===process.stderr)return null;let{AsyncLocalStorage:r}=Ie(\"async_hooks\");e=Hre=new r;let s=process.stdout._write;process.stdout._write=function(n,c,f){let p=e.getStore();return typeof p>\"u\"?s.call(this,n,c,f):p.stdout.write(n,c,f)};let a=process.stderr._write;process.stderr._write=function(n,c,f){let p=e.getStore();return typeof p>\"u\"?a.call(this,n,c,f):p.stderr.write(n,c,f)}}return r=>e.run(t,r)}var Ux,Hre,qre=Xe(()=>{Ux=ut(Ie(\"tty\"),1)});var _x,Wre=Xe(()=>{a0();_x=class t extends ot{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,r){let s=new t(r);s.path=e.path;for(let a of e.options)switch(a.name){case\"-c\":s.commands.push(Number(a.value));break;case\"-i\":s.index=Number(a.value);break}return s}async execute(){let e=this.commands;if(typeof this.index<\"u\"&&this.index>=0&&this.index<e.length&&(e=[e[this.index]]),e.length===0)this.context.stdout.write(this.cli.usage());else if(e.length===1)this.context.stdout.write(this.cli.usage(this.contexts[e[0]].commandClass,{detailed:!0}));else if(e.length>1){this.context.stdout.write(`Multiple commands match your selection:\n`),this.context.stdout.write(`\n`);let r=0;for(let s of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[s].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`\n`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.\n`)}}}});async function Jre(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=zre(t);return Ca.from(r,e).runExit(s,a)}async function Kre(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=zre(t);return Ca.from(r,e).run(s,a)}function zre(t){let e,r,s,a;switch(typeof process<\"u\"&&typeof process.argv<\"u\"&&(s=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?s=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],s=t[2]):t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],s=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],s=t[2],a=t[3];break}if(typeof s>\"u\")throw new Error(\"The argv parameter must be provided when running Clipanion outside of a Node context\");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}}function Vre(t){return t()}var Yre,Ca,Xre=Xe(()=>{Px();Mx();f_();qre();a0();Wre();Yre=Symbol(\"clipanion/errorCommand\");Ca=class t{constructor({binaryLabel:e,binaryName:r=\"...\",binaryVersion:s,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new Lx({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=s,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let s=new t(r),a=Array.isArray(e)?e:[e];for(let n of a)s.register(n);return s}register(e){var r;let s=new Map,a=new e;for(let p in a){let h=a[p];typeof h==\"object\"&&h!==null&&h[ot.isOption]&&s.set(p,h)}let n=this.builder.command(),c=n.cliIndex,f=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof f<\"u\")for(let p of f)n.addPath(p);this.registrations.set(e,{specs:s,builder:n,index:c});for(let[p,{definition:h}]of s.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{input:s,context:a,partial:n}=typeof e==\"object\"&&Array.isArray(e)?{input:e,context:r}:e,{contexts:c,process:f}=this.builder.compile(),p=f(s,{partial:n}),h={...t.defaultContext,...a};switch(p.selectedIndex){case Nd:{let E=_x.from(p,c);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=c[p.selectedIndex],C=this.registrations.get(E);if(typeof C>\"u\")throw new Error(\"Assertion failed: Expected the command class to have been registered.\");let S=new E;S.context=h,S.tokens=p.tokens,S.path=p.path;try{for(let[P,{transformer:I}]of C.specs.entries())S[P]=I(C.builder,P,p,h);return S}catch(P){throw P[Yre]=S,P}}break}}async run(e,r){var s,a;let n,c={...t.defaultContext,...r},f=(s=this.enableColors)!==null&&s!==void 0?s:c.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,c)}catch(E){return c.stdout.write(this.error(E,{colored:f})),1}if(n.help)return c.stdout.write(this.usage(n,{colored:f,detailed:!0})),0;n.context=c,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,C)=>this.error(E,C),format:E=>this.format(E),process:(E,C)=>this.process(E,{...c,...C}),run:(E,C)=>this.run(E,{...c,...C}),usage:(E,C)=>this.usage(E,C)};let p=this.enableCapture&&(a=Gre(c))!==null&&a!==void 0?a:Vre,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return c.stdout.write(this.error(E,{colored:f,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}definition(e,{colored:r=!1}={}){if(!e.usage)return null;let{usage:s}=this.getUsageByRegistration(e,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(e,{detailed:!0,inlineOptions:!1}),c=typeof e.usage.category<\"u\"?Ho(e.usage.category,{format:this.format(r),paragraphs:!1}):void 0,f=typeof e.usage.description<\"u\"?Ho(e.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof e.usage.details<\"u\"?Ho(e.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof e.usage.examples<\"u\"?e.usage.examples.map(([E,C])=>[Ho(E,{format:this.format(r),paragraphs:!1}),C.replace(/\\$0/g,this.binaryName)]):void 0;return{path:s,usage:a,category:c,description:f,details:p,examples:h,options:n}}definitions({colored:e=!1}={}){let r=[];for(let s of this.registrations.keys()){let a=this.definition(s,{colored:e});a&&r.push(a)}return r}usage(e=null,{colored:r,detailed:s=!1,prefix:a=\"$ \"}={}){var n;if(e===null){for(let p of this.registrations.keys()){let h=p.paths,E=typeof p.usage<\"u\";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(P=>P.length===0))!==null&&n!==void 0?n:!1))if(e){e=null;break}else e=p;else if(E){e=null;continue}}e&&(s=!0)}let c=e!==null&&e instanceof ot?e.constructor:e,f=\"\";if(c)if(s){let{description:p=\"\",details:h=\"\",examples:E=[]}=c.usage||{};p!==\"\"&&(f+=Ho(p,{format:this.format(r),paragraphs:!1}).replace(/^./,P=>P.toUpperCase()),f+=`\n`),(h!==\"\"||E.length>0)&&(f+=`${this.format(r).header(\"Usage\")}\n`,f+=`\n`);let{usage:C,options:S}=this.getUsageByRegistration(c,{inlineOptions:!1});if(f+=`${this.format(r).bold(a)}${C}\n`,S.length>0){f+=`\n`,f+=`${this.format(r).header(\"Options\")}\n`;let P=S.reduce((I,R)=>Math.max(I,R.definition.length),0);f+=`\n`;for(let{definition:I,description:R}of S)f+=`  ${this.format(r).bold(I.padEnd(P))}    ${Ho(R,{format:this.format(r),paragraphs:!1})}`}if(h!==\"\"&&(f+=`\n`,f+=`${this.format(r).header(\"Details\")}\n`,f+=`\n`,f+=Ho(h,{format:this.format(r),paragraphs:!0})),E.length>0){f+=`\n`,f+=`${this.format(r).header(\"Examples\")}\n`;for(let[P,I]of E)f+=`\n`,f+=Ho(P,{format:this.format(r),paragraphs:!1}),f+=`${I.replace(/^/m,`  ${this.format(r).bold(a)}`).replace(/\\$0/g,this.binaryName)}\n`}}else{let{usage:p}=this.getUsageByRegistration(c);f+=`${this.format(r).bold(a)}${p}\n`}else{let p=new Map;for(let[S,{index:P}]of this.registrations.entries()){if(typeof S.usage>\"u\")continue;let I=typeof S.usage.category<\"u\"?Ho(S.usage.category,{format:this.format(r),paragraphs:!1}):null,R=p.get(I);typeof R>\"u\"&&p.set(I,R=[]);let{usage:N}=this.getUsageByIndex(P);R.push({commandClass:S,usage:N})}let h=Array.from(p.keys()).sort((S,P)=>S===null?-1:P===null?1:S.localeCompare(P,\"en\",{usage:\"sort\",caseFirst:\"upper\"})),E=typeof this.binaryLabel<\"u\",C=typeof this.binaryVersion<\"u\";E||C?(E&&C?f+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}\n\n`:E?f+=`${this.format(r).header(`${this.binaryLabel}`)}\n`:f+=`${this.format(r).header(`${this.binaryVersion}`)}\n`,f+=`  ${this.format(r).bold(a)}${this.binaryName} <command>\n`):f+=`${this.format(r).bold(a)}${this.binaryName} <command>\n`;for(let S of h){let P=p.get(S).slice().sort((R,N)=>R.usage.localeCompare(N.usage,\"en\",{usage:\"sort\",caseFirst:\"upper\"})),I=S!==null?S.trim():\"General commands\";f+=`\n`,f+=`${this.format(r).header(`${I}`)}\n`;for(let{commandClass:R,usage:N}of P){let U=R.usage.description||\"undocumented\";f+=`\n`,f+=`  ${this.format(r).bold(N)}\n`,f+=`    ${Ho(U,{format:this.format(r),paragraphs:!1})}`}}f+=`\n`,f+=Ho(\"You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.\",{format:this.format(r),paragraphs:!0})}return f}error(e,r){var s,{colored:a,command:n=(s=e[Yre])!==null&&s!==void 0?s:null}=r===void 0?{}:r;(!e||typeof e!=\"object\"||!(\"stack\"in e))&&(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let c=\"\",f=e.name.replace(/([a-z])([A-Z])/g,\"$1 $2\");f===\"Error\"&&(f=\"Internal Error\"),c+=`${this.format(a).error(f)}: ${e.message}\n`;let p=e.clipanion;return typeof p<\"u\"?p.type===\"usage\"&&(c+=`\n`,c+=this.usage(n)):e.stack&&(c+=`${e.stack.replace(/^.*\\n/,\"\")}\n`),c}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:t.defaultContext.colorDepth>1)?kre:Qre}getUsageByRegistration(e,r){let s=this.registrations.get(e);if(typeof s>\"u\")throw new Error(\"Assertion failed: Unregistered command\");return this.getUsageByIndex(s.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};Ca.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:jre()}});var rB,Zre=Xe(()=>{a0();rB=class extends ot{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}\n`)}};rB.paths=[[\"--clipanion=definitions\"]]});var nB,$re=Xe(()=>{a0();nB=class extends ot{async execute(){this.context.stdout.write(this.cli.usage())}};nB.paths=[[\"-h\"],[\"--help\"]]});function Hx(t={}){return ya({definition(e,r){var s;e.addProxy({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){return s.positionals.map(({value:a})=>a)}})}var w_=Xe(()=>{Cp()});var iB,ene=Xe(()=>{a0();w_();iB=class extends ot{constructor(){super(...arguments),this.args=Hx()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)}\n`)}};iB.paths=[[\"--clipanion=tokens\"]]});var sB,tne=Xe(()=>{a0();sB=class extends ot{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:\"<unknown>\"}\n`)}};sB.paths=[[\"-v\"],[\"--version\"]]});var B_={};Vt(B_,{DefinitionsCommand:()=>rB,HelpCommand:()=>nB,TokensCommand:()=>iB,VersionCommand:()=>sB});var rne=Xe(()=>{Zre();$re();ene();tne()});function nne(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(\",\"),f=new Set(c);return ya({definition(p){p.addOption({names:c,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let C,S=typeof s<\"u\"?[...s]:void 0;for(let{name:P,value:I}of E.options)f.has(P)&&(C=P,S=S??[],S.push(I));return typeof S<\"u\"?Od(C??h,S,a.validator):S}})}var ine=Xe(()=>{Cp()});function sne(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(\",\"),c=new Set(n);return ya({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E=S);return E}})}var one=Xe(()=>{Cp()});function ane(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(\",\"),c=new Set(n);return ya({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E??(E=0),S?E+=1:E=0);return E}})}var lne=Xe(()=>{Cp()});function cne(t={}){return ya({definition(e,r){var s;e.addRest({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){let a=c=>{let f=s.positionals[c];return f.extra===Hl||f.extra===!1&&c<e.arity.leading.length},n=0;for(;n<s.positionals.length&&a(n);)n+=1;return s.positionals.splice(0,n).map(({value:c})=>c)}})}var une=Xe(()=>{Mx();Cp()});function vYe(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(\",\"),f=new Set(c);return ya({definition(p){p.addOption({names:c,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,C){let S,P=s;typeof a.env<\"u\"&&C.env[a.env]&&(S=a.env,P=C.env[a.env]);for(let{name:I,value:R}of E.options)f.has(I)&&(S=I,P=R);return typeof P==\"string\"?Od(S??h,P,a.validator):P}})}function SYe(t={}){let{required:e=!0}=t;return ya({definition(r,s){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:s,required:t.required})},transformer(r,s,a){var n;for(let c=0;c<a.positionals.length;++c){if(a.positionals[c].extra===Hl||e&&a.positionals[c].extra===!0||!e&&a.positionals[c].extra===!1)continue;let[f]=a.positionals.splice(c,1);return Od((n=t.name)!==null&&n!==void 0?n:s,f.value,t.validator)}}})}function fne(t,...e){return typeof t==\"string\"?vYe(t,...e):SYe(t)}var Ane=Xe(()=>{Mx();Cp()});var ge={};Vt(ge,{Array:()=>nne,Boolean:()=>sne,Counter:()=>ane,Proxy:()=>Hx,Rest:()=>cne,String:()=>fne,applyValidator:()=>Od,cleanValidationError:()=>Qx,formatError:()=>z2,isOptionSymbol:()=>K2,makeCommandOption:()=>ya,rerouteArguments:()=>Gf});var pne=Xe(()=>{Cp();w_();ine();one();lne();une();Ane()});var oB={};Vt(oB,{Builtins:()=>B_,Cli:()=>Ca,Command:()=>ot,Option:()=>ge,UsageError:()=>nt,formatMarkdownish:()=>Ho,run:()=>Kre,runExit:()=>Jre});var Yt=Xe(()=>{kx();f_();a0();Xre();rne();pne()});var hne=_((VTt,DYe)=>{DYe.exports={name:\"dotenv\",version:\"16.3.1\",description:\"Loads environment variables from .env file\",main:\"lib/main.js\",types:\"lib/main.d.ts\",exports:{\".\":{types:\"./lib/main.d.ts\",require:\"./lib/main.js\",default:\"./lib/main.js\"},\"./config\":\"./config.js\",\"./config.js\":\"./config.js\",\"./lib/env-options\":\"./lib/env-options.js\",\"./lib/env-options.js\":\"./lib/env-options.js\",\"./lib/cli-options\":\"./lib/cli-options.js\",\"./lib/cli-options.js\":\"./lib/cli-options.js\",\"./package.json\":\"./package.json\"},scripts:{\"dts-check\":\"tsc --project tests/types/tsconfig.json\",lint:\"standard\",\"lint-readme\":\"standard-markdown\",pretest:\"npm run lint && npm run dts-check\",test:\"tap tests/*.js --100 -Rspec\",prerelease:\"npm test\",release:\"standard-version\"},repository:{type:\"git\",url:\"git://github.com/motdotla/dotenv.git\"},funding:\"https://github.com/motdotla/dotenv?sponsor=1\",keywords:[\"dotenv\",\"env\",\".env\",\"environment\",\"variables\",\"config\",\"settings\"],readmeFilename:\"README.md\",license:\"BSD-2-Clause\",devDependencies:{\"@definitelytyped/dtslint\":\"^0.0.133\",\"@types/node\":\"^18.11.3\",decache:\"^4.6.1\",sinon:\"^14.0.1\",standard:\"^17.0.0\",\"standard-markdown\":\"^7.1.0\",\"standard-version\":\"^9.5.0\",tap:\"^16.3.0\",tar:\"^6.1.11\",typescript:\"^4.8.4\"},engines:{node:\">=12\"},browser:{fs:!1}}});var yne=_((JTt,wp)=>{var gne=Ie(\"fs\"),S_=Ie(\"path\"),bYe=Ie(\"os\"),PYe=Ie(\"crypto\"),xYe=hne(),D_=xYe.version,kYe=/(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg;function QYe(t){let e={},r=t.toString();r=r.replace(/\\r\\n?/mg,`\n`);let s;for(;(s=kYe.exec(r))!=null;){let a=s[1],n=s[2]||\"\";n=n.trim();let c=n[0];n=n.replace(/^(['\"`])([\\s\\S]*)\\1$/mg,\"$2\"),c==='\"'&&(n=n.replace(/\\\\n/g,`\n`),n=n.replace(/\\\\r/g,\"\\r\")),e[a]=n}return e}function TYe(t){let e=mne(t),r=js.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);let s=dne(t).split(\",\"),a=s.length,n;for(let c=0;c<a;c++)try{let f=s[c].trim(),p=NYe(r,f);n=js.decrypt(p.ciphertext,p.key);break}catch(f){if(c+1>=a)throw f}return js.parse(n)}function RYe(t){console.log(`[dotenv@${D_}][INFO] ${t}`)}function FYe(t){console.log(`[dotenv@${D_}][WARN] ${t}`)}function v_(t){console.log(`[dotenv@${D_}][DEBUG] ${t}`)}function dne(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:\"\"}function NYe(t,e){let r;try{r=new URL(e)}catch(f){throw f.code===\"ERR_INVALID_URL\"?new Error(\"INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development\"):f}let s=r.password;if(!s)throw new Error(\"INVALID_DOTENV_KEY: Missing key part\");let a=r.searchParams.get(\"environment\");if(!a)throw new Error(\"INVALID_DOTENV_KEY: Missing environment part\");let n=`DOTENV_VAULT_${a.toUpperCase()}`,c=t.parsed[n];if(!c)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:c,key:s}}function mne(t){let e=S_.resolve(process.cwd(),\".env\");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(\".vault\")?e:`${e}.vault`}function OYe(t){return t[0]===\"~\"?S_.join(bYe.homedir(),t.slice(1)):t}function LYe(t){RYe(\"Loading env from encrypted .env.vault\");let e=js._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),js.populate(r,e,t),{parsed:e}}function MYe(t){let e=S_.resolve(process.cwd(),\".env\"),r=\"utf8\",s=!!(t&&t.debug);t&&(t.path!=null&&(e=OYe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=js.parse(gne.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),js.populate(n,a,t),{parsed:a}}catch(a){return s&&v_(`Failed to load ${e} ${a.message}`),{error:a}}}function UYe(t){let e=mne(t);return dne(t).length===0?js.configDotenv(t):gne.existsSync(e)?js._configVault(t):(FYe(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),js.configDotenv(t))}function _Ye(t,e){let r=Buffer.from(e.slice(-64),\"hex\"),s=Buffer.from(t,\"base64\"),a=s.slice(0,12),n=s.slice(-16);s=s.slice(12,-16);try{let c=PYe.createDecipheriv(\"aes-256-gcm\",r,a);return c.setAuthTag(n),`${c.update(s)}${c.final()}`}catch(c){let f=c instanceof RangeError,p=c.message===\"Invalid key length\",h=c.message===\"Unsupported state or unable to authenticate data\";if(f||p){let E=\"INVALID_DOTENV_KEY: It must be 64 characters long (or more)\";throw new Error(E)}else if(h){let E=\"DECRYPTION_FAILED: Please check your DOTENV_KEY\";throw new Error(E)}else throw console.error(\"Error: \",c.code),console.error(\"Error: \",c.message),c}}function HYe(t,e,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof e!=\"object\")throw new Error(\"OBJECT_REQUIRED: Please check the processEnv argument being passed to populate\");for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(t,n)?(a===!0&&(t[n]=e[n]),s&&v_(a===!0?`\"${n}\" is already defined and WAS overwritten`:`\"${n}\" is already defined and was NOT overwritten`)):t[n]=e[n]}var js={configDotenv:MYe,_configVault:LYe,_parseVault:TYe,config:UYe,decrypt:_Ye,parse:QYe,populate:HYe};wp.exports.configDotenv=js.configDotenv;wp.exports._configVault=js._configVault;wp.exports._parseVault=js._parseVault;wp.exports.config=js.config;wp.exports.decrypt=js.decrypt;wp.exports.parse=js.parse;wp.exports.populate=js.populate;wp.exports=js});var Ine=_((KTt,Ene)=>{\"use strict\";Ene.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var Ld=_((zTt,b_)=>{\"use strict\";var jYe=Ine(),Cne=t=>{if(t<1)throw new TypeError(\"Expected `concurrency` to be a number from 1 and up\");let e=[],r=0,s=()=>{r--,e.length>0&&e.shift()()},a=(f,p,...h)=>{r++;let E=jYe(f,...h);p(E),E.then(s,s)},n=(f,p,...h)=>{r<t?a(f,p,...h):e.push(a.bind(null,f,p,...h))},c=(f,...p)=>new Promise(h=>n(f,h,...p));return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),c};b_.exports=Cne;b_.exports.default=Cne});function Yf(t){return`YN${t.toString(10).padStart(4,\"0\")}`}function jx(t){let e=Number(t.slice(2));if(typeof Br[e]>\"u\")throw new Error(`Unknown message name: \"${t}\"`);return e}var Br,Gx=Xe(()=>{Br=(Me=>(Me[Me.UNNAMED=0]=\"UNNAMED\",Me[Me.EXCEPTION=1]=\"EXCEPTION\",Me[Me.MISSING_PEER_DEPENDENCY=2]=\"MISSING_PEER_DEPENDENCY\",Me[Me.CYCLIC_DEPENDENCIES=3]=\"CYCLIC_DEPENDENCIES\",Me[Me.DISABLED_BUILD_SCRIPTS=4]=\"DISABLED_BUILD_SCRIPTS\",Me[Me.BUILD_DISABLED=5]=\"BUILD_DISABLED\",Me[Me.SOFT_LINK_BUILD=6]=\"SOFT_LINK_BUILD\",Me[Me.MUST_BUILD=7]=\"MUST_BUILD\",Me[Me.MUST_REBUILD=8]=\"MUST_REBUILD\",Me[Me.BUILD_FAILED=9]=\"BUILD_FAILED\",Me[Me.RESOLVER_NOT_FOUND=10]=\"RESOLVER_NOT_FOUND\",Me[Me.FETCHER_NOT_FOUND=11]=\"FETCHER_NOT_FOUND\",Me[Me.LINKER_NOT_FOUND=12]=\"LINKER_NOT_FOUND\",Me[Me.FETCH_NOT_CACHED=13]=\"FETCH_NOT_CACHED\",Me[Me.YARN_IMPORT_FAILED=14]=\"YARN_IMPORT_FAILED\",Me[Me.REMOTE_INVALID=15]=\"REMOTE_INVALID\",Me[Me.REMOTE_NOT_FOUND=16]=\"REMOTE_NOT_FOUND\",Me[Me.RESOLUTION_PACK=17]=\"RESOLUTION_PACK\",Me[Me.CACHE_CHECKSUM_MISMATCH=18]=\"CACHE_CHECKSUM_MISMATCH\",Me[Me.UNUSED_CACHE_ENTRY=19]=\"UNUSED_CACHE_ENTRY\",Me[Me.MISSING_LOCKFILE_ENTRY=20]=\"MISSING_LOCKFILE_ENTRY\",Me[Me.WORKSPACE_NOT_FOUND=21]=\"WORKSPACE_NOT_FOUND\",Me[Me.TOO_MANY_MATCHING_WORKSPACES=22]=\"TOO_MANY_MATCHING_WORKSPACES\",Me[Me.CONSTRAINTS_MISSING_DEPENDENCY=23]=\"CONSTRAINTS_MISSING_DEPENDENCY\",Me[Me.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]=\"CONSTRAINTS_INCOMPATIBLE_DEPENDENCY\",Me[Me.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]=\"CONSTRAINTS_EXTRANEOUS_DEPENDENCY\",Me[Me.CONSTRAINTS_INVALID_DEPENDENCY=26]=\"CONSTRAINTS_INVALID_DEPENDENCY\",Me[Me.CANT_SUGGEST_RESOLUTIONS=27]=\"CANT_SUGGEST_RESOLUTIONS\",Me[Me.FROZEN_LOCKFILE_EXCEPTION=28]=\"FROZEN_LOCKFILE_EXCEPTION\",Me[Me.CROSS_DRIVE_VIRTUAL_LOCAL=29]=\"CROSS_DRIVE_VIRTUAL_LOCAL\",Me[Me.FETCH_FAILED=30]=\"FETCH_FAILED\",Me[Me.DANGEROUS_NODE_MODULES=31]=\"DANGEROUS_NODE_MODULES\",Me[Me.NODE_GYP_INJECTED=32]=\"NODE_GYP_INJECTED\",Me[Me.AUTHENTICATION_NOT_FOUND=33]=\"AUTHENTICATION_NOT_FOUND\",Me[Me.INVALID_CONFIGURATION_KEY=34]=\"INVALID_CONFIGURATION_KEY\",Me[Me.NETWORK_ERROR=35]=\"NETWORK_ERROR\",Me[Me.LIFECYCLE_SCRIPT=36]=\"LIFECYCLE_SCRIPT\",Me[Me.CONSTRAINTS_MISSING_FIELD=37]=\"CONSTRAINTS_MISSING_FIELD\",Me[Me.CONSTRAINTS_INCOMPATIBLE_FIELD=38]=\"CONSTRAINTS_INCOMPATIBLE_FIELD\",Me[Me.CONSTRAINTS_EXTRANEOUS_FIELD=39]=\"CONSTRAINTS_EXTRANEOUS_FIELD\",Me[Me.CONSTRAINTS_INVALID_FIELD=40]=\"CONSTRAINTS_INVALID_FIELD\",Me[Me.AUTHENTICATION_INVALID=41]=\"AUTHENTICATION_INVALID\",Me[Me.PROLOG_UNKNOWN_ERROR=42]=\"PROLOG_UNKNOWN_ERROR\",Me[Me.PROLOG_SYNTAX_ERROR=43]=\"PROLOG_SYNTAX_ERROR\",Me[Me.PROLOG_EXISTENCE_ERROR=44]=\"PROLOG_EXISTENCE_ERROR\",Me[Me.STACK_OVERFLOW_RESOLUTION=45]=\"STACK_OVERFLOW_RESOLUTION\",Me[Me.AUTOMERGE_FAILED_TO_PARSE=46]=\"AUTOMERGE_FAILED_TO_PARSE\",Me[Me.AUTOMERGE_IMMUTABLE=47]=\"AUTOMERGE_IMMUTABLE\",Me[Me.AUTOMERGE_SUCCESS=48]=\"AUTOMERGE_SUCCESS\",Me[Me.AUTOMERGE_REQUIRED=49]=\"AUTOMERGE_REQUIRED\",Me[Me.DEPRECATED_CLI_SETTINGS=50]=\"DEPRECATED_CLI_SETTINGS\",Me[Me.PLUGIN_NAME_NOT_FOUND=51]=\"PLUGIN_NAME_NOT_FOUND\",Me[Me.INVALID_PLUGIN_REFERENCE=52]=\"INVALID_PLUGIN_REFERENCE\",Me[Me.CONSTRAINTS_AMBIGUITY=53]=\"CONSTRAINTS_AMBIGUITY\",Me[Me.CACHE_OUTSIDE_PROJECT=54]=\"CACHE_OUTSIDE_PROJECT\",Me[Me.IMMUTABLE_INSTALL=55]=\"IMMUTABLE_INSTALL\",Me[Me.IMMUTABLE_CACHE=56]=\"IMMUTABLE_CACHE\",Me[Me.INVALID_MANIFEST=57]=\"INVALID_MANIFEST\",Me[Me.PACKAGE_PREPARATION_FAILED=58]=\"PACKAGE_PREPARATION_FAILED\",Me[Me.INVALID_RANGE_PEER_DEPENDENCY=59]=\"INVALID_RANGE_PEER_DEPENDENCY\",Me[Me.INCOMPATIBLE_PEER_DEPENDENCY=60]=\"INCOMPATIBLE_PEER_DEPENDENCY\",Me[Me.DEPRECATED_PACKAGE=61]=\"DEPRECATED_PACKAGE\",Me[Me.INCOMPATIBLE_OS=62]=\"INCOMPATIBLE_OS\",Me[Me.INCOMPATIBLE_CPU=63]=\"INCOMPATIBLE_CPU\",Me[Me.FROZEN_ARTIFACT_EXCEPTION=64]=\"FROZEN_ARTIFACT_EXCEPTION\",Me[Me.TELEMETRY_NOTICE=65]=\"TELEMETRY_NOTICE\",Me[Me.PATCH_HUNK_FAILED=66]=\"PATCH_HUNK_FAILED\",Me[Me.INVALID_CONFIGURATION_VALUE=67]=\"INVALID_CONFIGURATION_VALUE\",Me[Me.UNUSED_PACKAGE_EXTENSION=68]=\"UNUSED_PACKAGE_EXTENSION\",Me[Me.REDUNDANT_PACKAGE_EXTENSION=69]=\"REDUNDANT_PACKAGE_EXTENSION\",Me[Me.AUTO_NM_SUCCESS=70]=\"AUTO_NM_SUCCESS\",Me[Me.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK=71]=\"NM_CANT_INSTALL_EXTERNAL_SOFT_LINK\",Me[Me.NM_PRESERVE_SYMLINKS_REQUIRED=72]=\"NM_PRESERVE_SYMLINKS_REQUIRED\",Me[Me.UPDATE_LOCKFILE_ONLY_SKIP_LINK=73]=\"UPDATE_LOCKFILE_ONLY_SKIP_LINK\",Me[Me.NM_HARDLINKS_MODE_DOWNGRADED=74]=\"NM_HARDLINKS_MODE_DOWNGRADED\",Me[Me.PROLOG_INSTANTIATION_ERROR=75]=\"PROLOG_INSTANTIATION_ERROR\",Me[Me.INCOMPATIBLE_ARCHITECTURE=76]=\"INCOMPATIBLE_ARCHITECTURE\",Me[Me.GHOST_ARCHITECTURE=77]=\"GHOST_ARCHITECTURE\",Me[Me.RESOLUTION_MISMATCH=78]=\"RESOLUTION_MISMATCH\",Me[Me.PROLOG_LIMIT_EXCEEDED=79]=\"PROLOG_LIMIT_EXCEEDED\",Me[Me.NETWORK_DISABLED=80]=\"NETWORK_DISABLED\",Me[Me.NETWORK_UNSAFE_HTTP=81]=\"NETWORK_UNSAFE_HTTP\",Me[Me.RESOLUTION_FAILED=82]=\"RESOLUTION_FAILED\",Me[Me.AUTOMERGE_GIT_ERROR=83]=\"AUTOMERGE_GIT_ERROR\",Me[Me.CONSTRAINTS_CHECK_FAILED=84]=\"CONSTRAINTS_CHECK_FAILED\",Me[Me.UPDATED_RESOLUTION_RECORD=85]=\"UPDATED_RESOLUTION_RECORD\",Me[Me.EXPLAIN_PEER_DEPENDENCIES_CTA=86]=\"EXPLAIN_PEER_DEPENDENCIES_CTA\",Me[Me.MIGRATION_SUCCESS=87]=\"MIGRATION_SUCCESS\",Me[Me.VERSION_NOTICE=88]=\"VERSION_NOTICE\",Me[Me.TIPS_NOTICE=89]=\"TIPS_NOTICE\",Me[Me.OFFLINE_MODE_ENABLED=90]=\"OFFLINE_MODE_ENABLED\",Me[Me.INVALID_PROVENANCE_ENVIRONMENT=91]=\"INVALID_PROVENANCE_ENVIRONMENT\",Me))(Br||{})});var aB=_((ZTt,wne)=>{var GYe=\"2.0.0\",qYe=Number.MAX_SAFE_INTEGER||9007199254740991,WYe=16,YYe=250,VYe=[\"major\",\"premajor\",\"minor\",\"preminor\",\"patch\",\"prepatch\",\"prerelease\"];wne.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:WYe,MAX_SAFE_BUILD_LENGTH:YYe,MAX_SAFE_INTEGER:qYe,RELEASE_TYPES:VYe,SEMVER_SPEC_VERSION:GYe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var lB=_(($Tt,Bne)=>{var JYe=typeof process==\"object\"&&process.env&&process.env.NODE_DEBUG&&/\\bsemver\\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error(\"SEMVER\",...t):()=>{};Bne.exports=JYe});var vE=_((Bp,vne)=>{var{MAX_SAFE_COMPONENT_LENGTH:P_,MAX_SAFE_BUILD_LENGTH:KYe,MAX_LENGTH:zYe}=aB(),XYe=lB();Bp=vne.exports={};var ZYe=Bp.re=[],$Ye=Bp.safeRe=[],rr=Bp.src=[],nr=Bp.t={},eVe=0,x_=\"[a-zA-Z0-9-]\",tVe=[[\"\\\\s\",1],[\"\\\\d\",zYe],[x_,KYe]],rVe=t=>{for(let[e,r]of tVe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Jr=(t,e,r)=>{let s=rVe(e),a=eVe++;XYe(t,a,e),nr[t]=a,rr[a]=e,ZYe[a]=new RegExp(e,r?\"g\":void 0),$Ye[a]=new RegExp(s,r?\"g\":void 0)};Jr(\"NUMERICIDENTIFIER\",\"0|[1-9]\\\\d*\");Jr(\"NUMERICIDENTIFIERLOOSE\",\"\\\\d+\");Jr(\"NONNUMERICIDENTIFIER\",`\\\\d*[a-zA-Z-]${x_}*`);Jr(\"MAINVERSION\",`(${rr[nr.NUMERICIDENTIFIER]})\\\\.(${rr[nr.NUMERICIDENTIFIER]})\\\\.(${rr[nr.NUMERICIDENTIFIER]})`);Jr(\"MAINVERSIONLOOSE\",`(${rr[nr.NUMERICIDENTIFIERLOOSE]})\\\\.(${rr[nr.NUMERICIDENTIFIERLOOSE]})\\\\.(${rr[nr.NUMERICIDENTIFIERLOOSE]})`);Jr(\"PRERELEASEIDENTIFIER\",`(?:${rr[nr.NUMERICIDENTIFIER]}|${rr[nr.NONNUMERICIDENTIFIER]})`);Jr(\"PRERELEASEIDENTIFIERLOOSE\",`(?:${rr[nr.NUMERICIDENTIFIERLOOSE]}|${rr[nr.NONNUMERICIDENTIFIER]})`);Jr(\"PRERELEASE\",`(?:-(${rr[nr.PRERELEASEIDENTIFIER]}(?:\\\\.${rr[nr.PRERELEASEIDENTIFIER]})*))`);Jr(\"PRERELEASELOOSE\",`(?:-?(${rr[nr.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${rr[nr.PRERELEASEIDENTIFIERLOOSE]})*))`);Jr(\"BUILDIDENTIFIER\",`${x_}+`);Jr(\"BUILD\",`(?:\\\\+(${rr[nr.BUILDIDENTIFIER]}(?:\\\\.${rr[nr.BUILDIDENTIFIER]})*))`);Jr(\"FULLPLAIN\",`v?${rr[nr.MAINVERSION]}${rr[nr.PRERELEASE]}?${rr[nr.BUILD]}?`);Jr(\"FULL\",`^${rr[nr.FULLPLAIN]}$`);Jr(\"LOOSEPLAIN\",`[v=\\\\s]*${rr[nr.MAINVERSIONLOOSE]}${rr[nr.PRERELEASELOOSE]}?${rr[nr.BUILD]}?`);Jr(\"LOOSE\",`^${rr[nr.LOOSEPLAIN]}$`);Jr(\"GTLT\",\"((?:<|>)?=?)\");Jr(\"XRANGEIDENTIFIERLOOSE\",`${rr[nr.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);Jr(\"XRANGEIDENTIFIER\",`${rr[nr.NUMERICIDENTIFIER]}|x|X|\\\\*`);Jr(\"XRANGEPLAIN\",`[v=\\\\s]*(${rr[nr.XRANGEIDENTIFIER]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIER]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIER]})(?:${rr[nr.PRERELEASE]})?${rr[nr.BUILD]}?)?)?`);Jr(\"XRANGEPLAINLOOSE\",`[v=\\\\s]*(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:${rr[nr.PRERELEASELOOSE]})?${rr[nr.BUILD]}?)?)?`);Jr(\"XRANGE\",`^${rr[nr.GTLT]}\\\\s*${rr[nr.XRANGEPLAIN]}$`);Jr(\"XRANGELOOSE\",`^${rr[nr.GTLT]}\\\\s*${rr[nr.XRANGEPLAINLOOSE]}$`);Jr(\"COERCEPLAIN\",`(^|[^\\\\d])(\\\\d{1,${P_}})(?:\\\\.(\\\\d{1,${P_}}))?(?:\\\\.(\\\\d{1,${P_}}))?`);Jr(\"COERCE\",`${rr[nr.COERCEPLAIN]}(?:$|[^\\\\d])`);Jr(\"COERCEFULL\",rr[nr.COERCEPLAIN]+`(?:${rr[nr.PRERELEASE]})?(?:${rr[nr.BUILD]})?(?:$|[^\\\\d])`);Jr(\"COERCERTL\",rr[nr.COERCE],!0);Jr(\"COERCERTLFULL\",rr[nr.COERCEFULL],!0);Jr(\"LONETILDE\",\"(?:~>?)\");Jr(\"TILDETRIM\",`(\\\\s*)${rr[nr.LONETILDE]}\\\\s+`,!0);Bp.tildeTrimReplace=\"$1~\";Jr(\"TILDE\",`^${rr[nr.LONETILDE]}${rr[nr.XRANGEPLAIN]}$`);Jr(\"TILDELOOSE\",`^${rr[nr.LONETILDE]}${rr[nr.XRANGEPLAINLOOSE]}$`);Jr(\"LONECARET\",\"(?:\\\\^)\");Jr(\"CARETTRIM\",`(\\\\s*)${rr[nr.LONECARET]}\\\\s+`,!0);Bp.caretTrimReplace=\"$1^\";Jr(\"CARET\",`^${rr[nr.LONECARET]}${rr[nr.XRANGEPLAIN]}$`);Jr(\"CARETLOOSE\",`^${rr[nr.LONECARET]}${rr[nr.XRANGEPLAINLOOSE]}$`);Jr(\"COMPARATORLOOSE\",`^${rr[nr.GTLT]}\\\\s*(${rr[nr.LOOSEPLAIN]})$|^$`);Jr(\"COMPARATOR\",`^${rr[nr.GTLT]}\\\\s*(${rr[nr.FULLPLAIN]})$|^$`);Jr(\"COMPARATORTRIM\",`(\\\\s*)${rr[nr.GTLT]}\\\\s*(${rr[nr.LOOSEPLAIN]}|${rr[nr.XRANGEPLAIN]})`,!0);Bp.comparatorTrimReplace=\"$1$2$3\";Jr(\"HYPHENRANGE\",`^\\\\s*(${rr[nr.XRANGEPLAIN]})\\\\s+-\\\\s+(${rr[nr.XRANGEPLAIN]})\\\\s*$`);Jr(\"HYPHENRANGELOOSE\",`^\\\\s*(${rr[nr.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${rr[nr.XRANGEPLAINLOOSE]})\\\\s*$`);Jr(\"STAR\",\"(<|>)?=?\\\\s*\\\\*\");Jr(\"GTE0\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");Jr(\"GTE0PRE\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\")});var qx=_((eRt,Sne)=>{var nVe=Object.freeze({loose:!0}),iVe=Object.freeze({}),sVe=t=>t?typeof t!=\"object\"?nVe:t:iVe;Sne.exports=sVe});var k_=_((tRt,Pne)=>{var Dne=/^[0-9]+$/,bne=(t,e)=>{let r=Dne.test(t),s=Dne.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},oVe=(t,e)=>bne(e,t);Pne.exports={compareIdentifiers:bne,rcompareIdentifiers:oVe}});var jo=_((rRt,Tne)=>{var Wx=lB(),{MAX_LENGTH:xne,MAX_SAFE_INTEGER:Yx}=aB(),{safeRe:kne,t:Qne}=vE(),aVe=qx(),{compareIdentifiers:SE}=k_(),Q_=class t{constructor(e,r){if(r=aVe(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!=\"string\")throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof e}\".`);if(e.length>xne)throw new TypeError(`version is longer than ${xne} characters`);Wx(\"SemVer\",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?kne[Qne.LOOSE]:kne[Qne.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>Yx||this.major<0)throw new TypeError(\"Invalid major version\");if(this.minor>Yx||this.minor<0)throw new TypeError(\"Invalid minor version\");if(this.patch>Yx||this.patch<0)throw new TypeError(\"Invalid patch version\");s[4]?this.prerelease=s[4].split(\".\").map(a=>{if(/^[0-9]+$/.test(a)){let n=+a;if(n>=0&&n<Yx)return n}return a}):this.prerelease=[],this.build=s[5]?s[5].split(\".\"):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(\".\")}`),this.version}toString(){return this.version}compare(e){if(Wx(\"SemVer.compare\",this.version,this.options,e),!(e instanceof t)){if(typeof e==\"string\"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),SE(this.major,e.major)||SE(this.minor,e.minor)||SE(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],a=e.prerelease[r];if(Wx(\"prerelease compare\",r,s,a),s===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(s===void 0)return-1;if(s===a)continue;return SE(s,a)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],a=e.build[r];if(Wx(\"prerelease compare\",r,s,a),s===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(s===void 0)return-1;if(s===a)continue;return SE(s,a)}while(++r)}inc(e,r,s){switch(e){case\"premajor\":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(\"pre\",r,s);break;case\"preminor\":this.prerelease.length=0,this.patch=0,this.minor++,this.inc(\"pre\",r,s);break;case\"prepatch\":this.prerelease.length=0,this.inc(\"patch\",r,s),this.inc(\"pre\",r,s);break;case\"prerelease\":this.prerelease.length===0&&this.inc(\"patch\",r,s),this.inc(\"pre\",r,s);break;case\"major\":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case\"minor\":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case\"patch\":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case\"pre\":{let a=Number(s)?1:0;if(!r&&s===!1)throw new Error(\"invalid increment argument: identifier is empty\");if(this.prerelease.length===0)this.prerelease=[a];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]==\"number\"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(\".\")&&s===!1)throw new Error(\"invalid increment argument: identifier already exists\");this.prerelease.push(a)}}if(r){let n=[r,a];s===!1&&(n=[r]),SE(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(\".\")}`),this}};Tne.exports=Q_});var Md=_((nRt,Fne)=>{var Rne=jo(),lVe=(t,e,r=!1)=>{if(t instanceof Rne)return t;try{return new Rne(t,e)}catch(s){if(!r)return null;throw s}};Fne.exports=lVe});var One=_((iRt,Nne)=>{var cVe=Md(),uVe=(t,e)=>{let r=cVe(t,e);return r?r.version:null};Nne.exports=uVe});var Mne=_((sRt,Lne)=>{var fVe=Md(),AVe=(t,e)=>{let r=fVe(t.trim().replace(/^[=v]+/,\"\"),e);return r?r.version:null};Lne.exports=AVe});var Hne=_((oRt,_ne)=>{var Une=jo(),pVe=(t,e,r,s,a)=>{typeof r==\"string\"&&(a=s,s=r,r=void 0);try{return new Une(t instanceof Une?t.version:t,r).inc(e,s,a).version}catch{return null}};_ne.exports=pVe});var qne=_((aRt,Gne)=>{var jne=Md(),hVe=(t,e)=>{let r=jne(t,null,!0),s=jne(e,null,!0),a=r.compare(s);if(a===0)return null;let n=a>0,c=n?r:s,f=n?s:r,p=!!c.prerelease.length;if(!!f.prerelease.length&&!p)return!f.patch&&!f.minor?\"major\":c.patch?\"patch\":c.minor?\"minor\":\"major\";let E=p?\"pre\":\"\";return r.major!==s.major?E+\"major\":r.minor!==s.minor?E+\"minor\":r.patch!==s.patch?E+\"patch\":\"prerelease\"};Gne.exports=hVe});var Yne=_((lRt,Wne)=>{var gVe=jo(),dVe=(t,e)=>new gVe(t,e).major;Wne.exports=dVe});var Jne=_((cRt,Vne)=>{var mVe=jo(),yVe=(t,e)=>new mVe(t,e).minor;Vne.exports=yVe});var zne=_((uRt,Kne)=>{var EVe=jo(),IVe=(t,e)=>new EVe(t,e).patch;Kne.exports=IVe});var Zne=_((fRt,Xne)=>{var CVe=Md(),wVe=(t,e)=>{let r=CVe(t,e);return r&&r.prerelease.length?r.prerelease:null};Xne.exports=wVe});var Bc=_((ARt,eie)=>{var $ne=jo(),BVe=(t,e,r)=>new $ne(t,r).compare(new $ne(e,r));eie.exports=BVe});var rie=_((pRt,tie)=>{var vVe=Bc(),SVe=(t,e,r)=>vVe(e,t,r);tie.exports=SVe});var iie=_((hRt,nie)=>{var DVe=Bc(),bVe=(t,e)=>DVe(t,e,!0);nie.exports=bVe});var Vx=_((gRt,oie)=>{var sie=jo(),PVe=(t,e,r)=>{let s=new sie(t,r),a=new sie(e,r);return s.compare(a)||s.compareBuild(a)};oie.exports=PVe});var lie=_((dRt,aie)=>{var xVe=Vx(),kVe=(t,e)=>t.sort((r,s)=>xVe(r,s,e));aie.exports=kVe});var uie=_((mRt,cie)=>{var QVe=Vx(),TVe=(t,e)=>t.sort((r,s)=>QVe(s,r,e));cie.exports=TVe});var cB=_((yRt,fie)=>{var RVe=Bc(),FVe=(t,e,r)=>RVe(t,e,r)>0;fie.exports=FVe});var Jx=_((ERt,Aie)=>{var NVe=Bc(),OVe=(t,e,r)=>NVe(t,e,r)<0;Aie.exports=OVe});var T_=_((IRt,pie)=>{var LVe=Bc(),MVe=(t,e,r)=>LVe(t,e,r)===0;pie.exports=MVe});var R_=_((CRt,hie)=>{var UVe=Bc(),_Ve=(t,e,r)=>UVe(t,e,r)!==0;hie.exports=_Ve});var Kx=_((wRt,gie)=>{var HVe=Bc(),jVe=(t,e,r)=>HVe(t,e,r)>=0;gie.exports=jVe});var zx=_((BRt,die)=>{var GVe=Bc(),qVe=(t,e,r)=>GVe(t,e,r)<=0;die.exports=qVe});var F_=_((vRt,mie)=>{var WVe=T_(),YVe=R_(),VVe=cB(),JVe=Kx(),KVe=Jx(),zVe=zx(),XVe=(t,e,r,s)=>{switch(e){case\"===\":return typeof t==\"object\"&&(t=t.version),typeof r==\"object\"&&(r=r.version),t===r;case\"!==\":return typeof t==\"object\"&&(t=t.version),typeof r==\"object\"&&(r=r.version),t!==r;case\"\":case\"=\":case\"==\":return WVe(t,r,s);case\"!=\":return YVe(t,r,s);case\">\":return VVe(t,r,s);case\">=\":return JVe(t,r,s);case\"<\":return KVe(t,r,s);case\"<=\":return zVe(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};mie.exports=XVe});var Eie=_((SRt,yie)=>{var ZVe=jo(),$Ve=Md(),{safeRe:Xx,t:Zx}=vE(),e7e=(t,e)=>{if(t instanceof ZVe)return t;if(typeof t==\"number\"&&(t=String(t)),typeof t!=\"string\")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Xx[Zx.COERCEFULL]:Xx[Zx.COERCE]);else{let p=e.includePrerelease?Xx[Zx.COERCERTLFULL]:Xx[Zx.COERCERTL],h;for(;(h=p.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||h.index+h[0].length!==r.index+r[0].length)&&(r=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(r===null)return null;let s=r[2],a=r[3]||\"0\",n=r[4]||\"0\",c=e.includePrerelease&&r[5]?`-${r[5]}`:\"\",f=e.includePrerelease&&r[6]?`+${r[6]}`:\"\";return $Ve(`${s}.${a}.${n}${c}${f}`,e)};yie.exports=e7e});var Cie=_((DRt,Iie)=>{\"use strict\";Iie.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var $x=_((bRt,wie)=>{\"use strict\";wie.exports=Fn;Fn.Node=Ud;Fn.create=Fn;function Fn(t){var e=this;if(e instanceof Fn||(e=new Fn),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach==\"function\")t.forEach(function(a){e.push(a)});else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)e.push(arguments[r]);return e}Fn.prototype.removeNode=function(t){if(t.list!==this)throw new Error(\"removing node which does not belong to this list\");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};Fn.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};Fn.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};Fn.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)r7e(this,arguments[t]);return this.length};Fn.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)n7e(this,arguments[t]);return this.length};Fn.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};Fn.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};Fn.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,s=0;r!==null;s++)t.call(e,r.value,s,this),r=r.next};Fn.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,s=this.length-1;r!==null;s--)t.call(e,r.value,s,this),r=r.prev};Fn.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};Fn.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};Fn.prototype.map=function(t,e){e=e||this;for(var r=new Fn,s=this.head;s!==null;)r.push(t.call(e,s.value,this)),s=s.next;return r};Fn.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Fn,s=this.tail;s!==null;)r.push(t.call(e,s.value,this)),s=s.prev;return r};Fn.prototype.reduce=function(t,e){var r,s=this.head;if(arguments.length>1)r=e;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError(\"Reduce of empty list with no initial value\");for(var a=0;s!==null;a++)r=t(r,s.value,a),s=s.next;return r};Fn.prototype.reduceReverse=function(t,e){var r,s=this.tail;if(arguments.length>1)r=e;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError(\"Reduce of empty list with no initial value\");for(var a=this.length-1;s!==null;a--)r=t(r,s.value,a),s=s.prev;return r};Fn.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Fn.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Fn.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Fn;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=0,a=this.head;a!==null&&s<t;s++)a=a.next;for(;a!==null&&s<e;s++,a=a.next)r.push(a.value);return r};Fn.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Fn;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=this.length,a=this.tail;a!==null&&s>e;s--)a=a.prev;for(;a!==null&&s>t;s--,a=a.prev)r.push(a.value);return r};Fn.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,a=this.head;a!==null&&s<t;s++)a=a.next;for(var n=[],s=0;a&&s<e;s++)n.push(a.value),a=this.removeNode(a);a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(var s=0;s<r.length;s++)a=t7e(this,a,r[s]);return n};Fn.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=e,this.tail=t,this};function t7e(t,e,r){var s=e===t.head?new Ud(r,null,e,t):new Ud(r,e,e.next,t);return s.next===null&&(t.tail=s),s.prev===null&&(t.head=s),t.length++,s}function r7e(t,e){t.tail=new Ud(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function n7e(t,e){t.head=new Ud(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Ud(t,e,r,s){if(!(this instanceof Ud))return new Ud(t,e,r,s);this.list=s,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Cie()(Fn)}catch{}});var bie=_((PRt,Die)=>{\"use strict\";var i7e=$x(),_d=Symbol(\"max\"),Sp=Symbol(\"length\"),DE=Symbol(\"lengthCalculator\"),fB=Symbol(\"allowStale\"),Hd=Symbol(\"maxAge\"),vp=Symbol(\"dispose\"),Bie=Symbol(\"noDisposeOnSet\"),Gs=Symbol(\"lruList\"),Lu=Symbol(\"cache\"),Sie=Symbol(\"updateAgeOnGet\"),N_=()=>1,L_=class{constructor(e){if(typeof e==\"number\"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!=\"number\"||e.max<0))throw new TypeError(\"max must be a non-negative number\");let r=this[_d]=e.max||1/0,s=e.length||N_;if(this[DE]=typeof s!=\"function\"?N_:s,this[fB]=e.stale||!1,e.maxAge&&typeof e.maxAge!=\"number\")throw new TypeError(\"maxAge must be a number\");this[Hd]=e.maxAge||0,this[vp]=e.dispose,this[Bie]=e.noDisposeOnSet||!1,this[Sie]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!=\"number\"||e<0)throw new TypeError(\"max must be a non-negative number\");this[_d]=e||1/0,uB(this)}get max(){return this[_d]}set allowStale(e){this[fB]=!!e}get allowStale(){return this[fB]}set maxAge(e){if(typeof e!=\"number\")throw new TypeError(\"maxAge must be a non-negative number\");this[Hd]=e,uB(this)}get maxAge(){return this[Hd]}set lengthCalculator(e){typeof e!=\"function\"&&(e=N_),e!==this[DE]&&(this[DE]=e,this[Sp]=0,this[Gs].forEach(r=>{r.length=this[DE](r.value,r.key),this[Sp]+=r.length})),uB(this)}get lengthCalculator(){return this[DE]}get length(){return this[Sp]}get itemCount(){return this[Gs].length}rforEach(e,r){r=r||this;for(let s=this[Gs].tail;s!==null;){let a=s.prev;vie(this,e,s,r),s=a}}forEach(e,r){r=r||this;for(let s=this[Gs].head;s!==null;){let a=s.next;vie(this,e,s,r),s=a}}keys(){return this[Gs].toArray().map(e=>e.key)}values(){return this[Gs].toArray().map(e=>e.value)}reset(){this[vp]&&this[Gs]&&this[Gs].length&&this[Gs].forEach(e=>this[vp](e.key,e.value)),this[Lu]=new Map,this[Gs]=new i7e,this[Sp]=0}dump(){return this[Gs].map(e=>ek(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Gs]}set(e,r,s){if(s=s||this[Hd],s&&typeof s!=\"number\")throw new TypeError(\"maxAge must be a number\");let a=s?Date.now():0,n=this[DE](r,e);if(this[Lu].has(e)){if(n>this[_d])return bE(this,this[Lu].get(e)),!1;let p=this[Lu].get(e).value;return this[vp]&&(this[Bie]||this[vp](e,p.value)),p.now=a,p.maxAge=s,p.value=r,this[Sp]+=n-p.length,p.length=n,this.get(e),uB(this),!0}let c=new M_(e,r,n,a,s);return c.length>this[_d]?(this[vp]&&this[vp](e,r),!1):(this[Sp]+=c.length,this[Gs].unshift(c),this[Lu].set(e,this[Gs].head),uB(this),!0)}has(e){if(!this[Lu].has(e))return!1;let r=this[Lu].get(e).value;return!ek(this,r)}get(e){return O_(this,e,!0)}peek(e){return O_(this,e,!1)}pop(){let e=this[Gs].tail;return e?(bE(this,e),e.value):null}del(e){bE(this,this[Lu].get(e))}load(e){this.reset();let r=Date.now();for(let s=e.length-1;s>=0;s--){let a=e[s],n=a.e||0;if(n===0)this.set(a.k,a.v);else{let c=n-r;c>0&&this.set(a.k,a.v,c)}}}prune(){this[Lu].forEach((e,r)=>O_(this,r,!1))}},O_=(t,e,r)=>{let s=t[Lu].get(e);if(s){let a=s.value;if(ek(t,a)){if(bE(t,s),!t[fB])return}else r&&(t[Sie]&&(s.value.now=Date.now()),t[Gs].unshiftNode(s));return a.value}},ek=(t,e)=>{if(!e||!e.maxAge&&!t[Hd])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Hd]&&r>t[Hd]},uB=t=>{if(t[Sp]>t[_d])for(let e=t[Gs].tail;t[Sp]>t[_d]&&e!==null;){let r=e.prev;bE(t,e),e=r}},bE=(t,e)=>{if(e){let r=e.value;t[vp]&&t[vp](r.key,r.value),t[Sp]-=r.length,t[Lu].delete(r.key),t[Gs].removeNode(e)}},M_=class{constructor(e,r,s,a,n){this.key=e,this.value=r,this.length=s,this.now=a,this.maxAge=n||0}},vie=(t,e,r,s)=>{let a=r.value;ek(t,a)&&(bE(t,r),t[fB]||(a=void 0)),a&&e.call(s,a.value,a.key,t)};Die.exports=L_});var vc=_((xRt,Qie)=>{var U_=class t{constructor(e,r){if(r=o7e(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof __)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().split(/\\s+/).join(\" \"),this.set=this.raw.split(\"||\").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(a=>!xie(a[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&p7e(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(\" \").trim()).join(\"||\").trim(),this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&f7e)|(this.options.loose&&A7e))+\":\"+e,a=Pie.get(s);if(a)return a;let n=this.options.loose,c=n?sl[wa.HYPHENRANGELOOSE]:sl[wa.HYPHENRANGE];e=e.replace(c,B7e(this.options.includePrerelease)),vi(\"hyphen replace\",e),e=e.replace(sl[wa.COMPARATORTRIM],l7e),vi(\"comparator trim\",e),e=e.replace(sl[wa.TILDETRIM],c7e),vi(\"tilde trim\",e),e=e.replace(sl[wa.CARETTRIM],u7e),vi(\"caret trim\",e);let f=e.split(\" \").map(C=>h7e(C,this.options)).join(\" \").split(/\\s+/).map(C=>w7e(C,this.options));n&&(f=f.filter(C=>(vi(\"loose invalid filter\",C,this.options),!!C.match(sl[wa.COMPARATORLOOSE])))),vi(\"range list\",f);let p=new Map,h=f.map(C=>new __(C,this.options));for(let C of h){if(xie(C))return[C];p.set(C.value,C)}p.size>1&&p.has(\"\")&&p.delete(\"\");let E=[...p.values()];return Pie.set(s,E),E}intersects(e,r){if(!(e instanceof t))throw new TypeError(\"a Range is required\");return this.set.some(s=>kie(s,r)&&e.set.some(a=>kie(a,r)&&s.every(n=>a.every(c=>n.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e==\"string\")try{e=new a7e(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(v7e(this.set[r],e,this.options))return!0;return!1}};Qie.exports=U_;var s7e=bie(),Pie=new s7e({max:1e3}),o7e=qx(),__=AB(),vi=lB(),a7e=jo(),{safeRe:sl,t:wa,comparatorTrimReplace:l7e,tildeTrimReplace:c7e,caretTrimReplace:u7e}=vE(),{FLAG_INCLUDE_PRERELEASE:f7e,FLAG_LOOSE:A7e}=aB(),xie=t=>t.value===\"<0.0.0-0\",p7e=t=>t.value===\"\",kie=(t,e)=>{let r=!0,s=t.slice(),a=s.pop();for(;r&&s.length;)r=s.every(n=>a.intersects(n,e)),a=s.pop();return r},h7e=(t,e)=>(vi(\"comp\",t,e),t=m7e(t,e),vi(\"caret\",t),t=g7e(t,e),vi(\"tildes\",t),t=E7e(t,e),vi(\"xrange\",t),t=C7e(t,e),vi(\"stars\",t),t),Ba=t=>!t||t.toLowerCase()===\"x\"||t===\"*\",g7e=(t,e)=>t.trim().split(/\\s+/).map(r=>d7e(r,e)).join(\" \"),d7e=(t,e)=>{let r=e.loose?sl[wa.TILDELOOSE]:sl[wa.TILDE];return t.replace(r,(s,a,n,c,f)=>{vi(\"tilde\",t,s,a,n,c,f);let p;return Ba(a)?p=\"\":Ba(n)?p=`>=${a}.0.0 <${+a+1}.0.0-0`:Ba(c)?p=`>=${a}.${n}.0 <${a}.${+n+1}.0-0`:f?(vi(\"replaceTilde pr\",f),p=`>=${a}.${n}.${c}-${f} <${a}.${+n+1}.0-0`):p=`>=${a}.${n}.${c} <${a}.${+n+1}.0-0`,vi(\"tilde return\",p),p})},m7e=(t,e)=>t.trim().split(/\\s+/).map(r=>y7e(r,e)).join(\" \"),y7e=(t,e)=>{vi(\"caret\",t,e);let r=e.loose?sl[wa.CARETLOOSE]:sl[wa.CARET],s=e.includePrerelease?\"-0\":\"\";return t.replace(r,(a,n,c,f,p)=>{vi(\"caret\",t,a,n,c,f,p);let h;return Ba(n)?h=\"\":Ba(c)?h=`>=${n}.0.0${s} <${+n+1}.0.0-0`:Ba(f)?n===\"0\"?h=`>=${n}.${c}.0${s} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.0${s} <${+n+1}.0.0-0`:p?(vi(\"replaceCaret pr\",p),n===\"0\"?c===\"0\"?h=`>=${n}.${c}.${f}-${p} <${n}.${c}.${+f+1}-0`:h=`>=${n}.${c}.${f}-${p} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.${f}-${p} <${+n+1}.0.0-0`):(vi(\"no pr\"),n===\"0\"?c===\"0\"?h=`>=${n}.${c}.${f}${s} <${n}.${c}.${+f+1}-0`:h=`>=${n}.${c}.${f}${s} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.${f} <${+n+1}.0.0-0`),vi(\"caret return\",h),h})},E7e=(t,e)=>(vi(\"replaceXRanges\",t,e),t.split(/\\s+/).map(r=>I7e(r,e)).join(\" \")),I7e=(t,e)=>{t=t.trim();let r=e.loose?sl[wa.XRANGELOOSE]:sl[wa.XRANGE];return t.replace(r,(s,a,n,c,f,p)=>{vi(\"xRange\",t,s,a,n,c,f,p);let h=Ba(n),E=h||Ba(c),C=E||Ba(f),S=C;return a===\"=\"&&S&&(a=\"\"),p=e.includePrerelease?\"-0\":\"\",h?a===\">\"||a===\"<\"?s=\"<0.0.0-0\":s=\"*\":a&&S?(E&&(c=0),f=0,a===\">\"?(a=\">=\",E?(n=+n+1,c=0,f=0):(c=+c+1,f=0)):a===\"<=\"&&(a=\"<\",E?n=+n+1:c=+c+1),a===\"<\"&&(p=\"-0\"),s=`${a+n}.${c}.${f}${p}`):E?s=`>=${n}.0.0${p} <${+n+1}.0.0-0`:C&&(s=`>=${n}.${c}.0${p} <${n}.${+c+1}.0-0`),vi(\"xRange return\",s),s})},C7e=(t,e)=>(vi(\"replaceStars\",t,e),t.trim().replace(sl[wa.STAR],\"\")),w7e=(t,e)=>(vi(\"replaceGTE0\",t,e),t.trim().replace(sl[e.includePrerelease?wa.GTE0PRE:wa.GTE0],\"\")),B7e=t=>(e,r,s,a,n,c,f,p,h,E,C,S,P)=>(Ba(s)?r=\"\":Ba(a)?r=`>=${s}.0.0${t?\"-0\":\"\"}`:Ba(n)?r=`>=${s}.${a}.0${t?\"-0\":\"\"}`:c?r=`>=${r}`:r=`>=${r}${t?\"-0\":\"\"}`,Ba(h)?p=\"\":Ba(E)?p=`<${+h+1}.0.0-0`:Ba(C)?p=`<${h}.${+E+1}.0-0`:S?p=`<=${h}.${E}.${C}-${S}`:t?p=`<${h}.${E}.${+C+1}-0`:p=`<=${p}`,`${r} ${p}`.trim()),v7e=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(vi(t[s].semver),t[s].semver!==__.ANY&&t[s].semver.prerelease.length>0){let a=t[s].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var AB=_((kRt,Lie)=>{var pB=Symbol(\"SemVer ANY\"),G_=class t{static get ANY(){return pB}constructor(e,r){if(r=Tie(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\\s+/).join(\" \"),j_(\"comparator\",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===pB?this.value=\"\":this.value=this.operator+this.semver.version,j_(\"comp\",this)}parse(e){let r=this.options.loose?Rie[Fie.COMPARATORLOOSE]:Rie[Fie.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:\"\",this.operator===\"=\"&&(this.operator=\"\"),s[2]?this.semver=new Nie(s[2],this.options.loose):this.semver=pB}toString(){return this.value}test(e){if(j_(\"Comparator.test\",e,this.options.loose),this.semver===pB||e===pB)return!0;if(typeof e==\"string\")try{e=new Nie(e,this.options)}catch{return!1}return H_(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError(\"a Comparator is required\");return this.operator===\"\"?this.value===\"\"?!0:new Oie(e.value,r).test(this.value):e.operator===\"\"?e.value===\"\"?!0:new Oie(this.value,r).test(e.semver):(r=Tie(r),r.includePrerelease&&(this.value===\"<0.0.0-0\"||e.value===\"<0.0.0-0\")||!r.includePrerelease&&(this.value.startsWith(\"<0.0.0\")||e.value.startsWith(\"<0.0.0\"))?!1:!!(this.operator.startsWith(\">\")&&e.operator.startsWith(\">\")||this.operator.startsWith(\"<\")&&e.operator.startsWith(\"<\")||this.semver.version===e.semver.version&&this.operator.includes(\"=\")&&e.operator.includes(\"=\")||H_(this.semver,\"<\",e.semver,r)&&this.operator.startsWith(\">\")&&e.operator.startsWith(\"<\")||H_(this.semver,\">\",e.semver,r)&&this.operator.startsWith(\"<\")&&e.operator.startsWith(\">\")))}};Lie.exports=G_;var Tie=qx(),{safeRe:Rie,t:Fie}=vE(),H_=F_(),j_=lB(),Nie=jo(),Oie=vc()});var hB=_((QRt,Mie)=>{var S7e=vc(),D7e=(t,e,r)=>{try{e=new S7e(e,r)}catch{return!1}return e.test(t)};Mie.exports=D7e});var _ie=_((TRt,Uie)=>{var b7e=vc(),P7e=(t,e)=>new b7e(t,e).set.map(r=>r.map(s=>s.value).join(\" \").trim().split(\" \"));Uie.exports=P7e});var jie=_((RRt,Hie)=>{var x7e=jo(),k7e=vc(),Q7e=(t,e,r)=>{let s=null,a=null,n=null;try{n=new k7e(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||a.compare(c)===-1)&&(s=c,a=new x7e(s,r))}),s};Hie.exports=Q7e});var qie=_((FRt,Gie)=>{var T7e=jo(),R7e=vc(),F7e=(t,e,r)=>{let s=null,a=null,n=null;try{n=new R7e(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||a.compare(c)===1)&&(s=c,a=new T7e(s,r))}),s};Gie.exports=F7e});var Vie=_((NRt,Yie)=>{var q_=jo(),N7e=vc(),Wie=cB(),O7e=(t,e)=>{t=new N7e(t,e);let r=new q_(\"0.0.0\");if(t.test(r)||(r=new q_(\"0.0.0-0\"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let a=t.set[s],n=null;a.forEach(c=>{let f=new q_(c.semver.version);switch(c.operator){case\">\":f.prerelease.length===0?f.patch++:f.prerelease.push(0),f.raw=f.format();case\"\":case\">=\":(!n||Wie(f,n))&&(n=f);break;case\"<\":case\"<=\":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),n&&(!r||Wie(r,n))&&(r=n)}return r&&t.test(r)?r:null};Yie.exports=O7e});var Kie=_((ORt,Jie)=>{var L7e=vc(),M7e=(t,e)=>{try{return new L7e(t,e).range||\"*\"}catch{return null}};Jie.exports=M7e});var tk=_((LRt,$ie)=>{var U7e=jo(),Zie=AB(),{ANY:_7e}=Zie,H7e=vc(),j7e=hB(),zie=cB(),Xie=Jx(),G7e=zx(),q7e=Kx(),W7e=(t,e,r,s)=>{t=new U7e(t,s),e=new H7e(e,s);let a,n,c,f,p;switch(r){case\">\":a=zie,n=G7e,c=Xie,f=\">\",p=\">=\";break;case\"<\":a=Xie,n=q7e,c=zie,f=\"<\",p=\"<=\";break;default:throw new TypeError('Must provide a hilo val of \"<\" or \">\"')}if(j7e(t,e,s))return!1;for(let h=0;h<e.set.length;++h){let E=e.set[h],C=null,S=null;if(E.forEach(P=>{P.semver===_7e&&(P=new Zie(\">=0.0.0\")),C=C||P,S=S||P,a(P.semver,C.semver,s)?C=P:c(P.semver,S.semver,s)&&(S=P)}),C.operator===f||C.operator===p||(!S.operator||S.operator===f)&&n(t,S.semver))return!1;if(S.operator===p&&c(t,S.semver))return!1}return!0};$ie.exports=W7e});var tse=_((MRt,ese)=>{var Y7e=tk(),V7e=(t,e,r)=>Y7e(t,e,\">\",r);ese.exports=V7e});var nse=_((URt,rse)=>{var J7e=tk(),K7e=(t,e,r)=>J7e(t,e,\"<\",r);rse.exports=K7e});var ose=_((_Rt,sse)=>{var ise=vc(),z7e=(t,e,r)=>(t=new ise(t,r),e=new ise(e,r),t.intersects(e,r));sse.exports=z7e});var lse=_((HRt,ase)=>{var X7e=hB(),Z7e=Bc();ase.exports=(t,e,r)=>{let s=[],a=null,n=null,c=t.sort((E,C)=>Z7e(E,C,r));for(let E of c)X7e(E,e,r)?(n=E,a||(a=E)):(n&&s.push([a,n]),n=null,a=null);a&&s.push([a,null]);let f=[];for(let[E,C]of s)E===C?f.push(E):!C&&E===c[0]?f.push(\"*\"):C?E===c[0]?f.push(`<=${C}`):f.push(`${E} - ${C}`):f.push(`>=${E}`);let p=f.join(\" || \"),h=typeof e.raw==\"string\"?e.raw:String(e);return p.length<h.length?p:e}});var hse=_((jRt,pse)=>{var cse=vc(),Y_=AB(),{ANY:W_}=Y_,gB=hB(),V_=Bc(),$7e=(t,e,r={})=>{if(t===e)return!0;t=new cse(t,r),e=new cse(e,r);let s=!1;e:for(let a of t.set){for(let n of e.set){let c=tJe(a,n,r);if(s=s||c!==null,c)continue e}if(s)return!1}return!0},eJe=[new Y_(\">=0.0.0-0\")],use=[new Y_(\">=0.0.0\")],tJe=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===W_){if(e.length===1&&e[0].semver===W_)return!0;r.includePrerelease?t=eJe:t=use}if(e.length===1&&e[0].semver===W_){if(r.includePrerelease)return!0;e=use}let s=new Set,a,n;for(let P of t)P.operator===\">\"||P.operator===\">=\"?a=fse(a,P,r):P.operator===\"<\"||P.operator===\"<=\"?n=Ase(n,P,r):s.add(P.semver);if(s.size>1)return null;let c;if(a&&n){if(c=V_(a.semver,n.semver,r),c>0)return null;if(c===0&&(a.operator!==\">=\"||n.operator!==\"<=\"))return null}for(let P of s){if(a&&!gB(P,String(a),r)||n&&!gB(P,String(n),r))return null;for(let I of e)if(!gB(P,String(I),r))return!1;return!0}let f,p,h,E,C=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,S=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;C&&C.prerelease.length===1&&n.operator===\"<\"&&C.prerelease[0]===0&&(C=!1);for(let P of e){if(E=E||P.operator===\">\"||P.operator===\">=\",h=h||P.operator===\"<\"||P.operator===\"<=\",a){if(S&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===S.major&&P.semver.minor===S.minor&&P.semver.patch===S.patch&&(S=!1),P.operator===\">\"||P.operator===\">=\"){if(f=fse(a,P,r),f===P&&f!==a)return!1}else if(a.operator===\">=\"&&!gB(a.semver,String(P),r))return!1}if(n){if(C&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===C.major&&P.semver.minor===C.minor&&P.semver.patch===C.patch&&(C=!1),P.operator===\"<\"||P.operator===\"<=\"){if(p=Ase(n,P,r),p===P&&p!==n)return!1}else if(n.operator===\"<=\"&&!gB(n.semver,String(P),r))return!1}if(!P.operator&&(n||a)&&c!==0)return!1}return!(a&&h&&!n&&c!==0||n&&E&&!a&&c!==0||S||C)},fse=(t,e,r)=>{if(!t)return e;let s=V_(t.semver,e.semver,r);return s>0?t:s<0||e.operator===\">\"&&t.operator===\">=\"?e:t},Ase=(t,e,r)=>{if(!t)return e;let s=V_(t.semver,e.semver,r);return s<0?t:s>0||e.operator===\"<\"&&t.operator===\"<=\"?e:t};pse.exports=$7e});var Ai=_((GRt,mse)=>{var J_=vE(),gse=aB(),rJe=jo(),dse=k_(),nJe=Md(),iJe=One(),sJe=Mne(),oJe=Hne(),aJe=qne(),lJe=Yne(),cJe=Jne(),uJe=zne(),fJe=Zne(),AJe=Bc(),pJe=rie(),hJe=iie(),gJe=Vx(),dJe=lie(),mJe=uie(),yJe=cB(),EJe=Jx(),IJe=T_(),CJe=R_(),wJe=Kx(),BJe=zx(),vJe=F_(),SJe=Eie(),DJe=AB(),bJe=vc(),PJe=hB(),xJe=_ie(),kJe=jie(),QJe=qie(),TJe=Vie(),RJe=Kie(),FJe=tk(),NJe=tse(),OJe=nse(),LJe=ose(),MJe=lse(),UJe=hse();mse.exports={parse:nJe,valid:iJe,clean:sJe,inc:oJe,diff:aJe,major:lJe,minor:cJe,patch:uJe,prerelease:fJe,compare:AJe,rcompare:pJe,compareLoose:hJe,compareBuild:gJe,sort:dJe,rsort:mJe,gt:yJe,lt:EJe,eq:IJe,neq:CJe,gte:wJe,lte:BJe,cmp:vJe,coerce:SJe,Comparator:DJe,Range:bJe,satisfies:PJe,toComparators:xJe,maxSatisfying:kJe,minSatisfying:QJe,minVersion:TJe,validRange:RJe,outside:FJe,gtr:NJe,ltr:OJe,intersects:LJe,simplifyRange:MJe,subset:UJe,SemVer:rJe,re:J_.re,src:J_.src,tokens:J_.t,SEMVER_SPEC_VERSION:gse.SEMVER_SPEC_VERSION,RELEASE_TYPES:gse.RELEASE_TYPES,compareIdentifiers:dse.compareIdentifiers,rcompareIdentifiers:dse.rcompareIdentifiers}});var Ese=_((qRt,yse)=>{\"use strict\";function _Je(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function jd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name=\"SyntaxError\",typeof Error.captureStackTrace==\"function\"&&Error.captureStackTrace(this,jd)}_Je(jd,Error);jd.buildMessage=function(t,e){var r={literal:function(h){return'\"'+a(h.text)+'\"'},class:function(h){var E=\"\",C;for(C=0;C<h.parts.length;C++)E+=h.parts[C]instanceof Array?n(h.parts[C][0])+\"-\"+n(h.parts[C][1]):n(h.parts[C]);return\"[\"+(h.inverted?\"^\":\"\")+E+\"]\"},any:function(h){return\"any character\"},end:function(h){return\"end of input\"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function n(h){return h.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(E){return\"\\\\x0\"+s(E)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(E){return\"\\\\x\"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),C,S;for(C=0;C<h.length;C++)E[C]=c(h[C]);if(E.sort(),E.length>0){for(C=1,S=1;C<E.length;C++)E[C-1]!==E[C]&&(E[S]=E[C],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+\" or \"+E[1];default:return E.slice(0,-1).join(\", \")+\", or \"+E[E.length-1]}}function p(h){return h?'\"'+a(h)+'\"':\"end of input\"}return\"Expected \"+f(t)+\" but \"+p(e)+\" found.\"};function HJe(t,e){e=e!==void 0?e:{};var r={},s={Expression:y},a=y,n=\"|\",c=Fe(\"|\",!1),f=\"&\",p=Fe(\"&\",!1),h=\"^\",E=Fe(\"^\",!1),C=function($,oe){return!!oe.reduce((xe,Te)=>{switch(Te[1]){case\"|\":return xe|Te[3];case\"&\":return xe&Te[3];case\"^\":return xe^Te[3]}},$)},S=\"!\",P=Fe(\"!\",!1),I=function($){return!$},R=\"(\",N=Fe(\"(\",!1),U=\")\",W=Fe(\")\",!1),ee=function($){return $},ie=/^[^ \\t\\n\\r()!|&\\^]/,ue=Ne([\" \",\"\t\",`\n`,\"\\r\",\"(\",\")\",\"!\",\"|\",\"&\",\"^\"],!0,!1),le=function($){return e.queryPattern.test($)},me=function($){return e.checkFn($)},pe=ke(\"whitespace\"),Be=/^[ \\t\\n\\r]/,Ce=Ne([\" \",\"\t\",`\n`,\"\\r\"],!1,!1),g=0,we=0,ye=[{line:1,column:1}],Ae=0,se=[],Z=0,De;if(\"startRule\"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');a=s[e.startRule]}function Re(){return t.substring(we,g)}function mt(){return Ue(we,g)}function j($,oe){throw oe=oe!==void 0?oe:Ue(we,g),b([ke($)],t.substring(we,g),oe)}function rt($,oe){throw oe=oe!==void 0?oe:Ue(we,g),w($,oe)}function Fe($,oe){return{type:\"literal\",text:$,ignoreCase:oe}}function Ne($,oe,xe){return{type:\"class\",parts:$,inverted:oe,ignoreCase:xe}}function Pe(){return{type:\"any\"}}function Ve(){return{type:\"end\"}}function ke($){return{type:\"other\",description:$}}function it($){var oe=ye[$],xe;if(oe)return oe;for(xe=$-1;!ye[xe];)xe--;for(oe=ye[xe],oe={line:oe.line,column:oe.column};xe<$;)t.charCodeAt(xe)===10?(oe.line++,oe.column=1):oe.column++,xe++;return ye[$]=oe,oe}function Ue($,oe){var xe=it($),Te=it(oe);return{start:{offset:$,line:xe.line,column:xe.column},end:{offset:oe,line:Te.line,column:Te.column}}}function x($){g<Ae||(g>Ae&&(Ae=g,se=[]),se.push($))}function w($,oe){return new jd($,null,null,oe)}function b($,oe,xe){return new jd(jd.buildMessage($,oe),$,oe,xe)}function y(){var $,oe,xe,Te,lt,Ct,qt,ir;if($=g,oe=F(),oe!==r){for(xe=[],Te=g,lt=X(),lt!==r?(t.charCodeAt(g)===124?(Ct=n,g++):(Ct=r,Z===0&&x(c)),Ct===r&&(t.charCodeAt(g)===38?(Ct=f,g++):(Ct=r,Z===0&&x(p)),Ct===r&&(t.charCodeAt(g)===94?(Ct=h,g++):(Ct=r,Z===0&&x(E)))),Ct!==r?(qt=X(),qt!==r?(ir=F(),ir!==r?(lt=[lt,Ct,qt,ir],Te=lt):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r);Te!==r;)xe.push(Te),Te=g,lt=X(),lt!==r?(t.charCodeAt(g)===124?(Ct=n,g++):(Ct=r,Z===0&&x(c)),Ct===r&&(t.charCodeAt(g)===38?(Ct=f,g++):(Ct=r,Z===0&&x(p)),Ct===r&&(t.charCodeAt(g)===94?(Ct=h,g++):(Ct=r,Z===0&&x(E)))),Ct!==r?(qt=X(),qt!==r?(ir=F(),ir!==r?(lt=[lt,Ct,qt,ir],Te=lt):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r);xe!==r?(we=$,oe=C(oe,xe),$=oe):(g=$,$=r)}else g=$,$=r;return $}function F(){var $,oe,xe,Te,lt,Ct;return $=g,t.charCodeAt(g)===33?(oe=S,g++):(oe=r,Z===0&&x(P)),oe!==r?(xe=F(),xe!==r?(we=$,oe=I(xe),$=oe):(g=$,$=r)):(g=$,$=r),$===r&&($=g,t.charCodeAt(g)===40?(oe=R,g++):(oe=r,Z===0&&x(N)),oe!==r?(xe=X(),xe!==r?(Te=y(),Te!==r?(lt=X(),lt!==r?(t.charCodeAt(g)===41?(Ct=U,g++):(Ct=r,Z===0&&x(W)),Ct!==r?(we=$,oe=ee(Te),$=oe):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=z())),$}function z(){var $,oe,xe,Te,lt;if($=g,oe=X(),oe!==r){if(xe=g,Te=[],ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,Z===0&&x(ue)),lt!==r)for(;lt!==r;)Te.push(lt),ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,Z===0&&x(ue));else Te=r;Te!==r?xe=t.substring(xe,g):xe=Te,xe!==r?(we=g,Te=le(xe),Te?Te=void 0:Te=r,Te!==r?(we=$,oe=me(xe),$=oe):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function X(){var $,oe;for(Z++,$=[],Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,Z===0&&x(Ce));oe!==r;)$.push(oe),Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,Z===0&&x(Ce));return Z--,$===r&&(oe=r,Z===0&&x(pe)),$}if(De=a(),De!==r&&g===t.length)return De;throw De!==r&&g<t.length&&x(Ve()),b(se,Ae<t.length?t.charAt(Ae):null,Ae<t.length?Ue(Ae,Ae+1):Ue(Ae,Ae))}yse.exports={SyntaxError:jd,parse:HJe}});var Ise=_(rk=>{var{parse:jJe}=Ese();rk.makeParser=(t=/[a-z]+/)=>(e,r)=>jJe(e,{queryPattern:t,checkFn:r});rk.parse=rk.makeParser()});var wse=_((YRt,Cse)=>{\"use strict\";Cse.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var K_=_((VRt,vse)=>{var dB=wse(),Bse={};for(let t of Object.keys(dB))Bse[dB[t]]=t;var hr={rgb:{channels:3,labels:\"rgb\"},hsl:{channels:3,labels:\"hsl\"},hsv:{channels:3,labels:\"hsv\"},hwb:{channels:3,labels:\"hwb\"},cmyk:{channels:4,labels:\"cmyk\"},xyz:{channels:3,labels:\"xyz\"},lab:{channels:3,labels:\"lab\"},lch:{channels:3,labels:\"lch\"},hex:{channels:1,labels:[\"hex\"]},keyword:{channels:1,labels:[\"keyword\"]},ansi16:{channels:1,labels:[\"ansi16\"]},ansi256:{channels:1,labels:[\"ansi256\"]},hcg:{channels:3,labels:[\"h\",\"c\",\"g\"]},apple:{channels:3,labels:[\"r16\",\"g16\",\"b16\"]},gray:{channels:1,labels:[\"gray\"]}};vse.exports=hr;for(let t of Object.keys(hr)){if(!(\"channels\"in hr[t]))throw new Error(\"missing channels property: \"+t);if(!(\"labels\"in hr[t]))throw new Error(\"missing channel labels property: \"+t);if(hr[t].labels.length!==hr[t].channels)throw new Error(\"channel and label counts mismatch: \"+t);let{channels:e,labels:r}=hr[t];delete hr[t].channels,delete hr[t].labels,Object.defineProperty(hr[t],\"channels\",{value:e}),Object.defineProperty(hr[t],\"labels\",{value:r})}hr.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.min(e,r,s),n=Math.max(e,r,s),c=n-a,f,p;n===a?f=0:e===n?f=(r-s)/c:r===n?f=2+(s-e)/c:s===n&&(f=4+(e-r)/c),f=Math.min(f*60,360),f<0&&(f+=360);let h=(a+n)/2;return n===a?p=0:h<=.5?p=c/(n+a):p=c/(2-n-a),[f,p*100,h*100]};hr.rgb.hsv=function(t){let e,r,s,a,n,c=t[0]/255,f=t[1]/255,p=t[2]/255,h=Math.max(c,f,p),E=h-Math.min(c,f,p),C=function(S){return(h-S)/6/E+1/2};return E===0?(a=0,n=0):(n=E/h,e=C(c),r=C(f),s=C(p),c===h?a=s-r:f===h?a=1/3+e-s:p===h&&(a=2/3+r-e),a<0?a+=1:a>1&&(a-=1)),[a*360,n*100,h*100]};hr.rgb.hwb=function(t){let e=t[0],r=t[1],s=t[2],a=hr.rgb.hsl(t)[0],n=1/255*Math.min(e,Math.min(r,s));return s=1-1/255*Math.max(e,Math.max(r,s)),[a,n*100,s*100]};hr.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.min(1-e,1-r,1-s),n=(1-e-a)/(1-a)||0,c=(1-r-a)/(1-a)||0,f=(1-s-a)/(1-a)||0;return[n*100,c*100,f*100,a*100]};function GJe(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}hr.rgb.keyword=function(t){let e=Bse[t];if(e)return e;let r=1/0,s;for(let a of Object.keys(dB)){let n=dB[a],c=GJe(t,n);c<r&&(r=c,s=a)}return s};hr.keyword.rgb=function(t){return dB[t]};hr.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92;let a=e*.4124+r*.3576+s*.1805,n=e*.2126+r*.7152+s*.0722,c=e*.0193+r*.1192+s*.9505;return[a*100,n*100,c*100]};hr.rgb.lab=function(t){let e=hr.rgb.xyz(t),r=e[0],s=e[1],a=e[2];r/=95.047,s/=100,a/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let n=116*s-16,c=500*(r-s),f=200*(s-a);return[n,c,f]};hr.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100,a,n,c;if(r===0)return c=s*255,[c,c,c];s<.5?a=s*(1+r):a=s+r-s*r;let f=2*s-a,p=[0,0,0];for(let h=0;h<3;h++)n=e+1/3*-(h-1),n<0&&n++,n>1&&n--,6*n<1?c=f+(a-f)*6*n:2*n<1?c=a:3*n<2?c=f+(a-f)*(2/3-n)*6:c=f,p[h]=c*255;return p};hr.hsl.hsv=function(t){let e=t[0],r=t[1]/100,s=t[2]/100,a=r,n=Math.max(s,.01);s*=2,r*=s<=1?s:2-s,a*=n<=1?n:2-n;let c=(s+r)/2,f=s===0?2*a/(n+a):2*r/(s+r);return[e,f*100,c*100]};hr.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,s=t[2]/100,a=Math.floor(e)%6,n=e-Math.floor(e),c=255*s*(1-r),f=255*s*(1-r*n),p=255*s*(1-r*(1-n));switch(s*=255,a){case 0:return[s,p,c];case 1:return[f,s,c];case 2:return[c,s,p];case 3:return[c,f,s];case 4:return[p,c,s];case 5:return[s,c,f]}};hr.hsv.hsl=function(t){let e=t[0],r=t[1]/100,s=t[2]/100,a=Math.max(s,.01),n,c;c=(2-r)*s;let f=(2-r)*a;return n=r*a,n/=f<=1?f:2-f,n=n||0,c/=2,[e,n*100,c*100]};hr.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100,a=r+s,n;a>1&&(r/=a,s/=a);let c=Math.floor(6*e),f=1-s;n=6*e-c,c&1&&(n=1-n);let p=r+n*(f-r),h,E,C;switch(c){default:case 6:case 0:h=f,E=p,C=r;break;case 1:h=p,E=f,C=r;break;case 2:h=r,E=f,C=p;break;case 3:h=r,E=p,C=f;break;case 4:h=p,E=r,C=f;break;case 5:h=f,E=r,C=p;break}return[h*255,E*255,C*255]};hr.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,s=t[2]/100,a=t[3]/100,n=1-Math.min(1,e*(1-a)+a),c=1-Math.min(1,r*(1-a)+a),f=1-Math.min(1,s*(1-a)+a);return[n*255,c*255,f*255]};hr.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,s=t[2]/100,a,n,c;return a=e*3.2406+r*-1.5372+s*-.4986,n=e*-.9689+r*1.8758+s*.0415,c=e*.0557+r*-.204+s*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,a=Math.min(Math.max(0,a),1),n=Math.min(Math.max(0,n),1),c=Math.min(Math.max(0,c),1),[a*255,n*255,c*255]};hr.xyz.lab=function(t){let e=t[0],r=t[1],s=t[2];e/=95.047,r/=100,s/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let a=116*r-16,n=500*(e-r),c=200*(r-s);return[a,n,c]};hr.lab.xyz=function(t){let e=t[0],r=t[1],s=t[2],a,n,c;n=(e+16)/116,a=r/500+n,c=n-s/200;let f=n**3,p=a**3,h=c**3;return n=f>.008856?f:(n-16/116)/7.787,a=p>.008856?p:(a-16/116)/7.787,c=h>.008856?h:(c-16/116)/7.787,a*=95.047,n*=100,c*=108.883,[a,n,c]};hr.lab.lch=function(t){let e=t[0],r=t[1],s=t[2],a;a=Math.atan2(s,r)*360/2/Math.PI,a<0&&(a+=360);let c=Math.sqrt(r*r+s*s);return[e,c,a]};hr.lch.lab=function(t){let e=t[0],r=t[1],a=t[2]/360*2*Math.PI,n=r*Math.cos(a),c=r*Math.sin(a);return[e,n,c]};hr.rgb.ansi16=function(t,e=null){let[r,s,a]=t,n=e===null?hr.rgb.hsv(t)[2]:e;if(n=Math.round(n/50),n===0)return 30;let c=30+(Math.round(a/255)<<2|Math.round(s/255)<<1|Math.round(r/255));return n===2&&(c+=60),c};hr.hsv.ansi16=function(t){return hr.rgb.ansi16(hr.hsv.rgb(t),t[2])};hr.rgb.ansi256=function(t){let e=t[0],r=t[1],s=t[2];return e===r&&r===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)};hr.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,s=(e&1)*r*255,a=(e>>1&1)*r*255,n=(e>>2&1)*r*255;return[s,a,n]};hr.ansi256.rgb=function(t){if(t>=232){let n=(t-232)*10+8;return[n,n,n]}t-=16;let e,r=Math.floor(t/36)/5*255,s=Math.floor((e=t%36)/6)/5*255,a=e%6/5*255;return[r,s,a]};hr.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return\"000000\".substring(r.length)+r};hr.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split(\"\").map(f=>f+f).join(\"\"));let s=parseInt(r,16),a=s>>16&255,n=s>>8&255,c=s&255;return[a,n,c]};hr.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.max(Math.max(e,r),s),n=Math.min(Math.min(e,r),s),c=a-n,f,p;return c<1?f=n/(1-c):f=0,c<=0?p=0:a===e?p=(r-s)/c%6:a===r?p=2+(s-e)/c:p=4+(e-r)/c,p/=6,p%=1,[p*360,c*100,f*100]};hr.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,s=r<.5?2*e*r:2*e*(1-r),a=0;return s<1&&(a=(r-.5*s)/(1-s)),[t[0],s*100,a*100]};hr.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,s=e*r,a=0;return s<1&&(a=(r-s)/(1-s)),[t[0],s*100,a*100]};hr.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100;if(r===0)return[s*255,s*255,s*255];let a=[0,0,0],n=e%1*6,c=n%1,f=1-c,p=0;switch(Math.floor(n)){case 0:a[0]=1,a[1]=c,a[2]=0;break;case 1:a[0]=f,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=c;break;case 3:a[0]=0,a[1]=f,a[2]=1;break;case 4:a[0]=c,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=f}return p=(1-r)*s,[(r*a[0]+p)*255,(r*a[1]+p)*255,(r*a[2]+p)*255]};hr.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,s=e+r*(1-e),a=0;return s>0&&(a=e/s),[t[0],a*100,s*100]};hr.hcg.hsl=function(t){let e=t[1]/100,s=t[2]/100*(1-e)+.5*e,a=0;return s>0&&s<.5?a=e/(2*s):s>=.5&&s<1&&(a=e/(2*(1-s))),[t[0],a*100,s*100]};hr.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,s=e+r*(1-e);return[t[0],(s-e)*100,(1-s)*100]};hr.hwb.hcg=function(t){let e=t[1]/100,s=1-t[2]/100,a=s-e,n=0;return a<1&&(n=(s-a)/(1-a)),[t[0],a*100,n*100]};hr.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};hr.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};hr.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};hr.gray.hsl=function(t){return[0,0,t[0]]};hr.gray.hsv=hr.gray.hsl;hr.gray.hwb=function(t){return[0,100,t[0]]};hr.gray.cmyk=function(t){return[0,0,0,t[0]]};hr.gray.lab=function(t){return[t[0],0,0]};hr.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,s=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return\"000000\".substring(s.length)+s};hr.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Dse=_((JRt,Sse)=>{var nk=K_();function qJe(){let t={},e=Object.keys(nk);for(let r=e.length,s=0;s<r;s++)t[e[s]]={distance:-1,parent:null};return t}function WJe(t){let e=qJe(),r=[t];for(e[t].distance=0;r.length;){let s=r.pop(),a=Object.keys(nk[s]);for(let n=a.length,c=0;c<n;c++){let f=a[c],p=e[f];p.distance===-1&&(p.distance=e[s].distance+1,p.parent=s,r.unshift(f))}}return e}function YJe(t,e){return function(r){return e(t(r))}}function VJe(t,e){let r=[e[t].parent,t],s=nk[e[t].parent][t],a=e[t].parent;for(;e[a].parent;)r.unshift(e[a].parent),s=YJe(nk[e[a].parent][a],s),a=e[a].parent;return s.conversion=r,s}Sse.exports=function(t){let e=WJe(t),r={},s=Object.keys(e);for(let a=s.length,n=0;n<a;n++){let c=s[n];e[c].parent!==null&&(r[c]=VJe(c,e))}return r}});var Pse=_((KRt,bse)=>{var z_=K_(),JJe=Dse(),PE={},KJe=Object.keys(z_);function zJe(t){let e=function(...r){let s=r[0];return s==null?s:(s.length>1&&(r=s),t(r))};return\"conversion\"in t&&(e.conversion=t.conversion),e}function XJe(t){let e=function(...r){let s=r[0];if(s==null)return s;s.length>1&&(r=s);let a=t(r);if(typeof a==\"object\")for(let n=a.length,c=0;c<n;c++)a[c]=Math.round(a[c]);return a};return\"conversion\"in t&&(e.conversion=t.conversion),e}KJe.forEach(t=>{PE[t]={},Object.defineProperty(PE[t],\"channels\",{value:z_[t].channels}),Object.defineProperty(PE[t],\"labels\",{value:z_[t].labels});let e=JJe(t);Object.keys(e).forEach(s=>{let a=e[s];PE[t][s]=XJe(a),PE[t][s].raw=zJe(a)})});bse.exports=PE});var sk=_((zRt,Rse)=>{\"use strict\";var xse=(t,e)=>(...r)=>`\\x1B[${t(...r)+e}m`,kse=(t,e)=>(...r)=>{let s=t(...r);return`\\x1B[${38+e};5;${s}m`},Qse=(t,e)=>(...r)=>{let s=t(...r);return`\\x1B[${38+e};2;${s[0]};${s[1]};${s[2]}m`},ik=t=>t,Tse=(t,e,r)=>[t,e,r],xE=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let s=r();return Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0}),s},enumerable:!0,configurable:!0})},X_,kE=(t,e,r,s)=>{X_===void 0&&(X_=Pse());let a=s?10:0,n={};for(let[c,f]of Object.entries(X_)){let p=c===\"ansi16\"?\"ansi\":c;c===e?n[p]=t(r,a):typeof f==\"object\"&&(n[p]=t(f[e],a))}return n};function ZJe(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,s]of Object.entries(e)){for(let[a,n]of Object.entries(s))e[a]={open:`\\x1B[${n[0]}m`,close:`\\x1B[${n[1]}m`},s[a]=e[a],t.set(n[0],n[1]);Object.defineProperty(e,r,{value:s,enumerable:!1})}return Object.defineProperty(e,\"codes\",{value:t,enumerable:!1}),e.color.close=\"\\x1B[39m\",e.bgColor.close=\"\\x1B[49m\",xE(e.color,\"ansi\",()=>kE(xse,\"ansi16\",ik,!1)),xE(e.color,\"ansi256\",()=>kE(kse,\"ansi256\",ik,!1)),xE(e.color,\"ansi16m\",()=>kE(Qse,\"rgb\",Tse,!1)),xE(e.bgColor,\"ansi\",()=>kE(xse,\"ansi16\",ik,!0)),xE(e.bgColor,\"ansi256\",()=>kE(kse,\"ansi256\",ik,!0)),xE(e.bgColor,\"ansi16m\",()=>kE(Qse,\"rgb\",Tse,!0)),e}Object.defineProperty(Rse,\"exports\",{enumerable:!0,get:ZJe})});var Nse=_((XRt,Fse)=>{\"use strict\";Fse.exports=(t,e=process.argv)=>{let r=t.startsWith(\"-\")?\"\":t.length===1?\"-\":\"--\",s=e.indexOf(r+t),a=e.indexOf(\"--\");return s!==-1&&(a===-1||s<a)}});var Mse=_((ZRt,Lse)=>{\"use strict\";var $Je=Ie(\"os\"),Ose=Ie(\"tty\"),Sc=Nse(),{env:bs}=process,l0;Sc(\"no-color\")||Sc(\"no-colors\")||Sc(\"color=false\")||Sc(\"color=never\")?l0=0:(Sc(\"color\")||Sc(\"colors\")||Sc(\"color=true\")||Sc(\"color=always\"))&&(l0=1);\"FORCE_COLOR\"in bs&&(bs.FORCE_COLOR===\"true\"?l0=1:bs.FORCE_COLOR===\"false\"?l0=0:l0=bs.FORCE_COLOR.length===0?1:Math.min(parseInt(bs.FORCE_COLOR,10),3));function Z_(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function $_(t,e){if(l0===0)return 0;if(Sc(\"color=16m\")||Sc(\"color=full\")||Sc(\"color=truecolor\"))return 3;if(Sc(\"color=256\"))return 2;if(t&&!e&&l0===void 0)return 0;let r=l0||0;if(bs.TERM===\"dumb\")return r;if(process.platform===\"win32\"){let s=$Je.release().split(\".\");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if(\"CI\"in bs)return[\"TRAVIS\",\"CIRCLECI\",\"APPVEYOR\",\"GITLAB_CI\"].some(s=>s in bs)||bs.CI_NAME===\"codeship\"?1:r;if(\"TEAMCITY_VERSION\"in bs)return/^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(bs.TEAMCITY_VERSION)?1:0;if(\"GITHUB_ACTIONS\"in bs)return 1;if(bs.COLORTERM===\"truecolor\")return 3;if(\"TERM_PROGRAM\"in bs){let s=parseInt((bs.TERM_PROGRAM_VERSION||\"\").split(\".\")[0],10);switch(bs.TERM_PROGRAM){case\"iTerm.app\":return s>=3?3:2;case\"Apple_Terminal\":return 2}}return/-256(color)?$/i.test(bs.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(bs.TERM)||\"COLORTERM\"in bs?1:r}function eKe(t){let e=$_(t,t&&t.isTTY);return Z_(e)}Lse.exports={supportsColor:eKe,stdout:Z_($_(!0,Ose.isatty(1))),stderr:Z_($_(!0,Ose.isatty(2)))}});var _se=_(($Rt,Use)=>{\"use strict\";var tKe=(t,e,r)=>{let s=t.indexOf(e);if(s===-1)return t;let a=e.length,n=0,c=\"\";do c+=t.substr(n,s-n)+e+r,n=s+a,s=t.indexOf(e,n);while(s!==-1);return c+=t.substr(n),c},rKe=(t,e,r,s)=>{let a=0,n=\"\";do{let c=t[s-1]===\"\\r\";n+=t.substr(a,(c?s-1:s)-a)+e+(c?`\\r\n`:`\n`)+r,a=s+1,s=t.indexOf(`\n`,a)}while(s!==-1);return n+=t.substr(a),n};Use.exports={stringReplaceAll:tKe,stringEncaseCRLFWithFirstIndex:rKe}});var Wse=_((eFt,qse)=>{\"use strict\";var nKe=/(?:\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi,Hse=/(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g,iKe=/^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/,sKe=/\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi,oKe=new Map([[\"n\",`\n`],[\"r\",\"\\r\"],[\"t\",\"\t\"],[\"b\",\"\\b\"],[\"f\",\"\\f\"],[\"v\",\"\\v\"],[\"0\",\"\\0\"],[\"\\\\\",\"\\\\\"],[\"e\",\"\\x1B\"],[\"a\",\"\\x07\"]]);function Gse(t){let e=t[0]===\"u\",r=t[1]===\"{\";return e&&!r&&t.length===5||t[0]===\"x\"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):oKe.get(t)||t}function aKe(t,e){let r=[],s=e.trim().split(/\\s*,\\s*/g),a;for(let n of s){let c=Number(n);if(!Number.isNaN(c))r.push(c);else if(a=n.match(iKe))r.push(a[2].replace(sKe,(f,p,h)=>p?Gse(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function lKe(t){Hse.lastIndex=0;let e=[],r;for(;(r=Hse.exec(t))!==null;){let s=r[1];if(r[2]){let a=aKe(s,r[2]);e.push([s].concat(a))}else e.push([s])}return e}function jse(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let s=t;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in s))throw new Error(`Unknown Chalk style: ${a}`);s=n.length>0?s[a](...n):s[a]}return s}qse.exports=(t,e)=>{let r=[],s=[],a=[];if(e.replace(nKe,(n,c,f,p,h,E)=>{if(c)a.push(Gse(c));else if(p){let C=a.join(\"\");a=[],s.push(r.length===0?C:jse(t,r)(C)),r.push({inverse:f,styles:lKe(p)})}else if(h){if(r.length===0)throw new Error(\"Found extraneous } in Chalk template literal\");s.push(jse(t,r)(a.join(\"\"))),a=[],r.pop()}else a.push(E)}),s.push(a.join(\"\")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?\"\":\"s\"} (\\`}\\`)`;throw new Error(n)}return s.join(\"\")}});var TE=_((tFt,Xse)=>{\"use strict\";var mB=sk(),{stdout:t4,stderr:r4}=Mse(),{stringReplaceAll:cKe,stringEncaseCRLFWithFirstIndex:uKe}=_se(),{isArray:ok}=Array,Vse=[\"ansi\",\"ansi\",\"ansi256\",\"ansi16m\"],QE=Object.create(null),fKe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error(\"The `level` option should be an integer from 0 to 3\");let r=t4?t4.level:0;t.level=e.level===void 0?r:e.level},n4=class{constructor(e){return Jse(e)}},Jse=t=>{let e={};return fKe(e,t),e.template=(...r)=>zse(e.template,...r),Object.setPrototypeOf(e,ak.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error(\"`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.\")},e.template.Instance=n4,e.template};function ak(t){return Jse(t)}for(let[t,e]of Object.entries(mB))QE[t]={get(){let r=lk(this,i4(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};QE.visible={get(){let t=lk(this,this._styler,!0);return Object.defineProperty(this,\"visible\",{value:t}),t}};var Kse=[\"rgb\",\"hex\",\"keyword\",\"hsl\",\"hsv\",\"hwb\",\"ansi\",\"ansi256\"];for(let t of Kse)QE[t]={get(){let{level:e}=this;return function(...r){let s=i4(mB.color[Vse[e]][t](...r),mB.color.close,this._styler);return lk(this,s,this._isEmpty)}}};for(let t of Kse){let e=\"bg\"+t[0].toUpperCase()+t.slice(1);QE[e]={get(){let{level:r}=this;return function(...s){let a=i4(mB.bgColor[Vse[r]][t](...s),mB.bgColor.close,this._styler);return lk(this,a,this._isEmpty)}}}}var AKe=Object.defineProperties(()=>{},{...QE,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),i4=(t,e,r)=>{let s,a;return r===void 0?(s=t,a=e):(s=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:a,parent:r}},lk=(t,e,r)=>{let s=(...a)=>ok(a[0])&&ok(a[0].raw)?Yse(s,zse(s,...a)):Yse(s,a.length===1?\"\"+a[0]:a.join(\" \"));return Object.setPrototypeOf(s,AKe),s._generator=t,s._styler=e,s._isEmpty=r,s},Yse=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?\"\":e;let r=t._styler;if(r===void 0)return e;let{openAll:s,closeAll:a}=r;if(e.indexOf(\"\\x1B\")!==-1)for(;r!==void 0;)e=cKe(e,r.close,r.open),r=r.parent;let n=e.indexOf(`\n`);return n!==-1&&(e=uKe(e,a,s,n)),s+e+a},e4,zse=(t,...e)=>{let[r]=e;if(!ok(r)||!ok(r.raw))return e.join(\" \");let s=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(s[n-1]).replace(/[{}\\\\]/g,\"\\\\$&\"),String(r.raw[n]));return e4===void 0&&(e4=Wse()),e4(t,a.join(\"\"))};Object.defineProperties(ak.prototype,QE);var ck=ak();ck.supportsColor=t4;ck.stderr=ak({level:r4?r4.level:0});ck.stderr.supportsColor=r4;Xse.exports=ck});var uk=_(Dc=>{\"use strict\";Dc.isInteger=t=>typeof t==\"number\"?Number.isInteger(t):typeof t==\"string\"&&t.trim()!==\"\"?Number.isInteger(Number(t)):!1;Dc.find=(t,e)=>t.nodes.find(r=>r.type===e);Dc.exceedsLimit=(t,e,r=1,s)=>s===!1||!Dc.isInteger(t)||!Dc.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=s;Dc.escapeNode=(t,e=0,r)=>{let s=t.nodes[e];s&&(r&&s.type===r||s.type===\"open\"||s.type===\"close\")&&s.escaped!==!0&&(s.value=\"\\\\\"+s.value,s.escaped=!0)};Dc.encloseBrace=t=>t.type!==\"brace\"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);Dc.isInvalidBrace=t=>t.type!==\"brace\"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Dc.isOpenOrClose=t=>t.type===\"open\"||t.type===\"close\"?!0:t.open===!0||t.close===!0;Dc.reduce=t=>t.reduce((e,r)=>(r.type===\"text\"&&e.push(r.value),r.type===\"range\"&&(r.type=\"text\"),e),[]);Dc.flatten=(...t)=>{let e=[],r=s=>{for(let a=0;a<s.length;a++){let n=s[a];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var fk=_((nFt,$se)=>{\"use strict\";var Zse=uk();$se.exports=(t,e={})=>{let r=(s,a={})=>{let n=e.escapeInvalid&&Zse.isInvalidBrace(a),c=s.invalid===!0&&e.escapeInvalid===!0,f=\"\";if(s.value)return(n||c)&&Zse.isOpenOrClose(s)?\"\\\\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let p of s.nodes)f+=r(p);return f};return r(t)}});var toe=_((iFt,eoe)=>{\"use strict\";eoe.exports=function(t){return typeof t==\"number\"?t-t===0:typeof t==\"string\"&&t.trim()!==\"\"?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var uoe=_((sFt,coe)=>{\"use strict\";var roe=toe(),Gd=(t,e,r)=>{if(roe(t)===!1)throw new TypeError(\"toRegexRange: expected the first argument to be a number\");if(e===void 0||t===e)return String(t);if(roe(e)===!1)throw new TypeError(\"toRegexRange: expected the second argument to be a number.\");let s={relaxZeros:!0,...r};typeof s.strictZeros==\"boolean\"&&(s.relaxZeros=s.strictZeros===!1);let a=String(s.relaxZeros),n=String(s.shorthand),c=String(s.capture),f=String(s.wrap),p=t+\":\"+e+\"=\"+a+n+c+f;if(Gd.cache.hasOwnProperty(p))return Gd.cache[p].result;let h=Math.min(t,e),E=Math.max(t,e);if(Math.abs(h-E)===1){let R=t+\"|\"+e;return s.capture?`(${R})`:s.wrap===!1?R:`(?:${R})`}let C=loe(t)||loe(e),S={min:t,max:e,a:h,b:E},P=[],I=[];if(C&&(S.isPadded=C,S.maxLen=String(S.max).length),h<0){let R=E<0?Math.abs(E):1;I=noe(R,Math.abs(h),S,s),h=S.a=0}return E>=0&&(P=noe(h,E,S,s)),S.negatives=I,S.positives=P,S.result=pKe(I,P,s),s.capture===!0?S.result=`(${S.result})`:s.wrap!==!1&&P.length+I.length>1&&(S.result=`(?:${S.result})`),Gd.cache[p]=S,S.result};function pKe(t,e,r){let s=s4(t,e,\"-\",!1,r)||[],a=s4(e,t,\"\",!1,r)||[],n=s4(t,e,\"-?\",!0,r)||[];return s.concat(n).concat(a).join(\"|\")}function hKe(t,e){let r=1,s=1,a=soe(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=soe(t,r);for(a=ooe(e+1,s)-1;t<a&&a<=e;)n.add(a),s+=1,a=ooe(e+1,s)-1;return n=[...n],n.sort(mKe),n}function gKe(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let s=dKe(t,e),a=s.length,n=\"\",c=0;for(let f=0;f<a;f++){let[p,h]=s[f];p===h?n+=p:p!==\"0\"||h!==\"9\"?n+=yKe(p,h,r):c++}return c&&(n+=r.shorthand===!0?\"\\\\d\":\"[0-9]\"),{pattern:n,count:[c],digits:a}}function noe(t,e,r,s){let a=hKe(t,e),n=[],c=t,f;for(let p=0;p<a.length;p++){let h=a[p],E=gKe(String(c),String(h),s),C=\"\";if(!r.isPadded&&f&&f.pattern===E.pattern){f.count.length>1&&f.count.pop(),f.count.push(E.count[0]),f.string=f.pattern+aoe(f.count),c=h+1;continue}r.isPadded&&(C=EKe(h,r,s)),E.string=C+E.pattern+aoe(E.count),n.push(E),c=h+1,f=E}return n}function s4(t,e,r,s,a){let n=[];for(let c of t){let{string:f}=c;!s&&!ioe(e,\"string\",f)&&n.push(r+f),s&&ioe(e,\"string\",f)&&n.push(r+f)}return n}function dKe(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function mKe(t,e){return t>e?1:e>t?-1:0}function ioe(t,e,r){return t.some(s=>s[e]===r)}function soe(t,e){return Number(String(t).slice(0,-e)+\"9\".repeat(e))}function ooe(t,e){return t-t%Math.pow(10,e)}function aoe(t){let[e=0,r=\"\"]=t;return r||e>1?`{${e+(r?\",\"+r:\"\")}}`:\"\"}function yKe(t,e,r){return`[${t}${e-t===1?\"\":\"-\"}${e}]`}function loe(t){return/^-?(0+)\\d/.test(t)}function EKe(t,e,r){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),a=r.relaxZeros!==!1;switch(s){case 0:return\"\";case 1:return a?\"0?\":\"0\";case 2:return a?\"0{0,2}\":\"00\";default:return a?`0{0,${s}}`:`0{${s}}`}}Gd.cache={};Gd.clearCache=()=>Gd.cache={};coe.exports=Gd});var l4=_((oFt,yoe)=>{\"use strict\";var IKe=Ie(\"util\"),poe=uoe(),foe=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t),CKe=t=>e=>t===!0?Number(e):String(e),o4=t=>typeof t==\"number\"||typeof t==\"string\"&&t!==\"\",yB=t=>Number.isInteger(+t),a4=t=>{let e=`${t}`,r=-1;if(e[0]===\"-\"&&(e=e.slice(1)),e===\"0\")return!1;for(;e[++r]===\"0\";);return r>0},wKe=(t,e,r)=>typeof t==\"string\"||typeof e==\"string\"?!0:r.stringify===!0,BKe=(t,e,r)=>{if(e>0){let s=t[0]===\"-\"?\"-\":\"\";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,\"0\")}return r===!1?String(t):t},Aoe=(t,e)=>{let r=t[0]===\"-\"?\"-\":\"\";for(r&&(t=t.slice(1),e--);t.length<e;)t=\"0\"+t;return r?\"-\"+t:t},vKe=(t,e)=>{t.negatives.sort((c,f)=>c<f?-1:c>f?1:0),t.positives.sort((c,f)=>c<f?-1:c>f?1:0);let r=e.capture?\"\":\"?:\",s=\"\",a=\"\",n;return t.positives.length&&(s=t.positives.join(\"|\")),t.negatives.length&&(a=`-(${r}${t.negatives.join(\"|\")})`),s&&a?n=`${s}|${a}`:n=s||a,e.wrap?`(${r}${n})`:n},hoe=(t,e,r,s)=>{if(r)return poe(t,e,{wrap:!1,...s});let a=String.fromCharCode(t);if(t===e)return a;let n=String.fromCharCode(e);return`[${a}-${n}]`},goe=(t,e,r)=>{if(Array.isArray(t)){let s=r.wrap===!0,a=r.capture?\"\":\"?:\";return s?`(${a}${t.join(\"|\")})`:t.join(\"|\")}return poe(t,e,r)},doe=(...t)=>new RangeError(\"Invalid range arguments: \"+IKe.inspect(...t)),moe=(t,e,r)=>{if(r.strictRanges===!0)throw doe([t,e]);return[]},SKe=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step \"${t}\" to be a number`);return[]},DKe=(t,e,r=1,s={})=>{let a=Number(t),n=Number(e);if(!Number.isInteger(a)||!Number.isInteger(n)){if(s.strictRanges===!0)throw doe([t,e]);return[]}a===0&&(a=0),n===0&&(n=0);let c=a>n,f=String(t),p=String(e),h=String(r);r=Math.max(Math.abs(r),1);let E=a4(f)||a4(p)||a4(h),C=E?Math.max(f.length,p.length,h.length):0,S=E===!1&&wKe(t,e,s)===!1,P=s.transform||CKe(S);if(s.toRegex&&r===1)return hoe(Aoe(t,C),Aoe(e,C),!0,s);let I={negatives:[],positives:[]},R=W=>I[W<0?\"negatives\":\"positives\"].push(Math.abs(W)),N=[],U=0;for(;c?a>=n:a<=n;)s.toRegex===!0&&r>1?R(a):N.push(BKe(P(a,U),C,S)),a=c?a-r:a+r,U++;return s.toRegex===!0?r>1?vKe(I,s):goe(N,null,{wrap:!1,...s}):N},bKe=(t,e,r=1,s={})=>{if(!yB(t)&&t.length>1||!yB(e)&&e.length>1)return moe(t,e,s);let a=s.transform||(S=>String.fromCharCode(S)),n=`${t}`.charCodeAt(0),c=`${e}`.charCodeAt(0),f=n>c,p=Math.min(n,c),h=Math.max(n,c);if(s.toRegex&&r===1)return hoe(p,h,!1,s);let E=[],C=0;for(;f?n>=c:n<=c;)E.push(a(n,C)),n=f?n-r:n+r,C++;return s.toRegex===!0?goe(E,null,{wrap:!1,options:s}):E},Ak=(t,e,r,s={})=>{if(e==null&&o4(t))return[t];if(!o4(t)||!o4(e))return moe(t,e,s);if(typeof r==\"function\")return Ak(t,e,1,{transform:r});if(foe(r))return Ak(t,e,0,r);let a={...s};return a.capture===!0&&(a.wrap=!0),r=r||a.step||1,yB(r)?yB(t)&&yB(e)?DKe(t,e,r,a):bKe(t,e,Math.max(Math.abs(r),1),a):r!=null&&!foe(r)?SKe(r,a):Ak(t,e,1,r)};yoe.exports=Ak});var Coe=_((aFt,Ioe)=>{\"use strict\";var PKe=l4(),Eoe=uk(),xKe=(t,e={})=>{let r=(s,a={})=>{let n=Eoe.isInvalidBrace(a),c=s.invalid===!0&&e.escapeInvalid===!0,f=n===!0||c===!0,p=e.escapeInvalid===!0?\"\\\\\":\"\",h=\"\";if(s.isOpen===!0||s.isClose===!0)return p+s.value;if(s.type===\"open\")return f?p+s.value:\"(\";if(s.type===\"close\")return f?p+s.value:\")\";if(s.type===\"comma\")return s.prev.type===\"comma\"?\"\":f?s.value:\"|\";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let E=Eoe.reduce(s.nodes),C=PKe(...E,{...e,wrap:!1,toRegex:!0});if(C.length!==0)return E.length>1&&C.length>1?`(${C})`:C}if(s.nodes)for(let E of s.nodes)h+=r(E,s);return h};return r(t)};Ioe.exports=xKe});var voe=_((lFt,Boe)=>{\"use strict\";var kKe=l4(),woe=fk(),RE=uk(),qd=(t=\"\",e=\"\",r=!1)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?RE.flatten(e).map(a=>`{${a}}`):e;for(let a of t)if(Array.isArray(a))for(let n of a)s.push(qd(n,e,r));else for(let n of e)r===!0&&typeof n==\"string\"&&(n=`{${n}}`),s.push(Array.isArray(n)?qd(a,n,r):a+n);return RE.flatten(s)},QKe=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(a,n={})=>{a.queue=[];let c=n,f=n.queue;for(;c.type!==\"brace\"&&c.type!==\"root\"&&c.parent;)c=c.parent,f=c.queue;if(a.invalid||a.dollar){f.push(qd(f.pop(),woe(a,e)));return}if(a.type===\"brace\"&&a.invalid!==!0&&a.nodes.length===2){f.push(qd(f.pop(),[\"{}\"]));return}if(a.nodes&&a.ranges>0){let C=RE.reduce(a.nodes);if(RE.exceedsLimit(...C,e.step,r))throw new RangeError(\"expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.\");let S=kKe(...C,e);S.length===0&&(S=woe(a,e)),f.push(qd(f.pop(),S)),a.nodes=[];return}let p=RE.encloseBrace(a),h=a.queue,E=a;for(;E.type!==\"brace\"&&E.type!==\"root\"&&E.parent;)E=E.parent,h=E.queue;for(let C=0;C<a.nodes.length;C++){let S=a.nodes[C];if(S.type===\"comma\"&&a.type===\"brace\"){C===1&&h.push(\"\"),h.push(\"\");continue}if(S.type===\"close\"){f.push(qd(f.pop(),h,p));continue}if(S.value&&S.type!==\"open\"){h.push(qd(h.pop(),S.value));continue}S.nodes&&s(S,a)}return h};return RE.flatten(s(t))};Boe.exports=QKe});var Doe=_((cFt,Soe)=>{\"use strict\";Soe.exports={MAX_LENGTH:1024*64,CHAR_0:\"0\",CHAR_9:\"9\",CHAR_UPPERCASE_A:\"A\",CHAR_LOWERCASE_A:\"a\",CHAR_UPPERCASE_Z:\"Z\",CHAR_LOWERCASE_Z:\"z\",CHAR_LEFT_PARENTHESES:\"(\",CHAR_RIGHT_PARENTHESES:\")\",CHAR_ASTERISK:\"*\",CHAR_AMPERSAND:\"&\",CHAR_AT:\"@\",CHAR_BACKSLASH:\"\\\\\",CHAR_BACKTICK:\"`\",CHAR_CARRIAGE_RETURN:\"\\r\",CHAR_CIRCUMFLEX_ACCENT:\"^\",CHAR_COLON:\":\",CHAR_COMMA:\",\",CHAR_DOLLAR:\"$\",CHAR_DOT:\".\",CHAR_DOUBLE_QUOTE:'\"',CHAR_EQUAL:\"=\",CHAR_EXCLAMATION_MARK:\"!\",CHAR_FORM_FEED:\"\\f\",CHAR_FORWARD_SLASH:\"/\",CHAR_HASH:\"#\",CHAR_HYPHEN_MINUS:\"-\",CHAR_LEFT_ANGLE_BRACKET:\"<\",CHAR_LEFT_CURLY_BRACE:\"{\",CHAR_LEFT_SQUARE_BRACKET:\"[\",CHAR_LINE_FEED:`\n`,CHAR_NO_BREAK_SPACE:\"\\xA0\",CHAR_PERCENT:\"%\",CHAR_PLUS:\"+\",CHAR_QUESTION_MARK:\"?\",CHAR_RIGHT_ANGLE_BRACKET:\">\",CHAR_RIGHT_CURLY_BRACE:\"}\",CHAR_RIGHT_SQUARE_BRACKET:\"]\",CHAR_SEMICOLON:\";\",CHAR_SINGLE_QUOTE:\"'\",CHAR_SPACE:\" \",CHAR_TAB:\"\t\",CHAR_UNDERSCORE:\"_\",CHAR_VERTICAL_LINE:\"|\",CHAR_ZERO_WIDTH_NOBREAK_SPACE:\"\\uFEFF\"}});var Qoe=_((uFt,koe)=>{\"use strict\";var TKe=fk(),{MAX_LENGTH:boe,CHAR_BACKSLASH:c4,CHAR_BACKTICK:RKe,CHAR_COMMA:FKe,CHAR_DOT:NKe,CHAR_LEFT_PARENTHESES:OKe,CHAR_RIGHT_PARENTHESES:LKe,CHAR_LEFT_CURLY_BRACE:MKe,CHAR_RIGHT_CURLY_BRACE:UKe,CHAR_LEFT_SQUARE_BRACKET:Poe,CHAR_RIGHT_SQUARE_BRACKET:xoe,CHAR_DOUBLE_QUOTE:_Ke,CHAR_SINGLE_QUOTE:HKe,CHAR_NO_BREAK_SPACE:jKe,CHAR_ZERO_WIDTH_NOBREAK_SPACE:GKe}=Doe(),qKe=(t,e={})=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");let r=e||{},s=typeof r.maxLength==\"number\"?Math.min(boe,r.maxLength):boe;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let a={type:\"root\",input:t,nodes:[]},n=[a],c=a,f=a,p=0,h=t.length,E=0,C=0,S,P={},I=()=>t[E++],R=N=>{if(N.type===\"text\"&&f.type===\"dot\"&&(f.type=\"text\"),f&&f.type===\"text\"&&N.type===\"text\"){f.value+=N.value;return}return c.nodes.push(N),N.parent=c,N.prev=f,f=N,N};for(R({type:\"bos\"});E<h;)if(c=n[n.length-1],S=I(),!(S===GKe||S===jKe)){if(S===c4){R({type:\"text\",value:(e.keepEscaping?S:\"\")+I()});continue}if(S===xoe){R({type:\"text\",value:\"\\\\\"+S});continue}if(S===Poe){p++;let N=!0,U;for(;E<h&&(U=I());){if(S+=U,U===Poe){p++;continue}if(U===c4){S+=I();continue}if(U===xoe&&(p--,p===0))break}R({type:\"text\",value:S});continue}if(S===OKe){c=R({type:\"paren\",nodes:[]}),n.push(c),R({type:\"text\",value:S});continue}if(S===LKe){if(c.type!==\"paren\"){R({type:\"text\",value:S});continue}c=n.pop(),R({type:\"text\",value:S}),c=n[n.length-1];continue}if(S===_Ke||S===HKe||S===RKe){let N=S,U;for(e.keepQuotes!==!0&&(S=\"\");E<h&&(U=I());){if(U===c4){S+=U+I();continue}if(U===N){e.keepQuotes===!0&&(S+=U);break}S+=U}R({type:\"text\",value:S});continue}if(S===MKe){C++;let U={type:\"brace\",open:!0,close:!1,dollar:f.value&&f.value.slice(-1)===\"$\"||c.dollar===!0,depth:C,commas:0,ranges:0,nodes:[]};c=R(U),n.push(c),R({type:\"open\",value:S});continue}if(S===UKe){if(c.type!==\"brace\"){R({type:\"text\",value:S});continue}let N=\"close\";c=n.pop(),c.close=!0,R({type:N,value:S}),C--,c=n[n.length-1];continue}if(S===FKe&&C>0){if(c.ranges>0){c.ranges=0;let N=c.nodes.shift();c.nodes=[N,{type:\"text\",value:TKe(c)}]}R({type:\"comma\",value:S}),c.commas++;continue}if(S===NKe&&C>0&&c.commas===0){let N=c.nodes;if(C===0||N.length===0){R({type:\"text\",value:S});continue}if(f.type===\"dot\"){if(c.range=[],f.value+=S,f.type=\"range\",c.nodes.length!==3&&c.nodes.length!==5){c.invalid=!0,c.ranges=0,f.type=\"text\";continue}c.ranges++,c.args=[];continue}if(f.type===\"range\"){N.pop();let U=N[N.length-1];U.value+=f.value+S,f=U,c.ranges--;continue}R({type:\"dot\",value:S});continue}R({type:\"text\",value:S})}do if(c=n.pop(),c.type!==\"root\"){c.nodes.forEach(W=>{W.nodes||(W.type===\"open\"&&(W.isOpen=!0),W.type===\"close\"&&(W.isClose=!0),W.nodes||(W.type=\"text\"),W.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(c);N.nodes.splice(U,1,...c.nodes)}while(n.length>0);return R({type:\"eos\"}),a};koe.exports=qKe});var Foe=_((fFt,Roe)=>{\"use strict\";var Toe=fk(),WKe=Coe(),YKe=voe(),VKe=Qoe(),jl=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let a=jl.create(s,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(jl.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};jl.parse=(t,e={})=>VKe(t,e);jl.stringify=(t,e={})=>Toe(typeof t==\"string\"?jl.parse(t,e):t,e);jl.compile=(t,e={})=>(typeof t==\"string\"&&(t=jl.parse(t,e)),WKe(t,e));jl.expand=(t,e={})=>{typeof t==\"string\"&&(t=jl.parse(t,e));let r=YKe(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};jl.create=(t,e={})=>t===\"\"||t.length<3?[t]:e.expand!==!0?jl.compile(t,e):jl.expand(t,e);Roe.exports=jl});var EB=_((AFt,Uoe)=>{\"use strict\";var JKe=Ie(\"path\"),Vf=\"\\\\\\\\/\",Noe=`[^${Vf}]`,Dp=\"\\\\.\",KKe=\"\\\\+\",zKe=\"\\\\?\",pk=\"\\\\/\",XKe=\"(?=.)\",Ooe=\"[^/]\",u4=`(?:${pk}|$)`,Loe=`(?:^|${pk})`,f4=`${Dp}{1,2}${u4}`,ZKe=`(?!${Dp})`,$Ke=`(?!${Loe}${f4})`,eze=`(?!${Dp}{0,1}${u4})`,tze=`(?!${f4})`,rze=`[^.${pk}]`,nze=`${Ooe}*?`,Moe={DOT_LITERAL:Dp,PLUS_LITERAL:KKe,QMARK_LITERAL:zKe,SLASH_LITERAL:pk,ONE_CHAR:XKe,QMARK:Ooe,END_ANCHOR:u4,DOTS_SLASH:f4,NO_DOT:ZKe,NO_DOTS:$Ke,NO_DOT_SLASH:eze,NO_DOTS_SLASH:tze,QMARK_NO_DOT:rze,STAR:nze,START_ANCHOR:Loe},ize={...Moe,SLASH_LITERAL:`[${Vf}]`,QMARK:Noe,STAR:`${Noe}*?`,DOTS_SLASH:`${Dp}{1,2}(?:[${Vf}]|$)`,NO_DOT:`(?!${Dp})`,NO_DOTS:`(?!(?:^|[${Vf}])${Dp}{1,2}(?:[${Vf}]|$))`,NO_DOT_SLASH:`(?!${Dp}{0,1}(?:[${Vf}]|$))`,NO_DOTS_SLASH:`(?!${Dp}{1,2}(?:[${Vf}]|$))`,QMARK_NO_DOT:`[^.${Vf}]`,START_ANCHOR:`(?:^|[${Vf}])`,END_ANCHOR:`(?:[${Vf}]|$)`},sze={alnum:\"a-zA-Z0-9\",alpha:\"a-zA-Z\",ascii:\"\\\\x00-\\\\x7F\",blank:\" \\\\t\",cntrl:\"\\\\x00-\\\\x1F\\\\x7F\",digit:\"0-9\",graph:\"\\\\x21-\\\\x7E\",lower:\"a-z\",print:\"\\\\x20-\\\\x7E \",punct:\"\\\\-!\\\"#$%&'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~\",space:\" \\\\t\\\\r\\\\n\\\\v\\\\f\",upper:\"A-Z\",word:\"A-Za-z0-9_\",xdigit:\"A-Fa-f0-9\"};Uoe.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:sze,REGEX_BACKSLASH:/\\\\(?![*+?^${}(|)[\\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\\].,$*+?^{}()|\\\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\\\?)((\\W)(\\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,REPLACEMENTS:{\"***\":\"*\",\"**/**\":\"**\",\"**/**/**\":\"**\"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:JKe.sep,extglobChars(t){return{\"!\":{type:\"negate\",open:\"(?:(?!(?:\",close:`))${t.STAR})`},\"?\":{type:\"qmark\",open:\"(?:\",close:\")?\"},\"+\":{type:\"plus\",open:\"(?:\",close:\")+\"},\"*\":{type:\"star\",open:\"(?:\",close:\")*\"},\"@\":{type:\"at\",open:\"(?:\",close:\")\"}}},globChars(t){return t===!0?ize:Moe}}});var IB=_(ol=>{\"use strict\";var oze=Ie(\"path\"),aze=process.platform===\"win32\",{REGEX_BACKSLASH:lze,REGEX_REMOVE_BACKSLASH:cze,REGEX_SPECIAL_CHARS:uze,REGEX_SPECIAL_CHARS_GLOBAL:fze}=EB();ol.isObject=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t);ol.hasRegexChars=t=>uze.test(t);ol.isRegexChar=t=>t.length===1&&ol.hasRegexChars(t);ol.escapeRegex=t=>t.replace(fze,\"\\\\$1\");ol.toPosixSlashes=t=>t.replace(lze,\"/\");ol.removeBackslashes=t=>t.replace(cze,e=>e===\"\\\\\"?\"\":e);ol.supportsLookbehinds=()=>{let t=process.version.slice(1).split(\".\").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};ol.isWindows=t=>t&&typeof t.windows==\"boolean\"?t.windows:aze===!0||oze.sep===\"\\\\\";ol.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]===\"\\\\\"?ol.escapeLast(t,e,s-1):`${t.slice(0,s)}\\\\${t.slice(s)}`};ol.removePrefix=(t,e={})=>{let r=t;return r.startsWith(\"./\")&&(r=r.slice(2),e.prefix=\"./\"),r};ol.wrapOutput=(t,e={},r={})=>{let s=r.contains?\"\":\"^\",a=r.contains?\"\":\"$\",n=`${s}(?:${t})${a}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n}});var Voe=_((hFt,Yoe)=>{\"use strict\";var _oe=IB(),{CHAR_ASTERISK:A4,CHAR_AT:Aze,CHAR_BACKWARD_SLASH:CB,CHAR_COMMA:pze,CHAR_DOT:p4,CHAR_EXCLAMATION_MARK:h4,CHAR_FORWARD_SLASH:Woe,CHAR_LEFT_CURLY_BRACE:g4,CHAR_LEFT_PARENTHESES:d4,CHAR_LEFT_SQUARE_BRACKET:hze,CHAR_PLUS:gze,CHAR_QUESTION_MARK:Hoe,CHAR_RIGHT_CURLY_BRACE:dze,CHAR_RIGHT_PARENTHESES:joe,CHAR_RIGHT_SQUARE_BRACKET:mze}=EB(),Goe=t=>t===Woe||t===CB,qoe=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},yze=(t,e)=>{let r=e||{},s=t.length-1,a=r.parts===!0||r.scanToEnd===!0,n=[],c=[],f=[],p=t,h=-1,E=0,C=0,S=!1,P=!1,I=!1,R=!1,N=!1,U=!1,W=!1,ee=!1,ie=!1,ue=!1,le=0,me,pe,Be={value:\"\",depth:0,isGlob:!1},Ce=()=>h>=s,g=()=>p.charCodeAt(h+1),we=()=>(me=pe,p.charCodeAt(++h));for(;h<s;){pe=we();let De;if(pe===CB){W=Be.backslashes=!0,pe=we(),pe===g4&&(U=!0);continue}if(U===!0||pe===g4){for(le++;Ce()!==!0&&(pe=we());){if(pe===CB){W=Be.backslashes=!0,we();continue}if(pe===g4){le++;continue}if(U!==!0&&pe===p4&&(pe=we())===p4){if(S=Be.isBrace=!0,I=Be.isGlob=!0,ue=!0,a===!0)continue;break}if(U!==!0&&pe===pze){if(S=Be.isBrace=!0,I=Be.isGlob=!0,ue=!0,a===!0)continue;break}if(pe===dze&&(le--,le===0)){U=!1,S=Be.isBrace=!0,ue=!0;break}}if(a===!0)continue;break}if(pe===Woe){if(n.push(h),c.push(Be),Be={value:\"\",depth:0,isGlob:!1},ue===!0)continue;if(me===p4&&h===E+1){E+=2;continue}C=h+1;continue}if(r.noext!==!0&&(pe===gze||pe===Aze||pe===A4||pe===Hoe||pe===h4)===!0&&g()===d4){if(I=Be.isGlob=!0,R=Be.isExtglob=!0,ue=!0,pe===h4&&h===E&&(ie=!0),a===!0){for(;Ce()!==!0&&(pe=we());){if(pe===CB){W=Be.backslashes=!0,pe=we();continue}if(pe===joe){I=Be.isGlob=!0,ue=!0;break}}continue}break}if(pe===A4){if(me===A4&&(N=Be.isGlobstar=!0),I=Be.isGlob=!0,ue=!0,a===!0)continue;break}if(pe===Hoe){if(I=Be.isGlob=!0,ue=!0,a===!0)continue;break}if(pe===hze){for(;Ce()!==!0&&(De=we());){if(De===CB){W=Be.backslashes=!0,we();continue}if(De===mze){P=Be.isBracket=!0,I=Be.isGlob=!0,ue=!0;break}}if(a===!0)continue;break}if(r.nonegate!==!0&&pe===h4&&h===E){ee=Be.negated=!0,E++;continue}if(r.noparen!==!0&&pe===d4){if(I=Be.isGlob=!0,a===!0){for(;Ce()!==!0&&(pe=we());){if(pe===d4){W=Be.backslashes=!0,pe=we();continue}if(pe===joe){ue=!0;break}}continue}break}if(I===!0){if(ue=!0,a===!0)continue;break}}r.noext===!0&&(R=!1,I=!1);let ye=p,Ae=\"\",se=\"\";E>0&&(Ae=p.slice(0,E),p=p.slice(E),C-=E),ye&&I===!0&&C>0?(ye=p.slice(0,C),se=p.slice(C)):I===!0?(ye=\"\",se=p):ye=p,ye&&ye!==\"\"&&ye!==\"/\"&&ye!==p&&Goe(ye.charCodeAt(ye.length-1))&&(ye=ye.slice(0,-1)),r.unescape===!0&&(se&&(se=_oe.removeBackslashes(se)),ye&&W===!0&&(ye=_oe.removeBackslashes(ye)));let Z={prefix:Ae,input:t,start:E,base:ye,glob:se,isBrace:S,isBracket:P,isGlob:I,isExtglob:R,isGlobstar:N,negated:ee,negatedExtglob:ie};if(r.tokens===!0&&(Z.maxDepth=0,Goe(pe)||c.push(Be),Z.tokens=c),r.parts===!0||r.tokens===!0){let De;for(let Re=0;Re<n.length;Re++){let mt=De?De+1:E,j=n[Re],rt=t.slice(mt,j);r.tokens&&(Re===0&&E!==0?(c[Re].isPrefix=!0,c[Re].value=Ae):c[Re].value=rt,qoe(c[Re]),Z.maxDepth+=c[Re].depth),(Re!==0||rt!==\"\")&&f.push(rt),De=j}if(De&&De+1<t.length){let Re=t.slice(De+1);f.push(Re),r.tokens&&(c[c.length-1].value=Re,qoe(c[c.length-1]),Z.maxDepth+=c[c.length-1].depth)}Z.slashes=n,Z.parts=f}return Z};Yoe.exports=yze});var zoe=_((gFt,Koe)=>{\"use strict\";var hk=EB(),Gl=IB(),{MAX_LENGTH:gk,POSIX_REGEX_SOURCE:Eze,REGEX_NON_SPECIAL_CHARS:Ize,REGEX_SPECIAL_CHARS_BACKREF:Cze,REPLACEMENTS:Joe}=hk,wze=(t,e)=>{if(typeof e.expandRange==\"function\")return e.expandRange(...t,e);t.sort();let r=`[${t.join(\"-\")}]`;try{new RegExp(r)}catch{return t.map(a=>Gl.escapeRegex(a)).join(\"..\")}return r},FE=(t,e)=>`Missing ${t}: \"${e}\" - use \"\\\\\\\\${e}\" to match literal characters`,m4=(t,e)=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");t=Joe[t]||t;let r={...e},s=typeof r.maxLength==\"number\"?Math.min(gk,r.maxLength):gk,a=t.length;if(a>s)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);let n={type:\"bos\",value:\"\",output:r.prepend||\"\"},c=[n],f=r.capture?\"\":\"?:\",p=Gl.isWindows(e),h=hk.globChars(p),E=hk.extglobChars(h),{DOT_LITERAL:C,PLUS_LITERAL:S,SLASH_LITERAL:P,ONE_CHAR:I,DOTS_SLASH:R,NO_DOT:N,NO_DOT_SLASH:U,NO_DOTS_SLASH:W,QMARK:ee,QMARK_NO_DOT:ie,STAR:ue,START_ANCHOR:le}=h,me=x=>`(${f}(?:(?!${le}${x.dot?R:C}).)*?)`,pe=r.dot?\"\":N,Be=r.dot?ee:ie,Ce=r.bash===!0?me(r):ue;r.capture&&(Ce=`(${Ce})`),typeof r.noext==\"boolean\"&&(r.noextglob=r.noext);let g={input:t,index:-1,start:0,dot:r.dot===!0,consumed:\"\",output:\"\",prefix:\"\",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:c};t=Gl.removePrefix(t,g),a=t.length;let we=[],ye=[],Ae=[],se=n,Z,De=()=>g.index===a-1,Re=g.peek=(x=1)=>t[g.index+x],mt=g.advance=()=>t[++g.index]||\"\",j=()=>t.slice(g.index+1),rt=(x=\"\",w=0)=>{g.consumed+=x,g.index+=w},Fe=x=>{g.output+=x.output!=null?x.output:x.value,rt(x.value)},Ne=()=>{let x=1;for(;Re()===\"!\"&&(Re(2)!==\"(\"||Re(3)===\"?\");)mt(),g.start++,x++;return x%2===0?!1:(g.negated=!0,g.start++,!0)},Pe=x=>{g[x]++,Ae.push(x)},Ve=x=>{g[x]--,Ae.pop()},ke=x=>{if(se.type===\"globstar\"){let w=g.braces>0&&(x.type===\"comma\"||x.type===\"brace\"),b=x.extglob===!0||we.length&&(x.type===\"pipe\"||x.type===\"paren\");x.type!==\"slash\"&&x.type!==\"paren\"&&!w&&!b&&(g.output=g.output.slice(0,-se.output.length),se.type=\"star\",se.value=\"*\",se.output=Ce,g.output+=se.output)}if(we.length&&x.type!==\"paren\"&&(we[we.length-1].inner+=x.value),(x.value||x.output)&&Fe(x),se&&se.type===\"text\"&&x.type===\"text\"){se.value+=x.value,se.output=(se.output||\"\")+x.value;return}x.prev=se,c.push(x),se=x},it=(x,w)=>{let b={...E[w],conditions:1,inner:\"\"};b.prev=se,b.parens=g.parens,b.output=g.output;let y=(r.capture?\"(\":\"\")+b.open;Pe(\"parens\"),ke({type:x,value:w,output:g.output?\"\":I}),ke({type:\"paren\",extglob:!0,value:mt(),output:y}),we.push(b)},Ue=x=>{let w=x.close+(r.capture?\")\":\"\"),b;if(x.type===\"negate\"){let y=Ce;if(x.inner&&x.inner.length>1&&x.inner.includes(\"/\")&&(y=me(r)),(y!==Ce||De()||/^\\)+$/.test(j()))&&(w=x.close=`)$))${y}`),x.inner.includes(\"*\")&&(b=j())&&/^\\.[^\\\\/.]+$/.test(b)){let F=m4(b,{...e,fastpaths:!1}).output;w=x.close=`)${F})${y})`}x.prev.type===\"bos\"&&(g.negatedExtglob=!0)}ke({type:\"paren\",extglob:!0,value:Z,output:w}),Ve(\"parens\")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\\]{}\"])/.test(t)){let x=!1,w=t.replace(Cze,(b,y,F,z,X,$)=>z===\"\\\\\"?(x=!0,b):z===\"?\"?y?y+z+(X?ee.repeat(X.length):\"\"):$===0?Be+(X?ee.repeat(X.length):\"\"):ee.repeat(F.length):z===\".\"?C.repeat(F.length):z===\"*\"?y?y+z+(X?Ce:\"\"):Ce:y?b:`\\\\${b}`);return x===!0&&(r.unescape===!0?w=w.replace(/\\\\/g,\"\"):w=w.replace(/\\\\+/g,b=>b.length%2===0?\"\\\\\\\\\":b?\"\\\\\":\"\")),w===t&&r.contains===!0?(g.output=t,g):(g.output=Gl.wrapOutput(w,g,e),g)}for(;!De();){if(Z=mt(),Z===\"\\0\")continue;if(Z===\"\\\\\"){let b=Re();if(b===\"/\"&&r.bash!==!0||b===\".\"||b===\";\")continue;if(!b){Z+=\"\\\\\",ke({type:\"text\",value:Z});continue}let y=/^\\\\+/.exec(j()),F=0;if(y&&y[0].length>2&&(F=y[0].length,g.index+=F,F%2!==0&&(Z+=\"\\\\\")),r.unescape===!0?Z=mt():Z+=mt(),g.brackets===0){ke({type:\"text\",value:Z});continue}}if(g.brackets>0&&(Z!==\"]\"||se.value===\"[\"||se.value===\"[^\")){if(r.posix!==!1&&Z===\":\"){let b=se.value.slice(1);if(b.includes(\"[\")&&(se.posix=!0,b.includes(\":\"))){let y=se.value.lastIndexOf(\"[\"),F=se.value.slice(0,y),z=se.value.slice(y+2),X=Eze[z];if(X){se.value=F+X,g.backtrack=!0,mt(),!n.output&&c.indexOf(se)===1&&(n.output=I);continue}}}(Z===\"[\"&&Re()!==\":\"||Z===\"-\"&&Re()===\"]\")&&(Z=`\\\\${Z}`),Z===\"]\"&&(se.value===\"[\"||se.value===\"[^\")&&(Z=`\\\\${Z}`),r.posix===!0&&Z===\"!\"&&se.value===\"[\"&&(Z=\"^\"),se.value+=Z,Fe({value:Z});continue}if(g.quotes===1&&Z!=='\"'){Z=Gl.escapeRegex(Z),se.value+=Z,Fe({value:Z});continue}if(Z==='\"'){g.quotes=g.quotes===1?0:1,r.keepQuotes===!0&&ke({type:\"text\",value:Z});continue}if(Z===\"(\"){Pe(\"parens\"),ke({type:\"paren\",value:Z});continue}if(Z===\")\"){if(g.parens===0&&r.strictBrackets===!0)throw new SyntaxError(FE(\"opening\",\"(\"));let b=we[we.length-1];if(b&&g.parens===b.parens+1){Ue(we.pop());continue}ke({type:\"paren\",value:Z,output:g.parens?\")\":\"\\\\)\"}),Ve(\"parens\");continue}if(Z===\"[\"){if(r.nobracket===!0||!j().includes(\"]\")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(FE(\"closing\",\"]\"));Z=`\\\\${Z}`}else Pe(\"brackets\");ke({type:\"bracket\",value:Z});continue}if(Z===\"]\"){if(r.nobracket===!0||se&&se.type===\"bracket\"&&se.value.length===1){ke({type:\"text\",value:Z,output:`\\\\${Z}`});continue}if(g.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(FE(\"opening\",\"[\"));ke({type:\"text\",value:Z,output:`\\\\${Z}`});continue}Ve(\"brackets\");let b=se.value.slice(1);if(se.posix!==!0&&b[0]===\"^\"&&!b.includes(\"/\")&&(Z=`/${Z}`),se.value+=Z,Fe({value:Z}),r.literalBrackets===!1||Gl.hasRegexChars(b))continue;let y=Gl.escapeRegex(se.value);if(g.output=g.output.slice(0,-se.value.length),r.literalBrackets===!0){g.output+=y,se.value=y;continue}se.value=`(${f}${y}|${se.value})`,g.output+=se.value;continue}if(Z===\"{\"&&r.nobrace!==!0){Pe(\"braces\");let b={type:\"brace\",value:Z,output:\"(\",outputIndex:g.output.length,tokensIndex:g.tokens.length};ye.push(b),ke(b);continue}if(Z===\"}\"){let b=ye[ye.length-1];if(r.nobrace===!0||!b){ke({type:\"text\",value:Z,output:Z});continue}let y=\")\";if(b.dots===!0){let F=c.slice(),z=[];for(let X=F.length-1;X>=0&&(c.pop(),F[X].type!==\"brace\");X--)F[X].type!==\"dots\"&&z.unshift(F[X].value);y=wze(z,r),g.backtrack=!0}if(b.comma!==!0&&b.dots!==!0){let F=g.output.slice(0,b.outputIndex),z=g.tokens.slice(b.tokensIndex);b.value=b.output=\"\\\\{\",Z=y=\"\\\\}\",g.output=F;for(let X of z)g.output+=X.output||X.value}ke({type:\"brace\",value:Z,output:y}),Ve(\"braces\"),ye.pop();continue}if(Z===\"|\"){we.length>0&&we[we.length-1].conditions++,ke({type:\"text\",value:Z});continue}if(Z===\",\"){let b=Z,y=ye[ye.length-1];y&&Ae[Ae.length-1]===\"braces\"&&(y.comma=!0,b=\"|\"),ke({type:\"comma\",value:Z,output:b});continue}if(Z===\"/\"){if(se.type===\"dot\"&&g.index===g.start+1){g.start=g.index+1,g.consumed=\"\",g.output=\"\",c.pop(),se=n;continue}ke({type:\"slash\",value:Z,output:P});continue}if(Z===\".\"){if(g.braces>0&&se.type===\"dot\"){se.value===\".\"&&(se.output=C);let b=ye[ye.length-1];se.type=\"dots\",se.output+=Z,se.value+=Z,b.dots=!0;continue}if(g.braces+g.parens===0&&se.type!==\"bos\"&&se.type!==\"slash\"){ke({type:\"text\",value:Z,output:C});continue}ke({type:\"dot\",value:Z,output:C});continue}if(Z===\"?\"){if(!(se&&se.value===\"(\")&&r.noextglob!==!0&&Re()===\"(\"&&Re(2)!==\"?\"){it(\"qmark\",Z);continue}if(se&&se.type===\"paren\"){let y=Re(),F=Z;if(y===\"<\"&&!Gl.supportsLookbehinds())throw new Error(\"Node.js v10 or higher is required for regex lookbehinds\");(se.value===\"(\"&&!/[!=<:]/.test(y)||y===\"<\"&&!/<([!=]|\\w+>)/.test(j()))&&(F=`\\\\${Z}`),ke({type:\"text\",value:Z,output:F});continue}if(r.dot!==!0&&(se.type===\"slash\"||se.type===\"bos\")){ke({type:\"qmark\",value:Z,output:ie});continue}ke({type:\"qmark\",value:Z,output:ee});continue}if(Z===\"!\"){if(r.noextglob!==!0&&Re()===\"(\"&&(Re(2)!==\"?\"||!/[!=<:]/.test(Re(3)))){it(\"negate\",Z);continue}if(r.nonegate!==!0&&g.index===0){Ne();continue}}if(Z===\"+\"){if(r.noextglob!==!0&&Re()===\"(\"&&Re(2)!==\"?\"){it(\"plus\",Z);continue}if(se&&se.value===\"(\"||r.regex===!1){ke({type:\"plus\",value:Z,output:S});continue}if(se&&(se.type===\"bracket\"||se.type===\"paren\"||se.type===\"brace\")||g.parens>0){ke({type:\"plus\",value:Z});continue}ke({type:\"plus\",value:S});continue}if(Z===\"@\"){if(r.noextglob!==!0&&Re()===\"(\"&&Re(2)!==\"?\"){ke({type:\"at\",extglob:!0,value:Z,output:\"\"});continue}ke({type:\"text\",value:Z});continue}if(Z!==\"*\"){(Z===\"$\"||Z===\"^\")&&(Z=`\\\\${Z}`);let b=Ize.exec(j());b&&(Z+=b[0],g.index+=b[0].length),ke({type:\"text\",value:Z});continue}if(se&&(se.type===\"globstar\"||se.star===!0)){se.type=\"star\",se.star=!0,se.value+=Z,se.output=Ce,g.backtrack=!0,g.globstar=!0,rt(Z);continue}let x=j();if(r.noextglob!==!0&&/^\\([^?]/.test(x)){it(\"star\",Z);continue}if(se.type===\"star\"){if(r.noglobstar===!0){rt(Z);continue}let b=se.prev,y=b.prev,F=b.type===\"slash\"||b.type===\"bos\",z=y&&(y.type===\"star\"||y.type===\"globstar\");if(r.bash===!0&&(!F||x[0]&&x[0]!==\"/\")){ke({type:\"star\",value:Z,output:\"\"});continue}let X=g.braces>0&&(b.type===\"comma\"||b.type===\"brace\"),$=we.length&&(b.type===\"pipe\"||b.type===\"paren\");if(!F&&b.type!==\"paren\"&&!X&&!$){ke({type:\"star\",value:Z,output:\"\"});continue}for(;x.slice(0,3)===\"/**\";){let oe=t[g.index+4];if(oe&&oe!==\"/\")break;x=x.slice(3),rt(\"/**\",3)}if(b.type===\"bos\"&&De()){se.type=\"globstar\",se.value+=Z,se.output=me(r),g.output=se.output,g.globstar=!0,rt(Z);continue}if(b.type===\"slash\"&&b.prev.type!==\"bos\"&&!z&&De()){g.output=g.output.slice(0,-(b.output+se.output).length),b.output=`(?:${b.output}`,se.type=\"globstar\",se.output=me(r)+(r.strictSlashes?\")\":\"|$)\"),se.value+=Z,g.globstar=!0,g.output+=b.output+se.output,rt(Z);continue}if(b.type===\"slash\"&&b.prev.type!==\"bos\"&&x[0]===\"/\"){let oe=x[1]!==void 0?\"|$\":\"\";g.output=g.output.slice(0,-(b.output+se.output).length),b.output=`(?:${b.output}`,se.type=\"globstar\",se.output=`${me(r)}${P}|${P}${oe})`,se.value+=Z,g.output+=b.output+se.output,g.globstar=!0,rt(Z+mt()),ke({type:\"slash\",value:\"/\",output:\"\"});continue}if(b.type===\"bos\"&&x[0]===\"/\"){se.type=\"globstar\",se.value+=Z,se.output=`(?:^|${P}|${me(r)}${P})`,g.output=se.output,g.globstar=!0,rt(Z+mt()),ke({type:\"slash\",value:\"/\",output:\"\"});continue}g.output=g.output.slice(0,-se.output.length),se.type=\"globstar\",se.output=me(r),se.value+=Z,g.output+=se.output,g.globstar=!0,rt(Z);continue}let w={type:\"star\",value:Z,output:Ce};if(r.bash===!0){w.output=\".*?\",(se.type===\"bos\"||se.type===\"slash\")&&(w.output=pe+w.output),ke(w);continue}if(se&&(se.type===\"bracket\"||se.type===\"paren\")&&r.regex===!0){w.output=Z,ke(w);continue}(g.index===g.start||se.type===\"slash\"||se.type===\"dot\")&&(se.type===\"dot\"?(g.output+=U,se.output+=U):r.dot===!0?(g.output+=W,se.output+=W):(g.output+=pe,se.output+=pe),Re()!==\"*\"&&(g.output+=I,se.output+=I)),ke(w)}for(;g.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(FE(\"closing\",\"]\"));g.output=Gl.escapeLast(g.output,\"[\"),Ve(\"brackets\")}for(;g.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(FE(\"closing\",\")\"));g.output=Gl.escapeLast(g.output,\"(\"),Ve(\"parens\")}for(;g.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(FE(\"closing\",\"}\"));g.output=Gl.escapeLast(g.output,\"{\"),Ve(\"braces\")}if(r.strictSlashes!==!0&&(se.type===\"star\"||se.type===\"bracket\")&&ke({type:\"maybe_slash\",value:\"\",output:`${P}?`}),g.backtrack===!0){g.output=\"\";for(let x of g.tokens)g.output+=x.output!=null?x.output:x.value,x.suffix&&(g.output+=x.suffix)}return g};m4.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength==\"number\"?Math.min(gk,r.maxLength):gk,a=t.length;if(a>s)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);t=Joe[t]||t;let n=Gl.isWindows(e),{DOT_LITERAL:c,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:E,NO_DOTS:C,NO_DOTS_SLASH:S,STAR:P,START_ANCHOR:I}=hk.globChars(n),R=r.dot?C:E,N=r.dot?S:E,U=r.capture?\"\":\"?:\",W={negated:!1,prefix:\"\"},ee=r.bash===!0?\".*?\":P;r.capture&&(ee=`(${ee})`);let ie=pe=>pe.noglobstar===!0?ee:`(${U}(?:(?!${I}${pe.dot?h:c}).)*?)`,ue=pe=>{switch(pe){case\"*\":return`${R}${p}${ee}`;case\".*\":return`${c}${p}${ee}`;case\"*.*\":return`${R}${ee}${c}${p}${ee}`;case\"*/*\":return`${R}${ee}${f}${p}${N}${ee}`;case\"**\":return R+ie(r);case\"**/*\":return`(?:${R}${ie(r)}${f})?${N}${p}${ee}`;case\"**/*.*\":return`(?:${R}${ie(r)}${f})?${N}${ee}${c}${p}${ee}`;case\"**/.*\":return`(?:${R}${ie(r)}${f})?${c}${p}${ee}`;default:{let Be=/^(.*?)\\.(\\w+)$/.exec(pe);if(!Be)return;let Ce=ue(Be[1]);return Ce?Ce+c+Be[2]:void 0}}},le=Gl.removePrefix(t,W),me=ue(le);return me&&r.strictSlashes!==!0&&(me+=`${f}?`),me};Koe.exports=m4});var Zoe=_((dFt,Xoe)=>{\"use strict\";var Bze=Ie(\"path\"),vze=Voe(),y4=zoe(),E4=IB(),Sze=EB(),Dze=t=>t&&typeof t==\"object\"&&!Array.isArray(t),Zi=(t,e,r=!1)=>{if(Array.isArray(t)){let E=t.map(S=>Zi(S,e,r));return S=>{for(let P of E){let I=P(S);if(I)return I}return!1}}let s=Dze(t)&&t.tokens&&t.input;if(t===\"\"||typeof t!=\"string\"&&!s)throw new TypeError(\"Expected pattern to be a non-empty string\");let a=e||{},n=E4.isWindows(e),c=s?Zi.compileRe(t,e):Zi.makeRe(t,e,!1,!0),f=c.state;delete c.state;let p=()=>!1;if(a.ignore){let E={...e,ignore:null,onMatch:null,onResult:null};p=Zi(a.ignore,E,r)}let h=(E,C=!1)=>{let{isMatch:S,match:P,output:I}=Zi.test(E,c,e,{glob:t,posix:n}),R={glob:t,state:f,regex:c,posix:n,input:E,output:I,match:P,isMatch:S};return typeof a.onResult==\"function\"&&a.onResult(R),S===!1?(R.isMatch=!1,C?R:!1):p(E)?(typeof a.onIgnore==\"function\"&&a.onIgnore(R),R.isMatch=!1,C?R:!1):(typeof a.onMatch==\"function\"&&a.onMatch(R),C?R:!0)};return r&&(h.state=f),h};Zi.test=(t,e,r,{glob:s,posix:a}={})=>{if(typeof t!=\"string\")throw new TypeError(\"Expected input to be a string\");if(t===\"\")return{isMatch:!1,output:\"\"};let n=r||{},c=n.format||(a?E4.toPosixSlashes:null),f=t===s,p=f&&c?c(t):t;return f===!1&&(p=c?c(t):t,f=p===s),(f===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?f=Zi.matchBase(t,e,r,a):f=e.exec(p)),{isMatch:!!f,match:f,output:p}};Zi.matchBase=(t,e,r,s=E4.isWindows(r))=>(e instanceof RegExp?e:Zi.makeRe(e,r)).test(Bze.basename(t));Zi.isMatch=(t,e,r)=>Zi(e,r)(t);Zi.parse=(t,e)=>Array.isArray(t)?t.map(r=>Zi.parse(r,e)):y4(t,{...e,fastpaths:!1});Zi.scan=(t,e)=>vze(t,e);Zi.compileRe=(t,e,r=!1,s=!1)=>{if(r===!0)return t.output;let a=e||{},n=a.contains?\"\":\"^\",c=a.contains?\"\":\"$\",f=`${n}(?:${t.output})${c}`;t&&t.negated===!0&&(f=`^(?!${f}).*$`);let p=Zi.toRegex(f,e);return s===!0&&(p.state=t),p};Zi.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||typeof t!=\"string\")throw new TypeError(\"Expected a non-empty string\");let a={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]===\".\"||t[0]===\"*\")&&(a.output=y4.fastpaths(t,e)),a.output||(a=y4(t,e)),Zi.compileRe(a,e,r,s)};Zi.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?\"i\":\"\"))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Zi.constants=Sze;Xoe.exports=Zi});var eae=_((mFt,$oe)=>{\"use strict\";$oe.exports=Zoe()});var Go=_((yFt,iae)=>{\"use strict\";var rae=Ie(\"util\"),nae=Foe(),Jf=eae(),I4=IB(),tae=t=>t===\"\"||t===\"./\",xi=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let s=new Set,a=new Set,n=new Set,c=0,f=E=>{n.add(E.output),r&&r.onResult&&r.onResult(E)};for(let E=0;E<e.length;E++){let C=Jf(String(e[E]),{...r,onResult:f},!0),S=C.state.negated||C.state.negatedExtglob;S&&c++;for(let P of t){let I=C(P,!0);(S?!I.isMatch:I.isMatch)&&(S?s.add(I.output):(s.delete(I.output),a.add(I.output)))}}let h=(c===e.length?[...n]:[...a]).filter(E=>!s.has(E));if(r&&h.length===0){if(r.failglob===!0)throw new Error(`No matches found for \"${e.join(\", \")}\"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(E=>E.replace(/\\\\/g,\"\")):e}return h};xi.match=xi;xi.matcher=(t,e)=>Jf(t,e);xi.isMatch=(t,e,r)=>Jf(e,r)(t);xi.any=xi.isMatch;xi.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set,a=[],n=f=>{r.onResult&&r.onResult(f),a.push(f.output)},c=new Set(xi(t,e,{...r,onResult:n}));for(let f of a)c.has(f)||s.add(f);return[...s]};xi.contains=(t,e,r)=>{if(typeof t!=\"string\")throw new TypeError(`Expected a string: \"${rae.inspect(t)}\"`);if(Array.isArray(e))return e.some(s=>xi.contains(t,s,r));if(typeof e==\"string\"){if(tae(t)||tae(e))return!1;if(t.includes(e)||t.startsWith(\"./\")&&t.slice(2).includes(e))return!0}return xi.isMatch(t,e,{...r,contains:!0})};xi.matchKeys=(t,e,r)=>{if(!I4.isObject(t))throw new TypeError(\"Expected the first argument to be an object\");let s=xi(Object.keys(t),e,r),a={};for(let n of s)a[n]=t[n];return a};xi.some=(t,e,r)=>{let s=[].concat(t);for(let a of[].concat(e)){let n=Jf(String(a),r);if(s.some(c=>n(c)))return!0}return!1};xi.every=(t,e,r)=>{let s=[].concat(t);for(let a of[].concat(e)){let n=Jf(String(a),r);if(!s.every(c=>n(c)))return!1}return!0};xi.all=(t,e,r)=>{if(typeof t!=\"string\")throw new TypeError(`Expected a string: \"${rae.inspect(t)}\"`);return[].concat(e).every(s=>Jf(s,r)(t))};xi.capture=(t,e,r)=>{let s=I4.isWindows(r),n=Jf.makeRe(String(t),{...r,capture:!0}).exec(s?I4.toPosixSlashes(e):e);if(n)return n.slice(1).map(c=>c===void 0?\"\":c)};xi.makeRe=(...t)=>Jf.makeRe(...t);xi.scan=(...t)=>Jf.scan(...t);xi.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[]))for(let a of nae(String(s),e))r.push(Jf.parse(a,e));return r};xi.braces=(t,e)=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");return e&&e.nobrace===!0||!/\\{.*\\}/.test(t)?[t]:nae(t,e)};xi.braceExpand=(t,e)=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");return xi.braces(t,{...e,expand:!0})};iae.exports=xi});var oae=_((EFt,sae)=>{\"use strict\";sae.exports=({onlyFirst:t=!1}={})=>{let e=[\"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))\"].join(\"|\");return new RegExp(e,t?void 0:\"g\")}});var dk=_((IFt,aae)=>{\"use strict\";var bze=oae();aae.exports=t=>typeof t==\"string\"?t.replace(bze(),\"\"):t});function lae(t){return Number.isSafeInteger(t)&&t>=0}var cae=Xe(()=>{});function uae(t){return t!=null&&typeof t!=\"function\"&&lae(t.length)}var fae=Xe(()=>{cae()});function bc(t){return t===\"__proto__\"}var wB=Xe(()=>{});function NE(t){switch(typeof t){case\"number\":case\"symbol\":return!1;case\"string\":return t.includes(\".\")||t.includes(\"[\")||t.includes(\"]\")}}var mk=Xe(()=>{});function OE(t){return typeof t==\"string\"||typeof t==\"symbol\"?t:Object.is(t?.valueOf?.(),-0)?\"-0\":String(t)}var yk=Xe(()=>{});function Mu(t){let e=[],r=t.length;if(r===0)return e;let s=0,a=\"\",n=\"\",c=!1;for(t.charCodeAt(0)===46&&(e.push(\"\"),s++);s<r;){let f=t[s];n?f===\"\\\\\"&&s+1<r?(s++,a+=t[s]):f===n?n=\"\":a+=f:c?f==='\"'||f===\"'\"?n=f:f===\"]\"?(c=!1,e.push(a),a=\"\"):a+=f:f===\"[\"?(c=!0,a&&(e.push(a),a=\"\")):f===\".\"?a&&(e.push(a),a=\"\"):a+=f,s++}return a&&e.push(a),e}var LE=Xe(()=>{});function va(t,e,r){if(t==null)return r;switch(typeof e){case\"string\":{if(bc(e))return r;let s=t[e];return s===void 0?NE(e)?va(t,Mu(e),r):r:s}case\"number\":case\"symbol\":{typeof e==\"number\"&&(e=OE(e));let s=t[e];return s===void 0?r:s}default:{if(Array.isArray(e))return Pze(t,e,r);if(Object.is(e?.valueOf(),-0)?e=\"-0\":e=String(e),bc(e))return r;let s=t[e];return s===void 0?r:s}}}function Pze(t,e,r){if(e.length===0)return r;let s=t;for(let a=0;a<e.length;a++){if(s==null||bc(e[a]))return r;s=s[e[a]]}return s===void 0?r:s}var Ek=Xe(()=>{wB();mk();yk();LE()});function C4(t){return t!==null&&(typeof t==\"object\"||typeof t==\"function\")}var Aae=Xe(()=>{});function ME(t){return t==null||typeof t!=\"object\"&&typeof t!=\"function\"}var Ik=Xe(()=>{});function Ck(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}var w4=Xe(()=>{});function Wd(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}var wk=Xe(()=>{});function Yd(t){return t==null?t===void 0?\"[object Undefined]\":\"[object Null]\":Object.prototype.toString.call(t)}var Bk=Xe(()=>{});var vk,UE,_E,HE,Vd,Sk,Dk,bk,Pk,xk,pae,kk,jE,hae,Qk,Tk,Rk,Fk,Nk,gae,Ok,Lk,Mk,dae,Uk,_k,Hk=Xe(()=>{vk=\"[object RegExp]\",UE=\"[object String]\",_E=\"[object Number]\",HE=\"[object Boolean]\",Vd=\"[object Arguments]\",Sk=\"[object Symbol]\",Dk=\"[object Date]\",bk=\"[object Map]\",Pk=\"[object Set]\",xk=\"[object Array]\",pae=\"[object Function]\",kk=\"[object ArrayBuffer]\",jE=\"[object Object]\",hae=\"[object Error]\",Qk=\"[object DataView]\",Tk=\"[object Uint8Array]\",Rk=\"[object Uint8ClampedArray]\",Fk=\"[object Uint16Array]\",Nk=\"[object Uint32Array]\",gae=\"[object BigUint64Array]\",Ok=\"[object Int8Array]\",Lk=\"[object Int16Array]\",Mk=\"[object Int32Array]\",dae=\"[object BigInt64Array]\",Uk=\"[object Float32Array]\",_k=\"[object Float64Array]\"});function GE(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var jk=Xe(()=>{});function mae(t,e){return u0(t,void 0,t,new Map,e)}function u0(t,e,r,s=new Map,a=void 0){let n=a?.(t,e,r,s);if(n!=null)return n;if(ME(t))return t;if(s.has(t))return s.get(t);if(Array.isArray(t)){let c=new Array(t.length);s.set(t,c);for(let f=0;f<t.length;f++)c[f]=u0(t[f],f,r,s,a);return Object.hasOwn(t,\"index\")&&(c.index=t.index),Object.hasOwn(t,\"input\")&&(c.input=t.input),c}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let c=new RegExp(t.source,t.flags);return c.lastIndex=t.lastIndex,c}if(t instanceof Map){let c=new Map;s.set(t,c);for(let[f,p]of t)c.set(f,u0(p,f,r,s,a));return c}if(t instanceof Set){let c=new Set;s.set(t,c);for(let f of t)c.add(u0(f,void 0,r,s,a));return c}if(typeof Buffer<\"u\"&&Buffer.isBuffer(t))return t.subarray();if(GE(t)){let c=new(Object.getPrototypeOf(t)).constructor(t.length);s.set(t,c);for(let f=0;f<t.length;f++)c[f]=u0(t[f],f,r,s,a);return c}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<\"u\"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){let c=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return s.set(t,c),c0(c,t,r,s,a),c}if(typeof File<\"u\"&&t instanceof File){let c=new File([t],t.name,{type:t.type});return s.set(t,c),c0(c,t,r,s,a),c}if(t instanceof Blob){let c=new Blob([t],{type:t.type});return s.set(t,c),c0(c,t,r,s,a),c}if(t instanceof Error){let c=new t.constructor;return s.set(t,c),c.message=t.message,c.name=t.name,c.stack=t.stack,c.cause=t.cause,c0(c,t,r,s,a),c}if(typeof t==\"object\"&&xze(t)){let c=Object.create(Object.getPrototypeOf(t));return s.set(t,c),c0(c,t,r,s,a),c}return t}function c0(t,e,r=t,s,a){let n=[...Object.keys(e),...Wd(e)];for(let c=0;c<n.length;c++){let f=n[c],p=Object.getOwnPropertyDescriptor(t,f);(p==null||p.writable)&&(t[f]=u0(e[f],f,r,s,a))}}function xze(t){switch(Yd(t)){case Vd:case xk:case kk:case Qk:case HE:case Dk:case Uk:case _k:case Ok:case Lk:case Mk:case bk:case _E:case jE:case vk:case Pk:case UE:case Sk:case Tk:case Rk:case Fk:case Nk:return!0;default:return!1}}var B4=Xe(()=>{wk();Bk();Hk();Ik();jk()});function yae(t){return u0(t,void 0,t,new Map,void 0)}var Eae=Xe(()=>{B4()});function Iae(t,e){return mae(t,(r,s,a,n)=>{let c=e?.(r,s,a,n);if(c!=null)return c;if(typeof t==\"object\")switch(Object.prototype.toString.call(t)){case _E:case UE:case HE:{let f=new t.constructor(t?.valueOf());return c0(f,t),f}case Vd:{let f={};return c0(f,t),f.length=t.length,f[Symbol.iterator]=t[Symbol.iterator],f}default:return}})}var Cae=Xe(()=>{B4();Hk()});function f0(t){return Iae(t)}var v4=Xe(()=>{Cae()});function Gk(t,e=Number.MAX_SAFE_INTEGER){switch(typeof t){case\"number\":return Number.isInteger(t)&&t>=0&&t<e;case\"symbol\":return!1;case\"string\":return kze.test(t)}}var kze,S4=Xe(()=>{kze=/^(?:0|[1-9]\\d*)$/});function BB(t){return t!==null&&typeof t==\"object\"&&Yd(t)===\"[object Arguments]\"}var D4=Xe(()=>{Bk()});function vB(t,e){let r;if(Array.isArray(e)?r=e:typeof e==\"string\"&&NE(e)&&t?.[e]==null?r=Mu(e):r=[e],r.length===0)return!1;let s=t;for(let a=0;a<r.length;a++){let n=r[a];if((s==null||!Object.hasOwn(s,n))&&!((Array.isArray(s)||BB(s))&&Gk(n)&&n<s.length))return!1;s=s[n]}return!0}var b4=Xe(()=>{mk();S4();D4();LE()});function P4(t){return typeof t==\"object\"&&t!==null}var wae=Xe(()=>{});function Bae(t){return typeof t==\"symbol\"||t instanceof Symbol}var vae=Xe(()=>{});function Sae(t,e){return Array.isArray(t)?!1:typeof t==\"number\"||typeof t==\"boolean\"||t==null||Bae(t)?!0:typeof t==\"string\"&&(Tze.test(t)||!Qze.test(t))||e!=null&&Object.hasOwn(e,t)}var Qze,Tze,Dae=Xe(()=>{vae();Qze=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Tze=/^\\w*$/});function A0(t,e){if(t==null)return!0;switch(typeof e){case\"symbol\":case\"number\":case\"object\":{if(Array.isArray(e))return bae(t,e);if(typeof e==\"number\"?e=OE(e):typeof e==\"object\"&&(Object.is(e?.valueOf(),-0)?e=\"-0\":e=String(e)),bc(e))return!1;if(t?.[e]===void 0)return!0;try{return delete t[e],!0}catch{return!1}}case\"string\":{if(t?.[e]===void 0&&NE(e))return bae(t,Mu(e));if(bc(e))return!1;try{return delete t[e],!0}catch{return!1}}}}function bae(t,e){let r=va(t,e.slice(0,-1),t),s=e[e.length-1];if(r?.[s]===void 0)return!0;if(bc(s))return!1;try{return delete r[s],!0}catch{return!1}}var x4=Xe(()=>{Ek();wB();mk();yk();LE()});function Pae(t){return t==null}var xae=Xe(()=>{});var kae,Qae=Xe(()=>{w4();kae=(t,e,r)=>{let s=t[e];(!(Object.hasOwn(t,e)&&Ck(s,r))||r===void 0&&!(e in t))&&(t[e]=r)}});function Tae(t,e,r,s){if(t==null&&!C4(t))return t;let a=Sae(e,t)?[e]:Array.isArray(e)?e:typeof e==\"string\"?Mu(e):[e],n=t;for(let c=0;c<a.length&&n!=null;c++){let f=OE(a[c]);if(bc(f))continue;let p;if(c===a.length-1)p=r(n[f]);else{let h=n[f],E=s?.(h,f,t);p=E!==void 0?E:C4(h)?h:Gk(a[c+1])?[]:{}}kae(n,f,p),n=n[f]}return t}var Rae=Xe(()=>{wB();Qae();S4();Dae();yk();Aae();LE()});function Jd(t,e,r){return Tae(t,e,()=>r,()=>{})}var k4=Xe(()=>{Rae()});function Fae(t,e=0,r={}){typeof r!=\"object\"&&(r={});let s=null,a=null,n=null,c=0,f=null,p,{leading:h=!1,trailing:E=!0,maxWait:C}=r,S=\"maxWait\"in r,P=S?Math.max(Number(C)||0,e):0,I=ue=>(s!==null&&(p=t.apply(a,s)),s=a=null,c=ue,p),R=ue=>(c=ue,f=setTimeout(ee,e),h&&s!==null?I(ue):p),N=ue=>(f=null,E&&s!==null?I(ue):p),U=ue=>{if(n===null)return!0;let le=ue-n,me=le>=e||le<0,pe=S&&ue-c>=P;return me||pe},W=ue=>{let le=n===null?0:ue-n,me=e-le,pe=P-(ue-c);return S?Math.min(me,pe):me},ee=()=>{let ue=Date.now();if(U(ue))return N(ue);f=setTimeout(ee,W(ue))},ie=function(...ue){let le=Date.now(),me=U(le);if(s=ue,a=this,n=le,me){if(f===null)return R(le);if(S)return clearTimeout(f),f=setTimeout(ee,e),I(le)}return f===null&&(f=setTimeout(ee,e)),p};return ie.cancel=()=>{f!==null&&clearTimeout(f),c=0,n=s=a=f=null},ie.flush=()=>f===null?p:N(Date.now()),ie}var Nae=Xe(()=>{});function Q4(t,e=0,r={}){let{leading:s=!0,trailing:a=!0}=r;return Fae(t,e,{leading:s,maxWait:e,trailing:a})}var Oae=Xe(()=>{Nae()});function T4(t){if(t==null)return\"\";if(typeof t==\"string\")return t;if(Array.isArray(t))return t.map(T4).join(\",\");let e=String(t);return e===\"0\"&&Object.is(Number(t),-0)?\"-0\":e}var Lae=Xe(()=>{});function R4(t){if(!t||typeof t!=\"object\")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)===\"[object Object]\":!1}var Mae=Xe(()=>{});function Uae(t,e,r){return SB(t,e,void 0,void 0,void 0,void 0,r)}function SB(t,e,r,s,a,n,c){let f=c(t,e,r,s,a,n);if(f!==void 0)return f;if(typeof t==typeof e)switch(typeof t){case\"bigint\":case\"string\":case\"boolean\":case\"symbol\":case\"undefined\":return t===e;case\"number\":return t===e||Object.is(t,e);case\"function\":return t===e;case\"object\":return DB(t,e,n,c)}return DB(t,e,n,c)}function DB(t,e,r,s){if(Object.is(t,e))return!0;let a=Yd(t),n=Yd(e);if(a===Vd&&(a=jE),n===Vd&&(n=jE),a!==n)return!1;switch(a){case UE:return t.toString()===e.toString();case _E:{let p=t.valueOf(),h=e.valueOf();return Ck(p,h)}case HE:case Dk:case Sk:return Object.is(t.valueOf(),e.valueOf());case vk:return t.source===e.source&&t.flags===e.flags;case pae:return t===e}r=r??new Map;let c=r.get(t),f=r.get(e);if(c!=null&&f!=null)return c===e;r.set(t,e),r.set(e,t);try{switch(a){case bk:{if(t.size!==e.size)return!1;for(let[p,h]of t.entries())if(!e.has(p)||!SB(h,e.get(p),p,t,e,r,s))return!1;return!0}case Pk:{if(t.size!==e.size)return!1;let p=Array.from(t.values()),h=Array.from(e.values());for(let E=0;E<p.length;E++){let C=p[E],S=h.findIndex(P=>SB(C,P,void 0,t,e,r,s));if(S===-1)return!1;h.splice(S,1)}return!0}case xk:case Tk:case Rk:case Fk:case Nk:case gae:case Ok:case Lk:case Mk:case dae:case Uk:case _k:{if(typeof Buffer<\"u\"&&Buffer.isBuffer(t)!==Buffer.isBuffer(e)||t.length!==e.length)return!1;for(let p=0;p<t.length;p++)if(!SB(t[p],e[p],p,t,e,r,s))return!1;return!0}case kk:return t.byteLength!==e.byteLength?!1:DB(new Uint8Array(t),new Uint8Array(e),r,s);case Qk:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:DB(new Uint8Array(t),new Uint8Array(e),r,s);case hae:return t.name===e.name&&t.message===e.message;case jE:{if(!(DB(t.constructor,e.constructor,r,s)||R4(t)&&R4(e)))return!1;let h=[...Object.keys(t),...Wd(t)],E=[...Object.keys(e),...Wd(e)];if(h.length!==E.length)return!1;for(let C=0;C<h.length;C++){let S=h[C],P=t[S];if(!Object.hasOwn(e,S))return!1;let I=e[S];if(!SB(P,I,S,t,e,r,s))return!1}return!0}default:return!1}}finally{r.delete(t),r.delete(e)}}var _ae=Xe(()=>{Mae();wk();Bk();Hk();w4()});function Hae(){}var jae=Xe(()=>{});function F4(t,e){return Uae(t,e,Hae)}var Gae=Xe(()=>{_ae();jae()});function qae(t){return GE(t)}var Wae=Xe(()=>{jk()});function Yae(t){if(typeof t!=\"object\"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!==\"[object Object]\"){let r=t[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable?!1:t.toString()===`[object ${r}]`}let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var Vae=Xe(()=>{});function Jae(t){if(ME(t))return t;if(Array.isArray(t)||GE(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<\"u\"&&t instanceof SharedArrayBuffer)return t.slice(0);let e=Object.getPrototypeOf(t),r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){let s=new r(t);return s.lastIndex=t.lastIndex,s}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let s=new r(t.message);return s.stack=t.stack,s.name=t.name,s.cause=t.cause,s}if(typeof File<\"u\"&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t==\"object\"){let s=Object.create(e);return Object.assign(s,t)}return t}var Kae=Xe(()=>{Ik();jk()});function N4(t,...e){let r=e.slice(0,-1),s=e[e.length-1],a=t;for(let n=0;n<r.length;n++){let c=r[n];a=qk(a,c,s,new Map)}return a}function qk(t,e,r,s){if(ME(t)&&(t=Object(t)),e==null||typeof e!=\"object\")return t;if(s.has(e))return Jae(s.get(e));if(s.set(e,t),Array.isArray(e)){e=e.slice();for(let n=0;n<e.length;n++)e[n]=e[n]??void 0}let a=[...Object.keys(e),...Wd(e)];for(let n=0;n<a.length;n++){let c=a[n];if(bc(c))continue;let f=e[c],p=t[c];if(BB(f)&&(f={...f}),BB(p)&&(p={...p}),typeof Buffer<\"u\"&&Buffer.isBuffer(f)&&(f=f0(f)),Array.isArray(f))if(typeof p==\"object\"&&p!=null){let E=[],C=Reflect.ownKeys(p);for(let S=0;S<C.length;S++){let P=C[S];E[P]=p[P]}p=E}else p=[];let h=r(p,f,c,t,e,s);h!=null?t[c]=h:Array.isArray(f)||P4(p)&&P4(f)?t[c]=qk(p,f,r,s):p==null&&Yae(f)?t[c]=qk({},f,r,s):p==null&&qae(f)?t[c]=f0(f):(p===void 0||f!==void 0)&&(t[c]=f)}return t}var zae=Xe(()=>{v4();wB();Kae();Ik();wk();D4();wae();Vae();Wae()});function O4(t,...e){if(t==null)return{};let r=yae(t);for(let s=0;s<e.length;s++){let a=e[s];switch(typeof a){case\"object\":{Array.isArray(a)||(a=Array.from(a));for(let n=0;n<a.length;n++){let c=a[n];A0(r,c)}break}case\"string\":case\"symbol\":case\"number\":{A0(r,a);break}}}return r}var Xae=Xe(()=>{x4();Eae()});function Kd(t,...e){if(Pae(t))return{};let r={};for(let s=0;s<e.length;s++){let a=e[s];switch(typeof a){case\"object\":{Array.isArray(a)||(uae(a)?a=Array.from(a):a=[a]);break}case\"string\":case\"symbol\":case\"number\":{a=[a];break}}for(let n of a){let c=va(t,n);c===void 0&&!vB(t,n)||(typeof n==\"string\"&&Object.hasOwn(t,n)?r[n]=c:Jd(r,n,c))}}return r}var Zae=Xe(()=>{Ek();b4();k4();fae();xae()});function $ae(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}var ele=Xe(()=>{});function bB(t){return $ae(T4(t))}var tle=Xe(()=>{ele();Lae()});var ql=Xe(()=>{Oae();Gae();v4();Ek();b4();zae();Xae();Zae();k4();x4();tle();LE()});var je={};Vt(je,{AsyncActions:()=>U4,BufferStream:()=>M4,CachingStrategy:()=>fle,DefaultStream:()=>_4,allSettledSafe:()=>Uu,assertNever:()=>G4,bufferStream:()=>WE,buildIgnorePattern:()=>Uze,convertMapsToIndexableObjects:()=>Yk,dynamicRequire:()=>Pp,escapeRegExp:()=>Fze,getArrayWithDefault:()=>xB,getFactoryWithDefault:()=>Yl,getMapWithDefault:()=>q4,getSetWithDefault:()=>bp,groupBy:()=>jze,isIndexableObject:()=>L4,isPathLike:()=>_ze,isTaggedYarnVersion:()=>Rze,makeDeferred:()=>lle,mapAndFilter:()=>Wl,mapAndFind:()=>p0,mergeIntoTarget:()=>ple,overrideType:()=>Nze,parseBoolean:()=>kB,parseDuration:()=>Jk,parseInt:()=>YE,parseOptionalBoolean:()=>Ale,plural:()=>Wk,prettifyAsyncErrors:()=>qE,prettifySyncErrors:()=>W4,releaseAfterUseAsync:()=>Lze,replaceEnvVariables:()=>Vk,sortMap:()=>qs,toMerged:()=>Hze,tryParseOptionalBoolean:()=>Y4,validateEnum:()=>Oze});function Rze(t){return!!(sle.default.valid(t)&&t.match(/^[^-]+(-rc\\.[0-9]+)?$/))}function Wk(t,{one:e,more:r,zero:s=r}){return t===0?s:t===1?e:r}function Fze(t){return t.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function Nze(t){}function G4(t){throw new Error(`Assertion failed: Unexpected object '${t}'`)}function Oze(t,e){let r=Object.values(t);if(!r.includes(e))throw new nt(`Invalid value for enumeration: ${JSON.stringify(e)} (expected one of ${r.map(s=>JSON.stringify(s)).join(\", \")})`);return e}function Wl(t,e){let r=[];for(let s of t){let a=e(s);a!==ole&&r.push(a)}return r}function p0(t,e){for(let r of t){let s=e(r);if(s!==ale)return s}}function L4(t){return typeof t==\"object\"&&t!==null}async function Uu(t){let e=await Promise.allSettled(t),r=[];for(let s of e){if(s.status===\"rejected\")throw s.reason;r.push(s.value)}return r}function Yk(t){if(t instanceof Map&&(t=Object.fromEntries(t)),L4(t))for(let e of Object.keys(t)){let r=t[e];L4(r)&&(t[e]=Yk(r))}return t}function Yl(t,e,r){let s=t.get(e);return typeof s>\"u\"&&t.set(e,s=r()),s}function xB(t,e){let r=t.get(e);return typeof r>\"u\"&&t.set(e,r=[]),r}function bp(t,e){let r=t.get(e);return typeof r>\"u\"&&t.set(e,r=new Set),r}function q4(t,e){let r=t.get(e);return typeof r>\"u\"&&t.set(e,r=new Map),r}async function Lze(t,e){if(e==null)return await t();try{return await t()}finally{await e()}}async function qE(t,e){try{return await t()}catch(r){throw r.message=e(r.message),r}}function W4(t,e){try{return t()}catch(r){throw r.message=e(r.message),r}}async function WE(t){return await new Promise((e,r)=>{let s=[];t.on(\"error\",a=>{r(a)}),t.on(\"data\",a=>{s.push(a)}),t.on(\"end\",()=>{e(Buffer.concat(s))})})}function lle(){let t,e;return{promise:new Promise((s,a)=>{t=s,e=a}),resolve:t,reject:e}}function cle(t){return PB(fe.fromPortablePath(t))}function ule(path){let physicalPath=fe.fromPortablePath(path),currentCacheEntry=PB.cache[physicalPath];delete PB.cache[physicalPath];let result;try{result=cle(physicalPath);let freshCacheEntry=PB.cache[physicalPath],dynamicModule=eval(\"module\"),freshCacheIndex=dynamicModule.children.indexOf(freshCacheEntry);freshCacheIndex!==-1&&dynamicModule.children.splice(freshCacheIndex,1)}finally{PB.cache[physicalPath]=currentCacheEntry}return result}function Mze(t){let e=rle.get(t),r=ce.statSync(t);if(e?.mtime===r.mtimeMs)return e.instance;let s=ule(t);return rle.set(t,{mtime:r.mtimeMs,instance:s}),s}function Pp(t,{cachingStrategy:e=2}={}){switch(e){case 0:return ule(t);case 1:return Mze(t);case 2:return cle(t);default:throw new Error(\"Unsupported caching strategy\")}}function qs(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]<f[c]?-1:f[n]>f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function Uze(t){return t.length===0?null:t.map(e=>`(${nle.default.makeRe(e,{windows:!1,dot:!0}).source})`).join(\"|\")}function Vk(t,{env:e}){let r=/\\\\?\\${(?<variableName>[\\d\\w_]+)(?<colon>:)?(?:-(?<fallback>[^}]*))?}/g;return t.replace(r,(s,...a)=>{if(s.startsWith(\"\\\\\"))return s.slice(1);let{variableName:n,colon:c,fallback:f}=a[a.length-1],p=Object.hasOwn(e,n),h=e[n];if(h||p&&!c)return h;if(f!=null)return f;throw new nt(`Environment variable not found (${n})`)})}function kB(t){switch(t){case\"true\":case\"1\":case 1:case!0:return!0;case\"false\":case\"0\":case 0:case!1:return!1;default:throw new Error(`Couldn't parse \"${t}\" as a boolean`)}}function Ale(t){return typeof t>\"u\"?t:kB(t)}function Y4(t){try{return Ale(t)}catch{return null}}function _ze(t){return!!(fe.isAbsolute(t)||t.match(/^(\\.{1,2}|~)\\//))}function ple(t,...e){let r=c=>({value:c}),s=r(t),a=e.map(c=>r(c)),{value:n}=N4(s,...a,(c,f)=>{if(Array.isArray(c)&&Array.isArray(f)){for(let p of f)c.find(h=>F4(h,p))||c.push(p);return c}});return n}function Hze(...t){return ple({},...t)}function jze(t,e){let r=Object.create(null);for(let s of t){let a=s[e];r[a]??=[],r[a].push(s)}return r}function YE(t){return typeof t==\"string\"?Number.parseInt(t,10):t}function Jk(t,e){let r=Gze.exec(t)?.groups;if(!r)throw new Error(`Couldn't parse \"${t}\" as a duration`);if(r.unit===void 0)return parseFloat(r.num);let s=H4[r.unit];if(!s)throw new Error(`Invalid duration unit \"${r.unit}\"`);return parseFloat(r.num)*s/H4[e]}var nle,ile,sle,j4,ole,ale,M4,U4,_4,PB,rle,fle,H4,Gze,Pc=Xe(()=>{Dt();Yt();ql();nle=ut(Go()),ile=ut(Ld()),sle=ut(Ai()),j4=Ie(\"stream\");ole=Symbol();Wl.skip=ole;ale=Symbol();p0.skip=ale;M4=class extends j4.Transform{constructor(){super(...arguments);this.chunks=[]}_transform(r,s,a){if(s!==\"buffer\"||!Buffer.isBuffer(r))throw new Error(\"Assertion failed: BufferStream only accept buffers\");this.chunks.push(r),a(null,null)}_flush(r){r(null,Buffer.concat(this.chunks))}};U4=class{constructor(e){this.deferred=new Map;this.promises=new Map;this.limit=(0,ile.default)(e)}set(e,r){let s=this.deferred.get(e);typeof s>\"u\"&&this.deferred.set(e,s=lle());let a=this.limit(()=>r());return this.promises.set(e,a),a.then(()=>{this.promises.get(e)===a&&s.resolve()},n=>{this.promises.get(e)===a&&s.reject(n)}),s.promise}reduce(e,r){let s=this.promises.get(e)??Promise.resolve();this.set(e,()=>r(s))}async wait(){await Promise.all(this.promises.values())}},_4=class extends j4.Transform{constructor(r=Buffer.alloc(0)){super();this.active=!0;this.ifEmpty=r}_transform(r,s,a){if(s!==\"buffer\"||!Buffer.isBuffer(r))throw new Error(\"Assertion failed: DefaultStream only accept buffers\");this.active=!1,a(null,r)}_flush(r){this.active&&this.ifEmpty.length>0?r(null,this.ifEmpty):r(null)}},PB=eval(\"require\");rle=new Map;fle=(s=>(s[s.NoCache=0]=\"NoCache\",s[s.FsTime=1]=\"FsTime\",s[s.Node=2]=\"Node\",s))(fle||{});H4={ms:1,s:1e3,m:60*1e3,h:60*60*1e3,d:24*60*60*1e3,w:7*24*60*60*1e3},Gze=new RegExp(`^(?<num>\\\\d*\\\\.?\\\\d+)(?<unit>${Object.keys(H4).join(\"|\")})?$`)});var VE,V4,J4,hle=Xe(()=>{VE=(r=>(r.HARD=\"HARD\",r.SOFT=\"SOFT\",r))(VE||{}),V4=(s=>(s.Dependency=\"Dependency\",s.PeerDependency=\"PeerDependency\",s.PeerDependencyMeta=\"PeerDependencyMeta\",s))(V4||{}),J4=(s=>(s.Inactive=\"inactive\",s.Redundant=\"redundant\",s.Active=\"active\",s))(J4||{})});var he={};Vt(he,{LogLevel:()=>eQ,Style:()=>Xk,Type:()=>ht,addLogFilterSupport:()=>RB,applyColor:()=>ri,applyHyperlink:()=>KE,applyStyle:()=>zd,json:()=>Xd,jsonOrPretty:()=>Yze,mark:()=>$4,pretty:()=>Ht,prettyField:()=>Kf,prettyList:()=>Z4,prettyTruncatedLocatorList:()=>$k,stripAnsi:()=>JE.default,supportsColor:()=>Zk,supportsHyperlinks:()=>X4,tuple:()=>_u});function gle(t){let e=[\"KiB\",\"MiB\",\"GiB\",\"TiB\"],r=e.length;for(;r>1&&t<1024**r;)r-=1;let s=1024**r;return`${Math.floor(t*100/s)/100} ${e[r-1]}`}function Kk(t,e){if(Array.isArray(e))return e.length===0?ri(t,\"[]\",ht.CODE):ri(t,\"[ \",ht.CODE)+e.map(r=>Kk(t,r)).join(\", \")+ri(t,\" ]\",ht.CODE);if(typeof e==\"string\")return ri(t,JSON.stringify(e),ht.STRING);if(typeof e==\"number\")return ri(t,JSON.stringify(e),ht.NUMBER);if(typeof e==\"boolean\")return ri(t,JSON.stringify(e),ht.BOOLEAN);if(e===null)return ri(t,\"null\",ht.NULL);if(typeof e==\"object\"&&Object.getPrototypeOf(e)===Object.prototype){let r=Object.entries(e);return r.length===0?ri(t,\"{}\",ht.CODE):ri(t,\"{ \",ht.CODE)+r.map(([s,a])=>`${Kk(t,s)}: ${Kk(t,a)}`).join(\", \")+ri(t,\" }\",ht.CODE)}if(typeof e>\"u\")return ri(t,\"undefined\",ht.NULL);throw new Error(\"Assertion failed: The value doesn't seem to be a valid JSON object\")}function _u(t,e){return[e,t]}function zd(t,e,r){return t.get(\"enableColors\")&&r&2&&(e=TB.default.bold(e)),e}function ri(t,e,r){if(!t.get(\"enableColors\"))return e;let s=qze.get(r);if(s===null)return e;let a=typeof s>\"u\"?r:z4.level>=3?s[0]:s[1],n=typeof a==\"number\"?K4.ansi256(a):a.startsWith(\"#\")?K4.hex(a):K4[a];if(typeof n!=\"function\")throw new Error(`Invalid format type ${a}`);return n(e)}function KE(t,e,r){return t.get(\"enableHyperlinks\")?Wze?`\\x1B]8;;${r}\\x1B\\\\${e}\\x1B]8;;\\x1B\\\\`:`\\x1B]8;;${r}\\x07${e}\\x1B]8;;\\x07`:e}function Ht(t,e,r){if(e===null)return ri(t,\"null\",ht.NULL);if(Object.hasOwn(zk,r))return zk[r].pretty(t,e);if(typeof e!=\"string\")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof e}`);return ri(t,e,r)}function Z4(t,e,r,{separator:s=\", \"}={}){return[...e].map(a=>Ht(t,a,r)).join(s)}function Xd(t,e){if(t===null)return null;if(Object.hasOwn(zk,e))return zk[e].json(t);if(typeof t!=\"string\")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof t}`);return t}function Yze(t,e,[r,s]){return t?Xd(r,s):Ht(e,r,s)}function $4(t){return{Check:ri(t,\"\\u2713\",\"green\"),Cross:ri(t,\"\\u2718\",\"red\"),Question:ri(t,\"?\",\"cyan\")}}function Kf(t,{label:e,value:[r,s]}){return`${Ht(t,e,ht.CODE)}: ${Ht(t,r,s)}`}function $k(t,e,r){let s=[],a=[...e],n=r;for(;a.length>0;){let h=a[0],E=`${Yr(t,h)}, `,C=e3(h).length+2;if(s.length>0&&n<C)break;s.push([E,C]),n-=C,a.shift()}if(a.length===0)return s.map(([h])=>h).join(\"\").slice(0,-2);let c=\"X\".repeat(a.length.toString().length),f=`and ${c} more.`,p=a.length;for(;s.length>1&&n<f.length;)n+=s[s.length-1][1],p+=1,s.pop();return[s.map(([h])=>h).join(\"\"),f.replace(c,Ht(t,p,ht.NUMBER))].join(\"\")}function RB(t,{configuration:e}){let r=e.get(\"logFilters\"),s=new Map,a=new Map,n=[];for(let C of r){let S=C.get(\"level\");if(typeof S>\"u\")continue;let P=C.get(\"code\");typeof P<\"u\"&&s.set(P,S);let I=C.get(\"text\");typeof I<\"u\"&&a.set(I,S);let R=C.get(\"pattern\");typeof R<\"u\"&&n.push([dle.default.matcher(R,{contains:!0}),S])}n.reverse();let c=(C,S,P)=>{if(C===null||C===0)return P;let I=a.size>0||n.length>0?(0,JE.default)(S):S;if(a.size>0){let R=a.get(I);if(typeof R<\"u\")return R??P}if(n.length>0){for(let[R,N]of n)if(R(I))return N??P}if(s.size>0){let R=s.get(Yf(C));if(typeof R<\"u\")return R??P}return P},f=t.reportInfo,p=t.reportWarning,h=t.reportError,E=function(C,S,P,I){switch(c(S,P,I)){case\"info\":f.call(C,S,P);break;case\"warning\":p.call(C,S??0,P);break;case\"error\":h.call(C,S??0,P);break}};t.reportInfo=function(...C){return E(this,...C,\"info\")},t.reportWarning=function(...C){return E(this,...C,\"warning\")},t.reportError=function(...C){return E(this,...C,\"error\")}}var TB,QB,dle,JE,ht,Xk,z4,Zk,X4,K4,qze,qo,zk,Wze,eQ,xc=Xe(()=>{Dt();TB=ut(TE()),QB=ut(Fd());Yt();dle=ut(Go()),JE=ut(dk());Gx();Wo();ht={NO_HINT:\"NO_HINT\",ID:\"ID\",NULL:\"NULL\",SCOPE:\"SCOPE\",NAME:\"NAME\",RANGE:\"RANGE\",REFERENCE:\"REFERENCE\",NUMBER:\"NUMBER\",STRING:\"STRING\",BOOLEAN:\"BOOLEAN\",PATH:\"PATH\",URL:\"URL\",ADDED:\"ADDED\",REMOVED:\"REMOVED\",CODE:\"CODE\",INSPECT:\"INSPECT\",DURATION:\"DURATION\",SIZE:\"SIZE\",SIZE_DIFF:\"SIZE_DIFF\",IDENT:\"IDENT\",DESCRIPTOR:\"DESCRIPTOR\",LOCATOR:\"LOCATOR\",RESOLUTION:\"RESOLUTION\",DEPENDENT:\"DEPENDENT\",PACKAGE_EXTENSION:\"PACKAGE_EXTENSION\",SETTING:\"SETTING\",MARKDOWN:\"MARKDOWN\",MARKDOWN_INLINE:\"MARKDOWN_INLINE\"},Xk=(e=>(e[e.BOLD=2]=\"BOLD\",e))(Xk||{}),z4=QB.default.GITHUB_ACTIONS?{level:2}:TB.default.supportsColor?{level:TB.default.supportsColor.level}:{level:0},Zk=z4.level!==0,X4=Zk&&!QB.default.GITHUB_ACTIONS&&!QB.default.CIRCLE&&!QB.default.GITLAB,K4=new TB.default.Instance(z4),qze=new Map([[ht.NO_HINT,null],[ht.NULL,[\"#a853b5\",129]],[ht.SCOPE,[\"#d75f00\",166]],[ht.NAME,[\"#d7875f\",173]],[ht.RANGE,[\"#00afaf\",37]],[ht.REFERENCE,[\"#87afff\",111]],[ht.NUMBER,[\"#ffd700\",220]],[ht.STRING,[\"#b4bd68\",32]],[ht.BOOLEAN,[\"#faa023\",209]],[ht.PATH,[\"#d75fd7\",170]],[ht.URL,[\"#d75fd7\",170]],[ht.ADDED,[\"#5faf00\",70]],[ht.REMOVED,[\"#ff3131\",160]],[ht.CODE,[\"#87afff\",111]],[ht.SIZE,[\"#ffd700\",220]]]),qo=t=>t;zk={[ht.ID]:qo({pretty:(t,e)=>typeof e==\"number\"?ri(t,`${e}`,ht.NUMBER):ri(t,e,ht.CODE),json:t=>t}),[ht.INSPECT]:qo({pretty:(t,e)=>Kk(t,e),json:t=>t}),[ht.NUMBER]:qo({pretty:(t,e)=>ri(t,`${e}`,ht.NUMBER),json:t=>t}),[ht.IDENT]:qo({pretty:(t,e)=>$i(t,e),json:t=>un(t)}),[ht.LOCATOR]:qo({pretty:(t,e)=>Yr(t,e),json:t=>ll(t)}),[ht.DESCRIPTOR]:qo({pretty:(t,e)=>ni(t,e),json:t=>al(t)}),[ht.RESOLUTION]:qo({pretty:(t,{descriptor:e,locator:r})=>FB(t,e,r),json:({descriptor:t,locator:e})=>({descriptor:al(t),locator:e!==null?ll(e):null})}),[ht.DEPENDENT]:qo({pretty:(t,{locator:e,descriptor:r})=>t3(t,e,r),json:({locator:t,descriptor:e})=>({locator:ll(t),descriptor:al(e)})}),[ht.PACKAGE_EXTENSION]:qo({pretty:(t,e)=>{switch(e.type){case\"Dependency\":return`${$i(t,e.parentDescriptor)} \\u27A4 ${ri(t,\"dependencies\",ht.CODE)} \\u27A4 ${$i(t,e.descriptor)}`;case\"PeerDependency\":return`${$i(t,e.parentDescriptor)} \\u27A4 ${ri(t,\"peerDependencies\",ht.CODE)} \\u27A4 ${$i(t,e.descriptor)}`;case\"PeerDependencyMeta\":return`${$i(t,e.parentDescriptor)} \\u27A4 ${ri(t,\"peerDependenciesMeta\",ht.CODE)} \\u27A4 ${$i(t,Sa(e.selector))} \\u27A4 ${ri(t,e.key,ht.CODE)}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${e.type}`)}},json:t=>{switch(t.type){case\"Dependency\":return`${un(t.parentDescriptor)} > ${un(t.descriptor)}`;case\"PeerDependency\":return`${un(t.parentDescriptor)} >> ${un(t.descriptor)}`;case\"PeerDependencyMeta\":return`${un(t.parentDescriptor)} >> ${t.selector} / ${t.key}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${t.type}`)}}}),[ht.SETTING]:qo({pretty:(t,e)=>(t.get(e),KE(t,ri(t,e,ht.CODE),`https://yarnpkg.com/configuration/yarnrc#${e}`)),json:t=>t}),[ht.DURATION]:qo({pretty:(t,e)=>{if(e>1e3*60){let r=Math.floor(e/1e3/60),s=Math.ceil((e-r*60*1e3)/1e3);return s===0?`${r}m`:`${r}m ${s}s`}else{let r=Math.floor(e/1e3),s=e-r*1e3;return s===0?`${r}s`:`${r}s ${s}ms`}},json:t=>t}),[ht.SIZE]:qo({pretty:(t,e)=>ri(t,gle(e),ht.NUMBER),json:t=>t}),[ht.SIZE_DIFF]:qo({pretty:(t,e)=>{let r=e>=0?\"+\":\"-\",s=r===\"+\"?ht.REMOVED:ht.ADDED;return ri(t,`${r} ${gle(Math.max(Math.abs(e),1))}`,s)},json:t=>t}),[ht.PATH]:qo({pretty:(t,e)=>ri(t,fe.fromPortablePath(e),ht.PATH),json:t=>fe.fromPortablePath(t)}),[ht.MARKDOWN]:qo({pretty:(t,{text:e,format:r,paragraphs:s})=>Ho(e,{format:r,paragraphs:s}),json:({text:t})=>t}),[ht.MARKDOWN_INLINE]:qo({pretty:(t,e)=>(e=e.replace(/(`+)((?:.|[\\n])*?)\\1/g,(r,s,a)=>Ht(t,s+a+s,ht.CODE)),e=e.replace(/(\\*\\*)((?:.|[\\n])*?)\\1/g,(r,s,a)=>zd(t,a,2)),e),json:t=>t})};Wze=!!process.env.KONSOLE_VERSION;eQ=(a=>(a.Error=\"error\",a.Warning=\"warning\",a.Info=\"info\",a.Discard=\"discard\",a))(eQ||{})});var mle=_(zE=>{\"use strict\";Object.defineProperty(zE,\"__esModule\",{value:!0});zE.splitWhen=zE.flatten=void 0;function Vze(t){return t.reduce((e,r)=>[].concat(e,r),[])}zE.flatten=Vze;function Jze(t,e){let r=[[]],s=0;for(let a of t)e(a)?(s++,r[s]=[]):r[s].push(a);return r}zE.splitWhen=Jze});var yle=_(tQ=>{\"use strict\";Object.defineProperty(tQ,\"__esModule\",{value:!0});tQ.isEnoentCodeError=void 0;function Kze(t){return t.code===\"ENOENT\"}tQ.isEnoentCodeError=Kze});var Ele=_(rQ=>{\"use strict\";Object.defineProperty(rQ,\"__esModule\",{value:!0});rQ.createDirentFromStats=void 0;var r3=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function zze(t,e){return new r3(t,e)}rQ.createDirentFromStats=zze});var Ble=_(cs=>{\"use strict\";Object.defineProperty(cs,\"__esModule\",{value:!0});cs.convertPosixPathToPattern=cs.convertWindowsPathToPattern=cs.convertPathToPattern=cs.escapePosixPath=cs.escapeWindowsPath=cs.escape=cs.removeLeadingDotSegment=cs.makeAbsolute=cs.unixify=void 0;var Xze=Ie(\"os\"),Zze=Ie(\"path\"),Ile=Xze.platform()===\"win32\",$ze=2,eXe=/(\\\\?)([()*?[\\]{|}]|^!|[!+@](?=\\()|\\\\(?![!()*+?@[\\]{|}]))/g,tXe=/(\\\\?)([()[\\]{}]|^!|[!+@](?=\\())/g,rXe=/^\\\\\\\\([.?])/,nXe=/\\\\(?![!()+@[\\]{}])/g;function iXe(t){return t.replace(/\\\\/g,\"/\")}cs.unixify=iXe;function sXe(t,e){return Zze.resolve(t,e)}cs.makeAbsolute=sXe;function oXe(t){if(t.charAt(0)===\".\"){let e=t.charAt(1);if(e===\"/\"||e===\"\\\\\")return t.slice($ze)}return t}cs.removeLeadingDotSegment=oXe;cs.escape=Ile?n3:i3;function n3(t){return t.replace(tXe,\"\\\\$2\")}cs.escapeWindowsPath=n3;function i3(t){return t.replace(eXe,\"\\\\$2\")}cs.escapePosixPath=i3;cs.convertPathToPattern=Ile?Cle:wle;function Cle(t){return n3(t).replace(rXe,\"//$1\").replace(nXe,\"/\")}cs.convertWindowsPathToPattern=Cle;function wle(t){return i3(t)}cs.convertPosixPathToPattern=wle});var Sle=_((JOt,vle)=>{vle.exports=function(e){if(typeof e!=\"string\"||e===\"\")return!1;for(var r;r=/(\\\\).|([@?!+*]\\(.*\\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var Ple=_((KOt,ble)=>{var aXe=Sle(),Dle={\"{\":\"}\",\"(\":\")\",\"[\":\"]\"},lXe=function(t){if(t[0]===\"!\")return!0;for(var e=0,r=-2,s=-2,a=-2,n=-2,c=-2;e<t.length;){if(t[e]===\"*\"||t[e+1]===\"?\"&&/[\\].+)]/.test(t[e])||s!==-1&&t[e]===\"[\"&&t[e+1]!==\"]\"&&(s<e&&(s=t.indexOf(\"]\",e)),s>e&&(c===-1||c>s||(c=t.indexOf(\"\\\\\",e),c===-1||c>s)))||a!==-1&&t[e]===\"{\"&&t[e+1]!==\"}\"&&(a=t.indexOf(\"}\",e),a>e&&(c=t.indexOf(\"\\\\\",e),c===-1||c>a))||n!==-1&&t[e]===\"(\"&&t[e+1]===\"?\"&&/[:!=]/.test(t[e+2])&&t[e+3]!==\")\"&&(n=t.indexOf(\")\",e),n>e&&(c=t.indexOf(\"\\\\\",e),c===-1||c>n))||r!==-1&&t[e]===\"(\"&&t[e+1]!==\"|\"&&(r<e&&(r=t.indexOf(\"|\",e)),r!==-1&&t[r+1]!==\")\"&&(n=t.indexOf(\")\",r),n>r&&(c=t.indexOf(\"\\\\\",r),c===-1||c>n))))return!0;if(t[e]===\"\\\\\"){var f=t[e+1];e+=2;var p=Dle[f];if(p){var h=t.indexOf(p,e);h!==-1&&(e=h+1)}if(t[e]===\"!\")return!0}else e++}return!1},cXe=function(t){if(t[0]===\"!\")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\\]]/.test(t[e]))return!0;if(t[e]===\"\\\\\"){var r=t[e+1];e+=2;var s=Dle[r];if(s){var a=t.indexOf(s,e);a!==-1&&(e=a+1)}if(t[e]===\"!\")return!0}else e++}return!1};ble.exports=function(e,r){if(typeof e!=\"string\"||e===\"\")return!1;if(aXe(e))return!0;var s=lXe;return r&&r.strict===!1&&(s=cXe),s(e)}});var kle=_((zOt,xle)=>{\"use strict\";var uXe=Ple(),fXe=Ie(\"path\").posix.dirname,AXe=Ie(\"os\").platform()===\"win32\",s3=\"/\",pXe=/\\\\/g,hXe=/[\\{\\[].*[\\}\\]]$/,gXe=/(^|[^\\\\])([\\{\\[]|\\([^\\)]+$)/,dXe=/\\\\([\\!\\*\\?\\|\\[\\]\\(\\)\\{\\}])/g;xle.exports=function(e,r){var s=Object.assign({flipBackslashes:!0},r);s.flipBackslashes&&AXe&&e.indexOf(s3)<0&&(e=e.replace(pXe,s3)),hXe.test(e)&&(e+=s3),e+=\"a\";do e=fXe(e);while(uXe(e)||gXe.test(e));return e.replace(dXe,\"$1\")}});var Mle=_(jr=>{\"use strict\";Object.defineProperty(jr,\"__esModule\",{value:!0});jr.removeDuplicateSlashes=jr.matchAny=jr.convertPatternsToRe=jr.makeRe=jr.getPatternParts=jr.expandBraceExpansion=jr.expandPatternsWithBraceExpansion=jr.isAffectDepthOfReadingPattern=jr.endsWithSlashGlobStar=jr.hasGlobStar=jr.getBaseDirectory=jr.isPatternRelatedToParentDirectory=jr.getPatternsOutsideCurrentDirectory=jr.getPatternsInsideCurrentDirectory=jr.getPositivePatterns=jr.getNegativePatterns=jr.isPositivePattern=jr.isNegativePattern=jr.convertToNegativePattern=jr.convertToPositivePattern=jr.isDynamicPattern=jr.isStaticPattern=void 0;var mXe=Ie(\"path\"),yXe=kle(),o3=Go(),Qle=\"**\",EXe=\"\\\\\",IXe=/[*?]|^!/,CXe=/\\[[^[]*]/,wXe=/(?:^|[^!*+?@])\\([^(]*\\|[^|]*\\)/,BXe=/[!*+?@]\\([^(]*\\)/,vXe=/,|\\.\\./,SXe=/(?!^)\\/{2,}/g;function Tle(t,e={}){return!Rle(t,e)}jr.isStaticPattern=Tle;function Rle(t,e={}){return t===\"\"?!1:!!(e.caseSensitiveMatch===!1||t.includes(EXe)||IXe.test(t)||CXe.test(t)||wXe.test(t)||e.extglob!==!1&&BXe.test(t)||e.braceExpansion!==!1&&DXe(t))}jr.isDynamicPattern=Rle;function DXe(t){let e=t.indexOf(\"{\");if(e===-1)return!1;let r=t.indexOf(\"}\",e+1);if(r===-1)return!1;let s=t.slice(e,r);return vXe.test(s)}function bXe(t){return nQ(t)?t.slice(1):t}jr.convertToPositivePattern=bXe;function PXe(t){return\"!\"+t}jr.convertToNegativePattern=PXe;function nQ(t){return t.startsWith(\"!\")&&t[1]!==\"(\"}jr.isNegativePattern=nQ;function Fle(t){return!nQ(t)}jr.isPositivePattern=Fle;function xXe(t){return t.filter(nQ)}jr.getNegativePatterns=xXe;function kXe(t){return t.filter(Fle)}jr.getPositivePatterns=kXe;function QXe(t){return t.filter(e=>!a3(e))}jr.getPatternsInsideCurrentDirectory=QXe;function TXe(t){return t.filter(a3)}jr.getPatternsOutsideCurrentDirectory=TXe;function a3(t){return t.startsWith(\"..\")||t.startsWith(\"./..\")}jr.isPatternRelatedToParentDirectory=a3;function RXe(t){return yXe(t,{flipBackslashes:!1})}jr.getBaseDirectory=RXe;function FXe(t){return t.includes(Qle)}jr.hasGlobStar=FXe;function Nle(t){return t.endsWith(\"/\"+Qle)}jr.endsWithSlashGlobStar=Nle;function NXe(t){let e=mXe.basename(t);return Nle(t)||Tle(e)}jr.isAffectDepthOfReadingPattern=NXe;function OXe(t){return t.reduce((e,r)=>e.concat(Ole(r)),[])}jr.expandPatternsWithBraceExpansion=OXe;function Ole(t){let e=o3.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,s)=>r.length-s.length),e.filter(r=>r!==\"\")}jr.expandBraceExpansion=Ole;function LXe(t,e){let{parts:r}=o3.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith(\"/\")&&(r[0]=r[0].slice(1),r.unshift(\"\")),r}jr.getPatternParts=LXe;function Lle(t,e){return o3.makeRe(t,e)}jr.makeRe=Lle;function MXe(t,e){return t.map(r=>Lle(r,e))}jr.convertPatternsToRe=MXe;function UXe(t,e){return e.some(r=>r.test(t))}jr.matchAny=UXe;function _Xe(t){return t.replace(SXe,\"/\")}jr.removeDuplicateSlashes=_Xe});var jle=_((ZOt,Hle)=>{\"use strict\";var HXe=Ie(\"stream\"),Ule=HXe.PassThrough,jXe=Array.prototype.slice;Hle.exports=GXe;function GXe(){let t=[],e=jXe.call(arguments),r=!1,s=e[e.length-1];s&&!Array.isArray(s)&&s.pipe==null?e.pop():s={};let a=s.end!==!1,n=s.pipeError===!0;s.objectMode==null&&(s.objectMode=!0),s.highWaterMark==null&&(s.highWaterMark=64*1024);let c=Ule(s);function f(){for(let E=0,C=arguments.length;E<C;E++)t.push(_le(arguments[E],s));return p(),this}function p(){if(r)return;r=!0;let E=t.shift();if(!E){process.nextTick(h);return}Array.isArray(E)||(E=[E]);let C=E.length+1;function S(){--C>0||(r=!1,p())}function P(I){function R(){I.removeListener(\"merge2UnpipeEnd\",R),I.removeListener(\"end\",R),n&&I.removeListener(\"error\",N),S()}function N(U){c.emit(\"error\",U)}if(I._readableState.endEmitted)return S();I.on(\"merge2UnpipeEnd\",R),I.on(\"end\",R),n&&I.on(\"error\",N),I.pipe(c,{end:!1}),I.resume()}for(let I=0;I<E.length;I++)P(E[I]);S()}function h(){r=!1,c.emit(\"queueDrain\"),a&&c.end()}return c.setMaxListeners(0),c.add=f,c.on(\"unpipe\",function(E){E.emit(\"merge2UnpipeEnd\")}),e.length&&f.apply(null,e),c}function _le(t,e){if(Array.isArray(t))for(let r=0,s=t.length;r<s;r++)t[r]=_le(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(Ule(e))),!t._readableState||!t.pause||!t.pipe)throw new Error(\"Only readable stream can be merged.\");t.pause()}return t}});var qle=_(iQ=>{\"use strict\";Object.defineProperty(iQ,\"__esModule\",{value:!0});iQ.merge=void 0;var qXe=jle();function WXe(t){let e=qXe(t);return t.forEach(r=>{r.once(\"error\",s=>e.emit(\"error\",s))}),e.once(\"close\",()=>Gle(t)),e.once(\"end\",()=>Gle(t)),e}iQ.merge=WXe;function Gle(t){t.forEach(e=>e.emit(\"close\"))}});var Wle=_(XE=>{\"use strict\";Object.defineProperty(XE,\"__esModule\",{value:!0});XE.isEmpty=XE.isString=void 0;function YXe(t){return typeof t==\"string\"}XE.isString=YXe;function VXe(t){return t===\"\"}XE.isEmpty=VXe});var xp=_(Yo=>{\"use strict\";Object.defineProperty(Yo,\"__esModule\",{value:!0});Yo.string=Yo.stream=Yo.pattern=Yo.path=Yo.fs=Yo.errno=Yo.array=void 0;var JXe=mle();Yo.array=JXe;var KXe=yle();Yo.errno=KXe;var zXe=Ele();Yo.fs=zXe;var XXe=Ble();Yo.path=XXe;var ZXe=Mle();Yo.pattern=ZXe;var $Xe=qle();Yo.stream=$Xe;var eZe=Wle();Yo.string=eZe});var Kle=_(Vo=>{\"use strict\";Object.defineProperty(Vo,\"__esModule\",{value:!0});Vo.convertPatternGroupToTask=Vo.convertPatternGroupsToTasks=Vo.groupPatternsByBaseDirectory=Vo.getNegativePatternsAsPositive=Vo.getPositivePatterns=Vo.convertPatternsToTasks=Vo.generate=void 0;var Hu=xp();function tZe(t,e){let r=Yle(t,e),s=Yle(e.ignore,e),a=Vle(r),n=Jle(r,s),c=a.filter(E=>Hu.pattern.isStaticPattern(E,e)),f=a.filter(E=>Hu.pattern.isDynamicPattern(E,e)),p=l3(c,n,!1),h=l3(f,n,!0);return p.concat(h)}Vo.generate=tZe;function Yle(t,e){let r=t;return e.braceExpansion&&(r=Hu.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(s=>s.includes(\"/\")?s:`**/${s}`)),r.map(s=>Hu.pattern.removeDuplicateSlashes(s))}function l3(t,e,r){let s=[],a=Hu.pattern.getPatternsOutsideCurrentDirectory(t),n=Hu.pattern.getPatternsInsideCurrentDirectory(t),c=c3(a),f=c3(n);return s.push(...u3(c,e,r)),\".\"in f?s.push(f3(\".\",n,e,r)):s.push(...u3(f,e,r)),s}Vo.convertPatternsToTasks=l3;function Vle(t){return Hu.pattern.getPositivePatterns(t)}Vo.getPositivePatterns=Vle;function Jle(t,e){return Hu.pattern.getNegativePatterns(t).concat(e).map(Hu.pattern.convertToPositivePattern)}Vo.getNegativePatternsAsPositive=Jle;function c3(t){let e={};return t.reduce((r,s)=>{let a=Hu.pattern.getBaseDirectory(s);return a in r?r[a].push(s):r[a]=[s],r},e)}Vo.groupPatternsByBaseDirectory=c3;function u3(t,e,r){return Object.keys(t).map(s=>f3(s,t[s],e,r))}Vo.convertPatternGroupsToTasks=u3;function f3(t,e,r,s){return{dynamic:s,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(Hu.pattern.convertToNegativePattern))}}Vo.convertPatternGroupToTask=f3});var Xle=_(sQ=>{\"use strict\";Object.defineProperty(sQ,\"__esModule\",{value:!0});sQ.read=void 0;function rZe(t,e,r){e.fs.lstat(t,(s,a)=>{if(s!==null){zle(r,s);return}if(!a.isSymbolicLink()||!e.followSymbolicLink){A3(r,a);return}e.fs.stat(t,(n,c)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){zle(r,n);return}A3(r,a);return}e.markSymbolicLink&&(c.isSymbolicLink=()=>!0),A3(r,c)})})}sQ.read=rZe;function zle(t,e){t(e)}function A3(t,e){t(null,e)}});var Zle=_(oQ=>{\"use strict\";Object.defineProperty(oQ,\"__esModule\",{value:!0});oQ.read=void 0;function nZe(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let s=e.fs.statSync(t);return e.markSymbolicLink&&(s.isSymbolicLink=()=>!0),s}catch(s){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw s}}oQ.read=nZe});var $le=_(h0=>{\"use strict\";Object.defineProperty(h0,\"__esModule\",{value:!0});h0.createFileSystemAdapter=h0.FILE_SYSTEM_ADAPTER=void 0;var aQ=Ie(\"fs\");h0.FILE_SYSTEM_ADAPTER={lstat:aQ.lstat,stat:aQ.stat,lstatSync:aQ.lstatSync,statSync:aQ.statSync};function iZe(t){return t===void 0?h0.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},h0.FILE_SYSTEM_ADAPTER),t)}h0.createFileSystemAdapter=iZe});var ece=_(h3=>{\"use strict\";Object.defineProperty(h3,\"__esModule\",{value:!0});var sZe=$le(),p3=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=sZe.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};h3.default=p3});var Zd=_(g0=>{\"use strict\";Object.defineProperty(g0,\"__esModule\",{value:!0});g0.statSync=g0.stat=g0.Settings=void 0;var tce=Xle(),oZe=Zle(),g3=ece();g0.Settings=g3.default;function aZe(t,e,r){if(typeof e==\"function\"){tce.read(t,d3(),e);return}tce.read(t,d3(e),r)}g0.stat=aZe;function lZe(t,e){let r=d3(e);return oZe.read(t,r)}g0.statSync=lZe;function d3(t={}){return t instanceof g3.default?t:new g3.default(t)}});var ice=_((lLt,nce)=>{var rce;nce.exports=typeof queueMicrotask==\"function\"?queueMicrotask.bind(typeof window<\"u\"?window:global):t=>(rce||(rce=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var oce=_((cLt,sce)=>{sce.exports=uZe;var cZe=ice();function uZe(t,e){let r,s,a,n=!0;Array.isArray(t)?(r=[],s=t.length):(a=Object.keys(t),r={},s=a.length);function c(p){function h(){e&&e(p,r),e=null}n?cZe(h):h()}function f(p,h,E){r[p]=E,(--s===0||h)&&c(h)}s?a?a.forEach(function(p){t[p](function(h,E){f(p,h,E)})}):t.forEach(function(p,h){p(function(E,C){f(h,E,C)})}):c(null),n=!1}});var m3=_(cQ=>{\"use strict\";Object.defineProperty(cQ,\"__esModule\",{value:!0});cQ.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var lQ=process.versions.node.split(\".\");if(lQ[0]===void 0||lQ[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var ace=Number.parseInt(lQ[0],10),fZe=Number.parseInt(lQ[1],10),lce=10,AZe=10,pZe=ace>lce,hZe=ace===lce&&fZe>=AZe;cQ.IS_SUPPORT_READDIR_WITH_FILE_TYPES=pZe||hZe});var cce=_(uQ=>{\"use strict\";Object.defineProperty(uQ,\"__esModule\",{value:!0});uQ.createDirentFromStats=void 0;var y3=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function gZe(t,e){return new y3(t,e)}uQ.createDirentFromStats=gZe});var E3=_(fQ=>{\"use strict\";Object.defineProperty(fQ,\"__esModule\",{value:!0});fQ.fs=void 0;var dZe=cce();fQ.fs=dZe});var I3=_(AQ=>{\"use strict\";Object.defineProperty(AQ,\"__esModule\",{value:!0});AQ.joinPathSegments=void 0;function mZe(t,e,r){return t.endsWith(r)?t+e:t+r+e}AQ.joinPathSegments=mZe});var gce=_(d0=>{\"use strict\";Object.defineProperty(d0,\"__esModule\",{value:!0});d0.readdir=d0.readdirWithFileTypes=d0.read=void 0;var yZe=Zd(),uce=oce(),EZe=m3(),fce=E3(),Ace=I3();function IZe(t,e,r){if(!e.stats&&EZe.IS_SUPPORT_READDIR_WITH_FILE_TYPES){pce(t,e,r);return}hce(t,e,r)}d0.read=IZe;function pce(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(s,a)=>{if(s!==null){pQ(r,s);return}let n=a.map(f=>({dirent:f,name:f.name,path:Ace.joinPathSegments(t,f.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){C3(r,n);return}let c=n.map(f=>CZe(f,e));uce(c,(f,p)=>{if(f!==null){pQ(r,f);return}C3(r,p)})})}d0.readdirWithFileTypes=pce;function CZe(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(s,a)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){r(s);return}r(null,t);return}t.dirent=fce.fs.createDirentFromStats(t.name,a),r(null,t)})}}function hce(t,e,r){e.fs.readdir(t,(s,a)=>{if(s!==null){pQ(r,s);return}let n=a.map(c=>{let f=Ace.joinPathSegments(t,c,e.pathSegmentSeparator);return p=>{yZe.stat(f,e.fsStatSettings,(h,E)=>{if(h!==null){p(h);return}let C={name:c,path:f,dirent:fce.fs.createDirentFromStats(c,E)};e.stats&&(C.stats=E),p(null,C)})}});uce(n,(c,f)=>{if(c!==null){pQ(r,c);return}C3(r,f)})})}d0.readdir=hce;function pQ(t,e){t(e)}function C3(t,e){t(null,e)}});var Ice=_(m0=>{\"use strict\";Object.defineProperty(m0,\"__esModule\",{value:!0});m0.readdir=m0.readdirWithFileTypes=m0.read=void 0;var wZe=Zd(),BZe=m3(),dce=E3(),mce=I3();function vZe(t,e){return!e.stats&&BZe.IS_SUPPORT_READDIR_WITH_FILE_TYPES?yce(t,e):Ece(t,e)}m0.read=vZe;function yce(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(s=>{let a={dirent:s,name:s.name,path:mce.joinPathSegments(t,s.name,e.pathSegmentSeparator)};if(a.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let n=e.fs.statSync(a.path);a.dirent=dce.fs.createDirentFromStats(a.name,n)}catch(n){if(e.throwErrorOnBrokenSymbolicLink)throw n}return a})}m0.readdirWithFileTypes=yce;function Ece(t,e){return e.fs.readdirSync(t).map(s=>{let a=mce.joinPathSegments(t,s,e.pathSegmentSeparator),n=wZe.statSync(a,e.fsStatSettings),c={name:s,path:a,dirent:dce.fs.createDirentFromStats(s,n)};return e.stats&&(c.stats=n),c})}m0.readdir=Ece});var Cce=_(y0=>{\"use strict\";Object.defineProperty(y0,\"__esModule\",{value:!0});y0.createFileSystemAdapter=y0.FILE_SYSTEM_ADAPTER=void 0;var ZE=Ie(\"fs\");y0.FILE_SYSTEM_ADAPTER={lstat:ZE.lstat,stat:ZE.stat,lstatSync:ZE.lstatSync,statSync:ZE.statSync,readdir:ZE.readdir,readdirSync:ZE.readdirSync};function SZe(t){return t===void 0?y0.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},y0.FILE_SYSTEM_ADAPTER),t)}y0.createFileSystemAdapter=SZe});var wce=_(B3=>{\"use strict\";Object.defineProperty(B3,\"__esModule\",{value:!0});var DZe=Ie(\"path\"),bZe=Zd(),PZe=Cce(),w3=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=PZe.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,DZe.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new bZe.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};B3.default=w3});var hQ=_(E0=>{\"use strict\";Object.defineProperty(E0,\"__esModule\",{value:!0});E0.Settings=E0.scandirSync=E0.scandir=void 0;var Bce=gce(),xZe=Ice(),v3=wce();E0.Settings=v3.default;function kZe(t,e,r){if(typeof e==\"function\"){Bce.read(t,S3(),e);return}Bce.read(t,S3(e),r)}E0.scandir=kZe;function QZe(t,e){let r=S3(e);return xZe.read(t,r)}E0.scandirSync=QZe;function S3(t={}){return t instanceof v3.default?t:new v3.default(t)}});var Sce=_((ELt,vce)=>{\"use strict\";function TZe(t){var e=new t,r=e;function s(){var n=e;return n.next?e=n.next:(e=new t,r=e),n.next=null,n}function a(n){r.next=n,r=n}return{get:s,release:a}}vce.exports=TZe});var bce=_((ILt,D3)=>{\"use strict\";var RZe=Sce();function Dce(t,e,r){if(typeof t==\"function\"&&(r=e,e=t,t=null),!(r>=1))throw new Error(\"fastqueue concurrency must be equal to or greater than 1\");var s=RZe(FZe),a=null,n=null,c=0,f=null,p={push:R,drain:kc,saturated:kc,pause:E,paused:!1,get concurrency(){return r},set concurrency(ue){if(!(ue>=1))throw new Error(\"fastqueue concurrency must be equal to or greater than 1\");if(r=ue,!p.paused)for(;a&&c<r;)c++,U()},running:h,resume:P,idle:I,length:C,getQueue:S,unshift:N,empty:kc,kill:W,killAndDrain:ee,error:ie};return p;function h(){return c}function E(){p.paused=!0}function C(){for(var ue=a,le=0;ue;)ue=ue.next,le++;return le}function S(){for(var ue=a,le=[];ue;)le.push(ue.value),ue=ue.next;return le}function P(){if(p.paused){if(p.paused=!1,a===null){c++,U();return}for(;a&&c<r;)c++,U()}}function I(){return c===0&&p.length()===0}function R(ue,le){var me=s.get();me.context=t,me.release=U,me.value=ue,me.callback=le||kc,me.errorHandler=f,c>=r||p.paused?n?(n.next=me,n=me):(a=me,n=me,p.saturated()):(c++,e.call(t,me.value,me.worked))}function N(ue,le){var me=s.get();me.context=t,me.release=U,me.value=ue,me.callback=le||kc,me.errorHandler=f,c>=r||p.paused?a?(me.next=a,a=me):(a=me,n=me,p.saturated()):(c++,e.call(t,me.value,me.worked))}function U(ue){ue&&s.release(ue);var le=a;le&&c<=r?p.paused?c--:(n===a&&(n=null),a=le.next,le.next=null,e.call(t,le.value,le.worked),n===null&&p.empty()):--c===0&&p.drain()}function W(){a=null,n=null,p.drain=kc}function ee(){a=null,n=null,p.drain(),p.drain=kc}function ie(ue){f=ue}}function kc(){}function FZe(){this.value=null,this.callback=kc,this.next=null,this.release=kc,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,s){var a=t.callback,n=t.errorHandler,c=t.value;t.value=null,t.callback=kc,t.errorHandler&&n(r,c),a.call(t.context,r,s),t.release(t)}}function NZe(t,e,r){typeof t==\"function\"&&(r=e,e=t,t=null);function s(E,C){e.call(this,E).then(function(S){C(null,S)},C)}var a=Dce(t,s,r),n=a.push,c=a.unshift;return a.push=f,a.unshift=p,a.drained=h,a;function f(E){var C=new Promise(function(S,P){n(E,function(I,R){if(I){P(I);return}S(R)})});return C.catch(kc),C}function p(E){var C=new Promise(function(S,P){c(E,function(I,R){if(I){P(I);return}S(R)})});return C.catch(kc),C}function h(){if(a.idle())return new Promise(function(S){S()});var E=a.drain,C=new Promise(function(S){a.drain=function(){E(),S()}});return C}}D3.exports=Dce;D3.exports.promise=NZe});var gQ=_(zf=>{\"use strict\";Object.defineProperty(zf,\"__esModule\",{value:!0});zf.joinPathSegments=zf.replacePathSegmentSeparator=zf.isAppliedFilter=zf.isFatalError=void 0;function OZe(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}zf.isFatalError=OZe;function LZe(t,e){return t===null||t(e)}zf.isAppliedFilter=LZe;function MZe(t,e){return t.split(/[/\\\\]/).join(e)}zf.replacePathSegmentSeparator=MZe;function UZe(t,e,r){return t===\"\"?e:t.endsWith(r)?t+e:t+r+e}zf.joinPathSegments=UZe});var x3=_(P3=>{\"use strict\";Object.defineProperty(P3,\"__esModule\",{value:!0});var _Ze=gQ(),b3=class{constructor(e,r){this._root=e,this._settings=r,this._root=_Ze.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};P3.default=b3});var T3=_(Q3=>{\"use strict\";Object.defineProperty(Q3,\"__esModule\",{value:!0});var HZe=Ie(\"events\"),jZe=hQ(),GZe=bce(),dQ=gQ(),qZe=x3(),k3=class extends qZe.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=jZe.scandir,this._emitter=new HZe.EventEmitter,this._queue=GZe(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit(\"end\")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error(\"The reader is already destroyed\");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on(\"entry\",e)}onError(e){this._emitter.once(\"error\",e)}onEnd(e){this._emitter.once(\"end\",e)}_pushToQueue(e,r){let s={directory:e,base:r};this._queue.push(s,a=>{a!==null&&this._handleError(a)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(s,a)=>{if(s!==null){r(s,void 0);return}for(let n of a)this._handleEntry(n,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!dQ.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit(\"error\",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let s=e.path;r!==void 0&&(e.path=dQ.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),dQ.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&dQ.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit(\"entry\",e)}};Q3.default=k3});var Pce=_(F3=>{\"use strict\";Object.defineProperty(F3,\"__esModule\",{value:!0});var WZe=T3(),R3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new WZe.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{YZe(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{VZe(e,this._storage)}),this._reader.read()}};F3.default=R3;function YZe(t,e){t(e)}function VZe(t,e){t(null,e)}});var xce=_(O3=>{\"use strict\";Object.defineProperty(O3,\"__esModule\",{value:!0});var JZe=Ie(\"stream\"),KZe=T3(),N3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new KZe.default(this._root,this._settings),this._stream=new JZe.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit(\"error\",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};O3.default=N3});var kce=_(M3=>{\"use strict\";Object.defineProperty(M3,\"__esModule\",{value:!0});var zZe=hQ(),mQ=gQ(),XZe=x3(),L3=class extends XZe.default{constructor(){super(...arguments),this._scandir=zZe.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let s=this._scandir(e,this._settings.fsScandirSettings);for(let a of s)this._handleEntry(a,r)}catch(s){this._handleError(s)}}_handleError(e){if(mQ.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let s=e.path;r!==void 0&&(e.path=mQ.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),mQ.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&mQ.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};M3.default=L3});var Qce=_(_3=>{\"use strict\";Object.defineProperty(_3,\"__esModule\",{value:!0});var ZZe=kce(),U3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new ZZe.default(this._root,this._settings)}read(){return this._reader.read()}};_3.default=U3});var Tce=_(j3=>{\"use strict\";Object.defineProperty(j3,\"__esModule\",{value:!0});var $Ze=Ie(\"path\"),e$e=hQ(),H3=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,$Ze.sep),this.fsScandirSettings=new e$e.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};j3.default=H3});var EQ=_(Xf=>{\"use strict\";Object.defineProperty(Xf,\"__esModule\",{value:!0});Xf.Settings=Xf.walkStream=Xf.walkSync=Xf.walk=void 0;var Rce=Pce(),t$e=xce(),r$e=Qce(),G3=Tce();Xf.Settings=G3.default;function n$e(t,e,r){if(typeof e==\"function\"){new Rce.default(t,yQ()).read(e);return}new Rce.default(t,yQ(e)).read(r)}Xf.walk=n$e;function i$e(t,e){let r=yQ(e);return new r$e.default(t,r).read()}Xf.walkSync=i$e;function s$e(t,e){let r=yQ(e);return new t$e.default(t,r).read()}Xf.walkStream=s$e;function yQ(t={}){return t instanceof G3.default?t:new G3.default(t)}});var IQ=_(W3=>{\"use strict\";Object.defineProperty(W3,\"__esModule\",{value:!0});var o$e=Ie(\"path\"),a$e=Zd(),Fce=xp(),q3=class{constructor(e){this._settings=e,this._fsStatSettings=new a$e.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return o$e.resolve(this._settings.cwd,e)}_makeEntry(e,r){let s={name:r,path:r,dirent:Fce.fs.createDirentFromStats(r,e)};return this._settings.stats&&(s.stats=e),s}_isFatalError(e){return!Fce.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};W3.default=q3});var J3=_(V3=>{\"use strict\";Object.defineProperty(V3,\"__esModule\",{value:!0});var l$e=Ie(\"stream\"),c$e=Zd(),u$e=EQ(),f$e=IQ(),Y3=class extends f$e.default{constructor(){super(...arguments),this._walkStream=u$e.walkStream,this._stat=c$e.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let s=e.map(this._getFullEntryPath,this),a=new l$e.PassThrough({objectMode:!0});a._write=(n,c,f)=>this._getEntry(s[n],e[n],r).then(p=>{p!==null&&r.entryFilter(p)&&a.push(p),n===s.length-1&&a.end(),f()}).catch(f);for(let n=0;n<s.length;n++)a.write(n);return a}_getEntry(e,r,s){return this._getStat(e).then(a=>this._makeEntry(a,r)).catch(a=>{if(s.errorFilter(a))return null;throw a})}_getStat(e){return new Promise((r,s)=>{this._stat(e,this._fsStatSettings,(a,n)=>a===null?r(n):s(a))})}};V3.default=Y3});var Nce=_(z3=>{\"use strict\";Object.defineProperty(z3,\"__esModule\",{value:!0});var A$e=EQ(),p$e=IQ(),h$e=J3(),K3=class extends p$e.default{constructor(){super(...arguments),this._walkAsync=A$e.walk,this._readerStream=new h$e.default(this._settings)}dynamic(e,r){return new Promise((s,a)=>{this._walkAsync(e,r,(n,c)=>{n===null?s(c):a(n)})})}async static(e,r){let s=[],a=this._readerStream.static(e,r);return new Promise((n,c)=>{a.once(\"error\",c),a.on(\"data\",f=>s.push(f)),a.once(\"end\",()=>n(s))})}};z3.default=K3});var Oce=_(Z3=>{\"use strict\";Object.defineProperty(Z3,\"__esModule\",{value:!0});var NB=xp(),X3=class{constructor(e,r,s){this._patterns=e,this._settings=r,this._micromatchOptions=s,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),s=this._splitSegmentsIntoSections(r);this._storage.push({complete:s.length<=1,pattern:e,segments:r,sections:s})}}_getPatternSegments(e){return NB.pattern.getPatternParts(e,this._micromatchOptions).map(s=>NB.pattern.isDynamicPattern(s,this._settings)?{dynamic:!0,pattern:s,patternRe:NB.pattern.makeRe(s,this._micromatchOptions)}:{dynamic:!1,pattern:s})}_splitSegmentsIntoSections(e){return NB.array.splitWhen(e,r=>r.dynamic&&NB.pattern.hasGlobStar(r.pattern))}};Z3.default=X3});var Lce=_(e8=>{\"use strict\";Object.defineProperty(e8,\"__esModule\",{value:!0});var g$e=Oce(),$3=class extends g$e.default{match(e){let r=e.split(\"/\"),s=r.length,a=this._storage.filter(n=>!n.complete||n.segments.length>s);for(let n of a){let c=n.sections[0];if(!n.complete&&s>c.length||r.every((p,h)=>{let E=n.segments[h];return!!(E.dynamic&&E.patternRe.test(p)||!E.dynamic&&E.pattern===p)}))return!0}return!1}};e8.default=$3});var Mce=_(r8=>{\"use strict\";Object.defineProperty(r8,\"__esModule\",{value:!0});var CQ=xp(),d$e=Lce(),t8=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,s){let a=this._getMatcher(r),n=this._getNegativePatternsRe(s);return c=>this._filter(e,c,a,n)}_getMatcher(e){return new d$e.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(CQ.pattern.isAffectDepthOfReadingPattern);return CQ.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,s,a){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let n=CQ.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(n,s)?!1:this._isSkippedByNegativePatterns(n,a)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let s=r.split(\"/\").length;if(e===\"\")return s;let a=e.split(\"/\").length;return s-a}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!CQ.pattern.matchAny(e,r)}};r8.default=t8});var Uce=_(i8=>{\"use strict\";Object.defineProperty(i8,\"__esModule\",{value:!0});var $d=xp(),n8=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let s=$d.pattern.convertPatternsToRe(e,this._micromatchOptions),a=$d.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return n=>this._filter(n,s,a)}_filter(e,r,s){let a=$d.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(a)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(a,s))return!1;let n=e.dirent.isDirectory(),c=this._isMatchToPatterns(a,r,n)&&!this._isMatchToPatterns(a,s,n);return this._settings.unique&&c&&this._createIndexRecord(a),c}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let s=$d.path.makeAbsolute(this._settings.cwd,e);return $d.pattern.matchAny(s,r)}_isMatchToPatterns(e,r,s){let a=$d.pattern.matchAny(e,r);return!a&&s?$d.pattern.matchAny(e+\"/\",r):a}};i8.default=n8});var _ce=_(o8=>{\"use strict\";Object.defineProperty(o8,\"__esModule\",{value:!0});var m$e=xp(),s8=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return m$e.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};o8.default=s8});var jce=_(l8=>{\"use strict\";Object.defineProperty(l8,\"__esModule\",{value:!0});var Hce=xp(),a8=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=Hce.path.makeAbsolute(this._settings.cwd,r),r=Hce.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+=\"/\"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};l8.default=a8});var wQ=_(u8=>{\"use strict\";Object.defineProperty(u8,\"__esModule\",{value:!0});var y$e=Ie(\"path\"),E$e=Mce(),I$e=Uce(),C$e=_ce(),w$e=jce(),c8=class{constructor(e){this._settings=e,this.errorFilter=new C$e.default(this._settings),this.entryFilter=new I$e.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new E$e.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new w$e.default(this._settings)}_getRootDirectory(e){return y$e.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base===\".\"?\"\":e.base;return{basePath:r,pathSegmentSeparator:\"/\",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};u8.default=c8});var Gce=_(A8=>{\"use strict\";Object.defineProperty(A8,\"__esModule\",{value:!0});var B$e=Nce(),v$e=wQ(),f8=class extends v$e.default{constructor(){super(...arguments),this._reader=new B$e.default(this._settings)}async read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e);return(await this.api(r,e,s)).map(n=>s.transform(n))}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};A8.default=f8});var qce=_(h8=>{\"use strict\";Object.defineProperty(h8,\"__esModule\",{value:!0});var S$e=Ie(\"stream\"),D$e=J3(),b$e=wQ(),p8=class extends b$e.default{constructor(){super(...arguments),this._reader=new D$e.default(this._settings)}read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e),a=this.api(r,e,s),n=new S$e.Readable({objectMode:!0,read:()=>{}});return a.once(\"error\",c=>n.emit(\"error\",c)).on(\"data\",c=>n.emit(\"data\",s.transform(c))).once(\"end\",()=>n.emit(\"end\")),n.once(\"close\",()=>a.destroy()),n}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};h8.default=p8});var Wce=_(d8=>{\"use strict\";Object.defineProperty(d8,\"__esModule\",{value:!0});var P$e=Zd(),x$e=EQ(),k$e=IQ(),g8=class extends k$e.default{constructor(){super(...arguments),this._walkSync=x$e.walkSync,this._statSync=P$e.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let s=[];for(let a of e){let n=this._getFullEntryPath(a),c=this._getEntry(n,a,r);c===null||!r.entryFilter(c)||s.push(c)}return s}_getEntry(e,r,s){try{let a=this._getStat(e);return this._makeEntry(a,r)}catch(a){if(s.errorFilter(a))return null;throw a}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};d8.default=g8});var Yce=_(y8=>{\"use strict\";Object.defineProperty(y8,\"__esModule\",{value:!0});var Q$e=Wce(),T$e=wQ(),m8=class extends T$e.default{constructor(){super(...arguments),this._reader=new Q$e.default(this._settings)}read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e);return this.api(r,e,s).map(s.transform)}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};y8.default=m8});var Vce=_(eI=>{\"use strict\";Object.defineProperty(eI,\"__esModule\",{value:!0});eI.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var $E=Ie(\"fs\"),R$e=Ie(\"os\"),F$e=Math.max(R$e.cpus().length,1);eI.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:$E.lstat,lstatSync:$E.lstatSync,stat:$E.stat,statSync:$E.statSync,readdir:$E.readdir,readdirSync:$E.readdirSync};var E8=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,F$e),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},eI.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};eI.default=E8});var BQ=_((WLt,Kce)=>{\"use strict\";var Jce=Kle(),N$e=Gce(),O$e=qce(),L$e=Yce(),I8=Vce(),Qc=xp();async function C8(t,e){ju(t);let r=w8(t,N$e.default,e),s=await Promise.all(r);return Qc.array.flatten(s)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(h,E){ju(h);let C=w8(h,L$e.default,E);return Qc.array.flatten(C)}t.sync=e;function r(h,E){ju(h);let C=w8(h,O$e.default,E);return Qc.stream.merge(C)}t.stream=r;function s(h,E){ju(h);let C=[].concat(h),S=new I8.default(E);return Jce.generate(C,S)}t.generateTasks=s;function a(h,E){ju(h);let C=new I8.default(E);return Qc.pattern.isDynamicPattern(h,C)}t.isDynamicPattern=a;function n(h){return ju(h),Qc.path.escape(h)}t.escapePath=n;function c(h){return ju(h),Qc.path.convertPathToPattern(h)}t.convertPathToPattern=c;let f;(function(h){function E(S){return ju(S),Qc.path.escapePosixPath(S)}h.escapePath=E;function C(S){return ju(S),Qc.path.convertPosixPathToPattern(S)}h.convertPathToPattern=C})(f=t.posix||(t.posix={}));let p;(function(h){function E(S){return ju(S),Qc.path.escapeWindowsPath(S)}h.escapePath=E;function C(S){return ju(S),Qc.path.convertWindowsPathToPattern(S)}h.convertPathToPattern=C})(p=t.win32||(t.win32={}))})(C8||(C8={}));function w8(t,e,r){let s=[].concat(t),a=new I8.default(r),n=Jce.generate(s,a),c=new e(a);return n.map(c.read,c)}function ju(t){if(![].concat(t).every(s=>Qc.string.isString(s)&&!Qc.string.isEmpty(s)))throw new TypeError(\"Patterns must be a string (non empty) or an array of strings\")}Kce.exports=C8});var Nn={};Vt(Nn,{checksumFile:()=>SQ,checksumPattern:()=>DQ,makeHash:()=>us});function us(...t){let e=(0,vQ.createHash)(\"sha512\"),r=\"\";for(let s of t)typeof s==\"string\"?r+=s:s&&(r&&(e.update(r),r=\"\"),e.update(s));return r&&e.update(r),e.digest(\"hex\")}async function SQ(t,{baseFs:e,algorithm:r}={baseFs:ce,algorithm:\"sha512\"}){let s=await e.openPromise(t,\"r\");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,vQ.createHash)(r),f=0;for(;(f=await e.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest(\"hex\")}finally{await e.closePromise(s)}}async function DQ(t,{cwd:e}){let s=(await(0,B8.default)(t,{cwd:fe.fromPortablePath(e),onlyDirectories:!0})).map(f=>`${f}/**/*`),a=await(0,B8.default)([t,...s],{cwd:fe.fromPortablePath(e),onlyFiles:!1});a.sort();let n=await Promise.all(a.map(async f=>{let p=[Buffer.from(f)],h=J.join(e,fe.toPortablePath(f)),E=await ce.lstatPromise(h);return E.isSymbolicLink()?p.push(Buffer.from(await ce.readlinkPromise(h))):E.isFile()&&p.push(await ce.readFilePromise(h)),p.join(\"\\0\")})),c=(0,vQ.createHash)(\"sha512\");for(let f of n)c.update(f);return c.digest(\"hex\")}var vQ,B8,I0=Xe(()=>{Dt();vQ=Ie(\"crypto\"),B8=ut(BQ())});var G={};Vt(G,{allPeerRequests:()=>qB,areDescriptorsEqual:()=>eue,areIdentsEqual:()=>UB,areLocatorsEqual:()=>_B,areVirtualPackagesEquivalent:()=>Y$e,bindDescriptor:()=>q$e,bindLocator:()=>W$e,convertDescriptorToLocator:()=>bQ,convertLocatorToDescriptor:()=>S8,convertPackageToLocator:()=>H$e,convertToIdent:()=>_$e,convertToManifestRange:()=>ret,copyPackage:()=>LB,devirtualizeDescriptor:()=>MB,devirtualizeLocator:()=>rI,ensureDevirtualizedDescriptor:()=>j$e,ensureDevirtualizedLocator:()=>G$e,getIdentVendorPath:()=>x8,isPackageCompatible:()=>TQ,isVirtualDescriptor:()=>kp,isVirtualLocator:()=>Gu,makeDescriptor:()=>On,makeIdent:()=>Da,makeLocator:()=>Ws,makeRange:()=>kQ,parseDescriptor:()=>C0,parseFileStyleRange:()=>eet,parseIdent:()=>Sa,parseLocator:()=>Qp,parseRange:()=>em,prettyDependent:()=>t3,prettyDescriptor:()=>ni,prettyIdent:()=>$i,prettyLocator:()=>Yr,prettyLocatorNoColors:()=>e3,prettyRange:()=>iI,prettyReference:()=>jB,prettyResolution:()=>FB,prettyWorkspace:()=>GB,renamePackage:()=>D8,slugifyIdent:()=>v8,slugifyLocator:()=>nI,sortDescriptors:()=>sI,stringifyDescriptor:()=>al,stringifyIdent:()=>un,stringifyLocator:()=>ll,tryParseDescriptor:()=>HB,tryParseIdent:()=>tue,tryParseLocator:()=>xQ,tryParseRange:()=>$$e,unwrapIdentFromScope:()=>iet,virtualizeDescriptor:()=>b8,virtualizePackage:()=>P8,wrapIdentIntoScope:()=>net});function Da(t,e){if(t?.startsWith(\"@\"))throw new Error(\"Invalid scope: don't prefix it with '@'\");return{identHash:us(t,e),scope:t,name:e}}function On(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:us(t.identHash,e),range:e}}function Ws(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:us(t.identHash,e),reference:e}}function _$e(t){return{identHash:t.identHash,scope:t.scope,name:t.name}}function bQ(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.descriptorHash,reference:t.range}}function S8(t){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:t.locatorHash,range:t.reference}}function H$e(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference}}function D8(t,e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference,version:t.version,languageName:t.languageName,linkType:t.linkType,conditions:t.conditions,dependencies:new Map(t.dependencies),peerDependencies:new Map(t.peerDependencies),dependenciesMeta:new Map(t.dependenciesMeta),peerDependenciesMeta:new Map(t.peerDependenciesMeta),bin:new Map(t.bin)}}function LB(t){return D8(t,t)}function b8(t,e){if(e.includes(\"#\"))throw new Error(\"Invalid entropy\");return On(t,`virtual:${e}#${t.range}`)}function P8(t,e){if(e.includes(\"#\"))throw new Error(\"Invalid entropy\");return D8(t,Ws(t,`virtual:${e}#${t.reference}`))}function kp(t){return t.range.startsWith(OB)}function Gu(t){return t.reference.startsWith(OB)}function MB(t){if(!kp(t))throw new Error(\"Not a virtual descriptor\");return On(t,t.range.replace(PQ,\"\"))}function rI(t){if(!Gu(t))throw new Error(\"Not a virtual descriptor\");return Ws(t,t.reference.replace(PQ,\"\"))}function j$e(t){return kp(t)?On(t,t.range.replace(PQ,\"\")):t}function G$e(t){return Gu(t)?Ws(t,t.reference.replace(PQ,\"\")):t}function q$e(t,e){return t.range.includes(\"::\")?t:On(t,`${t.range}::${tI.default.stringify(e)}`)}function W$e(t,e){return t.reference.includes(\"::\")?t:Ws(t,`${t.reference}::${tI.default.stringify(e)}`)}function UB(t,e){return t.identHash===e.identHash}function eue(t,e){return t.descriptorHash===e.descriptorHash}function _B(t,e){return t.locatorHash===e.locatorHash}function Y$e(t,e){if(!Gu(t))throw new Error(\"Invalid package type\");if(!Gu(e))throw new Error(\"Invalid package type\");if(!UB(t,e)||t.dependencies.size!==e.dependencies.size)return!1;for(let r of t.dependencies.values()){let s=e.dependencies.get(r.identHash);if(!s||!eue(r,s))return!1}return!0}function Sa(t){let e=tue(t);if(!e)throw new Error(`Invalid ident (${t})`);return e}function tue(t){let e=t.match(V$e);if(!e)return null;let[,r,s]=e;return Da(typeof r<\"u\"?r:null,s)}function C0(t,e=!1){let r=HB(t,e);if(!r)throw new Error(`Invalid descriptor (${t})`);return r}function HB(t,e=!1){let r=e?t.match(J$e):t.match(K$e);if(!r)return null;let[,s,a,n]=r;if(n===\"unknown\")throw new Error(`Invalid range (${t})`);let c=typeof s<\"u\"?s:null,f=typeof n<\"u\"?n:\"unknown\";return On(Da(c,a),f)}function Qp(t,e=!1){let r=xQ(t,e);if(!r)throw new Error(`Invalid locator (${t})`);return r}function xQ(t,e=!1){let r=e?t.match(z$e):t.match(X$e);if(!r)return null;let[,s,a,n]=r;if(n===\"unknown\")throw new Error(`Invalid reference (${t})`);let c=typeof s<\"u\"?s:null,f=typeof n<\"u\"?n:\"unknown\";return Ws(Da(c,a),f)}function em(t,e){let r=t.match(Z$e);if(r===null)throw new Error(`Invalid range (${t})`);let s=typeof r[1]<\"u\"?r[1]:null;if(typeof e?.requireProtocol==\"string\"&&s!==e.requireProtocol)throw new Error(`Invalid protocol (${s})`);if(e?.requireProtocol&&s===null)throw new Error(`Missing protocol (${s})`);let a=typeof r[3]<\"u\"?decodeURIComponent(r[2]):null;if(e?.requireSource&&a===null)throw new Error(`Missing source (${t})`);let n=typeof r[3]<\"u\"?decodeURIComponent(r[3]):decodeURIComponent(r[2]),c=e?.parseSelector?tI.default.parse(n):n,f=typeof r[4]<\"u\"?tI.default.parse(r[4]):null;return{protocol:s,source:a,selector:c,params:f}}function $$e(t,e){try{return em(t,e)}catch{return null}}function eet(t,{protocol:e}){let{selector:r,params:s}=em(t,{requireProtocol:e,requireBindings:!0});if(typeof s.locator!=\"string\")throw new Error(`Assertion failed: Invalid bindings for ${t}`);return{parentLocator:Qp(s.locator,!0),path:r}}function zce(t){return t=t.replaceAll(\"%\",\"%25\"),t=t.replaceAll(\":\",\"%3A\"),t=t.replaceAll(\"#\",\"%23\"),t}function tet(t){return t===null?!1:Object.entries(t).length>0}function kQ({protocol:t,source:e,selector:r,params:s}){let a=\"\";return t!==null&&(a+=`${t}`),e!==null&&(a+=`${zce(e)}#`),a+=zce(r),tet(s)&&(a+=`::${tI.default.stringify(s)}`),a}function ret(t){let{params:e,protocol:r,source:s,selector:a}=em(t);for(let n in e)n.startsWith(\"__\")&&delete e[n];return kQ({protocol:r,source:s,params:e,selector:a})}function un(t){return t.scope?`@${t.scope}/${t.name}`:`${t.name}`}function net(t,e){return t.scope?Da(e,`${t.scope}__${t.name}`):Da(e,t.name)}function iet(t,e){if(t.scope!==e)return t;let r=t.name.indexOf(\"__\");if(r===-1)return Da(null,t.name);let s=t.name.slice(0,r),a=t.name.slice(r+2);return Da(s,a)}function al(t){return t.scope?`@${t.scope}/${t.name}@${t.range}`:`${t.name}@${t.range}`}function ll(t){return t.scope?`@${t.scope}/${t.name}@${t.reference}`:`${t.name}@${t.reference}`}function v8(t){return t.scope!==null?`@${t.scope}-${t.name}`:t.name}function nI(t){let{protocol:e,selector:r}=em(t.reference),s=e!==null?e.replace(set,\"\"):\"exotic\",a=Xce.default.valid(r),n=a!==null?`${s}-${a}`:`${s}`,c=10;return t.scope?`${v8(t)}-${n}-${t.locatorHash.slice(0,c)}`:`${v8(t)}-${n}-${t.locatorHash.slice(0,c)}`}function $i(t,e){return e.scope?`${Ht(t,`@${e.scope}/`,ht.SCOPE)}${Ht(t,e.name,ht.NAME)}`:`${Ht(t,e.name,ht.NAME)}`}function QQ(t){if(t.startsWith(OB)){let e=QQ(t.substring(t.indexOf(\"#\")+1)),r=t.substring(OB.length,OB.length+M$e);return`${e} [${r}]`}else return t.replace(oet,\"?[...]\")}function iI(t,e){return`${Ht(t,QQ(e),ht.RANGE)}`}function ni(t,e){return`${$i(t,e)}${Ht(t,\"@\",ht.RANGE)}${iI(t,e.range)}`}function jB(t,e){return`${Ht(t,QQ(e),ht.REFERENCE)}`}function Yr(t,e){return`${$i(t,e)}${Ht(t,\"@\",ht.REFERENCE)}${jB(t,e.reference)}`}function e3(t){return`${un(t)}@${QQ(t.reference)}`}function sI(t){return qs(t,[e=>un(e),e=>e.range])}function GB(t,e){return $i(t,e.anchoredLocator)}function FB(t,e,r){let s=kp(e)?MB(e):e;return r===null?`${ni(t,s)} \\u2192 ${$4(t).Cross}`:s.identHash===r.identHash?`${ni(t,s)} \\u2192 ${jB(t,r.reference)}`:`${ni(t,s)} \\u2192 ${Yr(t,r)}`}function t3(t,e,r){return r===null?`${Yr(t,e)}`:`${Yr(t,e)} (via ${iI(t,r.range)})`}function x8(t){return`node_modules/${un(t)}`}function TQ(t,e){return t.conditions?U$e(t.conditions,r=>{let[,s,a]=r.match($ce),n=e[s];return n?n.includes(a):!0}):!0}function qB(t){let e=new Set;if(\"children\"in t)e.add(t);else for(let r of t.requests.values())e.add(r);for(let r of e)for(let s of r.children.values())e.add(s);return e}var tI,Xce,Zce,OB,M$e,$ce,U$e,PQ,V$e,J$e,K$e,z$e,X$e,Z$e,set,oet,Wo=Xe(()=>{tI=ut(Ie(\"querystring\")),Xce=ut(Ai()),Zce=ut(Ise());xc();I0();Pc();Wo();OB=\"virtual:\",M$e=5,$ce=/(os|cpu|libc)=([a-z0-9_-]+)/,U$e=(0,Zce.makeParser)($ce);PQ=/^[^#]*#/;V$e=/^(?:@([^/]+?)\\/)?([^@/]+)$/;J$e=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))$/,K$e=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))?$/;z$e=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))$/,X$e=/^(?:@([^/]+?)\\/)?([^@/]+?)(?:@(.+))?$/;Z$e=/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/;set=/:$/;oet=/\\?.*/});var rue,nue=Xe(()=>{Wo();rue={hooks:{reduceDependency:(t,e,r,s,{resolver:a,resolveOptions:n})=>{for(let{pattern:c,reference:f}of e.topLevelWorkspace.manifest.resolutions){if(c.from&&(c.from.fullName!==un(r)||e.configuration.normalizeLocator(Ws(Sa(c.from.fullName),c.from.description??r.reference)).locatorHash!==r.locatorHash)||c.descriptor.fullName!==un(t)||e.configuration.normalizeDependency(On(Qp(c.descriptor.fullName),c.descriptor.description??t.range)).descriptorHash!==t.descriptorHash)continue;return a.bindDescriptor(e.configuration.normalizeDependency(On(t,f)),e.topLevelWorkspace.anchoredLocator,n)}return t},validateProject:async(t,e)=>{for(let r of t.workspaces){let s=GB(t.configuration,r);await t.configuration.triggerHook(a=>a.validateWorkspace,r,{reportWarning:(a,n)=>e.reportWarning(a,`${s}: ${n}`),reportError:(a,n)=>e.reportError(a,`${s}: ${n}`)})}},validateWorkspace:async(t,e)=>{let{manifest:r}=t;r.resolutions.length&&t.cwd!==t.project.cwd&&r.errors.push(new Error(\"Resolutions field will be ignored\"));for(let s of r.errors)e.reportWarning(57,s.message)}}}});var Ei,tm=Xe(()=>{Ei=class t{static{this.protocol=\"workspace:\"}supportsDescriptor(e,r){return!!(e.range.startsWith(t.protocol)||r.project.tryWorkspaceByDescriptor(e)!==null)}supportsLocator(e,r){return!!e.reference.startsWith(t.protocol)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){return[s.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let s=r.project.getWorkspaceByCwd(e.reference.slice(t.protocol.length));return{...e,version:s.manifest.version||\"0.0.0\",languageName:\"unknown\",linkType:\"SOFT\",conditions:null,dependencies:r.project.configuration.normalizeDependencyMap(new Map([...s.manifest.dependencies,...s.manifest.devDependencies])),peerDependencies:new Map([...s.manifest.peerDependencies]),dependenciesMeta:s.manifest.dependenciesMeta,peerDependenciesMeta:s.manifest.peerDependenciesMeta,bin:s.manifest.bin}}}});var Fr={};Vt(Fr,{SemVer:()=>lue.SemVer,clean:()=>cet,getComparator:()=>oue,mergeComparators:()=>k8,satisfiesWithPrereleases:()=>Zf,simplifyRanges:()=>Q8,stringifyComparator:()=>aue,validRange:()=>cl});function Zf(t,e,r=!1){if(!t)return!1;let s=`${e}${r}`,a=iue.get(s);if(typeof a>\"u\")try{a=new Tp.default.Range(e,{includePrerelease:!0,loose:r})}catch{return!1}finally{iue.set(s,a||null)}else if(a===null)return!1;let n;try{n=new Tp.default.SemVer(t,a)}catch{return!1}return a.test(n)?!0:(n.prerelease&&(n.prerelease=[]),a.set.some(c=>{for(let f of c)f.semver.prerelease&&(f.semver.prerelease=[]);return c.every(f=>f.test(n))}))}function cl(t){if(t.indexOf(\":\")!==-1)return null;let e=sue.get(t);if(typeof e<\"u\")return e;try{e=new Tp.default.Range(t)}catch{e=null}return sue.set(t,e),e}function cet(t){let e=aet.exec(t);return e?e[1]:null}function oue(t){if(t.semver===Tp.default.Comparator.ANY)return{gt:null,lt:null};switch(t.operator){case\"\":return{gt:[\">=\",t.semver],lt:[\"<=\",t.semver]};case\">\":case\">=\":return{gt:[t.operator,t.semver],lt:null};case\"<\":case\"<=\":return{gt:null,lt:[t.operator,t.semver]};default:throw new Error(`Assertion failed: Unexpected comparator operator (${t.operator})`)}}function k8(t){if(t.length===0)return null;let e=null,r=null;for(let s of t){if(s.gt){let a=e!==null?Tp.default.compare(s.gt[1],e[1]):null;(a===null||a>0||a===0&&s.gt[0]===\">\")&&(e=s.gt)}if(s.lt){let a=r!==null?Tp.default.compare(s.lt[1],r[1]):null;(a===null||a<0||a===0&&s.lt[0]===\"<\")&&(r=s.lt)}}if(e&&r){let s=Tp.default.compare(e[1],r[1]);if(s===0&&(e[0]===\">\"||r[0]===\"<\")||s>0)return null}return{gt:e,lt:r}}function aue(t){if(t.gt&&t.lt){if(t.gt[0]===\">=\"&&t.lt[0]===\"<=\"&&t.gt[1].version===t.lt[1].version)return t.gt[1].version;if(t.gt[0]===\">=\"&&t.lt[0]===\"<\"){if(t.lt[1].version===`${t.gt[1].major+1}.0.0-0`)return`^${t.gt[1].version}`;if(t.lt[1].version===`${t.gt[1].major}.${t.gt[1].minor+1}.0-0`)return`~${t.gt[1].version}`}}let e=[];return t.gt&&e.push(t.gt[0]+t.gt[1].version),t.lt&&e.push(t.lt[0]+t.lt[1].version),e.length?e.join(\" \"):\"*\"}function Q8(t){let e=t.map(uet).map(s=>cl(s).set.map(a=>a.map(n=>oue(n)))),r=e.shift().map(s=>k8(s)).filter(s=>s!==null);for(let s of e){let a=[];for(let n of r)for(let c of s){let f=k8([n,...c]);f!==null&&a.push(f)}r=a}return r.length===0?null:r.map(s=>aue(s)).join(\" || \")}function uet(t){let e=t.split(\"||\");if(e.length>1){let r=new Set;for(let s of e)e.some(a=>a!==s&&Tp.default.subset(s,a))||r.add(s);if(r.size<e.length)return[...r].join(\" || \")}return t}var Tp,lue,iue,sue,aet,Rp=Xe(()=>{Tp=ut(Ai()),lue=ut(Ai()),iue=new Map;sue=new Map;aet=/^(?:[\\sv=]*?)((0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s*)$/});function cue(t){let e=t.match(/^[ \\t]+/m);return e?e[0]:\"  \"}function uue(t){return t.charCodeAt(0)===65279?t.slice(1):t}function ba(t){return t.replace(/\\\\/g,\"/\")}function RQ(t,{yamlCompatibilityMode:e}){return e?Y4(t):typeof t>\"u\"||typeof t==\"boolean\"?t:null}function fue(t,e){let r=e.search(/[^!]/);if(r===-1)return\"invalid\";let s=r%2===0?\"\":\"!\",a=e.slice(r);return`${s}${t}=${a}`}function T8(t,e){return e.length===1?fue(t,e[0]):`(${e.map(r=>fue(t,r)).join(\" | \")})`}var Aue,Ut,oI=Xe(()=>{Dt();wc();Aue=ut(Ai());tm();Pc();Rp();Wo();Ut=class t{constructor(){this.indent=\"  \";this.name=null;this.version=null;this.os=null;this.cpu=null;this.libc=null;this.type=null;this.packageManager=null;this.private=!1;this.license=null;this.main=null;this.module=null;this.browser=null;this.languageName=null;this.bin=new Map;this.scripts=new Map;this.dependencies=new Map;this.devDependencies=new Map;this.peerDependencies=new Map;this.workspaceDefinitions=[];this.dependenciesMeta=new Map;this.peerDependenciesMeta=new Map;this.resolutions=[];this.files=null;this.publishConfig=null;this.installConfig=null;this.preferUnplugged=null;this.raw={};this.errors=[]}static{this.fileName=\"package.json\"}static{this.allDependencies=[\"dependencies\",\"devDependencies\",\"peerDependencies\"]}static{this.hardDependencies=[\"dependencies\",\"devDependencies\"]}static async tryFind(e,{baseFs:r=new Yn}={}){let s=J.join(e,\"package.json\");try{return await t.fromFile(s,{baseFs:r})}catch(a){if(a.code===\"ENOENT\")return null;throw a}}static async find(e,{baseFs:r}={}){let s=await t.tryFind(e,{baseFs:r});if(s===null)throw new Error(\"Manifest not found\");return s}static async fromFile(e,{baseFs:r=new Yn}={}){let s=new t;return await s.loadFile(e,{baseFs:r}),s}static fromText(e){let r=new t;return r.loadFromText(e),r}loadFromText(e){let r;try{r=JSON.parse(uue(e)||\"{}\")}catch(s){throw s.message+=` (when parsing ${e})`,s}this.load(r),this.indent=cue(e)}async loadFile(e,{baseFs:r=new Yn}){let s=await r.readFilePromise(e,\"utf8\"),a;try{a=JSON.parse(uue(s)||\"{}\")}catch(n){throw n.message+=` (when parsing ${e})`,n}this.load(a),this.indent=cue(s)}load(e,{yamlCompatibilityMode:r=!1}={}){if(typeof e!=\"object\"||e===null)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;let s=[];if(this.name=null,typeof e.name==\"string\")try{this.name=Sa(e.name)}catch{s.push(new Error(\"Parsing failed for the 'name' field\"))}if(typeof e.version==\"string\"?this.version=e.version:this.version=null,Array.isArray(e.os)){let n=[];this.os=n;for(let c of e.os)typeof c!=\"string\"?s.push(new Error(\"Parsing failed for the 'os' field\")):n.push(c)}else this.os=null;if(Array.isArray(e.cpu)){let n=[];this.cpu=n;for(let c of e.cpu)typeof c!=\"string\"?s.push(new Error(\"Parsing failed for the 'cpu' field\")):n.push(c)}else this.cpu=null;if(Array.isArray(e.libc)){let n=[];this.libc=n;for(let c of e.libc)typeof c!=\"string\"?s.push(new Error(\"Parsing failed for the 'libc' field\")):n.push(c)}else this.libc=null;if(typeof e.type==\"string\"?this.type=e.type:this.type=null,typeof e.packageManager==\"string\"?this.packageManager=e.packageManager:this.packageManager=null,typeof e.private==\"boolean\"?this.private=e.private:this.private=!1,typeof e.license==\"string\"?this.license=e.license:this.license=null,typeof e.languageName==\"string\"?this.languageName=e.languageName:this.languageName=null,typeof e.main==\"string\"?this.main=ba(e.main):this.main=null,typeof e.module==\"string\"?this.module=ba(e.module):this.module=null,e.browser!=null)if(typeof e.browser==\"string\")this.browser=ba(e.browser);else{this.browser=new Map;for(let[n,c]of Object.entries(e.browser))this.browser.set(ba(n),typeof c==\"string\"?ba(c):c)}else this.browser=null;if(this.bin=new Map,typeof e.bin==\"string\")e.bin.trim()===\"\"?s.push(new Error(\"Invalid bin field\")):this.name!==null?this.bin.set(this.name.name,ba(e.bin)):s.push(new Error(\"String bin field, but no attached package name\"));else if(typeof e.bin==\"object\"&&e.bin!==null)for(let[n,c]of Object.entries(e.bin)){if(typeof c!=\"string\"||c.trim()===\"\"){s.push(new Error(`Invalid bin definition for '${n}'`));continue}let f=Sa(n);this.bin.set(f.name,ba(c))}if(this.scripts=new Map,typeof e.scripts==\"object\"&&e.scripts!==null)for(let[n,c]of Object.entries(e.scripts)){if(typeof c!=\"string\"){s.push(new Error(`Invalid script definition for '${n}'`));continue}this.scripts.set(n,c)}if(this.dependencies=new Map,typeof e.dependencies==\"object\"&&e.dependencies!==null)for(let[n,c]of Object.entries(e.dependencies)){if(typeof c!=\"string\"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Sa(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.dependencies.set(p.identHash,p)}if(this.devDependencies=new Map,typeof e.devDependencies==\"object\"&&e.devDependencies!==null)for(let[n,c]of Object.entries(e.devDependencies)){if(typeof c!=\"string\"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Sa(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.devDependencies.set(p.identHash,p)}if(this.peerDependencies=new Map,typeof e.peerDependencies==\"object\"&&e.peerDependencies!==null)for(let[n,c]of Object.entries(e.peerDependencies)){let f;try{f=Sa(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}(typeof c!=\"string\"||!c.startsWith(Ei.protocol)&&!cl(c))&&(s.push(new Error(`Invalid dependency range for '${n}'`)),c=\"*\");let p=On(f,c);this.peerDependencies.set(p.identHash,p)}typeof e.workspaces==\"object\"&&e.workspaces!==null&&e.workspaces.nohoist&&s.push(new Error(\"'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead\"));let a=Array.isArray(e.workspaces)?e.workspaces:typeof e.workspaces==\"object\"&&e.workspaces!==null&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];this.workspaceDefinitions=[];for(let n of a){if(typeof n!=\"string\"){s.push(new Error(`Invalid workspace definition for '${n}'`));continue}this.workspaceDefinitions.push({pattern:n})}if(this.dependenciesMeta=new Map,typeof e.dependenciesMeta==\"object\"&&e.dependenciesMeta!==null)for(let[n,c]of Object.entries(e.dependenciesMeta)){if(typeof c!=\"object\"||c===null){s.push(new Error(`Invalid meta field for '${n}`));continue}let f=C0(n),p=this.ensureDependencyMeta(f),h=RQ(c.built,{yamlCompatibilityMode:r});if(h===null){s.push(new Error(`Invalid built meta field for '${n}'`));continue}let E=RQ(c.optional,{yamlCompatibilityMode:r});if(E===null){s.push(new Error(`Invalid optional meta field for '${n}'`));continue}let C=RQ(c.unplugged,{yamlCompatibilityMode:r});if(C===null){s.push(new Error(`Invalid unplugged meta field for '${n}'`));continue}Object.assign(p,{built:h,optional:E,unplugged:C})}if(this.peerDependenciesMeta=new Map,typeof e.peerDependenciesMeta==\"object\"&&e.peerDependenciesMeta!==null)for(let[n,c]of Object.entries(e.peerDependenciesMeta)){if(typeof c!=\"object\"||c===null){s.push(new Error(`Invalid meta field for '${n}'`));continue}let f=C0(n),p=this.ensurePeerDependencyMeta(f),h=RQ(c.optional,{yamlCompatibilityMode:r});if(h===null){s.push(new Error(`Invalid optional meta field for '${n}'`));continue}Object.assign(p,{optional:h})}if(this.resolutions=[],typeof e.resolutions==\"object\"&&e.resolutions!==null)for(let[n,c]of Object.entries(e.resolutions)){if(typeof c!=\"string\"){s.push(new Error(`Invalid resolution entry for '${n}'`));continue}try{this.resolutions.push({pattern:px(n),reference:c})}catch(f){s.push(f);continue}}if(Array.isArray(e.files)){this.files=new Set;for(let n of e.files){if(typeof n!=\"string\"){s.push(new Error(`Invalid files entry for '${n}'`));continue}this.files.add(n)}}else this.files=null;if(typeof e.publishConfig==\"object\"&&e.publishConfig!==null){if(this.publishConfig={},typeof e.publishConfig.access==\"string\"&&(this.publishConfig.access=e.publishConfig.access),typeof e.publishConfig.main==\"string\"&&(this.publishConfig.main=ba(e.publishConfig.main)),typeof e.publishConfig.module==\"string\"&&(this.publishConfig.module=ba(e.publishConfig.module)),e.publishConfig.browser!=null)if(typeof e.publishConfig.browser==\"string\")this.publishConfig.browser=ba(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(let[n,c]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(ba(n),typeof c==\"string\"?ba(c):c)}if(typeof e.publishConfig.registry==\"string\"&&(this.publishConfig.registry=e.publishConfig.registry),typeof e.publishConfig.provenance==\"boolean\"&&(this.publishConfig.provenance=e.publishConfig.provenance),typeof e.publishConfig.bin==\"string\")this.name!==null?this.publishConfig.bin=new Map([[this.name.name,ba(e.publishConfig.bin)]]):s.push(new Error(\"String bin field, but no attached package name\"));else if(typeof e.publishConfig.bin==\"object\"&&e.publishConfig.bin!==null){this.publishConfig.bin=new Map;for(let[n,c]of Object.entries(e.publishConfig.bin)){if(typeof c!=\"string\"){s.push(new Error(`Invalid bin definition for '${n}'`));continue}this.publishConfig.bin.set(n,ba(c))}}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(let n of e.publishConfig.executableFiles){if(typeof n!=\"string\"){s.push(new Error(\"Invalid executable file definition\"));continue}this.publishConfig.executableFiles.add(ba(n))}}}else this.publishConfig=null;if(typeof e.installConfig==\"object\"&&e.installConfig!==null){this.installConfig={};for(let n of Object.keys(e.installConfig))n===\"hoistingLimits\"?typeof e.installConfig.hoistingLimits==\"string\"?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:s.push(new Error(\"Invalid hoisting limits definition\")):n==\"selfReferences\"?typeof e.installConfig.selfReferences==\"boolean\"?this.installConfig.selfReferences=e.installConfig.selfReferences:s.push(new Error(\"Invalid selfReferences definition, must be a boolean value\")):s.push(new Error(`Unrecognized installConfig key: ${n}`))}else this.installConfig=null;if(typeof e.optionalDependencies==\"object\"&&e.optionalDependencies!==null)for(let[n,c]of Object.entries(e.optionalDependencies)){if(typeof c!=\"string\"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Sa(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.dependencies.set(p.identHash,p);let h=On(f,\"unknown\"),E=this.ensureDependencyMeta(h);Object.assign(E,{optional:!0})}typeof e.preferUnplugged==\"boolean\"?this.preferUnplugged=e.preferUnplugged:this.preferUnplugged=null,this.errors=s}getForScope(e){switch(e){case\"dependencies\":return this.dependencies;case\"devDependencies\":return this.devDependencies;case\"peerDependencies\":return this.peerDependencies;default:throw new Error(`Unsupported value (\"${e}\")`)}}hasConsumerDependency(e){return!!(this.dependencies.has(e.identHash)||this.peerDependencies.has(e.identHash))}hasHardDependency(e){return!!(this.dependencies.has(e.identHash)||this.devDependencies.has(e.identHash))}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!(this.hasHardDependency(e)||this.hasSoftDependency(e))}getConditions(){let e=[];return this.os&&this.os.length>0&&e.push(T8(\"os\",this.os)),this.cpu&&this.cpu.length>0&&e.push(T8(\"cpu\",this.cpu)),this.libc&&this.libc.length>0&&e.push(T8(\"libc\",this.libc)),e.length>0?e.join(\" & \"):null}ensureDependencyMeta(e){if(e.range!==\"unknown\"&&!Aue.default.valid(e.range))throw new Error(`Invalid meta field range for '${al(e)}'`);let r=un(e),s=e.range!==\"unknown\"?e.range:null,a=this.dependenciesMeta.get(r);a||this.dependenciesMeta.set(r,a=new Map);let n=a.get(s);return n||a.set(s,n={}),n}ensurePeerDependencyMeta(e){if(e.range!==\"unknown\")throw new Error(`Invalid meta field range for '${al(e)}'`);let r=un(e),s=this.peerDependenciesMeta.get(r);return s||this.peerDependenciesMeta.set(r,s={}),s}setRawField(e,r,{after:s=[]}={}){let a=new Set(s.filter(n=>Object.hasOwn(this.raw,n)));if(a.size===0||Object.hasOwn(this.raw,e))this.raw[e]=r;else{let n=this.raw,c=this.raw={},f=!1;for(let p of Object.keys(n))c[p]=n[p],f||(a.delete(p),a.size===0&&(c[e]=r,f=!0))}}exportTo(e,{compatibilityMode:r=!0}={}){if(Object.assign(e,this.raw),this.name!==null?e.name=un(this.name):delete e.name,this.version!==null?e.version=this.version:delete e.version,this.os!==null?e.os=this.os:delete e.os,this.cpu!==null?e.cpu=this.cpu:delete e.cpu,this.type!==null?e.type=this.type:delete e.type,this.packageManager!==null?e.packageManager=this.packageManager:delete e.packageManager,this.private?e.private=!0:delete e.private,this.license!==null?e.license=this.license:delete e.license,this.languageName!==null?e.languageName=this.languageName:delete e.languageName,this.main!==null?e.main=this.main:delete e.main,this.module!==null?e.module=this.module:delete e.module,this.browser!==null){let n=this.browser;typeof n==\"string\"?e.browser=n:n instanceof Map&&(e.browser=Object.assign({},...Array.from(n.keys()).sort().map(c=>({[c]:n.get(c)}))))}else delete e.browser;this.bin.size===1&&this.name!==null&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(n=>({[n]:this.bin.get(n)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:n})=>n)}:e.workspaces=this.workspaceDefinitions.map(({pattern:n})=>n):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;let s=[],a=[];for(let n of this.dependencies.values()){let c=this.dependenciesMeta.get(un(n)),f=!1;if(r&&c){let p=c.get(null);p&&p.optional&&(f=!0)}f?a.push(n):s.push(n)}s.length>0?e.dependencies=Object.assign({},...sI(s).map(n=>({[un(n)]:n.range}))):delete e.dependencies,a.length>0?e.optionalDependencies=Object.assign({},...sI(a).map(n=>({[un(n)]:n.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...sI(this.devDependencies.values()).map(n=>({[un(n)]:n.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...sI(this.peerDependencies.values()).map(n=>({[un(n)]:n.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(let[n,c]of qs(this.dependenciesMeta.entries(),([f,p])=>f))for(let[f,p]of qs(c.entries(),([h,E])=>h!==null?`0${h}`:\"1\")){let h=f!==null?al(On(Sa(n),f)):n,E={...p};r&&f===null&&delete E.optional,Object.keys(E).length!==0&&(e.dependenciesMeta[h]=E)}if(Object.keys(e.dependenciesMeta).length===0&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...qs(this.peerDependenciesMeta.entries(),([n,c])=>n).map(([n,c])=>({[n]:c}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:n,reference:c})=>({[hx(n)]:c}))):delete e.resolutions,this.files!==null?e.files=Array.from(this.files):delete e.files,this.preferUnplugged!==null?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,this.scripts!==null&&this.scripts.size>0){e.scripts??={};for(let n of Object.keys(e.scripts))this.scripts.has(n)||delete e.scripts[n];for(let[n,c]of this.scripts.entries())e.scripts[n]=c}else delete e.scripts;return e}}});function Aet(t){return typeof t.reportCode<\"u\"}var pue,hue,fet,jt,Ao,Tc=Xe(()=>{ql();pue=Ie(\"stream\"),hue=Ie(\"string_decoder\"),fet=15,jt=class extends Error{constructor(r,s,a){super(s);this.reportExtra=a;this.reportCode=r}};Ao=class{constructor(){this.cacheHits=new Set;this.cacheMisses=new Set;this.reportedInfos=new Set;this.reportedWarnings=new Set;this.reportedErrors=new Set}getRecommendedLength(){return 180}reportCacheHit(e){this.cacheHits.add(e.locatorHash)}reportCacheMiss(e,r){this.cacheMisses.add(e.locatorHash)}static progressViaCounter(e){let r=0,s,a=new Promise(p=>{s=p}),n=p=>{let h=s;a=new Promise(E=>{s=E}),r=p,h()},c=(p=0)=>{n(r+1)},f=async function*(){for(;r<e;)await a,yield{progress:r/e}}();return{[Symbol.asyncIterator](){return f},hasProgress:!0,hasTitle:!1,set:n,tick:c}}static progressViaTitle(){let e,r,s=new Promise(c=>{r=c}),a=Q4(c=>{let f=r;s=new Promise(p=>{r=p}),e=c,f()},1e3/fet),n=async function*(){for(;;)await s,yield{title:e}}();return{[Symbol.asyncIterator](){return n},hasProgress:!1,hasTitle:!0,setTitle:a}}async startProgressPromise(e,r){let s=this.reportProgress(e);try{return await r(e)}finally{s.stop()}}startProgressSync(e,r){let s=this.reportProgress(e);try{return r(e)}finally{s.stop()}}reportInfoOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedInfos.has(a)||(this.reportedInfos.add(a),this.reportInfo(e,r),s?.reportExtra?.(this))}reportWarningOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedWarnings.has(a)||(this.reportedWarnings.add(a),this.reportWarning(e,r),s?.reportExtra?.(this))}reportErrorOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedErrors.has(a)||(this.reportedErrors.add(a),this.reportError(e,r),s?.reportExtra?.(this))}reportExceptionOnce(e){Aet(e)?this.reportErrorOnce(e.reportCode,e.message,{key:e,reportExtra:e.reportExtra}):this.reportErrorOnce(1,e.stack||e.message,{key:e})}createStreamReporter(e=null){let r=new pue.PassThrough,s=new hue.StringDecoder,a=\"\";return r.on(\"data\",n=>{let c=s.write(n),f;do if(f=c.indexOf(`\n`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a=\"\",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(f!==-1);a+=c}),r.on(\"end\",()=>{let n=s.end();n!==\"\"&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var aI,R8=Xe(()=>{Tc();Wo();aI=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));return s||null}getFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));if(!s)throw new jt(11,`${Yr(r.project.configuration,e)} isn't supported by any available fetcher`);return s}}});var rm,F8=Xe(()=>{Wo();rm=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.getResolverByDescriptor(e,s).bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,s){return await this.getResolverByDescriptor(e,s).getCandidates(e,r,s)}async getSatisfying(e,r,s,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,s,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));return s||null}getResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!s)throw new Error(`${ni(r.project.configuration,e)} isn't supported by any available resolver`);return s}tryResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));return s||null}getResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));if(!s)throw new Error(`${Yr(r.project.configuration,e)} isn't supported by any available resolver`);return s}}});var lI,N8=Xe(()=>{Dt();Wo();lI=class{supports(e){return!!e.reference.startsWith(\"virtual:\")}getLocalPath(e,r){let s=e.reference.indexOf(\"#\");if(s===-1)throw new Error(\"Invalid virtual package reference\");let a=e.reference.slice(s+1),n=Ws(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let s=e.reference.indexOf(\"#\");if(s===-1)throw new Error(\"Invalid virtual package reference\");let a=e.reference.slice(s+1),n=Ws(e,a),c=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,c,r)}getLocatorFilename(e){return nI(e)}async ensureVirtualLink(e,r,s){let a=r.packageFs.getRealPath(),n=s.project.configuration.get(\"virtualFolder\"),c=this.getLocatorFilename(e),f=uo.makeVirtualPath(n,c,a),p=new _f(f,{baseFs:r.packageFs,pathUtils:J});return{...r,packageFs:p}}}});var FQ,gue=Xe(()=>{FQ=class t{static{this.protocol=\"virtual:\"}static isVirtualDescriptor(e){return!!e.range.startsWith(t.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(t.protocol)}supportsDescriptor(e,r){return t.isVirtualDescriptor(e)}supportsLocator(e,r){return t.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){throw new Error('Assertion failed: calling \"bindDescriptor\" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling \"getResolutionDependencies\" on a virtual descriptor is unsupported')}async getCandidates(e,r,s){throw new Error('Assertion failed: calling \"getCandidates\" on a virtual descriptor is unsupported')}async getSatisfying(e,r,s,a){throw new Error('Assertion failed: calling \"getSatisfying\" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling \"resolve\" on a virtual locator is unsupported')}}});var cI,O8=Xe(()=>{Dt();tm();cI=class{supports(e){return!!e.reference.startsWith(Ei.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let s=this.getWorkspace(e,r).cwd;return{packageFs:new Sn(s),prefixPath:vt.dot,localPath:s}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(Ei.protocol.length))}}});function WB(t){return typeof t==\"object\"&&t!==null&&!Array.isArray(t)}function due(t){return typeof t>\"u\"?3:WB(t)?0:Array.isArray(t)?1:2}function U8(t,e){return Object.hasOwn(t,e)}function het(t){return WB(t)&&U8(t,\"onConflict\")&&typeof t.onConflict==\"string\"}function get(t){if(typeof t>\"u\")return{onConflict:\"default\",value:t};if(!het(t))return{onConflict:\"default\",value:t};if(U8(t,\"value\"))return t;let{onConflict:e,...r}=t;return{onConflict:e,value:r}}function mue(t,e){let r=WB(t)&&U8(t,e)?t[e]:void 0;return get(r)}function uI(t,e){return[t,e,yue]}function _8(t){return Array.isArray(t)?t[2]===yue:!1}function L8(t,e){if(WB(t)){let r={};for(let s of Object.keys(t))r[s]=L8(t[s],e);return uI(e,r)}return Array.isArray(t)?uI(e,t.map(r=>L8(r,e))):uI(e,t)}function M8(t,e,r,s,a){let n,c=[],f=a,p=0;for(let E=a-1;E>=s;--E){let[C,S]=t[E],{onConflict:P,value:I}=mue(S,r),R=due(I);if(R!==3){if(n??=R,R!==n||P===\"hardReset\"){p=f;break}if(R===2)return uI(C,I);if(c.unshift([C,I]),P===\"reset\"){p=E;break}P===\"extend\"&&E===s&&(s=0),f=E}}if(typeof n>\"u\")return null;let h=c.map(([E])=>E).join(\", \");switch(n){case 1:return uI(h,new Array().concat(...c.map(([E,C])=>C.map(S=>L8(S,E)))));case 0:{let E=Object.assign({},...c.map(([,R])=>R)),C=Object.keys(E),S={},P=t.map(([R,N])=>[R,mue(N,r).value]),I=pet(P,([R,N])=>{let U=due(N);return U!==0&&U!==3});if(I!==-1){let R=P.slice(I+1);for(let N of C)S[N]=M8(R,e,N,0,R.length)}else for(let R of C)S[R]=M8(P,e,R,p,P.length);return uI(h,S)}default:throw new Error(\"Assertion failed: Non-extendable value type\")}}function Eue(t){return M8(t.map(([e,r])=>[e,{\".\":r}]),[],\".\",0,t.length)}function YB(t){return _8(t)?t[1]:t}function NQ(t){let e=_8(t)?t[1]:t;if(Array.isArray(e))return e.map(r=>NQ(r));if(WB(e)){let r={};for(let[s,a]of Object.entries(e))r[s]=NQ(a);return r}return e}function H8(t){return _8(t)?t[0]:null}var pet,yue,Iue=Xe(()=>{pet=(t,e,r)=>{let s=[...t];return s.reverse(),s.findIndex(e,r)};yue=Symbol()});var OQ={};Vt(OQ,{getDefaultGlobalFolder:()=>G8,getHomeFolder:()=>fI,isFolderInside:()=>q8});function G8(){if(process.platform===\"win32\"){let t=fe.toPortablePath(process.env.LOCALAPPDATA||fe.join((0,j8.homedir)(),\"AppData\",\"Local\"));return J.resolve(t,\"Yarn/Berry\")}if(process.env.XDG_DATA_HOME){let t=fe.toPortablePath(process.env.XDG_DATA_HOME);return J.resolve(t,\"yarn/berry\")}return J.resolve(fI(),\".yarn/berry\")}function fI(){return fe.toPortablePath((0,j8.homedir)()||\"/usr/local/share\")}function q8(t,e){let r=J.relative(e,t);return r&&!r.startsWith(\"..\")&&!J.isAbsolute(r)}var j8,LQ=Xe(()=>{Dt();j8=Ie(\"os\")});var Bue=_((EMt,wue)=>{\"use strict\";var W8=Ie(\"https\"),Y8=Ie(\"http\"),{URL:Cue}=Ie(\"url\"),V8=class extends Y8.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...a}=e;super(a),this.proxy=typeof r==\"string\"?new Cue(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){let s={...this.proxyRequestOptions,method:\"CONNECT\",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?\"keep-alive\":\"close\",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let n=Buffer.from(`${decodeURIComponent(this.proxy.username||\"\")}:${decodeURIComponent(this.proxy.password||\"\")}`).toString(\"base64\");s.headers[\"proxy-authorization\"]=`Basic ${n}`}this.proxy.protocol===\"https:\"&&(s.servername=this.proxy.hostname);let a=(this.proxy.protocol===\"http:\"?Y8:W8).request(s);a.once(\"connect\",(n,c,f)=>{a.removeAllListeners(),c.removeAllListeners(),n.statusCode===200?r(null,c):(c.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null))}),a.once(\"timeout\",()=>{a.destroy(new Error(\"Proxy timeout\"))}),a.once(\"error\",n=>{a.removeAllListeners(),r(n,null)}),a.end()}},J8=class extends W8.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...a}=e;super(a),this.proxy=typeof r==\"string\"?new Cue(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){let s={...this.proxyRequestOptions,method:\"CONNECT\",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?\"keep-alive\":\"close\",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let n=Buffer.from(`${decodeURIComponent(this.proxy.username||\"\")}:${decodeURIComponent(this.proxy.password||\"\")}`).toString(\"base64\");s.headers[\"proxy-authorization\"]=`Basic ${n}`}this.proxy.protocol===\"https:\"&&(s.servername=this.proxy.hostname);let a=(this.proxy.protocol===\"http:\"?Y8:W8).request(s);a.once(\"connect\",(n,c,f)=>{if(a.removeAllListeners(),c.removeAllListeners(),n.statusCode===200){let p=super.createConnection({...e,socket:c});r(null,p)}else c.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null)}),a.once(\"timeout\",()=>{a.destroy(new Error(\"Proxy timeout\"))}),a.once(\"error\",n=>{a.removeAllListeners(),r(n,null)}),a.end()}};wue.exports={HttpProxyAgent:V8,HttpsProxyAgent:J8}});var K8,vue,Sue,Due=Xe(()=>{K8=ut(Bue(),1),vue=K8.default.HttpProxyAgent,Sue=K8.default.HttpsProxyAgent});var Np=_((Fp,MQ)=>{\"use strict\";Object.defineProperty(Fp,\"__esModule\",{value:!0});var bue=[\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"];function met(t){return bue.includes(t)}var yet=[\"Function\",\"Generator\",\"AsyncGenerator\",\"GeneratorFunction\",\"AsyncGeneratorFunction\",\"AsyncFunction\",\"Observable\",\"Array\",\"Buffer\",\"Blob\",\"Object\",\"RegExp\",\"Date\",\"Error\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Promise\",\"URL\",\"FormData\",\"URLSearchParams\",\"HTMLElement\",...bue];function Eet(t){return yet.includes(t)}var Iet=[\"null\",\"undefined\",\"string\",\"number\",\"bigint\",\"boolean\",\"symbol\"];function Cet(t){return Iet.includes(t)}function AI(t){return e=>typeof e===t}var{toString:Pue}=Object.prototype,VB=t=>{let e=Pue.call(t).slice(8,-1);if(/HTML\\w+Element/.test(e)&&be.domElement(t))return\"HTMLElement\";if(Eet(e))return e},pi=t=>e=>VB(e)===t;function be(t){if(t===null)return\"null\";switch(typeof t){case\"undefined\":return\"undefined\";case\"string\":return\"string\";case\"number\":return\"number\";case\"boolean\":return\"boolean\";case\"function\":return\"Function\";case\"bigint\":return\"bigint\";case\"symbol\":return\"symbol\";default:}if(be.observable(t))return\"Observable\";if(be.array(t))return\"Array\";if(be.buffer(t))return\"Buffer\";let e=VB(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError(\"Please don't use object wrappers for primitive types\");return\"Object\"}be.undefined=AI(\"undefined\");be.string=AI(\"string\");var wet=AI(\"number\");be.number=t=>wet(t)&&!be.nan(t);be.bigint=AI(\"bigint\");be.function_=AI(\"function\");be.null_=t=>t===null;be.class_=t=>be.function_(t)&&t.toString().startsWith(\"class \");be.boolean=t=>t===!0||t===!1;be.symbol=AI(\"symbol\");be.numericString=t=>be.string(t)&&!be.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));be.array=(t,e)=>Array.isArray(t)?be.function_(e)?t.every(e):!0:!1;be.buffer=t=>{var e,r,s,a;return(a=(s=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||s===void 0?void 0:s.call(r,t))!==null&&a!==void 0?a:!1};be.blob=t=>pi(\"Blob\")(t);be.nullOrUndefined=t=>be.null_(t)||be.undefined(t);be.object=t=>!be.null_(t)&&(typeof t==\"object\"||be.function_(t));be.iterable=t=>{var e;return be.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};be.asyncIterable=t=>{var e;return be.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};be.generator=t=>{var e,r;return be.iterable(t)&&be.function_((e=t)===null||e===void 0?void 0:e.next)&&be.function_((r=t)===null||r===void 0?void 0:r.throw)};be.asyncGenerator=t=>be.asyncIterable(t)&&be.function_(t.next)&&be.function_(t.throw);be.nativePromise=t=>pi(\"Promise\")(t);var Bet=t=>{var e,r;return be.function_((e=t)===null||e===void 0?void 0:e.then)&&be.function_((r=t)===null||r===void 0?void 0:r.catch)};be.promise=t=>be.nativePromise(t)||Bet(t);be.generatorFunction=pi(\"GeneratorFunction\");be.asyncGeneratorFunction=t=>VB(t)===\"AsyncGeneratorFunction\";be.asyncFunction=t=>VB(t)===\"AsyncFunction\";be.boundFunction=t=>be.function_(t)&&!t.hasOwnProperty(\"prototype\");be.regExp=pi(\"RegExp\");be.date=pi(\"Date\");be.error=pi(\"Error\");be.map=t=>pi(\"Map\")(t);be.set=t=>pi(\"Set\")(t);be.weakMap=t=>pi(\"WeakMap\")(t);be.weakSet=t=>pi(\"WeakSet\")(t);be.int8Array=pi(\"Int8Array\");be.uint8Array=pi(\"Uint8Array\");be.uint8ClampedArray=pi(\"Uint8ClampedArray\");be.int16Array=pi(\"Int16Array\");be.uint16Array=pi(\"Uint16Array\");be.int32Array=pi(\"Int32Array\");be.uint32Array=pi(\"Uint32Array\");be.float32Array=pi(\"Float32Array\");be.float64Array=pi(\"Float64Array\");be.bigInt64Array=pi(\"BigInt64Array\");be.bigUint64Array=pi(\"BigUint64Array\");be.arrayBuffer=pi(\"ArrayBuffer\");be.sharedArrayBuffer=pi(\"SharedArrayBuffer\");be.dataView=pi(\"DataView\");be.enumCase=(t,e)=>Object.values(e).includes(t);be.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;be.urlInstance=t=>pi(\"URL\")(t);be.urlString=t=>{if(!be.string(t))return!1;try{return new URL(t),!0}catch{return!1}};be.truthy=t=>!!t;be.falsy=t=>!t;be.nan=t=>Number.isNaN(t);be.primitive=t=>be.null_(t)||Cet(typeof t);be.integer=t=>Number.isInteger(t);be.safeInteger=t=>Number.isSafeInteger(t);be.plainObject=t=>{if(Pue.call(t)!==\"[object Object]\")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})};be.typedArray=t=>met(VB(t));var vet=t=>be.safeInteger(t)&&t>=0;be.arrayLike=t=>!be.nullOrUndefined(t)&&!be.function_(t)&&vet(t.length);be.inRange=(t,e)=>{if(be.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(be.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var Det=1,bet=[\"innerHTML\",\"ownerDocument\",\"style\",\"attributes\",\"nodeValue\"];be.domElement=t=>be.object(t)&&t.nodeType===Det&&be.string(t.nodeName)&&!be.plainObject(t)&&bet.every(e=>e in t);be.observable=t=>{var e,r,s,a;return t?t===((r=(e=t)[Symbol.observable])===null||r===void 0?void 0:r.call(e))||t===((a=(s=t)[\"@@observable\"])===null||a===void 0?void 0:a.call(s)):!1};be.nodeStream=t=>be.object(t)&&be.function_(t.pipe)&&!be.observable(t);be.infinite=t=>t===1/0||t===-1/0;var xue=t=>e=>be.integer(e)&&Math.abs(e%2)===t;be.evenInteger=xue(0);be.oddInteger=xue(1);be.emptyArray=t=>be.array(t)&&t.length===0;be.nonEmptyArray=t=>be.array(t)&&t.length>0;be.emptyString=t=>be.string(t)&&t.length===0;var Pet=t=>be.string(t)&&!/\\S/.test(t);be.emptyStringOrWhitespace=t=>be.emptyString(t)||Pet(t);be.nonEmptyString=t=>be.string(t)&&t.length>0;be.nonEmptyStringAndNotWhitespace=t=>be.string(t)&&!be.emptyStringOrWhitespace(t);be.emptyObject=t=>be.object(t)&&!be.map(t)&&!be.set(t)&&Object.keys(t).length===0;be.nonEmptyObject=t=>be.object(t)&&!be.map(t)&&!be.set(t)&&Object.keys(t).length>0;be.emptySet=t=>be.set(t)&&t.size===0;be.nonEmptySet=t=>be.set(t)&&t.size>0;be.emptyMap=t=>be.map(t)&&t.size===0;be.nonEmptyMap=t=>be.map(t)&&t.size>0;be.propertyKey=t=>be.any([be.string,be.number,be.symbol],t);be.formData=t=>pi(\"FormData\")(t);be.urlSearchParams=t=>pi(\"URLSearchParams\")(t);var kue=(t,e,r)=>{if(!be.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError(\"Invalid number of values\");return t.call(r,e)};be.any=(t,...e)=>(be.array(t)?t:[t]).some(s=>kue(Array.prototype.some,s,e));be.all=(t,...e)=>kue(Array.prototype.every,t,e);var _t=(t,e,r,s={})=>{if(!t){let{multipleValues:a}=s,n=a?`received values of types ${[...new Set(r.map(c=>`\\`${be(c)}\\``))].join(\", \")}`:`received value of type \\`${be(r)}\\``;throw new TypeError(`Expected value which is \\`${e}\\`, ${n}.`)}};Fp.assert={undefined:t=>_t(be.undefined(t),\"undefined\",t),string:t=>_t(be.string(t),\"string\",t),number:t=>_t(be.number(t),\"number\",t),bigint:t=>_t(be.bigint(t),\"bigint\",t),function_:t=>_t(be.function_(t),\"Function\",t),null_:t=>_t(be.null_(t),\"null\",t),class_:t=>_t(be.class_(t),\"Class\",t),boolean:t=>_t(be.boolean(t),\"boolean\",t),symbol:t=>_t(be.symbol(t),\"symbol\",t),numericString:t=>_t(be.numericString(t),\"string with a number\",t),array:(t,e)=>{_t(be.array(t),\"Array\",t),e&&t.forEach(e)},buffer:t=>_t(be.buffer(t),\"Buffer\",t),blob:t=>_t(be.blob(t),\"Blob\",t),nullOrUndefined:t=>_t(be.nullOrUndefined(t),\"null or undefined\",t),object:t=>_t(be.object(t),\"Object\",t),iterable:t=>_t(be.iterable(t),\"Iterable\",t),asyncIterable:t=>_t(be.asyncIterable(t),\"AsyncIterable\",t),generator:t=>_t(be.generator(t),\"Generator\",t),asyncGenerator:t=>_t(be.asyncGenerator(t),\"AsyncGenerator\",t),nativePromise:t=>_t(be.nativePromise(t),\"native Promise\",t),promise:t=>_t(be.promise(t),\"Promise\",t),generatorFunction:t=>_t(be.generatorFunction(t),\"GeneratorFunction\",t),asyncGeneratorFunction:t=>_t(be.asyncGeneratorFunction(t),\"AsyncGeneratorFunction\",t),asyncFunction:t=>_t(be.asyncFunction(t),\"AsyncFunction\",t),boundFunction:t=>_t(be.boundFunction(t),\"Function\",t),regExp:t=>_t(be.regExp(t),\"RegExp\",t),date:t=>_t(be.date(t),\"Date\",t),error:t=>_t(be.error(t),\"Error\",t),map:t=>_t(be.map(t),\"Map\",t),set:t=>_t(be.set(t),\"Set\",t),weakMap:t=>_t(be.weakMap(t),\"WeakMap\",t),weakSet:t=>_t(be.weakSet(t),\"WeakSet\",t),int8Array:t=>_t(be.int8Array(t),\"Int8Array\",t),uint8Array:t=>_t(be.uint8Array(t),\"Uint8Array\",t),uint8ClampedArray:t=>_t(be.uint8ClampedArray(t),\"Uint8ClampedArray\",t),int16Array:t=>_t(be.int16Array(t),\"Int16Array\",t),uint16Array:t=>_t(be.uint16Array(t),\"Uint16Array\",t),int32Array:t=>_t(be.int32Array(t),\"Int32Array\",t),uint32Array:t=>_t(be.uint32Array(t),\"Uint32Array\",t),float32Array:t=>_t(be.float32Array(t),\"Float32Array\",t),float64Array:t=>_t(be.float64Array(t),\"Float64Array\",t),bigInt64Array:t=>_t(be.bigInt64Array(t),\"BigInt64Array\",t),bigUint64Array:t=>_t(be.bigUint64Array(t),\"BigUint64Array\",t),arrayBuffer:t=>_t(be.arrayBuffer(t),\"ArrayBuffer\",t),sharedArrayBuffer:t=>_t(be.sharedArrayBuffer(t),\"SharedArrayBuffer\",t),dataView:t=>_t(be.dataView(t),\"DataView\",t),enumCase:(t,e)=>_t(be.enumCase(t,e),\"EnumCase\",t),urlInstance:t=>_t(be.urlInstance(t),\"URL\",t),urlString:t=>_t(be.urlString(t),\"string with a URL\",t),truthy:t=>_t(be.truthy(t),\"truthy\",t),falsy:t=>_t(be.falsy(t),\"falsy\",t),nan:t=>_t(be.nan(t),\"NaN\",t),primitive:t=>_t(be.primitive(t),\"primitive\",t),integer:t=>_t(be.integer(t),\"integer\",t),safeInteger:t=>_t(be.safeInteger(t),\"integer\",t),plainObject:t=>_t(be.plainObject(t),\"plain object\",t),typedArray:t=>_t(be.typedArray(t),\"TypedArray\",t),arrayLike:t=>_t(be.arrayLike(t),\"array-like\",t),domElement:t=>_t(be.domElement(t),\"HTMLElement\",t),observable:t=>_t(be.observable(t),\"Observable\",t),nodeStream:t=>_t(be.nodeStream(t),\"Node.js Stream\",t),infinite:t=>_t(be.infinite(t),\"infinite number\",t),emptyArray:t=>_t(be.emptyArray(t),\"empty array\",t),nonEmptyArray:t=>_t(be.nonEmptyArray(t),\"non-empty array\",t),emptyString:t=>_t(be.emptyString(t),\"empty string\",t),emptyStringOrWhitespace:t=>_t(be.emptyStringOrWhitespace(t),\"empty string or whitespace\",t),nonEmptyString:t=>_t(be.nonEmptyString(t),\"non-empty string\",t),nonEmptyStringAndNotWhitespace:t=>_t(be.nonEmptyStringAndNotWhitespace(t),\"non-empty string and not whitespace\",t),emptyObject:t=>_t(be.emptyObject(t),\"empty object\",t),nonEmptyObject:t=>_t(be.nonEmptyObject(t),\"non-empty object\",t),emptySet:t=>_t(be.emptySet(t),\"empty set\",t),nonEmptySet:t=>_t(be.nonEmptySet(t),\"non-empty set\",t),emptyMap:t=>_t(be.emptyMap(t),\"empty map\",t),nonEmptyMap:t=>_t(be.nonEmptyMap(t),\"non-empty map\",t),propertyKey:t=>_t(be.propertyKey(t),\"PropertyKey\",t),formData:t=>_t(be.formData(t),\"FormData\",t),urlSearchParams:t=>_t(be.urlSearchParams(t),\"URLSearchParams\",t),evenInteger:t=>_t(be.evenInteger(t),\"even integer\",t),oddInteger:t=>_t(be.oddInteger(t),\"odd integer\",t),directInstanceOf:(t,e)=>_t(be.directInstanceOf(t,e),\"T\",t),inRange:(t,e)=>_t(be.inRange(t,e),\"in range\",t),any:(t,...e)=>_t(be.any(t,...e),\"predicate returns truthy for any value\",e,{multipleValues:!0}),all:(t,...e)=>_t(be.all(t,...e),\"predicate returns truthy for all values\",e,{multipleValues:!0})};Object.defineProperties(be,{class:{value:be.class_},function:{value:be.function_},null:{value:be.null_}});Object.defineProperties(Fp.assert,{class:{value:Fp.assert.class_},function:{value:Fp.assert.function_},null:{value:Fp.assert.null_}});Fp.default=be;MQ.exports=be;MQ.exports.default=be;MQ.exports.assert=Fp.assert});var Que=_((CMt,z8)=>{\"use strict\";var UQ=class extends Error{constructor(e){super(e||\"Promise was canceled\"),this.name=\"CancelError\"}get isCanceled(){return!0}},_Q=class t{static fn(e){return(...r)=>new t((s,a,n)=>{r.push(n),e(...r).then(s,a)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,s)=>{this._reject=s;let a=f=>{this._isPending=!1,r(f)},n=f=>{this._isPending=!1,s(f)},c=f=>{if(!this._isPending)throw new Error(\"The `onCancel` handler was attached after the promise settled.\");this._cancelHandlers.push(f)};return Object.defineProperties(c,{shouldReject:{get:()=>this._rejectOnCancel,set:f=>{this._rejectOnCancel=f}}}),e(a,n,c)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r)}this._isCanceled=!0,this._rejectOnCancel&&this._reject(new UQ(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(_Q.prototype,Promise.prototype);z8.exports=_Q;z8.exports.CancelError=UQ});var Tue=_((Z8,$8)=>{\"use strict\";Object.defineProperty(Z8,\"__esModule\",{value:!0});function xet(t){return t.encrypted}var X8=(t,e)=>{let r;typeof e==\"function\"?r={connect:e}:r=e;let s=typeof r.connect==\"function\",a=typeof r.secureConnect==\"function\",n=typeof r.close==\"function\",c=()=>{s&&r.connect(),xet(t)&&a&&(t.authorized?r.secureConnect():t.authorizationError||t.once(\"secureConnect\",r.secureConnect)),n&&t.once(\"close\",r.close)};t.writable&&!t.connecting?c():t.connecting?t.once(\"connect\",c):t.destroyed&&n&&r.close(t._hadError)};Z8.default=X8;$8.exports=X8;$8.exports.default=X8});var Rue=_((tH,rH)=>{\"use strict\";Object.defineProperty(tH,\"__esModule\",{value:!0});var ket=Tue(),Qet=Number(process.versions.node.split(\".\")[0]),eH=t=>{let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;let r=c=>{let f=c.emit.bind(c);c.emit=(p,...h)=>(p===\"error\"&&(e.error=Date.now(),e.phases.total=e.error-e.start,c.emit=f),f(p,...h))};r(t),t.prependOnceListener(\"abort\",()=>{e.abort=Date.now(),(!e.response||Qet>=13)&&(e.phases.total=Date.now()-e.start)});let s=c=>{e.socket=Date.now(),e.phases.wait=e.socket-e.start;let f=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};c.prependOnceListener(\"lookup\",f),ket.default(c,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(c.removeListener(\"lookup\",f),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};t.socket?s(t.socket):t.prependOnceListener(\"socket\",s);let a=()=>{var c;e.upload=Date.now(),e.phases.request=e.upload-(c=e.secureConnect,c??e.connect)};return(typeof t.writableFinished==\"boolean\"?t.writableFinished:t.finished&&t.outputSize===0&&(!t.socket||t.socket.writableLength===0))?a():t.prependOnceListener(\"finish\",a),t.prependOnceListener(\"response\",c=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,c.timings=e,r(c),c.prependOnceListener(\"end\",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start})}),e};tH.default=eH;rH.exports=eH;rH.exports.default=eH});var _ue=_((wMt,sH)=>{\"use strict\";var{V4MAPPED:Tet,ADDRCONFIG:Ret,ALL:Uue,promises:{Resolver:Fue},lookup:Fet}=Ie(\"dns\"),{promisify:nH}=Ie(\"util\"),Net=Ie(\"os\"),pI=Symbol(\"cacheableLookupCreateConnection\"),iH=Symbol(\"cacheableLookupInstance\"),Nue=Symbol(\"expires\"),Oet=typeof Uue==\"number\",Oue=t=>{if(!(t&&typeof t.createConnection==\"function\"))throw new Error(\"Expected an Agent instance as the first argument\")},Let=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},Lue=()=>{let t=!1,e=!1;for(let r of Object.values(Net.networkInterfaces()))for(let s of r)if(!s.internal&&(s.family===\"IPv6\"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},Met=t=>Symbol.iterator in t,Mue={ttl:!0},Uet={all:!0},HQ=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:s=3600,errorTtl:a=.15,resolver:n=new Fue,lookup:c=Fet}={}){if(this.maxTtl=r,this.errorTtl=a,this._cache=e,this._resolver=n,this._dnsLookup=nH(c),this._resolver instanceof Fue?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=nH(this._resolver.resolve4.bind(this._resolver)),this._resolve6=nH(this._resolver.resolve6.bind(this._resolver))),this._iface=Lue(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,s<1)this._fallback=!1;else{this._fallback=!0;let f=setInterval(()=>{this._hostnamesToFallback.clear()},s*1e3);f.unref&&f.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,s){if(typeof r==\"function\"?(s=r,r={}):typeof r==\"number\"&&(r={family:r}),!s)throw new Error(\"Callback must be a function.\");this.lookupAsync(e,r).then(a=>{r.all?s(null,a):s(null,a.address,a.family,a.expires,a.ttl)},s)}async lookupAsync(e,r={}){typeof r==\"number\"&&(r={family:r});let s=await this.query(e);if(r.family===6){let a=s.filter(n=>n.family===6);r.hints&Tet&&(Oet&&r.hints&Uue||a.length===0)?Let(s):s=a}else r.family===4&&(s=s.filter(a=>a.family===4));if(r.hints&Ret){let{_iface:a}=this;s=s.filter(n=>n.family===6?a.has6:a.has4)}if(s.length===0){let a=new Error(`cacheableLookup ENOTFOUND ${e}`);throw a.code=\"ENOTFOUND\",a.hostname=e,a}return r.all?s:s[0]}async query(e){let r=await this._cache.get(e);if(!r){let s=this._pending[e];if(s)r=await s;else{let a=this.queryAndCache(e);this._pending[e]=a,r=await a}}return r=r.map(s=>({...s})),r}async _resolve(e){let r=async h=>{try{return await h}catch(E){if(E.code===\"ENODATA\"||E.code===\"ENOTFOUND\")return[];throw E}},[s,a]=await Promise.all([this._resolve4(e,Mue),this._resolve6(e,Mue)].map(h=>r(h))),n=0,c=0,f=0,p=Date.now();for(let h of s)h.family=4,h.expires=p+h.ttl*1e3,n=Math.max(n,h.ttl);for(let h of a)h.family=6,h.expires=p+h.ttl*1e3,c=Math.max(c,h.ttl);return s.length>0?a.length>0?f=Math.min(n,c):f=n:f=c,{entries:[...s,...a],cacheTtl:f}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,s){if(this.maxTtl>0&&s>0){s=Math.min(s,this.maxTtl)*1e3,r[Nue]=Date.now()+s;try{await this._cache.set(e,r,s)}catch(a){this.lookupAsync=async()=>{let n=new Error(\"Cache Error. Please recreate the CacheableLookup instance.\");throw n.cause=a,n}}Met(this._cache)&&this._tick(s)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Uet);try{let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));let s=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,s),delete this._pending[e],r.entries}catch(r){throw delete this._pending[e],r}}_tick(e){let r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let s=1/0,a=Date.now();for(let[n,c]of this._cache){let f=c[Nue];a>=f?this._cache.delete(n):f<s&&(s=f)}s!==1/0&&this._tick(s-a)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Oue(e),pI in e)throw new Error(\"CacheableLookup has been already installed\");e[pI]=e.createConnection,e[iH]=this,e.createConnection=(r,s)=>(\"lookup\"in r||(r.lookup=this.lookup),e[pI](r,s))}uninstall(e){if(Oue(e),e[pI]){if(e[iH]!==this)throw new Error(\"The agent is not owned by this CacheableLookup instance\");e.createConnection=e[pI],delete e[pI],delete e[iH]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=Lue(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};sH.exports=HQ;sH.exports.default=HQ});var Gue=_((BMt,oH)=>{\"use strict\";var _et=typeof URL>\"u\"?Ie(\"url\").URL:URL,Het=\"text/plain\",jet=\"us-ascii\",Hue=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),Get=(t,{stripHash:e})=>{let r=t.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!r)throw new Error(`Invalid URL: ${t}`);let s=r[1].split(\";\"),a=r[2],n=e?\"\":r[3],c=!1;s[s.length-1]===\"base64\"&&(s.pop(),c=!0);let f=(s.shift()||\"\").toLowerCase(),h=[...s.map(E=>{let[C,S=\"\"]=E.split(\"=\").map(P=>P.trim());return C===\"charset\"&&(S=S.toLowerCase(),S===jet)?\"\":`${C}${S?`=${S}`:\"\"}`}).filter(Boolean)];return c&&h.push(\"base64\"),(h.length!==0||f&&f!==Het)&&h.unshift(f),`data:${h.join(\";\")},${c?a.trim():a}${n?`#${n}`:\"\"}`},jue=(t,e)=>{if(e={defaultProtocol:\"http:\",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},Reflect.has(e,\"normalizeHttps\"))throw new Error(\"options.normalizeHttps is renamed to options.forceHttp\");if(Reflect.has(e,\"normalizeHttp\"))throw new Error(\"options.normalizeHttp is renamed to options.forceHttps\");if(Reflect.has(e,\"stripFragment\"))throw new Error(\"options.stripFragment is renamed to options.stripHash\");if(t=t.trim(),/^data:/i.test(t))return Get(t,e);let r=t.startsWith(\"//\");!r&&/^\\.*\\//.test(t)||(t=t.replace(/^(?!(?:\\w+:)?\\/\\/)|^\\/\\//,e.defaultProtocol));let a=new _et(t);if(e.forceHttp&&e.forceHttps)throw new Error(\"The `forceHttp` and `forceHttps` options cannot be used together\");if(e.forceHttp&&a.protocol===\"https:\"&&(a.protocol=\"http:\"),e.forceHttps&&a.protocol===\"http:\"&&(a.protocol=\"https:\"),e.stripAuthentication&&(a.username=\"\",a.password=\"\"),e.stripHash&&(a.hash=\"\"),a.pathname&&(a.pathname=a.pathname.replace(/((?!:).|^)\\/{2,}/g,(n,c)=>/^(?!\\/)/g.test(c)?`${c}/`:\"/\")),a.pathname&&(a.pathname=decodeURI(a.pathname)),e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let n=a.pathname.split(\"/\"),c=n[n.length-1];Hue(c,e.removeDirectoryIndex)&&(n=n.slice(0,n.length-1),a.pathname=n.slice(1).join(\"/\")+\"/\")}if(a.hostname&&(a.hostname=a.hostname.replace(/\\.$/,\"\"),e.stripWWW&&/^www\\.([a-z\\-\\d]{2,63})\\.([a-z.]{2,5})$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\\./,\"\"))),Array.isArray(e.removeQueryParameters))for(let n of[...a.searchParams.keys()])Hue(n,e.removeQueryParameters)&&a.searchParams.delete(n);return e.sortQueryParameters&&a.searchParams.sort(),e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\\/$/,\"\")),t=a.toString(),(e.removeTrailingSlash||a.pathname===\"/\")&&a.hash===\"\"&&(t=t.replace(/\\/$/,\"\")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\\/\\//,\"//\")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\\/\\//,\"\")),t};oH.exports=jue;oH.exports.default=jue});var Yue=_((vMt,Wue)=>{Wue.exports=que;function que(t,e){if(t&&e)return que(t)(e);if(typeof t!=\"function\")throw new TypeError(\"need wrapper function\");return Object.keys(t).forEach(function(s){r[s]=t[s]}),r;function r(){for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];var n=t.apply(this,s),c=s[s.length-1];return typeof n==\"function\"&&n!==c&&Object.keys(c).forEach(function(f){n[f]=c[f]}),n}}});var lH=_((SMt,aH)=>{var Vue=Yue();aH.exports=Vue(jQ);aH.exports.strict=Vue(Jue);jQ.proto=jQ(function(){Object.defineProperty(Function.prototype,\"once\",{value:function(){return jQ(this)},configurable:!0}),Object.defineProperty(Function.prototype,\"onceStrict\",{value:function(){return Jue(this)},configurable:!0})});function jQ(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function Jue(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||\"Function wrapped with `once`\";return e.onceError=r+\" shouldn't be called more than once\",e.called=!1,e}});var cH=_((DMt,zue)=>{var qet=lH(),Wet=function(){},Yet=function(t){return t.setHeader&&typeof t.abort==\"function\"},Vet=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},Kue=function(t,e,r){if(typeof e==\"function\")return Kue(t,null,e);e||(e={}),r=qet(r||Wet);var s=t._writableState,a=t._readableState,n=e.readable||e.readable!==!1&&t.readable,c=e.writable||e.writable!==!1&&t.writable,f=function(){t.writable||p()},p=function(){c=!1,n||r.call(t)},h=function(){n=!1,c||r.call(t)},E=function(I){r.call(t,I?new Error(\"exited with error code: \"+I):null)},C=function(I){r.call(t,I)},S=function(){if(n&&!(a&&a.ended))return r.call(t,new Error(\"premature close\"));if(c&&!(s&&s.ended))return r.call(t,new Error(\"premature close\"))},P=function(){t.req.on(\"finish\",p)};return Yet(t)?(t.on(\"complete\",p),t.on(\"abort\",S),t.req?P():t.on(\"request\",P)):c&&!s&&(t.on(\"end\",f),t.on(\"close\",f)),Vet(t)&&t.on(\"exit\",E),t.on(\"end\",h),t.on(\"finish\",p),e.error!==!1&&t.on(\"error\",C),t.on(\"close\",S),function(){t.removeListener(\"complete\",p),t.removeListener(\"abort\",S),t.removeListener(\"request\",P),t.req&&t.req.removeListener(\"finish\",p),t.removeListener(\"end\",f),t.removeListener(\"close\",f),t.removeListener(\"finish\",p),t.removeListener(\"exit\",E),t.removeListener(\"end\",h),t.removeListener(\"error\",C),t.removeListener(\"close\",S)}};zue.exports=Kue});var $ue=_((bMt,Zue)=>{var Jet=lH(),Ket=cH(),uH=Ie(\"fs\"),JB=function(){},zet=/^v?\\.0/.test(process.version),GQ=function(t){return typeof t==\"function\"},Xet=function(t){return!zet||!uH?!1:(t instanceof(uH.ReadStream||JB)||t instanceof(uH.WriteStream||JB))&&GQ(t.close)},Zet=function(t){return t.setHeader&&GQ(t.abort)},$et=function(t,e,r,s){s=Jet(s);var a=!1;t.on(\"close\",function(){a=!0}),Ket(t,{readable:e,writable:r},function(c){if(c)return s(c);a=!0,s()});var n=!1;return function(c){if(!a&&!n){if(n=!0,Xet(t))return t.close(JB);if(Zet(t))return t.abort();if(GQ(t.destroy))return t.destroy();s(c||new Error(\"stream was destroyed\"))}}},Xue=function(t){t()},ett=function(t,e){return t.pipe(e)},ttt=function(){var t=Array.prototype.slice.call(arguments),e=GQ(t[t.length-1]||JB)&&t.pop()||JB;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error(\"pump requires two streams per minimum\");var r,s=t.map(function(a,n){var c=n<t.length-1,f=n>0;return $et(a,c,f,function(p){r||(r=p),p&&s.forEach(Xue),!c&&(s.forEach(Xue),e(r))})});return t.reduce(ett)};Zue.exports=ttt});var tfe=_((PMt,efe)=>{\"use strict\";var{PassThrough:rtt}=Ie(\"stream\");efe.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,s=r===\"buffer\",a=!1;e?a=!(r||s):r=r||\"utf8\",s&&(r=null);let n=new rtt({objectMode:a});r&&n.setEncoding(r);let c=0,f=[];return n.on(\"data\",p=>{f.push(p),a?c=f.length:c+=p.length}),n.getBufferedValue=()=>e?f:s?Buffer.concat(f,c):f.join(\"\"),n.getBufferedLength=()=>c,n}});var rfe=_((xMt,hI)=>{\"use strict\";var ntt=$ue(),itt=tfe(),qQ=class extends Error{constructor(){super(\"maxBuffer exceeded\"),this.name=\"MaxBufferError\"}};async function WQ(t,e){if(!t)return Promise.reject(new Error(\"Expected a stream\"));e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,s;return await new Promise((a,n)=>{let c=f=>{f&&(f.bufferedData=s.getBufferedValue()),n(f)};s=ntt(t,itt(e),f=>{if(f){c(f);return}a()}),s.on(\"data\",()=>{s.getBufferedLength()>r&&c(new qQ)})}),s.getBufferedValue()}hI.exports=WQ;hI.exports.default=WQ;hI.exports.buffer=(t,e)=>WQ(t,{...e,encoding:\"buffer\"});hI.exports.array=(t,e)=>WQ(t,{...e,array:!0});hI.exports.MaxBufferError=qQ});var ife=_((QMt,nfe)=>{\"use strict\";var stt=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),ott=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),att=new Set([500,502,503,504]),ltt={date:!0,connection:!0,\"keep-alive\":!0,\"proxy-authenticate\":!0,\"proxy-authorization\":!0,te:!0,trailer:!0,\"transfer-encoding\":!0,upgrade:!0},ctt={\"content-length\":!0,\"content-encoding\":!0,\"transfer-encoding\":!0,\"content-range\":!0};function nm(t){let e=parseInt(t,10);return isFinite(e)?e:0}function utt(t){return t?att.has(t.status):!0}function fH(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let s of r){let[a,n]=s.split(/=/,2);e[a.trim()]=n===void 0?!0:n.trim().replace(/^\"|\"$/g,\"\")}return e}function ftt(t){let e=[];for(let r in t){let s=t[r];e.push(s===!0?r:r+\"=\"+s)}if(e.length)return e.join(\", \")}nfe.exports=class{constructor(e,r,{shared:s,cacheHeuristic:a,immutableMinTimeToLive:n,ignoreCargoCult:c,_fromObject:f}={}){if(f){this._fromObject(f);return}if(!r||!r.headers)throw Error(\"Response headers missing\");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=s!==!1,this._cacheHeuristic=a!==void 0?a:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status=\"status\"in r?r.status:200,this._resHeaders=r.headers,this._rescc=fH(r.headers[\"cache-control\"]),this._method=\"method\"in e?e.method:\"GET\",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=fH(e.headers[\"cache-control\"]),c&&\"pre-check\"in this._rescc&&\"post-check\"in this._rescc&&(delete this._rescc[\"pre-check\"],delete this._rescc[\"post-check\"],delete this._rescc[\"no-cache\"],delete this._rescc[\"no-store\"],delete this._rescc[\"must-revalidate\"],this._resHeaders=Object.assign({},this._resHeaders,{\"cache-control\":ftt(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers[\"cache-control\"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc[\"no-cache\"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc[\"no-store\"]&&(this._method===\"GET\"||this._method===\"HEAD\"||this._method===\"POST\"&&this._hasExplicitExpiration())&&ott.has(this._status)&&!this._rescc[\"no-store\"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc[\"max-age\"]||this._isShared&&this._rescc[\"s-maxage\"]||this._rescc.public||stt.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc[\"s-maxage\"]||this._rescc[\"max-age\"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error(\"Request headers missing\")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=fH(e.headers[\"cache-control\"]);return r[\"no-cache\"]||/no-cache/.test(e.headers.pragma)||r[\"max-age\"]&&this.age()>r[\"max-age\"]||r[\"min-fresh\"]&&this.timeToLive()<1e3*r[\"min-fresh\"]||this.stale()&&!(r[\"max-stale\"]&&!this._rescc[\"must-revalidate\"]&&(r[\"max-stale\"]===!0||r[\"max-stale\"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method===\"HEAD\")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc[\"must-revalidate\"]||this._rescc.public||this._rescc[\"s-maxage\"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary===\"*\")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\\s*,\\s*/);for(let s of r)if(e.headers[s]!==this._reqHeaders[s])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let s in e)ltt[s]||(r[s]=e[s]);if(e.connection){let s=e.connection.trim().split(/\\s*,\\s*/);for(let a of s)delete r[a]}if(r.warning){let s=r.warning.split(/,/).filter(a=>!/^\\s*1[0-9][0-9]/.test(a));s.length?r.warning=s.join(\",\").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:\"\")+'113 - \"rfc7234 5.5.4\"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return nm(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc[\"no-cache\"]||this._isShared&&this._resHeaders[\"set-cookie\"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary===\"*\")return 0;if(this._isShared){if(this._rescc[\"proxy-revalidate\"])return 0;if(this._rescc[\"s-maxage\"])return nm(this._rescc[\"s-maxage\"])}if(this._rescc[\"max-age\"])return nm(this._rescc[\"max-age\"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let s=Date.parse(this._resHeaders.expires);return Number.isNaN(s)||s<r?0:Math.max(e,(s-r)/1e3)}if(this._resHeaders[\"last-modified\"]){let s=Date.parse(this._resHeaders[\"last-modified\"]);if(isFinite(s)&&r>s)return Math.max(e,(r-s)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+nm(this._rescc[\"stale-if-error\"]),s=e+nm(this._rescc[\"stale-while-revalidate\"]);return Math.max(0,e,r,s)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+nm(this._rescc[\"stale-if-error\"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+nm(this._rescc[\"stale-while-revalidate\"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error(\"Reinitialized\");if(!e||e.v!==1)throw Error(\"Invalid serialization\");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r[\"if-range\"],!this._requestMatches(e,!0)||!this.storable())return delete r[\"if-none-match\"],delete r[\"if-modified-since\"],r;if(this._resHeaders.etag&&(r[\"if-none-match\"]=r[\"if-none-match\"]?`${r[\"if-none-match\"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r[\"accept-ranges\"]||r[\"if-match\"]||r[\"if-unmodified-since\"]||this._method&&this._method!=\"GET\"){if(delete r[\"if-modified-since\"],r[\"if-none-match\"]){let a=r[\"if-none-match\"].split(/,/).filter(n=>!/^\\s*W\\//.test(n));a.length?r[\"if-none-match\"]=a.join(\",\").trim():delete r[\"if-none-match\"]}}else this._resHeaders[\"last-modified\"]&&!r[\"if-modified-since\"]&&(r[\"if-modified-since\"]=this._resHeaders[\"last-modified\"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&utt(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error(\"Response headers missing\");let s=!1;if(r.status!==void 0&&r.status!=304?s=!1:r.headers.etag&&!/^\\s*W\\//.test(r.headers.etag)?s=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\\s*W\\//,\"\")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?s=this._resHeaders.etag.replace(/^\\s*W\\//,\"\")===r.headers.etag.replace(/^\\s*W\\//,\"\"):this._resHeaders[\"last-modified\"]?s=this._resHeaders[\"last-modified\"]===r.headers[\"last-modified\"]:!this._resHeaders.etag&&!this._resHeaders[\"last-modified\"]&&!r.headers.etag&&!r.headers[\"last-modified\"]&&(s=!0),!s)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let a={};for(let c in this._resHeaders)a[c]=c in r.headers&&!ctt[c]?r.headers[c]:this._resHeaders[c];let n=Object.assign({},r,{status:this._status,method:this._method,headers:a});return{policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var YQ=_((TMt,sfe)=>{\"use strict\";sfe.exports=t=>{let e={};for(let[r,s]of Object.entries(t))e[r.toLowerCase()]=s;return e}});var afe=_((RMt,ofe)=>{\"use strict\";var Att=Ie(\"stream\").Readable,ptt=YQ(),AH=class extends Att{constructor(e,r,s,a){if(typeof e!=\"number\")throw new TypeError(\"Argument `statusCode` should be a number\");if(typeof r!=\"object\")throw new TypeError(\"Argument `headers` should be an object\");if(!(s instanceof Buffer))throw new TypeError(\"Argument `body` should be a buffer\");if(typeof a!=\"string\")throw new TypeError(\"Argument `url` should be a string\");super(),this.statusCode=e,this.headers=ptt(r),this.body=s,this.url=a}_read(){this.push(this.body),this.push(null)}};ofe.exports=AH});var cfe=_((FMt,lfe)=>{\"use strict\";var htt=[\"destroy\",\"setTimeout\",\"socket\",\"headers\",\"trailers\",\"rawHeaders\",\"statusCode\",\"httpVersion\",\"httpVersionMinor\",\"httpVersionMajor\",\"rawTrailers\",\"statusMessage\"];lfe.exports=(t,e)=>{let r=new Set(Object.keys(t).concat(htt));for(let s of r)s in e||(e[s]=typeof t[s]==\"function\"?t[s].bind(t):t[s])}});var ffe=_((NMt,ufe)=>{\"use strict\";var gtt=Ie(\"stream\").PassThrough,dtt=cfe(),mtt=t=>{if(!(t&&t.pipe))throw new TypeError(\"Parameter `response` must be a response stream.\");let e=new gtt;return dtt(t,e),t.pipe(e)};ufe.exports=mtt});var Afe=_(pH=>{pH.stringify=function t(e){if(typeof e>\"u\")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(\":base64:\"+e.toString(\"base64\"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e==\"object\"){var r=\"\",s=Array.isArray(e);r=s?\"[\":\"{\";var a=!0;for(var n in e){var c=typeof e[n]==\"function\"||!s&&typeof e[n]>\"u\";Object.hasOwnProperty.call(e,n)&&!c&&(a||(r+=\",\"),a=!1,s?e[n]==null?r+=\"null\":r+=t(e[n]):e[n]!==void 0&&(r+=t(n)+\":\"+t(e[n])))}return r+=s?\"]\":\"}\",r}else return typeof e==\"string\"?JSON.stringify(/^:/.test(e)?\":\"+e:e):typeof e>\"u\"?\"null\":JSON.stringify(e)};pH.parse=function(t){return JSON.parse(t,function(e,r){return typeof r==\"string\"?/^:base64:/.test(r)?Buffer.from(r.substring(8),\"base64\"):/^:/.test(r)?r.substring(1):r:r})}});var dfe=_((LMt,gfe)=>{\"use strict\";var ytt=Ie(\"events\"),pfe=Afe(),Ett=t=>{let e={redis:\"@keyv/redis\",rediss:\"@keyv/redis\",mongodb:\"@keyv/mongo\",mongo:\"@keyv/mongo\",sqlite:\"@keyv/sqlite\",postgresql:\"@keyv/postgres\",postgres:\"@keyv/postgres\",mysql:\"@keyv/mysql\",etcd:\"@keyv/etcd\",offline:\"@keyv/offline\",tiered:\"@keyv/tiered\"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(Ie(e[r]))(t)}return new Map},hfe=[\"sqlite\",\"postgres\",\"mysql\",\"mongo\",\"redis\",\"tiered\"],hH=class extends ytt{constructor(e,{emitErrors:r=!0,...s}={}){if(super(),this.opts={namespace:\"keyv\",serialize:pfe.stringify,deserialize:pfe.parse,...typeof e==\"string\"?{uri:e}:e,...s},!this.opts.store){let n={...this.opts};this.opts.store=Ett(n)}if(this.opts.compression){let n=this.opts.compression;this.opts.serialize=n.serialize.bind(n),this.opts.deserialize=n.deserialize.bind(n)}typeof this.opts.store.on==\"function\"&&r&&this.opts.store.on(\"error\",n=>this.emit(\"error\",n)),this.opts.store.namespace=this.opts.namespace;let a=n=>async function*(){for await(let[c,f]of typeof n==\"function\"?n(this.opts.store.namespace):n){let p=await this.opts.deserialize(f);if(!(this.opts.store.namespace&&!c.includes(this.opts.store.namespace))){if(typeof p.expires==\"number\"&&Date.now()>p.expires){this.delete(c);continue}yield[this._getKeyUnprefix(c),p.value]}}};typeof this.opts.store[Symbol.iterator]==\"function\"&&this.opts.store instanceof Map?this.iterator=a(this.opts.store):typeof this.opts.store.iterator==\"function\"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=a(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return hfe.includes(this.opts.store.opts.dialect)||hfe.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(\":\").splice(1).join(\":\")}get(e,r){let{store:s}=this.opts,a=Array.isArray(e),n=a?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(a&&s.getMany===void 0){let c=[];for(let f of n)c.push(Promise.resolve().then(()=>s.get(f)).then(p=>typeof p==\"string\"?this.opts.deserialize(p):this.opts.compression?this.opts.deserialize(p):p).then(p=>{if(p!=null)return typeof p.expires==\"number\"&&Date.now()>p.expires?this.delete(f).then(()=>{}):r&&r.raw?p:p.value}));return Promise.allSettled(c).then(f=>{let p=[];for(let h of f)p.push(h.value);return p})}return Promise.resolve().then(()=>a?s.getMany(n):s.get(n)).then(c=>typeof c==\"string\"?this.opts.deserialize(c):this.opts.compression?this.opts.deserialize(c):c).then(c=>{if(c!=null)return a?c.map((f,p)=>{if(typeof f==\"string\"&&(f=this.opts.deserialize(f)),f!=null){if(typeof f.expires==\"number\"&&Date.now()>f.expires){this.delete(e[p]).then(()=>{});return}return r&&r.raw?f:f.value}}):typeof c.expires==\"number\"&&Date.now()>c.expires?this.delete(e).then(()=>{}):r&&r.raw?c:c.value})}set(e,r,s){let a=this._getKeyPrefix(e);typeof s>\"u\"&&(s=this.opts.ttl),s===0&&(s=void 0);let{store:n}=this.opts;return Promise.resolve().then(()=>{let c=typeof s==\"number\"?Date.now()+s:null;return typeof r==\"symbol\"&&this.emit(\"error\",\"symbol cannot be serialized\"),r={value:r,expires:c},this.opts.serialize(r)}).then(c=>n.set(a,c,s)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let a=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let n=[];for(let c of a)n.push(r.delete(c));return Promise.allSettled(n).then(c=>c.every(f=>f.value===!0))}return Promise.resolve().then(()=>r.deleteMany(a))}let s=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(s))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:s}=this.opts;return Promise.resolve().then(async()=>typeof s.has==\"function\"?s.has(r):await s.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect==\"function\")return e.disconnect()}};gfe.exports=hH});var Efe=_((UMt,yfe)=>{\"use strict\";var Itt=Ie(\"events\"),VQ=Ie(\"url\"),Ctt=Gue(),wtt=rfe(),gH=ife(),mfe=afe(),Btt=YQ(),vtt=ffe(),Stt=dfe(),KB=class t{constructor(e,r){if(typeof e!=\"function\")throw new TypeError(\"Parameter `request` must be a function\");return this.cache=new Stt({uri:typeof r==\"string\"&&r,store:typeof r!=\"string\"&&r,namespace:\"cacheable-request\"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,s)=>{let a;if(typeof r==\"string\")a=dH(VQ.parse(r)),r={};else if(r instanceof VQ.URL)a=dH(VQ.parse(r.toString())),r={};else{let[C,...S]=(r.path||\"\").split(\"?\"),P=S.length>0?`?${S.join(\"?\")}`:\"\";a=dH({...r,pathname:C,search:P})}r={headers:{},method:\"GET\",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...Dtt(a)},r.headers=Btt(r.headers);let n=new Itt,c=Ctt(VQ.format(a),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),f=`${r.method}:${c}`,p=!1,h=!1,E=C=>{h=!0;let S=!1,P,I=new Promise(N=>{P=()=>{S||(S=!0,N())}}),R=N=>{if(p&&!C.forceRefresh){N.status=N.statusCode;let W=gH.fromObject(p.cachePolicy).revalidatedPolicy(C,N);if(!W.modified){let ee=W.policy.responseHeaders();N=new mfe(p.statusCode,ee,p.body,p.url),N.cachePolicy=W.policy,N.fromCache=!0}}N.fromCache||(N.cachePolicy=new gH(C,N,C),N.fromCache=!1);let U;C.cache&&N.cachePolicy.storable()?(U=vtt(N),(async()=>{try{let W=wtt.buffer(N);if(await Promise.race([I,new Promise(le=>N.once(\"end\",le))]),S)return;let ee=await W,ie={cachePolicy:N.cachePolicy.toObject(),url:N.url,statusCode:N.fromCache?p.statusCode:N.statusCode,body:ee},ue=C.strictTtl?N.cachePolicy.timeToLive():void 0;C.maxTtl&&(ue=ue?Math.min(ue,C.maxTtl):C.maxTtl),await this.cache.set(f,ie,ue)}catch(W){n.emit(\"error\",new t.CacheError(W))}})()):C.cache&&p&&(async()=>{try{await this.cache.delete(f)}catch(W){n.emit(\"error\",new t.CacheError(W))}})(),n.emit(\"response\",U||N),typeof s==\"function\"&&s(U||N)};try{let N=e(C,R);N.once(\"error\",P),N.once(\"abort\",P),n.emit(\"request\",N)}catch(N){n.emit(\"error\",new t.RequestError(N))}};return(async()=>{let C=async P=>{await Promise.resolve();let I=P.cache?await this.cache.get(f):void 0;if(typeof I>\"u\")return E(P);let R=gH.fromObject(I.cachePolicy);if(R.satisfiesWithoutRevalidation(P)&&!P.forceRefresh){let N=R.responseHeaders(),U=new mfe(I.statusCode,N,I.body,I.url);U.cachePolicy=R,U.fromCache=!0,n.emit(\"response\",U),typeof s==\"function\"&&s(U)}else p=I,P.headers=R.revalidationHeaders(P),E(P)},S=P=>n.emit(\"error\",new t.CacheError(P));this.cache.once(\"error\",S),n.on(\"response\",()=>this.cache.removeListener(\"error\",S));try{await C(r)}catch(P){r.automaticFailover&&!h&&E(r),n.emit(\"error\",new t.CacheError(P))}})(),n}}};function Dtt(t){let e={...t};return e.path=`${t.pathname||\"/\"}${t.search||\"\"}`,delete e.pathname,delete e.search,e}function dH(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||\"localhost\",port:t.port,pathname:t.pathname,search:t.search}}KB.RequestError=class extends Error{constructor(t){super(t.message),this.name=\"RequestError\",Object.assign(this,t)}};KB.CacheError=class extends Error{constructor(t){super(t.message),this.name=\"CacheError\",Object.assign(this,t)}};yfe.exports=KB});var Cfe=_((jMt,Ife)=>{\"use strict\";var btt=[\"aborted\",\"complete\",\"headers\",\"httpVersion\",\"httpVersionMinor\",\"httpVersionMajor\",\"method\",\"rawHeaders\",\"rawTrailers\",\"setTimeout\",\"socket\",\"statusCode\",\"statusMessage\",\"trailers\",\"url\"];Ife.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error(\"The second stream must have the `autoDestroy` option set to `false`\");let r=new Set(Object.keys(t).concat(btt)),s={};for(let a of r)a in e||(s[a]={get(){let n=t[a];return typeof n==\"function\"?n.bind(t):n},set(n){t[a]=n},enumerable:!0,configurable:!1});return Object.defineProperties(e,s),t.once(\"aborted\",()=>{e.destroy(),e.emit(\"aborted\")}),t.once(\"close\",()=>{t.complete&&e.readable?e.once(\"end\",()=>{e.emit(\"close\")}):e.emit(\"close\")}),e}});var Bfe=_((GMt,wfe)=>{\"use strict\";var{Transform:Ptt,PassThrough:xtt}=Ie(\"stream\"),mH=Ie(\"zlib\"),ktt=Cfe();wfe.exports=t=>{let e=(t.headers[\"content-encoding\"]||\"\").toLowerCase();if(![\"gzip\",\"deflate\",\"br\"].includes(e))return t;let r=e===\"br\";if(r&&typeof mH.createBrotliDecompress!=\"function\")return t.destroy(new Error(\"Brotli is not supported on Node.js < 12\")),t;let s=!0,a=new Ptt({transform(f,p,h){s=!1,h(null,f)},flush(f){f()}}),n=new xtt({autoDestroy:!1,destroy(f,p){t.destroy(),p(f)}}),c=r?mH.createBrotliDecompress():mH.createUnzip();return c.once(\"error\",f=>{if(s&&!t.readable){n.end();return}n.destroy(f)}),ktt(t,n),t.pipe(a).pipe(c).pipe(n),n}});var EH=_((qMt,vfe)=>{\"use strict\";var yH=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError(\"`maxSize` must be a number greater than 0\");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction==\"function\")for(let[s,a]of this.oldCache.entries())this.onEviction(s,a);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};vfe.exports=yH});var CH=_((WMt,Pfe)=>{\"use strict\";var Qtt=Ie(\"events\"),Ttt=Ie(\"tls\"),Rtt=Ie(\"http2\"),Ftt=EH(),Pa=Symbol(\"currentStreamsCount\"),Sfe=Symbol(\"request\"),Rc=Symbol(\"cachedOriginSet\"),gI=Symbol(\"gracefullyClosing\"),Ntt=[\"maxDeflateDynamicTableSize\",\"maxSessionMemory\",\"maxHeaderListPairs\",\"maxOutstandingPings\",\"maxReservedRemoteStreams\",\"maxSendHeaderBlockLength\",\"paddingStrategy\",\"localAddress\",\"path\",\"rejectUnauthorized\",\"minDHSize\",\"ca\",\"cert\",\"clientCertEngine\",\"ciphers\",\"key\",\"pfx\",\"servername\",\"minVersion\",\"maxVersion\",\"secureProtocol\",\"crl\",\"honorCipherOrder\",\"ecdhCurve\",\"dhparam\",\"secureOptions\",\"sessionIdContext\"],Ott=(t,e,r)=>{let s=0,a=t.length;for(;s<a;){let n=s+a>>>1;r(t[n],e)?s=n+1:a=n}return s},Ltt=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,IH=(t,e)=>{for(let r of t)r[Rc].length<e[Rc].length&&r[Rc].every(s=>e[Rc].includes(s))&&r[Pa]+e[Pa]<=e.remoteSettings.maxConcurrentStreams&&bfe(r)},Mtt=(t,e)=>{for(let r of t)e[Rc].length<r[Rc].length&&e[Rc].every(s=>r[Rc].includes(s))&&e[Pa]+r[Pa]<=r.remoteSettings.maxConcurrentStreams&&bfe(e)},Dfe=({agent:t,isFree:e})=>{let r={};for(let s in t.sessions){let n=t.sessions[s].filter(c=>{let f=c[im.kCurrentStreamsCount]<c.remoteSettings.maxConcurrentStreams;return e?f:!f});n.length!==0&&(r[s]=n)}return r},bfe=t=>{t[gI]=!0,t[Pa]===0&&t.close()},im=class t extends Qtt{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:s=10,maxCachedTlsSessions:a=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=s,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new Ftt({maxSize:a})}static normalizeOrigin(e,r){return typeof e==\"string\"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r=\"\";if(e)for(let s of Ntt)e[s]&&(r+=`:${e[s]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;let s=this.queue[e][r];this._sessionsCount<this.maxSessions&&!s.completed&&(s.completed=!0,s())}getSession(e,r,s){return new Promise((a,n)=>{Array.isArray(s)?(s=[...s],a()):s=[{resolve:a,reject:n}];let c=this.normalizeOptions(r),f=t.normalizeOrigin(e,r&&r.servername);if(f===void 0){for(let{reject:E}of s)E(new TypeError(\"The `origin` argument needs to be a string or an URL object\"));return}if(c in this.sessions){let E=this.sessions[c],C=-1,S=-1,P;for(let I of E){let R=I.remoteSettings.maxConcurrentStreams;if(R<C)break;if(I[Rc].includes(f)){let N=I[Pa];if(N>=R||I[gI]||I.destroyed)continue;P||(C=R),N>S&&(P=I,S=N)}}if(P){if(s.length!==1){for(let{reject:I}of s){let R=new Error(`Expected the length of listeners to be 1, got ${s.length}.\nPlease report this to https://github.com/szmarczak/http2-wrapper/`);I(R)}return}s[0].resolve(P);return}}if(c in this.queue){if(f in this.queue[c]){this.queue[c][f].listeners.push(...s),this._tryToCreateNewSession(c,f);return}}else this.queue[c]={};let p=()=>{c in this.queue&&this.queue[c][f]===h&&(delete this.queue[c][f],Object.keys(this.queue[c]).length===0&&delete this.queue[c])},h=()=>{let E=`${f}:${c}`,C=!1;try{let S=Rtt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});S[Pa]=0,S[gI]=!1;let P=()=>S[Pa]<S.remoteSettings.maxConcurrentStreams,I=!0;S.socket.once(\"session\",N=>{this.tlsSessionCache.set(E,N)}),S.once(\"error\",N=>{for(let{reject:U}of s)U(N);this.tlsSessionCache.delete(E)}),S.setTimeout(this.timeout,()=>{S.destroy()}),S.once(\"close\",()=>{if(C){I&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[c];N.splice(N.indexOf(S),1),N.length===0&&delete this.sessions[c]}else{let N=new Error(\"Session closed without receiving a SETTINGS frame\");N.code=\"HTTP2WRAPPER_NOSETTINGS\";for(let{reject:U}of s)U(N);p()}this._tryToCreateNewSession(c,f)});let R=()=>{if(!(!(c in this.queue)||!P())){for(let N of S[Rc])if(N in this.queue[c]){let{listeners:U}=this.queue[c][N];for(;U.length!==0&&P();)U.shift().resolve(S);let W=this.queue[c];if(W[N].listeners.length===0&&(delete W[N],Object.keys(W).length===0)){delete this.queue[c];break}if(!P())break}}};S.on(\"origin\",()=>{S[Rc]=S.originSet,P()&&(R(),IH(this.sessions[c],S))}),S.once(\"remoteSettings\",()=>{if(S.ref(),S.unref(),this._sessionsCount++,h.destroyed){let N=new Error(\"Agent has been destroyed\");for(let U of s)U.reject(N);S.destroy();return}S[Rc]=S.originSet;{let N=this.sessions;if(c in N){let U=N[c];U.splice(Ott(U,S,Ltt),0,S)}else N[c]=[S]}this._freeSessionsCount+=1,C=!0,this.emit(\"session\",S),R(),p(),S[Pa]===0&&this._freeSessionsCount>this.maxFreeSessions&&S.close(),s.length!==0&&(this.getSession(f,r,s),s.length=0),S.on(\"remoteSettings\",()=>{R(),IH(this.sessions[c],S)})}),S[Sfe]=S.request,S.request=(N,U)=>{if(S[gI])throw new Error(\"The session is gracefully closing. No new streams are allowed.\");let W=S[Sfe](N,U);return S.ref(),++S[Pa],S[Pa]===S.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,W.once(\"close\",()=>{if(I=P(),--S[Pa],!S.destroyed&&!S.closed&&(Mtt(this.sessions[c],S),P()&&!S.closed)){I||(this._freeSessionsCount++,I=!0);let ee=S[Pa]===0;ee&&S.unref(),ee&&(this._freeSessionsCount>this.maxFreeSessions||S[gI])?S.close():(IH(this.sessions[c],S),R())}}),W}}catch(S){for(let P of s)P.reject(S);p()}};h.listeners=s,h.completed=!1,h.destroyed=!1,this.queue[c][f]=h,this._tryToCreateNewSession(c,f)})}request(e,r,s,a){return new Promise((n,c)=>{this.getSession(e,r,[{reject:c,resolve:f=>{try{n(f.request(s,a))}catch(p){c(p)}}}])})}createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=[\"h2\"];let s=e.port||443,a=e.hostname||e.host;return typeof r.servername>\"u\"&&(r.servername=a),Ttt.connect(s,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[Pa]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let s of r)s.destroy(e);for(let r of Object.values(this.queue))for(let s of Object.values(r))s.destroyed=!0;this.queue={}}get freeSessions(){return Dfe({agent:this,isFree:!0})}get busySessions(){return Dfe({agent:this,isFree:!1})}};im.kCurrentStreamsCount=Pa;im.kGracefullyClosing=gI;Pfe.exports={Agent:im,globalAgent:new im}});var BH=_((YMt,xfe)=>{\"use strict\";var{Readable:Utt}=Ie(\"stream\"),wH=class extends Utt{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage=\"\",this.httpVersion=\"2.0\",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners(\"data\"),this.resume())}_read(){this.req&&this.req._request.resume()}};xfe.exports=wH});var vH=_((VMt,kfe)=>{\"use strict\";kfe.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname==\"string\"&&t.hostname.startsWith(\"[\")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||\"\"}${t.search||\"\"}`};return typeof t.port==\"string\"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||\"\"}:${t.password||\"\"}`),e}});var Tfe=_((JMt,Qfe)=>{\"use strict\";Qfe.exports=(t,e,r)=>{for(let s of r)t.on(s,(...a)=>e.emit(s,...a))}});var Ffe=_((KMt,Rfe)=>{\"use strict\";Rfe.exports=t=>{switch(t){case\":method\":case\":scheme\":case\":authority\":case\":path\":return!0;default:return!1}}});var Ofe=_((XMt,Nfe)=>{\"use strict\";var dI=(t,e,r)=>{Nfe.exports[e]=class extends t{constructor(...a){super(typeof r==\"string\"?r:r(a)),this.name=`${super.name} [${e}]`,this.code=e}}};dI(TypeError,\"ERR_INVALID_ARG_TYPE\",t=>{let e=t[0].includes(\".\")?\"property\":\"argument\",r=t[1],s=Array.isArray(r);return s&&(r=`${r.slice(0,-1).join(\", \")} or ${r.slice(-1)}`),`The \"${t[0]}\" ${e} must be ${s?\"one of\":\"of\"} type ${r}. Received ${typeof t[2]}`});dI(TypeError,\"ERR_INVALID_PROTOCOL\",t=>`Protocol \"${t[0]}\" not supported. Expected \"${t[1]}\"`);dI(Error,\"ERR_HTTP_HEADERS_SENT\",t=>`Cannot ${t[0]} headers after they are sent to the client`);dI(TypeError,\"ERR_INVALID_HTTP_TOKEN\",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);dI(TypeError,\"ERR_HTTP_INVALID_HEADER_VALUE\",t=>`Invalid value \"${t[0]} for header \"${t[1]}\"`);dI(TypeError,\"ERR_INVALID_CHAR\",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var xH=_((ZMt,Gfe)=>{\"use strict\";var _tt=Ie(\"http2\"),{Writable:Htt}=Ie(\"stream\"),{Agent:Lfe,globalAgent:jtt}=CH(),Gtt=BH(),qtt=vH(),Wtt=Tfe(),Ytt=Ffe(),{ERR_INVALID_ARG_TYPE:SH,ERR_INVALID_PROTOCOL:Vtt,ERR_HTTP_HEADERS_SENT:Mfe,ERR_INVALID_HTTP_TOKEN:Jtt,ERR_HTTP_INVALID_HEADER_VALUE:Ktt,ERR_INVALID_CHAR:ztt}=Ofe(),{HTTP2_HEADER_STATUS:Ufe,HTTP2_HEADER_METHOD:_fe,HTTP2_HEADER_PATH:Hfe,HTTP2_METHOD_CONNECT:Xtt}=_tt.constants,Jo=Symbol(\"headers\"),DH=Symbol(\"origin\"),bH=Symbol(\"session\"),jfe=Symbol(\"options\"),JQ=Symbol(\"flushedHeaders\"),zB=Symbol(\"jobs\"),Ztt=/^[\\^`\\-\\w!#$%&*+.|~]+$/,$tt=/[^\\t\\u0020-\\u007E\\u0080-\\u00FF]/,PH=class extends Htt{constructor(e,r,s){super({autoDestroy:!1});let a=typeof e==\"string\"||e instanceof URL;if(a&&(e=qtt(e instanceof URL?e:new URL(e))),typeof r==\"function\"||r===void 0?(s=r,r=a?e:{...e}):r={...e,...r},r.h2session)this[bH]=r.h2session;else if(r.agent===!1)this.agent=new Lfe({maxFreeSessions:0});else if(typeof r.agent>\"u\"||r.agent===null)typeof r.createConnection==\"function\"?(this.agent=new Lfe({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=jtt;else if(typeof r.agent.request==\"function\")this.agent=r.agent;else throw new SH(\"options.agent\",[\"Agent-like Object\",\"undefined\",\"false\"],r.agent);if(r.protocol&&r.protocol!==\"https:\")throw new Vtt(r.protocol,\"https:\");let n=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,c=r.hostname||r.host||\"localhost\";delete r.hostname,delete r.host,delete r.port;let{timeout:f}=r;if(r.timeout=void 0,this[Jo]=Object.create(null),this[zB]=[],this.socket=null,this.connection=null,this.method=r.method||\"GET\",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(let[p,h]of Object.entries(r.headers))this.setHeader(p,h);r.auth&&!(\"authorization\"in this[Jo])&&(this[Jo].authorization=\"Basic \"+Buffer.from(r.auth).toString(\"base64\")),r.session=r.tlsSession,r.path=r.socketPath,this[jfe]=r,n===443?(this[DH]=`https://${c}`,\":authority\"in this[Jo]||(this[Jo][\":authority\"]=c)):(this[DH]=`https://${c}:${n}`,\":authority\"in this[Jo]||(this[Jo][\":authority\"]=`${c}:${n}`)),f&&this.setTimeout(f),s&&this.once(\"response\",s),this[JQ]=!1}get method(){return this[Jo][_fe]}set method(e){e&&(this[Jo][_fe]=e.toUpperCase())}get path(){return this[Jo][Hfe]}set path(e){e&&(this[Jo][Hfe]=e)}get _mustNotHaveABody(){return this.method===\"GET\"||this.method===\"HEAD\"||this.method===\"DELETE\"}_write(e,r,s){if(this._mustNotHaveABody){s(new Error(\"The GET, HEAD and DELETE methods must NOT have a body\"));return}this.flushHeaders();let a=()=>this._request.write(e,r,s);this._request?a():this[zB].push(a)}_final(e){if(this.destroyed)return;this.flushHeaders();let r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[zB].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit(\"abort\")),this.aborted=!0,this.destroy())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[JQ]||this.destroyed)return;this[JQ]=!0;let e=this.method===Xtt,r=s=>{if(this._request=s,this.destroyed){s.destroy();return}e||Wtt(s,this,[\"timeout\",\"continue\",\"close\",\"error\"]);let a=c=>(...f)=>{!this.writable&&!this.destroyed?c(...f):this.once(\"finish\",()=>{c(...f)})};s.once(\"response\",a((c,f,p)=>{let h=new Gtt(this.socket,s.readableHighWaterMark);this.res=h,h.req=this,h.statusCode=c[Ufe],h.headers=c,h.rawHeaders=p,h.once(\"end\",()=>{this.aborted?(h.aborted=!0,h.emit(\"aborted\")):(h.complete=!0,h.socket=null,h.connection=null)}),e?(h.upgrade=!0,this.emit(\"connect\",h,s,Buffer.alloc(0))?this.emit(\"close\"):s.destroy()):(s.on(\"data\",E=>{!h._dumped&&!h.push(E)&&s.pause()}),s.once(\"end\",()=>{h.push(null)}),this.emit(\"response\",h)||h._dump())})),s.once(\"headers\",a(c=>this.emit(\"information\",{statusCode:c[Ufe]}))),s.once(\"trailers\",a((c,f,p)=>{let{res:h}=this;h.trailers=c,h.rawTrailers=p}));let{socket:n}=s.session;this.socket=n,this.connection=n;for(let c of this[zB])c();this.emit(\"socket\",this.socket)};if(this[bH])try{r(this[bH].request(this[Jo]))}catch(s){this.emit(\"error\",s)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[DH],this[jfe],this[Jo]))}catch(s){this.emit(\"error\",s)}}}getHeader(e){if(typeof e!=\"string\")throw new SH(\"name\",\"string\",e);return this[Jo][e.toLowerCase()]}get headersSent(){return this[JQ]}removeHeader(e){if(typeof e!=\"string\")throw new SH(\"name\",\"string\",e);if(this.headersSent)throw new Mfe(\"remove\");delete this[Jo][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new Mfe(\"set\");if(typeof e!=\"string\"||!Ztt.test(e)&&!Ytt(e))throw new Jtt(\"Header name\",e);if(typeof r>\"u\")throw new Ktt(r,e);if($tt.test(r))throw new ztt(\"header content\",e);this[Jo][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let s=()=>this._request.setTimeout(e,r);return this._request?s():this[zB].push(s),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};Gfe.exports=PH});var Wfe=_(($Mt,qfe)=>{\"use strict\";var ert=Ie(\"tls\");qfe.exports=(t={},e=ert.connect)=>new Promise((r,s)=>{let a=!1,n,c=async()=>{await p,n.off(\"timeout\",f),n.off(\"error\",s),t.resolveSocket?(r({alpnProtocol:n.alpnProtocol,socket:n,timeout:a}),a&&(await Promise.resolve(),n.emit(\"timeout\"))):(n.destroy(),r({alpnProtocol:n.alpnProtocol,timeout:a}))},f=async()=>{a=!0,c()},p=(async()=>{try{n=await e(t,c),n.on(\"error\",s),n.once(\"timeout\",f)}catch(h){s(h)}})()})});var Vfe=_((eUt,Yfe)=>{\"use strict\";var trt=Ie(\"net\");Yfe.exports=t=>{let e=t.host,r=t.headers&&t.headers.host;return r&&(r.startsWith(\"[\")?r.indexOf(\"]\")===-1?e=r:e=r.slice(1,-1):e=r.split(\":\",1)[0]),trt.isIP(e)?\"\":e}});var zfe=_((tUt,QH)=>{\"use strict\";var Jfe=Ie(\"http\"),kH=Ie(\"https\"),rrt=Wfe(),nrt=EH(),irt=xH(),srt=Vfe(),ort=vH(),KQ=new nrt({maxSize:100}),XB=new Map,Kfe=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let s=()=>{t.emit(\"free\",e,r)};e.on(\"free\",s);let a=()=>{t.removeSocket(e,r)};e.on(\"close\",a);let n=()=>{t.removeSocket(e,r),e.off(\"close\",a),e.off(\"free\",s),e.off(\"agentRemove\",n)};e.on(\"agentRemove\",n),t.emit(\"free\",e,r)},art=async t=>{let e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!KQ.has(e)){if(XB.has(e))return(await XB.get(e)).alpnProtocol;let{path:r,agent:s}=t;t.path=t.socketPath;let a=rrt(t);XB.set(e,a);try{let{socket:n,alpnProtocol:c}=await a;if(KQ.set(e,c),t.path=r,c===\"h2\")n.destroy();else{let{globalAgent:f}=kH,p=kH.Agent.prototype.createConnection;s?s.createConnection===p?Kfe(s,n,t):n.destroy():f.createConnection===p?Kfe(f,n,t):n.destroy()}return XB.delete(e),c}catch(n){throw XB.delete(e),n}}return KQ.get(e)};QH.exports=async(t,e,r)=>{if((typeof t==\"string\"||t instanceof URL)&&(t=ort(new URL(t))),typeof e==\"function\"&&(r=e,e=void 0),e={ALPNProtocols:[\"h2\",\"http/1.1\"],...t,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error(\"The `ALPNProtocols` option must be an Array with at least one entry\");e.protocol=e.protocol||\"https:\";let s=e.protocol===\"https:\";e.host=e.hostname||e.host||\"localhost\",e.session=e.tlsSession,e.servername=e.servername||srt(e),e.port=e.port||(s?443:80),e._defaultAgent=s?kH.globalAgent:Jfe.globalAgent;let a=e.agent;if(a){if(a.addRequest)throw new Error(\"The `options.agent` object can contain only `http`, `https` or `http2` properties\");e.agent=a[s?\"https\":\"http\"]}return s&&await art(e)===\"h2\"?(a&&(e.agent=a.http2),new irt(e,r)):Jfe.request(e,r)};QH.exports.protocolCache=KQ});var Zfe=_((rUt,Xfe)=>{\"use strict\";var lrt=Ie(\"http2\"),crt=CH(),TH=xH(),urt=BH(),frt=zfe(),Art=(t,e,r)=>new TH(t,e,r),prt=(t,e,r)=>{let s=new TH(t,e,r);return s.end(),s};Xfe.exports={...lrt,ClientRequest:TH,IncomingMessage:urt,...crt,request:Art,get:prt,auto:frt}});var FH=_(RH=>{\"use strict\";Object.defineProperty(RH,\"__esModule\",{value:!0});var $fe=Np();RH.default=t=>$fe.default.nodeStream(t)&&$fe.default.function_(t.getBoundary)});var nAe=_(NH=>{\"use strict\";Object.defineProperty(NH,\"__esModule\",{value:!0});var tAe=Ie(\"fs\"),rAe=Ie(\"util\"),eAe=Np(),hrt=FH(),grt=rAe.promisify(tAe.stat);NH.default=async(t,e)=>{if(e&&\"content-length\"in e)return Number(e[\"content-length\"]);if(!t)return 0;if(eAe.default.string(t))return Buffer.byteLength(t);if(eAe.default.buffer(t))return t.length;if(hrt.default(t))return rAe.promisify(t.getLength.bind(t))();if(t instanceof tAe.ReadStream){let{size:r}=await grt(t.path);return r===0?void 0:r}}});var LH=_(OH=>{\"use strict\";Object.defineProperty(OH,\"__esModule\",{value:!0});function drt(t,e,r){let s={};for(let a of r)s[a]=(...n)=>{e.emit(a,...n)},t.on(a,s[a]);return()=>{for(let a of r)t.off(a,s[a])}}OH.default=drt});var iAe=_(MH=>{\"use strict\";Object.defineProperty(MH,\"__esModule\",{value:!0});MH.default=()=>{let t=[];return{once(e,r,s){e.once(r,s),t.push({origin:e,event:r,fn:s})},unhandleAll(){for(let e of t){let{origin:r,event:s,fn:a}=e;r.removeListener(s,a)}t.length=0}}}});var oAe=_(ZB=>{\"use strict\";Object.defineProperty(ZB,\"__esModule\",{value:!0});ZB.TimeoutError=void 0;var mrt=Ie(\"net\"),yrt=iAe(),sAe=Symbol(\"reentry\"),Ert=()=>{},zQ=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),this.event=r,this.name=\"TimeoutError\",this.code=\"ETIMEDOUT\"}};ZB.TimeoutError=zQ;ZB.default=(t,e,r)=>{if(sAe in t)return Ert;t[sAe]=!0;let s=[],{once:a,unhandleAll:n}=yrt.default(),c=(C,S,P)=>{var I;let R=setTimeout(S,C,C,P);(I=R.unref)===null||I===void 0||I.call(R);let N=()=>{clearTimeout(R)};return s.push(N),N},{host:f,hostname:p}=r,h=(C,S)=>{t.destroy(new zQ(C,S))},E=()=>{for(let C of s)C();n()};if(t.once(\"error\",C=>{if(E(),t.listenerCount(\"error\")===0)throw C}),t.once(\"close\",E),a(t,\"response\",C=>{a(C,\"end\",E)}),typeof e.request<\"u\"&&c(e.request,h,\"request\"),typeof e.socket<\"u\"){let C=()=>{h(e.socket,\"socket\")};t.setTimeout(e.socket,C),s.push(()=>{t.removeListener(\"timeout\",C)})}return a(t,\"socket\",C=>{var S;let{socketPath:P}=t;if(C.connecting){let I=!!(P??mrt.isIP((S=p??f)!==null&&S!==void 0?S:\"\")!==0);if(typeof e.lookup<\"u\"&&!I&&typeof C.address().address>\"u\"){let R=c(e.lookup,h,\"lookup\");a(C,\"lookup\",R)}if(typeof e.connect<\"u\"){let R=()=>c(e.connect,h,\"connect\");I?a(C,\"connect\",R()):a(C,\"lookup\",N=>{N===null&&a(C,\"connect\",R())})}typeof e.secureConnect<\"u\"&&r.protocol===\"https:\"&&a(C,\"connect\",()=>{let R=c(e.secureConnect,h,\"secureConnect\");a(C,\"secureConnect\",R)})}if(typeof e.send<\"u\"){let I=()=>c(e.send,h,\"send\");C.connecting?a(C,\"connect\",()=>{a(t,\"upload-complete\",I())}):a(t,\"upload-complete\",I())}}),typeof e.response<\"u\"&&a(t,\"upload-complete\",()=>{let C=c(e.response,h,\"response\");a(t,\"response\",C)}),E}});var lAe=_(UH=>{\"use strict\";Object.defineProperty(UH,\"__esModule\",{value:!0});var aAe=Np();UH.default=t=>{t=t;let e={protocol:t.protocol,hostname:aAe.default.string(t.hostname)&&t.hostname.startsWith(\"[\")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||\"\"}${t.search||\"\"}`};return aAe.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||\"\"}:${t.password||\"\"}`),e}});var cAe=_(_H=>{\"use strict\";Object.defineProperty(_H,\"__esModule\",{value:!0});var Irt=Ie(\"url\"),Crt=[\"protocol\",\"host\",\"hostname\",\"port\",\"pathname\",\"search\"];_H.default=(t,e)=>{var r,s;if(e.path){if(e.pathname)throw new TypeError(\"Parameters `path` and `pathname` are mutually exclusive.\");if(e.search)throw new TypeError(\"Parameters `path` and `search` are mutually exclusive.\");if(e.searchParams)throw new TypeError(\"Parameters `path` and `searchParams` are mutually exclusive.\")}if(e.search&&e.searchParams)throw new TypeError(\"Parameters `search` and `searchParams` are mutually exclusive.\");if(!t){if(!e.protocol)throw new TypeError(\"No URL protocol specified\");t=`${e.protocol}//${(s=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&s!==void 0?s:\"\"}`}let a=new Irt.URL(t);if(e.path){let n=e.path.indexOf(\"?\");n===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,n),e.search=e.path.slice(n+1)),delete e.path}for(let n of Crt)e[n]&&(a[n]=e[n].toString());return a}});var uAe=_(jH=>{\"use strict\";Object.defineProperty(jH,\"__esModule\",{value:!0});var HH=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e==\"object\"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e==\"object\"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e==\"object\"?this.weakMap.has(e):this.map.has(e)}};jH.default=HH});var qH=_(GH=>{\"use strict\";Object.defineProperty(GH,\"__esModule\",{value:!0});var wrt=async t=>{let e=[],r=0;for await(let s of t)e.push(s),r+=Buffer.byteLength(s);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(\"\"))};GH.default=wrt});var AAe=_(sm=>{\"use strict\";Object.defineProperty(sm,\"__esModule\",{value:!0});sm.dnsLookupIpVersionToFamily=sm.isDnsLookupIpVersion=void 0;var fAe={auto:0,ipv4:4,ipv6:6};sm.isDnsLookupIpVersion=t=>t in fAe;sm.dnsLookupIpVersionToFamily=t=>{if(sm.isDnsLookupIpVersion(t))return fAe[t];throw new Error(\"Invalid DNS lookup IP version\")}});var WH=_(XQ=>{\"use strict\";Object.defineProperty(XQ,\"__esModule\",{value:!0});XQ.isResponseOk=void 0;XQ.isResponseOk=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304}});var hAe=_(YH=>{\"use strict\";Object.defineProperty(YH,\"__esModule\",{value:!0});var pAe=new Set;YH.default=t=>{pAe.has(t)||(pAe.add(t),process.emitWarning(`Got: ${t}`,{type:\"DeprecationWarning\"}))}});var gAe=_(VH=>{\"use strict\";Object.defineProperty(VH,\"__esModule\",{value:!0});var Si=Np(),Brt=(t,e)=>{if(Si.default.null_(t.encoding))throw new TypeError(\"To get a Buffer, set `options.responseType` to `buffer` instead\");Si.assert.any([Si.default.string,Si.default.undefined],t.encoding),Si.assert.any([Si.default.boolean,Si.default.undefined],t.resolveBodyOnly),Si.assert.any([Si.default.boolean,Si.default.undefined],t.methodRewriting),Si.assert.any([Si.default.boolean,Si.default.undefined],t.isStream),Si.assert.any([Si.default.string,Si.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType=\"text\");let{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:s=>s.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},Si.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(s=>s.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):Si.default.number(r)&&(t.retry.limit=r),Si.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(Si.default.number))),Si.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});let{pagination:s}=t;if(!Si.default.function_(s.transform))throw new Error(\"`options.pagination.transform` must be implemented\");if(!Si.default.function_(s.shouldContinue))throw new Error(\"`options.pagination.shouldContinue` must be implemented\");if(!Si.default.function_(s.filter))throw new TypeError(\"`options.pagination.filter` must be implemented\");if(!Si.default.function_(s.paginate))throw new Error(\"`options.pagination.paginate` must be implemented\")}return t.responseType===\"json\"&&t.headers.accept===void 0&&(t.headers.accept=\"application/json\"),t};VH.default=Brt});var dAe=_($B=>{\"use strict\";Object.defineProperty($B,\"__esModule\",{value:!0});$B.retryAfterStatusCodes=void 0;$B.retryAfterStatusCodes=new Set([413,429,503]);var vrt=({attemptCount:t,retryOptions:e,error:r,retryAfter:s})=>{if(t>e.limit)return 0;let a=e.methods.includes(r.options.method),n=e.errorCodes.includes(r.code),c=r.response&&e.statusCodes.includes(r.response.statusCode);if(!a||!n&&!c)return 0;if(r.response){if(s)return e.maxRetryAfter===void 0||s>e.maxRetryAfter?0:s;if(r.response.statusCode===413)return 0}let f=Math.random()*100;return 2**(t-1)*1e3+f};$B.default=vrt});var rv=_(Ln=>{\"use strict\";Object.defineProperty(Ln,\"__esModule\",{value:!0});Ln.UnsupportedProtocolError=Ln.ReadError=Ln.TimeoutError=Ln.UploadError=Ln.CacheError=Ln.HTTPError=Ln.MaxRedirectsError=Ln.RequestError=Ln.setNonEnumerableProperties=Ln.knownHookEvents=Ln.withoutBody=Ln.kIsNormalizedAlready=void 0;var mAe=Ie(\"util\"),yAe=Ie(\"stream\"),Srt=Ie(\"fs\"),w0=Ie(\"url\"),EAe=Ie(\"http\"),JH=Ie(\"http\"),Drt=Ie(\"https\"),brt=Rue(),Prt=_ue(),IAe=Efe(),xrt=Bfe(),krt=Zfe(),Qrt=YQ(),at=Np(),Trt=nAe(),CAe=FH(),Rrt=LH(),wAe=oAe(),Frt=lAe(),BAe=cAe(),Nrt=uAe(),Ort=qH(),vAe=AAe(),Lrt=WH(),B0=hAe(),Mrt=gAe(),Urt=dAe(),KH,po=Symbol(\"request\"),eT=Symbol(\"response\"),mI=Symbol(\"responseSize\"),yI=Symbol(\"downloadedSize\"),EI=Symbol(\"bodySize\"),II=Symbol(\"uploadedSize\"),ZQ=Symbol(\"serverResponsesPiped\"),SAe=Symbol(\"unproxyEvents\"),DAe=Symbol(\"isFromCache\"),zH=Symbol(\"cancelTimeouts\"),bAe=Symbol(\"startedReading\"),CI=Symbol(\"stopReading\"),$Q=Symbol(\"triggerRead\"),v0=Symbol(\"body\"),ev=Symbol(\"jobs\"),PAe=Symbol(\"originalResponse\"),xAe=Symbol(\"retryTimeout\");Ln.kIsNormalizedAlready=Symbol(\"isNormalizedAlready\");var _rt=at.default.string(process.versions.brotli);Ln.withoutBody=new Set([\"GET\",\"HEAD\"]);Ln.knownHookEvents=[\"init\",\"beforeRequest\",\"beforeRedirect\",\"beforeError\",\"beforeRetry\",\"afterResponse\"];function Hrt(t){for(let e in t){let r=t[e];if(!at.default.string(r)&&!at.default.number(r)&&!at.default.boolean(r)&&!at.default.null_(r)&&!at.default.undefined(r))throw new TypeError(`The \\`searchParams\\` value '${String(r)}' must be a string, number, boolean or null`)}}function jrt(t){return at.default.object(t)&&!(\"statusCode\"in t)}var XH=new Nrt.default,Grt=async t=>new Promise((e,r)=>{let s=a=>{r(a)};t.pending||e(),t.once(\"error\",s),t.once(\"ready\",()=>{t.off(\"error\",s),e()})}),qrt=new Set([300,301,302,303,304,307,308]),Wrt=[\"context\",\"body\",\"json\",\"form\"];Ln.setNonEnumerableProperties=(t,e)=>{let r={};for(let s of t)if(s)for(let a of Wrt)a in s&&(r[a]={writable:!0,configurable:!0,enumerable:!1,value:s[a]});Object.defineProperties(e,r)};var fs=class extends Error{constructor(e,r,s){var a;if(super(e),Error.captureStackTrace(this,this.constructor),this.name=\"RequestError\",this.code=r.code,s instanceof aT?(Object.defineProperty(this,\"request\",{enumerable:!1,value:s}),Object.defineProperty(this,\"response\",{enumerable:!1,value:s[eT]}),Object.defineProperty(this,\"options\",{enumerable:!1,value:s.options})):Object.defineProperty(this,\"options\",{enumerable:!1,value:s}),this.timings=(a=this.request)===null||a===void 0?void 0:a.timings,at.default.string(r.stack)&&at.default.string(this.stack)){let n=this.stack.indexOf(this.message)+this.message.length,c=this.stack.slice(n).split(`\n`).reverse(),f=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`\n`).reverse();for(;f.length!==0&&f[0]===c[0];)c.shift();this.stack=`${this.stack.slice(0,n)}${c.reverse().join(`\n`)}${f.reverse().join(`\n`)}`}}};Ln.RequestError=fs;var tT=class extends fs{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name=\"MaxRedirectsError\"}};Ln.MaxRedirectsError=tT;var rT=class extends fs{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name=\"HTTPError\"}};Ln.HTTPError=rT;var nT=class extends fs{constructor(e,r){super(e.message,e,r),this.name=\"CacheError\"}};Ln.CacheError=nT;var iT=class extends fs{constructor(e,r){super(e.message,e,r),this.name=\"UploadError\"}};Ln.UploadError=iT;var sT=class extends fs{constructor(e,r,s){super(e.message,e,s),this.name=\"TimeoutError\",this.event=e.event,this.timings=r}};Ln.TimeoutError=sT;var tv=class extends fs{constructor(e,r){super(e.message,e,r),this.name=\"ReadError\"}};Ln.ReadError=tv;var oT=class extends fs{constructor(e){super(`Unsupported protocol \"${e.url.protocol}\"`,{},e),this.name=\"UnsupportedProtocolError\"}};Ln.UnsupportedProtocolError=oT;var Yrt=[\"socket\",\"connect\",\"continue\",\"information\",\"upgrade\",\"timeout\"],aT=class extends yAe.Duplex{constructor(e,r={},s){super({autoDestroy:!1,highWaterMark:0}),this[yI]=0,this[II]=0,this.requestInitialized=!1,this[ZQ]=new Set,this.redirects=[],this[CI]=!1,this[$Q]=!1,this[ev]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on(\"pipe\",h=>{h.prependListener(\"data\",a),h.on(\"data\",n),h.prependListener(\"end\",a),h.on(\"end\",n)}),this.on(\"unpipe\",h=>{h.off(\"data\",a),h.off(\"data\",n),h.off(\"end\",a),h.off(\"end\",n)}),this.on(\"pipe\",h=>{h instanceof JH.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:c,body:f,form:p}=r;if((c||f||p)&&this._lockWrite(),Ln.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,s)}catch(h){at.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof Srt.ReadStream&&await Grt(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError(\"Missing `url` property\");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[po])===null||h===void 0||h.destroy();return}for(let C of this[ev])C();this[ev].length=0,this.requestInitialized=!0}catch(E){if(E instanceof fs){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(e,r,s){var a,n,c,f,p;let h=r;if(at.default.object(e)&&!at.default.urlInstance(e))r={...s,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError(\"The `url` option is mutually exclusive with the `input` argument\");r={...s,...r},e!==void 0&&(r.url=e),at.default.urlInstance(r.url)&&(r.url=new w0.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),at.assert.any([at.default.string,at.default.undefined],r.method),at.assert.any([at.default.object,at.default.undefined],r.headers),at.assert.any([at.default.string,at.default.urlInstance,at.default.undefined],r.prefixUrl),at.assert.any([at.default.object,at.default.undefined],r.cookieJar),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.searchParams),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.cache),at.assert.any([at.default.object,at.default.number,at.default.undefined],r.timeout),at.assert.any([at.default.object,at.default.undefined],r.context),at.assert.any([at.default.object,at.default.undefined],r.hooks),at.assert.any([at.default.boolean,at.default.undefined],r.decompress),at.assert.any([at.default.boolean,at.default.undefined],r.ignoreInvalidCookies),at.assert.any([at.default.boolean,at.default.undefined],r.followRedirect),at.assert.any([at.default.number,at.default.undefined],r.maxRedirects),at.assert.any([at.default.boolean,at.default.undefined],r.throwHttpErrors),at.assert.any([at.default.boolean,at.default.undefined],r.http2),at.assert.any([at.default.boolean,at.default.undefined],r.allowGetBody),at.assert.any([at.default.string,at.default.undefined],r.localAddress),at.assert.any([vAe.isDnsLookupIpVersion,at.default.undefined],r.dnsLookupIpVersion),at.assert.any([at.default.object,at.default.undefined],r.https),at.assert.any([at.default.boolean,at.default.undefined],r.rejectUnauthorized),r.https&&(at.assert.any([at.default.boolean,at.default.undefined],r.https.rejectUnauthorized),at.assert.any([at.default.function_,at.default.undefined],r.https.checkServerIdentity),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificateAuthority),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.key),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificate),at.assert.any([at.default.string,at.default.undefined],r.https.passphrase),at.assert.any([at.default.string,at.default.buffer,at.default.array,at.default.undefined],r.https.pfx)),at.assert.any([at.default.object,at.default.undefined],r.cacheOptions),at.default.string(r.method)?r.method=r.method.toUpperCase():r.method=\"GET\",r.headers===s?.headers?r.headers={...r.headers}:r.headers=Qrt({...s?.headers,...r.headers}),\"slashes\"in r)throw new TypeError(\"The legacy `url.Url` has been deprecated. Use `URL` instead.\");if(\"auth\"in r)throw new TypeError(\"Parameter `auth` is deprecated. Use `username` / `password` instead.\");if(\"searchParams\"in r&&r.searchParams&&r.searchParams!==s?.searchParams){let P;if(at.default.string(r.searchParams)||r.searchParams instanceof w0.URLSearchParams)P=new w0.URLSearchParams(r.searchParams);else{Hrt(r.searchParams),P=new w0.URLSearchParams;for(let I in r.searchParams){let R=r.searchParams[I];R===null?P.append(I,\"\"):R!==void 0&&P.append(I,R)}}(a=s?.searchParams)===null||a===void 0||a.forEach((I,R)=>{P.has(R)||P.append(R,I)}),r.searchParams=P}if(r.username=(n=r.username)!==null&&n!==void 0?n:\"\",r.password=(c=r.password)!==null&&c!==void 0?c:\"\",at.default.undefined(r.prefixUrl)?r.prefixUrl=(f=s?.prefixUrl)!==null&&f!==void 0?f:\"\":(r.prefixUrl=r.prefixUrl.toString(),r.prefixUrl!==\"\"&&!r.prefixUrl.endsWith(\"/\")&&(r.prefixUrl+=\"/\")),at.default.string(r.url)){if(r.url.startsWith(\"/\"))throw new Error(\"`input` must not start with a slash when using `prefixUrl`\");r.url=BAe.default(r.prefixUrl+r.url,r)}else(at.default.undefined(r.url)&&r.prefixUrl!==\"\"||r.protocol)&&(r.url=BAe.default(r.prefixUrl,r));if(r.url){\"port\"in r&&delete r.port;let{prefixUrl:P}=r;Object.defineProperty(r,\"prefixUrl\",{set:R=>{let N=r.url;if(!N.href.startsWith(R))throw new Error(`Cannot change \\`prefixUrl\\` from ${P} to ${R}: ${N.href}`);r.url=new w0.URL(R+N.href.slice(P.length)),P=R},get:()=>P});let{protocol:I}=r.url;if(I===\"unix:\"&&(I=\"http:\",r.url=new w0.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),I!==\"http:\"&&I!==\"https:\")throw new oT(r);r.username===\"\"?r.username=r.url.username:r.url.username=r.username,r.password===\"\"?r.password=r.url.password:r.url.password=r.password}let{cookieJar:E}=r;if(E){let{setCookie:P,getCookieString:I}=E;at.assert.function_(P),at.assert.function_(I),P.length===4&&I.length===0&&(P=mAe.promisify(P.bind(r.cookieJar)),I=mAe.promisify(I.bind(r.cookieJar)),r.cookieJar={setCookie:P,getCookieString:I})}let{cache:C}=r;if(C&&(XH.has(C)||XH.set(C,new IAe((P,I)=>{let R=P[po](P,I);return at.default.promise(R)&&(R.once=(N,U)=>{if(N===\"error\")R.catch(U);else if(N===\"abort\")(async()=>{try{(await R).once(\"abort\",U)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${N}`);return R}),R},C))),r.cacheOptions={...r.cacheOptions},r.dnsCache===!0)KH||(KH=new Prt.default),r.dnsCache=KH;else if(!at.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError(`Parameter \\`dnsCache\\` must be a CacheableLookup instance or a boolean, got ${at.default(r.dnsCache)}`);at.default.number(r.timeout)?r.timeout={request:r.timeout}:s&&r.timeout!==s.timeout?r.timeout={...s.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});let S=r.hooks===s?.hooks;r.hooks={...r.hooks};for(let P of Ln.knownHookEvents)if(P in r.hooks)if(at.default.array(r.hooks[P]))r.hooks[P]=[...r.hooks[P]];else throw new TypeError(`Parameter \\`${P}\\` must be an Array, got ${at.default(r.hooks[P])}`);else r.hooks[P]=[];if(s&&!S)for(let P of Ln.knownHookEvents)s.hooks[P].length>0&&(r.hooks[P]=[...s.hooks[P],...r.hooks[P]]);if(\"family\"in r&&B0.default('\"options.family\" was never documented, please use \"options.dnsLookupIpVersion\"'),s?.https&&(r.https={...s.https,...r.https}),\"rejectUnauthorized\"in r&&B0.default('\"options.rejectUnauthorized\" is now deprecated, please use \"options.https.rejectUnauthorized\"'),\"checkServerIdentity\"in r&&B0.default('\"options.checkServerIdentity\" was never documented, please use \"options.https.checkServerIdentity\"'),\"ca\"in r&&B0.default('\"options.ca\" was never documented, please use \"options.https.certificateAuthority\"'),\"key\"in r&&B0.default('\"options.key\" was never documented, please use \"options.https.key\"'),\"cert\"in r&&B0.default('\"options.cert\" was never documented, please use \"options.https.certificate\"'),\"passphrase\"in r&&B0.default('\"options.passphrase\" was never documented, please use \"options.https.passphrase\"'),\"pfx\"in r&&B0.default('\"options.pfx\" was never documented, please use \"options.https.pfx\"'),\"followRedirects\"in r)throw new TypeError(\"The `followRedirects` option does not exist. Use `followRedirect` instead.\");if(r.agent){for(let P in r.agent)if(P!==\"http\"&&P!==\"https\"&&P!==\"http2\")throw new TypeError(`Expected the \\`options.agent\\` properties to be \\`http\\`, \\`https\\` or \\`http2\\`, got \\`${P}\\``)}return r.maxRedirects=(p=r.maxRedirects)!==null&&p!==void 0?p:0,Ln.setNonEnumerableProperties([s,h],r),Mrt.default(r,s)}_lockWrite(){let e=()=>{throw new TypeError(\"The payload has been already provided\")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:e}=this,{headers:r}=e,s=!at.default.undefined(e.form),a=!at.default.undefined(e.json),n=!at.default.undefined(e.body),c=s||a||n,f=Ln.withoutBody.has(e.method)&&!(e.method===\"GET\"&&e.allowGetBody);if(this._cannotHaveBody=f,c){if(f)throw new TypeError(`The \\`${e.method}\\` method cannot be used with a body`);if([n,s,a].filter(p=>p).length>1)throw new TypeError(\"The `body`, `json` and `form` options are mutually exclusive\");if(n&&!(e.body instanceof yAe.Readable)&&!at.default.string(e.body)&&!at.default.buffer(e.body)&&!CAe.default(e.body))throw new TypeError(\"The `body` option must be a stream.Readable, string or Buffer\");if(s&&!at.default.object(e.form))throw new TypeError(\"The `form` option must be an Object\");{let p=!at.default.string(r[\"content-type\"]);n?(CAe.default(e.body)&&p&&(r[\"content-type\"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[v0]=e.body):s?(p&&(r[\"content-type\"]=\"application/x-www-form-urlencoded\"),this[v0]=new w0.URLSearchParams(e.form).toString()):(p&&(r[\"content-type\"]=\"application/json\"),this[v0]=e.stringifyJson(e.json));let h=await Trt.default(this[v0],e.headers);at.default.undefined(r[\"content-length\"])&&at.default.undefined(r[\"transfer-encoding\"])&&!f&&!at.default.undefined(h)&&(r[\"content-length\"]=String(h))}}else f?this._lockWrite():this._unlockWrite();this[EI]=Number(r[\"content-length\"])||void 0}async _onResponseBase(e){let{options:r}=this,{url:s}=r;this[PAe]=e,r.decompress&&(e=xrt(e));let a=e.statusCode,n=e;n.statusMessage=n.statusMessage?n.statusMessage:EAe.STATUS_CODES[a],n.url=r.url.toString(),n.requestUrl=this.requestUrl,n.redirectUrls=this.redirects,n.request=this,n.isFromCache=e.fromCache||!1,n.ip=this.ip,n.retryCount=this.retryCount,this[DAe]=n.isFromCache,this[mI]=Number(e.headers[\"content-length\"])||void 0,this[eT]=e,e.once(\"end\",()=>{this[mI]=this[yI],this.emit(\"downloadProgress\",this.downloadProgress)}),e.once(\"error\",f=>{e.destroy(),this._beforeError(new tv(f,this))}),e.once(\"aborted\",()=>{this._beforeError(new tv({name:\"Error\",message:\"The server aborted pending request\",code:\"ECONNRESET\"},this))}),this.emit(\"downloadProgress\",this.downloadProgress);let c=e.headers[\"set-cookie\"];if(at.default.object(r.cookieJar)&&c){let f=c.map(async p=>r.cookieJar.setCookie(p,s.toString()));r.ignoreInvalidCookies&&(f=f.map(async p=>p.catch(()=>{})));try{await Promise.all(f)}catch(p){this._beforeError(p);return}}if(r.followRedirect&&e.headers.location&&qrt.has(a)){if(e.resume(),this[po]&&(this[zH](),delete this[po],this[SAe]()),(a===303&&r.method!==\"GET\"&&r.method!==\"HEAD\"||!r.methodRewriting)&&(r.method=\"GET\",\"body\"in r&&delete r.body,\"json\"in r&&delete r.json,\"form\"in r&&delete r.form,this[v0]=void 0,delete r.headers[\"content-length\"]),this.redirects.length>=r.maxRedirects){this._beforeError(new tT(this));return}try{let p=Buffer.from(e.headers.location,\"binary\").toString(),h=new w0.URL(p,s),E=h.toString();decodeURI(E),h.hostname!==s.hostname||h.port!==s.port?(\"host\"in r.headers&&delete r.headers.host,\"cookie\"in r.headers&&delete r.headers.cookie,\"authorization\"in r.headers&&delete r.headers.authorization,(r.username||r.password)&&(r.username=\"\",r.password=\"\")):(h.username=r.username,h.password=r.password),this.redirects.push(E),r.url=h;for(let C of r.hooks.beforeRedirect)await C(r,n);this.emit(\"redirect\",n,r),await this._makeRequest()}catch(p){this._beforeError(p);return}return}if(r.isStream&&r.throwHttpErrors&&!Lrt.isResponseOk(n)){this._beforeError(new rT(n));return}e.on(\"readable\",()=>{this[$Q]&&this._read()}),this.on(\"resume\",()=>{e.resume()}),this.on(\"pause\",()=>{e.pause()}),e.once(\"end\",()=>{this.push(null)}),this.emit(\"response\",e);for(let f of this[ZQ])if(!f.headersSent){for(let p in e.headers){let h=r.decompress?p!==\"content-encoding\":!0,E=e.headers[p];h&&f.setHeader(p,E)}f.statusCode=a}}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:s,url:a}=r;brt.default(e),this[zH]=wAe.default(e,s,a);let n=r.cache?\"cacheableResponse\":\"response\";e.once(n,p=>{this._onResponse(p)}),e.once(\"error\",p=>{var h;e.destroy(),(h=e.res)===null||h===void 0||h.removeAllListeners(\"end\"),p=p instanceof wAe.TimeoutError?new sT(p,this.timings,this):new fs(p.message,p,this),this._beforeError(p)}),this[SAe]=Rrt.default(e,this,Yrt),this[po]=e,this.emit(\"uploadProgress\",this.uploadProgress);let c=this[v0],f=this.redirects.length===0?this:e;at.default.nodeStream(c)?(c.pipe(f),c.once(\"error\",p=>{this._beforeError(new iT(p,this))})):(this._unlockWrite(),at.default.undefined(c)?(this._cannotHaveBody||this._noPipe)&&(f.end(),this._lockWrite()):(this._writeRequest(c,void 0,()=>{}),f.end(),this._lockWrite())),this.emit(\"request\",e)}async _createCacheableRequest(e,r){return new Promise((s,a)=>{Object.assign(r,Frt.default(e)),delete r.url;let n,c=XH.get(r.cache)(r,async f=>{f._readableState.autoDestroy=!1,n&&(await n).emit(\"cacheableResponse\",f),s(f)});r.url=e,c.once(\"error\",a),c.once(\"request\",async f=>{n=f,s(n)})})}async _makeRequest(){var e,r,s,a,n;let{options:c}=this,{headers:f}=c;for(let U in f)if(at.default.undefined(f[U]))delete f[U];else if(at.default.null_(f[U]))throw new TypeError(`Use \\`undefined\\` instead of \\`null\\` to delete the \\`${U}\\` header`);if(c.decompress&&at.default.undefined(f[\"accept-encoding\"])&&(f[\"accept-encoding\"]=_rt?\"gzip, deflate, br\":\"gzip, deflate\"),c.cookieJar){let U=await c.cookieJar.getCookieString(c.url.toString());at.default.nonEmptyString(U)&&(c.headers.cookie=U)}for(let U of c.hooks.beforeRequest){let W=await U(c);if(!at.default.undefined(W)){c.request=()=>W;break}}c.body&&this[v0]!==c.body&&(this[v0]=c.body);let{agent:p,request:h,timeout:E,url:C}=c;if(c.dnsCache&&!(\"lookup\"in c)&&(c.lookup=c.dnsCache.lookup),C.hostname===\"unix\"){let U=/(?<socketPath>.+?):(?<path>.+)/.exec(`${C.pathname}${C.search}`);if(U?.groups){let{socketPath:W,path:ee}=U.groups;Object.assign(c,{socketPath:W,path:ee,host:\"\"})}}let S=C.protocol===\"https:\",P;c.http2?P=krt.auto:P=S?Drt.request:EAe.request;let I=(e=c.request)!==null&&e!==void 0?e:P,R=c.cache?this._createCacheableRequest:I;p&&!c.http2&&(c.agent=p[S?\"https\":\"http\"]),c[po]=I,delete c.request,delete c.timeout;let N=c;if(N.shared=(r=c.cacheOptions)===null||r===void 0?void 0:r.shared,N.cacheHeuristic=(s=c.cacheOptions)===null||s===void 0?void 0:s.cacheHeuristic,N.immutableMinTimeToLive=(a=c.cacheOptions)===null||a===void 0?void 0:a.immutableMinTimeToLive,N.ignoreCargoCult=(n=c.cacheOptions)===null||n===void 0?void 0:n.ignoreCargoCult,c.dnsLookupIpVersion!==void 0)try{N.family=vAe.dnsLookupIpVersionToFamily(c.dnsLookupIpVersion)}catch{throw new Error(\"Invalid `dnsLookupIpVersion` option value\")}c.https&&(\"rejectUnauthorized\"in c.https&&(N.rejectUnauthorized=c.https.rejectUnauthorized),c.https.checkServerIdentity&&(N.checkServerIdentity=c.https.checkServerIdentity),c.https.certificateAuthority&&(N.ca=c.https.certificateAuthority),c.https.certificate&&(N.cert=c.https.certificate),c.https.key&&(N.key=c.https.key),c.https.passphrase&&(N.passphrase=c.https.passphrase),c.https.pfx&&(N.pfx=c.https.pfx));try{let U=await R(C,N);at.default.undefined(U)&&(U=P(C,N)),c.request=h,c.timeout=E,c.agent=p,c.https&&(\"rejectUnauthorized\"in c.https&&delete N.rejectUnauthorized,c.https.checkServerIdentity&&delete N.checkServerIdentity,c.https.certificateAuthority&&delete N.ca,c.https.certificate&&delete N.cert,c.https.key&&delete N.key,c.https.passphrase&&delete N.passphrase,c.https.pfx&&delete N.pfx),jrt(U)?this._onRequest(U):this.writable?(this.once(\"finish\",()=>{this._onResponse(U)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(U)}catch(U){throw U instanceof IAe.CacheError?new nT(U,this):new fs(U.message,U,this)}}async _error(e){try{for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new fs(r.message,r,this)}this.destroy(e)}_beforeError(e){if(this[CI])return;let{options:r}=this,s=this.retryCount+1;this[CI]=!0,e instanceof fs||(e=new fs(e.message,e,this));let a=e,{response:n}=a;(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await Ort.default(n),n.body=n.rawBody.toString()}catch{}}if(this.listenerCount(\"retry\")!==0){let c;try{let f;n&&\"retry-after\"in n.headers&&(f=Number(n.headers[\"retry-after\"]),Number.isNaN(f)?(f=Date.parse(n.headers[\"retry-after\"])-Date.now(),f<=0&&(f=1)):f*=1e3),c=await r.retry.calculateDelay({attemptCount:s,retryOptions:r.retry,error:a,retryAfter:f,computedValue:Urt.default({attemptCount:s,retryOptions:r.retry,error:a,retryAfter:f,computedValue:0})})}catch(f){this._error(new fs(f.message,f,this));return}if(c){let f=async()=>{try{for(let p of this.options.hooks.beforeRetry)await p(this.options,a,s)}catch(p){this._error(new fs(p.message,e,this));return}this.destroyed||(this.destroy(),this.emit(\"retry\",s,e))};this[xAe]=setTimeout(f,c);return}}this._error(a)})()}_read(){this[$Q]=!0;let e=this[eT];if(e&&!this[CI]){e.readableLength&&(this[$Q]=!1);let r;for(;(r=e.read())!==null;){this[yI]+=r.length,this[bAe]=!0;let s=this.downloadProgress;s.percent<1&&this.emit(\"downloadProgress\",s),this.push(r)}}}_write(e,r,s){let a=()=>{this._writeRequest(e,r,s)};this.requestInitialized?a():this[ev].push(a)}_writeRequest(e,r,s){this[po].destroyed||(this._progressCallbacks.push(()=>{this[II]+=Buffer.byteLength(e,r);let a=this.uploadProgress;a.percent<1&&this.emit(\"uploadProgress\",a)}),this[po].write(e,r,a=>{!a&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),s(a)}))}_final(e){let r=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(po in this)){e();return}if(this[po].destroyed){e();return}this[po].end(s=>{s||(this[EI]=this[II],this.emit(\"uploadProgress\",this.uploadProgress),this[po].emit(\"upload-complete\")),e(s)})};this.requestInitialized?r():this[ev].push(r)}_destroy(e,r){var s;this[CI]=!0,clearTimeout(this[xAe]),po in this&&(this[zH](),!((s=this[eT])===null||s===void 0)&&s.complete||this[po].destroy()),e!==null&&!at.default.undefined(e)&&!(e instanceof fs)&&(e=new fs(e.message,e,this)),r(e)}get _isAboutToError(){return this[CI]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,r,s;return((r=(e=this[po])===null||e===void 0?void 0:e.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!(!((s=this[PAe])===null||s===void 0)&&s.complete)}get socket(){var e,r;return(r=(e=this[po])===null||e===void 0?void 0:e.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let e;return this[mI]?e=this[yI]/this[mI]:this[mI]===this[yI]?e=1:e=0,{percent:e,transferred:this[yI],total:this[mI]}}get uploadProgress(){let e;return this[EI]?e=this[II]/this[EI]:this[EI]===this[II]?e=1:e=0,{percent:e,transferred:this[II],total:this[EI]}}get timings(){var e;return(e=this[po])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[DAe]}pipe(e,r){if(this[bAe])throw new Error(\"Failed to pipe. The response has been emitted already.\");return e instanceof JH.ServerResponse&&this[ZQ].add(e),super.pipe(e,r)}unpipe(e){return e instanceof JH.ServerResponse&&this[ZQ].delete(e),super.unpipe(e),this}};Ln.default=aT});var nv=_(qu=>{\"use strict\";var Vrt=qu&&qu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Jrt=qu&&qu.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Vrt(e,t,r)};Object.defineProperty(qu,\"__esModule\",{value:!0});qu.CancelError=qu.ParseError=void 0;var kAe=rv(),ZH=class extends kAe.RequestError{constructor(e,r){let{options:s}=r.request;super(`${e.message} in \"${s.url.toString()}\"`,e,r.request),this.name=\"ParseError\"}};qu.ParseError=ZH;var $H=class extends kAe.RequestError{constructor(e){super(\"Promise was canceled\",{},e),this.name=\"CancelError\"}get isCanceled(){return!0}};qu.CancelError=$H;Jrt(rv(),qu)});var TAe=_(ej=>{\"use strict\";Object.defineProperty(ej,\"__esModule\",{value:!0});var QAe=nv(),Krt=(t,e,r,s)=>{let{rawBody:a}=t;try{if(e===\"text\")return a.toString(s);if(e===\"json\")return a.length===0?\"\":r(a.toString());if(e===\"buffer\")return a;throw new QAe.ParseError({message:`Unknown body type '${e}'`,name:\"Error\"},t)}catch(n){throw new QAe.ParseError(n,t)}};ej.default=Krt});var tj=_(S0=>{\"use strict\";var zrt=S0&&S0.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Xrt=S0&&S0.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&zrt(e,t,r)};Object.defineProperty(S0,\"__esModule\",{value:!0});var Zrt=Ie(\"events\"),$rt=Np(),ent=Que(),lT=nv(),RAe=TAe(),FAe=rv(),tnt=LH(),rnt=qH(),NAe=WH(),nnt=[\"request\",\"response\",\"redirect\",\"uploadProgress\",\"downloadProgress\"];function OAe(t){let e,r,s=new Zrt.EventEmitter,a=new ent((c,f,p)=>{let h=E=>{let C=new FAe.default(void 0,t);C.retryCount=E,C._noPipe=!0,p(()=>C.destroy()),p.shouldReject=!1,p(()=>f(new lT.CancelError(C))),e=C,C.once(\"response\",async I=>{var R;if(I.retryCount=E,I.request.aborted)return;let N;try{N=await rnt.default(C),I.rawBody=N}catch{return}if(C._isAboutToError)return;let U=((R=I.headers[\"content-encoding\"])!==null&&R!==void 0?R:\"\").toLowerCase(),W=[\"gzip\",\"deflate\",\"br\"].includes(U),{options:ee}=C;if(W&&!ee.decompress)I.body=N;else try{I.body=RAe.default(I,ee.responseType,ee.parseJson,ee.encoding)}catch(ie){if(I.body=N.toString(),NAe.isResponseOk(I)){C._beforeError(ie);return}}try{for(let[ie,ue]of ee.hooks.afterResponse.entries())I=await ue(I,async le=>{let me=FAe.default.normalizeArguments(void 0,{...le,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},ee);me.hooks.afterResponse=me.hooks.afterResponse.slice(0,ie);for(let Be of me.hooks.beforeRetry)await Be(me);let pe=OAe(me);return p(()=>{pe.catch(()=>{}),pe.cancel()}),pe})}catch(ie){C._beforeError(new lT.RequestError(ie.message,ie,C));return}if(!NAe.isResponseOk(I)){C._beforeError(new lT.HTTPError(I));return}r=I,c(C.options.resolveBodyOnly?I.body:I)});let S=I=>{if(a.isCanceled)return;let{options:R}=C;if(I instanceof lT.HTTPError&&!R.throwHttpErrors){let{response:N}=I;c(C.options.resolveBodyOnly?N.body:N);return}f(I)};C.once(\"error\",S);let P=C.options.body;C.once(\"retry\",(I,R)=>{var N,U;if(P===((N=R.request)===null||N===void 0?void 0:N.options.body)&&$rt.default.nodeStream((U=R.request)===null||U===void 0?void 0:U.options.body)){S(R);return}h(I)}),tnt.default(C,s,nnt)};h(0)});a.on=(c,f)=>(s.on(c,f),a);let n=c=>{let f=(async()=>{await a;let{options:p}=r.request;return RAe.default(r,c,p.parseJson,p.encoding)})();return Object.defineProperties(f,Object.getOwnPropertyDescriptors(a)),f};return a.json=()=>{let{headers:c}=e.options;return!e.writableFinished&&c.accept===void 0&&(c.accept=\"application/json\"),n(\"json\")},a.buffer=()=>n(\"buffer\"),a.text=()=>n(\"text\"),a}S0.default=OAe;Xrt(nv(),S0)});var LAe=_(rj=>{\"use strict\";Object.defineProperty(rj,\"__esModule\",{value:!0});var int=nv();function snt(t,...e){let r=(async()=>{if(t instanceof int.RequestError)try{for(let a of e)if(a)for(let n of a)t=await n(t)}catch(a){t=a}throw t})(),s=()=>r;return r.json=s,r.text=s,r.buffer=s,r.on=s,r}rj.default=snt});var _Ae=_(nj=>{\"use strict\";Object.defineProperty(nj,\"__esModule\",{value:!0});var MAe=Np();function UAe(t){for(let e of Object.values(t))(MAe.default.plainObject(e)||MAe.default.array(e))&&UAe(e);return Object.freeze(t)}nj.default=UAe});var jAe=_(HAe=>{\"use strict\";Object.defineProperty(HAe,\"__esModule\",{value:!0})});var ij=_(Nc=>{\"use strict\";var ont=Nc&&Nc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),ant=Nc&&Nc.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&ont(e,t,r)};Object.defineProperty(Nc,\"__esModule\",{value:!0});Nc.defaultHandler=void 0;var GAe=Np(),Fc=tj(),lnt=LAe(),uT=rv(),cnt=_Ae(),unt={RequestError:Fc.RequestError,CacheError:Fc.CacheError,ReadError:Fc.ReadError,HTTPError:Fc.HTTPError,MaxRedirectsError:Fc.MaxRedirectsError,TimeoutError:Fc.TimeoutError,ParseError:Fc.ParseError,CancelError:Fc.CancelError,UnsupportedProtocolError:Fc.UnsupportedProtocolError,UploadError:Fc.UploadError},fnt=async t=>new Promise(e=>{setTimeout(e,t)}),{normalizeArguments:cT}=uT.default,qAe=(...t)=>{let e;for(let r of t)e=cT(void 0,r,e);return e},Ant=t=>t.isStream?new uT.default(void 0,t):Fc.default(t),pnt=t=>\"defaults\"in t&&\"options\"in t.defaults,hnt=[\"get\",\"post\",\"put\",\"patch\",\"head\",\"delete\"];Nc.defaultHandler=(t,e)=>e(t);var WAe=(t,e)=>{if(t)for(let r of t)r(e)},YAe=t=>{t._rawHandlers=t.handlers,t.handlers=t.handlers.map(s=>(a,n)=>{let c,f=s(a,p=>(c=n(p),c));if(f!==c&&!a.isStream&&c){let p=f,{then:h,catch:E,finally:C}=p;Object.setPrototypeOf(p,Object.getPrototypeOf(c)),Object.defineProperties(p,Object.getOwnPropertyDescriptors(c)),p.then=h,p.catch=E,p.finally=C}return f});let e=(s,a={},n)=>{var c,f;let p=0,h=E=>t.handlers[p++](E,p===t.handlers.length?Ant:h);if(GAe.default.plainObject(s)){let E={...s,...a};uT.setNonEnumerableProperties([s,a],E),a=E,s=void 0}try{let E;try{WAe(t.options.hooks.init,a),WAe((c=a.hooks)===null||c===void 0?void 0:c.init,a)}catch(S){E=S}let C=cT(s,a,n??t.options);if(C[uT.kIsNormalizedAlready]=!0,E)throw new Fc.RequestError(E.message,E,C);return h(C)}catch(E){if(a.isStream)throw E;return lnt.default(E,t.options.hooks.beforeError,(f=a.hooks)===null||f===void 0?void 0:f.beforeError)}};e.extend=(...s)=>{let a=[t.options],n=[...t._rawHandlers],c;for(let f of s)pnt(f)?(a.push(f.defaults.options),n.push(...f.defaults._rawHandlers),c=f.defaults.mutableDefaults):(a.push(f),\"handlers\"in f&&n.push(...f.handlers),c=f.mutableDefaults);return n=n.filter(f=>f!==Nc.defaultHandler),n.length===0&&n.push(Nc.defaultHandler),YAe({options:qAe(...a),handlers:n,mutableDefaults:!!c})};let r=async function*(s,a){let n=cT(s,a,t.options);n.resolveBodyOnly=!1;let c=n.pagination;if(!GAe.default.object(c))throw new TypeError(\"`options.pagination` must be implemented\");let f=[],{countLimit:p}=c,h=0;for(;h<c.requestLimit;){h!==0&&await fnt(c.backoff);let E=await e(void 0,void 0,n),C=await c.transform(E),S=[];for(let I of C)if(c.filter(I,f,S)&&(!c.shouldContinue(I,f,S)||(yield I,c.stackAllItems&&f.push(I),S.push(I),--p<=0)))return;let P=c.paginate(E,f,S);if(P===!1)return;P===E.request.options?n=E.request.options:P!==void 0&&(n=cT(void 0,P,n)),h++}};e.paginate=r,e.paginate.all=async(s,a)=>{let n=[];for await(let c of r(s,a))n.push(c);return n},e.paginate.each=r,e.stream=(s,a)=>e(s,{...a,isStream:!0});for(let s of hnt)e[s]=(a,n)=>e(a,{...n,method:s}),e.stream[s]=(a,n)=>e(a,{...n,method:s,isStream:!0});return Object.assign(e,unt),Object.defineProperty(e,\"defaults\",{value:t.mutableDefaults?t:cnt.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),e.mergeOptions=qAe,e};Nc.default=YAe;ant(jAe(),Nc)});var KAe=_((Op,fT)=>{\"use strict\";var gnt=Op&&Op.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),VAe=Op&&Op.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&gnt(e,t,r)};Object.defineProperty(Op,\"__esModule\",{value:!0});var dnt=Ie(\"url\"),JAe=ij(),mnt={options:{method:\"GET\",retry:{limit:2,methods:[\"GET\",\"PUT\",\"HEAD\",\"DELETE\",\"OPTIONS\",\"TRACE\"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:[\"ETIMEDOUT\",\"ECONNRESET\",\"EADDRINUSE\",\"ECONNREFUSED\",\"EPIPE\",\"ENOTFOUND\",\"ENETUNREACH\",\"EAI_AGAIN\"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t},timeout:{},headers:{\"user-agent\":\"got (https://github.com/sindresorhus/got)\"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:\"text\",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:\"\",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:t=>t.request.options.responseType===\"json\"?t.body:JSON.parse(t.body),paginate:t=>{if(!Reflect.has(t.headers,\"link\"))return!1;let e=t.headers.link.split(\",\"),r;for(let s of e){let a=s.split(\";\");if(a[1].includes(\"next\")){r=a[0].trimStart().trim(),r=r.slice(1,-1);break}}return r?{url:new dnt.URL(r)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:t=>JSON.parse(t),stringifyJson:t=>JSON.stringify(t),cacheOptions:{}},handlers:[JAe.defaultHandler],mutableDefaults:!1},sj=JAe.default(mnt);Op.default=sj;fT.exports=sj;fT.exports.default=sj;fT.exports.__esModule=!0;VAe(ij(),Op);VAe(tj(),Op)});var nn={};Vt(nn,{Method:()=>tpe,del:()=>wnt,get:()=>lj,getNetworkSettings:()=>epe,post:()=>cj,put:()=>Cnt,request:()=>iv});async function oj(t){return Yl(XAe,t,()=>ce.readFilePromise(t).then(e=>(XAe.set(t,e),e)))}function Int({statusCode:t,statusMessage:e},r){let s=Ht(r,t,ht.NUMBER),a=`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/${t}`;return KE(r,`${s}${e?` (${e})`:\"\"}`,a)}async function AT(t,{configuration:e,customErrorMessage:r}){try{return await t}catch(s){if(s.name!==\"HTTPError\")throw s;let a=r?.(s,e)??s.response.body?.error;a==null&&(s.message.startsWith(\"Response code\")?a=\"The remote server failed to provide the requested resource\":a=s.message),s.code===\"ETIMEDOUT\"&&s.event===\"socket\"&&(a+=`(can be increased via ${Ht(e,\"httpTimeout\",ht.SETTING)})`);let n=new jt(35,a,c=>{s.response&&c.reportError(35,`  ${Kf(e,{label:\"Response Code\",value:_u(ht.NO_HINT,Int(s.response,e))})}`),s.request&&(c.reportError(35,`  ${Kf(e,{label:\"Request Method\",value:_u(ht.NO_HINT,s.request.options.method)})}`),c.reportError(35,`  ${Kf(e,{label:\"Request URL\",value:_u(ht.URL,s.request.requestUrl)})}`)),s.request.redirects.length>0&&c.reportError(35,`  ${Kf(e,{label:\"Request Redirects\",value:_u(ht.NO_HINT,Z4(e,s.request.redirects,ht.URL))})}`),s.request.retryCount===s.request.options.retry.limit&&c.reportError(35,`  ${Kf(e,{label:\"Request Retry Count\",value:_u(ht.NO_HINT,`${Ht(e,s.request.retryCount,ht.NUMBER)} (can be increased via ${Ht(e,\"httpRetry\",ht.SETTING)})`)})}`)});throw n.originalError=s,n}}function epe(t,e){let r=[...e.configuration.get(\"networkSettings\")].sort(([c],[f])=>f.length-c.length),s={enableNetwork:void 0,httpsCaFilePath:void 0,httpProxy:void 0,httpsProxy:void 0,httpsKeyFilePath:void 0,httpsCertFilePath:void 0},a=Object.keys(s),n=typeof t==\"string\"?new URL(t):t;for(let[c,f]of r)if(aj.default.isMatch(n.hostname,c))for(let p of a){let h=f.get(p);h!==null&&typeof s[p]>\"u\"&&(s[p]=h)}for(let c of a)typeof s[c]>\"u\"&&(s[c]=e.configuration.get(c));return s}async function iv(t,e,{configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c=\"GET\",wrapNetworkRequest:f}){let p={target:t,body:e,configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c},h=async()=>await Bnt(t,e,p),E=typeof f<\"u\"?await f(h,p):h;return await(await r.reduceHook(S=>S.wrapNetworkRequest,E,p))()}async function lj(t,{configuration:e,jsonResponse:r,customErrorMessage:s,wrapNetworkRequest:a,...n}){let c=()=>AT(iv(t,null,{configuration:e,wrapNetworkRequest:a,...n}),{configuration:e,customErrorMessage:s}).then(p=>p.body),f=await(typeof a<\"u\"?c():Yl(zAe,t,()=>c().then(p=>(zAe.set(t,p),p))));return r?JSON.parse(f.toString()):f}async function Cnt(t,e,{customErrorMessage:r,...s}){return(await AT(iv(t,e,{...s,method:\"PUT\"}),{customErrorMessage:r,configuration:s.configuration})).body}async function cj(t,e,{customErrorMessage:r,...s}){return(await AT(iv(t,e,{...s,method:\"POST\"}),{customErrorMessage:r,configuration:s.configuration})).body}async function wnt(t,{customErrorMessage:e,...r}){return(await AT(iv(t,null,{...r,method:\"DELETE\"}),{customErrorMessage:e,configuration:r.configuration})).body}async function Bnt(t,e,{configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c=\"GET\"}){let f=typeof t==\"string\"?new URL(t):t,p=epe(f,{configuration:r});if(p.enableNetwork===!1)throw new jt(80,`Request to '${f.href}' has been blocked because of your configuration settings`);if(f.protocol===\"http:\"&&!aj.default.isMatch(f.hostname,r.get(\"unsafeHttpWhitelist\")))throw new jt(81,`Unsafe http requests must be explicitly whitelisted in your configuration (${f.hostname})`);let h={headers:s,method:c};h.responseType=n?\"json\":\"buffer\",e!==null&&(Buffer.isBuffer(e)||!a&&typeof e==\"string\"?h.body=e:h.json=e);let E=r.get(\"httpTimeout\"),C=r.get(\"httpRetry\"),S=r.get(\"enableStrictSsl\"),P=p.httpsCaFilePath,I=p.httpsCertFilePath,R=p.httpsKeyFilePath,{default:N}=await Promise.resolve().then(()=>ut(KAe())),U=P?await oj(P):void 0,W=I?await oj(I):void 0,ee=R?await oj(R):void 0,ie={rejectUnauthorized:S,ca:U,cert:W,key:ee},ue={http:p.httpProxy?new vue({proxy:p.httpProxy,proxyRequestOptions:ie}):ynt,https:p.httpsProxy?new Sue({proxy:p.httpsProxy,proxyRequestOptions:ie}):Ent},le=N.extend({timeout:{socket:E},retry:C,agent:ue,https:{rejectUnauthorized:S,certificateAuthority:U,certificate:W,key:ee},...h});return r.getLimit(\"networkConcurrency\")(()=>le(f))}var ZAe,$Ae,aj,zAe,XAe,ynt,Ent,tpe,pT=Xe(()=>{Dt();Due();ZAe=Ie(\"https\"),$Ae=Ie(\"http\"),aj=ut(Go());Tc();xc();Pc();zAe=new Map,XAe=new Map,ynt=new $Ae.Agent({keepAlive:!0}),Ent=new ZAe.Agent({keepAlive:!0});tpe=(a=>(a.GET=\"GET\",a.PUT=\"PUT\",a.POST=\"POST\",a.DELETE=\"DELETE\",a))(tpe||{})});var Ui={};Vt(Ui,{availableParallelism:()=>fj,getArchitecture:()=>sv,getArchitectureName:()=>Pnt,getArchitectureSet:()=>uj,getCaller:()=>Tnt,major:()=>vnt,openUrl:()=>Snt});function bnt(){if(process.platform!==\"linux\")return null;let t;try{t=ce.readFileSync(Dnt)}catch{}if(typeof t<\"u\"){if(t&&(t.includes(\"GLIBC\")||t.includes(\"GNU libc\")||t.includes(\"GNU C Library\")))return\"glibc\";if(t&&t.includes(\"musl\"))return\"musl\"}let r=(process.report?.getReport()??{}).sharedObjects??[],s=/\\/(?:(ld-linux-|[^/]+-linux-gnu\\/)|(libc.musl-|ld-musl-))/;return p0(r,a=>{let n=a.match(s);if(!n)return p0.skip;if(n[1])return\"glibc\";if(n[2])return\"musl\";throw new Error(\"Assertion failed: Expected the libc variant to have been detected\")})??null}function sv(){return npe=npe??{os:(process.env.YARN_IS_TEST_ENV?process.env.YARN_OS_OVERRIDE:void 0)??process.platform,cpu:(process.env.YARN_IS_TEST_ENV?process.env.YARN_CPU_OVERRIDE:void 0)??process.arch,libc:(process.env.YARN_IS_TEST_ENV?process.env.YARN_LIBC_OVERRIDE:void 0)??bnt()}}function Pnt(t=sv()){return t.libc?`${t.os}-${t.cpu}-${t.libc}`:`${t.os}-${t.cpu}`}function uj(){let t=sv();return ipe=ipe??{os:[t.os],cpu:[t.cpu],libc:t.libc?[t.libc]:[]}}function Qnt(t){let e=xnt.exec(t);if(!e)return null;let r=e[2]&&e[2].indexOf(\"native\")===0,s=e[2]&&e[2].indexOf(\"eval\")===0,a=knt.exec(e[2]);return s&&a!=null&&(e[2]=a[1],e[3]=a[2],e[4]=a[3]),{file:r?null:e[2],methodName:e[1]||\"<unknown>\",arguments:r?[e[2]]:[],line:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}function Tnt(){let e=new Error().stack.split(`\n`)[3];return Qnt(e)}function fj(){return typeof hT.default.availableParallelism<\"u\"?hT.default.availableParallelism():Math.max(1,hT.default.cpus().length)}var hT,vnt,rpe,Snt,Dnt,npe,ipe,xnt,knt,gT=Xe(()=>{Dt();hT=ut(Ie(\"os\"));dT();Pc();vnt=Number(process.versions.node.split(\".\")[0]),rpe=new Map([[\"darwin\",\"open\"],[\"linux\",\"xdg-open\"],[\"win32\",\"explorer.exe\"]]).get(process.platform),Snt=typeof rpe<\"u\"?async t=>{try{return await Aj(rpe,[t],{cwd:J.cwd()}),!0}catch{return!1}}:void 0,Dnt=\"/usr/bin/ldd\";xnt=/^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i,knt=/\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/});function yj(t,e,r,s,a){let n=YB(r);if(s.isArray||s.type===\"ANY\"&&Array.isArray(n))return Array.isArray(n)?n.map((c,f)=>pj(t,`${e}[${f}]`,c,s,a)):String(n).split(/,/).map(c=>pj(t,e,c,s,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings \"${e}\" cannot be an array`);return pj(t,e,r,s,a)}function pj(t,e,r,s,a){let n=YB(r);switch(s.type){case\"ANY\":return NQ(n);case\"SHAPE\":return Ont(t,e,r,s,a);case\"MAP\":return Lnt(t,e,r,s,a)}if(n===null&&!s.isNullable&&s.default!==null)throw new Error(`Non-nullable configuration settings \"${e}\" cannot be set to null`);if(\"values\"in s&&s.values?.includes(n))return n;let f=(()=>{if(s.type===\"BOOLEAN\"&&typeof n!=\"string\")return kB(n);if(typeof n!=\"string\")throw new Error(`Expected configuration setting \"${e}\" to be a string, got ${typeof n}`);let p=Vk(n,{env:t.env});switch(s.type){case\"ABSOLUTE_PATH\":{let h=a,E=H8(r);return E&&E[0]!==\"<\"&&(h=J.dirname(E)),J.resolve(h,fe.toPortablePath(p))}case\"LOCATOR_LOOSE\":return Qp(p,!1);case\"NUMBER\":return parseInt(p);case\"LOCATOR\":return Qp(p);case\"BOOLEAN\":return kB(p);case\"DURATION\":return Jk(p,s.unit);default:return p}})();if(\"values\"in s&&s.values&&!s.values.includes(f))throw new Error(`Invalid value, expected one of ${s.values.join(\", \")}`);return f}function Ont(t,e,r,s,a){let n=YB(r);if(typeof n!=\"object\"||Array.isArray(n))throw new nt(`Object configuration settings \"${e}\" must be an object`);let c=Ej(t,s,{ignoreArrays:!0});if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=`${e}.${f}`;if(!s.properties[f])throw new nt(`Unrecognized configuration settings found: ${e}.${f} - run \"yarn config\" to see the list of settings supported in Yarn`);c.set(f,yj(t,h,p,s.properties[f],a))}return c}function Lnt(t,e,r,s,a){let n=YB(r),c=new Map;if(typeof n!=\"object\"||Array.isArray(n))throw new nt(`Map configuration settings \"${e}\" must be an object`);if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=s.normalizeKeys?s.normalizeKeys(f):f,E=`${e}['${h}']`,C=s.valueDefinition;c.set(h,yj(t,E,p,C,a))}return c}function Ej(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case\"SHAPE\":{if(e.isArray&&!r)return[];let s=new Map;for(let[a,n]of Object.entries(e.properties))s.set(a,Ej(t,n));return s}case\"MAP\":return e.isArray&&!r?[]:new Map;case\"ABSOLUTE_PATH\":return e.default===null?null:t.projectCwd===null?Array.isArray(e.default)?e.default.map(s=>J.normalize(s)):J.isAbsolute(e.default)?J.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(s=>J.resolve(t.projectCwd,s)):J.resolve(t.projectCwd,e.default);case\"DURATION\":return Jk(e.default,e.unit);default:return e.default}}function yT(t,e,r){if(e.type===\"SECRET\"&&typeof t==\"string\"&&r.hideSecrets)return Nnt;if(e.type===\"ABSOLUTE_PATH\"&&typeof t==\"string\"&&r.getNativePaths)return fe.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let s=[];for(let a of t)s.push(yT(a,e,r));return s}if(e.type===\"MAP\"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=yT(n,e.valueDefinition,r);typeof c<\"u\"&&s.set(a,c)}return s}if(e.type===\"SHAPE\"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=e.properties[a],f=yT(n,c,r);typeof f<\"u\"&&s.set(a,f)}return s}return t}function Mnt(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(ET)&&(e=(0,ope.default)(e.slice(ET.length)),t[e]=r);return t}function gj(){let t=`${ET}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r==\"string\")return r;return dj}async function spe(t){try{return await ce.readFilePromise(t)}catch{return Buffer.of()}}async function Unt(t,e){return Buffer.compare(...await Promise.all([spe(t),spe(e)]))===0}async function _nt(t,e){let[r,s]=await Promise.all([ce.statPromise(t),ce.statPromise(e)]);return r.dev===s.dev&&r.ino===s.ino}async function jnt({configuration:t,selfPath:e}){let r=t.get(\"yarnPath\");return t.get(\"ignorePath\")||r===null||r===e||await Hnt(r,e)?null:r}var ope,Lp,ape,lpe,cpe,hj,Rnt,ov,Fnt,Mp,ET,dj,Nnt,wI,upe,mj,IT,mT,Hnt,ze,av=Xe(()=>{Dt();wc();ope=ut(Sre()),Lp=ut(Fd());Yt();ape=ut(yne()),lpe=Ie(\"module\"),cpe=ut(Ld()),hj=Ie(\"stream\");nue();oI();R8();F8();N8();gue();O8();tm();Iue();LQ();xc();I0();pT();Pc();gT();Rp();Wo();Rnt=function(){if(!Lp.GITHUB_ACTIONS||!process.env.GITHUB_EVENT_PATH)return!1;let t=fe.toPortablePath(process.env.GITHUB_EVENT_PATH),e;try{e=ce.readJsonSync(t)}catch{return!1}return!(!(\"repository\"in e)||!e.repository||(e.repository.private??!0))}(),ov=new Set([\"@yarnpkg/plugin-constraints\",\"@yarnpkg/plugin-exec\",\"@yarnpkg/plugin-interactive-tools\",\"@yarnpkg/plugin-stage\",\"@yarnpkg/plugin-typescript\",\"@yarnpkg/plugin-version\",\"@yarnpkg/plugin-workspace-tools\"]),Fnt=new Set([\"isTestEnv\",\"injectNpmUser\",\"injectNpmPassword\",\"injectNpm2FaToken\",\"zipDataEpilogue\",\"cacheCheckpointOverride\",\"cacheVersionOverride\",\"lockfileVersionOverride\",\"osOverride\",\"cpuOverride\",\"libcOverride\",\"binFolder\",\"version\",\"flags\",\"profile\",\"gpg\",\"ignoreNode\",\"wrapOutput\",\"home\",\"confDir\",\"registry\",\"ignoreCwd\"]),Mp=/^(?!v)[a-z0-9._-]+$/i,ET=\"yarn_\",dj=\".yarnrc.yml\",Nnt=\"********\",wI=(C=>(C.ANY=\"ANY\",C.BOOLEAN=\"BOOLEAN\",C.ABSOLUTE_PATH=\"ABSOLUTE_PATH\",C.LOCATOR=\"LOCATOR\",C.LOCATOR_LOOSE=\"LOCATOR_LOOSE\",C.NUMBER=\"NUMBER\",C.STRING=\"STRING\",C.DURATION=\"DURATION\",C.SECRET=\"SECRET\",C.SHAPE=\"SHAPE\",C.MAP=\"MAP\",C))(wI||{}),upe=ht,mj=(c=>(c.MILLISECONDS=\"ms\",c.SECONDS=\"s\",c.MINUTES=\"m\",c.HOURS=\"h\",c.DAYS=\"d\",c.WEEKS=\"w\",c))(mj||{}),IT=(r=>(r.JUNCTIONS=\"junctions\",r.SYMLINKS=\"symlinks\",r))(IT||{}),mT={lastUpdateCheck:{description:\"Last timestamp we checked whether new Yarn versions were available\",type:\"STRING\",default:null},yarnPath:{description:\"Path to the local executable that must be used over the global one\",type:\"ABSOLUTE_PATH\",default:null},ignorePath:{description:\"If true, the local executable will be ignored when using the global one\",type:\"BOOLEAN\",default:!1},globalFolder:{description:\"Folder where all system-global files are stored\",type:\"ABSOLUTE_PATH\",default:G8()},cacheFolder:{description:\"Folder where the cache files must be written\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/cache\"},compressionLevel:{description:\"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)\",type:\"NUMBER\",values:[\"mixed\",0,1,2,3,4,5,6,7,8,9],default:0},virtualFolder:{description:\"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named __virtual__)\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/__virtual__\"},installStatePath:{description:\"Path of the file where the install state will be persisted\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/install-state.gz\"},immutablePatterns:{description:\"Array of glob patterns; files matching them won't be allowed to change during immutable installs\",type:\"STRING\",default:[],isArray:!0},rcFilename:{description:\"Name of the files where the configuration can be found\",type:\"STRING\",default:gj()},enableGlobalCache:{description:\"If true, the system-wide cache folder will be used regardless of `cache-folder`\",type:\"BOOLEAN\",default:!0},cacheMigrationMode:{description:\"Defines the conditions under which Yarn upgrades should cause the cache archives to be regenerated.\",type:\"STRING\",values:[\"always\",\"match-spec\",\"required-only\"],default:\"always\"},enableColors:{description:\"If true, the CLI is allowed to use colors in its output\",type:\"BOOLEAN\",default:Zk,defaultText:\"<dynamic>\"},enableHyperlinks:{description:\"If true, the CLI is allowed to use hyperlinks in its output\",type:\"BOOLEAN\",default:X4,defaultText:\"<dynamic>\"},enableInlineBuilds:{description:\"If true, the CLI will print the build output on the command line\",type:\"BOOLEAN\",default:Lp.isCI,defaultText:\"<dynamic>\"},enableMessageNames:{description:\"If true, the CLI will prefix most messages with codes suitable for search engines\",type:\"BOOLEAN\",default:!0},enableProgressBars:{description:\"If true, the CLI is allowed to show a progress bar for long-running events\",type:\"BOOLEAN\",default:!Lp.isCI,defaultText:\"<dynamic>\"},enableTimers:{description:\"If true, the CLI is allowed to print the time spent executing commands\",type:\"BOOLEAN\",default:!0},enableTips:{description:\"If true, installs will print a helpful message every day of the week\",type:\"BOOLEAN\",default:!Lp.isCI,defaultText:\"<dynamic>\"},preferInteractive:{description:\"If true, the CLI will automatically use the interactive mode when called from a TTY\",type:\"BOOLEAN\",default:!1},preferTruncatedLines:{description:\"If true, the CLI will truncate lines that would go beyond the size of the terminal\",type:\"BOOLEAN\",default:!1},progressBarStyle:{description:\"Which style of progress bar should be used (only when progress bars are enabled)\",type:\"STRING\",default:void 0,defaultText:\"<dynamic>\"},defaultLanguageName:{description:\"Default language mode that should be used when a package doesn't offer any insight\",type:\"STRING\",default:\"node\"},defaultProtocol:{description:\"Default resolution protocol used when resolving pure semver and tag ranges\",type:\"STRING\",default:\"npm:\"},enableTransparentWorkspaces:{description:\"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol\",type:\"BOOLEAN\",default:!0},supportedArchitectures:{description:\"Architectures that Yarn will fetch and inject into the resolver\",type:\"SHAPE\",properties:{os:{description:\"Array of supported process.platform strings, or null to target them all\",type:\"STRING\",isArray:!0,isNullable:!0,default:[\"current\"]},cpu:{description:\"Array of supported process.arch strings, or null to target them all\",type:\"STRING\",isArray:!0,isNullable:!0,default:[\"current\"]},libc:{description:\"Array of supported libc libraries, or null to target them all\",type:\"STRING\",isArray:!0,isNullable:!0,default:[\"current\"]}}},enableMirror:{description:\"If true, the downloaded packages will be retrieved and stored in both the local and global folders\",type:\"BOOLEAN\",default:!0},enableNetwork:{description:\"If false, Yarn will refuse to use the network if required to\",type:\"BOOLEAN\",default:!0},enableOfflineMode:{description:\"If true, Yarn will attempt to retrieve files and metadata from the global cache rather than the network\",type:\"BOOLEAN\",default:!1},httpProxy:{description:\"URL of the http proxy that must be used for outgoing http requests\",type:\"STRING\",default:null},httpsProxy:{description:\"URL of the http proxy that must be used for outgoing https requests\",type:\"STRING\",default:null},unsafeHttpWhitelist:{description:\"List of the hostnames for which http queries are allowed (glob patterns are supported)\",type:\"STRING\",default:[],isArray:!0},httpTimeout:{description:\"Timeout of each http request\",type:\"DURATION\",unit:\"ms\",default:\"1m\"},httpRetry:{description:\"Retry times on http failure\",type:\"NUMBER\",default:3},networkConcurrency:{description:\"Maximal number of concurrent requests\",type:\"NUMBER\",default:50},taskPoolConcurrency:{description:\"Maximal amount of concurrent heavy task processing\",type:\"NUMBER\",default:fj()},taskPoolMode:{description:\"Execution strategy for heavy tasks\",type:\"STRING\",values:[\"async\",\"workers\"],default:\"workers\"},networkSettings:{description:\"Network settings per hostname (glob patterns are supported)\",type:\"MAP\",valueDefinition:{description:\"\",type:\"SHAPE\",properties:{httpsCaFilePath:{description:\"Path to file containing one or multiple Certificate Authority signing certificates\",type:\"ABSOLUTE_PATH\",default:null},enableNetwork:{description:\"If false, the package manager will refuse to use the network if required to\",type:\"BOOLEAN\",default:null},httpProxy:{description:\"URL of the http proxy that must be used for outgoing http requests\",type:\"STRING\",default:null},httpsProxy:{description:\"URL of the http proxy that must be used for outgoing https requests\",type:\"STRING\",default:null},httpsKeyFilePath:{description:\"Path to file containing private key in PEM format\",type:\"ABSOLUTE_PATH\",default:null},httpsCertFilePath:{description:\"Path to file containing certificate chain in PEM format\",type:\"ABSOLUTE_PATH\",default:null}}}},httpsCaFilePath:{description:\"A path to a file containing one or multiple Certificate Authority signing certificates\",type:\"ABSOLUTE_PATH\",default:null},httpsKeyFilePath:{description:\"Path to file containing private key in PEM format\",type:\"ABSOLUTE_PATH\",default:null},httpsCertFilePath:{description:\"Path to file containing certificate chain in PEM format\",type:\"ABSOLUTE_PATH\",default:null},enableStrictSsl:{description:\"If false, SSL certificate errors will be ignored\",type:\"BOOLEAN\",default:!0},logFilters:{description:\"Overrides for log levels\",type:\"SHAPE\",isArray:!0,concatenateValues:!0,properties:{code:{description:\"Code of the messages covered by this override\",type:\"STRING\",default:void 0},text:{description:\"Code of the texts covered by this override\",type:\"STRING\",default:void 0},pattern:{description:\"Code of the patterns covered by this override\",type:\"STRING\",default:void 0},level:{description:\"Log level override, set to null to remove override\",type:\"STRING\",values:Object.values(eQ),isNullable:!0,default:void 0}}},enableTelemetry:{description:\"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry\",type:\"BOOLEAN\",default:!0},telemetryInterval:{description:\"Minimal amount of time between two telemetry uploads\",type:\"DURATION\",unit:\"d\",default:\"7d\"},telemetryUserId:{description:\"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.\",type:\"STRING\",default:null},enableHardenedMode:{description:\"If true, automatically enable --check-resolutions --refresh-lockfile on installs\",type:\"BOOLEAN\",default:Lp.isPR&&Rnt,defaultText:\"<true on public PRs>\"},enableScripts:{description:\"If true, packages are allowed to have install scripts by default\",type:\"BOOLEAN\",default:!0},enableStrictSettings:{description:\"If true, unknown settings will cause Yarn to abort\",type:\"BOOLEAN\",default:!0},enableImmutableCache:{description:\"If true, the cache is reputed immutable and actions that would modify it will throw\",type:\"BOOLEAN\",default:!1},enableCacheClean:{description:\"If false, disallows the `cache clean` command\",type:\"BOOLEAN\",default:!0},checksumBehavior:{description:\"Enumeration defining what to do when a checksum doesn't match expectations\",type:\"STRING\",default:\"throw\"},injectEnvironmentFiles:{description:\"List of all the environment files that Yarn should inject inside the process when it starts\",type:\"ABSOLUTE_PATH\",default:[\".env.yarn?\"],isArray:!0},packageExtensions:{description:\"Map of package corrections to apply on the dependency tree\",type:\"MAP\",valueDefinition:{description:\"The extension that will be applied to any package whose version matches the specified range\",type:\"SHAPE\",properties:{dependencies:{description:\"The set of dependencies that must be made available to the current package in order for it to work properly\",type:\"MAP\",valueDefinition:{description:\"A range\",type:\"STRING\"}},peerDependencies:{description:\"Inherited dependencies - the consumer of the package will be tasked to provide them\",type:\"MAP\",valueDefinition:{description:\"A semver range\",type:\"STRING\"}},peerDependenciesMeta:{description:\"Extra information related to the dependencies listed in the peerDependencies field\",type:\"MAP\",valueDefinition:{description:\"The peerDependency meta\",type:\"SHAPE\",properties:{optional:{description:\"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error\",type:\"BOOLEAN\",default:!1}}}}}}}};Hnt=process.platform===\"win32\"?Unt:_nt;ze=class t{constructor(e){this.isCI=Lp.isCI;this.projectCwd=null;this.plugins=new Map;this.settings=new Map;this.values=new Map;this.sources=new Map;this.invalid=new Map;this.env={};this.limits=new Map;this.packageExtensions=null;this.startingCwd=e}static{this.deleteProperty=Symbol()}static{this.telemetry=null}static create(e,r,s){let a=new t(e);typeof r<\"u\"&&!(r instanceof Map)&&(a.projectCwd=r),a.importSettings(mT);let n=typeof s<\"u\"?s:r instanceof Map?r:new Map;for(let[c,f]of n)a.activatePlugin(c,f);return a}static async find(e,r,{strict:s=!0,usePathCheck:a=null,useRc:n=!0}={}){let c=Mnt();delete c.rcFilename;let f=new t(e),p=await t.findRcFiles(e),h=await t.findFolderRcFile(fI());h&&(p.find(me=>me.path===h.path)||p.unshift(h));let E=Eue(p.map(le=>[le.path,le.data])),C=vt.dot,S=new Set(Object.keys(mT)),P=({yarnPath:le,ignorePath:me,injectEnvironmentFiles:pe})=>({yarnPath:le,ignorePath:me,injectEnvironmentFiles:pe}),I=({yarnPath:le,ignorePath:me,injectEnvironmentFiles:pe,...Be})=>{let Ce={};for(let[g,we]of Object.entries(Be))S.has(g)&&(Ce[g]=we);return Ce},R=({yarnPath:le,ignorePath:me,...pe})=>{let Be={};for(let[Ce,g]of Object.entries(pe))S.has(Ce)||(Be[Ce]=g);return Be};if(f.importSettings(P(mT)),f.useWithSource(\"<environment>\",P(c),e,{strict:!1}),E){let[le,me]=E;f.useWithSource(le,P(me),C,{strict:!1})}if(a){if(await jnt({configuration:f,selfPath:a})!==null)return f;f.useWithSource(\"<override>\",{ignorePath:!0},e,{strict:!1,overwrite:!0})}let N=await t.findProjectCwd(e);f.startingCwd=e,f.projectCwd=N;let U=Object.assign(Object.create(null),process.env);f.env=U;let W=await Promise.all(f.get(\"injectEnvironmentFiles\").map(async le=>{let me=le.endsWith(\"?\")?await ce.readFilePromise(le.slice(0,-1),\"utf8\").catch(()=>\"\"):await ce.readFilePromise(le,\"utf8\");return(0,ape.parse)(me)}));for(let le of W)for(let[me,pe]of Object.entries(le))f.env[me]=Vk(pe,{env:U});if(f.importSettings(I(mT)),f.useWithSource(\"<environment>\",I(c),e,{strict:s}),E){let[le,me]=E;f.useWithSource(le,I(me),C,{strict:s})}let ee=le=>\"default\"in le?le.default:le,ie=new Map([[\"@@core\",rue]]);if(r!==null)for(let le of r.plugins.keys())ie.set(le,ee(r.modules.get(le)));for(let[le,me]of ie)f.activatePlugin(le,me);let ue=new Map([]);if(r!==null){let le=new Map;for(let[Be,Ce]of r.modules)le.set(Be,()=>Ce);let me=new Set,pe=async(Be,Ce)=>{let{factory:g,name:we}=Pp(Be);if(!g||me.has(we))return;let ye=new Map(le),Ae=Z=>{if((0,lpe.isBuiltin)(Z))return Pp(Z);if(ye.has(Z))return ye.get(Z)();throw new nt(`This plugin cannot access the package referenced via ${Z} which is neither a builtin, nor an exposed entry`)},se=await qE(async()=>ee(await g(Ae)),Z=>`${Z} (when initializing ${we}, defined in ${Ce})`);le.set(we,()=>se),me.add(we),ue.set(we,se)};if(c.plugins)for(let Be of c.plugins.split(\";\")){let Ce=J.resolve(e,fe.toPortablePath(Be));await pe(Ce,\"<environment>\")}for(let{path:Be,cwd:Ce,data:g}of p)if(n&&Array.isArray(g.plugins))for(let we of g.plugins){let ye=typeof we!=\"string\"?we.path:we,Ae=we?.spec??\"\",se=we?.checksum??\"\";if(ov.has(Ae))continue;let Z=J.resolve(Ce,fe.toPortablePath(ye));if(!await ce.existsPromise(Z)){if(!Ae){let mt=Ht(f,J.basename(Z,\".cjs\"),ht.NAME),j=Ht(f,\".gitignore\",ht.NAME),rt=Ht(f,f.values.get(\"rcFilename\"),ht.NAME),Fe=Ht(f,\"https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored\",ht.URL);throw new nt(`Missing source for the ${mt} plugin - please try to remove the plugin from ${rt} then reinstall it manually. This error usually occurs because ${j} is incorrect, check ${Fe} to make sure your plugin folder isn't gitignored.`)}if(!Ae.match(/^https?:/)){let mt=Ht(f,J.basename(Z,\".cjs\"),ht.NAME),j=Ht(f,f.values.get(\"rcFilename\"),ht.NAME);throw new nt(`Failed to recognize the source for the ${mt} plugin - please try to delete the plugin from ${j} then reinstall it manually.`)}let De=await lj(Ae,{configuration:f}),Re=us(De);if(se&&se!==Re){let mt=Ht(f,J.basename(Z,\".cjs\"),ht.NAME),j=Ht(f,f.values.get(\"rcFilename\"),ht.NAME),rt=Ht(f,`yarn plugin import ${Ae}`,ht.CODE);throw new nt(`Failed to fetch the ${mt} plugin from its remote location: its checksum seems to have changed. If this is expected, please remove the plugin from ${j} then run ${rt} to reimport it.`)}await ce.mkdirPromise(J.dirname(Z),{recursive:!0}),await ce.writeFilePromise(Z,De)}await pe(Z,Be)}}for(let[le,me]of ue)f.activatePlugin(le,me);if(f.useWithSource(\"<environment>\",R(c),e,{strict:s}),E){let[le,me]=E;f.useWithSource(le,R(me),C,{strict:s})}return f.get(\"enableGlobalCache\")&&(f.values.set(\"cacheFolder\",`${f.get(\"globalFolder\")}/cache`),f.sources.set(\"cacheFolder\",\"<internal>\")),f}static async findRcFiles(e){let r=gj(),s=[],a=e,n=null;for(;a!==n;){n=a;let c=J.join(n,r);if(ce.existsSync(c)){let f,p;try{p=await ce.readFilePromise(c,\"utf8\"),f=ls(p)}catch{let h=\"\";throw p?.match(/^\\s+(?!-)[^:]+\\s+\\S+/m)&&(h=\" (in particular, make sure you list the colons after each key name)\"),new nt(`Parse error when loading ${c}; please check it's proper Yaml${h}`)}s.unshift({path:c,cwd:n,data:f})}a=J.dirname(n)}return s}static async findFolderRcFile(e){let r=J.join(e,Er.rc),s;try{s=await ce.readFilePromise(r,\"utf8\")}catch(n){if(n.code===\"ENOENT\")return null;throw n}let a=ls(s);return{path:r,cwd:e,data:a}}static async findProjectCwd(e){let r=null,s=e,a=null;for(;s!==a;){if(a=s,ce.existsSync(J.join(a,Er.lockfile)))return a;ce.existsSync(J.join(a,Er.manifest))&&(r=a),s=J.dirname(a)}return r}static async updateConfiguration(e,r,s={}){let a=gj(),n=J.join(e,a),c=ce.existsSync(n)?ls(await ce.readFilePromise(n,\"utf8\")):{},f=!1,p;if(typeof r==\"function\"){try{p=r(c)}catch{p=r({})}if(p===c)return!1}else{p=c;for(let h of Object.keys(r)){let E=c[h],C=r[h],S;if(typeof C==\"function\")try{S=C(E)}catch{S=C(void 0)}else S=C;E!==S&&(S===t.deleteProperty?delete p[h]:p[h]=S,f=!0)}if(!f)return!1}return await ce.changeFilePromise(n,nl(p),{automaticNewlines:!0}),!0}static async addPlugin(e,r){r.length!==0&&await t.updateConfiguration(e,s=>{let a=s.plugins??[];if(a.length===0)return{...s,plugins:r};let n=[],c=[...r];for(let f of a){let p=typeof f!=\"string\"?f.path:f,h=c.find(E=>E.path===p);h?(n.push(h),c=c.filter(E=>E!==h)):n.push(f)}return n.push(...c),{...s,plugins:n}})}static async updateHomeConfiguration(e){let r=fI();return await t.updateConfiguration(r,e)}activatePlugin(e,r){this.plugins.set(e,r),typeof r.configuration<\"u\"&&this.importSettings(r.configuration)}importSettings(e){for(let[r,s]of Object.entries(e))if(s!=null){if(this.settings.has(r))throw new Error(`Cannot redefine settings \"${r}\"`);this.settings.set(r,s),this.values.set(r,Ej(this,s))}}useWithSource(e,r,s,a){try{this.use(e,r,s,a)}catch(n){throw n.message+=` (in ${Ht(this,e,ht.PATH)})`,n}}use(e,r,s,{strict:a=!0,overwrite:n=!1}={}){a=a&&this.get(\"enableStrictSettings\");for(let c of[\"enableStrictSettings\",...Object.keys(r)]){let f=r[c],p=H8(f);if(p&&(e=p),typeof f>\"u\"||c===\"plugins\"||e===\"<environment>\"&&Fnt.has(c))continue;if(c===\"rcFilename\")throw new nt(`The rcFilename settings can only be set via ${`${ET}RC_FILENAME`.toUpperCase()}, not via a rc file`);let h=this.settings.get(c);if(!h){let C=fI(),S=e[0]!==\"<\"?J.dirname(e):null;if(a&&!(S!==null?C===S:!1))throw new nt(`Unrecognized or legacy configuration settings found: ${c} - run \"yarn config\" to see the list of settings supported in Yarn`);this.invalid.set(c,e);continue}if(this.sources.has(c)&&!(n||h.type===\"MAP\"||h.isArray&&h.concatenateValues))continue;let E;try{E=yj(this,c,f,h,s)}catch(C){throw C.message+=` in ${Ht(this,e,ht.PATH)}`,C}if(c===\"enableStrictSettings\"&&e!==\"<environment>\"){a=E;continue}if(h.type===\"MAP\"){let C=this.values.get(c);this.values.set(c,new Map(n?[...C,...E]:[...E,...C])),this.sources.set(c,`${this.sources.get(c)}, ${e}`)}else if(h.isArray&&h.concatenateValues){let C=this.values.get(c);this.values.set(c,n?[...C,...E]:[...E,...C]),this.sources.set(c,`${this.sources.get(c)}, ${e}`)}else this.values.set(c,E),this.sources.set(c,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key \"${e}\"`);return this.values.get(e)}getSpecial(e,{hideSecrets:r=!1,getNativePaths:s=!1}){let a=this.get(e),n=this.settings.get(e);if(typeof n>\"u\")throw new nt(`Couldn't find a configuration settings named \"${e}\"`);return yT(a,n,{hideSecrets:r,getNativePaths:s})}getSubprocessStreams(e,{header:r,prefix:s,report:a}){let n,c,f=ce.createWriteStream(e);if(this.get(\"enableInlineBuilds\")){let p=a.createStreamReporter(`${s} ${Ht(this,\"STDOUT\",\"green\")}`),h=a.createStreamReporter(`${s} ${Ht(this,\"STDERR\",\"red\")}`);n=new hj.PassThrough,n.pipe(p),n.pipe(f),c=new hj.PassThrough,c.pipe(h),c.pipe(f)}else n=f,c=f,typeof r<\"u\"&&n.write(`${r}\n`);return{stdout:n,stderr:c}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let s of r.resolvers||[])e.push(new s);return new rm([new FQ,new Ei,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let s of r.fetchers||[])e.push(new s);return new aI([new lI,new cI,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let s of r.linkers||[])e.push(new s);return e}getSupportedArchitectures(){let e=sv(),r=this.get(\"supportedArchitectures\"),s=r.get(\"os\");s!==null&&(s=s.map(c=>c===\"current\"?e.os:c));let a=r.get(\"cpu\");a!==null&&(a=a.map(c=>c===\"current\"?e.cpu:c));let n=r.get(\"libc\");return n!==null&&(n=Wl(n,c=>c===\"current\"?e.libc??Wl.skip:c)),{os:s,cpu:a,libc:n}}isInteractive({interactive:e,stdout:r}){return r.isTTY?e??this.get(\"preferInteractive\"):!1}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let e=this.packageExtensions,r=(s,a,{userProvided:n=!1}={})=>{if(!cl(s.range))throw new Error(\"Only semver ranges are allowed as keys for the packageExtensions setting\");let c=new Ut;c.load(a,{yamlCompatibilityMode:!0});let f=xB(e,s.identHash),p=[];f.push([s.range,p]);let h={status:\"inactive\",userProvided:n,parentDescriptor:s};for(let E of c.dependencies.values())p.push({...h,type:\"Dependency\",descriptor:E});for(let E of c.peerDependencies.values())p.push({...h,type:\"PeerDependency\",descriptor:E});for(let[E,C]of c.peerDependenciesMeta)for(let[S,P]of Object.entries(C))p.push({...h,type:\"PeerDependencyMeta\",selector:E,key:S,value:P})};await this.triggerHook(s=>s.registerPackageExtensions,this,r);for(let[s,a]of this.get(\"packageExtensions\"))r(C0(s,!0),Yk(a),{userProvided:!0});return e}normalizeLocator(e){return cl(e.reference)?Ws(e,`${this.get(\"defaultProtocol\")}${e.reference}`):Mp.test(e.reference)?Ws(e,`${this.get(\"defaultProtocol\")}${e.reference}`):e}normalizeDependency(e){return cl(e.range)?On(e,`${this.get(\"defaultProtocol\")}${e.range}`):Mp.test(e.range)?On(e,`${this.get(\"defaultProtocol\")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,s])=>[r,this.normalizeDependency(s)]))}normalizePackage(e,{packageExtensions:r}){let s=LB(e),a=r.get(e.identHash);if(typeof a<\"u\"){let c=e.version;if(c!==null){for(let[f,p]of a)if(Zf(c,f))for(let h of p)switch(h.status===\"inactive\"&&(h.status=\"redundant\"),h.type){case\"Dependency\":typeof s.dependencies.get(h.descriptor.identHash)>\"u\"&&(h.status=\"active\",s.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case\"PeerDependency\":typeof s.peerDependencies.get(h.descriptor.identHash)>\"u\"&&(h.status=\"active\",s.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case\"PeerDependencyMeta\":{let E=s.peerDependenciesMeta.get(h.selector);(typeof E>\"u\"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status=\"active\",Yl(s.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:G4(h)}}}let n=c=>c.scope?`${c.scope}__${c.name}`:`${c.name}`;for(let c of s.peerDependenciesMeta.keys()){let f=Sa(c);s.peerDependencies.has(f.identHash)||s.peerDependencies.set(f.identHash,On(f,\"*\"))}for(let c of s.peerDependencies.values()){if(c.scope===\"types\")continue;let f=n(c),p=Da(\"types\",f),h=un(p);s.peerDependencies.has(p.identHash)||s.peerDependenciesMeta.has(h)||s.dependencies.has(p.identHash)||(s.peerDependencies.set(p.identHash,On(p,\"*\")),s.peerDependenciesMeta.set(h,{optional:!0}))}return s.dependencies=new Map(qs(s.dependencies,([,c])=>al(c))),s.peerDependencies=new Map(qs(s.peerDependencies,([,c])=>al(c))),s}getLimit(e){return Yl(this.limits,e,()=>(0,cpe.default)(this.get(e)))}async triggerHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);n&&await n(...r)}}async triggerMultipleHooks(e,r){for(let s of r)await this.triggerHook(e,...s)}async reduceHook(e,r,...s){let a=r;for(let n of this.plugins.values()){let c=n.hooks;if(!c)continue;let f=e(c);f&&(a=await f(a,...s))}return a}async firstHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);if(!n)continue;let c=await n(...r);if(typeof c<\"u\")return c}return null}}});var qr={};Vt(qr,{EndStrategy:()=>Bj,ExecError:()=>CT,PipeError:()=>lv,execvp:()=>Aj,pipevp:()=>Wu});function om(t){return t!==null&&typeof t.fd==\"number\"}function Ij(){}function Cj(){for(let t of am)t.kill()}async function Wu(t,e,{cwd:r,env:s=process.env,strict:a=!1,stdin:n=null,stdout:c,stderr:f,end:p=2}){let h=[\"pipe\",\"pipe\",\"pipe\"];n===null?h[0]=\"ignore\":om(n)&&(h[0]=n),om(c)&&(h[1]=c),om(f)&&(h[2]=f);let E=(0,wj.default)(t,e,{cwd:fe.fromPortablePath(r),env:{...s,PWD:fe.fromPortablePath(r)},stdio:h});am.add(E),am.size===1&&(process.on(\"SIGINT\",Ij),process.on(\"SIGTERM\",Cj)),!om(n)&&n!==null&&n.pipe(E.stdin),om(c)||E.stdout.pipe(c,{end:!1}),om(f)||E.stderr.pipe(f,{end:!1});let C=()=>{for(let S of new Set([c,f]))om(S)||S.end()};return new Promise((S,P)=>{E.on(\"error\",I=>{am.delete(E),am.size===0&&(process.off(\"SIGINT\",Ij),process.off(\"SIGTERM\",Cj)),(p===2||p===1)&&C(),P(I)}),E.on(\"close\",(I,R)=>{am.delete(E),am.size===0&&(process.off(\"SIGINT\",Ij),process.off(\"SIGTERM\",Cj)),(p===2||p===1&&I!==0)&&C(),I===0||!a?S({code:vj(I,R)}):P(new lv({fileName:t,code:I,signal:R}))})})}async function Aj(t,e,{cwd:r,env:s=process.env,encoding:a=\"utf8\",strict:n=!1}){let c=[\"ignore\",\"pipe\",\"pipe\"],f=[],p=[],h=fe.fromPortablePath(r);typeof s.PWD<\"u\"&&(s={...s,PWD:h});let E=(0,wj.default)(t,e,{cwd:h,env:s,stdio:c});return E.stdout.on(\"data\",C=>{f.push(C)}),E.stderr.on(\"data\",C=>{p.push(C)}),await new Promise((C,S)=>{E.on(\"error\",P=>{let I=ze.create(r),R=Ht(I,t,ht.PATH);S(new jt(1,`Process ${R} failed to spawn`,N=>{N.reportError(1,`  ${Kf(I,{label:\"Thrown Error\",value:_u(ht.NO_HINT,P.message)})}`)}))}),E.on(\"close\",(P,I)=>{let R=a===\"buffer\"?Buffer.concat(f):Buffer.concat(f).toString(a),N=a===\"buffer\"?Buffer.concat(p):Buffer.concat(p).toString(a);P===0||!n?C({code:vj(P,I),stdout:R,stderr:N}):S(new CT({fileName:t,code:P,signal:I,stdout:R,stderr:N}))})})}function vj(t,e){let r=Gnt.get(e);return typeof r<\"u\"?128+r:t??1}function qnt(t,e,{configuration:r,report:s}){s.reportError(1,`  ${Kf(r,t!==null?{label:\"Exit Code\",value:_u(ht.NUMBER,t)}:{label:\"Exit Signal\",value:_u(ht.CODE,e)})}`)}var wj,Bj,lv,CT,am,Gnt,dT=Xe(()=>{Dt();wj=ut(_U());av();Tc();xc();Bj=(s=>(s[s.Never=0]=\"Never\",s[s.ErrorCode=1]=\"ErrorCode\",s[s.Always=2]=\"Always\",s))(Bj||{}),lv=class extends jt{constructor({fileName:e,code:r,signal:s}){let a=ze.create(J.cwd()),n=Ht(a,e,ht.PATH);super(1,`Child ${n} reported an error`,c=>{qnt(r,s,{configuration:a,report:c})}),this.code=vj(r,s)}},CT=class extends lv{constructor({fileName:e,code:r,signal:s,stdout:a,stderr:n}){super({fileName:e,code:r,signal:s}),this.stdout=a,this.stderr=n}};am=new Set;Gnt=new Map([[\"SIGINT\",2],[\"SIGQUIT\",3],[\"SIGKILL\",9],[\"SIGTERM\",15]])});function Ape(t){fpe=t}function cv(){return typeof Sj>\"u\"&&(Sj=fpe()),Sj}var Sj,fpe,Dj=Xe(()=>{fpe=()=>{throw new Error(\"Assertion failed: No libzip instance is available, and no factory was configured\")}});var ppe=_((wT,Pj)=>{var Wnt=Object.assign({},Ie(\"fs\")),bj=function(){var t=typeof document<\"u\"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<\"u\"&&(t=t||__filename),function(e){e=e||{};var r=typeof e<\"u\"?e:{},s,a;r.ready=new Promise(function(Ke,st){s=Ke,a=st});var n={},c;for(c in r)r.hasOwnProperty(c)&&(n[c]=r[c]);var f=[],p=\"./this.program\",h=function(Ke,st){throw st},E=!1,C=!0,S=\"\";function P(Ke){return r.locateFile?r.locateFile(Ke,S):S+Ke}var I,R,N,U;C&&(E?S=Ie(\"path\").dirname(S)+\"/\":S=__dirname+\"/\",I=function(st,St){var lr=Me(st);return lr?St?lr:lr.toString():(N||(N=Wnt),U||(U=Ie(\"path\")),st=U.normalize(st),N.readFileSync(st,St?null:\"utf8\"))},R=function(st){var St=I(st,!0);return St.buffer||(St=new Uint8Array(St)),we(St.buffer),St},process.argv.length>1&&(p=process.argv[1].replace(/\\\\/g,\"/\")),f=process.argv.slice(2),h=function(Ke){process.exit(Ke)},r.inspect=function(){return\"[Emscripten Module object]\"});var W=r.print||console.log.bind(console),ee=r.printErr||console.warn.bind(console);for(c in n)n.hasOwnProperty(c)&&(r[c]=n[c]);n=null,r.arguments&&(f=r.arguments),r.thisProgram&&(p=r.thisProgram),r.quit&&(h=r.quit);var ie=0,ue=function(Ke){ie=Ke},le;r.wasmBinary&&(le=r.wasmBinary);var me=r.noExitRuntime||!0;typeof WebAssembly!=\"object\"&&rs(\"no native wasm support detected\");function pe(Ke,st,St){switch(st=st||\"i8\",st.charAt(st.length-1)===\"*\"&&(st=\"i32\"),st){case\"i1\":return Ve[Ke>>0];case\"i8\":return Ve[Ke>>0];case\"i16\":return mh((Ke>>1)*2);case\"i32\":return to((Ke>>2)*4);case\"i64\":return to((Ke>>2)*4);case\"float\":return Af((Ke>>2)*4);case\"double\":return dh((Ke>>3)*8);default:rs(\"invalid type for getValue: \"+st)}return null}var Be,Ce=!1,g;function we(Ke,st){Ke||rs(\"Assertion failed: \"+st)}function ye(Ke){var st=r[\"_\"+Ke];return we(st,\"Cannot call unknown function \"+Ke+\", make sure it is exported\"),st}function Ae(Ke,st,St,lr,te){var Ee={string:function(qi){var Tn=0;if(qi!=null&&qi!==0){var Ga=(qi.length<<2)+1;Tn=wi(Ga),mt(qi,Tn,Ga)}return Tn},array:function(qi){var Tn=wi(qi.length);return Fe(qi,Tn),Tn}};function Oe(qi){return st===\"string\"?De(qi):st===\"boolean\"?!!qi:qi}var dt=ye(Ke),Et=[],bt=0;if(lr)for(var tr=0;tr<lr.length;tr++){var An=Ee[St[tr]];An?(bt===0&&(bt=gf()),Et[tr]=An(lr[tr])):Et[tr]=lr[tr]}var li=dt.apply(null,Et);return li=Oe(li),bt!==0&&fc(bt),li}function se(Ke,st,St,lr){St=St||[];var te=St.every(function(Oe){return Oe===\"number\"}),Ee=st!==\"string\";return Ee&&te&&!lr?ye(Ke):function(){return Ae(Ke,st,St,arguments,lr)}}var Z=new TextDecoder(\"utf8\");function De(Ke,st){if(!Ke)return\"\";for(var St=Ke+st,lr=Ke;!(lr>=St)&&ke[lr];)++lr;return Z.decode(ke.subarray(Ke,lr))}function Re(Ke,st,St,lr){if(!(lr>0))return 0;for(var te=St,Ee=St+lr-1,Oe=0;Oe<Ke.length;++Oe){var dt=Ke.charCodeAt(Oe);if(dt>=55296&&dt<=57343){var Et=Ke.charCodeAt(++Oe);dt=65536+((dt&1023)<<10)|Et&1023}if(dt<=127){if(St>=Ee)break;st[St++]=dt}else if(dt<=2047){if(St+1>=Ee)break;st[St++]=192|dt>>6,st[St++]=128|dt&63}else if(dt<=65535){if(St+2>=Ee)break;st[St++]=224|dt>>12,st[St++]=128|dt>>6&63,st[St++]=128|dt&63}else{if(St+3>=Ee)break;st[St++]=240|dt>>18,st[St++]=128|dt>>12&63,st[St++]=128|dt>>6&63,st[St++]=128|dt&63}}return st[St]=0,St-te}function mt(Ke,st,St){return Re(Ke,ke,st,St)}function j(Ke){for(var st=0,St=0;St<Ke.length;++St){var lr=Ke.charCodeAt(St);lr>=55296&&lr<=57343&&(lr=65536+((lr&1023)<<10)|Ke.charCodeAt(++St)&1023),lr<=127?++st:lr<=2047?st+=2:lr<=65535?st+=3:st+=4}return st}function rt(Ke){var st=j(Ke)+1,St=La(st);return St&&Re(Ke,Ve,St,st),St}function Fe(Ke,st){Ve.set(Ke,st)}function Ne(Ke,st){return Ke%st>0&&(Ke+=st-Ke%st),Ke}var Pe,Ve,ke,it,Ue,x,w,b,y,F;function z(Ke){Pe=Ke,r.HEAP_DATA_VIEW=F=new DataView(Ke),r.HEAP8=Ve=new Int8Array(Ke),r.HEAP16=it=new Int16Array(Ke),r.HEAP32=x=new Int32Array(Ke),r.HEAPU8=ke=new Uint8Array(Ke),r.HEAPU16=Ue=new Uint16Array(Ke),r.HEAPU32=w=new Uint32Array(Ke),r.HEAPF32=b=new Float32Array(Ke),r.HEAPF64=y=new Float64Array(Ke)}var X=r.INITIAL_MEMORY||16777216,$,oe=[],xe=[],Te=[],lt=!1;function Ct(){if(r.preRun)for(typeof r.preRun==\"function\"&&(r.preRun=[r.preRun]);r.preRun.length;)Pt(r.preRun.shift());Ts(oe)}function qt(){lt=!0,Ts(xe)}function ir(){if(r.postRun)for(typeof r.postRun==\"function\"&&(r.postRun=[r.postRun]);r.postRun.length;)Pr(r.postRun.shift());Ts(Te)}function Pt(Ke){oe.unshift(Ke)}function gn(Ke){xe.unshift(Ke)}function Pr(Ke){Te.unshift(Ke)}var Ir=0,Or=null,on=null;function ai(Ke){Ir++,r.monitorRunDependencies&&r.monitorRunDependencies(Ir)}function Io(Ke){if(Ir--,r.monitorRunDependencies&&r.monitorRunDependencies(Ir),Ir==0&&(Or!==null&&(clearInterval(Or),Or=null),on)){var st=on;on=null,st()}}r.preloadedImages={},r.preloadedAudios={};function rs(Ke){r.onAbort&&r.onAbort(Ke),Ke+=\"\",ee(Ke),Ce=!0,g=1,Ke=\"abort(\"+Ke+\"). Build with -s ASSERTIONS=1 for more info.\";var st=new WebAssembly.RuntimeError(Ke);throw a(st),st}var $s=\"data:application/octet-stream;base64,\";function Co(Ke){return Ke.startsWith($s)}var ji=\"data:application/octet-stream;base64,AGFzbQEAAAAB/wEkYAN/f38Bf2ABfwF/YAJ/fwF/YAF/AGAEf39/fwF/YAN/f38AYAV/f39/fwF/YAJ/fwBgBH9/f38AYAABf2AFf39/fn8BfmAEf35/fwF/YAR/f35/AX5gAn9+AX9gA398fwBgA39/fgF/YAF/AX5gBn9/f39/fwF/YAN/fn8Bf2AEf39/fwF+YAV/f35/fwF/YAR/f35/AX9gA39/fgF+YAJ/fgBgAn9/AX5gBX9/f39/AGADf35/AX5gBX5+f35/AX5gA39/fwF+YAZ/fH9/f38Bf2AAAGAHf35/f39+fwF/YAV/fn9/fwF/YAV/f39/fwF+YAJ+fwF/YAJ/fAACJQYBYQFhAAMBYQFiAAEBYQFjAAABYQFkAAEBYQFlAAIBYQFmAAED5wHlAQMAAwEDAwEHDAgDFgcNEgEDDRcFAQ8DEAUQAwIBAhgECxkEAQMBBQsFAwMDARACBAMAAggLBwEAAwADGgQDGwYGABwBBgMTFBEHBwcVCx4ABAgHBAICAgAfAQICAgIGFSAAIQAiAAIBBgIHAg0LEw0FAQUCACMDAQAUAAAGBQECBQUDCwsSAgEDBQIHAQEICAACCQQEAQABCAEBCQoBAwkBAQEBBgEGBgYABAIEBAQGEQQEAAARAAEDCQEJAQAJCQkBAQECCgoAAAMPAQEBAwACAgICBQIABwAKBgwHAA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IAEgBmogBE0EQCAAKAJIIgEgASADaiADEAcaAkAgAyAAKAJsIgFNBEAgACABIANrNgJsDAELIABCADcCbAsgACAAKAJoIANrIgE2AmggACAAKAJYIANrNgJYIAEgACgChC5JBEAgACABNgKELgsgAEH8gAEoAgARAwAgAiADaiECCwJAIAAoAgAiASgCBCIERQ0AIAAoAjwhBSAAIAIgBCACIARJGyICBH8gACgCSCAAKAJoaiAFaiEFIAEgBCACazYCBAJAAkACQAJAIAEoAhwiBCgCFEEBaw4CAQACCyAEQaABaiAFIAEoAgAgAkHcgAEoAgARCAAMAgsgASABKAIwIAUgASgCACACQcSAASgCABEEADYCMAwBCyAFIAEoAgAgAhAHGgsgASABKAIAIAJqNgIAIAEgASgCCCACajYCCCAAKAI8BSAFCyACaiICNgI8AkAgACgChC4iASACakEDSQ0AIAAoAmggAWshAQJAIAAoAnRBgQhPBEAgACAAIAAoAkggAWoiAi0AACACLQABIAAoAnwRAAA2AlQMAQsgAUUNACAAIAFBAWsgACgChAERAgAaCyAAKAKELiAAKAI8IgJBAUZrIgRFDQAgACABIAQgACgCgAERBQAgACAAKAKELiAEazYChC4gACgCPCECCyACQYUCSw0AIAAoAgAoAgRFDQAgACgCMCEBDAELCwJAIAAoAkQiAiAAKAJAIgNNDQAgAAJ/IAAoAjwgACgCaGoiASADSwRAIAAoAkggAWpBACACIAFrIgNBggIgA0GCAkkbIgMQGSABIANqDAELIAFBggJqIgEgA00NASAAKAJIIANqQQAgAiADayICIAEgA2siAyACIANJGyIDEBkgACgCQCADags2AkALC50CAQF/AkAgAAJ/IAAoAqAuIgFBwABGBEAgACgCBCAAKAIQaiAAKQOYLjcAACAAQgA3A5guIAAgACgCEEEIajYCEEEADAELIAFBIE4EQCAAKAIEIAAoAhBqIAApA5guPgAAIAAgAEGcLmo1AgA3A5guIAAgACgCEEEEajYCECAAIAAoAqAuQSBrIgE2AqAuCyABQRBOBEAgACgCBCAAKAIQaiAAKQOYLj0AACAAIAAoAhBBAmo2AhAgACAA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EQSBxBEAgB0G//gA2AgQgASECDAgLIAdB0f4ANgIEIABB0A42AhggASECDAcLIB1BfyAGdEF/c62DIBt8IhunIQUgCCAEQQ9xIgNrIQggGiAErUIPg4ghHSABIBdrIgYgAjMBAiAaQX8gA3RBf3Otg3ynIgRPDQIgBCAGayIGIBlNDQEgBygCjEdFDQEgB0HR/gA2AgQgAEG5DDYCGAsgASECIAshBQwFCwJAIA5FBEAgDCARIAZraiEDDAELIAYgDk0EQCAMIA4gBmtqIQMMAQsgDCARIAYgDmsiBmtqIQMgBSAGTQ0AIAUgBmshBQJAAkAgASADTSABIA8gAWusIhogBq0iGyAaIBtUGyIapyIGaiICIANLcQ0AIAMgBmogAUsgASADT3ENACABIAMgBhAHGiACIQEMAQsgASADIAMgAWsiASABQR91IgFqIAFzIgIQByACaiEBIBogAq0iHn0iHFANACACIANqIQIDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgASACKQAANwAAIAEgAikAGDcAGCABIAIpABA3ABAgASACKQAINwAIIBpCIH0hGiACQSBqIQIgAUEgaiEBIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAEgAikAADcAACABIAIpABg3ABggASACKQAQNwAQIAEgAikACDcACCABIAIpADg3ADggASACKQAwNwAwIAEgAikAKDcAKCABIAIpACA3ACAgASACKQBYNwBYIAEgAikAUDcAUCABIAIpAEg3AEggASACKQBANwBAIAEgAikAYDcAYCABIAIpAGg3AGggASACKQBwNwBwIAEgAikAeDcAeCACQYABaiECIAFBgAFqIQEgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAEgAikAADcAACABIAIpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCABIAIpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCABIAIoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCABIAIvAAA7AAAgGkICfSEaIAJBAmohAiAB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0EAIANrIQULIAIgBWohBAJAIAUgDyACa6wiGiABrSIbIBogG1QbIhqnIgFIIAVBf0pxDQAgBUEBSCABIARqIAJLcQ0AIAIgBCABEAcgAWohAgwDCyACIAQgAyADQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANAiABIARqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAILAkAgASADTSABIA8gAWusIhogBa0iGyAaIBtUGyIapyIEaiICIANLcQ0AIAMgBGogAUsgASADT3ENACABIAMgBBAHGgwCCyABIAMgAyABayIBIAFBH3UiAWogAXMiARAHIAFqIQIgGiABrSIefSIcUA0BIAEgA2ohAQNAAkAgHCAeIBwgHlQbIhtCIFQEQCAbIRoMAQsgGyIaQiB9IiBCBYhCAXxCA4MiH1BFBEADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggGkIgfSEaIAFBIGohASACQSBqIQIgH0IBfSIfQgBSDQALCyAgQuAAVA0AA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIAIgASkAODcAOCACIAEpADA3ADAgAiABKQAoNwAoIAIgASkAIDcAICACIAEpAFg3AFggAiABKQBQNwBQIAIgASkASDcASCACIAEpAEA3AEAgAiABKQBgNwBgIAIgASkAaDcAaCACIAEpAHA3AHAgAiABKQB4NwB4IAFBgAFqIQEgAkGAAWohAiAaQoABfSIaQh9WDQALCyAaQhBaBEAgAiABKQAANwAAIAIgASkACDcACCAaQhB9IRogAkEQaiECIAFBEGohAQsgGkIIWgRAIAIgASkAADcAACAaQgh9IRogAkEIaiECIAFBCGohAQsgGkIEWgRAIAIgASgAADYAACAaQgR9IRogAkEEaiECIAFBBGohAQsgGkICWgRAIAIgAS8AADsAACAaQgJ9IRogAkECaiECIAFBAmohAQsgHCAbfSEcIBpQRQRAIAIgAS0AADoAACACQQFqIQIgAUEBaiEBCyAcUEUNAAsMAQsCQAJAIBYEQAJAIAQgBUkEQCAHKAKYRyAESw0BCyABIARrIQMCQEEAIARrIgVBf0ogDyABa6wiGiAbIBogG1QbIhqnIgIgBUpxDQAgBUEBSCACIANqIAFLcQ0AIAEgAyACEAcgAmohAgwFCyABIAMgBCAEQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANBCABIANqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACI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JBAWohAgJAIAFBB2oiCkEHcUUNACAFRQ0AIAEgAi0AADoAByAJQQdrIQYgA0EIayEDIAFBCGohASACQQFqIQIMBgsgCiEBIAUhAwwFCyAKIQEgBSEDDAQLIAohASAFIQMMAwsgCiEBIAUhAwwCCyAKIQEgBSEDDAELIAohASAFIQMLAkACQCAGQRdNBEAgA0UNASADQQFrIQUgA0EHcSIEBEADQCABIAItAAA6AAAgA0EBayEDIAFBAWohASACQQFqIQIgBEEBayIEDQALCyAFQQdJDQEDQCABIAItAAA6AAAgASACLQABOgABIAEgAi0AAjoAAiABIAItAAM6AAMgASACLQAEOgAEIAEgAi0ABToABSABIAItAAY6AAYgASACLQAHOgAHIAFBCGohASACQQhqIQIgA0EIayIDDQALDAELIAMNAQsgASECDAELIAEgBCADED8hAgsgCyEFDAELIAEgAy0AAjoAACABQQFqIQILIAUgFE8NACACIBNJDQELCyAAIAI2AgwgACAFIAhBA3ZrIgE2AgAgACATIAJrQYMCajYCECAAIBQgAWtBDmo2AgQgByAIQQdxIgA2AogBIAcgHUJ/IACthkJ/hYM+AoQBC+cFAQR/IAMgAiACIANLGyEEIAAgAWshAgJAIABBB3FFDQAgBEUNACAAIAItAAA6AAAgA0EBayEGIAJBAWohAiAAQQFqIgdBB3FBACAEQQFrIgUbRQRAIAchACAFIQQgBiEDDAELIAAgAi0AADoAASADQQJrIQYgBEECayEFIAJBAWohAgJAIABBAmoiB0EHcUUNACAFRQ0AIAAgAi0AADoAAiADQQNrIQYgBEEDayEFIAJBAWohAgJAIABBA2oiB0EHcUUNACAFRQ0AIAAgAi0AADoAAyADQQRrIQYgBEEEayEFIAJBAWohAgJAIABBBGoiB0EHcUUNACAFRQ0AIAAgAi0AADoABCADQQVrIQYgBEEFayEFIAJBAWohAgJAIABBBWoiB0EHcUUNACAFRQ0AIAAgAi0AADoABSADQQZrIQYgBEEGayEFIAJBAWohAgJAIABBBmoiB0EHcUUNACAFRQ0AIAAgAi0AADoABiADQQdrIQYgBEEHayEFIAJ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QBUIAC6dB//8DcSADKAIEEEcLIQUgAxAICyAEQRBqJAAgBQvgAQICfwF+QTAQCSICRQRAIAEEQCABQQA2AgQgAUEONgIAC0EADwsgAkIANwMIIAJBADYCACACQgA3AxAgAkIANwMYIAJCADcDICACQgA3ACUgAFAEQCACDwsCQCAAQv////8AVg0AIACnQQR0EAkiA0UNACACIAM2AgBBACEBQgEhBANAIAMgAUEEdGoiAUIANwIAIAFCADcABSAAIARSBEAgBKchASAEQgF8IQQMAQsLIAIgADcDCCACIAA3AxAgAg8LIAEEQCABQQA2AgQgAUEONgIAC0EAEBAgAhAGQQAL7gECA38BfiMAQRBrIgQkAAJAIARBDGpCBBAXIgNFBEBBfyECDAELAkAgAQRAIAJBgAZxIQUDQAJAIAUgASgCBHFFDQACQCADKQMIQgBUBEAgA0EAOgAADAELIANCADcDECADQQE6AAALIAMgAS8BCBANIAMgAS8BChANIAMtAABFBEAgAEEIaiIABEAgAEEANgIEIABBFDYCAAtBfyECDAQLQX8hAiAAIARBDGpCBBAbQQBIDQMgATMBCiIGUA0AIAAgASgCDCAGEBtBAEgNAwsgASgCACIBDQALC0EAIQILIAMQCAsgBEEQaiQAIAILPAEBfyAABEAgAUGABnEhAQNAIAEgACgCBHEEQCACIAAvAQpqQQRqIQILIAAoAgAiAA0ACwsgAkH//wNxC5wBAQN/IABFBEBBAA8LIAAhAwNAAn8CQAJAIAAvAQgiAUH04AFNBEAgAUEBRg0BIAFB9cYBRg0BDAILIAFBgbICRg0AIAFB9eABRw0BCyAAKAIAIQEgAEEANgIAIAAoAgwQBiAAEAYgASADIAAgA0YbIQMCQCACRQRAQQAhAgwBCyACIAE2AgALIAEMAQsgACICKAIACyIADQALIAMLsgQCBX8BfgJAAkACQCAAIAGtEBciAQRAIAEtAAANAUEAIQAMAgsgBARAIARBADYCBCAEQQ42AgALQQAPC0EAIQADQCABLQAABH4gASkDCCABKQMQfQVCAAtCBFQNASABEAwhByABIAEQDCIGrRATIghFBEBBACECIAQEQCAEQQA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QF/IwBBEGsiAiQAAn8gACgCJEEBRwRAIABBDGoiAARAIABBADYCBCAAQRI2AgALQX8MAQsgAkEANgIIIAIgATcDACAAIAJCEEEMEA5CP4enCyEAIAJBEGokACAAC9oDAQZ/IwBBEGsiBSQAIAUgAjYCDCMAQaABayIEJAAgBEEIakHA8ABBkAEQBxogBCAANgI0IAQgADYCHCAEQX4gAGsiA0H/////ByADQf////8HSRsiBjYCOCAEIAAgBmoiADYCJCAEIAA2AhggBEEIaiEAIwBB0AFrIgMkACADIAI2AswBIANBoAFqQQBBKBAZIAMgAygCzAE2AsgBAkBBACABIANByAFqIANB0ABqIANBoAFqEEpBAEgNACAAKAJMQQBOIQcgACgCACECIAAsAEpBAEwEQCAAIAJBX3E2AgALIAJBIHEhCAJ/IAAoAjAEQCAAIAEgA0HIAWogA0HQAGogA0GgAWoQSgwBCyAAQdAANgIwIAAgA0HQAGo2AhAgACADNgIcIAAgAzYCFCAAKAIsIQIgACADNgIsIAAgASADQcgBaiADQdAAaiADQaABahBKIAJFDQAaIABBAEEAIAAoAiQRAAAaIABBADYCMCAAIAI2AiwgAEEANgIcIABBADYCECAAKAIUGiAAQQA2AhRBAAsaIAAgACgCACAIcjYCACAHRQ0ACyADQdABaiQAIAYEQCAEKAIcIgAgACAEKAIYRmtBADoAAAsgBEGgAWokACAFQRBqJAALUwEDfwJAIAAoAgAsAABBMGtBCk8NAANAIAAoAgAiAiwAACEDIAAgAkEBajYCACABIANqQTBrIQEgAiwAAUEwa0EKTw0BIAFBCmwhAQwACwALIAELuwIAAkAgAUEUSw0AAkACQAJAAkACQAJAAkACQAJAAkAgAUEJaw4KAAECAwQFBgcICQoLIAIgAigCACIBQQRqNgIAIAAgASgCADYCAA8LIAIgAigCACIBQQRqNgIAIAAgATQCADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATUCADcDAA8LIAIgAigCAEEHakF4cSIBQQhqNgIAIAAgASkDADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATIBADcDAA8LIA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qLQAAQQJ0IANqQegJaiIBIAEvAQBBAWo7AQAgA0GAywAtAABBAnRqQdgTaiIBIAEvAQBBAWo7AQAgAyADKAI8IARrNgI8IAMgAygCaCAEaiIENgJoCyADKALwLSADKAL0LUcNAUEAIQggAyADKAJYIgFBAE4EfyADKAJIIAFqBUEACyAEIAFrQQAQDyADIAMoAmg2AlggAygCABAKIAMoAgAoAhANAQwCCwsgA0EANgKELiAKQQRGBEAgAyADKAJYIgFBAE4EfyADKAJIIAFqBUEACyADKAJoIAFrQQEQDyADIAMoAmg2AlggAygCABAKQQNBAiADKAIAKAIQGwwCCyADKALwLQRAQQAhCCADIAMoAlgiAUEATgR/IAMoAkggAWoFQQALIAMoAmggAWtBABAPIAMgAygCaDYCWCADKAIAEAogAygCACgCEEUNAQtBASEICyAICwwBCyADIAogAUEMbEG42ABqKAIAEQIACyIBQX5xQQJGBEAgA0GaBTYCIAsgAUF9cUUEQEEAIQQgBSgCEA0CDAQLIAFBAUcNAAJAAkACQCAKQQFrDgUAAQEBAgELIAMpA5guISICfwJ+IAMoAqAuIgFBA2oiCUE/TQRAQgIgAa2GICKEDAELIAFBwABGBEAgAygCBCADKAIQaiAiNwAAIAMgAygCEEEIajYCEEICISJBCgwCCyADKAIEIAMoAhBqQgIgAa2GICKENwAAIAMgAygCEEEIajYCECABQT1rIQlCAkHAACABa62ICyEiIAlBB2ogCUE5SQ0AGiADKAIEIAMoAhBqICI3AAAgAyADKAIQQQhqNgIQQgAhIiAJQTlrCyEBIAMgIjcDmC4gAyABNgKgLiADEDAMAQsgA0EAQQBBABA5IApBA0cNACADKAJQQQBBgIAIEBkgAygCPA0AIANBADYChC4gA0EANgJYIANBADYCaAsgBRAKIAUoAhANAAwDC0EAIQQgCkEERw0AAkACfwJAAkAgAygCFEEBaw4CAQADCyAFIANBoAFqQeCAASgCABEBACIBNgIwIAMoAgQgAygCEGogATYAACADIAMoAhBBBGoiATYCECADKAIEIAFqIQQgBSgCCAwBCyADKAIEIAMoAhBqI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AigCKEGAgAJBAhAoNgJIIAEgAigCICACKAIoIAEoAjBBAhAoIgM2AkwgA0EAIAEoAjBBAXQQGSACKAIgIAIoAihBgIAEQQIQKCEDIAFBgIACNgLoLSABQQA2AkAgASADNgJQIAEgAigCICACKAIoQYCAAkEEECgiAzYCBCABIAEoAugtIgRBAnQ2AgwCQAJAIAEoAkhFDQAgASgCTEUNACABKAJQRQ0AIAMNAQsgAUGaBTYCICACQejAACgCADYCGCACEIQBGkF8DAILIAFBADYCjAEgASAFNgKIASABQgA3AyggASADIARqNgLsLSABIARBA2xBA2s2AvQtQX4hAwJAIAJFDQAgAigCIEUNACACKAIkRQ0AIAIoAhwiAUUNACABKAIAIAJHDQACQAJAIAEoAiAiBEE5aw45AQICAgICAgICAgICAQICAgECAgICAgICAgICAgICAgICAgECAgICAgICAgICAgECAgICAgICAgIBAAsgBEGaBUYNACAEQSpHDQELIAJBAjYCLCACQQA2AgggAkIANwIUIAFBADYCECABIAEoAgQ2AgggASgCFCIDQX9MBEAgAUEAIANrIgM2AhQLIAFBOUEqIANBAkYbNgIgIAIgA0ECRgR/IAFBoAFqQeSAASgCABEBAAVBAQs2AjAgAUF+NgIkIAFBADYCoC4gAUIANwOYLiABQYgXakGg0wA2AgAgASABQcwVajYCgBcgAUH8FmpBjNMANgIAIAEgAUHYE2o2AvQWIAFB8BZqQfjSADYCACABIAFB5AFqNgLoFiABEIgBQQAhAwsgAw0AIAIoAhwiAiACKAIwQQF0NgJEQQAhAyACKAJQQQBBgIAIEBkgAiACKAKIASIEQQxsIgFBtNgAai8BADYClAEgAiABQbDYAGovAQA2ApABIAIgAUGy2ABqLwEANgJ4IAIgAUG22ABqLwEANgJ0QfiAASgCACEFQeyAASgCACEGQYCBASgCACEBIAJCADcCbCACQgA3AmQgAkEANgI8IAJBADYChC4gAkIANwJUIAJBKSABIARBCUYiARs2AnwgAkEqIAYgARs2AoABIAJBKyAFIAEbNgKEAQsgAwsFQXoLDAELAn9BekHrDC0AAEExRw0AGk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AAADAAAAA0AAAANAEG42AALASwAQcTYAAthLQAAAAQABAAIAAQALgAAAAQABgAQAAYALwAAAAQADAAgABgALwAAAAgAEAAgACAALwAAAAgAEACAAIAALwAAAAgAIACAAAABMAAAACAAgAACAQAEMAAAACAAAgECAQAQMABBsNkAC6UTAwAEAAUABgAHAAgACQAKAAsADQAPABEAEwAXABsAHwAjACsAMwA7AEMAUwBjAHMAgwCjAMMA4wACAQAAAAAAABAAEAAQABAAEAAQABAAEAARABEAEQARABIAEgASABIAEwATABMAEwAUABQAFAAUABUAFQAVABUAEABNAMoAAAABAAIAAwAEAAUABwAJAA0AEQAZACEAMQBBAGEAgQDBAAEBgQEBAgEDAQQBBgEIAQwBEAEYASABMAFAAWAAAAAAEAAQABAAEAARABEAEgASABMAEwAUABQAFQAVABYAFgAXABcAGAAYABkAGQAaABoAGwAbABwAHAAdAB0AQABAAGAHAAAACFAAAAgQABQIcwASBx8AAAhwAAAIMAAACcAAEAcKAAAIYAAACCAAAAmgAAAIAAAACIAAAAhAAAAJ4AAQBwYAAAhYAAAIGAAACZAAEwc7AAAIeAAACDgAAAnQABEHEQAACGgAAAgoAAAJsAAACAgAAAiIAAAISAAACfAAEAcEAAAIVAAACBQAFQjjABMHKwAACHQAAAg0AAAJyAARBw0AAAhkAAAIJAAACagAAAgEAAAIhAAACEQAAAnoABAHCAAACFwAAAgcAAAJmAAUB1MAAAh8AAAIPAAACdgAEgcXAAAIbAAACCwAAAm4AAAIDAAACIwAAAhMAAAJ+AAQBwMAAAhSAAAIEgAVCKMAEwcjAAAIcgAACDIAAAnEABEHCwAACGIAAAgiAAAJpAAACAIAAAiCAAAIQgAACeQAEAcHAAAIWgAACBoAAAmUABQHQwAACHoAAAg6AAAJ1AASBxMAAAhqAAAIKgAACbQAAAgKAAAIigAACEoAAAn0ABAHBQAACFYAAAgWAEAIAAATBzMAAAh2AAAINgAACcwAEQcPAAAIZgAACCYAAAmsAAAIBgAACIYAAAhGAAAJ7AAQBwkAAAheAAAI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AAjAAAAgERQADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAQfSCAQsCXEQAQbCDAQsQ/////////////////////w==\";Co(ji)||(ji=P(ji));function eo(Ke){try{if(Ke==ji&&le)return new Uint8Array(le);var st=Me(Ke);if(st)return st;if(R)return R(Ke);throw\"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)\"}catch(St){rs(St)}}function wo(Ke,st){var St,lr,te;try{te=eo(Ke),lr=new WebAssembly.Module(te),St=new WebAssembly.Instance(lr,st)}catch(Oe){var Ee=Oe.toString();throw ee(\"failed to compile wasm module: \"+Ee),(Ee.includes(\"imported Memory\")||Ee.includes(\"memory import\"))&&ee(\"Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time).\"),Oe}return[St,lr]}function QA(){var Ke={a:cu};function st(te,Ee){var Oe=te.exports;r.asm=Oe,Be=r.asm.g,z(Be.buffer),$=r.asm.W,gn(r.asm.h),Io(\"wasm-instantiate\")}if(ai(\"wasm-instantiate\"),r.instantiateWasm)try{var St=r.instantiateWasm(Ke,st);return St}catch(te){return ee(\"Module.instantiateWasm callback failed with error: \"+te),!1}var lr=wo(ji,Ke);return st(lr[0]),r.asm}function Af(Ke){return F.getFloat32(Ke,!0)}function dh(Ke){return F.getFloat64(Ke,!0)}function mh(Ke){return F.getInt16(Ke,!0)}function to(Ke){return F.getInt32(Ke,!0)}function jn(Ke,st){F.setInt32(Ke,st,!0)}function Ts(Ke){for(;Ke.length>0;){var st=Ke.shift();if(typeof st==\"function\"){st(r);continue}var St=st.func;typeof St==\"number\"?st.arg===void 0?$.get(St)():$.get(St)(st.arg):St(st.arg===void 0?null:st.arg)}}function ro(Ke,st){var St=new Date(to((Ke>>2)*4)*1e3);jn((st>>2)*4,St.getUTCSeconds()),jn((st+4>>2)*4,St.getUTCMinutes()),jn((st+8>>2)*4,St.getUTCHours()),jn((st+12>>2)*4,St.getUTCDate()),jn((st+16>>2)*4,St.getUTCMonth()),jn((st+20>>2)*4,St.getUTCFullYear()-1900),jn((st+24>>2)*4,St.getUTCDay()),jn((st+36>>2)*4,0),jn((st+32>>2)*4,0);var lr=Date.UTC(St.getUTCFullYear(),0,1,0,0,0,0),te=(St.getTime()-lr)/(1e3*60*60*24)|0;return jn((st+28>>2)*4,te),ro.GMTString||(ro.GMTString=rt(\"GMT\")),jn((st+40>>2)*4,ro.GMTString),st}function ou(Ke,st){return ro(Ke,st)}function au(Ke,st,St){ke.copyWithin(Ke,st,st+St)}function lu(Ke){try{return Be.grow(Ke-Pe.byteLength+65535>>>16),z(Be.buffer),1}catch{}}function TA(Ke){var st=ke.length;Ke=Ke>>>0;var St=2147483648;if(Ke>St)return!1;for(var lr=1;lr<=4;lr*=2){var te=st*(1+.2/lr);te=Math.min(te,Ke+100663296);var Ee=Math.min(St,Ne(Math.max(Ke,te),65536)),Oe=lu(Ee);if(Oe)return!0}return!1}function RA(Ke){ue(Ke)}function oa(Ke){var st=Date.now()/1e3|0;return Ke&&jn((Ke>>2)*4,st),st}function aa(){if(aa.called)return;aa.called=!0;var Ke=new Date().getFullYear(),st=new Date(Ke,0,1),St=new Date(Ke,6,1),lr=st.getTimezoneOffset(),te=St.getTimezoneOffset(),Ee=Math.max(lr,te);jn((vl()>>2)*4,Ee*60),jn((Is()>>2)*4,+(lr!=te));function Oe(An){var li=An.toTimeString().match(/\\(([A-Za-z ]+)\\)$/);return li?li[1]:\"GMT\"}var dt=Oe(st),Et=Oe(St),bt=rt(dt),tr=rt(Et);te<lr?(jn((Mi()>>2)*4,bt),jn((Mi()+4>>2)*4,tr)):(jn((Mi()>>2)*4,tr),jn((Mi()+4>>2)*4,bt))}function FA(Ke){aa();var st=Date.UTC(to((Ke+20>>2)*4)+1900,to((Ke+16>>2)*4),to((Ke+12>>2)*4),to((Ke+8>>2)*4),to((Ke+4>>2)*4),to((Ke>>2)*4),0),St=new Date(st);jn((Ke+24>>2)*4,St.getUTCDay());var lr=Date.UTC(St.getUTCFullYear(),0,1,0,0,0,0),te=(St.getTime()-lr)/(1e3*60*60*24)|0;return jn((Ke+28>>2)*4,te),St.getTime()/1e3|0}var gr=typeof atob==\"function\"?atob:function(Ke){var st=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",St=\"\",lr,te,Ee,Oe,dt,Et,bt,tr=0;Ke=Ke.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");do Oe=st.indexOf(Ke.charAt(tr++)),dt=st.indexOf(Ke.charAt(tr++)),Et=st.indexOf(Ke.charAt(tr++)),bt=st.indexOf(Ke.charAt(tr++)),lr=Oe<<2|dt>>4,te=(dt&15)<<4|Et>>2,Ee=(Et&3)<<6|bt,St=St+String.fromCharCode(lr),Et!==64&&(St=St+String.fromCharCode(te)),bt!==64&&(St=St+String.fromCharCode(Ee));while(tr<Ke.length);return St};function Bo(Ke){if(typeof C==\"boolean\"&&C){var st;try{st=Buffer.from(Ke,\"base64\")}catch{st=new Buffer(Ke,\"base64\")}return new Uint8Array(st.buffer,st.byteOffset,st.byteLength)}try{for(var St=gr(Ke),lr=new Uint8Array(St.length),te=0;te<St.length;++te)lr[te]=St.charCodeAt(te);return lr}catch{throw new Error(\"Converting base64 string to bytes failed.\")}}function Me(Ke){if(Co(Ke))return Bo(Ke.slice($s.length))}var cu={e:ou,c:au,d:TA,a:RA,b:oa,f:FA},Cr=QA(),pf=r.___wasm_call_ctors=Cr.h,NA=r._zip_ext_count_symlinks=Cr.i,OA=r._zip_file_get_external_attributes=Cr.j,uu=r._zipstruct_statS=Cr.k,fu=r._zipstruct_stat_size=Cr.l,oc=r._zipstruct_stat_mtime=Cr.m,ve=r._zipstruct_stat_crc=Cr.n,Nt=r._zipstruct_errorS=Cr.o,ac=r._zipstruct_error_code_zip=Cr.p,Oi=r._zipstruct_stat_comp_size=Cr.q,no=r._zipstruct_stat_comp_method=Cr.r,Rt=r._zip_close=Cr.s,xn=r._zip_delete=Cr.t,la=r._zip_dir_add=Cr.u,Gi=r._zip_discard=Cr.v,Li=r._zip_error_init_with_code=Cr.w,Na=r._zip_get_error=Cr.x,dn=r._zip_file_get_error=Cr.y,Kn=r._zip_error_strerror=Cr.z,Au=r._zip_fclose=Cr.A,yh=r._zip_file_add=Cr.B,Oa=r._free=Cr.C,La=r._malloc=Cr.D,Ma=r._zip_source_error=Cr.E,$e=r._zip_source_seek=Cr.F,Ua=r._zip_file_set_external_attributes=Cr.G,hf=r._zip_file_set_mtime=Cr.H,lc=r._zip_fopen_index=Cr.I,wn=r._zip_fread=Cr.J,ca=r._zip_get_name=Cr.K,LA=r._zip_get_num_entries=Cr.L,MA=r._zip_source_read=Cr.M,ua=r._zip_name_locate=Cr.N,Bl=r._zip_open_from_source=Cr.O,Mt=r._zip_set_file_compression=Cr.P,kn=r._zip_source_buffer=Cr.Q,fa=r._zip_source_buffer_create=Cr.R,Ha=r._zip_source_close=Cr.S,ns=r._zip_source_free=Cr.T,cc=r._zip_source_keep=Cr.U,pu=r._zip_source_open=Cr.V,uc=r._zip_source_tell=Cr.X,ja=r._zip_stat_index=Cr.Y,Mi=r.__get_tzname=Cr.Z,Is=r.__get_daylight=Cr._,vl=r.__get_timezone=Cr.$,gf=r.stackSave=Cr.aa,fc=r.stackRestore=Cr.ba,wi=r.stackAlloc=Cr.ca;r.cwrap=se,r.getValue=pe;var Qn;on=function Ke(){Qn||Ac(),Qn||(on=Ke)};function Ac(Ke){if(Ke=Ke||f,Ir>0||(Ct(),Ir>0))return;function st(){Qn||(Qn=!0,r.calledRun=!0,!Ce&&(qt(),s(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),ir()))}r.setStatus?(r.setStatus(\"Running...\"),setTimeout(function(){setTimeout(function(){r.setStatus(\"\")},1),st()},1)):st()}if(r.run=Ac,r.preInit)for(typeof r.preInit==\"function\"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Ac(),e}}();typeof wT==\"object\"&&typeof Pj==\"object\"?Pj.exports=bj:typeof define==\"function\"&&define.amd?define([],function(){return bj}):typeof wT==\"object\"&&(wT.createModule=bj)});var Up,hpe,gpe,dpe=Xe(()=>{Up=[\"number\",\"number\"],hpe=(Z=>(Z[Z.ZIP_ER_OK=0]=\"ZIP_ER_OK\",Z[Z.ZIP_ER_MULTIDISK=1]=\"ZIP_ER_MULTIDISK\",Z[Z.ZIP_ER_RENAME=2]=\"ZIP_ER_RENAME\",Z[Z.ZIP_ER_CLOSE=3]=\"ZIP_ER_CLOSE\",Z[Z.ZIP_ER_SEEK=4]=\"ZIP_ER_SEEK\",Z[Z.ZIP_ER_READ=5]=\"ZIP_ER_READ\",Z[Z.ZIP_ER_WRITE=6]=\"ZIP_ER_WRITE\",Z[Z.ZIP_ER_CRC=7]=\"ZIP_ER_CRC\",Z[Z.ZIP_ER_ZIPCLOSED=8]=\"ZIP_ER_ZIPCLOSED\",Z[Z.ZIP_ER_NOENT=9]=\"ZIP_ER_NOENT\",Z[Z.ZIP_ER_EXISTS=10]=\"ZIP_ER_EXISTS\",Z[Z.ZIP_ER_OPEN=11]=\"ZIP_ER_OPEN\",Z[Z.ZIP_ER_TMPOPEN=12]=\"ZIP_ER_TMPOPEN\",Z[Z.ZIP_ER_ZLIB=13]=\"ZIP_ER_ZLIB\",Z[Z.ZIP_ER_MEMORY=14]=\"ZIP_ER_MEMORY\",Z[Z.ZIP_ER_CHANGED=15]=\"ZIP_ER_CHANGED\",Z[Z.ZIP_ER_COMPNOTSUPP=16]=\"ZIP_ER_COMPNOTSUPP\",Z[Z.ZIP_ER_EOF=17]=\"ZIP_ER_EOF\",Z[Z.ZIP_ER_INVAL=18]=\"ZIP_ER_INVAL\",Z[Z.ZIP_ER_NOZIP=19]=\"ZIP_ER_NOZIP\",Z[Z.ZIP_ER_INTER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ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:t._malloc(1),uint32S:t._malloc(4),malloc:t._malloc,free:t._free,getValue:t.getValue,openFromSource:t.cwrap(\"zip_open_from_source\",\"number\",[\"number\",\"number\",\"number\"]),close:t.cwrap(\"zip_close\",\"number\",[\"number\"]),discard:t.cwrap(\"zip_discard\",null,[\"number\"]),getError:t.cwrap(\"zip_get_error\",\"number\",[\"number\"]),getName:t.cwrap(\"zip_get_name\",\"string\",[\"number\",\"number\",\"number\"]),getNumEntries:t.cwrap(\"zip_get_num_entries\",\"number\",[\"number\",\"number\"]),delete:t.cwrap(\"zip_delete\",\"number\",[\"number\",\"number\"]),statIndex:t.cwrap(\"zip_stat_index\",\"number\",[\"number\",...Up,\"number\",\"number\"]),fopenIndex:t.cwrap(\"zip_fopen_index\",\"number\",[\"number\",...Up,\"number\"]),fread:t.cwrap(\"zip_fread\",\"number\",[\"number\",\"number\",\"number\",\"number\"]),fclose:t.cwrap(\"zip_fclose\",\"number\",[\"number\"]),dir:{add:t.cwrap(\"zip_dir_add\",\"number\",[\"number\",\"string\"])},file:{add:t.cwrap(\"zip_file_add\",\"number\",[\"number\",\"string\",\"number\",\"number\"]),getError:t.cwrap(\"zip_file_get_error\",\"number\",[\"number\"]),getExternalAttributes:t.cwrap(\"zip_file_get_external_attributes\",\"number\",[\"number\",...Up,\"number\",\"number\",\"number\"]),setExternalAttributes:t.cwrap(\"zip_file_set_external_attributes\",\"number\",[\"number\",...Up,\"number\",\"number\",\"number\"]),setMtime:t.cwrap(\"zip_file_set_mtime\",\"number\",[\"number\",...Up,\"number\",\"number\"]),setCompression:t.cwrap(\"zip_set_file_compression\",\"number\",[\"number\",...Up,\"number\",\"number\"])},ext:{countSymlinks:t.cwrap(\"zip_ext_count_symlinks\",\"number\",[\"number\"])},error:{initWithCode:t.cwrap(\"zip_error_init_with_code\",null,[\"number\",\"number\"]),strerror:t.cwrap(\"zip_error_strerror\",\"string\",[\"number\"])},name:{locate:t.cwrap(\"zip_name_locate\",\"number\",[\"number\",\"string\",\"number\"])},source:{fromUnattachedBuffer:t.cwrap(\"zip_source_buffer_create\",\"number\",[\"number\",...Up,\"number\",\"number\"]),fromBuffer:t.cwrap(\"zip_source_buffer\",\"number\",[\"number\",\"number\",...Up,\"number\"]),free:t.cwrap(\"zip_source_free\",null,[\"number\"]),keep:t.cwrap(\"zip_source_keep\",null,[\"number\"]),open:t.cwrap(\"zip_source_open\",\"number\",[\"number\"]),close:t.cwrap(\"zip_source_close\",\"number\",[\"number\"]),seek:t.cwrap(\"zip_source_seek\",\"number\",[\"number\",...Up,\"number\"]),tell:t.cwrap(\"zip_source_tell\",\"number\",[\"number\"]),read:t.cwrap(\"zip_source_read\",\"number\",[\"number\",\"number\",\"number\"]),error:t.cwrap(\"zip_source_error\",\"number\",[\"number\"])},struct:{statS:t.cwrap(\"zipstruct_statS\",\"number\",[]),statSize:t.cwrap(\"zipstruct_stat_size\",\"number\",[\"number\"]),statCompSize:t.cwrap(\"zipstruct_stat_comp_size\",\"number\",[\"number\"]),statCompMethod:t.cwrap(\"zipstruct_stat_comp_method\",\"number\",[\"number\"]),statMtime:t.cwrap(\"zipstruct_stat_mtime\",\"number\",[\"number\"]),statCrc:t.cwrap(\"zipstruct_stat_crc\",\"number\",[\"number\"]),errorS:t.cwrap(\"zipstruct_errorS\",\"number\",[]),errorCodeZip:t.cwrap(\"zipstruct_error_code_zip\",\"number\",[\"number\"])}})});function xj(t,e){let r=t.indexOf(e);if(r<=0)return null;let s=r;for(;r>=0&&(s=r+e.length,t[s]!==J.sep);){if(t[r-1]===J.sep)return null;r=t.indexOf(e,s)}return t.length>s&&t[s]!==J.sep?null:t.slice(0,s)}var $f,mpe=Xe(()=>{Dt();Dt();eA();$f=class t extends e0{static async openPromise(e,r){let s=new t(r);try{return await e(s)}finally{s.saveAndClose()}}constructor(e={}){let r=e.fileExtensions,s=e.readOnlyArchives,a=typeof r>\"u\"?f=>xj(f,\".zip\"):f=>{for(let p of r){let h=xj(f,p);if(h)return h}return null},n=(f,p)=>new As(p,{baseFs:f,readOnly:s,stats:f.statSync(p),customZipImplementation:e.customZipImplementation}),c=async(f,p)=>{let h={baseFs:f,readOnly:s,stats:await f.statPromise(p),customZipImplementation:e.customZipImplementation};return()=>new As(p,h)};super({...e,factorySync:n,factoryPromise:c,getMountPoint:a})}}});var kj,BI,Qj=Xe(()=>{Dj();kj=class extends Error{constructor(e,r){super(e),this.name=\"Libzip Error\",this.code=r}},BI=class{constructor(e){this.filesShouldBeCached=!0;let r=\"buffer\"in e?e.buffer:e.baseFs.readFileSync(e.path);this.libzip=cv();let s=this.libzip.malloc(4);try{let c=0;e.readOnly&&(c|=this.libzip.ZIP_RDONLY);let f=this.allocateUnattachedSource(r);try{this.zip=this.libzip.openFromSource(f,c,s),this.lzSource=f}catch(p){throw this.libzip.source.free(f),p}if(this.zip===0){let p=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(p,this.libzip.getValue(s,\"i32\")),this.makeLibzipError(p)}}finally{this.libzip.free(s)}let a=this.libzip.getNumEntries(this.zip,0),n=new Array(a);for(let c=0;c<a;++c)n[c]=this.libzip.getName(this.zip,c,0);if(this.listings=n,this.symlinkCount=this.libzip.ext.countSymlinks(this.zip),this.symlinkCount===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}getSymlinkCount(){return this.symlinkCount}getListings(){return this.listings}stat(e){let r=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,e,0,0,r)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let a=this.libzip.struct.statSize(r)>>>0,n=this.libzip.struct.statMtime(r)>>>0,c=this.libzip.struct.statCrc(r)>>>0;return{size:a,mtime:n,crc:c}}makeLibzipError(e){let r=this.libzip.struct.errorCodeZip(e),s=this.libzip.error.strerror(e),a=new kj(s,this.libzip.errors[r]);if(r===this.libzip.errors.ZIP_ER_CHANGED)throw new Error(`Assertion failed: Unexpected libzip error: ${a.message}`);return a}setFileSource(e,r,s){let a=this.allocateSource(s);try{let n=this.libzip.file.add(this.zip,e,a,this.libzip.ZIP_FL_OVERWRITE);if(n===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(r!==null&&this.libzip.file.setCompression(this.zip,n,0,r[0],r[1])===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return n}catch(n){throw this.libzip.source.free(a),n}}setMtime(e,r){if(this.libzip.file.setMtime(this.zip,e,0,r,0)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}getExternalAttributes(e){if(this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let s=this.libzip.getValue(this.libzip.uint08S,\"i8\")>>>0,a=this.libzip.getValue(this.libzip.uint32S,\"i32\")>>>0;return[s,a]}setExternalAttributes(e,r,s){if(this.libzip.file.setExternalAttributes(this.zip,e,0,0,r,s)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}locate(e){return this.libzip.name.locate(this.zip,e,0)}getFileSource(e){let r=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,e,0,0,r)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let a=this.libzip.struct.statCompSize(r),n=this.libzip.struct.statCompMethod(r),c=this.libzip.malloc(a);try{let f=this.libzip.fopenIndex(this.zip,e,0,this.libzip.ZIP_FL_COMPRESSED);if(f===0)throw this.makeLibzipError(this.libzip.getError(this.zip));try{let p=this.libzip.fread(f,c,a,0);if(p===-1)throw this.makeLibzipError(this.libzip.file.getError(f));if(p<a)throw new Error(\"Incomplete read\");if(p>a)throw new Error(\"Overread\");let h=this.libzip.HEAPU8.subarray(c,c+a);return{data:Buffer.from(h),compressionMethod:n}}finally{this.libzip.fclose(f)}}finally{this.libzip.free(c)}}deleteEntry(e){if(this.libzip.delete(this.zip,e)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}addDirectory(e){let r=this.libzip.dir.add(this.zip,e);if(r===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return r}getBufferAndClose(){try{if(this.libzip.source.keep(this.lzSource),this.libzip.close(this.zip)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.source.open(this.lzSource)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_END)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let e=this.libzip.source.tell(this.lzSource);if(e===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_SET)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let r=this.libzip.malloc(e);if(!r)throw new Error(\"Couldn't allocate enough memory\");try{let s=this.libzip.source.read(this.lzSource,r,e);if(s===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(s<e)throw new Error(\"Incomplete read\");if(s>e)throw new Error(\"Overread\");let a=Buffer.from(this.libzip.HEAPU8.subarray(r,r+e));return process.env.YARN_IS_TEST_ENV&&process.env.YARN_ZIP_DATA_EPILOGUE&&(a=Buffer.concat([a,Buffer.from(process.env.YARN_ZIP_DATA_EPILOGUE)])),a}finally{this.libzip.free(r)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource)}}allocateBuffer(e){Buffer.isBuffer(e)||(e=Buffer.from(e));let r=this.libzip.malloc(e.byteLength);if(!r)throw new Error(\"Couldn't allocate enough memory\");return new Uint8Array(this.libzip.HEAPU8.buffer,r,e.byteLength).set(e),{buffer:r,byteLength:e.byteLength}}allocateUnattachedSource(e){let r=this.libzip.struct.errorS(),{buffer:s,byteLength:a}=this.allocateBuffer(e),n=this.libzip.source.fromUnattachedBuffer(s,a,0,1,r);if(n===0)throw this.libzip.free(r),this.makeLibzipError(r);return n}allocateSource(e){let{buffer:r,byteLength:s}=this.allocateBuffer(e),a=this.libzip.source.fromBuffer(this.zip,r,s,0,1);if(a===0)throw this.libzip.free(r),this.makeLibzipError(this.libzip.getError(this.zip));return a}discard(){this.libzip.discard(this.zip)}}});function Ynt(t){if(typeof t==\"string\"&&String(+t)===t)return+t;if(typeof t==\"number\"&&Number.isFinite(t))return t<0?Date.now()/1e3:t;if(ype.types.isDate(t))return t.getTime()/1e3;throw new Error(\"Invalid time\")}function BT(){return Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}var xa,Tj,ype,Rj,lm,Fj,Nj,Epe,As,vT=Xe(()=>{Dt();Dt();Dt();Dt();Dt();Dt();xa=Ie(\"fs\"),Tj=Ie(\"stream\"),ype=Ie(\"util\"),Rj=ut(Ie(\"zlib\"));Qj();lm=3,Fj=0,Nj=8,Epe=\"mixed\";As=class extends Uf{constructor(r,s={}){super();this.listings=new Map;this.entries=new Map;this.fileSources=new Map;this.fds=new Map;this.nextFd=0;this.ready=!1;this.readOnly=!1;s.readOnly&&(this.readOnly=!0);let a=s;this.level=typeof a.level<\"u\"?a.level:Epe;let n=s.customZipImplementation??BI;if(typeof r==\"string\"){let{baseFs:f=new Yn}=a;this.baseFs=f,this.path=r}else this.path=null,this.baseFs=null;if(s.stats)this.stats=s.stats;else if(typeof r==\"string\")try{this.stats=this.baseFs.statSync(r)}catch(f){if(f.code===\"ENOENT\"&&a.create)this.stats=$a.makeDefaultStats();else throw f}else this.stats=$a.makeDefaultStats();typeof r==\"string\"?s.create?this.zipImpl=new n({buffer:BT(),readOnly:this.readOnly}):this.zipImpl=new n({path:r,baseFs:this.baseFs,readOnly:this.readOnly,size:this.stats.size}):this.zipImpl=new n({buffer:r??BT(),readOnly:this.readOnly}),this.listings.set(vt.root,new Set);let c=this.zipImpl.getListings();for(let f=0;f<c.length;f++){let p=c[f];if(J.isAbsolute(p))continue;let h=J.resolve(vt.root,p);this.registerEntry(h,f),p.endsWith(\"/\")&&this.registerListing(h)}this.symlinkCount=this.zipImpl.getSymlinkCount(),this.ready=!0}getExtractHint(r){for(let s of this.entries.keys()){let a=this.pathUtils.extname(s);if(r.relevantExtensions.has(a))return!0}return!1}getAllFiles(){return Array.from(this.entries.keys())}getRealPath(){if(!this.path)throw new Error(\"ZipFS don't have real paths when loaded from a buffer\");return this.path}prepareClose(){if(!this.ready)throw or.EBUSY(\"archive closed, close\");yd(this)}getBufferAndClose(){if(this.prepareClose(),this.entries.size===0)return this.discardAndClose(),BT();try{return this.zipImpl.getBufferAndClose()}finally{this.ready=!1}}discardAndClose(){this.prepareClose(),this.zipImpl.discard(),this.ready=!1}saveAndClose(){if(!this.path||!this.baseFs)throw new Error(\"ZipFS cannot be saved and must be discarded when loaded from a buffer\");if(this.readOnly){this.discardAndClose();return}let r=this.baseFs.existsSync(this.path)||this.stats.mode===$a.DEFAULT_MODE?void 0:this.stats.mode;this.baseFs.writeFileSync(this.path,this.getBufferAndClose(),{mode:r}),this.ready=!1}resolve(r){return J.resolve(vt.root,r)}async openPromise(r,s,a){return this.openSync(r,s,a)}openSync(r,s,a){let n=this.nextFd++;return this.fds.set(n,{cursor:0,p:r}),n}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(r,s){return this.opendirSync(r,s)}opendirSync(r,s={}){let a=this.resolveFilename(`opendir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`opendir '${r}'`);let n=this.listings.get(a);if(!n)throw or.ENOTDIR(`opendir '${r}'`);let c=[...n],f=this.openSync(a,\"r\");return ex(this,a,c,{onClose:()=>{this.closeSync(f)}})}async readPromise(r,s,a,n,c){return this.readSync(r,s,a,n,c)}readSync(r,s,a=0,n=s.byteLength,c=-1){let f=this.fds.get(r);if(typeof f>\"u\")throw or.EBADF(\"read\");let p=c===-1||c===null?f.cursor:c,h=this.readFileSync(f.p);h.copy(s,a,p,p+n);let E=Math.max(0,Math.min(h.length-p,n));return(c===-1||c===null)&&(f.cursor+=E),E}async writePromise(r,s,a,n,c){return typeof s==\"string\"?this.writeSync(r,s,c):this.writeSync(r,s,a,n,c)}writeSync(r,s,a,n,c){throw typeof this.fds.get(r)>\"u\"?or.EBADF(\"read\"):new Error(\"Unimplemented\")}async closePromise(r){return this.closeSync(r)}closeSync(r){if(typeof this.fds.get(r)>\"u\")throw or.EBADF(\"read\");this.fds.delete(r)}createReadStream(r,{encoding:s}={}){if(r===null)throw new Error(\"Unimplemented\");let a=this.openSync(r,\"r\"),n=Object.assign(new Tj.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(f,p)=>{clearImmediate(c),this.closeSync(a),p(f)}}),{close(){n.destroy()},bytesRead:0,path:r,pending:!1}),c=setImmediate(async()=>{try{let f=await this.readFilePromise(r,s);n.bytesRead=f.length,n.end(f)}catch(f){n.destroy(f)}});return n}createWriteStream(r,{encoding:s}={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);if(r===null)throw new Error(\"Unimplemented\");let a=[],n=this.openSync(r,\"w\"),c=Object.assign(new Tj.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(f,p)=>{try{f?p(f):(this.writeFileSync(r,Buffer.concat(a),s),p(null))}catch(h){p(h)}finally{this.closeSync(n)}}}),{close(){c.destroy()},bytesWritten:0,path:r,pending:!1});return c.on(\"data\",f=>{let p=Buffer.from(f);c.bytesWritten+=p.length,a.push(p)}),c}async realpathPromise(r){return this.realpathSync(r)}realpathSync(r){let s=this.resolveFilename(`lstat '${r}'`,r);if(!this.entries.has(s)&&!this.listings.has(s))throw or.ENOENT(`lstat '${r}'`);return s}async existsPromise(r){return this.existsSync(r)}existsSync(r){if(!this.ready)throw or.EBUSY(`archive closed, existsSync '${r}'`);if(this.symlinkCount===0){let a=J.resolve(vt.root,r);return this.entries.has(a)||this.listings.has(a)}let s;try{s=this.resolveFilename(`stat '${r}'`,r,void 0,!1)}catch{return!1}return s===void 0?!1:this.entries.has(s)||this.listings.has(s)}async accessPromise(r,s){return this.accessSync(r,s)}accessSync(r,s=xa.constants.F_OK){let a=this.resolveFilename(`access '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`access '${r}'`);if(this.readOnly&&s&xa.constants.W_OK)throw or.EROFS(`access '${r}'`)}async statPromise(r,s={bigint:!1}){return s.bigint?this.statSync(r,{bigint:!0}):this.statSync(r)}statSync(r,s={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`stat '${r}'`,r,void 0,s.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(s.throwIfNoEntry===!1)return;throw or.ENOENT(`stat '${r}'`)}if(r[r.length-1]===\"/\"&&!this.listings.has(a))throw or.ENOTDIR(`stat '${r}'`);return this.statImpl(`stat '${r}'`,a,s)}}async fstatPromise(r,s){return this.fstatSync(r,s)}fstatSync(r,s){let a=this.fds.get(r);if(typeof a>\"u\")throw or.EBADF(\"fstatSync\");let{p:n}=a,c=this.resolveFilename(`stat '${n}'`,n);if(!this.entries.has(c)&&!this.listings.has(c))throw or.ENOENT(`stat '${n}'`);if(n[n.length-1]===\"/\"&&!this.listings.has(c))throw or.ENOTDIR(`stat '${n}'`);return this.statImpl(`fstat '${n}'`,c,s)}async lstatPromise(r,s={bigint:!1}){return s.bigint?this.lstatSync(r,{bigint:!0}):this.lstatSync(r)}lstatSync(r,s={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`lstat '${r}'`,r,!1,s.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(s.throwIfNoEntry===!1)return;throw or.ENOENT(`lstat '${r}'`)}if(r[r.length-1]===\"/\"&&!this.listings.has(a))throw or.ENOTDIR(`lstat '${r}'`);return this.statImpl(`lstat '${r}'`,a,s)}}statImpl(r,s,a={}){let n=this.entries.get(s);if(typeof n<\"u\"){let c=this.zipImpl.stat(n),f=c.crc,p=c.size,h=c.mtime*1e3,E=this.stats.uid,C=this.stats.gid,S=512,P=Math.ceil(c.size/S),I=h,R=h,N=h,U=new Date(I),W=new Date(R),ee=new Date(N),ie=new Date(h),ue=this.listings.has(s)?xa.constants.S_IFDIR:this.isSymbolicLink(n)?xa.constants.S_IFLNK:xa.constants.S_IFREG,le=ue===xa.constants.S_IFDIR?493:420,me=ue|this.getUnixMode(n,le)&511,pe=Object.assign(new $a.StatEntry,{uid:E,gid:C,size:p,blksize:S,blocks:P,atime:U,birthtime:W,ctime:ee,mtime:ie,atimeMs:I,birthtimeMs:R,ctimeMs:N,mtimeMs:h,mode:me,crc:f});return a.bigint===!0?$a.convertToBigIntStats(pe):pe}if(this.listings.has(s)){let c=this.stats.uid,f=this.stats.gid,p=0,h=512,E=0,C=this.stats.mtimeMs,S=this.stats.mtimeMs,P=this.stats.mtimeMs,I=this.stats.mtimeMs,R=new Date(C),N=new Date(S),U=new Date(P),W=new Date(I),ee=xa.constants.S_IFDIR|493,ue=Object.assign(new $a.StatEntry,{uid:c,gid:f,size:p,blksize:h,blocks:E,atime:R,birthtime:N,ctime:U,mtime:W,atimeMs:C,birthtimeMs:S,ctimeMs:P,mtimeMs:I,mode:ee,crc:0});return a.bigint===!0?$a.convertToBigIntStats(ue):ue}throw new Error(\"Unreachable\")}getUnixMode(r,s){let[a,n]=this.zipImpl.getExternalAttributes(r);return a!==lm?s:n>>>16}registerListing(r){let s=this.listings.get(r);if(s)return s;this.registerListing(J.dirname(r)).add(J.basename(r));let n=new Set;return this.listings.set(r,n),n}registerEntry(r,s){this.registerListing(J.dirname(r)).add(J.basename(r)),this.entries.set(r,s)}unregisterListing(r){this.listings.delete(r),this.listings.get(J.dirname(r))?.delete(J.basename(r))}unregisterEntry(r){this.unregisterListing(r);let s=this.entries.get(r);this.entries.delete(r),!(typeof s>\"u\")&&(this.fileSources.delete(s),this.isSymbolicLink(s)&&this.symlinkCount--)}deleteEntry(r,s){this.unregisterEntry(r),this.zipImpl.deleteEntry(s)}resolveFilename(r,s,a=!0,n=!0){if(!this.ready)throw or.EBUSY(`archive closed, ${r}`);let c=J.resolve(vt.root,s);if(c===\"/\")return vt.root;let f=this.entries.get(c);if(a&&f!==void 0)if(this.symlinkCount!==0&&this.isSymbolicLink(f)){let p=this.getFileSource(f).toString();return this.resolveFilename(r,J.resolve(J.dirname(c),p),!0,n)}else return c;for(;;){let p=this.resolveFilename(r,J.dirname(c),!0,n);if(p===void 0)return p;let h=this.listings.has(p),E=this.entries.has(p);if(!h&&!E){if(n===!1)return;throw or.ENOENT(r)}if(!h)throw or.ENOTDIR(r);if(c=J.resolve(p,J.basename(c)),!a||this.symlinkCount===0)break;let C=this.zipImpl.locate(c.slice(1));if(C===-1)break;if(this.isSymbolicLink(C)){let S=this.getFileSource(C).toString();c=J.resolve(J.dirname(c),S)}else break}return c}setFileSource(r,s){let a=Buffer.isBuffer(s)?s:Buffer.from(s),n=J.relative(vt.root,r),c=null;this.level!==\"mixed\"&&(c=[this.level===0?Fj:Nj,this.level]);let f=this.zipImpl.setFileSource(n,c,a);return this.fileSources.set(f,a),f}isSymbolicLink(r){if(this.symlinkCount===0)return!1;let[s,a]=this.zipImpl.getExternalAttributes(r);return s!==lm?!1:(a>>>16&xa.constants.S_IFMT)===xa.constants.S_IFLNK}getFileSource(r,s={asyncDecompress:!1}){let a=this.fileSources.get(r);if(typeof a<\"u\")return a;let{data:n,compressionMethod:c}=this.zipImpl.getFileSource(r);if(c===Fj)return this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,n),n;if(c===Nj){if(s.asyncDecompress)return new Promise((f,p)=>{Rj.default.inflateRaw(n,(h,E)=>{h?p(h):(this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,E),f(E))})});{let f=Rj.default.inflateRawSync(n);return this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,f),f}}else throw new Error(`Unsupported compression method: ${c}`)}async fchmodPromise(r,s){return this.chmodPromise(this.fdToPath(r,\"fchmod\"),s)}fchmodSync(r,s){return this.chmodSync(this.fdToPath(r,\"fchmodSync\"),s)}async chmodPromise(r,s){return this.chmodSync(r,s)}chmodSync(r,s){if(this.readOnly)throw or.EROFS(`chmod '${r}'`);s&=493;let a=this.resolveFilename(`chmod '${r}'`,r,!1),n=this.entries.get(a);if(typeof n>\"u\")throw new Error(`Assertion failed: The entry should have been registered (${a})`);let f=this.getUnixMode(n,xa.constants.S_IFREG|0)&-512|s;this.zipImpl.setExternalAttributes(n,lm,f<<16)}async fchownPromise(r,s,a){return this.chownPromise(this.fdToPath(r,\"fchown\"),s,a)}fchownSync(r,s,a){return this.chownSync(this.fdToPath(r,\"fchownSync\"),s,a)}async chownPromise(r,s,a){return this.chownSync(r,s,a)}chownSync(r,s,a){throw new Error(\"Unimplemented\")}async renamePromise(r,s){return this.renameSync(r,s)}renameSync(r,s){throw new Error(\"Unimplemented\")}async copyFilePromise(r,s,a){let{indexSource:n,indexDest:c,resolvedDestP:f}=this.prepareCopyFile(r,s,a),p=await this.getFileSource(n,{asyncDecompress:!0}),h=this.setFileSource(f,p);h!==c&&this.registerEntry(f,h)}copyFileSync(r,s,a=0){let{indexSource:n,indexDest:c,resolvedDestP:f}=this.prepareCopyFile(r,s,a),p=this.getFileSource(n),h=this.setFileSource(f,p);h!==c&&this.registerEntry(f,h)}prepareCopyFile(r,s,a=0){if(this.readOnly)throw or.EROFS(`copyfile '${r} -> '${s}'`);if(a&xa.constants.COPYFILE_FICLONE_FORCE)throw or.ENOSYS(\"unsupported clone operation\",`copyfile '${r}' -> ${s}'`);let n=this.resolveFilename(`copyfile '${r} -> ${s}'`,r),c=this.entries.get(n);if(typeof c>\"u\")throw or.EINVAL(`copyfile '${r}' -> '${s}'`);let f=this.resolveFilename(`copyfile '${r}' -> ${s}'`,s),p=this.entries.get(f);if(a&(xa.constants.COPYFILE_EXCL|xa.constants.COPYFILE_FICLONE_FORCE)&&typeof p<\"u\")throw or.EEXIST(`copyfile '${r}' -> '${s}'`);return{indexSource:c,resolvedDestP:f,indexDest:p}}async appendFilePromise(r,s,a){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>\"u\"?a={flag:\"a\"}:typeof a==\"string\"?a={flag:\"a\",encoding:a}:typeof a.flag>\"u\"&&(a={flag:\"a\",...a}),this.writeFilePromise(r,s,a)}appendFileSync(r,s,a={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>\"u\"?a={flag:\"a\"}:typeof a==\"string\"?a={flag:\"a\",encoding:a}:typeof a.flag>\"u\"&&(a={flag:\"a\",...a}),this.writeFileSync(r,s,a)}fdToPath(r,s){let a=this.fds.get(r)?.p;if(typeof a>\"u\")throw or.EBADF(s);return a}async writeFilePromise(r,s,a){let{encoding:n,mode:c,index:f,resolvedP:p}=this.prepareWriteFile(r,a);f!==void 0&&typeof a==\"object\"&&a.flag&&a.flag.includes(\"a\")&&(s=Buffer.concat([await this.getFileSource(f,{asyncDecompress:!0}),Buffer.from(s)])),n!==null&&(s=s.toString(n));let h=this.setFileSource(p,s);h!==f&&this.registerEntry(p,h),c!==null&&await this.chmodPromise(p,c)}writeFileSync(r,s,a){let{encoding:n,mode:c,index:f,resolvedP:p}=this.prepareWriteFile(r,a);f!==void 0&&typeof a==\"object\"&&a.flag&&a.flag.includes(\"a\")&&(s=Buffer.concat([this.getFileSource(f),Buffer.from(s)])),n!==null&&(s=s.toString(n));let h=this.setFileSource(p,s);h!==f&&this.registerEntry(p,h),c!==null&&this.chmodSync(p,c)}prepareWriteFile(r,s){if(typeof r==\"number\"&&(r=this.fdToPath(r,\"read\")),this.readOnly)throw or.EROFS(`open '${r}'`);let a=this.resolveFilename(`open '${r}'`,r);if(this.listings.has(a))throw or.EISDIR(`open '${r}'`);let n=null,c=null;typeof s==\"string\"?n=s:typeof s==\"object\"&&({encoding:n=null,mode:c=null}=s);let f=this.entries.get(a);return{encoding:n,mode:c,resolvedP:a,index:f}}async unlinkPromise(r){return this.unlinkSync(r)}unlinkSync(r){if(this.readOnly)throw or.EROFS(`unlink '${r}'`);let s=this.resolveFilename(`unlink '${r}'`,r);if(this.listings.has(s))throw or.EISDIR(`unlink '${r}'`);let a=this.entries.get(s);if(typeof a>\"u\")throw or.EINVAL(`unlink '${r}'`);this.deleteEntry(s,a)}async utimesPromise(r,s,a){return this.utimesSync(r,s,a)}utimesSync(r,s,a){if(this.readOnly)throw or.EROFS(`utimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r);this.utimesImpl(n,a)}async lutimesPromise(r,s,a){return this.lutimesSync(r,s,a)}lutimesSync(r,s,a){if(this.readOnly)throw or.EROFS(`lutimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r,!1);this.utimesImpl(n,a)}utimesImpl(r,s){this.listings.has(r)&&(this.entries.has(r)||this.hydrateDirectory(r));let a=this.entries.get(r);if(a===void 0)throw new Error(\"Unreachable\");this.zipImpl.setMtime(a,Ynt(s))}async mkdirPromise(r,s){return this.mkdirSync(r,s)}mkdirSync(r,{mode:s=493,recursive:a=!1}={}){if(a)return this.mkdirpSync(r,{chmod:s});if(this.readOnly)throw or.EROFS(`mkdir '${r}'`);let n=this.resolveFilename(`mkdir '${r}'`,r);if(this.entries.has(n)||this.listings.has(n))throw or.EEXIST(`mkdir '${r}'`);this.hydrateDirectory(n),this.chmodSync(n,s)}async rmdirPromise(r,s){return this.rmdirSync(r,s)}rmdirSync(r,{recursive:s=!1}={}){if(this.readOnly)throw or.EROFS(`rmdir '${r}'`);if(s){this.removeSync(r);return}let a=this.resolveFilename(`rmdir '${r}'`,r),n=this.listings.get(a);if(!n)throw or.ENOTDIR(`rmdir '${r}'`);if(n.size>0)throw or.ENOTEMPTY(`rmdir '${r}'`);let c=this.entries.get(a);if(typeof c>\"u\")throw or.EINVAL(`rmdir '${r}'`);this.deleteEntry(r,c)}async rmPromise(r,s){return this.rmSync(r,s)}rmSync(r,{recursive:s=!1}={}){if(this.readOnly)throw or.EROFS(`rm '${r}'`);if(s){this.removeSync(r);return}let a=this.resolveFilename(`rm '${r}'`,r),n=this.listings.get(a);if(!n)throw or.ENOTDIR(`rm '${r}'`);if(n.size>0)throw or.ENOTEMPTY(`rm '${r}'`);let c=this.entries.get(a);if(typeof c>\"u\")throw or.EINVAL(`rm '${r}'`);this.deleteEntry(r,c)}hydrateDirectory(r){let s=this.zipImpl.addDirectory(J.relative(vt.root,r));return this.registerListing(r),this.registerEntry(r,s),s}async linkPromise(r,s){return this.linkSync(r,s)}linkSync(r,s){throw or.EOPNOTSUPP(`link '${r}' -> '${s}'`)}async symlinkPromise(r,s){return this.symlinkSync(r,s)}symlinkSync(r,s){if(this.readOnly)throw or.EROFS(`symlink '${r}' -> '${s}'`);let a=this.resolveFilename(`symlink '${r}' -> '${s}'`,s);if(this.listings.has(a))throw or.EISDIR(`symlink '${r}' -> '${s}'`);if(this.entries.has(a))throw or.EEXIST(`symlink '${r}' -> '${s}'`);let n=this.setFileSource(a,r);this.registerEntry(a,n),this.zipImpl.setExternalAttributes(n,lm,(xa.constants.S_IFLNK|511)<<16),this.symlinkCount+=1}async readFilePromise(r,s){typeof s==\"object\"&&(s=s?s.encoding:void 0);let a=await this.readFileBuffer(r,{asyncDecompress:!0});return s?a.toString(s):a}readFileSync(r,s){typeof s==\"object\"&&(s=s?s.encoding:void 0);let a=this.readFileBuffer(r);return s?a.toString(s):a}readFileBuffer(r,s={asyncDecompress:!1}){typeof r==\"number\"&&(r=this.fdToPath(r,\"read\"));let a=this.resolveFilename(`open '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`open '${r}'`);if(r[r.length-1]===\"/\"&&!this.listings.has(a))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(a))throw or.EISDIR(\"read\");let n=this.entries.get(a);if(n===void 0)throw new Error(\"Unreachable\");return this.getFileSource(n,s)}async readdirPromise(r,s){return this.readdirSync(r,s)}readdirSync(r,s){let a=this.resolveFilename(`scandir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`scandir '${r}'`);let n=this.listings.get(a);if(!n)throw or.ENOTDIR(`scandir '${r}'`);if(s?.recursive)if(s?.withFileTypes){let c=Array.from(n,f=>Object.assign(this.statImpl(\"lstat\",J.join(r,f)),{name:f,path:vt.dot,parentPath:vt.dot}));for(let f of c){if(!f.isDirectory())continue;let p=J.join(f.path,f.name),h=this.listings.get(J.join(a,p));for(let E of h)c.push(Object.assign(this.statImpl(\"lstat\",J.join(r,p,E)),{name:E,path:p,parentPath:p}))}return c}else{let c=[...n];for(let f of c){let p=this.listings.get(J.join(a,f));if(!(typeof p>\"u\"))for(let h of p)c.push(J.join(f,h))}return c}else return s?.withFileTypes?Array.from(n,c=>Object.assign(this.statImpl(\"lstat\",J.join(r,c)),{name:c,path:void 0,parentPath:void 0})):[...n]}async readlinkPromise(r){let s=this.prepareReadlink(r);return(await this.getFileSource(s,{asyncDecompress:!0})).toString()}readlinkSync(r){let s=this.prepareReadlink(r);return this.getFileSource(s).toString()}prepareReadlink(r){let s=this.resolveFilename(`readlink '${r}'`,r,!1);if(!this.entries.has(s)&&!this.listings.has(s))throw or.ENOENT(`readlink '${r}'`);if(r[r.length-1]===\"/\"&&!this.listings.has(s))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(s))throw or.EINVAL(`readlink '${r}'`);let a=this.entries.get(s);if(a===void 0)throw new Error(\"Unreachable\");if(!this.isSymbolicLink(a))throw or.EINVAL(`readlink '${r}'`);return a}async truncatePromise(r,s=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>\"u\")throw or.EINVAL(`open '${r}'`);let c=await this.getFileSource(n,{asyncDecompress:!0}),f=Buffer.alloc(s,0);return c.copy(f),await this.writeFilePromise(r,f)}truncateSync(r,s=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>\"u\")throw or.EINVAL(`open '${r}'`);let c=this.getFileSource(n),f=Buffer.alloc(s,0);return c.copy(f),this.writeFileSync(r,f)}async ftruncatePromise(r,s){return this.truncatePromise(this.fdToPath(r,\"ftruncate\"),s)}ftruncateSync(r,s){return this.truncateSync(this.fdToPath(r,\"ftruncateSync\"),s)}watch(r,s,a){let n;switch(typeof s){case\"function\":case\"string\":case\"undefined\":n=!0;break;default:({persistent:n=!0}=s);break}if(!n)return{on:()=>{},close:()=>{}};let c=setInterval(()=>{},24*60*60*1e3);return{on:()=>{},close:()=>{clearInterval(c)}}}watchFile(r,s,a){let n=J.resolve(vt.root,r);return sE(this,n,s,a)}unwatchFile(r,s){let a=J.resolve(vt.root,r);return md(this,a,s)}}});function Cpe(t,e,r=Buffer.alloc(0),s){let a=new As(r),n=C=>C===e||C.startsWith(`${e}/`)?C.slice(0,e.length):null,c=async(C,S)=>()=>a,f=(C,S)=>a,p={...t},h=new Yn(p),E=new e0({baseFs:h,getMountPoint:n,factoryPromise:c,factorySync:f,magicByte:21,maxAge:1/0,typeCheck:s?.typeCheck});return U2(Ipe.default,new t0(E)),a}var Ipe,wpe=Xe(()=>{Dt();Ipe=ut(Ie(\"fs\"));vT()});var Bpe=Xe(()=>{mpe();vT();wpe()});var Oj,uv,ST,vpe=Xe(()=>{Dt();vT();Oj={CENTRAL_DIRECTORY:33639248,END_OF_CENTRAL_DIRECTORY:101010256},uv=22,ST=class t{constructor(e){this.filesShouldBeCached=!1;if(\"buffer\"in e)throw new Error(\"Buffer based zip archives are not supported\");if(!e.readOnly)throw new Error(\"Writable zip archives are not supported\");this.baseFs=e.baseFs,this.fd=this.baseFs.openSync(e.path,\"r\");try{this.entries=t.readZipSync(this.fd,this.baseFs,e.size)}catch(r){throw this.baseFs.closeSync(this.fd),this.fd=\"closed\",r}}static readZipSync(e,r,s){if(s<uv)throw new Error(\"Invalid ZIP file: EOCD not found\");let a=-1,n=Buffer.alloc(uv);if(r.readSync(e,n,0,uv,s-uv),n.readUInt32LE(0)===Oj.END_OF_CENTRAL_DIRECTORY)a=0;else{let R=Math.min(65557,s);n=Buffer.alloc(R),r.readSync(e,n,0,R,Math.max(0,s-R));for(let N=n.length-4;N>=0;N--)if(n.readUInt32LE(N)===Oj.END_OF_CENTRAL_DIRECTORY){a=N;break}if(a===-1)throw new Error(\"Not a zip archive\")}let c=n.readUInt16LE(a+10),f=n.readUInt32LE(a+12),p=n.readUInt32LE(a+16),h=n.readUInt16LE(a+20);if(a+h+uv>n.length)throw new Error(\"Zip archive inconsistent\");if(c==65535||f==4294967295||p==4294967295)throw new Error(\"Zip 64 is not supported\");if(f>s)throw new Error(\"Zip archive inconsistent\");if(c>f/46)throw new Error(\"Zip archive inconsistent\");let E=Buffer.alloc(f);if(r.readSync(e,E,0,E.length,p)!==E.length)throw new Error(\"Zip archive inconsistent\");let C=[],S=0,P=0,I=0;for(;P<c;){if(S+46>E.length)throw new Error(\"Zip archive inconsistent\");if(E.readUInt32LE(S)!==Oj.CENTRAL_DIRECTORY)throw new Error(\"Zip archive inconsistent\");let N=E.readUInt16LE(S+4)>>>8;if(E.readUInt16LE(S+8)&1)throw new Error(\"Encrypted zip files are not supported\");let W=E.readUInt16LE(S+10),ee=E.readUInt32LE(S+16),ie=E.readUInt16LE(S+28),ue=E.readUInt16LE(S+30),le=E.readUInt16LE(S+32),me=E.readUInt32LE(S+42),pe=E.toString(\"utf8\",S+46,S+46+ie).replaceAll(\"\\0\",\" \");if(pe.includes(\"\\0\"))throw new Error(\"Invalid ZIP file\");let Be=E.readUInt32LE(S+20),Ce=E.readUInt32LE(S+38);C.push({name:pe,os:N,mtime:fi.SAFE_TIME,crc:ee,compressionMethod:W,isSymbolicLink:N===lm&&(Ce>>>16&fi.S_IFMT)===fi.S_IFLNK,size:E.readUInt32LE(S+24),compressedSize:Be,externalAttributes:Ce,localHeaderOffset:me}),I+=Be,P+=1,S+=46+ie+ue+le}if(I>s)throw new Error(\"Zip archive inconsistent\");if(S!==E.length)throw new Error(\"Zip archive inconsistent\");return C}getExternalAttributes(e){let r=this.entries[e];return[r.os,r.externalAttributes]}getListings(){return this.entries.map(e=>e.name)}getSymlinkCount(){let e=0;for(let r of this.entries)r.isSymbolicLink&&(e+=1);return e}stat(e){let r=this.entries[e];return{crc:r.crc,mtime:r.mtime,size:r.size}}locate(e){for(let r=0;r<this.entries.length;r++)if(this.entries[r].name===e)return r;return-1}getFileSource(e){if(this.fd===\"closed\")throw new Error(\"ZIP file is closed\");let r=this.entries[e],s=Buffer.alloc(30);this.baseFs.readSync(this.fd,s,0,s.length,r.localHeaderOffset);let a=s.readUInt16LE(26),n=s.readUInt16LE(28),c=Buffer.alloc(r.compressedSize);if(this.baseFs.readSync(this.fd,c,0,r.compressedSize,r.localHeaderOffset+30+a+n)!==r.compressedSize)throw new Error(\"Invalid ZIP file\");return{data:c,compressionMethod:r.compressionMethod}}discard(){this.fd!==\"closed\"&&(this.baseFs.closeSync(this.fd),this.fd=\"closed\")}addDirectory(e){throw new Error(\"Not implemented\")}deleteEntry(e){throw new Error(\"Not implemented\")}setMtime(e,r){throw new Error(\"Not implemented\")}getBufferAndClose(){throw new Error(\"Not implemented\")}setFileSource(e,r,s){throw new Error(\"Not implemented\")}setExternalAttributes(e,r,s){throw new Error(\"Not implemented\")}}});var fv={};Vt(fv,{DEFAULT_COMPRESSION_LEVEL:()=>Epe,DEFLATE:()=>Nj,JsZipImpl:()=>ST,LibZipImpl:()=>BI,STORE:()=>Fj,ZIP_UNIX:()=>lm,ZipFS:()=>As,ZipOpenFS:()=>$f,getArchivePart:()=>xj,getLibzipPromise:()=>Jnt,getLibzipSync:()=>Vnt,makeEmptyArchive:()=>BT,mountMemoryDrive:()=>Cpe});function Vnt(){return cv()}async function Jnt(){return cv()}var Spe,eA=Xe(()=>{Dj();Spe=ut(ppe());dpe();Bpe();vpe();Qj();Ape(()=>{let t=(0,Spe.default)();return gpe(t)})});var Av,Dpe=Xe(()=>{Dt();Yt();pv();Av=class extends ot{constructor(){super(...arguments);this.cwd=ge.String(\"--cwd\",process.cwd(),{description:\"The directory to run the command in\"});this.commandName=ge.String();this.args=ge.Proxy()}static{this.usage={description:\"run a command using yarn's portable shell\",details:`\n      This command will run a command using Yarn's portable shell.\n\n      Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.\n\n      Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell.\n\n      Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.\n\n      For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.\n    `,examples:[[\"Run a simple command\",\"$0 echo Hello\"],[\"Run a command with a glob pattern\",\"$0 echo '*.js'\"],[\"Run a command with a redirection\",\"$0 echo Hello World '>' hello.txt\"],[\"Run a command with an escaped glob pattern (The double escape is needed in Unix shells)\",`$0 echo '\"*.js\"'`],[\"Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)\",'$0 \"GREETING=Hello echo $GREETING World\"']]}}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(\" \")}`:this.commandName;return await vI(r,[],{cwd:fe.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}}});var Vl,bpe=Xe(()=>{Vl=class extends Error{constructor(e){super(e),this.name=\"ShellError\"}}});var PT={};Vt(PT,{fastGlobOptions:()=>kpe,isBraceExpansion:()=>Lj,isGlobPattern:()=>Knt,match:()=>znt,micromatchOptions:()=>bT});function Knt(t){if(!DT.default.scan(t,bT).isGlob)return!1;try{DT.default.parse(t,bT)}catch{return!1}return!0}function znt(t,{cwd:e,baseFs:r}){return(0,Ppe.default)(t,{...kpe,cwd:fe.fromPortablePath(e),fs:ax(xpe.default,new t0(r))})}function Lj(t){return DT.default.scan(t,bT).isBrace}var Ppe,xpe,DT,bT,kpe,Qpe=Xe(()=>{Dt();Ppe=ut(BQ()),xpe=ut(Ie(\"fs\")),DT=ut(Go()),bT={strictBrackets:!0},kpe={onlyDirectories:!1,onlyFiles:!1}});function Mj(){}function Uj(){for(let t of cm)t.kill()}function Npe(t,e,r,s){return a=>{let n=a[0]instanceof tA.Transform?\"pipe\":a[0],c=a[1]instanceof tA.Transform?\"pipe\":a[1],f=a[2]instanceof tA.Transform?\"pipe\":a[2],p=(0,Rpe.default)(t,e,{...s,stdio:[n,c,f]});return cm.add(p),cm.size===1&&(process.on(\"SIGINT\",Mj),process.on(\"SIGTERM\",Uj)),a[0]instanceof tA.Transform&&a[0].pipe(p.stdin),a[1]instanceof tA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof tA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on(\"error\",E=>{switch(cm.delete(p),cm.size===0&&(process.off(\"SIGINT\",Mj),process.off(\"SIGTERM\",Uj)),E.code){case\"ENOENT\":a[2].write(`command not found: ${t}\n`),h(127);break;case\"EACCES\":a[2].write(`permission denied: ${t}\n`),h(128);break;default:a[2].write(`uncaught error: ${E.message}\n`),h(1);break}}),p.on(\"close\",E=>{cm.delete(p),cm.size===0&&(process.off(\"SIGINT\",Mj),process.off(\"SIGTERM\",Uj)),h(E!==null?E:129)})})}}}function Ope(t){return e=>{let r=e[0]===\"pipe\"?new tA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function xT(t,e){return Hj.start(t,e)}function Tpe(t,e=null){let r=new tA.PassThrough,s=new Fpe.StringDecoder,a=\"\";return r.on(\"data\",n=>{let c=s.write(n),f;do if(f=c.indexOf(`\n`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a=\"\",t(e!==null?`${e} ${p}`:p)}while(f!==-1);a+=c}),r.on(\"end\",()=>{let n=s.end();n!==\"\"&&t(e!==null?`${e} ${n}`:n)}),r}function Lpe(t,{prefix:e}){return{stdout:Tpe(r=>t.stdout.write(`${r}\n`),t.stdout.isTTY?e:null),stderr:Tpe(r=>t.stderr.write(`${r}\n`),t.stderr.isTTY?e:null)}}var Rpe,tA,Fpe,cm,Oc,_j,Hj,jj=Xe(()=>{Rpe=ut(_U()),tA=Ie(\"stream\"),Fpe=Ie(\"string_decoder\"),cm=new Set;Oc=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},_j=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error(\"Assertion failed: No stream attached\");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error(\"Assertion failed: No stream attached\");return this.stream}},Hj=class t{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:s,stderr:a}){let n=new t(null,e);return n.stdin=r,n.stdout=s,n.stderr=a,n}pipeTo(e,r=1){let s=new t(this,e),a=new _j;return s.pipe=a,s.stdout=this.stdout,s.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),s}async exec(){let e=[\"ignore\",\"ignore\",\"ignore\"];if(this.pipe)e[0]=\"pipe\";else{if(this.stdin===null)throw new Error(\"Assertion failed: No input stream registered\");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error(\"Assertion failed: No output stream registered\");r=this.stdout,e[1]=r.get();let s;if(this.stderr===null)throw new Error(\"Assertion failed: No error stream registered\");s=this.stderr,e[2]=s.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),s.close(),n))}async run(){let e=[];for(let s=this;s;s=s.ancestor)e.push(s.exec());return(await Promise.all(e))[0]}}});var mv={};Vt(mv,{EntryCommand:()=>Av,ShellError:()=>Vl,execute:()=>vI,globUtils:()=>PT});function Mpe(t,e,r){let s=new Jl.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(s,{end:!1}),(e&2)===2&&r.stdin instanceof Jl.Writable&&s.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stderr,{end:!1});break;default:throw new Vl(`Bad file descriptor: \"${t}\"`)}return s}function QT(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function Znt(t,e,r){let s=[],a=new Jl.PassThrough;return a.on(\"data\",n=>s.push(n)),await TT(t,e,QT(r,{stdout:a})),Buffer.concat(s).toString().replace(/[\\r\\n]+$/,\"\")}async function Upe(t,e,r){let s=t.map(async n=>{let c=await um(n.args,e,r);return{name:n.name,value:c.join(\" \")}});return(await Promise.all(s)).reduce((n,c)=>(n[c.name]=c.value,n),{})}function kT(t){return t.match(/[^ \\r\\n\\t]+/g)||[]}async function Wpe(t,e,r,s,a=s){switch(t.name){case\"$\":s(String(process.pid));break;case\"#\":s(String(e.args.length));break;case\"@\":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let c=kT(n);for(let f=0;f<c.length-1;++f)a(c[f]);s(c[c.length-1])}break;case\"*\":{let n=e.args.join(\" \");if(t.quoted)s(n);else for(let c of kT(n))a(c)}break;case\"PPID\":s(String(process.ppid));break;case\"RANDOM\":s(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),c,f=Number.isFinite(n);if(f?n>=0&&n<e.args.length&&(c=e.args[n]):Object.hasOwn(r.variables,t.name)?c=r.variables[t.name]:Object.hasOwn(r.environment,t.name)&&(c=r.environment[t.name]),typeof c<\"u\"&&t.alternativeValue?c=(await um(t.alternativeValue,e,r)).join(\" \"):typeof c>\"u\"&&(t.defaultValue?c=(await um(t.defaultValue,e,r)).join(\" \"):t.alternativeValue&&(c=\"\")),typeof c>\"u\")throw f?new Vl(`Unbound argument #${n}`):new Vl(`Unbound variable \"${t.name}\"`);if(t.quoted)s(c);else{let p=kT(c);for(let E=0;E<p.length-1;++E)a(p[E]);let h=p[p.length-1];typeof h<\"u\"&&s(h)}}break}}async function hv(t,e,r){if(t.type===\"number\"){if(Number.isInteger(t.value))return t.value;throw new Error(`Invalid number: \"${t.value}\", only integers are allowed`)}else if(t.type===\"variable\"){let s=[];await Wpe({...t,quoted:!0},e,r,n=>s.push(n));let a=Number(s.join(\" \"));return Number.isNaN(a)?hv({type:\"variable\",name:s.join(\" \")},e,r):hv({type:\"number\",value:a},e,r)}else return $nt[t.type](await hv(t.left,e,r),await hv(t.right,e,r))}async function um(t,e,r){let s=new Map,a=[],n=[],c=E=>{n.push(E)},f=()=>{n.length>0&&a.push(n.join(\"\")),n=[]},p=E=>{c(E),f()},h=(E,C,S)=>{let P=JSON.stringify({type:E,fd:C}),I=s.get(P);typeof I>\"u\"&&s.set(P,I=[]),I.push(S)};for(let E of t){let C=!1;switch(E.type){case\"redirection\":{let S=await um(E.args,e,r);for(let P of S)h(E.subtype,E.fd,P)}break;case\"argument\":for(let S of E.segments)switch(S.type){case\"text\":c(S.text);break;case\"glob\":c(S.pattern),C=!0;break;case\"shell\":{let P=await Znt(S.shell,e,r);if(S.quoted)c(P);else{let I=kT(P);for(let R=0;R<I.length-1;++R)p(I[R]);c(I[I.length-1])}}break;case\"variable\":await Wpe(S,e,r,c,p);break;case\"arithmetic\":c(String(await hv(S.arithmetic,e,r)));break}break}if(f(),C){let S=a.pop();if(typeof S>\"u\")throw new Error(\"Assertion failed: Expected a glob pattern to have been set\");let P=await e.glob.match(S,{cwd:r.cwd,baseFs:e.baseFs});if(P.length===0){let I=Lj(S)?\". Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22\":\"\";throw new Vl(`No matches found: \"${S}\"${I}`)}for(let I of P.sort())p(I)}}if(s.size>0){let E=[];for(let[C,S]of s.entries())E.splice(E.length,0,C,String(S.length),...S);a.splice(0,0,\"__ysh_set_redirects\",...E,\"--\")}return a}function gv(t,e,r){e.builtins.has(t[0])||(t=[\"command\",...t]);let s=fe.fromPortablePath(r.cwd),a=r.environment;typeof a.PWD<\"u\"&&(a={...a,PWD:s});let[n,...c]=t;if(n===\"command\")return Npe(c[0],c.slice(1),e,{cwd:s,env:a});let f=e.builtins.get(n);if(typeof f>\"u\")throw new Error(`Assertion failed: A builtin should exist for \"${n}\"`);return Ope(async({stdin:p,stdout:h,stderr:E})=>{let{stdin:C,stdout:S,stderr:P}=r;r.stdin=p,r.stdout=h,r.stderr=E;try{return await f(c,e,r)}finally{r.stdin=C,r.stdout=S,r.stderr=P}})}function eit(t,e,r){return s=>{let a=new Jl.PassThrough,n=TT(t,e,QT(r,{stdin:a}));return{stdin:a,promise:n}}}function tit(t,e,r){return s=>{let a=new Jl.PassThrough,n=TT(t,e,r);return{stdin:a,promise:n}}}function _pe(t,e,r,s){if(e.length===0)return t;{let a;do a=String(Math.random());while(Object.hasOwn(s.procedures,a));return s.procedures={...s.procedures},s.procedures[a]=t,gv([...e,\"__ysh_run_procedure\",a],r,s)}}async function Hpe(t,e,r){let s=t,a=null,n=null;for(;s;){let c=s.then?{...r}:r,f;switch(s.type){case\"command\":{let p=await um(s.args,e,r),h=await Upe(s.envs,e,r);f=s.envs.length?gv(p,e,QT(c,{environment:h})):gv(p,e,c)}break;case\"subshell\":{let p=await um(s.args,e,r),h=eit(s.subshell,e,c);f=_pe(h,p,e,c)}break;case\"group\":{let p=await um(s.args,e,r),h=tit(s.group,e,c);f=_pe(h,p,e,c)}break;case\"envs\":{let p=await Upe(s.envs,e,r);c.environment={...c.environment,...p},f=gv([\"true\"],e,c)}break}if(typeof f>\"u\")throw new Error(\"Assertion failed: An action should have been generated\");if(a===null)n=xT(f,{stdin:new Oc(c.stdin),stdout:new Oc(c.stdout),stderr:new Oc(c.stderr)});else{if(n===null)throw new Error(\"Assertion failed: The execution pipeline should have been setup\");switch(a){case\"|\":n=n.pipeTo(f,1);break;case\"|&\":n=n.pipeTo(f,3);break}}s.then?(a=s.then.type,s=s.then.chain):s=null}if(n===null)throw new Error(\"Assertion failed: The execution pipeline should have been setup\");return await n.run()}async function rit(t,e,r,{background:s=!1}={}){function a(n){let c=[\"#2E86AB\",\"#A23B72\",\"#F18F01\",\"#C73E1D\",\"#CCE2A3\"],f=c[n%c.length];return jpe.default.hex(f)}if(s){let n=r.nextBackgroundJobIndex++,c=a(n),f=`[${n}]`,p=c(f),{stdout:h,stderr:E}=Lpe(r,{prefix:p});return r.backgroundJobs.push(Hpe(t,e,QT(r,{stdout:h,stderr:E})).catch(C=>E.write(`${C.message}\n`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${c(AE(t))}' has ended\n`)})),0}return await Hpe(t,e,r)}async function nit(t,e,r,{background:s=!1}={}){let a,n=f=>{a=f,r.variables[\"?\"]=String(f)},c=async f=>{try{return await rit(f.chain,e,r,{background:s&&typeof f.then>\"u\"})}catch(p){if(!(p instanceof Vl))throw p;return r.stderr.write(`${p.message}\n`),1}};for(n(await c(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case\"&&\":a===0&&n(await c(t.then.line));break;case\"||\":a!==0&&n(await c(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: \"${t.then.type}\"`)}t=t.then.line}return a}async function TT(t,e,r){let s=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:c}of t){if(a=await nit(n,e,r,{background:c===\"&\"}),r.exitCode!==null)return r.exitCode;r.variables[\"?\"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=s,a}function Ype(t){switch(t.type){case\"variable\":return t.name===\"@\"||t.name===\"#\"||t.name===\"*\"||Number.isFinite(parseInt(t.name,10))||\"defaultValue\"in t&&!!t.defaultValue&&t.defaultValue.some(e=>dv(e))||\"alternativeValue\"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>dv(e));case\"arithmetic\":return Gj(t.arithmetic);case\"shell\":return qj(t.shell);default:return!1}}function dv(t){switch(t.type){case\"redirection\":return t.args.some(e=>dv(e));case\"argument\":return t.segments.some(e=>Ype(e));default:throw new Error(`Assertion failed: Unsupported argument type: \"${t.type}\"`)}}function Gj(t){switch(t.type){case\"variable\":return Ype(t);case\"number\":return!1;default:return Gj(t.left)||Gj(t.right)}}function qj(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let s;switch(r.type){case\"subshell\":s=qj(r.subshell);break;case\"command\":s=r.envs.some(a=>a.args.some(n=>dv(n)))||r.args.some(a=>dv(a));break}if(s)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function vI(t,e=[],{baseFs:r=new Yn,builtins:s={},cwd:a=fe.toPortablePath(process.cwd()),env:n=process.env,stdin:c=process.stdin,stdout:f=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=PT}={}){let C={};for(let[I,R]of Object.entries(n))typeof R<\"u\"&&(C[I]=R);let S=new Map(Xnt);for(let[I,R]of Object.entries(s))S.set(I,R);c===null&&(c=new Jl.PassThrough,c.end());let P=ux(t,E);if(!qj(P)&&P.length>0&&e.length>0){let{command:I}=P[P.length-1];for(;I.then;)I=I.then.line;let R=I.chain;for(;R.then;)R=R.then.chain;R.type===\"command\"&&(R.args=R.args.concat(e.map(N=>({type:\"argument\",segments:[{type:\"text\",text:N}]}))))}return await TT(P,{args:e,baseFs:r,builtins:S,initialStdin:c,initialStdout:f,initialStderr:p,glob:E},{cwd:a,environment:C,exitCode:null,procedures:{},stdin:c,stdout:f,stderr:p,variables:Object.assign({},h,{\"?\":0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var jpe,Gpe,Jl,qpe,Xnt,$nt,pv=Xe(()=>{Dt();wc();jpe=ut(TE()),Gpe=Ie(\"os\"),Jl=Ie(\"stream\"),qpe=Ie(\"timers/promises\");Dpe();bpe();Qpe();jj();jj();Xnt=new Map([[\"cd\",async([t=(0,Gpe.homedir)(),...e],r,s)=>{let a=J.resolve(s.cwd,fe.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(c=>{throw c.code===\"ENOENT\"?new Vl(`cd: no such file or directory: ${t}`):c})).isDirectory())throw new Vl(`cd: not a directory: ${t}`);return s.cwd=a,0}],[\"pwd\",async(t,e,r)=>(r.stdout.write(`${fe.fromPortablePath(r.cwd)}\n`),0)],[\":\",async(t,e,r)=>0],[\"true\",async(t,e,r)=>0],[\"false\",async(t,e,r)=>1],[\"exit\",async([t,...e],r,s)=>s.exitCode=parseInt(t??s.variables[\"?\"],10)],[\"echo\",async(t,e,r)=>(r.stdout.write(`${t.join(\" \")}\n`),0)],[\"sleep\",async([t],e,r)=>{if(typeof t>\"u\")throw new Vl(\"sleep: missing operand\");let s=Number(t);if(Number.isNaN(s))throw new Vl(`sleep: invalid time interval '${t}'`);return await(0,qpe.setTimeout)(1e3*s,0)}],[\"unset\",async(t,e,r)=>{for(let s of t)delete r.environment[s],delete r.variables[s];return 0}],[\"__ysh_run_procedure\",async(t,e,r)=>{let s=r.procedures[t[0]];return await xT(s,{stdin:new Oc(r.stdin),stdout:new Oc(r.stdout),stderr:new Oc(r.stderr)}).run()}],[\"__ysh_set_redirects\",async(t,e,r)=>{let s=r.stdin,a=r.stdout,n=r.stderr,c=[],f=[],p=[],h=0;for(;t[h]!==\"--\";){let C=t[h++],{type:S,fd:P}=JSON.parse(C),I=W=>{switch(P){case null:case 0:c.push(W);break;default:throw new Error(`Unsupported file descriptor: \"${P}\"`)}},R=W=>{switch(P){case null:case 1:f.push(W);break;case 2:p.push(W);break;default:throw new Error(`Unsupported file descriptor: \"${P}\"`)}},N=Number(t[h++]),U=h+N;for(let W=h;W<U;++h,++W)switch(S){case\"<\":I(()=>e.baseFs.createReadStream(J.resolve(r.cwd,fe.toPortablePath(t[W]))));break;case\"<<<\":I(()=>{let ee=new Jl.PassThrough;return process.nextTick(()=>{ee.write(`${t[W]}\n`),ee.end()}),ee});break;case\"<&\":I(()=>Mpe(Number(t[W]),1,r));break;case\">\":case\">>\":{let ee=J.resolve(r.cwd,fe.toPortablePath(t[W]));R(ee===\"/dev/null\"?new Jl.Writable({autoDestroy:!0,emitClose:!0,write(ie,ue,le){setImmediate(le)}}):e.baseFs.createWriteStream(ee,S===\">>\"?{flags:\"a\"}:void 0))}break;case\">&\":R(Mpe(Number(t[W]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: \"${S}\"`)}}if(c.length>0){let C=new Jl.PassThrough;s=C;let S=P=>{if(P===c.length)C.end();else{let I=c[P]();I.pipe(C,{end:!1}),I.on(\"end\",()=>{S(P+1)})}};S(0)}if(f.length>0){let C=new Jl.PassThrough;a=C;for(let S of f)C.pipe(S)}if(p.length>0){let C=new Jl.PassThrough;n=C;for(let S of p)C.pipe(S)}let E=await xT(gv(t.slice(h+1),e,r),{stdin:new Oc(s),stdout:new Oc(a),stderr:new Oc(n)}).run();return await Promise.all(f.map(C=>new Promise((S,P)=>{C.on(\"error\",I=>{P(I)}),C.on(\"close\",()=>{S()}),C.end()}))),await Promise.all(p.map(C=>new Promise((S,P)=>{C.on(\"error\",I=>{P(I)}),C.on(\"close\",()=>{S()}),C.end()}))),E}]]);$nt={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var Vpe=_((S4t,RT)=>{function iit(){var t=0,e=1,r=2,s=3,a=4,n=5,c=6,f=7,p=8,h=9,E=10,C=11,S=12,P=13,I=14,R=15,N=16,U=17,W=0,ee=1,ie=2,ue=3,le=4;function me(g,we){return 55296<=g.charCodeAt(we)&&g.charCodeAt(we)<=56319&&56320<=g.charCodeAt(we+1)&&g.charCodeAt(we+1)<=57343}function pe(g,we){we===void 0&&(we=0);var ye=g.charCodeAt(we);if(55296<=ye&&ye<=56319&&we<g.length-1){var Ae=ye,se=g.charCodeAt(we+1);return 56320<=se&&se<=57343?(Ae-55296)*1024+(se-56320)+65536:Ae}if(56320<=ye&&ye<=57343&&we>=1){var Ae=g.charCodeAt(we-1),se=ye;return 55296<=Ae&&Ae<=56319?(Ae-55296)*1024+(se-56320)+65536:se}return ye}function Be(g,we,ye){var Ae=[g].concat(we).concat([ye]),se=Ae[Ae.length-2],Z=ye,De=Ae.lastIndexOf(I);if(De>1&&Ae.slice(1,De).every(function(j){return j==s})&&[s,P,U].indexOf(g)==-1)return ie;var Re=Ae.lastIndexOf(a);if(Re>0&&Ae.slice(1,Re).every(function(j){return j==a})&&[S,a].indexOf(se)==-1)return Ae.filter(function(j){return j==a}).length%2==1?ue:le;if(se==t&&Z==e)return W;if(se==r||se==t||se==e)return Z==I&&we.every(function(j){return j==s})?ie:ee;if(Z==r||Z==t||Z==e)return ee;if(se==c&&(Z==c||Z==f||Z==h||Z==E))return W;if((se==h||se==f)&&(Z==f||Z==p))return W;if((se==E||se==p)&&Z==p)return W;if(Z==s||Z==R)return W;if(Z==n)return W;if(se==S)return W;var mt=Ae.indexOf(s)!=-1?Ae.lastIndexOf(s)-1:Ae.length-2;return[P,U].indexOf(Ae[mt])!=-1&&Ae.slice(mt+1,-1).every(function(j){return j==s})&&Z==I||se==R&&[N,U].indexOf(Z)!=-1?W:we.indexOf(a)!=-1?ie:se==a&&Z==a?W:ee}this.nextBreak=function(g,we){if(we===void 0&&(we=0),we<0)return 0;if(we>=g.length-1)return g.length;for(var ye=Ce(pe(g,we)),Ae=[],se=we+1;se<g.length;se++)if(!me(g,se-1)){var Z=Ce(pe(g,se));if(Be(ye,Ae,Z))return se;Ae.push(Z)}return g.length},this.splitGraphemes=function(g){for(var we=[],ye=0,Ae;(Ae=this.nextBreak(g,ye))<g.length;)we.push(g.slice(ye,Ae)),ye=Ae;return ye<g.length&&we.push(g.slice(ye)),we},this.iterateGraphemes=function(g){var we=0,ye={next:function(){var Ae,se;return(se=this.nextBreak(g,we))<g.length?(Ae=g.slice(we,se),we=se,{value:Ae,done:!1}):we<g.length?(Ae=g.slice(we),we=g.length,{value:Ae,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<\"u\"&&Symbol.iterator&&(ye[Symbol.iterator]=function(){return ye}),ye},this.countGraphemes=function(g){for(var we=0,ye=0,Ae;(Ae=this.nextBreak(g,ye))<g.length;)ye=Ae,we++;return ye<g.length&&we++,we};function Ce(g){return 1536<=g&&g<=1541||g==1757||g==1807||g==2274||g==3406||g==69821||70082<=g&&g<=70083||g==72250||72326<=g&&g<=72329||g==73030?S:g==13?t:g==10?e:0<=g&&g<=9||11<=g&&g<=12||14<=g&&g<=31||127<=g&&g<=159||g==173||g==1564||g==6158||g==8203||8206<=g&&g<=8207||g==8232||g==8233||8234<=g&&g<=8238||8288<=g&&g<=8292||g==8293||8294<=g&&g<=8303||55296<=g&&g<=57343||g==65279||65520<=g&&g<=65528||65529<=g&&g<=65531||113824<=g&&g<=113827||119155<=g&&g<=119162||g==917504||g==917505||917506<=g&&g<=917535||917632<=g&&g<=917759||918e3<=g&&g<=921599?r:768<=g&&g<=879||1155<=g&&g<=1159||1160<=g&&g<=1161||1425<=g&&g<=1469||g==1471||1473<=g&&g<=1474||1476<=g&&g<=1477||g==1479||1552<=g&&g<=1562||1611<=g&&g<=1631||g==1648||1750<=g&&g<=1756||1759<=g&&g<=1764||1767<=g&&g<=1768||1770<=g&&g<=1773||g==1809||1840<=g&&g<=1866||1958<=g&&g<=1968||2027<=g&&g<=2035||2070<=g&&g<=2073||2075<=g&&g<=2083||2085<=g&&g<=2087||2089<=g&&g<=2093||2137<=g&&g<=2139||2260<=g&&g<=2273||2275<=g&&g<=2306||g==2362||g==2364||2369<=g&&g<=2376||g==2381||2385<=g&&g<=2391||2402<=g&&g<=2403||g==2433||g==2492||g==2494||2497<=g&&g<=2500||g==2509||g==2519||2530<=g&&g<=2531||2561<=g&&g<=2562||g==2620||2625<=g&&g<=2626||2631<=g&&g<=2632||2635<=g&&g<=2637||g==2641||2672<=g&&g<=2673||g==2677||2689<=g&&g<=2690||g==2748||2753<=g&&g<=2757||2759<=g&&g<=2760||g==2765||2786<=g&&g<=2787||2810<=g&&g<=2815||g==2817||g==2876||g==2878||g==2879||2881<=g&&g<=2884||g==2893||g==2902||g==2903||2914<=g&&g<=2915||g==2946||g==3006||g==3008||g==3021||g==3031||g==3072||3134<=g&&g<=3136||3142<=g&&g<=3144||3146<=g&&g<=3149||3157<=g&&g<=3158||3170<=g&&g<=3171||g==3201||g==3260||g==3263||g==3266||g==3270||3276<=g&&g<=3277||3285<=g&&g<=3286||3298<=g&&g<=3299||3328<=g&&g<=3329||3387<=g&&g<=3388||g==3390||3393<=g&&g<=3396||g==3405||g==3415||3426<=g&&g<=3427||g==3530||g==3535||3538<=g&&g<=3540||g==3542||g==3551||g==3633||3636<=g&&g<=3642||3655<=g&&g<=3662||g==3761||3764<=g&&g<=3769||3771<=g&&g<=3772||3784<=g&&g<=3789||3864<=g&&g<=3865||g==3893||g==3895||g==3897||3953<=g&&g<=3966||3968<=g&&g<=3972||3974<=g&&g<=3975||3981<=g&&g<=3991||3993<=g&&g<=4028||g==4038||4141<=g&&g<=4144||4146<=g&&g<=4151||4153<=g&&g<=4154||4157<=g&&g<=4158||4184<=g&&g<=4185||4190<=g&&g<=4192||4209<=g&&g<=4212||g==4226||4229<=g&&g<=4230||g==4237||g==4253||4957<=g&&g<=4959||5906<=g&&g<=5908||5938<=g&&g<=5940||5970<=g&&g<=5971||6002<=g&&g<=6003||6068<=g&&g<=6069||6071<=g&&g<=6077||g==6086||6089<=g&&g<=6099||g==6109||6155<=g&&g<=6157||6277<=g&&g<=6278||g==6313||6432<=g&&g<=6434||6439<=g&&g<=6440||g==6450||6457<=g&&g<=6459||6679<=g&&g<=6680||g==6683||g==6742||6744<=g&&g<=6750||g==6752||g==6754||6757<=g&&g<=6764||6771<=g&&g<=6780||g==6783||6832<=g&&g<=6845||g==6846||6912<=g&&g<=6915||g==6964||6966<=g&&g<=6970||g==6972||g==6978||7019<=g&&g<=7027||7040<=g&&g<=7041||7074<=g&&g<=7077||7080<=g&&g<=7081||7083<=g&&g<=7085||g==7142||7144<=g&&g<=7145||g==7149||7151<=g&&g<=7153||7212<=g&&g<=7219||7222<=g&&g<=7223||7376<=g&&g<=7378||7380<=g&&g<=7392||7394<=g&&g<=7400||g==7405||g==7412||7416<=g&&g<=7417||7616<=g&&g<=7673||7675<=g&&g<=7679||g==8204||8400<=g&&g<=8412||8413<=g&&g<=8416||g==8417||8418<=g&&g<=8420||8421<=g&&g<=8432||11503<=g&&g<=11505||g==11647||11744<=g&&g<=11775||12330<=g&&g<=12333||12334<=g&&g<=12335||12441<=g&&g<=12442||g==42607||42608<=g&&g<=42610||42612<=g&&g<=42621||42654<=g&&g<=42655||42736<=g&&g<=42737||g==43010||g==43014||g==43019||43045<=g&&g<=43046||43204<=g&&g<=43205||43232<=g&&g<=43249||43302<=g&&g<=43309||43335<=g&&g<=43345||43392<=g&&g<=43394||g==43443||43446<=g&&g<=43449||g==43452||g==43493||43561<=g&&g<=43566||43569<=g&&g<=43570||43573<=g&&g<=43574||g==43587||g==43596||g==43644||g==43696||43698<=g&&g<=43700||43703<=g&&g<=43704||43710<=g&&g<=43711||g==43713||43756<=g&&g<=43757||g==43766||g==44005||g==44008||g==44013||g==64286||65024<=g&&g<=65039||65056<=g&&g<=65071||65438<=g&&g<=65439||g==66045||g==66272||66422<=g&&g<=66426||68097<=g&&g<=68099||68101<=g&&g<=68102||68108<=g&&g<=68111||68152<=g&&g<=68154||g==68159||68325<=g&&g<=68326||g==69633||69688<=g&&g<=69702||69759<=g&&g<=69761||69811<=g&&g<=69814||69817<=g&&g<=69818||69888<=g&&g<=69890||69927<=g&&g<=69931||69933<=g&&g<=69940||g==70003||70016<=g&&g<=70017||70070<=g&&g<=70078||70090<=g&&g<=70092||70191<=g&&g<=70193||g==70196||70198<=g&&g<=70199||g==70206||g==70367||70371<=g&&g<=70378||70400<=g&&g<=70401||g==70460||g==70462||g==70464||g==70487||70502<=g&&g<=70508||70512<=g&&g<=70516||70712<=g&&g<=70719||70722<=g&&g<=70724||g==70726||g==70832||70835<=g&&g<=70840||g==70842||g==70845||70847<=g&&g<=70848||70850<=g&&g<=70851||g==71087||71090<=g&&g<=71093||71100<=g&&g<=71101||71103<=g&&g<=71104||71132<=g&&g<=71133||71219<=g&&g<=71226||g==71229||71231<=g&&g<=71232||g==71339||g==71341||71344<=g&&g<=71349||g==71351||71453<=g&&g<=71455||71458<=g&&g<=71461||71463<=g&&g<=71467||72193<=g&&g<=72198||72201<=g&&g<=72202||72243<=g&&g<=72248||72251<=g&&g<=72254||g==72263||72273<=g&&g<=72278||72281<=g&&g<=72283||72330<=g&&g<=72342||72344<=g&&g<=72345||72752<=g&&g<=72758||72760<=g&&g<=72765||g==72767||72850<=g&&g<=72871||72874<=g&&g<=72880||72882<=g&&g<=72883||72885<=g&&g<=72886||73009<=g&&g<=73014||g==73018||73020<=g&&g<=73021||73023<=g&&g<=73029||g==73031||92912<=g&&g<=92916||92976<=g&&g<=92982||94095<=g&&g<=94098||113821<=g&&g<=113822||g==119141||119143<=g&&g<=119145||119150<=g&&g<=119154||119163<=g&&g<=119170||119173<=g&&g<=119179||119210<=g&&g<=119213||119362<=g&&g<=119364||121344<=g&&g<=121398||121403<=g&&g<=121452||g==121461||g==121476||121499<=g&&g<=121503||121505<=g&&g<=121519||122880<=g&&g<=122886||122888<=g&&g<=122904||122907<=g&&g<=122913||122915<=g&&g<=122916||122918<=g&&g<=122922||125136<=g&&g<=125142||125252<=g&&g<=125258||917536<=g&&g<=917631||917760<=g&&g<=917999?s:127462<=g&&g<=127487?a:g==2307||g==2363||2366<=g&&g<=2368||2377<=g&&g<=2380||2382<=g&&g<=2383||2434<=g&&g<=2435||2495<=g&&g<=2496||2503<=g&&g<=2504||2507<=g&&g<=2508||g==2563||2622<=g&&g<=2624||g==2691||2750<=g&&g<=2752||g==2761||2763<=g&&g<=2764||2818<=g&&g<=2819||g==2880||2887<=g&&g<=2888||2891<=g&&g<=2892||g==3007||3009<=g&&g<=3010||3014<=g&&g<=3016||3018<=g&&g<=3020||3073<=g&&g<=3075||3137<=g&&g<=3140||3202<=g&&g<=3203||g==3262||3264<=g&&g<=3265||3267<=g&&g<=3268||3271<=g&&g<=3272||3274<=g&&g<=3275||3330<=g&&g<=3331||3391<=g&&g<=3392||3398<=g&&g<=3400||3402<=g&&g<=3404||3458<=g&&g<=3459||3536<=g&&g<=3537||3544<=g&&g<=3550||3570<=g&&g<=3571||g==3635||g==3763||3902<=g&&g<=3903||g==3967||g==4145||4155<=g&&g<=4156||4182<=g&&g<=4183||g==4228||g==6070||6078<=g&&g<=6085||6087<=g&&g<=6088||6435<=g&&g<=6438||6441<=g&&g<=6443||6448<=g&&g<=6449||6451<=g&&g<=6456||6681<=g&&g<=6682||g==6741||g==6743||6765<=g&&g<=6770||g==6916||g==6965||g==6971||6973<=g&&g<=6977||6979<=g&&g<=6980||g==7042||g==7073||7078<=g&&g<=7079||g==7082||g==7143||7146<=g&&g<=7148||g==7150||7154<=g&&g<=7155||7204<=g&&g<=7211||7220<=g&&g<=7221||g==7393||7410<=g&&g<=7411||g==7415||43043<=g&&g<=43044||g==43047||43136<=g&&g<=43137||43188<=g&&g<=43203||43346<=g&&g<=43347||g==43395||43444<=g&&g<=43445||43450<=g&&g<=43451||43453<=g&&g<=43456||43567<=g&&g<=43568||43571<=g&&g<=43572||g==43597||g==43755||43758<=g&&g<=43759||g==43765||44003<=g&&g<=44004||44006<=g&&g<=44007||44009<=g&&g<=44010||g==44012||g==69632||g==69634||g==69762||69808<=g&&g<=69810||69815<=g&&g<=69816||g==69932||g==70018||70067<=g&&g<=70069||70079<=g&&g<=70080||70188<=g&&g<=70190||70194<=g&&g<=70195||g==70197||70368<=g&&g<=70370||70402<=g&&g<=70403||g==70463||70465<=g&&g<=70468||70471<=g&&g<=70472||70475<=g&&g<=70477||70498<=g&&g<=70499||70709<=g&&g<=70711||70720<=g&&g<=70721||g==70725||70833<=g&&g<=70834||g==70841||70843<=g&&g<=70844||g==70846||g==70849||71088<=g&&g<=71089||71096<=g&&g<=71099||g==71102||71216<=g&&g<=71218||71227<=g&&g<=71228||g==71230||g==71340||71342<=g&&g<=71343||g==71350||71456<=g&&g<=71457||g==71462||72199<=g&&g<=72200||g==72249||72279<=g&&g<=72280||g==72343||g==72751||g==72766||g==72873||g==72881||g==72884||94033<=g&&g<=94078||g==119142||g==119149?n:4352<=g&&g<=4447||43360<=g&&g<=43388?c:4448<=g&&g<=4519||55216<=g&&g<=55238?f:4520<=g&&g<=4607||55243<=g&&g<=55291?p:g==44032||g==44060||g==44088||g==44116||g==44144||g==44172||g==44200||g==44228||g==44256||g==44284||g==44312||g==44340||g==44368||g==44396||g==44424||g==44452||g==44480||g==44508||g==44536||g==44564||g==44592||g==44620||g==44648||g==44676||g==44704||g==44732||g==44760||g==44788||g==44816||g==44844||g==44872||g==44900||g==44928||g==44956||g==44984||g==45012||g==45040||g==45068||g==45096||g==45124||g==45152||g==45180||g==45208||g==45236||g==45264||g==45292||g==45320||g==45348||g==45376||g==45404||g==45432||g==45460||g==45488||g==45516||g==45544||g==45572||g==45600||g==45628||g==45656||g==45684||g==45712||g==45740||g==45768||g==45796||g==45824||g==45852||g==45880||g==45908||g==45936||g==45964||g==45992||g==46020||g==46048||g==46076||g==46104||g==46132||g==46160||g==46188||g==46216||g==46244||g==46272||g==46300||g==46328||g==46356||g==46384||g==46412||g==46440||g==46468||g==46496||g==46524||g==46552||g==46580||g==46608||g==46636||g==46664||g==46692||g==46720||g==46748||g==46776||g==46804||g==46832||g==46860||g==46888||g==46916||g==46944||g==46972||g==47e3||g==47028||g==47056||g==47084||g==47112||g==47140||g==47168||g==47196||g==47224||g==47252||g==47280||g==47308||g==47336||g==47364||g==47392||g==47420||g==47448||g==47476||g==47504||g==47532||g==47560||g==47588||g==47616||g==47644||g==47672||g==47700||g==47728||g==47756||g==47784||g==47812||g==47840||g==47868||g==47896||g==47924||g==47952||g==47980||g==48008||g==48036||g==48064||g==48092||g==48120||g==48148||g==48176||g==48204||g==48232||g==48260||g==48288||g==48316||g==48344||g==48372||g==48400||g==48428||g==48456||g==48484||g==48512||g==48540||g==48568||g==48596||g==48624||g==48652||g==48680||g==48708||g==48736||g==48764||g==48792||g==48820||g==48848||g==48876||g==48904||g==48932||g==48960||g==48988||g==49016||g==49044||g==49072||g==49100||g==49128||g==49156||g==49184||g==49212||g==49240||g==49268||g==49296||g==49324||g==49352||g==49380||g==49408||g==49436||g==49464||g==49492||g==49520||g==49548||g==49576||g==49604||g==49632||g==49660||g==49688||g==49716||g==49744||g==49772||g==49800||g==49828||g==49856||g==49884||g==49912||g==49940||g==49968||g==49996||g==50024||g==50052||g==50080||g==50108||g==50136||g==50164||g==50192||g==50220||g==50248||g==50276||g==50304||g==50332||g==50360||g==50388||g==50416||g==50444||g==50472||g==50500||g==50528||g==50556||g==50584||g==50612||g==50640||g==50668||g==50696||g==50724||g==50752||g==50780||g==50808||g==50836||g==50864||g==50892||g==50920||g==50948||g==50976||g==51004||g==51032||g==51060||g==51088||g==51116||g==51144||g==51172||g==51200||g==51228||g==51256||g==51284||g==51312||g==51340||g==51368||g==51396||g==51424||g==51452||g==51480||g==51508||g==51536||g==51564||g==51592||g==51620||g==51648||g==51676||g==51704||g==51732||g==51760||g==51788||g==51816||g==51844||g==51872||g==51900||g==51928||g==51956||g==51984||g==52012||g==52040||g==52068||g==52096||g==52124||g==52152||g==52180||g==52208||g==52236||g==52264||g==52292||g==52320||g==52348||g==52376||g==52404||g==52432||g==52460||g==52488||g==52516||g==52544||g==52572||g==52600||g==52628||g==52656||g==52684||g==52712||g==52740||g==52768||g==52796||g==52824||g==52852||g==52880||g==52908||g==52936||g==52964||g==52992||g==53020||g==53048||g==53076||g==53104||g==53132||g==53160||g==53188||g==53216||g==53244||g==53272||g==53300||g==53328||g==53356||g==53384||g==53412||g==53440||g==53468||g==53496||g==53524||g==53552||g==53580||g==53608||g==53636||g==53664||g==53692||g==53720||g==53748||g==53776||g==53804||g==53832||g==53860||g==53888||g==53916||g==53944||g==53972||g==54e3||g==54028||g==54056||g==54084||g==54112||g==54140||g==54168||g==54196||g==54224||g==54252||g==54280||g==54308||g==54336||g==54364||g==54392||g==54420||g==54448||g==54476||g==54504||g==54532||g==54560||g==54588||g==54616||g==54644||g==54672||g==54700||g==54728||g==54756||g==54784||g==54812||g==54840||g==54868||g==54896||g==54924||g==54952||g==54980||g==55008||g==55036||g==55064||g==55092||g==55120||g==55148||g==55176?h:44033<=g&&g<=44059||44061<=g&&g<=44087||44089<=g&&g<=44115||44117<=g&&g<=44143||44145<=g&&g<=44171||44173<=g&&g<=44199||44201<=g&&g<=44227||44229<=g&&g<=44255||44257<=g&&g<=44283||44285<=g&&g<=44311||44313<=g&&g<=44339||44341<=g&&g<=44367||44369<=g&&g<=44395||44397<=g&&g<=44423||44425<=g&&g<=44451||44453<=g&&g<=44479||44481<=g&&g<=44507||44509<=g&&g<=44535||44537<=g&&g<=44563||44565<=g&&g<=44591||44593<=g&&g<=44619||44621<=g&&g<=44647||44649<=g&&g<=44675||44677<=g&&g<=44703||44705<=g&&g<=44731||44733<=g&&g<=44759||44761<=g&&g<=44787||44789<=g&&g<=44815||44817<=g&&g<=44843||44845<=g&&g<=44871||44873<=g&&g<=44899||44901<=g&&g<=44927||44929<=g&&g<=44955||44957<=g&&g<=44983||44985<=g&&g<=45011||45013<=g&&g<=45039||45041<=g&&g<=45067||45069<=g&&g<=45095||45097<=g&&g<=45123||45125<=g&&g<=45151||45153<=g&&g<=45179||45181<=g&&g<=45207||45209<=g&&g<=45235||45237<=g&&g<=45263||45265<=g&&g<=45291||45293<=g&&g<=45319||45321<=g&&g<=45347||45349<=g&&g<=45375||45377<=g&&g<=45403||45405<=g&&g<=45431||45433<=g&&g<=45459||45461<=g&&g<=45487||45489<=g&&g<=45515||45517<=g&&g<=45543||45545<=g&&g<=45571||45573<=g&&g<=45599||45601<=g&&g<=45627||45629<=g&&g<=45655||45657<=g&&g<=45683||45685<=g&&g<=45711||45713<=g&&g<=45739||45741<=g&&g<=45767||45769<=g&&g<=45795||45797<=g&&g<=45823||45825<=g&&g<=45851||45853<=g&&g<=45879||45881<=g&&g<=45907||45909<=g&&g<=45935||45937<=g&&g<=45963||45965<=g&&g<=45991||45993<=g&&g<=46019||46021<=g&&g<=46047||46049<=g&&g<=46075||46077<=g&&g<=46103||46105<=g&&g<=46131||46133<=g&&g<=46159||46161<=g&&g<=46187||46189<=g&&g<=46215||46217<=g&&g<=46243||46245<=g&&g<=46271||46273<=g&&g<=46299||46301<=g&&g<=46327||46329<=g&&g<=46355||46357<=g&&g<=46383||46385<=g&&g<=46411||46413<=g&&g<=46439||46441<=g&&g<=46467||46469<=g&&g<=46495||46497<=g&&g<=46523||46525<=g&&g<=46551||46553<=g&&g<=46579||46581<=g&&g<=46607||46609<=g&&g<=46635||46637<=g&&g<=46663||46665<=g&&g<=46691||46693<=g&&g<=46719||46721<=g&&g<=46747||46749<=g&&g<=46775||46777<=g&&g<=46803||46805<=g&&g<=46831||46833<=g&&g<=46859||46861<=g&&g<=46887||46889<=g&&g<=46915||46917<=g&&g<=46943||46945<=g&&g<=46971||46973<=g&&g<=46999||47001<=g&&g<=47027||47029<=g&&g<=47055||47057<=g&&g<=47083||47085<=g&&g<=47111||47113<=g&&g<=47139||47141<=g&&g<=47167||47169<=g&&g<=47195||47197<=g&&g<=47223||47225<=g&&g<=47251||47253<=g&&g<=47279||47281<=g&&g<=47307||47309<=g&&g<=47335||47337<=g&&g<=47363||47365<=g&&g<=47391||47393<=g&&g<=47419||47421<=g&&g<=47447||47449<=g&&g<=47475||47477<=g&&g<=47503||47505<=g&&g<=47531||47533<=g&&g<=47559||47561<=g&&g<=47587||47589<=g&&g<=47615||47617<=g&&g<=47643||47645<=g&&g<=47671||47673<=g&&g<=47699||47701<=g&&g<=47727||47729<=g&&g<=47755||47757<=g&&g<=47783||47785<=g&&g<=47811||47813<=g&&g<=47839||47841<=g&&g<=47867||47869<=g&&g<=47895||47897<=g&&g<=47923||47925<=g&&g<=47951||47953<=g&&g<=47979||47981<=g&&g<=48007||48009<=g&&g<=48035||48037<=g&&g<=48063||48065<=g&&g<=48091||48093<=g&&g<=48119||48121<=g&&g<=48147||48149<=g&&g<=48175||48177<=g&&g<=48203||48205<=g&&g<=48231||48233<=g&&g<=48259||48261<=g&&g<=48287||48289<=g&&g<=48315||48317<=g&&g<=48343||48345<=g&&g<=48371||48373<=g&&g<=48399||48401<=g&&g<=48427||48429<=g&&g<=48455||48457<=g&&g<=48483||48485<=g&&g<=48511||48513<=g&&g<=48539||48541<=g&&g<=48567||48569<=g&&g<=48595||48597<=g&&g<=48623||48625<=g&&g<=48651||48653<=g&&g<=48679||48681<=g&&g<=48707||48709<=g&&g<=48735||48737<=g&&g<=48763||48765<=g&&g<=48791||48793<=g&&g<=48819||48821<=g&&g<=48847||48849<=g&&g<=48875||48877<=g&&g<=48903||48905<=g&&g<=48931||48933<=g&&g<=48959||48961<=g&&g<=48987||48989<=g&&g<=49015||49017<=g&&g<=49043||49045<=g&&g<=49071||49073<=g&&g<=49099||49101<=g&&g<=49127||49129<=g&&g<=49155||49157<=g&&g<=49183||49185<=g&&g<=49211||49213<=g&&g<=49239||49241<=g&&g<=49267||49269<=g&&g<=49295||49297<=g&&g<=49323||49325<=g&&g<=49351||49353<=g&&g<=49379||49381<=g&&g<=49407||49409<=g&&g<=49435||49437<=g&&g<=49463||49465<=g&&g<=49491||49493<=g&&g<=49519||49521<=g&&g<=49547||49549<=g&&g<=49575||49577<=g&&g<=49603||49605<=g&&g<=49631||49633<=g&&g<=49659||49661<=g&&g<=49687||49689<=g&&g<=49715||49717<=g&&g<=49743||49745<=g&&g<=49771||49773<=g&&g<=49799||49801<=g&&g<=49827||49829<=g&&g<=49855||49857<=g&&g<=49883||49885<=g&&g<=49911||49913<=g&&g<=49939||49941<=g&&g<=49967||49969<=g&&g<=49995||49997<=g&&g<=50023||50025<=g&&g<=50051||50053<=g&&g<=50079||50081<=g&&g<=50107||50109<=g&&g<=50135||50137<=g&&g<=50163||50165<=g&&g<=50191||50193<=g&&g<=50219||50221<=g&&g<=50247||50249<=g&&g<=50275||50277<=g&&g<=50303||50305<=g&&g<=50331||50333<=g&&g<=50359||50361<=g&&g<=50387||50389<=g&&g<=50415||50417<=g&&g<=50443||50445<=g&&g<=50471||50473<=g&&g<=50499||50501<=g&&g<=50527||50529<=g&&g<=50555||50557<=g&&g<=50583||50585<=g&&g<=50611||50613<=g&&g<=50639||50641<=g&&g<=50667||50669<=g&&g<=50695||50697<=g&&g<=50723||50725<=g&&g<=50751||50753<=g&&g<=50779||50781<=g&&g<=50807||50809<=g&&g<=50835||50837<=g&&g<=50863||50865<=g&&g<=50891||50893<=g&&g<=50919||50921<=g&&g<=50947||50949<=g&&g<=50975||50977<=g&&g<=51003||51005<=g&&g<=51031||51033<=g&&g<=51059||51061<=g&&g<=51087||51089<=g&&g<=51115||51117<=g&&g<=51143||51145<=g&&g<=51171||51173<=g&&g<=51199||51201<=g&&g<=51227||51229<=g&&g<=51255||51257<=g&&g<=51283||51285<=g&&g<=51311||51313<=g&&g<=51339||51341<=g&&g<=51367||51369<=g&&g<=51395||51397<=g&&g<=51423||51425<=g&&g<=51451||51453<=g&&g<=51479||51481<=g&&g<=51507||51509<=g&&g<=51535||51537<=g&&g<=51563||51565<=g&&g<=51591||51593<=g&&g<=51619||51621<=g&&g<=51647||51649<=g&&g<=51675||51677<=g&&g<=51703||51705<=g&&g<=51731||51733<=g&&g<=51759||51761<=g&&g<=51787||51789<=g&&g<=51815||51817<=g&&g<=51843||51845<=g&&g<=51871||51873<=g&&g<=51899||51901<=g&&g<=51927||51929<=g&&g<=51955||51957<=g&&g<=51983||51985<=g&&g<=52011||52013<=g&&g<=52039||52041<=g&&g<=52067||52069<=g&&g<=52095||52097<=g&&g<=52123||52125<=g&&g<=52151||52153<=g&&g<=52179||52181<=g&&g<=52207||52209<=g&&g<=52235||52237<=g&&g<=52263||52265<=g&&g<=52291||52293<=g&&g<=52319||52321<=g&&g<=52347||52349<=g&&g<=52375||52377<=g&&g<=52403||52405<=g&&g<=52431||52433<=g&&g<=52459||52461<=g&&g<=52487||52489<=g&&g<=52515||52517<=g&&g<=52543||52545<=g&&g<=52571||52573<=g&&g<=52599||52601<=g&&g<=52627||52629<=g&&g<=52655||52657<=g&&g<=52683||52685<=g&&g<=52711||52713<=g&&g<=52739||52741<=g&&g<=52767||52769<=g&&g<=52795||52797<=g&&g<=52823||52825<=g&&g<=52851||52853<=g&&g<=52879||52881<=g&&g<=52907||52909<=g&&g<=52935||52937<=g&&g<=52963||52965<=g&&g<=52991||52993<=g&&g<=53019||53021<=g&&g<=53047||53049<=g&&g<=53075||53077<=g&&g<=53103||53105<=g&&g<=53131||53133<=g&&g<=53159||53161<=g&&g<=53187||53189<=g&&g<=53215||53217<=g&&g<=53243||53245<=g&&g<=53271||53273<=g&&g<=53299||53301<=g&&g<=53327||53329<=g&&g<=53355||53357<=g&&g<=53383||53385<=g&&g<=53411||53413<=g&&g<=53439||53441<=g&&g<=53467||53469<=g&&g<=53495||53497<=g&&g<=53523||53525<=g&&g<=53551||53553<=g&&g<=53579||53581<=g&&g<=53607||53609<=g&&g<=53635||53637<=g&&g<=53663||53665<=g&&g<=53691||53693<=g&&g<=53719||53721<=g&&g<=53747||53749<=g&&g<=53775||53777<=g&&g<=53803||53805<=g&&g<=53831||53833<=g&&g<=53859||53861<=g&&g<=53887||53889<=g&&g<=53915||53917<=g&&g<=53943||53945<=g&&g<=53971||53973<=g&&g<=53999||54001<=g&&g<=54027||54029<=g&&g<=54055||54057<=g&&g<=54083||54085<=g&&g<=54111||54113<=g&&g<=54139||54141<=g&&g<=54167||54169<=g&&g<=54195||54197<=g&&g<=54223||54225<=g&&g<=54251||54253<=g&&g<=54279||54281<=g&&g<=54307||54309<=g&&g<=54335||54337<=g&&g<=54363||54365<=g&&g<=54391||54393<=g&&g<=54419||54421<=g&&g<=54447||54449<=g&&g<=54475||54477<=g&&g<=54503||54505<=g&&g<=54531||54533<=g&&g<=54559||54561<=g&&g<=54587||54589<=g&&g<=54615||54617<=g&&g<=54643||54645<=g&&g<=54671||54673<=g&&g<=54699||54701<=g&&g<=54727||54729<=g&&g<=54755||54757<=g&&g<=54783||54785<=g&&g<=54811||54813<=g&&g<=54839||54841<=g&&g<=54867||54869<=g&&g<=54895||54897<=g&&g<=54923||54925<=g&&g<=54951||54953<=g&&g<=54979||54981<=g&&g<=55007||55009<=g&&g<=55035||55037<=g&&g<=55063||55065<=g&&g<=55091||55093<=g&&g<=55119||55121<=g&&g<=55147||55149<=g&&g<=55175||55177<=g&&g<=55203?E:g==9757||g==9977||9994<=g&&g<=9997||g==127877||127938<=g&&g<=127940||g==127943||127946<=g&&g<=127948||128066<=g&&g<=128067||128070<=g&&g<=128080||g==128110||128112<=g&&g<=128120||g==128124||128129<=g&&g<=128131||128133<=g&&g<=128135||g==128170||128372<=g&&g<=128373||g==128378||g==128400||128405<=g&&g<=128406||128581<=g&&g<=128583||128587<=g&&g<=128591||g==128675||128692<=g&&g<=128694||g==128704||g==128716||129304<=g&&g<=129308||129310<=g&&g<=129311||g==129318||129328<=g&&g<=129337||129341<=g&&g<=129342||129489<=g&&g<=129501?P:127995<=g&&g<=127999?I:g==8205?R:g==9792||g==9794||9877<=g&&g<=9878||g==9992||g==10084||g==127752||g==127806||g==127859||g==127891||g==127908||g==127912||g==127979||g==127981||g==128139||128187<=g&&g<=128188||g==128295||g==128300||g==128488||g==128640||g==128658?N:128102<=g&&g<=128105?U:C}return this}typeof RT<\"u\"&&RT.exports&&(RT.exports=iit)});var Kpe=_((D4t,Jpe)=>{var sit=/^(.*?)(\\x1b\\[[^m]+m|\\x1b\\]8;;.*?(\\x1b\\\\|\\u0007))/,FT;function oit(){if(FT)return FT;if(typeof Intl.Segmenter<\"u\"){let t=new Intl.Segmenter(\"en\",{granularity:\"grapheme\"});return FT=e=>Array.from(t.segment(e),({segment:r})=>r)}else{let t=Vpe(),e=new t;return FT=r=>e.splitGraphemes(r)}}Jpe.exports=(t,e=0,r=t.length)=>{if(e<0||r<0)throw new RangeError(\"Negative indices aren't supported by this implementation\");let s=r-e,a=\"\",n=0,c=0;for(;t.length>0;){let f=t.match(sit)||[t,t,void 0],p=oit()(f[1]),h=Math.min(e-n,p.length);p=p.slice(h);let E=Math.min(s-c,p.length);a+=p.slice(0,E).join(\"\"),n+=h,c+=E,typeof f[2]<\"u\"&&(a+=f[2]),t=t.slice(f[0].length)}return a}});var fn,yv=Xe(()=>{fn=process.env.YARN_IS_TEST_ENV?\"0.0.0\":\"4.12.0\"});function the(t,{configuration:e,json:r}){if(!e.get(\"enableMessageNames\"))return\"\";let a=Yf(t===null?0:t);return!r&&t===null?Ht(e,a,\"grey\"):a}function Wj(t,{configuration:e,json:r}){let s=the(t,{configuration:e,json:r});if(!s||t===null||t===0)return s;let a=Br[t],n=`https://yarnpkg.com/advanced/error-codes#${s}---${a}`.toLowerCase();return KE(e,s,n)}async function SI({configuration:t,stdout:e,forceError:r},s){let a=await Ot.start({configuration:t,stdout:e,includeFooter:!1},async n=>{let c=!1,f=!1;for(let p of s)typeof p.option<\"u\"&&(p.error||r?(f=!0,n.reportError(50,p.message)):(c=!0,n.reportWarning(50,p.message)),p.callback?.());c&&!f&&n.reportSeparator()});return a.hasErrors()?a.exitCode():null}var $pe,NT,ait,zpe,Xpe,D0,ehe,Zpe,lit,cit,OT,uit,Ot,Ev=Xe(()=>{$pe=ut(Kpe()),NT=ut(Fd());Gx();Tc();yv();xc();ait=\"\\xB7\",zpe=[\"\\u280B\",\"\\u2819\",\"\\u2839\",\"\\u2838\",\"\\u283C\",\"\\u2834\",\"\\u2826\",\"\\u2827\",\"\\u2807\",\"\\u280F\"],Xpe=80,D0=NT.default.GITHUB_ACTIONS?{start:t=>`::group::${t}\n`,end:t=>`::endgroup::\n`}:NT.default.TRAVIS?{start:t=>`travis_fold:start:${t}\n`,end:t=>`travis_fold:end:${t}\n`}:NT.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\\W+/g,\"_\")}[collapsed=true]\\r\\x1B[0K${t}\n`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\\W+/g,\"_\")}\\r\\x1B[0K`}:null,ehe=D0!==null,Zpe=new Date,lit=[\"iTerm.app\",\"Apple_Terminal\",\"WarpTerminal\",\"vscode\"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,cit=t=>t,OT=cit({patrick:{date:[17,3],chars:[\"\\u{1F340}\",\"\\u{1F331}\"],size:40},simba:{date:[19,7],chars:[\"\\u{1F981}\",\"\\u{1F334}\"],size:40},jack:{date:[31,10],chars:[\"\\u{1F383}\",\"\\u{1F987}\"],size:40},hogsfather:{date:[31,12],chars:[\"\\u{1F389}\",\"\\u{1F384}\"],size:40},default:{chars:[\"=\",\"-\"],size:80}}),uit=lit&&Object.keys(OT).find(t=>{let e=OT[t];return!(e.date&&(e.date[0]!==Zpe.getDate()||e.date[1]!==Zpe.getMonth()+1))})||\"default\";Ot=class extends Ao{constructor({configuration:r,stdout:s,json:a=!1,forceSectionAlignment:n=!1,includeNames:c=!0,includePrefix:f=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:C=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(RB(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=c,this.includePrefix=f,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=C,this.json=a,this.stdout=s,r.get(\"enableProgressBars\")&&!a&&s.isTTY&&s.columns>22){let S=r.get(\"progressBarStyle\")||uit;if(!Object.hasOwn(OT,S))throw new Error(\"Assertion failed: Invalid progress bar style\");this.progressStyle=OT[S];let P=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*P/80)}}static async start(r,s){let a=new this(r),n=process.emitWarning;process.emitWarning=(c,f)=>{if(typeof c!=\"string\"){let h=c;c=h.message,f=f??h.name}let p=typeof f<\"u\"?`${f}: ${c}`:c;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,zd(r.configuration,`Yarn ${fn}`,2));try{await s(a)}catch(c){a.reportExceptionOnce(c)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let s=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,s-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}async startSectionPromise({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}startTimerImpl(r,s,a){return{cb:typeof s==\"function\"?s:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\\u250C ${r}`),this.indent+=1,D0!==null&&!this.json&&this.includeInfos&&this.stdout.write(D0.start(r))},reportFooter:f=>{if(this.indent-=1,D0!==null&&!this.json&&this.includeInfos){this.stdout.write(D0.end(r));for(let p of this.timerFooter)p()}this.configuration.get(\"enableTimers\")&&f>200?this.reportInfo(null,`\\u2514 Completed in ${Ht(this.configuration,f,ht.DURATION)}`):this.reportInfo(null,\"\\u2514 Completed\"),this.level-=1},skipIfEmpty:(typeof s==\"function\"?{}:s).skipIfEmpty}}startTimerSync(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionSync(c,n)}async startTimerPromise(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionPromise(c,n)}reportSeparator(){this.indent===0?this.writeLine(\"\"):this.reportInfo(null,\"\")}reportInfo(r,s){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:\"\",c=`${this.formatPrefix(n,\"blueBright\")}${s}`;this.json?this.reportJson({type:\"info\",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(c)}reportWarning(r,s){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:\"\";this.json?this.reportJson({type:\"warning\",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,\"yellowBright\")}${s}`)}reportError(r,s){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,s)),this.reportErrorImpl(r,s)}reportErrorImpl(r,s){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:\"\";this.json?this.reportJson({type:\"error\",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,\"redBright\")}${s}`,{truncate:!1})}reportFold(r,s){if(!D0)return;let a=`${D0.start(r)}${s}${D0.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)return{...Promise.resolve(),stop:()=>{}};if(r.hasProgress&&r.hasTitle)throw new Error(\"Unimplemented: Progress bars can't have both progress and titles.\");let s=!1,a=Promise.resolve().then(async()=>{let c={progress:r.hasProgress?0:void 0,title:r.hasTitle?\"\":void 0};this.progress.set(r,{definition:c,lastScaledSize:r.hasProgress?-1:void 0,lastTitle:void 0}),this.refreshProgress({delta:-1});for await(let{progress:f,title:p}of r)s||c.progress===f&&c.title===p||(c.progress=f,c.title=p,this.refreshProgress());n()}),n=()=>{s||(s=!0,this.progress.delete(r),this.refreshProgress({delta:1}))};return{...a,stop:n}}reportJson(r){this.json&&this.writeLine(`${JSON.stringify(r)}`)}async finalize(){if(!this.includeFooter)return;let r=\"\";this.errorCount>0?r=\"Failed with errors\":this.warningCount>0?r=\"Done with warnings\":r=\"Done\";let s=Ht(this.configuration,Date.now()-this.startTime,ht.DURATION),a=this.configuration.get(\"enableTimers\")?`${r} in ${s}`:r;this.errorCount>0?this.reportError(0,a):this.warningCount>0?this.reportWarning(0,a):this.reportInfo(0,a)}writeLine(r,{truncate:s}={}){this.clearProgress({clear:!0}),this.stdout.write(`${this.truncate(r,{truncate:s})}\n`),this.writeProgress()}writeLines(r,{truncate:s}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:s})}\n`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let s of r)s.committed=!0,s.action()}clearProgress({delta:r=0,clear:s=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\\x1B[${this.progress.size+r}A`),(r>0||s)&&this.stdout.write(\"\\x1B[0J\"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>Xpe&&(this.progressFrame=(this.progressFrame+1)%zpe.length,this.progressTime=r);let s=zpe[this.progressFrame];for(let a of this.progress.values()){let n=\"\";if(typeof a.lastScaledSize<\"u\"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let c=this.formatName(null),f=c?`${c}: `:\"\",p=a.definition.title?` ${a.definition.title}`:\"\";this.stdout.write(`${Ht(this.configuration,\"\\u27A4\",\"blueBright\")} ${f}${s}${n}${p}\n`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Xpe)}refreshProgress({delta:r=0,force:s=!1}={}){let a=!1,n=!1;if(s||this.progress.size===0)a=!0;else for(let c of this.progress.values()){let f=typeof c.definition.progress<\"u\"?Math.trunc(this.progressMaxScaledSize*c.definition.progress):void 0,p=c.lastScaledSize;c.lastScaledSize=f;let h=c.lastTitle;if(c.lastTitle=c.definition.title,f!==p||(n=h!==c.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:s}={}){return this.progressStyle===null&&(s=!1),typeof s>\"u\"&&(s=this.configuration.get(\"preferTruncatedLines\")),s&&(r=(0,$pe.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?the(r,{configuration:this.configuration,json:this.json}):\"\"}formatPrefix(r,s){return this.includePrefix?`${Ht(this.configuration,\"\\u27A4\",s)} ${r}${this.formatIndent()}`:\"\"}formatNameWithHyperlink(r){return this.includeNames?Wj(r,{configuration:this.configuration,json:this.json}):\"\"}formatIndent(){return this.level>0||!this.forceSectionAlignment?\"\\u2502 \".repeat(this.indent):`${ait} `}}});var In={};Vt(In,{PackageManager:()=>nhe,detectPackageManager:()=>ihe,executePackageAccessibleBinary:()=>che,executePackageScript:()=>LT,executePackageShellcode:()=>Yj,executeWorkspaceAccessibleBinary:()=>mit,executeWorkspaceLifecycleScript:()=>ahe,executeWorkspaceScript:()=>ohe,getPackageAccessibleBinaries:()=>MT,getWorkspaceAccessibleBinaries:()=>lhe,hasPackageScript:()=>hit,hasWorkspaceScript:()=>Vj,isNodeScript:()=>Jj,makeScriptEnv:()=>Iv,maybeExecuteWorkspaceLifecycleScript:()=>dit,prepareExternalProject:()=>pit});async function b0(t,e,r,s=[]){if(process.platform===\"win32\"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @\"${r}\" ${s.map(n=>`\"${n.replace('\"','\"\"')}\"`).join(\" \")} %*`;await ce.writeFilePromise(J.format({dir:t,name:e,ext:\".cmd\"}),a)}await ce.writeFilePromise(J.join(t,e),`#!/bin/sh\nexec \"${r}\" ${s.map(a=>`'${a.replace(/'/g,`'\"'\"'`)}'`).join(\" \")} \"$@\"\n`,{mode:493})}async function ihe(t){let e=await Ut.tryFind(t);if(e?.packageManager){let s=xQ(e.packageManager);if(s?.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=s.reference.split(\".\");switch(s.name){case\"yarn\":return{packageManagerField:!0,packageManager:Number(n)===1?\"Yarn Classic\":\"Yarn\",reason:a};case\"npm\":return{packageManagerField:!0,packageManager:\"npm\",reason:a};case\"pnpm\":return{packageManagerField:!0,packageManager:\"pnpm\",reason:a}}}}let r;try{r=await ce.readFilePromise(J.join(t,Er.lockfile),\"utf8\")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:\"Yarn\",reason:'\"__metadata\" key found in yarn.lock'}:{packageManager:\"Yarn Classic\",reason:'\"__metadata\" key not found in yarn.lock, must be a Yarn classic lockfile'}:ce.existsSync(J.join(t,\"package-lock.json\"))?{packageManager:\"npm\",reason:`found npm's \"package-lock.json\" lockfile`}:ce.existsSync(J.join(t,\"pnpm-lock.yaml\"))?{packageManager:\"pnpm\",reason:`found pnpm's \"pnpm-lock.yaml\" lockfile`}:null}async function Iv({project:t,locator:e,binFolder:r,ignoreCorepack:s,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let c={};for(let[E,C]of Object.entries(n))typeof C<\"u\"&&(c[E.toLowerCase()!==\"path\"?E:\"PATH\"]=C);let f=fe.fromPortablePath(r);c.BERRY_BIN_FOLDER=fe.fromPortablePath(f);let p=process.env.COREPACK_ROOT&&!s?fe.join(process.env.COREPACK_ROOT,\"dist/yarn.js\"):process.argv[1];if(await Promise.all([b0(r,\"node\",process.execPath),...fn!==null?[b0(r,\"run\",process.execPath,[p,\"run\"]),b0(r,\"yarn\",process.execPath,[p]),b0(r,\"yarnpkg\",process.execPath,[p]),b0(r,\"node-gyp\",process.execPath,[p,\"run\",\"--top-level\",\"node-gyp\"])]:[]]),t&&(c.INIT_CWD=fe.fromPortablePath(t.configuration.startingCwd),c.PROJECT_CWD=fe.fromPortablePath(t.cwd)),c.PATH=c.PATH?`${f}${fe.delimiter}${c.PATH}`:`${f}`,c.npm_execpath=`${f}${fe.sep}yarn`,c.npm_node_execpath=`${f}${fe.sep}node`,e){if(!t)throw new Error(\"Assertion failed: Missing project\");let E=t.tryWorkspaceByLocator(e),C=E?E.manifest.version??\"\":t.storedPackages.get(e.locatorHash).version??\"\";c.npm_package_name=un(e),c.npm_package_version=C;let S;if(E)S=E.cwd;else{let P=t.storedPackages.get(e.locatorHash);if(!P)throw new Error(`Package for ${Yr(t.configuration,e)} not found in the project`);let I=t.configuration.getLinkers(),R={project:t,report:new Ot({stdout:new P0.PassThrough,configuration:t.configuration})},N=I.find(U=>U.supportsPackage(P,R));if(!N)throw new Error(`The package ${Yr(t.configuration,P)} isn't supported by any of the available linkers`);S=await N.findPackageLocation(P,R)}c.npm_package_json=fe.fromPortablePath(J.join(S,Er.manifest))}let h=fn!==null?`yarn/${fn}`:`yarn/${Pp(\"@yarnpkg/core\").version}-core`;return c.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(c.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(E=>E.setupScriptEnvironment,t,c,async(E,C,S)=>await b0(r,E,C,S)),c}async function pit(t,e,{configuration:r,report:s,workspace:a=null,locator:n=null}){await Ait(async()=>{await ce.mktempPromise(async c=>{let f=J.join(c,\"pack.log\"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(f,{prefix:fe.fromPortablePath(t),report:s}),C=n&&Gu(n)?rI(n):n,S=C?ll(C):\"an external project\";h.write(`Packing ${S} from sources\n`);let P=await ihe(t),I;P!==null?(h.write(`Using ${P.packageManager} for bootstrap. Reason: ${P.reason}\n\n`),I=P.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn\n\n`),I=\"Yarn\");let R=I===\"Yarn\"&&!P?.packageManagerField;await ce.mktempPromise(async N=>{let U=await Iv({binFolder:N,ignoreCorepack:R,baseEnv:{...process.env,COREPACK_ENABLE_AUTO_PIN:\"0\"}}),ee=new Map([[\"Yarn Classic\",async()=>{let ue=a!==null?[\"workspace\",a]:[],le=J.join(t,Er.manifest),me=await ce.readFilePromise(le),pe=await Wu(process.execPath,[process.argv[1],\"set\",\"version\",\"classic\",\"--only-if-needed\",\"--yarn-path\"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(pe.code!==0)return pe.code;await ce.writeFilePromise(le,me),await ce.appendFilePromise(J.join(t,\".npmignore\"),`/.yarn\n`),h.write(`\n`),delete U.NODE_ENV;let Be=await Wu(\"yarn\",[\"install\"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(Be.code!==0)return Be.code;h.write(`\n`);let Ce=await Wu(\"yarn\",[...ue,\"pack\",\"--filename\",fe.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return Ce.code!==0?Ce.code:0}],[\"Yarn\",async()=>{let ue=a!==null?[\"workspace\",a]:[];U.YARN_ENABLE_INLINE_BUILDS=\"1\";let le=J.join(t,Er.lockfile);await ce.existsPromise(le)||await ce.writeFilePromise(le,\"\");let me=await Wu(\"yarn\",[...ue,\"pack\",\"--install-if-needed\",\"--filename\",fe.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return me.code!==0?me.code:0}],[\"npm\",async()=>{if(a!==null){let we=new P0.PassThrough,ye=WE(we);we.pipe(h,{end:!1});let Ae=await Wu(\"npm\",[\"--version\"],{cwd:t,env:U,stdin:p,stdout:we,stderr:E,end:0});if(we.end(),Ae.code!==0)return h.end(),E.end(),Ae.code;let se=(await ye).toString().trim();if(!Zf(se,\">=7.x\")){let Z=Da(null,\"npm\"),De=On(Z,se),Re=On(Z,\">=7.x\");throw new Error(`Workspaces aren't supported by ${ni(r,De)}; please upgrade to ${ni(r,Re)} (npm has been detected as the primary package manager for ${Ht(r,t,ht.PATH)})`)}}let ue=a!==null?[\"--workspace\",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let le=await Wu(\"npm\",[\"install\",\"--legacy-peer-deps\"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(le.code!==0)return le.code;let me=new P0.PassThrough,pe=WE(me);me.pipe(h);let Be=await Wu(\"npm\",[\"pack\",\"--silent\",...ue],{cwd:t,env:U,stdin:p,stdout:me,stderr:E});if(Be.code!==0)return Be.code;let Ce=(await pe).toString().trim().replace(/^.*\\n/s,\"\"),g=J.resolve(t,fe.toPortablePath(Ce));return await ce.renamePromise(g,e),0}]]).get(I);if(typeof ee>\"u\")throw new Error(\"Assertion failed: Unsupported workflow\");let ie=await ee();if(!(ie===0||typeof ie>\"u\"))throw ce.detachTemp(c),new jt(58,`Packing the package failed (exit code ${ie}, logs can be found here: ${Ht(r,f,ht.PATH)})`)})})})}async function hit(t,e,{project:r}){let s=r.tryWorkspaceByLocator(t);if(s!==null)return Vj(s,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r.configuration,t)} not found in the project`);return await $f.openPromise(async n=>{let c=r.configuration,f=r.configuration.getLinkers(),p={project:r,report:new Ot({stdout:new P0.PassThrough,configuration:c})},h=f.find(P=>P.supportsPackage(a,p));if(!h)throw new Error(`The package ${Yr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),C=new Sn(E,{baseFs:n});return(await Ut.find(vt.dot,{baseFs:C})).scripts.has(e)})}async function LT(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await ce.mktempPromise(async p=>{let{manifest:h,env:E,cwd:C}=await she(t,{project:a,binFolder:p,cwd:s,lifecycleScript:e}),S=h.scripts.get(e);if(typeof S>\"u\")return 1;let P=async()=>await vI(S,r,{cwd:C,env:E,stdin:n,stdout:c,stderr:f});return await(await a.configuration.reduceHook(R=>R.wrapScriptExecution,P,a,t,e,{script:S,args:r,cwd:C,env:E,stdin:n,stdout:c,stderr:f}))()})}async function Yj(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await ce.mktempPromise(async p=>{let{env:h,cwd:E}=await she(t,{project:a,binFolder:p,cwd:s});return await vI(e,r,{cwd:E,env:h,stdin:n,stdout:c,stderr:f})})}async function git(t,{binFolder:e,cwd:r,lifecycleScript:s}){let a=await Iv({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:s});return await Kj(e,await lhe(t)),typeof r>\"u\"&&(r=J.dirname(await ce.realpathPromise(J.join(t.cwd,\"package.json\")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function she(t,{project:e,binFolder:r,cwd:s,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return git(n,{binFolder:r,cwd:s,lifecycleScript:a});let c=e.storedPackages.get(t.locatorHash);if(!c)throw new Error(`Package for ${Yr(e.configuration,t)} not found in the project`);return await $f.openPromise(async f=>{let p=e.configuration,h=e.configuration.getLinkers(),E={project:e,report:new Ot({stdout:new P0.PassThrough,configuration:p})},C=h.find(N=>N.supportsPackage(c,E));if(!C)throw new Error(`The package ${Yr(e.configuration,c)} isn't supported by any of the available linkers`);let S=await Iv({project:e,locator:t,binFolder:r,lifecycleScript:a});await Kj(r,await MT(t,{project:e}));let P=await C.findPackageLocation(c,E),I=new Sn(P,{baseFs:f}),R=await Ut.find(vt.dot,{baseFs:I});return typeof s>\"u\"&&(s=P),{manifest:R,binFolder:r,env:S,cwd:s}})}async function ohe(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c}){return await LT(t.anchoredLocator,e,r,{cwd:s,project:t.project,stdin:a,stdout:n,stderr:c})}function Vj(t,e){return t.manifest.scripts.has(e)}async function ahe(t,e,{cwd:r,report:s}){let{configuration:a}=t.project,n=null;await ce.mktempPromise(async c=>{let f=J.join(c,`${e}.log`),p=`# This file contains the result of Yarn calling the \"${e}\" lifecycle script inside a workspace (\"${fe.fromPortablePath(t.cwd)}\")\n`,{stdout:h,stderr:E}=a.getSubprocessStreams(f,{report:s,prefix:Yr(a,t.anchoredLocator),header:p});s.reportInfo(36,`Calling the \"${e}\" lifecycle script`);let C=await ohe(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),C!==0)throw ce.detachTemp(c),new jt(36,`${bB(e)} script failed (exit code ${Ht(a,C,ht.NUMBER)}, logs can be found here: ${Ht(a,f,ht.PATH)}); run ${Ht(a,`yarn ${e}`,ht.CODE)} to investigate`)})}async function dit(t,e,r){Vj(t,e)&&await ahe(t,e,r)}function Jj(t){let e=J.extname(t);if(e.match(/\\.[cm]?[jt]sx?$/))return!0;if(e===\".exe\"||e===\".bin\")return!1;let r=Buffer.alloc(4),s;try{s=ce.openSync(t,\"r\")}catch{return!0}try{ce.readSync(s,r,0,r.length,0)}finally{ce.closeSync(s)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function MT(t,{project:e}){let r=e.configuration,s=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r,t)} not found in the project`);let n=new P0.Writable,c=r.getLinkers(),f={project:e,report:new Ot({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let E of a.dependencies.values()){let C=e.storedResolutions.get(E.descriptorHash);if(!C)throw new Error(`Assertion failed: The resolution (${ni(r,E)}) should have been registered`);p.add(C)}let h=await Promise.all(Array.from(p,async E=>{let C=e.storedPackages.get(E);if(!C)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(C.bin.size===0)return Wl.skip;let S=c.find(I=>I.supportsPackage(C,f));if(!S)return Wl.skip;let P=null;try{P=await S.findPackageLocation(C,f)}catch(I){if(I.code===\"LOCATOR_NOT_INSTALLED\")return Wl.skip;throw I}return{dependency:C,packageLocation:P}}));for(let E of h){if(E===Wl.skip)continue;let{dependency:C,packageLocation:S}=E;for(let[P,I]of C.bin){let R=J.resolve(S,I);s.set(P,[C,fe.fromPortablePath(R),Jj(R)])}}return s}async function lhe(t){return await MT(t.anchoredLocator,{project:t.project})}async function Kj(t,e){await Promise.all(Array.from(e,([r,[,s,a]])=>a?b0(t,r,process.execPath,[s]):b0(t,r,s,[])))}async function che(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await MT(t,{project:a});let E=h.get(e);if(!E)throw new Error(`Binary not found (${e}) for ${Yr(a.configuration,t)}`);return await ce.mktempPromise(async C=>{let[,S]=E,P=await Iv({project:a,locator:t,binFolder:C});await Kj(P.BERRY_BIN_FOLDER,h);let I=Jj(fe.toPortablePath(S))?Wu(process.execPath,[...p,S,...r],{cwd:s,env:P,stdin:n,stdout:c,stderr:f}):Wu(S,r,{cwd:s,env:P,stdin:n,stdout:c,stderr:f}),R;try{R=await I}finally{await ce.removePromise(P.BERRY_BIN_FOLDER)}return R.code})}async function mit(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f}){return await che(t.anchoredLocator,e,r,{project:t.project,cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f})}var rhe,P0,nhe,fit,Ait,zj=Xe(()=>{Dt();Dt();eA();pv();ql();rhe=ut(Ld()),P0=Ie(\"stream\");oI();Tc();Ev();yv();dT();xc();Pc();Rp();Wo();nhe=(a=>(a.Yarn1=\"Yarn Classic\",a.Yarn2=\"Yarn\",a.Npm=\"npm\",a.Pnpm=\"pnpm\",a))(nhe||{});fit=2,Ait=(0,rhe.default)(fit)});var DI=_((J4t,fhe)=>{\"use strict\";var uhe=new Map([[\"C\",\"cwd\"],[\"f\",\"file\"],[\"z\",\"gzip\"],[\"P\",\"preservePaths\"],[\"U\",\"unlink\"],[\"strip-components\",\"strip\"],[\"stripComponents\",\"strip\"],[\"keep-newer\",\"newer\"],[\"keepNewer\",\"newer\"],[\"keep-newer-files\",\"newer\"],[\"keepNewerFiles\",\"newer\"],[\"k\",\"keep\"],[\"keep-existing\",\"keep\"],[\"keepExisting\",\"keep\"],[\"m\",\"noMtime\"],[\"no-mtime\",\"noMtime\"],[\"p\",\"preserveOwner\"],[\"L\",\"follow\"],[\"h\",\"follow\"]]);fhe.exports=t=>t?Object.keys(t).map(e=>[uhe.has(e)?uhe.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var PI=_((K4t,Ihe)=>{\"use strict\";var Ahe=typeof process==\"object\"&&process?process:{stdout:null,stderr:null},yit=Ie(\"events\"),phe=Ie(\"stream\"),hhe=Ie(\"string_decoder\").StringDecoder,_p=Symbol(\"EOF\"),Hp=Symbol(\"maybeEmitEnd\"),x0=Symbol(\"emittedEnd\"),UT=Symbol(\"emittingEnd\"),Cv=Symbol(\"emittedError\"),_T=Symbol(\"closed\"),ghe=Symbol(\"read\"),HT=Symbol(\"flush\"),dhe=Symbol(\"flushChunk\"),ul=Symbol(\"encoding\"),jp=Symbol(\"decoder\"),jT=Symbol(\"flowing\"),wv=Symbol(\"paused\"),bI=Symbol(\"resume\"),Ys=Symbol(\"bufferLength\"),Xj=Symbol(\"bufferPush\"),Zj=Symbol(\"bufferShift\"),Ko=Symbol(\"objectMode\"),zo=Symbol(\"destroyed\"),$j=Symbol(\"emitData\"),mhe=Symbol(\"emitEnd\"),e6=Symbol(\"emitEnd2\"),Gp=Symbol(\"async\"),Bv=t=>Promise.resolve().then(t),yhe=global._MP_NO_ITERATOR_SYMBOLS_!==\"1\",Eit=yhe&&Symbol.asyncIterator||Symbol(\"asyncIterator not implemented\"),Iit=yhe&&Symbol.iterator||Symbol(\"iterator not implemented\"),Cit=t=>t===\"end\"||t===\"finish\"||t===\"prefinish\",wit=t=>t instanceof ArrayBuffer||typeof t==\"object\"&&t.constructor&&t.constructor.name===\"ArrayBuffer\"&&t.byteLength>=0,Bit=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),GT=class{constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[bI](),r.on(\"drain\",this.ondrain)}unpipe(){this.dest.removeListener(\"drain\",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},t6=class extends GT{unpipe(){this.src.removeListener(\"error\",this.proxyErrors),super.unpipe()}constructor(e,r,s){super(e,r,s),this.proxyErrors=a=>r.emit(\"error\",a),e.on(\"error\",this.proxyErrors)}};Ihe.exports=class Ehe extends phe{constructor(e){super(),this[jT]=!1,this[wv]=!1,this.pipes=[],this.buffer=[],this[Ko]=e&&e.objectMode||!1,this[Ko]?this[ul]=null:this[ul]=e&&e.encoding||null,this[ul]===\"buffer\"&&(this[ul]=null),this[Gp]=e&&!!e.async||!1,this[jp]=this[ul]?new hhe(this[ul]):null,this[_p]=!1,this[x0]=!1,this[UT]=!1,this[_T]=!1,this[Cv]=null,this.writable=!0,this.readable=!0,this[Ys]=0,this[zo]=!1}get bufferLength(){return this[Ys]}get encoding(){return this[ul]}set encoding(e){if(this[Ko])throw new Error(\"cannot set encoding in objectMode\");if(this[ul]&&e!==this[ul]&&(this[jp]&&this[jp].lastNeed||this[Ys]))throw new Error(\"cannot change encoding\");this[ul]!==e&&(this[jp]=e?new hhe(e):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[jp].write(r)))),this[ul]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Ko]}set objectMode(e){this[Ko]=this[Ko]||!!e}get async(){return this[Gp]}set async(e){this[Gp]=this[Gp]||!!e}write(e,r,s){if(this[_p])throw new Error(\"write after end\");if(this[zo])return this.emit(\"error\",Object.assign(new Error(\"Cannot call write after a stream was destroyed\"),{code:\"ERR_STREAM_DESTROYED\"})),!0;typeof r==\"function\"&&(s=r,r=\"utf8\"),r||(r=\"utf8\");let a=this[Gp]?Bv:n=>n();return!this[Ko]&&!Buffer.isBuffer(e)&&(Bit(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):wit(e)?e=Buffer.from(e):typeof e!=\"string\"&&(this.objectMode=!0)),this[Ko]?(this.flowing&&this[Ys]!==0&&this[HT](!0),this.flowing?this.emit(\"data\",e):this[Xj](e),this[Ys]!==0&&this.emit(\"readable\"),s&&a(s),this.flowing):e.length?(typeof e==\"string\"&&!(r===this[ul]&&!this[jp].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[ul]&&(e=this[jp].write(e)),this.flowing&&this[Ys]!==0&&this[HT](!0),this.flowing?this.emit(\"data\",e):this[Xj](e),this[Ys]!==0&&this.emit(\"readable\"),s&&a(s),this.flowing):(this[Ys]!==0&&this.emit(\"readable\"),s&&a(s),this.flowing)}read(e){if(this[zo])return null;if(this[Ys]===0||e===0||e>this[Ys])return this[Hp](),null;this[Ko]&&(e=null),this.buffer.length>1&&!this[Ko]&&(this.encoding?this.buffer=[this.buffer.join(\"\")]:this.buffer=[Buffer.concat(this.buffer,this[Ys])]);let r=this[ghe](e||null,this.buffer[0]);return this[Hp](),r}[ghe](e,r){return e===r.length||e===null?this[Zj]():(this.buffer[0]=r.slice(e),r=r.slice(0,e),this[Ys]-=e),this.emit(\"data\",r),!this.buffer.length&&!this[_p]&&this.emit(\"drain\"),r}end(e,r,s){return typeof e==\"function\"&&(s=e,e=null),typeof r==\"function\"&&(s=r,r=\"utf8\"),e&&this.write(e,r),s&&this.once(\"end\",s),this[_p]=!0,this.writable=!1,(this.flowing||!this[wv])&&this[Hp](),this}[bI](){this[zo]||(this[wv]=!1,this[jT]=!0,this.emit(\"resume\"),this.buffer.length?this[HT]():this[_p]?this[Hp]():this.emit(\"drain\"))}resume(){return this[bI]()}pause(){this[jT]=!1,this[wv]=!0}get destroyed(){return this[zo]}get flowing(){return this[jT]}get paused(){return this[wv]}[Xj](e){this[Ko]?this[Ys]+=1:this[Ys]+=e.length,this.buffer.push(e)}[Zj](){return this.buffer.length&&(this[Ko]?this[Ys]-=1:this[Ys]-=this.buffer[0].length),this.buffer.shift()}[HT](e){do;while(this[dhe](this[Zj]()));!e&&!this.buffer.length&&!this[_p]&&this.emit(\"drain\")}[dhe](e){return e?(this.emit(\"data\",e),this.flowing):!1}pipe(e,r){if(this[zo])return;let s=this[x0];return r=r||{},e===Ahe.stdout||e===Ahe.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,s?r.end&&e.end():(this.pipes.push(r.proxyErrors?new t6(this,e,r):new GT(this,e,r)),this[Gp]?Bv(()=>this[bI]()):this[bI]()),e}unpipe(e){let r=this.pipes.find(s=>s.dest===e);r&&(this.pipes.splice(this.pipes.indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let s=super.on(e,r);return e===\"data\"&&!this.pipes.length&&!this.flowing?this[bI]():e===\"readable\"&&this[Ys]!==0?super.emit(\"readable\"):Cit(e)&&this[x0]?(super.emit(e),this.removeAllListeners(e)):e===\"error\"&&this[Cv]&&(this[Gp]?Bv(()=>r.call(this,this[Cv])):r.call(this,this[Cv])),s}get emittedEnd(){return this[x0]}[Hp](){!this[UT]&&!this[x0]&&!this[zo]&&this.buffer.length===0&&this[_p]&&(this[UT]=!0,this.emit(\"end\"),this.emit(\"prefinish\"),this.emit(\"finish\"),this[_T]&&this.emit(\"close\"),this[UT]=!1)}emit(e,r,...s){if(e!==\"error\"&&e!==\"close\"&&e!==zo&&this[zo])return;if(e===\"data\")return r?this[Gp]?Bv(()=>this[$j](r)):this[$j](r):!1;if(e===\"end\")return this[mhe]();if(e===\"close\"){if(this[_T]=!0,!this[x0]&&!this[zo])return;let n=super.emit(\"close\");return this.removeAllListeners(\"close\"),n}else if(e===\"error\"){this[Cv]=r;let n=super.emit(\"error\",r);return this[Hp](),n}else if(e===\"resume\"){let n=super.emit(\"resume\");return this[Hp](),n}else if(e===\"finish\"||e===\"prefinish\"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,r,...s);return this[Hp](),a}[$j](e){for(let s of this.pipes)s.dest.write(e)===!1&&this.pause();let r=super.emit(\"data\",e);return this[Hp](),r}[mhe](){this[x0]||(this[x0]=!0,this.readable=!1,this[Gp]?Bv(()=>this[e6]()):this[e6]())}[e6](){if(this[jp]){let r=this[jp].end();if(r){for(let s of this.pipes)s.dest.write(r);super.emit(\"data\",r)}}for(let r of this.pipes)r.end();let e=super.emit(\"end\");return this.removeAllListeners(\"end\"),e}collect(){let e=[];this[Ko]||(e.dataLength=0);let r=this.promise();return this.on(\"data\",s=>{e.push(s),this[Ko]||(e.dataLength+=s.length)}),r.then(()=>e)}concat(){return this[Ko]?Promise.reject(new Error(\"cannot concat in objectMode\")):this.collect().then(e=>this[Ko]?Promise.reject(new Error(\"cannot concat in objectMode\")):this[ul]?e.join(\"\"):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(zo,()=>r(new Error(\"stream destroyed\"))),this.on(\"error\",s=>r(s)),this.on(\"end\",()=>e())})}[Eit](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[_p])return Promise.resolve({done:!0});let s=null,a=null,n=h=>{this.removeListener(\"data\",c),this.removeListener(\"end\",f),a(h)},c=h=>{this.removeListener(\"error\",n),this.removeListener(\"end\",f),this.pause(),s({value:h,done:!!this[_p]})},f=()=>{this.removeListener(\"error\",n),this.removeListener(\"data\",c),s({done:!0})},p=()=>n(new Error(\"stream destroyed\"));return new Promise((h,E)=>{a=E,s=h,this.once(zo,p),this.once(\"error\",n),this.once(\"end\",f),this.once(\"data\",c)})}}}[Iit](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[zo]?(e?this.emit(\"error\",e):this.emit(zo),this):(this[zo]=!0,this.buffer.length=0,this[Ys]=0,typeof this.close==\"function\"&&!this[_T]&&this.close(),e?this.emit(\"error\",e):this.emit(zo),this)}static isStream(e){return!!e&&(e instanceof Ehe||e instanceof phe||e instanceof yit&&(typeof e.pipe==\"function\"||typeof e.write==\"function\"&&typeof e.end==\"function\"))}}});var whe=_((z4t,Che)=>{var vit=Ie(\"zlib\").constants||{ZLIB_VERNUM:4736};Che.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},vit))});var m6=_(Kl=>{\"use strict\";var o6=Ie(\"assert\"),k0=Ie(\"buffer\").Buffer,She=Ie(\"zlib\"),fm=Kl.constants=whe(),Sit=PI(),Bhe=k0.concat,Am=Symbol(\"_superWrite\"),kI=class extends Error{constructor(e){super(\"zlib: \"+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code=\"ZLIB_ERROR\"),this.message=\"zlib: \"+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return\"ZlibError\"}},Dit=Symbol(\"opts\"),vv=Symbol(\"flushFlag\"),vhe=Symbol(\"finishFlushFlag\"),d6=Symbol(\"fullFlushFlag\"),Ii=Symbol(\"handle\"),qT=Symbol(\"onError\"),xI=Symbol(\"sawError\"),r6=Symbol(\"level\"),n6=Symbol(\"strategy\"),i6=Symbol(\"ended\"),X4t=Symbol(\"_defaultFullFlush\"),WT=class extends Sit{constructor(e,r){if(!e||typeof e!=\"object\")throw new TypeError(\"invalid options for ZlibBase constructor\");super(e),this[xI]=!1,this[i6]=!1,this[Dit]=e,this[vv]=e.flush,this[vhe]=e.finishFlush;try{this[Ii]=new She[r](e)}catch(s){throw new kI(s)}this[qT]=s=>{this[xI]||(this[xI]=!0,this.close(),this.emit(\"error\",s))},this[Ii].on(\"error\",s=>this[qT](new kI(s))),this.once(\"end\",()=>this.close)}close(){this[Ii]&&(this[Ii].close(),this[Ii]=null,this.emit(\"close\"))}reset(){if(!this[xI])return o6(this[Ii],\"zlib binding closed\"),this[Ii].reset()}flush(e){this.ended||(typeof e!=\"number\"&&(e=this[d6]),this.write(Object.assign(k0.alloc(0),{[vv]:e})))}end(e,r,s){return e&&this.write(e,r),this.flush(this[vhe]),this[i6]=!0,super.end(null,null,s)}get ended(){return this[i6]}write(e,r,s){if(typeof r==\"function\"&&(s=r,r=\"utf8\"),typeof e==\"string\"&&(e=k0.from(e,r)),this[xI])return;o6(this[Ii],\"zlib binding closed\");let a=this[Ii]._handle,n=a.close;a.close=()=>{};let c=this[Ii].close;this[Ii].close=()=>{},k0.concat=h=>h;let f;try{let h=typeof e[vv]==\"number\"?e[vv]:this[vv];f=this[Ii]._processChunk(e,h),k0.concat=Bhe}catch(h){k0.concat=Bhe,this[qT](new kI(h))}finally{this[Ii]&&(this[Ii]._handle=a,a.close=n,this[Ii].close=c,this[Ii].removeAllListeners(\"error\"))}this[Ii]&&this[Ii].on(\"error\",h=>this[qT](new kI(h)));let p;if(f)if(Array.isArray(f)&&f.length>0){p=this[Am](k0.from(f[0]));for(let h=1;h<f.length;h++)p=this[Am](f[h])}else p=this[Am](k0.from(f));return s&&s(),p}[Am](e){return super.write(e)}},qp=class extends WT{constructor(e,r){e=e||{},e.flush=e.flush||fm.Z_NO_FLUSH,e.finishFlush=e.finishFlush||fm.Z_FINISH,super(e,r),this[d6]=fm.Z_FULL_FLUSH,this[r6]=e.level,this[n6]=e.strategy}params(e,r){if(!this[xI]){if(!this[Ii])throw new Error(\"cannot switch params when binding is closed\");if(!this[Ii].params)throw new Error(\"not supported in this implementation\");if(this[r6]!==e||this[n6]!==r){this.flush(fm.Z_SYNC_FLUSH),o6(this[Ii],\"zlib binding closed\");let s=this[Ii].flush;this[Ii].flush=(a,n)=>{this.flush(a),n()};try{this[Ii].params(e,r)}finally{this[Ii].flush=s}this[Ii]&&(this[r6]=e,this[n6]=r)}}}},a6=class extends qp{constructor(e){super(e,\"Deflate\")}},l6=class extends qp{constructor(e){super(e,\"Inflate\")}},s6=Symbol(\"_portable\"),c6=class extends qp{constructor(e){super(e,\"Gzip\"),this[s6]=e&&!!e.portable}[Am](e){return this[s6]?(this[s6]=!1,e[9]=255,super[Am](e)):super[Am](e)}},u6=class extends qp{constructor(e){super(e,\"Gunzip\")}},f6=class extends qp{constructor(e){super(e,\"DeflateRaw\")}},A6=class extends qp{constructor(e){super(e,\"InflateRaw\")}},p6=class extends qp{constructor(e){super(e,\"Unzip\")}},YT=class extends WT{constructor(e,r){e=e||{},e.flush=e.flush||fm.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||fm.BROTLI_OPERATION_FINISH,super(e,r),this[d6]=fm.BROTLI_OPERATION_FLUSH}},h6=class extends YT{constructor(e){super(e,\"BrotliCompress\")}},g6=class extends YT{constructor(e){super(e,\"BrotliDecompress\")}};Kl.Deflate=a6;Kl.Inflate=l6;Kl.Gzip=c6;Kl.Gunzip=u6;Kl.DeflateRaw=f6;Kl.InflateRaw=A6;Kl.Unzip=p6;typeof She.BrotliCompress==\"function\"?(Kl.BrotliCompress=h6,Kl.BrotliDecompress=g6):Kl.BrotliCompress=Kl.BrotliDecompress=class{constructor(){throw new Error(\"Brotli is not supported in this version of Node.js\")}}});var QI=_((e3t,Dhe)=>{var bit=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;Dhe.exports=bit!==\"win32\"?t=>t:t=>t&&t.replace(/\\\\/g,\"/\")});var VT=_((r3t,bhe)=>{\"use strict\";var Pit=PI(),y6=QI(),E6=Symbol(\"slurp\");bhe.exports=class extends Pit{constructor(e,r,s){switch(super(),this.pause(),this.extended=r,this.globalExtended=s,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case\"File\":case\"OldFile\":case\"Link\":case\"SymbolicLink\":case\"CharacterDevice\":case\"BlockDevice\":case\"Directory\":case\"FIFO\":case\"ContiguousFile\":case\"GNUDumpDir\":break;case\"NextFileHasLongLinkpath\":case\"NextFileHasLongPath\":case\"OldGnuLongPath\":case\"GlobalExtendedHeader\":case\"ExtendedHeader\":case\"OldExtendedHeader\":this.meta=!0;break;default:this.ignore=!0}this.path=y6(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=y6(e.linkpath),this.uname=e.uname,this.gname=e.gname,r&&this[E6](r),s&&this[E6](s,!0)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error(\"writing more to entry than is appropriate\");let s=this.remain,a=this.blockRemain;return this.remain=Math.max(0,s-r),this.blockRemain=Math.max(0,a-r),this.ignore?!0:s>=r?super.write(e):super.write(e.slice(0,s))}[E6](e,r){for(let s in e)e[s]!==null&&e[s]!==void 0&&!(r&&s===\"path\")&&(this[s]=s===\"path\"||s===\"linkpath\"?y6(e[s]):e[s])}}});var I6=_(JT=>{\"use strict\";JT.name=new Map([[\"0\",\"File\"],[\"\",\"OldFile\"],[\"1\",\"Link\"],[\"2\",\"SymbolicLink\"],[\"3\",\"CharacterDevice\"],[\"4\",\"BlockDevice\"],[\"5\",\"Directory\"],[\"6\",\"FIFO\"],[\"7\",\"ContiguousFile\"],[\"g\",\"GlobalExtendedHeader\"],[\"x\",\"ExtendedHeader\"],[\"A\",\"SolarisACL\"],[\"D\",\"GNUDumpDir\"],[\"I\",\"Inode\"],[\"K\",\"NextFileHasLongLinkpath\"],[\"L\",\"NextFileHasLongPath\"],[\"M\",\"ContinuationFile\"],[\"N\",\"OldGnuLongPath\"],[\"S\",\"SparseFile\"],[\"V\",\"TapeVolumeHeader\"],[\"X\",\"OldExtendedHeader\"]]);JT.code=new Map(Array.from(JT.name).map(t=>[t[1],t[0]]))});var Qhe=_((i3t,khe)=>{\"use strict\";var xit=(t,e)=>{if(Number.isSafeInteger(t))t<0?Qit(t,e):kit(t,e);else throw Error(\"cannot encode number outside of javascript safe integer range\");return e},kit=(t,e)=>{e[0]=128;for(var r=e.length;r>1;r--)e[r-1]=t&255,t=Math.floor(t/256)},Qit=(t,e)=>{e[0]=255;var r=!1;t=t*-1;for(var s=e.length;s>1;s--){var a=t&255;t=Math.floor(t/256),r?e[s-1]=Phe(a):a===0?e[s-1]=0:(r=!0,e[s-1]=xhe(a))}},Tit=t=>{let e=t[0],r=e===128?Fit(t.slice(1,t.length)):e===255?Rit(t):null;if(r===null)throw Error(\"invalid base256 encoding\");if(!Number.isSafeInteger(r))throw Error(\"parsed number outside of javascript safe integer range\");return r},Rit=t=>{for(var e=t.length,r=0,s=!1,a=e-1;a>-1;a--){var n=t[a],c;s?c=Phe(n):n===0?c=n:(s=!0,c=xhe(n)),c!==0&&(r-=c*Math.pow(256,e-a-1))}return r},Fit=t=>{for(var e=t.length,r=0,s=e-1;s>-1;s--){var a=t[s];a!==0&&(r+=a*Math.pow(256,e-s-1))}return r},Phe=t=>(255^t)&255,xhe=t=>(255^t)+1&255;khe.exports={encode:xit,parse:Tit}});var RI=_((s3t,Rhe)=>{\"use strict\";var C6=I6(),TI=Ie(\"path\").posix,The=Qhe(),w6=Symbol(\"slurp\"),zl=Symbol(\"type\"),S6=class{constructor(e,r,s,a){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[zl]=\"0\",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,r||0,s,a):e&&this.set(e)}decode(e,r,s,a){if(r||(r=0),!e||!(e.length>=r+512))throw new Error(\"need 512 bytes for header\");if(this.path=pm(e,r,100),this.mode=Q0(e,r+100,8),this.uid=Q0(e,r+108,8),this.gid=Q0(e,r+116,8),this.size=Q0(e,r+124,12),this.mtime=B6(e,r+136,12),this.cksum=Q0(e,r+148,12),this[w6](s),this[w6](a,!0),this[zl]=pm(e,r+156,1),this[zl]===\"\"&&(this[zl]=\"0\"),this[zl]===\"0\"&&this.path.substr(-1)===\"/\"&&(this[zl]=\"5\"),this[zl]===\"5\"&&(this.size=0),this.linkpath=pm(e,r+157,100),e.slice(r+257,r+265).toString()===\"ustar\\x0000\")if(this.uname=pm(e,r+265,32),this.gname=pm(e,r+297,32),this.devmaj=Q0(e,r+329,8),this.devmin=Q0(e,r+337,8),e[r+475]!==0){let c=pm(e,r+345,155);this.path=c+\"/\"+this.path}else{let c=pm(e,r+345,130);c&&(this.path=c+\"/\"+this.path),this.atime=B6(e,r+476,12),this.ctime=B6(e,r+488,12)}let n=8*32;for(let c=r;c<r+148;c++)n+=e[c];for(let c=r+156;c<r+512;c++)n+=e[c];this.cksumValid=n===this.cksum,this.cksum===null&&n===8*32&&(this.nullBlock=!0)}[w6](e,r){for(let s in e)e[s]!==null&&e[s]!==void 0&&!(r&&s===\"path\")&&(this[s]=e[s])}encode(e,r){if(e||(e=this.block=Buffer.alloc(512),r=0),r||(r=0),!(e.length>=r+512))throw new Error(\"need 512 bytes for header\");let s=this.ctime||this.atime?130:155,a=Nit(this.path||\"\",s),n=a[0],c=a[1];this.needPax=a[2],this.needPax=hm(e,r,100,n)||this.needPax,this.needPax=T0(e,r+100,8,this.mode)||this.needPax,this.needPax=T0(e,r+108,8,this.uid)||this.needPax,this.needPax=T0(e,r+116,8,this.gid)||this.needPax,this.needPax=T0(e,r+124,12,this.size)||this.needPax,this.needPax=v6(e,r+136,12,this.mtime)||this.needPax,e[r+156]=this[zl].charCodeAt(0),this.needPax=hm(e,r+157,100,this.linkpath)||this.needPax,e.write(\"ustar\\x0000\",r+257,8),this.needPax=hm(e,r+265,32,this.uname)||this.needPax,this.needPax=hm(e,r+297,32,this.gname)||this.needPax,this.needPax=T0(e,r+329,8,this.devmaj)||this.needPax,this.needPax=T0(e,r+337,8,this.devmin)||this.needPax,this.needPax=hm(e,r+345,s,c)||this.needPax,e[r+475]!==0?this.needPax=hm(e,r+345,155,c)||this.needPax:(this.needPax=hm(e,r+345,130,c)||this.needPax,this.needPax=v6(e,r+476,12,this.atime)||this.needPax,this.needPax=v6(e,r+488,12,this.ctime)||this.needPax);let f=8*32;for(let p=r;p<r+148;p++)f+=e[p];for(let p=r+156;p<r+512;p++)f+=e[p];return this.cksum=f,T0(e,r+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(e){for(let r in e)e[r]!==null&&e[r]!==void 0&&(this[r]=e[r])}get type(){return C6.name.get(this[zl])||this[zl]}get typeKey(){return this[zl]}set type(e){C6.code.has(e)?this[zl]=C6.code.get(e):this[zl]=e}},Nit=(t,e)=>{let s=t,a=\"\",n,c=TI.parse(t).root||\".\";if(Buffer.byteLength(s)<100)n=[s,a,!1];else{a=TI.dirname(s),s=TI.basename(s);do Buffer.byteLength(s)<=100&&Buffer.byteLength(a)<=e?n=[s,a,!1]:Buffer.byteLength(s)>100&&Buffer.byteLength(a)<=e?n=[s.substr(0,99),a,!0]:(s=TI.join(TI.basename(a),s),a=TI.dirname(a));while(a!==c&&!n);n||(n=[t.substr(0,99),\"\",!0])}return n},pm=(t,e,r)=>t.slice(e,e+r).toString(\"utf8\").replace(/\\0.*/,\"\"),B6=(t,e,r)=>Oit(Q0(t,e,r)),Oit=t=>t===null?null:new Date(t*1e3),Q0=(t,e,r)=>t[e]&128?The.parse(t.slice(e,e+r)):Mit(t,e,r),Lit=t=>isNaN(t)?null:t,Mit=(t,e,r)=>Lit(parseInt(t.slice(e,e+r).toString(\"utf8\").replace(/\\0.*$/,\"\").trim(),8)),Uit={12:8589934591,8:2097151},T0=(t,e,r,s)=>s===null?!1:s>Uit[r]||s<0?(The.encode(s,t.slice(e,e+r)),!0):(_it(t,e,r,s),!1),_it=(t,e,r,s)=>t.write(Hit(s,r),e,r,\"ascii\"),Hit=(t,e)=>jit(Math.floor(t).toString(8),e),jit=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join(\"0\")+t+\" \")+\"\\0\",v6=(t,e,r,s)=>s===null?!1:T0(t,e,r,s.getTime()/1e3),Git=new Array(156).join(\"\\0\"),hm=(t,e,r,s)=>s===null?!1:(t.write(s+Git,e,r,\"utf8\"),s.length!==Buffer.byteLength(s)||s.length>r);Rhe.exports=S6});var KT=_((o3t,Fhe)=>{\"use strict\";var qit=RI(),Wit=Ie(\"path\"),Sv=class{constructor(e,r){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=r||!1}encode(){let e=this.encodeBody();if(e===\"\")return null;let r=Buffer.byteLength(e),s=512*Math.ceil(1+r/512),a=Buffer.allocUnsafe(s);for(let n=0;n<512;n++)a[n]=0;new qit({path:(\"PaxHeader/\"+Wit.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?\"GlobalExtendedHeader\":\"ExtendedHeader\",linkpath:\"\",uname:this.uname||\"\",gname:this.gname||\"\",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(a),a.write(e,512,r,\"utf8\");for(let n=r+512;n<a.length;n++)a[n]=0;return a}encodeBody(){return this.encodeField(\"path\")+this.encodeField(\"ctime\")+this.encodeField(\"atime\")+this.encodeField(\"dev\")+this.encodeField(\"ino\")+this.encodeField(\"nlink\")+this.encodeField(\"charset\")+this.encodeField(\"comment\")+this.encodeField(\"gid\")+this.encodeField(\"gname\")+this.encodeField(\"linkpath\")+this.encodeField(\"mtime\")+this.encodeField(\"size\")+this.encodeField(\"uid\")+this.encodeField(\"uname\")}encodeField(e){if(this[e]===null||this[e]===void 0)return\"\";let r=this[e]instanceof Date?this[e].getTime()/1e3:this[e],s=\" \"+(e===\"dev\"||e===\"ino\"||e===\"nlink\"?\"SCHILY.\":\"\")+e+\"=\"+r+`\n`,a=Buffer.byteLength(s),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+s}};Sv.parse=(t,e,r)=>new Sv(Yit(Vit(t),e),r);var Yit=(t,e)=>e?Object.keys(t).reduce((r,s)=>(r[s]=t[s],r),e):t,Vit=t=>t.replace(/\\n$/,\"\").split(`\n`).reduce(Jit,Object.create(null)),Jit=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+\" \").length);let s=e.split(\"=\"),a=s.shift().replace(/^SCHILY\\.(dev|ino|nlink)/,\"$1\");if(!a)return t;let n=s.join(\"=\");return t[a]=/^([A-Z]+\\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};Fhe.exports=Sv});var FI=_((a3t,Nhe)=>{Nhe.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)===\"/\";)r=e,e--;return r===-1?t:t.slice(0,r)}});var zT=_((l3t,Ohe)=>{\"use strict\";Ohe.exports=t=>class extends t{warn(e,r,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=r instanceof Error&&r.code||e,s.tarCode=e,!this.strict&&s.recoverable!==!1?(r instanceof Error&&(s=Object.assign(r,s),r=r.message),this.emit(\"warn\",s.tarCode,r,s)):r instanceof Error?this.emit(\"error\",Object.assign(r,s)):this.emit(\"error\",Object.assign(new Error(`${e}: ${r}`),s))}}});var b6=_((u3t,Lhe)=>{\"use strict\";var XT=[\"|\",\"<\",\">\",\"?\",\":\"],D6=XT.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),Kit=new Map(XT.map((t,e)=>[t,D6[e]])),zit=new Map(D6.map((t,e)=>[t,XT[e]]));Lhe.exports={encode:t=>XT.reduce((e,r)=>e.split(r).join(Kit.get(r)),t),decode:t=>D6.reduce((e,r)=>e.split(r).join(zit.get(r)),t)}});var P6=_((f3t,Uhe)=>{var{isAbsolute:Xit,parse:Mhe}=Ie(\"path\").win32;Uhe.exports=t=>{let e=\"\",r=Mhe(t);for(;Xit(t)||r.root;){let s=t.charAt(0)===\"/\"&&t.slice(0,4)!==\"//?/\"?\"/\":r.root;t=t.substr(s.length),e+=s,r=Mhe(t)}return[e,t]}});var Hhe=_((A3t,_he)=>{\"use strict\";_he.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var M6=_((g3t,t0e)=>{\"use strict\";var Jhe=PI(),Khe=KT(),zhe=RI(),nA=Ie(\"fs\"),jhe=Ie(\"path\"),rA=QI(),Zit=FI(),Xhe=(t,e)=>e?(t=rA(t).replace(/^\\.(\\/|$)/,\"\"),Zit(e)+\"/\"+t):rA(t),$it=16*1024*1024,Ghe=Symbol(\"process\"),qhe=Symbol(\"file\"),Whe=Symbol(\"directory\"),k6=Symbol(\"symlink\"),Yhe=Symbol(\"hardlink\"),Dv=Symbol(\"header\"),ZT=Symbol(\"read\"),Q6=Symbol(\"lstat\"),$T=Symbol(\"onlstat\"),T6=Symbol(\"onread\"),R6=Symbol(\"onreadlink\"),F6=Symbol(\"openfile\"),N6=Symbol(\"onopenfile\"),R0=Symbol(\"close\"),eR=Symbol(\"mode\"),O6=Symbol(\"awaitDrain\"),x6=Symbol(\"ondrain\"),iA=Symbol(\"prefix\"),Vhe=Symbol(\"hadError\"),Zhe=zT(),est=b6(),$he=P6(),e0e=Hhe(),tR=Zhe(class extends Jhe{constructor(e,r){if(r=r||{},super(r),typeof e!=\"string\")throw new TypeError(\"path is required\");this.path=rA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||\"\",this.maxReadSize=r.maxReadSize||$it,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=rA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?rA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn==\"function\"&&this.on(\"warn\",r.onwarn);let s=!1;if(!this.preservePaths){let[a,n]=$he(this.path);a&&(this.path=n,s=a)}this.win32=!!r.win32||process.platform===\"win32\",this.win32&&(this.path=est.decode(this.path.replace(/\\\\/g,\"/\")),e=e.replace(/\\\\/g,\"/\")),this.absolute=rA(r.absolute||jhe.resolve(this.cwd,e)),this.path===\"\"&&(this.path=\"./\"),s&&this.warn(\"TAR_ENTRY_INFO\",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.statCache.has(this.absolute)?this[$T](this.statCache.get(this.absolute)):this[Q6]()}emit(e,...r){return e===\"error\"&&(this[Vhe]=!0),super.emit(e,...r)}[Q6](){nA.lstat(this.absolute,(e,r)=>{if(e)return this.emit(\"error\",e);this[$T](r)})}[$T](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=rst(e),this.emit(\"stat\",e),this[Ghe]()}[Ghe](){switch(this.type){case\"File\":return this[qhe]();case\"Directory\":return this[Whe]();case\"SymbolicLink\":return this[k6]();default:return this.end()}}[eR](e){return e0e(e,this.type===\"Directory\",this.portable)}[iA](e){return Xhe(e,this.prefix)}[Dv](){this.type===\"Directory\"&&this.portable&&(this.noMtime=!0),this.header=new zhe({path:this[iA](this.path),linkpath:this.type===\"Link\"?this[iA](this.linkpath):this.linkpath,mode:this[eR](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:\"\",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new Khe({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[iA](this.path),linkpath:this.type===\"Link\"?this[iA](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[Whe](){this.path.substr(-1)!==\"/\"&&(this.path+=\"/\"),this.stat.size=0,this[Dv](),this.end()}[k6](){nA.readlink(this.absolute,(e,r)=>{if(e)return this.emit(\"error\",e);this[R6](r)})}[R6](e){this.linkpath=rA(e),this[Dv](),this.end()}[Yhe](e){this.type=\"Link\",this.linkpath=rA(jhe.relative(this.cwd,e)),this.stat.size=0,this[Dv](),this.end()}[qhe](){if(this.stat.nlink>1){let e=this.stat.dev+\":\"+this.stat.ino;if(this.linkCache.has(e)){let r=this.linkCache.get(e);if(r.indexOf(this.cwd)===0)return this[Yhe](r)}this.linkCache.set(e,this.absolute)}if(this[Dv](),this.stat.size===0)return this.end();this[F6]()}[F6](){nA.open(this.absolute,\"r\",(e,r)=>{if(e)return this.emit(\"error\",e);this[N6](r)})}[N6](e){if(this.fd=e,this[Vhe])return this[R0]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[ZT]()}[ZT](){let{fd:e,buf:r,offset:s,length:a,pos:n}=this;nA.read(e,r,s,a,n,(c,f)=>{if(c)return this[R0](()=>this.emit(\"error\",c));this[T6](f)})}[R0](e){nA.close(this.fd,e)}[T6](e){if(e<=0&&this.remain>0){let a=new Error(\"encountered unexpected EOF\");return a.path=this.absolute,a.syscall=\"read\",a.code=\"EOF\",this[R0](()=>this.emit(\"error\",a))}if(e>this.remain){let a=new Error(\"did not encounter expected EOF\");return a.path=this.absolute,a.syscall=\"read\",a.code=\"EOF\",this[R0](()=>this.emit(\"error\",a))}if(e===this.remain)for(let a=e;a<this.length&&e<this.blockRemain;a++)this.buf[a+this.offset]=0,e++,this.remain++;let r=this.offset===0&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);this.write(r)?this[x6]():this[O6](()=>this[x6]())}[O6](e){this.once(\"drain\",e)}write(e){if(this.blockRemain<e.length){let r=new Error(\"writing more data than expected\");return r.path=this.absolute,this.emit(\"error\",r)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e)}[x6](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[R0](e=>e?this.emit(\"error\",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[ZT]()}}),L6=class extends tR{[Q6](){this[$T](nA.lstatSync(this.absolute))}[k6](){this[R6](nA.readlinkSync(this.absolute))}[F6](){this[N6](nA.openSync(this.absolute,\"r\"))}[ZT](){let e=!0;try{let{fd:r,buf:s,offset:a,length:n,pos:c}=this,f=nA.readSync(r,s,a,n,c);this[T6](f),e=!1}finally{if(e)try{this[R0](()=>{})}catch{}}}[O6](e){e()}[R0](e){nA.closeSync(this.fd),e()}},tst=Zhe(class extends Jhe{constructor(e,r){r=r||{},super(r),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.readEntry=e,this.type=e.type,this.type===\"Directory\"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix||null,this.path=rA(e.path),this.mode=this[eR](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:r.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=rA(e.linkpath),typeof r.onwarn==\"function\"&&this.on(\"warn\",r.onwarn);let s=!1;if(!this.preservePaths){let[a,n]=$he(this.path);a&&(this.path=n,s=a)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new zhe({path:this[iA](this.path),linkpath:this.type===\"Link\"?this[iA](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),s&&this.warn(\"TAR_ENTRY_INFO\",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.header.encode()&&!this.noPax&&super.write(new Khe({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[iA](this.path),linkpath:this.type===\"Link\"?this[iA](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[iA](e){return Xhe(e,this.prefix)}[eR](e){return e0e(e,this.type===\"Directory\",this.portable)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error(\"writing more to entry than is appropriate\");return this.blockRemain-=r,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});tR.Sync=L6;tR.Tar=tst;var rst=t=>t.isFile()?\"File\":t.isDirectory()?\"Directory\":t.isSymbolicLink()?\"SymbolicLink\":\"Unsupported\";t0e.exports=tR});var uR=_((m3t,l0e)=>{\"use strict\";var lR=class{constructor(e,r){this.path=e||\"./\",this.absolute=r,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},nst=PI(),ist=m6(),sst=VT(),V6=M6(),ost=V6.Sync,ast=V6.Tar,lst=$x(),r0e=Buffer.alloc(1024),iR=Symbol(\"onStat\"),rR=Symbol(\"ended\"),sA=Symbol(\"queue\"),NI=Symbol(\"current\"),gm=Symbol(\"process\"),nR=Symbol(\"processing\"),n0e=Symbol(\"processJob\"),oA=Symbol(\"jobs\"),U6=Symbol(\"jobDone\"),sR=Symbol(\"addFSEntry\"),i0e=Symbol(\"addTarEntry\"),G6=Symbol(\"stat\"),q6=Symbol(\"readdir\"),oR=Symbol(\"onreaddir\"),aR=Symbol(\"pipe\"),s0e=Symbol(\"entry\"),_6=Symbol(\"entryOpt\"),W6=Symbol(\"writeEntryClass\"),a0e=Symbol(\"write\"),H6=Symbol(\"ondrain\"),cR=Ie(\"fs\"),o0e=Ie(\"path\"),cst=zT(),j6=QI(),J6=cst(class extends nst{constructor(e){super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||\"\",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=j6(e.prefix||\"\"),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[W6]=V6,typeof e.onwarn==\"function\"&&this.on(\"warn\",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!=\"object\"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new ist.Gzip(e.gzip),this.zip.on(\"data\",r=>super.write(r)),this.zip.on(\"end\",r=>super.end()),this.zip.on(\"drain\",r=>this[H6]()),this.on(\"resume\",r=>this.zip.resume())):this.on(\"drain\",this[H6]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter==\"function\"?e.filter:r=>!0,this[sA]=new lst,this[oA]=0,this.jobs=+e.jobs||4,this[nR]=!1,this[rR]=!1}[a0e](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[rR]=!0,this[gm](),this}write(e){if(this[rR])throw new Error(\"write after end\");return e instanceof sst?this[i0e](e):this[sR](e),this.flowing}[i0e](e){let r=j6(o0e.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let s=new lR(e.path,r,!1);s.entry=new ast(e,this[_6](s)),s.entry.on(\"end\",a=>this[U6](s)),this[oA]+=1,this[sA].push(s)}this[gm]()}[sR](e){let r=j6(o0e.resolve(this.cwd,e));this[sA].push(new lR(e,r)),this[gm]()}[G6](e){e.pending=!0,this[oA]+=1;let r=this.follow?\"stat\":\"lstat\";cR[r](e.absolute,(s,a)=>{e.pending=!1,this[oA]-=1,s?this.emit(\"error\",s):this[iR](e,a)})}[iR](e,r){this.statCache.set(e.absolute,r),e.stat=r,this.filter(e.path,r)||(e.ignore=!0),this[gm]()}[q6](e){e.pending=!0,this[oA]+=1,cR.readdir(e.absolute,(r,s)=>{if(e.pending=!1,this[oA]-=1,r)return this.emit(\"error\",r);this[oR](e,s)})}[oR](e,r){this.readdirCache.set(e.absolute,r),e.readdir=r,this[gm]()}[gm](){if(!this[nR]){this[nR]=!0;for(let e=this[sA].head;e!==null&&this[oA]<this.jobs;e=e.next)if(this[n0e](e.value),e.value.ignore){let r=e.next;this[sA].removeNode(e),e.next=r}this[nR]=!1,this[rR]&&!this[sA].length&&this[oA]===0&&(this.zip?this.zip.end(r0e):(super.write(r0e),super.end()))}}get[NI](){return this[sA]&&this[sA].head&&this[sA].head.value}[U6](e){this[sA].shift(),this[oA]-=1,this[gm]()}[n0e](e){if(!e.pending){if(e.entry){e===this[NI]&&!e.piped&&this[aR](e);return}if(e.stat||(this.statCache.has(e.absolute)?this[iR](e,this.statCache.get(e.absolute)):this[G6](e)),!!e.stat&&!e.ignore&&!(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir&&(this.readdirCache.has(e.absolute)?this[oR](e,this.readdirCache.get(e.absolute)):this[q6](e),!e.readdir))){if(e.entry=this[s0e](e),!e.entry){e.ignore=!0;return}e===this[NI]&&!e.piped&&this[aR](e)}}}[_6](e){return{onwarn:(r,s,a)=>this.warn(r,s,a),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[s0e](e){this[oA]+=1;try{return new this[W6](e.path,this[_6](e)).on(\"end\",()=>this[U6](e)).on(\"error\",r=>this.emit(\"error\",r))}catch(r){this.emit(\"error\",r)}}[H6](){this[NI]&&this[NI].entry&&this[NI].entry.resume()}[aR](e){e.piped=!0,e.readdir&&e.readdir.forEach(a=>{let n=e.path,c=n===\"./\"?\"\":n.replace(/\\/*$/,\"/\");this[sR](c+a)});let r=e.entry,s=this.zip;s?r.on(\"data\",a=>{s.write(a)||r.pause()}):r.on(\"data\",a=>{super.write(a)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),Y6=class extends J6{constructor(e){super(e),this[W6]=ost}pause(){}resume(){}[G6](e){let r=this.follow?\"statSync\":\"lstatSync\";this[iR](e,cR[r](e.absolute))}[q6](e,r){this[oR](e,cR.readdirSync(e.absolute))}[aR](e){let r=e.entry,s=this.zip;e.readdir&&e.readdir.forEach(a=>{let n=e.path,c=n===\"./\"?\"\":n.replace(/\\/*$/,\"/\");this[sR](c+a)}),s?r.on(\"data\",a=>{s.write(a)}):r.on(\"data\",a=>{super[a0e](a)})}};J6.Sync=Y6;l0e.exports=J6});var GI=_(Pv=>{\"use strict\";var ust=PI(),fst=Ie(\"events\").EventEmitter,fl=Ie(\"fs\"),X6=fl.writev;if(!X6){let t=process.binding(\"fs\"),e=t.FSReqWrap||t.FSReqCallback;X6=(r,s,a,n)=>{let c=(p,h)=>n(p,h,s),f=new e;f.oncomplete=c,t.writeBuffers(r,s,a,f)}}var HI=Symbol(\"_autoClose\"),Yu=Symbol(\"_close\"),bv=Symbol(\"_ended\"),ii=Symbol(\"_fd\"),c0e=Symbol(\"_finished\"),N0=Symbol(\"_flags\"),K6=Symbol(\"_flush\"),Z6=Symbol(\"_handleChunk\"),$6=Symbol(\"_makeBuf\"),gR=Symbol(\"_mode\"),fR=Symbol(\"_needDrain\"),UI=Symbol(\"_onerror\"),jI=Symbol(\"_onopen\"),z6=Symbol(\"_onread\"),LI=Symbol(\"_onwrite\"),O0=Symbol(\"_open\"),Wp=Symbol(\"_path\"),dm=Symbol(\"_pos\"),aA=Symbol(\"_queue\"),MI=Symbol(\"_read\"),u0e=Symbol(\"_readSize\"),F0=Symbol(\"_reading\"),AR=Symbol(\"_remain\"),f0e=Symbol(\"_size\"),pR=Symbol(\"_write\"),OI=Symbol(\"_writing\"),hR=Symbol(\"_defaultFlag\"),_I=Symbol(\"_errored\"),dR=class extends ust{constructor(e,r){if(r=r||{},super(r),this.readable=!0,this.writable=!1,typeof e!=\"string\")throw new TypeError(\"path must be a string\");this[_I]=!1,this[ii]=typeof r.fd==\"number\"?r.fd:null,this[Wp]=e,this[u0e]=r.readSize||16*1024*1024,this[F0]=!1,this[f0e]=typeof r.size==\"number\"?r.size:1/0,this[AR]=this[f0e],this[HI]=typeof r.autoClose==\"boolean\"?r.autoClose:!0,typeof this[ii]==\"number\"?this[MI]():this[O0]()}get fd(){return this[ii]}get path(){return this[Wp]}write(){throw new TypeError(\"this is a readable stream\")}end(){throw new TypeError(\"this is a readable stream\")}[O0](){fl.open(this[Wp],\"r\",(e,r)=>this[jI](e,r))}[jI](e,r){e?this[UI](e):(this[ii]=r,this.emit(\"open\",r),this[MI]())}[$6](){return Buffer.allocUnsafe(Math.min(this[u0e],this[AR]))}[MI](){if(!this[F0]){this[F0]=!0;let e=this[$6]();if(e.length===0)return process.nextTick(()=>this[z6](null,0,e));fl.read(this[ii],e,0,e.length,null,(r,s,a)=>this[z6](r,s,a))}}[z6](e,r,s){this[F0]=!1,e?this[UI](e):this[Z6](r,s)&&this[MI]()}[Yu](){if(this[HI]&&typeof this[ii]==\"number\"){let e=this[ii];this[ii]=null,fl.close(e,r=>r?this.emit(\"error\",r):this.emit(\"close\"))}}[UI](e){this[F0]=!0,this[Yu](),this.emit(\"error\",e)}[Z6](e,r){let s=!1;return this[AR]-=e,e>0&&(s=super.write(e<r.length?r.slice(0,e):r)),(e===0||this[AR]<=0)&&(s=!1,this[Yu](),super.end()),s}emit(e,r){switch(e){case\"prefinish\":case\"finish\":break;case\"drain\":typeof this[ii]==\"number\"&&this[MI]();break;case\"error\":return this[_I]?void 0:(this[_I]=!0,super.emit(e,r));default:return super.emit(e,r)}}},eG=class extends dR{[O0](){let e=!0;try{this[jI](null,fl.openSync(this[Wp],\"r\")),e=!1}finally{e&&this[Yu]()}}[MI](){let e=!0;try{if(!this[F0]){this[F0]=!0;do{let r=this[$6](),s=r.length===0?0:fl.readSync(this[ii],r,0,r.length,null);if(!this[Z6](s,r))break}while(!0);this[F0]=!1}e=!1}finally{e&&this[Yu]()}}[Yu](){if(this[HI]&&typeof this[ii]==\"number\"){let e=this[ii];this[ii]=null,fl.closeSync(e),this.emit(\"close\")}}},mR=class extends fst{constructor(e,r){r=r||{},super(r),this.readable=!1,this.writable=!0,this[_I]=!1,this[OI]=!1,this[bv]=!1,this[fR]=!1,this[aA]=[],this[Wp]=e,this[ii]=typeof r.fd==\"number\"?r.fd:null,this[gR]=r.mode===void 0?438:r.mode,this[dm]=typeof r.start==\"number\"?r.start:null,this[HI]=typeof r.autoClose==\"boolean\"?r.autoClose:!0;let s=this[dm]!==null?\"r+\":\"w\";this[hR]=r.flags===void 0,this[N0]=this[hR]?s:r.flags,this[ii]===null&&this[O0]()}emit(e,r){if(e===\"error\"){if(this[_I])return;this[_I]=!0}return super.emit(e,r)}get fd(){return this[ii]}get path(){return this[Wp]}[UI](e){this[Yu](),this[OI]=!0,this.emit(\"error\",e)}[O0](){fl.open(this[Wp],this[N0],this[gR],(e,r)=>this[jI](e,r))}[jI](e,r){this[hR]&&this[N0]===\"r+\"&&e&&e.code===\"ENOENT\"?(this[N0]=\"w\",this[O0]()):e?this[UI](e):(this[ii]=r,this.emit(\"open\",r),this[K6]())}end(e,r){return e&&this.write(e,r),this[bv]=!0,!this[OI]&&!this[aA].length&&typeof this[ii]==\"number\"&&this[LI](null,0),this}write(e,r){return typeof e==\"string\"&&(e=Buffer.from(e,r)),this[bv]?(this.emit(\"error\",new Error(\"write() after end()\")),!1):this[ii]===null||this[OI]||this[aA].length?(this[aA].push(e),this[fR]=!0,!1):(this[OI]=!0,this[pR](e),!0)}[pR](e){fl.write(this[ii],e,0,e.length,this[dm],(r,s)=>this[LI](r,s))}[LI](e,r){e?this[UI](e):(this[dm]!==null&&(this[dm]+=r),this[aA].length?this[K6]():(this[OI]=!1,this[bv]&&!this[c0e]?(this[c0e]=!0,this[Yu](),this.emit(\"finish\")):this[fR]&&(this[fR]=!1,this.emit(\"drain\"))))}[K6](){if(this[aA].length===0)this[bv]&&this[LI](null,0);else if(this[aA].length===1)this[pR](this[aA].pop());else{let e=this[aA];this[aA]=[],X6(this[ii],e,this[dm],(r,s)=>this[LI](r,s))}}[Yu](){if(this[HI]&&typeof this[ii]==\"number\"){let e=this[ii];this[ii]=null,fl.close(e,r=>r?this.emit(\"error\",r):this.emit(\"close\"))}}},tG=class extends mR{[O0](){let e;if(this[hR]&&this[N0]===\"r+\")try{e=fl.openSync(this[Wp],this[N0],this[gR])}catch(r){if(r.code===\"ENOENT\")return this[N0]=\"w\",this[O0]();throw r}else e=fl.openSync(this[Wp],this[N0],this[gR]);this[jI](null,e)}[Yu](){if(this[HI]&&typeof this[ii]==\"number\"){let e=this[ii];this[ii]=null,fl.closeSync(e),this.emit(\"close\")}}[pR](e){let r=!0;try{this[LI](null,fl.writeSync(this[ii],e,0,e.length,this[dm])),r=!1}finally{if(r)try{this[Yu]()}catch{}}}};Pv.ReadStream=dR;Pv.ReadStreamSync=eG;Pv.WriteStream=mR;Pv.WriteStreamSync=tG});var vR=_((I3t,y0e)=>{\"use strict\";var Ast=zT(),pst=RI(),hst=Ie(\"events\"),gst=$x(),dst=1024*1024,mst=VT(),A0e=KT(),yst=m6(),rG=Buffer.from([31,139]),Lc=Symbol(\"state\"),mm=Symbol(\"writeEntry\"),Yp=Symbol(\"readEntry\"),nG=Symbol(\"nextEntry\"),p0e=Symbol(\"processEntry\"),Mc=Symbol(\"extendedHeader\"),xv=Symbol(\"globalExtendedHeader\"),L0=Symbol(\"meta\"),h0e=Symbol(\"emitMeta\"),Di=Symbol(\"buffer\"),Vp=Symbol(\"queue\"),ym=Symbol(\"ended\"),g0e=Symbol(\"emittedEnd\"),Em=Symbol(\"emit\"),Al=Symbol(\"unzip\"),yR=Symbol(\"consumeChunk\"),ER=Symbol(\"consumeChunkSub\"),iG=Symbol(\"consumeBody\"),d0e=Symbol(\"consumeMeta\"),m0e=Symbol(\"consumeHeader\"),IR=Symbol(\"consuming\"),sG=Symbol(\"bufferConcat\"),oG=Symbol(\"maybeEnd\"),kv=Symbol(\"writing\"),M0=Symbol(\"aborted\"),CR=Symbol(\"onDone\"),Im=Symbol(\"sawValidEntry\"),wR=Symbol(\"sawNullBlock\"),BR=Symbol(\"sawEOF\"),Est=t=>!0;y0e.exports=Ast(class extends hst{constructor(e){e=e||{},super(e),this.file=e.file||\"\",this[Im]=null,this.on(CR,r=>{(this[Lc]===\"begin\"||this[Im]===!1)&&this.warn(\"TAR_BAD_ARCHIVE\",\"Unrecognized archive format\")}),e.ondone?this.on(CR,e.ondone):this.on(CR,r=>{this.emit(\"prefinish\"),this.emit(\"finish\"),this.emit(\"end\"),this.emit(\"close\")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||dst,this.filter=typeof e.filter==\"function\"?e.filter:Est,this.writable=!0,this.readable=!1,this[Vp]=new gst,this[Di]=null,this[Yp]=null,this[mm]=null,this[Lc]=\"begin\",this[L0]=\"\",this[Mc]=null,this[xv]=null,this[ym]=!1,this[Al]=null,this[M0]=!1,this[wR]=!1,this[BR]=!1,typeof e.onwarn==\"function\"&&this.on(\"warn\",e.onwarn),typeof e.onentry==\"function\"&&this.on(\"entry\",e.onentry)}[m0e](e,r){this[Im]===null&&(this[Im]=!1);let s;try{s=new pst(e,r,this[Mc],this[xv])}catch(a){return this.warn(\"TAR_ENTRY_INVALID\",a)}if(s.nullBlock)this[wR]?(this[BR]=!0,this[Lc]===\"begin\"&&(this[Lc]=\"header\"),this[Em](\"eof\")):(this[wR]=!0,this[Em](\"nullBlock\"));else if(this[wR]=!1,!s.cksumValid)this.warn(\"TAR_ENTRY_INVALID\",\"checksum failure\",{header:s});else if(!s.path)this.warn(\"TAR_ENTRY_INVALID\",\"path is required\",{header:s});else{let a=s.type;if(/^(Symbolic)?Link$/.test(a)&&!s.linkpath)this.warn(\"TAR_ENTRY_INVALID\",\"linkpath required\",{header:s});else if(!/^(Symbolic)?Link$/.test(a)&&s.linkpath)this.warn(\"TAR_ENTRY_INVALID\",\"linkpath forbidden\",{header:s});else{let n=this[mm]=new mst(s,this[Mc],this[xv]);if(!this[Im])if(n.remain){let c=()=>{n.invalid||(this[Im]=!0)};n.on(\"end\",c)}else this[Im]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[Em](\"ignoredEntry\",n),this[Lc]=\"ignore\",n.resume()):n.size>0&&(this[L0]=\"\",n.on(\"data\",c=>this[L0]+=c),this[Lc]=\"meta\"):(this[Mc]=null,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[Em](\"ignoredEntry\",n),this[Lc]=n.remain?\"ignore\":\"header\",n.resume()):(n.remain?this[Lc]=\"body\":(this[Lc]=\"header\",n.end()),this[Yp]?this[Vp].push(n):(this[Vp].push(n),this[nG]())))}}}[p0e](e){let r=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[Yp]=e,this.emit(\"entry\",e),e.emittedEnd||(e.on(\"end\",s=>this[nG]()),r=!1)):(this[Yp]=null,r=!1),r}[nG](){do;while(this[p0e](this[Vp].shift()));if(!this[Vp].length){let e=this[Yp];!e||e.flowing||e.size===e.remain?this[kv]||this.emit(\"drain\"):e.once(\"drain\",s=>this.emit(\"drain\"))}}[iG](e,r){let s=this[mm],a=s.blockRemain,n=a>=e.length&&r===0?e:e.slice(r,r+a);return s.write(n),s.blockRemain||(this[Lc]=\"header\",this[mm]=null,s.end()),n.length}[d0e](e,r){let s=this[mm],a=this[iG](e,r);return this[mm]||this[h0e](s),a}[Em](e,r,s){!this[Vp].length&&!this[Yp]?this.emit(e,r,s):this[Vp].push([e,r,s])}[h0e](e){switch(this[Em](\"meta\",this[L0]),e.type){case\"ExtendedHeader\":case\"OldExtendedHeader\":this[Mc]=A0e.parse(this[L0],this[Mc],!1);break;case\"GlobalExtendedHeader\":this[xv]=A0e.parse(this[L0],this[xv],!0);break;case\"NextFileHasLongPath\":case\"OldGnuLongPath\":this[Mc]=this[Mc]||Object.create(null),this[Mc].path=this[L0].replace(/\\0.*/,\"\");break;case\"NextFileHasLongLinkpath\":this[Mc]=this[Mc]||Object.create(null),this[Mc].linkpath=this[L0].replace(/\\0.*/,\"\");break;default:throw new Error(\"unknown meta: \"+e.type)}}abort(e){this[M0]=!0,this.emit(\"abort\",e),this.warn(\"TAR_ABORT\",e,{recoverable:!1})}write(e){if(this[M0])return;if(this[Al]===null&&e){if(this[Di]&&(e=Buffer.concat([this[Di],e]),this[Di]=null),e.length<rG.length)return this[Di]=e,!0;for(let s=0;this[Al]===null&&s<rG.length;s++)e[s]!==rG[s]&&(this[Al]=!1);if(this[Al]===null){let s=this[ym];this[ym]=!1,this[Al]=new yst.Unzip,this[Al].on(\"data\",n=>this[yR](n)),this[Al].on(\"error\",n=>this.abort(n)),this[Al].on(\"end\",n=>{this[ym]=!0,this[yR]()}),this[kv]=!0;let a=this[Al][s?\"end\":\"write\"](e);return this[kv]=!1,a}}this[kv]=!0,this[Al]?this[Al].write(e):this[yR](e),this[kv]=!1;let r=this[Vp].length?!1:this[Yp]?this[Yp].flowing:!0;return!r&&!this[Vp].length&&this[Yp].once(\"drain\",s=>this.emit(\"drain\")),r}[sG](e){e&&!this[M0]&&(this[Di]=this[Di]?Buffer.concat([this[Di],e]):e)}[oG](){if(this[ym]&&!this[g0e]&&!this[M0]&&!this[IR]){this[g0e]=!0;let e=this[mm];if(e&&e.blockRemain){let r=this[Di]?this[Di].length:0;this.warn(\"TAR_BAD_ARCHIVE\",`Truncated input (needed ${e.blockRemain} more bytes, only ${r} available)`,{entry:e}),this[Di]&&e.write(this[Di]),e.end()}this[Em](CR)}}[yR](e){if(this[IR])this[sG](e);else if(!e&&!this[Di])this[oG]();else{if(this[IR]=!0,this[Di]){this[sG](e);let r=this[Di];this[Di]=null,this[ER](r)}else this[ER](e);for(;this[Di]&&this[Di].length>=512&&!this[M0]&&!this[BR];){let r=this[Di];this[Di]=null,this[ER](r)}this[IR]=!1}(!this[Di]||this[ym])&&this[oG]()}[ER](e){let r=0,s=e.length;for(;r+512<=s&&!this[M0]&&!this[BR];)switch(this[Lc]){case\"begin\":case\"header\":this[m0e](e,r),r+=512;break;case\"ignore\":case\"body\":r+=this[iG](e,r);break;case\"meta\":r+=this[d0e](e,r);break;default:throw new Error(\"invalid state: \"+this[Lc])}r<s&&(this[Di]?this[Di]=Buffer.concat([e.slice(r),this[Di]]):this[Di]=e.slice(r))}end(e){this[M0]||(this[Al]?this[Al].end(e):(this[ym]=!0,this.write(e)))}})});var SR=_((C3t,w0e)=>{\"use strict\";var Ist=DI(),I0e=vR(),qI=Ie(\"fs\"),Cst=GI(),E0e=Ie(\"path\"),aG=FI();w0e.exports=(t,e,r)=>{typeof t==\"function\"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e==\"function\"&&(r=e,e=null),e?e=Array.from(e):e=[];let s=Ist(t);if(s.sync&&typeof r==\"function\")throw new TypeError(\"callback not supported for sync tar functions\");if(!s.file&&typeof r==\"function\")throw new TypeError(\"callback only supported with file option\");return e.length&&Bst(s,e),s.noResume||wst(s),s.file&&s.sync?vst(s):s.file?Sst(s,r):C0e(s)};var wst=t=>{let e=t.onentry;t.onentry=e?r=>{e(r),r.resume()}:r=>r.resume()},Bst=(t,e)=>{let r=new Map(e.map(n=>[aG(n),!0])),s=t.filter,a=(n,c)=>{let f=c||E0e.parse(n).root||\".\",p=n===f?!1:r.has(n)?r.get(n):a(E0e.dirname(n),f);return r.set(n,p),p};t.filter=s?(n,c)=>s(n,c)&&a(aG(n)):n=>a(aG(n))},vst=t=>{let e=C0e(t),r=t.file,s=!0,a;try{let n=qI.statSync(r),c=t.maxReadSize||16*1024*1024;if(n.size<c)e.end(qI.readFileSync(r));else{let f=0,p=Buffer.allocUnsafe(c);for(a=qI.openSync(r,\"r\");f<n.size;){let h=qI.readSync(a,p,0,c,f);f+=h,e.write(p.slice(0,h))}e.end()}s=!1}finally{if(s&&a)try{qI.closeSync(a)}catch{}}},Sst=(t,e)=>{let r=new I0e(t),s=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((c,f)=>{r.on(\"error\",f),r.on(\"end\",c),qI.stat(a,(p,h)=>{if(p)f(p);else{let E=new Cst.ReadStream(a,{readSize:s,size:h.size});E.on(\"error\",f),E.pipe(r)}})});return e?n.then(e,e):n},C0e=t=>new I0e(t)});var P0e=_((w3t,b0e)=>{\"use strict\";var Dst=DI(),DR=uR(),B0e=GI(),v0e=SR(),S0e=Ie(\"path\");b0e.exports=(t,e,r)=>{if(typeof e==\"function\"&&(r=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError(\"no files or directories specified\");e=Array.from(e);let s=Dst(t);if(s.sync&&typeof r==\"function\")throw new TypeError(\"callback not supported for sync tar functions\");if(!s.file&&typeof r==\"function\")throw new TypeError(\"callback only supported with file option\");return s.file&&s.sync?bst(s,e):s.file?Pst(s,e,r):s.sync?xst(s,e):kst(s,e)};var bst=(t,e)=>{let r=new DR.Sync(t),s=new B0e.WriteStreamSync(t.file,{mode:t.mode||438});r.pipe(s),D0e(r,e)},Pst=(t,e,r)=>{let s=new DR(t),a=new B0e.WriteStream(t.file,{mode:t.mode||438});s.pipe(a);let n=new Promise((c,f)=>{a.on(\"error\",f),a.on(\"close\",c),s.on(\"error\",f)});return lG(s,e),r?n.then(r,r):n},D0e=(t,e)=>{e.forEach(r=>{r.charAt(0)===\"@\"?v0e({file:S0e.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(r)}),t.end()},lG=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)===\"@\")return v0e({file:S0e.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>lG(t,e));t.add(r)}t.end()},xst=(t,e)=>{let r=new DR.Sync(t);return D0e(r,e),r},kst=(t,e)=>{let r=new DR(t);return lG(r,e),r}});var cG=_((B3t,N0e)=>{\"use strict\";var Qst=DI(),x0e=uR(),Xl=Ie(\"fs\"),k0e=GI(),Q0e=SR(),T0e=Ie(\"path\"),R0e=RI();N0e.exports=(t,e,r)=>{let s=Qst(t);if(!s.file)throw new TypeError(\"file is required\");if(s.gzip)throw new TypeError(\"cannot append to compressed archives\");if(!e||!Array.isArray(e)||!e.length)throw new TypeError(\"no files or directories specified\");return e=Array.from(e),s.sync?Tst(s,e):Fst(s,e,r)};var Tst=(t,e)=>{let r=new x0e.Sync(t),s=!0,a,n;try{try{a=Xl.openSync(t.file,\"r+\")}catch(p){if(p.code===\"ENOENT\")a=Xl.openSync(t.file,\"w+\");else throw p}let c=Xl.fstatSync(a),f=Buffer.alloc(512);e:for(n=0;n<c.size;n+=512){for(let E=0,C=0;E<512;E+=C){if(C=Xl.readSync(a,f,E,f.length-E,n+E),n===0&&f[0]===31&&f[1]===139)throw new Error(\"cannot append to compressed archives\");if(!C)break e}let p=new R0e(f);if(!p.cksumValid)break;let h=512*Math.ceil(p.size/512);if(n+h+512>c.size)break;n+=h,t.mtimeCache&&t.mtimeCache.set(p.path,p.mtime)}s=!1,Rst(t,r,n,a,e)}finally{if(s)try{Xl.closeSync(a)}catch{}}},Rst=(t,e,r,s,a)=>{let n=new k0e.WriteStreamSync(t.file,{fd:s,start:r});e.pipe(n),Nst(e,a)},Fst=(t,e,r)=>{e=Array.from(e);let s=new x0e(t),a=(c,f,p)=>{let h=(I,R)=>{I?Xl.close(c,N=>p(I)):p(null,R)},E=0;if(f===0)return h(null,0);let C=0,S=Buffer.alloc(512),P=(I,R)=>{if(I)return h(I);if(C+=R,C<512&&R)return Xl.read(c,S,C,S.length-C,E+C,P);if(E===0&&S[0]===31&&S[1]===139)return h(new Error(\"cannot append to compressed archives\"));if(C<512)return h(null,E);let N=new R0e(S);if(!N.cksumValid)return h(null,E);let U=512*Math.ceil(N.size/512);if(E+U+512>f||(E+=U+512,E>=f))return h(null,E);t.mtimeCache&&t.mtimeCache.set(N.path,N.mtime),C=0,Xl.read(c,S,0,512,E,P)};Xl.read(c,S,0,512,E,P)},n=new Promise((c,f)=>{s.on(\"error\",f);let p=\"r+\",h=(E,C)=>{if(E&&E.code===\"ENOENT\"&&p===\"r+\")return p=\"w+\",Xl.open(t.file,p,h);if(E)return f(E);Xl.fstat(C,(S,P)=>{if(S)return Xl.close(C,()=>f(S));a(C,P.size,(I,R)=>{if(I)return f(I);let N=new k0e.WriteStream(t.file,{fd:C,start:R});s.pipe(N),N.on(\"error\",f),N.on(\"close\",c),F0e(s,e)})})};Xl.open(t.file,p,h)});return r?n.then(r,r):n},Nst=(t,e)=>{e.forEach(r=>{r.charAt(0)===\"@\"?Q0e({file:T0e.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(r)}),t.end()},F0e=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)===\"@\")return Q0e({file:T0e.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>F0e(t,e));t.add(r)}t.end()}});var L0e=_((v3t,O0e)=>{\"use strict\";var Ost=DI(),Lst=cG();O0e.exports=(t,e,r)=>{let s=Ost(t);if(!s.file)throw new TypeError(\"file is required\");if(s.gzip)throw new TypeError(\"cannot append to compressed archives\");if(!e||!Array.isArray(e)||!e.length)throw new TypeError(\"no files or directories specified\");return e=Array.from(e),Mst(s),Lst(s,e,r)};var Mst=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(r,s)=>e(r,s)&&!(t.mtimeCache.get(r)>s.mtime):(r,s)=>!(t.mtimeCache.get(r)>s.mtime)}});var _0e=_((S3t,U0e)=>{var{promisify:M0e}=Ie(\"util\"),U0=Ie(\"fs\"),Ust=t=>{if(!t)t={mode:511,fs:U0};else if(typeof t==\"object\")t={mode:511,fs:U0,...t};else if(typeof t==\"number\")t={mode:t,fs:U0};else if(typeof t==\"string\")t={mode:parseInt(t,8),fs:U0};else throw new TypeError(\"invalid options argument\");return t.mkdir=t.mkdir||t.fs.mkdir||U0.mkdir,t.mkdirAsync=M0e(t.mkdir),t.stat=t.stat||t.fs.stat||U0.stat,t.statAsync=M0e(t.stat),t.statSync=t.statSync||t.fs.statSync||U0.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||U0.mkdirSync,t};U0e.exports=Ust});var j0e=_((D3t,H0e)=>{var _st=process.platform,{resolve:Hst,parse:jst}=Ie(\"path\"),Gst=t=>{if(/\\0/.test(t))throw Object.assign(new TypeError(\"path must be a string without null bytes\"),{path:t,code:\"ERR_INVALID_ARG_VALUE\"});if(t=Hst(t),_st===\"win32\"){let e=/[*|\"<>?:]/,{root:r}=jst(t);if(e.test(t.substr(r.length)))throw Object.assign(new Error(\"Illegal characters in path.\"),{path:t,code:\"EINVAL\"})}return t};H0e.exports=Gst});var V0e=_((b3t,Y0e)=>{var{dirname:G0e}=Ie(\"path\"),q0e=(t,e,r=void 0)=>r===e?Promise.resolve():t.statAsync(e).then(s=>s.isDirectory()?r:void 0,s=>s.code===\"ENOENT\"?q0e(t,G0e(e),e):void 0),W0e=(t,e,r=void 0)=>{if(r!==e)try{return t.statSync(e).isDirectory()?r:void 0}catch(s){return s.code===\"ENOENT\"?W0e(t,G0e(e),e):void 0}};Y0e.exports={findMade:q0e,findMadeSync:W0e}});var AG=_((P3t,K0e)=>{var{dirname:J0e}=Ie(\"path\"),uG=(t,e,r)=>{e.recursive=!1;let s=J0e(t);return s===t?e.mkdirAsync(t,e).catch(a=>{if(a.code!==\"EISDIR\")throw a}):e.mkdirAsync(t,e).then(()=>r||t,a=>{if(a.code===\"ENOENT\")return uG(s,e).then(n=>uG(t,e,n));if(a.code!==\"EEXIST\"&&a.code!==\"EROFS\")throw a;return e.statAsync(t).then(n=>{if(n.isDirectory())return r;throw a},()=>{throw a})})},fG=(t,e,r)=>{let s=J0e(t);if(e.recursive=!1,s===t)try{return e.mkdirSync(t,e)}catch(a){if(a.code!==\"EISDIR\")throw a;return}try{return e.mkdirSync(t,e),r||t}catch(a){if(a.code===\"ENOENT\")return fG(t,e,fG(s,e,r));if(a.code!==\"EEXIST\"&&a.code!==\"EROFS\")throw a;try{if(!e.statSync(t).isDirectory())throw a}catch{throw a}}};K0e.exports={mkdirpManual:uG,mkdirpManualSync:fG}});var Z0e=_((x3t,X0e)=>{var{dirname:z0e}=Ie(\"path\"),{findMade:qst,findMadeSync:Wst}=V0e(),{mkdirpManual:Yst,mkdirpManualSync:Vst}=AG(),Jst=(t,e)=>(e.recursive=!0,z0e(t)===t?e.mkdirAsync(t,e):qst(e,t).then(s=>e.mkdirAsync(t,e).then(()=>s).catch(a=>{if(a.code===\"ENOENT\")return Yst(t,e);throw a}))),Kst=(t,e)=>{if(e.recursive=!0,z0e(t)===t)return e.mkdirSync(t,e);let s=Wst(e,t);try{return e.mkdirSync(t,e),s}catch(a){if(a.code===\"ENOENT\")return Vst(t,e);throw a}};X0e.exports={mkdirpNative:Jst,mkdirpNativeSync:Kst}});var rge=_((k3t,tge)=>{var $0e=Ie(\"fs\"),zst=process.version,pG=zst.replace(/^v/,\"\").split(\".\"),ege=+pG[0]>10||+pG[0]==10&&+pG[1]>=12,Xst=ege?t=>t.mkdir===$0e.mkdir:()=>!1,Zst=ege?t=>t.mkdirSync===$0e.mkdirSync:()=>!1;tge.exports={useNative:Xst,useNativeSync:Zst}});var lge=_((Q3t,age)=>{var WI=_0e(),YI=j0e(),{mkdirpNative:nge,mkdirpNativeSync:ige}=Z0e(),{mkdirpManual:sge,mkdirpManualSync:oge}=AG(),{useNative:$st,useNativeSync:eot}=rge(),VI=(t,e)=>(t=YI(t),e=WI(e),$st(e)?nge(t,e):sge(t,e)),tot=(t,e)=>(t=YI(t),e=WI(e),eot(e)?ige(t,e):oge(t,e));VI.sync=tot;VI.native=(t,e)=>nge(YI(t),WI(e));VI.manual=(t,e)=>sge(YI(t),WI(e));VI.nativeSync=(t,e)=>ige(YI(t),WI(e));VI.manualSync=(t,e)=>oge(YI(t),WI(e));age.exports=VI});var gge=_((T3t,hge)=>{\"use strict\";var Uc=Ie(\"fs\"),Cm=Ie(\"path\"),rot=Uc.lchown?\"lchown\":\"chown\",not=Uc.lchownSync?\"lchownSync\":\"chownSync\",uge=Uc.lchown&&!process.version.match(/v1[1-9]+\\./)&&!process.version.match(/v10\\.[6-9]/),cge=(t,e,r)=>{try{return Uc[not](t,e,r)}catch(s){if(s.code!==\"ENOENT\")throw s}},iot=(t,e,r)=>{try{return Uc.chownSync(t,e,r)}catch(s){if(s.code!==\"ENOENT\")throw s}},sot=uge?(t,e,r,s)=>a=>{!a||a.code!==\"EISDIR\"?s(a):Uc.chown(t,e,r,s)}:(t,e,r,s)=>s,hG=uge?(t,e,r)=>{try{return cge(t,e,r)}catch(s){if(s.code!==\"EISDIR\")throw s;iot(t,e,r)}}:(t,e,r)=>cge(t,e,r),oot=process.version,fge=(t,e,r)=>Uc.readdir(t,e,r),aot=(t,e)=>Uc.readdirSync(t,e);/^v4\\./.test(oot)&&(fge=(t,e,r)=>Uc.readdir(t,r));var bR=(t,e,r,s)=>{Uc[rot](t,e,r,sot(t,e,r,a=>{s(a&&a.code!==\"ENOENT\"?a:null)}))},Age=(t,e,r,s,a)=>{if(typeof e==\"string\")return Uc.lstat(Cm.resolve(t,e),(n,c)=>{if(n)return a(n.code!==\"ENOENT\"?n:null);c.name=e,Age(t,c,r,s,a)});if(e.isDirectory())gG(Cm.resolve(t,e.name),r,s,n=>{if(n)return a(n);let c=Cm.resolve(t,e.name);bR(c,r,s,a)});else{let n=Cm.resolve(t,e.name);bR(n,r,s,a)}},gG=(t,e,r,s)=>{fge(t,{withFileTypes:!0},(a,n)=>{if(a){if(a.code===\"ENOENT\")return s();if(a.code!==\"ENOTDIR\"&&a.code!==\"ENOTSUP\")return s(a)}if(a||!n.length)return bR(t,e,r,s);let c=n.length,f=null,p=h=>{if(!f){if(h)return s(f=h);if(--c===0)return bR(t,e,r,s)}};n.forEach(h=>Age(t,h,e,r,p))})},lot=(t,e,r,s)=>{if(typeof e==\"string\")try{let a=Uc.lstatSync(Cm.resolve(t,e));a.name=e,e=a}catch(a){if(a.code===\"ENOENT\")return;throw a}e.isDirectory()&&pge(Cm.resolve(t,e.name),r,s),hG(Cm.resolve(t,e.name),r,s)},pge=(t,e,r)=>{let s;try{s=aot(t,{withFileTypes:!0})}catch(a){if(a.code===\"ENOENT\")return;if(a.code===\"ENOTDIR\"||a.code===\"ENOTSUP\")return hG(t,e,r);throw a}return s&&s.length&&s.forEach(a=>lot(t,a,e,r)),hG(t,e,r)};hge.exports=gG;gG.sync=pge});var Ege=_((R3t,dG)=>{\"use strict\";var dge=lge(),_c=Ie(\"fs\"),PR=Ie(\"path\"),mge=gge(),Vu=QI(),xR=class extends Error{constructor(e,r){super(\"Cannot extract through symbolic link\"),this.path=r,this.symlink=e}get name(){return\"SylinkError\"}},kR=class extends Error{constructor(e,r){super(r+\": Cannot cd into '\"+e+\"'\"),this.path=e,this.code=r}get name(){return\"CwdError\"}},QR=(t,e)=>t.get(Vu(e)),Qv=(t,e,r)=>t.set(Vu(e),r),cot=(t,e)=>{_c.stat(t,(r,s)=>{(r||!s.isDirectory())&&(r=new kR(t,r&&r.code||\"ENOTDIR\")),e(r)})};dG.exports=(t,e,r)=>{t=Vu(t);let s=e.umask,a=e.mode|448,n=(a&s)!==0,c=e.uid,f=e.gid,p=typeof c==\"number\"&&typeof f==\"number\"&&(c!==e.processUid||f!==e.processGid),h=e.preserve,E=e.unlink,C=e.cache,S=Vu(e.cwd),P=(N,U)=>{N?r(N):(Qv(C,t,!0),U&&p?mge(U,c,f,W=>P(W)):n?_c.chmod(t,a,r):r())};if(C&&QR(C,t)===!0)return P();if(t===S)return cot(t,P);if(h)return dge(t,{mode:a}).then(N=>P(null,N),P);let R=Vu(PR.relative(S,t)).split(\"/\");TR(S,R,a,C,E,S,null,P)};var TR=(t,e,r,s,a,n,c,f)=>{if(!e.length)return f(null,c);let p=e.shift(),h=Vu(PR.resolve(t+\"/\"+p));if(QR(s,h))return TR(h,e,r,s,a,n,c,f);_c.mkdir(h,r,yge(h,e,r,s,a,n,c,f))},yge=(t,e,r,s,a,n,c,f)=>p=>{p?_c.lstat(t,(h,E)=>{if(h)h.path=h.path&&Vu(h.path),f(h);else if(E.isDirectory())TR(t,e,r,s,a,n,c,f);else if(a)_c.unlink(t,C=>{if(C)return f(C);_c.mkdir(t,r,yge(t,e,r,s,a,n,c,f))});else{if(E.isSymbolicLink())return f(new xR(t,t+\"/\"+e.join(\"/\")));f(p)}}):(c=c||t,TR(t,e,r,s,a,n,c,f))},uot=t=>{let e=!1,r=\"ENOTDIR\";try{e=_c.statSync(t).isDirectory()}catch(s){r=s.code}finally{if(!e)throw new kR(t,r)}};dG.exports.sync=(t,e)=>{t=Vu(t);let r=e.umask,s=e.mode|448,a=(s&r)!==0,n=e.uid,c=e.gid,f=typeof n==\"number\"&&typeof c==\"number\"&&(n!==e.processUid||c!==e.processGid),p=e.preserve,h=e.unlink,E=e.cache,C=Vu(e.cwd),S=N=>{Qv(E,t,!0),N&&f&&mge.sync(N,n,c),a&&_c.chmodSync(t,s)};if(E&&QR(E,t)===!0)return S();if(t===C)return uot(C),S();if(p)return S(dge.sync(t,s));let I=Vu(PR.relative(C,t)).split(\"/\"),R=null;for(let N=I.shift(),U=C;N&&(U+=\"/\"+N);N=I.shift())if(U=Vu(PR.resolve(U)),!QR(E,U))try{_c.mkdirSync(U,s),R=R||U,Qv(E,U,!0)}catch{let ee=_c.lstatSync(U);if(ee.isDirectory()){Qv(E,U,!0);continue}else if(h){_c.unlinkSync(U),_c.mkdirSync(U,s),R=R||U,Qv(E,U,!0);continue}else if(ee.isSymbolicLink())return new xR(U,U+\"/\"+I.join(\"/\"))}return S(R)}});var yG=_((F3t,Ige)=>{var mG=Object.create(null),{hasOwnProperty:fot}=Object.prototype;Ige.exports=t=>(fot.call(mG,t)||(mG[t]=t.normalize(\"NFKD\")),mG[t])});var vge=_((N3t,Bge)=>{var Cge=Ie(\"assert\"),Aot=yG(),pot=FI(),{join:wge}=Ie(\"path\"),hot=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,got=hot===\"win32\";Bge.exports=()=>{let t=new Map,e=new Map,r=h=>h.split(\"/\").slice(0,-1).reduce((C,S)=>(C.length&&(S=wge(C[C.length-1],S)),C.push(S||\"/\"),C),[]),s=new Set,a=h=>{let E=e.get(h);if(!E)throw new Error(\"function does not have any path reservations\");return{paths:E.paths.map(C=>t.get(C)),dirs:[...E.dirs].map(C=>t.get(C))}},n=h=>{let{paths:E,dirs:C}=a(h);return E.every(S=>S[0]===h)&&C.every(S=>S[0]instanceof Set&&S[0].has(h))},c=h=>s.has(h)||!n(h)?!1:(s.add(h),h(()=>f(h)),!0),f=h=>{if(!s.has(h))return!1;let{paths:E,dirs:C}=e.get(h),S=new Set;return E.forEach(P=>{let I=t.get(P);Cge.equal(I[0],h),I.length===1?t.delete(P):(I.shift(),typeof I[0]==\"function\"?S.add(I[0]):I[0].forEach(R=>S.add(R)))}),C.forEach(P=>{let I=t.get(P);Cge(I[0]instanceof Set),I[0].size===1&&I.length===1?t.delete(P):I[0].size===1?(I.shift(),S.add(I[0])):I[0].delete(h)}),s.delete(h),S.forEach(P=>c(P)),!0};return{check:n,reserve:(h,E)=>{h=got?[\"win32 parallelization disabled\"]:h.map(S=>Aot(pot(wge(S))).toLowerCase());let C=new Set(h.map(S=>r(S)).reduce((S,P)=>S.concat(P)));return e.set(E,{dirs:C,paths:h}),h.forEach(S=>{let P=t.get(S);P?P.push(E):t.set(S,[E])}),C.forEach(S=>{let P=t.get(S);P?P[P.length-1]instanceof Set?P[P.length-1].add(E):P.push(new Set([E])):t.set(S,[new Set([E])])}),c(E)}}}});var bge=_((O3t,Dge)=>{var dot=process.platform,mot=dot===\"win32\",yot=global.__FAKE_TESTING_FS__||Ie(\"fs\"),{O_CREAT:Eot,O_TRUNC:Iot,O_WRONLY:Cot,UV_FS_O_FILEMAP:Sge=0}=yot.constants,wot=mot&&!!Sge,Bot=512*1024,vot=Sge|Iot|Eot|Cot;Dge.exports=wot?t=>t<Bot?vot:\"w\":()=>\"w\"});var bG=_((L3t,Hge)=>{\"use strict\";var Sot=Ie(\"assert\"),Dot=vR(),Mn=Ie(\"fs\"),bot=GI(),Jp=Ie(\"path\"),Mge=Ege(),Pge=b6(),Pot=vge(),xot=P6(),Zl=QI(),kot=FI(),Qot=yG(),xge=Symbol(\"onEntry\"),CG=Symbol(\"checkFs\"),kge=Symbol(\"checkFs2\"),NR=Symbol(\"pruneCache\"),wG=Symbol(\"isReusable\"),Hc=Symbol(\"makeFs\"),BG=Symbol(\"file\"),vG=Symbol(\"directory\"),OR=Symbol(\"link\"),Qge=Symbol(\"symlink\"),Tge=Symbol(\"hardlink\"),Rge=Symbol(\"unsupported\"),Fge=Symbol(\"checkPath\"),_0=Symbol(\"mkdir\"),Xo=Symbol(\"onError\"),RR=Symbol(\"pending\"),Nge=Symbol(\"pend\"),JI=Symbol(\"unpend\"),EG=Symbol(\"ended\"),IG=Symbol(\"maybeClose\"),SG=Symbol(\"skip\"),Tv=Symbol(\"doChown\"),Rv=Symbol(\"uid\"),Fv=Symbol(\"gid\"),Nv=Symbol(\"checkedCwd\"),Uge=Ie(\"crypto\"),_ge=bge(),Tot=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Ov=Tot===\"win32\",Rot=(t,e)=>{if(!Ov)return Mn.unlink(t,e);let r=t+\".DELETE.\"+Uge.randomBytes(16).toString(\"hex\");Mn.rename(t,r,s=>{if(s)return e(s);Mn.unlink(r,e)})},Fot=t=>{if(!Ov)return Mn.unlinkSync(t);let e=t+\".DELETE.\"+Uge.randomBytes(16).toString(\"hex\");Mn.renameSync(t,e),Mn.unlinkSync(e)},Oge=(t,e,r)=>t===t>>>0?t:e===e>>>0?e:r,Lge=t=>Qot(kot(Zl(t))).toLowerCase(),Not=(t,e)=>{e=Lge(e);for(let r of t.keys()){let s=Lge(r);(s===e||s.indexOf(e+\"/\")===0)&&t.delete(r)}},Oot=t=>{for(let e of t.keys())t.delete(e)},Lv=class extends Dot{constructor(e){if(e||(e={}),e.ondone=r=>{this[EG]=!0,this[IG]()},super(e),this[Nv]=!1,this.reservations=Pot(),this.transform=typeof e.transform==\"function\"?e.transform:null,this.writable=!0,this.readable=!1,this[RR]=0,this[EG]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid==\"number\"||typeof e.gid==\"number\"){if(typeof e.uid!=\"number\"||typeof e.gid!=\"number\")throw new TypeError(\"cannot set owner without number uid and gid\");if(e.preserveOwner)throw new TypeError(\"cannot preserve owner in archive and also set owner explicitly\");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!=\"number\"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Ov,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=Zl(Jp.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask==\"number\"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on(\"entry\",r=>this[xge](r))}warn(e,r,s={}){return(e===\"TAR_BAD_ARCHIVE\"||e===\"TAR_ABORT\")&&(s.recoverable=!1),super.warn(e,r,s)}[IG](){this[EG]&&this[RR]===0&&(this.emit(\"prefinish\"),this.emit(\"finish\"),this.emit(\"end\"),this.emit(\"close\"))}[Fge](e){if(this.strip){let r=Zl(e.path).split(\"/\");if(r.length<this.strip)return!1;if(e.path=r.slice(this.strip).join(\"/\"),e.type===\"Link\"){let s=Zl(e.linkpath).split(\"/\");if(s.length>=this.strip)e.linkpath=s.slice(this.strip).join(\"/\");else return!1}}if(!this.preservePaths){let r=Zl(e.path),s=r.split(\"/\");if(s.includes(\"..\")||Ov&&/^[a-z]:\\.\\.$/i.test(s[0]))return this.warn(\"TAR_ENTRY_ERROR\",\"path contains '..'\",{entry:e,path:r}),!1;let[a,n]=xot(r);a&&(e.path=n,this.warn(\"TAR_ENTRY_INFO\",`stripping ${a} from absolute path`,{entry:e,path:r}))}if(Jp.isAbsolute(e.path)?e.absolute=Zl(Jp.resolve(e.path)):e.absolute=Zl(Jp.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+\"/\")!==0&&e.absolute!==this.cwd)return this.warn(\"TAR_ENTRY_ERROR\",\"path escaped extraction target\",{entry:e,path:Zl(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!==\"Directory\"&&e.type!==\"GNUDumpDir\")return!1;if(this.win32){let{root:r}=Jp.win32.parse(e.absolute);e.absolute=r+Pge.encode(e.absolute.substr(r.length));let{root:s}=Jp.win32.parse(e.path);e.path=s+Pge.encode(e.path.substr(s.length))}return!0}[xge](e){if(!this[Fge](e))return e.resume();switch(Sot.equal(typeof e.absolute,\"string\"),e.type){case\"Directory\":case\"GNUDumpDir\":e.mode&&(e.mode=e.mode|448);case\"File\":case\"OldFile\":case\"ContiguousFile\":case\"Link\":case\"SymbolicLink\":return this[CG](e);case\"CharacterDevice\":case\"BlockDevice\":case\"FIFO\":default:return this[Rge](e)}}[Xo](e,r){e.name===\"CwdError\"?this.emit(\"error\",e):(this.warn(\"TAR_ENTRY_ERROR\",e,{entry:r}),this[JI](),r.resume())}[_0](e,r,s){Mge(Zl(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r,noChmod:this.noChmod},s)}[Tv](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==\"number\"&&e.uid!==this.processUid||typeof e.gid==\"number\"&&e.gid!==this.processGid)||typeof this.uid==\"number\"&&this.uid!==this.processUid||typeof this.gid==\"number\"&&this.gid!==this.processGid}[Rv](e){return Oge(this.uid,e.uid,this.processUid)}[Fv](e){return Oge(this.gid,e.gid,this.processGid)}[BG](e,r){let s=e.mode&4095||this.fmode,a=new bot.WriteStream(e.absolute,{flags:_ge(e.size),mode:s,autoClose:!1});a.on(\"error\",p=>{a.fd&&Mn.close(a.fd,()=>{}),a.write=()=>!0,this[Xo](p,e),r()});let n=1,c=p=>{if(p){a.fd&&Mn.close(a.fd,()=>{}),this[Xo](p,e),r();return}--n===0&&Mn.close(a.fd,h=>{h?this[Xo](h,e):this[JI](),r()})};a.on(\"finish\",p=>{let h=e.absolute,E=a.fd;if(e.mtime&&!this.noMtime){n++;let C=e.atime||new Date,S=e.mtime;Mn.futimes(E,C,S,P=>P?Mn.utimes(h,C,S,I=>c(I&&P)):c())}if(this[Tv](e)){n++;let C=this[Rv](e),S=this[Fv](e);Mn.fchown(E,C,S,P=>P?Mn.chown(h,C,S,I=>c(I&&P)):c())}c()});let f=this.transform&&this.transform(e)||e;f!==e&&(f.on(\"error\",p=>{this[Xo](p,e),r()}),e.pipe(f)),f.pipe(a)}[vG](e,r){let s=e.mode&4095||this.dmode;this[_0](e.absolute,s,a=>{if(a){this[Xo](a,e),r();return}let n=1,c=f=>{--n===0&&(r(),this[JI](),e.resume())};e.mtime&&!this.noMtime&&(n++,Mn.utimes(e.absolute,e.atime||new Date,e.mtime,c)),this[Tv](e)&&(n++,Mn.chown(e.absolute,this[Rv](e),this[Fv](e),c)),c()})}[Rge](e){e.unsupported=!0,this.warn(\"TAR_ENTRY_UNSUPPORTED\",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[Qge](e,r){this[OR](e,e.linkpath,\"symlink\",r)}[Tge](e,r){let s=Zl(Jp.resolve(this.cwd,e.linkpath));this[OR](e,s,\"link\",r)}[Nge](){this[RR]++}[JI](){this[RR]--,this[IG]()}[SG](e){this[JI](),e.resume()}[wG](e,r){return e.type===\"File\"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!Ov}[CG](e){this[Nge]();let r=[e.path];e.linkpath&&r.push(e.linkpath),this.reservations.reserve(r,s=>this[kge](e,s))}[NR](e){e.type===\"SymbolicLink\"?Oot(this.dirCache):e.type!==\"Directory\"&&Not(this.dirCache,e.absolute)}[kge](e,r){this[NR](e);let s=f=>{this[NR](e),r(f)},a=()=>{this[_0](this.cwd,this.dmode,f=>{if(f){this[Xo](f,e),s();return}this[Nv]=!0,n()})},n=()=>{if(e.absolute!==this.cwd){let f=Zl(Jp.dirname(e.absolute));if(f!==this.cwd)return this[_0](f,this.dmode,p=>{if(p){this[Xo](p,e),s();return}c()})}c()},c=()=>{Mn.lstat(e.absolute,(f,p)=>{if(p&&(this.keep||this.newer&&p.mtime>e.mtime)){this[SG](e),s();return}if(f||this[wG](e,p))return this[Hc](null,e,s);if(p.isDirectory()){if(e.type===\"Directory\"){let h=!this.noChmod&&e.mode&&(p.mode&4095)!==e.mode,E=C=>this[Hc](C,e,s);return h?Mn.chmod(e.absolute,e.mode,E):E()}if(e.absolute!==this.cwd)return Mn.rmdir(e.absolute,h=>this[Hc](h,e,s))}if(e.absolute===this.cwd)return this[Hc](null,e,s);Rot(e.absolute,h=>this[Hc](h,e,s))})};this[Nv]?n():a()}[Hc](e,r,s){if(e){this[Xo](e,r),s();return}switch(r.type){case\"File\":case\"OldFile\":case\"ContiguousFile\":return this[BG](r,s);case\"Link\":return this[Tge](r,s);case\"SymbolicLink\":return this[Qge](r,s);case\"Directory\":case\"GNUDumpDir\":return this[vG](r,s)}}[OR](e,r,s,a){Mn[s](r,e.absolute,n=>{n?this[Xo](n,e):(this[JI](),e.resume()),a()})}},FR=t=>{try{return[null,t()]}catch(e){return[e,null]}},DG=class extends Lv{[Hc](e,r){return super[Hc](e,r,()=>{})}[CG](e){if(this[NR](e),!this[Nv]){let n=this[_0](this.cwd,this.dmode);if(n)return this[Xo](n,e);this[Nv]=!0}if(e.absolute!==this.cwd){let n=Zl(Jp.dirname(e.absolute));if(n!==this.cwd){let c=this[_0](n,this.dmode);if(c)return this[Xo](c,e)}}let[r,s]=FR(()=>Mn.lstatSync(e.absolute));if(s&&(this.keep||this.newer&&s.mtime>e.mtime))return this[SG](e);if(r||this[wG](e,s))return this[Hc](null,e);if(s.isDirectory()){if(e.type===\"Directory\"){let c=!this.noChmod&&e.mode&&(s.mode&4095)!==e.mode,[f]=c?FR(()=>{Mn.chmodSync(e.absolute,e.mode)}):[];return this[Hc](f,e)}let[n]=FR(()=>Mn.rmdirSync(e.absolute));this[Hc](n,e)}let[a]=e.absolute===this.cwd?[]:FR(()=>Fot(e.absolute));this[Hc](a,e)}[BG](e,r){let s=e.mode&4095||this.fmode,a=f=>{let p;try{Mn.closeSync(n)}catch(h){p=h}(f||p)&&this[Xo](f||p,e),r()},n;try{n=Mn.openSync(e.absolute,_ge(e.size),s)}catch(f){return a(f)}let c=this.transform&&this.transform(e)||e;c!==e&&(c.on(\"error\",f=>this[Xo](f,e)),e.pipe(c)),c.on(\"data\",f=>{try{Mn.writeSync(n,f,0,f.length)}catch(p){a(p)}}),c.on(\"end\",f=>{let p=null;if(e.mtime&&!this.noMtime){let h=e.atime||new Date,E=e.mtime;try{Mn.futimesSync(n,h,E)}catch(C){try{Mn.utimesSync(e.absolute,h,E)}catch{p=C}}}if(this[Tv](e)){let h=this[Rv](e),E=this[Fv](e);try{Mn.fchownSync(n,h,E)}catch(C){try{Mn.chownSync(e.absolute,h,E)}catch{p=p||C}}}a(p)})}[vG](e,r){let s=e.mode&4095||this.dmode,a=this[_0](e.absolute,s);if(a){this[Xo](a,e),r();return}if(e.mtime&&!this.noMtime)try{Mn.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[Tv](e))try{Mn.chownSync(e.absolute,this[Rv](e),this[Fv](e))}catch{}r(),e.resume()}[_0](e,r){try{return Mge.sync(Zl(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(s){return s}}[OR](e,r,s,a){try{Mn[s+\"Sync\"](r,e.absolute),a(),e.resume()}catch(n){return this[Xo](n,e)}}};Lv.Sync=DG;Hge.exports=Lv});var Yge=_((M3t,Wge)=>{\"use strict\";var Lot=DI(),LR=bG(),Gge=Ie(\"fs\"),qge=GI(),jge=Ie(\"path\"),PG=FI();Wge.exports=(t,e,r)=>{typeof t==\"function\"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e==\"function\"&&(r=e,e=null),e?e=Array.from(e):e=[];let s=Lot(t);if(s.sync&&typeof r==\"function\")throw new TypeError(\"callback not supported for sync tar functions\");if(!s.file&&typeof r==\"function\")throw new TypeError(\"callback only supported with file option\");return e.length&&Mot(s,e),s.file&&s.sync?Uot(s):s.file?_ot(s,r):s.sync?Hot(s):jot(s)};var Mot=(t,e)=>{let r=new Map(e.map(n=>[PG(n),!0])),s=t.filter,a=(n,c)=>{let f=c||jge.parse(n).root||\".\",p=n===f?!1:r.has(n)?r.get(n):a(jge.dirname(n),f);return r.set(n,p),p};t.filter=s?(n,c)=>s(n,c)&&a(PG(n)):n=>a(PG(n))},Uot=t=>{let e=new LR.Sync(t),r=t.file,s=Gge.statSync(r),a=t.maxReadSize||16*1024*1024;new qge.ReadStreamSync(r,{readSize:a,size:s.size}).pipe(e)},_ot=(t,e)=>{let r=new LR(t),s=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((c,f)=>{r.on(\"error\",f),r.on(\"close\",c),Gge.stat(a,(p,h)=>{if(p)f(p);else{let E=new qge.ReadStream(a,{readSize:s,size:h.size});E.on(\"error\",f),E.pipe(r)}})});return e?n.then(e,e):n},Hot=t=>new LR.Sync(t),jot=t=>new LR(t)});var Vge=_(Ps=>{\"use strict\";Ps.c=Ps.create=P0e();Ps.r=Ps.replace=cG();Ps.t=Ps.list=SR();Ps.u=Ps.update=L0e();Ps.x=Ps.extract=Yge();Ps.Pack=uR();Ps.Unpack=bG();Ps.Parse=vR();Ps.ReadEntry=VT();Ps.WriteEntry=M6();Ps.Header=RI();Ps.Pax=KT();Ps.types=I6()});var xG,Jge,H0,Mv,Uv,Kge=Xe(()=>{xG=ut(Ld()),Jge=Ie(\"worker_threads\"),H0=Symbol(\"kTaskInfo\"),Mv=class{constructor(e,r){this.fn=e;this.limit=(0,xG.default)(r.poolSize)}run(e){return this.limit(()=>this.fn(e))}},Uv=class{constructor(e,r){this.source=e;this.workers=[];this.limit=(0,xG.default)(r.poolSize),this.cleanupInterval=setInterval(()=>{if(this.limit.pendingCount===0&&this.limit.activeCount===0){let s=this.workers.pop();s?s.terminate():clearInterval(this.cleanupInterval)}},5e3).unref()}createWorker(){this.cleanupInterval.refresh();let e=new Jge.Worker(this.source,{eval:!0,execArgv:[...process.execArgv,\"--unhandled-rejections=strict\"]});return e.on(\"message\",r=>{if(!e[H0])throw new Error(\"Assertion failed: Worker sent a result without having a task assigned\");e[H0].resolve(r),e[H0]=null,e.unref(),this.workers.push(e)}),e.on(\"error\",r=>{e[H0]?.reject(r),e[H0]=null}),e.on(\"exit\",r=>{r!==0&&e[H0]?.reject(new Error(`Worker exited with code ${r}`)),e[H0]=null}),e}run(e){return this.limit(()=>{let r=this.workers.pop()??this.createWorker();return r.ref(),new Promise((s,a)=>{r[H0]={resolve:s,reject:a},r.postMessage(e)})})}}});var Xge=_((j3t,zge)=>{var kG;zge.exports.getContent=()=>(typeof kG>\"u\"&&(kG=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"W2xFdgBPZrjSneDvVbLecg9fIhuy4cX6GuF9CJQpmu4RdNt2tSIi3YZAPJzO1Ju/O0dV1bTkYsgCLThVdbatry9Hd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JNAp/k4W12bz3O4Nv41HnyAiyNezA76pU/JS/73eBuEPXX18LqPLp1t9weEcW4VmdNkx6b32eZXlX6YsmjT8x3A+yBUb3PpEdL8AVcB5Q77kcHip+GhH7XI7OkccRp+pmPGLEO+rClBNSOQPKAmqk3EnybUKU6B1VM1LLAiRDVdCYIuyWo/PLZObqTL99ogi6f8w/Zt+JAFgZSFW387WeqEM8p9GYlrcIyd82D0RMLeqwesdS7U98qUCoouJPlQdsbny6XsU5z7U7JayX135INNTzZCpTbjWP0QNh0G/3skJvN+cYv34bpM58zg/SZQzI5gnoxf2C4WovXcFlo4byite4FpF0/bz7zESslMfq4NsJ1gEGbwG3/8ay+/Wc4yOtz9x9xwHyQSqsGZY4GPWJ6XBfz/sNdaZR1lcxpjc3Ll2oC3/WJ+Xz6rmHxcdxZHpClKgqiWbmZEYBPnjRhytlL4kos67A6SfIUz6COPvWOS4hrSF8Wl/u19O54W+AkK56NnWmW5pmqY5TbHTgdClLDAg92AslKZcu4X3qsiluFx62lA5XZqgqDRo5YYWsqdyk9Vn0Y+5BFggcC5MZ4D5FEs0V4sEK8EA/wPcpDFlWMyvg8WKeNgWb7EbHbqR1d92dlSn0E8nRsdOo+z3J7tbSAC3f9e3SzDJB5xVXbt+Zq3ayiGJzf4KV4Mfkf\",\"base64\")).toString()),kG)});var ps={};Vt(ps,{convertToZip:()=>Yot,convertToZipWorker:()=>RG,extractArchiveTo:()=>rde,getDefaultTaskPool:()=>ede,getTaskPoolForConfiguration:()=>tde,makeArchiveFromDirectory:()=>Wot});function Got(t,e){switch(t){case\"async\":return new Mv(RG,{poolSize:e});case\"workers\":return new Uv((0,TG.getContent)(),{poolSize:e});default:throw new Error(`Assertion failed: Unknown value ${t} for taskPoolMode`)}}function ede(){return typeof QG>\"u\"&&(QG=Got(\"workers\",Ui.availableParallelism())),QG}function tde(t){return typeof t>\"u\"?ede():Yl(qot,t,()=>{let e=t.get(\"taskPoolMode\"),r=t.get(\"taskPoolConcurrency\");switch(e){case\"async\":return new Mv(RG,{poolSize:r});case\"workers\":return new Uv((0,TG.getContent)(),{poolSize:r});default:throw new Error(`Assertion failed: Unknown value ${e} for taskPoolMode`)}})}async function RG(t){let{tmpFile:e,tgz:r,compressionLevel:s,extractBufferOpts:a}=t,n=new As(e,{create:!0,level:s,stats:$a.makeDefaultStats()}),c=Buffer.from(r.buffer,r.byteOffset,r.byteLength);return await rde(c,n,a),n.saveAndClose(),e}async function Wot(t,{baseFs:e=new Yn,prefixPath:r=vt.root,compressionLevel:s,inMemory:a=!1}={}){let n;if(a)n=new As(null,{level:s});else{let f=await ce.mktempPromise(),p=J.join(f,\"archive.zip\");n=new As(p,{create:!0,level:s})}let c=J.resolve(vt.root,r);return await n.copyPromise(c,t,{baseFs:e,stableTime:!0,stableSort:!0}),n}async function Yot(t,e={}){let r=await ce.mktempPromise(),s=J.join(r,\"archive.zip\"),a=e.compressionLevel??e.configuration?.get(\"compressionLevel\")??\"mixed\",n={prefixPath:e.prefixPath,stripComponents:e.stripComponents};return await(e.taskPool??tde(e.configuration)).run({tmpFile:s,tgz:t,compressionLevel:a,extractBufferOpts:n}),new As(s,{level:e.compressionLevel})}async function*Vot(t){let e=new $ge.default.Parse,r=new Zge.PassThrough({objectMode:!0,autoDestroy:!0,emitClose:!0});e.on(\"entry\",s=>{r.write(s)}),e.on(\"error\",s=>{r.destroy(s)}),e.on(\"close\",()=>{r.destroyed||r.end()}),e.end(t);for await(let s of r){let a=s;yield a,a.resume()}}async function rde(t,e,{stripComponents:r=0,prefixPath:s=vt.dot}={}){function a(n){if(n.path[0]===\"/\")return!0;let c=n.path.split(/\\//g);return!!(c.some(f=>f===\"..\")||c.length<=r)}for await(let n of Vot(t)){if(a(n))continue;let c=J.normalize(fe.toPortablePath(n.path)).replace(/\\/$/,\"\").split(/\\//g);if(c.length<=r)continue;let f=c.slice(r).join(\"/\"),p=J.join(s,f),h=420;switch((n.type===\"Directory\"||(n.mode??0)&73)&&(h|=73),n.type){case\"Directory\":e.mkdirpSync(J.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.mkdirSync(p,{mode:h}),e.utimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break;case\"OldFile\":case\"File\":e.mkdirpSync(J.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.writeFileSync(p,await WE(n),{mode:h}),e.utimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break;case\"SymbolicLink\":e.mkdirpSync(J.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.symlinkSync(n.linkpath,p),e.lutimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break}}return e}var Zge,$ge,TG,QG,qot,nde=Xe(()=>{Ge();Dt();eA();Zge=Ie(\"stream\"),$ge=ut(Vge());Kge();Pc();TG=ut(Xge());qot=new WeakMap});var sde=_((FG,ide)=>{(function(t,e){typeof FG==\"object\"?ide.exports=e():typeof define==\"function\"&&define.amd?define(e):t.treeify=e()})(FG,function(){function t(a,n){var c=n?\"\\u2514\":\"\\u251C\";return a?c+=\"\\u2500 \":c+=\"\\u2500\\u2500\\u2510\",c}function e(a,n){var c=[];for(var f in a)a.hasOwnProperty(f)&&(n&&typeof a[f]==\"function\"||c.push(f));return c}function r(a,n,c,f,p,h,E){var C=\"\",S=0,P,I,R=f.slice(0);if(R.push([n,c])&&f.length>0&&(f.forEach(function(U,W){W>0&&(C+=(U[1]?\" \":\"\\u2502\")+\"  \"),!I&&U[0]===n&&(I=!0)}),C+=t(a,c)+a,p&&(typeof n!=\"object\"||n instanceof Date)&&(C+=\": \"+n),I&&(C+=\" (circular ref.)\"),E(C)),!I&&typeof n==\"object\"){var N=e(n,h);N.forEach(function(U){P=++S===N.length,r(U,n[U],P,R,p,h,E)})}}var s={};return s.asLines=function(a,n,c,f){var p=typeof c!=\"function\"?c:!1;r(\".\",a,!1,[],n,p,f||c)},s.asTree=function(a,n,c){var f=\"\";return r(\".\",a,!1,[],n,c,function(p){f+=p+`\n`}),f},s})});var xs={};Vt(xs,{emitList:()=>Jot,emitTree:()=>cde,treeNodeToJson:()=>lde,treeNodeToTreeify:()=>ade});function ade(t,{configuration:e}){let r={},s=0,a=(n,c)=>{let f=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of f){if(!h)continue;let{label:E,value:C,children:S}=h,P=[];typeof E<\"u\"&&P.push(zd(e,E,2)),typeof C<\"u\"&&P.push(Ht(e,C[0],C[1])),P.length===0&&P.push(zd(e,`${p}`,2));let I=P.join(\": \").trim(),R=`\\0${s++}\\0`,N=c[`${R}${I}`]={};typeof S<\"u\"&&a(S,N)}};if(typeof t.children>\"u\")throw new Error(\"The root node must only contain children\");return a(t.children,r),r}function lde(t){let e=r=>{if(typeof r.children>\"u\"){if(typeof r.value>\"u\")throw new Error(\"Assertion failed: Expected a value to be set if the children are missing\");return Xd(r.value[0],r.value[1])}let s=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,c]of s)c&&(a[Kot(n)]=e(c));return typeof r.value>\"u\"?a:{value:Xd(r.value[0],r.value[1]),children:a}};return e(t)}function Jot(t,{configuration:e,stdout:r,json:s}){let a=t.map(n=>({value:n}));cde({children:a},{configuration:e,stdout:r,json:s})}function cde(t,{configuration:e,stdout:r,json:s,separators:a=0}){if(s){let c=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let f of c)f&&r.write(`${JSON.stringify(lde(f))}\n`);return}let n=(0,ode.asTree)(ade(t,{configuration:e}),!1,!1);if(n=n.replace(/\\0[0-9]+\\0/g,\"\"),a>=1&&(n=n.replace(/^([├└]─)/gm,`\\u2502\n$1`).replace(/^│\\n/,\"\")),a>=2)for(let c=0;c<2;++c)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\\n]+\\n)(([│ ]).{2}[├└].{2}[^\\n]*\\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3  \\u2502 \n$2`).replace(/^│\\n/,\"\");if(a>=3)throw new Error(\"Only the first two levels are accepted by treeUtils.emitTree\");r.write(n)}function Kot(t){return typeof t==\"string\"?t.replace(/^\\0[0-9]+\\0/,\"\"):t}var ode,ude=Xe(()=>{ode=ut(sde());xc()});var MR,fde=Xe(()=>{MR=class{constructor(e){this.releaseFunction=e;this.map=new Map}addOrCreate(e,r){let s=this.map.get(e);if(typeof s<\"u\"){if(s.refCount<=0)throw new Error(`Race condition in RefCountedMap. While adding a new key the refCount is: ${s.refCount} for ${JSON.stringify(e)}`);return s.refCount++,{value:s.value,release:()=>this.release(e)}}else{let a=r();return this.map.set(e,{refCount:1,value:a}),{value:a,release:()=>this.release(e)}}}release(e){let r=this.map.get(e);if(!r)throw new Error(`Unbalanced calls to release. No known instances of: ${JSON.stringify(e)}`);let s=r.refCount;if(s<=0)throw new Error(`Unbalanced calls to release. Too many release vs alloc refcount would become: ${s-1} of ${JSON.stringify(e)}`);s==1?(this.map.delete(e),this.releaseFunction(r.value)):r.refCount--}}});function _v(t){let e=t.match(zot);if(!e?.groups)throw new Error(\"Assertion failed: Expected the checksum to match the requested pattern\");let r=e.groups.cacheVersion?parseInt(e.groups.cacheVersion):null;return{cacheKey:e.groups.cacheKey??null,cacheVersion:r,cacheSpec:e.groups.cacheSpec??null,hash:e.groups.hash}}var Ade,NG,OG,UR,Kr,zot,LG=Xe(()=>{Ge();Dt();Dt();eA();Ade=Ie(\"crypto\"),NG=ut(Ie(\"fs\"));fde();Tc();I0();Pc();Wo();OG=YE(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),UR=YE(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Kr=class t{constructor(e,{configuration:r,immutable:s=r.get(\"enableImmutableCache\"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.refCountedZipFsCache=new MR(e=>{e.discardAndClose()});this.cacheId=`-${(0,Ade.randomBytes)(8).toString(\"hex\")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=s,this.check=a;let{cacheSpec:n,cacheKey:c}=t.getCacheKey(r);this.cacheSpec=n,this.cacheKey=c}static async find(e,{immutable:r,check:s}={}){let a=new t(e.get(\"cacheFolder\"),{configuration:e,immutable:r,check:s});return await a.setup(),a}static getCacheKey(e){let r=e.get(\"compressionLevel\"),s=r!==\"mixed\"?`c${r}`:\"\";return{cacheKey:[UR,s].join(\"\"),cacheSpec:s}}get mirrorCwd(){if(!this.configuration.get(\"enableMirror\"))return null;let e=`${this.configuration.get(\"globalFolder\")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${nI(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=_v(r).hash.slice(0,10);return`${nI(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:s}=_v(e);if(r===null||r<OG)return!1;let a=this.configuration.get(\"cacheMigrationMode\");return!(r<UR&&a===\"always\"||s!==this.cacheSpec&&a!==\"required-only\")}getLocatorPath(e,r){return this.mirrorCwd===null?J.resolve(this.cwd,this.getVersionFilename(e)):r===null?J.resolve(this.cwd,this.getVersionFilename(e)):J.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?J.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get(\"enableGlobalCache\"))if(this.immutable){if(!await ce.existsPromise(this.cwd))throw new jt(56,\"Cache path does not exist.\")}else{await ce.mkdirPromise(this.cwd,{recursive:!0});let e=J.resolve(this.cwd,\".gitignore\");await ce.changeFilePromise(e,`/.gitignore\n*.flock\n*.tmp\n`)}(this.mirrorCwd||!this.immutable)&&await ce.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,{onHit:s,onMiss:a,loader:n,...c}){let f=this.getLocatorMirrorPath(e),p=new Yn,h=()=>{let pe=new As,Be=J.join(vt.root,x8(e));return pe.mkdirSync(Be,{recursive:!0}),pe.writeJsonSync(J.join(Be,Er.manifest),{name:un(e),mocked:!0}),pe},E=async(pe,{isColdHit:Be,controlPath:Ce=null})=>{if(Ce===null&&c.unstablePackages?.has(e.locatorHash))return{isValid:!0,hash:null};let g=r&&!Be?_v(r).cacheKey:this.cacheKey,we=!c.skipIntegrityCheck||!r?`${g}/${await SQ(pe)}`:r;if(Ce!==null){let Ae=!c.skipIntegrityCheck||!r?`${this.cacheKey}/${await SQ(Ce)}`:r;if(we!==Ae)throw new jt(18,\"The remote archive doesn't match the local checksum - has the local cache been corrupted?\")}let ye=null;switch(r!==null&&we!==r&&(this.check?ye=\"throw\":_v(r).cacheKey!==_v(we).cacheKey?ye=\"update\":ye=this.configuration.get(\"checksumBehavior\")),ye){case null:case\"update\":return{isValid:!0,hash:we};case\"ignore\":return{isValid:!0,hash:r};case\"reset\":return{isValid:!1,hash:r};default:case\"throw\":throw new jt(18,\"The remote archive doesn't match the expected checksum\")}},C=async pe=>{if(!n)throw new Error(`Cache check required but no loader configured for ${Yr(this.configuration,e)}`);let Be=await n(),Ce=Be.getRealPath();Be.saveAndClose(),await ce.chmodPromise(Ce,420);let g=await E(pe,{controlPath:Ce,isColdHit:!1});if(!g.isValid)throw new Error(\"Assertion failed: Expected a valid checksum\");return g.hash},S=async()=>{if(f===null||!await ce.existsPromise(f)){let pe=await n(),Be=pe.getRealPath();return pe.saveAndClose(),{source:\"loader\",path:Be}}return{source:\"mirror\",path:f}},P=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${Yr(this.configuration,e)}`);if(this.immutable)throw new jt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}`);let{path:pe,source:Be}=await S(),{hash:Ce}=await E(pe,{isColdHit:!0}),g=this.getLocatorPath(e,Ce),we=[];Be!==\"mirror\"&&f!==null&&we.push(async()=>{let Ae=`${f}${this.cacheId}`;await ce.copyFilePromise(pe,Ae,NG.default.constants.COPYFILE_FICLONE),await ce.chmodPromise(Ae,420),await ce.renamePromise(Ae,f)}),(!c.mirrorWriteOnly||f===null)&&we.push(async()=>{let Ae=`${g}${this.cacheId}`;await ce.copyFilePromise(pe,Ae,NG.default.constants.COPYFILE_FICLONE),await ce.chmodPromise(Ae,420),await ce.renamePromise(Ae,g)});let ye=c.mirrorWriteOnly?f??g:g;return await Promise.all(we.map(Ae=>Ae())),[!1,ye,Ce]},I=async()=>{let Be=(async()=>{let Ce=c.unstablePackages?.has(e.locatorHash),g=Ce||!r||this.isChecksumCompatible(r)?this.getLocatorPath(e,r):null,we=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,ye=!!c.mockedPackages?.has(e.locatorHash)&&(!this.check||!we),Ae=ye||we,se=Ae?s:a;if(se&&se(),Ae){let Z=null,De=g;if(!ye)if(this.check)Z=await C(De);else{let Re=await E(De,{isColdHit:!1});if(Re.isValid)Z=Re.hash;else return P()}return[ye,De,Z]}else{if(this.immutable&&Ce)throw new jt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}; consider defining ${he.pretty(this.configuration,\"supportedArchitectures\",he.Type.CODE)} to cache packages for multiple systems`);return P()}})();this.mutexes.set(e.locatorHash,Be);try{return await Be}finally{this.mutexes.delete(e.locatorHash)}};for(let pe;pe=this.mutexes.get(e.locatorHash);)await pe;let[R,N,U]=await I();R||this.markedFiles.add(N);let W=()=>this.refCountedZipFsCache.addOrCreate(N,()=>R?h():new As(N,{baseFs:p,readOnly:!0})),ee,ie=new oE(()=>W4(()=>(ee=W(),ee.value),pe=>`Failed to open the cache entry for ${Yr(this.configuration,e)}: ${pe}`),J),ue=new _f(N,{baseFs:ie,pathUtils:J}),le=()=>{ee?.release()},me=c.unstablePackages?.has(e.locatorHash)?null:U;return[ue,le,me]}},zot=/^(?:(?<cacheKey>(?<cacheVersion>[0-9]+)(?<cacheSpec>.*))\\/)?(?<hash>.*)$/});var _R,pde=Xe(()=>{_R=(r=>(r[r.SCRIPT=0]=\"SCRIPT\",r[r.SHELLCODE=1]=\"SHELLCODE\",r))(_R||{})});var Xot,KI,MG=Xe(()=>{Dt();wc();Rp();Wo();Xot=[[/^(git(?:\\+(?:https|ssh))?:\\/\\/.*(?:\\.git)?)#(.*)$/,(t,e,r,s)=>`${r}#commit=${s}`],[/^https:\\/\\/((?:[^/]+?)@)?codeload\\.github\\.com\\/([^/]+\\/[^/]+)\\/tar\\.gz\\/([0-9a-f]+)$/,(t,e,r=\"\",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https:\\/\\/((?:[^/]+?)@)?github\\.com\\/([^/]+\\/[^/]+?)(?:\\.git)?#([0-9a-f]+)$/,(t,e,r=\"\",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https?:\\/\\/[^/]+\\/(?:[^/]+\\/)*(?:@.+(?:\\/|(?:%2f)))?([^/]+)\\/(?:-|download)\\/\\1-[^/]+\\.tgz(?:#|$)/,t=>`npm:${t}`],[/^https:\\/\\/npm\\.pkg\\.github\\.com\\/download\\/(?:@[^/]+)\\/(?:[^/]+)\\/(?:[^/]+)\\/(?:[0-9a-f]+)(?:#|$)/,t=>`npm:${t}`],[/^https:\\/\\/npm\\.fontawesome\\.com\\/(?:@[^/]+)\\/([^/]+)\\/-\\/([^/]+)\\/\\1-\\2.tgz(?:#|$)/,t=>`npm:${t}`],[/^https?:\\/\\/[^/]+\\/.*\\/(@[^/]+)\\/([^/]+)\\/-\\/\\1\\/\\2-(?:[.\\d\\w-]+)\\.tgz(?:#|$)/,(t,e)=>kQ({protocol:\"npm:\",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],KI=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:r}){let s=J.join(e.cwd,Er.lockfile);if(!ce.existsSync(s))return;let a=await ce.readFilePromise(s,\"utf8\"),n=ls(a);if(Object.hasOwn(n,\"__metadata\"))return;let c=this.resolutions=new Map;for(let f of Object.keys(n)){let p=HB(f);if(!p){r.reportWarning(14,`Failed to parse the string \"${f}\" into a proper descriptor`);continue}let h=cl(p.range)?On(p,`npm:${p.range}`):p,{version:E,resolved:C}=n[f];if(!C)continue;let S;for(let[I,R]of Xot){let N=C.match(I);if(N){S=R(E,...N);break}}if(!S){r.reportWarning(14,`${ni(e.configuration,h)}: Only some patterns can be imported from legacy lockfiles (not \"${C}\")`);continue}let P=h;try{let I=em(h.range),R=HB(I.selector,!0);R&&(P=R)}catch{}c.set(h.descriptorHash,Ws(P,S))}}supportsDescriptor(e,r){return this.resolutions?this.resolutions.has(e.descriptorHash):!1}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error(\"Assertion failed: This resolver doesn't support resolving locators to packages\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!this.resolutions)throw new Error(\"Assertion failed: The resolution store should have been setup\");let a=this.resolutions.get(e.descriptorHash);if(!a)throw new Error(\"Assertion failed: The resolution should have been registered\");let n=S8(a),c=s.project.configuration.normalizeDependency(n);return await this.resolver.getCandidates(c,r,s)}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){throw new Error(\"Assertion failed: This resolver doesn't support resolving locators to packages\")}}});var lA,hde=Xe(()=>{Tc();Ev();xc();lA=class extends Ao{constructor({configuration:r,stdout:s,suggestInstall:a=!0}){super();this.errorCount=0;RB(this,{configuration:r}),this.configuration=r,this.stdout=s,this.suggestInstall=a}static async start(r,s){let a=new this(r);try{await s(a)}catch(n){a.reportExceptionOnce(n)}finally{await a.finalize()}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(r){}reportCacheMiss(r){}startSectionSync(r,s){return s()}async startSectionPromise(r,s){return await s()}startTimerSync(r,s,a){return(typeof s==\"function\"?s:a)()}async startTimerPromise(r,s,a){return await(typeof s==\"function\"?s:a)()}reportSeparator(){}reportInfo(r,s){}reportWarning(r,s){}reportError(r,s){this.errorCount+=1,this.stdout.write(`${Ht(this.configuration,\"\\u27A4\",\"redBright\")} ${this.formatNameWithHyperlink(r)}: ${s}\n`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,s){}async finalize(){this.errorCount>0&&(this.stdout.write(`\n`),this.stdout.write(`${Ht(this.configuration,\"\\u27A4\",\"redBright\")} Errors happened when preparing the environment required to run this command.\n`),this.suggestInstall&&this.stdout.write(`${Ht(this.configuration,\"\\u27A4\",\"redBright\")} This might be caused by packages being missing from the lockfile, in which case running \"yarn install\" might help.\n`))}formatNameWithHyperlink(r){return Wj(r,{configuration:this.configuration,json:!1})}}});var zI,UG=Xe(()=>{Wo();zI=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(bQ(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(e,r){throw new Error(\"The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){let a=s.project.storedResolutions.get(e.descriptorHash);if(a){let c=s.project.originalPackages.get(a);if(c)return[c]}let n=s.project.originalPackages.get(bQ(e).locatorHash);if(n)return[n];throw new Error(\"Resolution expected from the lockfile data\")}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let s=r.project.originalPackages.get(e.locatorHash);if(!s)throw new Error(\"The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache\");return s}}});function Kp(){}function Zot(t,e,r,s,a){for(var n=0,c=e.length,f=0,p=0;n<c;n++){var h=e[n];if(h.removed){if(h.value=t.join(s.slice(p,p+h.count)),p+=h.count,n&&e[n-1].added){var C=e[n-1];e[n-1]=e[n],e[n]=C}}else{if(!h.added&&a){var E=r.slice(f,f+h.count);E=E.map(function(P,I){var R=s[p+I];return R.length>P.length?R:P}),h.value=t.join(E)}else h.value=t.join(r.slice(f,f+h.count));f+=h.count,h.added||(p+=h.count)}}var S=e[c-1];return c>1&&typeof S.value==\"string\"&&(S.added||S.removed)&&t.equals(\"\",S.value)&&(e[c-2].value+=S.value,e.pop()),e}function $ot(t){return{newPos:t.newPos,components:t.components.slice(0)}}function eat(t,e){if(typeof t==\"function\")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function mde(t,e,r){return r=eat(r,{ignoreWhitespace:!0}),qG.diff(t,e,r)}function tat(t,e,r){return WG.diff(t,e,r)}function HR(t){\"@babel/helpers - typeof\";return typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?HR=function(e){return typeof e}:HR=function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},HR(t)}function _G(t){return iat(t)||sat(t)||oat(t)||aat()}function iat(t){if(Array.isArray(t))return HG(t)}function sat(t){if(typeof Symbol<\"u\"&&Symbol.iterator in Object(t))return Array.from(t)}function oat(t,e){if(t){if(typeof t==\"string\")return HG(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r===\"Object\"&&t.constructor&&(r=t.constructor.name),r===\"Map\"||r===\"Set\")return Array.from(t);if(r===\"Arguments\"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return HG(t,e)}}function HG(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}function aat(){throw new TypeError(`Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jG(t,e,r,s,a){e=e||[],r=r||[],s&&(t=s(a,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var c;if(lat.call(t)===\"[object Array]\"){for(e.push(t),c=new Array(t.length),r.push(c),n=0;n<t.length;n+=1)c[n]=jG(t[n],e,r,s,a);return e.pop(),r.pop(),c}if(t&&t.toJSON&&(t=t.toJSON()),HR(t)===\"object\"&&t!==null){e.push(t),c={},r.push(c);var f=[],p;for(p in t)t.hasOwnProperty(p)&&f.push(p);for(f.sort(),n=0;n<f.length;n+=1)p=f[n],c[p]=jG(t[p],e,r,s,p);e.pop(),r.pop()}else c=t;return c}function yde(t,e,r,s,a,n,c){c||(c={}),typeof c.context>\"u\"&&(c.context=4);var f=tat(r,s,c);if(!f)return;f.push({value:\"\",lines:[]});function p(U){return U.map(function(W){return\" \"+W})}for(var h=[],E=0,C=0,S=[],P=1,I=1,R=function(W){var ee=f[W],ie=ee.lines||ee.value.replace(/\\n$/,\"\").split(`\n`);if(ee.lines=ie,ee.added||ee.removed){var ue;if(!E){var le=f[W-1];E=P,C=I,le&&(S=c.context>0?p(le.lines.slice(-c.context)):[],E-=S.length,C-=S.length)}(ue=S).push.apply(ue,_G(ie.map(function(Ae){return(ee.added?\"+\":\"-\")+Ae}))),ee.added?I+=ie.length:P+=ie.length}else{if(E)if(ie.length<=c.context*2&&W<f.length-2){var me;(me=S).push.apply(me,_G(p(ie)))}else{var pe,Be=Math.min(ie.length,c.context);(pe=S).push.apply(pe,_G(p(ie.slice(0,Be))));var Ce={oldStart:E,oldLines:P-E+Be,newStart:C,newLines:I-C+Be,lines:S};if(W>=f.length-2&&ie.length<=c.context){var g=/\\n$/.test(r),we=/\\n$/.test(s),ye=ie.length==0&&S.length>Ce.oldLines;!g&&ye&&r.length>0&&S.splice(Ce.oldLines,0,\"\\\\ No newline at end of file\"),(!g&&!ye||!we)&&S.push(\"\\\\ No newline at end of file\")}h.push(Ce),E=0,C=0,S=[]}P+=ie.length,I+=ie.length}},N=0;N<f.length;N++)R(N);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:h}}var y8t,gde,dde,qG,WG,rat,nat,lat,Hv,GG,YG=Xe(()=>{Kp.prototype={diff:function(e,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=s.callback;typeof s==\"function\"&&(a=s,s={}),this.options=s;var n=this;function c(R){return a?(setTimeout(function(){a(void 0,R)},0),!0):R}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var f=r.length,p=e.length,h=1,E=f+p;s.maxEditLength&&(E=Math.min(E,s.maxEditLength));var C=[{newPos:-1,components:[]}],S=this.extractCommon(C[0],r,e,0);if(C[0].newPos+1>=f&&S+1>=p)return c([{value:this.join(r),count:r.length}]);function P(){for(var R=-1*h;R<=h;R+=2){var N=void 0,U=C[R-1],W=C[R+1],ee=(W?W.newPos:0)-R;U&&(C[R-1]=void 0);var ie=U&&U.newPos+1<f,ue=W&&0<=ee&&ee<p;if(!ie&&!ue){C[R]=void 0;continue}if(!ie||ue&&U.newPos<W.newPos?(N=$ot(W),n.pushComponent(N.components,void 0,!0)):(N=U,N.newPos++,n.pushComponent(N.components,!0,void 0)),ee=n.extractCommon(N,r,e,R),N.newPos+1>=f&&ee+1>=p)return c(Zot(n,N.components,r,e,n.useLongestToken));C[R]=N}h++}if(a)(function R(){setTimeout(function(){if(h>E)return a();P()||R()},0)})();else for(;h<=E;){var I=P();if(I)return I}},pushComponent:function(e,r,s){var a=e[e.length-1];a&&a.added===r&&a.removed===s?e[e.length-1]={count:a.count+1,added:r,removed:s}:e.push({count:1,added:r,removed:s})},extractCommon:function(e,r,s,a){for(var n=r.length,c=s.length,f=e.newPos,p=f-a,h=0;f+1<n&&p+1<c&&this.equals(r[f+1],s[p+1]);)f++,p++,h++;return h&&e.components.push({count:h}),e.newPos=f,p},equals:function(e,r){return this.options.comparator?this.options.comparator(e,r):e===r||this.options.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],s=0;s<e.length;s++)e[s]&&r.push(e[s]);return r},castInput:function(e){return e},tokenize:function(e){return e.split(\"\")},join:function(e){return e.join(\"\")}};y8t=new Kp;gde=/^[A-Za-z\\xC0-\\u02C6\\u02C8-\\u02D7\\u02DE-\\u02FF\\u1E00-\\u1EFF]+$/,dde=/\\S/,qG=new Kp;qG.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!dde.test(t)&&!dde.test(e)};qG.tokenize=function(t){for(var e=t.split(/([^\\S\\r\\n]+|[()[\\]{}'\"\\r\\n]|\\b)/),r=0;r<e.length-1;r++)!e[r+1]&&e[r+2]&&gde.test(e[r])&&gde.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};WG=new Kp;WG.tokenize=function(t){var e=[],r=t.split(/(\\n|\\r\\n)/);r[r.length-1]||r.pop();for(var s=0;s<r.length;s++){var a=r[s];s%2&&!this.options.newlineIsToken?e[e.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),e.push(a))}return e};rat=new Kp;rat.tokenize=function(t){return t.split(/(\\S.+?[.!?])(?=\\s+|$)/)};nat=new Kp;nat.tokenize=function(t){return t.split(/([{}:;,]|\\s+)/)};lat=Object.prototype.toString,Hv=new Kp;Hv.useLongestToken=!0;Hv.tokenize=WG.tokenize;Hv.castInput=function(t){var e=this.options,r=e.undefinedReplacement,s=e.stringifyReplacer,a=s===void 0?function(n,c){return typeof c>\"u\"?r:c}:s;return typeof t==\"string\"?t:JSON.stringify(jG(t,null,null,a),a,\"  \")};Hv.equals=function(t,e){return Kp.prototype.equals.call(Hv,t.replace(/,([\\r\\n])/g,\"$1\"),e.replace(/,([\\r\\n])/g,\"$1\"))};GG=new Kp;GG.tokenize=function(t){return t.slice()};GG.join=GG.removeEmpty=function(t){return t}});var jR,Ede=Xe(()=>{Tc();jR=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return this.resolver.supportsDescriptor(e,r)}supportsLocator(e,r){return this.resolver.supportsLocator(e,r)}shouldPersistResolution(e,r){return this.resolver.shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.resolver.bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){throw new jt(20,`This package doesn't seem to be present in your lockfile; run \"yarn install\" to update the lockfile`)}async getSatisfying(e,r,s,a){throw new jt(20,`This package doesn't seem to be present in your lockfile; run \"yarn install\" to update the lockfile`)}async resolve(e,r){throw new jt(20,`This package doesn't seem to be present in your lockfile; run \"yarn install\" to update the lockfile`)}}});var ki,VG=Xe(()=>{Tc();ki=class extends Ao{reportCacheHit(e){}reportCacheMiss(e){}startSectionSync(e,r){return r()}async startSectionPromise(e,r){return await r()}startTimerSync(e,r,s){return(typeof r==\"function\"?r:s)()}async startTimerPromise(e,r,s){return await(typeof r==\"function\"?r:s)()}reportSeparator(){}reportInfo(e,r){}reportWarning(e,r){}reportError(e,r){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(let{}of e);}),stop:()=>{}}}reportJson(e){}reportFold(e,r){}async finalize(){}}});var Ide,XI,JG=Xe(()=>{Dt();Ide=ut(BQ());oI();tm();xc();I0();Rp();Wo();XI=class{constructor(e,{project:r}){this.workspacesCwds=new Set;this.project=r,this.cwd=e}async setup(){this.manifest=await Ut.tryFind(this.cwd)??new Ut,this.relativeCwd=J.relative(this.project.cwd,this.cwd)||vt.dot;let e=this.manifest.name?this.manifest.name:Da(null,`${this.computeCandidateName()}-${us(this.relativeCwd).substring(0,6)}`);this.anchoredDescriptor=On(e,`${Ei.protocol}${this.relativeCwd}`),this.anchoredLocator=Ws(e,`${Ei.protocol}${this.relativeCwd}`);let r=this.manifest.workspaceDefinitions.map(({pattern:a})=>a);if(r.length===0)return;let s=await(0,Ide.default)(r,{cwd:fe.fromPortablePath(this.cwd),onlyDirectories:!0,ignore:[\"**/node_modules\",\"**/.git\",\"**/.yarn\"]});s.sort(),await s.reduce(async(a,n)=>{let c=J.resolve(this.cwd,fe.toPortablePath(n)),f=await ce.existsPromise(J.join(c,\"package.json\"));await a,f&&this.workspacesCwds.add(c)},Promise.resolve())}get anchoredPackage(){let e=this.project.storedPackages.get(this.anchoredLocator.locatorHash);if(!e)throw new Error(`Assertion failed: Expected workspace ${GB(this.project.configuration,this)} (${Ht(this.project.configuration,J.join(this.cwd,Er.manifest),ht.PATH)}) to have been resolved. Run \"yarn install\" to update the lockfile`);return e}accepts(e){let r=e.indexOf(\":\"),s=r!==-1?e.slice(0,r+1):null,a=r!==-1?e.slice(r+1):e;if(s===Ei.protocol&&J.normalize(a)===this.relativeCwd||s===Ei.protocol&&(a===\"*\"||a===\"^\"||a===\"~\"))return!0;let n=cl(a);return n?s===Ei.protocol?n.test(this.manifest.version??\"0.0.0\"):this.project.configuration.get(\"enableTransparentWorkspaces\")&&this.manifest.version!==null?n.test(this.manifest.version):!1:!1}computeCandidateName(){return this.cwd===this.project.cwd?\"root-workspace\":`${J.basename(this.cwd)}`||\"unnamed-workspace\"}getRecursiveWorkspaceDependencies({dependencies:e=Ut.hardDependencies}={}){let r=new Set,s=a=>{for(let n of e)for(let c of a.manifest[n].values()){let f=this.project.tryWorkspaceByDescriptor(c);f===null||r.has(f)||(r.add(f),s(f))}};return s(this),r}getRecursiveWorkspaceDependents({dependencies:e=Ut.hardDependencies}={}){let r=new Set,s=a=>{for(let n of this.project.workspaces)e.some(f=>[...n.manifest[f].values()].some(p=>{let h=this.project.tryWorkspaceByDescriptor(p);return h!==null&&_B(h.anchoredLocator,a.anchoredLocator)}))&&!r.has(n)&&(r.add(n),s(n))};return s(this),r}getRecursiveWorkspaceChildren(){let e=new Set([this]);for(let r of e)for(let s of r.workspacesCwds){let a=this.project.workspacesByCwd.get(s);a&&e.add(a)}return e.delete(this),Array.from(e)}async persistManifest(){let e={};this.manifest.exportTo(e);let r=J.join(this.cwd,Ut.fileName),s=`${JSON.stringify(e,null,this.manifest.indent)}\n`;await ce.changeFilePromise(r,s,{automaticNewlines:!0}),this.manifest.raw=e}}});function hat({project:t,allDescriptors:e,allResolutions:r,allPackages:s,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:c=new Map,peerWarnings:f=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,C=[],S=new Map,P=new Map,I=new Map,R=new Map,N=new Map,U=new Map(t.workspaces.map(le=>{let me=le.anchoredLocator.locatorHash,pe=s.get(me);if(typeof pe>\"u\")throw new Error(\"Assertion failed: The workspace should have an associated package\");return[me,LB(pe)]})),W=()=>{let le=ce.mktempSync(),me=J.join(le,\"stacktrace.log\"),pe=String(C.length+1).length,Be=C.map((Ce,g)=>`${`${g+1}.`.padStart(pe,\" \")} ${ll(Ce)}\n`).join(\"\");throw ce.writeFileSync(me,Be),ce.detachTemp(le),new jt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${fe.fromPortablePath(me)}`)},ee=le=>{let me=r.get(le.descriptorHash);if(typeof me>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");let pe=s.get(me);if(!pe)throw new Error(\"Assertion failed: The package could not be found\");return pe},ie=(le,me,pe,{top:Be,optional:Ce})=>{C.length>1e3&&W(),C.push(me);let g=ue(le,me,pe,{top:Be,optional:Ce});return C.pop(),g},ue=(le,me,pe,{top:Be,optional:Ce})=>{if(Ce||n.delete(me.locatorHash),a.has(me.locatorHash))return;a.add(me.locatorHash);let g=s.get(me.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${Yr(t.configuration,me)}) should have been registered`);let we=new Set,ye=new Map,Ae=[],se=[],Z=[],De=[];for(let Re of Array.from(g.dependencies.values())){if(g.peerDependencies.has(Re.identHash)&&g.locatorHash!==Be)continue;if(kp(Re))throw new Error(\"Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch\");h.delete(Re.descriptorHash);let mt=Ce;if(!mt){let ke=g.dependenciesMeta.get(un(Re));if(typeof ke<\"u\"){let it=ke.get(null);typeof it<\"u\"&&it.optional&&(mt=!0)}}let j=r.get(Re.descriptorHash);if(!j)throw new Error(`Assertion failed: The resolution (${ni(t.configuration,Re)}) should have been registered`);let rt=U.get(j)||s.get(j);if(!rt)throw new Error(`Assertion failed: The package (${j}, resolved from ${ni(t.configuration,Re)}) should have been registered`);if(rt.peerDependencies.size===0){ie(Re,rt,new Map,{top:Be,optional:mt});continue}let Fe,Ne,Pe=new Set,Ve=new Map;Ae.push(()=>{Fe=b8(Re,me.locatorHash),Ne=P8(rt,me.locatorHash),g.dependencies.set(Re.identHash,Fe),r.set(Fe.descriptorHash,Ne.locatorHash),e.set(Fe.descriptorHash,Fe),s.set(Ne.locatorHash,Ne),bp(R,Ne.locatorHash).add(Fe.descriptorHash),we.add(Ne.locatorHash)}),se.push(()=>{N.set(Ne.locatorHash,Ve);for(let ke of Ne.peerDependencies.values()){let Ue=Yl(ye,ke.identHash,()=>{let x=pe.get(ke.identHash)??null,w=g.dependencies.get(ke.identHash);return!w&&UB(me,ke)&&(le.identHash===me.identHash?w=le:(w=On(me,le.range),e.set(w.descriptorHash,w),r.set(w.descriptorHash,me.locatorHash),h.delete(w.descriptorHash),x=null)),w||(w=On(ke,\"missing:\")),{subject:me,ident:ke,provided:w,root:!x,requests:new Map,hash:`p${us(me.locatorHash,ke.identHash).slice(0,6)}`}}).provided;if(Ue.range===\"missing:\"&&Ne.dependencies.has(ke.identHash)){Ne.peerDependencies.delete(ke.identHash);continue}if(Ve.set(ke.identHash,{requester:Ne,descriptor:ke,meta:Ne.peerDependenciesMeta.get(un(ke)),children:new Map}),Ne.dependencies.set(ke.identHash,Ue),kp(Ue)){let x=r.get(Ue.descriptorHash);bp(I,x).add(Ne.locatorHash)}S.set(Ue.identHash,Ue),Ue.range===\"missing:\"&&Pe.add(Ue.identHash)}Ne.dependencies=new Map(qs(Ne.dependencies,([ke,it])=>un(it)))}),Z.push(()=>{if(!s.has(Ne.locatorHash))return;let ke=E.get(rt.locatorHash);typeof ke==\"number\"&&ke>=2&&W();let it=E.get(rt.locatorHash),Ue=typeof it<\"u\"?it+1:1;E.set(rt.locatorHash,Ue),ie(Fe,Ne,Ve,{top:Be,optional:mt}),E.set(rt.locatorHash,Ue-1)}),De.push(()=>{let ke=r.get(Fe.descriptorHash);if(typeof ke>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let it=N.get(ke);if(typeof it>\"u\")throw new Error(\"Assertion failed: Expected the peer requests to be registered\");for(let Ue of ye.values()){let x=it.get(Ue.ident.identHash);x&&(Ue.requests.set(Fe.descriptorHash,x),p.set(Ue.hash,Ue),Ue.root||pe.get(Ue.ident.identHash)?.children.set(Fe.descriptorHash,x))}if(s.has(Ne.locatorHash))for(let Ue of Pe)Ne.dependencies.delete(Ue)})}for(let Re of[...Ae,...se])Re();for(let Re of we){we.delete(Re);let mt=s.get(Re),j=us(rI(mt).locatorHash,...Array.from(mt.dependencies.values(),Pe=>{let Ve=Pe.range!==\"missing:\"?r.get(Pe.descriptorHash):\"missing:\";if(typeof Ve>\"u\")throw new Error(`Assertion failed: Expected the resolution for ${ni(t.configuration,Pe)} to have been registered`);return Ve===Be?`${Ve} (top)`:Ve})),rt=P.get(j);if(typeof rt>\"u\"){P.set(j,mt);continue}let Fe=bp(R,rt.locatorHash);for(let Pe of R.get(mt.locatorHash)??[])r.set(Pe,rt.locatorHash),Fe.add(Pe);s.delete(mt.locatorHash),a.delete(mt.locatorHash),we.delete(mt.locatorHash);let Ne=I.get(mt.locatorHash);if(Ne!==void 0){let Pe=bp(I,rt.locatorHash);for(let Ve of Ne)Pe.add(Ve),we.add(Ve)}}for(let Re of[...Z,...De])Re()};for(let le of t.workspaces){let me=le.anchoredLocator;h.delete(le.anchoredDescriptor.descriptorHash),ie(le.anchoredDescriptor,me,new Map,{top:me.locatorHash,optional:!1})}for(let le of p.values()){if(!le.root)continue;let me=s.get(le.subject.locatorHash);if(typeof me>\"u\")continue;for(let Be of le.requests.values()){let Ce=`p${us(le.subject.locatorHash,un(le.ident),Be.requester.locatorHash).slice(0,6)}`;c.set(Ce,{subject:le.subject.locatorHash,requested:le.ident,rootRequester:Be.requester.locatorHash,allRequesters:Array.from(qB(Be),g=>g.requester.locatorHash)})}let pe=[...qB(le)];if(le.provided.range!==\"missing:\"){let Be=ee(le.provided),Ce=Be.version??\"0.0.0\",g=ye=>{if(ye.startsWith(Ei.protocol)){if(!t.tryWorkspaceByLocator(Be))return null;ye=ye.slice(Ei.protocol.length),(ye===\"^\"||ye===\"~\")&&(ye=\"*\")}return ye},we=!0;for(let ye of pe){let Ae=g(ye.descriptor.range);if(Ae===null){we=!1;continue}if(!Zf(Ce,Ae)){we=!1;let se=`p${us(le.subject.locatorHash,un(le.ident),ye.requester.locatorHash).slice(0,6)}`;f.push({type:1,subject:me,requested:le.ident,requester:ye.requester,version:Ce,hash:se,requirementCount:pe.length})}}if(!we){let ye=pe.map(Ae=>g(Ae.descriptor.range));f.push({type:3,node:le,range:ye.includes(null)?null:Q8(ye),hash:le.hash})}}else{let Be=!0;for(let Ce of pe)if(!Ce.meta?.optional){Be=!1;let g=`p${us(le.subject.locatorHash,un(le.ident),Ce.requester.locatorHash).slice(0,6)}`;f.push({type:0,subject:me,requested:le.ident,requester:Ce.requester,hash:g})}Be||f.push({type:2,node:le,hash:le.hash})}}}function*gat(t){let e=new Map;if(\"children\"in t)e.set(t,t);else for(let r of t.requests.values())e.set(r,r);for(let[r,s]of e){yield{request:r,root:s};for(let a of r.children.values())e.has(a)||e.set(a,s)}}function dat(t,e){let r=[],s=[],a=!1;for(let n of t.peerWarnings)if(!(n.type===1||n.type===0)){if(!t.tryWorkspaceByLocator(n.node.subject)){a=!0;continue}if(n.type===3){let c=t.storedResolutions.get(n.node.provided.descriptorHash);if(typeof c>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let f=t.storedPackages.get(c);if(typeof f>\"u\")throw new Error(\"Assertion failed: Expected the package to be registered\");let p=p0(gat(n.node),({request:C,root:S})=>Zf(f.version??\"0.0.0\",C.descriptor.range)?p0.skip:C===S?$i(t.configuration,C.requester):`${$i(t.configuration,C.requester)} (via ${$i(t.configuration,S.requester)})`),h=[...qB(n.node)].length>1?\"and other dependencies request\":\"requests\",E=n.range?iI(t.configuration,n.range):Ht(t.configuration,\"but they have non-overlapping ranges!\",\"redBright\");r.push(`${$i(t.configuration,n.node.ident)} is listed by your project with version ${jB(t.configuration,f.version??\"0.0.0\")} (${Ht(t.configuration,n.hash,ht.CODE)}), which doesn't satisfy what ${p} ${h} (${E}).`)}if(n.type===2){let c=n.node.requests.size>1?\" and other dependencies\":\"\";s.push(`${Yr(t.configuration,n.node.subject)} doesn't provide ${$i(t.configuration,n.node.ident)} (${Ht(t.configuration,n.hash,ht.CODE)}), requested by ${$i(t.configuration,n.node.requests.values().next().value.requester)}${c}.`)}}e.startSectionSync({reportFooter:()=>{e.reportWarning(86,`Some peer dependencies are incorrectly met by your project; run ${Ht(t.configuration,\"yarn explain peer-requirements <hash>\",ht.CODE)} for details, where ${Ht(t.configuration,\"<hash>\",ht.CODE)} is the six-letter p-prefixed code.`)},skipIfEmpty:!0},()=>{for(let n of qs(r,c=>JE.default(c)))e.reportWarning(60,n);for(let n of qs(s,c=>JE.default(c)))e.reportWarning(2,n)}),a&&e.reportWarning(86,`Some peer dependencies are incorrectly met by dependencies; run ${Ht(t.configuration,\"yarn explain peer-requirements\",ht.CODE)} for details.`)}var GR,qR,Bde,XG,zG,ZG,WR,cat,uat,Cde,fat,Aat,pat,$l,KG,YR,wde,Tt,vde=Xe(()=>{Dt();Dt();wc();Yt();GR=Ie(\"crypto\");YG();ql();qR=ut(Ld()),Bde=ut(Ai()),XG=Ie(\"util\"),zG=ut(Ie(\"v8\")),ZG=ut(Ie(\"zlib\"));LG();av();MG();UG();oI();F8();Tc();Ede();Ev();VG();tm();JG();LQ();xc();I0();Pc();gT();zj();Rp();Wo();WR=YE(process.env.YARN_LOCKFILE_VERSION_OVERRIDE??8),cat=3,uat=/ *, */g,Cde=/\\/$/,fat=32,Aat=(0,XG.promisify)(ZG.default.gzip),pat=(0,XG.promisify)(ZG.default.gunzip),$l=(r=>(r.UpdateLockfile=\"update-lockfile\",r.SkipBuild=\"skip-build\",r))($l||{}),KG={restoreLinkersCustomData:[\"linkersCustomData\"],restoreResolutions:[\"accessibleLocators\",\"conditionalLocators\",\"disabledLocators\",\"optionalBuilds\",\"storedDescriptors\",\"storedResolutions\",\"storedPackages\",\"lockFileChecksum\"],restoreBuildState:[\"skippedBuilds\",\"storedBuildState\"]},YR=(a=>(a[a.NotProvided=0]=\"NotProvided\",a[a.NotCompatible=1]=\"NotCompatible\",a[a.NodeNotProvided=2]=\"NodeNotProvided\",a[a.NodeNotCompatible=3]=\"NodeNotCompatible\",a))(YR||{}),wde=t=>us(`${cat}`,t),Tt=class t{constructor(e,{configuration:r}){this.resolutionAliases=new Map;this.workspaces=[];this.workspacesByCwd=new Map;this.workspacesByIdent=new Map;this.storedResolutions=new Map;this.storedDescriptors=new Map;this.storedPackages=new Map;this.storedChecksums=new Map;this.storedBuildState=new Map;this.accessibleLocators=new Set;this.conditionalLocators=new Set;this.disabledLocators=new Set;this.originalPackages=new Map;this.optionalBuilds=new Set;this.skippedBuilds=new Set;this.lockfileLastVersion=null;this.lockfileNeedsRefresh=!1;this.peerRequirements=new Map;this.peerWarnings=[];this.peerRequirementNodes=new Map;this.linkersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=r,this.cwd=e}static async find(e,r){if(!e.projectCwd)throw new nt(`No project found in ${r}`);let s=e.projectCwd,a=r,n=null;for(;n!==e.projectCwd;){if(n=a,ce.existsSync(J.join(n,Er.manifest))){s=n;break}a=J.dirname(n)}let c=new t(e.projectCwd,{configuration:e});ze.telemetry?.reportProject(c.cwd),await c.setupResolutions(),await c.setupWorkspaces(),ze.telemetry?.reportWorkspaceCount(c.workspaces.length),ze.telemetry?.reportDependencyCount(c.workspaces.reduce((I,R)=>I+R.manifest.dependencies.size+R.manifest.devDependencies.size,0));let f=c.tryWorkspaceByCwd(s);if(f)return{project:c,workspace:f,locator:f.anchoredLocator};let p=await c.findLocatorForLocation(`${s}/`,{strict:!0});if(p)return{project:c,locator:p,workspace:null};let h=Ht(e,c.cwd,ht.PATH),E=Ht(e,J.relative(c.cwd,s),ht.PATH),C=`- If ${h} isn't intended to be a project, remove any yarn.lock and/or package.json file there.`,S=`- If ${h} is intended to be a project, it might be that you forgot to list ${E} in its workspace configuration.`,P=`- Finally, if ${h} is fine and you intend ${E} to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.`;throw new nt(`The nearest package directory (${Ht(e,s,ht.PATH)}) doesn't seem to be part of the project declared in ${Ht(e,c.cwd,ht.PATH)}.\n\n${[C,S,P].join(`\n`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=J.join(this.cwd,Er.lockfile),r=this.configuration.get(\"defaultLanguageName\");if(ce.existsSync(e)){let s=await ce.readFilePromise(e,\"utf8\");this.lockFileChecksum=wde(s);let a=ls(s);if(a.__metadata){let n=a.__metadata.version,c=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<WR;for(let f of Object.keys(a)){if(f===\"__metadata\")continue;let p=a[f];if(typeof p.resolution>\"u\")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${f})`);let h=Qp(p.resolution,!0),E=new Ut;E.load(p,{yamlCompatibilityMode:!0});let C=E.version,S=E.languageName||r,P=p.linkType.toUpperCase(),I=p.conditions??null,R=E.dependencies,N=E.peerDependencies,U=E.dependenciesMeta,W=E.peerDependenciesMeta,ee=E.bin;if(p.checksum!=null){let ue=typeof c<\"u\"&&!p.checksum.includes(\"/\")?`${c}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,ue)}let ie={...h,version:C,languageName:S,linkType:P,conditions:I,dependencies:R,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:W,bin:ee};this.originalPackages.set(ie.locatorHash,ie);for(let ue of f.split(uat)){let le=C0(ue);n<=6&&(le=this.configuration.normalizeDependency(le),le=On(le,le.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,\"$1npm%3A\"))),this.storedDescriptors.set(le.descriptorHash,le),this.storedResolutions.set(le.descriptorHash,h.locatorHash)}}}else s.includes(\"yarn lockfile v1\")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,qR.default)(4),s=async(a,n)=>{if(e.has(n))return a;e.add(n);let c=new XI(n,{project:this});await r(()=>c.setup());let f=a.then(()=>{this.addWorkspace(c)});return Array.from(c.workspacesCwds).reduce(s,f)};await s(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeof r<\"u\")throw new Error(`Duplicate workspace name ${$i(this.configuration,e.anchoredLocator)}: ${fe.fromPortablePath(e.cwd)} conflicts with ${fe.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){J.isAbsolute(e)||(e=J.resolve(this.cwd,e)),e=J.normalize(e).replace(/\\/+$/,\"\");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let s of this.workspaces)J.relative(s.cwd,e).startsWith(\"../\")||r&&r.cwd.length>=s.cwd.length||(r=s);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r>\"u\"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${$i(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(Ei.protocol)){let s=e.range.slice(Ei.protocol.length);if(s!==\"^\"&&s!==\"~\"&&s!==\"*\"&&!cl(s))return this.tryWorkspaceByCwd(s)}let r=this.tryWorkspaceByIdent(e);return r===null||(kp(e)&&(e=MB(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${ni(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Gu(e)&&(e=rI(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${Yr(this.configuration,e)})`);return r}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolution(e){if(\"descriptorHash\"in e){let r=this.storedResolutions.get(e.descriptorHash);this.deleteDescriptor(e.descriptorHash);let s=new Set(this.storedResolutions.values());typeof r<\"u\"&&!s.has(r)&&this.deleteLocator(r)}if(\"locatorHash\"in e){this.deleteLocator(e.locatorHash);for(let[r,s]of this.storedResolutions)s===e.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let e=this.configuration.makeResolver(),r=new Map;for(let[s,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(s)}for(let s of this.originalPackages.values()){let a;try{a=e.shouldPersistResolution(s,{project:this,resolver:e})}catch{a=!1}if(!a){this.deleteLocator(s.locatorHash);let n=r.get(s.locatorHash);if(n){r.delete(s.locatorHash);for(let c of n)this.deleteDescriptor(c)}}}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,s]of e.dependencies)kp(s)&&e.dependencies.set(r,MB(s))}getDependencyMeta(e,r){let s={},n=this.topLevelWorkspace.manifest.dependenciesMeta.get(un(e));if(!n)return s;let c=n.get(null);if(c&&Object.assign(s,c),r===null||!Bde.default.valid(r))return s;for(let[f,p]of n)f!==null&&f===r&&Object.assign(s,p);return s}async findLocatorForLocation(e,{strict:r=!1}={}){let s=new ki,a=this.configuration.getLinkers(),n={project:this,report:s};for(let c of a){let f=await c.findPackageLocator(e,n);if(f){if(r&&(await c.findPackageLocation(f,n)).replace(Cde,\"\")!==e.replace(Cde,\"\"))continue;return f}}return null}async loadUserConfig(){let e=J.join(this.cwd,\".pnp.cjs\");await ce.existsPromise(e)&&Pp(e).setup();let r=J.join(this.cwd,\"yarn.config.cjs\");return await ce.existsPromise(r)?Pp(r):null}async preparePackage(e,{resolver:r,resolveOptions:s}){let a=await this.configuration.getPackageExtensions(),n=this.configuration.normalizePackage(e,{packageExtensions:a});for(let[c,f]of n.dependencies){let p=await this.configuration.reduceHook(E=>E.reduceDependency,f,this,n,f,{resolver:r,resolveOptions:s});if(!UB(f,p))throw new Error(\"Assertion failed: The descriptor ident cannot be changed through aliases\");let h=r.bindDescriptor(p,n,s);n.dependencies.set(c,h)}return n}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error(\"Workspaces must have been setup before calling this function\");this.forgetVirtualResolutions();let r=new Map(this.originalPackages),s=[];e.lockfileOnly||this.forgetTransientResolutions();let a=e.resolver||this.configuration.makeResolver(),n=new KI(a);await n.setup(this,{report:e.report});let c=e.lockfileOnly?[new jR(a)]:[n,a],f=new rm([new zI(a),...c]),p=new rm([...c]),h=this.configuration.makeFetcher(),E=e.lockfileOnly?{project:this,report:e.report,resolver:f}:{project:this,report:e.report,resolver:f,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:h,cacheOptions:{mirrorWriteOnly:!0}}},C=new Map,S=new Map,P=new Map,I=new Map,R=new Map,N=new Map,U=this.topLevelWorkspace.anchoredLocator,W=new Set,ee=[],ie=uj(),ue=this.configuration.getSupportedArchitectures();await e.report.startProgressPromise(Ao.progressViaTitle(),async se=>{let Z=async rt=>{let Fe=await qE(async()=>await f.resolve(rt,E),ke=>`${Yr(this.configuration,rt)}: ${ke}`);if(!_B(rt,Fe))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${Yr(this.configuration,rt)} to ${Yr(this.configuration,Fe)})`);I.set(Fe.locatorHash,Fe),!r.delete(Fe.locatorHash)&&!this.tryWorkspaceByLocator(Fe)&&s.push(Fe);let Pe=await this.preparePackage(Fe,{resolver:f,resolveOptions:E}),Ve=Uu([...Pe.dependencies.values()].map(ke=>j(ke)));return ee.push(Ve),Ve.catch(()=>{}),S.set(Pe.locatorHash,Pe),Pe},De=async rt=>{let Fe=R.get(rt.locatorHash);if(typeof Fe<\"u\")return Fe;let Ne=Promise.resolve().then(()=>Z(rt));return R.set(rt.locatorHash,Ne),Ne},Re=async(rt,Fe)=>{let Ne=await j(Fe);return C.set(rt.descriptorHash,rt),P.set(rt.descriptorHash,Ne.locatorHash),Ne},mt=async rt=>{se.setTitle(ni(this.configuration,rt));let Fe=this.resolutionAliases.get(rt.descriptorHash);if(typeof Fe<\"u\")return Re(rt,this.storedDescriptors.get(Fe));let Ne=f.getResolutionDependencies(rt,E),Pe=Object.fromEntries(await Uu(Object.entries(Ne).map(async([it,Ue])=>{let x=f.bindDescriptor(Ue,U,E),w=await j(x);return W.add(w.locatorHash),[it,w]}))),ke=(await qE(async()=>await f.getCandidates(rt,Pe,E),it=>`${ni(this.configuration,rt)}: ${it}`))[0];if(typeof ke>\"u\")throw new jt(82,`${ni(this.configuration,rt)}: No candidates found`);if(e.checkResolutions){let{locators:it}=await p.getSatisfying(rt,Pe,[ke],{...E,resolver:p});if(!it.find(Ue=>Ue.locatorHash===ke.locatorHash))throw new jt(78,`Invalid resolution ${FB(this.configuration,rt,ke)}`)}return C.set(rt.descriptorHash,rt),P.set(rt.descriptorHash,ke.locatorHash),De(ke)},j=rt=>{let Fe=N.get(rt.descriptorHash);if(typeof Fe<\"u\")return Fe;C.set(rt.descriptorHash,rt);let Ne=Promise.resolve().then(()=>mt(rt));return N.set(rt.descriptorHash,Ne),Ne};for(let rt of this.workspaces){let Fe=rt.anchoredDescriptor;ee.push(j(Fe))}for(;ee.length>0;){let rt=[...ee];ee.length=0,await Uu(rt)}});let le=Wl(r.values(),se=>this.tryWorkspaceByLocator(se)?Wl.skip:se);if(s.length>0||le.length>0){let se=new Set(this.workspaces.flatMap(rt=>{let Fe=S.get(rt.anchoredLocator.locatorHash);if(!Fe)throw new Error(\"Assertion failed: The workspace should have been resolved\");return Array.from(Fe.dependencies.values(),Ne=>{let Pe=P.get(Ne.descriptorHash);if(!Pe)throw new Error(\"Assertion failed: The resolution should have been registered\");return Pe})})),Z=rt=>se.has(rt.locatorHash)?\"0\":\"1\",De=rt=>ll(rt),Re=qs(s,[Z,De]),mt=qs(le,[Z,De]),j=e.report.getRecommendedLength();Re.length>0&&e.report.reportInfo(85,`${Ht(this.configuration,\"+\",ht.ADDED)} ${$k(this.configuration,Re,j)}`),mt.length>0&&e.report.reportInfo(85,`${Ht(this.configuration,\"-\",ht.REMOVED)} ${$k(this.configuration,mt,j)}`)}let me=new Set(this.resolutionAliases.values()),pe=new Set(S.keys()),Be=new Set,Ce=new Map,g=[],we=new Map;hat({project:this,accessibleLocators:Be,volatileDescriptors:me,optionalBuilds:pe,peerRequirements:Ce,peerWarnings:g,peerRequirementNodes:we,allDescriptors:C,allResolutions:P,allPackages:S});for(let se of W)pe.delete(se);for(let se of me)C.delete(se),P.delete(se);let ye=new Set,Ae=new Set;for(let se of S.values())se.conditions!=null&&pe.has(se.locatorHash)&&(TQ(se,ue)||(TQ(se,ie)&&e.report.reportWarningOnce(77,`${Yr(this.configuration,se)}: Your current architecture (${process.platform}-${process.arch}) is supported by this package, but is missing from the ${Ht(this.configuration,\"supportedArchitectures\",ht.SETTING)} setting`),Ae.add(se.locatorHash)),ye.add(se.locatorHash));this.storedResolutions=P,this.storedDescriptors=C,this.storedPackages=S,this.accessibleLocators=Be,this.conditionalLocators=ye,this.disabledLocators=Ae,this.originalPackages=I,this.optionalBuilds=pe,this.peerRequirements=Ce,this.peerWarnings=g,this.peerRequirementNodes=we}async fetchEverything({cache:e,report:r,fetcher:s,mode:a,persistProject:n=!0}){let c={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators},f=s||this.configuration.makeFetcher(),p={checksums:this.storedChecksums,project:this,cache:e,fetcher:f,report:r,cacheOptions:c},h=Array.from(new Set(qs(this.storedResolutions.values(),[I=>{let R=this.storedPackages.get(I);if(!R)throw new Error(\"Assertion failed: The locator should have been registered\");return ll(R)}])));a===\"update-lockfile\"&&(h=h.filter(I=>!this.storedChecksums.has(I)));let E=!1,C=Ao.progressViaCounter(h.length);await r.reportProgress(C);let S=(0,qR.default)(fat);if(await Uu(h.map(I=>S(async()=>{let R=this.storedPackages.get(I);if(!R)throw new Error(\"Assertion failed: The locator should have been registered\");if(Gu(R))return;let N;try{N=await f.fetch(R,p)}catch(U){U.message=`${Yr(this.configuration,R)}: ${U.message}`,r.reportExceptionOnce(U),E=U;return}N.checksum!=null?this.storedChecksums.set(R.locatorHash,N.checksum):this.storedChecksums.delete(R.locatorHash),N.releaseFs&&N.releaseFs()}).finally(()=>{C.tick()}))),E)throw E;let P=n&&a!==\"update-lockfile\"?await this.cacheCleanup({cache:e,report:r}):null;if(r.cacheMisses.size>0||P){let R=(await Promise.all([...r.cacheMisses].map(async le=>{let me=this.storedPackages.get(le),pe=this.storedChecksums.get(le)??null,Be=e.getLocatorPath(me,pe);return(await ce.statPromise(Be)).size}))).reduce((le,me)=>le+me,0)-(P?.size??0),N=r.cacheMisses.size,U=P?.count??0,W=`${Wk(N,{zero:\"No new packages\",one:\"A package was\",more:`${Ht(this.configuration,N,ht.NUMBER)} packages were`})} added to the project`,ee=`${Wk(U,{zero:\"none were\",one:\"one was\",more:`${Ht(this.configuration,U,ht.NUMBER)} were`})} removed`,ie=R!==0?` (${Ht(this.configuration,R,ht.SIZE_DIFF)})`:\"\",ue=U>0?N>0?`${W}, and ${ee}${ie}.`:`${W}, but ${ee}${ie}.`:`${W}${ie}.`;r.reportInfo(13,ue)}}async linkEverything({cache:e,report:r,fetcher:s,mode:a}){let n={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators,skipIntegrityCheck:!0},c=s||this.configuration.makeFetcher(),f={checksums:this.storedChecksums,project:this,cache:e,fetcher:c,report:r,cacheOptions:n},p=this.configuration.getLinkers(),h={project:this,report:r},E=new Map(p.map(ye=>{let Ae=ye.makeInstaller(h),se=ye.getCustomDataKey(),Z=this.linkersCustomData.get(se);return typeof Z<\"u\"&&Ae.attachCustomData(Z),[ye,Ae]})),C=new Map,S=new Map,P=new Map,I=new Map(await Uu([...this.accessibleLocators].map(async ye=>{let Ae=this.storedPackages.get(ye);if(!Ae)throw new Error(\"Assertion failed: The locator should have been registered\");return[ye,await c.fetch(Ae,f)]}))),R=[],N=new Set,U=[];for(let ye of this.accessibleLocators){let Ae=this.storedPackages.get(ye);if(typeof Ae>\"u\")throw new Error(\"Assertion failed: The locator should have been registered\");let se=I.get(Ae.locatorHash);if(typeof se>\"u\")throw new Error(\"Assertion failed: The fetch result should have been registered\");let Z=[],De=mt=>{Z.push(mt)},Re=this.tryWorkspaceByLocator(Ae);if(Re!==null){let mt=[],{scripts:j}=Re.manifest;for(let Fe of[\"preinstall\",\"install\",\"postinstall\"])j.has(Fe)&&mt.push({type:0,script:Fe});try{for(let[Fe,Ne]of E)if(Fe.supportsPackage(Ae,h)&&(await Ne.installPackage(Ae,se,{holdFetchResult:De})).buildRequest!==null)throw new Error(\"Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core\")}finally{Z.length===0?se.releaseFs?.():R.push(Uu(Z).catch(()=>{}).then(()=>{se.releaseFs?.()}))}let rt=J.join(se.packageFs.getRealPath(),se.prefixPath);S.set(Ae.locatorHash,rt),!Gu(Ae)&&mt.length>0&&P.set(Ae.locatorHash,{buildDirectives:mt,buildLocations:[rt]})}else{let mt=p.find(Fe=>Fe.supportsPackage(Ae,h));if(!mt)throw new jt(12,`${Yr(this.configuration,Ae)} isn't supported by any available linker`);let j=E.get(mt);if(!j)throw new Error(\"Assertion failed: The installer should have been registered\");let rt;try{rt=await j.installPackage(Ae,se,{holdFetchResult:De})}finally{Z.length===0?se.releaseFs?.():R.push(Uu(Z).then(()=>{}).then(()=>{se.releaseFs?.()}))}C.set(Ae.locatorHash,mt),S.set(Ae.locatorHash,rt.packageLocation),rt.buildRequest&&rt.packageLocation&&(rt.buildRequest.skipped?(N.add(Ae.locatorHash),this.skippedBuilds.has(Ae.locatorHash)||U.push([Ae,rt.buildRequest.explain])):P.set(Ae.locatorHash,{buildDirectives:rt.buildRequest.directives,buildLocations:[rt.packageLocation]}))}}let W=new Map;for(let ye of this.accessibleLocators){let Ae=this.storedPackages.get(ye);if(!Ae)throw new Error(\"Assertion failed: The locator should have been registered\");let se=this.tryWorkspaceByLocator(Ae)!==null,Z=async(De,Re)=>{let mt=S.get(Ae.locatorHash);if(typeof mt>\"u\")throw new Error(`Assertion failed: The package (${Yr(this.configuration,Ae)}) should have been registered`);let j=[];for(let rt of Ae.dependencies.values()){let Fe=this.storedResolutions.get(rt.descriptorHash);if(typeof Fe>\"u\")throw new Error(`Assertion failed: The resolution (${ni(this.configuration,rt)}, from ${Yr(this.configuration,Ae)})should have been registered`);let Ne=this.storedPackages.get(Fe);if(typeof Ne>\"u\")throw new Error(`Assertion failed: The package (${Fe}, resolved from ${ni(this.configuration,rt)}) should have been registered`);let Pe=this.tryWorkspaceByLocator(Ne)===null?C.get(Fe):null;if(typeof Pe>\"u\")throw new Error(`Assertion failed: The package (${Fe}, resolved from ${ni(this.configuration,rt)}) should have been registered`);Pe===De||Pe===null?S.get(Ne.locatorHash)!==null&&j.push([rt,Ne]):!se&&mt!==null&&xB(W,Fe).push(mt)}mt!==null&&await Re.attachInternalDependencies(Ae,j)};if(se)for(let[De,Re]of E)De.supportsPackage(Ae,h)&&await Z(De,Re);else{let De=C.get(Ae.locatorHash);if(!De)throw new Error(\"Assertion failed: The linker should have been found\");let Re=E.get(De);if(!Re)throw new Error(\"Assertion failed: The installer should have been registered\");await Z(De,Re)}}for(let[ye,Ae]of W){let se=this.storedPackages.get(ye);if(!se)throw new Error(\"Assertion failed: The package should have been registered\");let Z=C.get(se.locatorHash);if(!Z)throw new Error(\"Assertion failed: The linker should have been found\");let De=E.get(Z);if(!De)throw new Error(\"Assertion failed: The installer should have been registered\");await De.attachExternalDependents(se,Ae)}let ee=new Map;for(let[ye,Ae]of E){let se=await Ae.finalizeInstall();for(let Z of se?.records??[])Z.buildRequest.skipped?(N.add(Z.locator.locatorHash),this.skippedBuilds.has(Z.locator.locatorHash)||U.push([Z.locator,Z.buildRequest.explain])):P.set(Z.locator.locatorHash,{buildDirectives:Z.buildRequest.directives,buildLocations:Z.buildLocations});typeof se?.customData<\"u\"&&ee.set(ye.getCustomDataKey(),se.customData)}if(this.linkersCustomData=ee,await Uu(R),a===\"skip-build\")return;for(let[,ye]of qs(U,([Ae])=>ll(Ae)))ye(r);let ie=new Set(P.keys()),ue=(0,GR.createHash)(\"sha512\");ue.update(process.versions.node),await this.configuration.triggerHook(ye=>ye.globalHashGeneration,this,ye=>{ue.update(\"\\0\"),ue.update(ye)});let le=ue.digest(\"hex\"),me=new Map,pe=ye=>{let Ae=me.get(ye.locatorHash);if(typeof Ae<\"u\")return Ae;let se=this.storedPackages.get(ye.locatorHash);if(typeof se>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");let Z=(0,GR.createHash)(\"sha512\");Z.update(ye.locatorHash),me.set(ye.locatorHash,\"<recursive>\");for(let De of se.dependencies.values()){let Re=this.storedResolutions.get(De.descriptorHash);if(typeof Re>\"u\")throw new Error(`Assertion failed: The resolution (${ni(this.configuration,De)}) should have been registered`);let mt=this.storedPackages.get(Re);if(typeof mt>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");Z.update(pe(mt))}return Ae=Z.digest(\"hex\"),me.set(ye.locatorHash,Ae),Ae},Be=(ye,Ae)=>{let se=(0,GR.createHash)(\"sha512\");se.update(le),se.update(pe(ye));for(let Z of Ae)se.update(Z);return se.digest(\"hex\")},Ce=new Map,g=!1,we=ye=>{let Ae=new Set([ye.locatorHash]);for(let se of Ae){let Z=this.storedPackages.get(se);if(!Z)throw new Error(\"Assertion failed: The package should have been registered\");for(let De of Z.dependencies.values()){let Re=this.storedResolutions.get(De.descriptorHash);if(!Re)throw new Error(`Assertion failed: The resolution (${ni(this.configuration,De)}) should have been registered`);if(Re!==ye.locatorHash&&ie.has(Re))return!1;let mt=this.storedPackages.get(Re);if(!mt)throw new Error(\"Assertion failed: The package should have been registered\");let j=this.tryWorkspaceByLocator(mt);if(j){if(j.anchoredLocator.locatorHash!==ye.locatorHash&&ie.has(j.anchoredLocator.locatorHash))return!1;Ae.add(j.anchoredLocator.locatorHash)}Ae.add(Re)}}return!0};for(;ie.size>0;){let ye=ie.size,Ae=[];for(let se of ie){let Z=this.storedPackages.get(se);if(!Z)throw new Error(\"Assertion failed: The package should have been registered\");if(!we(Z))continue;let De=P.get(Z.locatorHash);if(!De)throw new Error(\"Assertion failed: The build directive should have been registered\");let Re=Be(Z,De.buildLocations);if(this.storedBuildState.get(Z.locatorHash)===Re){Ce.set(Z.locatorHash,Re),ie.delete(se);continue}g||(await this.persistInstallStateFile(),g=!0),this.storedBuildState.has(Z.locatorHash)?r.reportInfo(8,`${Yr(this.configuration,Z)} must be rebuilt because its dependency tree changed`):r.reportInfo(7,`${Yr(this.configuration,Z)} must be built because it never has been before or the last one failed`);let mt=De.buildLocations.map(async j=>{if(!J.isAbsolute(j))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${j})`);for(let rt of De.buildDirectives){let Fe=`# This file contains the result of Yarn building a package (${ll(Z)})\n`;switch(rt.type){case 0:Fe+=`# Script name: ${rt.script}\n`;break;case 1:Fe+=`# Script code: ${rt.script}\n`;break}let Ne=null;if(!await ce.mktempPromise(async Ve=>{let ke=J.join(Ve,\"build.log\"),{stdout:it,stderr:Ue}=this.configuration.getSubprocessStreams(ke,{header:Fe,prefix:Yr(this.configuration,Z),report:r}),x;try{switch(rt.type){case 0:x=await LT(Z,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:Ue});break;case 1:x=await Yj(Z,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:Ue});break}}catch(y){Ue.write(y.stack),x=1}if(it.end(),Ue.end(),x===0)return!0;ce.detachTemp(Ve);let w=`${Yr(this.configuration,Z)} couldn't be built successfully (exit code ${Ht(this.configuration,x,ht.NUMBER)}, logs can be found here: ${Ht(this.configuration,ke,ht.PATH)})`,b=this.optionalBuilds.has(Z.locatorHash);return b?r.reportInfo(9,w):r.reportError(9,w),ehe&&r.reportFold(fe.fromPortablePath(ke),ce.readFileSync(ke,\"utf8\")),b}))return!1}return!0});Ae.push(...mt,Promise.allSettled(mt).then(j=>{ie.delete(se),j.every(rt=>rt.status===\"fulfilled\"&&rt.value===!0)&&Ce.set(Z.locatorHash,Re)}))}if(await Uu(Ae),ye===ie.size){let se=Array.from(ie).map(Z=>{let De=this.storedPackages.get(Z);if(!De)throw new Error(\"Assertion failed: The package should have been registered\");return Yr(this.configuration,De)}).join(\", \");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${se})`);break}}this.storedBuildState=Ce,this.skippedBuilds=N}async installWithNewReport(e,r){return(await Ot.start({configuration:this.configuration,json:e.json,stdout:e.stdout,forceSectionAlignment:!0,includeLogs:!e.json&&!e.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(e){let r=this.configuration.get(\"nodeLinker\");ze.telemetry?.reportInstall(r);let s=!1;if(await e.report.startTimerPromise(\"Project validation\",{skipIfEmpty:!0},async()=>{this.configuration.get(\"enableOfflineMode\")&&e.report.reportWarning(90,\"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it\"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,C)=>{e.report.reportWarning(E,C)},reportError:(E,C)=>{e.report.reportError(E,C),s=!0}})}),s)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,C]of E)for(let S of C)S.status=\"inactive\";let n=J.join(this.cwd,Er.lockfile),c=null;if(e.immutable)try{c=await ce.readFilePromise(n,\"utf8\")}catch(E){throw E.code===\"ENOENT\"?new jt(28,\"The lockfile would have been created by this install, which is explicitly forbidden.\"):E}await e.report.startTimerPromise(\"Resolution step\",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise(\"Post-resolution validation\",{skipIfEmpty:!0},async()=>{dat(this,e.report);for(let[,E]of a)for(let[,C]of E)for(let S of C)if(S.userProvided){let P=Ht(this.configuration,S,ht.PACKAGE_EXTENSION);switch(S.status){case\"inactive\":e.report.reportWarning(68,`${P}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case\"redundant\":e.report.reportWarning(69,`${P}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(c!==null){let E=Ed(c,this.generateLockfile());if(E!==c){let C=yde(n,n,c,E,void 0,void 0,{maxEditLength:100});if(C){e.report.reportSeparator();for(let S of C.hunks){e.report.reportInfo(null,`@@ -${S.oldStart},${S.oldLines} +${S.newStart},${S.newLines} @@`);for(let P of S.lines)P.startsWith(\"+\")?e.report.reportError(28,Ht(this.configuration,P,ht.ADDED)):P.startsWith(\"-\")?e.report.reportError(28,Ht(this.configuration,P,ht.REMOVED)):e.report.reportInfo(null,Ht(this.configuration,P,\"grey\"))}e.report.reportSeparator()}throw new jt(28,\"The lockfile would have been modified by this install, which is explicitly forbidden.\")}}});for(let E of a.values())for(let[,C]of E)for(let S of C)S.userProvided&&S.status===\"active\"&&ze.telemetry?.reportPackageExtension(Xd(S,ht.PACKAGE_EXTENSION));await e.report.startTimerPromise(\"Fetch step\",async()=>{await this.fetchEverything(e)});let f=e.immutable?[...new Set(this.configuration.get(\"immutablePatterns\"))].sort():[],p=await Promise.all(f.map(async E=>DQ(E,{cwd:this.cwd})));(typeof e.persistProject>\"u\"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise(\"Link step\",async()=>{if(e.mode===\"update-lockfile\"){e.report.reportWarning(73,`Skipped due to ${Ht(this.configuration,\"mode=update-lockfile\",ht.CODE)}`);return}await this.linkEverything(e);let E=await Promise.all(f.map(async C=>DQ(C,{cwd:this.cwd})));for(let C=0;C<f.length;++C)p[C]!==E[C]&&e.report.reportError(64,`The checksum for ${f[C]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile();let h=!1;await e.report.startTimerPromise(\"Post-install validation\",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(E=>E.validateProjectAfterInstall,this,{reportWarning:(E,C)=>{e.report.reportWarning(E,C)},reportError:(E,C)=>{e.report.reportError(E,C),h=!0}})}),!h&&await this.configuration.triggerHook(E=>E.afterAllInstalled,this,e)}generateLockfile(){let e=new Map;for(let[n,c]of this.storedResolutions.entries()){let f=e.get(c);f||e.set(c,f=new Set),f.add(n)}let r={},{cacheKey:s}=Kr.getCacheKey(this.configuration);r.__metadata={version:WR,cacheKey:s};for(let[n,c]of e.entries()){let f=this.originalPackages.get(n);if(!f)continue;let p=[];for(let C of c){let S=this.storedDescriptors.get(C);if(!S)throw new Error(\"Assertion failed: The descriptor should have been registered\");p.push(S)}let h=p.map(C=>al(C)).sort().join(\", \"),E=new Ut;E.version=f.linkType===\"HARD\"?f.version:\"0.0.0-use.local\",E.languageName=f.languageName,E.dependencies=new Map(f.dependencies),E.peerDependencies=new Map(f.peerDependencies),E.dependenciesMeta=new Map(f.dependenciesMeta),E.peerDependenciesMeta=new Map(f.peerDependenciesMeta),E.bin=new Map(f.bin),r[h]={...E.exportTo({},{compatibilityMode:!1}),linkType:f.linkType.toLowerCase(),resolution:ll(f),checksum:this.storedChecksums.get(f.locatorHash),conditions:f.conditions||void 0}}return`${[`# This file is generated by running \"yarn install\" inside your project.\n`,`# Manual changes might be lost - proceed with caution!\n`].join(\"\")}\n`+nl(r)}async persistLockfile(){let e=J.join(this.cwd,Er.lockfile),r=\"\";try{r=await ce.readFilePromise(e,\"utf8\")}catch{}let s=this.generateLockfile(),a=Ed(r,s);a!==r&&(await ce.writeFilePromise(e,a),this.lockFileChecksum=wde(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let c of Object.values(KG))e.push(...c);let r=Kd(this,e),s=zG.default.serialize(r),a=us(s);if(this.installStateChecksum===a)return;let n=this.configuration.get(\"installStatePath\");await ce.mkdirPromise(J.dirname(n),{recursive:!0}),await ce.writeFilePromise(n,await Aat(s)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:s=!0}={}){let a=this.configuration.get(\"installStatePath\"),n;try{let c=await pat(await ce.readFilePromise(a));n=zG.default.deserialize(c),this.installStateChecksum=us(c)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<\"u\"&&(this.linkersCustomData=n.linkersCustomData),s&&Object.assign(this,Kd(n,KG.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,Kd(n,KG.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new ki}),await this.persistInstallStateFile()}async persist(){let e=(0,qR.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get(\"enableGlobalCache\"))return null;let s=new Set([\".gitignore\"]);if(!q8(e.cwd,this.cwd)||!await ce.existsPromise(e.cwd))return null;let a=[];for(let c of await ce.readdirPromise(e.cwd)){if(s.has(c))continue;let f=J.resolve(e.cwd,c);e.markedFiles.has(f)||(e.immutable?r.reportError(56,`${Ht(this.configuration,J.basename(f),\"magenta\")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(ce.lstatPromise(f).then(async p=>(await ce.removePromise(f),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((c,f)=>c+f,0)}}}});function mat(t){let s=Math.floor(t.timeNow/864e5),a=t.updateInterval*864e5,n=t.state.lastUpdate??t.timeNow+a+Math.floor(a*t.randomInitialInterval),c=n+a,f=t.state.lastTips??s*864e5,p=f+864e5+8*36e5-t.timeZone,h=c<=t.timeNow,E=p<=t.timeNow,C=null;return(h||E||!t.state.lastUpdate||!t.state.lastTips)&&(C={},C.lastUpdate=h?t.timeNow:n,C.lastTips=f,C.blocks=h?{}:t.state.blocks,C.displayedTips=t.state.displayedTips),{nextState:C,triggerUpdate:h,triggerTips:E,nextTips:E?s*864e5:f}}var ZI,Sde=Xe(()=>{Dt();yv();I0();pT();Pc();Rp();ZI=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=e;let s=this.getRegistryPath();this.isNew=!ce.existsSync(s),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(e){let r=new Set(this.displayedTips),s=f=>f&&fn?Zf(fn,f):!1,a=e.map((f,p)=>p).filter(f=>e[f]&&s(e[f]?.selector));if(a.length===0)return null;let n=a.filter(f=>!r.has(f));if(n.length===0){let f=Math.floor(a.length*.2);this.displayedTips=f>0?this.displayedTips.slice(-f):[],n=a.filter(p=>!r.has(p))}let c=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(c),this.commitTips(),e[c]}reportVersion(e){this.reportValue(\"version\",e.replace(/-git\\..*/,\"-git\"))}reportCommandName(e){this.reportValue(\"commandName\",e||\"<none>\")}reportPluginName(e){this.reportValue(\"pluginName\",e)}reportProject(e){this.reportEnumerator(\"projectCount\",e)}reportInstall(e){this.reportHit(\"installCount\",e)}reportPackageExtension(e){this.reportValue(\"packageExtension\",e)}reportWorkspaceCount(e){this.reportValue(\"workspaceCount\",String(e))}reportDependencyCount(e){this.reportValue(\"dependencyCount\",String(e))}reportValue(e,r){bp(this.values,e).add(r)}reportEnumerator(e,r){bp(this.enumerators,e).add(us(r))}reportHit(e,r=\"*\"){let s=q4(this.hits,e),a=Yl(s,r,()=>0);s.set(r,a+1)}getRegistryPath(){let e=this.configuration.get(\"globalFolder\");return J.join(e,\"telemetry.json\")}sendReport(e){let r=this.getRegistryPath(),s;try{s=ce.readJsonSync(r)}catch{s={}}let{nextState:a,triggerUpdate:n,triggerTips:c,nextTips:f}=mat({state:s,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get(\"telemetryInterval\")});if(this.nextTips=f,this.displayedTips=s.displayedTips??[],a!==null)try{ce.mkdirSync(J.dirname(r),{recursive:!0}),ce.writeJsonSync(r,a)}catch{return!1}if(c&&this.configuration.get(\"enableTips\")&&(this.shouldShowTips=!0),n){let p=s.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,E=C=>cj(h,C,{configuration:this.configuration}).catch(()=>{});for(let[C,S]of Object.entries(s.blocks??{})){if(Object.keys(S).length===0)continue;let P=S;P.userId=C,P.reportType=\"primary\";for(let N of Object.keys(P.enumerators??{}))P.enumerators[N]=P.enumerators[N].length;E(P);let I=new Map,R=20;for(let[N,U]of Object.entries(P.values))U.length>0&&I.set(N,U.slice(0,R));for(;I.size>0;){let N={};N.userId=C,N.reportType=\"secondary\",N.metrics={};for(let[U,W]of I)N.metrics[U]=W.shift(),W.length===0&&I.delete(U);E(N)}}}}return!0}applyChanges(){let e=this.getRegistryPath(),r;try{r=ce.readJsonSync(e)}catch{r={}}let s=this.configuration.get(\"telemetryUserId\")??\"*\",a=r.blocks=r.blocks??{},n=a[s]=a[s]??{};for(let c of this.hits.keys()){let f=n.hits=n.hits??{},p=f[c]=f[c]??{};for(let[h,E]of this.hits.get(c))p[h]=(p[h]??0)+E}for(let c of[\"values\",\"enumerators\"])for(let f of this[c].keys()){let p=n[c]=n[c]??{};p[f]=[...new Set([...p[f]??[],...this[c].get(f)??[]])]}this.shouldCommitTips&&(r.lastTips=this.nextTips,r.displayedTips=this.displayedTips),ce.mkdirSync(J.dirname(e),{recursive:!0}),ce.writeJsonSync(e,r)}startBuffer(){process.on(\"exit\",()=>{try{this.applyChanges()}catch{}})}}});var jv={};Vt(jv,{BuildDirectiveType:()=>_R,CACHE_CHECKPOINT:()=>OG,CACHE_VERSION:()=>UR,Cache:()=>Kr,Configuration:()=>ze,DEFAULT_RC_FILENAME:()=>dj,DurationUnit:()=>mj,FormatType:()=>upe,InstallMode:()=>$l,LEGACY_PLUGINS:()=>ov,LOCKFILE_VERSION:()=>WR,LegacyMigrationResolver:()=>KI,LightReport:()=>lA,LinkType:()=>VE,LockfileResolver:()=>zI,Manifest:()=>Ut,MessageName:()=>Br,MultiFetcher:()=>aI,PackageExtensionStatus:()=>J4,PackageExtensionType:()=>V4,PeerWarningType:()=>YR,Project:()=>Tt,Report:()=>Ao,ReportError:()=>jt,SettingsType:()=>wI,StreamReport:()=>Ot,TAG_REGEXP:()=>Mp,TelemetryManager:()=>ZI,ThrowReport:()=>ki,VirtualFetcher:()=>lI,WindowsLinkType:()=>IT,Workspace:()=>XI,WorkspaceFetcher:()=>cI,WorkspaceResolver:()=>Ei,YarnVersion:()=>fn,execUtils:()=>qr,folderUtils:()=>OQ,formatUtils:()=>he,hashUtils:()=>Nn,httpUtils:()=>nn,miscUtils:()=>je,nodeUtils:()=>Ui,parseMessageName:()=>jx,reportOptionDeprecations:()=>SI,scriptUtils:()=>In,semverUtils:()=>Fr,stringifyMessageName:()=>Yf,structUtils:()=>G,tgzUtils:()=>ps,treeUtils:()=>xs});var Ge=Xe(()=>{dT();LQ();xc();I0();pT();Pc();gT();zj();Rp();Wo();nde();ude();LG();av();av();pde();MG();hde();UG();oI();Gx();R8();vde();Tc();Ev();Sde();VG();N8();O8();tm();JG();yv();hle()});var Qde=_((WHt,qv)=>{\"use strict\";var Eat=process.env.TERM_PROGRAM===\"Hyper\",Iat=process.platform===\"win32\",Pde=process.platform===\"linux\",$G={ballotDisabled:\"\\u2612\",ballotOff:\"\\u2610\",ballotOn:\"\\u2611\",bullet:\"\\u2022\",bulletWhite:\"\\u25E6\",fullBlock:\"\\u2588\",heart:\"\\u2764\",identicalTo:\"\\u2261\",line:\"\\u2500\",mark:\"\\u203B\",middot:\"\\xB7\",minus:\"\\uFF0D\",multiplication:\"\\xD7\",obelus:\"\\xF7\",pencilDownRight:\"\\u270E\",pencilRight:\"\\u270F\",pencilUpRight:\"\\u2710\",percent:\"%\",pilcrow2:\"\\u2761\",pilcrow:\"\\xB6\",plusMinus:\"\\xB1\",section:\"\\xA7\",starsOff:\"\\u2606\",starsOn:\"\\u2605\",upDownArrow:\"\\u2195\"},xde=Object.assign({},$G,{check:\"\\u221A\",cross:\"\\xD7\",ellipsisLarge:\"...\",ellipsis:\"...\",info:\"i\",question:\"?\",questionSmall:\"?\",pointer:\">\",pointerSmall:\"\\xBB\",radioOff:\"( )\",radioOn:\"(*)\",warning:\"\\u203C\"}),kde=Object.assign({},$G,{ballotCross:\"\\u2718\",check:\"\\u2714\",cross:\"\\u2716\",ellipsisLarge:\"\\u22EF\",ellipsis:\"\\u2026\",info:\"\\u2139\",question:\"?\",questionFull:\"\\uFF1F\",questionSmall:\"\\uFE56\",pointer:Pde?\"\\u25B8\":\"\\u276F\",pointerSmall:Pde?\"\\u2023\":\"\\u203A\",radioOff:\"\\u25EF\",radioOn:\"\\u25C9\",warning:\"\\u26A0\"});qv.exports=Iat&&!Eat?xde:kde;Reflect.defineProperty(qv.exports,\"common\",{enumerable:!1,value:$G});Reflect.defineProperty(qv.exports,\"windows\",{enumerable:!1,value:xde});Reflect.defineProperty(qv.exports,\"other\",{enumerable:!1,value:kde})});var Ju=_((YHt,e5)=>{\"use strict\";var Cat=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t),wat=/[\\u001b\\u009b][[\\]#;?()]*(?:(?:(?:[^\\W_]*;?[^\\W_]*)\\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,Tde=()=>{let t={enabled:!0,visible:!0,styles:{},keys:{}};\"FORCE_COLOR\"in process.env&&(t.enabled=process.env.FORCE_COLOR!==\"0\");let e=n=>{let c=n.open=`\\x1B[${n.codes[0]}m`,f=n.close=`\\x1B[${n.codes[1]}m`,p=n.regex=new RegExp(`\\\\u001b\\\\[${n.codes[1]}m`,\"g\");return n.wrap=(h,E)=>{h.includes(f)&&(h=h.replace(p,f+c));let C=c+h+f;return E?C.replace(/\\r*\\n/g,`${f}$&${c}`):C},n},r=(n,c,f)=>typeof n==\"function\"?n(c):n.wrap(c,f),s=(n,c)=>{if(n===\"\"||n==null)return\"\";if(t.enabled===!1)return n;if(t.visible===!1)return\"\";let f=\"\"+n,p=f.includes(`\n`),h=c.length;for(h>0&&c.includes(\"unstyle\")&&(c=[...new Set([\"unstyle\",...c])].reverse());h-- >0;)f=r(t.styles[c[h]],f,p);return f},a=(n,c,f)=>{t.styles[n]=e({name:n,codes:c}),(t.keys[f]||(t.keys[f]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=E=>s(E,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a(\"reset\",[0,0],\"modifier\"),a(\"bold\",[1,22],\"modifier\"),a(\"dim\",[2,22],\"modifier\"),a(\"italic\",[3,23],\"modifier\"),a(\"underline\",[4,24],\"modifier\"),a(\"inverse\",[7,27],\"modifier\"),a(\"hidden\",[8,28],\"modifier\"),a(\"strikethrough\",[9,29],\"modifier\"),a(\"black\",[30,39],\"color\"),a(\"red\",[31,39],\"color\"),a(\"green\",[32,39],\"color\"),a(\"yellow\",[33,39],\"color\"),a(\"blue\",[34,39],\"color\"),a(\"magenta\",[35,39],\"color\"),a(\"cyan\",[36,39],\"color\"),a(\"white\",[37,39],\"color\"),a(\"gray\",[90,39],\"color\"),a(\"grey\",[90,39],\"color\"),a(\"bgBlack\",[40,49],\"bg\"),a(\"bgRed\",[41,49],\"bg\"),a(\"bgGreen\",[42,49],\"bg\"),a(\"bgYellow\",[43,49],\"bg\"),a(\"bgBlue\",[44,49],\"bg\"),a(\"bgMagenta\",[45,49],\"bg\"),a(\"bgCyan\",[46,49],\"bg\"),a(\"bgWhite\",[47,49],\"bg\"),a(\"blackBright\",[90,39],\"bright\"),a(\"redBright\",[91,39],\"bright\"),a(\"greenBright\",[92,39],\"bright\"),a(\"yellowBright\",[93,39],\"bright\"),a(\"blueBright\",[94,39],\"bright\"),a(\"magentaBright\",[95,39],\"bright\"),a(\"cyanBright\",[96,39],\"bright\"),a(\"whiteBright\",[97,39],\"bright\"),a(\"bgBlackBright\",[100,49],\"bgBright\"),a(\"bgRedBright\",[101,49],\"bgBright\"),a(\"bgGreenBright\",[102,49],\"bgBright\"),a(\"bgYellowBright\",[103,49],\"bgBright\"),a(\"bgBlueBright\",[104,49],\"bgBright\"),a(\"bgMagentaBright\",[105,49],\"bgBright\"),a(\"bgCyanBright\",[106,49],\"bgBright\"),a(\"bgWhiteBright\",[107,49],\"bgBright\"),t.ansiRegex=wat,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n==\"string\"&&n!==\"\"&&t.ansiRegex.test(n)),t.alias=(n,c)=>{let f=typeof c==\"string\"?t[c]:c;if(typeof f!=\"function\")throw new TypeError(\"Expected alias to be the name of an existing color (string) or a function\");f.stack||(Reflect.defineProperty(f,\"name\",{value:n}),t.styles[n]=f,f.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>s(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(f.stack):f.stack,p}})},t.theme=n=>{if(!Cat(n))throw new TypeError(\"Expected theme to be an object\");for(let c of Object.keys(n))t.alias(c,n[c]);return t},t.alias(\"unstyle\",n=>typeof n==\"string\"&&n!==\"\"?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,\"\")):\"\"),t.alias(\"noop\",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=Qde(),t.define=a,t};e5.exports=Tde();e5.exports.create=Tde});var Zo=_(pn=>{\"use strict\";var Bat=Object.prototype.toString,jc=Ju(),Rde=!1,t5=[],Fde={yellow:\"blue\",cyan:\"red\",green:\"magenta\",black:\"white\",blue:\"yellow\",red:\"cyan\",magenta:\"green\",white:\"black\"};pn.longest=(t,e)=>t.reduce((r,s)=>Math.max(r,e?s[e].length:s.length),0);pn.hasColor=t=>!!t&&jc.hasColor(t);var JR=pn.isObject=t=>t!==null&&typeof t==\"object\"&&!Array.isArray(t);pn.nativeType=t=>Bat.call(t).slice(8,-1).toLowerCase().replace(/\\s/g,\"\");pn.isAsyncFn=t=>pn.nativeType(t)===\"asyncfunction\";pn.isPrimitive=t=>t!=null&&typeof t!=\"object\"&&typeof t!=\"function\";pn.resolve=(t,e,...r)=>typeof e==\"function\"?e.call(t,...r):e;pn.scrollDown=(t=[])=>[...t.slice(1),t[0]];pn.scrollUp=(t=[])=>[t.pop(),...t];pn.reorder=(t=[])=>{let e=t.slice();return e.sort((r,s)=>r.index>s.index?1:r.index<s.index?-1:0),e};pn.swap=(t,e,r)=>{let s=t.length,a=r===s?0:r<0?s-1:r,n=t[e];t[e]=t[a],t[a]=n};pn.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize==\"function\"&&(r=t.getWindowSize()[0]),process.platform===\"win32\"?r-1:r};pn.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize==\"function\"&&(r=t.getWindowSize()[1]),r};pn.wordWrap=(t,e={})=>{if(!t)return t;typeof e==\"number\"&&(e={width:e});let{indent:r=\"\",newline:s=`\n`+r,width:a=80}=e,n=(s+r).match(/[^\\S\\n]/g)||[];a-=n.length;let c=`.{1,${a}}([\\\\s\\\\u200B]+|$)|[^\\\\s\\\\u200B]+?([\\\\s\\\\u200B]+|$)`,f=t.trim(),p=new RegExp(c,\"g\"),h=f.match(p)||[];return h=h.map(E=>E.replace(/\\n$/,\"\")),e.padEnd&&(h=h.map(E=>E.padEnd(a,\" \"))),e.padStart&&(h=h.map(E=>E.padStart(a,\" \"))),r+h.join(s)};pn.unmute=t=>{let e=t.stack.find(s=>jc.keys.color.includes(s));return e?jc[e]:t.stack.find(s=>s.slice(2)===\"bg\")?jc[e.slice(2)]:s=>s};pn.pascal=t=>t?t[0].toUpperCase()+t.slice(1):\"\";pn.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>jc.keys.color.includes(s));if(e){let s=jc[\"bg\"+pn.pascal(e)];return s?s.black:t}let r=t.stack.find(s=>s.slice(0,2)===\"bg\");return r?jc[r.slice(2).toLowerCase()]||t:jc.none};pn.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>jc.keys.color.includes(s)),r=t.stack.find(s=>s.slice(0,2)===\"bg\");if(e&&!r)return jc[Fde[e]||e];if(r){let s=r.slice(2).toLowerCase(),a=Fde[s];return a&&jc[\"bg\"+pn.pascal(a)]||t}return jc.none};pn.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),s=e>=12?\"pm\":\"am\";e=e%12;let a=e===0?12:e,n=r<10?\"0\"+r:r;return a+\":\"+n+\" \"+s};pn.set=(t={},e=\"\",r)=>e.split(\".\").reduce((s,a,n,c)=>{let f=c.length-1>n?s[a]||{}:r;return!pn.isObject(f)&&n<c.length-1&&(f={}),s[a]=f},t);pn.get=(t={},e=\"\",r)=>{let s=t[e]==null?e.split(\".\").reduce((a,n)=>a&&a[n],t):t[e];return s??r};pn.mixin=(t,e)=>{if(!JR(t))return e;if(!JR(e))return t;for(let r of Object.keys(e)){let s=Object.getOwnPropertyDescriptor(e,r);if(s.hasOwnProperty(\"value\"))if(t.hasOwnProperty(r)&&JR(s.value)){let a=Object.getOwnPropertyDescriptor(t,r);JR(a.value)?t[r]=pn.merge({},t[r],e[r]):Reflect.defineProperty(t,r,s)}else Reflect.defineProperty(t,r,s);else Reflect.defineProperty(t,r,s)}return t};pn.merge=(...t)=>{let e={};for(let r of t)pn.mixin(e,r);return e};pn.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let s of Object.keys(r)){let a=r[s];typeof a==\"function\"?pn.define(t,s,a.bind(e)):pn.define(t,s,a)}};pn.onExit=t=>{let e=(r,s)=>{Rde||(Rde=!0,t5.forEach(a=>a()),r===!0&&process.exit(128+s))};t5.length===0&&(process.once(\"SIGTERM\",e.bind(null,!0,15)),process.once(\"SIGINT\",e.bind(null,!0,2)),process.once(\"exit\",e)),t5.push(t)};pn.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};pn.defineExport=(t,e,r)=>{let s;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){s=a},get(){return s?s():r()}})}});var Nde=_(rC=>{\"use strict\";rC.ctrl={a:\"first\",b:\"backward\",c:\"cancel\",d:\"deleteForward\",e:\"last\",f:\"forward\",g:\"reset\",i:\"tab\",k:\"cutForward\",l:\"reset\",n:\"newItem\",m:\"cancel\",j:\"submit\",p:\"search\",r:\"remove\",s:\"save\",u:\"undo\",w:\"cutLeft\",x:\"toggleCursor\",v:\"paste\"};rC.shift={up:\"shiftUp\",down:\"shiftDown\",left:\"shiftLeft\",right:\"shiftRight\",tab:\"prev\"};rC.fn={up:\"pageUp\",down:\"pageDown\",left:\"pageLeft\",right:\"pageRight\",delete:\"deleteForward\"};rC.option={b:\"backward\",f:\"forward\",d:\"cutRight\",left:\"cutLeft\",up:\"altUp\",down:\"altDown\"};rC.keys={pageup:\"pageUp\",pagedown:\"pageDown\",home:\"home\",end:\"end\",cancel:\"cancel\",delete:\"deleteForward\",backspace:\"delete\",down:\"down\",enter:\"submit\",escape:\"cancel\",left:\"left\",space:\"space\",number:\"number\",return:\"submit\",right:\"right\",tab:\"next\",up:\"up\"}});var Mde=_((KHt,Lde)=>{\"use strict\";var Ode=Ie(\"readline\"),vat=Nde(),Sat=/^(?:\\x1b)([a-zA-Z0-9])$/,Dat=/^(?:\\x1b+)(O|N|\\[|\\[\\[)(?:(\\d+)(?:;(\\d+))?([~^$])|(?:1;)?(\\d+)?([a-zA-Z]))/,bat={OP:\"f1\",OQ:\"f2\",OR:\"f3\",OS:\"f4\",\"[11~\":\"f1\",\"[12~\":\"f2\",\"[13~\":\"f3\",\"[14~\":\"f4\",\"[[A\":\"f1\",\"[[B\":\"f2\",\"[[C\":\"f3\",\"[[D\":\"f4\",\"[[E\":\"f5\",\"[15~\":\"f5\",\"[17~\":\"f6\",\"[18~\":\"f7\",\"[19~\":\"f8\",\"[20~\":\"f9\",\"[21~\":\"f10\",\"[23~\":\"f11\",\"[24~\":\"f12\",\"[A\":\"up\",\"[B\":\"down\",\"[C\":\"right\",\"[D\":\"left\",\"[E\":\"clear\",\"[F\":\"end\",\"[H\":\"home\",OA:\"up\",OB:\"down\",OC:\"right\",OD:\"left\",OE:\"clear\",OF:\"end\",OH:\"home\",\"[1~\":\"home\",\"[2~\":\"insert\",\"[3~\":\"delete\",\"[4~\":\"end\",\"[5~\":\"pageup\",\"[6~\":\"pagedown\",\"[[5~\":\"pageup\",\"[[6~\":\"pagedown\",\"[7~\":\"home\",\"[8~\":\"end\",\"[a\":\"up\",\"[b\":\"down\",\"[c\":\"right\",\"[d\":\"left\",\"[e\":\"clear\",\"[2$\":\"insert\",\"[3$\":\"delete\",\"[5$\":\"pageup\",\"[6$\":\"pagedown\",\"[7$\":\"home\",\"[8$\":\"end\",Oa:\"up\",Ob:\"down\",Oc:\"right\",Od:\"left\",Oe:\"clear\",\"[2^\":\"insert\",\"[3^\":\"delete\",\"[5^\":\"pageup\",\"[6^\":\"pagedown\",\"[7^\":\"home\",\"[8^\":\"end\",\"[Z\":\"tab\"};function Pat(t){return[\"[a\",\"[b\",\"[c\",\"[d\",\"[e\",\"[2$\",\"[3$\",\"[5$\",\"[6$\",\"[7$\",\"[8$\",\"[Z\"].includes(t)}function xat(t){return[\"Oa\",\"Ob\",\"Oc\",\"Od\",\"Oe\",\"[2^\",\"[3^\",\"[5^\",\"[6^\",\"[7^\",\"[8^\"].includes(t)}var KR=(t=\"\",e={})=>{let r,s={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t=\"\\x1B\"+String(t)):t=String(t):t!==void 0&&typeof t!=\"string\"?t=String(t):t||(t=s.sequence||\"\"),s.sequence=s.sequence||t||s.name,t===\"\\r\")s.raw=void 0,s.name=\"return\";else if(t===`\n`)s.name=\"enter\";else if(t===\"\t\")s.name=\"tab\";else if(t===\"\\b\"||t===\"\\x7F\"||t===\"\\x1B\\x7F\"||t===\"\\x1B\\b\")s.name=\"backspace\",s.meta=t.charAt(0)===\"\\x1B\";else if(t===\"\\x1B\"||t===\"\\x1B\\x1B\")s.name=\"escape\",s.meta=t.length===2;else if(t===\" \"||t===\"\\x1B \")s.name=\"space\",s.meta=t.length===2;else if(t<=\"\u001a\")s.name=String.fromCharCode(t.charCodeAt(0)+97-1),s.ctrl=!0;else if(t.length===1&&t>=\"0\"&&t<=\"9\")s.name=\"number\";else if(t.length===1&&t>=\"a\"&&t<=\"z\")s.name=t;else if(t.length===1&&t>=\"A\"&&t<=\"Z\")s.name=t.toLowerCase(),s.shift=!0;else if(r=Sat.exec(t))s.meta=!0,s.shift=/^[A-Z]$/.test(r[1]);else if(r=Dat.exec(t)){let a=[...t];a[0]===\"\\x1B\"&&a[1]===\"\\x1B\"&&(s.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(\"\"),c=(r[3]||r[5]||1)-1;s.ctrl=!!(c&4),s.meta=!!(c&10),s.shift=!!(c&1),s.code=n,s.name=bat[n],s.shift=Pat(n)||s.shift,s.ctrl=xat(n)||s.ctrl}return s};KR.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error(\"Invalid stream passed\");let s=Ode.createInterface({terminal:!0,input:r});Ode.emitKeypressEvents(r,s);let a=(f,p)=>e(f,KR(f,p),s),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on(\"keypress\",a),s.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener(\"keypress\",a),s.pause(),s.close()}};KR.action=(t,e,r)=>{let s={...vat,...r};return e.ctrl?(e.action=s.ctrl[e.name],e):e.option&&s.option?(e.action=s.option[e.name],e):e.shift?(e.action=s.shift[e.name],e):(e.action=s.keys[e.name],e)};Lde.exports=KR});var _de=_((zHt,Ude)=>{\"use strict\";Ude.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(e)for(let r of Object.keys(e)){let s=e[r];typeof s==\"number\"&&(s={interval:s}),kat(t,r,s)}};function kat(t,e,r={}){let s=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;s.frames=r.frames||[],s.loading=!0;let n=setInterval(()=>{s.ms=Date.now()-s.start,s.tick++,t.render()},a);return s.stop=()=>{s.loading=!1,clearInterval(n)},Reflect.defineProperty(s,\"interval\",{value:n}),t.once(\"close\",()=>s.stop()),s.stop}});var jde=_((XHt,Hde)=>{\"use strict\";var{define:Qat,width:Tat}=Zo(),r5=class{constructor(e){let r=e.options;Qat(this,\"_prompt\",e),this.type=e.type,this.name=e.name,this.message=\"\",this.header=\"\",this.footer=\"\",this.error=\"\",this.hint=\"\",this.input=\"\",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt=\"\",this.buffer=\"\",this.width=Tat(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r==\"function\"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading==\"boolean\"?this._loading:this.loadingChoices?\"choices\":!1}get status(){return this.cancelled?\"cancelled\":this.submitted?\"submitted\":\"pending\"}};Hde.exports=r5});var qde=_((ZHt,Gde)=>{\"use strict\";var n5=Zo(),ho=Ju(),i5={default:ho.noop,noop:ho.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||n5.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||n5.complement(this.primary)},primary:ho.cyan,success:ho.green,danger:ho.magenta,strong:ho.bold,warning:ho.yellow,muted:ho.dim,disabled:ho.gray,dark:ho.dim.gray,underline:ho.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};i5.merge=(t={})=>{t.styles&&typeof t.styles.enabled==\"boolean\"&&(ho.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible==\"boolean\"&&(ho.visible=t.styles.visible);let e=n5.merge({},i5,t.styles);delete e.merge;for(let r of Object.keys(ho))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>ho[r]});for(let r of Object.keys(ho.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>ho[r]});return e};Gde.exports=i5});var Yde=_(($Ht,Wde)=>{\"use strict\";var s5=process.platform===\"win32\",zp=Ju(),Rat=Zo(),o5={...zp.symbols,upDownDoubleArrow:\"\\u21D5\",upDownDoubleArrow2:\"\\u2B0D\",upDownArrow:\"\\u2195\",asterisk:\"*\",asterism:\"\\u2042\",bulletWhite:\"\\u25E6\",electricArrow:\"\\u2301\",ellipsisLarge:\"\\u22EF\",ellipsisSmall:\"\\u2026\",fullBlock:\"\\u2588\",identicalTo:\"\\u2261\",indicator:zp.symbols.check,leftAngle:\"\\u2039\",mark:\"\\u203B\",minus:\"\\u2212\",multiplication:\"\\xD7\",obelus:\"\\xF7\",percent:\"%\",pilcrow:\"\\xB6\",pilcrow2:\"\\u2761\",pencilUpRight:\"\\u2710\",pencilDownRight:\"\\u270E\",pencilRight:\"\\u270F\",plus:\"+\",plusMinus:\"\\xB1\",pointRight:\"\\u261E\",rightAngle:\"\\u203A\",section:\"\\xA7\",hexagon:{off:\"\\u2B21\",on:\"\\u2B22\",disabled:\"\\u2B22\"},ballot:{on:\"\\u2611\",off:\"\\u2610\",disabled:\"\\u2612\"},stars:{on:\"\\u2605\",off:\"\\u2606\",disabled:\"\\u2606\"},folder:{on:\"\\u25BC\",off:\"\\u25B6\",disabled:\"\\u25B6\"},prefix:{pending:zp.symbols.question,submitted:zp.symbols.check,cancelled:zp.symbols.cross},separator:{pending:zp.symbols.pointerSmall,submitted:zp.symbols.middot,cancelled:zp.symbols.middot},radio:{off:s5?\"( )\":\"\\u25EF\",on:s5?\"(*)\":\"\\u25C9\",disabled:s5?\"(|)\":\"\\u24BE\"},numbers:[\"\\u24EA\",\"\\u2460\",\"\\u2461\",\"\\u2462\",\"\\u2463\",\"\\u2464\",\"\\u2465\",\"\\u2466\",\"\\u2467\",\"\\u2468\",\"\\u2469\",\"\\u246A\",\"\\u246B\",\"\\u246C\",\"\\u246D\",\"\\u246E\",\"\\u246F\",\"\\u2470\",\"\\u2471\",\"\\u2472\",\"\\u2473\",\"\\u3251\",\"\\u3252\",\"\\u3253\",\"\\u3254\",\"\\u3255\",\"\\u3256\",\"\\u3257\",\"\\u3258\",\"\\u3259\",\"\\u325A\",\"\\u325B\",\"\\u325C\",\"\\u325D\",\"\\u325E\",\"\\u325F\",\"\\u32B1\",\"\\u32B2\",\"\\u32B3\",\"\\u32B4\",\"\\u32B5\",\"\\u32B6\",\"\\u32B7\",\"\\u32B8\",\"\\u32B9\",\"\\u32BA\",\"\\u32BB\",\"\\u32BC\",\"\\u32BD\",\"\\u32BE\",\"\\u32BF\"]};o5.merge=t=>{let e=Rat.merge({},zp.symbols,o5,t.symbols);return delete e.merge,e};Wde.exports=o5});var Jde=_((ejt,Vde)=>{\"use strict\";var Fat=qde(),Nat=Yde(),Oat=Zo();Vde.exports=t=>{t.options=Oat.merge({},t.options.theme,t.options),t.symbols=Nat.merge(t.options),t.styles=Fat.merge(t.options)}});var $de=_((Xde,Zde)=>{\"use strict\";var Kde=process.env.TERM_PROGRAM===\"Apple_Terminal\",Lat=Ju(),a5=Zo(),Ku=Zde.exports=Xde,_i=\"\\x1B[\",zde=\"\\x07\",l5=!1,j0=Ku.code={bell:zde,beep:zde,beginning:`${_i}G`,down:`${_i}J`,esc:_i,getPosition:`${_i}6n`,hide:`${_i}?25l`,line:`${_i}2K`,lineEnd:`${_i}K`,lineStart:`${_i}1K`,restorePosition:_i+(Kde?\"8\":\"u\"),savePosition:_i+(Kde?\"7\":\"s\"),screen:`${_i}2J`,show:`${_i}?25h`,up:`${_i}1J`},wm=Ku.cursor={get hidden(){return l5},hide(){return l5=!0,j0.hide},show(){return l5=!1,j0.show},forward:(t=1)=>`${_i}${t}C`,backward:(t=1)=>`${_i}${t}D`,nextLine:(t=1)=>`${_i}E`.repeat(t),prevLine:(t=1)=>`${_i}F`.repeat(t),up:(t=1)=>t?`${_i}${t}A`:\"\",down:(t=1)=>t?`${_i}${t}B`:\"\",right:(t=1)=>t?`${_i}${t}C`:\"\",left:(t=1)=>t?`${_i}${t}D`:\"\",to(t,e){return e?`${_i}${e+1};${t+1}H`:`${_i}${t+1}G`},move(t=0,e=0){let r=\"\";return r+=t<0?wm.left(-t):t>0?wm.right(t):\"\",r+=e<0?wm.up(-e):e>0?wm.down(e):\"\",r},restore(t={}){let{after:e,cursor:r,initial:s,input:a,prompt:n,size:c,value:f}=t;if(s=a5.isPrimitive(s)?String(s):\"\",a=a5.isPrimitive(a)?String(a):\"\",f=a5.isPrimitive(f)?String(f):\"\",c){let p=Ku.cursor.up(c)+Ku.cursor.to(n.length),h=a.length-r;return h>0&&(p+=Ku.cursor.left(h)),p}if(f||e){let p=!a&&s?-s.length:-a.length+r;return e&&(p-=e.length),a===\"\"&&s&&!n.includes(s)&&(p+=s.length),Ku.cursor.move(p)}}},c5=Ku.erase={screen:j0.screen,up:j0.up,down:j0.down,line:j0.line,lineEnd:j0.lineEnd,lineStart:j0.lineStart,lines(t){let e=\"\";for(let r=0;r<t;r++)e+=Ku.erase.line+(r<t-1?Ku.cursor.up(1):\"\");return t&&(e+=Ku.code.beginning),e}};Ku.clear=(t=\"\",e=process.stdout.columns)=>{if(!e)return c5.line+wm.to(0);let r=n=>[...Lat.unstyle(n)].length,s=t.split(/\\r?\\n/),a=0;for(let n of s)a+=1+Math.floor(Math.max(r(n)-1,0)/e);return(c5.line+wm.prevLine()).repeat(a-1)+c5.line+wm.to(0)}});var nC=_((tjt,tme)=>{\"use strict\";var Mat=Ie(\"events\"),eme=Ju(),u5=Mde(),Uat=_de(),_at=jde(),Hat=Jde(),pl=Zo(),Bm=$de(),f5=class t extends Mat{constructor(e={}){super(),this.name=e.name,this.type=e.type,this.options=e,Hat(this),Uat(this),this.state=new _at(this),this.initial=[e.initial,e.default].find(r=>r!=null),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=Gat(this.options.margin),this.setMaxListeners(0),jat(this)}async keypress(e,r={}){this.keypressed=!0;let s=u5.action(e,u5(e,r),this.options.actions);this.state.keypress=s,this.emit(\"keypress\",e,s),this.emit(\"state\",this.state.clone());let a=this.options[s.action]||this[s.action]||this.dispatch;if(typeof a==\"function\")return await a.call(this,e,s);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit(\"alert\"):this.stdout.write(Bm.code.beep)}cursorHide(){this.stdout.write(Bm.cursor.hide()),pl.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(Bm.cursor.show())}write(e){e&&(this.stdout&&this.state.show!==!1&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let r=this.state.buffer;this.state.buffer=\"\",!(!r&&!e||this.options.show===!1)&&this.stdout.write(Bm.cursor.down(e)+Bm.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:r,rest:s}=this.sections(),{cursor:a,initial:n=\"\",input:c=\"\",value:f=\"\"}=this,p=this.state.size=s.length,h={after:r,cursor:a,initial:n,input:c,prompt:e,size:p,value:f},E=Bm.cursor.restore(h);E&&this.stdout.write(E)}sections(){let{buffer:e,input:r,prompt:s}=this.state;s=eme.unstyle(s);let a=eme.unstyle(e),n=a.indexOf(s),c=a.slice(0,n),p=a.slice(n).split(`\n`),h=p[0],E=p[p.length-1],S=(s+(r?\" \"+r:\"\")).length,P=S<h.length?h.slice(S+1):\"\";return{header:c,prompt:h,after:P,rest:p.slice(1),last:E}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`\n`+this.symbols.pointer+\" \";typeof e==\"string\"?r+=e.trim():r+=\"Invalid input\",this.state.error=`\n`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit(\"submit\",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel==\"function\"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit(\"cancel\",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(Bm.cursor.down(e.rest.length)),this.write(`\n`.repeat(r))}catch{}this.emit(\"close\")}start(){!this.stop&&this.options.show!==!1&&(this.stop=u5.listen(this,this.keypress.bind(this)),this.once(\"close\",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip==\"function\"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:s}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>s.call(this,this.value),typeof r.initial==\"function\"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun==\"function\"&&await r.onRun.call(this,this),typeof r.onSubmit==\"function\"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error(\"expected prompt to have a custom render method\")}run(){return new Promise(async(e,r)=>{if(this.once(\"submit\",e),this.once(\"cancel\",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit(\"run\")})}async element(e,r,s){let{options:a,state:n,symbols:c,timers:f}=this,p=f&&f[e];n.timer=p;let h=a[e]||n[e]||c[e],E=r&&r[e]!=null?r[e]:await h;if(E===\"\")return E;let C=await this.resolve(E,n,r,s);return!C&&r&&r[e]?this.resolve(h,n,r,s):C}async prefix(){let e=await this.element(\"prefix\")||this.symbols,r=this.timers&&this.timers.prefix,s=this.state;return s.timer=r,pl.isObject(e)&&(e=e[s.status]||e.pending),pl.hasColor(e)?e:(this.styles[s.status]||this.styles.pending)(e)}async message(){let e=await this.element(\"message\");return pl.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element(\"separator\")||this.symbols,r=this.timers&&this.timers.separator,s=this.state;s.timer=r;let a=e[s.status]||e.pending||s.separator,n=await this.resolve(a,s);return pl.isObject(n)&&(n=n[s.status]||n.pending),pl.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let s=await this.element(\"pointer\",e,r);if(typeof s==\"string\"&&pl.hasColor(s))return s;if(s){let a=this.styles,n=this.index===r,c=n?a.primary:h=>h,f=await this.resolve(s[n?\"on\":\"off\"]||s,this.state),p=pl.hasColor(f)?f:c(f);return n?p:\" \".repeat(f.length)}}async indicator(e,r){let s=await this.element(\"indicator\",e,r);if(typeof s==\"string\"&&pl.hasColor(s))return s;if(s){let a=this.styles,n=e.enabled===!0,c=n?a.success:a.dark,f=s[n?\"on\":\"off\"]||s;return pl.hasColor(f)?f:c(f)}return\"\"}body(){return null}footer(){if(this.state.status===\"pending\")return this.element(\"footer\")}header(){if(this.state.status===\"pending\")return this.element(\"header\")}async hint(){if(this.state.status===\"pending\"&&!this.isValue(this.state.input)){let e=await this.element(\"hint\");return pl.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?\"\":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==\"\"}resolve(e,...r){return pl.resolve(this,e,...r)}get base(){return t.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||pl.height(this.stdout,25)}get width(){return this.options.columns||pl.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,s=[r,e].find(this.isValue.bind(this));return this.isValue(s)?s:this.initial}static get prompt(){return e=>new this(e).run()}};function jat(t){let e=a=>t[a]===void 0||typeof t[a]==\"function\",r=[\"actions\",\"choices\",\"initial\",\"margin\",\"roles\",\"styles\",\"symbols\",\"theme\",\"timers\",\"value\"],s=[\"body\",\"footer\",\"error\",\"header\",\"hint\",\"indicator\",\"message\",\"prefix\",\"separator\",\"skip\"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n==\"function\"&&e(a)?s.includes(a)||(t[a]=n.bind(t)):typeof t[a]!=\"function\"&&(t[a]=n)}}function Gat(t){typeof t==\"number\"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=a=>a%2===0?`\n`:\" \",s=[];for(let a=0;a<4;a++){let n=r(a);e[a]?s.push(n.repeat(e[a])):s.push(\"\")}return s}tme.exports=f5});var ime=_((rjt,nme)=>{\"use strict\";var qat=Zo(),rme={default(t,e){return e},checkbox(t,e){throw new Error(\"checkbox role is not implemented yet\")},editable(t,e){throw new Error(\"editable role is not implemented yet\")},expandable(t,e){throw new Error(\"expandable role is not implemented yet\")},heading(t,e){return e.disabled=\"\",e.indicator=[e.indicator,\" \"].find(r=>r!=null),e.message=e.message||\"\",e},input(t,e){throw new Error(\"input role is not implemented yet\")},option(t,e){return rme.default(t,e)},radio(t,e){throw new Error(\"radio role is not implemented yet\")},separator(t,e){return e.disabled=\"\",e.indicator=[e.indicator,\" \"].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};nme.exports=(t,e={})=>{let r=qat.merge({},rme,e.roles);return r[t]||r.default}});var Wv=_((njt,ame)=>{\"use strict\";var Wat=Ju(),Yat=nC(),Vat=ime(),zR=Zo(),{reorder:A5,scrollUp:Jat,scrollDown:Kat,isObject:sme,swap:zat}=zR,p5=class extends Yat{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=\"\"}async initialize(){typeof this.options.initial==\"function\"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:s,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof a!=\"function\"&&this.selectable.length===0)throw new Error(\"At least one choice must be selectable\");sme(r)&&(r=Object.keys(r)),Array.isArray(r)?(s!=null&&(this.index=this.findIndex(s)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(s!=null&&(r=s),typeof r==\"string\"&&(r=this.findIndex(r)),typeof r==\"number\"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let s=[],a=0,n=async(c,f)=>{typeof c==\"function\"&&(c=await c.call(this)),c instanceof Promise&&(c=await c);for(let p=0;p<c.length;p++){let h=c[p]=await this.toChoice(c[p],a++,f);s.push(h),h.choices&&await n(h.choices,h)}return s};return n(e,r).then(c=>(this.state.loadingChoices=!1,c))}async toChoice(e,r,s){if(typeof e==\"function\"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e==\"string\"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let a=e.value;if(e=Vat(e.role,this.options)(this,e),typeof e.disabled==\"string\"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint=\"(disabled)\"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||\"\",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input=\"\",e.index=r,e.cursor=0,zR.define(e,\"parent\",s),e.level=s?s.level+1:1,e.indent==null&&(e.indent=s?s.indent+\"  \":e.indent||\"\"),e.path=s?s.path+\".\"+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,Wat.unstyle(e.message).length));let c={...e};return e.reset=(f=c.input,p=c.value)=>{for(let h of Object.keys(c))e[h]=c[h];e.input=f,e.value=p},a==null&&typeof e.initial==\"function\"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit(\"choice\",e,r,this),typeof e.onChoice==\"function\"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,s){let a=await this.toChoice(e,r,s);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,s){let a={name:\"New choice name?\",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,s);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input=\"\",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?\"  \".repeat(e.level-1):\"\":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!=\"boolean\"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!=\"boolean\"&&(r=!e.enabled),e.enabled=r,e.choices&&e.choices.forEach(a=>this.toggle(a,r));let s=e.parent;for(;s;){let a=s.choices.filter(n=>this.isDisabled(n));s.enabled=a.every(n=>n.enabled===!0),s=s.parent}return ome(this,this.choices),this.emit(\"toggle\",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let r=s=>{let a=Number(s);if(a>this.choices.length-1)return this.alert();let n=this.focused,c=this.choices.find(f=>a===f.index);if(!c.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(c)===-1){let f=A5(this.choices),p=f.indexOf(c);if(n.index>p){let h=f.slice(p,p+this.limit),E=f.filter(C=>!h.includes(C));this.choices=h.concat(E)}else{let h=p-this.limit+1;this.choices=f.slice(h).concat(f.slice(0,h))}}return this.index=this.choices.indexOf(c),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(s=>{let a=this.choices.length,n=this.num,c=(f=!1,p)=>{clearTimeout(this.numberTimeout),f&&(p=r(n)),this.num=\"\",s(p)};if(n===\"0\"||n.length===1&&+(n+\"0\")>a)return c(!0);if(Number(n)>a)return c(!1,this.alert());this.numberTimeout=setTimeout(()=>c(!0),this.delay)})}home(){return this.choices=A5(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=A5(this.choices);return this.choices=r.slice(e).concat(r.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===0?this.alert():e>r&&s===0?this.scrollUp():(this.index=(s-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===r-1?this.alert():e>r&&s===r-1?this.scrollDown():(this.index=(s+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=Jat(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=Kat(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){zat(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&[\"disabled\",\"collapsed\",\"hidden\",\"completing\",\"readonly\"].some(s=>e[s]===!0)?!0:e&&e.role===\"heading\"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(r=>this.isEnabled(r));if(e.choices){let r=e.choices.filter(s=>!this.isDisabled(s));return e.enabled&&r.every(s=>this.isEnabled(s))}return e.enabled&&!this.isDisabled(e)}isChoice(e,r){return e.name===r||e.index===Number(r)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(e,r)):this.isChoice(e,this.initial)}map(e=[],r=\"value\"){return[].concat(e||[]).reduce((s,a)=>(s[a]=this.find(a,r),s),{})}filter(e,r){let a=typeof e==\"function\"?e:(f,p)=>[f.name,p].includes(e),c=(this.options.multiple?this.state._choices:this.choices).filter(a);return r?c.map(f=>f[r]):c}find(e,r){if(sme(e))return r?e[r]:e;let a=typeof e==\"function\"?e:(c,f)=>[c.name,f].includes(e),n=this.choices.find(a);if(n)return r?n[r]:n}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(c=>c.newChoice))return this.alert();let{reorder:r,sort:s}=this.options,a=this.multiple===!0,n=this.selected;return n===void 0?this.alert():(Array.isArray(n)&&r!==!1&&s!==!0&&(n=zR.reorder(n)),this.value=a?n.map(c=>c.name):n.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let r of e)this.state._choices.some(s=>s.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r==\"string\"||typeof r==\"number\"){let s=this.find(r);s&&(this.initial=s.index,this.focus(s,!0))}}}get choices(){return ome(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:r,choices:s}=this,a=e.limit||this._limit||r.limit||s.length;return Math.min(a,this.height)}set value(e){super.value=e}get value(){return typeof super.value!=\"string\"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}};function ome(t,e){if(e instanceof Promise)return e;if(typeof e==\"function\"){if(zR.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let s=r.choices.filter(a=>!t.isDisabled(a));r.enabled=s.every(a=>a.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}ame.exports=p5});var G0=_((ijt,lme)=>{\"use strict\";var Xat=Wv(),h5=Zo(),g5=class extends Xat{constructor(e){super(e),this.emptyError=this.options.emptyError||\"No items were selected\"}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,r){return!this.multiple||this.options.pointer?super.pointer(e,r):\"\"}indicator(e,r){return this.multiple?super.indicator(e,r):\"\"}choiceMessage(e,r){let s=this.resolve(e.message,this.state,e,r);return e.role===\"heading\"&&!h5.hasColor(s)&&(s=this.styles.strong(s)),this.resolve(s,this.state,e,r)}choiceSeparator(){return\":\"}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=await this.pointer(e,r),n=await this.indicator(e,r)+(e.pad||\"\"),c=await this.resolve(e.hint,this.state,e,r);c&&!h5.hasColor(c)&&(c=this.styles.muted(c));let f=this.indent(e),p=await this.choiceMessage(e,r),h=()=>[this.margin[3],f+a+n,p,this.margin[1],c].filter(Boolean).join(\" \");return e.role===\"heading\"?h():e.disabled?(h5.hasColor(p)||(p=this.styles.disabled(p)),h()):(s&&(p=this.styles.em(p)),h())}async renderChoices(){if(this.state.loading===\"choices\")return this.styles.warning(\"Loading choices\");if(this.state.submitted)return\"\";let e=this.visible.map(async(n,c)=>await this.renderChoice(n,c)),r=await Promise.all(e);r.length||r.push(this.styles.danger(\"No matching choices\"));let s=this.margin[0]+r.join(`\n`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,s].filter(Boolean).join(`\n`)}format(){return!this.state.submitted||this.state.cancelled?\"\":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(\", \"):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,s=\"\",a=await this.header(),n=await this.prefix(),c=await this.separator(),f=await this.message();this.options.promptLine!==!1&&(s=[n,f,c,\"\"].join(\" \"),this.state.prompt=s);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();p&&(s+=p),h&&!s.includes(h)&&(s+=\" \"+h),e&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(s+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,s,E,C].filter(Boolean).join(`\n`)),this.write(this.margin[2]),this.restore()}};lme.exports=g5});var ume=_((sjt,cme)=>{\"use strict\";var Zat=G0(),$at=(t,e)=>{let r=t.toLowerCase();return s=>{let n=s.toLowerCase().indexOf(r),c=e(s.slice(n,n+r.length));return n>=0?s.slice(0,n)+c+s.slice(n+r.length):s}},d5=class extends Zat{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:s}=this.state;return this.input=s.slice(0,r)+e+s.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest==\"function\")return this.options.suggest.call(this,e,r);let s=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(s))}pointer(){return\"\"}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(\", \");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!==\"pending\")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=$at(this.input,e),s=this.choices;this.choices=s.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=s}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};cme.exports=d5});var y5=_((ojt,fme)=>{\"use strict\";var m5=Zo();fme.exports=(t,e={})=>{t.cursorHide();let{input:r=\"\",initial:s=\"\",pos:a,showCursor:n=!0,color:c}=e,f=c||t.styles.placeholder,p=m5.inverse(t.styles.primary),h=R=>p(t.styles.black(R)),E=r,C=\" \",S=h(C);if(t.blink&&t.blink.off===!0&&(h=R=>R,S=\"\"),n&&a===0&&s===\"\"&&r===\"\")return h(C);if(n&&a===0&&(r===s||r===\"\"))return h(s[0])+f(s.slice(1));s=m5.isPrimitive(s)?`${s}`:\"\",r=m5.isPrimitive(r)?`${r}`:\"\";let P=s&&s.startsWith(r)&&s!==r,I=P?h(s[r.length]):S;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),I=\"\"),n===!1&&(I=\"\"),P){let R=t.styles.unstyle(E+I);return E+I+f(s.slice(R.length))}return E+I}});var XR=_((ajt,Ame)=>{\"use strict\";var elt=Ju(),tlt=G0(),rlt=y5(),E5=class extends tlt{constructor(e){super({...e,multiple:!0}),this.type=\"form\",this.initial=this.options.initial,this.align=[this.options.align,\"right\"].find(r=>r!=null),this.emptyError=\"\",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:s,input:a}=r;return r.value=r.input=a.slice(0,s)+e+a.slice(s),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:s}=e;return e.value=e.input=s.slice(0,r-1)+s.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:s}=e;if(s[r]===void 0)return this.alert();let a=`${s}`.slice(0,r)+`${s}`.slice(r+1);return e.value=e.input=a,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:s}=e;return r&&r.startsWith(s)&&s!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input=\"\",e.cursor=0,this.render()):this.alert()}separator(){return\"\"}format(e){return this.state.submitted?\"\":super.format(e)}pointer(){return\"\"}indicator(e){return e.input?\"\\u29BF\":\"\\u2299\"}async choiceSeparator(e,r){let s=await this.resolve(e.separator,this.state,e,r)||\":\";return s?\" \"+this.styles.disabled(s):\"\"}async renderChoice(e,r){await this.onChoice(e,r);let{state:s,styles:a}=this,{cursor:n,initial:c=\"\",name:f,hint:p,input:h=\"\"}=e,{muted:E,submitted:C,primary:S,danger:P}=a,I=p,R=this.index===r,N=e.validate||(()=>!0),U=await this.choiceSeparator(e,r),W=e.message;this.align===\"right\"&&(W=W.padStart(this.longest+1,\" \")),this.align===\"left\"&&(W=W.padEnd(this.longest+1,\" \"));let ee=this.values[f]=h||c,ie=h?\"success\":\"dark\";await N.call(e,ee,this.state)!==!0&&(ie=\"danger\");let ue=a[ie],le=ue(await this.indicator(e,r))+(e.pad||\"\"),me=this.indent(e),pe=()=>[me,le,W+U,h,I].filter(Boolean).join(\" \");if(s.submitted)return W=elt.unstyle(W),h=C(h),I=\"\",pe();if(e.format)h=await e.format.call(this,h,e,r);else{let Be=this.styles.muted;h=rlt(this,{input:h,initial:c,pos:n,showCursor:R,color:Be})}return this.isValue(h)||(h=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[f]=await e.result.call(this,ee,e,r)),R&&(W=S(W)),e.error?h+=(h?\" \":\"\")+P(e.error.trim()):e.hint&&(h+=(h?\" \":\"\")+E(e.hint.trim())),pe()}async submit(){return this.value=this.values,super.base.submit.call(this)}};Ame.exports=E5});var I5=_((ljt,hme)=>{\"use strict\";var nlt=XR(),ilt=()=>{throw new Error(\"expected prompt to have a custom authenticate method\")},pme=(t=ilt)=>{class e extends nlt{constructor(s){super(s)}async submit(){this.value=await t.call(this,this.values,this.state),super.base.submit.call(this)}static create(s){return pme(s)}}return e};hme.exports=pme()});var mme=_((cjt,dme)=>{\"use strict\";var slt=I5();function olt(t,e){return t.username===this.options.username&&t.password===this.options.password}var gme=(t=olt)=>{let e=[{name:\"username\",message:\"username\"},{name:\"password\",message:\"password\",format(s){return this.options.showPassword?s:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(s.length))}}];class r extends slt.create(t){constructor(a){super({...a,choices:e})}static create(a){return gme(a)}}return r};dme.exports=gme()});var ZR=_((ujt,yme)=>{\"use strict\";var alt=nC(),{isPrimitive:llt,hasColor:clt}=Zo(),C5=class extends alt{constructor(e){super(e),this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:r,state:s}=this;return s.submitted?r.success(e):r.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return llt(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status===\"pending\"){let e=await this.element(\"hint\");return clt(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=this.styles.muted(this.default),f=[s,n,c,a].filter(Boolean).join(\" \");this.state.prompt=f;let p=await this.header(),h=this.value=this.cast(e),E=await this.format(h),C=await this.error()||await this.hint(),S=await this.footer();C&&!f.includes(C)&&(E+=\" \"+C),f+=\" \"+E,this.clear(r),this.write([p,f,S].filter(Boolean).join(`\n`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};yme.exports=C5});var Ime=_((fjt,Eme)=>{\"use strict\";var ult=ZR(),w5=class extends ult{constructor(e){super(e),this.default=this.options.default||(this.initial?\"(Y/n)\":\"(y/N)\")}};Eme.exports=w5});var wme=_((Ajt,Cme)=>{\"use strict\";var flt=G0(),Alt=XR(),iC=Alt.prototype,B5=class extends flt{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,\"left\"].find(r=>r!=null),this.emptyError=\"\",this.values={}}dispatch(e,r){let s=this.focused,a=s.parent||{};return!s.editable&&!a.editable&&(e===\"a\"||e===\"i\")?super[e]():iC.dispatch.call(this,e,r)}append(e,r){return iC.append.call(this,e,r)}delete(e,r){return iC.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?iC.next.call(this):super.next()}prev(){return this.focused.editable?iC.prev.call(this):super.prev()}async indicator(e,r){let s=e.indicator||\"\",a=e.editable?s:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||\"\"}indent(e){return e.role===\"heading\"?\"\":e.editable?\" \":\"  \"}async renderChoice(e,r){return e.indent=\"\",e.editable?iC.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return\"\"}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!=\"function\"||r.role===\"heading\")continue;let s=r.parent?this.value[r.parent.name]:this.value;if(r.editable?s=r.value===r.name?r.initial||\"\":r.value:this.isDisabled(r)||(s=r.enabled===!0),e=await r.validate(s,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e==\"string\"?e:\"Invalid Input\"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role===\"heading\"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||\"\":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};Cme.exports=B5});var vm=_((pjt,Bme)=>{\"use strict\";var plt=nC(),hlt=y5(),{isPrimitive:glt}=Zo(),v5=class extends plt{constructor(e){super(e),this.initial=glt(this.initial)?String(this.initial):\"\",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let s=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name===\"return\"&&(!s||s.name!==\"return\")?this.append(`\n`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value=\"\",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:s}=this.state;this.input=`${s}`.slice(0,r)+e+`${s}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),s=this.input.slice(e),a=r.split(\" \");this.state.clipboard.push(a.pop()),this.input=a.join(\" \"),this.cursor=this.input.length,this.input+=s,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):\"\";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):hlt(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),s=await this.separator(),a=await this.message(),n=[r,a,s].filter(Boolean).join(\" \");this.state.prompt=n;let c=await this.header(),f=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!f.includes(p)&&(f+=\" \"+p),n+=\" \"+f,this.clear(e),this.write([c,n,h].filter(Boolean).join(`\n`)),this.restore()}};Bme.exports=v5});var Sme=_((hjt,vme)=>{\"use strict\";var dlt=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),$R=t=>dlt(t).filter(Boolean);vme.exports=(t,e={},r=\"\")=>{let{past:s=[],present:a=\"\"}=e,n,c;switch(t){case\"prev\":case\"undo\":return n=s.slice(0,s.length-1),c=s[s.length-1]||\"\",{past:$R([r,...n]),present:c};case\"next\":case\"redo\":return n=s.slice(1),c=s[0]||\"\",{past:$R([...n,r]),present:c};case\"save\":return{past:$R([...s,r]),present:\"\"};case\"remove\":return c=$R(s.filter(f=>f!==r)),a=\"\",c.length&&(a=c.pop()),{past:c,present:a};default:throw new Error(`Invalid action: \"${t}\"`)}}});var D5=_((gjt,bme)=>{\"use strict\";var mlt=vm(),Dme=Sme(),S5=class extends mlt{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let s=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get(\"values\")||{past:[],present:s},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=Dme(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion(\"prev\")}altDown(){return this.completion(\"next\")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=Dme(\"save\",this.data,this.input),this.store.set(\"values\",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};bme.exports=S5});var xme=_((djt,Pme)=>{\"use strict\";var ylt=vm(),b5=class extends ylt{format(){return\"\"}};Pme.exports=b5});var Qme=_((mjt,kme)=>{\"use strict\";var Elt=vm(),P5=class extends Elt{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||\"\"}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(\", \")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};kme.exports=P5});var Rme=_((yjt,Tme)=>{\"use strict\";var Ilt=G0(),x5=class extends Ilt{constructor(e){super({...e,multiple:!0})}};Tme.exports=x5});var Q5=_((Ejt,Fme)=>{\"use strict\";var Clt=vm(),k5=class extends Clt{constructor(e={}){super({style:\"number\",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:\"\",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e===\".\"&&this.input.includes(\".\")?this.alert(\"invalid number\"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,s=this.toNumber(this.input);return s>this.max+r?this.alert():(this.input=`${s+r}`,this.render())}down(e){let r=e||this.minor,s=this.toNumber(this.input);return s<this.min-r?this.alert():(this.input=`${s-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format==\"function\"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=\"\"){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\\.)|(\\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};Fme.exports=k5});var Ome=_((Ijt,Nme)=>{Nme.exports=Q5()});var Mme=_((Cjt,Lme)=>{\"use strict\";var wlt=vm(),T5=class extends wlt{constructor(e){super(e),this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):\"\"}};Lme.exports=T5});var Hme=_((wjt,_me)=>{\"use strict\";var Blt=Ju(),vlt=Wv(),Ume=Zo(),R5=class extends vlt{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||\"left\"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||`\n   `;let r=e.startNumber||1;typeof this.scale==\"number\"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((s,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let s=0;s<this.scale.length;s++)r.scale.push({index:s})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,s){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return\"\"}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(\", \"):\"\"}pointer(){return\"\"}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?\"\":[\"\",...this.scale.map(s=>`   ${s.name} - ${s.message}`)].map(s=>this.styles.muted(s)).join(`\n`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading==\"function\"&&(r=this.options.renderScaleHeading.call(this,e));let s=this.scaleLength-r.join(\"\").length,a=Math.round(s/(r.length-1)),c=r.map(p=>this.styles.strong(p)).join(\" \".repeat(a)),f=\" \".repeat(this.widths[0]);return this.margin[3]+f+this.margin[1]+c}scaleIndicator(e,r,s){if(typeof this.options.scaleIndicator==\"function\")return this.options.scaleIndicator.call(this,e,r,s);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let s=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term===\"Hyper\"?\"\":\" \";return s.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!Ume.hasColor(n)&&(n=this.styles.muted(n));let c=I=>this.margin[3]+I.replace(/\\s+$/,\"\").padEnd(this.widths[0],\" \"),f=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),E=await this.renderScale(e,r),C=this.margin[1]+this.margin[3];this.scaleLength=Blt.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-C.length);let P=Ume.wordWrap(h,{width:this.widths[0],newline:f}).split(`\n`).map(I=>c(I)+this.margin[1]);return s&&(E=this.styles.info(E),P=P.map(I=>this.styles.info(I))),P[0]+=E,this.linebreak&&P.push(\"\"),[p+a,P.join(`\n`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return\"\";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),s=await this.renderScaleHeading();return this.margin[0]+[s,...r.map(a=>a.join(\" \"))].join(`\n`)}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=\"\";this.options.promptLine!==!1&&(c=[s,n,a,\"\"].join(\" \"),this.state.prompt=c);let f=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),C=await this.renderChoices(),S=await this.footer(),P=this.emptyError;p&&(c+=p),E&&!c.includes(E)&&(c+=\" \"+E),e&&!p&&!C.trim()&&this.multiple&&P!=null&&(c+=this.styles.danger(P)),this.clear(r),this.write([f,c,h,C,S].filter(Boolean).join(`\n`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};_me.exports=R5});var qme=_((Bjt,Gme)=>{\"use strict\";var jme=Ju(),Slt=(t=\"\")=>typeof t==\"string\"?t.replace(/^['\"]|['\"]$/g,\"\"):\"\",N5=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=Slt(e.initial||this.field.initial||\"\"),this.message=e.message||this.name,this.cursor=0,this.input=\"\",this.lines=[]}},Dlt=async(t={},e={},r=s=>s)=>{let s=new Set,a=t.fields||[],n=t.template,c=[],f=[],p=[],h=1;typeof n==\"function\"&&(n=await n());let E=-1,C=()=>n[++E],S=()=>n[E+1],P=I=>{I.line=h,c.push(I)};for(P({type:\"bos\",value:\"\"});E<n.length-1;){let I=C();if(/^[^\\S\\n ]$/.test(I)){P({type:\"text\",value:I});continue}if(I===`\n`){P({type:\"newline\",value:I}),h++;continue}if(I===\"\\\\\"){I+=C(),P({type:\"text\",value:I});continue}if((I===\"$\"||I===\"#\"||I===\"{\")&&S()===\"{\"){let N=C();I+=N;let U={type:\"template\",open:I,inner:\"\",close:\"\",value:I},W;for(;W=C();){if(W===\"}\"){S()===\"}\"&&(W+=C()),U.value+=W,U.close=W;break}W===\":\"?(U.initial=\"\",U.key=U.inner):U.initial!==void 0&&(U.initial+=W),U.value+=W,U.inner+=W}U.template=U.open+(U.initial||U.inner)+U.close,U.key=U.key||U.inner,e.hasOwnProperty(U.key)&&(U.initial=e[U.key]),U=r(U),P(U),p.push(U.key),s.add(U.key);let ee=f.find(ie=>ie.name===U.key);U.field=a.find(ie=>ie.name===U.key),ee||(ee=new N5(U),f.push(ee)),ee.lines.push(U.line-1);continue}let R=c[c.length-1];R.type===\"text\"&&R.line===h?R.value+=I:P({type:\"text\",value:I})}return P({type:\"eos\",value:\"\"}),{input:n,tabstops:c,unique:s,keys:p,items:f}};Gme.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),s={...e.values,...e.initial},{tabstops:a,items:n,keys:c}=await Dlt(e,s),f=F5(\"result\",t,e),p=F5(\"format\",t,e),h=F5(\"validate\",t,e,!0),E=t.isValue.bind(t);return async(C={},S=!1)=>{let P=0;C.required=r,C.items=n,C.keys=c,C.output=\"\";let I=async(W,ee,ie,ue)=>{let le=await h(W,ee,ie,ue);return le===!1?\"Invalid field \"+ie.name:le};for(let W of a){let ee=W.value,ie=W.key;if(W.type!==\"template\"){ee&&(C.output+=ee);continue}if(W.type===\"template\"){let ue=n.find(Ce=>Ce.name===ie);e.required===!0&&C.required.add(ue.name);let le=[ue.input,C.values[ue.value],ue.value,ee].find(E),pe=(ue.field||{}).message||W.inner;if(S){let Ce=await I(C.values[ie],C,ue,P);if(Ce&&typeof Ce==\"string\"||Ce===!1){C.invalid.set(ie,Ce);continue}C.invalid.delete(ie);let g=await f(C.values[ie],C,ue,P);C.output+=jme.unstyle(g);continue}ue.placeholder=!1;let Be=ee;ee=await p(ee,C,ue,P),le!==ee?(C.values[ie]=le,ee=t.styles.typing(le),C.missing.delete(pe)):(C.values[ie]=void 0,le=`<${pe}>`,ee=t.styles.primary(le),ue.placeholder=!0,C.required.has(ie)&&C.missing.add(pe)),C.missing.has(pe)&&C.validating&&(ee=t.styles.warning(le)),C.invalid.has(ie)&&C.validating&&(ee=t.styles.danger(le)),P===C.index&&(Be!==ee?ee=t.styles.underline(ee):ee=t.styles.heading(jme.unstyle(ee))),P++}ee&&(C.output+=ee)}let R=C.output.split(`\n`).map(W=>\" \"+W),N=n.length,U=0;for(let W of n)C.invalid.has(W.name)&&W.lines.forEach(ee=>{R[ee][0]===\" \"&&(R[ee]=C.styles.danger(C.symbols.bullet)+R[ee].slice(1))}),t.isValue(C.values[W.name])&&U++;return C.completed=(U/N*100).toFixed(0),C.output=R.join(`\n`),C.output}};function F5(t,e,r,s){return(a,n,c,f)=>typeof c.field[t]==\"function\"?c.field[t].call(e,a,n,c,f):[s,a].find(p=>e.isValue(p))}});var Yme=_((vjt,Wme)=>{\"use strict\";var blt=Ju(),Plt=qme(),xlt=nC(),O5=class extends xlt{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await Plt(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let s=this.getItem(),a=s.input.slice(0,this.cursor),n=s.input.slice(this.cursor);this.input=s.input=`${a}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),s=e.input.slice(0,this.cursor-1);this.input=e.input=`${s}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:s,size:a}=this.state,n=[this.options.newline,`\n`].find(W=>W!=null),c=await this.prefix(),f=await this.separator(),p=await this.message(),h=[c,p,f].filter(Boolean).join(\" \");this.state.prompt=h;let E=await this.header(),C=await this.error()||\"\",S=await this.hint()||\"\",P=s?\"\":await this.interpolate(this.state),I=this.state.key=r[e]||\"\",R=await this.format(I),N=await this.footer();R&&(h+=\" \"+R),S&&!R&&this.state.completed===0&&(h+=\" \"+S),this.clear(a);let U=[E,h,P,N,C.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:s,index:a}=this.state,n=r.find(c=>c.name===s[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!=\"function\"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:s,values:a}=this.state;if(e.size){let f=\"\";for(let[p,h]of e)f+=`Invalid ${p}: ${h}\n`;return this.state.error=f,super.submit()}if(r.size)return this.state.error=\"Required: \"+[...r.keys()].join(\", \"),super.submit();let c=blt.unstyle(s).split(`\n`).map(f=>f.slice(1)).join(`\n`);return this.value={values:a,result:c},super.submit()}};Wme.exports=O5});var Jme=_((Sjt,Vme)=>{\"use strict\";var klt=\"(Use <shift>+<up/down> to sort)\",Qlt=G0(),L5=class extends Qlt{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,klt].find(this.isValue.bind(this))}indicator(){return\"\"}async renderChoice(e,r){let s=await super.renderChoice(e,r),a=this.symbols.identicalTo+\" \",n=this.index===r&&this.sorting?this.styles.muted(a):\"  \";return this.options.drag===!1&&(n=\"\"),this.options.numbered===!0?n+`${r+1} - `+s:n+s}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};Vme.exports=L5});var zme=_((Djt,Kme)=>{\"use strict\";var Tlt=Wv(),M5=class extends Tlt{constructor(e={}){if(super(e),this.emptyError=e.emptyError||\"No items were selected\",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=[\"\",\"4 - Strongly Agree\",\"3 - Agree\",\"2 - Neutral\",\"1 - Disagree\",\"0 - Strongly Disagree\",\"\"];r=r.map(s=>this.styles.muted(s)),this.state.header=r.join(`\n   `)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let s of r)s.scale=Rlt(5,this.options),s.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],s=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!s,this.render()}indicator(){return\"\"}pointer(){return\"\"}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return\"   \"}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=this.term===\"Hyper\",n=a?9:8,c=a?\"\":\" \",f=this.symbols.line.repeat(n),p=\" \".repeat(n+(a?0:1)),h=ee=>(ee?this.styles.success(\"\\u25C9\"):\"\\u25EF\")+c,E=r+1+\".\",C=s?this.styles.heading:this.styles.noop,S=await this.resolve(e.message,this.state,e,r),P=this.indent(e),I=P+e.scale.map((ee,ie)=>h(ie===e.scaleIdx)).join(f),R=ee=>ee===e.scaleIdx?C(ee):ee,N=P+e.scale.map((ee,ie)=>R(ie)).join(p),U=()=>[E,S].filter(Boolean).join(\" \"),W=()=>[U(),I,N,\" \"].filter(Boolean).join(`\n`);return s&&(I=this.styles.cyan(I),N=this.styles.cyan(N)),W()}async renderChoices(){if(this.state.submitted)return\"\";let e=this.visible.map(async(s,a)=>await this.renderChoice(s,a)),r=await Promise.all(e);return r.length||r.push(this.styles.danger(\"No matching choices\")),r.join(`\n`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(\", \"):\"\"}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=[s,n,a].filter(Boolean).join(\" \");this.state.prompt=c;let f=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();(p||!h)&&(c+=\" \"+p),h&&!c.includes(h)&&(c+=\" \"+h),e&&!p&&!E&&this.multiple&&this.type!==\"form\"&&(c+=this.styles.danger(this.emptyError)),this.clear(r),this.write([c,f,E,C].filter(Boolean).join(`\n`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function Rlt(t,e={}){if(Array.isArray(e.scale))return e.scale.map(s=>({...s}));let r=[];for(let s=1;s<t+1;s++)r.push({i:s,selected:!1});return r}Kme.exports=M5});var Zme=_((bjt,Xme)=>{Xme.exports=D5()});var eye=_((Pjt,$me)=>{\"use strict\";var Flt=ZR(),U5=class extends Flt{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||\"no\",this.enabled=this.options.enabled||\"yes\",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e=\"\",r){switch(e.toLowerCase()){case\" \":return this.toggle();case\"1\":case\"y\":case\"t\":return this.enable();case\"0\":case\"n\":case\"f\":return this.disable();default:return this.alert()}}format(){let e=s=>this.styles.primary.underline(s);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(\" / \"))}async render(){let{size:e}=this.state,r=await this.header(),s=await this.prefix(),a=await this.separator(),n=await this.message(),c=await this.format(),f=await this.error()||await this.hint(),p=await this.footer(),h=[s,n,a,c].join(\" \");this.state.prompt=h,f&&!h.includes(f)&&(h+=\" \"+f),this.clear(e),this.write([r,h,p].filter(Boolean).join(`\n`)),this.write(this.margin[2]),this.restore()}};$me.exports=U5});var rye=_((xjt,tye)=>{\"use strict\";var Nlt=G0(),_5=class extends Nlt{constructor(e){if(super(e),typeof this.options.correctChoice!=\"number\"||this.options.correctChoice<0)throw new Error(\"Please specify the index of the correct answer from the list of choices\")}async toChoices(e,r){let s=await super.toChoices(e,r);if(s.length<2)throw new Error(\"Please give at least two choices to the user\");if(this.options.correctChoice>s.length)throw new Error(\"Please specify the index of the correct answer from the list of choices\");return s}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};tye.exports=_5});var iye=_(H5=>{\"use strict\";var nye=Zo(),ks=(t,e)=>{nye.defineExport(H5,t,e),nye.defineExport(H5,t.toLowerCase(),e)};ks(\"AutoComplete\",()=>ume());ks(\"BasicAuth\",()=>mme());ks(\"Confirm\",()=>Ime());ks(\"Editable\",()=>wme());ks(\"Form\",()=>XR());ks(\"Input\",()=>D5());ks(\"Invisible\",()=>xme());ks(\"List\",()=>Qme());ks(\"MultiSelect\",()=>Rme());ks(\"Numeral\",()=>Ome());ks(\"Password\",()=>Mme());ks(\"Scale\",()=>Hme());ks(\"Select\",()=>G0());ks(\"Snippet\",()=>Yme());ks(\"Sort\",()=>Jme());ks(\"Survey\",()=>zme());ks(\"Text\",()=>Zme());ks(\"Toggle\",()=>eye());ks(\"Quiz\",()=>rye())});var oye=_((Qjt,sye)=>{sye.exports={ArrayPrompt:Wv(),AuthPrompt:I5(),BooleanPrompt:ZR(),NumberPrompt:Q5(),StringPrompt:vm()}});var Vv=_((Tjt,lye)=>{\"use strict\";var aye=Ie(\"assert\"),G5=Ie(\"events\"),q0=Zo(),zu=class extends G5{constructor(e,r){super(),this.options=q0.merge({},e),this.answers={...r}}register(e,r){if(q0.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}aye.equal(typeof r,\"function\",\"expected a function\");let s=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[s]=r:this.prompts[s]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r==\"function\"&&(r=await r.call(this)),await this.ask(q0.merge({},this.options,r))}catch(s){return Promise.reject(s)}return this.answers}async ask(e){typeof e==\"function\"&&(e=await e.call(this));let r=q0.merge({},this.options,e),{type:s,name:a}=e,{set:n,get:c}=q0;if(typeof s==\"function\"&&(s=await s.call(this,e,this.answers)),!s)return this.answers[a];aye(this.prompts[s],`Prompt \"${s}\" is not registered`);let f=new this.prompts[s](r),p=c(this.answers,a);f.state.answers=this.answers,f.enquirer=this,a&&f.on(\"submit\",E=>{this.emit(\"answer\",a,E,f),n(this.answers,a,E)});let h=f.emit.bind(f);return f.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit(\"prompt\",f,this),r.autofill&&p!=null?(f.value=f.input=p,r.autofill===\"show\"&&await f.submit()):p=f.value=await f.run(),p}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||nC()}static get prompts(){return iye()}static get types(){return oye()}static get prompt(){let e=(r,...s)=>{let a=new this(...s),n=a.emit.bind(a);return a.emit=(...c)=>(e.emit(...c),n(...c)),a.prompt(r)};return q0.mixinEmitter(e,new G5),e}};q0.mixinEmitter(zu,new G5);var j5=zu.prompts;for(let t of Object.keys(j5)){let e=t.toLowerCase(),r=s=>new j5[t](s).run();zu.prompt[e]=r,zu[e]=r,zu[t]||Reflect.defineProperty(zu,t,{get:()=>j5[t]})}var Yv=t=>{q0.defineExport(zu,t,()=>zu.types[t])};Yv(\"ArrayPrompt\");Yv(\"AuthPrompt\");Yv(\"BooleanPrompt\");Yv(\"NumberPrompt\");Yv(\"StringPrompt\");lye.exports=zu});var dye=_((tGt,qlt)=>{qlt.exports={name:\"@yarnpkg/cli\",version:\"4.12.0\",license:\"BSD-2-Clause\",main:\"./sources/index.ts\",exports:{\".\":\"./sources/index.ts\",\"./polyfills\":\"./sources/polyfills.ts\",\"./package.json\":\"./package.json\"},dependencies:{\"@yarnpkg/core\":\"workspace:^\",\"@yarnpkg/fslib\":\"workspace:^\",\"@yarnpkg/libzip\":\"workspace:^\",\"@yarnpkg/parsers\":\"workspace:^\",\"@yarnpkg/plugin-catalog\":\"workspace:^\",\"@yarnpkg/plugin-compat\":\"workspace:^\",\"@yarnpkg/plugin-constraints\":\"workspace:^\",\"@yarnpkg/plugin-dlx\":\"workspace:^\",\"@yarnpkg/plugin-essentials\":\"workspace:^\",\"@yarnpkg/plugin-exec\":\"workspace:^\",\"@yarnpkg/plugin-file\":\"workspace:^\",\"@yarnpkg/plugin-git\":\"workspace:^\",\"@yarnpkg/plugin-github\":\"workspace:^\",\"@yarnpkg/plugin-http\":\"workspace:^\",\"@yarnpkg/plugin-init\":\"workspace:^\",\"@yarnpkg/plugin-interactive-tools\":\"workspace:^\",\"@yarnpkg/plugin-jsr\":\"workspace:^\",\"@yarnpkg/plugin-link\":\"workspace:^\",\"@yarnpkg/plugin-nm\":\"workspace:^\",\"@yarnpkg/plugin-npm\":\"workspace:^\",\"@yarnpkg/plugin-npm-cli\":\"workspace:^\",\"@yarnpkg/plugin-pack\":\"workspace:^\",\"@yarnpkg/plugin-patch\":\"workspace:^\",\"@yarnpkg/plugin-pnp\":\"workspace:^\",\"@yarnpkg/plugin-pnpm\":\"workspace:^\",\"@yarnpkg/plugin-stage\":\"workspace:^\",\"@yarnpkg/plugin-typescript\":\"workspace:^\",\"@yarnpkg/plugin-version\":\"workspace:^\",\"@yarnpkg/plugin-workspace-tools\":\"workspace:^\",\"@yarnpkg/shell\":\"workspace:^\",\"ci-info\":\"^4.0.0\",clipanion:\"^4.0.0-rc.2\",semver:\"^7.1.2\",tslib:\"^2.4.0\",typanion:\"^3.14.0\"},devDependencies:{\"@types/semver\":\"^7.1.0\",\"@yarnpkg/builder\":\"workspace:^\",\"@yarnpkg/monorepo\":\"workspace:^\",\"@yarnpkg/pnpify\":\"workspace:^\"},peerDependencies:{\"@yarnpkg/core\":\"workspace:^\"},scripts:{postpack:\"rm -rf lib\",prepack:'run build:compile \"$(pwd)\"',\"build:cli+hook\":\"run build:pnp:hook && builder build bundle\",\"build:cli\":\"builder build bundle\",\"run:cli\":\"builder run\",\"update-local\":\"run build:cli --no-git-hash && rsync -a --delete bundles/ bin/\"},publishConfig:{main:\"./lib/index.js\",bin:null,exports:{\".\":\"./lib/index.js\",\"./package.json\":\"./package.json\"}},files:[\"/lib/**/*\",\"!/lib/pluginConfiguration.*\",\"!/lib/cli.*\"],\"@yarnpkg/builder\":{bundles:{standard:[\"@yarnpkg/plugin-essentials\",\"@yarnpkg/plugin-catalog\",\"@yarnpkg/plugin-compat\",\"@yarnpkg/plugin-constraints\",\"@yarnpkg/plugin-dlx\",\"@yarnpkg/plugin-exec\",\"@yarnpkg/plugin-file\",\"@yarnpkg/plugin-git\",\"@yarnpkg/plugin-github\",\"@yarnpkg/plugin-http\",\"@yarnpkg/plugin-init\",\"@yarnpkg/plugin-interactive-tools\",\"@yarnpkg/plugin-jsr\",\"@yarnpkg/plugin-link\",\"@yarnpkg/plugin-nm\",\"@yarnpkg/plugin-npm\",\"@yarnpkg/plugin-npm-cli\",\"@yarnpkg/plugin-pack\",\"@yarnpkg/plugin-patch\",\"@yarnpkg/plugin-pnp\",\"@yarnpkg/plugin-pnpm\",\"@yarnpkg/plugin-stage\",\"@yarnpkg/plugin-typescript\",\"@yarnpkg/plugin-version\",\"@yarnpkg/plugin-workspace-tools\"]}},repository:{type:\"git\",url:\"git+https://github.com/yarnpkg/berry.git\",directory:\"packages/yarnpkg-cli\"},engines:{node:\">=18.12.0\"}}});var iq=_((R9t,Pye)=>{\"use strict\";Pye.exports=function(e,r){r===!0&&(r=0);var s=\"\";if(typeof e==\"string\")try{s=new URL(e).protocol}catch{}else e&&e.constructor===URL&&(s=e.protocol);var a=s.split(/\\:|\\+/).filter(Boolean);return typeof r==\"number\"?a[r]:a}});var kye=_((F9t,xye)=>{\"use strict\";var uct=iq();function fct(t){var e={protocols:[],protocol:null,port:null,resource:\"\",host:\"\",user:\"\",password:\"\",pathname:\"\",hash:\"\",search:\"\",href:t,query:{},parse_failed:!1};try{var r=new URL(t);e.protocols=uct(r),e.protocol=e.protocols[0],e.port=r.port,e.resource=r.hostname,e.host=r.host,e.user=r.username||\"\",e.password=r.password||\"\",e.pathname=r.pathname,e.hash=r.hash.slice(1),e.search=r.search.slice(1),e.href=r.href,e.query=Object.fromEntries(r.searchParams)}catch{e.protocols=[\"file\"],e.protocol=e.protocols[0],e.port=\"\",e.resource=\"\",e.user=\"\",e.pathname=\"\",e.hash=\"\",e.search=\"\",e.href=t,e.query={},e.parse_failed=!0}return e}xye.exports=fct});var Rye=_((N9t,Tye)=>{\"use strict\";var Act=kye();function pct(t){return t&&typeof t==\"object\"&&\"default\"in t?t:{default:t}}var hct=pct(Act),gct=\"text/plain\",dct=\"us-ascii\",Qye=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),mct=(t,{stripHash:e})=>{let r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:s,data:a,hash:n}=r.groups,c=s.split(\";\");n=e?\"\":n;let f=!1;c[c.length-1]===\"base64\"&&(c.pop(),f=!0);let p=(c.shift()||\"\").toLowerCase(),E=[...c.map(C=>{let[S,P=\"\"]=C.split(\"=\").map(I=>I.trim());return S===\"charset\"&&(P=P.toLowerCase(),P===dct)?\"\":`${S}${P?`=${P}`:\"\"}`}).filter(Boolean)];return f&&E.push(\"base64\"),(E.length>0||p&&p!==gct)&&E.unshift(p),`data:${E.join(\";\")},${f?a.trim():a}${n?`#${n}`:\"\"}`};function yct(t,e){if(e={defaultProtocol:\"http:\",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return mct(t,e);if(/^view-source:/i.test(t))throw new Error(\"`view-source:` is not supported as it is a non-standard protocol\");let r=t.startsWith(\"//\");!r&&/^\\.*\\//.test(t)||(t=t.replace(/^(?!(?:\\w+:)?\\/\\/)|^\\/\\//,e.defaultProtocol));let a=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error(\"The `forceHttp` and `forceHttps` options cannot be used together\");if(e.forceHttp&&a.protocol===\"https:\"&&(a.protocol=\"http:\"),e.forceHttps&&a.protocol===\"http:\"&&(a.protocol=\"https:\"),e.stripAuthentication&&(a.username=\"\",a.password=\"\"),e.stripHash?a.hash=\"\":e.stripTextFragment&&(a.hash=a.hash.replace(/#?:~:text.*?$/i,\"\")),a.pathname){let c=/\\b[a-z][a-z\\d+\\-.]{1,50}:\\/\\//g,f=0,p=\"\";for(;;){let E=c.exec(a.pathname);if(!E)break;let C=E[0],S=E.index,P=a.pathname.slice(f,S);p+=P.replace(/\\/{2,}/g,\"/\"),p+=C,f=S+C.length}let h=a.pathname.slice(f,a.pathname.length);p+=h.replace(/\\/{2,}/g,\"/\"),a.pathname=p}if(a.pathname)try{a.pathname=decodeURI(a.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let c=a.pathname.split(\"/\"),f=c[c.length-1];Qye(f,e.removeDirectoryIndex)&&(c=c.slice(0,-1),a.pathname=c.slice(1).join(\"/\")+\"/\")}if(a.hostname&&(a.hostname=a.hostname.replace(/\\.$/,\"\"),e.stripWWW&&/^www\\.(?!www\\.)[a-z\\-\\d]{1,63}\\.[a-z.\\-\\d]{2,63}$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\\./,\"\"))),Array.isArray(e.removeQueryParameters))for(let c of[...a.searchParams.keys()])Qye(c,e.removeQueryParameters)&&a.searchParams.delete(c);if(e.removeQueryParameters===!0&&(a.search=\"\"),e.sortQueryParameters){a.searchParams.sort();try{a.search=decodeURIComponent(a.search)}catch{}}e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\\/$/,\"\"));let n=t;return t=a.toString(),!e.removeSingleSlash&&a.pathname===\"/\"&&!n.endsWith(\"/\")&&a.hash===\"\"&&(t=t.replace(/\\/$/,\"\")),(e.removeTrailingSlash||a.pathname===\"/\")&&a.hash===\"\"&&e.removeSingleSlash&&(t=t.replace(/\\/$/,\"\")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\\/\\//,\"//\")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\\/\\//,\"\")),t}var sq=(t,e=!1)=>{let r=/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\\/\\/)([\\w\\.\\-@]+)[\\/:]([\\~,\\.\\w,\\-,\\_,\\/]+?(?:\\.git|\\/)?)$/,s=n=>{let c=new Error(n);throw c.subject_url=t,c};(typeof t!=\"string\"||!t.trim())&&s(\"Invalid url.\"),t.length>sq.MAX_INPUT_LENGTH&&s(\"Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH.\"),e&&(typeof e!=\"object\"&&(e={stripHash:!1}),t=yct(t,e));let a=hct.default(t);if(a.parse_failed){let n=a.href.match(r);n?(a.protocols=[\"ssh\"],a.protocol=\"ssh\",a.resource=n[2],a.host=n[2],a.user=n[1],a.pathname=`/${n[3]}`,a.parse_failed=!1):s(\"URL parsing failed.\")}return a};sq.MAX_INPUT_LENGTH=2048;Tye.exports=sq});var Oye=_((O9t,Nye)=>{\"use strict\";var Ect=iq();function Fye(t){if(Array.isArray(t))return t.indexOf(\"ssh\")!==-1||t.indexOf(\"rsync\")!==-1;if(typeof t!=\"string\")return!1;var e=Ect(t);if(t=t.substring(t.indexOf(\"://\")+3),Fye(e))return!0;var r=new RegExp(\".([a-zA-Z\\\\d]+):(\\\\d+)/\");return!t.match(r)&&t.indexOf(\"@\")<t.indexOf(\":\")}Nye.exports=Fye});var Uye=_((L9t,Mye)=>{\"use strict\";var Ict=Rye(),Lye=Oye();function Cct(t){var e=Ict(t);return e.token=\"\",e.password===\"x-oauth-basic\"?e.token=e.user:e.user===\"x-token-auth\"&&(e.token=e.password),Lye(e.protocols)||e.protocols.length===0&&Lye(t)?e.protocol=\"ssh\":e.protocols.length?e.protocol=e.protocols[0]:(e.protocol=\"file\",e.protocols=[\"file\"]),e.href=e.href.replace(/\\/$/,\"\"),e}Mye.exports=Cct});var Hye=_((M9t,_ye)=>{\"use strict\";var wct=Uye();function oq(t){if(typeof t!=\"string\")throw new Error(\"The url must be a string.\");var e=/^([a-z\\d-]{1,39})\\/([-\\.\\w]{1,100})$/i;e.test(t)&&(t=\"https://github.com/\"+t);var r=wct(t),s=r.resource.split(\".\"),a=null;switch(r.toString=function(N){return oq.stringify(this,N)},r.source=s.length>2?s.slice(1-s.length).join(\".\"):r.source=r.resource,r.git_suffix=/\\.git$/.test(r.pathname),r.name=decodeURIComponent((r.pathname||r.href).replace(/(^\\/)|(\\/$)/g,\"\").replace(/\\.git$/,\"\")),r.owner=decodeURIComponent(r.user),r.source){case\"git.cloudforge.com\":r.owner=r.user,r.organization=s[0],r.source=\"cloudforge.com\";break;case\"visualstudio.com\":if(r.resource===\"vs-ssh.visualstudio.com\"){a=r.name.split(\"/\"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3],r.full_name=a[2]+\"/\"+a[3]);break}else{a=r.name.split(\"/\"),a.length===2?(r.owner=a[1],r.name=a[1],r.full_name=\"_git/\"+r.name):a.length===3?(r.name=a[2],a[0]===\"DefaultCollection\"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+\"/_git/\"+r.name):(r.owner=a[0],r.full_name=r.owner+\"/_git/\"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+\"/\"+r.owner+\"/_git/\"+r.name);break}case\"dev.azure.com\":case\"azure.com\":if(r.resource===\"ssh.dev.azure.com\"){a=r.name.split(\"/\"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3]);break}else{a=r.name.split(\"/\"),a.length===5?(r.organization=a[0],r.owner=a[1],r.name=a[4],r.full_name=\"_git/\"+r.name):a.length===3?(r.name=a[2],a[0]===\"DefaultCollection\"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+\"/_git/\"+r.name):(r.owner=a[0],r.full_name=r.owner+\"/_git/\"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+\"/\"+r.owner+\"/_git/\"+r.name),r.query&&r.query.path&&(r.filepath=r.query.path.replace(/^\\/+/g,\"\")),r.query&&r.query.version&&(r.ref=r.query.version.replace(/^GB/,\"\"));break}default:a=r.name.split(\"/\");var n=a.length-1;if(a.length>=2){var c=a.indexOf(\"-\",2),f=a.indexOf(\"blob\",2),p=a.indexOf(\"tree\",2),h=a.indexOf(\"commit\",2),E=a.indexOf(\"src\",2),C=a.indexOf(\"raw\",2),S=a.indexOf(\"edit\",2);n=c>0?c-1:f>0?f-1:p>0?p-1:h>0?h-1:E>0?E-1:C>0?C-1:S>0?S-1:n,r.owner=a.slice(0,n).join(\"/\"),r.name=a[n],h&&(r.commit=a[n+2])}r.ref=\"\",r.filepathtype=\"\",r.filepath=\"\";var P=a.length>n&&a[n+1]===\"-\"?n+1:n;a.length>P+2&&[\"raw\",\"src\",\"blob\",\"tree\",\"edit\"].indexOf(a[P+1])>=0&&(r.filepathtype=a[P+1],r.ref=a[P+2],a.length>P+3&&(r.filepath=a.slice(P+3).join(\"/\"))),r.organization=r.owner;break}r.full_name||(r.full_name=r.owner,r.name&&(r.full_name&&(r.full_name+=\"/\"),r.full_name+=r.name)),r.owner.startsWith(\"scm/\")&&(r.source=\"bitbucket-server\",r.owner=r.owner.replace(\"scm/\",\"\"),r.organization=r.owner,r.full_name=r.owner+\"/\"+r.name);var I=/(projects|users)\\/(.*?)\\/repos\\/(.*?)((\\/.*$)|$)/,R=I.exec(r.pathname);return R!=null&&(r.source=\"bitbucket-server\",R[1]===\"users\"?r.owner=\"~\"+R[2]:r.owner=R[2],r.organization=r.owner,r.name=R[3],a=R[4].split(\"/\"),a.length>1&&([\"raw\",\"browse\"].indexOf(a[1])>=0?(r.filepathtype=a[1],a.length>2&&(r.filepath=a.slice(2).join(\"/\"))):a[1]===\"commits\"&&a.length>2&&(r.commit=a[2])),r.full_name=r.owner+\"/\"+r.name,r.query.at?r.ref=r.query.at:r.ref=\"\"),r}oq.stringify=function(t,e){e=e||(t.protocols&&t.protocols.length?t.protocols.join(\"+\"):t.protocol);var r=t.port?\":\"+t.port:\"\",s=t.user||\"git\",a=t.git_suffix?\".git\":\"\";switch(e){case\"ssh\":return r?\"ssh://\"+s+\"@\"+t.resource+r+\"/\"+t.full_name+a:s+\"@\"+t.resource+\":\"+t.full_name+a;case\"git+ssh\":case\"ssh+git\":case\"ftp\":case\"ftps\":return e+\"://\"+s+\"@\"+t.resource+r+\"/\"+t.full_name+a;case\"http\":case\"https\":var n=t.token?Bct(t):t.user&&(t.protocols.includes(\"http\")||t.protocols.includes(\"https\"))?t.user+\"@\":\"\";return e+\"://\"+n+t.resource+r+\"/\"+vct(t)+a;default:return t.href}};function Bct(t){switch(t.source){case\"bitbucket.org\":return\"x-token-auth:\"+t.token+\"@\";default:return t.token+\"@\"}}function vct(t){switch(t.source){case\"bitbucket-server\":return\"scm/\"+t.full_name;default:return\"\"+t.full_name}}_ye.exports=oq});function jct(t,e){return e===1&&Hct.has(t[0])}function nS(t){let e=Array.isArray(t)?t:Mu(t);return e.map((s,a)=>Uct.test(s)?`[${s}]`:_ct.test(s)&&!jct(e,a)?`.${s}`:`[${JSON.stringify(s)}]`).join(\"\").replace(/^\\./,\"\")}function Gct(t,e){let r=[];if(e.methodName!==null&&r.push(he.pretty(t,e.methodName,he.Type.CODE)),e.file!==null){let s=[];s.push(he.pretty(t,e.file,he.Type.PATH)),e.line!==null&&(s.push(he.pretty(t,e.line,he.Type.NUMBER)),e.column!==null&&s.push(he.pretty(t,e.column,he.Type.NUMBER))),r.push(`(${s.join(he.pretty(t,\":\",\"grey\"))})`)}return r.join(\" \")}function iF(t,{manifestUpdates:e,reportedErrors:r},{fix:s}={}){let a=new Map,n=new Map,c=[...r.keys()].map(f=>[f,new Map]);for(let[f,p]of[...c,...e]){let h=r.get(f)?.map(P=>({text:P,fixable:!1}))??[],E=!1,C=t.getWorkspaceByCwd(f),S=C.manifest.exportTo({});for(let[P,I]of p){if(I.size>1){let R=[...I].map(([N,U])=>{let W=he.pretty(t.configuration,N,he.Type.INSPECT),ee=U.size>0?Gct(t.configuration,U.values().next().value):null;return ee!==null?`\n${W} at ${ee}`:`\n${W}`}).join(\"\");h.push({text:`Conflict detected in constraint targeting ${he.pretty(t.configuration,P,he.Type.CODE)}; conflicting values are:${R}`,fixable:!1})}else{let[[R]]=I,N=va(S,P);if(JSON.stringify(N)===JSON.stringify(R))continue;if(!s){let U=typeof N>\"u\"?`Missing field ${he.pretty(t.configuration,P,he.Type.CODE)}; expected ${he.pretty(t.configuration,R,he.Type.INSPECT)}`:typeof R>\"u\"?`Extraneous field ${he.pretty(t.configuration,P,he.Type.CODE)} currently set to ${he.pretty(t.configuration,N,he.Type.INSPECT)}`:`Invalid field ${he.pretty(t.configuration,P,he.Type.CODE)}; expected ${he.pretty(t.configuration,R,he.Type.INSPECT)}, found ${he.pretty(t.configuration,N,he.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof R>\"u\"?A0(S,P):Jd(S,P,R),E=!0}E&&a.set(C,S)}h.length>0&&n.set(C,h)}return{changedWorkspaces:a,remainingErrors:n}}function rEe(t,{configuration:e}){let r={children:[]};for(let[s,a]of t){let n=[];for(let f of a){let p=f.text.split(/\\n/);f.fixable&&(p[0]=`${he.pretty(e,\"\\u2699\",\"gray\")} ${p[0]}`),n.push({value:he.tuple(he.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:he.tuple(he.Type.NO_HINT,h)}))})}let c={value:he.tuple(he.Type.LOCATOR,s.anchoredLocator),children:je.sortMap(n,f=>f.value[1])};r.children.push(c)}return r.children=je.sortMap(r.children,s=>s.value[1]),r}var WC,Uct,_ct,Hct,iS=Xe(()=>{Ge();ql();WC=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let s=Object.hasOwn(e,r)?e[r]:void 0;if(typeof s>\"u\")continue;je.getArrayWithDefault(this.indexes[r],s).push(e)}return e}find(e){if(typeof e>\"u\")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let s=[],a;for(let[c,f]of r){let p=c,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>\"u\"){s.push([p,f]);continue}let E=new Set(h.get(f)??[]);if(E.size===0)return[];if(typeof a>\"u\")a=E;else for(let C of a)E.has(C)||a.delete(C);if(a.size===0)break}let n=[...a??[]];return s.length>0&&(n=n.filter(c=>{for(let[f,p]of s)if(!(typeof p<\"u\"?Object.hasOwn(c,f)&&c[f]===p:Object.hasOwn(c,f)===!1))return!1;return!0})),n}},Uct=/^[0-9]+$/,_ct=/^[a-zA-Z0-9_]+$/,Hct=new Set([\"scripts\",...Ut.allDependencies])});var nEe=_((_Yt,vq)=>{var qct;(function(t){var e=function(){return{\"append/2\":[new t.type.Rule(new t.type.Term(\"append\",[new t.type.Var(\"X\"),new t.type.Var(\"L\")]),new t.type.Term(\"foldl\",[new t.type.Term(\"append\",[]),new t.type.Var(\"X\"),new t.type.Term(\"[]\",[]),new t.type.Var(\"L\")]))],\"append/3\":[new t.type.Rule(new t.type.Term(\"append\",[new t.type.Term(\"[]\",[]),new t.type.Var(\"X\"),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"append\",[new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"S\")])]),new t.type.Term(\"append\",[new t.type.Var(\"T\"),new t.type.Var(\"X\"),new t.type.Var(\"S\")]))],\"member/2\":[new t.type.Rule(new t.type.Term(\"member\",[new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"_\")])]),null),new t.type.Rule(new t.type.Term(\"member\",[new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"_\"),new t.type.Var(\"Xs\")])]),new t.type.Term(\"member\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]))],\"permutation/2\":[new t.type.Rule(new t.type.Term(\"permutation\",[new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"permutation\",[new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"permutation\",[new t.type.Var(\"T\"),new t.type.Var(\"P\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"P\")]),new t.type.Term(\"append\",[new t.type.Var(\"X\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"Y\")]),new t.type.Var(\"S\")])])]))],\"maplist/2\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"X\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"Xs\")])]))],\"maplist/3\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\")])]))],\"maplist/4\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\")])]))],\"maplist/5\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\")])]))],\"maplist/6\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")]),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Es\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\"),new t.type.Var(\"E\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\"),new t.type.Var(\"Es\")])]))],\"maplist/7\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")]),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Es\")]),new t.type.Term(\".\",[new t.type.Var(\"F\"),new t.type.Var(\"Fs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\"),new t.type.Var(\"E\"),new t.type.Var(\"F\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\"),new t.type.Var(\"Es\"),new t.type.Var(\"Fs\")])]))],\"maplist/8\":[new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"A\"),new t.type.Var(\"As\")]),new t.type.Term(\".\",[new t.type.Var(\"B\"),new t.type.Var(\"Bs\")]),new t.type.Term(\".\",[new t.type.Var(\"C\"),new t.type.Var(\"Cs\")]),new t.type.Term(\".\",[new t.type.Var(\"D\"),new t.type.Var(\"Ds\")]),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Es\")]),new t.type.Term(\".\",[new t.type.Var(\"F\"),new t.type.Var(\"Fs\")]),new t.type.Term(\".\",[new t.type.Var(\"G\"),new t.type.Var(\"Gs\")])]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P\"),new t.type.Var(\"A\"),new t.type.Var(\"B\"),new t.type.Var(\"C\"),new t.type.Var(\"D\"),new t.type.Var(\"E\"),new t.type.Var(\"F\"),new t.type.Var(\"G\")]),new t.type.Term(\"maplist\",[new t.type.Var(\"P\"),new t.type.Var(\"As\"),new t.type.Var(\"Bs\"),new t.type.Var(\"Cs\"),new t.type.Var(\"Ds\"),new t.type.Var(\"Es\"),new t.type.Var(\"Fs\"),new t.type.Var(\"Gs\")])]))],\"include/3\":[new t.type.Rule(new t.type.Term(\"include\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"include\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"L\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P\"),new t.type.Var(\"A\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"A\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"B\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"F\"),new t.type.Var(\"B\")]),new t.type.Term(\",\",[new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"F\")]),new t.type.Term(\",\",[new t.type.Term(\"=\",[new t.type.Var(\"L\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"S\")])]),new t.type.Term(\"!\",[])])]),new t.type.Term(\"=\",[new t.type.Var(\"L\"),new t.type.Var(\"S\")])]),new t.type.Term(\"include\",[new t.type.Var(\"P\"),new t.type.Var(\"T\"),new t.type.Var(\"S\")])])])])]))],\"exclude/3\":[new t.type.Rule(new t.type.Term(\"exclude\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Term(\"[]\",[])]),null),new t.type.Rule(new t.type.Term(\"exclude\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"exclude\",[new t.type.Var(\"P\"),new t.type.Var(\"T\"),new t.type.Var(\"E\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P\"),new t.type.Var(\"L\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"L\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"Q\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"R\"),new t.type.Var(\"Q\")]),new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"R\")]),new t.type.Term(\",\",[new t.type.Term(\"!\",[]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"E\")])])]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"E\")])])])])])])]))],\"foldl/4\":[new t.type.Rule(new t.type.Term(\"foldl\",[new t.type.Var(\"_\"),new t.type.Term(\"[]\",[]),new t.type.Var(\"I\"),new t.type.Var(\"I\")]),null),new t.type.Rule(new t.type.Term(\"foldl\",[new t.type.Var(\"P\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Var(\"T\")]),new t.type.Var(\"I\"),new t.type.Var(\"R\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P\"),new t.type.Var(\"L\")]),new t.type.Term(\",\",[new t.type.Term(\"append\",[new t.type.Var(\"L\"),new t.type.Term(\".\",[new t.type.Var(\"I\"),new t.type.Term(\".\",[new t.type.Var(\"H\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])])])]),new t.type.Var(\"L2\")]),new t.type.Term(\",\",[new t.type.Term(\"=..\",[new t.type.Var(\"P2\"),new t.type.Var(\"L2\")]),new t.type.Term(\",\",[new t.type.Term(\"call\",[new t.type.Var(\"P2\")]),new t.type.Term(\"foldl\",[new t.type.Var(\"P\"),new t.type.Var(\"T\"),new t.type.Var(\"X\"),new t.type.Var(\"R\")])])])])]))],\"select/3\":[new t.type.Rule(new t.type.Term(\"select\",[new t.type.Var(\"E\"),new t.type.Term(\".\",[new t.type.Var(\"E\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"Xs\")]),null),new t.type.Rule(new t.type.Term(\"select\",[new t.type.Var(\"E\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Ys\")])]),new t.type.Term(\"select\",[new t.type.Var(\"E\"),new t.type.Var(\"Xs\"),new t.type.Var(\"Ys\")]))],\"sum_list/2\":[new t.type.Rule(new t.type.Term(\"sum_list\",[new t.type.Term(\"[]\",[]),new t.type.Num(0,!1)]),null),new t.type.Rule(new t.type.Term(\"sum_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"sum_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\"is\",[new t.type.Var(\"S\"),new t.type.Term(\"+\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")])])]))],\"max_list/2\":[new t.type.Rule(new t.type.Term(\"max_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"max_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"max_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\">=\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")]),new t.type.Term(\",\",[new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"X\")]),new t.type.Term(\"!\",[])])]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"Y\")])])]))],\"min_list/2\":[new t.type.Rule(new t.type.Term(\"min_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"min_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"min_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\";\",[new t.type.Term(\",\",[new t.type.Term(\"=<\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")]),new t.type.Term(\",\",[new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"X\")]),new t.type.Term(\"!\",[])])]),new t.type.Term(\"=\",[new t.type.Var(\"S\"),new t.type.Var(\"Y\")])])]))],\"prod_list/2\":[new t.type.Rule(new t.type.Term(\"prod_list\",[new t.type.Term(\"[]\",[]),new t.type.Num(1,!1)]),null),new t.type.Rule(new t.type.Term(\"prod_list\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"S\")]),new t.type.Term(\",\",[new t.type.Term(\"prod_list\",[new t.type.Var(\"Xs\"),new t.type.Var(\"Y\")]),new t.type.Term(\"is\",[new t.type.Var(\"S\"),new t.type.Term(\"*\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\")])])]))],\"last/2\":[new t.type.Rule(new t.type.Term(\"last\",[new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Term(\"[]\",[])]),new t.type.Var(\"X\")]),null),new t.type.Rule(new t.type.Term(\"last\",[new t.type.Term(\".\",[new t.type.Var(\"_\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"X\")]),new t.type.Term(\"last\",[new t.type.Var(\"Xs\"),new t.type.Var(\"X\")]))],\"prefix/2\":[new t.type.Rule(new t.type.Term(\"prefix\",[new t.type.Var(\"Part\"),new t.type.Var(\"Whole\")]),new t.type.Term(\"append\",[new t.type.Var(\"Part\"),new t.type.Var(\"_\"),new t.type.Var(\"Whole\")]))],\"nth0/3\":[new t.type.Rule(new t.type.Term(\"nth0\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")])]),new t.type.Term(\",\",[new t.type.Term(\">=\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")]),new t.type.Term(\"!\",[])])])]))],\"nth1/3\":[new t.type.Rule(new t.type.Term(\"nth1\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")])]),new t.type.Term(\",\",[new t.type.Term(\">\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"_\")]),new t.type.Term(\"!\",[])])])]))],\"nth0/4\":[new t.type.Rule(new t.type.Term(\"nth0\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")])]),new t.type.Term(\",\",[new t.type.Term(\">=\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(0,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\"!\",[])])])]))],\"nth1/4\":[new t.type.Rule(new t.type.Term(\"nth1\",[new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\";\",[new t.type.Term(\"->\",[new t.type.Term(\"var\",[new t.type.Var(\"X\")]),new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")])]),new t.type.Term(\",\",[new t.type.Term(\">\",[new t.type.Var(\"X\"),new t.type.Num(0,!1)]),new t.type.Term(\",\",[new t.type.Term(\"nth\",[new t.type.Num(1,!1),new t.type.Var(\"X\"),new t.type.Var(\"Y\"),new t.type.Var(\"Z\"),new t.type.Var(\"W\")]),new t.type.Term(\"!\",[])])])]))],\"nth/5\":[new t.type.Rule(new t.type.Term(\"nth\",[new t.type.Var(\"N\"),new t.type.Var(\"N\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),null),new t.type.Rule(new t.type.Term(\"nth\",[new t.type.Var(\"N\"),new t.type.Var(\"O\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Xs\")]),new t.type.Var(\"Y\"),new t.type.Term(\".\",[new t.type.Var(\"X\"),new t.type.Var(\"Ys\")])]),new t.type.Term(\",\",[new t.type.Term(\"is\",[new t.type.Var(\"M\"),new t.type.Term(\"+\",[new t.type.Var(\"N\"),new t.type.Num(1,!1)])]),new t.type.Term(\"nth\",[new t.type.Var(\"M\"),new t.type.Var(\"O\"),new t.type.Var(\"Xs\"),new t.type.Var(\"Y\"),new t.type.Var(\"Ys\")])]))],\"length/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(!t.type.is_variable(f)&&!t.type.is_integer(f))s.throw_error(t.error.type(\"integer\",f,n.indicator));else if(t.type.is_integer(f)&&f.value<0)s.throw_error(t.error.domain(\"not_less_than_zero\",f,n.indicator));else{var p=new t.type.Term(\"length\",[c,new t.type.Num(0,!1),f]);t.type.is_integer(f)&&(p=new t.type.Term(\",\",[p,new t.type.Term(\"!\",[])])),s.prepend([new t.type.State(a.goal.replace(p),a.substitution,a)])}},\"length/3\":[new t.type.Rule(new t.type.Term(\"length\",[new t.type.Term(\"[]\",[]),new t.type.Var(\"N\"),new t.type.Var(\"N\")]),null),new t.type.Rule(new t.type.Term(\"length\",[new t.type.Term(\".\",[new t.type.Var(\"_\"),new t.type.Var(\"X\")]),new t.type.Var(\"A\"),new t.type.Var(\"N\")]),new t.type.Term(\",\",[new t.type.Term(\"succ\",[new t.type.Var(\"A\"),new t.type.Var(\"B\")]),new t.type.Term(\"length\",[new t.type.Var(\"X\"),new t.type.Var(\"B\"),new t.type.Var(\"N\")])]))],\"replicate/3\":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_integer(f))s.throw_error(t.error.type(\"integer\",f,n.indicator));else if(f.value<0)s.throw_error(t.error.domain(\"not_less_than_zero\",f,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type(\"list\",p,n.indicator));else{for(var h=new t.type.Term(\"[]\"),E=0;E<f.value;E++)h=new t.type.Term(\".\",[c,h]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[h,p])),a.substitution,a)])}},\"sort/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else{for(var p=[],h=c;h.indicator===\"./2\";)p.push(h.args[0]),h=h.args[1];if(t.type.is_variable(h))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(h))s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var E=p.sort(t.compare),C=E.length-1;C>0;C--)E[C].equals(E[C-1])&&E.splice(C,1);for(var S=new t.type.Term(\"[]\"),C=E.length-1;C>=0;C--)S=new t.type.Term(\".\",[E[C],S]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[S,f])),a.substitution,a)])}}},\"msort/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else{for(var p=[],h=c;h.indicator===\"./2\";)p.push(h.args[0]),h=h.args[1];if(t.type.is_variable(h))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(h))s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var E=p.sort(t.compare),C=new t.type.Term(\"[]\"),S=E.length-1;S>=0;S--)C=new t.type.Term(\".\",[E[S],C]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[C,f])),a.substitution,a)])}}},\"keysort/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else{for(var p=[],h,E=c;E.indicator===\"./2\";){if(h=E.args[0],t.type.is_variable(h)){s.throw_error(t.error.instantiation(n.indicator));return}else if(!t.type.is_term(h)||h.indicator!==\"-/2\"){s.throw_error(t.error.type(\"pair\",h,n.indicator));return}h.args[0].pair=h.args[1],p.push(h.args[0]),E=E.args[1]}if(t.type.is_variable(E))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(E))s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var C=p.sort(t.compare),S=new t.type.Term(\"[]\"),P=C.length-1;P>=0;P--)S=new t.type.Term(\".\",[new t.type.Term(\"-\",[C[P],C[P].pair]),S]),delete C[P].pair;s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[S,f])),a.substitution,a)])}}},\"take/3\":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f)||t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else if(!t.type.is_integer(c))s.throw_error(t.error.type(\"integer\",c,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type(\"list\",p,n.indicator));else{for(var h=c.value,E=[],C=f;h>0&&C.indicator===\"./2\";)E.push(C.args[0]),C=C.args[1],h--;if(h===0){for(var S=new t.type.Term(\"[]\"),h=E.length-1;h>=0;h--)S=new t.type.Term(\".\",[E[h],S]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[S,p])),a.substitution,a)])}}},\"drop/3\":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f)||t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else if(!t.type.is_integer(c))s.throw_error(t.error.type(\"integer\",c,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type(\"list\",p,n.indicator));else{for(var h=c.value,E=[],C=f;h>0&&C.indicator===\"./2\";)E.push(C.args[0]),C=C.args[1],h--;h===0&&s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[C,p])),a.substitution,a)])}},\"reverse/2\":function(s,a,n){var c=n.args[0],f=n.args[1],p=t.type.is_instantiated_list(c),h=t.type.is_instantiated_list(f);if(t.type.is_variable(c)&&t.type.is_variable(f))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(c)&&!t.type.is_fully_list(c))s.throw_error(t.error.type(\"list\",c,n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type(\"list\",f,n.indicator));else if(!p&&!h)s.throw_error(t.error.instantiation(n.indicator));else{for(var E=p?c:f,C=new t.type.Term(\"[]\",[]);E.indicator===\"./2\";)C=new t.type.Term(\".\",[E.args[0],C]),E=E.args[1];s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[C,p?f:c])),a.substitution,a)])}},\"list_to_set/2\":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else{for(var p=c,h=[];p.indicator===\"./2\";)h.push(p.args[0]),p=p.args[1];if(t.type.is_variable(p))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_term(p)||p.indicator!==\"[]/0\")s.throw_error(t.error.type(\"list\",c,n.indicator));else{for(var E=[],C=new t.type.Term(\"[]\",[]),S,P=0;P<h.length;P++){S=!1;for(var I=0;I<E.length&&!S;I++)S=t.compare(h[P],E[I])===0;S||E.push(h[P])}for(P=E.length-1;P>=0;P--)C=new t.type.Term(\".\",[E[P],C]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term(\"=\",[f,C])),a.substitution,a)])}}}}},r=[\"append/2\",\"append/3\",\"member/2\",\"permutation/2\",\"maplist/2\",\"maplist/3\",\"maplist/4\",\"maplist/5\",\"maplist/6\",\"maplist/7\",\"maplist/8\",\"include/3\",\"exclude/3\",\"foldl/4\",\"sum_list/2\",\"max_list/2\",\"min_list/2\",\"prod_list/2\",\"last/2\",\"prefix/2\",\"nth0/3\",\"nth1/3\",\"nth0/4\",\"nth1/4\",\"length/2\",\"replicate/3\",\"select/3\",\"sort/2\",\"msort/2\",\"keysort/2\",\"take/3\",\"drop/3\",\"reverse/2\",\"list_to_set/2\"];typeof vq<\"u\"?vq.exports=function(s){t=s,new t.type.Module(\"lists\",e(),r)}:new t.type.Module(\"lists\",e(),r)})(qct)});var yEe=_($r=>{\"use strict\";var bm=process.platform===\"win32\",Sq=\"aes-256-cbc\",Wct=\"sha256\",oEe=\"The current environment doesn't support interactive reading from TTY.\",si=Ie(\"fs\"),iEe=process.binding(\"tty_wrap\").TTY,bq=Ie(\"child_process\"),V0=Ie(\"path\"),Pq={prompt:\"> \",hideEchoBack:!1,mask:\"*\",limit:[],limitMessage:\"Input another, please.$<( [)limit(])>\",defaultInput:\"\",trueValue:[],falseValue:[],caseSensitive:!1,keepWhitespace:!1,encoding:\"utf8\",bufferSize:1024,print:void 0,history:!0,cd:!1,phContent:void 0,preCheck:void 0},Xp=\"none\",Zu,VC,sEe=!1,Y0,oF,Dq,Yct=0,Rq=\"\",Dm=[],aF,aEe=!1,xq=!1,sS=!1;function lEe(t){function e(r){return r.replace(/[^\\w\\u0080-\\uFFFF]/g,function(s){return\"#\"+s.charCodeAt(0)+\";\"})}return oF.concat(function(r){var s=[];return Object.keys(r).forEach(function(a){r[a]===\"boolean\"?t[a]&&s.push(\"--\"+a):r[a]===\"string\"&&t[a]&&s.push(\"--\"+a,e(t[a]))}),s}({display:\"string\",displayOnly:\"boolean\",keyIn:\"boolean\",hideEchoBack:\"boolean\",mask:\"string\",limit:\"string\",caseSensitive:\"boolean\"}))}function Vct(t,e){function r(U){var W,ee=\"\",ie;for(Dq=Dq||Ie(\"os\").tmpdir();;){W=V0.join(Dq,U+ee);try{ie=si.openSync(W,\"wx\")}catch(ue){if(ue.code===\"EEXIST\"){ee++;continue}else throw ue}si.closeSync(ie);break}return W}var s,a,n,c={},f,p,h=r(\"readline-sync.stdout\"),E=r(\"readline-sync.stderr\"),C=r(\"readline-sync.exit\"),S=r(\"readline-sync.done\"),P=Ie(\"crypto\"),I,R,N;I=P.createHash(Wct),I.update(\"\"+process.pid+Yct+++Math.random()),N=I.digest(\"hex\"),R=P.createDecipher(Sq,N),s=lEe(t),bm?(a=process.env.ComSpec||\"cmd.exe\",process.env.Q='\"',n=[\"/V:ON\",\"/S\",\"/C\",\"(%Q%\"+a+\"%Q% /V:ON /S /C %Q%%Q%\"+Y0+\"%Q%\"+s.map(function(U){return\" %Q%\"+U+\"%Q%\"}).join(\"\")+\" & (echo !ERRORLEVEL!)>%Q%\"+C+\"%Q%%Q%) 2>%Q%\"+E+\"%Q% |%Q%\"+process.execPath+\"%Q% %Q%\"+__dirname+\"\\\\encrypt.js%Q% %Q%\"+Sq+\"%Q% %Q%\"+N+\"%Q% >%Q%\"+h+\"%Q% & (echo 1)>%Q%\"+S+\"%Q%\"]):(a=\"/bin/sh\",n=[\"-c\",'(\"'+Y0+'\"'+s.map(function(U){return\" '\"+U.replace(/'/g,\"'\\\\''\")+\"'\"}).join(\"\")+'; echo $?>\"'+C+'\") 2>\"'+E+'\" |\"'+process.execPath+'\" \"'+__dirname+'/encrypt.js\" \"'+Sq+'\" \"'+N+'\" >\"'+h+'\"; echo 1 >\"'+S+'\"']),sS&&sS(\"_execFileSync\",s);try{bq.spawn(a,n,e)}catch(U){c.error=new Error(U.message),c.error.method=\"_execFileSync - spawn\",c.error.program=a,c.error.args=n}for(;si.readFileSync(S,{encoding:t.encoding}).trim()!==\"1\";);return(f=si.readFileSync(C,{encoding:t.encoding}).trim())===\"0\"?c.input=R.update(si.readFileSync(h,{encoding:\"binary\"}),\"hex\",t.encoding)+R.final(t.encoding):(p=si.readFileSync(E,{encoding:t.encoding}).trim(),c.error=new Error(oEe+(p?`\n`+p:\"\")),c.error.method=\"_execFileSync\",c.error.program=a,c.error.args=n,c.error.extMessage=p,c.error.exitCode=+f),si.unlinkSync(h),si.unlinkSync(E),si.unlinkSync(C),si.unlinkSync(S),c}function Jct(t){var e,r={},s,a={env:process.env,encoding:t.encoding};if(Y0||(bm?process.env.PSModulePath?(Y0=\"powershell.exe\",oF=[\"-ExecutionPolicy\",\"Bypass\",\"-File\",__dirname+\"\\\\read.ps1\"]):(Y0=\"cscript.exe\",oF=[\"//nologo\",__dirname+\"\\\\read.cs.js\"]):(Y0=\"/bin/sh\",oF=[__dirname+\"/read.sh\"])),bm&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),bq.execFileSync){e=lEe(t),sS&&sS(\"execFileSync\",e);try{r.input=bq.execFileSync(Y0,e,a)}catch(n){s=n.stderr?(n.stderr+\"\").trim():\"\",r.error=new Error(oEe+(s?`\n`+s:\"\")),r.error.method=\"execFileSync\",r.error.program=Y0,r.error.args=e,r.error.extMessage=s,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=Vct(t,a);return r.error||(r.input=r.input.replace(/^\\s*'|'\\s*$/g,\"\"),t.display=\"\"),r}function kq(t){var e=\"\",r=t.display,s=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=Jct(t);if(n.error)throw n.error;return n.input}return xq&&xq(t),function(){var n,c,f;function p(){return n||(n=process.binding(\"fs\"),c=process.binding(\"constants\")),n}if(typeof Xp==\"string\")if(Xp=null,bm){if(f=function(h){var E=h.replace(/^\\D+/,\"\").split(\".\"),C=0;return(E[0]=+E[0])&&(C+=E[0]*1e4),(E[1]=+E[1])&&(C+=E[1]*100),(E[2]=+E[2])&&(C+=E[2]),C}(process.version),!(f>=20302&&f<40204||f>=5e4&&f<50100||f>=50600&&f<60200)&&process.stdin.isTTY)process.stdin.pause(),Xp=process.stdin.fd,VC=process.stdin._handle;else try{Xp=p().open(\"CONIN$\",c.O_RDWR,parseInt(\"0666\",8)),VC=new iEe(Xp,!0)}catch{}if(process.stdout.isTTY)Zu=process.stdout.fd;else{try{Zu=si.openSync(\"\\\\\\\\.\\\\CON\",\"w\")}catch{}if(typeof Zu!=\"number\")try{Zu=p().open(\"CONOUT$\",c.O_RDWR,parseInt(\"0666\",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Xp=si.openSync(\"/dev/tty\",\"r\"),VC=process.stdin._handle}catch{}}else try{Xp=si.openSync(\"/dev/tty\",\"r\"),VC=new iEe(Xp,!1)}catch{}if(process.stdout.isTTY)Zu=process.stdout.fd;else try{Zu=si.openSync(\"/dev/tty\",\"w\")}catch{}}}(),function(){var n,c,f=!t.hideEchoBack&&!t.keyIn,p,h,E,C,S;aF=\"\";function P(I){return I===sEe?!0:VC.setRawMode(I)!==0?!1:(sEe=I,!0)}if(aEe||!VC||typeof Zu!=\"number\"&&(t.display||!f)){e=a();return}if(t.display&&(si.writeSync(Zu,t.display),t.display=\"\"),!t.displayOnly){if(!P(!f)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(c=new RegExp(\"[^\"+t.limit+\"]\",\"g\"+(t.caseSensitive?\"\":\"i\")));;){E=0;try{E=si.readSync(Xp,p,0,h)}catch(I){if(I.code!==\"EOF\"){P(!1),e+=a();return}}if(E>0?(C=p.toString(t.encoding,0,E),aF+=C):(C=`\n`,aF+=\"\\0\"),C&&typeof(S=(C.match(/^(.*?)[\\r\\n]/)||[])[1])==\"string\"&&(C=S,n=!0),C&&(C=C.replace(/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/g,\"\")),C&&c&&(C=C.replace(c,\"\")),C&&(f||(t.hideEchoBack?t.mask&&si.writeSync(Zu,new Array(C.length+1).join(t.mask)):si.writeSync(Zu,C)),e+=C),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!f&&!s&&si.writeSync(Zu,`\n`),P(!1)}}(),t.print&&!s&&t.print(r+(t.displayOnly?\"\":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`\n`),t.encoding),t.displayOnly?\"\":Rq=t.keepWhitespace||t.keyIn?e:e.trim()}function Kct(t,e){var r=[];function s(a){a!=null&&(Array.isArray(a)?a.forEach(s):(!e||e(a))&&r.push(a))}return s(t),r}function Fq(t){return t.replace(/[\\x00-\\x7f]/g,function(e){return\"\\\\x\"+(\"00\"+e.charCodeAt().toString(16)).substr(-2)})}function Vs(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]==\"boolean\"&&(r=t.shift(),r&&(e=Object.keys(Pq),t.unshift(Pq))),t.reduce(function(s,a){return a==null||(a.hasOwnProperty(\"noEchoBack\")&&!a.hasOwnProperty(\"hideEchoBack\")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty(\"noTrim\")&&!a.hasOwnProperty(\"keepWhitespace\")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var c;if(a.hasOwnProperty(n))switch(c=a[n],n){case\"mask\":case\"limitMessage\":case\"defaultInput\":case\"encoding\":c=c!=null?c+\"\":\"\",c&&n!==\"limitMessage\"&&(c=c.replace(/[\\r\\n]/g,\"\")),s[n]=c;break;case\"bufferSize\":!isNaN(c=parseInt(c,10))&&typeof c==\"number\"&&(s[n]=c);break;case\"displayOnly\":case\"keyIn\":case\"hideEchoBack\":case\"caseSensitive\":case\"keepWhitespace\":case\"history\":case\"cd\":s[n]=!!c;break;case\"limit\":case\"trueValue\":case\"falseValue\":s[n]=Kct(c,function(f){var p=typeof f;return p===\"string\"||p===\"number\"||p===\"function\"||f instanceof RegExp}).map(function(f){return typeof f==\"string\"?f.replace(/[\\r\\n]/g,\"\"):f});break;case\"print\":case\"phContent\":case\"preCheck\":s[n]=typeof c==\"function\"?c:void 0;break;case\"prompt\":case\"display\":s[n]=c??\"\";break}})),s},{})}function Qq(t,e,r){return e.some(function(s){var a=typeof s;return a===\"string\"?r?t===s:t.toLowerCase()===s.toLowerCase():a===\"number\"?parseFloat(t)===s:a===\"function\"?s(t):s instanceof RegExp?s.test(t):!1})}function Nq(t,e){var r=V0.normalize(bm?(process.env.HOMEDRIVE||\"\")+(process.env.HOMEPATH||\"\"):process.env.HOME||\"\").replace(/[\\/\\\\]+$/,\"\");return t=V0.normalize(t),e?t.replace(/^~(?=\\/|\\\\|$)/,r):t.replace(new RegExp(\"^\"+Fq(r)+\"(?=\\\\/|\\\\\\\\|$)\",bm?\"i\":\"\"),\"~\")}function JC(t,e){var r=\"(?:\\\\(([\\\\s\\\\S]*?)\\\\))?(\\\\w+|.-.)(?:\\\\(([\\\\s\\\\S]*?)\\\\))?\",s=new RegExp(\"(\\\\$)?(\\\\$<\"+r+\">)\",\"g\"),a=new RegExp(\"(\\\\$)?(\\\\$\\\\{\"+r+\"\\\\})\",\"g\");function n(c,f,p,h,E,C){var S;return f||typeof(S=e(E))!=\"string\"?p:S?(h||\"\")+S+(C||\"\"):\"\"}return t.replace(s,n).replace(a,n)}function cEe(t,e,r){var s,a=[],n=-1,c=0,f=\"\",p;function h(E,C){return C.length>3?(E.push(C[0]+\"...\"+C[C.length-1]),p=!0):C.length&&(E=E.concat(C)),E}return s=t.reduce(function(E,C){return E.concat((C+\"\").split(\"\"))},[]).reduce(function(E,C){var S,P;return e||(C=C.toLowerCase()),S=/^\\d$/.test(C)?1:/^[A-Z]$/.test(C)?2:/^[a-z]$/.test(C)?3:0,r&&S===0?f+=C:(P=C.charCodeAt(0),S&&S===n&&P===c+1?a.push(C):(E=h(E,a),a=[C],n=S),c=P),E},[]),s=h(s,a),f&&(s.push(f),p=!0),{values:s,suppressed:p}}function uEe(t,e){return t.join(t.length>2?\", \":e?\" / \":\"/\")}function fEe(t,e){var r,s,a={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!=\"string\")switch(t){case\"hideEchoBack\":case\"mask\":case\"defaultInput\":case\"caseSensitive\":case\"keepWhitespace\":case\"encoding\":case\"bufferSize\":case\"history\":case\"cd\":r=e.hasOwnProperty(t)?typeof e[t]==\"boolean\"?e[t]?\"on\":\"off\":e[t]+\"\":\"\";break;case\"limit\":case\"trueValue\":case\"falseValue\":s=e[e.hasOwnProperty(t+\"Src\")?t+\"Src\":t],e.keyIn?(a=cEe(s,e.caseSensitive),s=a.values):s=s.filter(function(c){var f=typeof c;return f===\"string\"||f===\"number\"}),r=uEe(s,a.suppressed);break;case\"limitCount\":case\"limitCountNotZero\":r=e[e.hasOwnProperty(\"limitSrc\")?\"limitSrc\":\"limit\"].length,r=r||t!==\"limitCountNotZero\"?r+\"\":\"\";break;case\"lastInput\":r=Rq;break;case\"cwd\":case\"CWD\":case\"cwdHome\":r=process.cwd(),t===\"CWD\"?r=V0.basename(r):t===\"cwdHome\"&&(r=Nq(r));break;case\"date\":case\"time\":case\"localeDate\":case\"localeTime\":r=new Date()[\"to\"+t.replace(/^./,function(c){return c.toUpperCase()})+\"String\"]();break;default:typeof(n=(t.match(/^history_m(\\d+)$/)||[])[1])==\"string\"&&(r=Dm[Dm.length-n]||\"\")}return r}function AEe(t){var e=/^(.)-(.)$/.exec(t),r=\"\",s,a,n,c;if(!e)return null;for(s=e[1].charCodeAt(0),a=e[2].charCodeAt(0),c=s<a?1:-1,n=s;n!==a+c;n+=c)r+=String.fromCharCode(n);return r}function Tq(t){var e=new RegExp(/(\\s*)(?:(\"|')(.*?)(?:\\2|$)|(\\S+))/g),r,s=\"\",a=[],n;for(t=t.trim();r=e.exec(t);)n=r[3]||r[4]||\"\",r[1]&&(a.push(s),s=\"\"),s+=n;return s&&a.push(s),a}function pEe(t,e){return e.trueValue.length&&Qq(t,e.trueValue,e.caseSensitive)?!0:e.falseValue.length&&Qq(t,e.falseValue,e.caseSensitive)?!1:t}function hEe(t){var e,r,s,a,n,c,f;function p(E){return fEe(E,t)}function h(E){t.display+=(/[^\\r\\n]$/.test(t.display)?`\n`:\"\")+E}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit=\"\",t.display=JC(t.display+\"\",p);;){if(e=kq(t),r=!1,s=\"\",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((a=/^\\s*\\!(?:\\!|-1)(:p)?\\s*$/.exec(e))?(n=Dm[0]||\"\",a[1]?r=!0:e=n,h(n+`\n`),r||(t.displayOnly=!0,kq(t),t.displayOnly=!1)):e&&e!==Dm[Dm.length-1]&&(Dm=[e])),!r&&t.cd&&e)switch(c=Tq(e),c[0].toLowerCase()){case\"cd\":if(c[1])try{process.chdir(Nq(c[1],!0))}catch(E){h(E+\"\")}r=!0;break;case\"pwd\":h(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(f=t.preCheck(e,t),e=f.res,f.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||Qq(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(s=JC(t.limitMessage,p))}h((s?s+`\n`:\"\")+JC(t.displaySrc+\"\",p))}return pEe(e,t)}$r._DBG_set_useExt=function(t){aEe=t};$r._DBG_set_checkOptions=function(t){xq=t};$r._DBG_set_checkMethod=function(t){sS=t};$r._DBG_clearHistory=function(){Rq=\"\",Dm=[]};$r.setDefaultOptions=function(t){return Pq=Vs(!0,t),Vs(!0)};$r.question=function(t,e){return hEe(Vs(Vs(!0,e),{display:t}))};$r.prompt=function(t){var e=Vs(!0,t);return e.display=e.prompt,hEe(e)};$r.keyIn=function(t,e){var r=Vs(Vs(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(s){var a=typeof s;return a===\"string\"||a===\"number\"}).map(function(s){return JC(s+\"\",AEe)}),r.limit=Fq(r.limitSrc.join(\"\")),[\"trueValue\",\"falseValue\"].forEach(function(s){r[s]=r[s].reduce(function(a,n){var c=typeof n;return c===\"string\"||c===\"number\"?a=a.concat((n+\"\").split(\"\")):a.push(n),a},[])}),r.display=JC(r.display+\"\",function(s){return fEe(s,r)}),pEe(kq(r),r)};$r.questionEMail=function(t,e){return t==null&&(t=\"Input e-mail address: \"),$r.question(t,Vs({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:\"Input valid e-mail address, please.\",trueValue:null,falseValue:null},e,{keepWhitespace:!1,cd:!1}))};$r.questionNewPassword=function(t,e){var r,s,a,n=Vs({hideEchoBack:!0,mask:\"*\",limitMessage:`It can include: $<charlist>\nAnd the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(P){return P===\"charlist\"?r.text:P===\"length\"?s+\"...\"+a:null}}),c,f,p,h,E,C,S;for(e=e||{},c=JC(e.charlist?e.charlist+\"\":\"$<!-~>\",AEe),(isNaN(s=parseInt(e.min,10))||typeof s!=\"number\")&&(s=12),(isNaN(a=parseInt(e.max,10))||typeof a!=\"number\")&&(a=24),h=new RegExp(\"^[\"+Fq(c)+\"]{\"+s+\",\"+a+\"}$\"),r=cEe([c],n.caseSensitive,!0),r.text=uEe(r.values,r.suppressed),f=e.confirmMessage!=null?e.confirmMessage:\"Reinput a same one to confirm it: \",p=e.unmatchMessage!=null?e.unmatchMessage:\"It differs from first one. Hit only the Enter key if you want to retry from first one.\",t==null&&(t=\"Input new password: \"),E=n.limitMessage;!S;)n.limit=h,n.limitMessage=E,C=$r.question(t,n),n.limit=[C,\"\"],n.limitMessage=p,S=$r.question(f,n);return C};function gEe(t,e,r){var s;function a(n){return s=r(n),!isNaN(s)&&typeof s==\"number\"}return $r.question(t,Vs({limitMessage:\"Input valid number, please.\"},e,{limit:a,cd:!1})),s}$r.questionInt=function(t,e){return gEe(t,e,function(r){return parseInt(r,10)})};$r.questionFloat=function(t,e){return gEe(t,e,parseFloat)};$r.questionPath=function(t,e){var r,s=\"\",a=Vs({hideEchoBack:!1,limitMessage:`$<error(\n)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var c,f,p;n=Nq(n,!0),s=\"\";function h(E){E.split(/\\/|\\\\/).reduce(function(C,S){var P=V0.resolve(C+=S+V0.sep);if(!si.existsSync(P))si.mkdirSync(P);else if(!si.statSync(P).isDirectory())throw new Error(\"Non directory already exists: \"+P);return C},\"\")}try{if(c=si.existsSync(n),r=c?si.realpathSync(n):V0.resolve(n),!e.hasOwnProperty(\"exists\")&&!c||typeof e.exists==\"boolean\"&&e.exists!==c)return s=(c?\"Already exists\":\"No such file or directory\")+\": \"+r,!1;if(!c&&e.create&&(e.isDirectory?h(r):(h(V0.dirname(r)),si.closeSync(si.openSync(r,\"w\"))),r=si.realpathSync(r)),c&&(e.min||e.max||e.isFile||e.isDirectory)){if(f=si.statSync(r),e.isFile&&!f.isFile())return s=\"Not file: \"+r,!1;if(e.isDirectory&&!f.isDirectory())return s=\"Not directory: \"+r,!1;if(e.min&&f.size<+e.min||e.max&&f.size>+e.max)return s=\"Size \"+f.size+\" is out of range: \"+r,!1}if(typeof e.validate==\"function\"&&(p=e.validate(r))!==!0)return typeof p==\"string\"&&(s=p),!1}catch(E){return s=E+\"\",!1}return!0},phContent:function(n){return n===\"error\"?s:n!==\"min\"&&n!==\"max\"?null:e.hasOwnProperty(n)?e[n]+\"\":\"\"}});return e=e||{},t==null&&(t='Input path (you can \"cd\" and \"pwd\"): '),$r.question(t,a),r};function dEe(t,e){var r={},s={};return typeof t==\"object\"?(Object.keys(t).forEach(function(a){typeof t[a]==\"function\"&&(s[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=Tq(a),n=r.args[0]||\"\",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!==\"_\"&&s.hasOwnProperty(n)?s[n].apply(a,r.args.slice(1)):s.hasOwnProperty(\"_\")?s._.apply(a,r.args):null,{res:a,forceNext:!1}},s.hasOwnProperty(\"_\")||(r.limit=function(){var a=r.args[0]||\"\";return e.caseSensitive||(a=a.toLowerCase()),s.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=Tq(a),r.hRes=typeof t==\"function\"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}$r.promptCL=function(t,e){var r=Vs({hideEchoBack:!1,limitMessage:\"Requested command is not available.\",caseSensitive:!1,history:!0},e),s=dEe(t,r);return r.limit=s.limit,r.preCheck=s.preCheck,$r.prompt(r),s.args};$r.promptLoop=function(t,e){for(var r=Vs({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t($r.prompt(r)););};$r.promptCLLoop=function(t,e){var r=Vs({hideEchoBack:!1,limitMessage:\"Requested command is not available.\",caseSensitive:!1,history:!0},e),s=dEe(t,r);for(r.limit=s.limit,r.preCheck=s.preCheck;$r.prompt(r),!s.hRes;);};$r.promptSimShell=function(t){return $r.prompt(Vs({hideEchoBack:!1,history:!0},t,{prompt:function(){return bm?\"$<cwd>>\":(process.env.USER||\"\")+(process.env.HOSTNAME?\"@\"+process.env.HOSTNAME.replace(/\\..*$/,\"\"):\"\")+\":$<cwdHome>$ \"}()}))};function mEe(t,e,r){var s;return t==null&&(t=\"Are you sure? \"),(!e||e.guide!==!1)&&(t+=\"\")&&(t=t.replace(/\\s*:?\\s*$/,\"\")+\" [y/n]: \"),s=$r.keyIn(t,Vs(e,{hideEchoBack:!1,limit:r,trueValue:\"y\",falseValue:\"n\",caseSensitive:!1})),typeof s==\"boolean\"?s:\"\"}$r.keyInYN=function(t,e){return mEe(t,e)};$r.keyInYNStrict=function(t,e){return mEe(t,e,\"yn\")};$r.keyInPause=function(t,e){t==null&&(t=\"Continue...\"),(!e||e.guide!==!1)&&(t+=\"\")&&(t=t.replace(/\\s+$/,\"\")+\" (Hit any key)\"),$r.keyIn(t,Vs({limit:null},e,{hideEchoBack:!0,mask:\"\"}))};$r.keyInSelect=function(t,e,r){var s=Vs({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p===\"itemsCount\"?t.length+\"\":p===\"firstItem\"?(t[0]+\"\").trim():p===\"lastItem\"?(t[t.length-1]+\"\").trim():null}}),a=\"\",n={},c=49,f=`\n`;if(!Array.isArray(t)||!t.length||t.length>35)throw\"`items` must be Array (max length: 35).\";return t.forEach(function(p,h){var E=String.fromCharCode(c);a+=E,n[E]=h,f+=\"[\"+E+\"] \"+(p+\"\").trim()+`\n`,c=c===57?97:c+1}),(!r||r.cancel!==!1)&&(a+=\"0\",n[0]=-1,f+=\"[0] \"+(r&&r.cancel!=null&&typeof r.cancel!=\"boolean\"?(r.cancel+\"\").trim():\"CANCEL\")+`\n`),s.limit=a,f+=`\n`,e==null&&(e=\"Choose one from list: \"),(e+=\"\")&&((!r||r.guide!==!1)&&(e=e.replace(/\\s*:?\\s*$/,\"\")+\" [$<limit>]: \"),f+=e),n[$r.keyIn(f,s).toLowerCase()]};$r.getRawInput=function(){return aF};function oS(t,e){var r;return e.length&&(r={},r[t]=e[0]),$r.setDefaultOptions(r)[t]}$r.setPrint=function(){return oS(\"print\",arguments)};$r.setPrompt=function(){return oS(\"prompt\",arguments)};$r.setEncoding=function(){return oS(\"encoding\",arguments)};$r.setMask=function(){return oS(\"mask\",arguments)};$r.setBufferSize=function(){return oS(\"bufferSize\",arguments)}});var Oq=_((jYt,ec)=>{(function(){var t={major:0,minor:2,patch:66,status:\"beta\"};tau_file_system={files:{},open:function(w,b,y){var F=tau_file_system.files[w];if(!F){if(y===\"read\")return null;F={path:w,text:\"\",type:b,get:function(z,X){return X===this.text.length||X>this.text.length?\"end_of_file\":this.text.substring(X,X+z)},put:function(z,X){return X===\"end_of_file\"?(this.text+=z,!0):X===\"past_end_of_file\"?null:(this.text=this.text.substring(0,X)+z+this.text.substring(X+z.length),!0)},get_byte:function(z){if(z===\"end_of_stream\")return-1;var X=Math.floor(z/2);if(this.text.length<=X)return-1;var $=n(this.text[Math.floor(z/2)],0);return z%2===0?$&255:$/256>>>0},put_byte:function(z,X){var $=X===\"end_of_stream\"?this.text.length:Math.floor(X/2);if(this.text.length<$)return null;var oe=this.text.length===$?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(oe=oe/256>>>0,oe=(oe&255)<<8|z&255):(oe=oe&255,oe=(z&255)<<8|oe&255),this.text.length===$?this.text+=c(oe):this.text=this.text.substring(0,$)+c(oe)+this.text.substring($+1),!0},flush:function(){return!0},close:function(){var z=tau_file_system.files[this.path];return z?!0:null}},tau_file_system.files[w]=F}return y===\"write\"&&(F.text=\"\"),F}},tau_user_input={buffer:\"\",get:function(w,b){for(var y;tau_user_input.buffer.length<w;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,w),tau_user_input.buffer=tau_user_input.buffer.substr(w),y}},tau_user_output={put:function(w,b){return console.log(w),!0},flush:function(){return!0}},nodejs_file_system={open:function(w,b,y){var F=Ie(\"fs\"),z=F.openSync(w,y[0]);return y===\"read\"&&!F.existsSync(w)?null:{get:function(X,$){var oe=new Buffer(X);return F.readSync(z,oe,0,X,$),oe.toString()},put:function(X,$){var oe=Buffer.from(X);if($===\"end_of_file\")F.writeSync(z,oe);else{if($===\"past_end_of_file\")return null;F.writeSync(z,oe,0,oe.length,$)}return!0},get_byte:function(X){return null},put_byte:function(X,$){return null},flush:function(){return!0},close:function(){return F.closeSync(z),!0}}}},nodejs_user_input={buffer:\"\",get:function(w,b){for(var y,F=yEe();nodejs_user_input.buffer.length<w;)nodejs_user_input.buffer+=F.question();return y=nodejs_user_input.buffer.substr(0,w),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(w),y}},nodejs_user_output={put:function(w,b){return process.stdout.write(w),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(w,b){return w.indexOf(b)}:e=function(w,b){for(var y=w.length,F=0;F<y;F++)if(b===w[F])return F;return-1};var r=function(w,b){if(w.length!==0){for(var y=w[0],F=w.length,z=1;z<F;z++)y=b(y,w[z]);return y}},s;Array.prototype.map?s=function(w,b){return w.map(b)}:s=function(w,b){for(var y=[],F=w.length,z=0;z<F;z++)y.push(b(w[z]));return y};var a;Array.prototype.filter?a=function(w,b){return w.filter(b)}:a=function(w,b){for(var y=[],F=w.length,z=0;z<F;z++)b(w[z])&&y.push(w[z]);return y};var n;String.prototype.codePointAt?n=function(w,b){return w.codePointAt(b)}:n=function(w,b){return w.charCodeAt(b)};var c;String.fromCodePoint?c=function(){return String.fromCodePoint.apply(null,arguments)}:c=function(){return String.fromCharCode.apply(null,arguments)};var f=0,p=1,h=/(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)|\\\\x([0-9a-fA-F]+)\\\\|\\\\([0-7]+)\\\\|(\\\\\\\\)|(\\\\')|('')|(\\\\\")|(\\\\`)|(\\\\.)|(.)/g,E={\"\\\\a\":7,\"\\\\b\":8,\"\\\\f\":12,\"\\\\n\":10,\"\\\\r\":13,\"\\\\t\":9,\"\\\\v\":11};function C(w){var b=[],y=!1;return w.replace(h,function(F,z,X,$,oe,xe,Te,lt,Ct,qt,ir,Pt,gn,Pr,Ir,Or,on){switch(!0){case Ct!==void 0:return b.push(parseInt(Ct,16)),\"\";case qt!==void 0:return b.push(parseInt(qt,8)),\"\";case ir!==void 0:case Pt!==void 0:case gn!==void 0:case Pr!==void 0:case Ir!==void 0:return b.push(n(F.substr(1),0)),\"\";case on!==void 0:return b.push(n(on,0)),\"\";case Or!==void 0:y=!0;default:return b.push(E[F]),\"\"}}),y?null:b}function S(w,b){var y=\"\";if(w.length<2)return w;try{w=w.replace(/\\\\([0-7]+)\\\\/g,function($,oe){return c(parseInt(oe,8))}),w=w.replace(/\\\\x([0-9a-fA-F]+)\\\\/g,function($,oe){return c(parseInt(oe,16))})}catch{return null}for(var F=0;F<w.length;F++){var z=w.charAt(F),X=w.charAt(F+1);if(z===b&&X===b)F++,y+=b;else if(z===\"\\\\\")if([\"a\",\"b\",\"f\",\"n\",\"r\",\"t\",\"v\",\"'\",'\"',\"\\\\\",\"a\",\"\\b\",\"\\f\",`\n`,\"\\r\",\"\t\",\"\\v\"].indexOf(X)!==-1)switch(F+=1,X){case\"a\":y+=\"a\";break;case\"b\":y+=\"\\b\";break;case\"f\":y+=\"\\f\";break;case\"n\":y+=`\n`;break;case\"r\":y+=\"\\r\";break;case\"t\":y+=\"\t\";break;case\"v\":y+=\"\\v\";break;case\"'\":y+=\"'\";break;case'\"':y+='\"';break;case\"\\\\\":y+=\"\\\\\";break}else return null;else y+=z}return y}function P(w){for(var b=\"\",y=0;y<w.length;y++)switch(w.charAt(y)){case\"'\":b+=\"\\\\'\";break;case\"\\\\\":b+=\"\\\\\\\\\";break;case\"\\b\":b+=\"\\\\b\";break;case\"\\f\":b+=\"\\\\f\";break;case`\n`:b+=\"\\\\n\";break;case\"\\r\":b+=\"\\\\r\";break;case\"\t\":b+=\"\\\\t\";break;case\"\\v\":b+=\"\\\\v\";break;default:b+=w.charAt(y);break}return b}function I(w){var b=w.substr(2);switch(w.substr(0,2).toLowerCase()){case\"0x\":return parseInt(b,16);case\"0b\":return parseInt(b,2);case\"0o\":return parseInt(b,8);case\"0'\":return C(b)[0];default:return parseFloat(w)}}var R={whitespace:/^\\s*(?:(?:%.*)|(?:\\/\\*(?:\\n|\\r|.)*?\\*\\/)|(?:\\s+))\\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\\!|,|;|[a-z][0-9a-zA-Z_]*|[#\\$\\&\\*\\+\\-\\.\\/\\:\\<\\=\\>\\?\\@\\^\\~\\\\]+|'(?:[^']*?(?:\\\\(?:x?\\d+)?\\\\)*(?:'')*(?:\\\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\\\[abfnrtv\\\\'\"`]|\\\\x?\\d+\\\\|[^\\\\])|\\d+(?:\\.\\d+(?:[eE][+-]?\\d+)?)?)/,string:/^(?:\"([^\"]|\"\"|\\\\\")*\"|`([^`]|``|\\\\`)*`)/,l_brace:/^(?:\\[)/,r_brace:/^(?:\\])/,l_bracket:/^(?:\\{)/,r_bracket:/^(?:\\})/,bar:/^(?:\\|)/,l_paren:/^(?:\\()/,r_paren:/^(?:\\))/};function N(w,b){return w.get_flag(\"char_conversion\").id===\"on\"?b.replace(/./g,function(y){return w.get_char_conversion(y)}):b}function U(w){this.thread=w,this.text=\"\",this.tokens=[]}U.prototype.set_last_tokens=function(w){return this.tokens=w},U.prototype.new_text=function(w){this.text=w,this.tokens=[]},U.prototype.get_tokens=function(w){var b,y=0,F=0,z=0,X=[],$=!1;if(w){var oe=this.tokens[w-1];y=oe.len,b=N(this.thread,this.text.substr(oe.len)),F=oe.line,z=oe.start}else b=this.text;if(/^\\s*$/.test(b))return null;for(;b!==\"\";){var xe=[],Te=!1;if(/^\\n/.exec(b)!==null){F++,z=0,y++,b=b.replace(/\\n/,\"\"),$=!0;continue}for(var lt in R)if(R.hasOwnProperty(lt)){var Ct=R[lt].exec(b);Ct&&xe.push({value:Ct[0],name:lt,matches:Ct})}if(!xe.length)return this.set_last_tokens([{value:b,matches:[],name:\"lexical\",line:F,start:z}]);var oe=r(xe,function(Pr,Ir){return Pr.value.length>=Ir.value.length?Pr:Ir});switch(oe.start=z,oe.line=F,b=b.replace(oe.value,\"\"),z+=oe.value.length,y+=oe.value.length,oe.name){case\"atom\":oe.raw=oe.value,oe.value.charAt(0)===\"'\"&&(oe.value=S(oe.value.substr(1,oe.value.length-2),\"'\"),oe.value===null&&(oe.name=\"lexical\",oe.value=\"unknown escape sequence\"));break;case\"number\":oe.float=oe.value.substring(0,2)!==\"0x\"&&oe.value.match(/[.eE]/)!==null&&oe.value!==\"0'.\",oe.value=I(oe.value),oe.blank=Te;break;case\"string\":var qt=oe.value.charAt(0);oe.value=S(oe.value.substr(1,oe.value.length-2),qt),oe.value===null&&(oe.name=\"lexical\",oe.value=\"unknown escape sequence\");break;case\"whitespace\":var ir=X[X.length-1];ir&&(ir.space=!0),Te=!0;continue;case\"r_bracket\":X.length>0&&X[X.length-1].name===\"l_bracket\"&&(oe=X.pop(),oe.name=\"atom\",oe.value=\"{}\",oe.raw=\"{}\",oe.space=!1);break;case\"r_brace\":X.length>0&&X[X.length-1].name===\"l_brace\"&&(oe=X.pop(),oe.name=\"atom\",oe.value=\"[]\",oe.raw=\"[]\",oe.space=!1);break}oe.len=y,X.push(oe),Te=!1}var Pt=this.set_last_tokens(X);return Pt.length===0?null:Pt};function W(w,b,y,F,z){if(!b[y])return{type:f,value:x.error.syntax(b[y-1],\"expression expected\",!0)};var X;if(F===\"0\"){var $=b[y];switch($.name){case\"number\":return{type:p,len:y+1,value:new x.type.Num($.value,$.float)};case\"variable\":return{type:p,len:y+1,value:new x.type.Var($.value)};case\"string\":var oe;switch(w.get_flag(\"double_quotes\").id){case\"atom\":oe=new j($.value,[]);break;case\"codes\":oe=new j(\"[]\",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(\".\",[new x.type.Num(n($.value,xe),!1),oe]);break;case\"chars\":oe=new j(\"[]\",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(\".\",[new x.type.Term($.value.charAt(xe),[]),oe]);break}return{type:p,len:y+1,value:oe};case\"l_paren\":var Pt=W(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name===\"r_paren\"?(Pt.len++,Pt):{type:f,derived:!0,value:x.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],\") or operator expected\",!b[Pt.len])};case\"l_bracket\":var Pt=W(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name===\"r_bracket\"?(Pt.len++,Pt.value=new j(\"{}\",[Pt.value]),Pt):{type:f,derived:!0,value:x.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],\"} or operator expected\",!b[Pt.len])}}var Te=ee(w,b,y,z);return Te.type===p||Te.derived||(Te=ie(w,b,y),Te.type===p||Te.derived)?Te:{type:f,derived:!1,value:x.error.syntax(b[y],\"unexpected token\")}}var lt=w.__get_max_priority(),Ct=w.__get_next_priority(F),qt=y;if(b[y].name===\"atom\"&&b[y+1]&&(b[y].space||b[y+1].name!==\"l_paren\")){var $=b[y++],ir=w.__lookup_operator_classes(F,$.value);if(ir&&ir.indexOf(\"fy\")>-1){var Pt=W(w,b,y,F,z);if(Pt.type!==f)return $.value===\"-\"&&!$.space&&x.type.is_number(Pt.value)?{value:new x.type.Num(-Pt.value.value,Pt.value.is_float),len:Pt.len,type:p}:{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};X=Pt}else if(ir&&ir.indexOf(\"fx\")>-1){var Pt=W(w,b,y,Ct,z);if(Pt.type!==f)return{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};X=Pt}}y=qt;var Pt=W(w,b,y,Ct,z);if(Pt.type===p){y=Pt.len;var $=b[y];if(b[y]&&(b[y].name===\"atom\"&&w.__lookup_operator_classes(F,$.value)||b[y].name===\"bar\"&&w.__lookup_operator_classes(F,\"|\"))){var gn=Ct,Pr=F,ir=w.__lookup_operator_classes(F,$.value);if(ir.indexOf(\"xf\")>-1)return{value:new x.type.Term($.value,[Pt.value]),len:++Pt.len,type:p};if(ir.indexOf(\"xfx\")>-1){var Ir=W(w,b,y+1,gn,z);return Ir.type===p?{value:new x.type.Term($.value,[Pt.value,Ir.value]),len:Ir.len,type:p}:(Ir.derived=!0,Ir)}else if(ir.indexOf(\"xfy\")>-1){var Ir=W(w,b,y+1,Pr,z);return Ir.type===p?{value:new x.type.Term($.value,[Pt.value,Ir.value]),len:Ir.len,type:p}:(Ir.derived=!0,Ir)}else if(Pt.type!==f)for(;;){y=Pt.len;var $=b[y];if($&&$.name===\"atom\"&&w.__lookup_operator_classes(F,$.value)){var ir=w.__lookup_operator_classes(F,$.value);if(ir.indexOf(\"yf\")>-1)Pt={value:new x.type.Term($.value,[Pt.value]),len:++y,type:p};else if(ir.indexOf(\"yfx\")>-1){var Ir=W(w,b,++y,gn,z);if(Ir.type===f)return Ir.derived=!0,Ir;y=Ir.len,Pt={value:new x.type.Term($.value,[Pt.value,Ir.value]),len:y,type:p}}else break}else break}}else X={type:f,value:x.error.syntax(b[Pt.len-1],\"operator expected\")};return Pt}return Pt}function ee(w,b,y,F){if(!b[y]||b[y].name===\"atom\"&&b[y].raw===\".\"&&!F&&(b[y].space||!b[y+1]||b[y+1].name!==\"l_paren\"))return{type:f,derived:!1,value:x.error.syntax(b[y-1],\"unfounded token\")};var z=b[y],X=[];if(b[y].name===\"atom\"&&b[y].raw!==\",\"){if(y++,b[y-1].space)return{type:p,len:y,value:new x.type.Term(z.value,X)};if(b[y]&&b[y].name===\"l_paren\"){if(b[y+1]&&b[y+1].name===\"r_paren\")return{type:f,derived:!0,value:x.error.syntax(b[y+1],\"argument expected\")};var $=W(w,b,++y,\"999\",!0);if($.type===f)return $.derived?$:{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],\"argument expected\",!b[y])};for(X.push($.value),y=$.len;b[y]&&b[y].name===\"atom\"&&b[y].value===\",\";){if($=W(w,b,y+1,\"999\",!0),$.type===f)return $.derived?$:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],\"argument expected\",!b[y+1])};X.push($.value),y=$.len}if(b[y]&&b[y].name===\"r_paren\")y++;else return{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],\", or ) expected\",!b[y])}}return{type:p,len:y,value:new x.type.Term(z.value,X)}}return{type:f,derived:!1,value:x.error.syntax(b[y],\"term expected\")}}function ie(w,b,y){if(!b[y])return{type:f,derived:!1,value:x.error.syntax(b[y-1],\"[ expected\")};if(b[y]&&b[y].name===\"l_brace\"){var F=W(w,b,++y,\"999\",!0),z=[F.value],X=void 0;if(F.type===f)return b[y]&&b[y].name===\"r_brace\"?{type:p,len:y+1,value:new x.type.Term(\"[]\",[])}:{type:f,derived:!0,value:x.error.syntax(b[y],\"] expected\")};for(y=F.len;b[y]&&b[y].name===\"atom\"&&b[y].value===\",\";){if(F=W(w,b,y+1,\"999\",!0),F.type===f)return F.derived?F:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],\"argument expected\",!b[y+1])};z.push(F.value),y=F.len}var $=!1;if(b[y]&&b[y].name===\"bar\"){if($=!0,F=W(w,b,y+1,\"999\",!0),F.type===f)return F.derived?F:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],\"argument expected\",!b[y+1])};X=F.value,y=F.len}return b[y]&&b[y].name===\"r_brace\"?{type:p,len:y+1,value:g(z,X)}:{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],$?\"] expected\":\", or | or ] expected\",!b[y])}}return{type:f,derived:!1,value:x.error.syntax(b[y],\"list expected\")}}function ue(w,b,y){var F=b[y].line,z=W(w,b,y,w.__get_max_priority(),!1),X=null,$;if(z.type!==f)if(y=z.len,b[y]&&b[y].name===\"atom\"&&b[y].raw===\".\")if(y++,x.type.is_term(z.value)){if(z.value.indicator===\":-/2\"?(X=new x.type.Rule(z.value.args[0],Ce(z.value.args[1])),$={value:X,len:y,type:p}):z.value.indicator===\"-->/2\"?(X=pe(new x.type.Rule(z.value.args[0],z.value.args[1]),w),X.body=Ce(X.body),$={value:X,len:y,type:x.type.is_rule(X)?p:f}):(X=new x.type.Rule(z.value,null),$={value:X,len:y,type:p}),X){var oe=X.singleton_variables();oe.length>0&&w.throw_warning(x.warning.singleton(oe,X.head.indicator,F))}return $}else return{type:f,value:x.error.syntax(b[y],\"callable expected\")};else return{type:f,value:x.error.syntax(b[y]?b[y]:b[y-1],\". or operator expected\")};return z}function le(w,b,y){y=y||{},y.from=y.from?y.from:\"$tau-js\",y.reconsult=y.reconsult!==void 0?y.reconsult:!0;var F=new U(w),z={},X;F.new_text(b);var $=0,oe=F.get_tokens($);do{if(oe===null||!oe[$])break;var xe=ue(w,oe,$);if(xe.type===f)return new j(\"throw\",[xe.value]);if(xe.value.body===null&&xe.value.head.indicator===\"?-/1\"){var Te=new it(w.session);Te.add_goal(xe.value.head.args[0]),Te.answer(function(Ct){x.type.is_error(Ct)?w.throw_warning(Ct.args[0]):(Ct===!1||Ct===null)&&w.throw_warning(x.warning.failed_goal(xe.value.head.args[0],xe.len))}),$=xe.len;var lt=!0}else if(xe.value.body===null&&xe.value.head.indicator===\":-/1\"){var lt=w.run_directive(xe.value.head.args[0]);$=xe.len,xe.value.head.args[0].indicator===\"char_conversion/2\"&&(oe=F.get_tokens($),$=0)}else{X=xe.value.head.indicator,y.reconsult!==!1&&z[X]!==!0&&!w.is_multifile_predicate(X)&&(w.session.rules[X]=a(w.session.rules[X]||[],function(qt){return qt.dynamic}),z[X]=!0);var lt=w.add_rule(xe.value,y);$=xe.len}if(!lt)return lt}while(!0);return!0}function me(w,b){var y=new U(w);y.new_text(b);var F=0;do{var z=y.get_tokens(F);if(z===null)break;var X=W(w,z,0,w.__get_max_priority(),!1);if(X.type!==f){var $=X.len,oe=$;if(z[$]&&z[$].name===\"atom\"&&z[$].raw===\".\")w.add_goal(Ce(X.value));else{var xe=z[$];return new j(\"throw\",[x.error.syntax(xe||z[$-1],\". or operator expected\",!xe)])}F=X.len+1}else return new j(\"throw\",[X.value])}while(!0);return!0}function pe(w,b){w=w.rename(b);var y=b.next_free_variable(),F=Be(w.body,y,b);return F.error?F.value:(w.body=F.value,w.head.args=w.head.args.concat([y,F.variable]),w.head=new j(w.head.id,w.head.args),w)}function Be(w,b,y){var F;if(x.type.is_term(w)&&w.indicator===\"!/0\")return{value:w,variable:b,error:!1};if(x.type.is_term(w)&&w.indicator===\",/2\"){var z=Be(w.args[0],b,y);if(z.error)return z;var X=Be(w.args[1],z.variable,y);return X.error?X:{value:new j(\",\",[z.value,X.value]),variable:X.variable,error:!1}}else{if(x.type.is_term(w)&&w.indicator===\"{}/1\")return{value:w.args[0],variable:b,error:!1};if(x.type.is_empty_list(w))return{value:new j(\"true\",[]),variable:b,error:!1};if(x.type.is_list(w)){F=y.next_free_variable();for(var $=w,oe;$.indicator===\"./2\";)oe=$,$=$.args[1];return x.type.is_variable($)?{value:x.error.instantiation(\"DCG\"),variable:b,error:!0}:x.type.is_empty_list($)?(oe.args[1]=F,{value:new j(\"=\",[b,w]),variable:F,error:!1}):{value:x.error.type(\"list\",w,\"DCG\"),variable:b,error:!0}}else return x.type.is_callable(w)?(F=y.next_free_variable(),w.args=w.args.concat([b,F]),w=new j(w.id,w.args),{value:w,variable:F,error:!1}):{value:x.error.type(\"callable\",w,\"DCG\"),variable:b,error:!0}}}function Ce(w){return x.type.is_variable(w)?new j(\"call\",[w]):x.type.is_term(w)&&[\",/2\",\";/2\",\"->/2\"].indexOf(w.indicator)!==-1?new j(w.id,[Ce(w.args[0]),Ce(w.args[1])]):w}function g(w,b){for(var y=b||new x.type.Term(\"[]\",[]),F=w.length-1;F>=0;F--)y=new x.type.Term(\".\",[w[F],y]);return y}function we(w,b){for(var y=w.length-1;y>=0;y--)w[y]===b&&w.splice(y,1)}function ye(w){for(var b={},y=[],F=0;F<w.length;F++)w[F]in b||(y.push(w[F]),b[w[F]]=!0);return y}function Ae(w,b,y,F){if(w.session.rules[y]!==null){for(var z=0;z<w.session.rules[y].length;z++)if(w.session.rules[y][z]===F){w.session.rules[y].splice(z,1),w.success(b);break}}}function se(w){return function(b,y,F){var z=F.args[0],X=F.args.slice(1,w);if(x.type.is_variable(z))b.throw_error(x.error.instantiation(b.level));else if(!x.type.is_callable(z))b.throw_error(x.error.type(\"callable\",z,b.level));else{var $=new j(z.id,z.args.concat(X));b.prepend([new Pe(y.goal.replace($),y.substitution,y)])}}}function Z(w){for(var b=w.length-1;b>=0;b--)if(w.charAt(b)===\"/\")return new j(\"/\",[new j(w.substring(0,b)),new Re(parseInt(w.substring(b+1)),!1)])}function De(w){this.id=w}function Re(w,b){this.is_float=b!==void 0?b:parseInt(w)!==w,this.value=this.is_float?w:parseInt(w)}var mt=0;function j(w,b,y){this.ref=y||++mt,this.id=w,this.args=b||[],this.indicator=w+\"/\"+this.args.length}var rt=0;function Fe(w,b,y,F,z,X){this.id=rt++,this.stream=w,this.mode=b,this.alias=y,this.type=F!==void 0?F:\"text\",this.reposition=z!==void 0?z:!0,this.eof_action=X!==void 0?X:\"eof_code\",this.position=this.mode===\"append\"?\"end_of_stream\":0,this.output=this.mode===\"write\"||this.mode===\"append\",this.input=this.mode===\"read\"}function Ne(w){w=w||{},this.links=w}function Pe(w,b,y){b=b||new Ne,y=y||null,this.goal=w,this.substitution=b,this.parent=y}function Ve(w,b,y){this.head=w,this.body=b,this.dynamic=y||!1}function ke(w){w=w===void 0||w<=0?1e3:w,this.rules={},this.src_predicates={},this.rename=0,this.modules=[],this.thread=new it(this),this.total_threads=1,this.renamed_variables={},this.public_predicates={},this.multifile_predicates={},this.limit=w,this.streams={user_input:new Fe(typeof ec<\"u\"&&ec.exports?nodejs_user_input:tau_user_input,\"read\",\"user_input\",\"text\",!1,\"reset\"),user_output:new Fe(typeof ec<\"u\"&&ec.exports?nodejs_user_output:tau_user_output,\"write\",\"user_output\",\"text\",!1,\"eof_code\")},this.file_system=typeof ec<\"u\"&&ec.exports?nodejs_file_system:tau_file_system,this.standard_input=this.streams.user_input,this.standard_output=this.streams.user_output,this.current_input=this.streams.user_input,this.current_output=this.streams.user_output,this.format_success=function(b){return b.substitution},this.format_error=function(b){return b.goal},this.flag={bounded:x.flag.bounded.value,max_integer:x.flag.max_integer.value,min_integer:x.flag.min_integer.value,integer_rounding_function:x.flag.integer_rounding_function.value,char_conversion:x.flag.char_conversion.value,debug:x.flag.debug.value,max_arity:x.flag.max_arity.value,unknown:x.flag.unknown.value,double_quotes:x.flag.double_quotes.value,occurs_check:x.flag.occurs_check.value,dialect:x.flag.dialect.value,version_data:x.flag.version_data.value,nodejs:x.flag.nodejs.value},this.__loaded_modules=[],this.__char_conversion={},this.__operators={1200:{\":-\":[\"fx\",\"xfx\"],\"-->\":[\"xfx\"],\"?-\":[\"fx\"]},1100:{\";\":[\"xfy\"]},1050:{\"->\":[\"xfy\"]},1e3:{\",\":[\"xfy\"]},900:{\"\\\\+\":[\"fy\"]},700:{\"=\":[\"xfx\"],\"\\\\=\":[\"xfx\"],\"==\":[\"xfx\"],\"\\\\==\":[\"xfx\"],\"@<\":[\"xfx\"],\"@=<\":[\"xfx\"],\"@>\":[\"xfx\"],\"@>=\":[\"xfx\"],\"=..\":[\"xfx\"],is:[\"xfx\"],\"=:=\":[\"xfx\"],\"=\\\\=\":[\"xfx\"],\"<\":[\"xfx\"],\"=<\":[\"xfx\"],\">\":[\"xfx\"],\">=\":[\"xfx\"]},600:{\":\":[\"xfy\"]},500:{\"+\":[\"yfx\"],\"-\":[\"yfx\"],\"/\\\\\":[\"yfx\"],\"\\\\/\":[\"yfx\"]},400:{\"*\":[\"yfx\"],\"/\":[\"yfx\"],\"//\":[\"yfx\"],rem:[\"yfx\"],mod:[\"yfx\"],\"<<\":[\"yfx\"],\">>\":[\"yfx\"]},200:{\"**\":[\"xfx\"],\"^\":[\"xfy\"],\"-\":[\"fy\"],\"+\":[\"fy\"],\"\\\\\":[\"fy\"]}}}function it(w){this.epoch=Date.now(),this.session=w,this.session.total_threads++,this.total_steps=0,this.cpu_time=0,this.cpu_time_last=0,this.points=[],this.debugger=!1,this.debugger_states=[],this.level=\"top_level/0\",this.__calls=[],this.current_limit=this.session.limit,this.warnings=[]}function Ue(w,b,y){this.id=w,this.rules=b,this.exports=y,x.module[w]=this}Ue.prototype.exports_predicate=function(w){return this.exports.indexOf(w)!==-1},De.prototype.unify=function(w,b){if(b&&e(w.variables(),this.id)!==-1&&!x.type.is_variable(w))return null;var y={};return y[this.id]=w,new Ne(y)},Re.prototype.unify=function(w,b){return x.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float?new Ne:null},j.prototype.unify=function(w,b){if(x.type.is_term(w)&&this.indicator===w.indicator){for(var y=new Ne,F=0;F<this.args.length;F++){var z=x.unify(this.args[F].apply(y),w.args[F].apply(y),b);if(z===null)return null;for(var X in z.links)y.links[X]=z.links[X];y=y.apply(z)}return y}return null},Fe.prototype.unify=function(w,b){return x.type.is_stream(w)&&this.id===w.id?new Ne:null},De.prototype.toString=function(w){return this.id},Re.prototype.toString=function(w){return this.is_float&&e(this.value.toString(),\".\")===-1?this.value+\".0\":this.value.toString()},j.prototype.toString=function(w,b,y){if(w=w||{},w.quoted=w.quoted===void 0?!0:w.quoted,w.ignore_ops=w.ignore_ops===void 0?!1:w.ignore_ops,w.numbervars=w.numbervars===void 0?!1:w.numbervars,b=b===void 0?1200:b,y=y===void 0?\"\":y,w.numbervars&&this.indicator===\"$VAR/1\"&&x.type.is_integer(this.args[0])&&this.args[0].value>=0){var F=this.args[0].value,z=Math.floor(F/26),X=F%26;return\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"[X]+(z!==0?z:\"\")}switch(this.indicator){case\"[]/0\":case\"{}/0\":case\"!/0\":return this.id;case\"{}/1\":return\"{\"+this.args[0].toString(w)+\"}\";case\"./2\":for(var $=\"[\"+this.args[0].toString(w),oe=this.args[1];oe.indicator===\"./2\";)$+=\", \"+oe.args[0].toString(w),oe=oe.args[1];return oe.indicator!==\"[]/0\"&&($+=\"|\"+oe.toString(w)),$+=\"]\",$;case\",/2\":return\"(\"+this.args[0].toString(w)+\", \"+this.args[1].toString(w)+\")\";default:var xe=this.id,Te=w.session?w.session.lookup_operator(this.id,this.args.length):null;if(w.session===void 0||w.ignore_ops||Te===null)return w.quoted&&!/^(!|,|;|[a-z][0-9a-zA-Z_]*)$/.test(xe)&&xe!==\"{}\"&&xe!==\"[]\"&&(xe=\"'\"+P(xe)+\"'\"),xe+(this.args.length?\"(\"+s(this.args,function(ir){return ir.toString(w)}).join(\", \")+\")\":\"\");var lt=Te.priority>b.priority||Te.priority===b.priority&&(Te.class===\"xfy\"&&this.indicator!==b.indicator||Te.class===\"yfx\"&&this.indicator!==b.indicator||this.indicator===b.indicator&&Te.class===\"yfx\"&&y===\"right\"||this.indicator===b.indicator&&Te.class===\"xfy\"&&y===\"left\");Te.indicator=this.indicator;var Ct=lt?\"(\":\"\",qt=lt?\")\":\"\";return this.args.length===0?\"(\"+this.id+\")\":[\"fy\",\"fx\"].indexOf(Te.class)!==-1?Ct+xe+\" \"+this.args[0].toString(w,Te)+qt:[\"yf\",\"xf\"].indexOf(Te.class)!==-1?Ct+this.args[0].toString(w,Te)+\" \"+xe+qt:Ct+this.args[0].toString(w,Te,\"left\")+\" \"+this.id+\" \"+this.args[1].toString(w,Te,\"right\")+qt}},Fe.prototype.toString=function(w){return\"<stream>(\"+this.id+\")\"},Ne.prototype.toString=function(w){var b=\"{\";for(var y in this.links)this.links.hasOwnProperty(y)&&(b!==\"{\"&&(b+=\", \"),b+=y+\"/\"+this.links[y].toString(w));return b+=\"}\",b},Pe.prototype.toString=function(w){return this.goal===null?\"<\"+this.substitution.toString(w)+\">\":\"<\"+this.goal.toString(w)+\", \"+this.substitution.toString(w)+\">\"},Ve.prototype.toString=function(w){return this.body?this.head.toString(w)+\" :- \"+this.body.toString(w)+\".\":this.head.toString(w)+\".\"},ke.prototype.toString=function(w){for(var b=\"\",y=0;y<this.modules.length;y++)b+=\":- use_module(library(\"+this.modules[y]+`)).\n`;b+=`\n`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)b+=this.rules[key][y].toString(w),b+=`\n`;return b},De.prototype.clone=function(){return new De(this.id)},Re.prototype.clone=function(){return new Re(this.value,this.is_float)},j.prototype.clone=function(){return new j(this.id,s(this.args,function(w){return w.clone()}))},Fe.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Ne.prototype.clone=function(){var w={};for(var b in this.links)this.links.hasOwnProperty(b)&&(w[b]=this.links[b].clone());return new Ne(w)},Pe.prototype.clone=function(){return new Pe(this.goal.clone(),this.substitution.clone(),this.parent)},Ve.prototype.clone=function(){return new Ve(this.head.clone(),this.body!==null?this.body.clone():null)},De.prototype.equals=function(w){return x.type.is_variable(w)&&this.id===w.id},Re.prototype.equals=function(w){return x.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float},j.prototype.equals=function(w){if(!x.type.is_term(w)||this.indicator!==w.indicator)return!1;for(var b=0;b<this.args.length;b++)if(!this.args[b].equals(w.args[b]))return!1;return!0},Fe.prototype.equals=function(w){return x.type.is_stream(w)&&this.id===w.id},Ne.prototype.equals=function(w){var b;if(!x.type.is_substitution(w))return!1;for(b in this.links)if(this.links.hasOwnProperty(b)&&(!w.links[b]||!this.links[b].equals(w.links[b])))return!1;for(b in w.links)if(w.links.hasOwnProperty(b)&&!this.links[b])return!1;return!0},Pe.prototype.equals=function(w){return x.type.is_state(w)&&this.goal.equals(w.goal)&&this.substitution.equals(w.substitution)&&this.parent===w.parent},Ve.prototype.equals=function(w){return x.type.is_rule(w)&&this.head.equals(w.head)&&(this.body===null&&w.body===null||this.body!==null&&this.body.equals(w.body))},De.prototype.rename=function(w){return w.get_free_variable(this)},Re.prototype.rename=function(w){return this},j.prototype.rename=function(w){return new j(this.id,s(this.args,function(b){return b.rename(w)}))},Fe.prototype.rename=function(w){return this},Ve.prototype.rename=function(w){return new Ve(this.head.rename(w),this.body!==null?this.body.rename(w):null)},De.prototype.variables=function(){return[this.id]},Re.prototype.variables=function(){return[]},j.prototype.variables=function(){return[].concat.apply([],s(this.args,function(w){return w.variables()}))},Fe.prototype.variables=function(){return[]},Ve.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},De.prototype.apply=function(w){return w.lookup(this.id)?w.lookup(this.id):this},Re.prototype.apply=function(w){return this},j.prototype.apply=function(w){if(this.indicator===\"./2\"){for(var b=[],y=this;y.indicator===\"./2\";)b.push(y.args[0].apply(w)),y=y.args[1];for(var F=y.apply(w),z=b.length-1;z>=0;z--)F=new j(\".\",[b[z],F]);return F}return new j(this.id,s(this.args,function(X){return X.apply(w)}),this.ref)},Fe.prototype.apply=function(w){return this},Ve.prototype.apply=function(w){return new Ve(this.head.apply(w),this.body!==null?this.body.apply(w):null)},Ne.prototype.apply=function(w){var b,y={};for(b in this.links)this.links.hasOwnProperty(b)&&(y[b]=this.links[b].apply(w));return new Ne(y)},j.prototype.select=function(){for(var w=this;w.indicator===\",/2\";)w=w.args[0];return w},j.prototype.replace=function(w){return this.indicator===\",/2\"?this.args[0].indicator===\",/2\"?new j(\",\",[this.args[0].replace(w),this.args[1]]):w===null?this.args[1]:new j(\",\",[w,this.args[1]]):w},j.prototype.search=function(w){if(x.type.is_term(w)&&w.ref!==void 0&&this.ref===w.ref)return!0;for(var b=0;b<this.args.length;b++)if(x.type.is_term(this.args[b])&&this.args[b].search(w))return!0;return!1},ke.prototype.get_current_input=function(){return this.current_input},it.prototype.get_current_input=function(){return this.session.get_current_input()},ke.prototype.get_current_output=function(){return this.current_output},it.prototype.get_current_output=function(){return this.session.get_current_output()},ke.prototype.set_current_input=function(w){this.current_input=w},it.prototype.set_current_input=function(w){return this.session.set_current_input(w)},ke.prototype.set_current_output=function(w){this.current_input=w},it.prototype.set_current_output=function(w){return this.session.set_current_output(w)},ke.prototype.get_stream_by_alias=function(w){return this.streams[w]},it.prototype.get_stream_by_alias=function(w){return this.session.get_stream_by_alias(w)},ke.prototype.file_system_open=function(w,b,y){return this.file_system.open(w,b,y)},it.prototype.file_system_open=function(w,b,y){return this.session.file_system_open(w,b,y)},ke.prototype.get_char_conversion=function(w){return this.__char_conversion[w]||w},it.prototype.get_char_conversion=function(w){return this.session.get_char_conversion(w)},ke.prototype.parse=function(w){return this.thread.parse(w)},it.prototype.parse=function(w){var b=new U(this);b.new_text(w);var y=b.get_tokens();if(y===null)return!1;var F=W(this,y,0,this.__get_max_priority(),!1);return F.len!==y.length?!1:{value:F.value,expr:F,tokens:y}},ke.prototype.get_flag=function(w){return this.flag[w]},it.prototype.get_flag=function(w){return this.session.get_flag(w)},ke.prototype.add_rule=function(w,b){return b=b||{},b.from=b.from?b.from:\"$tau-js\",this.src_predicates[w.head.indicator]=b.from,this.rules[w.head.indicator]||(this.rules[w.head.indicator]=[]),this.rules[w.head.indicator].push(w),this.public_predicates.hasOwnProperty(w.head.indicator)||(this.public_predicates[w.head.indicator]=!1),!0},it.prototype.add_rule=function(w,b){return this.session.add_rule(w,b)},ke.prototype.run_directive=function(w){this.thread.run_directive(w)},it.prototype.run_directive=function(w){return x.type.is_directive(w)?(x.directive[w.indicator](this,w),!0):!1},ke.prototype.__get_max_priority=function(){return\"1200\"},it.prototype.__get_max_priority=function(){return this.session.__get_max_priority()},ke.prototype.__get_next_priority=function(w){var b=0;w=parseInt(w);for(var y in this.__operators)if(this.__operators.hasOwnProperty(y)){var F=parseInt(y);F>b&&F<w&&(b=F)}return b.toString()},it.prototype.__get_next_priority=function(w){return this.session.__get_next_priority(w)},ke.prototype.__lookup_operator_classes=function(w,b){return this.__operators.hasOwnProperty(w)&&this.__operators[w][b]instanceof Array&&this.__operators[w][b]||!1},it.prototype.__lookup_operator_classes=function(w,b){return this.session.__lookup_operator_classes(w,b)},ke.prototype.lookup_operator=function(w,b){for(var y in this.__operators)if(this.__operators[y][w]){for(var F=0;F<this.__operators[y][w].length;F++)if(b===0||this.__operators[y][w][F].length===b+1)return{priority:y,class:this.__operators[y][w][F]}}return null},it.prototype.lookup_operator=function(w,b){return this.session.lookup_operator(w,b)},ke.prototype.throw_warning=function(w){this.thread.throw_warning(w)},it.prototype.throw_warning=function(w){this.warnings.push(w)},ke.prototype.get_warnings=function(){return this.thread.get_warnings()},it.prototype.get_warnings=function(){return this.warnings},ke.prototype.add_goal=function(w,b){this.thread.add_goal(w,b)},it.prototype.add_goal=function(w,b,y){y=y||null,b===!0&&(this.points=[]);for(var F=w.variables(),z={},X=0;X<F.length;X++)z[F[X]]=new De(F[X]);this.points.push(new Pe(w,new Ne(z),y))},ke.prototype.consult=function(w,b){return this.thread.consult(w,b)},it.prototype.consult=function(w,b){var y=\"\";if(typeof w==\"string\"){y=w;var F=y.length;if(y.substring(F-3,F)===\".pl\"&&document.getElementById(y)){var z=document.getElementById(y),X=z.getAttribute(\"type\");X!==null&&X.replace(/ /g,\"\").toLowerCase()===\"text/prolog\"&&(y=z.text)}}else if(w.nodeName)switch(w.nodeName.toLowerCase()){case\"input\":case\"textarea\":y=w.value;break;default:y=w.innerHTML;break}else return!1;return this.warnings=[],le(this,y,b)},ke.prototype.query=function(w){return this.thread.query(w)},it.prototype.query=function(w){return this.points=[],this.debugger_points=[],me(this,w)},ke.prototype.head_point=function(){return this.thread.head_point()},it.prototype.head_point=function(){return this.points[this.points.length-1]},ke.prototype.get_free_variable=function(w){return this.thread.get_free_variable(w)},it.prototype.get_free_variable=function(w){var b=[];if(w.id===\"_\"||this.session.renamed_variables[w.id]===void 0){for(this.session.rename++,this.points.length>0&&(b=this.head_point().substitution.domain());e(b,x.format_variable(this.session.rename))!==-1;)this.session.rename++;if(w.id===\"_\")return new De(x.format_variable(this.session.rename));this.session.renamed_variables[w.id]=x.format_variable(this.session.rename)}return new De(this.session.renamed_variables[w.id])},ke.prototype.next_free_variable=function(){return this.thread.next_free_variable()},it.prototype.next_free_variable=function(){this.session.rename++;var w=[];for(this.points.length>0&&(w=this.head_point().substitution.domain());e(w,x.format_variable(this.session.rename))!==-1;)this.session.rename++;return new De(x.format_variable(this.session.rename))},ke.prototype.is_public_predicate=function(w){return!this.public_predicates.hasOwnProperty(w)||this.public_predicates[w]===!0},it.prototype.is_public_predicate=function(w){return this.session.is_public_predicate(w)},ke.prototype.is_multifile_predicate=function(w){return this.multifile_predicates.hasOwnProperty(w)&&this.multifile_predicates[w]===!0},it.prototype.is_multifile_predicate=function(w){return this.session.is_multifile_predicate(w)},ke.prototype.prepend=function(w){return this.thread.prepend(w)},it.prototype.prepend=function(w){for(var b=w.length-1;b>=0;b--)this.points.push(w[b])},ke.prototype.success=function(w,b){return this.thread.success(w,b)},it.prototype.success=function(w,y){var y=typeof y>\"u\"?w:y;this.prepend([new Pe(w.goal.replace(null),w.substitution,y)])},ke.prototype.throw_error=function(w){return this.thread.throw_error(w)},it.prototype.throw_error=function(w){this.prepend([new Pe(new j(\"throw\",[w]),new Ne,null,null)])},ke.prototype.step_rule=function(w,b){return this.thread.step_rule(w,b)},it.prototype.step_rule=function(w,b){var y=b.indicator;if(w===\"user\"&&(w=null),w===null&&this.session.rules.hasOwnProperty(y))return this.session.rules[y];for(var F=w===null?this.session.modules:e(this.session.modules,w)===-1?[]:[w],z=0;z<F.length;z++){var X=x.module[F[z]];if(X.rules.hasOwnProperty(y)&&(X.rules.hasOwnProperty(this.level)||X.exports_predicate(y)))return x.module[F[z]].rules[y]}return null},ke.prototype.step=function(){return this.thread.step()},it.prototype.step=function(){if(this.points.length!==0){var w=!1,b=this.points.pop();if(this.debugger&&this.debugger_states.push(b),x.type.is_term(b.goal)){var y=b.goal.select(),F=null,z=[];if(y!==null){this.total_steps++;for(var X=b;X.parent!==null&&X.parent.goal.search(y);)X=X.parent;if(this.level=X.parent===null?\"top_level/0\":X.parent.goal.select().indicator,x.type.is_term(y)&&y.indicator===\":/2\"&&(F=y.args[0].id,y=y.args[1]),F===null&&x.type.is_builtin(y))this.__call_indicator=y.indicator,w=x.predicate[y.indicator](this,b,y);else{var $=this.step_rule(F,y);if($===null)this.session.rules.hasOwnProperty(y.indicator)||(this.get_flag(\"unknown\").id===\"error\"?this.throw_error(x.error.existence(\"procedure\",y.indicator,this.level)):this.get_flag(\"unknown\").id===\"warning\"&&this.throw_warning(\"unknown procedure \"+y.indicator+\" (from \"+this.level+\")\"));else if($ instanceof Function)w=$(this,b,y);else{for(var oe in $)if($.hasOwnProperty(oe)){var xe=$[oe];this.session.renamed_variables={},xe=xe.rename(this);var Te=this.get_flag(\"occurs_check\").indicator===\"true/0\",lt=new Pe,Ct=x.unify(y,xe.head,Te);Ct!==null&&(lt.goal=b.goal.replace(xe.body),lt.goal!==null&&(lt.goal=lt.goal.apply(Ct)),lt.substitution=b.substitution.apply(Ct),lt.parent=b,z.push(lt))}this.prepend(z)}}}}else x.type.is_variable(b.goal)?this.throw_error(x.error.instantiation(this.level)):this.throw_error(x.error.type(\"callable\",b.goal,this.level));return w}},ke.prototype.answer=function(w){return this.thread.answer(w)},it.prototype.answer=function(w){w=w||function(b){},this.__calls.push(w),!(this.__calls.length>1)&&this.again()},ke.prototype.answers=function(w,b,y){return this.thread.answers(w,b,y)},it.prototype.answers=function(w,b,y){var F=b||1e3,z=this;if(b<=0){y&&y();return}this.answer(function(X){w(X),X!==!1?setTimeout(function(){z.answers(w,b-1,y)},1):y&&y()})},ke.prototype.again=function(w){return this.thread.again(w)},it.prototype.again=function(w){for(var b,y=Date.now();this.__calls.length>0;){for(this.warnings=[],w!==!1&&(this.current_limit=this.session.limit);this.current_limit>0&&this.points.length>0&&this.head_point().goal!==null&&!x.type.is_error(this.head_point().goal);)if(this.current_limit--,this.step()===!0)return;var F=Date.now();this.cpu_time_last=F-y,this.cpu_time+=this.cpu_time_last;var z=this.__calls.shift();this.current_limit<=0?z(null):this.points.length===0?z(!1):x.type.is_error(this.head_point().goal)?(b=this.session.format_error(this.points.pop()),this.points=[],z(b)):(this.debugger&&this.debugger_states.push(this.head_point()),b=this.session.format_success(this.points.pop()),z(b))}},ke.prototype.unfold=function(w){if(w.body===null)return!1;var b=w.head,y=w.body,F=y.select(),z=new it(this),X=[];z.add_goal(F),z.step();for(var $=z.points.length-1;$>=0;$--){var oe=z.points[$],xe=b.apply(oe.substitution),Te=y.replace(oe.goal);Te!==null&&(Te=Te.apply(oe.substitution)),X.push(new Ve(xe,Te))}var lt=this.rules[b.indicator],Ct=e(lt,w);return X.length>0&&Ct!==-1?(lt.splice.apply(lt,[Ct,1].concat(X)),!0):!1},it.prototype.unfold=function(w){return this.session.unfold(w)},De.prototype.interpret=function(w){return x.error.instantiation(w.level)},Re.prototype.interpret=function(w){return this},j.prototype.interpret=function(w){return x.type.is_unitary_list(this)?this.args[0].interpret(w):x.operate(w,this)},De.prototype.compare=function(w){return this.id<w.id?-1:this.id>w.id?1:0},Re.prototype.compare=function(w){if(this.value===w.value&&this.is_float===w.is_float)return 0;if(this.value<w.value||this.value===w.value&&this.is_float&&!w.is_float)return-1;if(this.value>w.value)return 1},j.prototype.compare=function(w){if(this.args.length<w.args.length||this.args.length===w.args.length&&this.id<w.id)return-1;if(this.args.length>w.args.length||this.args.length===w.args.length&&this.id>w.id)return 1;for(var b=0;b<this.args.length;b++){var y=x.compare(this.args[b],w.args[b]);if(y!==0)return y}return 0},Ne.prototype.lookup=function(w){return this.links[w]?this.links[w]:null},Ne.prototype.filter=function(w){var b={};for(var y in this.links)if(this.links.hasOwnProperty(y)){var F=this.links[y];w(y,F)&&(b[y]=F)}return new Ne(b)},Ne.prototype.exclude=function(w){var b={};for(var y in this.links)this.links.hasOwnProperty(y)&&e(w,y)===-1&&(b[y]=this.links[y]);return new Ne(b)},Ne.prototype.add=function(w,b){this.links[w]=b},Ne.prototype.domain=function(w){var b=w===!0?function(z){return z}:function(z){return new De(z)},y=[];for(var F in this.links)y.push(b(F));return y},De.prototype.compile=function(){return'new pl.type.Var(\"'+this.id.toString()+'\")'},Re.prototype.compile=function(){return\"new pl.type.Num(\"+this.value.toString()+\", \"+this.is_float.toString()+\")\"},j.prototype.compile=function(){return'new pl.type.Term(\"'+this.id.replace(/\"/g,'\\\\\"')+'\", ['+s(this.args,function(w){return w.compile()})+\"])\"},Ve.prototype.compile=function(){return\"new pl.type.Rule(\"+this.head.compile()+\", \"+(this.body===null?\"null\":this.body.compile())+\")\"},ke.prototype.compile=function(){var w,b=[],y;for(var F in this.rules)if(this.rules.hasOwnProperty(F)){var z=this.rules[F];y=[],w='\"'+F+'\": [';for(var X=0;X<z.length;X++)y.push(z[X].compile());w+=y.join(),w+=\"]\",b.push(w)}return\"{\"+b.join()+\"};\"},De.prototype.toJavaScript=function(){},Re.prototype.toJavaScript=function(){return this.value},j.prototype.toJavaScript=function(){if(this.args.length===0&&this.indicator!==\"[]/0\")return this.id;if(x.type.is_list(this)){for(var w=[],b=this,y;b.indicator===\"./2\";){if(y=b.args[0].toJavaScript(),y===void 0)return;w.push(y),b=b.args[1]}if(b.indicator===\"[]/0\")return w}},Ve.prototype.singleton_variables=function(){var w=this.head.variables(),b={},y=[];this.body!==null&&(w=w.concat(this.body.variables()));for(var F=0;F<w.length;F++)b[w[F]]===void 0&&(b[w[F]]=0),b[w[F]]++;for(var z in b)z!==\"_\"&&b[z]===1&&y.push(z);return y};var x={__env:typeof ec<\"u\"&&ec.exports?global:window,module:{},version:t,parser:{tokenizer:U,expression:W},utils:{str_indicator:Z,codePointAt:n,fromCodePoint:c},statistics:{getCountTerms:function(){return mt}},fromJavaScript:{test:{boolean:function(w){return w===!0||w===!1},number:function(w){return typeof w==\"number\"},string:function(w){return typeof w==\"string\"},list:function(w){return w instanceof Array},variable:function(w){return w===void 0},any:function(w){return!0}},conversion:{boolean:function(w){return new j(w?\"true\":\"false\",[])},number:function(w){return new Re(w,w%1!==0)},string:function(w){return new j(w,[])},list:function(w){for(var b=[],y,F=0;F<w.length;F++){if(y=x.fromJavaScript.apply(w[F]),y===void 0)return;b.push(y)}return g(b)},variable:function(w){return new De(\"_\")},any:function(w){}},apply:function(w){for(var b in x.fromJavaScript.test)if(b!==\"any\"&&x.fromJavaScript.test[b](w))return x.fromJavaScript.conversion[b](w);return x.fromJavaScript.conversion.any(w)}},type:{Var:De,Num:Re,Term:j,Rule:Ve,State:Pe,Stream:Fe,Module:Ue,Thread:it,Session:ke,Substitution:Ne,order:[De,Re,j,Fe],compare:function(w,b){var y=e(x.type.order,w.constructor),F=e(x.type.order,b.constructor);if(y<F)return-1;if(y>F)return 1;if(w.constructor===Re){if(w.is_float&&b.is_float)return 0;if(w.is_float)return-1;if(b.is_float)return 1}return 0},is_substitution:function(w){return w instanceof Ne},is_state:function(w){return w instanceof Pe},is_rule:function(w){return w instanceof Ve},is_variable:function(w){return w instanceof De},is_stream:function(w){return w instanceof Fe},is_anonymous_var:function(w){return w instanceof De&&w.id===\"_\"},is_callable:function(w){return w instanceof j},is_number:function(w){return w instanceof Re},is_integer:function(w){return w instanceof Re&&!w.is_float},is_float:function(w){return w instanceof Re&&w.is_float},is_term:function(w){return w instanceof j},is_atom:function(w){return w instanceof j&&w.args.length===0},is_ground:function(w){if(w instanceof De)return!1;if(w instanceof j){for(var b=0;b<w.args.length;b++)if(!x.type.is_ground(w.args[b]))return!1}return!0},is_atomic:function(w){return w instanceof j&&w.args.length===0||w instanceof Re},is_compound:function(w){return w instanceof j&&w.args.length>0},is_list:function(w){return w instanceof j&&(w.indicator===\"[]/0\"||w.indicator===\"./2\")},is_empty_list:function(w){return w instanceof j&&w.indicator===\"[]/0\"},is_non_empty_list:function(w){return w instanceof j&&w.indicator===\"./2\"},is_fully_list:function(w){for(;w instanceof j&&w.indicator===\"./2\";)w=w.args[1];return w instanceof De||w instanceof j&&w.indicator===\"[]/0\"},is_instantiated_list:function(w){for(;w instanceof j&&w.indicator===\"./2\";)w=w.args[1];return w instanceof j&&w.indicator===\"[]/0\"},is_unitary_list:function(w){return w instanceof j&&w.indicator===\"./2\"&&w.args[1]instanceof j&&w.args[1].indicator===\"[]/0\"},is_character:function(w){return w instanceof j&&(w.id.length===1||w.id.length>0&&w.id.length<=2&&n(w.id,0)>=65536)},is_character_code:function(w){return w instanceof Re&&!w.is_float&&w.value>=0&&w.value<=1114111},is_byte:function(w){return w instanceof Re&&!w.is_float&&w.value>=0&&w.value<=255},is_operator:function(w){return w instanceof j&&x.arithmetic.evaluation[w.indicator]},is_directive:function(w){return w instanceof j&&x.directive[w.indicator]!==void 0},is_builtin:function(w){return w instanceof j&&x.predicate[w.indicator]!==void 0},is_error:function(w){return w instanceof j&&w.indicator===\"throw/1\"},is_predicate_indicator:function(w){return w instanceof j&&w.indicator===\"//2\"&&w.args[0]instanceof j&&w.args[0].args.length===0&&w.args[1]instanceof Re&&w.args[1].is_float===!1},is_flag:function(w){return w instanceof j&&w.args.length===0&&x.flag[w.id]!==void 0},is_value_flag:function(w,b){if(!x.type.is_flag(w))return!1;for(var y in x.flag[w.id].allowed)if(x.flag[w.id].allowed.hasOwnProperty(y)&&x.flag[w.id].allowed[y].equals(b))return!0;return!1},is_io_mode:function(w){return x.type.is_atom(w)&&[\"read\",\"write\",\"append\"].indexOf(w.id)!==-1},is_stream_option:function(w){return x.type.is_term(w)&&(w.indicator===\"alias/1\"&&x.type.is_atom(w.args[0])||w.indicator===\"reposition/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")||w.indicator===\"type/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"text\"||w.args[0].id===\"binary\")||w.indicator===\"eof_action/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"error\"||w.args[0].id===\"eof_code\"||w.args[0].id===\"reset\"))},is_stream_position:function(w){return x.type.is_integer(w)&&w.value>=0||x.type.is_atom(w)&&(w.id===\"end_of_stream\"||w.id===\"past_end_of_stream\")},is_stream_property:function(w){return x.type.is_term(w)&&(w.indicator===\"input/0\"||w.indicator===\"output/0\"||w.indicator===\"alias/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0]))||w.indicator===\"file_name/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0]))||w.indicator===\"position/1\"&&(x.type.is_variable(w.args[0])||x.type.is_stream_position(w.args[0]))||w.indicator===\"reposition/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\"))||w.indicator===\"type/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"text\"||w.args[0].id===\"binary\"))||w.indicator===\"mode/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"read\"||w.args[0].id===\"write\"||w.args[0].id===\"append\"))||w.indicator===\"eof_action/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"error\"||w.args[0].id===\"eof_code\"||w.args[0].id===\"reset\"))||w.indicator===\"end_of_stream/1\"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id===\"at\"||w.args[0].id===\"past\"||w.args[0].id===\"not\")))},is_streamable:function(w){return w.__proto__.stream!==void 0},is_read_option:function(w){return x.type.is_term(w)&&[\"variables/1\",\"variable_names/1\",\"singletons/1\"].indexOf(w.indicator)!==-1},is_write_option:function(w){return x.type.is_term(w)&&(w.indicator===\"quoted/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")||w.indicator===\"ignore_ops/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")||w.indicator===\"numbervars/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\"))},is_close_option:function(w){return x.type.is_term(w)&&w.indicator===\"force/1\"&&x.type.is_atom(w.args[0])&&(w.args[0].id===\"true\"||w.args[0].id===\"false\")},is_modifiable_flag:function(w){return x.type.is_flag(w)&&x.flag[w.id].changeable},is_module:function(w){return w instanceof j&&w.indicator===\"library/1\"&&w.args[0]instanceof j&&w.args[0].args.length===0&&x.module[w.args[0].id]!==void 0}},arithmetic:{evaluation:{\"e/0\":{type_args:null,type_result:!0,fn:function(w){return Math.E}},\"pi/0\":{type_args:null,type_result:!0,fn:function(w){return Math.PI}},\"tau/0\":{type_args:null,type_result:!0,fn:function(w){return 2*Math.PI}},\"epsilon/0\":{type_args:null,type_result:!0,fn:function(w){return Number.EPSILON}},\"+/1\":{type_args:null,type_result:null,fn:function(w,b){return w}},\"-/1\":{type_args:null,type_result:null,fn:function(w,b){return-w}},\"\\\\/1\":{type_args:!1,type_result:!1,fn:function(w,b){return~w}},\"abs/1\":{type_args:null,type_result:null,fn:function(w,b){return Math.abs(w)}},\"sign/1\":{type_args:null,type_result:null,fn:function(w,b){return Math.sign(w)}},\"float_integer_part/1\":{type_args:!0,type_result:!1,fn:function(w,b){return parseInt(w)}},\"float_fractional_part/1\":{type_args:!0,type_result:!0,fn:function(w,b){return w-parseInt(w)}},\"float/1\":{type_args:null,type_result:!0,fn:function(w,b){return parseFloat(w)}},\"floor/1\":{type_args:!0,type_result:!1,fn:function(w,b){return Math.floor(w)}},\"truncate/1\":{type_args:!0,type_result:!1,fn:function(w,b){return parseInt(w)}},\"round/1\":{type_args:!0,type_result:!1,fn:function(w,b){return Math.round(w)}},\"ceiling/1\":{type_args:!0,type_result:!1,fn:function(w,b){return Math.ceil(w)}},\"sin/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.sin(w)}},\"cos/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.cos(w)}},\"tan/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.tan(w)}},\"asin/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.asin(w)}},\"acos/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.acos(w)}},\"atan/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.atan(w)}},\"atan2/2\":{type_args:null,type_result:!0,fn:function(w,b,y){return Math.atan2(w,b)}},\"exp/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.exp(w)}},\"sqrt/1\":{type_args:null,type_result:!0,fn:function(w,b){return Math.sqrt(w)}},\"log/1\":{type_args:null,type_result:!0,fn:function(w,b){return w>0?Math.log(w):x.error.evaluation(\"undefined\",b.__call_indicator)}},\"+/2\":{type_args:null,type_result:null,fn:function(w,b,y){return w+b}},\"-/2\":{type_args:null,type_result:null,fn:function(w,b,y){return w-b}},\"*/2\":{type_args:null,type_result:null,fn:function(w,b,y){return w*b}},\"//2\":{type_args:null,type_result:!0,fn:function(w,b,y){return b?w/b:x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"///2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?parseInt(w/b):x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"**/2\":{type_args:null,type_result:!0,fn:function(w,b,y){return Math.pow(w,b)}},\"^/2\":{type_args:null,type_result:null,fn:function(w,b,y){return Math.pow(w,b)}},\"<</2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w<<b}},\">>/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w>>b}},\"/\\\\/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w&b}},\"\\\\//2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w|b}},\"xor/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return w^b}},\"rem/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?w%b:x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"mod/2\":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?w-parseInt(w/b)*b:x.error.evaluation(\"zero_division\",y.__call_indicator)}},\"max/2\":{type_args:null,type_result:null,fn:function(w,b,y){return Math.max(w,b)}},\"min/2\":{type_args:null,type_result:null,fn:function(w,b,y){return Math.min(w,b)}}}},directive:{\"dynamic/1\":function(w,b){var y=b.args[0];if(x.type.is_variable(y))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_compound(y)||y.indicator!==\"//2\")w.throw_error(x.error.type(\"predicate_indicator\",y,b.indicator));else if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_atom(y.args[0]))w.throw_error(x.error.type(\"atom\",y.args[0],b.indicator));else if(!x.type.is_integer(y.args[1]))w.throw_error(x.error.type(\"integer\",y.args[1],b.indicator));else{var F=b.args[0].args[0].id+\"/\"+b.args[0].args[1].value;w.session.public_predicates[F]=!0,w.session.rules[F]||(w.session.rules[F]=[])}},\"multifile/1\":function(w,b){var y=b.args[0];x.type.is_variable(y)?w.throw_error(x.error.instantiation(b.indicator)):!x.type.is_compound(y)||y.indicator!==\"//2\"?w.throw_error(x.error.type(\"predicate_indicator\",y,b.indicator)):x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1])?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_atom(y.args[0])?x.type.is_integer(y.args[1])?w.session.multifile_predicates[b.args[0].args[0].id+\"/\"+b.args[0].args[1].value]=!0:w.throw_error(x.error.type(\"integer\",y.args[1],b.indicator)):w.throw_error(x.error.type(\"atom\",y.args[0],b.indicator))},\"set_prolog_flag/2\":function(w,b){var y=b.args[0],F=b.args[1];x.type.is_variable(y)||x.type.is_variable(F)?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_atom(y)?x.type.is_flag(y)?x.type.is_value_flag(y,F)?x.type.is_modifiable_flag(y)?w.session.flag[y.id]=F:w.throw_error(x.error.permission(\"modify\",\"flag\",y)):w.throw_error(x.error.domain(\"flag_value\",new j(\"+\",[y,F]),b.indicator)):w.throw_error(x.error.domain(\"prolog_flag\",y,b.indicator)):w.throw_error(x.error.type(\"atom\",y,b.indicator))},\"use_module/1\":function(w,b){var y=b.args[0];if(x.type.is_variable(y))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_term(y))w.throw_error(x.error.type(\"term\",y,b.indicator));else if(x.type.is_module(y)){var F=y.args[0].id;e(w.session.modules,F)===-1&&w.session.modules.push(F)}},\"char_conversion/2\":function(w,b){var y=b.args[0],F=b.args[1];x.type.is_variable(y)||x.type.is_variable(F)?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_character(y)?x.type.is_character(F)?y.id===F.id?delete w.session.__char_conversion[y.id]:w.session.__char_conversion[y.id]=F.id:w.throw_error(x.error.type(\"character\",F,b.indicator)):w.throw_error(x.error.type(\"character\",y,b.indicator))},\"op/3\":function(w,b){var y=b.args[0],F=b.args[1],z=b.args[2];if(x.type.is_variable(y)||x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_integer(y))w.throw_error(x.error.type(\"integer\",y,b.indicator));else if(!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,b.indicator));else if(!x.type.is_atom(z))w.throw_error(x.error.type(\"atom\",z,b.indicator));else if(y.value<0||y.value>1200)w.throw_error(x.error.domain(\"operator_priority\",y,b.indicator));else if(z.id===\",\")w.throw_error(x.error.permission(\"modify\",\"operator\",z,b.indicator));else if(z.id===\"|\"&&(y.value<1001||F.id.length!==3))w.throw_error(x.error.permission(\"modify\",\"operator\",z,b.indicator));else if([\"fy\",\"fx\",\"yf\",\"xf\",\"xfx\",\"yfx\",\"xfy\"].indexOf(F.id)===-1)w.throw_error(x.error.domain(\"operator_specifier\",F,b.indicator));else{var X={prefix:null,infix:null,postfix:null};for(var $ in w.session.__operators)if(w.session.__operators.hasOwnProperty($)){var oe=w.session.__operators[$][z.id];oe&&(e(oe,\"fx\")!==-1&&(X.prefix={priority:$,type:\"fx\"}),e(oe,\"fy\")!==-1&&(X.prefix={priority:$,type:\"fy\"}),e(oe,\"xf\")!==-1&&(X.postfix={priority:$,type:\"xf\"}),e(oe,\"yf\")!==-1&&(X.postfix={priority:$,type:\"yf\"}),e(oe,\"xfx\")!==-1&&(X.infix={priority:$,type:\"xfx\"}),e(oe,\"xfy\")!==-1&&(X.infix={priority:$,type:\"xfy\"}),e(oe,\"yfx\")!==-1&&(X.infix={priority:$,type:\"yfx\"}))}var xe;switch(F.id){case\"fy\":case\"fx\":xe=\"prefix\";break;case\"yf\":case\"xf\":xe=\"postfix\";break;default:xe=\"infix\";break}if(((X.prefix&&xe===\"prefix\"||X.postfix&&xe===\"postfix\"||X.infix&&xe===\"infix\")&&X[xe].type!==F.id||X.infix&&xe===\"postfix\"||X.postfix&&xe===\"infix\")&&y.value!==0)w.throw_error(x.error.permission(\"create\",\"operator\",z,b.indicator));else return X[xe]&&(we(w.session.__operators[X[xe].priority][z.id],F.id),w.session.__operators[X[xe].priority][z.id].length===0&&delete w.session.__operators[X[xe].priority][z.id]),y.value>0&&(w.session.__operators[y.value]||(w.session.__operators[y.value.toString()]={}),w.session.__operators[y.value][z.id]||(w.session.__operators[y.value][z.id]=[]),w.session.__operators[y.value][z.id].push(F.id)),!0}}},predicate:{\"op/3\":function(w,b,y){x.directive[\"op/3\"](w,y)&&w.success(b)},\"current_op/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=[];for(var oe in w.session.__operators)for(var xe in w.session.__operators[oe])for(var Te=0;Te<w.session.__operators[oe][xe].length;Te++)$.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[new Re(oe,!1),F]),new j(\",\",[new j(\"=\",[new j(w.session.__operators[oe][xe][Te],[]),z]),new j(\"=\",[new j(xe,[]),X])])])),b.substitution,b));w.prepend($)},\";/2\":function(w,b,y){if(x.type.is_term(y.args[0])&&y.args[0].indicator===\"->/2\"){var F=w.points,z=w.session.format_success,X=w.session.format_error;w.session.format_success=function(Te){return Te.substitution},w.session.format_error=function(Te){return Te.goal},w.points=[new Pe(y.args[0].args[0],b.substitution,b)];var $=function(Te){w.points=F,w.session.format_success=z,w.session.format_error=X,Te===!1?w.prepend([new Pe(b.goal.replace(y.args[1]),b.substitution,b)]):x.type.is_error(Te)?w.throw_error(Te.args[0]):Te===null?(w.prepend([b]),w.__calls.shift()(null)):w.prepend([new Pe(b.goal.replace(y.args[0].args[1]).apply(Te),b.substitution.apply(Te),b)])};w.__calls.unshift($)}else{var oe=new Pe(b.goal.replace(y.args[0]),b.substitution,b),xe=new Pe(b.goal.replace(y.args[1]),b.substitution,b);w.prepend([oe,xe])}},\"!/0\":function(w,b,y){var F,z,X=[];for(F=b,z=null;F.parent!==null&&F.parent.goal.search(y);)if(z=F,F=F.parent,F.goal!==null){var $=F.goal.select();if($&&$.id===\"call\"&&$.search(y)){F=z;break}}for(var oe=w.points.length-1;oe>=0;oe--){for(var xe=w.points[oe],Te=xe.parent;Te!==null&&Te!==F.parent;)Te=Te.parent;Te===null&&Te!==F.parent&&X.push(xe)}w.points=X.reverse(),w.success(b)},\"\\\\+/1\":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(w.level)):x.type.is_callable(F)?w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\",\",[new j(\"call\",[F]),new j(\"!\",[])]),new j(\"fail\",[])])),b.substitution,b),new Pe(b.goal.replace(null),b.substitution,b)]):w.throw_error(x.error.type(\"callable\",F,w.level))},\"->/2\":function(w,b,y){var F=b.goal.replace(new j(\",\",[y.args[0],new j(\",\",[new j(\"!\"),y.args[1]])]));w.prepend([new Pe(F,b.substitution,b)])},\"fail/0\":function(w,b,y){},\"false/0\":function(w,b,y){},\"true/0\":function(w,b,y){w.success(b)},\"call/1\":se(1),\"call/2\":se(2),\"call/3\":se(3),\"call/4\":se(4),\"call/5\":se(5),\"call/6\":se(6),\"call/7\":se(7),\"call/8\":se(8),\"once/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"call\",[F]),new j(\"!\",[])])),b.substitution,b)])},\"forall/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"\\\\+\",[new j(\",\",[new j(\"call\",[F]),new j(\"\\\\+\",[new j(\"call\",[z])])])])),b.substitution,b)])},\"repeat/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(null),b.substitution,b),b])},\"throw/1\":function(w,b,y){x.type.is_variable(y.args[0])?w.throw_error(x.error.instantiation(w.level)):w.throw_error(y.args[0])},\"catch/3\":function(w,b,y){var F=w.points;w.points=[],w.prepend([new Pe(y.args[0],b.substitution,b)]);var z=w.session.format_success,X=w.session.format_error;w.session.format_success=function(oe){return oe.substitution},w.session.format_error=function(oe){return oe.goal};var $=function(oe){var xe=w.points;if(w.points=F,w.session.format_success=z,w.session.format_error=X,x.type.is_error(oe)){for(var Te=[],lt=w.points.length-1;lt>=0;lt--){for(var ir=w.points[lt],Ct=ir.parent;Ct!==null&&Ct!==b.parent;)Ct=Ct.parent;Ct===null&&Ct!==b.parent&&Te.push(ir)}w.points=Te;var qt=w.get_flag(\"occurs_check\").indicator===\"true/0\",ir=new Pe,Pt=x.unify(oe.args[0],y.args[1],qt);Pt!==null?(ir.substitution=b.substitution.apply(Pt),ir.goal=b.goal.replace(y.args[2]).apply(Pt),ir.parent=b,w.prepend([ir])):w.throw_error(oe.args[0])}else if(oe!==!1){for(var gn=oe===null?[]:[new Pe(b.goal.apply(oe).replace(null),b.substitution.apply(oe),b)],Pr=[],lt=xe.length-1;lt>=0;lt--){Pr.push(xe[lt]);var Ir=xe[lt].goal!==null?xe[lt].goal.select():null;if(x.type.is_term(Ir)&&Ir.indicator===\"!/0\")break}var Or=s(Pr,function(on){return on.goal===null&&(on.goal=new j(\"true\",[])),on=new Pe(b.goal.replace(new j(\"catch\",[on.goal,y.args[1],y.args[2]])),b.substitution.apply(on.substitution),on.parent),on.exclude=y.args[0].variables(),on}).reverse();w.prepend(Or),w.prepend(gn),oe===null&&(this.current_limit=0,w.__calls.shift()(null))}};w.__calls.unshift($)},\"=/2\":function(w,b,y){var F=w.get_flag(\"occurs_check\").indicator===\"true/0\",z=new Pe,X=x.unify(y.args[0],y.args[1],F);X!==null&&(z.goal=b.goal.apply(X).replace(null),z.substitution=b.substitution.apply(X),z.parent=b,w.prepend([z]))},\"unify_with_occurs_check/2\":function(w,b,y){var F=new Pe,z=x.unify(y.args[0],y.args[1],!0);z!==null&&(F.goal=b.goal.apply(z).replace(null),F.substitution=b.substitution.apply(z),F.parent=b,w.prepend([F]))},\"\\\\=/2\":function(w,b,y){var F=w.get_flag(\"occurs_check\").indicator===\"true/0\",z=x.unify(y.args[0],y.args[1],F);z===null&&w.success(b)},\"subsumes_term/2\":function(w,b,y){var F=w.get_flag(\"occurs_check\").indicator===\"true/0\",z=x.unify(y.args[1],y.args[0],F);z!==null&&y.args[1].apply(z).equals(y.args[1])&&w.success(b)},\"findall/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(z))w.throw_error(x.error.type(\"callable\",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))w.throw_error(x.error.type(\"list\",X,y.indicator));else{var $=w.next_free_variable(),oe=new j(\",\",[z,new j(\"=\",[$,F])]),xe=w.points,Te=w.session.limit,lt=w.session.format_success;w.session.format_success=function(ir){return ir.substitution},w.add_goal(oe,!0,b);var Ct=[],qt=function(ir){if(ir!==!1&&ir!==null&&!x.type.is_error(ir))w.__calls.unshift(qt),Ct.push(ir.links[$.id]),w.session.limit=w.current_limit;else if(w.points=xe,w.session.limit=Te,w.session.format_success=lt,x.type.is_error(ir))w.throw_error(ir.args[0]);else if(w.current_limit>0){for(var Pt=new j(\"[]\"),gn=Ct.length-1;gn>=0;gn--)Pt=new j(\".\",[Ct[gn],Pt]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[X,Pt])),b.substitution,b)])}};w.__calls.unshift(qt)}},\"bagof/3\":function(w,b,y){var F,z=y.args[0],X=y.args[1],$=y.args[2];if(x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(X))w.throw_error(x.error.type(\"callable\",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))w.throw_error(x.error.type(\"list\",$,y.indicator));else{var oe=w.next_free_variable(),xe;X.indicator===\"^/2\"?(xe=X.args[0].variables(),X=X.args[1]):xe=[],xe=xe.concat(z.variables());for(var Te=X.variables().filter(function(Or){return e(xe,Or)===-1}),lt=new j(\"[]\"),Ct=Te.length-1;Ct>=0;Ct--)lt=new j(\".\",[new De(Te[Ct]),lt]);var qt=new j(\",\",[X,new j(\"=\",[oe,new j(\",\",[lt,z])])]),ir=w.points,Pt=w.session.limit,gn=w.session.format_success;w.session.format_success=function(Or){return Or.substitution},w.add_goal(qt,!0,b);var Pr=[],Ir=function(Or){if(Or!==!1&&Or!==null&&!x.type.is_error(Or)){w.__calls.unshift(Ir);var on=!1,ai=Or.links[oe.id].args[0],Io=Or.links[oe.id].args[1];for(var rs in Pr)if(Pr.hasOwnProperty(rs)){var $s=Pr[rs];if($s.variables.equals(ai)){$s.answers.push(Io),on=!0;break}}on||Pr.push({variables:ai,answers:[Io]}),w.session.limit=w.current_limit}else if(w.points=ir,w.session.limit=Pt,w.session.format_success=gn,x.type.is_error(Or))w.throw_error(Or.args[0]);else if(w.current_limit>0){for(var Co=[],ji=0;ji<Pr.length;ji++){Or=Pr[ji].answers;for(var eo=new j(\"[]\"),wo=Or.length-1;wo>=0;wo--)eo=new j(\".\",[Or[wo],eo]);Co.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[lt,Pr[ji].variables]),new j(\"=\",[$,eo])])),b.substitution,b))}w.prepend(Co)}};w.__calls.unshift(Ir)}},\"setof/3\":function(w,b,y){var F,z=y.args[0],X=y.args[1],$=y.args[2];if(x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(X))w.throw_error(x.error.type(\"callable\",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))w.throw_error(x.error.type(\"list\",$,y.indicator));else{var oe=w.next_free_variable(),xe;X.indicator===\"^/2\"?(xe=X.args[0].variables(),X=X.args[1]):xe=[],xe=xe.concat(z.variables());for(var Te=X.variables().filter(function(Or){return e(xe,Or)===-1}),lt=new j(\"[]\"),Ct=Te.length-1;Ct>=0;Ct--)lt=new j(\".\",[new De(Te[Ct]),lt]);var qt=new j(\",\",[X,new j(\"=\",[oe,new j(\",\",[lt,z])])]),ir=w.points,Pt=w.session.limit,gn=w.session.format_success;w.session.format_success=function(Or){return Or.substitution},w.add_goal(qt,!0,b);var Pr=[],Ir=function(Or){if(Or!==!1&&Or!==null&&!x.type.is_error(Or)){w.__calls.unshift(Ir);var on=!1,ai=Or.links[oe.id].args[0],Io=Or.links[oe.id].args[1];for(var rs in Pr)if(Pr.hasOwnProperty(rs)){var $s=Pr[rs];if($s.variables.equals(ai)){$s.answers.push(Io),on=!0;break}}on||Pr.push({variables:ai,answers:[Io]}),w.session.limit=w.current_limit}else if(w.points=ir,w.session.limit=Pt,w.session.format_success=gn,x.type.is_error(Or))w.throw_error(Or.args[0]);else if(w.current_limit>0){for(var Co=[],ji=0;ji<Pr.length;ji++){Or=Pr[ji].answers.sort(x.compare);for(var eo=new j(\"[]\"),wo=Or.length-1;wo>=0;wo--)eo=new j(\".\",[Or[wo],eo]);Co.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[lt,Pr[ji].variables]),new j(\"=\",[$,eo])])),b.substitution,b))}w.prepend(Co)}};w.__calls.unshift(Ir)}},\"functor/3\":function(w,b,y){var F,z=y.args[0],X=y.args[1],$=y.args[2];if(x.type.is_variable(z)&&(x.type.is_variable(X)||x.type.is_variable($)))w.throw_error(x.error.instantiation(\"functor/3\"));else if(!x.type.is_variable($)&&!x.type.is_integer($))w.throw_error(x.error.type(\"integer\",y.args[2],\"functor/3\"));else if(!x.type.is_variable(X)&&!x.type.is_atomic(X))w.throw_error(x.error.type(\"atomic\",y.args[1],\"functor/3\"));else if(x.type.is_integer(X)&&x.type.is_integer($)&&$.value!==0)w.throw_error(x.error.type(\"atom\",y.args[1],\"functor/3\"));else if(x.type.is_variable(z)){if(y.args[2].value>=0){for(var oe=[],xe=0;xe<$.value;xe++)oe.push(w.next_free_variable());var Te=x.type.is_integer(X)?X:new j(X.id,oe);w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,Te])),b.substitution,b)])}}else{var lt=x.type.is_integer(z)?z:new j(z.id,[]),Ct=x.type.is_integer(z)?new Re(0,!1):new Re(z.args.length,!1),qt=new j(\",\",[new j(\"=\",[lt,X]),new j(\"=\",[Ct,$])]);w.prepend([new Pe(b.goal.replace(qt),b.substitution,b)])}},\"arg/3\":function(w,b,y){if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))w.throw_error(x.error.instantiation(y.indicator));else if(y.args[0].value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",y.args[0],y.indicator));else if(!x.type.is_compound(y.args[1]))w.throw_error(x.error.type(\"compound\",y.args[1],y.indicator));else{var F=y.args[0].value;if(F>0&&F<=y.args[1].args.length){var z=new j(\"=\",[y.args[1].args[F-1],y.args[2]]);w.prepend([new Pe(b.goal.replace(z),b.substitution,b)])}}},\"=../2\":function(w,b,y){var F;if(x.type.is_variable(y.args[0])&&(x.type.is_variable(y.args[1])||x.type.is_non_empty_list(y.args[1])&&x.type.is_variable(y.args[1].args[0])))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_fully_list(y.args[1]))w.throw_error(x.error.type(\"list\",y.args[1],y.indicator));else if(x.type.is_variable(y.args[0])){if(!x.type.is_variable(y.args[1])){var X=[];for(F=y.args[1].args[1];F.indicator===\"./2\";)X.push(F.args[0]),F=F.args[1];x.type.is_variable(y.args[0])&&x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):X.length===0&&x.type.is_compound(y.args[1].args[0])?w.throw_error(x.error.type(\"atomic\",y.args[1].args[0],y.indicator)):X.length>0&&(x.type.is_compound(y.args[1].args[0])||x.type.is_number(y.args[1].args[0]))?w.throw_error(x.error.type(\"atom\",y.args[1].args[0],y.indicator)):X.length===0?w.prepend([new Pe(b.goal.replace(new j(\"=\",[y.args[1].args[0],y.args[0]],b)),b.substitution,b)]):w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j(y.args[1].args[0].id,X),y.args[0]])),b.substitution,b)])}}else{if(x.type.is_atomic(y.args[0]))F=new j(\".\",[y.args[0],new j(\"[]\")]);else{F=new j(\"[]\");for(var z=y.args[0].args.length-1;z>=0;z--)F=new j(\".\",[y.args[0].args[z],F]);F=new j(\".\",[new j(y.args[0].id),F])}w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,y.args[1]])),b.substitution,b)])}},\"copy_term/2\":function(w,b,y){var F=y.args[0].rename(w);w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,y.args[1]])),b.substitution,b.parent)])},\"term_variables/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(!x.type.is_fully_list(z))w.throw_error(x.error.type(\"list\",z,y.indicator));else{var X=g(s(ye(F.variables()),function($){return new De($)}));w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,X])),b.substitution,b)])}},\"clause/2\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_callable(y.args[1]))w.throw_error(x.error.type(\"callable\",y.args[1],y.indicator));else if(w.session.rules[y.args[0].indicator]!==void 0)if(w.is_public_predicate(y.args[0].indicator)){var F=[];for(var z in w.session.rules[y.args[0].indicator])if(w.session.rules[y.args[0].indicator].hasOwnProperty(z)){var X=w.session.rules[y.args[0].indicator][z];w.session.renamed_variables={},X=X.rename(w),X.body===null&&(X.body=new j(\"true\"));var $=new j(\",\",[new j(\"=\",[X.head,y.args[0]]),new j(\"=\",[X.body,y.args[1]])]);F.push(new Pe(b.goal.replace($),b.substitution,b))}w.prepend(F)}else w.throw_error(x.error.permission(\"access\",\"private_procedure\",y.args[0].indicator,y.indicator))},\"current_predicate/1\":function(w,b,y){var F=y.args[0];if(!x.type.is_variable(F)&&(!x.type.is_compound(F)||F.indicator!==\"//2\"))w.throw_error(x.error.type(\"predicate_indicator\",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[0])&&!x.type.is_atom(F.args[0]))w.throw_error(x.error.type(\"atom\",F.args[0],y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[1])&&!x.type.is_integer(F.args[1]))w.throw_error(x.error.type(\"integer\",F.args[1],y.indicator));else{var z=[];for(var X in w.session.rules)if(w.session.rules.hasOwnProperty(X)){var $=X.lastIndexOf(\"/\"),oe=X.substr(0,$),xe=parseInt(X.substr($+1,X.length-($+1))),Te=new j(\"/\",[new j(oe),new Re(xe,!1)]),lt=new j(\"=\",[Te,F]);z.push(new Pe(b.goal.replace(lt),b.substitution,b))}w.prepend(z)}},\"asserta/1\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===\":-/2\"?(F=y.args[0].args[0],z=Ce(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?w.throw_error(x.error.type(\"callable\",z,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator]=[new Ve(F,z,!0)].concat(w.session.rules[F.indicator]),w.success(b)):w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F.indicator,y.indicator)):w.throw_error(x.error.type(\"callable\",F,y.indicator))}},\"assertz/1\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===\":-/2\"?(F=y.args[0].args[0],z=Ce(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?w.throw_error(x.error.type(\"callable\",z,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator].push(new Ve(F,z,!0)),w.success(b)):w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F.indicator,y.indicator)):w.throw_error(x.error.type(\"callable\",F,y.indicator))}},\"retract/1\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type(\"callable\",y.args[0],y.indicator));else{var F,z;if(y.args[0].indicator===\":-/2\"?(F=y.args[0].args[0],z=y.args[0].args[1]):(F=y.args[0],z=new j(\"true\")),typeof b.retract>\"u\")if(w.is_public_predicate(F.indicator)){if(w.session.rules[F.indicator]!==void 0){for(var X=[],$=0;$<w.session.rules[F.indicator].length;$++){w.session.renamed_variables={};var oe=w.session.rules[F.indicator][$],xe=oe.rename(w);xe.body===null&&(xe.body=new j(\"true\",[]));var Te=w.get_flag(\"occurs_check\").indicator===\"true/0\",lt=x.unify(new j(\",\",[F,z]),new j(\",\",[xe.head,xe.body]),Te);if(lt!==null){var Ct=new Pe(b.goal.replace(new j(\",\",[new j(\"retract\",[new j(\":-\",[F,z])]),new j(\",\",[new j(\"=\",[F,xe.head]),new j(\"=\",[z,xe.body])])])),b.substitution,b);Ct.retract=oe,X.push(Ct)}}w.prepend(X)}}else w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F.indicator,y.indicator));else Ae(w,b,F.indicator,b.retract)}},\"retractall/1\":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_callable(F)?w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"retract\",[new x.type.Term(\":-\",[F,new De(\"_\")])]),new j(\"fail\",[])])),b.substitution,b),new Pe(b.goal.replace(null),b.substitution,b)]):w.throw_error(x.error.type(\"callable\",F,y.indicator))},\"abolish/1\":function(w,b,y){if(x.type.is_variable(y.args[0])||x.type.is_term(y.args[0])&&y.args[0].indicator===\"//2\"&&(x.type.is_variable(y.args[0].args[0])||x.type.is_variable(y.args[0].args[1])))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_term(y.args[0])||y.args[0].indicator!==\"//2\")w.throw_error(x.error.type(\"predicate_indicator\",y.args[0],y.indicator));else if(!x.type.is_atom(y.args[0].args[0]))w.throw_error(x.error.type(\"atom\",y.args[0].args[0],y.indicator));else if(!x.type.is_integer(y.args[0].args[1]))w.throw_error(x.error.type(\"integer\",y.args[0].args[1],y.indicator));else if(y.args[0].args[1].value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",y.args[0].args[1],y.indicator));else if(x.type.is_number(w.get_flag(\"max_arity\"))&&y.args[0].args[1].value>w.get_flag(\"max_arity\").value)w.throw_error(x.error.representation(\"max_arity\",y.indicator));else{var F=y.args[0].args[0].id+\"/\"+y.args[0].args[1].value;w.is_public_predicate(F)?(delete w.session.rules[F],w.success(b)):w.throw_error(x.error.permission(\"modify\",\"static_procedure\",F,y.indicator))}},\"atom_length/2\":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_atom(y.args[0]))w.throw_error(x.error.type(\"atom\",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_integer(y.args[1]))w.throw_error(x.error.type(\"integer\",y.args[1],y.indicator));else if(x.type.is_integer(y.args[1])&&y.args[1].value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",y.args[1],y.indicator));else{var F=new Re(y.args[0].id.length,!1);w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,y.args[1]])),b.substitution,b)])}},\"atom_concat/3\":function(w,b,y){var F,z,X=y.args[0],$=y.args[1],oe=y.args[2];if(x.type.is_variable(oe)&&(x.type.is_variable(X)||x.type.is_variable($)))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_atom(X))w.throw_error(x.error.type(\"atom\",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_atom($))w.throw_error(x.error.type(\"atom\",$,y.indicator));else if(!x.type.is_variable(oe)&&!x.type.is_atom(oe))w.throw_error(x.error.type(\"atom\",oe,y.indicator));else{var xe=x.type.is_variable(X),Te=x.type.is_variable($);if(!xe&&!Te)z=new j(\"=\",[oe,new j(X.id+$.id)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]);else if(xe&&!Te)F=oe.id.substr(0,oe.id.length-$.id.length),F+$.id===oe.id&&(z=new j(\"=\",[X,new j(F)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]));else if(Te&&!xe)F=oe.id.substr(X.id.length),X.id+F===oe.id&&(z=new j(\"=\",[$,new j(F)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]));else{for(var lt=[],Ct=0;Ct<=oe.id.length;Ct++){var qt=new j(oe.id.substr(0,Ct)),ir=new j(oe.id.substr(Ct));z=new j(\",\",[new j(\"=\",[qt,X]),new j(\"=\",[ir,$])]),lt.push(new Pe(b.goal.replace(z),b.substitution,b))}w.prepend(lt)}}},\"sub_atom/5\":function(w,b,y){var F,z=y.args[0],X=y.args[1],$=y.args[2],oe=y.args[3],xe=y.args[4];if(x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_integer(X))w.throw_error(x.error.type(\"integer\",X,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_integer($))w.throw_error(x.error.type(\"integer\",$,y.indicator));else if(!x.type.is_variable(oe)&&!x.type.is_integer(oe))w.throw_error(x.error.type(\"integer\",oe,y.indicator));else if(x.type.is_integer(X)&&X.value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",X,y.indicator));else if(x.type.is_integer($)&&$.value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",$,y.indicator));else if(x.type.is_integer(oe)&&oe.value<0)w.throw_error(x.error.domain(\"not_less_than_zero\",oe,y.indicator));else{var Te=[],lt=[],Ct=[];if(x.type.is_variable(X))for(F=0;F<=z.id.length;F++)Te.push(F);else Te.push(X.value);if(x.type.is_variable($))for(F=0;F<=z.id.length;F++)lt.push(F);else lt.push($.value);if(x.type.is_variable(oe))for(F=0;F<=z.id.length;F++)Ct.push(F);else Ct.push(oe.value);var qt=[];for(var ir in Te)if(Te.hasOwnProperty(ir)){F=Te[ir];for(var Pt in lt)if(lt.hasOwnProperty(Pt)){var gn=lt[Pt],Pr=z.id.length-F-gn;if(e(Ct,Pr)!==-1&&F+gn+Pr===z.id.length){var Ir=z.id.substr(F,gn);if(z.id===z.id.substr(0,F)+Ir+z.id.substr(F+gn,Pr)){var Or=new j(\"=\",[new j(Ir),xe]),on=new j(\"=\",[X,new Re(F)]),ai=new j(\"=\",[$,new Re(gn)]),Io=new j(\"=\",[oe,new Re(Pr)]),rs=new j(\",\",[new j(\",\",[new j(\",\",[on,ai]),Io]),Or]);qt.push(new Pe(b.goal.replace(rs),b.substitution,b))}}}}w.prepend(qt)}},\"atom_chars/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(x.type.is_variable(F)){for(var oe=z,xe=x.type.is_variable(F),Te=\"\";oe.indicator===\"./2\";){if(x.type.is_character(oe.args[0]))Te+=oe.args[0].id;else if(x.type.is_variable(oe.args[0])&&xe){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type(\"character\",oe.args[0],y.indicator));return}oe=oe.args[1]}x.type.is_variable(oe)&&xe?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)?w.throw_error(x.error.type(\"list\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j(Te),F])),b.substitution,b)])}else{for(var X=new j(\"[]\"),$=F.id.length-1;$>=0;$--)X=new j(\".\",[new j(F.id.charAt($)),X]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,X])),b.substitution,b)])}},\"atom_codes/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(x.type.is_variable(F)){for(var oe=z,xe=x.type.is_variable(F),Te=\"\";oe.indicator===\"./2\";){if(x.type.is_character_code(oe.args[0]))Te+=c(oe.args[0].value);else if(x.type.is_variable(oe.args[0])&&xe){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.representation(\"character_code\",y.indicator));return}oe=oe.args[1]}x.type.is_variable(oe)&&xe?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)?w.throw_error(x.error.type(\"list\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j(Te),F])),b.substitution,b)])}else{for(var X=new j(\"[]\"),$=F.id.length-1;$>=0;$--)X=new j(\".\",[new Re(n(F.id,$),!1),X]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,X])),b.substitution,b)])}},\"char_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_character(F))w.throw_error(x.error.type(\"character\",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",z,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character_code(z))w.throw_error(x.error.representation(\"character_code\",y.indicator));else if(x.type.is_variable(z)){var X=new Re(n(F.id,0),!1);w.prepend([new Pe(b.goal.replace(new j(\"=\",[X,z])),b.substitution,b)])}else{var $=new j(c(z.value));w.prepend([new Pe(b.goal.replace(new j(\"=\",[$,F])),b.substitution,b)])}},\"number_chars/2\":function(w,b,y){var F,z=y.args[0],X=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))w.throw_error(x.error.type(\"number\",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))w.throw_error(x.error.type(\"list\",X,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(X)){var oe=X,xe=!0;for(F=\"\";oe.indicator===\"./2\";){if(x.type.is_character(oe.args[0]))F+=oe.args[0].id;else if(x.type.is_variable(oe.args[0]))xe=!1;else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type(\"character\",oe.args[0],y.indicator));return}oe=oe.args[1]}if(xe=xe&&x.type.is_empty_list(oe),!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)){w.throw_error(x.error.type(\"list\",X,y.indicator));return}if(!xe&&$){w.throw_error(x.error.instantiation(y.indicator));return}else if(xe)if(x.type.is_variable(oe)&&$){w.throw_error(x.error.instantiation(y.indicator));return}else{var Te=w.parse(F),lt=Te.value;!x.type.is_number(lt)||Te.tokens[Te.tokens.length-1].space?w.throw_error(x.error.syntax_by_predicate(\"parseable_number\",y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,lt])),b.substitution,b)]);return}}if(!$){F=z.toString();for(var Ct=new j(\"[]\"),qt=F.length-1;qt>=0;qt--)Ct=new j(\".\",[new j(F.charAt(qt)),Ct]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[X,Ct])),b.substitution,b)])}}},\"number_codes/2\":function(w,b,y){var F,z=y.args[0],X=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))w.throw_error(x.error.type(\"number\",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_list(X))w.throw_error(x.error.type(\"list\",X,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(X)){var oe=X,xe=!0;for(F=\"\";oe.indicator===\"./2\";){if(x.type.is_character_code(oe.args[0]))F+=c(oe.args[0].value);else if(x.type.is_variable(oe.args[0]))xe=!1;else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type(\"character_code\",oe.args[0],y.indicator));return}oe=oe.args[1]}if(xe=xe&&x.type.is_empty_list(oe),!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)){w.throw_error(x.error.type(\"list\",X,y.indicator));return}if(!xe&&$){w.throw_error(x.error.instantiation(y.indicator));return}else if(xe)if(x.type.is_variable(oe)&&$){w.throw_error(x.error.instantiation(y.indicator));return}else{var Te=w.parse(F),lt=Te.value;!x.type.is_number(lt)||Te.tokens[Te.tokens.length-1].space?w.throw_error(x.error.syntax_by_predicate(\"parseable_number\",y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,lt])),b.substitution,b)]);return}}if(!$){F=z.toString();for(var Ct=new j(\"[]\"),qt=F.length-1;qt>=0;qt--)Ct=new j(\".\",[new Re(n(F,qt),!1),Ct]);w.prepend([new Pe(b.goal.replace(new j(\"=\",[X,Ct])),b.substitution,b)])}}},\"upcase_atom/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?w.throw_error(x.error.type(\"atom\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,new j(F.id.toUpperCase(),[])])),b.substitution,b)]):w.throw_error(x.error.type(\"atom\",F,y.indicator))},\"downcase_atom/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?w.throw_error(x.error.type(\"atom\",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,new j(F.id.toLowerCase(),[])])),b.substitution,b)]):w.throw_error(x.error.type(\"atom\",F,y.indicator))},\"atomic_list_concat/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"atomic_list_concat\",[F,new j(\"\",[]),z])),b.substitution,b)])},\"atomic_list_concat/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(z)||x.type.is_variable(F)&&x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_list(F))w.throw_error(x.error.type(\"list\",F,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_atom(X))w.throw_error(x.error.type(\"atom\",X,y.indicator));else if(x.type.is_variable(X)){for(var oe=\"\",xe=F;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(!x.type.is_atom(xe.args[0])&&!x.type.is_number(xe.args[0])){w.throw_error(x.error.type(\"atomic\",xe.args[0],y.indicator));return}oe!==\"\"&&(oe+=z.id),x.type.is_atom(xe.args[0])?oe+=xe.args[0].id:oe+=\"\"+xe.args[0].value,xe=xe.args[1]}oe=new j(oe,[]),x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_term(xe)||xe.indicator!==\"[]/0\"?w.throw_error(x.error.type(\"list\",F,y.indicator)):w.prepend([new Pe(b.goal.replace(new j(\"=\",[oe,X])),b.substitution,b)])}else{var $=g(s(X.id.split(z.id),function(Te){return new j(Te,[])}));w.prepend([new Pe(b.goal.replace(new j(\"=\",[$,F])),b.substitution,b)])}},\"@=</2\":function(w,b,y){x.compare(y.args[0],y.args[1])<=0&&w.success(b)},\"==/2\":function(w,b,y){x.compare(y.args[0],y.args[1])===0&&w.success(b)},\"\\\\==/2\":function(w,b,y){x.compare(y.args[0],y.args[1])!==0&&w.success(b)},\"@</2\":function(w,b,y){x.compare(y.args[0],y.args[1])<0&&w.success(b)},\"@>/2\":function(w,b,y){x.compare(y.args[0],y.args[1])>0&&w.success(b)},\"@>=/2\":function(w,b,y){x.compare(y.args[0],y.args[1])>=0&&w.success(b)},\"compare/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(x.type.is_atom(F)&&[\"<\",\">\",\"=\"].indexOf(F.id)===-1)w.throw_error(x.type.domain(\"order\",F,y.indicator));else{var $=x.compare(z,X);$=$===0?\"=\":$===-1?\"<\":\">\",w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,new j($,[])])),b.substitution,b)])}},\"is/2\":function(w,b,y){var F=y.args[1].interpret(w);x.type.is_number(F)?w.prepend([new Pe(b.goal.replace(new j(\"=\",[y.args[0],F],w.level)),b.substitution,b)]):w.throw_error(F)},\"between/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2];if(x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_integer(F))w.throw_error(x.error.type(\"integer\",F,y.indicator));else if(!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",z,y.indicator));else if(!x.type.is_variable(X)&&!x.type.is_integer(X))w.throw_error(x.error.type(\"integer\",X,y.indicator));else if(x.type.is_variable(X)){var $=[new Pe(b.goal.replace(new j(\"=\",[X,F])),b.substitution,b)];F.value<z.value&&$.push(new Pe(b.goal.replace(new j(\"between\",[new Re(F.value+1,!1),z,X])),b.substitution,b)),w.prepend($)}else F.value<=X.value&&z.value>=X.value&&w.success(b)},\"succ/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)&&x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_integer(F)?w.throw_error(x.error.type(\"integer\",F,y.indicator)):!x.type.is_variable(z)&&!x.type.is_integer(z)?w.throw_error(x.error.type(\"integer\",z,y.indicator)):!x.type.is_variable(F)&&F.value<0?w.throw_error(x.error.domain(\"not_less_than_zero\",F,y.indicator)):!x.type.is_variable(z)&&z.value<0?w.throw_error(x.error.domain(\"not_less_than_zero\",z,y.indicator)):(x.type.is_variable(z)||z.value>0)&&(x.type.is_variable(F)?w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,new Re(z.value-1,!1)])),b.substitution,b)]):w.prepend([new Pe(b.goal.replace(new j(\"=\",[z,new Re(F.value+1,!1)])),b.substitution,b)]))},\"=:=/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F===0&&w.success(b)},\"=\\\\=/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F!==0&&w.success(b)},\"</2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F<0&&w.success(b)},\"=</2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F<=0&&w.success(b)},\">/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F>0&&w.success(b)},\">=/2\":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F>=0&&w.success(b)},\"var/1\":function(w,b,y){x.type.is_variable(y.args[0])&&w.success(b)},\"atom/1\":function(w,b,y){x.type.is_atom(y.args[0])&&w.success(b)},\"atomic/1\":function(w,b,y){x.type.is_atomic(y.args[0])&&w.success(b)},\"compound/1\":function(w,b,y){x.type.is_compound(y.args[0])&&w.success(b)},\"integer/1\":function(w,b,y){x.type.is_integer(y.args[0])&&w.success(b)},\"float/1\":function(w,b,y){x.type.is_float(y.args[0])&&w.success(b)},\"number/1\":function(w,b,y){x.type.is_number(y.args[0])&&w.success(b)},\"nonvar/1\":function(w,b,y){x.type.is_variable(y.args[0])||w.success(b)},\"ground/1\":function(w,b,y){y.variables().length===0&&w.success(b)},\"acyclic_term/1\":function(w,b,y){for(var F=b.substitution.apply(b.substitution),z=y.args[0].variables(),X=0;X<z.length;X++)if(b.substitution.links[z[X]]!==void 0&&!b.substitution.links[z[X]].equals(F.links[z[X]]))return;w.success(b)},\"callable/1\":function(w,b,y){x.type.is_callable(y.args[0])&&w.success(b)},\"is_list/1\":function(w,b,y){for(var F=y.args[0];x.type.is_term(F)&&F.indicator===\"./2\";)F=F.args[1];x.type.is_term(F)&&F.indicator===\"[]/0\"&&w.success(b)},\"current_input/1\":function(w,b,y){var F=y.args[0];!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream\",F,y.indicator)):(x.type.is_atom(F)&&w.get_stream_by_alias(F.id)&&(F=w.get_stream_by_alias(F.id)),w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,w.get_current_input()])),b.substitution,b)]))},\"current_output/1\":function(w,b,y){var F=y.args[0];!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):(x.type.is_atom(F)&&w.get_stream_by_alias(F.id)&&(F=w.get_stream_by_alias(F.id)),w.prepend([new Pe(b.goal.replace(new j(\"=\",[F,w.get_current_output()])),b.substitution,b)]))},\"set_input/1\":function(w,b,y){var F=y.args[0],z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):x.type.is_stream(z)?z.output===!0?w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator)):(w.set_current_input(z),w.success(b)):w.throw_error(x.error.existence(\"stream\",F,y.indicator))},\"set_output/1\":function(w,b,y){var F=y.args[0],z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):x.type.is_stream(z)?z.input===!0?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):(w.set_current_output(z),w.success(b)):w.throw_error(x.error.existence(\"stream\",F,y.indicator))},\"open/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2];w.prepend([new Pe(b.goal.replace(new j(\"open\",[F,z,X,new j(\"[]\",[])])),b.substitution,b)])},\"open/4\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=y.args[3];if(x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_atom(z))w.throw_error(x.error.type(\"atom\",z,y.indicator));else if(!x.type.is_list($))w.throw_error(x.error.type(\"list\",$,y.indicator));else if(!x.type.is_variable(X))w.throw_error(x.error.type(\"variable\",X,y.indicator));else if(!x.type.is_atom(F)&&!x.type.is_streamable(F))w.throw_error(x.error.domain(\"source_sink\",F,y.indicator));else if(!x.type.is_io_mode(z))w.throw_error(x.error.domain(\"io_mode\",z,y.indicator));else{for(var oe={},xe=$,Te;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(Te=xe.args[0],x.type.is_variable(Te)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_stream_option(Te)){w.throw_error(x.error.domain(\"stream_option\",Te,y.indicator));return}oe[Te.id]=Te.args[0].id,xe=xe.args[1]}if(xe.indicator!==\"[]/0\"){x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",$,y.indicator));return}else{var lt=oe.alias;if(lt&&w.get_stream_by_alias(lt)){w.throw_error(x.error.permission(\"open\",\"source_sink\",new j(\"alias\",[new j(lt,[])]),y.indicator));return}oe.type||(oe.type=\"text\");var Ct;if(x.type.is_atom(F)?Ct=w.file_system_open(F.id,oe.type,z.id):Ct=F.stream(oe.type,z.id),Ct===!1){w.throw_error(x.error.permission(\"open\",\"source_sink\",F,y.indicator));return}else if(Ct===null){w.throw_error(x.error.existence(\"source_sink\",F,y.indicator));return}var qt=new Fe(Ct,z.id,oe.alias,oe.type,oe.reposition===\"true\",oe.eof_action);lt?w.session.streams[lt]=qt:w.session.streams[qt.id]=qt,w.prepend([new Pe(b.goal.replace(new j(\"=\",[X,qt])),b.substitution,b)])}}},\"close/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\"close\",[F,new j(\"[]\",[])])),b.substitution,b)])},\"close/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(z))w.throw_error(x.error.type(\"list\",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else{for(var $={},oe=z,xe;x.type.is_term(oe)&&oe.indicator===\"./2\";){if(xe=oe.args[0],x.type.is_variable(xe)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_close_option(xe)){w.throw_error(x.error.domain(\"close_option\",xe,y.indicator));return}$[xe.id]=xe.args[0].id===\"true\",oe=oe.args[1]}if(oe.indicator!==\"[]/0\"){x.type.is_variable(oe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",z,y.indicator));return}else{if(X===w.session.standard_input||X===w.session.standard_output){w.success(b);return}else X===w.session.current_input?w.session.current_input=w.session.standard_input:X===w.session.current_output&&(w.session.current_output=w.session.current_output);X.alias!==null?delete w.session.streams[X.alias]:delete w.session.streams[X.id],X.output&&X.stream.flush();var Te=X.stream.close();X.stream=null,($.force===!0||Te===!0)&&w.success(b)}}},\"flush_output/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"flush_output\",[new De(\"S\")])])),b.substitution,b)])},\"flush_output/1\":function(w,b,y){var F=y.args[0],z=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(z)||z.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):F.input===!0?w.throw_error(x.error.permission(\"output\",\"stream\",output,y.indicator)):(z.stream.flush(),w.success(b))},\"stream_property/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_variable(F)&&(!x.type.is_stream(X)||X.stream===null))w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_stream_property(z))w.throw_error(x.error.domain(\"stream_property\",z,y.indicator));else{var $=[],oe=[];if(!x.type.is_variable(F))$.push(X);else for(var xe in w.session.streams)$.push(w.session.streams[xe]);for(var Te=0;Te<$.length;Te++){var lt=[];$[Te].filename&&lt.push(new j(\"file_name\",[new j($[Te].file_name,[])])),lt.push(new j(\"mode\",[new j($[Te].mode,[])])),lt.push(new j($[Te].input?\"input\":\"output\",[])),$[Te].alias&&lt.push(new j(\"alias\",[new j($[Te].alias,[])])),lt.push(new j(\"position\",[typeof $[Te].position==\"number\"?new Re($[Te].position,!1):new j($[Te].position,[])])),lt.push(new j(\"end_of_stream\",[new j($[Te].position===\"end_of_stream\"?\"at\":$[Te].position===\"past_end_of_stream\"?\"past\":\"not\",[])])),lt.push(new j(\"eof_action\",[new j($[Te].eof_action,[])])),lt.push(new j(\"reposition\",[new j($[Te].reposition?\"true\":\"false\",[])])),lt.push(new j(\"type\",[new j($[Te].type,[])]));for(var Ct=0;Ct<lt.length;Ct++)oe.push(new Pe(b.goal.replace(new j(\",\",[new j(\"=\",[x.type.is_variable(F)?F:X,$[Te]]),new j(\"=\",[z,lt[Ct]])])),b.substitution,b))}w.prepend(oe)}},\"at_end_of_stream/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\",\",[new j(\"stream_property\",[new De(\"S\"),new j(\"end_of_stream\",[new De(\"E\")])]),new j(\",\",[new j(\"!\",[]),new j(\";\",[new j(\"=\",[new De(\"E\"),new j(\"at\",[])]),new j(\"=\",[new De(\"E\"),new j(\"past\",[])])])])])])),b.substitution,b)])},\"at_end_of_stream/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"stream_property\",[F,new j(\"end_of_stream\",[new De(\"E\")])]),new j(\",\",[new j(\"!\",[]),new j(\";\",[new j(\"=\",[new De(\"E\"),new j(\"at\",[])]),new j(\"=\",[new De(\"E\"),new j(\"past\",[])])])])])),b.substitution,b)])},\"set_stream_position/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):x.type.is_stream_position(z)?X.reposition===!1?w.throw_error(x.error.permission(\"reposition\",\"stream\",F,y.indicator)):(x.type.is_integer(z)?X.position=z.value:X.position=z.id,w.success(b)):w.throw_error(x.error.domain(\"stream_position\",z,y.indicator))},\"get_char/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"get_char\",[new De(\"S\"),F])])),b.substitution,b)])},\"get_char/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character(z))w.throw_error(x.error.type(\"in_character\",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=\"end_of_file\",X.position=\"past_end_of_stream\";else{if($=X.stream.get(1,X.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}X.position++}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j($,[]),z])),b.substitution,b)])}},\"get_code/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"get_code\",[new De(\"S\"),F])])),b.substitution,b)])},\"get_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",char,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=-1,X.position=\"past_end_of_stream\";else{if($=X.stream.get(1,X.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}$=n($,0),X.position++}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"peek_char/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"peek_char\",[new De(\"S\"),F])])),b.substitution,b)])},\"peek_char/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character(z))w.throw_error(x.error.type(\"in_character\",z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=\"end_of_file\",X.position=\"past_end_of_stream\";else if($=X.stream.get(1,X.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new j($,[]),z])),b.substitution,b)])}},\"peek_code/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"peek_code\",[new De(\"S\"),F])])),b.substitution,b)])},\"peek_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))w.throw_error(x.error.type(\"integer\",char,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=-1,X.position=\"past_end_of_stream\";else{if($=X.stream.get(1,X.position),$===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}$=n($,0)}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"put_char/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_char\",[new De(\"S\"),F])])),b.substitution,b)])},\"put_char/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_character(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):X.input?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):X.type===\"binary\"?w.throw_error(x.error.permission(\"output\",\"binary_stream\",F,y.indicator)):X.stream.put(z.id,X.position)&&(typeof X.position==\"number\"&&X.position++,w.success(b)):w.throw_error(x.error.type(\"character\",z,y.indicator))},\"put_code/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_code\",[new De(\"S\"),F])])),b.substitution,b)])},\"put_code/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(z)?x.type.is_character_code(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):X.input?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):X.type===\"binary\"?w.throw_error(x.error.permission(\"output\",\"binary_stream\",F,y.indicator)):X.stream.put_char(c(z.value),X.position)&&(typeof X.position==\"number\"&&X.position++,w.success(b)):w.throw_error(x.error.representation(\"character_code\",y.indicator)):w.throw_error(x.error.type(\"integer\",z,y.indicator))},\"nl/0\":function(w,b,y){w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_char\",[new De(\"S\"),new j(`\n`,[])])])),b.substitution,b)])},\"nl/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\"put_char\",[F,new j(`\n`,[])])),b.substitution,b)])},\"get_byte/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"get_byte\",[new De(\"S\"),F])])),b.substitution,b)])},\"get_byte/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))w.throw_error(x.error.type(\"in_byte\",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"text\")w.throw_error(x.error.permission(\"input\",\"text_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=\"end_of_file\",X.position=\"past_end_of_stream\";else{if($=X.stream.get_byte(X.position),$===null){w.throw_error(x.error.representation(\"byte\",y.indicator));return}X.position++}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"peek_byte/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"peek_byte\",[new De(\"S\"),F])])),b.substitution,b)])},\"peek_byte/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))w.throw_error(x.error.type(\"in_byte\",char,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if(X.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if(X.type===\"text\")w.throw_error(x.error.permission(\"input\",\"text_stream\",F,y.indicator));else if(X.position===\"past_end_of_stream\"&&X.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{var $;if(X.position===\"end_of_stream\")$=\"end_of_file\",X.position=\"past_end_of_stream\";else if($=X.stream.get_byte(X.position),$===null){w.throw_error(x.error.representation(\"byte\",y.indicator));return}w.prepend([new Pe(b.goal.replace(new j(\"=\",[new Re($,!1),z])),b.substitution,b)])}},\"put_byte/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"put_byte\",[new De(\"S\"),F])])),b.substitution,b)])},\"put_byte/2\":function(w,b,y){var F=y.args[0],z=y.args[1],X=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_byte(z)?!x.type.is_variable(F)&&!x.type.is_stream(F)&&!x.type.is_atom(F)?w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator)):!x.type.is_stream(X)||X.stream===null?w.throw_error(x.error.existence(\"stream\",F,y.indicator)):X.input?w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator)):X.type===\"text\"?w.throw_error(x.error.permission(\"output\",\"text_stream\",F,y.indicator)):X.stream.put_byte(z.value,X.position)&&(typeof X.position==\"number\"&&X.position++,w.success(b)):w.throw_error(x.error.type(\"byte\",z,y.indicator))},\"read/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"read_term\",[new De(\"S\"),F,new j(\"[]\",[])])])),b.substitution,b)])},\"read/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"read_term\",[F,z,new j(\"[]\",[])])),b.substitution,b)])},\"read_term/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_input\",[new De(\"S\")]),new j(\"read_term\",[new De(\"S\"),F,z])])),b.substitution,b)])},\"read_term/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(X))w.throw_error(x.error.type(\"list\",X,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream($)||$.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if($.output)w.throw_error(x.error.permission(\"input\",\"stream\",F,y.indicator));else if($.type===\"binary\")w.throw_error(x.error.permission(\"input\",\"binary_stream\",F,y.indicator));else if($.position===\"past_end_of_stream\"&&$.eof_action===\"error\")w.throw_error(x.error.permission(\"input\",\"past_end_of_stream\",F,y.indicator));else{for(var oe={},xe=X,Te;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(Te=xe.args[0],x.type.is_variable(Te)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_read_option(Te)){w.throw_error(x.error.domain(\"read_option\",Te,y.indicator));return}oe[Te.id]=Te.args[0],xe=xe.args[1]}if(xe.indicator!==\"[]/0\"){x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",X,y.indicator));return}else{for(var lt,Ct,qt,ir=\"\",Pt=[],gn=null;gn===null||gn.name!==\"atom\"||gn.value!==\".\"||qt.type===f&&x.flatten_error(new j(\"throw\",[qt.value])).found===\"token_not_found\";){if(lt=$.stream.get(1,$.position),lt===null){w.throw_error(x.error.representation(\"character\",y.indicator));return}if(lt===\"end_of_file\"||lt===\"past_end_of_file\"){qt?w.throw_error(x.error.syntax(Pt[qt.len-1],\". or expression expected\",!1)):w.throw_error(x.error.syntax(null,\"token not found\",!0));return}$.position++,ir+=lt,Ct=new U(w),Ct.new_text(ir),Pt=Ct.get_tokens(),gn=Pt!==null&&Pt.length>0?Pt[Pt.length-1]:null,Pt!==null&&(qt=W(w,Pt,0,w.__get_max_priority(),!1))}if(qt.type===p&&qt.len===Pt.length-1&&gn.value===\".\"){qt=qt.value.rename(w);var Pr=new j(\"=\",[z,qt]);if(oe.variables){var Ir=g(s(ye(qt.variables()),function(Or){return new De(Or)}));Pr=new j(\",\",[Pr,new j(\"=\",[oe.variables,Ir])])}if(oe.variable_names){var Ir=g(s(ye(qt.variables()),function(on){var ai;for(ai in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(ai)&&w.session.renamed_variables[ai]===on)break;return new j(\"=\",[new j(ai,[]),new De(on)])}));Pr=new j(\",\",[Pr,new j(\"=\",[oe.variable_names,Ir])])}if(oe.singletons){var Ir=g(s(new Ve(qt,null).singleton_variables(),function(on){var ai;for(ai in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(ai)&&w.session.renamed_variables[ai]===on)break;return new j(\"=\",[new j(ai,[]),new De(on)])}));Pr=new j(\",\",[Pr,new j(\"=\",[oe.singletons,Ir])])}w.prepend([new Pe(b.goal.replace(Pr),b.substitution,b)])}else qt.type===p?w.throw_error(x.error.syntax(Pt[qt.len],\"unexpected token\",!1)):w.throw_error(qt.value)}}},\"write/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"write\",[new De(\"S\"),F])])),b.substitution,b)])},\"write/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"write_term\",[F,z,new j(\".\",[new j(\"quoted\",[new j(\"false\",[])]),new j(\".\",[new j(\"ignore_ops\",[new j(\"false\")]),new j(\".\",[new j(\"numbervars\",[new j(\"true\")]),new j(\"[]\",[])])])])])),b.substitution,b)])},\"writeq/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"writeq\",[new De(\"S\"),F])])),b.substitution,b)])},\"writeq/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"write_term\",[F,z,new j(\".\",[new j(\"quoted\",[new j(\"true\",[])]),new j(\".\",[new j(\"ignore_ops\",[new j(\"false\")]),new j(\".\",[new j(\"numbervars\",[new j(\"true\")]),new j(\"[]\",[])])])])])),b.substitution,b)])},\"write_canonical/1\":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"write_canonical\",[new De(\"S\"),F])])),b.substitution,b)])},\"write_canonical/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\"write_term\",[F,z,new j(\".\",[new j(\"quoted\",[new j(\"true\",[])]),new j(\".\",[new j(\"ignore_ops\",[new j(\"true\")]),new j(\".\",[new j(\"numbervars\",[new j(\"false\")]),new j(\"[]\",[])])])])])),b.substitution,b)])},\"write_term/2\":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(\",\",[new j(\"current_output\",[new De(\"S\")]),new j(\"write_term\",[new De(\"S\"),F,z])])),b.substitution,b)])},\"write_term/3\":function(w,b,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(X))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(X))w.throw_error(x.error.type(\"list\",X,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain(\"stream_or_alias\",F,y.indicator));else if(!x.type.is_stream($)||$.stream===null)w.throw_error(x.error.existence(\"stream\",F,y.indicator));else if($.input)w.throw_error(x.error.permission(\"output\",\"stream\",F,y.indicator));else if($.type===\"binary\")w.throw_error(x.error.permission(\"output\",\"binary_stream\",F,y.indicator));else if($.position===\"past_end_of_stream\"&&$.eof_action===\"error\")w.throw_error(x.error.permission(\"output\",\"past_end_of_stream\",F,y.indicator));else{for(var oe={},xe=X,Te;x.type.is_term(xe)&&xe.indicator===\"./2\";){if(Te=xe.args[0],x.type.is_variable(Te)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_write_option(Te)){w.throw_error(x.error.domain(\"write_option\",Te,y.indicator));return}oe[Te.id]=Te.args[0].id===\"true\",xe=xe.args[1]}if(xe.indicator!==\"[]/0\"){x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type(\"list\",X,y.indicator));return}else{oe.session=w.session;var lt=z.toString(oe);$.stream.put(lt,$.position),typeof $.position==\"number\"&&($.position+=lt.length),w.success(b)}}},\"halt/0\":function(w,b,y){w.points=[]},\"halt/1\":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(F)?w.points=[]:w.throw_error(x.error.type(\"integer\",F,y.indicator))},\"current_prolog_flag/2\":function(w,b,y){var F=y.args[0],z=y.args[1];if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type(\"atom\",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_flag(F))w.throw_error(x.error.domain(\"prolog_flag\",F,y.indicator));else{var X=[];for(var $ in x.flag)if(x.flag.hasOwnProperty($)){var oe=new j(\",\",[new j(\"=\",[new j($),F]),new j(\"=\",[w.get_flag($),z])]);X.push(new Pe(b.goal.replace(oe),b.substitution,b))}w.prepend(X)}},\"set_prolog_flag/2\":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?x.type.is_flag(F)?x.type.is_value_flag(F,z)?x.type.is_modifiable_flag(F)?(w.session.flag[F.id]=z,w.success(b)):w.throw_error(x.error.permission(\"modify\",\"flag\",F)):w.throw_error(x.error.domain(\"flag_value\",new j(\"+\",[F,z]),y.indicator)):w.throw_error(x.error.domain(\"prolog_flag\",F,y.indicator)):w.throw_error(x.error.type(\"atom\",F,y.indicator))}},flag:{bounded:{allowed:[new j(\"true\"),new j(\"false\")],value:new j(\"true\"),changeable:!1},max_integer:{allowed:[new Re(Number.MAX_SAFE_INTEGER)],value:new Re(Number.MAX_SAFE_INTEGER),changeable:!1},min_integer:{allowed:[new Re(Number.MIN_SAFE_INTEGER)],value:new Re(Number.MIN_SAFE_INTEGER),changeable:!1},integer_rounding_function:{allowed:[new j(\"down\"),new j(\"toward_zero\")],value:new j(\"toward_zero\"),changeable:!1},char_conversion:{allowed:[new j(\"on\"),new j(\"off\")],value:new j(\"on\"),changeable:!0},debug:{allowed:[new j(\"on\"),new j(\"off\")],value:new j(\"off\"),changeable:!0},max_arity:{allowed:[new j(\"unbounded\")],value:new j(\"unbounded\"),changeable:!1},unknown:{allowed:[new j(\"error\"),new j(\"fail\"),new j(\"warning\")],value:new j(\"error\"),changeable:!0},double_quotes:{allowed:[new j(\"chars\"),new j(\"codes\"),new j(\"atom\")],value:new j(\"codes\"),changeable:!0},occurs_check:{allowed:[new j(\"false\"),new j(\"true\")],value:new j(\"false\"),changeable:!0},dialect:{allowed:[new j(\"tau\")],value:new j(\"tau\"),changeable:!1},version_data:{allowed:[new j(\"tau\",[new Re(t.major,!1),new Re(t.minor,!1),new Re(t.patch,!1),new j(t.status)])],value:new j(\"tau\",[new Re(t.major,!1),new Re(t.minor,!1),new Re(t.patch,!1),new j(t.status)]),changeable:!1},nodejs:{allowed:[new j(\"yes\"),new j(\"no\")],value:new j(typeof ec<\"u\"&&ec.exports?\"yes\":\"no\"),changeable:!1}},unify:function(w,b,y){y=y===void 0?!1:y;for(var F=[{left:w,right:b}],z={};F.length!==0;){var X=F.pop();if(w=X.left,b=X.right,x.type.is_term(w)&&x.type.is_term(b)){if(w.indicator!==b.indicator)return null;for(var $=0;$<w.args.length;$++)F.push({left:w.args[$],right:b.args[$]})}else if(x.type.is_number(w)&&x.type.is_number(b)){if(w.value!==b.value||w.is_float!==b.is_float)return null}else if(x.type.is_variable(w)){if(x.type.is_variable(b)&&w.id===b.id)continue;if(y===!0&&b.variables().indexOf(w.id)!==-1)return null;if(w.id!==\"_\"){var oe=new Ne;oe.add(w.id,b);for(var $=0;$<F.length;$++)F[$].left=F[$].left.apply(oe),F[$].right=F[$].right.apply(oe);for(var $ in z)z[$]=z[$].apply(oe);z[w.id]=b}}else if(x.type.is_variable(b))F.push({left:b,right:w});else if(w.unify!==void 0){if(!w.unify(b))return null}else return null}return new Ne(z)},compare:function(w,b){var y=x.type.compare(w,b);return y!==0?y:w.compare(b)},arithmetic_compare:function(w,b,y){var F=b.interpret(w);if(x.type.is_number(F)){var z=y.interpret(w);return x.type.is_number(z)?F.value<z.value?-1:F.value>z.value?1:0:z}else return F},operate:function(w,b){if(x.type.is_operator(b)){for(var y=x.type.is_operator(b),F=[],z,X=!1,$=0;$<b.args.length;$++){if(z=b.args[$].interpret(w),x.type.is_number(z)){if(y.type_args!==null&&z.is_float!==y.type_args)return x.error.type(y.type_args?\"float\":\"integer\",z,w.__call_indicator);F.push(z.value)}else return z;X=X||z.is_float}return F.push(w),z=x.arithmetic.evaluation[b.indicator].fn.apply(this,F),X=y.type_result===null?X:y.type_result,x.type.is_term(z)?z:z===Number.POSITIVE_INFINITY||z===Number.NEGATIVE_INFINITY?x.error.evaluation(\"overflow\",w.__call_indicator):X===!1&&w.get_flag(\"bounded\").id===\"true\"&&(z>w.get_flag(\"max_integer\").value||z<w.get_flag(\"min_integer\").value)?x.error.evaluation(\"int_overflow\",w.__call_indicator):new Re(z,X)}else return x.error.type(\"evaluable\",b.indicator,w.__call_indicator)},error:{existence:function(w,b,y){return typeof b==\"string\"&&(b=Z(b)),new j(\"error\",[new j(\"existence_error\",[new j(w),b]),Z(y)])},type:function(w,b,y){return new j(\"error\",[new j(\"type_error\",[new j(w),b]),Z(y)])},instantiation:function(w){return new j(\"error\",[new j(\"instantiation_error\"),Z(w)])},domain:function(w,b,y){return new j(\"error\",[new j(\"domain_error\",[new j(w),b]),Z(y)])},representation:function(w,b){return new j(\"error\",[new j(\"representation_error\",[new j(w)]),Z(b)])},permission:function(w,b,y,F){return new j(\"error\",[new j(\"permission_error\",[new j(w),new j(b),y]),Z(F)])},evaluation:function(w,b){return new j(\"error\",[new j(\"evaluation_error\",[new j(w)]),Z(b)])},syntax:function(w,b,y){w=w||{value:\"\",line:0,column:0,matches:[\"\"],start:0};var F=y&&w.matches.length>0?w.start+w.matches[0].length:w.start,z=y?new j(\"token_not_found\"):new j(\"found\",[new j(w.value.toString())]),X=new j(\".\",[new j(\"line\",[new Re(w.line+1)]),new j(\".\",[new j(\"column\",[new Re(F+1)]),new j(\".\",[z,new j(\"[]\",[])])])]);return new j(\"error\",[new j(\"syntax_error\",[new j(b)]),X])},syntax_by_predicate:function(w,b){return new j(\"error\",[new j(\"syntax_error\",[new j(w)]),Z(b)])}},warning:{singleton:function(w,b,y){for(var F=new j(\"[]\"),z=w.length-1;z>=0;z--)F=new j(\".\",[new De(w[z]),F]);return new j(\"warning\",[new j(\"singleton_variables\",[F,Z(b)]),new j(\".\",[new j(\"line\",[new Re(y,!1)]),new j(\"[]\")])])},failed_goal:function(w,b){return new j(\"warning\",[new j(\"failed_goal\",[w]),new j(\".\",[new j(\"line\",[new Re(b,!1)]),new j(\"[]\")])])}},format_variable:function(w){return\"_\"+w},format_answer:function(w,b,F){b instanceof ke&&(b=b.thread);var F=F||{};if(F.session=b?b.session:void 0,x.type.is_error(w))return\"uncaught exception: \"+w.args[0].toString();if(w===!1)return\"false.\";if(w===null)return\"limit exceeded ;\";var z=0,X=\"\";if(x.type.is_substitution(w)){var $=w.domain(!0);w=w.filter(function(Te,lt){return!x.type.is_variable(lt)||$.indexOf(lt.id)!==-1&&Te!==lt.id})}for(var oe in w.links)w.links.hasOwnProperty(oe)&&(z++,X!==\"\"&&(X+=\", \"),X+=oe.toString(F)+\" = \"+w.links[oe].toString(F));var xe=typeof b>\"u\"||b.points.length>0?\" ;\":\".\";return z===0?\"true\"+xe:X+xe},flatten_error:function(w){if(!x.type.is_error(w))return null;w=w.args[0];var b={};return b.type=w.args[0].id,b.thrown=b.type===\"syntax_error\"?null:w.args[1].id,b.expected=null,b.found=null,b.representation=null,b.existence=null,b.existence_type=null,b.line=null,b.column=null,b.permission_operation=null,b.permission_type=null,b.evaluation_type=null,b.type===\"type_error\"||b.type===\"domain_error\"?(b.expected=w.args[0].args[0].id,b.found=w.args[0].args[1].toString()):b.type===\"syntax_error\"?w.args[1].indicator===\"./2\"?(b.expected=w.args[0].args[0].id,b.found=w.args[1].args[1].args[1].args[0],b.found=b.found.id===\"token_not_found\"?b.found.id:b.found.args[0].id,b.line=w.args[1].args[0].args[0].value,b.column=w.args[1].args[1].args[0].args[0].value):b.thrown=w.args[1].id:b.type===\"permission_error\"?(b.found=w.args[0].args[2].toString(),b.permission_operation=w.args[0].args[0].id,b.permission_type=w.args[0].args[1].id):b.type===\"evaluation_error\"?b.evaluation_type=w.args[0].args[0].id:b.type===\"representation_error\"?b.representation=w.args[0].args[0].id:b.type===\"existence_error\"&&(b.existence=w.args[0].args[1].toString(),b.existence_type=w.args[0].args[0].id),b},create:function(w){return new x.type.Session(w)}};typeof ec<\"u\"?ec.exports=x:window.pl=x})()});function EEe(t,e,r){t.prepend(r.map(s=>new hl.default.type.State(e.goal.replace(s),e.substitution,e)))}function Lq(t){let e=CEe.get(t.session);if(e==null)throw new Error(\"Assertion failed: A project should have been registered for the active session\");return e}function wEe(t,e){CEe.set(t,e),t.consult(`:- use_module(library(${Zct.id})).`)}var hl,IEe,J0,zct,Xct,CEe,Zct,BEe=Xe(()=>{Ge();ql();hl=ut(Oq()),IEe=ut(Ie(\"vm\")),{is_atom:J0,is_variable:zct,is_instantiated_list:Xct}=hl.default.type;CEe=new WeakMap;Zct=new hl.default.type.Module(\"constraints\",{\"project_workspaces_by_descriptor/3\":(t,e,r)=>{let[s,a,n]=r.args;if(!J0(s)||!J0(a)){t.throw_error(hl.default.error.instantiation(r.indicator));return}let c=G.parseIdent(s.id),f=G.makeDescriptor(c,a.id),h=Lq(t).tryWorkspaceByDescriptor(f);zct(n)&&h!==null&&EEe(t,e,[new hl.default.type.Term(\"=\",[n,new hl.default.type.Term(String(h.relativeCwd))])]),J0(n)&&h!==null&&h.relativeCwd===n.id&&t.success(e)},\"workspace_field/3\":(t,e,r)=>{let[s,a,n]=r.args;if(!J0(s)||!J0(a)){t.throw_error(hl.default.error.instantiation(r.indicator));return}let f=Lq(t).tryWorkspaceByCwd(s.id);if(f==null)return;let p=va(f.manifest.raw,a.id);typeof p>\"u\"||EEe(t,e,[new hl.default.type.Term(\"=\",[n,new hl.default.type.Term(typeof p==\"object\"?JSON.stringify(p):p)])])},\"workspace_field_test/3\":(t,e,r)=>{let[s,a,n]=r.args;t.prepend([new hl.default.type.State(e.goal.replace(new hl.default.type.Term(\"workspace_field_test\",[s,a,n,new hl.default.type.Term(\"[]\",[])])),e.substitution,e)])},\"workspace_field_test/4\":(t,e,r)=>{let[s,a,n,c]=r.args;if(!J0(s)||!J0(a)||!J0(n)||!Xct(c)){t.throw_error(hl.default.error.instantiation(r.indicator));return}let p=Lq(t).tryWorkspaceByCwd(s.id);if(p==null)return;let h=va(p.manifest.raw,a.id);if(typeof h>\"u\")return;let E={$$:h};for(let[S,P]of c.toJavaScript().entries())E[`$${S}`]=P;IEe.default.runInNewContext(n.id,E)&&t.success(e)}},[\"project_workspaces_by_descriptor/3\",\"workspace_field/3\",\"workspace_field_test/3\",\"workspace_field_test/4\"])});var aS={};Vt(aS,{Constraints:()=>Uq,DependencyType:()=>bEe});function go(t){if(t instanceof KC.default.type.Num)return t.value;if(t instanceof KC.default.type.Term)switch(t.indicator){case\"throw/1\":return go(t.args[0]);case\"error/1\":return go(t.args[0]);case\"error/2\":if(t.args[0]instanceof KC.default.type.Term&&t.args[0].indicator===\"syntax_error/1\")return Object.assign(go(t.args[0]),...go(t.args[1]));{let e=go(t.args[0]);return e.message+=` (in ${go(t.args[1])})`,e}case\"syntax_error/1\":return new jt(43,`Syntax error: ${go(t.args[0])}`);case\"existence_error/2\":return new jt(44,`Existence error: ${go(t.args[0])} ${go(t.args[1])} not found`);case\"instantiation_error/0\":return new jt(75,\"Instantiation error: an argument is variable when an instantiated argument was expected\");case\"line/1\":return{line:go(t.args[0])};case\"column/1\":return{column:go(t.args[0])};case\"found/1\":return{found:go(t.args[0])};case\"./2\":return[go(t.args[0])].concat(go(t.args[1]));case\"//2\":return`${go(t.args[0])}/${go(t.args[1])}`;default:return t.id}throw`couldn't pretty print because of unsupported node ${t}`}function SEe(t){let e;try{e=go(t)}catch(r){throw typeof r==\"string\"?new jt(42,`Unknown error: ${t} (note: ${r})`):r}return typeof e.line<\"u\"&&typeof e.column<\"u\"&&(e.message+=` at line ${e.line}, column ${e.column}`),e}function Pm(t){return t.id===\"null\"?null:`${t.toJavaScript()}`}function $ct(t){if(t.id===\"null\")return null;{let e=t.toJavaScript();if(typeof e!=\"string\")return JSON.stringify(e);try{return JSON.stringify(JSON.parse(e))}catch{return JSON.stringify(e)}}}function K0(t){return typeof t==\"string\"?`'${t}'`:\"[]\"}var DEe,KC,bEe,vEe,Mq,Uq,lS=Xe(()=>{Ge();Ge();Dt();DEe=ut(nEe()),KC=ut(Oq());iS();BEe();(0,DEe.default)(KC.default);bEe=(s=>(s.Dependencies=\"dependencies\",s.DevDependencies=\"devDependencies\",s.PeerDependencies=\"peerDependencies\",s))(bEe||{}),vEe=[\"dependencies\",\"devDependencies\",\"peerDependencies\"];Mq=class{constructor(e,r){let s=1e3*e.workspaces.length;this.session=KC.default.create(s),wEe(this.session,e),this.session.consult(\":- use_module(library(lists)).\"),this.session.consult(r)}fetchNextAnswer(){return new Promise(e=>{this.session.answer(r=>{e(r)})})}async*makeQuery(e){let r=this.session.query(e);if(r!==!0)throw SEe(r);for(;;){let s=await this.fetchNextAnswer();if(s===null)throw new jt(79,\"Resolution limit exceeded\");if(!s)break;if(s.id===\"throw\")throw SEe(s);yield s}}};Uq=class t{constructor(e){this.source=\"\";this.project=e;let r=e.configuration.get(\"constraintsPath\");ce.existsSync(r)&&(this.source=ce.readFileSync(r,\"utf8\"))}static async find(e){return new t(e)}getProjectDatabase(){let e=\"\";for(let r of vEe)e+=`dependency_type(${r}).\n`;for(let r of this.project.workspacesByCwd.values()){let s=r.relativeCwd;e+=`workspace(${K0(s)}).\n`,e+=`workspace_ident(${K0(s)}, ${K0(G.stringifyIdent(r.anchoredLocator))}).\n`,e+=`workspace_version(${K0(s)}, ${K0(r.manifest.version)}).\n`;for(let a of vEe)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${K0(s)}, ${K0(G.stringifyIdent(n))}, ${K0(n.range)}, ${a}).\n`}return e+=`workspace(_) :- false.\n`,e+=`workspace_ident(_, _) :- false.\n`,e+=`workspace_version(_, _) :- false.\n`,e+=`workspace_has_dependency(_, _, _, _) :- false.\n`,e}getDeclarations(){let e=\"\";return e+=`gen_enforced_dependency(_, _, _, _) :- false.\n`,e+=`gen_enforced_field(_, _, _) :- false.\n`,e}get fullSource(){return`${this.getProjectDatabase()}\n${this.source}\n${this.getDeclarations()}`}createSession(){return new Mq(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),s=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:c,dependencyType:f}of e){let p=nS([f,G.stringifyIdent(n)]),h=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(h,p).set(c??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:c}of r){let f=nS(n),p=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(p,f).set(JSON.parse(c)??void 0,new Set)}return{manifestUpdates:s,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let s of e.makeQuery(\"workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).\")){let a=J.resolve(this.project.cwd,Pm(s.links.WorkspaceCwd)),n=Pm(s.links.DependencyIdent),c=Pm(s.links.DependencyRange),f=Pm(s.links.DependencyType);if(a===null||n===null)throw new Error(\"Invalid rule\");let p=this.project.getWorkspaceByCwd(a),h=G.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:c,dependencyType:f})}return je.sortMap(r,[({dependencyRange:s})=>s!==null?\"0\":\"1\",({workspace:s})=>G.stringifyIdent(s.anchoredLocator),({dependencyIdent:s})=>G.stringifyIdent(s)])}async genEnforcedFields(e){let r=[];for await(let s of e.makeQuery(\"workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).\")){let a=J.resolve(this.project.cwd,Pm(s.links.WorkspaceCwd)),n=Pm(s.links.FieldPath),c=$ct(s.links.FieldValue);if(a===null||n===null)throw new Error(\"Invalid rule\");let f=this.project.getWorkspaceByCwd(a);r.push({workspace:f,fieldPath:n,fieldValue:c})}return je.sortMap(r,[({workspace:s})=>G.stringifyIdent(s.anchoredLocator),({fieldPath:s})=>s])}async*query(e){let r=this.createSession();for await(let s of r.makeQuery(e)){let a={};for(let[n,c]of Object.entries(s.links))n!==\"_\"&&(a[n]=Pm(c));yield a}}}});var OEe=_(fF=>{\"use strict\";Object.defineProperty(fF,\"__esModule\",{value:!0});function BS(t){let e=[...t.caches],r=e.shift();return r===void 0?NEe():{get(s,a,n={miss:()=>Promise.resolve()}){return r.get(s,a,n).catch(()=>BS({caches:e}).get(s,a,n))},set(s,a){return r.set(s,a).catch(()=>BS({caches:e}).set(s,a))},delete(s){return r.delete(s).catch(()=>BS({caches:e}).delete(s))},clear(){return r.clear().catch(()=>BS({caches:e}).clear())}}}function NEe(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}fF.createFallbackableCache=BS;fF.createNullCache=NEe});var MEe=_((BJt,LEe)=>{LEe.exports=OEe()});var UEe=_($q=>{\"use strict\";Object.defineProperty($q,\"__esModule\",{value:!0});function yut(t={serializable:!0}){let e={};return{get(r,s,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let c=s(),f=a&&a.miss||(()=>Promise.resolve());return c.then(p=>f(p)).then(()=>c)},set(r,s){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}$q.createInMemoryCache=yut});var HEe=_((SJt,_Ee)=>{_Ee.exports=UEe()});var GEe=_($u=>{\"use strict\";Object.defineProperty($u,\"__esModule\",{value:!0});function Eut(t,e,r){let s={\"x-algolia-api-key\":r,\"x-algolia-application-id\":e};return{headers(){return t===e9.WithinHeaders?s:{}},queryParameters(){return t===e9.WithinQueryParameters?s:{}}}}function Iut(t){let e=0,r=()=>(e++,new Promise(s=>{setTimeout(()=>{s(t(r))},Math.min(100*e,1e3))}));return t(r)}function jEe(t,e=(r,s)=>Promise.resolve()){return Object.assign(t,{wait(r){return jEe(t.then(s=>Promise.all([e(s,r),s])).then(s=>s[1]))}})}function Cut(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[r],t[r]=s}return t}function wut(t,e){return e&&Object.keys(e).forEach(r=>{t[r]=e[r](t)}),t}function But(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var vut=\"4.22.1\",Sut=t=>()=>t.transporter.requester.destroy(),e9={WithinQueryParameters:0,WithinHeaders:1};$u.AuthMode=e9;$u.addMethods=wut;$u.createAuth=Eut;$u.createRetryablePromise=Iut;$u.createWaitablePromise=jEe;$u.destroy=Sut;$u.encode=But;$u.shuffle=Cut;$u.version=vut});var vS=_((bJt,qEe)=>{qEe.exports=GEe()});var WEe=_(t9=>{\"use strict\";Object.defineProperty(t9,\"__esModule\",{value:!0});var Dut={Delete:\"DELETE\",Get:\"GET\",Post:\"POST\",Put:\"PUT\"};t9.MethodEnum=Dut});var SS=_((xJt,YEe)=>{YEe.exports=WEe()});var aIe=_(Yi=>{\"use strict\";Object.defineProperty(Yi,\"__esModule\",{value:!0});var JEe=SS();function r9(t,e){let r=t||{},s=r.data||{};return Object.keys(r).forEach(a=>{[\"timeout\",\"headers\",\"queryParameters\",\"data\",\"cacheable\"].indexOf(a)===-1&&(s[a]=r[a])}),{data:Object.entries(s).length>0?s:void 0,timeout:r.timeout||e,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var DS={Read:1,Write:2,Any:3},sw={Up:1,Down:2,Timeouted:3},KEe=2*60*1e3;function i9(t,e=sw.Up){return{...t,status:e,lastUpdate:Date.now()}}function zEe(t){return t.status===sw.Up||Date.now()-t.lastUpdate>KEe}function XEe(t){return t.status===sw.Timeouted&&Date.now()-t.lastUpdate<=KEe}function s9(t){return typeof t==\"string\"?{protocol:\"https\",url:t,accept:DS.Any}:{protocol:t.protocol||\"https\",url:t.url,accept:t.accept||DS.Any}}function but(t,e){return Promise.all(e.map(r=>t.get(r,()=>Promise.resolve(i9(r))))).then(r=>{let s=r.filter(f=>zEe(f)),a=r.filter(f=>XEe(f)),n=[...s,...a],c=n.length>0?n.map(f=>s9(f)):e;return{getTimeout(f,p){return(a.length===0&&f===0?1:a.length+3+f)*p},statelessHosts:c}})}var Put=({isTimedOut:t,status:e})=>!t&&~~e===0,xut=t=>{let e=t.status;return t.isTimedOut||Put(t)||~~(e/100)!==2&&~~(e/100)!==4},kut=({status:t})=>~~(t/100)===2,Qut=(t,e)=>xut(t)?e.onRetry(t):kut(t)?e.onSuccess(t):e.onFail(t);function VEe(t,e,r,s){let a=[],n=rIe(r,s),c=nIe(t,s),f=r.method,p=r.method!==JEe.MethodEnum.Get?{}:{...r.data,...s.data},h={\"x-algolia-agent\":t.userAgent.value,...t.queryParameters,...p,...s.queryParameters},E=0,C=(S,P)=>{let I=S.pop();if(I===void 0)throw oIe(n9(a));let R={data:n,headers:c,method:f,url:eIe(I,r.path,h),connectTimeout:P(E,t.timeouts.connect),responseTimeout:P(E,s.timeout)},N=W=>{let ee={request:R,response:W,host:I,triesLeft:S.length};return a.push(ee),ee},U={onSuccess:W=>ZEe(W),onRetry(W){let ee=N(W);return W.isTimedOut&&E++,Promise.all([t.logger.info(\"Retryable failure\",o9(ee)),t.hostsCache.set(I,i9(I,W.isTimedOut?sw.Timeouted:sw.Down))]).then(()=>C(S,P))},onFail(W){throw N(W),$Ee(W,n9(a))}};return t.requester.send(R).then(W=>Qut(W,U))};return but(t.hostsCache,e).then(S=>C([...S.statelessHosts].reverse(),S.getTimeout))}function Tut(t){let{hostsCache:e,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:c,userAgent:f,hosts:p,queryParameters:h,headers:E}=t,C={hostsCache:e,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:c,userAgent:f,headers:E,queryParameters:h,hosts:p.map(S=>s9(S)),read(S,P){let I=r9(P,C.timeouts.read),R=()=>VEe(C,C.hosts.filter(W=>(W.accept&DS.Read)!==0),S,I);if((I.cacheable!==void 0?I.cacheable:S.cacheable)!==!0)return R();let U={request:S,mappedRequestOptions:I,transporter:{queryParameters:C.queryParameters,headers:C.headers}};return C.responsesCache.get(U,()=>C.requestsCache.get(U,()=>C.requestsCache.set(U,R()).then(W=>Promise.all([C.requestsCache.delete(U),W]),W=>Promise.all([C.requestsCache.delete(U),Promise.reject(W)])).then(([W,ee])=>ee)),{miss:W=>C.responsesCache.set(U,W)})},write(S,P){return VEe(C,C.hosts.filter(I=>(I.accept&DS.Write)!==0),S,r9(P,C.timeouts.write))}};return C}function Rut(t){let e={value:`Algolia for JavaScript (${t})`,add(r){let s=`; ${r.segment}${r.version!==void 0?` (${r.version})`:\"\"}`;return e.value.indexOf(s)===-1&&(e.value=`${e.value}${s}`),e}};return e}function ZEe(t){try{return JSON.parse(t.content)}catch(e){throw sIe(e.message,t)}}function $Ee({content:t,status:e},r){let s=t;try{s=JSON.parse(t).message}catch{}return iIe(s,e,r)}function Fut(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}function eIe(t,e,r){let s=tIe(r),a=`${t.protocol}://${t.url}/${e.charAt(0)===\"/\"?e.substr(1):e}`;return s.length&&(a+=`?${s}`),a}function tIe(t){let e=r=>Object.prototype.toString.call(r)===\"[object Object]\"||Object.prototype.toString.call(r)===\"[object Array]\";return Object.keys(t).map(r=>Fut(\"%s=%s\",r,e(t[r])?JSON.stringify(t[r]):t[r])).join(\"&\")}function rIe(t,e){if(t.method===JEe.MethodEnum.Get||t.data===void 0&&e.data===void 0)return;let r=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(r)}function nIe(t,e){let r={...t.headers,...e.headers},s={};return Object.keys(r).forEach(a=>{let n=r[a];s[a.toLowerCase()]=n}),s}function n9(t){return t.map(e=>o9(e))}function o9(t){let e=t.request.headers[\"x-algolia-api-key\"]?{\"x-algolia-api-key\":\"*****\"}:{};return{...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function iIe(t,e,r){return{name:\"ApiError\",message:t,status:e,transporterStackTrace:r}}function sIe(t,e){return{name:\"DeserializationError\",message:t,response:e}}function oIe(t){return{name:\"RetryError\",message:\"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.\",transporterStackTrace:t}}Yi.CallEnum=DS;Yi.HostStatusEnum=sw;Yi.createApiError=iIe;Yi.createDeserializationError=sIe;Yi.createMappedRequestOptions=r9;Yi.createRetryError=oIe;Yi.createStatefulHost=i9;Yi.createStatelessHost=s9;Yi.createTransporter=Tut;Yi.createUserAgent=Rut;Yi.deserializeFailure=$Ee;Yi.deserializeSuccess=ZEe;Yi.isStatefulHostTimeouted=XEe;Yi.isStatefulHostUp=zEe;Yi.serializeData=rIe;Yi.serializeHeaders=nIe;Yi.serializeQueryParameters=tIe;Yi.serializeUrl=eIe;Yi.stackFrameWithoutCredentials=o9;Yi.stackTraceWithoutCredentials=n9});var bS=_((QJt,lIe)=>{lIe.exports=aIe()});var cIe=_(X0=>{\"use strict\";Object.defineProperty(X0,\"__esModule\",{value:!0});var ow=vS(),Nut=bS(),PS=SS(),Out=t=>{let e=t.region||\"us\",r=ow.createAuth(ow.AuthMode.WithinHeaders,t.appId,t.apiKey),s=Nut.createTransporter({hosts:[{url:`analytics.${e}.algolia.com`}],...t,headers:{...r.headers(),\"content-type\":\"application/json\",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a=t.appId;return ow.addMethods({appId:a,transporter:s},t.methods)},Lut=t=>(e,r)=>t.transporter.write({method:PS.MethodEnum.Post,path:\"2/abtests\",data:e},r),Mut=t=>(e,r)=>t.transporter.write({method:PS.MethodEnum.Delete,path:ow.encode(\"2/abtests/%s\",e)},r),Uut=t=>(e,r)=>t.transporter.read({method:PS.MethodEnum.Get,path:ow.encode(\"2/abtests/%s\",e)},r),_ut=t=>e=>t.transporter.read({method:PS.MethodEnum.Get,path:\"2/abtests\"},e),Hut=t=>(e,r)=>t.transporter.write({method:PS.MethodEnum.Post,path:ow.encode(\"2/abtests/%s/stop\",e)},r);X0.addABTest=Lut;X0.createAnalyticsClient=Out;X0.deleteABTest=Mut;X0.getABTest=Uut;X0.getABTests=_ut;X0.stopABTest=Hut});var fIe=_((RJt,uIe)=>{uIe.exports=cIe()});var pIe=_(xS=>{\"use strict\";Object.defineProperty(xS,\"__esModule\",{value:!0});var a9=vS(),jut=bS(),AIe=SS(),Gut=t=>{let e=t.region||\"us\",r=a9.createAuth(a9.AuthMode.WithinHeaders,t.appId,t.apiKey),s=jut.createTransporter({hosts:[{url:`personalization.${e}.algolia.com`}],...t,headers:{...r.headers(),\"content-type\":\"application/json\",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}});return a9.addMethods({appId:t.appId,transporter:s},t.methods)},qut=t=>e=>t.transporter.read({method:AIe.MethodEnum.Get,path:\"1/strategies/personalization\"},e),Wut=t=>(e,r)=>t.transporter.write({method:AIe.MethodEnum.Post,path:\"1/strategies/personalization\",data:e},r);xS.createPersonalizationClient=Gut;xS.getPersonalizationStrategy=qut;xS.setPersonalizationStrategy=Wut});var gIe=_((NJt,hIe)=>{hIe.exports=pIe()});var xIe=_(Ft=>{\"use strict\";Object.defineProperty(Ft,\"__esModule\",{value:!0});var Jt=vS(),gl=bS(),br=SS(),Yut=Ie(\"crypto\");function AF(t){let e=r=>t.request(r).then(s=>{if(t.batch!==void 0&&t.batch(s.hits),!t.shouldStop(s))return s.cursor?e({cursor:s.cursor}):e({page:(r.page||0)+1})});return e({})}var Vut=t=>{let e=t.appId,r=Jt.createAuth(t.authMode!==void 0?t.authMode:Jt.AuthMode.WithinHeaders,e,t.apiKey),s=gl.createTransporter({hosts:[{url:`${e}-dsn.algolia.net`,accept:gl.CallEnum.Read},{url:`${e}.algolia.net`,accept:gl.CallEnum.Write}].concat(Jt.shuffle([{url:`${e}-1.algolianet.com`},{url:`${e}-2.algolianet.com`},{url:`${e}-3.algolianet.com`}])),...t,headers:{...r.headers(),\"content-type\":\"application/x-www-form-urlencoded\",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a={transporter:s,appId:e,addAlgoliaAgent(n,c){s.userAgent.add({segment:n,version:c})},clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})}};return Jt.addMethods(a,t.methods)};function dIe(){return{name:\"MissingObjectIDError\",message:\"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option.\"}}function mIe(){return{name:\"ObjectNotFoundError\",message:\"Object not found.\"}}function yIe(){return{name:\"ValidUntilNotFoundError\",message:\"ValidUntil not found in given secured api key.\"}}var Jut=t=>(e,r)=>{let{queryParameters:s,...a}=r||{},n={acl:e,...s!==void 0?{queryParameters:s}:{}},c=(f,p)=>Jt.createRetryablePromise(h=>kS(t)(f.key,p).catch(E=>{if(E.status!==404)throw E;return h()}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:\"1/keys\",data:n},a),c)},Kut=t=>(e,r,s)=>{let a=gl.createMappedRequestOptions(s);return a.queryParameters[\"X-Algolia-User-ID\"]=e,t.transporter.write({method:br.MethodEnum.Post,path:\"1/clusters/mapping\",data:{cluster:r}},a)},zut=t=>(e,r,s)=>t.transporter.write({method:br.MethodEnum.Post,path:\"1/clusters/mapping/batch\",data:{users:e,cluster:r}},s),Xut=t=>(e,r)=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!0,requests:{action:\"addEntry\",body:[]}}},r),(s,a)=>aw(t)(s.taskID,a)),pF=t=>(e,r,s)=>{let a=(n,c)=>QS(t)(e,{methods:{waitTask:hs}}).waitTask(n.taskID,c);return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/operation\",e),data:{operation:\"copy\",destination:r}},s),a)},Zut=t=>(e,r,s)=>pF(t)(e,r,{...s,scope:[gF.Rules]}),$ut=t=>(e,r,s)=>pF(t)(e,r,{...s,scope:[gF.Settings]}),eft=t=>(e,r,s)=>pF(t)(e,r,{...s,scope:[gF.Synonyms]}),tft=t=>(e,r)=>e.method===br.MethodEnum.Get?t.transporter.read(e,r):t.transporter.write(e,r),rft=t=>(e,r)=>{let s=(a,n)=>Jt.createRetryablePromise(c=>kS(t)(e,n).then(c).catch(f=>{if(f.status!==404)throw f}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Jt.encode(\"1/keys/%s\",e)},r),s)},nft=t=>(e,r,s)=>{let a=r.map(n=>({action:\"deleteEntry\",body:{objectID:n}}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!1,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},ift=()=>(t,e)=>{let r=gl.serializeQueryParameters(e),s=Yut.createHmac(\"sha256\",t).update(r).digest(\"hex\");return Buffer.from(s+r).toString(\"base64\")},kS=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/keys/%s\",e)},r),EIe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/task/%s\",e.toString())},r),sft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"/1/dictionaries/*/settings\"},e),oft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/logs\"},e),aft=()=>t=>{let e=Buffer.from(t,\"base64\").toString(\"ascii\"),r=/validUntil=(\\d+)/,s=e.match(r);if(s===null)throw yIe();return parseInt(s[1],10)-Math.round(new Date().getTime()/1e3)},lft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters/mapping/top\"},e),cft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/clusters/mapping/%s\",e)},r),uft=t=>e=>{let{retrieveMappings:r,...s}=e||{};return r===!0&&(s.getClusters=!0),t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters/mapping/pending\"},s)},QS=t=>(e,r={})=>{let s={transporter:t.transporter,appId:t.appId,indexName:e};return Jt.addMethods(s,r.methods)},fft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/keys\"},e),Aft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters\"},e),pft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/indexes\"},e),hft=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:\"1/clusters/mapping\"},e),gft=t=>(e,r,s)=>{let a=(n,c)=>QS(t)(e,{methods:{waitTask:hs}}).waitTask(n.taskID,c);return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/operation\",e),data:{operation:\"move\",destination:r}},s),a)},dft=t=>(e,r)=>{let s=(a,n)=>Promise.all(Object.keys(a.taskID).map(c=>QS(t)(c,{methods:{waitTask:hs}}).waitTask(a.taskID[c],n)));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:\"1/indexes/*/batch\",data:{requests:e}},r),s)},mft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:\"1/indexes/*/objects\",data:{requests:e}},r),yft=t=>(e,r)=>{let s=e.map(a=>({...a,params:gl.serializeQueryParameters(a.params||{})}));return t.transporter.read({method:br.MethodEnum.Post,path:\"1/indexes/*/queries\",data:{requests:s},cacheable:!0},r)},Eft=t=>(e,r)=>Promise.all(e.map(s=>{let{facetName:a,facetQuery:n,...c}=s.params;return QS(t)(s.indexName,{methods:{searchForFacetValues:DIe}}).searchForFacetValues(a,n,{...r,...c})})),Ift=t=>(e,r)=>{let s=gl.createMappedRequestOptions(r);return s.queryParameters[\"X-Algolia-User-ID\"]=e,t.transporter.write({method:br.MethodEnum.Delete,path:\"1/clusters/mapping\"},s)},Cft=t=>(e,r,s)=>{let a=r.map(n=>({action:\"addEntry\",body:n}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!0,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},wft=t=>(e,r)=>{let s=(a,n)=>Jt.createRetryablePromise(c=>kS(t)(e,n).catch(f=>{if(f.status!==404)throw f;return c()}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/keys/%s/restore\",e)},r),s)},Bft=t=>(e,r,s)=>{let a=r.map(n=>({action:\"addEntry\",body:n}));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"/1/dictionaries/%s/batch\",e),data:{clearExistingDictionaryEntries:!1,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},vft=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"/1/dictionaries/%s/search\",e),data:{query:r},cacheable:!0},s),Sft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:\"1/clusters/mapping/search\",data:{query:e}},r),Dft=t=>(e,r)=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:\"/1/dictionaries/*/settings\",data:e},r),(s,a)=>aw(t)(s.taskID,a)),bft=t=>(e,r)=>{let s=Object.assign({},r),{queryParameters:a,...n}=r||{},c=a?{queryParameters:a}:{},f=[\"acl\",\"indexes\",\"referers\",\"restrictSources\",\"queryParameters\",\"description\",\"maxQueriesPerIPPerHour\",\"maxHitsPerQuery\"],p=E=>Object.keys(s).filter(C=>f.indexOf(C)!==-1).every(C=>{if(Array.isArray(E[C])&&Array.isArray(s[C])){let S=E[C];return S.length===s[C].length&&S.every((P,I)=>P===s[C][I])}else return E[C]===s[C]}),h=(E,C)=>Jt.createRetryablePromise(S=>kS(t)(e,C).then(P=>p(P)?Promise.resolve():S()));return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:Jt.encode(\"1/keys/%s\",e),data:c},n),h)},aw=t=>(e,r)=>Jt.createRetryablePromise(s=>EIe(t)(e,r).then(a=>a.status!==\"published\"?s():void 0)),IIe=t=>(e,r)=>{let s=(a,n)=>hs(t)(a.taskID,n);return Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/batch\",t.indexName),data:{requests:e}},r),s)},Pft=t=>e=>AF({shouldStop:r=>r.cursor===void 0,...e,request:r=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/browse\",t.indexName),data:r},e)}),xft=t=>e=>{let r={hitsPerPage:1e3,...e};return AF({shouldStop:s=>s.hits.length<r.hitsPerPage,...r,request(s){return bIe(t)(\"\",{...r,...s}).then(a=>({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},kft=t=>e=>{let r={hitsPerPage:1e3,...e};return AF({shouldStop:s=>s.hits.length<r.hitsPerPage,...r,request(s){return PIe(t)(\"\",{...r,...s}).then(a=>({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},hF=t=>(e,r,s)=>{let{batchSize:a,...n}=s||{},c={taskIDs:[],objectIDs:[]},f=(p=0)=>{let h=[],E;for(E=p;E<e.length&&(h.push(e[E]),h.length!==(a||1e3));E++);return h.length===0?Promise.resolve(c):IIe(t)(h.map(C=>({action:r,body:C})),n).then(C=>(c.objectIDs=c.objectIDs.concat(C.objectIDs),c.taskIDs.push(C.taskID),E++,f(E)))};return Jt.createWaitablePromise(f(),(p,h)=>Promise.all(p.taskIDs.map(E=>hs(t)(E,h))))},Qft=t=>e=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/clear\",t.indexName)},e),(r,s)=>hs(t)(r.taskID,s)),Tft=t=>e=>{let{forwardToReplicas:r,...s}=e||{},a=gl.createMappedRequestOptions(s);return r&&(a.queryParameters.forwardToReplicas=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/rules/clear\",t.indexName)},a),(n,c)=>hs(t)(n.taskID,c))},Rft=t=>e=>{let{forwardToReplicas:r,...s}=e||{},a=gl.createMappedRequestOptions(s);return r&&(a.queryParameters.forwardToReplicas=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/synonyms/clear\",t.indexName)},a),(n,c)=>hs(t)(n.taskID,c))},Fft=t=>(e,r)=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/deleteByQuery\",t.indexName),data:e},r),(s,a)=>hs(t)(s.taskID,a)),Nft=t=>e=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Jt.encode(\"1/indexes/%s\",t.indexName)},e),(r,s)=>hs(t)(r.taskID,s)),Oft=t=>(e,r)=>Jt.createWaitablePromise(CIe(t)([e],r).then(s=>({taskID:s.taskIDs[0]})),(s,a)=>hs(t)(s.taskID,a)),CIe=t=>(e,r)=>{let s=e.map(a=>({objectID:a}));return hF(t)(s,km.DeleteObject,r)},Lft=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=gl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Jt.encode(\"1/indexes/%s/rules/%s\",t.indexName,e)},n),(c,f)=>hs(t)(c.taskID,f))},Mft=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=gl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Jt.encode(\"1/indexes/%s/synonyms/%s\",t.indexName,e)},n),(c,f)=>hs(t)(c.taskID,f))},Uft=t=>e=>wIe(t)(e).then(()=>!0).catch(r=>{if(r.status!==404)throw r;return!1}),_ft=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/answers/%s/prediction\",t.indexName),data:{query:e,queryLanguages:r},cacheable:!0},s),Hft=t=>(e,r)=>{let{query:s,paginate:a,...n}=r||{},c=0,f=()=>SIe(t)(s||\"\",{...n,page:c}).then(p=>{for(let[h,E]of Object.entries(p.hits))if(e(E))return{object:E,position:parseInt(h,10),page:c};if(c++,a===!1||c>=p.nbPages)throw mIe();return f()});return f()},jft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/indexes/%s/%s\",t.indexName,e)},r),Gft=()=>(t,e)=>{for(let[r,s]of Object.entries(t.hits))if(s.objectID===e)return parseInt(r,10);return-1},qft=t=>(e,r)=>{let{attributesToRetrieve:s,...a}=r||{},n=e.map(c=>({indexName:t.indexName,objectID:c,...s?{attributesToRetrieve:s}:{}}));return t.transporter.read({method:br.MethodEnum.Post,path:\"1/indexes/*/objects\",data:{requests:n}},a)},Wft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/indexes/%s/rules/%s\",t.indexName,e)},r),wIe=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/indexes/%s/settings\",t.indexName),data:{getVersion:2}},e),Yft=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/indexes/%s/synonyms/%s\",t.indexName,e)},r),BIe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Jt.encode(\"1/indexes/%s/task/%s\",t.indexName,e.toString())},r),Vft=t=>(e,r)=>Jt.createWaitablePromise(vIe(t)([e],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,a)=>hs(t)(s.taskID,a)),vIe=t=>(e,r)=>{let{createIfNotExists:s,...a}=r||{},n=s?km.PartialUpdateObject:km.PartialUpdateObjectNoCreate;return hF(t)(e,n,a)},Jft=t=>(e,r)=>{let{safe:s,autoGenerateObjectIDIfNotExist:a,batchSize:n,...c}=r||{},f=(I,R,N,U)=>Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/operation\",I),data:{operation:N,destination:R}},U),(W,ee)=>hs(t)(W.taskID,ee)),p=Math.random().toString(36).substring(7),h=`${t.indexName}_tmp_${p}`,E=l9({appId:t.appId,transporter:t.transporter,indexName:h}),C=[],S=f(t.indexName,h,\"copy\",{...c,scope:[\"settings\",\"synonyms\",\"rules\"]});C.push(S);let P=(s?S.wait(c):S).then(()=>{let I=E(e,{...c,autoGenerateObjectIDIfNotExist:a,batchSize:n});return C.push(I),s?I.wait(c):I}).then(()=>{let I=f(h,t.indexName,\"move\",c);return C.push(I),s?I.wait(c):I}).then(()=>Promise.all(C)).then(([I,R,N])=>({objectIDs:R.objectIDs,taskIDs:[I.taskID,...R.taskIDs,N.taskID]}));return Jt.createWaitablePromise(P,(I,R)=>Promise.all(C.map(N=>N.wait(R))))},Kft=t=>(e,r)=>c9(t)(e,{...r,clearExistingRules:!0}),zft=t=>(e,r)=>u9(t)(e,{...r,clearExistingSynonyms:!0}),Xft=t=>(e,r)=>Jt.createWaitablePromise(l9(t)([e],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,a)=>hs(t)(s.taskID,a)),l9=t=>(e,r)=>{let{autoGenerateObjectIDIfNotExist:s,...a}=r||{},n=s?km.AddObject:km.UpdateObject;if(n===km.UpdateObject){for(let c of e)if(c.objectID===void 0)return Jt.createWaitablePromise(Promise.reject(dIe()))}return hF(t)(e,n,a)},Zft=t=>(e,r)=>c9(t)([e],r),c9=t=>(e,r)=>{let{forwardToReplicas:s,clearExistingRules:a,...n}=r||{},c=gl.createMappedRequestOptions(n);return s&&(c.queryParameters.forwardToReplicas=1),a&&(c.queryParameters.clearExistingRules=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/rules/batch\",t.indexName),data:e},c),(f,p)=>hs(t)(f.taskID,p))},$ft=t=>(e,r)=>u9(t)([e],r),u9=t=>(e,r)=>{let{forwardToReplicas:s,clearExistingSynonyms:a,replaceExistingSynonyms:n,...c}=r||{},f=gl.createMappedRequestOptions(c);return s&&(f.queryParameters.forwardToReplicas=1),(n||a)&&(f.queryParameters.replaceExistingSynonyms=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/synonyms/batch\",t.indexName),data:e},f),(p,h)=>hs(t)(p.taskID,h))},SIe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/query\",t.indexName),data:{query:e},cacheable:!0},r),DIe=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/facets/%s/query\",t.indexName,e),data:{facetQuery:r},cacheable:!0},s),bIe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/rules/search\",t.indexName),data:{query:e}},r),PIe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Jt.encode(\"1/indexes/%s/synonyms/search\",t.indexName),data:{query:e}},r),eAt=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=gl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Jt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:Jt.encode(\"1/indexes/%s/settings\",t.indexName),data:e},n),(c,f)=>hs(t)(c.taskID,f))},hs=t=>(e,r)=>Jt.createRetryablePromise(s=>BIe(t)(e,r).then(a=>a.status!==\"published\"?s():void 0)),tAt={AddObject:\"addObject\",Analytics:\"analytics\",Browser:\"browse\",DeleteIndex:\"deleteIndex\",DeleteObject:\"deleteObject\",EditSettings:\"editSettings\",Inference:\"inference\",ListIndexes:\"listIndexes\",Logs:\"logs\",Personalization:\"personalization\",Recommendation:\"recommendation\",Search:\"search\",SeeUnretrievableAttributes:\"seeUnretrievableAttributes\",Settings:\"settings\",Usage:\"usage\"},km={AddObject:\"addObject\",UpdateObject:\"updateObject\",PartialUpdateObject:\"partialUpdateObject\",PartialUpdateObjectNoCreate:\"partialUpdateObjectNoCreate\",DeleteObject:\"deleteObject\",DeleteIndex:\"delete\",ClearIndex:\"clear\"},gF={Settings:\"settings\",Synonyms:\"synonyms\",Rules:\"rules\"},rAt={None:\"none\",StopIfEnoughMatches:\"stopIfEnoughMatches\"},nAt={Synonym:\"synonym\",OneWaySynonym:\"oneWaySynonym\",AltCorrection1:\"altCorrection1\",AltCorrection2:\"altCorrection2\",Placeholder:\"placeholder\"};Ft.ApiKeyACLEnum=tAt;Ft.BatchActionEnum=km;Ft.ScopeEnum=gF;Ft.StrategyEnum=rAt;Ft.SynonymEnum=nAt;Ft.addApiKey=Jut;Ft.assignUserID=Kut;Ft.assignUserIDs=zut;Ft.batch=IIe;Ft.browseObjects=Pft;Ft.browseRules=xft;Ft.browseSynonyms=kft;Ft.chunkedBatch=hF;Ft.clearDictionaryEntries=Xut;Ft.clearObjects=Qft;Ft.clearRules=Tft;Ft.clearSynonyms=Rft;Ft.copyIndex=pF;Ft.copyRules=Zut;Ft.copySettings=$ut;Ft.copySynonyms=eft;Ft.createBrowsablePromise=AF;Ft.createMissingObjectIDError=dIe;Ft.createObjectNotFoundError=mIe;Ft.createSearchClient=Vut;Ft.createValidUntilNotFoundError=yIe;Ft.customRequest=tft;Ft.deleteApiKey=rft;Ft.deleteBy=Fft;Ft.deleteDictionaryEntries=nft;Ft.deleteIndex=Nft;Ft.deleteObject=Oft;Ft.deleteObjects=CIe;Ft.deleteRule=Lft;Ft.deleteSynonym=Mft;Ft.exists=Uft;Ft.findAnswers=_ft;Ft.findObject=Hft;Ft.generateSecuredApiKey=ift;Ft.getApiKey=kS;Ft.getAppTask=EIe;Ft.getDictionarySettings=sft;Ft.getLogs=oft;Ft.getObject=jft;Ft.getObjectPosition=Gft;Ft.getObjects=qft;Ft.getRule=Wft;Ft.getSecuredApiKeyRemainingValidity=aft;Ft.getSettings=wIe;Ft.getSynonym=Yft;Ft.getTask=BIe;Ft.getTopUserIDs=lft;Ft.getUserID=cft;Ft.hasPendingMappings=uft;Ft.initIndex=QS;Ft.listApiKeys=fft;Ft.listClusters=Aft;Ft.listIndices=pft;Ft.listUserIDs=hft;Ft.moveIndex=gft;Ft.multipleBatch=dft;Ft.multipleGetObjects=mft;Ft.multipleQueries=yft;Ft.multipleSearchForFacetValues=Eft;Ft.partialUpdateObject=Vft;Ft.partialUpdateObjects=vIe;Ft.removeUserID=Ift;Ft.replaceAllObjects=Jft;Ft.replaceAllRules=Kft;Ft.replaceAllSynonyms=zft;Ft.replaceDictionaryEntries=Cft;Ft.restoreApiKey=wft;Ft.saveDictionaryEntries=Bft;Ft.saveObject=Xft;Ft.saveObjects=l9;Ft.saveRule=Zft;Ft.saveRules=c9;Ft.saveSynonym=$ft;Ft.saveSynonyms=u9;Ft.search=SIe;Ft.searchDictionaryEntries=vft;Ft.searchForFacetValues=DIe;Ft.searchRules=bIe;Ft.searchSynonyms=PIe;Ft.searchUserIDs=Sft;Ft.setDictionarySettings=Dft;Ft.setSettings=eAt;Ft.updateApiKey=bft;Ft.waitAppTask=aw;Ft.waitTask=hs});var QIe=_((LJt,kIe)=>{kIe.exports=xIe()});var TIe=_(dF=>{\"use strict\";Object.defineProperty(dF,\"__esModule\",{value:!0});function iAt(){return{debug(t,e){return Promise.resolve()},info(t,e){return Promise.resolve()},error(t,e){return Promise.resolve()}}}var sAt={Debug:1,Info:2,Error:3};dF.LogLevelEnum=sAt;dF.createNullLogger=iAt});var FIe=_((UJt,RIe)=>{RIe.exports=TIe()});var MIe=_(f9=>{\"use strict\";Object.defineProperty(f9,\"__esModule\",{value:!0});var NIe=Ie(\"http\"),OIe=Ie(\"https\"),oAt=Ie(\"url\"),LIe={keepAlive:!0},aAt=new NIe.Agent(LIe),lAt=new OIe.Agent(LIe);function cAt({agent:t,httpAgent:e,httpsAgent:r,requesterOptions:s={}}={}){let a=e||t||aAt,n=r||t||lAt;return{send(c){return new Promise(f=>{let p=oAt.parse(c.url),h=p.query===null?p.pathname:`${p.pathname}?${p.query}`,E={...s,agent:p.protocol===\"https:\"?n:a,hostname:p.hostname,path:h,method:c.method,headers:{...s&&s.headers?s.headers:{},...c.headers},...p.port!==void 0?{port:p.port||\"\"}:{}},C=(p.protocol===\"https:\"?OIe:NIe).request(E,R=>{let N=[];R.on(\"data\",U=>{N=N.concat(U)}),R.on(\"end\",()=>{clearTimeout(P),clearTimeout(I),f({status:R.statusCode||0,content:Buffer.concat(N).toString(),isTimedOut:!1})})}),S=(R,N)=>setTimeout(()=>{C.abort(),f({status:0,content:N,isTimedOut:!0})},R*1e3),P=S(c.connectTimeout,\"Connection timeout\"),I;C.on(\"error\",R=>{clearTimeout(P),clearTimeout(I),f({status:0,content:R.message,isTimedOut:!1})}),C.once(\"response\",()=>{clearTimeout(P),I=S(c.responseTimeout,\"Socket timeout\")}),c.data!==void 0&&C.write(c.data),C.end()})},destroy(){return a.destroy(),n.destroy(),Promise.resolve()}}}f9.createNodeHttpRequester=cAt});var _Ie=_((HJt,UIe)=>{UIe.exports=MIe()});var qIe=_((jJt,GIe)=>{\"use strict\";var HIe=MEe(),uAt=HEe(),lw=fIe(),p9=vS(),A9=gIe(),Gt=QIe(),fAt=FIe(),AAt=_Ie(),pAt=bS();function jIe(t,e,r){let s={appId:t,apiKey:e,timeouts:{connect:2,read:5,write:30},requester:AAt.createNodeHttpRequester(),logger:fAt.createNullLogger(),responsesCache:HIe.createNullCache(),requestsCache:HIe.createNullCache(),hostsCache:uAt.createInMemoryCache(),userAgent:pAt.createUserAgent(p9.version).add({segment:\"Node.js\",version:process.versions.node})},a={...s,...r},n=()=>c=>A9.createPersonalizationClient({...s,...c,methods:{getPersonalizationStrategy:A9.getPersonalizationStrategy,setPersonalizationStrategy:A9.setPersonalizationStrategy}});return Gt.createSearchClient({...a,methods:{search:Gt.multipleQueries,searchForFacetValues:Gt.multipleSearchForFacetValues,multipleBatch:Gt.multipleBatch,multipleGetObjects:Gt.multipleGetObjects,multipleQueries:Gt.multipleQueries,copyIndex:Gt.copyIndex,copySettings:Gt.copySettings,copyRules:Gt.copyRules,copySynonyms:Gt.copySynonyms,moveIndex:Gt.moveIndex,listIndices:Gt.listIndices,getLogs:Gt.getLogs,listClusters:Gt.listClusters,multipleSearchForFacetValues:Gt.multipleSearchForFacetValues,getApiKey:Gt.getApiKey,addApiKey:Gt.addApiKey,listApiKeys:Gt.listApiKeys,updateApiKey:Gt.updateApiKey,deleteApiKey:Gt.deleteApiKey,restoreApiKey:Gt.restoreApiKey,assignUserID:Gt.assignUserID,assignUserIDs:Gt.assignUserIDs,getUserID:Gt.getUserID,searchUserIDs:Gt.searchUserIDs,listUserIDs:Gt.listUserIDs,getTopUserIDs:Gt.getTopUserIDs,removeUserID:Gt.removeUserID,hasPendingMappings:Gt.hasPendingMappings,generateSecuredApiKey:Gt.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:Gt.getSecuredApiKeyRemainingValidity,destroy:p9.destroy,clearDictionaryEntries:Gt.clearDictionaryEntries,deleteDictionaryEntries:Gt.deleteDictionaryEntries,getDictionarySettings:Gt.getDictionarySettings,getAppTask:Gt.getAppTask,replaceDictionaryEntries:Gt.replaceDictionaryEntries,saveDictionaryEntries:Gt.saveDictionaryEntries,searchDictionaryEntries:Gt.searchDictionaryEntries,setDictionarySettings:Gt.setDictionarySettings,waitAppTask:Gt.waitAppTask,customRequest:Gt.customRequest,initIndex:c=>f=>Gt.initIndex(c)(f,{methods:{batch:Gt.batch,delete:Gt.deleteIndex,findAnswers:Gt.findAnswers,getObject:Gt.getObject,getObjects:Gt.getObjects,saveObject:Gt.saveObject,saveObjects:Gt.saveObjects,search:Gt.search,searchForFacetValues:Gt.searchForFacetValues,waitTask:Gt.waitTask,setSettings:Gt.setSettings,getSettings:Gt.getSettings,partialUpdateObject:Gt.partialUpdateObject,partialUpdateObjects:Gt.partialUpdateObjects,deleteObject:Gt.deleteObject,deleteObjects:Gt.deleteObjects,deleteBy:Gt.deleteBy,clearObjects:Gt.clearObjects,browseObjects:Gt.browseObjects,getObjectPosition:Gt.getObjectPosition,findObject:Gt.findObject,exists:Gt.exists,saveSynonym:Gt.saveSynonym,saveSynonyms:Gt.saveSynonyms,getSynonym:Gt.getSynonym,searchSynonyms:Gt.searchSynonyms,browseSynonyms:Gt.browseSynonyms,deleteSynonym:Gt.deleteSynonym,clearSynonyms:Gt.clearSynonyms,replaceAllObjects:Gt.replaceAllObjects,replaceAllSynonyms:Gt.replaceAllSynonyms,searchRules:Gt.searchRules,getRule:Gt.getRule,deleteRule:Gt.deleteRule,saveRule:Gt.saveRule,saveRules:Gt.saveRules,replaceAllRules:Gt.replaceAllRules,browseRules:Gt.browseRules,clearRules:Gt.clearRules}}),initAnalytics:()=>c=>lw.createAnalyticsClient({...s,...c,methods:{addABTest:lw.addABTest,getABTest:lw.getABTest,getABTests:lw.getABTests,stopABTest:lw.stopABTest,deleteABTest:lw.deleteABTest}}),initPersonalization:n,initRecommendation:()=>c=>(a.logger.info(\"The `initRecommendation` method is deprecated. Use `initPersonalization` instead.\"),n()(c))}})}jIe.version=p9.version;GIe.exports=jIe});var g9=_((GJt,h9)=>{var WIe=qIe();h9.exports=WIe;h9.exports.default=WIe});var y9=_((WJt,JIe)=>{\"use strict\";var VIe=Object.getOwnPropertySymbols,gAt=Object.prototype.hasOwnProperty,dAt=Object.prototype.propertyIsEnumerable;function mAt(t){if(t==null)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(t)}function yAt(){try{if(!Object.assign)return!1;var t=new String(\"abc\");if(t[5]=\"de\",Object.getOwnPropertyNames(t)[0]===\"5\")return!1;for(var e={},r=0;r<10;r++)e[\"_\"+String.fromCharCode(r)]=r;var s=Object.getOwnPropertyNames(e).map(function(n){return e[n]});if(s.join(\"\")!==\"0123456789\")return!1;var a={};return\"abcdefghijklmnopqrst\".split(\"\").forEach(function(n){a[n]=n}),Object.keys(Object.assign({},a)).join(\"\")===\"abcdefghijklmnopqrst\"}catch{return!1}}JIe.exports=yAt()?Object.assign:function(t,e){for(var r,s=mAt(t),a,n=1;n<arguments.length;n++){r=Object(arguments[n]);for(var c in r)gAt.call(r,c)&&(s[c]=r[c]);if(VIe){a=VIe(r);for(var f=0;f<a.length;f++)dAt.call(r,a[f])&&(s[a[f]]=r[a[f]])}}return s}});var uCe=_(Dn=>{\"use strict\";var I9=y9(),cw=60103,XIe=60106;Dn.Fragment=60107;Dn.StrictMode=60108;Dn.Profiler=60114;var ZIe=60109,$Ie=60110,eCe=60112;Dn.Suspense=60113;var tCe=60115,rCe=60116;typeof Symbol==\"function\"&&Symbol.for&&(Gc=Symbol.for,cw=Gc(\"react.element\"),XIe=Gc(\"react.portal\"),Dn.Fragment=Gc(\"react.fragment\"),Dn.StrictMode=Gc(\"react.strict_mode\"),Dn.Profiler=Gc(\"react.profiler\"),ZIe=Gc(\"react.provider\"),$Ie=Gc(\"react.context\"),eCe=Gc(\"react.forward_ref\"),Dn.Suspense=Gc(\"react.suspense\"),tCe=Gc(\"react.memo\"),rCe=Gc(\"react.lazy\"));var Gc,KIe=typeof Symbol==\"function\"&&Symbol.iterator;function EAt(t){return t===null||typeof t!=\"object\"?null:(t=KIe&&t[KIe]||t[\"@@iterator\"],typeof t==\"function\"?t:null)}function TS(t){for(var e=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+t,r=1;r<arguments.length;r++)e+=\"&args[]=\"+encodeURIComponent(arguments[r]);return\"Minified React error #\"+t+\"; visit \"+e+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var nCe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iCe={};function uw(t,e,r){this.props=t,this.context=e,this.refs=iCe,this.updater=r||nCe}uw.prototype.isReactComponent={};uw.prototype.setState=function(t,e){if(typeof t!=\"object\"&&typeof t!=\"function\"&&t!=null)throw Error(TS(85));this.updater.enqueueSetState(this,t,e,\"setState\")};uw.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,\"forceUpdate\")};function sCe(){}sCe.prototype=uw.prototype;function C9(t,e,r){this.props=t,this.context=e,this.refs=iCe,this.updater=r||nCe}var w9=C9.prototype=new sCe;w9.constructor=C9;I9(w9,uw.prototype);w9.isPureReactComponent=!0;var B9={current:null},oCe=Object.prototype.hasOwnProperty,aCe={key:!0,ref:!0,__self:!0,__source:!0};function lCe(t,e,r){var s,a={},n=null,c=null;if(e!=null)for(s in e.ref!==void 0&&(c=e.ref),e.key!==void 0&&(n=\"\"+e.key),e)oCe.call(e,s)&&!aCe.hasOwnProperty(s)&&(a[s]=e[s]);var f=arguments.length-2;if(f===1)a.children=r;else if(1<f){for(var p=Array(f),h=0;h<f;h++)p[h]=arguments[h+2];a.children=p}if(t&&t.defaultProps)for(s in f=t.defaultProps,f)a[s]===void 0&&(a[s]=f[s]);return{$$typeof:cw,type:t,key:n,ref:c,props:a,_owner:B9.current}}function IAt(t,e){return{$$typeof:cw,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function v9(t){return typeof t==\"object\"&&t!==null&&t.$$typeof===cw}function CAt(t){var e={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+t.replace(/[=:]/g,function(r){return e[r]})}var zIe=/\\/+/g;function E9(t,e){return typeof t==\"object\"&&t!==null&&t.key!=null?CAt(\"\"+t.key):e.toString(36)}function yF(t,e,r,s,a){var n=typeof t;(n===\"undefined\"||n===\"boolean\")&&(t=null);var c=!1;if(t===null)c=!0;else switch(n){case\"string\":case\"number\":c=!0;break;case\"object\":switch(t.$$typeof){case cw:case XIe:c=!0}}if(c)return c=t,a=a(c),t=s===\"\"?\".\"+E9(c,0):s,Array.isArray(a)?(r=\"\",t!=null&&(r=t.replace(zIe,\"$&/\")+\"/\"),yF(a,e,r,\"\",function(h){return h})):a!=null&&(v9(a)&&(a=IAt(a,r+(!a.key||c&&c.key===a.key?\"\":(\"\"+a.key).replace(zIe,\"$&/\")+\"/\")+t)),e.push(a)),1;if(c=0,s=s===\"\"?\".\":s+\":\",Array.isArray(t))for(var f=0;f<t.length;f++){n=t[f];var p=s+E9(n,f);c+=yF(n,e,r,p,a)}else if(p=EAt(t),typeof p==\"function\")for(t=p.call(t),f=0;!(n=t.next()).done;)n=n.value,p=s+E9(n,f++),c+=yF(n,e,r,p,a);else if(n===\"object\")throw e=\"\"+t,Error(TS(31,e===\"[object Object]\"?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":e));return c}function mF(t,e,r){if(t==null)return t;var s=[],a=0;return yF(t,s,\"\",\"\",function(n){return e.call(r,n,a++)}),s}function wAt(t){if(t._status===-1){var e=t._result;e=e(),t._status=0,t._result=e,e.then(function(r){t._status===0&&(r=r.default,t._status=1,t._result=r)},function(r){t._status===0&&(t._status=2,t._result=r)})}if(t._status===1)return t._result;throw t._result}var cCe={current:null};function Zp(){var t=cCe.current;if(t===null)throw Error(TS(321));return t}var BAt={ReactCurrentDispatcher:cCe,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:B9,IsSomeRendererActing:{current:!1},assign:I9};Dn.Children={map:mF,forEach:function(t,e,r){mF(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return mF(t,function(){e++}),e},toArray:function(t){return mF(t,function(e){return e})||[]},only:function(t){if(!v9(t))throw Error(TS(143));return t}};Dn.Component=uw;Dn.PureComponent=C9;Dn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=BAt;Dn.cloneElement=function(t,e,r){if(t==null)throw Error(TS(267,t));var s=I9({},t.props),a=t.key,n=t.ref,c=t._owner;if(e!=null){if(e.ref!==void 0&&(n=e.ref,c=B9.current),e.key!==void 0&&(a=\"\"+e.key),t.type&&t.type.defaultProps)var f=t.type.defaultProps;for(p in e)oCe.call(e,p)&&!aCe.hasOwnProperty(p)&&(s[p]=e[p]===void 0&&f!==void 0?f[p]:e[p])}var p=arguments.length-2;if(p===1)s.children=r;else if(1<p){f=Array(p);for(var h=0;h<p;h++)f[h]=arguments[h+2];s.children=f}return{$$typeof:cw,type:t.type,key:a,ref:n,props:s,_owner:c}};Dn.createContext=function(t,e){return e===void 0&&(e=null),t={$$typeof:$Ie,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider={$$typeof:ZIe,_context:t},t.Consumer=t};Dn.createElement=lCe;Dn.createFactory=function(t){var e=lCe.bind(null,t);return e.type=t,e};Dn.createRef=function(){return{current:null}};Dn.forwardRef=function(t){return{$$typeof:eCe,render:t}};Dn.isValidElement=v9;Dn.lazy=function(t){return{$$typeof:rCe,_payload:{_status:-1,_result:t},_init:wAt}};Dn.memo=function(t,e){return{$$typeof:tCe,type:t,compare:e===void 0?null:e}};Dn.useCallback=function(t,e){return Zp().useCallback(t,e)};Dn.useContext=function(t,e){return Zp().useContext(t,e)};Dn.useDebugValue=function(){};Dn.useEffect=function(t,e){return Zp().useEffect(t,e)};Dn.useImperativeHandle=function(t,e,r){return Zp().useImperativeHandle(t,e,r)};Dn.useLayoutEffect=function(t,e){return Zp().useLayoutEffect(t,e)};Dn.useMemo=function(t,e){return Zp().useMemo(t,e)};Dn.useReducer=function(t,e,r){return Zp().useReducer(t,e,r)};Dn.useRef=function(t){return Zp().useRef(t)};Dn.useState=function(t){return Zp().useState(t)};Dn.version=\"17.0.2\"});var hn=_((VJt,fCe)=>{\"use strict\";fCe.exports=uCe()});var EF=_((JJt,ACe)=>{function vAt(t){var e=typeof t;return t!=null&&(e==\"object\"||e==\"function\")}ACe.exports=vAt});var hCe=_((KJt,pCe)=>{var SAt=typeof global==\"object\"&&global&&global.Object===Object&&global;pCe.exports=SAt});var S9=_((zJt,gCe)=>{var DAt=hCe(),bAt=typeof self==\"object\"&&self&&self.Object===Object&&self,PAt=DAt||bAt||Function(\"return this\")();gCe.exports=PAt});var mCe=_((XJt,dCe)=>{var xAt=S9(),kAt=function(){return xAt.Date.now()};dCe.exports=kAt});var ECe=_((ZJt,yCe)=>{var QAt=/\\s/;function TAt(t){for(var e=t.length;e--&&QAt.test(t.charAt(e)););return e}yCe.exports=TAt});var CCe=_(($Jt,ICe)=>{var RAt=ECe(),FAt=/^\\s+/;function NAt(t){return t&&t.slice(0,RAt(t)+1).replace(FAt,\"\")}ICe.exports=NAt});var D9=_((eKt,wCe)=>{var OAt=S9(),LAt=OAt.Symbol;wCe.exports=LAt});var DCe=_((tKt,SCe)=>{var BCe=D9(),vCe=Object.prototype,MAt=vCe.hasOwnProperty,UAt=vCe.toString,RS=BCe?BCe.toStringTag:void 0;function _At(t){var e=MAt.call(t,RS),r=t[RS];try{t[RS]=void 0;var s=!0}catch{}var a=UAt.call(t);return s&&(e?t[RS]=r:delete t[RS]),a}SCe.exports=_At});var PCe=_((rKt,bCe)=>{var HAt=Object.prototype,jAt=HAt.toString;function GAt(t){return jAt.call(t)}bCe.exports=GAt});var TCe=_((nKt,QCe)=>{var xCe=D9(),qAt=DCe(),WAt=PCe(),YAt=\"[object Null]\",VAt=\"[object Undefined]\",kCe=xCe?xCe.toStringTag:void 0;function JAt(t){return t==null?t===void 0?VAt:YAt:kCe&&kCe in Object(t)?qAt(t):WAt(t)}QCe.exports=JAt});var FCe=_((iKt,RCe)=>{function KAt(t){return t!=null&&typeof t==\"object\"}RCe.exports=KAt});var OCe=_((sKt,NCe)=>{var zAt=TCe(),XAt=FCe(),ZAt=\"[object Symbol]\";function $At(t){return typeof t==\"symbol\"||XAt(t)&&zAt(t)==ZAt}NCe.exports=$At});var _Ce=_((oKt,UCe)=>{var ept=CCe(),LCe=EF(),tpt=OCe(),MCe=NaN,rpt=/^[-+]0x[0-9a-f]+$/i,npt=/^0b[01]+$/i,ipt=/^0o[0-7]+$/i,spt=parseInt;function opt(t){if(typeof t==\"number\")return t;if(tpt(t))return MCe;if(LCe(t)){var e=typeof t.valueOf==\"function\"?t.valueOf():t;t=LCe(e)?e+\"\":e}if(typeof t!=\"string\")return t===0?t:+t;t=ept(t);var r=npt.test(t);return r||ipt.test(t)?spt(t.slice(2),r?2:8):rpt.test(t)?MCe:+t}UCe.exports=opt});var GCe=_((aKt,jCe)=>{var apt=EF(),b9=mCe(),HCe=_Ce(),lpt=\"Expected a function\",cpt=Math.max,upt=Math.min;function fpt(t,e,r){var s,a,n,c,f,p,h=0,E=!1,C=!1,S=!0;if(typeof t!=\"function\")throw new TypeError(lpt);e=HCe(e)||0,apt(r)&&(E=!!r.leading,C=\"maxWait\"in r,n=C?cpt(HCe(r.maxWait)||0,e):n,S=\"trailing\"in r?!!r.trailing:S);function P(le){var me=s,pe=a;return s=a=void 0,h=le,c=t.apply(pe,me),c}function I(le){return h=le,f=setTimeout(U,e),E?P(le):c}function R(le){var me=le-p,pe=le-h,Be=e-me;return C?upt(Be,n-pe):Be}function N(le){var me=le-p,pe=le-h;return p===void 0||me>=e||me<0||C&&pe>=n}function U(){var le=b9();if(N(le))return W(le);f=setTimeout(U,R(le))}function W(le){return f=void 0,S&&s?P(le):(s=a=void 0,c)}function ee(){f!==void 0&&clearTimeout(f),h=0,s=p=a=f=void 0}function ie(){return f===void 0?c:W(b9())}function ue(){var le=b9(),me=N(le);if(s=arguments,a=this,p=le,me){if(f===void 0)return I(p);if(C)return clearTimeout(f),f=setTimeout(U,e),P(p)}return f===void 0&&(f=setTimeout(U,e)),c}return ue.cancel=ee,ue.flush=ie,ue}jCe.exports=fpt});var WCe=_((lKt,qCe)=>{var Apt=GCe(),ppt=EF(),hpt=\"Expected a function\";function gpt(t,e,r){var s=!0,a=!0;if(typeof t!=\"function\")throw new TypeError(hpt);return ppt(r)&&(s=\"leading\"in r?!!r.leading:s,a=\"trailing\"in r?!!r.trailing:a),Apt(t,e,{leading:s,maxWait:e,trailing:a})}qCe.exports=gpt});var x9=_((cKt,P9)=>{\"use strict\";var Cn=P9.exports;P9.exports.default=Cn;var Xn=\"\\x1B[\",NS=\"\\x1B]\",fw=\"\\x07\",IF=\";\",YCe=process.env.TERM_PROGRAM===\"Apple_Terminal\";Cn.cursorTo=(t,e)=>{if(typeof t!=\"number\")throw new TypeError(\"The `x` argument is required\");return typeof e!=\"number\"?Xn+(t+1)+\"G\":Xn+(e+1)+\";\"+(t+1)+\"H\"};Cn.cursorMove=(t,e)=>{if(typeof t!=\"number\")throw new TypeError(\"The `x` argument is required\");let r=\"\";return t<0?r+=Xn+-t+\"D\":t>0&&(r+=Xn+t+\"C\"),e<0?r+=Xn+-e+\"A\":e>0&&(r+=Xn+e+\"B\"),r};Cn.cursorUp=(t=1)=>Xn+t+\"A\";Cn.cursorDown=(t=1)=>Xn+t+\"B\";Cn.cursorForward=(t=1)=>Xn+t+\"C\";Cn.cursorBackward=(t=1)=>Xn+t+\"D\";Cn.cursorLeft=Xn+\"G\";Cn.cursorSavePosition=YCe?\"\\x1B7\":Xn+\"s\";Cn.cursorRestorePosition=YCe?\"\\x1B8\":Xn+\"u\";Cn.cursorGetPosition=Xn+\"6n\";Cn.cursorNextLine=Xn+\"E\";Cn.cursorPrevLine=Xn+\"F\";Cn.cursorHide=Xn+\"?25l\";Cn.cursorShow=Xn+\"?25h\";Cn.eraseLines=t=>{let e=\"\";for(let r=0;r<t;r++)e+=Cn.eraseLine+(r<t-1?Cn.cursorUp():\"\");return t&&(e+=Cn.cursorLeft),e};Cn.eraseEndLine=Xn+\"K\";Cn.eraseStartLine=Xn+\"1K\";Cn.eraseLine=Xn+\"2K\";Cn.eraseDown=Xn+\"J\";Cn.eraseUp=Xn+\"1J\";Cn.eraseScreen=Xn+\"2J\";Cn.scrollUp=Xn+\"S\";Cn.scrollDown=Xn+\"T\";Cn.clearScreen=\"\\x1Bc\";Cn.clearTerminal=process.platform===\"win32\"?`${Cn.eraseScreen}${Xn}0f`:`${Cn.eraseScreen}${Xn}3J${Xn}H`;Cn.beep=fw;Cn.link=(t,e)=>[NS,\"8\",IF,IF,e,fw,t,NS,\"8\",IF,IF,fw].join(\"\");Cn.image=(t,e={})=>{let r=`${NS}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(r+=\";preserveAspectRatio=0\"),r+\":\"+t.toString(\"base64\")+fw};Cn.iTerm={setCwd:(t=process.cwd())=>`${NS}50;CurrentDir=${t}${fw}`,annotation:(t,e={})=>{let r=`${NS}1337;`,s=typeof e.x<\"u\",a=typeof e.y<\"u\";if((s||a)&&!(s&&a&&typeof e.length<\"u\"))throw new Error(\"`x`, `y` and `length` must be defined when `x` or `y` is defined\");return t=t.replace(/\\|/g,\"\"),r+=e.isHidden?\"AddHiddenAnnotation=\":\"AddAnnotation=\",e.length>0?r+=(s?[t,e.length,e.x,e.y]:[e.length,t]).join(\"|\"):r+=t,r+fw}}});var JCe=_((uKt,k9)=>{\"use strict\";var VCe=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};k9.exports=VCe;k9.exports.default=VCe});var zCe=_((fKt,wF)=>{\"use strict\";var dpt=JCe(),CF=new WeakMap,KCe=(t,e={})=>{if(typeof t!=\"function\")throw new TypeError(\"Expected a function\");let r,s=0,a=t.displayName||t.name||\"<anonymous>\",n=function(...c){if(CF.set(n,++s),s===1)r=t.apply(this,c),t=null;else if(e.throw===!0)throw new Error(`Function \\`${a}\\` can only be called once`);return r};return dpt(n,t),CF.set(n,s),n};wF.exports=KCe;wF.exports.default=KCe;wF.exports.callCount=t=>{if(!CF.has(t))throw new Error(`The given function \\`${t.name}\\` is not wrapped by the \\`onetime\\` package`);return CF.get(t)}});var XCe=_((AKt,BF)=>{BF.exports=[\"SIGABRT\",\"SIGALRM\",\"SIGHUP\",\"SIGINT\",\"SIGTERM\"];process.platform!==\"win32\"&&BF.exports.push(\"SIGVTALRM\",\"SIGXCPU\",\"SIGXFSZ\",\"SIGUSR2\",\"SIGTRAP\",\"SIGSYS\",\"SIGQUIT\",\"SIGIOT\");process.platform===\"linux\"&&BF.exports.push(\"SIGIO\",\"SIGPOLL\",\"SIGPWR\",\"SIGSTKFLT\",\"SIGUNUSED\")});var R9=_((pKt,hw)=>{var Qi=global.process,Qm=function(t){return t&&typeof t==\"object\"&&typeof t.removeListener==\"function\"&&typeof t.emit==\"function\"&&typeof t.reallyExit==\"function\"&&typeof t.listeners==\"function\"&&typeof t.kill==\"function\"&&typeof t.pid==\"number\"&&typeof t.on==\"function\"};Qm(Qi)?(ZCe=Ie(\"assert\"),Aw=XCe(),$Ce=/^win/i.test(Qi.platform),OS=Ie(\"events\"),typeof OS!=\"function\"&&(OS=OS.EventEmitter),Qi.__signal_exit_emitter__?Js=Qi.__signal_exit_emitter__:(Js=Qi.__signal_exit_emitter__=new OS,Js.count=0,Js.emitted={}),Js.infinite||(Js.setMaxListeners(1/0),Js.infinite=!0),hw.exports=function(t,e){if(!Qm(global.process))return function(){};ZCe.equal(typeof t,\"function\",\"a callback must be provided for exit handler\"),pw===!1&&Q9();var r=\"exit\";e&&e.alwaysLast&&(r=\"afterexit\");var s=function(){Js.removeListener(r,t),Js.listeners(\"exit\").length===0&&Js.listeners(\"afterexit\").length===0&&vF()};return Js.on(r,t),s},vF=function(){!pw||!Qm(global.process)||(pw=!1,Aw.forEach(function(e){try{Qi.removeListener(e,SF[e])}catch{}}),Qi.emit=DF,Qi.reallyExit=T9,Js.count-=1)},hw.exports.unload=vF,Tm=function(e,r,s){Js.emitted[e]||(Js.emitted[e]=!0,Js.emit(e,r,s))},SF={},Aw.forEach(function(t){SF[t]=function(){if(Qm(global.process)){var r=Qi.listeners(t);r.length===Js.count&&(vF(),Tm(\"exit\",null,t),Tm(\"afterexit\",null,t),$Ce&&t===\"SIGHUP\"&&(t=\"SIGINT\"),Qi.kill(Qi.pid,t))}}}),hw.exports.signals=function(){return Aw},pw=!1,Q9=function(){pw||!Qm(global.process)||(pw=!0,Js.count+=1,Aw=Aw.filter(function(e){try{return Qi.on(e,SF[e]),!0}catch{return!1}}),Qi.emit=twe,Qi.reallyExit=ewe)},hw.exports.load=Q9,T9=Qi.reallyExit,ewe=function(e){Qm(global.process)&&(Qi.exitCode=e||0,Tm(\"exit\",Qi.exitCode,null),Tm(\"afterexit\",Qi.exitCode,null),T9.call(Qi,Qi.exitCode))},DF=Qi.emit,twe=function(e,r){if(e===\"exit\"&&Qm(global.process)){r!==void 0&&(Qi.exitCode=r);var s=DF.apply(this,arguments);return Tm(\"exit\",Qi.exitCode,null),Tm(\"afterexit\",Qi.exitCode,null),s}else return DF.apply(this,arguments)}):hw.exports=function(){return function(){}};var ZCe,Aw,$Ce,OS,Js,vF,Tm,SF,pw,Q9,T9,ewe,DF,twe});var nwe=_((hKt,rwe)=>{\"use strict\";var mpt=zCe(),ypt=R9();rwe.exports=mpt(()=>{ypt(()=>{process.stderr.write(\"\\x1B[?25h\")},{alwaysLast:!0})})});var F9=_(gw=>{\"use strict\";var Ept=nwe(),bF=!1;gw.show=(t=process.stderr)=>{t.isTTY&&(bF=!1,t.write(\"\\x1B[?25h\"))};gw.hide=(t=process.stderr)=>{t.isTTY&&(Ept(),bF=!0,t.write(\"\\x1B[?25l\"))};gw.toggle=(t,e)=>{t!==void 0&&(bF=t),bF?gw.show(e):gw.hide(e)}});var awe=_(LS=>{\"use strict\";var owe=LS&&LS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(LS,\"__esModule\",{value:!0});var iwe=owe(x9()),swe=owe(F9()),Ipt=(t,{showCursor:e=!1}={})=>{let r=0,s=\"\",a=!1,n=c=>{!e&&!a&&(swe.default.hide(),a=!0);let f=c+`\n`;f!==s&&(s=f,t.write(iwe.default.eraseLines(r)+f),r=f.split(`\n`).length)};return n.clear=()=>{t.write(iwe.default.eraseLines(r)),s=\"\",r=0},n.done=()=>{s=\"\",r=0,e||(swe.default.show(),a=!1)},n};LS.default={create:Ipt}});var lwe=_((mKt,Cpt)=>{Cpt.exports=[{name:\"AppVeyor\",constant:\"APPVEYOR\",env:\"APPVEYOR\",pr:\"APPVEYOR_PULL_REQUEST_NUMBER\"},{name:\"Azure Pipelines\",constant:\"AZURE_PIPELINES\",env:\"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI\",pr:\"SYSTEM_PULLREQUEST_PULLREQUESTID\"},{name:\"Bamboo\",constant:\"BAMBOO\",env:\"bamboo_planKey\"},{name:\"Bitbucket Pipelines\",constant:\"BITBUCKET\",env:\"BITBUCKET_COMMIT\",pr:\"BITBUCKET_PR_ID\"},{name:\"Bitrise\",constant:\"BITRISE\",env:\"BITRISE_IO\",pr:\"BITRISE_PULL_REQUEST\"},{name:\"Buddy\",constant:\"BUDDY\",env:\"BUDDY_WORKSPACE_ID\",pr:\"BUDDY_EXECUTION_PULL_REQUEST_ID\"},{name:\"Buildkite\",constant:\"BUILDKITE\",env:\"BUILDKITE\",pr:{env:\"BUILDKITE_PULL_REQUEST\",ne:\"false\"}},{name:\"CircleCI\",constant:\"CIRCLE\",env:\"CIRCLECI\",pr:\"CIRCLE_PULL_REQUEST\"},{name:\"Cirrus CI\",constant:\"CIRRUS\",env:\"CIRRUS_CI\",pr:\"CIRRUS_PR\"},{name:\"AWS CodeBuild\",constant:\"CODEBUILD\",env:\"CODEBUILD_BUILD_ARN\"},{name:\"Codeship\",constant:\"CODESHIP\",env:{CI_NAME:\"codeship\"}},{name:\"Drone\",constant:\"DRONE\",env:\"DRONE\",pr:{DRONE_BUILD_EVENT:\"pull_request\"}},{name:\"dsari\",constant:\"DSARI\",env:\"DSARI\"},{name:\"GitLab CI\",constant:\"GITLAB\",env:\"GITLAB_CI\"},{name:\"GoCD\",constant:\"GOCD\",env:\"GO_PIPELINE_LABEL\"},{name:\"Hudson\",constant:\"HUDSON\",env:\"HUDSON_URL\"},{name:\"Jenkins\",constant:\"JENKINS\",env:[\"JENKINS_URL\",\"BUILD_ID\"],pr:{any:[\"ghprbPullId\",\"CHANGE_ID\"]}},{name:\"Magnum CI\",constant:\"MAGNUM\",env:\"MAGNUM\"},{name:\"Netlify CI\",constant:\"NETLIFY\",env:\"NETLIFY_BUILD_BASE\",pr:{env:\"PULL_REQUEST\",ne:\"false\"}},{name:\"Sail CI\",constant:\"SAIL\",env:\"SAILCI\",pr:\"SAIL_PULL_REQUEST_NUMBER\"},{name:\"Semaphore\",constant:\"SEMAPHORE\",env:\"SEMAPHORE\",pr:\"PULL_REQUEST_NUMBER\"},{name:\"Shippable\",constant:\"SHIPPABLE\",env:\"SHIPPABLE\",pr:{IS_PULL_REQUEST:\"true\"}},{name:\"Solano CI\",constant:\"SOLANO\",env:\"TDDIUM\",pr:\"TDDIUM_PR_ID\"},{name:\"Strider CD\",constant:\"STRIDER\",env:\"STRIDER\"},{name:\"TaskCluster\",constant:\"TASKCLUSTER\",env:[\"TASK_ID\",\"RUN_ID\"]},{name:\"TeamCity\",constant:\"TEAMCITY\",env:\"TEAMCITY_VERSION\"},{name:\"Travis CI\",constant:\"TRAVIS\",env:\"TRAVIS\",pr:{env:\"TRAVIS_PULL_REQUEST\",ne:\"false\"}}]});var fwe=_(tc=>{\"use strict\";var uwe=lwe(),uA=process.env;Object.defineProperty(tc,\"_vendors\",{value:uwe.map(function(t){return t.constant})});tc.name=null;tc.isPR=null;uwe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(s){return cwe(s)});if(tc[t.constant]=r,r)switch(tc.name=t.name,typeof t.pr){case\"string\":tc.isPR=!!uA[t.pr];break;case\"object\":\"env\"in t.pr?tc.isPR=t.pr.env in uA&&uA[t.pr.env]!==t.pr.ne:\"any\"in t.pr?tc.isPR=t.pr.any.some(function(s){return!!uA[s]}):tc.isPR=cwe(t.pr);break;default:tc.isPR=null}});tc.isCI=!!(uA.CI||uA.CONTINUOUS_INTEGRATION||uA.BUILD_NUMBER||uA.RUN_ID||tc.name);function cwe(t){return typeof t==\"string\"?!!uA[t]:Object.keys(t).every(function(e){return uA[e]===t[e]})}});var pwe=_((EKt,Awe)=>{\"use strict\";Awe.exports=fwe().isCI});var gwe=_((IKt,hwe)=>{\"use strict\";var wpt=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};hwe.exports=(t,{include:e,exclude:r}={})=>{let s=a=>{let n=c=>typeof c==\"string\"?a===c:c.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of wpt(t.constructor.prototype)){if(n===\"constructor\"||!s(n))continue;let c=Reflect.getOwnPropertyDescriptor(a,n);c&&typeof c.value==\"function\"&&(t[n]=t[n].bind(t))}return t}});var Cwe=_(Vn=>{\"use strict\";var mw,_S,QF,H9;typeof performance==\"object\"&&typeof performance.now==\"function\"?(dwe=performance,Vn.unstable_now=function(){return dwe.now()}):(N9=Date,mwe=N9.now(),Vn.unstable_now=function(){return N9.now()-mwe});var dwe,N9,mwe;typeof window>\"u\"||typeof MessageChannel!=\"function\"?(dw=null,O9=null,L9=function(){if(dw!==null)try{var t=Vn.unstable_now();dw(!0,t),dw=null}catch(e){throw setTimeout(L9,0),e}},mw=function(t){dw!==null?setTimeout(mw,0,t):(dw=t,setTimeout(L9,0))},_S=function(t,e){O9=setTimeout(t,e)},QF=function(){clearTimeout(O9)},Vn.unstable_shouldYield=function(){return!1},H9=Vn.unstable_forceFrameRate=function(){}):(ywe=window.setTimeout,Ewe=window.clearTimeout,typeof console<\"u\"&&(Iwe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!=\"function\"&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"),typeof Iwe!=\"function\"&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\")),MS=!1,US=null,PF=-1,M9=5,U9=0,Vn.unstable_shouldYield=function(){return Vn.unstable_now()>=U9},H9=function(){},Vn.unstable_forceFrameRate=function(t){0>t||125<t?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):M9=0<t?Math.floor(1e3/t):5},_9=new MessageChannel,xF=_9.port2,_9.port1.onmessage=function(){if(US!==null){var t=Vn.unstable_now();U9=t+M9;try{US(!0,t)?xF.postMessage(null):(MS=!1,US=null)}catch(e){throw xF.postMessage(null),e}}else MS=!1},mw=function(t){US=t,MS||(MS=!0,xF.postMessage(null))},_S=function(t,e){PF=ywe(function(){t(Vn.unstable_now())},e)},QF=function(){Ewe(PF),PF=-1});var dw,O9,L9,ywe,Ewe,Iwe,MS,US,PF,M9,U9,_9,xF;function j9(t,e){var r=t.length;t.push(e);e:for(;;){var s=r-1>>>1,a=t[s];if(a!==void 0&&0<kF(a,e))t[s]=e,t[r]=a,r=s;else break e}}function ef(t){return t=t[0],t===void 0?null:t}function TF(t){var e=t[0];if(e!==void 0){var r=t.pop();if(r!==e){t[0]=r;e:for(var s=0,a=t.length;s<a;){var n=2*(s+1)-1,c=t[n],f=n+1,p=t[f];if(c!==void 0&&0>kF(c,r))p!==void 0&&0>kF(p,c)?(t[s]=p,t[f]=r,s=f):(t[s]=c,t[n]=r,s=n);else if(p!==void 0&&0>kF(p,r))t[s]=p,t[f]=r,s=f;else break e}}return e}return null}function kF(t,e){var r=t.sortIndex-e.sortIndex;return r!==0?r:t.id-e.id}var fA=[],Z0=[],Bpt=1,qc=null,$o=3,RF=!1,Rm=!1,HS=!1;function G9(t){for(var e=ef(Z0);e!==null;){if(e.callback===null)TF(Z0);else if(e.startTime<=t)TF(Z0),e.sortIndex=e.expirationTime,j9(fA,e);else break;e=ef(Z0)}}function q9(t){if(HS=!1,G9(t),!Rm)if(ef(fA)!==null)Rm=!0,mw(W9);else{var e=ef(Z0);e!==null&&_S(q9,e.startTime-t)}}function W9(t,e){Rm=!1,HS&&(HS=!1,QF()),RF=!0;var r=$o;try{for(G9(e),qc=ef(fA);qc!==null&&(!(qc.expirationTime>e)||t&&!Vn.unstable_shouldYield());){var s=qc.callback;if(typeof s==\"function\"){qc.callback=null,$o=qc.priorityLevel;var a=s(qc.expirationTime<=e);e=Vn.unstable_now(),typeof a==\"function\"?qc.callback=a:qc===ef(fA)&&TF(fA),G9(e)}else TF(fA);qc=ef(fA)}if(qc!==null)var n=!0;else{var c=ef(Z0);c!==null&&_S(q9,c.startTime-e),n=!1}return n}finally{qc=null,$o=r,RF=!1}}var vpt=H9;Vn.unstable_IdlePriority=5;Vn.unstable_ImmediatePriority=1;Vn.unstable_LowPriority=4;Vn.unstable_NormalPriority=3;Vn.unstable_Profiling=null;Vn.unstable_UserBlockingPriority=2;Vn.unstable_cancelCallback=function(t){t.callback=null};Vn.unstable_continueExecution=function(){Rm||RF||(Rm=!0,mw(W9))};Vn.unstable_getCurrentPriorityLevel=function(){return $o};Vn.unstable_getFirstCallbackNode=function(){return ef(fA)};Vn.unstable_next=function(t){switch($o){case 1:case 2:case 3:var e=3;break;default:e=$o}var r=$o;$o=e;try{return t()}finally{$o=r}};Vn.unstable_pauseExecution=function(){};Vn.unstable_requestPaint=vpt;Vn.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=$o;$o=t;try{return e()}finally{$o=r}};Vn.unstable_scheduleCallback=function(t,e,r){var s=Vn.unstable_now();switch(typeof r==\"object\"&&r!==null?(r=r.delay,r=typeof r==\"number\"&&0<r?s+r:s):r=s,t){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return a=r+a,t={id:Bpt++,callback:e,priorityLevel:t,startTime:r,expirationTime:a,sortIndex:-1},r>s?(t.sortIndex=r,j9(Z0,t),ef(fA)===null&&t===ef(Z0)&&(HS?QF():HS=!0,_S(q9,r-s))):(t.sortIndex=a,j9(fA,t),Rm||RF||(Rm=!0,mw(W9))),t};Vn.unstable_wrapCallback=function(t){var e=$o;return function(){var r=$o;$o=e;try{return t.apply(this,arguments)}finally{$o=r}}}});var Y9=_((wKt,wwe)=>{\"use strict\";wwe.exports=Cwe()});var Bwe=_((BKt,jS)=>{jS.exports=function(e){var r={},s=y9(),a=hn(),n=Y9();function c(v){for(var D=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+v,Q=1;Q<arguments.length;Q++)D+=\"&args[]=\"+encodeURIComponent(arguments[Q]);return\"Minified React error #\"+v+\"; visit \"+D+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var f=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,p=60103,h=60106,E=60107,C=60108,S=60114,P=60109,I=60110,R=60112,N=60113,U=60120,W=60115,ee=60116,ie=60121,ue=60129,le=60130,me=60131;if(typeof Symbol==\"function\"&&Symbol.for){var pe=Symbol.for;p=pe(\"react.element\"),h=pe(\"react.portal\"),E=pe(\"react.fragment\"),C=pe(\"react.strict_mode\"),S=pe(\"react.profiler\"),P=pe(\"react.provider\"),I=pe(\"react.context\"),R=pe(\"react.forward_ref\"),N=pe(\"react.suspense\"),U=pe(\"react.suspense_list\"),W=pe(\"react.memo\"),ee=pe(\"react.lazy\"),ie=pe(\"react.block\"),pe(\"react.scope\"),ue=pe(\"react.debug_trace_mode\"),le=pe(\"react.offscreen\"),me=pe(\"react.legacy_hidden\")}var Be=typeof Symbol==\"function\"&&Symbol.iterator;function Ce(v){return v===null||typeof v!=\"object\"?null:(v=Be&&v[Be]||v[\"@@iterator\"],typeof v==\"function\"?v:null)}function g(v){if(v==null)return null;if(typeof v==\"function\")return v.displayName||v.name||null;if(typeof v==\"string\")return v;switch(v){case E:return\"Fragment\";case h:return\"Portal\";case S:return\"Profiler\";case C:return\"StrictMode\";case N:return\"Suspense\";case U:return\"SuspenseList\"}if(typeof v==\"object\")switch(v.$$typeof){case I:return(v.displayName||\"Context\")+\".Consumer\";case P:return(v._context.displayName||\"Context\")+\".Provider\";case R:var D=v.render;return D=D.displayName||D.name||\"\",v.displayName||(D!==\"\"?\"ForwardRef(\"+D+\")\":\"ForwardRef\");case W:return g(v.type);case ie:return g(v._render);case ee:D=v._payload,v=v._init;try{return g(v(D))}catch{}}return null}function we(v){var D=v,Q=v;if(v.alternate)for(;D.return;)D=D.return;else{v=D;do D=v,D.flags&1026&&(Q=D.return),v=D.return;while(v)}return D.tag===3?Q:null}function ye(v){if(we(v)!==v)throw Error(c(188))}function Ae(v){var D=v.alternate;if(!D){if(D=we(v),D===null)throw Error(c(188));return D!==v?null:v}for(var Q=v,H=D;;){var V=Q.return;if(V===null)break;var ne=V.alternate;if(ne===null){if(H=V.return,H!==null){Q=H;continue}break}if(V.child===ne.child){for(ne=V.child;ne;){if(ne===Q)return ye(V),v;if(ne===H)return ye(V),D;ne=ne.sibling}throw Error(c(188))}if(Q.return!==H.return)Q=V,H=ne;else{for(var Se=!1,_e=V.child;_e;){if(_e===Q){Se=!0,Q=V,H=ne;break}if(_e===H){Se=!0,H=V,Q=ne;break}_e=_e.sibling}if(!Se){for(_e=ne.child;_e;){if(_e===Q){Se=!0,Q=ne,H=V;break}if(_e===H){Se=!0,H=ne,Q=V;break}_e=_e.sibling}if(!Se)throw Error(c(189))}}if(Q.alternate!==H)throw Error(c(190))}if(Q.tag!==3)throw Error(c(188));return Q.stateNode.current===Q?v:D}function se(v){if(v=Ae(v),!v)return null;for(var D=v;;){if(D.tag===5||D.tag===6)return D;if(D.child)D.child.return=D,D=D.child;else{if(D===v)break;for(;!D.sibling;){if(!D.return||D.return===v)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}}return null}function Z(v){if(v=Ae(v),!v)return null;for(var D=v;;){if(D.tag===5||D.tag===6)return D;if(D.child&&D.tag!==4)D.child.return=D,D=D.child;else{if(D===v)break;for(;!D.sibling;){if(!D.return||D.return===v)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}}return null}function De(v,D){for(var Q=v.alternate;D!==null;){if(D===v||D===Q)return!0;D=D.return}return!1}var Re=e.getPublicInstance,mt=e.getRootHostContext,j=e.getChildHostContext,rt=e.prepareForCommit,Fe=e.resetAfterCommit,Ne=e.createInstance,Pe=e.appendInitialChild,Ve=e.finalizeInitialChildren,ke=e.prepareUpdate,it=e.shouldSetTextContent,Ue=e.createTextInstance,x=e.scheduleTimeout,w=e.cancelTimeout,b=e.noTimeout,y=e.isPrimaryRenderer,F=e.supportsMutation,z=e.supportsPersistence,X=e.supportsHydration,$=e.getInstanceFromNode,oe=e.makeOpaqueHydratingObject,xe=e.makeClientId,Te=e.beforeActiveInstanceBlur,lt=e.afterActiveInstanceBlur,Ct=e.preparePortalMount,qt=e.supportsTestSelectors,ir=e.findFiberRoot,Pt=e.getBoundingRect,gn=e.getTextContent,Pr=e.isHiddenSubtree,Ir=e.matchAccessibilityRole,Or=e.setFocusIfFocusable,on=e.setupIntersectionObserver,ai=e.appendChild,Io=e.appendChildToContainer,rs=e.commitTextUpdate,$s=e.commitMount,Co=e.commitUpdate,ji=e.insertBefore,eo=e.insertInContainerBefore,wo=e.removeChild,QA=e.removeChildFromContainer,Af=e.resetTextContent,dh=e.hideInstance,mh=e.hideTextInstance,to=e.unhideInstance,jn=e.unhideTextInstance,Ts=e.clearContainer,ro=e.cloneInstance,ou=e.createContainerChildSet,au=e.appendChildToContainerChildSet,lu=e.finalizeContainerChildren,TA=e.replaceContainerChildren,RA=e.cloneHiddenInstance,oa=e.cloneHiddenTextInstance,aa=e.canHydrateInstance,FA=e.canHydrateTextInstance,gr=e.isSuspenseInstancePending,Bo=e.isSuspenseInstanceFallback,Me=e.getNextHydratableSibling,cu=e.getFirstHydratableChild,Cr=e.hydrateInstance,pf=e.hydrateTextInstance,NA=e.getNextHydratableInstanceAfterSuspenseInstance,OA=e.commitHydratedContainer,uu=e.commitHydratedSuspenseInstance,fu;function oc(v){if(fu===void 0)try{throw Error()}catch(Q){var D=Q.stack.trim().match(/\\n( *(at )?)/);fu=D&&D[1]||\"\"}return`\n`+fu+v}var ve=!1;function Nt(v,D){if(!v||ve)return\"\";ve=!0;var Q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(D)if(D=function(){throw Error()},Object.defineProperty(D.prototype,\"props\",{set:function(){throw Error()}}),typeof Reflect==\"object\"&&Reflect.construct){try{Reflect.construct(D,[])}catch(pt){var H=pt}Reflect.construct(v,[],D)}else{try{D.call()}catch(pt){H=pt}v.call(D.prototype)}else{try{throw Error()}catch(pt){H=pt}v()}}catch(pt){if(pt&&H&&typeof pt.stack==\"string\"){for(var V=pt.stack.split(`\n`),ne=H.stack.split(`\n`),Se=V.length-1,_e=ne.length-1;1<=Se&&0<=_e&&V[Se]!==ne[_e];)_e--;for(;1<=Se&&0<=_e;Se--,_e--)if(V[Se]!==ne[_e]){if(Se!==1||_e!==1)do if(Se--,_e--,0>_e||V[Se]!==ne[_e])return`\n`+V[Se].replace(\" at new \",\" at \");while(1<=Se&&0<=_e);break}}}finally{ve=!1,Error.prepareStackTrace=Q}return(v=v?v.displayName||v.name:\"\")?oc(v):\"\"}var ac=[],Oi=-1;function no(v){return{current:v}}function Rt(v){0>Oi||(v.current=ac[Oi],ac[Oi]=null,Oi--)}function xn(v,D){Oi++,ac[Oi]=v.current,v.current=D}var la={},Gi=no(la),Li=no(!1),Na=la;function dn(v,D){var Q=v.type.contextTypes;if(!Q)return la;var H=v.stateNode;if(H&&H.__reactInternalMemoizedUnmaskedChildContext===D)return H.__reactInternalMemoizedMaskedChildContext;var V={},ne;for(ne in Q)V[ne]=D[ne];return H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=D,v.__reactInternalMemoizedMaskedChildContext=V),V}function Kn(v){return v=v.childContextTypes,v!=null}function Au(){Rt(Li),Rt(Gi)}function yh(v,D,Q){if(Gi.current!==la)throw Error(c(168));xn(Gi,D),xn(Li,Q)}function Oa(v,D,Q){var H=v.stateNode;if(v=D.childContextTypes,typeof H.getChildContext!=\"function\")return Q;H=H.getChildContext();for(var V in H)if(!(V in v))throw Error(c(108,g(D)||\"Unknown\",V));return s({},Q,H)}function La(v){return v=(v=v.stateNode)&&v.__reactInternalMemoizedMergedChildContext||la,Na=Gi.current,xn(Gi,v),xn(Li,Li.current),!0}function Ma(v,D,Q){var H=v.stateNode;if(!H)throw Error(c(169));Q?(v=Oa(v,D,Na),H.__reactInternalMemoizedMergedChildContext=v,Rt(Li),Rt(Gi),xn(Gi,v)):Rt(Li),xn(Li,Q)}var $e=null,Ua=null,hf=n.unstable_now;hf();var lc=0,wn=8;function ca(v){if(1&v)return wn=15,1;if(2&v)return wn=14,2;if(4&v)return wn=13,4;var D=24&v;return D!==0?(wn=12,D):v&32?(wn=11,32):(D=192&v,D!==0?(wn=10,D):v&256?(wn=9,256):(D=3584&v,D!==0?(wn=8,D):v&4096?(wn=7,4096):(D=4186112&v,D!==0?(wn=6,D):(D=62914560&v,D!==0?(wn=5,D):v&67108864?(wn=4,67108864):v&134217728?(wn=3,134217728):(D=805306368&v,D!==0?(wn=2,D):1073741824&v?(wn=1,1073741824):(wn=8,v))))))}function LA(v){switch(v){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function MA(v){switch(v){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(c(358,v))}}function ua(v,D){var Q=v.pendingLanes;if(Q===0)return wn=0;var H=0,V=0,ne=v.expiredLanes,Se=v.suspendedLanes,_e=v.pingedLanes;if(ne!==0)H=ne,V=wn=15;else if(ne=Q&134217727,ne!==0){var pt=ne&~Se;pt!==0?(H=ca(pt),V=wn):(_e&=ne,_e!==0&&(H=ca(_e),V=wn))}else ne=Q&~Se,ne!==0?(H=ca(ne),V=wn):_e!==0&&(H=ca(_e),V=wn);if(H===0)return 0;if(H=31-ns(H),H=Q&((0>H?0:1<<H)<<1)-1,D!==0&&D!==H&&!(D&Se)){if(ca(D),V<=wn)return D;wn=V}if(D=v.entangledLanes,D!==0)for(v=v.entanglements,D&=H;0<D;)Q=31-ns(D),V=1<<Q,H|=v[Q],D&=~V;return H}function Bl(v){return v=v.pendingLanes&-1073741825,v!==0?v:v&1073741824?1073741824:0}function Mt(v,D){switch(v){case 15:return 1;case 14:return 2;case 12:return v=kn(24&~D),v===0?Mt(10,D):v;case 10:return v=kn(192&~D),v===0?Mt(8,D):v;case 8:return v=kn(3584&~D),v===0&&(v=kn(4186112&~D),v===0&&(v=512)),v;case 2:return D=kn(805306368&~D),D===0&&(D=268435456),D}throw Error(c(358,v))}function kn(v){return v&-v}function fa(v){for(var D=[],Q=0;31>Q;Q++)D.push(v);return D}function Ha(v,D,Q){v.pendingLanes|=D;var H=D-1;v.suspendedLanes&=H,v.pingedLanes&=H,v=v.eventTimes,D=31-ns(D),v[D]=Q}var ns=Math.clz32?Math.clz32:uc,cc=Math.log,pu=Math.LN2;function uc(v){return v===0?32:31-(cc(v)/pu|0)|0}var ja=n.unstable_runWithPriority,Mi=n.unstable_scheduleCallback,Is=n.unstable_cancelCallback,vl=n.unstable_shouldYield,gf=n.unstable_requestPaint,fc=n.unstable_now,wi=n.unstable_getCurrentPriorityLevel,Qn=n.unstable_ImmediatePriority,Ac=n.unstable_UserBlockingPriority,Ke=n.unstable_NormalPriority,st=n.unstable_LowPriority,St=n.unstable_IdlePriority,lr={},te=gf!==void 0?gf:function(){},Ee=null,Oe=null,dt=!1,Et=fc(),bt=1e4>Et?fc:function(){return fc()-Et};function tr(){switch(wi()){case Qn:return 99;case Ac:return 98;case Ke:return 97;case st:return 96;case St:return 95;default:throw Error(c(332))}}function An(v){switch(v){case 99:return Qn;case 98:return Ac;case 97:return Ke;case 96:return st;case 95:return St;default:throw Error(c(332))}}function li(v,D){return v=An(v),ja(v,D)}function qi(v,D,Q){return v=An(v),Mi(v,D,Q)}function Tn(){if(Oe!==null){var v=Oe;Oe=null,Is(v)}Ga()}function Ga(){if(!dt&&Ee!==null){dt=!0;var v=0;try{var D=Ee;li(99,function(){for(;v<D.length;v++){var Q=D[v];do Q=Q(!0);while(Q!==null)}}),Ee=null}catch(Q){throw Ee!==null&&(Ee=Ee.slice(v+1)),Mi(Qn,Tn),Q}finally{dt=!1}}}var my=f.ReactCurrentBatchConfig;function Z1(v,D){return v===D&&(v!==0||1/v===1/D)||v!==v&&D!==D}var vo=typeof Object.is==\"function\"?Object.is:Z1,yy=Object.prototype.hasOwnProperty;function Eh(v,D){if(vo(v,D))return!0;if(typeof v!=\"object\"||v===null||typeof D!=\"object\"||D===null)return!1;var Q=Object.keys(v),H=Object.keys(D);if(Q.length!==H.length)return!1;for(H=0;H<Q.length;H++)if(!yy.call(D,Q[H])||!vo(v[Q[H]],D[Q[H]]))return!1;return!0}function $1(v){switch(v.tag){case 5:return oc(v.type);case 16:return oc(\"Lazy\");case 13:return oc(\"Suspense\");case 19:return oc(\"SuspenseList\");case 0:case 2:case 15:return v=Nt(v.type,!1),v;case 11:return v=Nt(v.type.render,!1),v;case 22:return v=Nt(v.type._render,!1),v;case 1:return v=Nt(v.type,!0),v;default:return\"\"}}function So(v,D){if(v&&v.defaultProps){D=s({},D),v=v.defaultProps;for(var Q in v)D[Q]===void 0&&(D[Q]=v[Q]);return D}return D}var Ih=no(null),Ch=null,hu=null,wh=null;function Fg(){wh=hu=Ch=null}function Ng(v,D){v=v.type._context,y?(xn(Ih,v._currentValue),v._currentValue=D):(xn(Ih,v._currentValue2),v._currentValue2=D)}function Og(v){var D=Ih.current;Rt(Ih),v=v.type._context,y?v._currentValue=D:v._currentValue2=D}function Ey(v,D){for(;v!==null;){var Q=v.alternate;if((v.childLanes&D)===D){if(Q===null||(Q.childLanes&D)===D)break;Q.childLanes|=D}else v.childLanes|=D,Q!==null&&(Q.childLanes|=D);v=v.return}}function df(v,D){Ch=v,wh=hu=null,v=v.dependencies,v!==null&&v.firstContext!==null&&(v.lanes&D&&(Je=!0),v.firstContext=null)}function Do(v,D){if(wh!==v&&D!==!1&&D!==0)if((typeof D!=\"number\"||D===1073741823)&&(wh=v,D=1073741823),D={context:v,observedBits:D,next:null},hu===null){if(Ch===null)throw Error(c(308));hu=D,Ch.dependencies={lanes:0,firstContext:D,responders:null}}else hu=hu.next=D;return y?v._currentValue:v._currentValue2}var Sl=!1;function Bh(v){v.updateQueue={baseState:v.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Lg(v,D){v=v.updateQueue,D.updateQueue===v&&(D.updateQueue={baseState:v.baseState,firstBaseUpdate:v.firstBaseUpdate,lastBaseUpdate:v.lastBaseUpdate,shared:v.shared,effects:v.effects})}function Dl(v,D){return{eventTime:v,lane:D,tag:0,payload:null,callback:null,next:null}}function bl(v,D){if(v=v.updateQueue,v!==null){v=v.shared;var Q=v.pending;Q===null?D.next=D:(D.next=Q.next,Q.next=D),v.pending=D}}function Iy(v,D){var Q=v.updateQueue,H=v.alternate;if(H!==null&&(H=H.updateQueue,Q===H)){var V=null,ne=null;if(Q=Q.firstBaseUpdate,Q!==null){do{var Se={eventTime:Q.eventTime,lane:Q.lane,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null};ne===null?V=ne=Se:ne=ne.next=Se,Q=Q.next}while(Q!==null);ne===null?V=ne=D:ne=ne.next=D}else V=ne=D;Q={baseState:H.baseState,firstBaseUpdate:V,lastBaseUpdate:ne,shared:H.shared,effects:H.effects},v.updateQueue=Q;return}v=Q.lastBaseUpdate,v===null?Q.firstBaseUpdate=D:v.next=D,Q.lastBaseUpdate=D}function UA(v,D,Q,H){var V=v.updateQueue;Sl=!1;var ne=V.firstBaseUpdate,Se=V.lastBaseUpdate,_e=V.shared.pending;if(_e!==null){V.shared.pending=null;var pt=_e,Wt=pt.next;pt.next=null,Se===null?ne=Wt:Se.next=Wt,Se=pt;var Sr=v.alternate;if(Sr!==null){Sr=Sr.updateQueue;var Lr=Sr.lastBaseUpdate;Lr!==Se&&(Lr===null?Sr.firstBaseUpdate=Wt:Lr.next=Wt,Sr.lastBaseUpdate=pt)}}if(ne!==null){Lr=V.baseState,Se=0,Sr=Wt=pt=null;do{_e=ne.lane;var Zt=ne.eventTime;if((H&_e)===_e){Sr!==null&&(Sr=Sr.next={eventTime:Zt,lane:0,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null});e:{var zn=v,yi=ne;switch(_e=D,Zt=Q,yi.tag){case 1:if(zn=yi.payload,typeof zn==\"function\"){Lr=zn.call(Zt,Lr,_e);break e}Lr=zn;break e;case 3:zn.flags=zn.flags&-4097|64;case 0:if(zn=yi.payload,_e=typeof zn==\"function\"?zn.call(Zt,Lr,_e):zn,_e==null)break e;Lr=s({},Lr,_e);break e;case 2:Sl=!0}}ne.callback!==null&&(v.flags|=32,_e=V.effects,_e===null?V.effects=[ne]:_e.push(ne))}else Zt={eventTime:Zt,lane:_e,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},Sr===null?(Wt=Sr=Zt,pt=Lr):Sr=Sr.next=Zt,Se|=_e;if(ne=ne.next,ne===null){if(_e=V.shared.pending,_e===null)break;ne=_e.next,_e.next=null,V.lastBaseUpdate=_e,V.shared.pending=null}}while(!0);Sr===null&&(pt=Lr),V.baseState=pt,V.firstBaseUpdate=Wt,V.lastBaseUpdate=Sr,Zg|=Se,v.lanes=Se,v.memoizedState=Lr}}function Cy(v,D,Q){if(v=D.effects,D.effects=null,v!==null)for(D=0;D<v.length;D++){var H=v[D],V=H.callback;if(V!==null){if(H.callback=null,H=Q,typeof V!=\"function\")throw Error(c(191,V));V.call(H)}}}var wy=new a.Component().refs;function _A(v,D,Q,H){D=v.memoizedState,Q=Q(H,D),Q=Q==null?D:s({},D,Q),v.memoizedState=Q,v.lanes===0&&(v.updateQueue.baseState=Q)}var HA={isMounted:function(v){return(v=v._reactInternals)?we(v)===v:!1},enqueueSetState:function(v,D,Q){v=v._reactInternals;var H=ko(),V=Bs(v),ne=Dl(H,V);ne.payload=D,Q!=null&&(ne.callback=Q),bl(v,ne),Tl(v,V,H)},enqueueReplaceState:function(v,D,Q){v=v._reactInternals;var H=ko(),V=Bs(v),ne=Dl(H,V);ne.tag=1,ne.payload=D,Q!=null&&(ne.callback=Q),bl(v,ne),Tl(v,V,H)},enqueueForceUpdate:function(v,D){v=v._reactInternals;var Q=ko(),H=Bs(v),V=Dl(Q,H);V.tag=2,D!=null&&(V.callback=D),bl(v,V),Tl(v,H,Q)}};function Y(v,D,Q,H,V,ne,Se){return v=v.stateNode,typeof v.shouldComponentUpdate==\"function\"?v.shouldComponentUpdate(H,ne,Se):D.prototype&&D.prototype.isPureReactComponent?!Eh(Q,H)||!Eh(V,ne):!0}function xt(v,D,Q){var H=!1,V=la,ne=D.contextType;return typeof ne==\"object\"&&ne!==null?ne=Do(ne):(V=Kn(D)?Na:Gi.current,H=D.contextTypes,ne=(H=H!=null)?dn(v,V):la),D=new D(Q,ne),v.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,D.updater=HA,v.stateNode=D,D._reactInternals=v,H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=V,v.__reactInternalMemoizedMaskedChildContext=ne),D}function jA(v,D,Q,H){v=D.state,typeof D.componentWillReceiveProps==\"function\"&&D.componentWillReceiveProps(Q,H),typeof D.UNSAFE_componentWillReceiveProps==\"function\"&&D.UNSAFE_componentWillReceiveProps(Q,H),D.state!==v&&HA.enqueueReplaceState(D,D.state,null)}function bo(v,D,Q,H){var V=v.stateNode;V.props=Q,V.state=v.memoizedState,V.refs=wy,Bh(v);var ne=D.contextType;typeof ne==\"object\"&&ne!==null?V.context=Do(ne):(ne=Kn(D)?Na:Gi.current,V.context=dn(v,ne)),UA(v,Q,V,H),V.state=v.memoizedState,ne=D.getDerivedStateFromProps,typeof ne==\"function\"&&(_A(v,D,ne,Q),V.state=v.memoizedState),typeof D.getDerivedStateFromProps==\"function\"||typeof V.getSnapshotBeforeUpdate==\"function\"||typeof V.UNSAFE_componentWillMount!=\"function\"&&typeof V.componentWillMount!=\"function\"||(D=V.state,typeof V.componentWillMount==\"function\"&&V.componentWillMount(),typeof V.UNSAFE_componentWillMount==\"function\"&&V.UNSAFE_componentWillMount(),D!==V.state&&HA.enqueueReplaceState(V,V.state,null),UA(v,Q,V,H),V.state=v.memoizedState),typeof V.componentDidMount==\"function\"&&(v.flags|=4)}var mf=Array.isArray;function yt(v,D,Q){if(v=Q.ref,v!==null&&typeof v!=\"function\"&&typeof v!=\"object\"){if(Q._owner){if(Q=Q._owner,Q){if(Q.tag!==1)throw Error(c(309));var H=Q.stateNode}if(!H)throw Error(c(147,v));var V=\"\"+v;return D!==null&&D.ref!==null&&typeof D.ref==\"function\"&&D.ref._stringRef===V?D.ref:(D=function(ne){var Se=H.refs;Se===wy&&(Se=H.refs={}),ne===null?delete Se[V]:Se[V]=ne},D._stringRef=V,D)}if(typeof v!=\"string\")throw Error(c(284));if(!Q._owner)throw Error(c(290,v))}return v}function gu(v,D){if(v.type!==\"textarea\")throw Error(c(31,Object.prototype.toString.call(D)===\"[object Object]\"?\"object with keys {\"+Object.keys(D).join(\", \")+\"}\":D))}function By(v){function D(et,qe){if(v){var gt=et.lastEffect;gt!==null?(gt.nextEffect=qe,et.lastEffect=qe):et.firstEffect=et.lastEffect=qe,qe.nextEffect=null,qe.flags=8}}function Q(et,qe){if(!v)return null;for(;qe!==null;)D(et,qe),qe=qe.sibling;return null}function H(et,qe){for(et=new Map;qe!==null;)qe.key!==null?et.set(qe.key,qe):et.set(qe.index,qe),qe=qe.sibling;return et}function V(et,qe){return et=Su(et,qe),et.index=0,et.sibling=null,et}function ne(et,qe,gt){return et.index=gt,v?(gt=et.alternate,gt!==null?(gt=gt.index,gt<qe?(et.flags=2,qe):gt):(et.flags=2,qe)):qe}function Se(et){return v&&et.alternate===null&&(et.flags=2),et}function _e(et,qe,gt,Xt){return qe===null||qe.tag!==6?(qe=b2(gt,et.mode,Xt),qe.return=et,qe):(qe=V(qe,gt),qe.return=et,qe)}function pt(et,qe,gt,Xt){return qe!==null&&qe.elementType===gt.type?(Xt=V(qe,gt.props),Xt.ref=yt(et,qe,gt),Xt.return=et,Xt):(Xt=sd(gt.type,gt.key,gt.props,null,et.mode,Xt),Xt.ref=yt(et,qe,gt),Xt.return=et,Xt)}function Wt(et,qe,gt,Xt){return qe===null||qe.tag!==4||qe.stateNode.containerInfo!==gt.containerInfo||qe.stateNode.implementation!==gt.implementation?(qe=Qo(gt,et.mode,Xt),qe.return=et,qe):(qe=V(qe,gt.children||[]),qe.return=et,qe)}function Sr(et,qe,gt,Xt,Dr){return qe===null||qe.tag!==7?(qe=kf(gt,et.mode,Xt,Dr),qe.return=et,qe):(qe=V(qe,gt),qe.return=et,qe)}function Lr(et,qe,gt){if(typeof qe==\"string\"||typeof qe==\"number\")return qe=b2(\"\"+qe,et.mode,gt),qe.return=et,qe;if(typeof qe==\"object\"&&qe!==null){switch(qe.$$typeof){case p:return gt=sd(qe.type,qe.key,qe.props,null,et.mode,gt),gt.ref=yt(et,null,qe),gt.return=et,gt;case h:return qe=Qo(qe,et.mode,gt),qe.return=et,qe}if(mf(qe)||Ce(qe))return qe=kf(qe,et.mode,gt,null),qe.return=et,qe;gu(et,qe)}return null}function Zt(et,qe,gt,Xt){var Dr=qe!==null?qe.key:null;if(typeof gt==\"string\"||typeof gt==\"number\")return Dr!==null?null:_e(et,qe,\"\"+gt,Xt);if(typeof gt==\"object\"&&gt!==null){switch(gt.$$typeof){case p:return gt.key===Dr?gt.type===E?Sr(et,qe,gt.props.children,Xt,Dr):pt(et,qe,gt,Xt):null;case h:return gt.key===Dr?Wt(et,qe,gt,Xt):null}if(mf(gt)||Ce(gt))return Dr!==null?null:Sr(et,qe,gt,Xt,null);gu(et,gt)}return null}function zn(et,qe,gt,Xt,Dr){if(typeof Xt==\"string\"||typeof Xt==\"number\")return et=et.get(gt)||null,_e(qe,et,\"\"+Xt,Dr);if(typeof Xt==\"object\"&&Xt!==null){switch(Xt.$$typeof){case p:return et=et.get(Xt.key===null?gt:Xt.key)||null,Xt.type===E?Sr(qe,et,Xt.props.children,Dr,Xt.key):pt(qe,et,Xt,Dr);case h:return et=et.get(Xt.key===null?gt:Xt.key)||null,Wt(qe,et,Xt,Dr)}if(mf(Xt)||Ce(Xt))return et=et.get(gt)||null,Sr(qe,et,Xt,Dr,null);gu(qe,Xt)}return null}function yi(et,qe,gt,Xt){for(var Dr=null,Zn=null,kr=qe,Rn=qe=0,_n=null;kr!==null&&Rn<gt.length;Rn++){kr.index>Rn?(_n=kr,kr=null):_n=kr.sibling;var zr=Zt(et,kr,gt[Rn],Xt);if(zr===null){kr===null&&(kr=_n);break}v&&kr&&zr.alternate===null&&D(et,kr),qe=ne(zr,qe,Rn),Zn===null?Dr=zr:Zn.sibling=zr,Zn=zr,kr=_n}if(Rn===gt.length)return Q(et,kr),Dr;if(kr===null){for(;Rn<gt.length;Rn++)kr=Lr(et,gt[Rn],Xt),kr!==null&&(qe=ne(kr,qe,Rn),Zn===null?Dr=kr:Zn.sibling=kr,Zn=kr);return Dr}for(kr=H(et,kr);Rn<gt.length;Rn++)_n=zn(kr,et,Rn,gt[Rn],Xt),_n!==null&&(v&&_n.alternate!==null&&kr.delete(_n.key===null?Rn:_n.key),qe=ne(_n,qe,Rn),Zn===null?Dr=_n:Zn.sibling=_n,Zn=_n);return v&&kr.forEach(function(ci){return D(et,ci)}),Dr}function za(et,qe,gt,Xt){var Dr=Ce(gt);if(typeof Dr!=\"function\")throw Error(c(150));if(gt=Dr.call(gt),gt==null)throw Error(c(151));for(var Zn=Dr=null,kr=qe,Rn=qe=0,_n=null,zr=gt.next();kr!==null&&!zr.done;Rn++,zr=gt.next()){kr.index>Rn?(_n=kr,kr=null):_n=kr.sibling;var ci=Zt(et,kr,zr.value,Xt);if(ci===null){kr===null&&(kr=_n);break}v&&kr&&ci.alternate===null&&D(et,kr),qe=ne(ci,qe,Rn),Zn===null?Dr=ci:Zn.sibling=ci,Zn=ci,kr=_n}if(zr.done)return Q(et,kr),Dr;if(kr===null){for(;!zr.done;Rn++,zr=gt.next())zr=Lr(et,zr.value,Xt),zr!==null&&(qe=ne(zr,qe,Rn),Zn===null?Dr=zr:Zn.sibling=zr,Zn=zr);return Dr}for(kr=H(et,kr);!zr.done;Rn++,zr=gt.next())zr=zn(kr,et,Rn,zr.value,Xt),zr!==null&&(v&&zr.alternate!==null&&kr.delete(zr.key===null?Rn:zr.key),qe=ne(zr,qe,Rn),Zn===null?Dr=zr:Zn.sibling=zr,Zn=zr);return v&&kr.forEach(function(Du){return D(et,Du)}),Dr}return function(et,qe,gt,Xt){var Dr=typeof gt==\"object\"&&gt!==null&&gt.type===E&&gt.key===null;Dr&&(gt=gt.props.children);var Zn=typeof gt==\"object\"&&gt!==null;if(Zn)switch(gt.$$typeof){case p:e:{for(Zn=gt.key,Dr=qe;Dr!==null;){if(Dr.key===Zn){switch(Dr.tag){case 7:if(gt.type===E){Q(et,Dr.sibling),qe=V(Dr,gt.props.children),qe.return=et,et=qe;break e}break;default:if(Dr.elementType===gt.type){Q(et,Dr.sibling),qe=V(Dr,gt.props),qe.ref=yt(et,Dr,gt),qe.return=et,et=qe;break e}}Q(et,Dr);break}else D(et,Dr);Dr=Dr.sibling}gt.type===E?(qe=kf(gt.props.children,et.mode,Xt,gt.key),qe.return=et,et=qe):(Xt=sd(gt.type,gt.key,gt.props,null,et.mode,Xt),Xt.ref=yt(et,qe,gt),Xt.return=et,et=Xt)}return Se(et);case h:e:{for(Dr=gt.key;qe!==null;){if(qe.key===Dr)if(qe.tag===4&&qe.stateNode.containerInfo===gt.containerInfo&&qe.stateNode.implementation===gt.implementation){Q(et,qe.sibling),qe=V(qe,gt.children||[]),qe.return=et,et=qe;break e}else{Q(et,qe);break}else D(et,qe);qe=qe.sibling}qe=Qo(gt,et.mode,Xt),qe.return=et,et=qe}return Se(et)}if(typeof gt==\"string\"||typeof gt==\"number\")return gt=\"\"+gt,qe!==null&&qe.tag===6?(Q(et,qe.sibling),qe=V(qe,gt),qe.return=et,et=qe):(Q(et,qe),qe=b2(gt,et.mode,Xt),qe.return=et,et=qe),Se(et);if(mf(gt))return yi(et,qe,gt,Xt);if(Ce(gt))return za(et,qe,gt,Xt);if(Zn&&gu(et,gt),typeof gt>\"u\"&&!Dr)switch(et.tag){case 1:case 22:case 0:case 11:case 15:throw Error(c(152,g(et.type)||\"Component\"))}return Q(et,qe)}}var Mg=By(!0),e2=By(!1),vh={},ur=no(vh),zi=no(vh),yf=no(vh);function qa(v){if(v===vh)throw Error(c(174));return v}function Ug(v,D){xn(yf,D),xn(zi,v),xn(ur,vh),v=mt(D),Rt(ur),xn(ur,v)}function du(){Rt(ur),Rt(zi),Rt(yf)}function Ef(v){var D=qa(yf.current),Q=qa(ur.current);D=j(Q,v.type,D),Q!==D&&(xn(zi,v),xn(ur,D))}function wt(v){zi.current===v&&(Rt(ur),Rt(zi))}var di=no(0);function GA(v){for(var D=v;D!==null;){if(D.tag===13){var Q=D.memoizedState;if(Q!==null&&(Q=Q.dehydrated,Q===null||gr(Q)||Bo(Q)))return D}else if(D.tag===19&&D.memoizedProps.revealOrder!==void 0){if(D.flags&64)return D}else if(D.child!==null){D.child.return=D,D=D.child;continue}if(D===v)break;for(;D.sibling===null;){if(D.return===null||D.return===v)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}return null}var Wa=null,Aa=null,Ya=!1;function _g(v,D){var Q=Ka(5,null,null,0);Q.elementType=\"DELETED\",Q.type=\"DELETED\",Q.stateNode=D,Q.return=v,Q.flags=8,v.lastEffect!==null?(v.lastEffect.nextEffect=Q,v.lastEffect=Q):v.firstEffect=v.lastEffect=Q}function Sh(v,D){switch(v.tag){case 5:return D=aa(D,v.type,v.pendingProps),D!==null?(v.stateNode=D,!0):!1;case 6:return D=FA(D,v.pendingProps),D!==null?(v.stateNode=D,!0):!1;case 13:return!1;default:return!1}}function Hg(v){if(Ya){var D=Aa;if(D){var Q=D;if(!Sh(v,D)){if(D=Me(Q),!D||!Sh(v,D)){v.flags=v.flags&-1025|2,Ya=!1,Wa=v;return}_g(Wa,Q)}Wa=v,Aa=cu(D)}else v.flags=v.flags&-1025|2,Ya=!1,Wa=v}}function vy(v){for(v=v.return;v!==null&&v.tag!==5&&v.tag!==3&&v.tag!==13;)v=v.return;Wa=v}function qA(v){if(!X||v!==Wa)return!1;if(!Ya)return vy(v),Ya=!0,!1;var D=v.type;if(v.tag!==5||D!==\"head\"&&D!==\"body\"&&!it(D,v.memoizedProps))for(D=Aa;D;)_g(v,D),D=Me(D);if(vy(v),v.tag===13){if(!X)throw Error(c(316));if(v=v.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(c(317));Aa=NA(v)}else Aa=Wa?Me(v.stateNode):null;return!0}function jg(){X&&(Aa=Wa=null,Ya=!1)}var mu=[];function yu(){for(var v=0;v<mu.length;v++){var D=mu[v];y?D._workInProgressVersionPrimary=null:D._workInProgressVersionSecondary=null}mu.length=0}var If=f.ReactCurrentDispatcher,Rs=f.ReactCurrentBatchConfig,Eu=0,Gn=null,is=null,Pi=null,WA=!1,Cf=!1;function mn(){throw Error(c(321))}function Gg(v,D){if(D===null)return!1;for(var Q=0;Q<D.length&&Q<v.length;Q++)if(!vo(v[Q],D[Q]))return!1;return!0}function qg(v,D,Q,H,V,ne){if(Eu=ne,Gn=D,D.memoizedState=null,D.updateQueue=null,D.lanes=0,If.current=v===null||v.memoizedState===null?O:K,v=Q(H,V),Cf){ne=0;do{if(Cf=!1,!(25>ne))throw Error(c(301));ne+=1,Pi=is=null,D.updateQueue=null,If.current=re,v=Q(H,V)}while(Cf)}if(If.current=kt,D=is!==null&&is.next!==null,Eu=0,Pi=is=Gn=null,WA=!1,D)throw Error(c(300));return v}function ss(){var v={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pi===null?Gn.memoizedState=Pi=v:Pi=Pi.next=v,Pi}function Pl(){if(is===null){var v=Gn.alternate;v=v!==null?v.memoizedState:null}else v=is.next;var D=Pi===null?Gn.memoizedState:Pi.next;if(D!==null)Pi=D,is=v;else{if(v===null)throw Error(c(310));is=v,v={memoizedState:is.memoizedState,baseState:is.baseState,baseQueue:is.baseQueue,queue:is.queue,next:null},Pi===null?Gn.memoizedState=Pi=v:Pi=Pi.next=v}return Pi}function Po(v,D){return typeof D==\"function\"?D(v):D}function wf(v){var D=Pl(),Q=D.queue;if(Q===null)throw Error(c(311));Q.lastRenderedReducer=v;var H=is,V=H.baseQueue,ne=Q.pending;if(ne!==null){if(V!==null){var Se=V.next;V.next=ne.next,ne.next=Se}H.baseQueue=V=ne,Q.pending=null}if(V!==null){V=V.next,H=H.baseState;var _e=Se=ne=null,pt=V;do{var Wt=pt.lane;if((Eu&Wt)===Wt)_e!==null&&(_e=_e.next={lane:0,action:pt.action,eagerReducer:pt.eagerReducer,eagerState:pt.eagerState,next:null}),H=pt.eagerReducer===v?pt.eagerState:v(H,pt.action);else{var Sr={lane:Wt,action:pt.action,eagerReducer:pt.eagerReducer,eagerState:pt.eagerState,next:null};_e===null?(Se=_e=Sr,ne=H):_e=_e.next=Sr,Gn.lanes|=Wt,Zg|=Wt}pt=pt.next}while(pt!==null&&pt!==V);_e===null?ne=H:_e.next=Se,vo(H,D.memoizedState)||(Je=!0),D.memoizedState=H,D.baseState=ne,D.baseQueue=_e,Q.lastRenderedState=H}return[D.memoizedState,Q.dispatch]}function Bf(v){var D=Pl(),Q=D.queue;if(Q===null)throw Error(c(311));Q.lastRenderedReducer=v;var H=Q.dispatch,V=Q.pending,ne=D.memoizedState;if(V!==null){Q.pending=null;var Se=V=V.next;do ne=v(ne,Se.action),Se=Se.next;while(Se!==V);vo(ne,D.memoizedState)||(Je=!0),D.memoizedState=ne,D.baseQueue===null&&(D.baseState=ne),Q.lastRenderedState=ne}return[ne,H]}function xl(v,D,Q){var H=D._getVersion;H=H(D._source);var V=y?D._workInProgressVersionPrimary:D._workInProgressVersionSecondary;if(V!==null?v=V===H:(v=v.mutableReadLanes,(v=(Eu&v)===v)&&(y?D._workInProgressVersionPrimary=H:D._workInProgressVersionSecondary=H,mu.push(D))),v)return Q(D._source);throw mu.push(D),Error(c(350))}function yn(v,D,Q,H){var V=so;if(V===null)throw Error(c(349));var ne=D._getVersion,Se=ne(D._source),_e=If.current,pt=_e.useState(function(){return xl(V,D,Q)}),Wt=pt[1],Sr=pt[0];pt=Pi;var Lr=v.memoizedState,Zt=Lr.refs,zn=Zt.getSnapshot,yi=Lr.source;Lr=Lr.subscribe;var za=Gn;return v.memoizedState={refs:Zt,source:D,subscribe:H},_e.useEffect(function(){Zt.getSnapshot=Q,Zt.setSnapshot=Wt;var et=ne(D._source);if(!vo(Se,et)){et=Q(D._source),vo(Sr,et)||(Wt(et),et=Bs(za),V.mutableReadLanes|=et&V.pendingLanes),et=V.mutableReadLanes,V.entangledLanes|=et;for(var qe=V.entanglements,gt=et;0<gt;){var Xt=31-ns(gt),Dr=1<<Xt;qe[Xt]|=et,gt&=~Dr}}},[Q,D,H]),_e.useEffect(function(){return H(D._source,function(){var et=Zt.getSnapshot,qe=Zt.setSnapshot;try{qe(et(D._source));var gt=Bs(za);V.mutableReadLanes|=gt&V.pendingLanes}catch(Xt){qe(function(){throw Xt})}})},[D,H]),vo(zn,Q)&&vo(yi,D)&&vo(Lr,H)||(v={pending:null,dispatch:null,lastRenderedReducer:Po,lastRenderedState:Sr},v.dispatch=Wt=xh.bind(null,Gn,v),pt.queue=v,pt.baseQueue=null,Sr=xl(V,D,Q),pt.memoizedState=pt.baseState=Sr),Sr}function xo(v,D,Q){var H=Pl();return yn(H,v,D,Q)}function Iu(v){var D=ss();return typeof v==\"function\"&&(v=v()),D.memoizedState=D.baseState=v,v=D.queue={pending:null,dispatch:null,lastRenderedReducer:Po,lastRenderedState:v},v=v.dispatch=xh.bind(null,Gn,v),[D.memoizedState,v]}function pa(v,D,Q,H){return v={tag:v,create:D,destroy:Q,deps:H,next:null},D=Gn.updateQueue,D===null?(D={lastEffect:null},Gn.updateQueue=D,D.lastEffect=v.next=v):(Q=D.lastEffect,Q===null?D.lastEffect=v.next=v:(H=Q.next,Q.next=v,v.next=H,D.lastEffect=v)),v}function Fs(v){var D=ss();return v={current:v},D.memoizedState=v}function Dh(){return Pl().memoizedState}function YA(v,D,Q,H){var V=ss();Gn.flags|=v,V.memoizedState=pa(1|D,Q,void 0,H===void 0?null:H)}function vf(v,D,Q,H){var V=Pl();H=H===void 0?null:H;var ne=void 0;if(is!==null){var Se=is.memoizedState;if(ne=Se.destroy,H!==null&&Gg(H,Se.deps)){pa(D,Q,ne,H);return}}Gn.flags|=v,V.memoizedState=pa(1|D,Q,ne,H)}function io(v,D){return YA(516,4,v,D)}function Zr(v,D){return vf(516,4,v,D)}function bh(v,D){return vf(4,2,v,D)}function VA(v,D){if(typeof D==\"function\")return v=v(),D(v),function(){D(null)};if(D!=null)return v=v(),D.current=v,function(){D.current=null}}function Sy(v,D,Q){return Q=Q!=null?Q.concat([v]):null,vf(4,2,VA.bind(null,D,v),Q)}function Wg(){}function Ph(v,D){var Q=Pl();D=D===void 0?null:D;var H=Q.memoizedState;return H!==null&&D!==null&&Gg(D,H[1])?H[0]:(Q.memoizedState=[v,D],v)}function pc(v,D){var Q=Pl();D=D===void 0?null:D;var H=Q.memoizedState;return H!==null&&D!==null&&Gg(D,H[1])?H[0]:(v=v(),Q.memoizedState=[v,D],v)}function Dy(v,D){var Q=tr();li(98>Q?98:Q,function(){v(!0)}),li(97<Q?97:Q,function(){var H=Rs.transition;Rs.transition=1;try{v(!1),D()}finally{Rs.transition=H}})}function xh(v,D,Q){var H=ko(),V=Bs(v),ne={lane:V,action:Q,eagerReducer:null,eagerState:null,next:null},Se=D.pending;if(Se===null?ne.next=ne:(ne.next=Se.next,Se.next=ne),D.pending=ne,Se=v.alternate,v===Gn||Se!==null&&Se===Gn)Cf=WA=!0;else{if(v.lanes===0&&(Se===null||Se.lanes===0)&&(Se=D.lastRenderedReducer,Se!==null))try{var _e=D.lastRenderedState,pt=Se(_e,Q);if(ne.eagerReducer=Se,ne.eagerState=pt,vo(pt,_e))return}catch{}finally{}Tl(v,V,H)}}var kt={readContext:Do,useCallback:mn,useContext:mn,useEffect:mn,useImperativeHandle:mn,useLayoutEffect:mn,useMemo:mn,useReducer:mn,useRef:mn,useState:mn,useDebugValue:mn,useDeferredValue:mn,useTransition:mn,useMutableSource:mn,useOpaqueIdentifier:mn,unstable_isNewReconciler:!1},O={readContext:Do,useCallback:function(v,D){return ss().memoizedState=[v,D===void 0?null:D],v},useContext:Do,useEffect:io,useImperativeHandle:function(v,D,Q){return Q=Q!=null?Q.concat([v]):null,YA(4,2,VA.bind(null,D,v),Q)},useLayoutEffect:function(v,D){return YA(4,2,v,D)},useMemo:function(v,D){var Q=ss();return D=D===void 0?null:D,v=v(),Q.memoizedState=[v,D],v},useReducer:function(v,D,Q){var H=ss();return D=Q!==void 0?Q(D):D,H.memoizedState=H.baseState=D,v=H.queue={pending:null,dispatch:null,lastRenderedReducer:v,lastRenderedState:D},v=v.dispatch=xh.bind(null,Gn,v),[H.memoizedState,v]},useRef:Fs,useState:Iu,useDebugValue:Wg,useDeferredValue:function(v){var D=Iu(v),Q=D[0],H=D[1];return io(function(){var V=Rs.transition;Rs.transition=1;try{H(v)}finally{Rs.transition=V}},[v]),Q},useTransition:function(){var v=Iu(!1),D=v[0];return v=Dy.bind(null,v[1]),Fs(v),[v,D]},useMutableSource:function(v,D,Q){var H=ss();return H.memoizedState={refs:{getSnapshot:D,setSnapshot:null},source:v,subscribe:Q},yn(H,v,D,Q)},useOpaqueIdentifier:function(){if(Ya){var v=!1,D=oe(function(){throw v||(v=!0,Q(xe())),Error(c(355))}),Q=Iu(D)[1];return!(Gn.mode&2)&&(Gn.flags|=516,pa(5,function(){Q(xe())},void 0,null)),D}return D=xe(),Iu(D),D},unstable_isNewReconciler:!1},K={readContext:Do,useCallback:Ph,useContext:Do,useEffect:Zr,useImperativeHandle:Sy,useLayoutEffect:bh,useMemo:pc,useReducer:wf,useRef:Dh,useState:function(){return wf(Po)},useDebugValue:Wg,useDeferredValue:function(v){var D=wf(Po),Q=D[0],H=D[1];return Zr(function(){var V=Rs.transition;Rs.transition=1;try{H(v)}finally{Rs.transition=V}},[v]),Q},useTransition:function(){var v=wf(Po)[0];return[Dh().current,v]},useMutableSource:xo,useOpaqueIdentifier:function(){return wf(Po)[0]},unstable_isNewReconciler:!1},re={readContext:Do,useCallback:Ph,useContext:Do,useEffect:Zr,useImperativeHandle:Sy,useLayoutEffect:bh,useMemo:pc,useReducer:Bf,useRef:Dh,useState:function(){return Bf(Po)},useDebugValue:Wg,useDeferredValue:function(v){var D=Bf(Po),Q=D[0],H=D[1];return Zr(function(){var V=Rs.transition;Rs.transition=1;try{H(v)}finally{Rs.transition=V}},[v]),Q},useTransition:function(){var v=Bf(Po)[0];return[Dh().current,v]},useMutableSource:xo,useOpaqueIdentifier:function(){return Bf(Po)[0]},unstable_isNewReconciler:!1},de=f.ReactCurrentOwner,Je=!1;function At(v,D,Q,H){D.child=v===null?e2(D,null,Q,H):Mg(D,v.child,Q,H)}function dr(v,D,Q,H,V){Q=Q.render;var ne=D.ref;return df(D,V),H=qg(v,D,Q,H,ne,V),v!==null&&!Je?(D.updateQueue=v.updateQueue,D.flags&=-517,v.lanes&=~V,qn(v,D,V)):(D.flags|=1,At(v,D,H,V),D.child)}function vr(v,D,Q,H,V,ne){if(v===null){var Se=Q.type;return typeof Se==\"function\"&&!S2(Se)&&Se.defaultProps===void 0&&Q.compare===null&&Q.defaultProps===void 0?(D.tag=15,D.type=Se,Un(v,D,Se,H,V,ne)):(v=sd(Q.type,null,H,D,D.mode,ne),v.ref=D.ref,v.return=D,D.child=v)}return Se=v.child,!(V&ne)&&(V=Se.memoizedProps,Q=Q.compare,Q=Q!==null?Q:Eh,Q(V,H)&&v.ref===D.ref)?qn(v,D,ne):(D.flags|=1,v=Su(Se,H),v.ref=D.ref,v.return=D,D.child=v)}function Un(v,D,Q,H,V,ne){if(v!==null&&Eh(v.memoizedProps,H)&&v.ref===D.ref)if(Je=!1,(ne&V)!==0)v.flags&16384&&(Je=!0);else return D.lanes=v.lanes,qn(v,D,ne);return JA(v,D,Q,H,ne)}function mi(v,D,Q){var H=D.pendingProps,V=H.children,ne=v!==null?v.memoizedState:null;if(H.mode===\"hidden\"||H.mode===\"unstable-defer-without-hiding\")if(!(D.mode&4))D.memoizedState={baseLanes:0},qy(D,Q);else if(Q&1073741824)D.memoizedState={baseLanes:0},qy(D,ne!==null?ne.baseLanes:Q);else return v=ne!==null?ne.baseLanes|Q:Q,D.lanes=D.childLanes=1073741824,D.memoizedState={baseLanes:v},qy(D,v),null;else ne!==null?(H=ne.baseLanes|Q,D.memoizedState=null):H=Q,qy(D,H);return At(v,D,V,Q),D.child}function Cs(v,D){var Q=D.ref;(v===null&&Q!==null||v!==null&&v.ref!==Q)&&(D.flags|=128)}function JA(v,D,Q,H,V){var ne=Kn(Q)?Na:Gi.current;return ne=dn(D,ne),df(D,V),Q=qg(v,D,Q,H,ne,V),v!==null&&!Je?(D.updateQueue=v.updateQueue,D.flags&=-517,v.lanes&=~V,qn(v,D,V)):(D.flags|=1,At(v,D,Q,V),D.child)}function lP(v,D,Q,H,V){if(Kn(Q)){var ne=!0;La(D)}else ne=!1;if(df(D,V),D.stateNode===null)v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),xt(D,Q,H),bo(D,Q,H,V),H=!0;else if(v===null){var Se=D.stateNode,_e=D.memoizedProps;Se.props=_e;var pt=Se.context,Wt=Q.contextType;typeof Wt==\"object\"&&Wt!==null?Wt=Do(Wt):(Wt=Kn(Q)?Na:Gi.current,Wt=dn(D,Wt));var Sr=Q.getDerivedStateFromProps,Lr=typeof Sr==\"function\"||typeof Se.getSnapshotBeforeUpdate==\"function\";Lr||typeof Se.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof Se.componentWillReceiveProps!=\"function\"||(_e!==H||pt!==Wt)&&jA(D,Se,H,Wt),Sl=!1;var Zt=D.memoizedState;Se.state=Zt,UA(D,H,Se,V),pt=D.memoizedState,_e!==H||Zt!==pt||Li.current||Sl?(typeof Sr==\"function\"&&(_A(D,Q,Sr,H),pt=D.memoizedState),(_e=Sl||Y(D,Q,_e,H,Zt,pt,Wt))?(Lr||typeof Se.UNSAFE_componentWillMount!=\"function\"&&typeof Se.componentWillMount!=\"function\"||(typeof Se.componentWillMount==\"function\"&&Se.componentWillMount(),typeof Se.UNSAFE_componentWillMount==\"function\"&&Se.UNSAFE_componentWillMount()),typeof Se.componentDidMount==\"function\"&&(D.flags|=4)):(typeof Se.componentDidMount==\"function\"&&(D.flags|=4),D.memoizedProps=H,D.memoizedState=pt),Se.props=H,Se.state=pt,Se.context=Wt,H=_e):(typeof Se.componentDidMount==\"function\"&&(D.flags|=4),H=!1)}else{Se=D.stateNode,Lg(v,D),_e=D.memoizedProps,Wt=D.type===D.elementType?_e:So(D.type,_e),Se.props=Wt,Lr=D.pendingProps,Zt=Se.context,pt=Q.contextType,typeof pt==\"object\"&&pt!==null?pt=Do(pt):(pt=Kn(Q)?Na:Gi.current,pt=dn(D,pt));var zn=Q.getDerivedStateFromProps;(Sr=typeof zn==\"function\"||typeof Se.getSnapshotBeforeUpdate==\"function\")||typeof Se.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof Se.componentWillReceiveProps!=\"function\"||(_e!==Lr||Zt!==pt)&&jA(D,Se,H,pt),Sl=!1,Zt=D.memoizedState,Se.state=Zt,UA(D,H,Se,V);var yi=D.memoizedState;_e!==Lr||Zt!==yi||Li.current||Sl?(typeof zn==\"function\"&&(_A(D,Q,zn,H),yi=D.memoizedState),(Wt=Sl||Y(D,Q,Wt,H,Zt,yi,pt))?(Sr||typeof Se.UNSAFE_componentWillUpdate!=\"function\"&&typeof Se.componentWillUpdate!=\"function\"||(typeof Se.componentWillUpdate==\"function\"&&Se.componentWillUpdate(H,yi,pt),typeof Se.UNSAFE_componentWillUpdate==\"function\"&&Se.UNSAFE_componentWillUpdate(H,yi,pt)),typeof Se.componentDidUpdate==\"function\"&&(D.flags|=4),typeof Se.getSnapshotBeforeUpdate==\"function\"&&(D.flags|=256)):(typeof Se.componentDidUpdate!=\"function\"||_e===v.memoizedProps&&Zt===v.memoizedState||(D.flags|=4),typeof Se.getSnapshotBeforeUpdate!=\"function\"||_e===v.memoizedProps&&Zt===v.memoizedState||(D.flags|=256),D.memoizedProps=H,D.memoizedState=yi),Se.props=H,Se.state=yi,Se.context=pt,H=Wt):(typeof Se.componentDidUpdate!=\"function\"||_e===v.memoizedProps&&Zt===v.memoizedState||(D.flags|=4),typeof Se.getSnapshotBeforeUpdate!=\"function\"||_e===v.memoizedProps&&Zt===v.memoizedState||(D.flags|=256),H=!1)}return t2(v,D,Q,H,ne,V)}function t2(v,D,Q,H,V,ne){Cs(v,D);var Se=(D.flags&64)!==0;if(!H&&!Se)return V&&Ma(D,Q,!1),qn(v,D,ne);H=D.stateNode,de.current=D;var _e=Se&&typeof Q.getDerivedStateFromError!=\"function\"?null:H.render();return D.flags|=1,v!==null&&Se?(D.child=Mg(D,v.child,null,ne),D.child=Mg(D,null,_e,ne)):At(v,D,_e,ne),D.memoizedState=H.state,V&&Ma(D,Q,!0),D.child}function by(v){var D=v.stateNode;D.pendingContext?yh(v,D.pendingContext,D.pendingContext!==D.context):D.context&&yh(v,D.context,!1),Ug(v,D.containerInfo)}var kh={dehydrated:null,retryLane:0};function r2(v,D,Q){var H=D.pendingProps,V=di.current,ne=!1,Se;return(Se=(D.flags&64)!==0)||(Se=v!==null&&v.memoizedState===null?!1:(V&2)!==0),Se?(ne=!0,D.flags&=-65):v!==null&&v.memoizedState===null||H.fallback===void 0||H.unstable_avoidThisFallback===!0||(V|=1),xn(di,V&1),v===null?(H.fallback!==void 0&&Hg(D),v=H.children,V=H.fallback,ne?(v=Va(D,v,V,Q),D.child.memoizedState={baseLanes:Q},D.memoizedState=kh,v):typeof H.unstable_expectedLoadTime==\"number\"?(v=Va(D,v,V,Q),D.child.memoizedState={baseLanes:Q},D.memoizedState=kh,D.lanes=33554432,v):(Q=D2({mode:\"visible\",children:v},D.mode,Q,null),Q.return=D,D.child=Q)):v.memoizedState!==null?ne?(H=KA(v,D,H.children,H.fallback,Q),ne=D.child,V=v.child.memoizedState,ne.memoizedState=V===null?{baseLanes:Q}:{baseLanes:V.baseLanes|Q},ne.childLanes=v.childLanes&~Q,D.memoizedState=kh,H):(Q=n2(v,D,H.children,Q),D.memoizedState=null,Q):ne?(H=KA(v,D,H.children,H.fallback,Q),ne=D.child,V=v.child.memoizedState,ne.memoizedState=V===null?{baseLanes:Q}:{baseLanes:V.baseLanes|Q},ne.childLanes=v.childLanes&~Q,D.memoizedState=kh,H):(Q=n2(v,D,H.children,Q),D.memoizedState=null,Q)}function Va(v,D,Q,H){var V=v.mode,ne=v.child;return D={mode:\"hidden\",children:D},!(V&2)&&ne!==null?(ne.childLanes=0,ne.pendingProps=D):ne=D2(D,V,0,null),Q=kf(Q,V,H,null),ne.return=v,Q.return=v,ne.sibling=Q,v.child=ne,Q}function n2(v,D,Q,H){var V=v.child;return v=V.sibling,Q=Su(V,{mode:\"visible\",children:Q}),!(D.mode&2)&&(Q.lanes=H),Q.return=D,Q.sibling=null,v!==null&&(v.nextEffect=null,v.flags=8,D.firstEffect=D.lastEffect=v),D.child=Q}function KA(v,D,Q,H,V){var ne=D.mode,Se=v.child;v=Se.sibling;var _e={mode:\"hidden\",children:Q};return!(ne&2)&&D.child!==Se?(Q=D.child,Q.childLanes=0,Q.pendingProps=_e,Se=Q.lastEffect,Se!==null?(D.firstEffect=Q.firstEffect,D.lastEffect=Se,Se.nextEffect=null):D.firstEffect=D.lastEffect=null):Q=Su(Se,_e),v!==null?H=Su(v,H):(H=kf(H,ne,V,null),H.flags|=2),H.return=D,Q.return=D,Q.sibling=H,D.child=Q,H}function Qh(v,D){v.lanes|=D;var Q=v.alternate;Q!==null&&(Q.lanes|=D),Ey(v.return,D)}function Py(v,D,Q,H,V,ne){var Se=v.memoizedState;Se===null?v.memoizedState={isBackwards:D,rendering:null,renderingStartTime:0,last:H,tail:Q,tailMode:V,lastEffect:ne}:(Se.isBackwards=D,Se.rendering=null,Se.renderingStartTime=0,Se.last=H,Se.tail=Q,Se.tailMode=V,Se.lastEffect=ne)}function cP(v,D,Q){var H=D.pendingProps,V=H.revealOrder,ne=H.tail;if(At(v,D,H.children,Q),H=di.current,H&2)H=H&1|2,D.flags|=64;else{if(v!==null&&v.flags&64)e:for(v=D.child;v!==null;){if(v.tag===13)v.memoizedState!==null&&Qh(v,Q);else if(v.tag===19)Qh(v,Q);else if(v.child!==null){v.child.return=v,v=v.child;continue}if(v===D)break e;for(;v.sibling===null;){if(v.return===null||v.return===D)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}H&=1}if(xn(di,H),!(D.mode&2))D.memoizedState=null;else switch(V){case\"forwards\":for(Q=D.child,V=null;Q!==null;)v=Q.alternate,v!==null&&GA(v)===null&&(V=Q),Q=Q.sibling;Q=V,Q===null?(V=D.child,D.child=null):(V=Q.sibling,Q.sibling=null),Py(D,!1,V,Q,ne,D.lastEffect);break;case\"backwards\":for(Q=null,V=D.child,D.child=null;V!==null;){if(v=V.alternate,v!==null&&GA(v)===null){D.child=V;break}v=V.sibling,V.sibling=Q,Q=V,V=v}Py(D,!0,Q,null,ne,D.lastEffect);break;case\"together\":Py(D,!1,null,null,void 0,D.lastEffect);break;default:D.memoizedState=null}return D.child}function qn(v,D,Q){if(v!==null&&(D.dependencies=v.dependencies),Zg|=D.lanes,Q&D.childLanes){if(v!==null&&D.child!==v.child)throw Error(c(153));if(D.child!==null){for(v=D.child,Q=Su(v,v.pendingProps),D.child=Q,Q.return=D;v.sibling!==null;)v=v.sibling,Q=Q.sibling=Su(v,v.pendingProps),Q.return=D;Q.sibling=null}return D.child}return null}function os(v){v.flags|=4}var kl,Ql,Cu,ha;if(F)kl=function(v,D){for(var Q=D.child;Q!==null;){if(Q.tag===5||Q.tag===6)Pe(v,Q.stateNode);else if(Q.tag!==4&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}},Ql=function(){},Cu=function(v,D,Q,H,V){if(v=v.memoizedProps,v!==H){var ne=D.stateNode,Se=qa(ur.current);Q=ke(ne,Q,v,H,V,Se),(D.updateQueue=Q)&&os(D)}},ha=function(v,D,Q,H){Q!==H&&os(D)};else if(z){kl=function(v,D,Q,H){for(var V=D.child;V!==null;){if(V.tag===5){var ne=V.stateNode;Q&&H&&(ne=RA(ne,V.type,V.memoizedProps,V)),Pe(v,ne)}else if(V.tag===6)ne=V.stateNode,Q&&H&&(ne=oa(ne,V.memoizedProps,V)),Pe(v,ne);else if(V.tag!==4){if(V.tag===13&&V.flags&4&&(ne=V.memoizedState!==null)){var Se=V.child;if(Se!==null&&(Se.child!==null&&(Se.child.return=Se,kl(v,Se,!0,ne)),ne=Se.sibling,ne!==null)){ne.return=V,V=ne;continue}}if(V.child!==null){V.child.return=V,V=V.child;continue}}if(V===D)break;for(;V.sibling===null;){if(V.return===null||V.return===D)return;V=V.return}V.sibling.return=V.return,V=V.sibling}};var zA=function(v,D,Q,H){for(var V=D.child;V!==null;){if(V.tag===5){var ne=V.stateNode;Q&&H&&(ne=RA(ne,V.type,V.memoizedProps,V)),au(v,ne)}else if(V.tag===6)ne=V.stateNode,Q&&H&&(ne=oa(ne,V.memoizedProps,V)),au(v,ne);else if(V.tag!==4){if(V.tag===13&&V.flags&4&&(ne=V.memoizedState!==null)){var Se=V.child;if(Se!==null&&(Se.child!==null&&(Se.child.return=Se,zA(v,Se,!0,ne)),ne=Se.sibling,ne!==null)){ne.return=V,V=ne;continue}}if(V.child!==null){V.child.return=V,V=V.child;continue}}if(V===D)break;for(;V.sibling===null;){if(V.return===null||V.return===D)return;V=V.return}V.sibling.return=V.return,V=V.sibling}};Ql=function(v){var D=v.stateNode;if(v.firstEffect!==null){var Q=D.containerInfo,H=ou(Q);zA(H,v,!1,!1),D.pendingChildren=H,os(v),lu(Q,H)}},Cu=function(v,D,Q,H,V){var ne=v.stateNode,Se=v.memoizedProps;if((v=D.firstEffect===null)&&Se===H)D.stateNode=ne;else{var _e=D.stateNode,pt=qa(ur.current),Wt=null;Se!==H&&(Wt=ke(_e,Q,Se,H,V,pt)),v&&Wt===null?D.stateNode=ne:(ne=ro(ne,Wt,Q,Se,H,D,v,_e),Ve(ne,Q,H,V,pt)&&os(D),D.stateNode=ne,v?os(D):kl(ne,D,!1,!1))}},ha=function(v,D,Q,H){Q!==H?(v=qa(yf.current),Q=qa(ur.current),D.stateNode=Ue(H,v,Q,D),os(D)):D.stateNode=v.stateNode}}else Ql=function(){},Cu=function(){},ha=function(){};function XA(v,D){if(!Ya)switch(v.tailMode){case\"hidden\":D=v.tail;for(var Q=null;D!==null;)D.alternate!==null&&(Q=D),D=D.sibling;Q===null?v.tail=null:Q.sibling=null;break;case\"collapsed\":Q=v.tail;for(var H=null;Q!==null;)Q.alternate!==null&&(H=Q),Q=Q.sibling;H===null?D||v.tail===null?v.tail=null:v.tail.sibling=null:H.sibling=null}}function jL(v,D,Q){var H=D.pendingProps;switch(D.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Kn(D.type)&&Au(),null;case 3:return du(),Rt(Li),Rt(Gi),yu(),H=D.stateNode,H.pendingContext&&(H.context=H.pendingContext,H.pendingContext=null),(v===null||v.child===null)&&(qA(D)?os(D):H.hydrate||(D.flags|=256)),Ql(D),null;case 5:wt(D);var V=qa(yf.current);if(Q=D.type,v!==null&&D.stateNode!=null)Cu(v,D,Q,H,V),v.ref!==D.ref&&(D.flags|=128);else{if(!H){if(D.stateNode===null)throw Error(c(166));return null}if(v=qa(ur.current),qA(D)){if(!X)throw Error(c(175));v=Cr(D.stateNode,D.type,D.memoizedProps,V,v,D),D.updateQueue=v,v!==null&&os(D)}else{var ne=Ne(Q,H,V,v,D);kl(ne,D,!1,!1),D.stateNode=ne,Ve(ne,Q,H,V,v)&&os(D)}D.ref!==null&&(D.flags|=128)}return null;case 6:if(v&&D.stateNode!=null)ha(v,D,v.memoizedProps,H);else{if(typeof H!=\"string\"&&D.stateNode===null)throw Error(c(166));if(v=qa(yf.current),V=qa(ur.current),qA(D)){if(!X)throw Error(c(176));pf(D.stateNode,D.memoizedProps,D)&&os(D)}else D.stateNode=Ue(H,v,V,D)}return null;case 13:return Rt(di),H=D.memoizedState,D.flags&64?(D.lanes=Q,D):(H=H!==null,V=!1,v===null?D.memoizedProps.fallback!==void 0&&qA(D):V=v.memoizedState!==null,H&&!V&&D.mode&2&&(v===null&&D.memoizedProps.unstable_avoidThisFallback!==!0||di.current&1?ws===0&&(ws=3):((ws===0||ws===3)&&(ws=4),so===null||!(Zg&134217727)&&!(Fh&134217727)||Nh(so,Ns))),z&&H&&(D.flags|=4),F&&(H||V)&&(D.flags|=4),null);case 4:return du(),Ql(D),v===null&&Ct(D.stateNode.containerInfo),null;case 10:return Og(D),null;case 17:return Kn(D.type)&&Au(),null;case 19:if(Rt(di),H=D.memoizedState,H===null)return null;if(V=(D.flags&64)!==0,ne=H.rendering,ne===null)if(V)XA(H,!1);else{if(ws!==0||v!==null&&v.flags&64)for(v=D.child;v!==null;){if(ne=GA(v),ne!==null){for(D.flags|=64,XA(H,!1),v=ne.updateQueue,v!==null&&(D.updateQueue=v,D.flags|=4),H.lastEffect===null&&(D.firstEffect=null),D.lastEffect=H.lastEffect,v=Q,H=D.child;H!==null;)V=H,Q=v,V.flags&=2,V.nextEffect=null,V.firstEffect=null,V.lastEffect=null,ne=V.alternate,ne===null?(V.childLanes=0,V.lanes=Q,V.child=null,V.memoizedProps=null,V.memoizedState=null,V.updateQueue=null,V.dependencies=null,V.stateNode=null):(V.childLanes=ne.childLanes,V.lanes=ne.lanes,V.child=ne.child,V.memoizedProps=ne.memoizedProps,V.memoizedState=ne.memoizedState,V.updateQueue=ne.updateQueue,V.type=ne.type,Q=ne.dependencies,V.dependencies=Q===null?null:{lanes:Q.lanes,firstContext:Q.firstContext}),H=H.sibling;return xn(di,di.current&1|2),D.child}v=v.sibling}H.tail!==null&&bt()>m2&&(D.flags|=64,V=!0,XA(H,!1),D.lanes=33554432)}else{if(!V)if(v=GA(ne),v!==null){if(D.flags|=64,V=!0,v=v.updateQueue,v!==null&&(D.updateQueue=v,D.flags|=4),XA(H,!0),H.tail===null&&H.tailMode===\"hidden\"&&!ne.alternate&&!Ya)return D=D.lastEffect=H.lastEffect,D!==null&&(D.nextEffect=null),null}else 2*bt()-H.renderingStartTime>m2&&Q!==1073741824&&(D.flags|=64,V=!0,XA(H,!1),D.lanes=33554432);H.isBackwards?(ne.sibling=D.child,D.child=ne):(v=H.last,v!==null?v.sibling=ne:D.child=ne,H.last=ne)}return H.tail!==null?(v=H.tail,H.rendering=v,H.tail=v.sibling,H.lastEffect=D.lastEffect,H.renderingStartTime=bt(),v.sibling=null,D=di.current,xn(di,V?D&1|2:D&1),v):null;case 23:case 24:return B2(),v!==null&&v.memoizedState!==null!=(D.memoizedState!==null)&&H.mode!==\"unstable-defer-without-hiding\"&&(D.flags|=4),null}throw Error(c(156,D.tag))}function qL(v){switch(v.tag){case 1:Kn(v.type)&&Au();var D=v.flags;return D&4096?(v.flags=D&-4097|64,v):null;case 3:if(du(),Rt(Li),Rt(Gi),yu(),D=v.flags,D&64)throw Error(c(285));return v.flags=D&-4097|64,v;case 5:return wt(v),null;case 13:return Rt(di),D=v.flags,D&4096?(v.flags=D&-4097|64,v):null;case 19:return Rt(di),null;case 4:return du(),null;case 10:return Og(v),null;case 23:case 24:return B2(),null;default:return null}}function Yg(v,D){try{var Q=\"\",H=D;do Q+=$1(H),H=H.return;while(H);var V=Q}catch(ne){V=`\nError generating stack: `+ne.message+`\n`+ne.stack}return{value:v,source:D,stack:V}}function Vg(v,D){try{console.error(D.value)}catch(Q){setTimeout(function(){throw Q})}}var WL=typeof WeakMap==\"function\"?WeakMap:Map;function i2(v,D,Q){Q=Dl(-1,Q),Q.tag=3,Q.payload={element:null};var H=D.value;return Q.callback=function(){_y||(_y=!0,y2=H),Vg(v,D)},Q}function Jg(v,D,Q){Q=Dl(-1,Q),Q.tag=3;var H=v.type.getDerivedStateFromError;if(typeof H==\"function\"){var V=D.value;Q.payload=function(){return Vg(v,D),H(V)}}var ne=v.stateNode;return ne!==null&&typeof ne.componentDidCatch==\"function\"&&(Q.callback=function(){typeof H!=\"function\"&&(hc===null?hc=new Set([this]):hc.add(this),Vg(v,D));var Se=D.stack;this.componentDidCatch(D.value,{componentStack:Se!==null?Se:\"\"})}),Q}var YL=typeof WeakSet==\"function\"?WeakSet:Set;function s2(v){var D=v.ref;if(D!==null)if(typeof D==\"function\")try{D(null)}catch(Q){xf(v,Q)}else D.current=null}function xy(v,D){switch(D.tag){case 0:case 11:case 15:case 22:return;case 1:if(D.flags&256&&v!==null){var Q=v.memoizedProps,H=v.memoizedState;v=D.stateNode,D=v.getSnapshotBeforeUpdate(D.elementType===D.type?Q:So(D.type,Q),H),v.__reactInternalSnapshotBeforeUpdate=D}return;case 3:F&&D.flags&256&&Ts(D.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(c(163))}function Th(v,D){if(D=D.updateQueue,D=D!==null?D.lastEffect:null,D!==null){var Q=D=D.next;do{if((Q.tag&v)===v){var H=Q.destroy;Q.destroy=void 0,H!==void 0&&H()}Q=Q.next}while(Q!==D)}}function uP(v,D,Q){switch(Q.tag){case 0:case 11:case 15:case 22:if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{if((v.tag&3)===3){var H=v.create;v.destroy=H()}v=v.next}while(v!==D)}if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{var V=v;H=V.next,V=V.tag,V&4&&V&1&&(vP(Q,v),tM(Q,v)),v=H}while(v!==D)}return;case 1:v=Q.stateNode,Q.flags&4&&(D===null?v.componentDidMount():(H=Q.elementType===Q.type?D.memoizedProps:So(Q.type,D.memoizedProps),v.componentDidUpdate(H,D.memoizedState,v.__reactInternalSnapshotBeforeUpdate))),D=Q.updateQueue,D!==null&&Cy(Q,D,v);return;case 3:if(D=Q.updateQueue,D!==null){if(v=null,Q.child!==null)switch(Q.child.tag){case 5:v=Re(Q.child.stateNode);break;case 1:v=Q.child.stateNode}Cy(Q,D,v)}return;case 5:v=Q.stateNode,D===null&&Q.flags&4&&$s(v,Q.type,Q.memoizedProps,Q);return;case 6:return;case 4:return;case 12:return;case 13:X&&Q.memoizedState===null&&(Q=Q.alternate,Q!==null&&(Q=Q.memoizedState,Q!==null&&(Q=Q.dehydrated,Q!==null&&uu(Q))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(c(163))}function fP(v,D){if(F)for(var Q=v;;){if(Q.tag===5){var H=Q.stateNode;D?dh(H):to(Q.stateNode,Q.memoizedProps)}else if(Q.tag===6)H=Q.stateNode,D?mh(H):jn(H,Q.memoizedProps);else if((Q.tag!==23&&Q.tag!==24||Q.memoizedState===null||Q===v)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===v)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===v)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}function ky(v,D){if(Ua&&typeof Ua.onCommitFiberUnmount==\"function\")try{Ua.onCommitFiberUnmount($e,D)}catch{}switch(D.tag){case 0:case 11:case 14:case 15:case 22:if(v=D.updateQueue,v!==null&&(v=v.lastEffect,v!==null)){var Q=v=v.next;do{var H=Q,V=H.destroy;if(H=H.tag,V!==void 0)if(H&4)vP(D,Q);else{H=D;try{V()}catch(ne){xf(H,ne)}}Q=Q.next}while(Q!==v)}break;case 1:if(s2(D),v=D.stateNode,typeof v.componentWillUnmount==\"function\")try{v.props=D.memoizedProps,v.state=D.memoizedState,v.componentWillUnmount()}catch(ne){xf(D,ne)}break;case 5:s2(D);break;case 4:F?gP(v,D):z&&z&&(D=D.stateNode.containerInfo,v=ou(D),TA(D,v))}}function AP(v,D){for(var Q=D;;)if(ky(v,Q),Q.child===null||F&&Q.tag===4){if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}else Q.child.return=Q,Q=Q.child}function Qy(v){v.alternate=null,v.child=null,v.dependencies=null,v.firstEffect=null,v.lastEffect=null,v.memoizedProps=null,v.memoizedState=null,v.pendingProps=null,v.return=null,v.updateQueue=null}function pP(v){return v.tag===5||v.tag===3||v.tag===4}function hP(v){if(F){e:{for(var D=v.return;D!==null;){if(pP(D))break e;D=D.return}throw Error(c(160))}var Q=D;switch(D=Q.stateNode,Q.tag){case 5:var H=!1;break;case 3:D=D.containerInfo,H=!0;break;case 4:D=D.containerInfo,H=!0;break;default:throw Error(c(161))}Q.flags&16&&(Af(D),Q.flags&=-17);e:t:for(Q=v;;){for(;Q.sibling===null;){if(Q.return===null||pP(Q.return)){Q=null;break e}Q=Q.return}for(Q.sibling.return=Q.return,Q=Q.sibling;Q.tag!==5&&Q.tag!==6&&Q.tag!==18;){if(Q.flags&2||Q.child===null||Q.tag===4)continue t;Q.child.return=Q,Q=Q.child}if(!(Q.flags&2)){Q=Q.stateNode;break e}}H?o2(v,Q,D):a2(v,Q,D)}}function o2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?eo(Q,v,D):Io(Q,v);else if(H!==4&&(v=v.child,v!==null))for(o2(v,D,Q),v=v.sibling;v!==null;)o2(v,D,Q),v=v.sibling}function a2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?ji(Q,v,D):ai(Q,v);else if(H!==4&&(v=v.child,v!==null))for(a2(v,D,Q),v=v.sibling;v!==null;)a2(v,D,Q),v=v.sibling}function gP(v,D){for(var Q=D,H=!1,V,ne;;){if(!H){H=Q.return;e:for(;;){if(H===null)throw Error(c(160));switch(V=H.stateNode,H.tag){case 5:ne=!1;break e;case 3:V=V.containerInfo,ne=!0;break e;case 4:V=V.containerInfo,ne=!0;break e}H=H.return}H=!0}if(Q.tag===5||Q.tag===6)AP(v,Q),ne?QA(V,Q.stateNode):wo(V,Q.stateNode);else if(Q.tag===4){if(Q.child!==null){V=Q.stateNode.containerInfo,ne=!0,Q.child.return=Q,Q=Q.child;continue}}else if(ky(v,Q),Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return,Q.tag===4&&(H=!1)}Q.sibling.return=Q.return,Q=Q.sibling}}function l2(v,D){if(F){switch(D.tag){case 0:case 11:case 14:case 15:case 22:Th(3,D);return;case 1:return;case 5:var Q=D.stateNode;if(Q!=null){var H=D.memoizedProps;v=v!==null?v.memoizedProps:H;var V=D.type,ne=D.updateQueue;D.updateQueue=null,ne!==null&&Co(Q,ne,V,v,H,D)}return;case 6:if(D.stateNode===null)throw Error(c(162));Q=D.memoizedProps,rs(D.stateNode,v!==null?v.memoizedProps:Q,Q);return;case 3:X&&(D=D.stateNode,D.hydrate&&(D.hydrate=!1,OA(D.containerInfo)));return;case 12:return;case 13:dP(D),Kg(D);return;case 19:Kg(D);return;case 17:return;case 23:case 24:fP(D,D.memoizedState!==null);return}throw Error(c(163))}switch(D.tag){case 0:case 11:case 14:case 15:case 22:Th(3,D);return;case 12:return;case 13:dP(D),Kg(D);return;case 19:Kg(D);return;case 3:X&&(Q=D.stateNode,Q.hydrate&&(Q.hydrate=!1,OA(Q.containerInfo)));break;case 23:case 24:return}e:if(z){switch(D.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:D=D.stateNode,TA(D.containerInfo,D.pendingChildren);break e}throw Error(c(163))}}function dP(v){v.memoizedState!==null&&(d2=bt(),F&&fP(v.child,!0))}function Kg(v){var D=v.updateQueue;if(D!==null){v.updateQueue=null;var Q=v.stateNode;Q===null&&(Q=v.stateNode=new YL),D.forEach(function(H){var V=nM.bind(null,v,H);Q.has(H)||(Q.add(H),H.then(V,V))})}}function VL(v,D){return v!==null&&(v=v.memoizedState,v===null||v.dehydrated!==null)?(D=D.memoizedState,D!==null&&D.dehydrated===null):!1}var Ty=0,Ry=1,Fy=2,zg=3,Ny=4;if(typeof Symbol==\"function\"&&Symbol.for){var Xg=Symbol.for;Ty=Xg(\"selector.component\"),Ry=Xg(\"selector.has_pseudo_class\"),Fy=Xg(\"selector.role\"),zg=Xg(\"selector.test_id\"),Ny=Xg(\"selector.text\")}function Oy(v){var D=$(v);if(D!=null){if(typeof D.memoizedProps[\"data-testname\"]!=\"string\")throw Error(c(364));return D}if(v=ir(v),v===null)throw Error(c(362));return v.stateNode.current}function Sf(v,D){switch(D.$$typeof){case Ty:if(v.type===D.value)return!0;break;case Ry:e:{D=D.value,v=[v,0];for(var Q=0;Q<v.length;){var H=v[Q++],V=v[Q++],ne=D[V];if(H.tag!==5||!Pr(H)){for(;ne!=null&&Sf(H,ne);)V++,ne=D[V];if(V===D.length){D=!0;break e}else for(H=H.child;H!==null;)v.push(H,V),H=H.sibling}}D=!1}return D;case Fy:if(v.tag===5&&Ir(v.stateNode,D.value))return!0;break;case Ny:if((v.tag===5||v.tag===6)&&(v=gn(v),v!==null&&0<=v.indexOf(D.value)))return!0;break;case zg:if(v.tag===5&&(v=v.memoizedProps[\"data-testname\"],typeof v==\"string\"&&v.toLowerCase()===D.value.toLowerCase()))return!0;break;default:throw Error(c(365,D))}return!1}function Df(v){switch(v.$$typeof){case Ty:return\"<\"+(g(v.value)||\"Unknown\")+\">\";case Ry:return\":has(\"+(Df(v)||\"\")+\")\";case Fy:return'[role=\"'+v.value+'\"]';case Ny:return'\"'+v.value+'\"';case zg:return'[data-testname=\"'+v.value+'\"]';default:throw Error(c(365,v))}}function c2(v,D){var Q=[];v=[v,0];for(var H=0;H<v.length;){var V=v[H++],ne=v[H++],Se=D[ne];if(V.tag!==5||!Pr(V)){for(;Se!=null&&Sf(V,Se);)ne++,Se=D[ne];if(ne===D.length)Q.push(V);else for(V=V.child;V!==null;)v.push(V,ne),V=V.sibling}}return Q}function u2(v,D){if(!qt)throw Error(c(363));v=Oy(v),v=c2(v,D),D=[],v=Array.from(v);for(var Q=0;Q<v.length;){var H=v[Q++];if(H.tag===5)Pr(H)||D.push(H.stateNode);else for(H=H.child;H!==null;)v.push(H),H=H.sibling}return D}var Ly=null;function JL(v){if(Ly===null)try{var D=(\"require\"+Math.random()).slice(0,7);Ly=(jS&&jS[D]).call(jS,\"timers\").setImmediate}catch{Ly=function(H){var V=new MessageChannel;V.port1.onmessage=H,V.port2.postMessage(void 0)}}return Ly(v)}var KL=Math.ceil,My=f.ReactCurrentDispatcher,f2=f.ReactCurrentOwner,A2=f.IsSomeRendererActing,xr=0,so=null,Xi=null,Ns=0,ZA=0,p2=no(0),ws=0,Uy=null,Rh=0,Zg=0,Fh=0,h2=0,g2=null,d2=0,m2=1/0;function bf(){m2=bt()+500}var sr=null,_y=!1,y2=null,hc=null,Pf=!1,$g=null,ed=90,E2=[],I2=[],wu=null,td=0,C2=null,Hy=-1,Bu=0,jy=0,rd=null,nd=!1;function ko(){return xr&48?bt():Hy!==-1?Hy:Hy=bt()}function Bs(v){if(v=v.mode,!(v&2))return 1;if(!(v&4))return tr()===99?1:2;if(Bu===0&&(Bu=Rh),my.transition!==0){jy!==0&&(jy=g2!==null?g2.pendingLanes:0),v=Bu;var D=4186112&~jy;return D&=-D,D===0&&(v=4186112&~v,D=v&-v,D===0&&(D=8192)),D}return v=tr(),xr&4&&v===98?v=Mt(12,Bu):(v=LA(v),v=Mt(v,Bu)),v}function Tl(v,D,Q){if(50<td)throw td=0,C2=null,Error(c(185));if(v=Gy(v,D),v===null)return null;Ha(v,D,Q),v===so&&(Fh|=D,ws===4&&Nh(v,Ns));var H=tr();D===1?xr&8&&!(xr&48)?w2(v):(ga(v,Q),xr===0&&(bf(),Tn())):(!(xr&4)||H!==98&&H!==99||(wu===null?wu=new Set([v]):wu.add(v)),ga(v,Q)),g2=v}function Gy(v,D){v.lanes|=D;var Q=v.alternate;for(Q!==null&&(Q.lanes|=D),Q=v,v=v.return;v!==null;)v.childLanes|=D,Q=v.alternate,Q!==null&&(Q.childLanes|=D),Q=v,v=v.return;return Q.tag===3?Q.stateNode:null}function ga(v,D){for(var Q=v.callbackNode,H=v.suspendedLanes,V=v.pingedLanes,ne=v.expirationTimes,Se=v.pendingLanes;0<Se;){var _e=31-ns(Se),pt=1<<_e,Wt=ne[_e];if(Wt===-1){if(!(pt&H)||pt&V){Wt=D,ca(pt);var Sr=wn;ne[_e]=10<=Sr?Wt+250:6<=Sr?Wt+5e3:-1}}else Wt<=D&&(v.expiredLanes|=pt);Se&=~pt}if(H=ua(v,v===so?Ns:0),D=wn,H===0)Q!==null&&(Q!==lr&&Is(Q),v.callbackNode=null,v.callbackPriority=0);else{if(Q!==null){if(v.callbackPriority===D)return;Q!==lr&&Is(Q)}D===15?(Q=w2.bind(null,v),Ee===null?(Ee=[Q],Oe=Mi(Qn,Ga)):Ee.push(Q),Q=lr):D===14?Q=qi(99,w2.bind(null,v)):(Q=MA(D),Q=qi(Q,mP.bind(null,v))),v.callbackPriority=D,v.callbackNode=Q}}function mP(v){if(Hy=-1,jy=Bu=0,xr&48)throw Error(c(327));var D=v.callbackNode;if(vu()&&v.callbackNode!==D)return null;var Q=ua(v,v===so?Ns:0);if(Q===0)return null;var H=Q,V=xr;xr|=16;var ne=CP();(so!==v||Ns!==H)&&(bf(),Oh(v,H));do try{ZL();break}catch(_e){IP(v,_e)}while(!0);if(Fg(),My.current=ne,xr=V,Xi!==null?H=0:(so=null,Ns=0,H=ws),Rh&Fh)Oh(v,0);else if(H!==0){if(H===2&&(xr|=64,v.hydrate&&(v.hydrate=!1,Ts(v.containerInfo)),Q=Bl(v),Q!==0&&(H=id(v,Q))),H===1)throw D=Uy,Oh(v,0),Nh(v,Q),ga(v,bt()),D;switch(v.finishedWork=v.current.alternate,v.finishedLanes=Q,H){case 0:case 1:throw Error(c(345));case 2:$A(v);break;case 3:if(Nh(v,Q),(Q&62914560)===Q&&(H=d2+500-bt(),10<H)){if(ua(v,0)!==0)break;if(V=v.suspendedLanes,(V&Q)!==Q){ko(),v.pingedLanes|=v.suspendedLanes&V;break}v.timeoutHandle=x($A.bind(null,v),H);break}$A(v);break;case 4:if(Nh(v,Q),(Q&4186112)===Q)break;for(H=v.eventTimes,V=-1;0<Q;){var Se=31-ns(Q);ne=1<<Se,Se=H[Se],Se>V&&(V=Se),Q&=~ne}if(Q=V,Q=bt()-Q,Q=(120>Q?120:480>Q?480:1080>Q?1080:1920>Q?1920:3e3>Q?3e3:4320>Q?4320:1960*KL(Q/1960))-Q,10<Q){v.timeoutHandle=x($A.bind(null,v),Q);break}$A(v);break;case 5:$A(v);break;default:throw Error(c(329))}}return ga(v,bt()),v.callbackNode===D?mP.bind(null,v):null}function Nh(v,D){for(D&=~h2,D&=~Fh,v.suspendedLanes|=D,v.pingedLanes&=~D,v=v.expirationTimes;0<D;){var Q=31-ns(D),H=1<<Q;v[Q]=-1,D&=~H}}function w2(v){if(xr&48)throw Error(c(327));if(vu(),v===so&&v.expiredLanes&Ns){var D=Ns,Q=id(v,D);Rh&Fh&&(D=ua(v,D),Q=id(v,D))}else D=ua(v,0),Q=id(v,D);if(v.tag!==0&&Q===2&&(xr|=64,v.hydrate&&(v.hydrate=!1,Ts(v.containerInfo)),D=Bl(v),D!==0&&(Q=id(v,D))),Q===1)throw Q=Uy,Oh(v,0),Nh(v,D),ga(v,bt()),Q;return v.finishedWork=v.current.alternate,v.finishedLanes=D,$A(v),ga(v,bt()),null}function zL(){if(wu!==null){var v=wu;wu=null,v.forEach(function(D){D.expiredLanes|=24&D.pendingLanes,ga(D,bt())})}Tn()}function yP(v,D){var Q=xr;xr|=1;try{return v(D)}finally{xr=Q,xr===0&&(bf(),Tn())}}function EP(v,D){var Q=xr;if(Q&48)return v(D);xr|=1;try{if(v)return li(99,v.bind(null,D))}finally{xr=Q,Tn()}}function qy(v,D){xn(p2,ZA),ZA|=D,Rh|=D}function B2(){ZA=p2.current,Rt(p2)}function Oh(v,D){v.finishedWork=null,v.finishedLanes=0;var Q=v.timeoutHandle;if(Q!==b&&(v.timeoutHandle=b,w(Q)),Xi!==null)for(Q=Xi.return;Q!==null;){var H=Q;switch(H.tag){case 1:H=H.type.childContextTypes,H!=null&&Au();break;case 3:du(),Rt(Li),Rt(Gi),yu();break;case 5:wt(H);break;case 4:du();break;case 13:Rt(di);break;case 19:Rt(di);break;case 10:Og(H);break;case 23:case 24:B2()}Q=Q.return}so=v,Xi=Su(v.current,null),Ns=ZA=Rh=D,ws=0,Uy=null,h2=Fh=Zg=0}function IP(v,D){do{var Q=Xi;try{if(Fg(),If.current=kt,WA){for(var H=Gn.memoizedState;H!==null;){var V=H.queue;V!==null&&(V.pending=null),H=H.next}WA=!1}if(Eu=0,Pi=is=Gn=null,Cf=!1,f2.current=null,Q===null||Q.return===null){ws=1,Uy=D,Xi=null;break}e:{var ne=v,Se=Q.return,_e=Q,pt=D;if(D=Ns,_e.flags|=2048,_e.firstEffect=_e.lastEffect=null,pt!==null&&typeof pt==\"object\"&&typeof pt.then==\"function\"){var Wt=pt;if(!(_e.mode&2)){var Sr=_e.alternate;Sr?(_e.updateQueue=Sr.updateQueue,_e.memoizedState=Sr.memoizedState,_e.lanes=Sr.lanes):(_e.updateQueue=null,_e.memoizedState=null)}var Lr=(di.current&1)!==0,Zt=Se;do{var zn;if(zn=Zt.tag===13){var yi=Zt.memoizedState;if(yi!==null)zn=yi.dehydrated!==null;else{var za=Zt.memoizedProps;zn=za.fallback===void 0?!1:za.unstable_avoidThisFallback!==!0?!0:!Lr}}if(zn){var et=Zt.updateQueue;if(et===null){var qe=new Set;qe.add(Wt),Zt.updateQueue=qe}else et.add(Wt);if(!(Zt.mode&2)){if(Zt.flags|=64,_e.flags|=16384,_e.flags&=-2981,_e.tag===1)if(_e.alternate===null)_e.tag=17;else{var gt=Dl(-1,1);gt.tag=2,bl(_e,gt)}_e.lanes|=1;break e}pt=void 0,_e=D;var Xt=ne.pingCache;if(Xt===null?(Xt=ne.pingCache=new WL,pt=new Set,Xt.set(Wt,pt)):(pt=Xt.get(Wt),pt===void 0&&(pt=new Set,Xt.set(Wt,pt))),!pt.has(_e)){pt.add(_e);var Dr=DP.bind(null,ne,Wt,_e);Wt.then(Dr,Dr)}Zt.flags|=4096,Zt.lanes=D;break e}Zt=Zt.return}while(Zt!==null);pt=Error((g(_e.type)||\"A React component\")+` suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}ws!==5&&(ws=2),pt=Yg(pt,_e),Zt=Se;do{switch(Zt.tag){case 3:ne=pt,Zt.flags|=4096,D&=-D,Zt.lanes|=D;var Zn=i2(Zt,ne,D);Iy(Zt,Zn);break e;case 1:ne=pt;var kr=Zt.type,Rn=Zt.stateNode;if(!(Zt.flags&64)&&(typeof kr.getDerivedStateFromError==\"function\"||Rn!==null&&typeof Rn.componentDidCatch==\"function\"&&(hc===null||!hc.has(Rn)))){Zt.flags|=4096,D&=-D,Zt.lanes|=D;var _n=Jg(Zt,ne,D);Iy(Zt,_n);break e}}Zt=Zt.return}while(Zt!==null)}BP(Q)}catch(zr){D=zr,Xi===Q&&Q!==null&&(Xi=Q=Q.return);continue}break}while(!0)}function CP(){var v=My.current;return My.current=kt,v===null?kt:v}function id(v,D){var Q=xr;xr|=16;var H=CP();so===v&&Ns===D||Oh(v,D);do try{XL();break}catch(V){IP(v,V)}while(!0);if(Fg(),xr=Q,My.current=H,Xi!==null)throw Error(c(261));return so=null,Ns=0,ws}function XL(){for(;Xi!==null;)wP(Xi)}function ZL(){for(;Xi!==null&&!vl();)wP(Xi)}function wP(v){var D=bP(v.alternate,v,ZA);v.memoizedProps=v.pendingProps,D===null?BP(v):Xi=D,f2.current=null}function BP(v){var D=v;do{var Q=D.alternate;if(v=D.return,D.flags&2048){if(Q=qL(D),Q!==null){Q.flags&=2047,Xi=Q;return}v!==null&&(v.firstEffect=v.lastEffect=null,v.flags|=2048)}else{if(Q=jL(Q,D,ZA),Q!==null){Xi=Q;return}if(Q=D,Q.tag!==24&&Q.tag!==23||Q.memoizedState===null||ZA&1073741824||!(Q.mode&4)){for(var H=0,V=Q.child;V!==null;)H|=V.lanes|V.childLanes,V=V.sibling;Q.childLanes=H}v!==null&&!(v.flags&2048)&&(v.firstEffect===null&&(v.firstEffect=D.firstEffect),D.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=D.firstEffect),v.lastEffect=D.lastEffect),1<D.flags&&(v.lastEffect!==null?v.lastEffect.nextEffect=D:v.firstEffect=D,v.lastEffect=D))}if(D=D.sibling,D!==null){Xi=D;return}Xi=D=v}while(D!==null);ws===0&&(ws=5)}function $A(v){var D=tr();return li(99,$L.bind(null,v,D)),null}function $L(v,D){do vu();while($g!==null);if(xr&48)throw Error(c(327));var Q=v.finishedWork;if(Q===null)return null;if(v.finishedWork=null,v.finishedLanes=0,Q===v.current)throw Error(c(177));v.callbackNode=null;var H=Q.lanes|Q.childLanes,V=H,ne=v.pendingLanes&~V;v.pendingLanes=V,v.suspendedLanes=0,v.pingedLanes=0,v.expiredLanes&=V,v.mutableReadLanes&=V,v.entangledLanes&=V,V=v.entanglements;for(var Se=v.eventTimes,_e=v.expirationTimes;0<ne;){var pt=31-ns(ne),Wt=1<<pt;V[pt]=0,Se[pt]=-1,_e[pt]=-1,ne&=~Wt}if(wu!==null&&!(H&24)&&wu.has(v)&&wu.delete(v),v===so&&(Xi=so=null,Ns=0),1<Q.flags?Q.lastEffect!==null?(Q.lastEffect.nextEffect=Q,H=Q.firstEffect):H=Q:H=Q.firstEffect,H!==null){V=xr,xr|=32,f2.current=null,rd=rt(v.containerInfo),nd=!1,sr=H;do try{eM()}catch(qe){if(sr===null)throw Error(c(330));xf(sr,qe),sr=sr.nextEffect}while(sr!==null);rd=null,sr=H;do try{for(Se=v;sr!==null;){var Sr=sr.flags;if(Sr&16&&F&&Af(sr.stateNode),Sr&128){var Lr=sr.alternate;if(Lr!==null){var Zt=Lr.ref;Zt!==null&&(typeof Zt==\"function\"?Zt(null):Zt.current=null)}}switch(Sr&1038){case 2:hP(sr),sr.flags&=-3;break;case 6:hP(sr),sr.flags&=-3,l2(sr.alternate,sr);break;case 1024:sr.flags&=-1025;break;case 1028:sr.flags&=-1025,l2(sr.alternate,sr);break;case 4:l2(sr.alternate,sr);break;case 8:_e=Se,ne=sr,F?gP(_e,ne):AP(_e,ne);var zn=ne.alternate;Qy(ne),zn!==null&&Qy(zn)}sr=sr.nextEffect}}catch(qe){if(sr===null)throw Error(c(330));xf(sr,qe),sr=sr.nextEffect}while(sr!==null);nd&&lt(),Fe(v.containerInfo),v.current=Q,sr=H;do try{for(Sr=v;sr!==null;){var yi=sr.flags;if(yi&36&&uP(Sr,sr.alternate,sr),yi&128){Lr=void 0;var za=sr.ref;if(za!==null){var et=sr.stateNode;switch(sr.tag){case 5:Lr=Re(et);break;default:Lr=et}typeof za==\"function\"?za(Lr):za.current=Lr}}sr=sr.nextEffect}}catch(qe){if(sr===null)throw Error(c(330));xf(sr,qe),sr=sr.nextEffect}while(sr!==null);sr=null,te(),xr=V}else v.current=Q;if(Pf)Pf=!1,$g=v,ed=D;else for(sr=H;sr!==null;)D=sr.nextEffect,sr.nextEffect=null,sr.flags&8&&(yi=sr,yi.sibling=null,yi.stateNode=null),sr=D;if(H=v.pendingLanes,H===0&&(hc=null),H===1?v===C2?td++:(td=0,C2=v):td=0,Q=Q.stateNode,Ua&&typeof Ua.onCommitFiberRoot==\"function\")try{Ua.onCommitFiberRoot($e,Q,void 0,(Q.current.flags&64)===64)}catch{}if(ga(v,bt()),_y)throw _y=!1,v=y2,y2=null,v;return xr&8||Tn(),null}function eM(){for(;sr!==null;){var v=sr.alternate;nd||rd===null||(sr.flags&8?De(sr,rd)&&(nd=!0,Te()):sr.tag===13&&VL(v,sr)&&De(sr,rd)&&(nd=!0,Te()));var D=sr.flags;D&256&&xy(v,sr),!(D&512)||Pf||(Pf=!0,qi(97,function(){return vu(),null})),sr=sr.nextEffect}}function vu(){if(ed!==90){var v=97<ed?97:ed;return ed=90,li(v,rM)}return!1}function tM(v,D){E2.push(D,v),Pf||(Pf=!0,qi(97,function(){return vu(),null}))}function vP(v,D){I2.push(D,v),Pf||(Pf=!0,qi(97,function(){return vu(),null}))}function rM(){if($g===null)return!1;var v=$g;if($g=null,xr&48)throw Error(c(331));var D=xr;xr|=32;var Q=I2;I2=[];for(var H=0;H<Q.length;H+=2){var V=Q[H],ne=Q[H+1],Se=V.destroy;if(V.destroy=void 0,typeof Se==\"function\")try{Se()}catch(pt){if(ne===null)throw Error(c(330));xf(ne,pt)}}for(Q=E2,E2=[],H=0;H<Q.length;H+=2){V=Q[H],ne=Q[H+1];try{var _e=V.create;V.destroy=_e()}catch(pt){if(ne===null)throw Error(c(330));xf(ne,pt)}}for(_e=v.current.firstEffect;_e!==null;)v=_e.nextEffect,_e.nextEffect=null,_e.flags&8&&(_e.sibling=null,_e.stateNode=null),_e=v;return xr=D,Tn(),!0}function SP(v,D,Q){D=Yg(Q,D),D=i2(v,D,1),bl(v,D),D=ko(),v=Gy(v,1),v!==null&&(Ha(v,1,D),ga(v,D))}function xf(v,D){if(v.tag===3)SP(v,v,D);else for(var Q=v.return;Q!==null;){if(Q.tag===3){SP(Q,v,D);break}else if(Q.tag===1){var H=Q.stateNode;if(typeof Q.type.getDerivedStateFromError==\"function\"||typeof H.componentDidCatch==\"function\"&&(hc===null||!hc.has(H))){v=Yg(D,v);var V=Jg(Q,v,1);if(bl(Q,V),V=ko(),Q=Gy(Q,1),Q!==null)Ha(Q,1,V),ga(Q,V);else if(typeof H.componentDidCatch==\"function\"&&(hc===null||!hc.has(H)))try{H.componentDidCatch(D,v)}catch{}break}}Q=Q.return}}function DP(v,D,Q){var H=v.pingCache;H!==null&&H.delete(D),D=ko(),v.pingedLanes|=v.suspendedLanes&Q,so===v&&(Ns&Q)===Q&&(ws===4||ws===3&&(Ns&62914560)===Ns&&500>bt()-d2?Oh(v,0):h2|=Q),ga(v,D)}function nM(v,D){var Q=v.stateNode;Q!==null&&Q.delete(D),D=0,D===0&&(D=v.mode,D&2?D&4?(Bu===0&&(Bu=Rh),D=kn(62914560&~Bu),D===0&&(D=4194304)):D=tr()===99?1:2:D=1),Q=ko(),v=Gy(v,D),v!==null&&(Ha(v,D,Q),ga(v,Q))}var bP;bP=function(v,D,Q){var H=D.lanes;if(v!==null)if(v.memoizedProps!==D.pendingProps||Li.current)Je=!0;else if(Q&H)Je=!!(v.flags&16384);else{switch(Je=!1,D.tag){case 3:by(D),jg();break;case 5:Ef(D);break;case 1:Kn(D.type)&&La(D);break;case 4:Ug(D,D.stateNode.containerInfo);break;case 10:Ng(D,D.memoizedProps.value);break;case 13:if(D.memoizedState!==null)return Q&D.child.childLanes?r2(v,D,Q):(xn(di,di.current&1),D=qn(v,D,Q),D!==null?D.sibling:null);xn(di,di.current&1);break;case 19:if(H=(Q&D.childLanes)!==0,v.flags&64){if(H)return cP(v,D,Q);D.flags|=64}var V=D.memoizedState;if(V!==null&&(V.rendering=null,V.tail=null,V.lastEffect=null),xn(di,di.current),H)break;return null;case 23:case 24:return D.lanes=0,mi(v,D,Q)}return qn(v,D,Q)}else Je=!1;switch(D.lanes=0,D.tag){case 2:if(H=D.type,v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),v=D.pendingProps,V=dn(D,Gi.current),df(D,Q),V=qg(null,D,H,v,V,Q),D.flags|=1,typeof V==\"object\"&&V!==null&&typeof V.render==\"function\"&&V.$$typeof===void 0){if(D.tag=1,D.memoizedState=null,D.updateQueue=null,Kn(H)){var ne=!0;La(D)}else ne=!1;D.memoizedState=V.state!==null&&V.state!==void 0?V.state:null,Bh(D);var Se=H.getDerivedStateFromProps;typeof Se==\"function\"&&_A(D,H,Se,v),V.updater=HA,D.stateNode=V,V._reactInternals=D,bo(D,H,v,Q),D=t2(null,D,H,!0,ne,Q)}else D.tag=0,At(null,D,V,Q),D=D.child;return D;case 16:V=D.elementType;e:{switch(v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),v=D.pendingProps,ne=V._init,V=ne(V._payload),D.type=V,ne=D.tag=sM(V),v=So(V,v),ne){case 0:D=JA(null,D,V,v,Q);break e;case 1:D=lP(null,D,V,v,Q);break e;case 11:D=dr(null,D,V,v,Q);break e;case 14:D=vr(null,D,V,So(V.type,v),H,Q);break e}throw Error(c(306,V,\"\"))}return D;case 0:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:So(H,V),JA(v,D,H,V,Q);case 1:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:So(H,V),lP(v,D,H,V,Q);case 3:if(by(D),H=D.updateQueue,v===null||H===null)throw Error(c(282));if(H=D.pendingProps,V=D.memoizedState,V=V!==null?V.element:null,Lg(v,D),UA(D,H,null,Q),H=D.memoizedState.element,H===V)jg(),D=qn(v,D,Q);else{if(V=D.stateNode,(ne=V.hydrate)&&(X?(Aa=cu(D.stateNode.containerInfo),Wa=D,ne=Ya=!0):ne=!1),ne){if(X&&(v=V.mutableSourceEagerHydrationData,v!=null))for(V=0;V<v.length;V+=2)ne=v[V],Se=v[V+1],y?ne._workInProgressVersionPrimary=Se:ne._workInProgressVersionSecondary=Se,mu.push(ne);for(Q=e2(D,null,H,Q),D.child=Q;Q;)Q.flags=Q.flags&-3|1024,Q=Q.sibling}else At(v,D,H,Q),jg();D=D.child}return D;case 5:return Ef(D),v===null&&Hg(D),H=D.type,V=D.pendingProps,ne=v!==null?v.memoizedProps:null,Se=V.children,it(H,V)?Se=null:ne!==null&&it(H,ne)&&(D.flags|=16),Cs(v,D),At(v,D,Se,Q),D.child;case 6:return v===null&&Hg(D),null;case 13:return r2(v,D,Q);case 4:return Ug(D,D.stateNode.containerInfo),H=D.pendingProps,v===null?D.child=Mg(D,null,H,Q):At(v,D,H,Q),D.child;case 11:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:So(H,V),dr(v,D,H,V,Q);case 7:return At(v,D,D.pendingProps,Q),D.child;case 8:return At(v,D,D.pendingProps.children,Q),D.child;case 12:return At(v,D,D.pendingProps.children,Q),D.child;case 10:e:{if(H=D.type._context,V=D.pendingProps,Se=D.memoizedProps,ne=V.value,Ng(D,ne),Se!==null){var _e=Se.value;if(ne=vo(_e,ne)?0:(typeof H._calculateChangedBits==\"function\"?H._calculateChangedBits(_e,ne):1073741823)|0,ne===0){if(Se.children===V.children&&!Li.current){D=qn(v,D,Q);break e}}else for(_e=D.child,_e!==null&&(_e.return=D);_e!==null;){var pt=_e.dependencies;if(pt!==null){Se=_e.child;for(var Wt=pt.firstContext;Wt!==null;){if(Wt.context===H&&Wt.observedBits&ne){_e.tag===1&&(Wt=Dl(-1,Q&-Q),Wt.tag=2,bl(_e,Wt)),_e.lanes|=Q,Wt=_e.alternate,Wt!==null&&(Wt.lanes|=Q),Ey(_e.return,Q),pt.lanes|=Q;break}Wt=Wt.next}}else Se=_e.tag===10&&_e.type===D.type?null:_e.child;if(Se!==null)Se.return=_e;else for(Se=_e;Se!==null;){if(Se===D){Se=null;break}if(_e=Se.sibling,_e!==null){_e.return=Se.return,Se=_e;break}Se=Se.return}_e=Se}}At(v,D,V.children,Q),D=D.child}return D;case 9:return V=D.type,ne=D.pendingProps,H=ne.children,df(D,Q),V=Do(V,ne.unstable_observedBits),H=H(V),D.flags|=1,At(v,D,H,Q),D.child;case 14:return V=D.type,ne=So(V,D.pendingProps),ne=So(V.type,ne),vr(v,D,V,ne,H,Q);case 15:return Un(v,D,D.type,D.pendingProps,H,Q);case 17:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:So(H,V),v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),D.tag=1,Kn(H)?(v=!0,La(D)):v=!1,df(D,Q),xt(D,H,V),bo(D,H,V,Q),t2(null,D,H,!0,v,Q);case 19:return cP(v,D,Q);case 23:return mi(v,D,Q);case 24:return mi(v,D,Q)}throw Error(c(156,D.tag))};var Wy={current:!1},Os=n.unstable_flushAllWithoutAsserting,PP=typeof Os==\"function\";function v2(){if(Os!==void 0)return Os();for(var v=!1;vu();)v=!0;return v}function da(v){try{v2(),JL(function(){v2()?da(v):v()})}catch(D){v(D)}}var Ja=0,Yy=!1;function iM(v,D,Q,H){this.tag=v,this.key=Q,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=D,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=H,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Ka(v,D,Q,H){return new iM(v,D,Q,H)}function S2(v){return v=v.prototype,!(!v||!v.isReactComponent)}function sM(v){if(typeof v==\"function\")return S2(v)?1:0;if(v!=null){if(v=v.$$typeof,v===R)return 11;if(v===W)return 14}return 2}function Su(v,D){var Q=v.alternate;return Q===null?(Q=Ka(v.tag,D,v.key,v.mode),Q.elementType=v.elementType,Q.type=v.type,Q.stateNode=v.stateNode,Q.alternate=v,v.alternate=Q):(Q.pendingProps=D,Q.type=v.type,Q.flags=0,Q.nextEffect=null,Q.firstEffect=null,Q.lastEffect=null),Q.childLanes=v.childLanes,Q.lanes=v.lanes,Q.child=v.child,Q.memoizedProps=v.memoizedProps,Q.memoizedState=v.memoizedState,Q.updateQueue=v.updateQueue,D=v.dependencies,Q.dependencies=D===null?null:{lanes:D.lanes,firstContext:D.firstContext},Q.sibling=v.sibling,Q.index=v.index,Q.ref=v.ref,Q}function sd(v,D,Q,H,V,ne){var Se=2;if(H=v,typeof v==\"function\")S2(v)&&(Se=1);else if(typeof v==\"string\")Se=5;else e:switch(v){case E:return kf(Q.children,V,ne,D);case ue:Se=8,V|=16;break;case C:Se=8,V|=1;break;case S:return v=Ka(12,Q,D,V|8),v.elementType=S,v.type=S,v.lanes=ne,v;case N:return v=Ka(13,Q,D,V),v.type=N,v.elementType=N,v.lanes=ne,v;case U:return v=Ka(19,Q,D,V),v.elementType=U,v.lanes=ne,v;case le:return D2(Q,V,ne,D);case me:return v=Ka(24,Q,D,V),v.elementType=me,v.lanes=ne,v;default:if(typeof v==\"object\"&&v!==null)switch(v.$$typeof){case P:Se=10;break e;case I:Se=9;break e;case R:Se=11;break e;case W:Se=14;break e;case ee:Se=16,H=null;break e;case ie:Se=22;break e}throw Error(c(130,v==null?v:typeof v,\"\"))}return D=Ka(Se,Q,D,V),D.elementType=v,D.type=H,D.lanes=ne,D}function kf(v,D,Q,H){return v=Ka(7,v,H,D),v.lanes=Q,v}function D2(v,D,Q,H){return v=Ka(23,v,H,D),v.elementType=le,v.lanes=Q,v}function b2(v,D,Q){return v=Ka(6,v,null,D),v.lanes=Q,v}function Qo(v,D,Q){return D=Ka(4,v.children!==null?v.children:[],v.key,D),D.lanes=Q,D.stateNode={containerInfo:v.containerInfo,pendingChildren:null,implementation:v.implementation},D}function oM(v,D,Q){this.tag=D,this.containerInfo=v,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=b,this.pendingContext=this.context=null,this.hydrate=Q,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=fa(0),this.expirationTimes=fa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),X&&(this.mutableSourceEagerHydrationData=null)}function xP(v){var D=v._reactInternals;if(D===void 0)throw typeof v.render==\"function\"?Error(c(188)):Error(c(268,Object.keys(v)));return v=se(D),v===null?null:v.stateNode}function kP(v,D){if(v=v.memoizedState,v!==null&&v.dehydrated!==null){var Q=v.retryLane;v.retryLane=Q!==0&&Q<D?Q:D}}function Vy(v,D){kP(v,D),(v=v.alternate)&&kP(v,D)}function aM(v){return v=se(v),v===null?null:v.stateNode}function lM(){return null}return r.IsThisRendererActing=Wy,r.act=function(v){function D(){Ja--,A2.current=Q,Wy.current=H}Yy===!1&&(Yy=!0,console.error(\"act(...) is not supported in production builds of React, and might not behave as expected.\")),Ja++;var Q=A2.current,H=Wy.current;A2.current=!0,Wy.current=!0;try{var V=yP(v)}catch(ne){throw D(),ne}if(V!==null&&typeof V==\"object\"&&typeof V.then==\"function\")return{then:function(ne,Se){V.then(function(){1<Ja||PP===!0&&Q===!0?(D(),ne()):da(function(_e){D(),_e?Se(_e):ne()})},function(_e){D(),Se(_e)})}};try{Ja!==1||PP!==!1&&Q!==!1||v2(),D()}catch(ne){throw D(),ne}return{then:function(ne){ne()}}},r.attemptContinuousHydration=function(v){if(v.tag===13){var D=ko();Tl(v,67108864,D),Vy(v,67108864)}},r.attemptHydrationAtCurrentPriority=function(v){if(v.tag===13){var D=ko(),Q=Bs(v);Tl(v,Q,D),Vy(v,Q)}},r.attemptSynchronousHydration=function(v){switch(v.tag){case 3:var D=v.stateNode;if(D.hydrate){var Q=ca(D.pendingLanes);D.expiredLanes|=Q&D.pendingLanes,ga(D,bt()),!(xr&48)&&(bf(),Tn())}break;case 13:var H=ko();EP(function(){return Tl(v,1,H)}),Vy(v,4)}},r.attemptUserBlockingHydration=function(v){if(v.tag===13){var D=ko();Tl(v,4,D),Vy(v,4)}},r.batchedEventUpdates=function(v,D){var Q=xr;xr|=2;try{return v(D)}finally{xr=Q,xr===0&&(bf(),Tn())}},r.batchedUpdates=yP,r.createComponentSelector=function(v){return{$$typeof:Ty,value:v}},r.createContainer=function(v,D,Q){return v=new oM(v,D,Q),D=Ka(3,null,null,D===2?7:D===1?3:0),v.current=D,D.stateNode=v,Bh(D),v},r.createHasPsuedoClassSelector=function(v){return{$$typeof:Ry,value:v}},r.createPortal=function(v,D,Q){var H=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:H==null?null:\"\"+H,children:v,containerInfo:D,implementation:Q}},r.createRoleSelector=function(v){return{$$typeof:Fy,value:v}},r.createTestNameSelector=function(v){return{$$typeof:zg,value:v}},r.createTextSelector=function(v){return{$$typeof:Ny,value:v}},r.deferredUpdates=function(v){return li(97,v)},r.discreteUpdates=function(v,D,Q,H,V){var ne=xr;xr|=4;try{return li(98,v.bind(null,D,Q,H,V))}finally{xr=ne,xr===0&&(bf(),Tn())}},r.findAllNodes=u2,r.findBoundingRects=function(v,D){if(!qt)throw Error(c(363));D=u2(v,D),v=[];for(var Q=0;Q<D.length;Q++)v.push(Pt(D[Q]));for(D=v.length-1;0<D;D--){Q=v[D];for(var H=Q.x,V=H+Q.width,ne=Q.y,Se=ne+Q.height,_e=D-1;0<=_e;_e--)if(D!==_e){var pt=v[_e],Wt=pt.x,Sr=Wt+pt.width,Lr=pt.y,Zt=Lr+pt.height;if(H>=Wt&&ne>=Lr&&V<=Sr&&Se<=Zt){v.splice(D,1);break}else if(H!==Wt||Q.width!==pt.width||Zt<ne||Lr>Se){if(!(ne!==Lr||Q.height!==pt.height||Sr<H||Wt>V)){Wt>H&&(pt.width+=Wt-H,pt.x=H),Sr<V&&(pt.width=V-Wt),v.splice(D,1);break}}else{Lr>ne&&(pt.height+=Lr-ne,pt.y=ne),Zt<Se&&(pt.height=Se-Lr),v.splice(D,1);break}}}return v},r.findHostInstance=xP,r.findHostInstanceWithNoPortals=function(v){return v=Z(v),v===null?null:v.tag===20?v.stateNode.instance:v.stateNode},r.findHostInstanceWithWarning=function(v){return xP(v)},r.flushControlled=function(v){var D=xr;xr|=1;try{li(99,v)}finally{xr=D,xr===0&&(bf(),Tn())}},r.flushDiscreteUpdates=function(){!(xr&49)&&(zL(),vu())},r.flushPassiveEffects=vu,r.flushSync=EP,r.focusWithin=function(v,D){if(!qt)throw Error(c(363));for(v=Oy(v),D=c2(v,D),D=Array.from(D),v=0;v<D.length;){var Q=D[v++];if(!Pr(Q)){if(Q.tag===5&&Or(Q.stateNode))return!0;for(Q=Q.child;Q!==null;)D.push(Q),Q=Q.sibling}}return!1},r.getCurrentUpdateLanePriority=function(){return lc},r.getFindAllNodesFailureDescription=function(v,D){if(!qt)throw Error(c(363));var Q=0,H=[];v=[Oy(v),0];for(var V=0;V<v.length;){var ne=v[V++],Se=v[V++],_e=D[Se];if((ne.tag!==5||!Pr(ne))&&(Sf(ne,_e)&&(H.push(Df(_e)),Se++,Se>Q&&(Q=Se)),Se<D.length))for(ne=ne.child;ne!==null;)v.push(ne,Se),ne=ne.sibling}if(Q<D.length){for(v=[];Q<D.length;Q++)v.push(Df(D[Q]));return`findAllNodes was able to match part of the selector:\n  `+(H.join(\" > \")+`\n\nNo matching component was found for:\n  `)+v.join(\" > \")}return null},r.getPublicRootInstance=function(v){if(v=v.current,!v.child)return null;switch(v.child.tag){case 5:return Re(v.child.stateNode);default:return v.child.stateNode}},r.injectIntoDevTools=function(v){if(v={bundleType:v.bundleType,version:v.version,rendererPackageName:v.rendererPackageName,rendererConfig:v.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:f.ReactCurrentDispatcher,findHostInstanceByFiber:aM,findFiberByHostInstance:v.findFiberByHostInstance||lM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\")v=!1;else{var D=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!D.isDisabled&&D.supportsFiber)try{$e=D.inject(v),Ua=D}catch{}v=!0}return v},r.observeVisibleRects=function(v,D,Q,H){if(!qt)throw Error(c(363));v=u2(v,D);var V=on(v,Q,H).disconnect;return{disconnect:function(){V()}}},r.registerMutableSourceForHydration=function(v,D){var Q=D._getVersion;Q=Q(D._source),v.mutableSourceEagerHydrationData==null?v.mutableSourceEagerHydrationData=[D,Q]:v.mutableSourceEagerHydrationData.push(D,Q)},r.runWithPriority=function(v,D){var Q=lc;try{return lc=v,D()}finally{lc=Q}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(v,D){var Q=xr;xr&=-2,xr|=8;try{return v(D)}finally{xr=Q,xr===0&&(bf(),Tn())}},r.updateContainer=function(v,D,Q,H){var V=D.current,ne=ko(),Se=Bs(V);e:if(Q){Q=Q._reactInternals;t:{if(we(Q)!==Q||Q.tag!==1)throw Error(c(170));var _e=Q;do{switch(_e.tag){case 3:_e=_e.stateNode.context;break t;case 1:if(Kn(_e.type)){_e=_e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}_e=_e.return}while(_e!==null);throw Error(c(171))}if(Q.tag===1){var pt=Q.type;if(Kn(pt)){Q=Oa(Q,pt,_e);break e}}Q=_e}else Q=la;return D.context===null?D.context=Q:D.pendingContext=Q,D=Dl(ne,Se),D.payload={element:v},H=H===void 0?null:H,H!==null&&(D.callback=H),bl(V,D),Tl(V,Se,ne),Se},r}});var Swe=_((vKt,vwe)=>{\"use strict\";vwe.exports=Bwe()});var bwe=_((SKt,Dwe)=>{\"use strict\";var Spt={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};Dwe.exports=Spt});var Qwe=_((DKt,kwe)=>{\"use strict\";var Dpt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},FF=function(){function t(e,r){for(var s=0;s<r.length;s++){var a=r[s];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,s){return r&&t(e.prototype,r),s&&t(e,s),e}}();function V9(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function J9(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}var tf=bwe(),bpt=function(){function t(e,r,s,a,n,c){J9(this,t),this.left=e,this.right=r,this.top=s,this.bottom=a,this.width=n,this.height=c}return FF(t,[{key:\"fromJS\",value:function(r){r(this.left,this.right,this.top,this.bottom,this.width,this.height)}},{key:\"toString\",value:function(){return\"<Layout#\"+this.left+\":\"+this.right+\";\"+this.top+\":\"+this.bottom+\";\"+this.width+\":\"+this.height+\">\"}}]),t}(),Pwe=function(){FF(t,null,[{key:\"fromJS\",value:function(r){var s=r.width,a=r.height;return new t(s,a)}}]);function t(e,r){J9(this,t),this.width=e,this.height=r}return FF(t,[{key:\"fromJS\",value:function(r){r(this.width,this.height)}},{key:\"toString\",value:function(){return\"<Size#\"+this.width+\"x\"+this.height+\">\"}}]),t}(),xwe=function(){function t(e,r){J9(this,t),this.unit=e,this.value=r}return FF(t,[{key:\"fromJS\",value:function(r){r(this.unit,this.value)}},{key:\"toString\",value:function(){switch(this.unit){case tf.UNIT_POINT:return String(this.value);case tf.UNIT_PERCENT:return this.value+\"%\";case tf.UNIT_AUTO:return\"auto\";default:return this.value+\"?\"}}},{key:\"valueOf\",value:function(){return this.value}}]),t}();kwe.exports=function(t,e){function r(c,f,p){var h=c[f];c[f]=function(){for(var E=arguments.length,C=Array(E),S=0;S<E;S++)C[S]=arguments[S];return p.call.apply(p,[this,h].concat(C))}}for(var s=[\"setPosition\",\"setMargin\",\"setFlexBasis\",\"setWidth\",\"setHeight\",\"setMinWidth\",\"setMinHeight\",\"setMaxWidth\",\"setMaxHeight\",\"setPadding\"],a=function(){var f,p=s[n],h=(f={},V9(f,tf.UNIT_POINT,e.Node.prototype[p]),V9(f,tf.UNIT_PERCENT,e.Node.prototype[p+\"Percent\"]),V9(f,tf.UNIT_AUTO,e.Node.prototype[p+\"Auto\"]),f);r(e.Node.prototype,p,function(E){for(var C=arguments.length,S=Array(C>1?C-1:0),P=1;P<C;P++)S[P-1]=arguments[P];var I=S.pop(),R=void 0,N=void 0;if(I===\"auto\")R=tf.UNIT_AUTO,N=void 0;else if(I instanceof xwe)R=I.unit,N=I.valueOf();else if(R=typeof I==\"string\"&&I.endsWith(\"%\")?tf.UNIT_PERCENT:tf.UNIT_POINT,N=parseFloat(I),!Number.isNaN(I)&&Number.isNaN(N))throw new Error(\"Invalid value \"+I+\" for \"+p);if(!h[R])throw new Error('Failed to execute \"'+p+`\": Unsupported unit '`+I+\"'\");if(N!==void 0){var U;return(U=h[R]).call.apply(U,[this].concat(S,[N]))}else{var W;return(W=h[R]).call.apply(W,[this].concat(S))}})},n=0;n<s.length;n++)a();return r(e.Config.prototype,\"free\",function(){e.Config.destroy(this)}),r(e.Node,\"create\",function(c,f){return f?e.Node.createWithConfig(f):e.Node.createDefault()}),r(e.Node.prototype,\"free\",function(){e.Node.destroy(this)}),r(e.Node.prototype,\"freeRecursive\",function(){for(var c=0,f=this.getChildCount();c<f;++c)this.getChild(0).freeRecursive();this.free()}),r(e.Node.prototype,\"setMeasureFunc\",function(c,f){return f?c.call(this,function(){return Pwe.fromJS(f.apply(void 0,arguments))}):this.unsetMeasureFunc()}),r(e.Node.prototype,\"calculateLayout\",function(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:tf.DIRECTION_LTR;return c.call(this,f,p,h)}),Dpt({Config:e.Config,Node:e.Node,Layout:t(\"Layout\",bpt),Size:t(\"Size\",Pwe),Value:t(\"Value\",xwe),getInstanceCount:function(){return e.getInstanceCount.apply(e,arguments)}},tf)}});var Twe=_((exports,module)=>{(function(t,e){typeof define==\"function\"&&define.amd?define([],function(){return e}):typeof module==\"object\"&&module.exports?module.exports=e:(t.nbind=t.nbind||{}).init=e})(exports,function(Module,cb){typeof Module==\"function\"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(t,e){return function(){t&&t.apply(this,arguments);try{Module.ccall(\"nbind_init\")}catch(r){e(r);return}e(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module<\"u\"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT===\"WEB\")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT===\"WORKER\")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT===\"NODE\")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT===\"SHELL\")ENVIRONMENT_IS_SHELL=!0;else throw new Error(\"The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.\");else ENVIRONMENT_IS_WEB=typeof window==\"object\",ENVIRONMENT_IS_WORKER=typeof importScripts==\"function\",ENVIRONMENT_IS_NODE=typeof process==\"object\"&&typeof Ie==\"function\"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(e,r){nodeFS||(nodeFS={}(\"\")),nodePath||(nodePath={}(\"\")),e=nodePath.normalize(e);var s=nodeFS.readFileSync(e);return r?s:s.toString()},Module.readBinary=function(e){var r=Module.read(e,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\\\/g,\"/\"):Module.thisProgram=\"unknown-program\"),Module.arguments=process.argv.slice(2),typeof module<\"u\"&&(module.exports=Module),Module.inspect=function(){return\"[Emscripten Module object]\"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<\"u\"&&(Module.printErr=printErr),typeof read<\"u\"?Module.read=read:Module.read=function(){throw\"no read() available\"},Module.readBinary=function(e){if(typeof readbuffer==\"function\")return new Uint8Array(readbuffer(e));var r=read(e,\"binary\");return assert(typeof r==\"object\"),r},typeof scriptArgs<\"u\"?Module.arguments=scriptArgs:typeof arguments<\"u\"&&(Module.arguments=arguments),typeof quit==\"function\"&&(Module.quit=function(t,e){quit(t)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(e){var r=new XMLHttpRequest;return r.open(\"GET\",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var r=new XMLHttpRequest;return r.open(\"GET\",e,!1),r.responseType=\"arraybuffer\",r.send(null),new Uint8Array(r.response)}),Module.readAsync=function(e,r,s){var a=new XMLHttpRequest;a.open(\"GET\",e,!0),a.responseType=\"arraybuffer\",a.onload=function(){a.status==200||a.status==0&&a.response?r(a.response):s()},a.onerror=s,a.send(null)},typeof arguments<\"u\"&&(Module.arguments=arguments),typeof console<\"u\")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<\"u\"?function(t){dump(t)}:function(t){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>\"u\"&&(Module.setWindowTitle=function(t){document.title=t})}else throw\"Unknown runtime environment. Where are we?\";function globalEval(t){eval.call(null,t)}!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram=\"./this.program\"),Module.quit||(Module.quit=function(t,e){throw e}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(t){return tempRet0=t,t},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(t){STACKTOP=t},getNativeTypeSize:function(t){switch(t){case\"i1\":case\"i8\":return 1;case\"i16\":return 2;case\"i32\":return 4;case\"i64\":return 8;case\"float\":return 4;case\"double\":return 8;default:{if(t[t.length-1]===\"*\")return Runtime.QUANTUM_SIZE;if(t[0]===\"i\"){var e=parseInt(t.substr(1));return assert(e%8===0),e/8}else return 0}}},getNativeFieldSize:function(t){return Math.max(Runtime.getNativeTypeSize(t),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(t,e){return e===\"double\"||e===\"i64\"?t&7&&(assert((t&7)===4),t+=4):assert((t&3)===0),t},getAlignSize:function(t,e,r){return!r&&(t==\"i64\"||t==\"double\")?8:t?Math.min(e||(t?Runtime.getNativeFieldSize(t):0),Runtime.QUANTUM_SIZE):Math.min(e,8)},dynCall:function(t,e,r){return r&&r.length?Module[\"dynCall_\"+t].apply(null,[e].concat(r)):Module[\"dynCall_\"+t].call(null,e)},functionPointers:[],addFunction:function(t){for(var e=0;e<Runtime.functionPointers.length;e++)if(!Runtime.functionPointers[e])return Runtime.functionPointers[e]=t,2*(1+e);throw\"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.\"},removeFunction:function(t){Runtime.functionPointers[(t-2)/2]=null},warnOnce:function(t){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[t]||(Runtime.warnOnce.shown[t]=1,Module.printErr(t))},funcWrappers:{},getFuncWrapper:function(t,e){if(t){assert(e),Runtime.funcWrappers[e]||(Runtime.funcWrappers[e]={});var r=Runtime.funcWrappers[e];return r[t]||(e.length===1?r[t]=function(){return Runtime.dynCall(e,t)}:e.length===2?r[t]=function(a){return Runtime.dynCall(e,t,[a])}:r[t]=function(){return Runtime.dynCall(e,t,Array.prototype.slice.call(arguments))}),r[t]}},getCompilerSetting:function(t){throw\"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work\"},stackAlloc:function(t){var e=STACKTOP;return STACKTOP=STACKTOP+t|0,STACKTOP=STACKTOP+15&-16,e},staticAlloc:function(t){var e=STATICTOP;return STATICTOP=STATICTOP+t|0,STATICTOP=STATICTOP+15&-16,e},dynamicAlloc:function(t){var e=HEAP32[DYNAMICTOP_PTR>>2],r=(e+t+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=r,r>=TOTAL_MEMORY){var s=enlargeMemory();if(!s)return HEAP32[DYNAMICTOP_PTR>>2]=e,0}return e},alignMemory:function(t,e){var r=t=Math.ceil(t/(e||16))*(e||16);return r},makeBigInt:function(t,e,r){var s=r?+(t>>>0)+ +(e>>>0)*4294967296:+(t>>>0)+ +(e|0)*4294967296;return s},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(t,e){t||abort(\"Assertion failed: \"+e)}function getCFunc(ident){var func=Module[\"_\"+ident];if(!func)try{func=eval(\"_\"+ident)}catch(t){}return assert(func,\"Cannot call unknown function \"+ident+\" (perhaps LLVM optimizations or closure removed it?)\"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(t){var e=Runtime.stackAlloc(t.length);return writeArrayToMemory(t,e),e},stringToC:function(t){var e=0;if(t!=null&&t!==0){var r=(t.length<<2)+1;e=Runtime.stackAlloc(r),stringToUTF8(t,e,r)}return e}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,r,s,a,n){var c=getCFunc(e),f=[],p=0;if(a)for(var h=0;h<a.length;h++){var E=toC[s[h]];E?(p===0&&(p=Runtime.stackSave()),f[h]=E(a[h])):f[h]=a[h]}var C=c.apply(null,f);if(r===\"string\"&&(C=Pointer_stringify(C)),p!==0){if(n&&n.async){EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(p)});return}Runtime.stackRestore(p)}return C};var sourceRegex=/^function\\s*[a-zA-Z$_0-9]*\\s*\\(([^)]*)\\)\\s*{\\s*([^*]*?)[\\s;]*(?:return\\s*(.*?)[;\\s]*)?}$/;function parseJSFunc(t){var e=t.toString().match(sourceRegex).slice(1);return{arguments:e[0],body:e[1],returnValue:e[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource){JSsource={};for(var t in JSfuncs)JSfuncs.hasOwnProperty(t)&&(JSsource[t]=parseJSFunc(JSfuncs[t]))}}cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every(function(t){return t===\"number\"}),numericRet=returnType!==\"string\";if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map(function(t,e){return\"$\"+e}),funcstr=\"(function(\"+argNames.join(\",\")+\") {\",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+=\"var stack = \"+JSsource.stackSave.body+\";\";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if(type!==\"number\"){var convertCode=JSsource[type+\"ToC\"];funcstr+=\"var \"+convertCode.arguments+\" = \"+arg+\";\",funcstr+=convertCode.body+\";\",funcstr+=arg+\"=(\"+convertCode.returnValue+\");\"}}}var cfuncname=parseJSFunc(function(){return cfunc}).returnValue;if(funcstr+=\"var ret = \"+cfuncname+\"(\"+argNames.join(\",\")+\");\",!numericRet){var strgfy=parseJSFunc(function(){return Pointer_stringify}).returnValue;funcstr+=\"ret = \"+strgfy+\"(ret);\"}return numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace(\"()\",\"(stack)\")+\";\"),funcstr+=\"return ret})\",eval(funcstr)}})(),Module.ccall=ccall,Module.cwrap=cwrap;function setValue(t,e,r,s){switch(r=r||\"i8\",r.charAt(r.length-1)===\"*\"&&(r=\"i32\"),r){case\"i1\":HEAP8[t>>0]=e;break;case\"i8\":HEAP8[t>>0]=e;break;case\"i16\":HEAP16[t>>1]=e;break;case\"i32\":HEAP32[t>>2]=e;break;case\"i64\":tempI64=[e>>>0,(tempDouble=e,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t>>2]=tempI64[0],HEAP32[t+4>>2]=tempI64[1];break;case\"float\":HEAPF32[t>>2]=e;break;case\"double\":HEAPF64[t>>3]=e;break;default:abort(\"invalid type for setValue: \"+r)}}Module.setValue=setValue;function getValue(t,e,r){switch(e=e||\"i8\",e.charAt(e.length-1)===\"*\"&&(e=\"i32\"),e){case\"i1\":return HEAP8[t>>0];case\"i8\":return HEAP8[t>>0];case\"i16\":return HEAP16[t>>1];case\"i32\":return HEAP32[t>>2];case\"i64\":return HEAP32[t>>2];case\"float\":return HEAPF32[t>>2];case\"double\":return HEAPF64[t>>3];default:abort(\"invalid type for setValue: \"+e)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(t,e,r,s){var a,n;typeof t==\"number\"?(a=!0,n=t):(a=!1,n=t.length);var c=typeof e==\"string\"?e:null,f;if(r==ALLOC_NONE?f=s:f=[typeof _malloc==\"function\"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][r===void 0?ALLOC_STATIC:r](Math.max(n,c?1:e.length)),a){var s=f,p;for(assert((f&3)==0),p=f+(n&-4);s<p;s+=4)HEAP32[s>>2]=0;for(p=f+n;s<p;)HEAP8[s++>>0]=0;return f}if(c===\"i8\")return t.subarray||t.slice?HEAPU8.set(t,f):HEAPU8.set(new Uint8Array(t),f),f;for(var h=0,E,C,S;h<n;){var P=t[h];if(typeof P==\"function\"&&(P=Runtime.getFunctionIndex(P)),E=c||e[h],E===0){h++;continue}E==\"i64\"&&(E=\"i32\"),setValue(f+h,P,E),S!==E&&(C=Runtime.getNativeTypeSize(E),S=E),h+=C}return f}Module.allocate=allocate;function getMemory(t){return staticSealed?runtimeInitialized?_malloc(t):Runtime.dynamicAlloc(t):Runtime.staticAlloc(t)}Module.getMemory=getMemory;function Pointer_stringify(t,e){if(e===0||!t)return\"\";for(var r=0,s,a=0;s=HEAPU8[t+a>>0],r|=s,!(s==0&&!e||(a++,e&&a==e)););e||(e=a);var n=\"\";if(r<128){for(var c=1024,f;e>0;)f=String.fromCharCode.apply(String,HEAPU8.subarray(t,t+Math.min(e,c))),n=n?n+f:f,t+=c,e-=c;return n}return Module.UTF8ToString(t)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(t){for(var e=\"\";;){var r=HEAP8[t++>>0];if(!r)return e;e+=String.fromCharCode(r)}}Module.AsciiToString=AsciiToString;function stringToAscii(t,e){return writeAsciiToMemory(t,e,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<\"u\"?new TextDecoder(\"utf8\"):void 0;function UTF8ArrayToString(t,e){for(var r=e;t[r];)++r;if(r-e>16&&t.subarray&&UTF8Decoder)return UTF8Decoder.decode(t.subarray(e,r));for(var s,a,n,c,f,p,h=\"\";;){if(s=t[e++],!s)return h;if(!(s&128)){h+=String.fromCharCode(s);continue}if(a=t[e++]&63,(s&224)==192){h+=String.fromCharCode((s&31)<<6|a);continue}if(n=t[e++]&63,(s&240)==224?s=(s&15)<<12|a<<6|n:(c=t[e++]&63,(s&248)==240?s=(s&7)<<18|a<<12|n<<6|c:(f=t[e++]&63,(s&252)==248?s=(s&3)<<24|a<<18|n<<12|c<<6|f:(p=t[e++]&63,s=(s&1)<<30|a<<24|n<<18|c<<12|f<<6|p))),s<65536)h+=String.fromCharCode(s);else{var E=s-65536;h+=String.fromCharCode(55296|E>>10,56320|E&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(t){return UTF8ArrayToString(HEAPU8,t)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(t,e,r,s){if(!(s>0))return 0;for(var a=r,n=r+s-1,c=0;c<t.length;++c){var f=t.charCodeAt(c);if(f>=55296&&f<=57343&&(f=65536+((f&1023)<<10)|t.charCodeAt(++c)&1023),f<=127){if(r>=n)break;e[r++]=f}else if(f<=2047){if(r+1>=n)break;e[r++]=192|f>>6,e[r++]=128|f&63}else if(f<=65535){if(r+2>=n)break;e[r++]=224|f>>12,e[r++]=128|f>>6&63,e[r++]=128|f&63}else if(f<=2097151){if(r+3>=n)break;e[r++]=240|f>>18,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}else if(f<=67108863){if(r+4>=n)break;e[r++]=248|f>>24,e[r++]=128|f>>18&63,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}else{if(r+5>=n)break;e[r++]=252|f>>30,e[r++]=128|f>>24&63,e[r++]=128|f>>18&63,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}}return e[r]=0,r-a}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(t,e,r){return stringToUTF8Array(t,HEAPU8,e,r)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(t){for(var e=0,r=0;r<t.length;++r){var s=t.charCodeAt(r);s>=55296&&s<=57343&&(s=65536+((s&1023)<<10)|t.charCodeAt(++r)&1023),s<=127?++e:s<=2047?e+=2:s<=65535?e+=3:s<=2097151?e+=4:s<=67108863?e+=5:e+=6}return e}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder<\"u\"?new TextDecoder(\"utf-16le\"):void 0;function demangle(t){var e=Module.___cxa_demangle||Module.__cxa_demangle;if(e){try{var r=t.substr(1),s=lengthBytesUTF8(r)+1,a=_malloc(s);stringToUTF8(r,a,s);var n=_malloc(4),c=e(a,0,0,n);if(getValue(n,\"i32\")===0&&c)return Pointer_stringify(c)}catch{}finally{a&&_free(a),n&&_free(n),c&&_free(c)}return t}return Runtime.warnOnce(\"warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling\"),t}function demangleAll(t){var e=/__Z[\\w\\d_]+/g;return t.replace(e,function(r){var s=demangle(r);return r===s?r:r+\" [\"+s+\"]\"})}function jsStackTrace(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return\"(no stack trace available)\"}return t.stack.toString()}function stackTrace(){var t=jsStackTrace();return Module.extraStackTrace&&(t+=`\n`+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort(\"Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value \"+TOTAL_MEMORY+\", (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 \")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr(\"TOTAL_MEMORY should be larger than TOTAL_STACK, was \"+TOTAL_MEMORY+\"! (TOTAL_STACK=\"+TOTAL_STACK+\")\"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw\"Runtime error: expected the system to be little-endian!\";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(t){for(;t.length>0;){var e=t.shift();if(typeof e==\"function\"){e();continue}var r=e.func;typeof r==\"number\"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun==\"function\"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun==\"function\"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var s=r>0?r:lengthBytesUTF8(t)+1,a=new Array(s),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r<t.length;r++){var s=t[r];s>255&&(s&=255),e.push(String.fromCharCode(s))}return e.join(\"\")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce(\"writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!\");var s,a;r&&(a=e+lengthBytesUTF8(t),s=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=s)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(t,e,r){for(var s=0;s<t.length;++s)HEAP8[e++>>0]=t.charCodeAt(s);r||(HEAP8[e>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function t(e,r){var s=e>>>16,a=e&65535,n=r>>>16,c=r&65535;return a*c+(s*c+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(t){return froundBuffer[0]=t,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(t){t=t>>>0;for(var e=0;e<32;e++)if(t&1<<31-e)return e;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(t){return t}function addRunDependency(t){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(t){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var e=dependenciesFulfilled;dependenciesFulfilled=null,e()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(t,e,r,s,a,n,c,f){return _nbind.callbackSignatureList[t].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(t,e,r,s,a,n,c,f){return ASM_CONSTS[t](e,r,s,a,n,c,f)}function _emscripten_asm_const_iiiii(t,e,r,s,a){return ASM_CONSTS[t](e,r,s,a)}function _emscripten_asm_const_iiidddddd(t,e,r,s,a,n,c,f,p){return ASM_CONSTS[t](e,r,s,a,n,c,f,p)}function _emscripten_asm_const_iiididi(t,e,r,s,a,n,c){return ASM_CONSTS[t](e,r,s,a,n,c)}function _emscripten_asm_const_iiii(t,e,r,s){return ASM_CONSTS[t](e,r,s)}function _emscripten_asm_const_iiiid(t,e,r,s,a){return ASM_CONSTS[t](e,r,s,a)}function _emscripten_asm_const_iiiiii(t,e,r,s,a,n){return ASM_CONSTS[t](e,r,s,a,n)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],\"i8\",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(t,e){__ATEXIT__.unshift({func:t,arg:e})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr(\"missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj\"),abort(-1)}function __decorate(t,e,r,s){var a=arguments.length,n=a<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,r):s,c;if(typeof Reflect==\"object\"&&typeof Reflect.decorate==\"function\")n=Reflect.decorate(t,e,r,s);else for(var f=t.length-1;f>=0;f--)(c=t[f])&&(n=(a<3?c(n):a>3?c(e,r,n):c(e,r))||n);return a>3&&n&&Object.defineProperty(e,r,n),n}function _defineHidden(t){return function(e,r){Object.defineProperty(e,r,{configurable:!1,enumerable:!1,value:t,writable:!0})}}var _nbind={};function __nbind_free_external(t){_nbind.externalList[t].dereference(t)}function __nbind_reference_external(t){_nbind.externalList[t].reference()}function _llvm_stackrestore(t){var e=_llvm_stacksave,r=e.LLVM_SAVEDSTACKS[t];e.LLVM_SAVEDSTACKS.splice(t,1),Runtime.stackRestore(r)}function __nbind_register_pool(t,e,r,s){_nbind.Pool.pageSize=t,_nbind.Pool.usedPtr=e/4,_nbind.Pool.rootPtr=r,_nbind.Pool.pagePtr=s/4,HEAP32[e/4]=16909060,HEAP8[e]==1&&(_nbind.bigEndian=!0),HEAP32[e/4]=0,_nbind.makeTypeKindTbl=(n={},n[1024]=_nbind.PrimitiveType,n[64]=_nbind.Int64Type,n[2048]=_nbind.BindClass,n[3072]=_nbind.BindClassPtr,n[4096]=_nbind.SharedClassPtr,n[5120]=_nbind.ArrayType,n[6144]=_nbind.ArrayType,n[7168]=_nbind.CStringType,n[9216]=_nbind.CallbackType,n[10240]=_nbind.BindType,n),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,\"cbFunction &\":_nbind.CallbackType,\"const cbFunction &\":_nbind.CallbackType,\"const std::string &\":_nbind.StringType,\"std::string\":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var a=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:\"\"});a.proto=Module,_nbind.BindClass.list.push(a);var n}function _emscripten_set_main_loop_timing(t,e){if(Browser.mainLoop.timingMode=t,Browser.mainLoop.timingValue=e,!Browser.mainLoop.func)return 1;if(t==0)Browser.mainLoop.scheduler=function(){var c=Math.max(0,Browser.mainLoop.tickStartTime+e-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,c)},Browser.mainLoop.method=\"timeout\";else if(t==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method=\"rAF\";else if(t==2){if(!window.setImmediate){let n=function(c){c.source===window&&c.data===s&&(c.stopPropagation(),r.shift()())};var a=n,r=[],s=\"setimmediate\";window.addEventListener(\"message\",n,!0),window.setImmediate=function(f){r.push(f),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(f),window.postMessage({target:s})):window.postMessage(s,\"*\")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method=\"immediate\"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(t,e,r,s,a){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,\"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.\"),Browser.mainLoop.func=t,Browser.mainLoop.arg=s;var n;typeof s<\"u\"?n=function(){Module.dynCall_vi(t,s)}:n=function(){Module.dynCall_v(t)};var c=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var p=Date.now(),h=Browser.mainLoop.queue.shift();if(h.func(h.arg),Browser.mainLoop.remainingBlockers){var E=Browser.mainLoop.remainingBlockers,C=E%1==0?E-1:Math.floor(E);h.counted?Browser.mainLoop.remainingBlockers=C:(C=C+.5,Browser.mainLoop.remainingBlockers=(8*E+C)/9)}if(console.log('main loop blocker \"'+h.name+'\" took '+(Date.now()-p)+\" ms\"),Browser.mainLoop.updateStatus(),c<Browser.mainLoop.currentlyRunningMainloop)return;setTimeout(Browser.mainLoop.runner,0);return}if(!(c<Browser.mainLoop.currentlyRunningMainloop)){if(Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0,Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method===\"timeout\"&&Module.ctx&&(Module.printErr(\"Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!\"),Browser.mainLoop.method=\"\"),Browser.mainLoop.runIter(n),!(c<Browser.mainLoop.currentlyRunningMainloop)&&(typeof SDL==\"object\"&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),Browser.mainLoop.scheduler())}}},a||(e&&e>0?_emscripten_set_main_loop_timing(0,1e3/e):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),r)throw\"SimulateInfiniteLoop\"}var Browser={mainLoop:{scheduler:null,method:\"\",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var t=Browser.mainLoop.timingMode,e=Browser.mainLoop.timingValue,r=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(r,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(t,e),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var t=Module.statusMessage||\"Please wait...\",e=Browser.mainLoop.remainingBlockers,r=Browser.mainLoop.expectedBlockers;e?e<r?Module.setStatus(t+\" (\"+(r-e)+\"/\"+r+\")\"):Module.setStatus(t):Module.setStatus(\"\")}},runIter:function(t){if(!ABORT){if(Module.preMainLoop){var e=Module.preMainLoop();if(e===!1)return}try{t()}catch(r){if(r instanceof ExitStatus)return;throw r&&typeof r==\"object\"&&r.stack&&Module.printErr(\"exception thrown: \"+[r,r.stack]),r}Module.postMainLoop&&Module.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(Module.preloadPlugins||(Module.preloadPlugins=[]),Browser.initted)return;Browser.initted=!0;try{new Blob,Browser.hasBlobConstructor=!0}catch{Browser.hasBlobConstructor=!1,console.log(\"warning: no blob constructor, cannot create blobs with mimetypes\")}Browser.BlobBuilder=typeof MozBlobBuilder<\"u\"?MozBlobBuilder:typeof WebKitBlobBuilder<\"u\"?WebKitBlobBuilder:Browser.hasBlobConstructor?null:console.log(\"warning: no BlobBuilder\"),Browser.URLObject=typeof window<\"u\"?window.URL?window.URL:window.webkitURL:void 0,!Module.noImageDecoding&&typeof Browser.URLObject>\"u\"&&(console.log(\"warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.\"),Module.noImageDecoding=!0);var t={};t.canHandle=function(n){return!Module.noImageDecoding&&/\\.(jpg|jpeg|png|bmp)$/i.test(n)},t.handle=function(n,c,f,p){var h=null;if(Browser.hasBlobConstructor)try{h=new Blob([n],{type:Browser.getMimetype(c)}),h.size!==n.length&&(h=new Blob([new Uint8Array(n).buffer],{type:Browser.getMimetype(c)}))}catch(P){Runtime.warnOnce(\"Blob constructor present but fails: \"+P+\"; falling back to blob builder\")}if(!h){var E=new Browser.BlobBuilder;E.append(new Uint8Array(n).buffer),h=E.getBlob()}var C=Browser.URLObject.createObjectURL(h),S=new Image;S.onload=function(){assert(S.complete,\"Image \"+c+\" could not be decoded\");var I=document.createElement(\"canvas\");I.width=S.width,I.height=S.height;var R=I.getContext(\"2d\");R.drawImage(S,0,0),Module.preloadedImages[c]=I,Browser.URLObject.revokeObjectURL(C),f&&f(n)},S.onerror=function(I){console.log(\"Image \"+C+\" could not be decoded\"),p&&p()},S.src=C},Module.preloadPlugins.push(t);var e={};e.canHandle=function(n){return!Module.noAudioDecoding&&n.substr(-4)in{\".ogg\":1,\".wav\":1,\".mp3\":1}},e.handle=function(n,c,f,p){var h=!1;function E(R){h||(h=!0,Module.preloadedAudios[c]=R,f&&f(n))}function C(){h||(h=!0,Module.preloadedAudios[c]=new Audio,p&&p())}if(Browser.hasBlobConstructor){try{var S=new Blob([n],{type:Browser.getMimetype(c)})}catch{return C()}var P=Browser.URLObject.createObjectURL(S),I=new Audio;I.addEventListener(\"canplaythrough\",function(){E(I)},!1),I.onerror=function(N){if(h)return;console.log(\"warning: browser could not fully decode audio \"+c+\", trying slower base64 approach\");function U(W){for(var ee=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",ie=\"=\",ue=\"\",le=0,me=0,pe=0;pe<W.length;pe++)for(le=le<<8|W[pe],me+=8;me>=6;){var Be=le>>me-6&63;me-=6,ue+=ee[Be]}return me==2?(ue+=ee[(le&3)<<4],ue+=ie+ie):me==4&&(ue+=ee[(le&15)<<2],ue+=ie),ue}I.src=\"data:audio/x-\"+c.substr(-3)+\";base64,\"+U(n),E(I)},I.src=P,Browser.safeSetTimeout(function(){E(I)},1e4)}else return C()},Module.preloadPlugins.push(e);function r(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var s=Module.canvas;s&&(s.requestPointerLock=s.requestPointerLock||s.mozRequestPointerLock||s.webkitRequestPointerLock||s.msRequestPointerLock||function(){},s.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},s.exitPointerLock=s.exitPointerLock.bind(document),document.addEventListener(\"pointerlockchange\",r,!1),document.addEventListener(\"mozpointerlockchange\",r,!1),document.addEventListener(\"webkitpointerlockchange\",r,!1),document.addEventListener(\"mspointerlockchange\",r,!1),Module.elementPointerLock&&s.addEventListener(\"click\",function(a){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext:function(t,e,r,s){if(e&&Module.ctx&&t==Module.canvas)return Module.ctx;var a,n;if(e){var c={antialias:!1,alpha:!1};if(s)for(var f in s)c[f]=s[f];n=GL.createContext(t,c),n&&(a=GL.getContext(n).GLctx)}else a=t.getContext(\"2d\");return a?(r&&(e||assert(typeof GLctx>\"u\",\"cannot set in module if GLctx is used, but we are a non-GL context that would replace it\"),Module.ctx=a,e&&GL.makeContextCurrent(n),Module.useWebGL=e,Browser.moduleContextCreatedCallbacks.forEach(function(p){p()}),Browser.init()),a):null},destroyContext:function(t,e,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(t,e,r){Browser.lockPointer=t,Browser.resizeCanvas=e,Browser.vrDevice=r,typeof Browser.lockPointer>\"u\"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>\"u\"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice>\"u\"&&(Browser.vrDevice=null);var s=Module.canvas;function a(){Browser.isFullscreen=!1;var c=s.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===c?(s.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},s.exitFullscreen=s.exitFullscreen.bind(document),Browser.lockPointer&&s.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(c.parentNode.insertBefore(s,c),c.parentNode.removeChild(c),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(s)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener(\"fullscreenchange\",a,!1),document.addEventListener(\"mozfullscreenchange\",a,!1),document.addEventListener(\"webkitfullscreenchange\",a,!1),document.addEventListener(\"MSFullscreenChange\",a,!1));var n=document.createElement(\"div\");s.parentNode.insertBefore(n,s),n.appendChild(s),n.requestFullscreen=n.requestFullscreen||n.mozRequestFullScreen||n.msRequestFullscreen||(n.webkitRequestFullscreen?function(){n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(n.webkitRequestFullScreen?function(){n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),r?n.requestFullscreen({vrDisplay:r}):n.requestFullscreen()},requestFullScreen:function(t,e,r){return Module.printErr(\"Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead.\"),Browser.requestFullScreen=function(s,a,n){return Browser.requestFullscreen(s,a,n)},Browser.requestFullscreen(t,e,r)},nextRAF:0,fakeRequestAnimationFrame:function(t){var e=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=e+1e3/60;else for(;e+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var r=Math.max(Browser.nextRAF-e,0);setTimeout(t,r)},requestAnimationFrame:function t(e){typeof window>\"u\"?Browser.fakeRequestAnimationFrame(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(e))},safeCallback:function(t){return function(){if(!ABORT)return t.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var t=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],t.forEach(function(e){e()})}},safeRequestAnimationFrame:function(t){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))})},safeSetTimeout:function(t,e){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))},e)},safeSetInterval:function(t,e){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&t()},e)},getMimetype:function(t){return{jpg:\"image/jpeg\",jpeg:\"image/jpeg\",png:\"image/png\",bmp:\"image/bmp\",ogg:\"audio/ogg\",wav:\"audio/wav\",mp3:\"audio/mpeg\"}[t.substr(t.lastIndexOf(\".\")+1)]},getUserMedia:function(t){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(t)},getMovementX:function(t){return t.movementX||t.mozMovementX||t.webkitMovementX||0},getMovementY:function(t){return t.movementY||t.mozMovementY||t.webkitMovementY||0},getMouseWheelDelta:function(t){var e=0;switch(t.type){case\"DOMMouseScroll\":e=t.detail;break;case\"mousewheel\":e=t.wheelDelta;break;case\"wheel\":e=t.deltaY;break;default:throw\"unrecognized mouse wheel event: \"+t.type}return e},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(t){if(Browser.pointerLock)t.type!=\"mousemove\"&&\"mozMovementX\"in t?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(t),Browser.mouseMovementY=Browser.getMovementY(t)),typeof SDL<\"u\"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var e=Module.canvas.getBoundingClientRect(),r=Module.canvas.width,s=Module.canvas.height,a=typeof window.scrollX<\"u\"?window.scrollX:window.pageXOffset,n=typeof window.scrollY<\"u\"?window.scrollY:window.pageYOffset;if(t.type===\"touchstart\"||t.type===\"touchend\"||t.type===\"touchmove\"){var c=t.touch;if(c===void 0)return;var f=c.pageX-(a+e.left),p=c.pageY-(n+e.top);f=f*(r/e.width),p=p*(s/e.height);var h={x:f,y:p};if(t.type===\"touchstart\")Browser.lastTouches[c.identifier]=h,Browser.touches[c.identifier]=h;else if(t.type===\"touchend\"||t.type===\"touchmove\"){var E=Browser.touches[c.identifier];E||(E=h),Browser.lastTouches[c.identifier]=E,Browser.touches[c.identifier]=h}return}var C=t.pageX-(a+e.left),S=t.pageY-(n+e.top);C=C*(r/e.width),S=S*(s/e.height),Browser.mouseMovementX=C-Browser.mouseX,Browser.mouseMovementY=S-Browser.mouseY,Browser.mouseX=C,Browser.mouseY=S}},asyncLoad:function(t,e,r,s){var a=s?\"\":\"al \"+t;Module.readAsync(t,function(n){assert(n,'Loading data file \"'+t+'\" failed (no arrayBuffer).'),e(new Uint8Array(n)),a&&removeRunDependency(a)},function(n){if(r)r();else throw'Loading data file \"'+t+'\" failed.'}),a&&addRunDependency(a)},resizeListeners:[],updateResizeListeners:function(){var t=Module.canvas;Browser.resizeListeners.forEach(function(e){e(t.width,t.height)})},setCanvasSize:function(t,e,r){var s=Module.canvas;Browser.updateCanvasDimensions(s,t,e),r||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL<\"u\"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL<\"u\"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t&-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},updateCanvasDimensions:function(t,e,r){e&&r?(t.widthNative=e,t.heightNative=r):(e=t.widthNative,r=t.heightNative);var s=e,a=r;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(s/a<Module.forcedAspectRatio?s=Math.round(a*Module.forcedAspectRatio):a=Math.round(s/Module.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===t.parentNode&&typeof screen<\"u\"){var n=Math.min(screen.width/s,screen.height/a);s=Math.round(s*n),a=Math.round(a*n)}Browser.resizeCanvas?(t.width!=s&&(t.width=s),t.height!=a&&(t.height=a),typeof t.style<\"u\"&&(t.style.removeProperty(\"width\"),t.style.removeProperty(\"height\"))):(t.width!=e&&(t.width=e),t.height!=r&&(t.height=r),typeof t.style<\"u\"&&(s!=e||a!=r?(t.style.setProperty(\"width\",s+\"px\",\"important\"),t.style.setProperty(\"height\",a+\"px\",\"important\")):(t.style.removeProperty(\"width\"),t.style.removeProperty(\"height\"))))},wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function(){var t=Browser.nextWgetRequestHandle;return Browser.nextWgetRequestHandle++,t}},SYSCALLS={varargs:0,get:function(t){SYSCALLS.varargs+=4;var e=HEAP32[SYSCALLS.varargs-4>>2];return e},getStr:function(){var t=Pointer_stringify(SYSCALLS.get());return t},get64:function(){var t=SYSCALLS.get(),e=SYSCALLS.get();return t>=0?assert(e===0):assert(e===-1),t},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD();return FS.close(r),0}catch(s){return(typeof FS>\"u\"||!(s instanceof FS.ErrnoError))&&abort(s),-s.errno}}function ___syscall54(t,e){SYSCALLS.varargs=e;try{return 0}catch(r){return(typeof FS>\"u\"||!(r instanceof FS.ErrnoError))&&abort(r),-r.errno}}function _typeModule(t){var e=[[0,1,\"X\"],[1,1,\"const X\"],[128,1,\"X *\"],[256,1,\"X &\"],[384,1,\"X &&\"],[512,1,\"std::shared_ptr<X>\"],[640,1,\"std::unique_ptr<X>\"],[5120,1,\"std::vector<X>\"],[6144,2,\"std::array<X, Y>\"],[9216,-1,\"std::function<X (Y)>\"]];function r(p,h,E,C,S,P){if(h==1){var I=C&896;(I==128||I==256||I==384)&&(p=\"X const\")}var R;return P?R=E.replace(\"X\",p).replace(\"Y\",S):R=p.replace(\"X\",E).replace(\"Y\",S),R.replace(/([*&]) (?=[*&])/g,\"$1\")}function s(p,h,E,C,S){throw new Error(p+\" type \"+E.replace(\"X\",h+\"?\")+(C?\" with flag \"+C:\"\")+\" in \"+S)}function a(p,h,E,C,S,P,I,R){P===void 0&&(P=\"X\"),R===void 0&&(R=1);var N=E(p);if(N)return N;var U=C(p),W=U.placeholderFlag,ee=e[W];I&&ee&&(P=r(I[2],I[0],P,ee[0],\"?\",!0));var ie;W==0&&(ie=\"Unbound\"),W>=10&&(ie=\"Corrupt\"),R>20&&(ie=\"Deeply nested\"),ie&&s(ie,p,P,W,S||\"?\");var ue=U.paramList[0],le=a(ue,h,E,C,S,P,ee,R+1),me,pe={flags:ee[0],id:p,name:\"\",paramList:[le]},Be=[],Ce=\"?\";switch(U.placeholderFlag){case 1:me=le.spec;break;case 2:if((le.flags&15360)==1024&&le.spec.ptrSize==1){pe.flags=7168;break}case 3:case 6:case 5:me=le.spec,le.flags&15360;break;case 8:Ce=\"\"+U.paramList[1],pe.paramList.push(U.paramList[1]);break;case 9:for(var g=0,we=U.paramList[1];g<we.length;g++){var ye=we[g],Ae=a(ye,h,E,C,S,P,ee,R+1);Be.push(Ae.name),pe.paramList.push(Ae)}Ce=Be.join(\", \");break;default:break}if(pe.name=r(ee[2],ee[0],le.name,le.flags,Ce),me){for(var se=0,Z=Object.keys(me);se<Z.length;se++){var De=Z[se];pe[De]=pe[De]||me[De]}pe.flags|=me.flags}return n(h,pe)}function n(p,h){var E=h.flags,C=E&896,S=E&15360;return!h.name&&S==1024&&(h.ptrSize==1?h.name=(E&16?\"\":(E&8?\"un\":\"\")+\"signed \")+\"char\":h.name=(E&8?\"u\":\"\")+(E&32?\"float\":\"int\")+(h.ptrSize*8+\"_t\")),h.ptrSize==8&&!(E&32)&&(S=64),S==2048&&(C==512||C==640?S=4096:C&&(S=3072)),p(S,h)}var c=function(){function p(h){this.id=h.id,this.name=h.name,this.flags=h.flags,this.spec=h}return p.prototype.toString=function(){return this.name},p}(),f={Type:c,getComplexType:a,makeType:n,structureList:e};return t.output=f,t.output||f}function __nbind_register_type(t,e){var r=_nbind.readAsciiString(e),s={flags:10240,id:t,name:r};_nbind.makeType(_nbind.constructType,s)}function __nbind_register_callback_signature(t,e){var r=_nbind.readTypeIdList(t,e),s=_nbind.callbackSignatureList.length;return _nbind.callbackSignatureList[s]=_nbind.makeJSCaller(r),s}function __extends(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function s(){this.constructor=t}s.prototype=e.prototype,t.prototype=new s}function __nbind_register_class(t,e,r,s,a,n,c){var f=_nbind.readAsciiString(c),p=_nbind.readPolicyList(e),h=HEAPU32.subarray(t/4,t/4+2),E={flags:2048|(p.Value?2:0),id:h[0],name:f},C=_nbind.makeType(_nbind.constructType,E);C.ptrType=_nbind.getComplexType(h[1],_nbind.constructType,_nbind.getType,_nbind.queryType),C.destroy=_nbind.makeMethodCaller(C.ptrType,{boundID:E.id,flags:0,name:\"destroy\",num:0,ptr:n,title:C.name+\".free\",typeList:[\"void\",\"uint32_t\",\"uint32_t\"]}),a&&(C.superIdList=Array.prototype.slice.call(HEAPU32.subarray(r/4,r/4+a)),C.upcastList=Array.prototype.slice.call(HEAPU32.subarray(s/4,s/4+a))),Module[C.name]=C.makeBound(p),_nbind.BindClass.list.push(C)}function _removeAccessorPrefix(t){var e=/^[Gg]et_?([A-Z]?([A-Z]?))/;return t.replace(e,function(r,s,a){return a?s:s.toLowerCase()})}function __nbind_register_function(t,e,r,s,a,n,c,f,p,h){var E=_nbind.getType(t),C=_nbind.readPolicyList(e),S=_nbind.readTypeIdList(r,s),P;if(c==5)P=[{direct:a,name:\"__nbindConstructor\",ptr:0,title:E.name+\" constructor\",typeList:[\"uint32_t\"].concat(S.slice(1))},{direct:n,name:\"__nbindValueConstructor\",ptr:0,title:E.name+\" value constructor\",typeList:[\"void\",\"uint32_t\"].concat(S.slice(1))}];else{var I=_nbind.readAsciiString(f),R=(E.name&&E.name+\".\")+I;(c==3||c==4)&&(I=_removeAccessorPrefix(I)),P=[{boundID:t,direct:n,name:I,ptr:a,title:R,typeList:S}]}for(var N=0,U=P;N<U.length;N++){var W=U[N];W.signatureType=c,W.policyTbl=C,W.num=p,W.flags=h,E.addMethod(W)}}function _nbind_value(t,e){_nbind.typeNameTbl[t]||_nbind.throwError(\"Unknown value type \"+t),Module.NBind.bind_value(t,e),_defineHidden(_nbind.typeNameTbl[t].proto.prototype.__nbindValueConstructor)(e.prototype,\"__nbindValueConstructor\")}Module._nbind_value=_nbind_value;function __nbind_get_value_object(t,e){var r=_nbind.popValue(t);if(!r.fromJS)throw new Error(\"Object \"+r+\" has no fromJS function\");r.fromJS(function(){r.__nbindValueConstructor.apply(this,Array.prototype.concat.apply([e],arguments))})}function _emscripten_memcpy_big(t,e,r){return HEAPU8.set(HEAPU8.subarray(e,e+r),t),t}function __nbind_register_primitive(t,e,r){var s={flags:1024|r,id:t,ptrSize:e};_nbind.makeType(_nbind.constructType,s)}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],\"i8\",ALLOC_STATIC);function ___setErrNo(t){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=t),t}function _llvm_stacksave(){var t=_llvm_stacksave;return t.LLVM_SAVEDSTACKS||(t.LLVM_SAVEDSTACKS=[]),t.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),t.LLVM_SAVEDSTACKS.length-1}function ___syscall140(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD(),s=SYSCALLS.get(),a=SYSCALLS.get(),n=SYSCALLS.get(),c=SYSCALLS.get(),f=a;return FS.llseek(r,f,c),HEAP32[n>>2]=r.position,r.getdents&&f===0&&c===0&&(r.getdents=null),0}catch(p){return(typeof FS>\"u\"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall146(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.get(),s=SYSCALLS.get(),a=SYSCALLS.get(),n=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(E,C){var S=___syscall146.buffers[E];assert(S),C===0||C===10?((E===1?Module.print:Module.printErr)(UTF8ArrayToString(S,0)),S.length=0):S.push(C)});for(var c=0;c<a;c++){for(var f=HEAP32[s+c*8>>2],p=HEAP32[s+(c*8+4)>>2],h=0;h<p;h++)___syscall146.printChar(r,HEAPU8[f+h]);n+=p}return n}catch(E){return(typeof FS>\"u\"||!(E instanceof FS.ErrnoError))&&abort(E),-E.errno}}function __nbind_finish(){for(var t=0,e=_nbind.BindClass.list;t<e.length;t++){var r=e[t];r.finish()}}var ___dso_handle=STATICTOP;STATICTOP+=16,function(_nbind){var typeIdTbl={};_nbind.typeNameTbl={};var Pool=function(){function t(){}return t.lalloc=function(e){e=e+7&-8;var r=HEAPU32[t.usedPtr];if(e>t.pageSize/2||e>t.pageSize-r){var s=_nbind.typeNameTbl.NBind.proto;return s.lalloc(e)}else return HEAPU32[t.usedPtr]=r+e,t.rootPtr+r},t.lreset=function(e,r){var s=HEAPU32[t.pagePtr];if(s){var a=_nbind.typeNameTbl.NBind.proto;a.lreset(e,r)}else HEAPU32[t.usedPtr]=e},t}();_nbind.Pool=Pool;function constructType(t,e){var r=t==10240?_nbind.makeTypeNameTbl[e.name]||_nbind.BindType:_nbind.makeTypeKindTbl[t],s=new r(e);return typeIdTbl[e.id]=s,_nbind.typeNameTbl[e.name]=s,s}_nbind.constructType=constructType;function getType(t){return typeIdTbl[t]}_nbind.getType=getType;function queryType(t){var e=HEAPU8[t],r=_nbind.structureList[e][1];t/=4,r<0&&(++t,r=HEAPU32[t]+1);var s=Array.prototype.slice.call(HEAPU32.subarray(t+1,t+1+r));return e==9&&(s=[s[0],s.slice(1)]),{paramList:s,placeholderFlag:e}}_nbind.queryType=queryType;function getTypes(t,e){return t.map(function(r){return typeof r==\"number\"?_nbind.getComplexType(r,constructType,getType,queryType,e):_nbind.typeNameTbl[r]})}_nbind.getTypes=getTypes;function readTypeIdList(t,e){return Array.prototype.slice.call(HEAPU32,t/4,t/4+e)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(t){for(var e=t;HEAPU8[e++];);return String.fromCharCode.apply(\"\",HEAPU8.subarray(t,e-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(t){var e={};if(t)for(;;){var r=HEAPU32[t/4];if(!r)break;e[readAsciiString(r)]=!0,t+=4}return e}_nbind.readPolicyList=readPolicyList;function getDynCall(t,e){var r={float32_t:\"d\",float64_t:\"d\",int64_t:\"d\",uint64_t:\"d\",void:\"v\"},s=t.map(function(n){return r[n.name]||\"i\"}).join(\"\"),a=Module[\"dynCall_\"+s];if(!a)throw new Error(\"dynCall_\"+s+\" not found for \"+e+\"(\"+t.map(function(n){return n.name}).join(\", \")+\")\");return a}_nbind.getDynCall=getDynCall;function addMethod(t,e,r,s){var a=t[e];t.hasOwnProperty(e)&&a?((a.arity||a.arity===0)&&(a=_nbind.makeOverloader(a,a.arity),t[e]=a),a.addMethod(r,s)):(r.arity=s,t[e]=r)}_nbind.addMethod=addMethod;function throwError(t){throw new Error(t)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.heap=HEAPU32,r.ptrSize=4,r}return e.prototype.needsWireRead=function(r){return!!this.wireRead||!!this.makeWireRead},e.prototype.needsWireWrite=function(r){return!!this.wireWrite||!!this.makeWireWrite},e}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this,a=r.flags&32?{32:HEAPF32,64:HEAPF64}:r.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return s.heap=a[r.ptrSize*8],s.ptrSize=r.ptrSize,s}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireWrite=function(r,s){return s&&s.Strict&&function(a){if(typeof a==\"number\")return a;throw new Error(\"Type mismatch\")}},e}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(t,e){if(t==null){if(e&&e.Nullable)return 0;throw new Error(\"Type mismatch\")}if(e&&e.Strict){if(typeof t!=\"string\")throw new Error(\"Type mismatch\")}else t=t.toString();var r=Module.lengthBytesUTF8(t)+1,s=_nbind.Pool.lalloc(r);return Module.stringToUTF8Array(t,HEAPU8,s,r),s}_nbind.pushCString=pushCString;function popCString(t){return t===0?null:Module.Pointer_stringify(t)}_nbind.popCString=popCString;var CStringType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popCString,r.wireWrite=pushCString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,s){return function(a){return pushCString(a,s)}},e}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=function(s){return!!s},r}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireRead=function(r){return\"!!(\"+r+\")\"},e.prototype.makeWireWrite=function(r,s){return s&&s.Strict&&function(a){if(typeof a==\"boolean\")return a;throw new Error(\"Type mismatch\")}||r},e}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function t(){}return t.prototype.persist=function(){this.__nbindState|=1},t}();_nbind.Wrapper=Wrapper;function makeBound(t,e){var r=function(s){__extends(a,s);function a(n,c,f,p){var h=s.call(this)||this;if(!(h instanceof a))return new(Function.prototype.bind.apply(a,Array.prototype.concat.apply([null],arguments)));var E=c,C=f,S=p;if(n!==_nbind.ptrMarker){var P=h.__nbindConstructor.apply(h,arguments);E=4608,S=HEAPU32[P/4],C=HEAPU32[P/4+1]}var I={configurable:!0,enumerable:!1,value:null,writable:!1},R={__nbindFlags:E,__nbindPtr:C};S&&(R.__nbindShared=S,_nbind.mark(h));for(var N=0,U=Object.keys(R);N<U.length;N++){var W=U[N];I.value=R[W],Object.defineProperty(h,W,I)}return _defineHidden(0)(h,\"__nbindState\"),h}return a.prototype.free=function(){e.destroy.call(this,this.__nbindShared,this.__nbindFlags),this.__nbindState|=2,disableMember(this,\"__nbindShared\"),disableMember(this,\"__nbindPtr\")},a}(Wrapper);return __decorate([_defineHidden()],r.prototype,\"__nbindConstructor\",void 0),__decorate([_defineHidden()],r.prototype,\"__nbindValueConstructor\",void 0),__decorate([_defineHidden(t)],r.prototype,\"__nbindPolicies\",void 0),r}_nbind.makeBound=makeBound;function disableMember(t,e){function r(){throw new Error(\"Accessing deleted object\")}Object.defineProperty(t,e,{configurable:!1,enumerable:!1,get:r,set:r})}_nbind.ptrMarker={};var BindClass=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;return s.wireRead=function(a){return _nbind.popValue(a,s.ptrType)},s.wireWrite=function(a){return pushPointer(a,s.ptrType,!0)},s.pendingSuperCount=0,s.ready=!1,s.methodTbl={},r.paramList?(s.classType=r.paramList[0].classType,s.proto=s.classType.proto):s.classType=s,s}return e.prototype.makeBound=function(r){var s=_nbind.makeBound(r,this);return this.proto=s,this.ptrType.proto=s,s},e.prototype.addMethod=function(r){var s=this.methodTbl[r.name]||[];s.push(r),this.methodTbl[r.name]=s},e.prototype.registerMethods=function(r,s){for(var a,n=0,c=Object.keys(r.methodTbl);n<c.length;n++)for(var f=c[n],p=r.methodTbl[f],h=0,E=p;h<E.length;h++){var C=E[h],S=void 0,P=void 0;if(S=this.proto.prototype,!(s&&C.signatureType!=1))switch(C.signatureType){case 1:S=this.proto;case 5:P=_nbind.makeCaller(C),_nbind.addMethod(S,C.name,P,C.typeList.length-1);break;case 4:a=_nbind.makeMethodCaller(r.ptrType,C);break;case 3:Object.defineProperty(S,C.name,{configurable:!0,enumerable:!1,get:_nbind.makeMethodCaller(r.ptrType,C),set:a});break;case 2:P=_nbind.makeMethodCaller(r.ptrType,C),_nbind.addMethod(S,C.name,P,C.typeList.length-1);break;default:break}}},e.prototype.registerSuperMethods=function(r,s,a){if(!a[r.name]){a[r.name]=!0;for(var n=0,c,f=0,p=r.superIdList||[];f<p.length;f++){var h=p[f],E=_nbind.getType(h);n++<s||s<0?c=-1:c=0,this.registerSuperMethods(E,c,a)}this.registerMethods(r,s<0)}},e.prototype.finish=function(){if(this.ready)return this;this.ready=!0,this.superList=(this.superIdList||[]).map(function(a){return _nbind.getType(a).finish()});var r=this.proto;if(this.superList.length){var s=function(){this.constructor=r};s.prototype=this.superList[0].proto.prototype,r.prototype=new s}return r!=Module&&(r.prototype.__nbindType=this),this.registerSuperMethods(this,1,{}),this},e.prototype.upcastStep=function(r,s){if(r==this)return s;for(var a=0;a<this.superList.length;++a){var n=this.superList[a].upcastStep(r,_nbind.callUpcast(this.upcastList[a],s));if(n)return n}return 0},e}(_nbind.BindType);BindClass.list=[],_nbind.BindClass=BindClass;function popPointer(t,e){return t?new e.proto(_nbind.ptrMarker,e.flags,t):null}_nbind.popPointer=popPointer;function pushPointer(t,e,r){if(!(t instanceof _nbind.Wrapper)){if(r)return _nbind.pushValue(t);throw new Error(\"Type mismatch\")}var s=t.__nbindPtr,a=t.__nbindType.classType,n=e.classType;if(t instanceof e.proto)for(;a!=n;)s=_nbind.callUpcast(a.upcastList[0],s),a=a.superList[0];else if(s=a.upcastStep(n,s),!s)throw new Error(\"Type mismatch\");return s}_nbind.pushPointer=pushPointer;function pushMutablePointer(t,e){var r=pushPointer(t,e);if(t.__nbindFlags&1)throw new Error(\"Passing a const value as a non-const argument\");return r}var BindClassPtr=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;s.classType=r.paramList[0].classType,s.proto=s.classType.proto;var a=r.flags&1,n=(s.flags&896)==256&&r.flags&2,c=a?pushPointer:pushMutablePointer,f=n?_nbind.popValue:popPointer;return s.makeWireWrite=function(p,h){return h.Nullable?function(E){return E?c(E,s):0}:function(E){return c(E,s)}},s.wireRead=function(p){return f(p,s)},s.wireWrite=function(p){return c(p,s)},s}return e}(_nbind.BindType);_nbind.BindClassPtr=BindClassPtr;function popShared(t,e){var r=HEAPU32[t/4],s=HEAPU32[t/4+1];return s?new e.proto(_nbind.ptrMarker,e.flags,s,r):null}_nbind.popShared=popShared;function pushShared(t,e){if(!(t instanceof e.proto))throw new Error(\"Type mismatch\");return t.__nbindShared}function pushMutableShared(t,e){if(!(t instanceof e.proto))throw new Error(\"Type mismatch\");if(t.__nbindFlags&1)throw new Error(\"Passing a const value as a non-const argument\");return t.__nbindShared}var SharedClassPtr=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;s.readResources=[_nbind.resources.pool],s.classType=r.paramList[0].classType,s.proto=s.classType.proto;var a=r.flags&1,n=a?pushShared:pushMutableShared;return s.wireRead=function(c){return popShared(c,s)},s.wireWrite=function(c){return n(c,s)},s}return e}(_nbind.BindType);_nbind.SharedClassPtr=SharedClassPtr,_nbind.externalList=[0];var firstFreeExternal=0,External=function(){function t(e){this.refCount=1,this.data=e}return t.prototype.register=function(){var e=firstFreeExternal;return e?firstFreeExternal=_nbind.externalList[e]:e=_nbind.externalList.length,_nbind.externalList[e]=this,e},t.prototype.reference=function(){++this.refCount},t.prototype.dereference=function(e){--this.refCount==0&&(this.free&&this.free(),_nbind.externalList[e]=firstFreeExternal,firstFreeExternal=e)},t}();_nbind.External=External;function popExternal(t){var e=_nbind.externalList[t];return e.dereference(t),e.data}function pushExternal(t){var e=new External(t);return e.reference(),e.register()}var ExternalType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popExternal,r.wireWrite=pushExternal,r}return e}(_nbind.BindType);_nbind.ExternalType=ExternalType,_nbind.callbackSignatureList=[];var CallbackType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=function(s){return typeof s!=\"function\"&&_nbind.throwError(\"Type mismatch\"),new _nbind.External(s).register()},r}return e}(_nbind.BindType);_nbind.CallbackType=CallbackType,_nbind.valueList=[0];var firstFreeValue=0;function pushValue(t){var e=firstFreeValue;return e?firstFreeValue=_nbind.valueList[e]:e=_nbind.valueList.length,_nbind.valueList[e]=t,e*2+1}_nbind.pushValue=pushValue;function popValue(t,e){if(t||_nbind.throwError(\"Value type JavaScript class is missing or not registered\"),t&1){t>>=1;var r=_nbind.valueList[t];return _nbind.valueList[t]=firstFreeValue,firstFreeValue=t,r}else{if(e)return _nbind.popShared(t,e);throw new Error(\"Invalid value slot \"+t)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(t){return typeof t==\"number\"?t:pushValue(t)*4096+valueBase}function pop64(t){return t<valueBase?t:popValue((t-valueBase)/4096)}var CreateValueType=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeWireWrite=function(r){return\"(_nbind.pushValue(new \"+r+\"))\"},e}(_nbind.BindType);_nbind.CreateValueType=CreateValueType;var Int64Type=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=push64,r.wireRead=pop64,r}return e}(_nbind.BindType);_nbind.Int64Type=Int64Type;function pushArray(t,e){if(!t)return 0;var r=t.length;if((e.size||e.size===0)&&r<e.size)throw new Error(\"Type mismatch\");var s=e.memberType.ptrSize,a=_nbind.Pool.lalloc(4+r*s);HEAPU32[a/4]=r;var n=e.memberType.heap,c=(a+4)/s,f=e.memberType.wireWrite,p=0;if(f)for(;p<r;)n[c++]=f(t[p++]);else for(;p<r;)n[c++]=t[p++];return a}_nbind.pushArray=pushArray;function popArray(t,e){if(t===0)return null;var r=HEAPU32[t/4],s=new Array(r),a=e.memberType.heap;t=(t+4)/e.memberType.ptrSize;var n=e.memberType.wireRead,c=0;if(n)for(;c<r;)s[c++]=n(a[t++]);else for(;c<r;)s[c++]=a[t++];return s}_nbind.popArray=popArray;var ArrayType=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this;return s.wireRead=function(a){return popArray(a,s)},s.wireWrite=function(a){return pushArray(a,s)},s.readResources=[_nbind.resources.pool],s.writeResources=[_nbind.resources.pool],s.memberType=r.paramList[0],r.paramList[1]&&(s.size=r.paramList[1]),s}return e}(_nbind.BindType);_nbind.ArrayType=ArrayType;function pushString(t,e){if(t==null)if(e&&e.Nullable)t=\"\";else throw new Error(\"Type mismatch\");if(e&&e.Strict){if(typeof t!=\"string\")throw new Error(\"Type mismatch\")}else t=t.toString();var r=Module.lengthBytesUTF8(t),s=_nbind.Pool.lalloc(4+r+1);return HEAPU32[s/4]=r,Module.stringToUTF8Array(t,HEAPU8,s+4,r+1),s}_nbind.pushString=pushString;function popString(t){if(t===0)return null;var e=HEAPU32[t/4];return Module.Pointer_stringify(t+4,e)}_nbind.popString=popString;var StringType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popString,r.wireWrite=pushString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,s){return function(a){return pushString(a,s)}},e}(_nbind.BindType);_nbind.StringType=StringType;function makeArgList(t){return Array.apply(null,Array(t)).map(function(e,r){return\"a\"+(r+1)})}function anyNeedsWireWrite(t,e){return t.reduce(function(r,s){return r||s.needsWireWrite(e)},!1)}function anyNeedsWireRead(t,e){return t.reduce(function(r,s){return r||!!s.needsWireRead(e)},!1)}function makeWireRead(t,e,r,s){var a=t.length;return r.makeWireRead?r.makeWireRead(s,t,a):r.wireRead?(t[a]=r.wireRead,\"(convertParamList[\"+a+\"](\"+s+\"))\"):s}function makeWireWrite(t,e,r,s){var a,n=t.length;return r.makeWireWrite?a=r.makeWireWrite(s,e,t,n):a=r.wireWrite,a?typeof a==\"string\"?a:(t[n]=a,\"(convertParamList[\"+n+\"](\"+s+\"))\"):s}function buildCallerFunction(dynCall,ptrType,ptr,num,policyTbl,needsWireWrite,prefix,returnType,argTypeList,mask,err){var argList=makeArgList(argTypeList.length),convertParamList=[],callExpression=makeWireRead(convertParamList,policyTbl,returnType,\"dynCall(\"+[prefix].concat(argList.map(function(t,e){return makeWireWrite(convertParamList,policyTbl,argTypeList[e],t)})).join(\",\")+\")\"),resourceSet=_nbind.listResources([returnType],argTypeList),sourceCode=\"function(\"+argList.join(\",\")+\"){\"+(mask?\"this.__nbindFlags&mask&&err();\":\"\")+resourceSet.makeOpen()+\"var r=\"+callExpression+\";\"+resourceSet.makeClose()+\"return r;}\";return eval(\"(\"+sourceCode+\")\")}function buildJSCallerFunction(returnType,argTypeList){var argList=makeArgList(argTypeList.length),convertParamList=[],callExpression=makeWireWrite(convertParamList,null,returnType,\"_nbind.externalList[num].data(\"+argList.map(function(t,e){return makeWireRead(convertParamList,null,argTypeList[e],t)}).join(\",\")+\")\"),resourceSet=_nbind.listResources(argTypeList,[returnType]);resourceSet.remove(_nbind.resources.pool);var sourceCode=\"function(\"+[\"dummy\",\"num\"].concat(argList).join(\",\")+\"){\"+resourceSet.makeOpen()+\"var r=\"+callExpression+\";\"+resourceSet.makeClose()+\"return r;}\";return eval(\"(\"+sourceCode+\")\")}_nbind.buildJSCallerFunction=buildJSCallerFunction;function makeJSCaller(t){var e=t.length-1,r=_nbind.getTypes(t,\"callback\"),s=r[0],a=r.slice(1),n=anyNeedsWireRead(a,null),c=s.needsWireWrite(null);if(!c&&!n)switch(e){case 0:return function(f,p){return _nbind.externalList[p].data()};case 1:return function(f,p,h){return _nbind.externalList[p].data(h)};case 2:return function(f,p,h,E){return _nbind.externalList[p].data(h,E)};case 3:return function(f,p,h,E,C){return _nbind.externalList[p].data(h,E,C)};default:break}return buildJSCallerFunction(s,a)}_nbind.makeJSCaller=makeJSCaller;function makeMethodCaller(t,e){var r=e.typeList.length-1,s=e.typeList.slice(0);s.splice(1,0,\"uint32_t\",e.boundID);var a=_nbind.getTypes(s,e.title),n=a[0],c=a.slice(3),f=n.needsWireRead(e.policyTbl),p=anyNeedsWireWrite(c,e.policyTbl),h=e.ptr,E=e.num,C=_nbind.getDynCall(a,e.title),S=~e.flags&1;function P(){throw new Error(\"Calling a non-const method on a const object\")}if(!f&&!p)switch(r){case 0:return function(){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t))};case 1:return function(I){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t),I)};case 2:return function(I,R){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t),I,R)};case 3:return function(I,R,N){return this.__nbindFlags&S?P():C(h,E,_nbind.pushPointer(this,t),I,R,N)};default:break}return buildCallerFunction(C,t,h,E,e.policyTbl,p,\"ptr,num,pushPointer(this,ptrType)\",n,c,S,P)}_nbind.makeMethodCaller=makeMethodCaller;function makeCaller(t){var e=t.typeList.length-1,r=_nbind.getTypes(t.typeList,t.title),s=r[0],a=r.slice(1),n=s.needsWireRead(t.policyTbl),c=anyNeedsWireWrite(a,t.policyTbl),f=t.direct,p=t.ptr;if(t.direct&&!n&&!c){var h=_nbind.getDynCall(r,t.title);switch(e){case 0:return function(){return h(f)};case 1:return function(P){return h(f,P)};case 2:return function(P,I){return h(f,P,I)};case 3:return function(P,I,R){return h(f,P,I,R)};default:break}p=0}var E;if(p){var C=t.typeList.slice(0);C.splice(1,0,\"uint32_t\"),r=_nbind.getTypes(C,t.title),E=\"ptr,num\"}else p=f,E=\"ptr\";var S=_nbind.getDynCall(r,t.title);return buildCallerFunction(S,null,p,t.num,t.policyTbl,c,E,s,a)}_nbind.makeCaller=makeCaller;function makeOverloader(t,e){var r=[];function s(){return r[arguments.length].apply(this,arguments)}return s.addMethod=function(a,n){r[n]=a},s.addMethod(t,e),s}_nbind.makeOverloader=makeOverloader;var Resource=function(){function t(e,r){var s=this;this.makeOpen=function(){return Object.keys(s.openTbl).join(\"\")},this.makeClose=function(){return Object.keys(s.closeTbl).join(\"\")},this.openTbl={},this.closeTbl={},e&&(this.openTbl[e]=!0),r&&(this.closeTbl[r]=!0)}return t.prototype.add=function(e){for(var r=0,s=Object.keys(e.openTbl);r<s.length;r++){var a=s[r];this.openTbl[a]=!0}for(var n=0,c=Object.keys(e.closeTbl);n<c.length;n++){var a=c[n];this.closeTbl[a]=!0}},t.prototype.remove=function(e){for(var r=0,s=Object.keys(e.openTbl);r<s.length;r++){var a=s[r];delete this.openTbl[a]}for(var n=0,c=Object.keys(e.closeTbl);n<c.length;n++){var a=c[n];delete this.closeTbl[a]}},t}();_nbind.Resource=Resource;function listResources(t,e){for(var r=new Resource,s=0,a=t;s<a.length;s++)for(var n=a[s],c=0,f=n.readResources||[];c<f.length;c++){var p=f[c];r.add(p)}for(var h=0,E=e;h<E.length;h++)for(var n=E[h],C=0,S=n.writeResources||[];C<S.length;C++){var p=S[C];r.add(p)}return r}_nbind.listResources=listResources,_nbind.resources={pool:new Resource(\"var used=HEAPU32[_nbind.Pool.usedPtr],page=HEAPU32[_nbind.Pool.pagePtr];\",\"_nbind.Pool.lreset(used,page);\")};var ExternalBuffer=function(t){__extends(e,t);function e(r,s){var a=t.call(this,r)||this;return a.ptr=s,a}return e.prototype.free=function(){_free(this.ptr)},e}(_nbind.External);function getBuffer(t){return t instanceof ArrayBuffer?new Uint8Array(t):t instanceof DataView?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function pushBuffer(t,e){if(t==null&&e&&e.Nullable&&(t=[]),typeof t!=\"object\")throw new Error(\"Type mismatch\");var r=t,s=r.byteLength||r.length;if(!s&&s!==0&&r.byteLength!==0)throw new Error(\"Type mismatch\");var a=_nbind.Pool.lalloc(8),n=_malloc(s),c=a/4;return HEAPU32[c++]=s,HEAPU32[c++]=n,HEAPU32[c++]=new ExternalBuffer(t,n).register(),HEAPU8.set(getBuffer(t),n),a}var BufferType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireWrite=pushBuffer,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,s){return function(a){return pushBuffer(a,s)}},e}(_nbind.BindType);_nbind.BufferType=BufferType;function commitBuffer(t,e,r){var s=_nbind.externalList[t].data,a=Buffer;if(typeof Buffer!=\"function\"&&(a=function(){}),!(s instanceof Array)){var n=HEAPU8.subarray(e,e+r);if(s instanceof a){var c=void 0;typeof Buffer.from==\"function\"&&Buffer.from.length>=3?c=Buffer.from(n):c=new Buffer(n),c.copy(s)}else getBuffer(s).set(n)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var t=0,e=dirtyList;t<e.length;t++){var r=e[t];r.__nbindState&3||r.free()}dirtyList=[],gcTimer=0}_nbind.mark=function(t){};function toggleLightGC(t){t?_nbind.mark=function(e){dirtyList.push(e),gcTimer||(gcTimer=setTimeout(sweep,0))}:_nbind.mark=function(e){}}_nbind.toggleLightGC=toggleLightGC}(_nbind),Module.requestFullScreen=function t(e,r,s){Module.printErr(\"Module.requestFullScreen is deprecated. Please call Module.requestFullscreen instead.\"),Module.requestFullScreen=Module.requestFullscreen,Browser.requestFullScreen(e,r,s)},Module.requestFullscreen=function t(e,r,s){Browser.requestFullscreen(e,r,s)},Module.requestAnimationFrame=function t(e){Browser.requestAnimationFrame(e)},Module.setCanvasSize=function t(e,r,s){Browser.setCanvasSize(e,r,s)},Module.pauseMainLoop=function t(){Browser.mainLoop.pause()},Module.resumeMainLoop=function t(){Browser.mainLoop.resume()},Module.getUserMedia=function t(){Browser.getUserMedia()},Module.createContext=function t(e,r,s,a){return Browser.createContext(e,r,s,a)},ENVIRONMENT_IS_NODE?_emscripten_get_now=function(){var e=process.hrtime();return e[0]*1e3+e[1]/1e6}:typeof dateNow<\"u\"?_emscripten_get_now=dateNow:typeof self==\"object\"&&self.performance&&typeof self.performance.now==\"function\"?_emscripten_get_now=function(){return self.performance.now()}:typeof performance==\"object\"&&typeof performance.now==\"function\"?_emscripten_get_now=function(){return performance.now()}:_emscripten_get_now=Date.now,__ATEXIT__.push(function(){var t=Module._fflush;t&&t(0);var e=___syscall146.printChar;if(e){var r=___syscall146.buffers;r[1].length&&e(1,10),r[2].length&&e(2,10)}}),DYNAMICTOP_PTR=allocate(1,\"i32\",ALLOC_STATIC),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX),HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(t,e,r,s,a,n){try{Module.dynCall_viiiii(t,e,r,s,a,n)}catch(c){if(typeof c!=\"number\"&&c!==\"longjmp\")throw c;Module.setThrew(1,0)}}function invoke_vif(t,e,r){try{Module.dynCall_vif(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_vid(t,e,r){try{Module.dynCall_vid(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_fiff(t,e,r,s){try{return Module.dynCall_fiff(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_vi(t,e){try{Module.dynCall_vi(t,e)}catch(r){if(typeof r!=\"number\"&&r!==\"longjmp\")throw r;Module.setThrew(1,0)}}function invoke_vii(t,e,r){try{Module.dynCall_vii(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_ii(t,e){try{return Module.dynCall_ii(t,e)}catch(r){if(typeof r!=\"number\"&&r!==\"longjmp\")throw r;Module.setThrew(1,0)}}function invoke_viddi(t,e,r,s,a){try{Module.dynCall_viddi(t,e,r,s,a)}catch(n){if(typeof n!=\"number\"&&n!==\"longjmp\")throw n;Module.setThrew(1,0)}}function invoke_vidd(t,e,r,s){try{Module.dynCall_vidd(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_iiii(t,e,r,s){try{return Module.dynCall_iiii(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_diii(t,e,r,s){try{return Module.dynCall_diii(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_di(t,e){try{return Module.dynCall_di(t,e)}catch(r){if(typeof r!=\"number\"&&r!==\"longjmp\")throw r;Module.setThrew(1,0)}}function invoke_iid(t,e,r){try{return Module.dynCall_iid(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_iii(t,e,r){try{return Module.dynCall_iii(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_viiddi(t,e,r,s,a,n){try{Module.dynCall_viiddi(t,e,r,s,a,n)}catch(c){if(typeof c!=\"number\"&&c!==\"longjmp\")throw c;Module.setThrew(1,0)}}function invoke_viiiiii(t,e,r,s,a,n,c){try{Module.dynCall_viiiiii(t,e,r,s,a,n,c)}catch(f){if(typeof f!=\"number\"&&f!==\"longjmp\")throw f;Module.setThrew(1,0)}}function invoke_dii(t,e,r){try{return Module.dynCall_dii(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_i(t){try{return Module.dynCall_i(t)}catch(e){if(typeof e!=\"number\"&&e!==\"longjmp\")throw e;Module.setThrew(1,0)}}function invoke_iiiiii(t,e,r,s,a,n){try{return Module.dynCall_iiiiii(t,e,r,s,a,n)}catch(c){if(typeof c!=\"number\"&&c!==\"longjmp\")throw c;Module.setThrew(1,0)}}function invoke_viiid(t,e,r,s,a){try{Module.dynCall_viiid(t,e,r,s,a)}catch(n){if(typeof n!=\"number\"&&n!==\"longjmp\")throw n;Module.setThrew(1,0)}}function invoke_viififi(t,e,r,s,a,n,c){try{Module.dynCall_viififi(t,e,r,s,a,n,c)}catch(f){if(typeof f!=\"number\"&&f!==\"longjmp\")throw f;Module.setThrew(1,0)}}function invoke_viii(t,e,r,s){try{Module.dynCall_viii(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_v(t){try{Module.dynCall_v(t)}catch(e){if(typeof e!=\"number\"&&e!==\"longjmp\")throw e;Module.setThrew(1,0)}}function invoke_viid(t,e,r,s){try{Module.dynCall_viid(t,e,r,s)}catch(a){if(typeof a!=\"number\"&&a!==\"longjmp\")throw a;Module.setThrew(1,0)}}function invoke_idd(t,e,r){try{return Module.dynCall_idd(t,e,r)}catch(s){if(typeof s!=\"number\"&&s!==\"longjmp\")throw s;Module.setThrew(1,0)}}function invoke_viiii(t,e,r,s,a){try{Module.dynCall_viiii(t,e,r,s,a)}catch(n){if(typeof n!=\"number\"&&n!==\"longjmp\")throw n;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:1/0},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(t,e,r){var s=new t.Int8Array(r),a=new t.Int16Array(r),n=new t.Int32Array(r),c=new t.Uint8Array(r),f=new t.Uint16Array(r),p=new t.Uint32Array(r),h=new t.Float32Array(r),E=new t.Float64Array(r),C=e.DYNAMICTOP_PTR|0,S=e.tempDoublePtr|0,P=e.ABORT|0,I=e.STACKTOP|0,R=e.STACK_MAX|0,N=e.cttz_i8|0,U=e.___dso_handle|0,W=0,ee=0,ie=0,ue=0,le=t.NaN,me=t.Infinity,pe=0,Be=0,Ce=0,g=0,we=0,ye=0,Ae=t.Math.floor,se=t.Math.abs,Z=t.Math.sqrt,De=t.Math.pow,Re=t.Math.cos,mt=t.Math.sin,j=t.Math.tan,rt=t.Math.acos,Fe=t.Math.asin,Ne=t.Math.atan,Pe=t.Math.atan2,Ve=t.Math.exp,ke=t.Math.log,it=t.Math.ceil,Ue=t.Math.imul,x=t.Math.min,w=t.Math.max,b=t.Math.clz32,y=t.Math.fround,F=e.abort,z=e.assert,X=e.enlargeMemory,$=e.getTotalMemory,oe=e.abortOnCannotGrowMemory,xe=e.invoke_viiiii,Te=e.invoke_vif,lt=e.invoke_vid,Ct=e.invoke_fiff,qt=e.invoke_vi,ir=e.invoke_vii,Pt=e.invoke_ii,gn=e.invoke_viddi,Pr=e.invoke_vidd,Ir=e.invoke_iiii,Or=e.invoke_diii,on=e.invoke_di,ai=e.invoke_iid,Io=e.invoke_iii,rs=e.invoke_viiddi,$s=e.invoke_viiiiii,Co=e.invoke_dii,ji=e.invoke_i,eo=e.invoke_iiiiii,wo=e.invoke_viiid,QA=e.invoke_viififi,Af=e.invoke_viii,dh=e.invoke_v,mh=e.invoke_viid,to=e.invoke_idd,jn=e.invoke_viiii,Ts=e._emscripten_asm_const_iiiii,ro=e._emscripten_asm_const_iiidddddd,ou=e._emscripten_asm_const_iiiid,au=e.__nbind_reference_external,lu=e._emscripten_asm_const_iiiiiiii,TA=e._removeAccessorPrefix,RA=e._typeModule,oa=e.__nbind_register_pool,aa=e.__decorate,FA=e._llvm_stackrestore,gr=e.___cxa_atexit,Bo=e.__extends,Me=e.__nbind_get_value_object,cu=e.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,Cr=e._emscripten_set_main_loop_timing,pf=e.__nbind_register_primitive,NA=e.__nbind_register_type,OA=e._emscripten_memcpy_big,uu=e.__nbind_register_function,fu=e.___setErrNo,oc=e.__nbind_register_class,ve=e.__nbind_finish,Nt=e._abort,ac=e._nbind_value,Oi=e._llvm_stacksave,no=e.___syscall54,Rt=e._defineHidden,xn=e._emscripten_set_main_loop,la=e._emscripten_get_now,Gi=e.__nbind_register_callback_signature,Li=e._emscripten_asm_const_iiiiii,Na=e.__nbind_free_external,dn=e._emscripten_asm_const_iiii,Kn=e._emscripten_asm_const_iiididi,Au=e.___syscall6,yh=e._atexit,Oa=e.___syscall140,La=e.___syscall146,Ma=y(0);let $e=y(0);function Ua(o){o=o|0;var l=0;return l=I,I=I+o|0,I=I+15&-16,l|0}function hf(){return I|0}function lc(o){o=o|0,I=o}function wn(o,l){o=o|0,l=l|0,I=o,R=l}function ca(o,l){o=o|0,l=l|0,W||(W=o,ee=l)}function LA(o){o=o|0,ye=o}function MA(){return ye|0}function ua(){var o=0,l=0;Qr(8104,8,400)|0,Qr(8504,408,540)|0,o=9044,l=o+44|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));s[9088]=0,s[9089]=1,n[2273]=0,n[2274]=948,n[2275]=948,gr(17,8104,U|0)|0}function Bl(o){o=o|0,dt(o+948|0)}function Mt(o){return o=y(o),((fP(o)|0)&2147483647)>>>0>2139095040|0}function kn(o,l,u){o=o|0,l=l|0,u=u|0;e:do if(n[o+(l<<3)+4>>2]|0)o=o+(l<<3)|0;else{if((l|2|0)==3&&n[o+60>>2]|0){o=o+56|0;break}switch(l|0){case 0:case 2:case 4:case 5:{if(n[o+52>>2]|0){o=o+48|0;break e}break}default:}if(n[o+68>>2]|0){o=o+64|0;break}else{o=(l|1|0)==5?948:u;break}}while(!1);return o|0}function fa(o){o=o|0;var l=0;return l=_P(1e3)|0,Ha(o,(l|0)!=0,2456),n[2276]=(n[2276]|0)+1,Qr(l|0,8104,1e3)|0,s[o+2>>0]|0&&(n[l+4>>2]=2,n[l+12>>2]=4),n[l+976>>2]=o,l|0}function Ha(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;d=I,I=I+16|0,A=d,l||(n[A>>2]=u,Wg(o,5,3197,A)),I=d}function ns(){return fa(956)|0}function cc(o){o=o|0;var l=0;return l=Kt(1e3)|0,pu(l,o),Ha(n[o+976>>2]|0,1,2456),n[2276]=(n[2276]|0)+1,n[l+944>>2]=0,l|0}function pu(o,l){o=o|0,l=l|0;var u=0;Qr(o|0,l|0,948)|0,Dy(o+948|0,l+948|0),u=o+960|0,o=l+960|0,l=u+40|0;do n[u>>2]=n[o>>2],u=u+4|0,o=o+4|0;while((u|0)<(l|0))}function uc(o){o=o|0;var l=0,u=0,A=0,d=0;if(l=o+944|0,u=n[l>>2]|0,u|0&&(ja(u+948|0,o)|0,n[l>>2]=0),u=Mi(o)|0,u|0){l=0;do n[(Is(o,l)|0)+944>>2]=0,l=l+1|0;while((l|0)!=(u|0))}u=o+948|0,A=n[u>>2]|0,d=o+952|0,l=n[d>>2]|0,(l|0)!=(A|0)&&(n[d>>2]=l+(~((l+-4-A|0)>>>2)<<2)),vl(u),HP(o),n[2276]=(n[2276]|0)+-1}function ja(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0;A=n[o>>2]|0,k=o+4|0,u=n[k>>2]|0,m=u;e:do if((A|0)==(u|0))d=A,B=4;else for(o=A;;){if((n[o>>2]|0)==(l|0)){d=o,B=4;break e}if(o=o+4|0,(o|0)==(u|0)){o=0;break}}while(!1);return(B|0)==4&&((d|0)!=(u|0)?(A=d+4|0,o=m-A|0,l=o>>2,l&&(Q2(d|0,A|0,o|0)|0,u=n[k>>2]|0),o=d+(l<<2)|0,(u|0)==(o|0)||(n[k>>2]=u+(~((u+-4-o|0)>>>2)<<2)),o=1):o=0),o|0}function Mi(o){return o=o|0,(n[o+952>>2]|0)-(n[o+948>>2]|0)>>2|0}function Is(o,l){o=o|0,l=l|0;var u=0;return u=n[o+948>>2]|0,(n[o+952>>2]|0)-u>>2>>>0>l>>>0?o=n[u+(l<<2)>>2]|0:o=0,o|0}function vl(o){o=o|0;var l=0,u=0,A=0,d=0;A=I,I=I+32|0,l=A,d=n[o>>2]|0,u=(n[o+4>>2]|0)-d|0,((n[o+8>>2]|0)-d|0)>>>0>u>>>0&&(d=u>>2,ky(l,d,d,o+8|0),AP(o,l),Qy(l)),I=A}function gf(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0;M=Mi(o)|0;do if(M|0){if((n[(Is(o,0)|0)+944>>2]|0)==(o|0)){if(!(ja(o+948|0,l)|0))break;Qr(l+400|0,8504,540)|0,n[l+944>>2]=0,Oe(o);break}B=n[(n[o+976>>2]|0)+12>>2]|0,k=o+948|0,T=(B|0)==0,u=0,m=0;do A=n[(n[k>>2]|0)+(m<<2)>>2]|0,(A|0)==(l|0)?Oe(o):(d=cc(A)|0,n[(n[k>>2]|0)+(u<<2)>>2]=d,n[d+944>>2]=o,T||dU[B&15](A,d,o,u),u=u+1|0),m=m+1|0;while((m|0)!=(M|0));if(u>>>0<M>>>0){T=o+948|0,k=o+952|0,B=u,u=n[k>>2]|0;do m=(n[T>>2]|0)+(B<<2)|0,A=m+4|0,d=u-A|0,l=d>>2,l&&(Q2(m|0,A|0,d|0)|0,u=n[k>>2]|0),d=u,A=m+(l<<2)|0,(d|0)!=(A|0)&&(u=d+(~((d+-4-A|0)>>>2)<<2)|0,n[k>>2]=u),B=B+1|0;while((B|0)!=(M|0))}}while(!1)}function fc(o){o=o|0;var l=0,u=0,A=0,d=0;wi(o,(Mi(o)|0)==0,2491),wi(o,(n[o+944>>2]|0)==0,2545),l=o+948|0,u=n[l>>2]|0,A=o+952|0,d=n[A>>2]|0,(d|0)!=(u|0)&&(n[A>>2]=d+(~((d+-4-u|0)>>>2)<<2)),vl(l),l=o+976|0,u=n[l>>2]|0,Qr(o|0,8104,1e3)|0,s[u+2>>0]|0&&(n[o+4>>2]=2,n[o+12>>2]=4),n[l>>2]=u}function wi(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;d=I,I=I+16|0,A=d,l||(n[A>>2]=u,xo(o,5,3197,A)),I=d}function Qn(){return n[2276]|0}function Ac(){var o=0;return o=_P(20)|0,Ke((o|0)!=0,2592),n[2277]=(n[2277]|0)+1,n[o>>2]=n[239],n[o+4>>2]=n[240],n[o+8>>2]=n[241],n[o+12>>2]=n[242],n[o+16>>2]=n[243],o|0}function Ke(o,l){o=o|0,l=l|0;var u=0,A=0;A=I,I=I+16|0,u=A,o||(n[u>>2]=l,xo(0,5,3197,u)),I=A}function st(o){o=o|0,HP(o),n[2277]=(n[2277]|0)+-1}function St(o,l){o=o|0,l=l|0;var u=0;l?(wi(o,(Mi(o)|0)==0,2629),u=1):(u=0,l=0),n[o+964>>2]=l,n[o+988>>2]=u}function lr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,m=A+8|0,d=A+4|0,B=A,n[d>>2]=l,wi(o,(n[l+944>>2]|0)==0,2709),wi(o,(n[o+964>>2]|0)==0,2763),te(o),l=o+948|0,n[B>>2]=(n[l>>2]|0)+(u<<2),n[m>>2]=n[B>>2],Ee(l,m,d)|0,n[(n[d>>2]|0)+944>>2]=o,Oe(o),I=A}function te(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;if(u=Mi(o)|0,u|0&&(n[(Is(o,0)|0)+944>>2]|0)!=(o|0)){A=n[(n[o+976>>2]|0)+12>>2]|0,d=o+948|0,m=(A|0)==0,l=0;do B=n[(n[d>>2]|0)+(l<<2)>>2]|0,k=cc(B)|0,n[(n[d>>2]|0)+(l<<2)>>2]=k,n[k+944>>2]=o,m||dU[A&15](B,k,o,l),l=l+1|0;while((l|0)!=(u|0))}}function Ee(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0,tt=0,Ze=0;tt=I,I=I+64|0,q=tt+52|0,k=tt+48|0,ae=tt+28|0,Ye=tt+24|0,Le=tt+20|0,Qe=tt,A=n[o>>2]|0,m=A,l=A+((n[l>>2]|0)-m>>2<<2)|0,A=o+4|0,d=n[A>>2]|0,B=o+8|0;do if(d>>>0<(n[B>>2]|0)>>>0){if((l|0)==(d|0)){n[l>>2]=n[u>>2],n[A>>2]=(n[A>>2]|0)+4;break}pP(o,l,d,l+4|0),l>>>0<=u>>>0&&(u=(n[A>>2]|0)>>>0>u>>>0?u+4|0:u),n[l>>2]=n[u>>2]}else{A=(d-m>>2)+1|0,d=O(o)|0,d>>>0<A>>>0&&an(o),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,(n[o+964>>2]|0)!=0,2832),Oe(o)}function tr(o){return o=o|0,(s[o+984>>0]|0)!=0|0}function An(o,l){o=o|0,l=l|0,l6e(o,l,400)|0&&(Qr(o|0,l|0,400)|0,Oe(o))}function li(o){o=o|0;var l=$e;return l=y(h[o+44>>2]),o=Mt(l)|0,y(o?y(0):l)}function qi(o){o=o|0;var l=$e;return l=y(h[o+48>>2]),Mt(l)|0&&(l=s[(n[o+976>>2]|0)+2>>0]|0?y(1):y(0)),y(l)}function Tn(o,l){o=o|0,l=l|0,n[o+980>>2]=l}function Ga(o){return o=o|0,n[o+980>>2]|0}function my(o,l){o=o|0,l=l|0;var u=0;u=o+4|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Z1(o){return o=o|0,n[o+4>>2]|0}function vo(o,l){o=o|0,l=l|0;var u=0;u=o+8|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function yy(o){return o=o|0,n[o+8>>2]|0}function Eh(o,l){o=o|0,l=l|0;var u=0;u=o+12|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function $1(o){return o=o|0,n[o+12>>2]|0}function So(o,l){o=o|0,l=l|0;var u=0;u=o+16|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Ih(o){return o=o|0,n[o+16>>2]|0}function Ch(o,l){o=o|0,l=l|0;var u=0;u=o+20|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function hu(o){return o=o|0,n[o+20>>2]|0}function wh(o,l){o=o|0,l=l|0;var u=0;u=o+24|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Fg(o){return o=o|0,n[o+24>>2]|0}function Ng(o,l){o=o|0,l=l|0;var u=0;u=o+28|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Og(o){return o=o|0,n[o+28>>2]|0}function Ey(o,l){o=o|0,l=l|0;var u=0;u=o+32|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function df(o){return o=o|0,n[o+32>>2]|0}function Do(o,l){o=o|0,l=l|0;var u=0;u=o+36|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Sl(o){return o=o|0,n[o+36>>2]|0}function Bh(o,l){o=o|0,l=y(l);var u=0;u=o+40|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Lg(o,l){o=o|0,l=y(l);var u=0;u=o+44|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Dl(o,l){o=o|0,l=y(l);var u=0;u=o+48|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function bl(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+52|0,d=o+56|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Iy(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+52|0,u=o+56|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function UA(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+52|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Cy(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+132+(l<<3)|0,l=o+132+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function wy(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+132+(l<<3)|0,l=o+132+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function _A(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+132+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function HA(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+60+(l<<3)|0,l=o+60+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function Y(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+60+(l<<3)|0,l=o+60+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function xt(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+60+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function jA(o,l){o=o|0,l=l|0;var u=0;u=o+60+(l<<3)+4|0,(n[u>>2]|0)!=3&&(h[o+60+(l<<3)>>2]=y(le),n[u>>2]=3,Oe(o))}function bo(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+204+(l<<3)|0,l=o+204+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function mf(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+204+(l<<3)|0,l=o+204+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function yt(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+204+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function gu(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+276+(l<<3)|0,l=o+276+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function By(o,l){return o=o|0,l=l|0,y(h[o+276+(l<<3)>>2])}function Mg(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+348|0,d=o+352|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function e2(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+348|0,u=o+352|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function vh(o){o=o|0;var l=0;l=o+352|0,(n[l>>2]|0)!=3&&(h[o+348>>2]=y(le),n[l>>2]=3,Oe(o))}function ur(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+348|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function zi(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+356|0,d=o+360|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function yf(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+356|0,u=o+360|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function qa(o){o=o|0;var l=0;l=o+360|0,(n[l>>2]|0)!=3&&(h[o+356>>2]=y(le),n[l>>2]=3,Oe(o))}function Ug(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+356|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function du(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+364|0,d=o+368|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ef(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+364|0,d=o+368|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function wt(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+364|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function di(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+372|0,d=o+376|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function GA(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+372|0,d=o+376|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Wa(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+372|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Aa(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+380|0,d=o+384|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ya(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+380|0,d=o+384|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function _g(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+380|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Sh(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+388|0,d=o+392|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Hg(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+388|0,d=o+392|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function vy(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+388|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function qA(o,l){o=o|0,l=y(l);var u=0;u=o+396|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function jg(o){return o=o|0,y(h[o+396>>2])}function mu(o){return o=o|0,y(h[o+400>>2])}function yu(o){return o=o|0,y(h[o+404>>2])}function If(o){return o=o|0,y(h[o+408>>2])}function Rs(o){return o=o|0,y(h[o+412>>2])}function Eu(o){return o=o|0,y(h[o+416>>2])}function Gn(o){return o=o|0,y(h[o+420>>2])}function is(o,l){switch(o=o|0,l=l|0,wi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+424+(l<<2)>>2])}function Pi(o,l){switch(o=o|0,l=l|0,wi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+448+(l<<2)>>2])}function WA(o,l){switch(o=o|0,l=l|0,wi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+472+(l<<2)>>2])}function Cf(o,l){o=o|0,l=l|0;var u=0,A=$e;return u=n[o+4>>2]|0,(u|0)==(n[l+4>>2]|0)?u?(A=y(h[o>>2]),o=y(se(y(A-y(h[l>>2]))))<y(999999974e-13)):o=1:o=0,o|0}function mn(o,l){o=y(o),l=y(l);var u=0;return Mt(o)|0?u=Mt(l)|0:u=y(se(y(o-l)))<y(999999974e-13),u|0}function Gg(o,l){o=o|0,l=l|0,qg(o,l)}function qg(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u+4|0,n[A>>2]=0,n[A+4>>2]=0,n[A+8>>2]=0,cu(A|0,o|0,l|0,0),xo(o,3,(s[A+11>>0]|0)<0?n[A>>2]|0:A,u),Q6e(A),I=u}function ss(o,l,u,A){o=y(o),l=y(l),u=u|0,A=A|0;var d=$e;o=y(o*l),d=y(uU(o,y(1)));do if(mn(d,y(0))|0)o=y(o-d);else{if(o=y(o-d),mn(d,y(1))|0){o=y(o+y(1));break}if(u){o=y(o+y(1));break}A||(d>y(.5)?d=y(1):(A=mn(d,y(.5))|0,d=y(A?1:0)),o=y(o+d))}while(!1);return y(o/l)}function Pl(o,l,u,A,d,m,B,k,T,M,L,q,ae){o=o|0,l=y(l),u=u|0,A=y(A),d=d|0,m=y(m),B=B|0,k=y(k),T=y(T),M=y(M),L=y(L),q=y(q),ae=ae|0;var Ye=0,Le=$e,Qe=$e,tt=$e,Ze=$e,ct=$e,He=$e;return T<y(0)|M<y(0)?ae=0:(ae|0&&(Le=y(h[ae+4>>2]),Le!=y(0))?(tt=y(ss(l,Le,0,0)),Ze=y(ss(A,Le,0,0)),Qe=y(ss(m,Le,0,0)),Le=y(ss(k,Le,0,0))):(Qe=m,tt=l,Le=k,Ze=A),(d|0)==(o|0)?Ye=mn(Qe,tt)|0:Ye=0,(B|0)==(u|0)?ae=mn(Le,Ze)|0:ae=0,!Ye&&(ct=y(l-L),!(Po(o,ct,T)|0))&&!(wf(o,ct,d,T)|0)?Ye=Bf(o,ct,d,m,T)|0:Ye=1,!ae&&(He=y(A-q),!(Po(u,He,M)|0))&&!(wf(u,He,B,M)|0)?ae=Bf(u,He,B,k,M)|0:ae=1,ae=Ye&ae),ae|0}function Po(o,l,u){return o=o|0,l=y(l),u=y(u),(o|0)==1?o=mn(l,u)|0:o=0,o|0}function wf(o,l,u,A){return o=o|0,l=y(l),u=u|0,A=y(A),(o|0)==2&(u|0)==0?l>=A?o=1:o=mn(l,A)|0:o=0,o|0}function Bf(o,l,u,A,d){return o=o|0,l=y(l),u=u|0,A=y(A),d=y(d),(o|0)==2&(u|0)==2&A>l?d<=l?o=1:o=mn(l,d)|0:o=0,o|0}function xl(o,l,u,A,d,m,B,k,T,M,L){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=m|0,B=y(B),k=y(k),T=T|0,M=M|0,L=L|0;var q=0,ae=0,Ye=0,Le=0,Qe=$e,tt=$e,Ze=0,ct=0,He=0,We=0,Lt=0,Gr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=$e,To=$e,Ro=$e,Fo=0,Za=0;cr=I,I=I+160|0,$t=cr+152|0,fr=cr+120|0,Gr=cr+104|0,He=cr+72|0,Le=cr+56|0,Lt=cr+8|0,ct=cr,We=(n[2279]|0)+1|0,n[2279]=We,Tr=o+984|0,s[Tr>>0]|0&&(n[o+512>>2]|0)!=(n[2278]|0)?Ze=4:(n[o+516>>2]|0)==(A|0)?Hr=0:Ze=4,(Ze|0)==4&&(n[o+520>>2]=0,n[o+924>>2]=-1,n[o+928>>2]=-1,h[o+932>>2]=y(-1),h[o+936>>2]=y(-1),Hr=1);e:do if(n[o+964>>2]|0)if(Qe=y(yn(o,2,B)),tt=y(yn(o,0,B)),q=o+916|0,Ro=y(h[q>>2]),To=y(h[o+920>>2]),Hn=y(h[o+932>>2]),Pl(d,l,m,u,n[o+924>>2]|0,Ro,n[o+928>>2]|0,To,Hn,y(h[o+936>>2]),Qe,tt,L)|0)Ze=22;else if(Ye=n[o+520>>2]|0,!Ye)Ze=21;else for(ae=0;;){if(q=o+524+(ae*24|0)|0,Hn=y(h[q>>2]),To=y(h[o+524+(ae*24|0)+4>>2]),Ro=y(h[o+524+(ae*24|0)+16>>2]),Pl(d,l,m,u,n[o+524+(ae*24|0)+8>>2]|0,Hn,n[o+524+(ae*24|0)+12>>2]|0,To,Ro,y(h[o+524+(ae*24|0)+20>>2]),Qe,tt,L)|0){Ze=22;break e}if(ae=ae+1|0,ae>>>0>=Ye>>>0){Ze=21;break}}else{if(T){if(q=o+916|0,!(mn(y(h[q>>2]),l)|0)){Ze=21;break}if(!(mn(y(h[o+920>>2]),u)|0)){Ze=21;break}if((n[o+924>>2]|0)!=(d|0)){Ze=21;break}q=(n[o+928>>2]|0)==(m|0)?q:0,Ze=22;break}if(Ye=n[o+520>>2]|0,!Ye)Ze=21;else for(ae=0;;){if(q=o+524+(ae*24|0)|0,mn(y(h[q>>2]),l)|0&&mn(y(h[o+524+(ae*24|0)+4>>2]),u)|0&&(n[o+524+(ae*24|0)+8>>2]|0)==(d|0)&&(n[o+524+(ae*24|0)+12>>2]|0)==(m|0)){Ze=22;break e}if(ae=ae+1|0,ae>>>0>=Ye>>>0){Ze=21;break}}}while(!1);do if((Ze|0)==21)s[11697]|0?(q=0,Ze=28):(q=0,Ze=31);else if((Ze|0)==22){if(ae=(s[11697]|0)!=0,!((q|0)!=0&(Hr^1)))if(ae){Ze=28;break}else{Ze=31;break}Le=q+16|0,n[o+908>>2]=n[Le>>2],Ye=q+20|0,n[o+912>>2]=n[Ye>>2],(s[11698]|0)==0|ae^1||(n[ct>>2]=Iu(We)|0,n[ct+4>>2]=We,xo(o,4,2972,ct),ae=n[o+972>>2]|0,ae|0&&ip[ae&127](o),d=pa(d,T)|0,m=pa(m,T)|0,Za=+y(h[Le>>2]),Fo=+y(h[Ye>>2]),n[Lt>>2]=d,n[Lt+4>>2]=m,E[Lt+8>>3]=+l,E[Lt+16>>3]=+u,E[Lt+24>>3]=Za,E[Lt+32>>3]=Fo,n[Lt+40>>2]=M,xo(o,4,2989,Lt))}while(!1);return(Ze|0)==28&&(ae=Iu(We)|0,n[Le>>2]=ae,n[Le+4>>2]=We,n[Le+8>>2]=Hr?3047:11699,xo(o,4,3038,Le),ae=n[o+972>>2]|0,ae|0&&ip[ae&127](o),Lt=pa(d,T)|0,Ze=pa(m,T)|0,n[He>>2]=Lt,n[He+4>>2]=Ze,E[He+8>>3]=+l,E[He+16>>3]=+u,n[He+24>>2]=M,xo(o,4,3049,He),Ze=31),(Ze|0)==31&&(Fs(o,l,u,A,d,m,B,k,T,L),s[11697]|0&&(ae=n[2279]|0,Lt=Iu(ae)|0,n[Gr>>2]=Lt,n[Gr+4>>2]=ae,n[Gr+8>>2]=Hr?3047:11699,xo(o,4,3083,Gr),ae=n[o+972>>2]|0,ae|0&&ip[ae&127](o),Lt=pa(d,T)|0,Gr=pa(m,T)|0,Fo=+y(h[o+908>>2]),Za=+y(h[o+912>>2]),n[fr>>2]=Lt,n[fr+4>>2]=Gr,E[fr+8>>3]=Fo,E[fr+16>>3]=Za,n[fr+24>>2]=M,xo(o,4,3092,fr)),n[o+516>>2]=A,q||(ae=o+520|0,q=n[ae>>2]|0,(q|0)==16&&(s[11697]|0&&xo(o,4,3124,$t),n[ae>>2]=0,q=0),T?q=o+916|0:(n[ae>>2]=q+1,q=o+524+(q*24|0)|0),h[q>>2]=l,h[q+4>>2]=u,n[q+8>>2]=d,n[q+12>>2]=m,n[q+16>>2]=n[o+908>>2],n[q+20>>2]=n[o+912>>2],q=0)),T&&(n[o+416>>2]=n[o+908>>2],n[o+420>>2]=n[o+912>>2],s[o+985>>0]=1,s[Tr>>0]=0),n[2279]=(n[2279]|0)+-1,n[o+512>>2]=n[2278],I=cr,Hr|(q|0)==0|0}function yn(o,l,u){o=o|0,l=l|0,u=y(u);var A=$e;return A=y(K(o,l,u)),y(A+y(re(o,l,u)))}function xo(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=I,I=I+16|0,d=m,n[d>>2]=A,o?A=n[o+976>>2]|0:A=0,Ph(A,o,l,u,d),I=m}function Iu(o){return o=o|0,(o>>>0>60?3201:3201+(60-o)|0)|0}function pa(o,l){o=o|0,l=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[mc>>2]|0,Bi=n[ma>>2]|0,xl(q,ui?zt:$t,ui?$t:zt,Us,ui?dp:Bi,ui?Bi:dp,Nr,No,T&(L^1),3488,M)|0,s[dc>>0]=s[dc>>0]|s[q+508>>0],q=n[q+960>>2]|0}while(q|0)}}else l=y(0);if(l=y(Tr+l),Bi=l<y(0)&1,s[dc>>0]=Bi|c[dc>>0],Yh&l>y(0)?(L=n[gc>>2]|0,n[o+364+(L<<3)+4>>2]|0&&(ao=y(Zr(o+364+(L<<3)|0,Oo)),ao>=y(0))?Qe=y($n(y(0),y(ao-y(cr-l)))):Qe=y(0)):Qe=l,Lt=Hr>>>0<fr>>>0,Lt){Ye=n[Lo>>2]|0,ae=Hr,L=0;do q=n[Ye+(ae<<2)>>2]|0,n[q+24>>2]|0||(L=((n[(kl(q,Mr)|0)+4>>2]|0)==3&1)+L|0,L=L+((n[(Ql(q,Mr)|0)+4>>2]|0)==3&1)|0),ae=ae+1|0;while((ae|0)!=(fr|0));L?(Ze=y(0),u=y(0)):ln=101}else ln=101;e:do if((ln|0)==101)switch(ln=0,Xh|0){case 1:{L=0,Ze=y(Qe*y(.5)),u=y(0);break e}case 2:{L=0,Ze=Qe,u=y(0);break e}case 3:{if(m>>>0<=1){L=0,Ze=y(0),u=y(0);break e}u=y((m+-1|0)>>>0),L=0,Ze=y(0),u=y(y($n(Qe,y(0)))/u);break e}case 5:{u=y(Qe/y((m+1|0)>>>0)),L=0,Ze=u;break e}case 4:{u=y(Qe/y(m>>>0)),L=0,Ze=y(u*y(.5));break e}default:{L=0,Ze=y(0),u=y(0);break e}}while(!1);if(l=y(Zh+Ze),Lt){tt=y(Qe/y(L|0)),ae=n[Lo>>2]|0,q=Hr,Qe=y(0);do{L=n[ae+(q<<2)>>2]|0;e:do if((n[L+36>>2]|0)!=1){switch(n[L+24>>2]|0){case 1:{if(ha(L,Mr)|0){if(!T)break e;zt=y(zA(L,Mr,cr)),zt=y(zt+y(vr(o,Mr))),zt=y(zt+y(K(L,Mr,Nr))),h[L+400+(n[Ff>>2]<<2)>>2]=zt;break e}break}case 0:if(Bi=(n[(kl(L,Mr)|0)+4>>2]|0)==3,zt=y(tt+l),l=Bi?zt:l,T&&(Bi=L+400+(n[Ff>>2]<<2)|0,h[Bi>>2]=y(l+y(h[Bi>>2]))),Bi=(n[(Ql(L,Mr)|0)+4>>2]|0)==3,zt=y(tt+l),l=Bi?zt:l,Za){zt=y(u+y(yn(L,Mr,Nr))),Qe=Wn,l=y(l+y(zt+y(h[L+504>>2])));break e}else{l=y(l+y(u+y(XA(L,Mr,Nr)))),Qe=y($n(Qe,y(XA(L,Ar,Nr))));break e}default:}T&&(zt=y(Ze+y(vr(o,Mr))),Bi=L+400+(n[Ff>>2]<<2)|0,h[Bi>>2]=y(zt+y(h[Bi>>2])))}while(!1);q=q+1|0}while((q|0)!=(fr|0))}else Qe=y(0);if(u=y($h+l),Vh?Ze=y(y(qn(o,Ar,y(lo+Qe),Tu,B))-lo):Ze=Wn,tt=y(y(qn(o,Ar,y(lo+(zh?Wn:Qe)),Tu,B))-lo),Lt&T){q=Hr;do{ae=n[(n[Lo>>2]|0)+(q<<2)>>2]|0;do if((n[ae+36>>2]|0)!=1){if((n[ae+24>>2]|0)==1){if(ha(ae,Ar)|0){if(zt=y(zA(ae,Ar,Wn)),zt=y(zt+y(vr(o,Ar))),zt=y(zt+y(K(ae,Ar,Nr))),L=n[Rf>>2]|0,h[ae+400+(L<<2)>>2]=zt,!(Mt(zt)|0))break}else L=n[Rf>>2]|0;zt=y(vr(o,Ar)),h[ae+400+(L<<2)>>2]=y(zt+y(K(ae,Ar,Nr)));break}L=os(o,ae)|0;do if((L|0)==4){if((n[(kl(ae,Ar)|0)+4>>2]|0)==3){ln=139;break}if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){ln=139;break}if(io(ae,Ar,Wn)|0){l=Le;break}dp=n[ae+908+(n[gc>>2]<<2)>>2]|0,n[oo>>2]=dp,l=y(h[ae+396>>2]),Bi=Mt(l)|0,Qe=(n[S>>2]=dp,y(h[S>>2])),Bi?l=tt:(Tr=y(yn(ae,Ar,Nr)),zt=y(Qe/l),l=y(l*Qe),l=y(Tr+(ui?zt:l))),h[Ll>>2]=l,h[oo>>2]=y(y(yn(ae,Mr,Nr))+Qe),n[ma>>2]=1,n[mc>>2]=1,Cu(ae,Mr,cr,Nr,ma,oo),Cu(ae,Ar,Wn,Nr,mc,Ll),l=y(h[oo>>2]),Tr=y(h[Ll>>2]),zt=ui?l:Tr,l=ui?Tr:l,Bi=((Mt(zt)|0)^1)&1,xl(ae,zt,l,Us,Bi,((Mt(l)|0)^1)&1,Nr,No,1,3493,M)|0,l=Le}else ln=139;while(!1);e:do if((ln|0)==139){ln=0,l=y(Ze-y(XA(ae,Ar,Nr)));do if((n[(kl(ae,Ar)|0)+4>>2]|0)==3){if((n[(Ql(ae,Ar)|0)+4>>2]|0)!=3)break;l=y(Le+y($n(y(0),y(l*y(.5)))));break e}while(!1);if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){l=Le;break}if((n[(kl(ae,Ar)|0)+4>>2]|0)==3){l=y(Le+y($n(y(0),l)));break}switch(L|0){case 1:{l=Le;break e}case 2:{l=y(Le+y(l*y(.5)));break e}default:{l=y(Le+l);break e}}}while(!1);zt=y(Ms+l),Bi=ae+400+(n[Rf>>2]<<2)|0,h[Bi>>2]=y(zt+y(h[Bi>>2]))}while(!1);q=q+1|0}while((q|0)!=(fr|0))}if(Ms=y(Ms+tt),xu=y($n(xu,u)),m=Fo+1|0,fr>>>0>=co>>>0)break;l=cr,Hr=fr,Fo=m}do if(T){if(L=m>>>0>1,!L&&!(jL(o)|0))break;if(!(Mt(Wn)|0)){l=y(Wn-Ms);e:do switch(n[o+12>>2]|0){case 3:{Le=y(Le+l),He=y(0);break}case 2:{Le=y(Le+y(l*y(.5))),He=y(0);break}case 4:{Wn>Ms?He=y(l/y(m>>>0)):He=y(0);break}case 7:if(Wn>Ms){Le=y(Le+y(l/y(m<<1>>>0))),He=y(l/y(m>>>0)),He=L?He:y(0);break e}else{Le=y(Le+y(l*y(.5))),He=y(0);break e}case 6:{He=y(l/y(Fo>>>0)),He=Wn>Ms&L?He:y(0);break}default:He=y(0)}while(!1);if(m|0)for(Lt=1040+(Ar<<2)|0,Gr=976+(Ar<<2)|0,Ye=0,q=0;;){e:do if(q>>>0<co>>>0)for(Qe=y(0),tt=y(0),l=y(0),ae=q;;){L=n[(n[Lo>>2]|0)+(ae<<2)>>2]|0;do if((n[L+36>>2]|0)!=1&&!(n[L+24>>2]|0)){if((n[L+940>>2]|0)!=(Ye|0))break e;if(qL(L,Ar)|0&&(zt=y(h[L+908+(n[Gr>>2]<<2)>>2]),l=y($n(l,y(zt+y(yn(L,Ar,Nr)))))),(os(o,L)|0)!=5)break;ao=y(Yg(L)),ao=y(ao+y(K(L,0,Nr))),zt=y(h[L+912>>2]),zt=y(y(zt+y(yn(L,0,Nr)))-ao),ao=y($n(tt,ao)),zt=y($n(Qe,zt)),Qe=zt,tt=ao,l=y($n(l,y(ao+zt)))}while(!1);if(L=ae+1|0,L>>>0<co>>>0)ae=L;else{ae=L;break}}else tt=y(0),l=y(0),ae=q;while(!1);if(ct=y(He+l),u=Le,Le=y(Le+ct),q>>>0<ae>>>0){Ze=y(u+tt),L=q;do{q=n[(n[Lo>>2]|0)+(L<<2)>>2]|0;e:do if((n[q+36>>2]|0)!=1&&!(n[q+24>>2]|0))switch(os(o,q)|0){case 1:{zt=y(u+y(K(q,Ar,Nr))),h[q+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 3:{zt=y(y(Le-y(re(q,Ar,Nr)))-y(h[q+908+(n[Gr>>2]<<2)>>2])),h[q+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 2:{zt=y(u+y(y(ct-y(h[q+908+(n[Gr>>2]<<2)>>2]))*y(.5))),h[q+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 4:{if(zt=y(u+y(K(q,Ar,Nr))),h[q+400+(n[Lt>>2]<<2)>>2]=zt,io(q,Ar,Wn)|0||(ui?(Qe=y(h[q+908>>2]),l=y(Qe+y(yn(q,Mr,Nr))),tt=ct):(tt=y(h[q+912>>2]),tt=y(tt+y(yn(q,Ar,Nr))),l=ct,Qe=y(h[q+908>>2])),mn(l,Qe)|0&&mn(tt,y(h[q+912>>2]))|0))break e;xl(q,l,tt,Us,1,1,Nr,No,1,3501,M)|0;break e}case 5:{h[q+404>>2]=y(y(Ze-y(Yg(q)))+y(zA(q,0,Wn)));break e}default:break e}while(!1);L=L+1|0}while((L|0)!=(ae|0))}if(Ye=Ye+1|0,(Ye|0)==(m|0))break;q=ae}}}while(!1);if(h[o+908>>2]=y(qn(o,2,ku,B,B)),h[o+912>>2]=y(qn(o,0,up,k,B)),yc|0&&(fp=n[o+32>>2]|0,Ap=(yc|0)==2,!(Ap&(fp|0)!=2))?Ap&(fp|0)==2&&(l=y(Qu+cr),l=y($n(y(pd(l,y(Vg(o,Mr,xu,Oo)))),Qu)),ln=198):(l=y(qn(o,Mr,xu,Oo,B)),ln=198),(ln|0)==198&&(h[o+908+(n[976+(Mr<<2)>>2]<<2)>>2]=l),Ec|0&&(hp=n[o+32>>2]|0,gp=(Ec|0)==2,!(gp&(hp|0)!=2))?gp&(hp|0)==2&&(l=y(lo+Wn),l=y($n(y(pd(l,y(Vg(o,Ar,y(lo+Ms),Tu)))),lo)),ln=204):(l=y(qn(o,Ar,y(lo+Ms),Tu,B)),ln=204),(ln|0)==204&&(h[o+908+(n[976+(Ar<<2)>>2]<<2)>>2]=l),T){if((n[pp>>2]|0)==2){q=976+(Ar<<2)|0,ae=1040+(Ar<<2)|0,L=0;do Ye=Is(o,L)|0,n[Ye+24>>2]|0||(dp=n[q>>2]|0,zt=y(h[o+908+(dp<<2)>>2]),Bi=Ye+400+(n[ae>>2]<<2)|0,zt=y(zt-y(h[Bi>>2])),h[Bi>>2]=y(zt-y(h[Ye+908+(dp<<2)>>2]))),L=L+1|0;while((L|0)!=(co|0))}if(A|0){L=ui?yc:d;do WL(o,A,Nr,L,No,Us,M),A=n[A+960>>2]|0;while(A|0)}if(L=(Mr|2|0)==3,q=(Ar|2|0)==3,L|q){A=0;do ae=n[(n[Lo>>2]|0)+(A<<2)>>2]|0,(n[ae+36>>2]|0)!=1&&(L&&i2(o,ae,Mr),q&&i2(o,ae,Ar)),A=A+1|0;while((A|0)!=(co|0))}}}while(!1);I=Ic}function Dh(o,l){o=o|0,l=y(l);var u=0;Ha(o,l>=y(0),3147),u=l==y(0),h[o+4>>2]=u?y(0):l}function YA(o,l,u,A){o=o|0,l=y(l),u=y(u),A=A|0;var d=$e,m=$e,B=0,k=0,T=0;n[2278]=(n[2278]|0)+1,vf(o),io(o,2,l)|0?(d=y(Zr(n[o+992>>2]|0,l)),T=1,d=y(d+y(yn(o,2,l)))):(d=y(Zr(o+380|0,l)),d>=y(0)?T=2:(T=((Mt(l)|0)^1)&1,d=l)),io(o,0,u)|0?(m=y(Zr(n[o+996>>2]|0,u)),k=1,m=y(m+y(yn(o,0,l)))):(m=y(Zr(o+388|0,u)),m>=y(0)?k=2:(k=((Mt(u)|0)^1)&1,m=u)),B=o+976|0,xl(o,d,m,A,T,k,l,u,1,3189,n[B>>2]|0)|0&&(bh(o,n[o+496>>2]|0,l,u,l),VA(o,y(h[(n[B>>2]|0)+4>>2]),y(0),y(0)),s[11696]|0)&&Gg(o,7)}function vf(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;k=I,I=I+32|0,B=k+24|0,m=k+16|0,A=k+8|0,d=k,u=0;do l=o+380+(u<<3)|0,n[o+380+(u<<3)+4>>2]|0&&(T=l,M=n[T+4>>2]|0,L=A,n[L>>2]=n[T>>2],n[L+4>>2]=M,L=o+364+(u<<3)|0,M=n[L+4>>2]|0,T=d,n[T>>2]=n[L>>2],n[T+4>>2]=M,n[m>>2]=n[A>>2],n[m+4>>2]=n[A+4>>2],n[B>>2]=n[d>>2],n[B+4>>2]=n[d+4>>2],Cf(m,B)|0)||(l=o+348+(u<<3)|0),n[o+992+(u<<2)>>2]=l,u=u+1|0;while((u|0)!=2);I=k}function io(o,l,u){o=o|0,l=l|0,u=y(u);var A=0;switch(o=n[o+992+(n[976+(l<<2)>>2]<<2)>>2]|0,n[o+4>>2]|0){case 0:case 3:{o=0;break}case 1:{y(h[o>>2])<y(0)?o=0:A=5;break}case 2:{y(h[o>>2])<y(0)?o=0:o=(Mt(u)|0)^1;break}default:A=5}return(A|0)==5&&(o=1),o|0}function Zr(o,l){switch(o=o|0,l=y(l),n[o+4>>2]|0){case 2:{l=y(y(y(h[o>>2])*l)/y(100));break}case 1:{l=y(h[o>>2]);break}default:l=y(le)}return y(l)}function bh(o,l,u,A,d){o=o|0,l=l|0,u=y(u),A=y(A),d=y(d);var m=0,B=$e;l=n[o+944>>2]|0?l:1,m=dr(n[o+4>>2]|0,l)|0,l=by(m,l)|0,u=y(uP(o,m,u)),A=y(uP(o,l,A)),B=y(u+y(K(o,m,d))),h[o+400+(n[1040+(m<<2)>>2]<<2)>>2]=B,u=y(u+y(re(o,m,d))),h[o+400+(n[1e3+(m<<2)>>2]<<2)>>2]=u,u=y(A+y(K(o,l,d))),h[o+400+(n[1040+(l<<2)>>2]<<2)>>2]=u,d=y(A+y(re(o,l,d))),h[o+400+(n[1e3+(l<<2)>>2]<<2)>>2]=d}function VA(o,l,u,A){o=o|0,l=y(l),u=y(u),A=y(A);var d=0,m=0,B=$e,k=$e,T=0,M=0,L=$e,q=0,ae=$e,Ye=$e,Le=$e,Qe=$e;if(l!=y(0)&&(d=o+400|0,Qe=y(h[d>>2]),m=o+404|0,Le=y(h[m>>2]),q=o+416|0,Ye=y(h[q>>2]),M=o+420|0,B=y(h[M>>2]),ae=y(Qe+u),L=y(Le+A),A=y(ae+Ye),k=y(L+B),T=(n[o+988>>2]|0)==1,h[d>>2]=y(ss(Qe,l,0,T)),h[m>>2]=y(ss(Le,l,0,T)),u=y(uU(y(Ye*l),y(1))),mn(u,y(0))|0?m=0:m=(mn(u,y(1))|0)^1,u=y(uU(y(B*l),y(1))),mn(u,y(0))|0?d=0:d=(mn(u,y(1))|0)^1,Qe=y(ss(A,l,T&m,T&(m^1))),h[q>>2]=y(Qe-y(ss(ae,l,0,T))),Qe=y(ss(k,l,T&d,T&(d^1))),h[M>>2]=y(Qe-y(ss(L,l,0,T))),m=(n[o+952>>2]|0)-(n[o+948>>2]|0)>>2,m|0)){d=0;do VA(Is(o,d)|0,l,ae,L),d=d+1|0;while((d|0)!=(m|0))}}function Sy(o,l,u,A,d){switch(o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,u|0){case 5:case 0:{o=IZ(n[489]|0,A,d)|0;break}default:o=b6e(A,d)|0}return o|0}function Wg(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;d=I,I=I+16|0,m=d,n[m>>2]=A,Ph(o,0,l,u,m),I=d}function Ph(o,l,u,A,d){if(o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,o=o|0?o:956,HZ[n[o+8>>2]&1](o,l,u,A,d)|0,(u|0)==5)Nt();else return}function pc(o,l,u){o=o|0,l=l|0,u=u|0,s[o+l>>0]=u&1}function Dy(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(xh(o,A),kt(o,n[l>>2]|0,n[u>>2]|0,A))}function xh(o,l){o=o|0,l=l|0;var u=0;if((O(o)|0)>>>0<l>>>0&&an(o),l>>>0>1073741823)Nt();else{u=Kt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function kt(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function O(o){return o=o|0,1073741823}function K(o,l,u){return o=o|0,l=l|0,u=y(u),de(l)|0&&n[o+96>>2]|0?o=o+92|0:o=kn(o+60|0,n[1040+(l<<2)>>2]|0,992)|0,y(Je(o,u))}function re(o,l,u){return o=o|0,l=l|0,u=y(u),de(l)|0&&n[o+104>>2]|0?o=o+100|0:o=kn(o+60|0,n[1e3+(l<<2)>>2]|0,992)|0,y(Je(o,u))}function de(o){return o=o|0,(o|1|0)==3|0}function Je(o,l){return o=o|0,l=y(l),(n[o+4>>2]|0)==3?l=y(0):l=y(Zr(o,l)),y(l)}function At(o,l){return o=o|0,l=l|0,o=n[o>>2]|0,(o|0?o:(l|0)>1?l:1)|0}function dr(o,l){o=o|0,l=l|0;var u=0;e:do if((l|0)==2){switch(o|0){case 2:{o=3;break e}case 3:break;default:{u=4;break e}}o=2}else u=4;while(!1);return o|0}function vr(o,l){o=o|0,l=l|0;var u=$e;return de(l)|0&&n[o+312>>2]|0&&(u=y(h[o+308>>2]),u>=y(0))||(u=y($n(y(h[(kn(o+276|0,n[1040+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(u)}function Un(o,l){o=o|0,l=l|0;var u=$e;return de(l)|0&&n[o+320>>2]|0&&(u=y(h[o+316>>2]),u>=y(0))||(u=y($n(y(h[(kn(o+276|0,n[1e3+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(u)}function mi(o,l,u){o=o|0,l=l|0,u=y(u);var A=$e;return de(l)|0&&n[o+240>>2]|0&&(A=y(Zr(o+236|0,u)),A>=y(0))||(A=y($n(y(Zr(kn(o+204|0,n[1040+(l<<2)>>2]|0,992)|0,u)),y(0)))),y(A)}function Cs(o,l,u){o=o|0,l=l|0,u=y(u);var A=$e;return de(l)|0&&n[o+248>>2]|0&&(A=y(Zr(o+244|0,u)),A>=y(0))||(A=y($n(y(Zr(kn(o+204|0,n[1e3+(l<<2)>>2]|0,992)|0,u)),y(0)))),y(A)}function JA(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=$e,T=$e,M=$e,L=$e,q=$e,ae=$e,Ye=0,Le=0,Qe=0;Qe=I,I=I+16|0,Ye=Qe,Le=o+964|0,wi(o,(n[Le>>2]|0)!=0,3519),k=y(Va(o,2,l)),T=y(Va(o,0,l)),M=y(yn(o,2,l)),L=y(yn(o,0,l)),Mt(l)|0?q=l:q=y($n(y(0),y(y(l-M)-k))),Mt(u)|0?ae=u:ae=y($n(y(0),y(y(u-L)-T))),(A|0)==1&(d|0)==1?(h[o+908>>2]=y(qn(o,2,y(l-M),m,m)),l=y(qn(o,0,y(u-L),B,m))):(jZ[n[Le>>2]&1](Ye,o,q,A,ae,d),q=y(k+y(h[Ye>>2])),ae=y(l-M),h[o+908>>2]=y(qn(o,2,(A|2|0)==2?q:ae,m,m)),ae=y(T+y(h[Ye+4>>2])),l=y(u-L),l=y(qn(o,0,(d|2|0)==2?ae:l,B,m))),h[o+912>>2]=l,I=Qe}function lP(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=$e,T=$e,M=$e,L=$e;M=y(Va(o,2,m)),k=y(Va(o,0,m)),L=y(yn(o,2,m)),T=y(yn(o,0,m)),l=y(l-L),h[o+908>>2]=y(qn(o,2,(A|2|0)==2?M:l,m,m)),u=y(u-T),h[o+912>>2]=y(qn(o,0,(d|2|0)==2?k:u,B,m))}function t2(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=0,T=$e,M=$e;return k=(A|0)==2,!(l<=y(0)&k)&&!(u<=y(0)&(d|0)==2)&&!((A|0)==1&(d|0)==1)?o=0:(T=y(yn(o,0,m)),M=y(yn(o,2,m)),k=l<y(0)&k|(Mt(l)|0),l=y(l-M),h[o+908>>2]=y(qn(o,2,k?y(0):l,m,m)),l=y(u-T),k=u<y(0)&(d|0)==2|(Mt(u)|0),h[o+912>>2]=y(qn(o,0,k?y(0):l,B,m)),o=1),o|0}function by(o,l){return o=o|0,l=l|0,Jg(o)|0?o=dr(2,l)|0:o=0,o|0}function kh(o,l,u){return o=o|0,l=l|0,u=y(u),u=y(mi(o,l,u)),y(u+y(vr(o,l)))}function r2(o,l,u){return o=o|0,l=l|0,u=y(u),u=y(Cs(o,l,u)),y(u+y(Un(o,l)))}function Va(o,l,u){o=o|0,l=l|0,u=y(u);var A=$e;return A=y(kh(o,l,u)),y(A+y(r2(o,l,u)))}function n2(o){return o=o|0,n[o+24>>2]|0?o=0:y(KA(o))!=y(0)?o=1:o=y(Qh(o))!=y(0),o|0}function KA(o){o=o|0;var l=$e;if(n[o+944>>2]|0){if(l=y(h[o+44>>2]),Mt(l)|0)return l=y(h[o+40>>2]),o=l>y(0)&((Mt(l)|0)^1),y(o?l:y(0))}else l=y(0);return y(l)}function Qh(o){o=o|0;var l=$e,u=0,A=$e;do if(n[o+944>>2]|0){if(l=y(h[o+48>>2]),Mt(l)|0){if(u=s[(n[o+976>>2]|0)+2>>0]|0,!(u<<24>>24)&&(A=y(h[o+40>>2]),A<y(0)&((Mt(A)|0)^1))){l=y(-A);break}l=u<<24>>24?y(1):y(0)}}else l=y(0);while(!1);return y(l)}function Py(o){o=o|0;var l=0,u=0;if(eE(o+400|0,0,540)|0,s[o+985>>0]=1,te(o),u=Mi(o)|0,u|0){l=o+948|0,o=0;do Py(n[(n[l>>2]|0)+(o<<2)>>2]|0),o=o+1|0;while((o|0)!=(u|0))}}function cP(o,l,u,A,d,m,B,k,T,M){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=y(m),B=y(B),k=k|0,T=T|0,M=M|0;var L=0,q=$e,ae=0,Ye=0,Le=$e,Qe=$e,tt=0,Ze=$e,ct=0,He=$e,We=0,Lt=0,Gr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0,To=0;Hn=I,I=I+16|0,Gr=Hn+12|0,fr=Hn+8|0,$t=Hn+4|0,Tr=Hn,cr=dr(n[o+4>>2]|0,T)|0,We=de(cr)|0,q=y(Zr(YL(l)|0,We?m:B)),L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=1,L=1),!(Hr|ct|((k|0)!=1|(Mt(d)|0))|(Ye|(L|0)==1))&&(h[fr>>2]=d,n[Tr>>2]=1,!tt)&&(h[Gr>>2]=y(Qe*y(d-He)),n[$t>>2]=1),Cu(l,2,m,m,$t,Gr),Cu(l,0,B,m,Tr,fr),u=y(h[Gr>>2]),d=y(h[fr>>2]),xl(l,u,d,T,n[$t>>2]|0,n[Tr>>2]|0,m,B,0,3565,M)|0,B=y(h[l+908+(n[976+(cr<<2)>>2]<<2)>>2]),h[l+504>>2]=y($n(B,y(Va(l,cr,m))))}while(!1);n[l+500>>2]=n[2278],I=Hn}function qn(o,l,u,A,d){return o=o|0,l=l|0,u=y(u),A=y(A),d=y(d),A=y(Vg(o,l,u,A)),y($n(A,y(Va(o,l,d))))}function os(o,l){return o=o|0,l=l|0,l=l+20|0,l=n[(n[l>>2]|0?l:o+16|0)>>2]|0,(l|0)==5&&Jg(n[o+4>>2]|0)|0&&(l=1),l|0}function kl(o,l){return o=o|0,l=l|0,de(l)|0&&n[o+96>>2]|0?l=4:l=n[1040+(l<<2)>>2]|0,o+60+(l<<3)|0}function Ql(o,l){return o=o|0,l=l|0,de(l)|0&&n[o+104>>2]|0?l=5:l=n[1e3+(l<<2)>>2]|0,o+60+(l<<3)|0}function Cu(o,l,u,A,d,m){switch(o=o|0,l=l|0,u=y(u),A=y(A),d=d|0,m=m|0,u=y(Zr(o+380+(n[976+(l<<2)>>2]<<3)|0,u)),u=y(u+y(yn(o,l,A))),n[d>>2]|0){case 2:case 1:{d=Mt(u)|0,A=y(h[m>>2]),h[m>>2]=d|A<u?A:u;break}case 0:{Mt(u)|0||(n[d>>2]=2,h[m>>2]=u);break}default:}}function ha(o,l){return o=o|0,l=l|0,o=o+132|0,de(l)|0&&n[(kn(o,4,948)|0)+4>>2]|0?o=1:o=(n[(kn(o,n[1040+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,o|0}function zA(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0;return o=o+132|0,de(l)|0&&(A=kn(o,4,948)|0,(n[A+4>>2]|0)!=0)?d=4:(A=kn(o,n[1040+(l<<2)>>2]|0,948)|0,n[A+4>>2]|0?d=4:u=y(0)),(d|0)==4&&(u=y(Zr(A,u))),y(u)}function XA(o,l,u){o=o|0,l=l|0,u=y(u);var A=$e;return A=y(h[o+908+(n[976+(l<<2)>>2]<<2)>>2]),A=y(A+y(K(o,l,u))),y(A+y(re(o,l,u)))}function jL(o){o=o|0;var l=0,u=0,A=0;e:do if(Jg(n[o+4>>2]|0)|0)l=0;else if((n[o+16>>2]|0)!=5)if(u=Mi(o)|0,!u)l=0;else for(l=0;;){if(A=Is(o,l)|0,!(n[A+24>>2]|0)&&(n[A+20>>2]|0)==5){l=1;break e}if(l=l+1|0,l>>>0>=u>>>0){l=0;break}}else l=1;while(!1);return l|0}function qL(o,l){o=o|0,l=l|0;var u=$e;return u=y(h[o+908+(n[976+(l<<2)>>2]<<2)>>2]),u>=y(0)&((Mt(u)|0)^1)|0}function Yg(o){o=o|0;var l=$e,u=0,A=0,d=0,m=0,B=0,k=0,T=$e;if(u=n[o+968>>2]|0,u)T=y(h[o+908>>2]),l=y(h[o+912>>2]),l=y(LZ[u&0](o,T,l)),wi(o,(Mt(l)|0)^1,3573);else{m=Mi(o)|0;do if(m|0){for(u=0,d=0;;){if(A=Is(o,d)|0,n[A+940>>2]|0){B=8;break}if((n[A+24>>2]|0)!=1)if(k=(os(o,A)|0)==5,k){u=A;break}else u=u|0?u:A;if(d=d+1|0,d>>>0>=m>>>0){B=8;break}}if((B|0)==8&&!u)break;return l=y(Yg(u)),y(l+y(h[u+404>>2]))}while(!1);l=y(h[o+912>>2])}return y(l)}function Vg(o,l,u,A){o=o|0,l=l|0,u=y(u),A=y(A);var d=$e,m=0;return Jg(l)|0?(l=1,m=3):de(l)|0?(l=0,m=3):(A=y(le),d=y(le)),(m|0)==3&&(d=y(Zr(o+364+(l<<3)|0,A)),A=y(Zr(o+380+(l<<3)|0,A))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ct=y(ct-y(h[l+908+(He<<2)>>2])),ct=y(ct-y(Un(o,tt))),ct=y(ct-y(re(l,tt,u))),ct=y(ct-y(Th(l,tt,Qe?u:d))),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct):Ze=21;do if((Ze|0)==21){if(!(ha(l,tt)|0)&&(n[o+8>>2]|0)==1){He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(y(ct-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct;break}!(ha(l,tt)|0)&&(n[o+8>>2]|0)==2&&(He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct)}while(!1);xy(l,Le)|0&&!(ha(l,Le)|0)?(He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),ct=y(ct-y(Un(o,Le))),ct=y(ct-y(re(l,Le,u))),ct=y(ct-y(Th(l,Le,Qe?d:u))),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct):Ze=30;do if((Ze|0)==30&&!(ha(l,Le)|0)){if((os(o,l)|0)==2){He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(y(ct-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct;break}He=(os(o,l)|0)==3,He^(n[o+28>>2]|0)==2&&(He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct)}while(!1)}function i2(o,l,u){o=o|0,l=l|0,u=u|0;var A=$e,d=0;d=n[976+(u<<2)>>2]|0,A=y(h[l+908+(d<<2)>>2]),A=y(y(h[o+908+(d<<2)>>2])-A),A=y(A-y(h[l+400+(n[1040+(u<<2)>>2]<<2)>>2])),h[l+400+(n[1e3+(u<<2)>>2]<<2)>>2]=A}function Jg(o){return o=o|0,(o|1|0)==1|0}function YL(o){o=o|0;var l=$e;switch(n[o+56>>2]|0){case 0:case 3:{l=y(h[o+40>>2]),l>y(0)&((Mt(l)|0)^1)?o=s[(n[o+976>>2]|0)+2>>0]|0?1056:992:o=1056;break}default:o=o+52|0}return o|0}function s2(o,l){return o=o|0,l=l|0,(s[o+l>>0]|0)!=0|0}function xy(o,l){return o=o|0,l=l|0,o=o+132|0,de(l)|0&&n[(kn(o,5,948)|0)+4>>2]|0?o=1:o=(n[(kn(o,n[1e3+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,o|0}function Th(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0;return o=o+132|0,de(l)|0&&(A=kn(o,5,948)|0,(n[A+4>>2]|0)!=0)?d=4:(A=kn(o,n[1e3+(l<<2)>>2]|0,948)|0,n[A+4>>2]|0?d=4:u=y(0)),(d|0)==4&&(u=y(Zr(A,u))),y(u)}function uP(o,l,u){return o=o|0,l=l|0,u=y(u),ha(o,l)|0?u=y(zA(o,l,u)):u=y(-y(Th(o,l,u))),y(u)}function fP(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function ky(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Kt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function AP(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|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>2)+1|0,o=B,A=n[d>>2]|0;do n[A>>2]=n[o>>2],A=(n[d>>2]|0)+4|0,n[d>>2]=A,o=o+4|0;while((o|0)!=(m|0));n[l>>2]=B+(u<<2)}}function a2(){ua()}function gP(){var o=0;return o=Kt(4)|0,l2(o),o|0}function l2(o){o=o|0,n[o>>2]=Ac()|0}function dP(o){o=o|0,o|0&&(Kg(o),It(o))}function Kg(o){o=o|0,st(n[o>>2]|0)}function VL(o,l,u){o=o|0,l=l|0,u=u|0,pc(n[o>>2]|0,l,u)}function Ty(o,l){o=o|0,l=y(l),Dh(n[o>>2]|0,l)}function Ry(o,l){return o=o|0,l=l|0,s2(n[o>>2]|0,l)|0}function Fy(){var o=0;return o=Kt(8)|0,zg(o,0),o|0}function zg(o,l){o=o|0,l=l|0,l?l=fa(n[l>>2]|0)|0:l=ns()|0,n[o>>2]=l,n[o+4>>2]=0,Tn(l,o)}function Ny(o){o=o|0;var l=0;return l=Kt(8)|0,zg(l,o),l|0}function Xg(o){o=o|0,o|0&&(Oy(o),It(o))}function Oy(o){o=o|0;var l=0;uc(n[o>>2]|0),l=o+4|0,o=n[l>>2]|0,n[l>>2]=0,o|0&&(Sf(o),It(o))}function Sf(o){o=o|0,Df(o)}function Df(o){o=o|0,o=n[o>>2]|0,o|0&&Na(o|0)}function c2(o){return o=o|0,Ga(o)|0}function u2(o){o=o|0;var l=0,u=0;u=o+4|0,l=n[u>>2]|0,n[u>>2]=0,l|0&&(Sf(l),It(l)),fc(n[o>>2]|0)}function Ly(o,l){o=o|0,l=l|0,An(n[o>>2]|0,n[l>>2]|0)}function JL(o,l){o=o|0,l=l|0,wh(n[o>>2]|0,l)}function KL(o,l,u){o=o|0,l=l|0,u=+u,Cy(n[o>>2]|0,l,y(u))}function My(o,l,u){o=o|0,l=l|0,u=+u,wy(n[o>>2]|0,l,y(u))}function f2(o,l){o=o|0,l=l|0,Eh(n[o>>2]|0,l)}function A2(o,l){o=o|0,l=l|0,So(n[o>>2]|0,l)}function xr(o,l){o=o|0,l=l|0,Ch(n[o>>2]|0,l)}function so(o,l){o=o|0,l=l|0,my(n[o>>2]|0,l)}function Xi(o,l){o=o|0,l=l|0,Ng(n[o>>2]|0,l)}function Ns(o,l){o=o|0,l=l|0,vo(n[o>>2]|0,l)}function ZA(o,l,u){o=o|0,l=l|0,u=+u,HA(n[o>>2]|0,l,y(u))}function p2(o,l,u){o=o|0,l=l|0,u=+u,Y(n[o>>2]|0,l,y(u))}function ws(o,l){o=o|0,l=l|0,jA(n[o>>2]|0,l)}function Uy(o,l){o=o|0,l=l|0,Ey(n[o>>2]|0,l)}function Rh(o,l){o=o|0,l=l|0,Do(n[o>>2]|0,l)}function Zg(o,l){o=o|0,l=+l,Bh(n[o>>2]|0,y(l))}function Fh(o,l){o=o|0,l=+l,bl(n[o>>2]|0,y(l))}function h2(o,l){o=o|0,l=+l,Iy(n[o>>2]|0,y(l))}function g2(o,l){o=o|0,l=+l,Lg(n[o>>2]|0,y(l))}function d2(o,l){o=o|0,l=+l,Dl(n[o>>2]|0,y(l))}function m2(o,l){o=o|0,l=+l,Mg(n[o>>2]|0,y(l))}function bf(o,l){o=o|0,l=+l,e2(n[o>>2]|0,y(l))}function sr(o){o=o|0,vh(n[o>>2]|0)}function _y(o,l){o=o|0,l=+l,zi(n[o>>2]|0,y(l))}function y2(o,l){o=o|0,l=+l,yf(n[o>>2]|0,y(l))}function hc(o){o=o|0,qa(n[o>>2]|0)}function Pf(o,l){o=o|0,l=+l,du(n[o>>2]|0,y(l))}function $g(o,l){o=o|0,l=+l,Ef(n[o>>2]|0,y(l))}function ed(o,l){o=o|0,l=+l,di(n[o>>2]|0,y(l))}function E2(o,l){o=o|0,l=+l,GA(n[o>>2]|0,y(l))}function I2(o,l){o=o|0,l=+l,Aa(n[o>>2]|0,y(l))}function wu(o,l){o=o|0,l=+l,Ya(n[o>>2]|0,y(l))}function td(o,l){o=o|0,l=+l,Sh(n[o>>2]|0,y(l))}function C2(o,l){o=o|0,l=+l,Hg(n[o>>2]|0,y(l))}function Hy(o,l){o=o|0,l=+l,qA(n[o>>2]|0,y(l))}function Bu(o,l,u){o=o|0,l=l|0,u=+u,gu(n[o>>2]|0,l,y(u))}function jy(o,l,u){o=o|0,l=l|0,u=+u,bo(n[o>>2]|0,l,y(u))}function rd(o,l,u){o=o|0,l=l|0,u=+u,mf(n[o>>2]|0,l,y(u))}function nd(o){return o=o|0,Fg(n[o>>2]|0)|0}function ko(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,_A(d,n[l>>2]|0,u),Bs(o,d),I=A}function Bs(o,l){o=o|0,l=l|0,Tl(o,n[l+4>>2]|0,+y(h[l>>2]))}function Tl(o,l,u){o=o|0,l=l|0,u=+u,n[o>>2]=l,E[o+8>>3]=u}function Gy(o){return o=o|0,$1(n[o>>2]|0)|0}function ga(o){return o=o|0,Ih(n[o>>2]|0)|0}function mP(o){return o=o|0,hu(n[o>>2]|0)|0}function Nh(o){return o=o|0,Z1(n[o>>2]|0)|0}function w2(o){return o=o|0,Og(n[o>>2]|0)|0}function zL(o){return o=o|0,yy(n[o>>2]|0)|0}function yP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,xt(d,n[l>>2]|0,u),Bs(o,d),I=A}function EP(o){return o=o|0,df(n[o>>2]|0)|0}function qy(o){return o=o|0,Sl(n[o>>2]|0)|0}function B2(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,UA(A,n[l>>2]|0),Bs(o,A),I=u}function Oh(o){return o=o|0,+ +y(li(n[o>>2]|0))}function IP(o){return o=o|0,+ +y(qi(n[o>>2]|0))}function CP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,ur(A,n[l>>2]|0),Bs(o,A),I=u}function id(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,Ug(A,n[l>>2]|0),Bs(o,A),I=u}function XL(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,wt(A,n[l>>2]|0),Bs(o,A),I=u}function ZL(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,Wa(A,n[l>>2]|0),Bs(o,A),I=u}function wP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,_g(A,n[l>>2]|0),Bs(o,A),I=u}function BP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,vy(A,n[l>>2]|0),Bs(o,A),I=u}function $A(o){return o=o|0,+ +y(jg(n[o>>2]|0))}function $L(o,l){return o=o|0,l=l|0,+ +y(By(n[o>>2]|0,l))}function eM(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,yt(d,n[l>>2]|0,u),Bs(o,d),I=A}function vu(o,l,u){o=o|0,l=l|0,u=u|0,lr(n[o>>2]|0,n[l>>2]|0,u)}function tM(o,l){o=o|0,l=l|0,gf(n[o>>2]|0,n[l>>2]|0)}function vP(o){return o=o|0,Mi(n[o>>2]|0)|0}function rM(o){return o=o|0,o=Et(n[o>>2]|0)|0,o?o=c2(o)|0:o=0,o|0}function SP(o,l){return o=o|0,l=l|0,o=Is(n[o>>2]|0,l)|0,o?o=c2(o)|0:o=0,o|0}function xf(o,l){o=o|0,l=l|0;var u=0,A=0;A=Kt(4)|0,DP(A,l),u=o+4|0,l=n[u>>2]|0,n[u>>2]=A,l|0&&(Sf(l),It(l)),St(n[o>>2]|0,1)}function DP(o,l){o=o|0,l=l|0,oM(o,l)}function nM(o,l,u,A,d,m){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0;var B=0,k=0;B=I,I=I+16|0,k=B,bP(k,Ga(l)|0,+u,A,+d,m),h[o>>2]=y(+E[k>>3]),h[o+4>>2]=y(+E[k+8>>3]),I=B}function bP(o,l,u,A,d,m){o=o|0,l=l|0,u=+u,A=A|0,d=+d,m=m|0;var B=0,k=0,T=0,M=0,L=0;B=I,I=I+32|0,L=B+8|0,M=B+20|0,T=B,k=B+16|0,E[L>>3]=u,n[M>>2]=A,E[T>>3]=d,n[k>>2]=m,Wy(o,n[l+4>>2]|0,L,M,T,k),I=B}function Wy(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0;B=I,I=I+16|0,k=B,Fl(k),l=Os(l)|0,PP(o,l,+E[u>>3],n[A>>2]|0,+E[d>>3],n[m>>2]|0),Nl(k),I=B}function Os(o){return o=o|0,n[o>>2]|0}function PP(o,l,u,A,d,m){o=o|0,l=l|0,u=+u,A=A|0,d=+d,m=m|0;var B=0;B=da(v2()|0)|0,u=+Ja(u),A=Yy(A)|0,d=+Ja(d),iM(o,Kn(0,B|0,l|0,+u,A|0,+d,Yy(m)|0)|0)}function v2(){var o=0;return s[7608]|0||(D2(9120),o=7608,n[o>>2]=1,n[o+4>>2]=0),9120}function da(o){return o=o|0,n[o+8>>2]|0}function Ja(o){return o=+o,+ +kf(o)}function Yy(o){return o=o|0,sd(o)|0}function iM(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+32|0,u=d,A=l,A&1?(Ka(u,0),Me(A|0,u|0)|0,S2(o,u),sM(u)):(n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2]),I=d}function Ka(o,l){o=o|0,l=l|0,Su(o,l),n[o+8>>2]=0,s[o+24>>0]=0}function S2(o,l){o=o|0,l=l|0,l=l+8|0,n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2]}function sM(o){o=o|0,s[o+24>>0]=0}function Su(o,l){o=o|0,l=l|0,n[o>>2]=l}function sd(o){return o=o|0,o|0}function kf(o){return o=+o,+o}function D2(o){o=o|0,Qo(o,b2()|0,4)}function b2(){return 1064}function Qo(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=Gi(l|0,u+1|0)|0}function oM(o,l){o=o|0,l=l|0,l=n[l>>2]|0,n[o>>2]=l,au(l|0)}function xP(o){o=o|0;var l=0,u=0;u=o+4|0,l=n[u>>2]|0,n[u>>2]=0,l|0&&(Sf(l),It(l)),St(n[o>>2]|0,0)}function kP(o){o=o|0,bt(n[o>>2]|0)}function Vy(o){return o=o|0,tr(n[o>>2]|0)|0}function aM(o,l,u,A){o=o|0,l=+l,u=+u,A=A|0,YA(n[o>>2]|0,y(l),y(u),A)}function lM(o){return o=o|0,+ +y(mu(n[o>>2]|0))}function v(o){return o=o|0,+ +y(If(n[o>>2]|0))}function D(o){return o=o|0,+ +y(yu(n[o>>2]|0))}function Q(o){return o=o|0,+ +y(Rs(n[o>>2]|0))}function H(o){return o=o|0,+ +y(Eu(n[o>>2]|0))}function V(o){return o=o|0,+ +y(Gn(n[o>>2]|0))}function ne(o,l){o=o|0,l=l|0,E[o>>3]=+y(mu(n[l>>2]|0)),E[o+8>>3]=+y(If(n[l>>2]|0)),E[o+16>>3]=+y(yu(n[l>>2]|0)),E[o+24>>3]=+y(Rs(n[l>>2]|0)),E[o+32>>3]=+y(Eu(n[l>>2]|0)),E[o+40>>3]=+y(Gn(n[l>>2]|0))}function Se(o,l){return o=o|0,l=l|0,+ +y(is(n[o>>2]|0,l))}function _e(o,l){return o=o|0,l=l|0,+ +y(Pi(n[o>>2]|0,l))}function pt(o,l){return o=o|0,l=l|0,+ +y(WA(n[o>>2]|0,l))}function Wt(){return Qn()|0}function Sr(){Lr(),Zt(),zn(),yi(),za(),et()}function Lr(){p4e(11713,4938,1)}function Zt(){T_e(10448)}function zn(){p_e(10408)}function yi(){OUe(10324)}function za(){qLe(10096)}function et(){qe(9132)}function qe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,We=0,Lt=0,G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4>>2]=0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],QP(o,4808,u)|0,I=l}function gt(o,l){o=o|0,l=l|0;var u=0;u=NLe()|0,n[o>>2]=u,OLe(u,l),jh(n[o>>2]|0)}function Xt(o,l,u){return o=o|0,l=l|0,u=u|0,CLe(o,Bn(l)|0,u,0),o|0}function Dr(o,l,u){return o=o|0,l=l|0,u=u|0,sLe(o,Bn(l)|0,u,0),o|0}function Zn(o,l,u){return o=o|0,l=l|0,u=u|0,WOe(o,Bn(l)|0,u,0),o|0}function kr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],xOe(o,l,d),I=A,o|0}function Rn(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],uOe(o,l,d),I=A,o|0}function _n(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],JNe(o,l,d),I=A,o|0}function zr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],TNe(o,l,d),I=A,o|0}function ci(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],dNe(o,l,d),I=A,o|0}function Du(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],eNe(o,l,d),I=A,o|0}function cM(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],MFe(o,l,d),I=A,o|0}function od(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],uFe(o,l,d),I=A,o|0}function ep(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],JRe(o,l,d),I=A,o|0}function QP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],TRe(o,l,d),I=A,o|0}function Cke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],dRe(o,l,d),I=A,o|0}function wke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],eRe(o,l,d),I=A,o|0}function Bke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],UTe(o,l,d),I=A,o|0}function vke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],vTe(o,l,d),I=A,o|0}function Ske(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],aTe(o,l,d),I=A,o|0}function Dke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],qQe(o,l,d),I=A,o|0}function bke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],PQe(o,l,d),I=A,o|0}function Pke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],uQe(o,l,d),I=A,o|0}function xke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],kke(o,l,d),I=A,o|0}function kke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Qke(o,u,d,1),I=A}function Bn(o){return o=o|0,o|0}function Qke(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=uM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=Tke(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,Rke(m,A)|0,A),I=d}function uM(){var o=0,l=0;if(s[7616]|0||(mz(9136),gr(24,9136,U|0)|0,l=7616,n[l>>2]=1,n[l+4>>2]=0),!(_r(9136)|0)){o=9136,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));mz(9136)}return 9136}function Tke(o){return o=o|0,0}function Rke(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=uM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],dz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(Oke(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function vn(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0;B=I,I=I+32|0,ae=B+24|0,q=B+20|0,T=B+16|0,L=B+12|0,M=B+8|0,k=B+4|0,Ye=B,n[q>>2]=l,n[T>>2]=u,n[L>>2]=A,n[M>>2]=d,n[k>>2]=m,m=o+28|0,n[Ye>>2]=n[m>>2],n[ae>>2]=n[Ye>>2],Fke(o+24|0,ae,q,L,M,T,k)|0,n[m>>2]=n[n[m>>2]>>2],I=B}function Fke(o,l,u,A,d,m,B){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,o=Nke(l)|0,l=Kt(24)|0,gz(l+4|0,n[u>>2]|0,n[A>>2]|0,n[d>>2]|0,n[m>>2]|0,n[B>>2]|0),n[l>>2]=n[o>>2],n[o>>2]=l,l|0}function Nke(o){return o=o|0,n[o>>2]|0}function gz(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=A,n[o+12>>2]=d,n[o+16>>2]=m}function yr(o,l){return o=o|0,l=l|0,l|o|0}function dz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function Oke(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=Lke(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,Mke(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],dz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,Uke(o,k),_ke(k),I=M;return}}function Lke(o){return o=o|0,357913941}function Mke(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function Uke(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _ke(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function mz(o){o=o|0,Gke(o)}function Hke(o){o=o|0,jke(o+24|0)}function _r(o){return o=o|0,n[o>>2]|0}function jke(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function Gke(o){o=o|0;var l=0;l=tn()|0,rn(o,2,3,l,qke()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function tn(){return 9228}function qke(){return 1140}function Wke(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=Yke(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=Vke(l,A)|0,I=u,l|0}function rn(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=A,n[o+12>>2]=d,n[o+16>>2]=m}function Yke(o){return o=o|0,(n[(uM()|0)+24>>2]|0)+(o*12|0)|0}function Vke(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+48|0,A=d,u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),sp[u&31](A,o),A=Jke(A)|0,I=d,A|0}function Jke(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=fM(yz()|0)|0,A?(AM(l,A),pM(u,l),Kke(o,u),o=hM(l)|0):o=zke(o)|0,I=d,o|0}function yz(){var o=0;return s[7632]|0||(oQe(9184),gr(25,9184,U|0)|0,o=7632,n[o>>2]=1,n[o+4>>2]=0),9184}function fM(o){return o=o|0,n[o+36>>2]|0}function AM(o,l){o=o|0,l=l|0,n[o>>2]=l,n[o+4>>2]=o,n[o+8>>2]=0}function pM(o,l){o=o|0,l=l|0,n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=0}function Kke(o,l){o=o|0,l=l|0,eQe(l,o,o+8|0,o+16|0,o+24|0,o+32|0,o+40|0)|0}function hM(o){return o=o|0,n[(n[o+4>>2]|0)+8>>2]|0}function zke(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0;T=I,I=I+16|0,u=T+4|0,A=T,d=Rl(8)|0,m=d,B=Kt(48)|0,k=B,l=k+48|0;do n[k>>2]=n[o>>2],k=k+4|0,o=o+4|0;while((k|0)<(l|0));return l=m+4|0,n[l>>2]=B,k=Kt(8)|0,B=n[l>>2]|0,n[A>>2]=0,n[u>>2]=n[A>>2],Ez(k,B,u),n[d>>2]=k,I=T,m|0}function Ez(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Kt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1092,n[u+12>>2]=l,n[o+4>>2]=u}function Xke(o){o=o|0,$y(o),It(o)}function Zke(o){o=o|0,o=n[o+12>>2]|0,o|0&&It(o)}function $ke(o){o=o|0,It(o)}function eQe(o,l,u,A,d,m,B){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,m=tQe(n[o>>2]|0,l,u,A,d,m,B)|0,B=o+4|0,n[(n[B>>2]|0)+8>>2]=m,n[(n[B>>2]|0)+8>>2]|0}function tQe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0;var k=0,T=0;return k=I,I=I+16|0,T=k,Fl(T),o=Os(o)|0,B=rQe(o,+E[l>>3],+E[u>>3],+E[A>>3],+E[d>>3],+E[m>>3],+E[B>>3])|0,Nl(T),I=k,B|0}function rQe(o,l,u,A,d,m,B){o=o|0,l=+l,u=+u,A=+A,d=+d,m=+m,B=+B;var k=0;return k=da(nQe()|0)|0,l=+Ja(l),u=+Ja(u),A=+Ja(A),d=+Ja(d),m=+Ja(m),ro(0,k|0,o|0,+l,+u,+A,+d,+m,+ +Ja(B))|0}function nQe(){var o=0;return s[7624]|0||(iQe(9172),o=7624,n[o>>2]=1,n[o+4>>2]=0),9172}function iQe(o){o=o|0,Qo(o,sQe()|0,6)}function sQe(){return 1112}function oQe(o){o=o|0,Lh(o)}function aQe(o){o=o|0,Iz(o+24|0),Cz(o+16|0)}function Iz(o){o=o|0,cQe(o)}function Cz(o){o=o|0,lQe(o)}function lQe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,It(u);while(l|0);n[o>>2]=0}function cQe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,It(u);while(l|0);n[o>>2]=0}function Lh(o){o=o|0;var l=0;n[o+16>>2]=0,n[o+20>>2]=0,l=o+24|0,n[l>>2]=0,n[o+28>>2]=l,n[o+36>>2]=0,s[o+40>>0]=0,s[o+41>>0]=0}function uQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],fQe(o,u,d,0),I=A}function fQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=gM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=AQe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,pQe(m,A)|0,A),I=d}function gM(){var o=0,l=0;if(s[7640]|0||(Bz(9232),gr(26,9232,U|0)|0,l=7640,n[l>>2]=1,n[l+4>>2]=0),!(_r(9232)|0)){o=9232,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Bz(9232)}return 9232}function AQe(o){return o=o|0,0}function pQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=gM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],wz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(hQe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function wz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function hQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=gQe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,dQe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],wz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,mQe(o,k),yQe(k),I=M;return}}function gQe(o){return o=o|0,357913941}function dQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function mQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function yQe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Bz(o){o=o|0,CQe(o)}function EQe(o){o=o|0,IQe(o+24|0)}function IQe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function CQe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,1,l,wQe()|0,3),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function wQe(){return 1144}function BQe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+16|0,B=m+8|0,k=m,T=vQe(o)|0,o=n[T+4>>2]|0,n[k>>2]=n[T>>2],n[k+4>>2]=o,n[B>>2]=n[k>>2],n[B+4>>2]=n[k+4>>2],SQe(l,B,u,A,d),I=m}function vQe(o){return o=o|0,(n[(gM()|0)+24>>2]|0)+(o*12|0)|0}function SQe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0;var m=0,B=0,k=0,T=0,M=0;M=I,I=I+16|0,B=M+2|0,k=M+1|0,T=M,m=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(m=n[(n[o>>2]|0)+m>>2]|0),Qf(B,u),u=+Tf(B,u),Qf(k,A),A=+Tf(k,A),tp(T,d),T=rp(T,d)|0,MZ[m&1](o,u,A,T),I=M}function Qf(o,l){o=o|0,l=+l}function Tf(o,l){return o=o|0,l=+l,+ +bQe(l)}function tp(o,l){o=o|0,l=l|0}function rp(o,l){return o=o|0,l=l|0,DQe(l)|0}function DQe(o){return o=o|0,o|0}function bQe(o){return o=+o,+o}function PQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],xQe(o,u,d,1),I=A}function xQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=dM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=kQe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,QQe(m,A)|0,A),I=d}function dM(){var o=0,l=0;if(s[7648]|0||(Sz(9268),gr(27,9268,U|0)|0,l=7648,n[l>>2]=1,n[l+4>>2]=0),!(_r(9268)|0)){o=9268,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Sz(9268)}return 9268}function kQe(o){return o=o|0,0}function QQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=dM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],vz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(TQe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function vz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function TQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=RQe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,FQe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],vz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,NQe(o,k),OQe(k),I=M;return}}function RQe(o){return o=o|0,357913941}function FQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function NQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function OQe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Sz(o){o=o|0,UQe(o)}function LQe(o){o=o|0,MQe(o+24|0)}function MQe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function UQe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,4,l,_Qe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function _Qe(){return 1160}function HQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=jQe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=GQe(l,A)|0,I=u,l|0}function jQe(o){return o=o|0,(n[(dM()|0)+24>>2]|0)+(o*12|0)|0}function GQe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),Dz(gd[u&31](o)|0)|0}function Dz(o){return o=o|0,o&1|0}function qQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],WQe(o,u,d,0),I=A}function WQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=mM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=YQe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,VQe(m,A)|0,A),I=d}function mM(){var o=0,l=0;if(s[7656]|0||(Pz(9304),gr(28,9304,U|0)|0,l=7656,n[l>>2]=1,n[l+4>>2]=0),!(_r(9304)|0)){o=9304,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Pz(9304)}return 9304}function YQe(o){return o=o|0,0}function VQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=mM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],bz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(JQe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function bz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function JQe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=KQe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,zQe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],bz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,XQe(o,k),ZQe(k),I=M;return}}function KQe(o){return o=o|0,357913941}function zQe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function XQe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ZQe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Pz(o){o=o|0,tTe(o)}function $Qe(o){o=o|0,eTe(o+24|0)}function eTe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function tTe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,5,l,rTe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function rTe(){return 1164}function nTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=iTe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],sTe(l,d,u),I=A}function iTe(o){return o=o|0,(n[(mM()|0)+24>>2]|0)+(o*12|0)|0}function sTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),Mh(d,u),u=Uh(d,u)|0,sp[A&31](o,u),_h(d),I=m}function Mh(o,l){o=o|0,l=l|0,oTe(o,l)}function Uh(o,l){return o=o|0,l=l|0,o|0}function _h(o){o=o|0,Sf(o)}function oTe(o,l){o=o|0,l=l|0,yM(o,l)}function yM(o,l){o=o|0,l=l|0,n[o>>2]=l}function aTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],lTe(o,u,d,0),I=A}function lTe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=EM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=cTe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,uTe(m,A)|0,A),I=d}function EM(){var o=0,l=0;if(s[7664]|0||(kz(9340),gr(29,9340,U|0)|0,l=7664,n[l>>2]=1,n[l+4>>2]=0),!(_r(9340)|0)){o=9340,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));kz(9340)}return 9340}function cTe(o){return o=o|0,0}function uTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=EM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],xz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(fTe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function xz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function fTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=ATe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,pTe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],xz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,hTe(o,k),gTe(k),I=M;return}}function ATe(o){return o=o|0,357913941}function pTe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function hTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function gTe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function kz(o){o=o|0,yTe(o)}function dTe(o){o=o|0,mTe(o+24|0)}function mTe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function yTe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,4,l,ETe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function ETe(){return 1180}function ITe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=CTe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=wTe(l,d,u)|0,I=A,u|0}function CTe(o){return o=o|0,(n[(EM()|0)+24>>2]|0)+(o*12|0)|0}function wTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),ad(d,u),d=ld(d,u)|0,d=TP(gU[A&15](o,d)|0)|0,I=m,d|0}function ad(o,l){o=o|0,l=l|0}function ld(o,l){return o=o|0,l=l|0,BTe(l)|0}function TP(o){return o=o|0,o|0}function BTe(o){return o=o|0,o|0}function vTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],STe(o,u,d,0),I=A}function STe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=IM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=DTe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,bTe(m,A)|0,A),I=d}function IM(){var o=0,l=0;if(s[7672]|0||(Tz(9376),gr(30,9376,U|0)|0,l=7672,n[l>>2]=1,n[l+4>>2]=0),!(_r(9376)|0)){o=9376,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Tz(9376)}return 9376}function DTe(o){return o=o|0,0}function bTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=IM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Qz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(PTe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function Qz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function PTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=xTe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,kTe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Qz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,QTe(o,k),TTe(k),I=M;return}}function xTe(o){return o=o|0,357913941}function kTe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function QTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function TTe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Tz(o){o=o|0,NTe(o)}function RTe(o){o=o|0,FTe(o+24|0)}function FTe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function NTe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,5,l,Rz()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Rz(){return 1196}function OTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=LTe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=MTe(l,A)|0,I=u,l|0}function LTe(o){return o=o|0,(n[(IM()|0)+24>>2]|0)+(o*12|0)|0}function MTe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),TP(gd[u&31](o)|0)|0}function UTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],_Te(o,u,d,1),I=A}function _Te(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=CM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=HTe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,jTe(m,A)|0,A),I=d}function CM(){var o=0,l=0;if(s[7680]|0||(Nz(9412),gr(31,9412,U|0)|0,l=7680,n[l>>2]=1,n[l+4>>2]=0),!(_r(9412)|0)){o=9412,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Nz(9412)}return 9412}function HTe(o){return o=o|0,0}function jTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=CM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Fz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(GTe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function Fz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function GTe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=qTe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,WTe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Fz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,YTe(o,k),VTe(k),I=M;return}}function qTe(o){return o=o|0,357913941}function WTe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function YTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function VTe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Nz(o){o=o|0,zTe(o)}function JTe(o){o=o|0,KTe(o+24|0)}function KTe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function zTe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,6,l,Oz()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Oz(){return 1200}function XTe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=ZTe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=$Te(l,A)|0,I=u,l|0}function ZTe(o){return o=o|0,(n[(CM()|0)+24>>2]|0)+(o*12|0)|0}function $Te(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),RP(gd[u&31](o)|0)|0}function RP(o){return o=o|0,o|0}function eRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],tRe(o,u,d,0),I=A}function tRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=wM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=rRe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,nRe(m,A)|0,A),I=d}function wM(){var o=0,l=0;if(s[7688]|0||(Mz(9448),gr(32,9448,U|0)|0,l=7688,n[l>>2]=1,n[l+4>>2]=0),!(_r(9448)|0)){o=9448,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Mz(9448)}return 9448}function rRe(o){return o=o|0,0}function nRe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=wM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Lz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(iRe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function Lz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function iRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=sRe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,oRe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Lz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,aRe(o,k),lRe(k),I=M;return}}function sRe(o){return o=o|0,357913941}function oRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function aRe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function lRe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Mz(o){o=o|0,fRe(o)}function cRe(o){o=o|0,uRe(o+24|0)}function uRe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function fRe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,6,l,Uz()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Uz(){return 1204}function ARe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=pRe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],hRe(l,d,u),I=A}function pRe(o){return o=o|0,(n[(wM()|0)+24>>2]|0)+(o*12|0)|0}function hRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),BM(d,u),d=vM(d,u)|0,sp[A&31](o,d),I=m}function BM(o,l){o=o|0,l=l|0}function vM(o,l){return o=o|0,l=l|0,gRe(l)|0}function gRe(o){return o=o|0,o|0}function dRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],mRe(o,u,d,0),I=A}function mRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=SM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=yRe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,ERe(m,A)|0,A),I=d}function SM(){var o=0,l=0;if(s[7696]|0||(Hz(9484),gr(33,9484,U|0)|0,l=7696,n[l>>2]=1,n[l+4>>2]=0),!(_r(9484)|0)){o=9484,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Hz(9484)}return 9484}function yRe(o){return o=o|0,0}function ERe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=SM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],_z(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(IRe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function _z(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function IRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=CRe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,wRe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],_z(m,A,u),n[T>>2]=(n[T>>2]|0)+12,BRe(o,k),vRe(k),I=M;return}}function CRe(o){return o=o|0,357913941}function wRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function BRe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function vRe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Hz(o){o=o|0,bRe(o)}function SRe(o){o=o|0,DRe(o+24|0)}function DRe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function bRe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,1,l,PRe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function PRe(){return 1212}function xRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=kRe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],QRe(l,m,u,A),I=d}function kRe(o){return o=o|0,(n[(SM()|0)+24>>2]|0)+(o*12|0)|0}function QRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),BM(m,u),m=vM(m,u)|0,ad(B,A),B=ld(B,A)|0,F2[d&15](o,m,B),I=k}function TRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],RRe(o,u,d,1),I=A}function RRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=DM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=FRe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,NRe(m,A)|0,A),I=d}function DM(){var o=0,l=0;if(s[7704]|0||(Gz(9520),gr(34,9520,U|0)|0,l=7704,n[l>>2]=1,n[l+4>>2]=0),!(_r(9520)|0)){o=9520,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Gz(9520)}return 9520}function FRe(o){return o=o|0,0}function NRe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=DM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],jz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(ORe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function jz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function ORe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=LRe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,MRe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],jz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,URe(o,k),_Re(k),I=M;return}}function LRe(o){return o=o|0,357913941}function MRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function URe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _Re(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Gz(o){o=o|0,GRe(o)}function HRe(o){o=o|0,jRe(o+24|0)}function jRe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function GRe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,1,l,qRe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function qRe(){return 1224}function WRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;return d=I,I=I+16|0,m=d+8|0,B=d,k=YRe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],A=+VRe(l,m,u),I=d,+A}function YRe(o){return o=o|0,(n[(DM()|0)+24>>2]|0)+(o*12|0)|0}function VRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),tp(d,u),d=rp(d,u)|0,B=+kf(+_Z[A&7](o,d)),I=m,+B}function JRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],KRe(o,u,d,1),I=A}function KRe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=bM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=zRe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,XRe(m,A)|0,A),I=d}function bM(){var o=0,l=0;if(s[7712]|0||(Wz(9556),gr(35,9556,U|0)|0,l=7712,n[l>>2]=1,n[l+4>>2]=0),!(_r(9556)|0)){o=9556,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Wz(9556)}return 9556}function zRe(o){return o=o|0,0}function XRe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=bM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],qz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(ZRe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function qz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function ZRe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=$Re(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,eFe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],qz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,tFe(o,k),rFe(k),I=M;return}}function $Re(o){return o=o|0,357913941}function eFe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function tFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function rFe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Wz(o){o=o|0,sFe(o)}function nFe(o){o=o|0,iFe(o+24|0)}function iFe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function sFe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,5,l,oFe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function oFe(){return 1232}function aFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=lFe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=+cFe(l,d),I=A,+u}function lFe(o){return o=o|0,(n[(bM()|0)+24>>2]|0)+(o*12|0)|0}function cFe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),+ +kf(+UZ[u&15](o))}function uFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],fFe(o,u,d,1),I=A}function fFe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=PM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=AFe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,pFe(m,A)|0,A),I=d}function PM(){var o=0,l=0;if(s[7720]|0||(Vz(9592),gr(36,9592,U|0)|0,l=7720,n[l>>2]=1,n[l+4>>2]=0),!(_r(9592)|0)){o=9592,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Vz(9592)}return 9592}function AFe(o){return o=o|0,0}function pFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=PM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Yz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(hFe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function Yz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function hFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=gFe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,dFe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Yz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,mFe(o,k),yFe(k),I=M;return}}function gFe(o){return o=o|0,357913941}function dFe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function mFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function yFe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Vz(o){o=o|0,CFe(o)}function EFe(o){o=o|0,IFe(o+24|0)}function IFe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function CFe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,7,l,wFe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function wFe(){return 1276}function BFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=vFe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=SFe(l,A)|0,I=u,l|0}function vFe(o){return o=o|0,(n[(PM()|0)+24>>2]|0)+(o*12|0)|0}function SFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+16|0,A=d,u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),sp[u&31](A,o),A=Jz(A)|0,I=d,A|0}function Jz(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=fM(Kz()|0)|0,A?(AM(l,A),pM(u,l),DFe(o,u),o=hM(l)|0):o=bFe(o)|0,I=d,o|0}function Kz(){var o=0;return s[7736]|0||(LFe(9640),gr(25,9640,U|0)|0,o=7736,n[o>>2]=1,n[o+4>>2]=0),9640}function DFe(o,l){o=o|0,l=l|0,QFe(l,o,o+8|0)|0}function bFe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Rl(8)|0,l=A,k=Kt(16)|0,n[k>>2]=n[o>>2],n[k+4>>2]=n[o+4>>2],n[k+8>>2]=n[o+8>>2],n[k+12>>2]=n[o+12>>2],m=l+4|0,n[m>>2]=k,o=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],xM(o,m,d),n[A>>2]=o,I=u,l|0}function xM(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Kt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1244,n[u+12>>2]=l,n[o+4>>2]=u}function PFe(o){o=o|0,$y(o),It(o)}function xFe(o){o=o|0,o=n[o+12>>2]|0,o|0&&It(o)}function kFe(o){o=o|0,It(o)}function QFe(o,l,u){return o=o|0,l=l|0,u=u|0,l=TFe(n[o>>2]|0,l,u)|0,u=o+4|0,n[(n[u>>2]|0)+8>>2]=l,n[(n[u>>2]|0)+8>>2]|0}function TFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;return A=I,I=I+16|0,d=A,Fl(d),o=Os(o)|0,u=RFe(o,n[l>>2]|0,+E[u>>3])|0,Nl(d),I=A,u|0}function RFe(o,l,u){o=o|0,l=l|0,u=+u;var A=0;return A=da(FFe()|0)|0,l=Yy(l)|0,ou(0,A|0,o|0,l|0,+ +Ja(u))|0}function FFe(){var o=0;return s[7728]|0||(NFe(9628),o=7728,n[o>>2]=1,n[o+4>>2]=0),9628}function NFe(o){o=o|0,Qo(o,OFe()|0,2)}function OFe(){return 1264}function LFe(o){o=o|0,Lh(o)}function MFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],UFe(o,u,d,1),I=A}function UFe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=kM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=_Fe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,HFe(m,A)|0,A),I=d}function kM(){var o=0,l=0;if(s[7744]|0||(Xz(9684),gr(37,9684,U|0)|0,l=7744,n[l>>2]=1,n[l+4>>2]=0),!(_r(9684)|0)){o=9684,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Xz(9684)}return 9684}function _Fe(o){return o=o|0,0}function HFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=kM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],zz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(jFe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function zz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function jFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=GFe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,qFe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],zz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,WFe(o,k),YFe(k),I=M;return}}function GFe(o){return o=o|0,357913941}function qFe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function WFe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function YFe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function Xz(o){o=o|0,KFe(o)}function VFe(o){o=o|0,JFe(o+24|0)}function JFe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function KFe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,5,l,zFe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function zFe(){return 1280}function XFe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=ZFe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=$Fe(l,d,u)|0,I=A,u|0}function ZFe(o){return o=o|0,(n[(kM()|0)+24>>2]|0)+(o*12|0)|0}function $Fe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return B=I,I=I+32|0,d=B,m=B+16|0,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),tp(m,u),m=rp(m,u)|0,F2[A&15](d,o,m),m=Jz(d)|0,I=B,m|0}function eNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],tNe(o,u,d,1),I=A}function tNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=QM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=rNe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,nNe(m,A)|0,A),I=d}function QM(){var o=0,l=0;if(s[7752]|0||($z(9720),gr(38,9720,U|0)|0,l=7752,n[l>>2]=1,n[l+4>>2]=0),!(_r(9720)|0)){o=9720,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));$z(9720)}return 9720}function rNe(o){return o=o|0,0}function nNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=QM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Zz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(iNe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function Zz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function iNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=sNe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,oNe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Zz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,aNe(o,k),lNe(k),I=M;return}}function sNe(o){return o=o|0,357913941}function oNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function aNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function lNe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function $z(o){o=o|0,fNe(o)}function cNe(o){o=o|0,uNe(o+24|0)}function uNe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function fNe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,8,l,ANe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function ANe(){return 1288}function pNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=hNe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=gNe(l,A)|0,I=u,l|0}function hNe(o){return o=o|0,(n[(QM()|0)+24>>2]|0)+(o*12|0)|0}function gNe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),sd(gd[u&31](o)|0)|0}function dNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],mNe(o,u,d,0),I=A}function mNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=TM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=yNe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,ENe(m,A)|0,A),I=d}function TM(){var o=0,l=0;if(s[7760]|0||(tX(9756),gr(39,9756,U|0)|0,l=7760,n[l>>2]=1,n[l+4>>2]=0),!(_r(9756)|0)){o=9756,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));tX(9756)}return 9756}function yNe(o){return o=o|0,0}function ENe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=TM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],eX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(INe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function eX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function INe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=CNe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,wNe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],eX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,BNe(o,k),vNe(k),I=M;return}}function CNe(o){return o=o|0,357913941}function wNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function BNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function vNe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function tX(o){o=o|0,bNe(o)}function SNe(o){o=o|0,DNe(o+24|0)}function DNe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function bNe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,8,l,PNe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function PNe(){return 1292}function xNe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=kNe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],QNe(l,d,u),I=A}function kNe(o){return o=o|0,(n[(TM()|0)+24>>2]|0)+(o*12|0)|0}function QNe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),Qf(d,u),u=+Tf(d,u),OZ[A&31](o,u),I=m}function TNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],RNe(o,u,d,0),I=A}function RNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=RM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=FNe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,NNe(m,A)|0,A),I=d}function RM(){var o=0,l=0;if(s[7768]|0||(nX(9792),gr(40,9792,U|0)|0,l=7768,n[l>>2]=1,n[l+4>>2]=0),!(_r(9792)|0)){o=9792,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));nX(9792)}return 9792}function FNe(o){return o=o|0,0}function NNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=RM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],rX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(ONe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function rX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function ONe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=LNe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,MNe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],rX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,UNe(o,k),_Ne(k),I=M;return}}function LNe(o){return o=o|0,357913941}function MNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function UNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _Ne(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function nX(o){o=o|0,GNe(o)}function HNe(o){o=o|0,jNe(o+24|0)}function jNe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function GNe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,1,l,qNe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function qNe(){return 1300}function WNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=YNe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],VNe(l,m,u,A),I=d}function YNe(o){return o=o|0,(n[(RM()|0)+24>>2]|0)+(o*12|0)|0}function VNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),tp(m,u),m=rp(m,u)|0,Qf(B,A),A=+Tf(B,A),qZ[d&15](o,m,A),I=k}function JNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],KNe(o,u,d,0),I=A}function KNe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=FM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=zNe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,XNe(m,A)|0,A),I=d}function FM(){var o=0,l=0;if(s[7776]|0||(sX(9828),gr(41,9828,U|0)|0,l=7776,n[l>>2]=1,n[l+4>>2]=0),!(_r(9828)|0)){o=9828,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));sX(9828)}return 9828}function zNe(o){return o=o|0,0}function XNe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=FM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],iX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(ZNe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function iX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function ZNe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=$Ne(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,eOe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],iX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,tOe(o,k),rOe(k),I=M;return}}function $Ne(o){return o=o|0,357913941}function eOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function tOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function rOe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function sX(o){o=o|0,sOe(o)}function nOe(o){o=o|0,iOe(o+24|0)}function iOe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function sOe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,7,l,oOe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function oOe(){return 1312}function aOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=lOe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],cOe(l,d,u),I=A}function lOe(o){return o=o|0,(n[(FM()|0)+24>>2]|0)+(o*12|0)|0}function cOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),tp(d,u),d=rp(d,u)|0,sp[A&31](o,d),I=m}function uOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],fOe(o,u,d,0),I=A}function fOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=NM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=AOe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,pOe(m,A)|0,A),I=d}function NM(){var o=0,l=0;if(s[7784]|0||(aX(9864),gr(42,9864,U|0)|0,l=7784,n[l>>2]=1,n[l+4>>2]=0),!(_r(9864)|0)){o=9864,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));aX(9864)}return 9864}function AOe(o){return o=o|0,0}function pOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=NM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],oX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(hOe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function oX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function hOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=gOe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,dOe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],oX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,mOe(o,k),yOe(k),I=M;return}}function gOe(o){return o=o|0,357913941}function dOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function mOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function yOe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function aX(o){o=o|0,COe(o)}function EOe(o){o=o|0,IOe(o+24|0)}function IOe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function COe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,8,l,wOe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function wOe(){return 1320}function BOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=vOe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],SOe(l,d,u),I=A}function vOe(o){return o=o|0,(n[(NM()|0)+24>>2]|0)+(o*12|0)|0}function SOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),DOe(d,u),d=bOe(d,u)|0,sp[A&31](o,d),I=m}function DOe(o,l){o=o|0,l=l|0}function bOe(o,l){return o=o|0,l=l|0,POe(l)|0}function POe(o){return o=o|0,o|0}function xOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],kOe(o,u,d,0),I=A}function kOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=OM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=QOe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,TOe(m,A)|0,A),I=d}function OM(){var o=0,l=0;if(s[7792]|0||(cX(9900),gr(43,9900,U|0)|0,l=7792,n[l>>2]=1,n[l+4>>2]=0),!(_r(9900)|0)){o=9900,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));cX(9900)}return 9900}function QOe(o){return o=o|0,0}function TOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=OM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],lX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(ROe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function lX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function ROe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=FOe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,NOe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],lX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,OOe(o,k),LOe(k),I=M;return}}function FOe(o){return o=o|0,357913941}function NOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function OOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function LOe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function cX(o){o=o|0,_Oe(o)}function MOe(o){o=o|0,UOe(o+24|0)}function UOe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function _Oe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,22,l,HOe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function HOe(){return 1344}function jOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;u=I,I=I+16|0,A=u+8|0,d=u,m=GOe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],qOe(l,A),I=u}function GOe(o){return o=o|0,(n[(OM()|0)+24>>2]|0)+(o*12|0)|0}function qOe(o,l){o=o|0,l=l|0;var u=0;u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),ip[u&127](o)}function WOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=LM()|0,o=YOe(u)|0,vn(m,l,d,o,VOe(u,A)|0,A)}function LM(){var o=0,l=0;if(s[7800]|0||(fX(9936),gr(44,9936,U|0)|0,l=7800,n[l>>2]=1,n[l+4>>2]=0),!(_r(9936)|0)){o=9936,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));fX(9936)}return 9936}function YOe(o){return o=o|0,o|0}function VOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=LM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(uX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(JOe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function uX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function JOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=KOe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,zOe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,uX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,XOe(o,d),ZOe(d),I=k;return}}function KOe(o){return o=o|0,536870911}function zOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function XOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ZOe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function fX(o){o=o|0,tLe(o)}function $Oe(o){o=o|0,eLe(o+24|0)}function eLe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function tLe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,23,l,Uz()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function rLe(o,l){o=o|0,l=l|0,iLe(n[(nLe(o)|0)>>2]|0,l)}function nLe(o){return o=o|0,(n[(LM()|0)+24>>2]|0)+(o<<3)|0}function iLe(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,BM(A,l),l=vM(A,l)|0,ip[o&127](l),I=u}function sLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=MM()|0,o=oLe(u)|0,vn(m,l,d,o,aLe(u,A)|0,A)}function MM(){var o=0,l=0;if(s[7808]|0||(pX(9972),gr(45,9972,U|0)|0,l=7808,n[l>>2]=1,n[l+4>>2]=0),!(_r(9972)|0)){o=9972,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));pX(9972)}return 9972}function oLe(o){return o=o|0,o|0}function aLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=MM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(AX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(lLe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function AX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function lLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=cLe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,uLe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,AX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,fLe(o,d),ALe(d),I=k;return}}function cLe(o){return o=o|0,536870911}function uLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function fLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ALe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function pX(o){o=o|0,gLe(o)}function pLe(o){o=o|0,hLe(o+24|0)}function hLe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function gLe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,9,l,dLe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function dLe(){return 1348}function mLe(o,l){return o=o|0,l=l|0,ELe(n[(yLe(o)|0)>>2]|0,l)|0}function yLe(o){return o=o|0,(n[(MM()|0)+24>>2]|0)+(o<<3)|0}function ELe(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,hX(A,l),l=gX(A,l)|0,l=TP(gd[o&31](l)|0)|0,I=u,l|0}function hX(o,l){o=o|0,l=l|0}function gX(o,l){return o=o|0,l=l|0,ILe(l)|0}function ILe(o){return o=o|0,o|0}function CLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=UM()|0,o=wLe(u)|0,vn(m,l,d,o,BLe(u,A)|0,A)}function UM(){var o=0,l=0;if(s[7816]|0||(mX(10008),gr(46,10008,U|0)|0,l=7816,n[l>>2]=1,n[l+4>>2]=0),!(_r(10008)|0)){o=10008,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));mX(10008)}return 10008}function wLe(o){return o=o|0,o|0}function BLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=UM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(dX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(vLe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function dX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function vLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=SLe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,DLe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,dX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,bLe(o,d),PLe(d),I=k;return}}function SLe(o){return o=o|0,536870911}function DLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function bLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function PLe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function mX(o){o=o|0,QLe(o)}function xLe(o){o=o|0,kLe(o+24|0)}function kLe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function QLe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,15,l,Rz()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function TLe(o){return o=o|0,FLe(n[(RLe(o)|0)>>2]|0)|0}function RLe(o){return o=o|0,(n[(UM()|0)+24>>2]|0)+(o<<3)|0}function FLe(o){return o=o|0,TP(VP[o&7]()|0)|0}function NLe(){var o=0;return s[7832]|0||(GLe(10052),gr(25,10052,U|0)|0,o=7832,n[o>>2]=1,n[o+4>>2]=0),10052}function OLe(o,l){o=o|0,l=l|0,n[o>>2]=LLe()|0,n[o+4>>2]=MLe()|0,n[o+12>>2]=l,n[o+8>>2]=ULe()|0,n[o+32>>2]=2}function LLe(){return 11709}function MLe(){return 1188}function ULe(){return FP()|0}function _Le(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(HLe(u),It(u)):l|0&&(Oy(l),It(l))}function Hh(o,l){return o=o|0,l=l|0,l&o|0}function HLe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function FP(){var o=0;return s[7824]|0||(n[2511]=jLe()|0,n[2512]=0,o=7824,n[o>>2]=1,n[o+4>>2]=0),10044}function jLe(){return 0}function GLe(o){o=o|0,Lh(o)}function qLe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0;l=I,I=I+32|0,u=l+24|0,m=l+16|0,d=l+8|0,A=l,WLe(o,4827),YLe(o,4834,3)|0,VLe(o,3682,47)|0,n[m>>2]=9,n[m+4>>2]=0,n[u>>2]=n[m>>2],n[u+4>>2]=n[m+4>>2],JLe(o,4841,u)|0,n[d>>2]=1,n[d+4>>2]=0,n[u>>2]=n[d>>2],n[u+4>>2]=n[d+4>>2],KLe(o,4871,u)|0,n[A>>2]=10,n[A+4>>2]=0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],zLe(o,4891,u)|0,I=l}function WLe(o,l){o=o|0,l=l|0;var u=0;u=PUe()|0,n[o>>2]=u,xUe(u,l),jh(n[o>>2]|0)}function YLe(o,l,u){return o=o|0,l=l|0,u=u|0,AUe(o,Bn(l)|0,u,0),o|0}function VLe(o,l,u){return o=o|0,l=l|0,u=u|0,XMe(o,Bn(l)|0,u,0),o|0}function JLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],TMe(o,l,d),I=A,o|0}function KLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],pMe(o,l,d),I=A,o|0}function zLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],XLe(o,l,d),I=A,o|0}function XLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ZLe(o,u,d,1),I=A}function ZLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=_M()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=$Le(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,eMe(m,A)|0,A),I=d}function _M(){var o=0,l=0;if(s[7840]|0||(EX(10100),gr(48,10100,U|0)|0,l=7840,n[l>>2]=1,n[l+4>>2]=0),!(_r(10100)|0)){o=10100,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));EX(10100)}return 10100}function $Le(o){return o=o|0,0}function eMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=_M()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],yX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(tMe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function yX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function tMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=rMe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,nMe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],yX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,iMe(o,k),sMe(k),I=M;return}}function rMe(o){return o=o|0,357913941}function nMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function iMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function sMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function EX(o){o=o|0,lMe(o)}function oMe(o){o=o|0,aMe(o+24|0)}function aMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function lMe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,6,l,cMe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function cMe(){return 1364}function uMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=fMe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=AMe(l,d,u)|0,I=A,u|0}function fMe(o){return o=o|0,(n[(_M()|0)+24>>2]|0)+(o*12|0)|0}function AMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),tp(d,u),d=rp(d,u)|0,d=Dz(gU[A&15](o,d)|0)|0,I=m,d|0}function pMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],hMe(o,u,d,0),I=A}function hMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=HM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=gMe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,dMe(m,A)|0,A),I=d}function HM(){var o=0,l=0;if(s[7848]|0||(CX(10136),gr(49,10136,U|0)|0,l=7848,n[l>>2]=1,n[l+4>>2]=0),!(_r(10136)|0)){o=10136,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));CX(10136)}return 10136}function gMe(o){return o=o|0,0}function dMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=HM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],IX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(mMe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function IX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function mMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=yMe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,EMe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],IX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,IMe(o,k),CMe(k),I=M;return}}function yMe(o){return o=o|0,357913941}function EMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function IMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function CMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function CX(o){o=o|0,vMe(o)}function wMe(o){o=o|0,BMe(o+24|0)}function BMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function vMe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,9,l,SMe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function SMe(){return 1372}function DMe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=bMe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],PMe(l,d,u),I=A}function bMe(o){return o=o|0,(n[(HM()|0)+24>>2]|0)+(o*12|0)|0}function PMe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=$e;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),xMe(d,u),B=y(kMe(d,u)),NZ[A&1](o,B),I=m}function xMe(o,l){o=o|0,l=+l}function kMe(o,l){return o=o|0,l=+l,y(QMe(l))}function QMe(o){return o=+o,y(o)}function TMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],RMe(o,u,d,0),I=A}function RMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,M=0,L=0;d=I,I=I+32|0,m=d+16|0,L=d+8|0,k=d,M=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=jM()|0,n[L>>2]=M,n[L+4>>2]=T,n[m>>2]=n[L>>2],n[m+4>>2]=n[L+4>>2],u=FMe(m)|0,n[k>>2]=M,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,NMe(m,A)|0,A),I=d}function jM(){var o=0,l=0;if(s[7856]|0||(BX(10172),gr(50,10172,U|0)|0,l=7856,n[l>>2]=1,n[l+4>>2]=0),!(_r(10172)|0)){o=10172,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));BX(10172)}return 10172}function FMe(o){return o=o|0,0}function NMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0;return L=I,I=I+32|0,d=L+24|0,B=L+16|0,k=L,T=L+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,q=jM()|0,M=q+24|0,o=yr(l,4)|0,n[T>>2]=o,l=q+28|0,u=n[l>>2]|0,u>>>0<(n[q+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],wX(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(OMe(M,k,T),o=n[l>>2]|0),I=L,((o-(n[M>>2]|0)|0)/12|0)+-1|0}function wX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function OMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;if(M=I,I=I+48|0,A=M+32|0,B=M+24|0,k=M,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=LMe(o)|0,m>>>0<d>>>0)an(o);else{L=n[o>>2]|0,ae=((n[o+8>>2]|0)-L|0)/12|0,q=ae<<1,MMe(k,ae>>>0<m>>>1>>>0?q>>>0<d>>>0?d:q:m,((n[T>>2]|0)-L|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],wX(m,A,u),n[T>>2]=(n[T>>2]|0)+12,UMe(o,k),_Me(k),I=M;return}}function LMe(o){return o=o|0,357913941}function MMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Kt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function UMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _Me(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&It(o)}function BX(o){o=o|0,GMe(o)}function HMe(o){o=o|0,jMe(o+24|0)}function jMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),It(u))}function GMe(o){o=o|0;var l=0;l=tn()|0,rn(o,2,3,l,qMe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function qMe(){return 1380}function WMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=YMe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],VMe(l,m,u,A),I=d}function YMe(o){return o=o|0,(n[(jM()|0)+24>>2]|0)+(o*12|0)|0}function VMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),tp(m,u),m=rp(m,u)|0,JMe(B,A),B=KMe(B,A)|0,F2[d&15](o,m,B),I=k}function JMe(o,l){o=o|0,l=l|0}function KMe(o,l){return o=o|0,l=l|0,zMe(l)|0}function zMe(o){return o=o|0,(o|0)!=0|0}function XMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=GM()|0,o=ZMe(u)|0,vn(m,l,d,o,$Me(u,A)|0,A)}function GM(){var o=0,l=0;if(s[7864]|0||(SX(10208),gr(51,10208,U|0)|0,l=7864,n[l>>2]=1,n[l+4>>2]=0),!(_r(10208)|0)){o=10208,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));SX(10208)}return 10208}function ZMe(o){return o=o|0,o|0}function $Me(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=GM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(vX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(eUe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function vX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function eUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=tUe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,rUe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,vX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,nUe(o,d),iUe(d),I=k;return}}function tUe(o){return o=o|0,536870911}function rUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function nUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function iUe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function SX(o){o=o|0,aUe(o)}function sUe(o){o=o|0,oUe(o+24|0)}function oUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function aUe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,24,l,lUe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function lUe(){return 1392}function cUe(o,l){o=o|0,l=l|0,fUe(n[(uUe(o)|0)>>2]|0,l)}function uUe(o){return o=o|0,(n[(GM()|0)+24>>2]|0)+(o<<3)|0}function fUe(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,hX(A,l),l=gX(A,l)|0,ip[o&127](l),I=u}function AUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=qM()|0,o=pUe(u)|0,vn(m,l,d,o,hUe(u,A)|0,A)}function qM(){var o=0,l=0;if(s[7872]|0||(bX(10244),gr(52,10244,U|0)|0,l=7872,n[l>>2]=1,n[l+4>>2]=0),!(_r(10244)|0)){o=10244,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));bX(10244)}return 10244}function pUe(o){return o=o|0,o|0}function hUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=qM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(DX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(gUe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function DX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function gUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=dUe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,mUe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,DX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,yUe(o,d),EUe(d),I=k;return}}function dUe(o){return o=o|0,536870911}function mUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function yUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function EUe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function bX(o){o=o|0,wUe(o)}function IUe(o){o=o|0,CUe(o+24|0)}function CUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function wUe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,16,l,BUe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function BUe(){return 1400}function vUe(o){return o=o|0,DUe(n[(SUe(o)|0)>>2]|0)|0}function SUe(o){return o=o|0,(n[(qM()|0)+24>>2]|0)+(o<<3)|0}function DUe(o){return o=o|0,bUe(VP[o&7]()|0)|0}function bUe(o){return o=o|0,o|0}function PUe(){var o=0;return s[7880]|0||(NUe(10280),gr(25,10280,U|0)|0,o=7880,n[o>>2]=1,n[o+4>>2]=0),10280}function xUe(o,l){o=o|0,l=l|0,n[o>>2]=kUe()|0,n[o+4>>2]=QUe()|0,n[o+12>>2]=l,n[o+8>>2]=TUe()|0,n[o+32>>2]=4}function kUe(){return 11711}function QUe(){return 1356}function TUe(){return FP()|0}function RUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(FUe(u),It(u)):l|0&&(Kg(l),It(l))}function FUe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function NUe(o){o=o|0,Lh(o)}function OUe(o){o=o|0,LUe(o,4920),MUe(o)|0,UUe(o)|0}function LUe(o,l){o=o|0,l=l|0;var u=0;u=Kz()|0,n[o>>2]=u,o_e(u,l),jh(n[o>>2]|0)}function MUe(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,zUe()|0),o|0}function UUe(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,_Ue()|0),o|0}function _Ue(){var o=0;return s[7888]|0||(PX(10328),gr(53,10328,U|0)|0,o=7888,n[o>>2]=1,n[o+4>>2]=0),_r(10328)|0||PX(10328),10328}function cd(o,l){o=o|0,l=l|0,vn(o,0,l,0,0,0)}function PX(o){o=o|0,GUe(o),ud(o,10)}function HUe(o){o=o|0,jUe(o+24|0)}function jUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function GUe(o){o=o|0;var l=0;l=tn()|0,rn(o,5,1,l,VUe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function qUe(o,l,u){o=o|0,l=l|0,u=+u,WUe(o,l,u)}function ud(o,l){o=o|0,l=l|0,n[o+20>>2]=l}function WUe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,m=A+8|0,k=A+13|0,d=A,B=A+12|0,tp(k,l),n[m>>2]=rp(k,l)|0,Qf(B,u),E[d>>3]=+Tf(B,u),YUe(o,m,d),I=A}function YUe(o,l,u){o=o|0,l=l|0,u=u|0,Tl(o+8|0,n[l>>2]|0,+E[u>>3]),s[o+24>>0]=1}function VUe(){return 1404}function JUe(o,l){return o=o|0,l=+l,KUe(o,l)|0}function KUe(o,l){o=o|0,l=+l;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+16|0,m=A+4|0,B=A+8|0,k=A,d=Rl(8)|0,u=d,T=Kt(16)|0,tp(m,o),o=rp(m,o)|0,Qf(B,l),Tl(T,o,+Tf(B,l)),B=u+4|0,n[B>>2]=T,o=Kt(8)|0,B=n[B>>2]|0,n[k>>2]=0,n[m>>2]=n[k>>2],xM(o,B,m),n[d>>2]=o,I=A,u|0}function zUe(){var o=0;return s[7896]|0||(xX(10364),gr(54,10364,U|0)|0,o=7896,n[o>>2]=1,n[o+4>>2]=0),_r(10364)|0||xX(10364),10364}function xX(o){o=o|0,$Ue(o),ud(o,55)}function XUe(o){o=o|0,ZUe(o+24|0)}function ZUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function $Ue(o){o=o|0;var l=0;l=tn()|0,rn(o,5,4,l,n_e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function e_e(o){o=o|0,t_e(o)}function t_e(o){o=o|0,r_e(o)}function r_e(o){o=o|0,kX(o+8|0),s[o+24>>0]=1}function kX(o){o=o|0,n[o>>2]=0,E[o+8>>3]=0}function n_e(){return 1424}function i_e(){return s_e()|0}function s_e(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Rl(8)|0,o=u,A=Kt(16)|0,kX(A),m=o+4|0,n[m>>2]=A,A=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],xM(A,m,d),n[u>>2]=A,I=l,o|0}function o_e(o,l){o=o|0,l=l|0,n[o>>2]=a_e()|0,n[o+4>>2]=l_e()|0,n[o+12>>2]=l,n[o+8>>2]=c_e()|0,n[o+32>>2]=5}function a_e(){return 11710}function l_e(){return 1416}function c_e(){return NP()|0}function u_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(f_e(u),It(u)):l|0&&It(l)}function f_e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function NP(){var o=0;return s[7904]|0||(n[2600]=A_e()|0,n[2601]=0,o=7904,n[o>>2]=1,n[o+4>>2]=0),10400}function A_e(){return n[357]|0}function p_e(o){o=o|0,h_e(o,4926),g_e(o)|0}function h_e(o,l){o=o|0,l=l|0;var u=0;u=yz()|0,n[o>>2]=u,D_e(u,l),jh(n[o>>2]|0)}function g_e(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,d_e()|0),o|0}function d_e(){var o=0;return s[7912]|0||(QX(10412),gr(56,10412,U|0)|0,o=7912,n[o>>2]=1,n[o+4>>2]=0),_r(10412)|0||QX(10412),10412}function QX(o){o=o|0,E_e(o),ud(o,57)}function m_e(o){o=o|0,y_e(o+24|0)}function y_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function E_e(o){o=o|0;var l=0;l=tn()|0,rn(o,5,5,l,B_e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function I_e(o){o=o|0,C_e(o)}function C_e(o){o=o|0,w_e(o)}function w_e(o){o=o|0;var l=0,u=0;l=o+8|0,u=l+48|0;do n[l>>2]=0,l=l+4|0;while((l|0)<(u|0));s[o+56>>0]=1}function B_e(){return 1432}function v_e(){return S_e()|0}function S_e(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0,k=0;B=I,I=I+16|0,o=B+4|0,l=B,u=Rl(8)|0,A=u,d=Kt(48)|0,m=d,k=m+48|0;do n[m>>2]=0,m=m+4|0;while((m|0)<(k|0));return m=A+4|0,n[m>>2]=d,k=Kt(8)|0,m=n[m>>2]|0,n[l>>2]=0,n[o>>2]=n[l>>2],Ez(k,m,o),n[u>>2]=k,I=B,A|0}function D_e(o,l){o=o|0,l=l|0,n[o>>2]=b_e()|0,n[o+4>>2]=P_e()|0,n[o+12>>2]=l,n[o+8>>2]=x_e()|0,n[o+32>>2]=6}function b_e(){return 11704}function P_e(){return 1436}function x_e(){return NP()|0}function k_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(Q_e(u),It(u)):l|0&&It(l)}function Q_e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function T_e(o){o=o|0,R_e(o,4933),F_e(o)|0,N_e(o)|0}function R_e(o,l){o=o|0,l=l|0;var u=0;u=s4e()|0,n[o>>2]=u,o4e(u,l),jh(n[o>>2]|0)}function F_e(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,K_e()|0),o|0}function N_e(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,O_e()|0),o|0}function O_e(){var o=0;return s[7920]|0||(TX(10452),gr(58,10452,U|0)|0,o=7920,n[o>>2]=1,n[o+4>>2]=0),_r(10452)|0||TX(10452),10452}function TX(o){o=o|0,U_e(o),ud(o,1)}function L_e(o){o=o|0,M_e(o+24|0)}function M_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function U_e(o){o=o|0;var l=0;l=tn()|0,rn(o,5,1,l,G_e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function __e(o,l,u){o=o|0,l=+l,u=+u,H_e(o,l,u)}function H_e(o,l,u){o=o|0,l=+l,u=+u;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,m=A+8|0,k=A+17|0,d=A,B=A+16|0,Qf(k,l),E[m>>3]=+Tf(k,l),Qf(B,u),E[d>>3]=+Tf(B,u),j_e(o,m,d),I=A}function j_e(o,l,u){o=o|0,l=l|0,u=u|0,RX(o+8|0,+E[l>>3],+E[u>>3]),s[o+24>>0]=1}function RX(o,l,u){o=o|0,l=+l,u=+u,E[o>>3]=l,E[o+8>>3]=u}function G_e(){return 1472}function q_e(o,l){return o=+o,l=+l,W_e(o,l)|0}function W_e(o,l){o=+o,l=+l;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+16|0,B=A+4|0,k=A+8|0,T=A,d=Rl(8)|0,u=d,m=Kt(16)|0,Qf(B,o),o=+Tf(B,o),Qf(k,l),RX(m,o,+Tf(k,l)),k=u+4|0,n[k>>2]=m,m=Kt(8)|0,k=n[k>>2]|0,n[T>>2]=0,n[B>>2]=n[T>>2],FX(m,k,B),n[d>>2]=m,I=A,u|0}function FX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Kt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1452,n[u+12>>2]=l,n[o+4>>2]=u}function Y_e(o){o=o|0,$y(o),It(o)}function V_e(o){o=o|0,o=n[o+12>>2]|0,o|0&&It(o)}function J_e(o){o=o|0,It(o)}function K_e(){var o=0;return s[7928]|0||(NX(10488),gr(59,10488,U|0)|0,o=7928,n[o>>2]=1,n[o+4>>2]=0),_r(10488)|0||NX(10488),10488}function NX(o){o=o|0,Z_e(o),ud(o,60)}function z_e(o){o=o|0,X_e(o+24|0)}function X_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function Z_e(o){o=o|0;var l=0;l=tn()|0,rn(o,5,6,l,r4e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function $_e(o){o=o|0,e4e(o)}function e4e(o){o=o|0,t4e(o)}function t4e(o){o=o|0,OX(o+8|0),s[o+24>>0]=1}function OX(o){o=o|0,n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,n[o+12>>2]=0}function r4e(){return 1492}function n4e(){return i4e()|0}function i4e(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Rl(8)|0,o=u,A=Kt(16)|0,OX(A),m=o+4|0,n[m>>2]=A,A=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],FX(A,m,d),n[u>>2]=A,I=l,o|0}function s4e(){var o=0;return s[7936]|0||(A4e(10524),gr(25,10524,U|0)|0,o=7936,n[o>>2]=1,n[o+4>>2]=0),10524}function o4e(o,l){o=o|0,l=l|0,n[o>>2]=a4e()|0,n[o+4>>2]=l4e()|0,n[o+12>>2]=l,n[o+8>>2]=c4e()|0,n[o+32>>2]=7}function a4e(){return 11700}function l4e(){return 1484}function c4e(){return NP()|0}function u4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(f4e(u),It(u)):l|0&&It(l)}function f4e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function A4e(o){o=o|0,Lh(o)}function p4e(o,l,u){o=o|0,l=l|0,u=u|0,o=Bn(l)|0,l=h4e(u)|0,u=g4e(u,0)|0,W4e(o,l,u,WM()|0,0)}function h4e(o){return o=o|0,o|0}function g4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=WM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(MX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(w4e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function WM(){var o=0,l=0;if(s[7944]|0||(LX(10568),gr(61,10568,U|0)|0,l=7944,n[l>>2]=1,n[l+4>>2]=0),!(_r(10568)|0)){o=10568,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));LX(10568)}return 10568}function LX(o){o=o|0,y4e(o)}function d4e(o){o=o|0,m4e(o+24|0)}function m4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function y4e(o){o=o|0;var l=0;l=tn()|0,rn(o,1,17,l,Oz()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function E4e(o){return o=o|0,C4e(n[(I4e(o)|0)>>2]|0)|0}function I4e(o){return o=o|0,(n[(WM()|0)+24>>2]|0)+(o<<3)|0}function C4e(o){return o=o|0,RP(VP[o&7]()|0)|0}function MX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function w4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=B4e(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,v4e(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,MX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,S4e(o,d),D4e(d),I=k;return}}function B4e(o){return o=o|0,536870911}function v4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function S4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function D4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function b4e(){P4e()}function P4e(){x4e(10604)}function x4e(o){o=o|0,k4e(o,4955)}function k4e(o,l){o=o|0,l=l|0;var u=0;u=Q4e()|0,n[o>>2]=u,T4e(u,l),jh(n[o>>2]|0)}function Q4e(){var o=0;return s[7952]|0||(H4e(10612),gr(25,10612,U|0)|0,o=7952,n[o>>2]=1,n[o+4>>2]=0),10612}function T4e(o,l){o=o|0,l=l|0,n[o>>2]=O4e()|0,n[o+4>>2]=L4e()|0,n[o+12>>2]=l,n[o+8>>2]=M4e()|0,n[o+32>>2]=8}function jh(o){o=o|0;var l=0,u=0;l=I,I=I+16|0,u=l,Jy()|0,n[u>>2]=o,R4e(10608,u),I=l}function Jy(){return s[11714]|0||(n[2652]=0,gr(62,10608,U|0)|0,s[11714]=1),10608}function R4e(o,l){o=o|0,l=l|0;var u=0;u=Kt(8)|0,n[u+4>>2]=n[l>>2],n[u>>2]=n[o>>2],n[o>>2]=u}function F4e(o){o=o|0,N4e(o)}function N4e(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,It(u);while(l|0);n[o>>2]=0}function O4e(){return 11715}function L4e(){return 1496}function M4e(){return FP()|0}function U4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(_4e(u),It(u)):l|0&&It(l)}function _4e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function H4e(o){o=o|0,Lh(o)}function j4e(o,l){o=o|0,l=l|0;var u=0,A=0;Jy()|0,u=n[2652]|0;e:do if(u|0){for(;A=n[u+4>>2]|0,!(A|0&&!(EZ(YM(A)|0,o)|0));)if(u=n[u>>2]|0,!u)break e;G4e(A,l)}while(!1)}function YM(o){return o=o|0,n[o+12>>2]|0}function G4e(o,l){o=o|0,l=l|0;var u=0;o=o+36|0,u=n[o>>2]|0,u|0&&(Sf(u),It(u)),u=Kt(4)|0,DP(u,l),n[o>>2]=u}function VM(){return s[11716]|0||(n[2664]=0,gr(63,10656,U|0)|0,s[11716]=1),10656}function UX(){var o=0;return s[11717]|0?o=n[2665]|0:(q4e(),n[2665]=1504,s[11717]=1,o=1504),o|0}function q4e(){s[11740]|0||(s[11718]=yr(yr(8,0)|0,0)|0,s[11719]=yr(yr(0,0)|0,0)|0,s[11720]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0?(n[m>>2]=n[Qe>>2],n[Ye>>2]=(n[Ye>>2]|0)+4):KM(Le,Qe),A;)d=d+4|0;A=k2(k)|0,n[Qe>>2]=0,n[M>>2]=0,n[L>>2]=0;e:do if(n[A>>2]|0)for(d=0,m=0;;){if((d|0)==(m|0)?J4e(Qe,A):(n[d>>2]=n[A>>2],n[M>>2]=(n[M>>2]|0)+4),A=A+4|0,!(n[A>>2]|0))break e;d=n[M>>2]|0,m=n[q>>2]|0}while(!1);n[tt>>2]=OP(B)|0,n[Ze>>2]=_r(k)|0,K4e(u,o,tt,Ze,Le,Qe),zM(Qe),np(Le)}l=n[l>>2]|0}while(l|0)}I=ct}function JM(o){return o=o|0,n[o+12>>2]|0}function P2(o){return o=o|0,n[o+12>>2]|0}function x2(o){return o=o|0,n[o+16>>2]|0}function V4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+32|0,u=d,A=n[o>>2]|0,(n[o+8>>2]|0)-A>>2>>>0<l>>>0&&(KX(u,l,(n[o+4>>2]|0)-A>>2,o+8|0),zX(o,u),XX(u)),I=d}function KM(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0;if(B=I,I=I+32|0,u=B,A=o+4|0,d=((n[A>>2]|0)-(n[o>>2]|0)>>2)+1|0,m=JX(o)|0,m>>>0<d>>>0)an(o);else{k=n[o>>2]|0,M=(n[o+8>>2]|0)-k|0,T=M>>1,KX(u,M>>2>>>0<m>>>1>>>0?T>>>0<d>>>0?d:T:m,(n[A>>2]|0)-k>>2,o+8|0),m=u+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,zX(o,u),XX(u),I=B;return}}function k2(o){return o=o|0,n[o+8>>2]|0}function J4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0;if(B=I,I=I+32|0,u=B,A=o+4|0,d=((n[A>>2]|0)-(n[o>>2]|0)>>2)+1|0,m=VX(o)|0,m>>>0<d>>>0)an(o);else{k=n[o>>2]|0,M=(n[o+8>>2]|0)-k|0,T=M>>1,h3e(u,M>>2>>>0<m>>>1>>>0?T>>>0<d>>>0?d:T:m,(n[A>>2]|0)-k>>2,o+8|0),m=u+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,g3e(o,u),d3e(u),I=B;return}}function OP(o){return o=o|0,n[o>>2]|0}function K4e(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,z4e(o,l,u,A,d,m)}function zM(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),It(u))}function np(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),It(u))}function z4e(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,M=0,L=0,q=0;B=I,I=I+48|0,L=B+40|0,k=B+32|0,q=B+24|0,T=B+12|0,M=B,Fl(k),o=Os(o)|0,n[q>>2]=n[l>>2],u=n[u>>2]|0,A=n[A>>2]|0,XM(T,d),X4e(M,m),n[L>>2]=n[q>>2],Z4e(o,L,u,A,T,M),zM(M),np(T),Nl(k),I=B}function XM(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(A3e(o,A),p3e(o,n[l>>2]|0,n[u>>2]|0,A))}function X4e(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(u3e(o,A),f3e(o,n[l>>2]|0,n[u>>2]|0,A))}function Z4e(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,M=0,L=0,q=0;B=I,I=I+32|0,L=B+28|0,q=B+24|0,k=B+12|0,T=B,M=da($4e()|0)|0,n[q>>2]=n[l>>2],n[L>>2]=n[q>>2],l=fd(L)|0,u=jX(u)|0,A=ZM(A)|0,n[k>>2]=n[d>>2],L=d+4|0,n[k+4>>2]=n[L>>2],q=d+8|0,n[k+8>>2]=n[q>>2],n[q>>2]=0,n[L>>2]=0,n[d>>2]=0,d=$M(k)|0,n[T>>2]=n[m>>2],L=m+4|0,n[T+4>>2]=n[L>>2],q=m+8|0,n[T+8>>2]=n[q>>2],n[q>>2]=0,n[L>>2]=0,n[m>>2]=0,lu(0,M|0,o|0,l|0,u|0,A|0,d|0,e3e(T)|0)|0,zM(T),np(k),I=B}function $4e(){var o=0;return s[7968]|0||(l3e(10708),o=7968,n[o>>2]=1,n[o+4>>2]=0),10708}function fd(o){return o=o|0,qX(o)|0}function jX(o){return o=o|0,GX(o)|0}function ZM(o){return o=o|0,RP(o)|0}function $M(o){return o=o|0,r3e(o)|0}function e3e(o){return o=o|0,t3e(o)|0}function t3e(o){o=o|0;var l=0,u=0,A=0;if(A=(n[o+4>>2]|0)-(n[o>>2]|0)|0,u=A>>2,A=Rl(A+4|0)|0,n[A>>2]=u,u|0){l=0;do n[A+4+(l<<2)>>2]=GX(n[(n[o>>2]|0)+(l<<2)>>2]|0)|0,l=l+1|0;while((l|0)!=(u|0))}return A|0}function GX(o){return o=o|0,o|0}function r3e(o){o=o|0;var l=0,u=0,A=0;if(A=(n[o+4>>2]|0)-(n[o>>2]|0)|0,u=A>>2,A=Rl(A+4|0)|0,n[A>>2]=u,u|0){l=0;do n[A+4+(l<<2)>>2]=qX((n[o>>2]|0)+(l<<2)|0)|0,l=l+1|0;while((l|0)!=(u|0))}return A|0}function qX(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=fM(WX()|0)|0,A?(AM(l,A),pM(u,l),Mje(o,u),o=hM(l)|0):o=n3e(o)|0,I=d,o|0}function WX(){var o=0;return s[7960]|0||(a3e(10664),gr(25,10664,U|0)|0,o=7960,n[o>>2]=1,n[o+4>>2]=0),10664}function n3e(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Rl(8)|0,l=A,k=Kt(4)|0,n[k>>2]=n[o>>2],m=l+4|0,n[m>>2]=k,o=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],YX(o,m,d),n[A>>2]=o,I=u,l|0}function YX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Kt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1656,n[u+12>>2]=l,n[o+4>>2]=u}function i3e(o){o=o|0,$y(o),It(o)}function s3e(o){o=o|0,o=n[o+12>>2]|0,o|0&&It(o)}function o3e(o){o=o|0,It(o)}function a3e(o){o=o|0,Lh(o)}function l3e(o){o=o|0,Qo(o,c3e()|0,5)}function c3e(){return 1676}function u3e(o,l){o=o|0,l=l|0;var u=0;if((VX(o)|0)>>>0<l>>>0&&an(o),l>>>0>1073741823)Nt();else{u=Kt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function f3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function VX(o){return o=o|0,1073741823}function A3e(o,l){o=o|0,l=l|0;var u=0;if((JX(o)|0)>>>0<l>>>0&&an(o),l>>>0>1073741823)Nt();else{u=Kt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function p3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function JX(o){return o=o|0,1073741823}function h3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Kt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function g3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function d3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&It(o)}function KX(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Kt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function zX(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|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[L>>2]=0,n[o>>2]=0,n[l>>2]=0;do bu(Ye,n[(Ky(n[B+4>>2]|0)|0)>>2]|0),k=n[o>>2]|0,k>>>0<(n[u>>2]|0)>>>0?(n[k>>2]=n[Ye>>2],n[o>>2]=(n[o>>2]|0)+4):KM(L,Ye),B=n[B>>2]|0;while(B|0);w3e(A,q,L),np(L)}n[Le>>2]=n[q>>2],M=$X(T)|0,n[L>>2]=n[Le>>2],HX(L,M,d),Cz(ae),m=n[m>>2]|0}while(m|0)}I=Qe}function y3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,F3e(o,l,u,A)}function E3e(o,l,u){o=o|0,l=l|0,u=u|0,R3e(o,l,u)}function Ky(o){return o=o|0,o|0}function I3e(o,l,u){o=o|0,l=l|0,u=u|0,x3e(o,l,u)}function ZX(o){return o=o|0,o+16|0}function C3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;if(m=I,I=I+16|0,d=m+8|0,u=m,n[o>>2]=0,A=n[l>>2]|0,n[d>>2]=A,n[u>>2]=o,u=P3e(u)|0,A|0){if(A=Kt(12)|0,B=(eZ(d)|0)+4|0,o=n[B+4>>2]|0,l=A+4|0,n[l>>2]=n[B>>2],n[l+4>>2]=o,l=n[n[d>>2]>>2]|0,n[d>>2]=l,!l)o=A;else for(l=A;o=Kt(12)|0,T=(eZ(d)|0)+4|0,k=n[T+4>>2]|0,B=o+4|0,n[B>>2]=n[T>>2],n[B+4>>2]=k,n[l>>2]=o,B=n[n[d>>2]>>2]|0,n[d>>2]=B,B;)l=o;n[o>>2]=n[u>>2],n[u>>2]=A}I=m}function w3e(o,l,u){o=o|0,l=l|0,u=u|0,B3e(o,l,u)}function $X(o){return o=o|0,o+24|0}function B3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,B=A+24|0,d=A+16|0,k=A+12|0,m=A,Fl(d),o=Os(o)|0,n[k>>2]=n[l>>2],XM(m,u),n[B>>2]=n[k>>2],v3e(o,B,m),np(m),Nl(d),I=A}function v3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,B=A+16|0,k=A+12|0,d=A,m=da(S3e()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=fd(B)|0,n[d>>2]=n[u>>2],B=u+4|0,n[d+4>>2]=n[B>>2],k=u+8|0,n[d+8>>2]=n[k>>2],n[k>>2]=0,n[B>>2]=0,n[u>>2]=0,Ts(0,m|0,o|0,l|0,$M(d)|0)|0,np(d),I=A}function S3e(){var o=0;return s[7976]|0||(D3e(10720),o=7976,n[o>>2]=1,n[o+4>>2]=0),10720}function D3e(o){o=o|0,Qo(o,b3e()|0,2)}function b3e(){return 1732}function P3e(o){return o=o|0,n[o>>2]|0}function eZ(o){return o=o|0,n[o>>2]|0}function x3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+32|0,m=A+16|0,d=A+8|0,B=A,Fl(d),o=Os(o)|0,n[B>>2]=n[l>>2],u=n[u>>2]|0,n[m>>2]=n[B>>2],tZ(o,m,u),Nl(d),I=A}function tZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,m=A+4|0,B=A,d=da(k3e()|0)|0,n[B>>2]=n[l>>2],n[m>>2]=n[B>>2],l=fd(m)|0,Ts(0,d|0,o|0,l|0,jX(u)|0)|0,I=A}function k3e(){var o=0;return s[7984]|0||(Q3e(10732),o=7984,n[o>>2]=1,n[o+4>>2]=0),10732}function Q3e(o){o=o|0,Qo(o,T3e()|0,2)}function T3e(){return 1744}function R3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+32|0,m=A+16|0,d=A+8|0,B=A,Fl(d),o=Os(o)|0,n[B>>2]=n[l>>2],u=n[u>>2]|0,n[m>>2]=n[B>>2],tZ(o,m,u),Nl(d),I=A}function F3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+32|0,B=d+16|0,m=d+8|0,k=d,Fl(m),o=Os(o)|0,n[k>>2]=n[l>>2],u=s[u>>0]|0,A=s[A>>0]|0,n[B>>2]=n[k>>2],N3e(o,B,u,A),Nl(m),I=d}function N3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,B=d+4|0,k=d,m=da(O3e()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=fd(B)|0,u=zy(u)|0,Li(0,m|0,o|0,l|0,u|0,zy(A)|0)|0,I=d}function O3e(){var o=0;return s[7992]|0||(M3e(10744),o=7992,n[o>>2]=1,n[o+4>>2]=0),10744}function zy(o){return o=o|0,L3e(o)|0}function L3e(o){return o=o|0,o&255|0}function M3e(o){o=o|0,Qo(o,U3e()|0,3)}function U3e(){return 1756}function _3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;switch(ae=I,I=I+32|0,k=ae+8|0,T=ae+4|0,M=ae+20|0,L=ae,yM(o,0),A=Lje(l)|0,n[k>>2]=0,q=k+4|0,n[q>>2]=0,n[k+8>>2]=0,A<<24>>24){case 0:{s[M>>0]=0,H3e(T,u,M),LP(o,T)|0,Df(T);break}case 8:{q=sU(l)|0,s[M>>0]=8,bu(L,n[q+4>>2]|0),j3e(T,u,M,L,q+8|0),LP(o,T)|0,Df(T);break}case 9:{if(m=sU(l)|0,l=n[m+4>>2]|0,l|0)for(B=k+8|0,d=m+12|0;l=l+-1|0,bu(T,n[d>>2]|0),A=n[q>>2]|0,A>>>0<(n[B>>2]|0)>>>0?(n[A>>2]=n[T>>2],n[q>>2]=(n[q>>2]|0)+4):KM(k,T),l;)d=d+4|0;s[M>>0]=9,bu(L,n[m+8>>2]|0),G3e(T,u,M,L,k),LP(o,T)|0,Df(T);break}default:q=sU(l)|0,s[M>>0]=A,bu(L,n[q+4>>2]|0),q3e(T,u,M,L),LP(o,T)|0,Df(T)}np(k),I=ae}function H3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,Fl(d),l=Os(l)|0,n8e(o,l,s[u>>0]|0),Nl(d),I=A}function LP(o,l){o=o|0,l=l|0;var u=0;return u=n[o>>2]|0,u|0&&Na(u|0),n[o>>2]=n[l>>2],n[l>>2]=0,o|0}function j3e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+32|0,k=m+16|0,B=m+8|0,T=m,Fl(B),l=Os(l)|0,u=s[u>>0]|0,n[T>>2]=n[A>>2],d=n[d>>2]|0,n[k>>2]=n[T>>2],$3e(o,l,u,k,d),Nl(B),I=m}function G3e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,M=0;m=I,I=I+32|0,T=m+24|0,B=m+16|0,M=m+12|0,k=m,Fl(B),l=Os(l)|0,u=s[u>>0]|0,n[M>>2]=n[A>>2],XM(k,d),n[T>>2]=n[M>>2],K3e(o,l,u,T,k),np(k),Nl(B),I=m}function q3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+32|0,B=d+16|0,m=d+8|0,k=d,Fl(m),l=Os(l)|0,u=s[u>>0]|0,n[k>>2]=n[A>>2],n[B>>2]=n[k>>2],W3e(o,l,u,B),Nl(m),I=d}function W3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+4|0,k=d,B=da(Y3e()|0)|0,u=zy(u)|0,n[k>>2]=n[A>>2],n[m>>2]=n[k>>2],MP(o,Ts(0,B|0,l|0,u|0,fd(m)|0)|0),I=d}function Y3e(){var o=0;return s[8e3]|0||(V3e(10756),o=8e3,n[o>>2]=1,n[o+4>>2]=0),10756}function MP(o,l){o=o|0,l=l|0,yM(o,l)}function V3e(o){o=o|0,Qo(o,J3e()|0,2)}function J3e(){return 1772}function K3e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,M=0;m=I,I=I+32|0,T=m+16|0,M=m+12|0,B=m,k=da(z3e()|0)|0,u=zy(u)|0,n[M>>2]=n[A>>2],n[T>>2]=n[M>>2],A=fd(T)|0,n[B>>2]=n[d>>2],T=d+4|0,n[B+4>>2]=n[T>>2],M=d+8|0,n[B+8>>2]=n[M>>2],n[M>>2]=0,n[T>>2]=0,n[d>>2]=0,MP(o,Li(0,k|0,l|0,u|0,A|0,$M(B)|0)|0),np(B),I=m}function z3e(){var o=0;return s[8008]|0||(X3e(10768),o=8008,n[o>>2]=1,n[o+4>>2]=0),10768}function X3e(o){o=o|0,Qo(o,Z3e()|0,3)}function Z3e(){return 1784}function $3e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+16|0,k=m+4|0,T=m,B=da(e8e()|0)|0,u=zy(u)|0,n[T>>2]=n[A>>2],n[k>>2]=n[T>>2],A=fd(k)|0,MP(o,Li(0,B|0,l|0,u|0,A|0,ZM(d)|0)|0),I=m}function e8e(){var o=0;return s[8016]|0||(t8e(10780),o=8016,n[o>>2]=1,n[o+4>>2]=0),10780}function t8e(o){o=o|0,Qo(o,r8e()|0,3)}function r8e(){return 1800}function n8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=da(i8e()|0)|0,MP(o,dn(0,A|0,l|0,zy(u)|0)|0)}function i8e(){var o=0;return s[8024]|0||(s8e(10792),o=8024,n[o>>2]=1,n[o+4>>2]=0),10792}function s8e(o){o=o|0,Qo(o,o8e()|0,1)}function o8e(){return 1816}function a8e(){l8e(),c8e(),u8e()}function l8e(){n[2702]=xZ(65536)|0}function c8e(){k8e(10856)}function u8e(){f8e(10816)}function f8e(o){o=o|0,A8e(o,5044),p8e(o)|0}function A8e(o,l){o=o|0,l=l|0;var u=0;u=WX()|0,n[o>>2]=u,v8e(u,l),jh(n[o>>2]|0)}function p8e(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,h8e()|0),o|0}function h8e(){var o=0;return s[8032]|0||(rZ(10820),gr(64,10820,U|0)|0,o=8032,n[o>>2]=1,n[o+4>>2]=0),_r(10820)|0||rZ(10820),10820}function rZ(o){o=o|0,m8e(o),ud(o,25)}function g8e(o){o=o|0,d8e(o+24|0)}function d8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function m8e(o){o=o|0;var l=0;l=tn()|0,rn(o,5,18,l,C8e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function y8e(o,l){o=o|0,l=l|0,E8e(o,l)}function E8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;u=I,I=I+16|0,A=u,d=u+4|0,ad(d,l),n[A>>2]=ld(d,l)|0,I8e(o,A),I=u}function I8e(o,l){o=o|0,l=l|0,nZ(o+4|0,n[l>>2]|0),s[o+8>>0]=1}function nZ(o,l){o=o|0,l=l|0,n[o>>2]=l}function C8e(){return 1824}function w8e(o){return o=o|0,B8e(o)|0}function B8e(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Rl(8)|0,l=A,k=Kt(4)|0,ad(d,o),nZ(k,ld(d,o)|0),m=l+4|0,n[m>>2]=k,o=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],YX(o,m,d),n[A>>2]=o,I=u,l|0}function Rl(o){o=o|0;var l=0,u=0;return o=o+7&-8,o>>>0<=32768&&(l=n[2701]|0,o>>>0<=(65536-l|0)>>>0)?(u=(n[2702]|0)+l|0,n[2701]=l+o,o=u):(o=xZ(o+8|0)|0,n[o>>2]=n[2703],n[2703]=o,o=o+8|0),o|0}function v8e(o,l){o=o|0,l=l|0,n[o>>2]=S8e()|0,n[o+4>>2]=D8e()|0,n[o+12>>2]=l,n[o+8>>2]=b8e()|0,n[o+32>>2]=9}function S8e(){return 11744}function D8e(){return 1832}function b8e(){return NP()|0}function P8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(x8e(u),It(u)):l|0&&It(l)}function x8e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function k8e(o){o=o|0,Q8e(o,5052),T8e(o)|0,R8e(o,5058,26)|0,F8e(o,5069,1)|0,N8e(o,5077,10)|0,O8e(o,5087,19)|0,L8e(o,5094,27)|0}function Q8e(o,l){o=o|0,l=l|0;var u=0;u=xje()|0,n[o>>2]=u,kje(u,l),jh(n[o>>2]|0)}function T8e(o){o=o|0;var l=0;return l=n[o>>2]|0,cd(l,gje()|0),o|0}function R8e(o,l,u){return o=o|0,l=l|0,u=u|0,XHe(o,Bn(l)|0,u,0),o|0}function F8e(o,l,u){return o=o|0,l=l|0,u=u|0,OHe(o,Bn(l)|0,u,0),o|0}function N8e(o,l,u){return o=o|0,l=l|0,u=u|0,hHe(o,Bn(l)|0,u,0),o|0}function O8e(o,l,u){return o=o|0,l=l|0,u=u|0,$8e(o,Bn(l)|0,u,0),o|0}function iZ(o,l){o=o|0,l=l|0;var u=0,A=0;e:for(;;){for(u=n[2703]|0;;){if((u|0)==(l|0))break e;if(A=n[u>>2]|0,n[2703]=A,!u)u=A;else break}It(u)}n[2701]=o}function L8e(o,l,u){return o=o|0,l=l|0,u=u|0,M8e(o,Bn(l)|0,u,0),o|0}function M8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=eU()|0,o=U8e(u)|0,vn(m,l,d,o,_8e(u,A)|0,A)}function eU(){var o=0,l=0;if(s[8040]|0||(oZ(10860),gr(65,10860,U|0)|0,l=8040,n[l>>2]=1,n[l+4>>2]=0),!(_r(10860)|0)){o=10860,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));oZ(10860)}return 10860}function U8e(o){return o=o|0,o|0}function _8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=eU()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(sZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(H8e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function sZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function H8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=j8e(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,G8e(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,sZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,q8e(o,d),W8e(d),I=k;return}}function j8e(o){return o=o|0,536870911}function G8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function q8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function W8e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function oZ(o){o=o|0,J8e(o)}function Y8e(o){o=o|0,V8e(o+24|0)}function V8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function J8e(o){o=o|0;var l=0;l=tn()|0,rn(o,1,11,l,K8e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function K8e(){return 1840}function z8e(o,l,u){o=o|0,l=l|0,u=u|0,Z8e(n[(X8e(o)|0)>>2]|0,l,u)}function X8e(o){return o=o|0,(n[(eU()|0)+24>>2]|0)+(o<<3)|0}function Z8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;A=I,I=I+16|0,m=A+1|0,d=A,ad(m,l),l=ld(m,l)|0,ad(d,u),u=ld(d,u)|0,sp[o&31](l,u),I=A}function $8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=tU()|0,o=eHe(u)|0,vn(m,l,d,o,tHe(u,A)|0,A)}function tU(){var o=0,l=0;if(s[8048]|0||(lZ(10896),gr(66,10896,U|0)|0,l=8048,n[l>>2]=1,n[l+4>>2]=0),!(_r(10896)|0)){o=10896,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));lZ(10896)}return 10896}function eHe(o){return o=o|0,o|0}function tHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=tU()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(aZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(rHe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function aZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function rHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=nHe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,iHe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,aZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,sHe(o,d),oHe(d),I=k;return}}function nHe(o){return o=o|0,536870911}function iHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function sHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function oHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function lZ(o){o=o|0,cHe(o)}function aHe(o){o=o|0,lHe(o+24|0)}function lHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function cHe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,11,l,uHe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function uHe(){return 1852}function fHe(o,l){return o=o|0,l=l|0,pHe(n[(AHe(o)|0)>>2]|0,l)|0}function AHe(o){return o=o|0,(n[(tU()|0)+24>>2]|0)+(o<<3)|0}function pHe(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,ad(A,l),l=ld(A,l)|0,l=RP(gd[o&31](l)|0)|0,I=u,l|0}function hHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=rU()|0,o=gHe(u)|0,vn(m,l,d,o,dHe(u,A)|0,A)}function rU(){var o=0,l=0;if(s[8056]|0||(uZ(10932),gr(67,10932,U|0)|0,l=8056,n[l>>2]=1,n[l+4>>2]=0),!(_r(10932)|0)){o=10932,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));uZ(10932)}return 10932}function gHe(o){return o=o|0,o|0}function dHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=rU()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(cZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(mHe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function cZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function mHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=yHe(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,EHe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,cZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,IHe(o,d),CHe(d),I=k;return}}function yHe(o){return o=o|0,536870911}function EHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function IHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function CHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function uZ(o){o=o|0,vHe(o)}function wHe(o){o=o|0,BHe(o+24|0)}function BHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function vHe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,7,l,SHe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function SHe(){return 1860}function DHe(o,l,u){return o=o|0,l=l|0,u=u|0,PHe(n[(bHe(o)|0)>>2]|0,l,u)|0}function bHe(o){return o=o|0,(n[(rU()|0)+24>>2]|0)+(o<<3)|0}function PHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+32|0,B=A+12|0,m=A+8|0,k=A,T=A+16|0,d=A+4|0,xHe(T,l),kHe(k,T,l),Mh(d,u),u=Uh(d,u)|0,n[B>>2]=n[k>>2],F2[o&15](m,B,u),u=QHe(m)|0,Df(m),_h(d),I=A,u|0}function xHe(o,l){o=o|0,l=l|0}function kHe(o,l,u){o=o|0,l=l|0,u=u|0,THe(o,u)}function QHe(o){return o=o|0,Os(o)|0}function THe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+16|0,u=d,A=l,A&1?(RHe(u,0),Me(A|0,u|0)|0,FHe(o,u),NHe(u)):n[o>>2]=n[l>>2],I=d}function RHe(o,l){o=o|0,l=l|0,Su(o,l),n[o+4>>2]=0,s[o+8>>0]=0}function FHe(o,l){o=o|0,l=l|0,n[o>>2]=n[l+4>>2]}function NHe(o){o=o|0,s[o+8>>0]=0}function OHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=nU()|0,o=LHe(u)|0,vn(m,l,d,o,MHe(u,A)|0,A)}function nU(){var o=0,l=0;if(s[8064]|0||(AZ(10968),gr(68,10968,U|0)|0,l=8064,n[l>>2]=1,n[l+4>>2]=0),!(_r(10968)|0)){o=10968,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));AZ(10968)}return 10968}function LHe(o){return o=o|0,o|0}function MHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=nU()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(fZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(UHe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function fZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function UHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=_He(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,HHe(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,fZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,jHe(o,d),GHe(d),I=k;return}}function _He(o){return o=o|0,536870911}function HHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function jHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function GHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function AZ(o){o=o|0,YHe(o)}function qHe(o){o=o|0,WHe(o+24|0)}function WHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function YHe(o){o=o|0;var l=0;l=tn()|0,rn(o,1,1,l,VHe()|0,5),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function VHe(){return 1872}function JHe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,zHe(n[(KHe(o)|0)>>2]|0,l,u,A,d,m)}function KHe(o){return o=o|0,(n[(nU()|0)+24>>2]|0)+(o<<3)|0}function zHe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,M=0,L=0,q=0;B=I,I=I+32|0,k=B+16|0,T=B+12|0,M=B+8|0,L=B+4|0,q=B,Mh(k,l),l=Uh(k,l)|0,Mh(T,u),u=Uh(T,u)|0,Mh(M,A),A=Uh(M,A)|0,Mh(L,d),d=Uh(L,d)|0,Mh(q,m),m=Uh(q,m)|0,FZ[o&1](l,u,A,d,m),_h(q),_h(L),_h(M),_h(T),_h(k),I=B}function XHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=iU()|0,o=ZHe(u)|0,vn(m,l,d,o,$He(u,A)|0,A)}function iU(){var o=0,l=0;if(s[8072]|0||(hZ(11004),gr(69,11004,U|0)|0,l=8072,n[l>>2]=1,n[l+4>>2]=0),!(_r(11004)|0)){o=11004,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));hZ(11004)}return 11004}function ZHe(o){return o=o|0,o|0}function $He(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=iU()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(pZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(eje(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function pZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function eje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=tje(o)|0,A>>>0<B>>>0)an(o);else{T=n[o>>2]|0,L=(n[o+8>>2]|0)-T|0,M=L>>2,rje(d,L>>3>>>0<A>>>1>>>0?M>>>0<B>>>0?B:M:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,pZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,nje(o,d),ije(d),I=k;return}}function tje(o){return o=o|0,536870911}function rje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Kt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function nje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ije(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&It(o)}function hZ(o){o=o|0,aje(o)}function sje(o){o=o|0,oje(o+24|0)}function oje(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function aje(o){o=o|0;var l=0;l=tn()|0,rn(o,1,12,l,lje()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function lje(){return 1896}function cje(o,l,u){o=o|0,l=l|0,u=u|0,fje(n[(uje(o)|0)>>2]|0,l,u)}function uje(o){return o=o|0,(n[(iU()|0)+24>>2]|0)+(o<<3)|0}function fje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;A=I,I=I+16|0,m=A+4|0,d=A,Aje(m,l),l=pje(m,l)|0,Mh(d,u),u=Uh(d,u)|0,sp[o&31](l,u),_h(d),I=A}function Aje(o,l){o=o|0,l=l|0}function pje(o,l){return o=o|0,l=l|0,hje(l)|0}function hje(o){return o=o|0,o|0}function gje(){var o=0;return s[8080]|0||(gZ(11040),gr(70,11040,U|0)|0,o=8080,n[o>>2]=1,n[o+4>>2]=0),_r(11040)|0||gZ(11040),11040}function gZ(o){o=o|0,yje(o),ud(o,71)}function dje(o){o=o|0,mje(o+24|0)}function mje(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),It(u))}function yje(o){o=o|0;var l=0;l=tn()|0,rn(o,5,7,l,wje()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Eje(o){o=o|0,Ije(o)}function Ije(o){o=o|0,Cje(o)}function Cje(o){o=o|0,s[o+8>>0]=1}function wje(){return 1936}function Bje(){return vje()|0}function vje(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Rl(8)|0,o=u,m=o+4|0,n[m>>2]=Kt(1)|0,A=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],Sje(A,m,d),n[u>>2]=A,I=l,o|0}function Sje(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Kt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1916,n[u+12>>2]=l,n[o+4>>2]=u}function Dje(o){o=o|0,$y(o),It(o)}function bje(o){o=o|0,o=n[o+12>>2]|0,o|0&&It(o)}function Pje(o){o=o|0,It(o)}function xje(){var o=0;return s[8088]|0||(Oje(11076),gr(25,11076,U|0)|0,o=8088,n[o>>2]=1,n[o+4>>2]=0),11076}function kje(o,l){o=o|0,l=l|0,n[o>>2]=Qje()|0,n[o+4>>2]=Tje()|0,n[o+12>>2]=l,n[o+8>>2]=Rje()|0,n[o+32>>2]=10}function Qje(){return 11745}function Tje(){return 1940}function Rje(){return FP()|0}function Fje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(Hh(A,896)|0)==512?u|0&&(Nje(u),It(u)):l|0&&It(l)}function Nje(o){o=o|0,o=n[o+4>>2]|0,o|0&&Gh(o)}function Oje(o){o=o|0,Lh(o)}function bu(o,l){o=o|0,l=l|0,n[o>>2]=l}function sU(o){return o=o|0,n[o>>2]|0}function Lje(o){return o=o|0,s[n[o>>2]>>0]|0}function Mje(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,n[A>>2]=n[o>>2],Uje(l,A)|0,I=u}function Uje(o,l){o=o|0,l=l|0;var u=0;return u=_je(n[o>>2]|0,l)|0,l=o+4|0,n[(n[l>>2]|0)+8>>2]=u,n[(n[l>>2]|0)+8>>2]|0}function _je(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,Fl(A),o=Os(o)|0,l=Hje(o,n[l>>2]|0)|0,Nl(A),I=u,l|0}function Fl(o){o=o|0,n[o>>2]=n[2701],n[o+4>>2]=n[2703]}function Hje(o,l){o=o|0,l=l|0;var u=0;return u=da(jje()|0)|0,dn(0,u|0,o|0,ZM(l)|0)|0}function Nl(o){o=o|0,iZ(n[o>>2]|0,n[o+4>>2]|0)}function jje(){var o=0;return s[8096]|0||(Gje(11120),o=8096,n[o>>2]=1,n[o+4>>2]=0),11120}function Gje(o){o=o|0,Qo(o,qje()|0,1)}function qje(){return 1948}function Wje(){Yje()}function Yje(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0;if(Le=I,I=I+16|0,L=Le+4|0,q=Le,oa(65536,10804,n[2702]|0,10812),u=UX()|0,l=n[u>>2]|0,o=n[l>>2]|0,o|0)for(A=n[u+8>>2]|0,u=n[u+4>>2]|0;pf(o|0,c[u>>0]|0|0,s[A>>0]|0),l=l+4|0,o=n[l>>2]|0,o;)A=A+1|0,u=u+1|0;if(o=_X()|0,l=n[o>>2]|0,l|0)do NA(l|0,n[o+4>>2]|0),o=o+8|0,l=n[o>>2]|0;while(l|0);NA(Vje()|0,5167),M=Jy()|0,o=n[M>>2]|0;e:do if(o|0){do Jje(n[o+4>>2]|0),o=n[o>>2]|0;while(o|0);if(o=n[M>>2]|0,o|0){T=M;do{for(;d=o,o=n[o>>2]|0,d=n[d+4>>2]|0,!!(Kje(d)|0);)if(n[q>>2]=T,n[L>>2]=n[q>>2],zje(M,L)|0,!o)break e;if(Xje(d),T=n[T>>2]|0,l=dZ(d)|0,m=Oi()|0,B=I,I=I+((1*(l<<2)|0)+15&-16)|0,k=I,I=I+((1*(l<<2)|0)+15&-16)|0,l=n[(ZX(d)|0)>>2]|0,l|0)for(u=B,A=k;n[u>>2]=n[(Ky(n[l+4>>2]|0)|0)>>2],n[A>>2]=n[l+8>>2],l=n[l>>2]|0,l;)u=u+4|0,A=A+4|0;Qe=Ky(d)|0,l=Zje(d)|0,u=dZ(d)|0,A=$je(d)|0,oc(Qe|0,l|0,B|0,k|0,u|0,A|0,YM(d)|0),FA(m|0)}while(o|0)}}while(!1);if(o=n[(VM()|0)>>2]|0,o|0)do Qe=o+4|0,M=JM(Qe)|0,d=k2(M)|0,m=P2(M)|0,B=(x2(M)|0)+1|0,k=UP(M)|0,T=mZ(Qe)|0,M=_r(M)|0,L=OP(Qe)|0,q=oU(Qe)|0,uu(0,d|0,m|0,B|0,k|0,T|0,M|0,L|0,q|0,aU(Qe)|0),o=n[o>>2]|0;while(o|0);o=n[(Jy()|0)>>2]|0;e:do if(o|0){t:for(;;){if(l=n[o+4>>2]|0,l|0&&(ae=n[(Ky(l)|0)>>2]|0,Ye=n[($X(l)|0)>>2]|0,Ye|0)){u=Ye;do{l=u+4|0,A=JM(l)|0;r:do if(A|0)switch(_r(A)|0){case 0:break t;case 4:case 3:case 2:{k=k2(A)|0,T=P2(A)|0,M=(x2(A)|0)+1|0,L=UP(A)|0,q=_r(A)|0,Qe=OP(l)|0,uu(ae|0,k|0,T|0,M|0,L|0,0,q|0,Qe|0,oU(l)|0,aU(l)|0);break r}case 1:{B=k2(A)|0,k=P2(A)|0,T=(x2(A)|0)+1|0,M=UP(A)|0,L=mZ(l)|0,q=_r(A)|0,Qe=OP(l)|0,uu(ae|0,B|0,k|0,T|0,M|0,L|0,q|0,Qe|0,oU(l)|0,aU(l)|0);break r}case 5:{M=k2(A)|0,L=P2(A)|0,q=(x2(A)|0)+1|0,Qe=UP(A)|0,uu(ae|0,M|0,L|0,q|0,Qe|0,e6e(A)|0,_r(A)|0,0,0,0);break r}default:break r}while(!1);u=n[u>>2]|0}while(u|0)}if(o=n[o>>2]|0,!o)break e}Nt()}while(!1);ve(),I=Le}function Vje(){return 11703}function Jje(o){o=o|0,s[o+40>>0]=0}function Kje(o){return o=o|0,(s[o+40>>0]|0)!=0|0}function zje(o,l){return o=o|0,l=l|0,l=t6e(l)|0,o=n[l>>2]|0,n[l>>2]=n[o>>2],It(o),n[l>>2]|0}function Xje(o){o=o|0,s[o+40>>0]=1}function dZ(o){return o=o|0,n[o+20>>2]|0}function Zje(o){return o=o|0,n[o+8>>2]|0}function $je(o){return o=o|0,n[o+32>>2]|0}function UP(o){return o=o|0,n[o+4>>2]|0}function mZ(o){return o=o|0,n[o+4>>2]|0}function oU(o){return o=o|0,n[o+8>>2]|0}function aU(o){return o=o|0,n[o+16>>2]|0}function e6e(o){return o=o|0,n[o+20>>2]|0}function t6e(o){return o=o|0,n[o>>2]|0}function _P(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,We=0,Lt=0;Lt=I,I=I+16|0,ae=Lt;do if(o>>>0<245){if(M=o>>>0<11?16:o+11&-8,o=M>>>3,q=n[2783]|0,u=q>>>o,u&3|0)return l=(u&1^1)+o|0,o=11172+(l<<1<<2)|0,u=o+8|0,A=n[u>>2]|0,d=A+8|0,m=n[d>>2]|0,(o|0)==(m|0)?n[2783]=q&~(1<<l):(n[m+12>>2]=o,n[u>>2]=m),We=l<<3,n[A+4>>2]=We|3,We=A+We+4|0,n[We>>2]=n[We>>2]|1,We=d,I=Lt,We|0;if(L=n[2785]|0,M>>>0>L>>>0){if(u|0)return l=2<<o,l=u<<o&(l|0-l),l=(l&0-l)+-1|0,B=l>>>12&16,l=l>>>B,u=l>>>5&8,l=l>>>u,d=l>>>2&4,l=l>>>d,o=l>>>1&2,l=l>>>o,A=l>>>1&1,A=(u|B|d|o|A)+(l>>>A)|0,l=11172+(A<<1<<2)|0,o=l+8|0,d=n[o>>2]|0,B=d+8|0,u=n[B>>2]|0,(l|0)==(u|0)?(o=q&~(1<<A),n[2783]=o):(n[u+12>>2]=l,n[o>>2]=u,o=q),m=(A<<3)-M|0,n[d+4>>2]=M|3,A=d+M|0,n[A+4>>2]=m|1,n[A+m>>2]=m,L|0&&(d=n[2788]|0,l=L>>>3,u=11172+(l<<1<<2)|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=d,n[l+12>>2]=d,n[d+8>>2]=l,n[d+12>>2]=u),n[2785]=m,n[2788]=A,We=B,I=Lt,We|0;if(k=n[2784]|0,k){if(u=(k&0-k)+-1|0,B=u>>>12&16,u=u>>>B,m=u>>>5&8,u=u>>>m,T=u>>>2&4,u=u>>>T,A=u>>>1&2,u=u>>>A,o=u>>>1&1,o=n[11436+((m|B|T|A|o)+(u>>>o)<<2)>>2]|0,u=(n[o+4>>2]&-8)-M|0,A=n[o+16+(((n[o+16>>2]|0)==0&1)<<2)>>2]|0,!A)T=o,m=u;else{do B=(n[A+4>>2]&-8)-M|0,T=B>>>0<u>>>0,u=T?B:u,o=T?A:o,A=n[A+16+(((n[A+16>>2]|0)==0&1)<<2)>>2]|0;while(A|0);T=o,m=u}if(B=T+M|0,T>>>0<B>>>0){d=n[T+24>>2]|0,l=n[T+12>>2]|0;do if((l|0)==(T|0)){if(o=T+20|0,l=n[o>>2]|0,!l&&(o=T+16|0,l=n[o>>2]|0,!l)){u=0;break}for(;;){if(u=l+20|0,A=n[u>>2]|0,A|0){l=A,o=u;continue}if(u=l+16|0,A=n[u>>2]|0,A)l=A,o=u;else break}n[o>>2]=0,u=l}else u=n[T+8>>2]|0,n[u+12>>2]=l,n[l+8>>2]=u,u=l;while(!1);do if(d|0){if(l=n[T+28>>2]|0,o=11436+(l<<2)|0,(T|0)==(n[o>>2]|0)){if(n[o>>2]=u,!u){n[2784]=k&~(1<<l);break}}else if(n[d+16+(((n[d+16>>2]|0)!=(T|0)&1)<<2)>>2]=u,!u)break;n[u+24>>2]=d,l=n[T+16>>2]|0,l|0&&(n[u+16>>2]=l,n[l+24>>2]=u),l=n[T+20>>2]|0,l|0&&(n[u+20>>2]=l,n[l+24>>2]=u)}while(!1);return m>>>0<16?(We=m+M|0,n[T+4>>2]=We|3,We=T+We+4|0,n[We>>2]=n[We>>2]|1):(n[T+4>>2]=M|3,n[B+4>>2]=m|1,n[B+m>>2]=m,L|0&&(A=n[2788]|0,l=L>>>3,u=11172+(l<<1<<2)|0,l=1<<l,q&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=q|l,l=u,o=u+8|0),n[o>>2]=A,n[l+12>>2]=A,n[A+8>>2]=l,n[A+12>>2]=u),n[2785]=m,n[2788]=B),We=T+8|0,I=Lt,We|0}else q=M}else q=M}else q=M}else if(o>>>0<=4294967231)if(o=o+11|0,M=o&-8,T=n[2784]|0,T){A=0-M|0,o=o>>>8,o?M>>>0>16777215?k=31:(q=(o+1048320|0)>>>16&8,He=o<<q,L=(He+520192|0)>>>16&4,He=He<<L,k=(He+245760|0)>>>16&2,k=14-(L|q|k)+(He<<k>>>15)|0,k=M>>>(k+7|0)&1|k<<1):k=0,u=n[11436+(k<<2)>>2]|0;e:do if(!u)u=0,o=0,He=57;else for(o=0,B=M<<((k|0)==31?0:25-(k>>>1)|0),m=0;;){if(d=(n[u+4>>2]&-8)-M|0,d>>>0<A>>>0)if(d)o=u,A=d;else{o=u,A=0,d=u,He=61;break e}if(d=n[u+20>>2]|0,u=n[u+16+(B>>>31<<2)>>2]|0,m=(d|0)==0|(d|0)==(u|0)?m:d,d=(u|0)==0,d){u=m,He=57;break}else B=B<<((d^1)&1)}while(!1);if((He|0)==57){if((u|0)==0&(o|0)==0){if(o=2<<k,o=T&(o|0-o),!o){q=M;break}q=(o&0-o)+-1|0,B=q>>>12&16,q=q>>>B,m=q>>>5&8,q=q>>>m,k=q>>>2&4,q=q>>>k,L=q>>>1&2,q=q>>>L,u=q>>>1&1,o=0,u=n[11436+((m|B|k|L|u)+(q>>>u)<<2)>>2]|0}u?(d=u,He=61):(k=o,B=A)}if((He|0)==61)for(;;)if(He=0,u=(n[d+4>>2]&-8)-M|0,q=u>>>0<A>>>0,u=q?u:A,o=q?d:o,d=n[d+16+(((n[d+16>>2]|0)==0&1)<<2)>>2]|0,d)A=u,He=61;else{k=o,B=u;break}if(k|0&&B>>>0<((n[2785]|0)-M|0)>>>0){if(m=k+M|0,k>>>0>=m>>>0)return We=0,I=Lt,We|0;d=n[k+24>>2]|0,l=n[k+12>>2]|0;do if((l|0)==(k|0)){if(o=k+20|0,l=n[o>>2]|0,!l&&(o=k+16|0,l=n[o>>2]|0,!l)){l=0;break}for(;;){if(u=l+20|0,A=n[u>>2]|0,A|0){l=A,o=u;continue}if(u=l+16|0,A=n[u>>2]|0,A)l=A,o=u;else break}n[o>>2]=0}else We=n[k+8>>2]|0,n[We+12>>2]=l,n[l+8>>2]=We;while(!1);do if(d){if(o=n[k+28>>2]|0,u=11436+(o<<2)|0,(k|0)==(n[u>>2]|0)){if(n[u>>2]=l,!l){A=T&~(1<<o),n[2784]=A;break}}else if(n[d+16+(((n[d+16>>2]|0)!=(k|0)&1)<<2)>>2]=l,!l){A=T;break}n[l+24>>2]=d,o=n[k+16>>2]|0,o|0&&(n[l+16>>2]=o,n[o+24>>2]=l),o=n[k+20>>2]|0,o&&(n[l+20>>2]=o,n[o+24>>2]=l),A=T}else A=T;while(!1);do if(B>>>0>=16){if(n[k+4>>2]=M|3,n[m+4>>2]=B|1,n[m+B>>2]=B,l=B>>>3,B>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=m,n[l+12>>2]=m,n[m+8>>2]=l,n[m+12>>2]=u;break}if(l=B>>>8,l?B>>>0>16777215?l=31:(He=(l+1048320|0)>>>16&8,We=l<<He,ct=(We+520192|0)>>>16&4,We=We<<ct,l=(We+245760|0)>>>16&2,l=14-(ct|He|l)+(We<<l>>>15)|0,l=B>>>(l+7|0)&1|l<<1):l=0,u=11436+(l<<2)|0,n[m+28>>2]=l,o=m+16|0,n[o+4>>2]=0,n[o>>2]=0,o=1<<l,!(A&o)){n[2784]=A|o,n[u>>2]=m,n[m+24>>2]=u,n[m+12>>2]=m,n[m+8>>2]=m;break}for(o=B<<((l|0)==31?0:25-(l>>>1)|0),u=n[u>>2]|0;;){if((n[u+4>>2]&-8|0)==(B|0)){He=97;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=96;break}}if((He|0)==96){n[A>>2]=m,n[m+24>>2]=u,n[m+12>>2]=m,n[m+8>>2]=m;break}else if((He|0)==97){He=u+8|0,We=n[He>>2]|0,n[We+12>>2]=m,n[He>>2]=m,n[m+8>>2]=We,n[m+12>>2]=u,n[m+24>>2]=0;break}}else We=B+M|0,n[k+4>>2]=We|3,We=k+We+4|0,n[We>>2]=n[We>>2]|1;while(!1);return We=k+8|0,I=Lt,We|0}else q=M}else q=M;else q=-1;while(!1);if(u=n[2785]|0,u>>>0>=q>>>0)return l=u-q|0,o=n[2788]|0,l>>>0>15?(We=o+q|0,n[2788]=We,n[2785]=l,n[We+4>>2]=l|1,n[We+l>>2]=l,n[o+4>>2]=q|3):(n[2785]=0,n[2788]=0,n[o+4>>2]=u|3,We=o+u+4|0,n[We>>2]=n[We>>2]|1),We=o+8|0,I=Lt,We|0;if(B=n[2786]|0,B>>>0>q>>>0)return ct=B-q|0,n[2786]=ct,We=n[2789]|0,He=We+q|0,n[2789]=He,n[He+4>>2]=ct|1,n[We+4>>2]=q|3,We=We+8|0,I=Lt,We|0;if(n[2901]|0?o=n[2903]|0:(n[2903]=4096,n[2902]=4096,n[2904]=-1,n[2905]=-1,n[2906]=0,n[2894]=0,o=ae&-16^1431655768,n[ae>>2]=o,n[2901]=o,o=4096),k=q+48|0,T=q+47|0,m=o+T|0,d=0-o|0,M=m&d,M>>>0<=q>>>0||(o=n[2893]|0,o|0&&(L=n[2891]|0,ae=L+M|0,ae>>>0<=L>>>0|ae>>>0>o>>>0)))return We=0,I=Lt,We|0;e:do if(n[2894]&4)l=0,He=133;else{u=n[2789]|0;t:do if(u){for(A=11580;o=n[A>>2]|0,!(o>>>0<=u>>>0&&(Qe=A+4|0,(o+(n[Qe>>2]|0)|0)>>>0>u>>>0));)if(o=n[A+8>>2]|0,o)A=o;else{He=118;break t}if(l=m-B&d,l>>>0<2147483647)if(o=qh(l|0)|0,(o|0)==((n[A>>2]|0)+(n[Qe>>2]|0)|0)){if((o|0)!=-1){B=l,m=o,He=135;break e}}else A=o,He=126;else l=0}else He=118;while(!1);do if((He|0)==118)if(u=qh(0)|0,(u|0)!=-1&&(l=u,Ye=n[2902]|0,Le=Ye+-1|0,l=(Le&l|0?(Le+l&0-Ye)-l|0:0)+M|0,Ye=n[2891]|0,Le=l+Ye|0,l>>>0>q>>>0&l>>>0<2147483647)){if(Qe=n[2893]|0,Qe|0&&Le>>>0<=Ye>>>0|Le>>>0>Qe>>>0){l=0;break}if(o=qh(l|0)|0,(o|0)==(u|0)){B=l,m=u,He=135;break e}else A=o,He=126}else l=0;while(!1);do if((He|0)==126){if(u=0-l|0,!(k>>>0>l>>>0&(l>>>0<2147483647&(A|0)!=-1)))if((A|0)==-1){l=0;break}else{B=l,m=A,He=135;break e}if(o=n[2903]|0,o=T-l+o&0-o,o>>>0>=2147483647){B=l,m=A,He=135;break e}if((qh(o|0)|0)==-1){qh(u|0)|0,l=0;break}else{B=o+l|0,m=A,He=135;break e}}while(!1);n[2894]=n[2894]|4,He=133}while(!1);if((He|0)==133&&M>>>0<2147483647&&(ct=qh(M|0)|0,Qe=qh(0)|0,tt=Qe-ct|0,Ze=tt>>>0>(q+40|0)>>>0,!((ct|0)==-1|Ze^1|ct>>>0<Qe>>>0&((ct|0)!=-1&(Qe|0)!=-1)^1))&&(B=Ze?tt:l,m=ct,He=135),(He|0)==135){l=(n[2891]|0)+B|0,n[2891]=l,l>>>0>(n[2892]|0)>>>0&&(n[2892]=l),T=n[2789]|0;do if(T){for(l=11580;;){if(o=n[l>>2]|0,u=l+4|0,A=n[u>>2]|0,(m|0)==(o+A|0)){He=145;break}if(d=n[l+8>>2]|0,d)l=d;else break}if((He|0)==145&&!(n[l+12>>2]&8|0)&&T>>>0<m>>>0&T>>>0>=o>>>0){n[u>>2]=A+B,We=T+8|0,We=We&7|0?0-We&7:0,He=T+We|0,We=(n[2786]|0)+(B-We)|0,n[2789]=He,n[2786]=We,n[He+4>>2]=We|1,n[He+We+4>>2]=40,n[2790]=n[2905];break}for(m>>>0<(n[2787]|0)>>>0&&(n[2787]=m),u=m+B|0,l=11580;;){if((n[l>>2]|0)==(u|0)){He=153;break}if(o=n[l+8>>2]|0,o)l=o;else break}if((He|0)==153&&!(n[l+12>>2]&8|0)){n[l>>2]=m,L=l+4|0,n[L>>2]=(n[L>>2]|0)+B,L=m+8|0,L=m+(L&7|0?0-L&7:0)|0,l=u+8|0,l=u+(l&7|0?0-l&7:0)|0,M=L+q|0,k=l-L-q|0,n[L+4>>2]=q|3;do if((l|0)!=(T|0)){if((l|0)==(n[2788]|0)){We=(n[2785]|0)+k|0,n[2785]=We,n[2788]=M,n[M+4>>2]=We|1,n[M+We>>2]=We;break}if(o=n[l+4>>2]|0,(o&3|0)==1){B=o&-8,A=o>>>3;e:do if(o>>>0<256)if(o=n[l+8>>2]|0,u=n[l+12>>2]|0,(u|0)==(o|0)){n[2783]=n[2783]&~(1<<A);break}else{n[o+12>>2]=u,n[u+8>>2]=o;break}else{m=n[l+24>>2]|0,o=n[l+12>>2]|0;do if((o|0)==(l|0)){if(A=l+16|0,u=A+4|0,o=n[u>>2]|0,!o)if(o=n[A>>2]|0,o)u=A;else{o=0;break}for(;;){if(A=o+20|0,d=n[A>>2]|0,d|0){o=d,u=A;continue}if(A=o+16|0,d=n[A>>2]|0,d)o=d,u=A;else break}n[u>>2]=0}else We=n[l+8>>2]|0,n[We+12>>2]=o,n[o+8>>2]=We;while(!1);if(!m)break;u=n[l+28>>2]|0,A=11436+(u<<2)|0;do if((l|0)!=(n[A>>2]|0)){if(n[m+16+(((n[m+16>>2]|0)!=(l|0)&1)<<2)>>2]=o,!o)break e}else{if(n[A>>2]=o,o|0)break;n[2784]=n[2784]&~(1<<u);break e}while(!1);if(n[o+24>>2]=m,u=l+16|0,A=n[u>>2]|0,A|0&&(n[o+16>>2]=A,n[A+24>>2]=o),u=n[u+4>>2]|0,!u)break;n[o+20>>2]=u,n[u+24>>2]=o}while(!1);l=l+B|0,d=B+k|0}else d=k;if(l=l+4|0,n[l>>2]=n[l>>2]&-2,n[M+4>>2]=d|1,n[M+d>>2]=d,l=d>>>3,d>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=M,n[l+12>>2]=M,n[M+8>>2]=l,n[M+12>>2]=u;break}l=d>>>8;do if(!l)l=0;else{if(d>>>0>16777215){l=31;break}He=(l+1048320|0)>>>16&8,We=l<<He,ct=(We+520192|0)>>>16&4,We=We<<ct,l=(We+245760|0)>>>16&2,l=14-(ct|He|l)+(We<<l>>>15)|0,l=d>>>(l+7|0)&1|l<<1}while(!1);if(A=11436+(l<<2)|0,n[M+28>>2]=l,o=M+16|0,n[o+4>>2]=0,n[o>>2]=0,o=n[2784]|0,u=1<<l,!(o&u)){n[2784]=o|u,n[A>>2]=M,n[M+24>>2]=A,n[M+12>>2]=M,n[M+8>>2]=M;break}for(o=d<<((l|0)==31?0:25-(l>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(d|0)){He=194;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=193;break}}if((He|0)==193){n[A>>2]=M,n[M+24>>2]=u,n[M+12>>2]=M,n[M+8>>2]=M;break}else if((He|0)==194){He=u+8|0,We=n[He>>2]|0,n[We+12>>2]=M,n[He>>2]=M,n[M+8>>2]=We,n[M+12>>2]=u,n[M+24>>2]=0;break}}else We=(n[2786]|0)+k|0,n[2786]=We,n[2789]=M,n[M+4>>2]=We|1;while(!1);return We=L+8|0,I=Lt,We|0}for(l=11580;o=n[l>>2]|0,!(o>>>0<=T>>>0&&(We=o+(n[l+4>>2]|0)|0,We>>>0>T>>>0));)l=n[l+8>>2]|0;d=We+-47|0,o=d+8|0,o=d+(o&7|0?0-o&7:0)|0,d=T+16|0,o=o>>>0<d>>>0?T:o,l=o+8|0,u=m+8|0,u=u&7|0?0-u&7:0,He=m+u|0,u=B+-40-u|0,n[2789]=He,n[2786]=u,n[He+4>>2]=u|1,n[He+u+4>>2]=40,n[2790]=n[2905],u=o+4|0,n[u>>2]=27,n[l>>2]=n[2895],n[l+4>>2]=n[2896],n[l+8>>2]=n[2897],n[l+12>>2]=n[2898],n[2895]=m,n[2896]=B,n[2898]=0,n[2897]=l,l=o+24|0;do He=l,l=l+4|0,n[l>>2]=7;while((He+8|0)>>>0<We>>>0);if((o|0)!=(T|0)){if(m=o-T|0,n[u>>2]=n[u>>2]&-2,n[T+4>>2]=m|1,n[o>>2]=m,l=m>>>3,m>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<<l,o&l?(o=u+8|0,l=n[o>>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=T,n[l+12>>2]=T,n[T+8>>2]=l,n[T+12>>2]=u;break}if(l=m>>>8,l?m>>>0>16777215?u=31:(He=(l+1048320|0)>>>16&8,We=l<<He,ct=(We+520192|0)>>>16&4,We=We<<ct,u=(We+245760|0)>>>16&2,u=14-(ct|He|u)+(We<<u>>>15)|0,u=m>>>(u+7|0)&1|u<<1):u=0,A=11436+(u<<2)|0,n[T+28>>2]=u,n[T+20>>2]=0,n[d>>2]=0,l=n[2784]|0,o=1<<u,!(l&o)){n[2784]=l|o,n[A>>2]=T,n[T+24>>2]=A,n[T+12>>2]=T,n[T+8>>2]=T;break}for(o=m<<((u|0)==31?0:25-(u>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(m|0)){He=216;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=215;break}}if((He|0)==215){n[A>>2]=T,n[T+24>>2]=u,n[T+12>>2]=T,n[T+8>>2]=T;break}else if((He|0)==216){He=u+8|0,We=n[He>>2]|0,n[We+12>>2]=T,n[He>>2]=T,n[T+8>>2]=We,n[T+12>>2]=u,n[T+24>>2]=0;break}}}else{We=n[2787]|0,(We|0)==0|m>>>0<We>>>0&&(n[2787]=m),n[2895]=m,n[2896]=B,n[2898]=0,n[2792]=n[2901],n[2791]=-1,l=0;do We=11172+(l<<1<<2)|0,n[We+12>>2]=We,n[We+8>>2]=We,l=l+1|0;while((l|0)!=32);We=m+8|0,We=We&7|0?0-We&7:0,He=m+We|0,We=B+-40-We|0,n[2789]=He,n[2786]=We,n[He+4>>2]=We|1,n[He+We+4>>2]=40,n[2790]=n[2905]}while(!1);if(l=n[2786]|0,l>>>0>q>>>0)return ct=l-q|0,n[2786]=ct,We=n[2789]|0,He=We+q|0,n[2789]=He,n[He+4>>2]=ct|1,n[We+4>>2]=q|3,We=We+8|0,I=Lt,We|0}return n[(Xy()|0)>>2]=12,We=0,I=Lt,We|0}function HP(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0;if(o){u=o+-8|0,d=n[2787]|0,o=n[o+-4>>2]|0,l=o&-8,T=u+l|0;do if(o&1)k=u,B=u;else{if(A=n[u>>2]|0,!(o&3)||(B=u+(0-A)|0,m=A+l|0,B>>>0<d>>>0))return;if((B|0)==(n[2788]|0)){if(o=T+4|0,l=n[o>>2]|0,(l&3|0)!=3){k=B,l=m;break}n[2785]=m,n[o>>2]=l&-2,n[B+4>>2]=m|1,n[B+m>>2]=m;return}if(u=A>>>3,A>>>0<256)if(o=n[B+8>>2]|0,l=n[B+12>>2]|0,(l|0)==(o|0)){n[2783]=n[2783]&~(1<<u),k=B,l=m;break}else{n[o+12>>2]=l,n[l+8>>2]=o,k=B,l=m;break}d=n[B+24>>2]|0,o=n[B+12>>2]|0;do if((o|0)==(B|0)){if(u=B+16|0,l=u+4|0,o=n[l>>2]|0,!o)if(o=n[u>>2]|0,o)l=u;else{o=0;break}for(;;){if(u=o+20|0,A=n[u>>2]|0,A|0){o=A,l=u;continue}if(u=o+16|0,A=n[u>>2]|0,A)o=A,l=u;else break}n[l>>2]=0}else k=n[B+8>>2]|0,n[k+12>>2]=o,n[o+8>>2]=k;while(!1);if(d){if(l=n[B+28>>2]|0,u=11436+(l<<2)|0,(B|0)==(n[u>>2]|0)){if(n[u>>2]=o,!o){n[2784]=n[2784]&~(1<<l),k=B,l=m;break}}else if(n[d+16+(((n[d+16>>2]|0)!=(B|0)&1)<<2)>>2]=o,!o){k=B,l=m;break}n[o+24>>2]=d,l=B+16|0,u=n[l>>2]|0,u|0&&(n[o+16>>2]=u,n[u+24>>2]=o),l=n[l+4>>2]|0,l?(n[o+20>>2]=l,n[l+24>>2]=o,k=B,l=m):(k=B,l=m)}else k=B,l=m}while(!1);if(!(B>>>0>=T>>>0)&&(o=T+4|0,A=n[o>>2]|0,!!(A&1))){if(A&2)n[o>>2]=A&-2,n[k+4>>2]=l|1,n[B+l>>2]=l,d=l;else{if(o=n[2788]|0,(T|0)==(n[2789]|0)){if(T=(n[2786]|0)+l|0,n[2786]=T,n[2789]=k,n[k+4>>2]=T|1,(k|0)!=(o|0))return;n[2788]=0,n[2785]=0;return}if((T|0)==(o|0)){T=(n[2785]|0)+l|0,n[2785]=T,n[2788]=B,n[k+4>>2]=T|1,n[B+T>>2]=T;return}d=(A&-8)+l|0,u=A>>>3;do if(A>>>0<256)if(l=n[T+8>>2]|0,o=n[T+12>>2]|0,(o|0)==(l|0)){n[2783]=n[2783]&~(1<<u);break}else{n[l+12>>2]=o,n[o+8>>2]=l;break}else{m=n[T+24>>2]|0,o=n[T+12>>2]|0;do if((o|0)==(T|0)){if(u=T+16|0,l=u+4|0,o=n[l>>2]|0,!o)if(o=n[u>>2]|0,o)l=u;else{u=0;break}for(;;){if(u=o+20|0,A=n[u>>2]|0,A|0){o=A,l=u;continue}if(u=o+16|0,A=n[u>>2]|0,A)o=A,l=u;else break}n[l>>2]=0,u=o}else u=n[T+8>>2]|0,n[u+12>>2]=o,n[o+8>>2]=u,u=o;while(!1);if(m|0){if(o=n[T+28>>2]|0,l=11436+(o<<2)|0,(T|0)==(n[l>>2]|0)){if(n[l>>2]=u,!u){n[2784]=n[2784]&~(1<<o);break}}else if(n[m+16+(((n[m+16>>2]|0)!=(T|0)&1)<<2)>>2]=u,!u)break;n[u+24>>2]=m,o=T+16|0,l=n[o>>2]|0,l|0&&(n[u+16>>2]=l,n[l+24>>2]=u),o=n[o+4>>2]|0,o|0&&(n[u+20>>2]=o,n[o+24>>2]=u)}}while(!1);if(n[k+4>>2]=d|1,n[B+d>>2]=d,(k|0)==(n[2788]|0)){n[2785]=d;return}}if(o=d>>>3,d>>>0<256){u=11172+(o<<1<<2)|0,l=n[2783]|0,o=1<<o,l&o?(l=u+8|0,o=n[l>>2]|0):(n[2783]=l|o,o=u,l=u+8|0),n[l>>2]=k,n[o+12>>2]=k,n[k+8>>2]=o,n[k+12>>2]=u;return}o=d>>>8,o?d>>>0>16777215?o=31:(B=(o+1048320|0)>>>16&8,T=o<<B,m=(T+520192|0)>>>16&4,T=T<<m,o=(T+245760|0)>>>16&2,o=14-(m|B|o)+(T<<o>>>15)|0,o=d>>>(o+7|0)&1|o<<1):o=0,A=11436+(o<<2)|0,n[k+28>>2]=o,n[k+20>>2]=0,n[k+16>>2]=0,l=n[2784]|0,u=1<<o;do if(l&u){for(l=d<<((o|0)==31?0:25-(o>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(d|0)){o=73;break}if(A=u+16+(l>>>31<<2)|0,o=n[A>>2]|0,o)l=l<<1,u=o;else{o=72;break}}if((o|0)==72){n[A>>2]=k,n[k+24>>2]=u,n[k+12>>2]=k,n[k+8>>2]=k;break}else if((o|0)==73){B=u+8|0,T=n[B>>2]|0,n[T+12>>2]=k,n[B>>2]=k,n[k+8>>2]=T,n[k+12>>2]=u,n[k+24>>2]=0;break}}else n[2784]=l|u,n[A>>2]=k,n[k+24>>2]=A,n[k+12>>2]=k,n[k+8>>2]=k;while(!1);if(T=(n[2791]|0)+-1|0,n[2791]=T,!T)o=11588;else return;for(;o=n[o>>2]|0,o;)o=o+8|0;n[2791]=-1}}}function r6e(){return 11628}function n6e(o){o=o|0;var l=0,u=0;return l=I,I=I+16|0,u=l,n[u>>2]=o6e(n[o+60>>2]|0)|0,o=jP(Au(6,u|0)|0)|0,I=l,o|0}function yZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0;q=I,I=I+48|0,M=q+16|0,m=q,d=q+32|0,k=o+28|0,A=n[k>>2]|0,n[d>>2]=A,T=o+20|0,A=(n[T>>2]|0)-A|0,n[d+4>>2]=A,n[d+8>>2]=l,n[d+12>>2]=u,A=A+u|0,B=o+60|0,n[m>>2]=n[B>>2],n[m+4>>2]=d,n[m+8>>2]=2,m=jP(La(146,m|0)|0)|0;e:do if((A|0)!=(m|0)){for(l=2;!((m|0)<0);)if(A=A-m|0,Ye=n[d+4>>2]|0,ae=m>>>0>Ye>>>0,d=ae?d+8|0:d,l=(ae<<31>>31)+l|0,Ye=m-(ae?Ye:0)|0,n[d>>2]=(n[d>>2]|0)+Ye,ae=d+4|0,n[ae>>2]=(n[ae>>2]|0)-Ye,n[M>>2]=n[B>>2],n[M+4>>2]=d,n[M+8>>2]=l,m=jP(La(146,M|0)|0)|0,(A|0)==(m|0)){L=3;break e}n[o+16>>2]=0,n[k>>2]=0,n[T>>2]=0,n[o>>2]=n[o>>2]|32,(l|0)==2?u=0:u=u-(n[d+4>>2]|0)|0}else L=3;while(!1);return(L|0)==3&&(Ye=n[o+44>>2]|0,n[o+16>>2]=Ye+(n[o+48>>2]|0),n[k>>2]=Ye,n[T>>2]=Ye),I=q,u|0}function i6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return d=I,I=I+32|0,m=d,A=d+20|0,n[m>>2]=n[o+60>>2],n[m+4>>2]=0,n[m+8>>2]=l,n[m+12>>2]=A,n[m+16>>2]=u,(jP(Oa(140,m|0)|0)|0)<0?(n[A>>2]=-1,o=-1):o=n[A>>2]|0,I=d,o|0}function jP(o){return o=o|0,o>>>0>4294963200&&(n[(Xy()|0)>>2]=0-o,o=-1),o|0}function Xy(){return(s6e()|0)+64|0}function s6e(){return lU()|0}function lU(){return 2084}function o6e(o){return o=o|0,o|0}function a6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;return d=I,I=I+32|0,A=d,n[o+36>>2]=1,!(n[o>>2]&64|0)&&(n[A>>2]=n[o+60>>2],n[A+4>>2]=21523,n[A+8>>2]=d+16,no(54,A|0)|0)&&(s[o+75>>0]=-1),A=yZ(o,l,u)|0,I=d,A|0}function EZ(o,l){o=o|0,l=l|0;var u=0,A=0;if(u=s[o>>0]|0,A=s[l>>0]|0,!(u<<24>>24)||u<<24>>24!=A<<24>>24)o=A;else{do o=o+1|0,l=l+1|0,u=s[o>>0]|0,A=s[l>>0]|0;while(!(!(u<<24>>24)||u<<24>>24!=A<<24>>24));o=A}return(u&255)-(o&255)|0}function l6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;e:do if(!u)o=0;else{for(;A=s[o>>0]|0,d=s[l>>0]|0,A<<24>>24==d<<24>>24;)if(u=u+-1|0,u)o=o+1|0,l=l+1|0;else{o=0;break e}o=(A&255)-(d&255)|0}while(!1);return o|0}function IZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0;Qe=I,I=I+224|0,L=Qe+120|0,q=Qe+80|0,Ye=Qe,Le=Qe+136|0,A=q,d=A+40|0;do n[A>>2]=0,A=A+4|0;while((A|0)<(d|0));return n[L>>2]=n[u>>2],(cU(0,l,L,Ye,q)|0)<0?u=-1:((n[o+76>>2]|0)>-1?ae=c6e(o)|0:ae=0,u=n[o>>2]|0,M=u&32,(s[o+74>>0]|0)<1&&(n[o>>2]=u&-33),A=o+48|0,n[A>>2]|0?u=cU(o,l,L,Ye,q)|0:(d=o+44|0,m=n[d>>2]|0,n[d>>2]=Le,B=o+28|0,n[B>>2]=Le,k=o+20|0,n[k>>2]=Le,n[A>>2]=80,T=o+16|0,n[T>>2]=Le+80,u=cU(o,l,L,Ye,q)|0,m&&(YP[n[o+36>>2]&7](o,0,0)|0,u=n[k>>2]|0?u:-1,n[d>>2]=m,n[A>>2]=0,n[T>>2]=0,n[B>>2]=0,n[k>>2]=0)),A=n[o>>2]|0,n[o>>2]=A|M,ae|0&&u6e(o),u=A&32|0?-1:u),I=Qe,u|0}function cU(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,We=0,Lt=0,Gr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0;cr=I,I=I+64|0,fr=cr+16|0,$t=cr,Lt=cr+24|0,Tr=cr+8|0,Hr=cr+20|0,n[fr>>2]=l,ct=(o|0)!=0,He=Lt+40|0,We=He,Lt=Lt+39|0,Gr=Tr+4|0,B=0,m=0,L=0;e:for(;;){do if((m|0)>-1)if((B|0)>(2147483647-m|0)){n[(Xy()|0)>>2]=75,m=-1;break}else{m=B+m|0;break}while(!1);if(B=s[l>>0]|0,B<<24>>24)k=l;else{Ze=87;break}t:for(;;){switch(B<<24>>24){case 37:{B=k,Ze=9;break t}case 0:{B=k;break t}default:}tt=k+1|0,n[fr>>2]=tt,B=s[tt>>0]|0,k=tt}t:do if((Ze|0)==9)for(;;){if(Ze=0,(s[k+1>>0]|0)!=37)break t;if(B=B+1|0,k=k+2|0,n[fr>>2]=k,(s[k>>0]|0)==37)Ze=9;else break}while(!1);if(B=B-l|0,ct&&vs(o,l,B),B|0){l=k;continue}T=k+1|0,B=(s[T>>0]|0)+-48|0,B>>>0<10?(tt=(s[k+2>>0]|0)==36,Qe=tt?B:-1,L=tt?1:L,T=tt?k+3|0:T):Qe=-1,n[fr>>2]=T,B=s[T>>0]|0,k=(B<<24>>24)+-32|0;t:do if(k>>>0<32)for(M=0,q=B;;){if(B=1<<k,!(B&75913)){B=q;break t}if(M=B|M,T=T+1|0,n[fr>>2]=T,B=s[T>>0]|0,k=(B<<24>>24)+-32|0,k>>>0>=32)break;q=B}else M=0;while(!1);if(B<<24>>24==42){if(k=T+1|0,B=(s[k>>0]|0)+-48|0,B>>>0<10&&(s[T+2>>0]|0)==36)n[d+(B<<2)>>2]=10,B=n[A+((s[k>>0]|0)+-48<<3)>>2]|0,L=1,T=T+3|0;else{if(L|0){m=-1;break}ct?(L=(n[u>>2]|0)+3&-4,B=n[L>>2]|0,n[u>>2]=L+4,L=0,T=k):(B=0,L=0,T=k)}n[fr>>2]=T,tt=(B|0)<0,B=tt?0-B|0:B,M=tt?M|8192:M}else{if(B=CZ(fr)|0,(B|0)<0){m=-1;break}T=n[fr>>2]|0}do if((s[T>>0]|0)==46){if((s[T+1>>0]|0)!=42){n[fr>>2]=T+1,k=CZ(fr)|0,T=n[fr>>2]|0;break}if(q=T+2|0,k=(s[q>>0]|0)+-48|0,k>>>0<10&&(s[T+3>>0]|0)==36){n[d+(k<<2)>>2]=10,k=n[A+((s[q>>0]|0)+-48<<3)>>2]|0,T=T+4|0,n[fr>>2]=T;break}if(L|0){m=-1;break e}ct?(tt=(n[u>>2]|0)+3&-4,k=n[tt>>2]|0,n[u>>2]=tt+4):k=0,n[fr>>2]=q,T=q}else k=-1;while(!1);for(Le=0;;){if(((s[T>>0]|0)+-65|0)>>>0>57){m=-1;break e}if(tt=T+1|0,n[fr>>2]=tt,q=s[(s[T>>0]|0)+-65+(5178+(Le*58|0))>>0]|0,ae=q&255,(ae+-1|0)>>>0<8)Le=ae,T=tt;else break}if(!(q<<24>>24)){m=-1;break}Ye=(Qe|0)>-1;do if(q<<24>>24==19)if(Ye){m=-1;break e}else Ze=49;else{if(Ye){n[d+(Qe<<2)>>2]=ae,Ye=A+(Qe<<3)|0,Qe=n[Ye+4>>2]|0,Ze=$t,n[Ze>>2]=n[Ye>>2],n[Ze+4>>2]=Qe,Ze=49;break}if(!ct){m=0;break e}wZ($t,ae,u)}while(!1);if((Ze|0)==49&&(Ze=0,!ct)){B=0,l=tt;continue}T=s[T>>0]|0,T=(Le|0)!=0&(T&15|0)==3?T&-33:T,Ye=M&-65537,Qe=M&8192|0?Ye:M;t:do switch(T|0){case 110:switch((Le&255)<<24>>24){case 0:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 1:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 2:{B=n[$t>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=tt;continue e}case 3:{a[n[$t>>2]>>1]=m,B=0,l=tt;continue e}case 4:{s[n[$t>>2]>>0]=m,B=0,l=tt;continue e}case 6:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 7:{B=n[$t>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=tt;continue e}default:{B=0,l=tt;continue e}}case 112:{T=120,k=k>>>0>8?k:8,l=Qe|8,Ze=61;break}case 88:case 120:{l=Qe,Ze=61;break}case 111:{T=$t,l=n[T>>2]|0,T=n[T+4>>2]|0,ae=A6e(l,T,He)|0,Ye=We-ae|0,M=0,q=5642,k=(Qe&8|0)==0|(k|0)>(Ye|0)?k:Ye+1|0,Ye=Qe,Ze=67;break}case 105:case 100:if(T=$t,l=n[T>>2]|0,T=n[T+4>>2]|0,(T|0)<0){l=GP(0,0,l|0,T|0)|0,T=ye,M=$t,n[M>>2]=l,n[M+4>>2]=T,M=1,q=5642,Ze=66;break t}else{M=(Qe&2049|0)!=0&1,q=Qe&2048|0?5643:Qe&1|0?5644:5642,Ze=66;break t}case 117:{T=$t,M=0,q=5642,l=n[T>>2]|0,T=n[T+4>>2]|0,Ze=66;break}case 99:{s[Lt>>0]=n[$t>>2],l=Lt,M=0,q=5642,ae=He,T=1,k=Ye;break}case 109:{T=p6e(n[(Xy()|0)>>2]|0)|0,Ze=71;break}case 115:{T=n[$t>>2]|0,T=T|0?T:5652,Ze=71;break}case 67:{n[Tr>>2]=n[$t>>2],n[Gr>>2]=0,n[$t>>2]=Tr,ae=-1,T=Tr,Ze=75;break}case 83:{l=n[$t>>2]|0,k?(ae=k,T=l,Ze=75):(Ls(o,32,B,0,Qe),l=0,Ze=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{B=g6e(o,+E[$t>>3],B,k,Qe,T)|0,l=tt;continue e}default:M=0,q=5642,ae=He,T=k,k=Qe}while(!1);t:do if((Ze|0)==61)Qe=$t,Le=n[Qe>>2]|0,Qe=n[Qe+4>>2]|0,ae=f6e(Le,Qe,He,T&32)|0,q=(l&8|0)==0|(Le|0)==0&(Qe|0)==0,M=q?0:2,q=q?5642:5642+(T>>4)|0,Ye=l,l=Le,T=Qe,Ze=67;else if((Ze|0)==66)ae=Zy(l,T,He)|0,Ye=Qe,Ze=67;else if((Ze|0)==71)Ze=0,Qe=h6e(T,0,k)|0,Le=(Qe|0)==0,l=T,M=0,q=5642,ae=Le?T+k|0:Qe,T=Le?k:Qe-T|0,k=Ye;else if((Ze|0)==75){for(Ze=0,q=T,l=0,k=0;M=n[q>>2]|0,!(!M||(k=BZ(Hr,M)|0,(k|0)<0|k>>>0>(ae-l|0)>>>0));)if(l=k+l|0,ae>>>0>l>>>0)q=q+4|0;else break;if((k|0)<0){m=-1;break e}if(Ls(o,32,B,l,Qe),!l)l=0,Ze=84;else for(M=0;;){if(k=n[T>>2]|0,!k){Ze=84;break t}if(k=BZ(Hr,k)|0,M=k+M|0,(M|0)>(l|0)){Ze=84;break t}if(vs(o,Hr,k),M>>>0>=l>>>0){Ze=84;break}else T=T+4|0}}while(!1);if((Ze|0)==67)Ze=0,T=(l|0)!=0|(T|0)!=0,Qe=(k|0)!=0|T,T=((T^1)&1)+(We-ae)|0,l=Qe?ae:He,ae=He,T=Qe?(k|0)>(T|0)?k:T:k,k=(k|0)>-1?Ye&-65537:Ye;else if((Ze|0)==84){Ze=0,Ls(o,32,B,l,Qe^8192),B=(B|0)>(l|0)?B:l,l=tt;continue}Le=ae-l|0,Ye=(T|0)<(Le|0)?Le:T,Qe=Ye+M|0,B=(B|0)<(Qe|0)?Qe:B,Ls(o,32,B,Qe,k),vs(o,q,M),Ls(o,48,B,Qe,k^65536),Ls(o,48,Ye,Le,0),vs(o,l,Le),Ls(o,32,B,Qe,k^8192),l=tt}e:do if((Ze|0)==87&&!o)if(!L)m=0;else{for(m=1;l=n[d+(m<<2)>>2]|0,!!l;)if(wZ(A+(m<<3)|0,l,u),m=m+1|0,(m|0)>=10){m=1;break e}for(;;){if(n[d+(m<<2)>>2]|0){m=-1;break e}if(m=m+1|0,(m|0)>=10){m=1;break}}}while(!1);return I=cr,m|0}function c6e(o){return o=o|0,0}function u6e(o){o=o|0}function vs(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]&32||v6e(l,u,o)|0}function CZ(o){o=o|0;var l=0,u=0,A=0;if(u=n[o>>2]|0,A=(s[u>>0]|0)+-48|0,A>>>0<10){l=0;do l=A+(l*10|0)|0,u=u+1|0,n[o>>2]=u,A=(s[u>>0]|0)+-48|0;while(A>>>0<10)}else l=0;return l|0}function wZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;e:do if(l>>>0<=20)do switch(l|0){case 9:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,n[o>>2]=l;break e}case 10:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,A=o,n[A>>2]=l,n[A+4>>2]=((l|0)<0)<<31>>31;break e}case 11:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,A=o,n[A>>2]=l,n[A+4>>2]=0;break e}case 12:{A=(n[u>>2]|0)+7&-8,l=A,d=n[l>>2]|0,l=n[l+4>>2]|0,n[u>>2]=A+8,A=o,n[A>>2]=d,n[A+4>>2]=l;break e}case 13:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,A=(A&65535)<<16>>16,d=o,n[d>>2]=A,n[d+4>>2]=((A|0)<0)<<31>>31;break e}case 14:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,d=o,n[d>>2]=A&65535,n[d+4>>2]=0;break e}case 15:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,A=(A&255)<<24>>24,d=o,n[d>>2]=A,n[d+4>>2]=((A|0)<0)<<31>>31;break e}case 16:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,d=o,n[d>>2]=A&255,n[d+4>>2]=0;break e}case 17:{d=(n[u>>2]|0)+7&-8,m=+E[d>>3],n[u>>2]=d+8,E[o>>3]=m;break e}case 18:{d=(n[u>>2]|0)+7&-8,m=+E[d>>3],n[u>>2]=d+8,E[o>>3]=m;break e}default:break e}while(!1);while(!1)}function f6e(o,l,u,A){if(o=o|0,l=l|0,u=u|0,A=A|0,!((o|0)==0&(l|0)==0))do u=u+-1|0,s[u>>0]=c[5694+(o&15)>>0]|0|A,o=qP(o|0,l|0,4)|0,l=ye;while(!((o|0)==0&(l|0)==0));return u|0}function A6e(o,l,u){if(o=o|0,l=l|0,u=u|0,!((o|0)==0&(l|0)==0))do u=u+-1|0,s[u>>0]=o&7|48,o=qP(o|0,l|0,3)|0,l=ye;while(!((o|0)==0&(l|0)==0));return u|0}function Zy(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;if(l>>>0>0|(l|0)==0&o>>>0>4294967295){for(;A=pU(o|0,l|0,10,0)|0,u=u+-1|0,s[u>>0]=A&255|48,A=o,o=AU(o|0,l|0,10,0)|0,l>>>0>9|(l|0)==9&A>>>0>4294967295;)l=ye;l=o}else l=o;if(l)for(;u=u+-1|0,s[u>>0]=(l>>>0)%10|0|48,!(l>>>0<10);)l=(l>>>0)/10|0;return u|0}function p6e(o){return o=o|0,I6e(o,n[(E6e()|0)+188>>2]|0)|0}function h6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;m=l&255,A=(u|0)!=0;e:do if(A&(o&3|0)!=0)for(d=l&255;;){if((s[o>>0]|0)==d<<24>>24){B=6;break e}if(o=o+1|0,u=u+-1|0,A=(u|0)!=0,!(A&(o&3|0)!=0)){B=5;break}}else B=5;while(!1);(B|0)==5&&(A?B=6:u=0);e:do if((B|0)==6&&(d=l&255,(s[o>>0]|0)!=d<<24>>24)){A=Ue(m,16843009)|0;t:do if(u>>>0>3){for(;m=n[o>>2]^A,!((m&-2139062144^-2139062144)&m+-16843009|0);)if(o=o+4|0,u=u+-4|0,u>>>0<=3){B=11;break t}}else B=11;while(!1);if((B|0)==11&&!u){u=0;break}for(;;){if((s[o>>0]|0)==d<<24>>24)break e;if(o=o+1|0,u=u+-1|0,!u){u=0;break}}}while(!1);return(u|0?o:0)|0}function Ls(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0;if(B=I,I=I+256|0,m=B,(u|0)>(A|0)&(d&73728|0)==0){if(d=u-A|0,eE(m|0,l|0,(d>>>0<256?d:256)|0)|0,d>>>0>255){l=u-A|0;do vs(o,m,256),d=d+-256|0;while(d>>>0>255);d=l&255}vs(o,m,d)}I=B}function BZ(o,l){return o=o|0,l=l|0,o?o=m6e(o,l,0)|0:o=0,o|0}function g6e(o,l,u,A,d,m){o=o|0,l=+l,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,We=0,Lt=0,Gr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0;Hn=I,I=I+560|0,T=Hn+8|0,tt=Hn,cr=Hn+524|0,Hr=cr,M=Hn+512|0,n[tt>>2]=0,Tr=M+12|0,vZ(l)|0,(ye|0)<0?(l=-l,fr=1,Gr=5659):(fr=(d&2049|0)!=0&1,Gr=d&2048|0?5662:d&1|0?5665:5660),vZ(l)|0,$t=ye&2146435072;do if($t>>>0<2146435072|($t|0)==2146435072&!1){if(Ye=+d6e(l,tt)*2,B=Ye!=0,B&&(n[tt>>2]=(n[tt>>2]|0)+-1),ct=m|32,(ct|0)==97){Le=m&32,ae=Le|0?Gr+9|0:Gr,q=fr|2,B=12-A|0;do if(A>>>0>11|(B|0)==0)l=Ye;else{l=8;do B=B+-1|0,l=l*16;while(B|0);if((s[ae>>0]|0)==45){l=-(l+(-Ye-l));break}else{l=Ye+l-l;break}}while(!1);k=n[tt>>2]|0,B=(k|0)<0?0-k|0:k,B=Zy(B,((B|0)<0)<<31>>31,Tr)|0,(B|0)==(Tr|0)&&(B=M+11|0,s[B>>0]=48),s[B+-1>>0]=(k>>31&2)+43,L=B+-2|0,s[L>>0]=m+15,M=(A|0)<1,T=(d&8|0)==0,B=cr;do $t=~~l,k=B+1|0,s[B>>0]=c[5694+$t>>0]|Le,l=(l-+($t|0))*16,(k-Hr|0)==1&&!(T&(M&l==0))?(s[k>>0]=46,B=B+2|0):B=k;while(l!=0);$t=B-Hr|0,Hr=Tr-L|0,Tr=(A|0)!=0&($t+-2|0)<(A|0)?A+2|0:$t,B=Hr+q+Tr|0,Ls(o,32,u,B,d),vs(o,ae,q),Ls(o,48,u,B,d^65536),vs(o,cr,$t),Ls(o,48,Tr-$t|0,0,0),vs(o,L,Hr),Ls(o,32,u,B,d^8192);break}k=(A|0)<0?6:A,B?(B=(n[tt>>2]|0)+-28|0,n[tt>>2]=B,l=Ye*268435456):(l=Ye,B=n[tt>>2]|0),$t=(B|0)<0?T:T+288|0,T=$t;do We=~~l>>>0,n[T>>2]=We,T=T+4|0,l=(l-+(We>>>0))*1e9;while(l!=0);if((B|0)>0)for(M=$t,q=T;;){if(L=(B|0)<29?B:29,B=q+-4|0,B>>>0>=M>>>0){T=0;do He=kZ(n[B>>2]|0,0,L|0)|0,He=fU(He|0,ye|0,T|0,0)|0,We=ye,Ze=pU(He|0,We|0,1e9,0)|0,n[B>>2]=Ze,T=AU(He|0,We|0,1e9,0)|0,B=B+-4|0;while(B>>>0>=M>>>0);T&&(M=M+-4|0,n[M>>2]=T)}for(T=q;!(T>>>0<=M>>>0);)if(B=T+-4|0,!(n[B>>2]|0))T=B;else break;if(B=(n[tt>>2]|0)-L|0,n[tt>>2]=B,(B|0)>0)q=T;else break}else M=$t;if((B|0)<0){A=((k+25|0)/9|0)+1|0,Qe=(ct|0)==102;do{if(Le=0-B|0,Le=(Le|0)<9?Le:9,M>>>0<T>>>0){L=(1<<Le)+-1|0,q=1e9>>>Le,ae=0,B=M;do We=n[B>>2]|0,n[B>>2]=(We>>>Le)+ae,ae=Ue(We&L,q)|0,B=B+4|0;while(B>>>0<T>>>0);B=n[M>>2]|0?M:M+4|0,ae?(n[T>>2]=ae,M=B,B=T+4|0):(M=B,B=T)}else M=n[M>>2]|0?M:M+4|0,B=T;T=Qe?$t:M,T=(B-T>>2|0)>(A|0)?T+(A<<2)|0:B,B=(n[tt>>2]|0)+Le|0,n[tt>>2]=B}while((B|0)<0);B=M,A=T}else B=M,A=T;if(We=$t,B>>>0<A>>>0){if(T=(We-B>>2)*9|0,L=n[B>>2]|0,L>>>0>=10){M=10;do M=M*10|0,T=T+1|0;while(L>>>0>=M>>>0)}}else T=0;if(Qe=(ct|0)==103,Ze=(k|0)!=0,M=k-((ct|0)!=102?T:0)+((Ze&Qe)<<31>>31)|0,(M|0)<(((A-We>>2)*9|0)+-9|0)){if(M=M+9216|0,Le=$t+4+(((M|0)/9|0)+-1024<<2)|0,M=((M|0)%9|0)+1|0,(M|0)<9){L=10;do L=L*10|0,M=M+1|0;while((M|0)!=9)}else L=10;if(q=n[Le>>2]|0,ae=(q>>>0)%(L>>>0)|0,M=(Le+4|0)==(A|0),M&(ae|0)==0)M=Le;else if(Ye=((q>>>0)/(L>>>0)|0)&1|0?9007199254740994:9007199254740992,He=(L|0)/2|0,l=ae>>>0<He>>>0?.5:M&(ae|0)==(He|0)?1:1.5,fr&&(He=(s[Gr>>0]|0)==45,l=He?-l:l,Ye=He?-Ye:Ye),M=q-ae|0,n[Le>>2]=M,Ye+l!=Ye){if(He=M+L|0,n[Le>>2]=He,He>>>0>999999999)for(T=Le;M=T+-4|0,n[T>>2]=0,M>>>0<B>>>0&&(B=B+-4|0,n[B>>2]=0),He=(n[M>>2]|0)+1|0,n[M>>2]=He,He>>>0>999999999;)T=M;else M=Le;if(T=(We-B>>2)*9|0,q=n[B>>2]|0,q>>>0>=10){L=10;do L=L*10|0,T=T+1|0;while(q>>>0>=L>>>0)}}else M=Le;M=M+4|0,M=A>>>0>M>>>0?M:A,He=B}else M=A,He=B;for(ct=M;;){if(ct>>>0<=He>>>0){tt=0;break}if(B=ct+-4|0,!(n[B>>2]|0))ct=B;else{tt=1;break}}A=0-T|0;do if(Qe)if(B=((Ze^1)&1)+k|0,(B|0)>(T|0)&(T|0)>-5?(L=m+-1|0,k=B+-1-T|0):(L=m+-2|0,k=B+-1|0),B=d&8,B)Le=B;else{if(tt&&(Lt=n[ct+-4>>2]|0,(Lt|0)!=0))if((Lt>>>0)%10|0)M=0;else{M=0,B=10;do B=B*10|0,M=M+1|0;while(!((Lt>>>0)%(B>>>0)|0|0))}else M=9;if(B=((ct-We>>2)*9|0)+-9|0,(L|32|0)==102){Le=B-M|0,Le=(Le|0)>0?Le:0,k=(k|0)<(Le|0)?k:Le,Le=0;break}else{Le=B+T-M|0,Le=(Le|0)>0?Le:0,k=(k|0)<(Le|0)?k:Le,Le=0;break}}else L=m,Le=d&8;while(!1);if(Qe=k|Le,q=(Qe|0)!=0&1,ae=(L|32|0)==102,ae)Ze=0,B=(T|0)>0?T:0;else{if(B=(T|0)<0?A:T,B=Zy(B,((B|0)<0)<<31>>31,Tr)|0,M=Tr,(M-B|0)<2)do B=B+-1|0,s[B>>0]=48;while((M-B|0)<2);s[B+-1>>0]=(T>>31&2)+43,B=B+-2|0,s[B>>0]=L,Ze=B,B=M-B|0}if(B=fr+1+k+q+B|0,Ls(o,32,u,B,d),vs(o,Gr,fr),Ls(o,48,u,B,d^65536),ae){L=He>>>0>$t>>>0?$t:He,Le=cr+9|0,q=Le,ae=cr+8|0,M=L;do{if(T=Zy(n[M>>2]|0,0,Le)|0,(M|0)==(L|0))(T|0)==(Le|0)&&(s[ae>>0]=48,T=ae);else if(T>>>0>cr>>>0){eE(cr|0,48,T-Hr|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}vs(o,T,q-T|0),M=M+4|0}while(M>>>0<=$t>>>0);if(Qe|0&&vs(o,5710,1),M>>>0<ct>>>0&(k|0)>0)for(;;){if(T=Zy(n[M>>2]|0,0,Le)|0,T>>>0>cr>>>0){eE(cr|0,48,T-Hr|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}if(vs(o,T,(k|0)<9?k:9),M=M+4|0,T=k+-9|0,M>>>0<ct>>>0&(k|0)>9)k=T;else{k=T;break}}Ls(o,48,k+9|0,9,0)}else{if(Qe=tt?ct:He+4|0,(k|0)>-1){tt=cr+9|0,Le=(Le|0)==0,A=tt,q=0-Hr|0,ae=cr+8|0,L=He;do{T=Zy(n[L>>2]|0,0,tt)|0,(T|0)==(tt|0)&&(s[ae>>0]=48,T=ae);do if((L|0)==(He|0)){if(M=T+1|0,vs(o,T,1),Le&(k|0)<1){T=M;break}vs(o,5710,1),T=M}else{if(T>>>0<=cr>>>0)break;eE(cr|0,48,T+q|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}while(!1);Hr=A-T|0,vs(o,T,(k|0)>(Hr|0)?Hr:k),k=k-Hr|0,L=L+4|0}while(L>>>0<Qe>>>0&(k|0)>-1)}Ls(o,48,k+18|0,18,0),vs(o,Ze,Tr-Ze|0)}Ls(o,32,u,B,d^8192)}else cr=(m&32|0)!=0,B=fr+3|0,Ls(o,32,u,B,d&-65537),vs(o,Gr,fr),vs(o,l!=l|!1?cr?5686:5690:cr?5678:5682,3),Ls(o,32,u,B,d^8192);while(!1);return I=Hn,((B|0)<(u|0)?u:B)|0}function vZ(o){o=+o;var l=0;return E[S>>3]=o,l=n[S>>2]|0,ye=n[S+4>>2]|0,l|0}function d6e(o,l){return o=+o,l=l|0,+ +SZ(o,l)}function SZ(o,l){o=+o,l=l|0;var u=0,A=0,d=0;switch(E[S>>3]=o,u=n[S>>2]|0,A=n[S+4>>2]|0,d=qP(u|0,A|0,52)|0,d&2047){case 0:{o!=0?(o=+SZ(o*18446744073709552e3,l),u=(n[l>>2]|0)+-64|0):u=0,n[l>>2]=u;break}case 2047:break;default:n[l>>2]=(d&2047)+-1022,n[S>>2]=u,n[S+4>>2]=A&-2146435073|1071644672,o=+E[S>>3]}return+o}function m6e(o,l,u){o=o|0,l=l|0,u=u|0;do if(o){if(l>>>0<128){s[o>>0]=l,o=1;break}if(!(n[n[(y6e()|0)+188>>2]>>2]|0))if((l&-128|0)==57216){s[o>>0]=l,o=1;break}else{n[(Xy()|0)>>2]=84,o=-1;break}if(l>>>0<2048){s[o>>0]=l>>>6|192,s[o+1>>0]=l&63|128,o=2;break}if(l>>>0<55296|(l&-8192|0)==57344){s[o>>0]=l>>>12|224,s[o+1>>0]=l>>>6&63|128,s[o+2>>0]=l&63|128,o=3;break}if((l+-65536|0)>>>0<1048576){s[o>>0]=l>>>18|240,s[o+1>>0]=l>>>12&63|128,s[o+2>>0]=l>>>6&63|128,s[o+3>>0]=l&63|128,o=4;break}else{n[(Xy()|0)>>2]=84,o=-1;break}}else o=1;while(!1);return o|0}function y6e(){return lU()|0}function E6e(){return lU()|0}function I6e(o,l){o=o|0,l=l|0;var u=0,A=0;for(A=0;;){if((c[5712+A>>0]|0)==(o|0)){o=2;break}if(u=A+1|0,(u|0)==87){u=5800,A=87,o=5;break}else A=u}if((o|0)==2&&(A?(u=5800,o=5):u=5800),(o|0)==5)for(;;){do o=u,u=u+1|0;while(s[o>>0]|0);if(A=A+-1|0,A)o=5;else break}return C6e(u,n[l+20>>2]|0)|0}function C6e(o,l){return o=o|0,l=l|0,w6e(o,l)|0}function w6e(o,l){return o=o|0,l=l|0,l?l=B6e(n[l>>2]|0,n[l+4>>2]|0,o)|0:l=0,(l|0?l:o)|0}function B6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0;ae=(n[o>>2]|0)+1794895138|0,m=Ad(n[o+8>>2]|0,ae)|0,A=Ad(n[o+12>>2]|0,ae)|0,d=Ad(n[o+16>>2]|0,ae)|0;e:do if(m>>>0<l>>>2>>>0&&(q=l-(m<<2)|0,A>>>0<q>>>0&d>>>0<q>>>0)&&!((d|A)&3|0)){for(q=A>>>2,L=d>>>2,M=0;;){if(k=m>>>1,T=M+k|0,B=T<<1,d=B+q|0,A=Ad(n[o+(d<<2)>>2]|0,ae)|0,d=Ad(n[o+(d+1<<2)>>2]|0,ae)|0,!(d>>>0<l>>>0&A>>>0<(l-d|0)>>>0)){A=0;break e}if(s[o+(d+A)>>0]|0){A=0;break e}if(A=EZ(u,o+d|0)|0,!A)break;if(A=(A|0)<0,(m|0)==1){A=0;break e}else M=A?M:T,m=A?k:m-k|0}A=B+L|0,d=Ad(n[o+(A<<2)>>2]|0,ae)|0,A=Ad(n[o+(A+1<<2)>>2]|0,ae)|0,A>>>0<l>>>0&d>>>0<(l-A|0)>>>0?A=s[o+(A+d)>>0]|0?0:o+A|0:A=0}else A=0;while(!1);return A|0}function Ad(o,l){o=o|0,l=l|0;var u=0;return u=RZ(o|0)|0,(l|0?u:o)|0}function v6e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=u+16|0,d=n[A>>2]|0,d?m=5:S6e(u)|0?A=0:(d=n[A>>2]|0,m=5);e:do if((m|0)==5){if(k=u+20|0,B=n[k>>2]|0,A=B,(d-B|0)>>>0<l>>>0){A=YP[n[u+36>>2]&7](u,o,l)|0;break}t:do if((s[u+75>>0]|0)>-1){for(B=l;;){if(!B){m=0,d=o;break t}if(d=B+-1|0,(s[o+d>>0]|0)==10)break;B=d}if(A=YP[n[u+36>>2]&7](u,o,B)|0,A>>>0<B>>>0)break e;m=B,d=o+B|0,l=l-B|0,A=n[k>>2]|0}else m=0,d=o;while(!1);Qr(A|0,d|0,l|0)|0,n[k>>2]=(n[k>>2]|0)+l,A=m+l|0}while(!1);return A|0}function S6e(o){o=o|0;var l=0,u=0;return l=o+74|0,u=s[l>>0]|0,s[l>>0]=u+255|u,l=n[o>>2]|0,l&8?(n[o>>2]=l|32,o=-1):(n[o+8>>2]=0,n[o+4>>2]=0,u=n[o+44>>2]|0,n[o+28>>2]=u,n[o+20>>2]=u,n[o+16>>2]=u+(n[o+48>>2]|0),o=0),o|0}function $n(o,l){o=y(o),l=y(l);var u=0,A=0;u=DZ(o)|0;do if((u&2147483647)>>>0<=2139095040){if(A=DZ(l)|0,(A&2147483647)>>>0<=2139095040)if((A^u|0)<0){o=(u|0)<0?l:o;break}else{o=o<l?l:o;break}}else o=l;while(!1);return y(o)}function DZ(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function pd(o,l){o=y(o),l=y(l);var u=0,A=0;u=bZ(o)|0;do if((u&2147483647)>>>0<=2139095040){if(A=bZ(l)|0,(A&2147483647)>>>0<=2139095040)if((A^u|0)<0){o=(u|0)<0?o:l;break}else{o=o<l?o:l;break}}else o=l;while(!1);return y(o)}function bZ(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function uU(o,l){o=y(o),l=y(l);var u=0,A=0,d=0,m=0,B=0,k=0,T=0,M=0;m=(h[S>>2]=o,n[S>>2]|0),k=(h[S>>2]=l,n[S>>2]|0),u=m>>>23&255,B=k>>>23&255,T=m&-2147483648,d=k<<1;e:do if(d|0&&!((u|0)==255|((D6e(l)|0)&2147483647)>>>0>2139095040)){if(A=m<<1,A>>>0<=d>>>0)return l=y(o*y(0)),y((A|0)==(d|0)?l:o);if(u)A=m&8388607|8388608;else{if(u=m<<9,(u|0)>-1){A=u,u=0;do u=u+-1|0,A=A<<1;while((A|0)>-1)}else u=0;A=m<<1-u}if(B)k=k&8388607|8388608;else{if(m=k<<9,(m|0)>-1){d=0;do d=d+-1|0,m=m<<1;while((m|0)>-1)}else d=0;B=d,k=k<<1-d}d=A-k|0,m=(d|0)>-1;t:do if((u|0)>(B|0)){for(;;){if(m)if(d)A=d;else break;if(A=A<<1,u=u+-1|0,d=A-k|0,m=(d|0)>-1,(u|0)<=(B|0))break t}l=y(o*y(0));break e}while(!1);if(m)if(d)A=d;else{l=y(o*y(0));break}if(A>>>0<8388608)do A=A<<1,u=u+-1|0;while(A>>>0<8388608);(u|0)>0?u=A+-8388608|u<<23:u=A>>>(1-u|0),l=(n[S>>2]=u|T,y(h[S>>2]))}else M=3;while(!1);return(M|0)==3&&(l=y(o*l),l=y(l/l)),y(l)}function D6e(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function b6e(o,l){return o=o|0,l=l|0,IZ(n[582]|0,o,l)|0}function an(o){o=o|0,Nt()}function $y(o){o=o|0}function P6e(o,l){return o=o|0,l=l|0,0}function x6e(o){return o=o|0,(PZ(o+4|0)|0)==-1?(ip[n[(n[o>>2]|0)+8>>2]&127](o),o=1):o=0,o|0}function PZ(o){o=o|0;var l=0;return l=n[o>>2]|0,n[o>>2]=l+-1,l+-1|0}function Gh(o){o=o|0,x6e(o)|0&&k6e(o)}function k6e(o){o=o|0;var l=0;l=o+8|0,n[l>>2]|0&&(PZ(l)|0)!=-1||ip[n[(n[o>>2]|0)+16>>2]&127](o)}function Kt(o){o=o|0;var l=0;for(l=o|0?o:1;o=_P(l)|0,!(o|0);){if(o=T6e()|0,!o){o=0;break}GZ[o&0]()}return o|0}function xZ(o){return o=o|0,Kt(o)|0}function It(o){o=o|0,HP(o)}function Q6e(o){o=o|0,(s[o+11>>0]|0)<0&&It(n[o>>2]|0)}function T6e(){var o=0;return o=n[2923]|0,n[2923]=o+0,o|0}function R6e(){}function GP(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,A=l-A-(u>>>0>o>>>0|0)>>>0,ye=A,o-u>>>0|0|0}function fU(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,u=o+u>>>0,ye=l+A+(u>>>0<o>>>0|0)>>>0,u|0|0}function eE(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;if(m=o+u|0,l=l&255,(u|0)>=67){for(;o&3;)s[o>>0]=l,o=o+1|0;for(A=m&-4|0,d=A-64|0,B=l|l<<8|l<<16|l<<24;(o|0)<=(d|0);)n[o>>2]=B,n[o+4>>2]=B,n[o+8>>2]=B,n[o+12>>2]=B,n[o+16>>2]=B,n[o+20>>2]=B,n[o+24>>2]=B,n[o+28>>2]=B,n[o+32>>2]=B,n[o+36>>2]=B,n[o+40>>2]=B,n[o+44>>2]=B,n[o+48>>2]=B,n[o+52>>2]=B,n[o+56>>2]=B,n[o+60>>2]=B,o=o+64|0;for(;(o|0)<(A|0);)n[o>>2]=B,o=o+4|0}for(;(o|0)<(m|0);)s[o>>0]=l,o=o+1|0;return m-u|0}function kZ(o,l,u){return o=o|0,l=l|0,u=u|0,(u|0)<32?(ye=l<<u|(o&(1<<u)-1<<32-u)>>>32-u,o<<u):(ye=o<<u-32,0)}function qP(o,l,u){return o=o|0,l=l|0,u=u|0,(u|0)<32?(ye=l>>>u,o>>>u|(l&(1<<u)-1)<<32-u):(ye=0,l>>>u-32|0)}function Qr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;if((u|0)>=8192)return OA(o|0,l|0,u|0)|0;if(m=o|0,d=o+u|0,(o&3)==(l&3)){for(;o&3;){if(!u)return m|0;s[o>>0]=s[l>>0]|0,o=o+1|0,l=l+1|0,u=u-1|0}for(u=d&-4|0,A=u-64|0;(o|0)<=(A|0);)n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2],n[o+16>>2]=n[l+16>>2],n[o+20>>2]=n[l+20>>2],n[o+24>>2]=n[l+24>>2],n[o+28>>2]=n[l+28>>2],n[o+32>>2]=n[l+32>>2],n[o+36>>2]=n[l+36>>2],n[o+40>>2]=n[l+40>>2],n[o+44>>2]=n[l+44>>2],n[o+48>>2]=n[l+48>>2],n[o+52>>2]=n[l+52>>2],n[o+56>>2]=n[l+56>>2],n[o+60>>2]=n[l+60>>2],o=o+64|0,l=l+64|0;for(;(o|0)<(u|0);)n[o>>2]=n[l>>2],o=o+4|0,l=l+4|0}else for(u=d-4|0;(o|0)<(u|0);)s[o>>0]=s[l>>0]|0,s[o+1>>0]=s[l+1>>0]|0,s[o+2>>0]=s[l+2>>0]|0,s[o+3>>0]=s[l+3>>0]|0,o=o+4|0,l=l+4|0;for(;(o|0)<(d|0);)s[o>>0]=s[l>>0]|0,o=o+1|0,l=l+1|0;return m|0}function QZ(o){o=o|0;var l=0;return l=s[N+(o&255)>>0]|0,(l|0)<8?l|0:(l=s[N+(o>>8&255)>>0]|0,(l|0)<8?l+8|0:(l=s[N+(o>>16&255)>>0]|0,(l|0)<8?l+16|0:(s[N+(o>>>24)>>0]|0)+24|0))}function TZ(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,M=0,L=0,q=0,ae=0,Ye=0,Le=0;if(L=o,T=l,M=T,B=u,ae=A,k=ae,!M)return m=(d|0)!=0,k?m?(n[d>>2]=o|0,n[d+4>>2]=l&0,ae=0,d=0,ye=ae,d|0):(ae=0,d=0,ye=ae,d|0):(m&&(n[d>>2]=(L>>>0)%(B>>>0),n[d+4>>2]=0),ae=0,d=(L>>>0)/(B>>>0)>>>0,ye=ae,d|0);m=(k|0)==0;do if(B){if(!m){if(m=(b(k|0)|0)-(b(M|0)|0)|0,m>>>0<=31){q=m+1|0,k=31-m|0,l=m-31>>31,B=q,o=L>>>(q>>>0)&l|M<<k,l=M>>>(q>>>0)&l,m=0,k=L<<k;break}return d?(n[d>>2]=o|0,n[d+4>>2]=T|l&0,ae=0,d=0,ye=ae,d|0):(ae=0,d=0,ye=ae,d|0)}if(m=B-1|0,m&B|0){k=(b(B|0)|0)+33-(b(M|0)|0)|0,Le=64-k|0,q=32-k|0,T=q>>31,Ye=k-32|0,l=Ye>>31,B=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+4>>2]=l),Ye=(m|0)>>>31|(M|B)<<1|(B<<1|m>>>31)&0|T,Le=(m<<1|0)&-2|k,ye=Ye,Le|0}function AU(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,TZ(o,l,u,A,0)|0}function qh(o){o=o|0;var l=0,u=0;return u=o+15&-16|0,l=n[C>>2]|0,o=l+u|0,(u|0)>0&(o|0)<(l|0)|(o|0)<0?(oe()|0,fu(12),-1):(n[C>>2]=o,(o|0)>($()|0)&&!(X()|0)?(n[C>>2]=l,fu(12),-1):l|0)}function Q2(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;if((l|0)<(o|0)&(o|0)<(l+u|0)){for(A=o,l=l+u|0,o=o+u|0;(u|0)>0;)o=o-1|0,l=l-1|0,u=u-1|0,s[o>>0]=s[l>>0]|0;o=A}else Qr(o,l,u)|0;return o|0}function pU(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;return m=I,I=I+16|0,d=m|0,TZ(o,l,u,A,d)|0,I=m,ye=n[d+4>>2]|0,n[d>>2]|0|0}function RZ(o){return o=o|0,(o&255)<<24|(o>>8&255)<<16|(o>>16&255)<<8|o>>>24|0}function F6e(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,FZ[o&1](l|0,u|0,A|0,d|0,m|0)}function N6e(o,l,u){o=o|0,l=l|0,u=y(u),NZ[o&1](l|0,y(u))}function O6e(o,l,u){o=o|0,l=l|0,u=+u,OZ[o&31](l|0,+u)}function L6e(o,l,u,A){return o=o|0,l=l|0,u=y(u),A=y(A),y(LZ[o&0](l|0,y(u),y(A)))}function M6e(o,l){o=o|0,l=l|0,ip[o&127](l|0)}function U6e(o,l,u){o=o|0,l=l|0,u=u|0,sp[o&31](l|0,u|0)}function _6e(o,l){return o=o|0,l=l|0,gd[o&31](l|0)|0}function H6e(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0,MZ[o&1](l|0,+u,+A,d|0)}function j6e(o,l,u,A){o=o|0,l=l|0,u=+u,A=+A,wGe[o&1](l|0,+u,+A)}function G6e(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,YP[o&7](l|0,u|0,A|0)|0}function q6e(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,+BGe[o&1](l|0,u|0,A|0)}function W6e(o,l){return o=o|0,l=l|0,+UZ[o&15](l|0)}function Y6e(o,l,u){return o=o|0,l=l|0,u=+u,vGe[o&1](l|0,+u)|0}function V6e(o,l,u){return o=o|0,l=l|0,u=u|0,gU[o&15](l|0,u|0)|0}function J6e(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=+A,d=+d,m=m|0,SGe[o&1](l|0,u|0,+A,+d,m|0)}function K6e(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,DGe[o&1](l|0,u|0,A|0,d|0,m|0,B|0)}function z6e(o,l,u){return o=o|0,l=l|0,u=u|0,+_Z[o&7](l|0,u|0)}function X6e(o){return o=o|0,VP[o&7]()|0}function Z6e(o,l,u,A,d,m){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,HZ[o&1](l|0,u|0,A|0,d|0,m|0)|0}function $6e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=+d,bGe[o&1](l|0,u|0,A|0,+d)}function eGe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=y(A),d=d|0,m=y(m),B=B|0,jZ[o&1](l|0,u|0,y(A),d|0,y(m),B|0)}function tGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,F2[o&15](l|0,u|0,A|0)}function rGe(o){o=o|0,GZ[o&0]()}function nGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A,qZ[o&15](l|0,u|0,+A)}function iGe(o,l,u){return o=o|0,l=+l,u=+u,PGe[o&1](+l,+u)|0}function sGe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,dU[o&15](l|0,u|0,A|0,d|0)}function oGe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,F(0)}function aGe(o,l){o=o|0,l=y(l),F(1)}function Xa(o,l){o=o|0,l=+l,F(2)}function lGe(o,l,u){return o=o|0,l=y(l),u=y(u),F(3),$e}function wr(o){o=o|0,F(4)}function T2(o,l){o=o|0,l=l|0,F(5)}function Ol(o){return o=o|0,F(6),0}function cGe(o,l,u,A){o=o|0,l=+l,u=+u,A=A|0,F(7)}function uGe(o,l,u){o=o|0,l=+l,u=+u,F(8)}function fGe(o,l,u){return o=o|0,l=l|0,u=u|0,F(9),0}function AGe(o,l,u){return o=o|0,l=l|0,u=u|0,F(10),0}function hd(o){return o=o|0,F(11),0}function pGe(o,l){return o=o|0,l=+l,F(12),0}function R2(o,l){return o=o|0,l=l|0,F(13),0}function hGe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0,F(14)}function gGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,F(15)}function hU(o,l){return o=o|0,l=l|0,F(16),0}function dGe(){return F(17),0}function mGe(o,l,u,A,d){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,F(18),0}function yGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A,F(19)}function EGe(o,l,u,A,d,m){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0,F(20)}function WP(o,l,u){o=o|0,l=l|0,u=u|0,F(21)}function IGe(){F(22)}function tE(o,l,u){o=o|0,l=l|0,u=+u,F(23)}function CGe(o,l){return o=+o,l=+l,F(24),0}function rE(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,F(25)}var FZ=[oGe,m3e],NZ=[aGe,Ty],OZ=[Xa,Zg,Fh,h2,g2,d2,m2,bf,_y,y2,Pf,$g,ed,E2,I2,wu,td,C2,Hy,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa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2=[WP,ko,yP,eM,vu,nTe,ARe,aOe,BOe,VL,_3e,z8e,cje,WP,WP,WP],GZ=[IGe],qZ=[tE,KL,My,ZA,p2,Bu,jy,rd,xNe,DMe,qUe,tE,tE,tE,tE,tE],PGe=[CGe,q_e],dU=[rE,xRe,_Le,WMe,RUe,u_e,k_e,u4e,U4e,P8e,Fje,rE,rE,rE,rE,rE];return{_llvm_bswap_i32:RZ,dynCall_idd:iGe,dynCall_i:X6e,_i64Subtract:GP,___udivdi3:AU,dynCall_vif:N6e,setThrew:ca,dynCall_viii:tGe,_bitshift64Lshr:qP,_bitshift64Shl:kZ,dynCall_vi:M6e,dynCall_viiddi:J6e,dynCall_diii:q6e,dynCall_iii:V6e,_memset:eE,_sbrk:qh,_memcpy:Qr,__GLOBAL__sub_I_Yoga_cpp:a2,dynCall_vii:U6e,___uremdi3:pU,dynCall_vid:O6e,stackAlloc:Ua,_nbind_init:Wje,getTempRet0:MA,dynCall_di:W6e,dynCall_iid:Y6e,setTempRet0:LA,_i64Add:fU,dynCall_fiff:L6e,dynCall_iiii:G6e,_emscripten_get_global_libc:r6e,dynCall_viid:nGe,dynCall_viiid:$6e,dynCall_viififi:eGe,dynCall_ii:_6e,__GLOBAL__sub_I_Binding_cc:a8e,dynCall_viiii:sGe,dynCall_iiiiii:Z6e,stackSave:hf,dynCall_viiiii:F6e,__GLOBAL__sub_I_nbind_cc:Sr,dynCall_vidd:j6e,_free:HP,runPostSets:R6e,dynCall_viiiiii:K6e,establishStackSpace:wn,_memmove:Q2,stackRestore:lc,_malloc:_P,__GLOBAL__sub_I_common_cc:b4e,dynCall_viddi:H6e,dynCall_dii:z6e,dynCall_v:rGe}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(t){this.name=\"ExitStatus\",this.message=\"Program terminated with exit(\"+t+\")\",this.status=t}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function t(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=t)},Module.callMain=Module.callMain=function t(e){e=e||[],ensureInitRuntime();var r=e.length+1;function s(){for(var p=0;p<3;p++)a.push(0)}var a=[allocate(intArrayFromString(Module.thisProgram),\"i8\",ALLOC_NORMAL)];s();for(var n=0;n<r-1;n=n+1)a.push(allocate(intArrayFromString(e[n]),\"i8\",ALLOC_NORMAL)),s();a.push(0),a=allocate(a,\"i32\",ALLOC_NORMAL);try{var c=Module._main(r,a,0);exit(c,!0)}catch(p){if(p instanceof ExitStatus)return;if(p==\"SimulateInfiniteLoop\"){Module.noExitRuntime=!0;return}else{var f=p;p&&typeof p==\"object\"&&p.stack&&(f=[p,p.stack]),Module.printErr(\"exception thrown: \"+f),Module.quit(1,p)}}finally{calledMain=!0}};function run(t){if(t=t||Module.arguments,preloadStartTime===null&&(preloadStartTime=Date.now()),runDependencies>0||(preRun(),runDependencies>0)||Module.calledRun)return;function e(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(t),postRun()))}Module.setStatus?(Module.setStatus(\"Running...\"),setTimeout(function(){setTimeout(function(){Module.setStatus(\"\")},1),e()},1)):e()}Module.run=Module.run=run;function exit(t,e){e&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=t,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(t)),ENVIRONMENT_IS_NODE&&process.exit(t),Module.quit(t,new ExitStatus(t)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(t){Module.onAbort&&Module.onAbort(t),t!==void 0?(Module.print(t),Module.printErr(t),t=JSON.stringify(t)):t=\"\",ABORT=!0,EXITSTATUS=1;var e=`\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r=\"abort(\"+t+\") at \"+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(s){r=s(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit==\"function\"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var Fm=_((PKt,Rwe)=>{\"use strict\";var Ppt=Qwe(),xpt=Twe(),K9=!1,z9=null;xpt({},function(t,e){if(!K9){if(K9=!0,t)throw t;z9=e}});if(!K9)throw new Error(\"Failed to load the yoga module - it needed to be loaded synchronously, but didn't\");Rwe.exports=Ppt(z9.bind,z9.lib)});var Z9=_((xKt,X9)=>{\"use strict\";var Fwe=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);X9.exports=Fwe;X9.exports.default=Fwe});var Owe=_((kKt,Nwe)=>{\"use strict\";Nwe.exports=function(){return/\\uD83C\\uDFF4\\uDB40\\uDC67\\uDB40\\uDC62(?:\\uDB40\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67|\\uDB40\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDB40\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73)\\uDB40\\uDC7F|\\uD83D\\uDC68(?:\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C\\uDFFB|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFE])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83D\\uDC68|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D[\\uDC66\\uDC67])|[\\u2695\\u2696\\u2708]\\uFE0F|\\uD83D[\\uDC66\\uDC67]|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|(?:\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708])\\uFE0F|\\uD83C\\uDFFB\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C[\\uDFFB-\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFB\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)\\uD83C\\uDFFB|\\uD83E\\uDDD1(?:\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1)|(?:\\uD83E\\uDDD1\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFE])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83D\\uDC69(?:\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-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uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|(?:\\uD83E\\uDDD1\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8|\\uD83D\\uDC69(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|(?:(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)\\uFE0F|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF])\\u200D[\\u2640\\u2642]|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\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FD\\u25FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u270A\\u270B\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF93\\uDFA0-\\uDFCA\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF4\\uDFF8-\\uDFFF]|\\uD83D[\\uDC00-\\uDC3E\\uDC40\\uDC42-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDD7A\\uDD95\\uDD96\\uDDA4\\uDDFB-\\uDE4F\\uDE80-\\uDEC5\\uDECC\\uDED0-\\uDED2\\uDED5\\uDEEB\\uDEEC\\uDEF4-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])|(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5\\uDEE0-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])\\uFE0F|(?:[\\u261D\\u26F9\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2-\\uDFC4\\uDFC7\\uDFCA-\\uDFCC]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66-\\uDC78\\uDC7C\\uDC81-\\uDC83\\uDC85-\\uDC87\\uDC8F\\uDC91\\uDCAA\\uDD74\\uDD75\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE45-\\uDE47\\uDE4B-\\uDE4F\\uDEA3\\uDEB4-\\uDEB6\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1F\\uDD26\\uDD30-\\uDD39\\uDD3C-\\uDD3E\\uDDB5\\uDDB6\\uDDB8\\uDDB9\\uDDBB\\uDDCD-\\uDDCF\\uDDD1-\\uDDDD])/g}});var GS=_((QKt,$9)=>{\"use strict\";var kpt=dk(),Qpt=Z9(),Tpt=Owe(),Lwe=t=>{if(typeof t!=\"string\"||t.length===0||(t=kpt(t),t.length===0))return 0;t=t.replace(Tpt(),\"  \");let e=0;for(let r=0;r<t.length;r++){let s=t.codePointAt(r);s<=31||s>=127&&s<=159||s>=768&&s<=879||(s>65535&&r++,e+=Qpt(s)?2:1)}return e};$9.exports=Lwe;$9.exports.default=Lwe});var tW=_((TKt,eW)=>{\"use strict\";var Rpt=GS(),Mwe=t=>{let e=0;for(let r of t.split(`\n`))e=Math.max(e,Rpt(r));return e};eW.exports=Mwe;eW.exports.default=Mwe});var Uwe=_(qS=>{\"use strict\";var Fpt=qS&&qS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qS,\"__esModule\",{value:!0});var Npt=Fpt(tW()),rW={};qS.default=t=>{if(t.length===0)return{width:0,height:0};if(rW[t])return rW[t];let e=Npt.default(t),r=t.split(`\n`).length;return rW[t]={width:e,height:r},{width:e,height:r}}});var _we=_(WS=>{\"use strict\";var Opt=WS&&WS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(WS,\"__esModule\",{value:!0});var bn=Opt(Fm()),Lpt=(t,e)=>{\"position\"in e&&t.setPositionType(e.position===\"absolute\"?bn.default.POSITION_TYPE_ABSOLUTE:bn.default.POSITION_TYPE_RELATIVE)},Mpt=(t,e)=>{\"marginLeft\"in e&&t.setMargin(bn.default.EDGE_START,e.marginLeft||0),\"marginRight\"in e&&t.setMargin(bn.default.EDGE_END,e.marginRight||0),\"marginTop\"in e&&t.setMargin(bn.default.EDGE_TOP,e.marginTop||0),\"marginBottom\"in e&&t.setMargin(bn.default.EDGE_BOTTOM,e.marginBottom||0)},Upt=(t,e)=>{\"paddingLeft\"in e&&t.setPadding(bn.default.EDGE_LEFT,e.paddingLeft||0),\"paddingRight\"in e&&t.setPadding(bn.default.EDGE_RIGHT,e.paddingRight||0),\"paddingTop\"in e&&t.setPadding(bn.default.EDGE_TOP,e.paddingTop||0),\"paddingBottom\"in e&&t.setPadding(bn.default.EDGE_BOTTOM,e.paddingBottom||0)},_pt=(t,e)=>{var r;\"flexGrow\"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),\"flexShrink\"in e&&t.setFlexShrink(typeof e.flexShrink==\"number\"?e.flexShrink:1),\"flexDirection\"in e&&(e.flexDirection===\"row\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW),e.flexDirection===\"row-reverse\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection===\"column\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN),e.flexDirection===\"column-reverse\"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN_REVERSE)),\"flexBasis\"in e&&(typeof e.flexBasis==\"number\"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis==\"string\"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),\"alignItems\"in e&&((e.alignItems===\"stretch\"||!e.alignItems)&&t.setAlignItems(bn.default.ALIGN_STRETCH),e.alignItems===\"flex-start\"&&t.setAlignItems(bn.default.ALIGN_FLEX_START),e.alignItems===\"center\"&&t.setAlignItems(bn.default.ALIGN_CENTER),e.alignItems===\"flex-end\"&&t.setAlignItems(bn.default.ALIGN_FLEX_END)),\"alignSelf\"in e&&((e.alignSelf===\"auto\"||!e.alignSelf)&&t.setAlignSelf(bn.default.ALIGN_AUTO),e.alignSelf===\"flex-start\"&&t.setAlignSelf(bn.default.ALIGN_FLEX_START),e.alignSelf===\"center\"&&t.setAlignSelf(bn.default.ALIGN_CENTER),e.alignSelf===\"flex-end\"&&t.setAlignSelf(bn.default.ALIGN_FLEX_END)),\"justifyContent\"in e&&((e.justifyContent===\"flex-start\"||!e.justifyContent)&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_START),e.justifyContent===\"center\"&&t.setJustifyContent(bn.default.JUSTIFY_CENTER),e.justifyContent===\"flex-end\"&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_END),e.justifyContent===\"space-between\"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent===\"space-around\"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_AROUND))},Hpt=(t,e)=>{var r,s;\"width\"in e&&(typeof e.width==\"number\"?t.setWidth(e.width):typeof e.width==\"string\"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),\"height\"in e&&(typeof e.height==\"number\"?t.setHeight(e.height):typeof e.height==\"string\"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),\"minWidth\"in e&&(typeof e.minWidth==\"string\"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),\"minHeight\"in e&&(typeof e.minHeight==\"string\"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((s=e.minHeight)!==null&&s!==void 0?s:0))},jpt=(t,e)=>{\"display\"in e&&t.setDisplay(e.display===\"flex\"?bn.default.DISPLAY_FLEX:bn.default.DISPLAY_NONE)},Gpt=(t,e)=>{if(\"borderStyle\"in e){let r=typeof e.borderStyle==\"string\"?1:0;t.setBorder(bn.default.EDGE_TOP,r),t.setBorder(bn.default.EDGE_BOTTOM,r),t.setBorder(bn.default.EDGE_LEFT,r),t.setBorder(bn.default.EDGE_RIGHT,r)}};WS.default=(t,e={})=>{Lpt(t,e),Mpt(t,e),Upt(t,e),_pt(t,e),Hpt(t,e),jpt(t,e),Gpt(t,e)}});var Gwe=_((NKt,jwe)=>{\"use strict\";var YS=GS(),qpt=dk(),Wpt=sk(),iW=new Set([\"\\x1B\",\"\\x9B\"]),Ypt=39,Hwe=t=>`${iW.values().next().value}[${t}m`,Vpt=t=>t.split(\" \").map(e=>YS(e)),nW=(t,e,r)=>{let s=[...e],a=!1,n=YS(qpt(t[t.length-1]));for(let[c,f]of s.entries()){let p=YS(f);if(n+p<=r?t[t.length-1]+=f:(t.push(f),n=0),iW.has(f))a=!0;else if(a&&f===\"m\"){a=!1;continue}a||(n+=p,n===r&&c<s.length-1&&(t.push(\"\"),n=0))}!n&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Jpt=t=>{let e=t.split(\" \"),r=e.length;for(;r>0&&!(YS(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(\" \")+e.slice(r).join(\"\")},Kpt=(t,e,r={})=>{if(r.trim!==!1&&t.trim()===\"\")return\"\";let s=\"\",a=\"\",n,c=Vpt(t),f=[\"\"];for(let[p,h]of t.split(\" \").entries()){r.trim!==!1&&(f[f.length-1]=f[f.length-1].trimLeft());let E=YS(f[f.length-1]);if(p!==0&&(E>=e&&(r.wordWrap===!1||r.trim===!1)&&(f.push(\"\"),E=0),(E>0||r.trim===!1)&&(f[f.length-1]+=\" \",E++)),r.hard&&c[p]>e){let C=e-E,S=1+Math.floor((c[p]-C-1)/e);Math.floor((c[p]-1)/e)<S&&f.push(\"\"),nW(f,h,e);continue}if(E+c[p]>e&&E>0&&c[p]>0){if(r.wordWrap===!1&&E<e){nW(f,h,e);continue}f.push(\"\")}if(E+c[p]>e&&r.wordWrap===!1){nW(f,h,e);continue}f[f.length-1]+=h}r.trim!==!1&&(f=f.map(Jpt)),s=f.join(`\n`);for(let[p,h]of[...s].entries()){if(a+=h,iW.has(h)){let C=parseFloat(/\\d[^m]*/.exec(s.slice(p,p+4)));n=C===Ypt?null:C}let E=Wpt.codes.get(Number(n));n&&E&&(s[p+1]===`\n`?a+=Hwe(E):h===`\n`&&(a+=Hwe(n)))}return a};jwe.exports=(t,e,r)=>String(t).normalize().replace(/\\r\\n/g,`\n`).split(`\n`).map(s=>Kpt(s,e,r)).join(`\n`)});var Ywe=_((OKt,Wwe)=>{\"use strict\";var qwe=\"[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]\",zpt=t=>t&&t.exact?new RegExp(`^${qwe}$`):new RegExp(qwe,\"g\");Wwe.exports=zpt});var sW=_((LKt,zwe)=>{\"use strict\";var Xpt=Z9(),Zpt=Ywe(),Vwe=sk(),Kwe=[\"\\x1B\",\"\\x9B\"],NF=t=>`${Kwe[0]}[${t}m`,Jwe=(t,e,r)=>{let s=[];t=[...t];for(let a of t){let n=a;a.match(\";\")&&(a=a.split(\";\")[0][0]+\"0\");let c=Vwe.codes.get(parseInt(a,10));if(c){let f=t.indexOf(c.toString());f>=0?t.splice(f,1):s.push(NF(e?c:n))}else if(e){s.push(NF(0));break}else s.push(NF(n))}if(e&&(s=s.filter((a,n)=>s.indexOf(a)===n),r!==void 0)){let a=NF(Vwe.codes.get(parseInt(r,10)));s=s.reduce((n,c)=>c===a?[c,...n]:[...n,c],[])}return s.join(\"\")};zwe.exports=(t,e,r)=>{let s=[...t.normalize()],a=[];r=typeof r==\"number\"?r:s.length;let n=!1,c,f=0,p=\"\";for(let[h,E]of s.entries()){let C=!1;if(Kwe.includes(E)){let S=/\\d[^m]*/.exec(t.slice(h,h+18));c=S&&S.length>0?S[0]:void 0,f<r&&(n=!0,c!==void 0&&a.push(c))}else n&&E===\"m\"&&(n=!1,C=!0);if(!n&&!C&&++f,!Zpt({exact:!0}).test(E)&&Xpt(E.codePointAt())&&++f,f>e&&f<=r)p+=E;else if(f===e&&!n&&c!==void 0)p=Jwe(a);else if(f>=r){p+=Jwe(a,!0,c);break}}return p}});var Zwe=_((MKt,Xwe)=>{\"use strict\";var $0=sW(),$pt=GS();function OF(t,e,r){if(t.charAt(e)===\" \")return e;for(let s=1;s<=3;s++)if(r){if(t.charAt(e+s)===\" \")return e+s}else if(t.charAt(e-s)===\" \")return e-s;return e}Xwe.exports=(t,e,r)=>{r={position:\"end\",preferTruncationOnSpace:!1,...r};let{position:s,space:a,preferTruncationOnSpace:n}=r,c=\"\\u2026\",f=1;if(typeof t!=\"string\")throw new TypeError(`Expected \\`input\\` to be a string, got ${typeof t}`);if(typeof e!=\"number\")throw new TypeError(`Expected \\`columns\\` to be a number, got ${typeof e}`);if(e<1)return\"\";if(e===1)return c;let p=$pt(t);if(p<=e)return t;if(s===\"start\"){if(n){let h=OF(t,p-e+1,!0);return c+$0(t,h,p).trim()}return a===!0&&(c+=\" \",f=2),c+$0(t,p-e+f,p)}if(s===\"middle\"){a===!0&&(c=\" \"+c+\" \",f=3);let h=Math.floor(e/2);if(n){let E=OF(t,h),C=OF(t,p-(e-h)+1,!0);return $0(t,0,E)+c+$0(t,C,p).trim()}return $0(t,0,h)+c+$0(t,p-(e-h)+f,p)}if(s===\"end\"){if(n){let h=OF(t,e-1);return $0(t,0,h)+c}return a===!0&&(c=\" \"+c,f=2),$0(t,0,e-f)+c}throw new Error(`Expected \\`options.position\\` to be either \\`start\\`, \\`middle\\` or \\`end\\`, got ${s}`)}});var aW=_(VS=>{\"use strict\";var $we=VS&&VS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(VS,\"__esModule\",{value:!0});var eht=$we(Gwe()),tht=$we(Zwe()),oW={};VS.default=(t,e,r)=>{let s=t+String(e)+String(r);if(oW[s])return oW[s];let a=t;if(r===\"wrap\"&&(a=eht.default(t,e,{trim:!1,hard:!0})),r.startsWith(\"truncate\")){let n=\"end\";r===\"truncate-middle\"&&(n=\"middle\"),r===\"truncate-start\"&&(n=\"start\"),a=tht.default(t,e,{position:n})}return oW[s]=a,a}});var cW=_(lW=>{\"use strict\";Object.defineProperty(lW,\"__esModule\",{value:!0});var e1e=t=>{let e=\"\";if(t.childNodes.length>0)for(let r of t.childNodes){let s=\"\";r.nodeName===\"#text\"?s=r.nodeValue:((r.nodeName===\"ink-text\"||r.nodeName===\"ink-virtual-text\")&&(s=e1e(r)),s.length>0&&typeof r.internal_transform==\"function\"&&(s=r.internal_transform(s))),e+=s}return e};lW.default=e1e});var uW=_(bi=>{\"use strict\";var JS=bi&&bi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bi,\"__esModule\",{value:!0});bi.setTextNodeValue=bi.createTextNode=bi.setStyle=bi.setAttribute=bi.removeChildNode=bi.insertBeforeNode=bi.appendChildNode=bi.createNode=bi.TEXT_NAME=void 0;var rht=JS(Fm()),t1e=JS(Uwe()),nht=JS(_we()),iht=JS(aW()),sht=JS(cW());bi.TEXT_NAME=\"#text\";bi.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t===\"ink-virtual-text\"?void 0:rht.default.Node.create()};return t===\"ink-text\"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(oht.bind(null,r))),r};bi.appendChildNode=(t,e)=>{var r;e.parentNode&&bi.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName===\"ink-text\"||t.nodeName===\"ink-virtual-text\")&&LF(t)};bi.insertBeforeNode=(t,e,r)=>{var s,a;e.parentNode&&bi.removeChildNode(e.parentNode,e),e.parentNode=t;let n=t.childNodes.indexOf(r);if(n>=0){t.childNodes.splice(n,0,e),e.yogaNode&&((s=t.yogaNode)===null||s===void 0||s.insertChild(e.yogaNode,n));return}t.childNodes.push(e),e.yogaNode&&((a=t.yogaNode)===null||a===void 0||a.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName===\"ink-text\"||t.nodeName===\"ink-virtual-text\")&&LF(t)};bi.removeChildNode=(t,e)=>{var r,s;e.yogaNode&&((s=(r=e.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||s===void 0||s.removeChild(e.yogaNode)),e.parentNode=null;let a=t.childNodes.indexOf(e);a>=0&&t.childNodes.splice(a,1),(t.nodeName===\"ink-text\"||t.nodeName===\"ink-virtual-text\")&&LF(t)};bi.setAttribute=(t,e,r)=>{t.attributes[e]=r};bi.setStyle=(t,e)=>{t.style=e,t.yogaNode&&nht.default(t.yogaNode,e)};bi.createTextNode=t=>{let e={nodeName:\"#text\",nodeValue:t,yogaNode:void 0,parentNode:null,style:{}};return bi.setTextNodeValue(e,t),e};var oht=function(t,e){var r,s;let a=t.nodeName===\"#text\"?t.nodeValue:sht.default(t),n=t1e.default(a);if(n.width<=e||n.width>=1&&e>0&&e<1)return n;let c=(s=(r=t.style)===null||r===void 0?void 0:r.textWrap)!==null&&s!==void 0?s:\"wrap\",f=iht.default(a,e,c);return t1e.default(f)},r1e=t=>{var e;if(!(!t||!t.parentNode))return(e=t.yogaNode)!==null&&e!==void 0?e:r1e(t.parentNode)},LF=t=>{let e=r1e(t);e?.markDirty()};bi.setTextNodeValue=(t,e)=>{typeof e!=\"string\"&&(e=String(e)),t.nodeValue=e,LF(t)}});var a1e=_(KS=>{\"use strict\";var o1e=KS&&KS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(KS,\"__esModule\",{value:!0});var n1e=Y9(),aht=o1e(Swe()),i1e=o1e(Fm()),ea=uW(),s1e=t=>{t?.unsetMeasureFunc(),t?.freeRecursive()};KS.default=aht.default({schedulePassiveEffects:n1e.unstable_scheduleCallback,cancelPassiveEffects:n1e.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>null,preparePortalMount:()=>null,clearContainer:()=>!1,shouldDeprioritizeSubtree:()=>!1,resetAfterCommit:t=>{if(t.isStaticDirty){t.isStaticDirty=!1,typeof t.onImmediateRender==\"function\"&&t.onImmediateRender();return}typeof t.onRender==\"function\"&&t.onRender()},getChildHostContext:(t,e)=>{let r=t.isInsideText,s=e===\"ink-text\"||e===\"ink-virtual-text\";return r===s?t:{isInsideText:s}},shouldSetTextContent:()=>!1,createInstance:(t,e,r,s)=>{if(s.isInsideText&&t===\"ink-box\")throw new Error(\"<Box> can\\u2019t be nested inside <Text> component\");let a=t===\"ink-text\"&&s.isInsideText?\"ink-virtual-text\":t,n=ea.createNode(a);for(let[c,f]of Object.entries(e))c!==\"children\"&&(c===\"style\"?ea.setStyle(n,f):c===\"internal_transform\"?n.internal_transform=f:c===\"internal_static\"?n.internal_static=!0:ea.setAttribute(n,c,f));return n},createTextInstance:(t,e,r)=>{if(!r.isInsideText)throw new Error(`Text string \"${t}\" must be rendered inside <Text> component`);return ea.createTextNode(t)},resetTextContent:()=>{},hideTextInstance:t=>{ea.setTextNodeValue(t,\"\")},unhideTextInstance:(t,e)=>{ea.setTextNodeValue(t,e)},getPublicInstance:t=>t,hideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(i1e.default.DISPLAY_NONE)},unhideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(i1e.default.DISPLAY_FLEX)},appendInitialChild:ea.appendChildNode,appendChild:ea.appendChildNode,insertBefore:ea.insertBeforeNode,finalizeInitialChildren:(t,e,r,s)=>(t.internal_static&&(s.isStaticDirty=!0,s.staticNode=t),!1),supportsMutation:!0,appendChildToContainer:ea.appendChildNode,insertInContainerBefore:ea.insertBeforeNode,removeChildFromContainer:(t,e)=>{ea.removeChildNode(t,e),s1e(e.yogaNode)},prepareUpdate:(t,e,r,s,a)=>{t.internal_static&&(a.isStaticDirty=!0);let n={},c=Object.keys(s);for(let f of c)if(s[f]!==r[f]){if(f===\"style\"&&typeof s.style==\"object\"&&typeof r.style==\"object\"){let h=s.style,E=r.style,C=Object.keys(h);for(let S of C){if(S===\"borderStyle\"||S===\"borderColor\"){if(typeof n.style!=\"object\"){let P={};n.style=P}n.style.borderStyle=h.borderStyle,n.style.borderColor=h.borderColor}if(h[S]!==E[S]){if(typeof n.style!=\"object\"){let P={};n.style=P}n.style[S]=h[S]}}continue}n[f]=s[f]}return n},commitUpdate:(t,e)=>{for(let[r,s]of Object.entries(e))r!==\"children\"&&(r===\"style\"?ea.setStyle(t,s):r===\"internal_transform\"?t.internal_transform=s:r===\"internal_static\"?t.internal_static=!0:ea.setAttribute(t,r,s))},commitTextUpdate:(t,e,r)=>{ea.setTextNodeValue(t,r)},removeChild:(t,e)=>{ea.removeChildNode(t,e),s1e(e.yogaNode)}})});var c1e=_((GKt,l1e)=>{\"use strict\";l1e.exports=(t,e=1,r)=>{if(r={indent:\" \",includeEmptyLines:!1,...r},typeof t!=\"string\")throw new TypeError(`Expected \\`input\\` to be a \\`string\\`, got \\`${typeof t}\\``);if(typeof e!=\"number\")throw new TypeError(`Expected \\`count\\` to be a \\`number\\`, got \\`${typeof e}\\``);if(typeof r.indent!=\"string\")throw new TypeError(`Expected \\`options.indent\\` to be a \\`string\\`, got \\`${typeof r.indent}\\``);if(e===0)return t;let s=r.includeEmptyLines?/^/gm:/^(?!\\s*$)/gm;return t.replace(s,r.indent.repeat(e))}});var u1e=_(zS=>{\"use strict\";var lht=zS&&zS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zS,\"__esModule\",{value:!0});var MF=lht(Fm());zS.default=t=>t.getComputedWidth()-t.getComputedPadding(MF.default.EDGE_LEFT)-t.getComputedPadding(MF.default.EDGE_RIGHT)-t.getComputedBorder(MF.default.EDGE_LEFT)-t.getComputedBorder(MF.default.EDGE_RIGHT)});var f1e=_((WKt,cht)=>{cht.exports={single:{topLeft:\"\\u250C\",topRight:\"\\u2510\",bottomRight:\"\\u2518\",bottomLeft:\"\\u2514\",vertical:\"\\u2502\",horizontal:\"\\u2500\"},double:{topLeft:\"\\u2554\",topRight:\"\\u2557\",bottomRight:\"\\u255D\",bottomLeft:\"\\u255A\",vertical:\"\\u2551\",horizontal:\"\\u2550\"},round:{topLeft:\"\\u256D\",topRight:\"\\u256E\",bottomRight:\"\\u256F\",bottomLeft:\"\\u2570\",vertical:\"\\u2502\",horizontal:\"\\u2500\"},bold:{topLeft:\"\\u250F\",topRight:\"\\u2513\",bottomRight:\"\\u251B\",bottomLeft:\"\\u2517\",vertical:\"\\u2503\",horizontal:\"\\u2501\"},singleDouble:{topLeft:\"\\u2553\",topRight:\"\\u2556\",bottomRight:\"\\u255C\",bottomLeft:\"\\u2559\",vertical:\"\\u2551\",horizontal:\"\\u2500\"},doubleSingle:{topLeft:\"\\u2552\",topRight:\"\\u2555\",bottomRight:\"\\u255B\",bottomLeft:\"\\u2558\",vertical:\"\\u2502\",horizontal:\"\\u2550\"},classic:{topLeft:\"+\",topRight:\"+\",bottomRight:\"+\",bottomLeft:\"+\",vertical:\"|\",horizontal:\"-\"}}});var p1e=_((YKt,fW)=>{\"use strict\";var A1e=f1e();fW.exports=A1e;fW.exports.default=A1e});var AW=_(ZS=>{\"use strict\";var uht=ZS&&ZS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ZS,\"__esModule\",{value:!0});var XS=uht(TE()),fht=/^(rgb|hsl|hsv|hwb)\\(\\s?(\\d+),\\s?(\\d+),\\s?(\\d+)\\s?\\)$/,Aht=/^(ansi|ansi256)\\(\\s?(\\d+)\\s?\\)$/,UF=(t,e)=>e===\"foreground\"?t:\"bg\"+t[0].toUpperCase()+t.slice(1);ZS.default=(t,e,r)=>{if(!e)return t;if(e in XS.default){let a=UF(e,r);return XS.default[a](t)}if(e.startsWith(\"#\")){let a=UF(\"hex\",r);return XS.default[a](e)(t)}if(e.startsWith(\"ansi\")){let a=Aht.exec(e);if(!a)return t;let n=UF(a[1],r),c=Number(a[2]);return XS.default[n](c)(t)}if(e.startsWith(\"rgb\")||e.startsWith(\"hsl\")||e.startsWith(\"hsv\")||e.startsWith(\"hwb\")){let a=fht.exec(e);if(!a)return t;let n=UF(a[1],r),c=Number(a[2]),f=Number(a[3]),p=Number(a[4]);return XS.default[n](c,f,p)(t)}return t}});var g1e=_($S=>{\"use strict\";var h1e=$S&&$S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($S,\"__esModule\",{value:!0});var pht=h1e(p1e()),pW=h1e(AW());$S.default=(t,e,r,s)=>{if(typeof r.style.borderStyle==\"string\"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),c=r.style.borderColor,f=pht.default[r.style.borderStyle],p=pW.default(f.topLeft+f.horizontal.repeat(a-2)+f.topRight,c,\"foreground\"),h=(pW.default(f.vertical,c,\"foreground\")+`\n`).repeat(n-2),E=pW.default(f.bottomLeft+f.horizontal.repeat(a-2)+f.bottomRight,c,\"foreground\");s.write(t,e,p,{transformers:[]}),s.write(t,e+1,h,{transformers:[]}),s.write(t+a-1,e+1,h,{transformers:[]}),s.write(t,e+n-1,E,{transformers:[]})}}});var m1e=_(eD=>{\"use strict\";var Nm=eD&&eD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(eD,\"__esModule\",{value:!0});var hht=Nm(Fm()),ght=Nm(tW()),dht=Nm(c1e()),mht=Nm(aW()),yht=Nm(u1e()),Eht=Nm(cW()),Iht=Nm(g1e()),Cht=(t,e)=>{var r;let s=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(s){let a=s.getComputedLeft(),n=s.getComputedTop();e=`\n`.repeat(n)+dht.default(e,a)}return e},d1e=(t,e,r)=>{var s;let{offsetX:a=0,offsetY:n=0,transformers:c=[],skipStaticElements:f}=r;if(f&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===hht.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),C=c;if(typeof t.internal_transform==\"function\"&&(C=[t.internal_transform,...c]),t.nodeName===\"ink-text\"){let S=Eht.default(t);if(S.length>0){let P=ght.default(S),I=yht.default(p);if(P>I){let R=(s=t.style.textWrap)!==null&&s!==void 0?s:\"wrap\";S=mht.default(S,I,R)}S=Cht(t,S),e.write(h,E,S,{transformers:C})}return}if(t.nodeName===\"ink-box\"&&Iht.default(h,E,t,e),t.nodeName===\"ink-root\"||t.nodeName===\"ink-box\")for(let S of t.childNodes)d1e(S,e,{offsetX:h,offsetY:E,transformers:C,skipStaticElements:f})}};eD.default=d1e});var I1e=_(tD=>{\"use strict\";var E1e=tD&&tD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tD,\"__esModule\",{value:!0});var y1e=E1e(sW()),wht=E1e(GS()),hW=class{constructor(e){this.writes=[];let{width:r,height:s}=e;this.width=r,this.height=s}write(e,r,s,a){let{transformers:n}=a;s&&this.writes.push({x:e,y:r,text:s,transformers:n})}get(){let e=[];for(let s=0;s<this.height;s++)e.push(\" \".repeat(this.width));for(let s of this.writes){let{x:a,y:n,text:c,transformers:f}=s,p=c.split(`\n`),h=0;for(let E of p){let C=e[n+h];if(!C)continue;let S=wht.default(E);for(let P of f)E=P(E);e[n+h]=y1e.default(C,0,a)+E+y1e.default(C,a+S),h++}}return{output:e.map(s=>s.trimRight()).join(`\n`),height:e.length}}};tD.default=hW});var B1e=_(rD=>{\"use strict\";var gW=rD&&rD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rD,\"__esModule\",{value:!0});var Bht=gW(Fm()),C1e=gW(m1e()),w1e=gW(I1e());rD.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,Bht.default.DIRECTION_LTR);let s=new w1e.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});C1e.default(t,s,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new w1e.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),C1e.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:c}=s.get();return{output:n,outputHeight:c,staticOutput:a?`${a.get().output}\n`:\"\"}}return{output:\"\",outputHeight:0,staticOutput:\"\"}}});var b1e=_((ZKt,D1e)=>{\"use strict\";var v1e=Ie(\"stream\"),S1e=[\"assert\",\"count\",\"countReset\",\"debug\",\"dir\",\"dirxml\",\"error\",\"group\",\"groupCollapsed\",\"groupEnd\",\"info\",\"log\",\"table\",\"time\",\"timeEnd\",\"timeLog\",\"trace\",\"warn\"],dW={},vht=t=>{let e=new v1e.PassThrough,r=new v1e.PassThrough;e.write=a=>t(\"stdout\",a),r.write=a=>t(\"stderr\",a);let s=new console.Console(e,r);for(let a of S1e)dW[a]=console[a],console[a]=s[a];return()=>{for(let a of S1e)console[a]=dW[a];dW={}}};D1e.exports=vht});var yW=_(mW=>{\"use strict\";Object.defineProperty(mW,\"__esModule\",{value:!0});mW.default=new WeakMap});var IW=_(EW=>{\"use strict\";Object.defineProperty(EW,\"__esModule\",{value:!0});var Sht=hn(),P1e=Sht.createContext({exit:()=>{}});P1e.displayName=\"InternalAppContext\";EW.default=P1e});var wW=_(CW=>{\"use strict\";Object.defineProperty(CW,\"__esModule\",{value:!0});var Dht=hn(),x1e=Dht.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});x1e.displayName=\"InternalStdinContext\";CW.default=x1e});var vW=_(BW=>{\"use strict\";Object.defineProperty(BW,\"__esModule\",{value:!0});var bht=hn(),k1e=bht.createContext({stdout:void 0,write:()=>{}});k1e.displayName=\"InternalStdoutContext\";BW.default=k1e});var DW=_(SW=>{\"use strict\";Object.defineProperty(SW,\"__esModule\",{value:!0});var Pht=hn(),Q1e=Pht.createContext({stderr:void 0,write:()=>{}});Q1e.displayName=\"InternalStderrContext\";SW.default=Q1e});var _F=_(bW=>{\"use strict\";Object.defineProperty(bW,\"__esModule\",{value:!0});var xht=hn(),T1e=xht.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{},focus:()=>{}});T1e.displayName=\"InternalFocusContext\";bW.default=T1e});var F1e=_((szt,R1e)=>{\"use strict\";var kht=/[|\\\\{}()[\\]^$+*?.-]/g;R1e.exports=t=>{if(typeof t!=\"string\")throw new TypeError(\"Expected a string\");return t.replace(kht,\"\\\\$&\")}});var M1e=_((ozt,L1e)=>{\"use strict\";var Qht=F1e(),Tht=typeof process==\"object\"&&process&&typeof process.cwd==\"function\"?process.cwd():\".\",O1e=[].concat(Ie(\"module\").builtinModules,\"bootstrap_node\",\"node\").map(t=>new RegExp(`(?:\\\\((?:node:)?${t}(?:\\\\.js)?:\\\\d+:\\\\d+\\\\)$|^\\\\s*at (?:node:)?${t}(?:\\\\.js)?:\\\\d+:\\\\d+$)`));O1e.push(/\\((?:node:)?internal\\/[^:]+:\\d+:\\d+\\)$/,/\\s*at (?:node:)?internal\\/[^:]+:\\d+:\\d+$/,/\\/\\.node-spawn-wrap-\\w+-\\w+\\/node:\\d+:\\d+\\)?$/);var PW=class t{constructor(e){e={ignoredPackages:[],...e},\"internals\"in e||(e.internals=t.nodeInternals()),\"cwd\"in e||(e.cwd=Tht),this._cwd=e.cwd.replace(/\\\\/g,\"/\"),this._internals=[].concat(e.internals,Rht(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...O1e]}clean(e,r=0){r=\" \".repeat(r),Array.isArray(e)||(e=e.split(`\n`)),!/^\\s*at /.test(e[0])&&/^\\s*at /.test(e[1])&&(e=e.slice(1));let s=!1,a=null,n=[];return e.forEach(c=>{if(c=c.replace(/\\\\/g,\"/\"),this._internals.some(p=>p.test(c)))return;let f=/^\\s*at /.test(c);s?c=c.trimEnd().replace(/^(\\s+)at /,\"$1\"):(c=c.trim(),f&&(c=c.slice(3))),c=c.replace(`${this._cwd}/`,\"\"),c&&(f?(a&&(n.push(a),a=null),n.push(c)):(s=!0,a=c))}),n.map(c=>`${r}${c}\n`).join(\"\")}captureString(e,r=this.captureString){typeof e==\"function\"&&(r=e,e=1/0);let{stackTraceLimit:s}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=s,this.clean(n)}capture(e,r=this.capture){typeof e==\"function\"&&(r=e,e=1/0);let{prepareStackTrace:s,stackTraceLimit:a}=Error;Error.prepareStackTrace=(f,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:c}=n;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:a}),c}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let s={line:r.getLineNumber(),column:r.getColumnNumber()};N1e(s,r.getFileName(),this._cwd),r.isConstructor()&&(s.constructor=!0),r.isEval()&&(s.evalOrigin=r.getEvalOrigin()),r.isNative()&&(s.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!==\"Object\"&&a!==\"[object Object]\"&&(s.type=a);let n=r.getFunctionName();n&&(s.function=n);let c=r.getMethodName();return c&&n!==c&&(s.method=c),s}parseLine(e){let r=e&&e.match(Fht);if(!r)return null;let s=r[1]===\"new\",a=r[2],n=r[3],c=r[4],f=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],C=r[9],S=r[10]===\"native\",P=r[11]===\")\",I,R={};if(E&&(R.line=Number(E)),C&&(R.column=Number(C)),P&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===\")\")N++;else if(h.charAt(U)===\"(\"&&h.charAt(U-1)===\" \"&&(N--,N===-1&&h.charAt(U-1)===\" \")){let W=h.slice(0,U-1);h=h.slice(U+1),a+=` (${W}`;break}}if(a){let N=a.match(Nht);N&&(a=N[1],I=N[2])}return N1e(R,h,this._cwd),s&&(R.constructor=!0),n&&(R.evalOrigin=n,R.evalLine=f,R.evalColumn=p,R.evalFile=c&&c.replace(/\\\\/g,\"/\")),S&&(R.native=!0),a&&(R.function=a),I&&a!==I&&(R.method=I),R}};function N1e(t,e,r){e&&(e=e.replace(/\\\\/g,\"/\"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function Rht(t){if(t.length===0)return[];let e=t.map(r=>Qht(r));return new RegExp(`[/\\\\\\\\]node_modules[/\\\\\\\\](?:${e.join(\"|\")})[/\\\\\\\\][^:]+:\\\\d+:\\\\d+`)}var Fht=new RegExp(\"^(?:\\\\s*at )?(?:(new) )?(?:(.*?) \\\\()?(?:eval at ([^ ]+) \\\\((.+?):(\\\\d+):(\\\\d+)\\\\), )?(?:(.+?):(\\\\d+):(\\\\d+)|(native))(\\\\)?)$\"),Nht=/^(.*?) \\[as (.*?)\\]$/;L1e.exports=PW});var _1e=_((azt,U1e)=>{\"use strict\";U1e.exports=(t,e)=>t.replace(/^\\t+/gm,r=>\" \".repeat(r.length*(e||2)))});var j1e=_((lzt,H1e)=>{\"use strict\";var Oht=_1e(),Lht=(t,e)=>{let r=[],s=t-e,a=t+e;for(let n=s;n<=a;n++)r.push(n);return r};H1e.exports=(t,e,r)=>{if(typeof t!=\"string\")throw new TypeError(\"Source code is missing.\");if(!e||e<1)throw new TypeError(\"Line number must start from `1`.\");if(t=Oht(t).split(/\\r?\\n/),!(e>t.length))return r={around:3,...r},Lht(e,r.around).filter(s=>t[s-1]!==void 0).map(s=>({line:s,value:t[s-1]}))}});var HF=_(rf=>{\"use strict\";var Mht=rf&&rf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Uht=rf&&rf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_ht=rf&&rf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&Mht(e,t,r);return Uht(e,t),e},Hht=rf&&rf.__rest||function(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols==\"function\")for(var a=0,s=Object.getOwnPropertySymbols(t);a<s.length;a++)e.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(t,s[a])&&(r[s[a]]=t[s[a]]);return r};Object.defineProperty(rf,\"__esModule\",{value:!0});var G1e=_ht(hn()),xW=G1e.forwardRef((t,e)=>{var{children:r}=t,s=Hht(t,[\"children\"]);let a=Object.assign(Object.assign({},s),{marginLeft:s.marginLeft||s.marginX||s.margin||0,marginRight:s.marginRight||s.marginX||s.margin||0,marginTop:s.marginTop||s.marginY||s.margin||0,marginBottom:s.marginBottom||s.marginY||s.margin||0,paddingLeft:s.paddingLeft||s.paddingX||s.padding||0,paddingRight:s.paddingRight||s.paddingX||s.padding||0,paddingTop:s.paddingTop||s.paddingY||s.padding||0,paddingBottom:s.paddingBottom||s.paddingY||s.padding||0});return G1e.default.createElement(\"ink-box\",{ref:e,style:a},r)});xW.displayName=\"Box\";xW.defaultProps={flexDirection:\"row\",flexGrow:0,flexShrink:1};rf.default=xW});var TW=_(nD=>{\"use strict\";var kW=nD&&nD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nD,\"__esModule\",{value:!0});var jht=kW(hn()),yw=kW(TE()),q1e=kW(AW()),QW=({color:t,backgroundColor:e,dimColor:r,bold:s,italic:a,underline:n,strikethrough:c,inverse:f,wrap:p,children:h})=>{if(h==null)return null;let E=C=>(r&&(C=yw.default.dim(C)),t&&(C=q1e.default(C,t,\"foreground\")),e&&(C=q1e.default(C,e,\"background\")),s&&(C=yw.default.bold(C)),a&&(C=yw.default.italic(C)),n&&(C=yw.default.underline(C)),c&&(C=yw.default.strikethrough(C)),f&&(C=yw.default.inverse(C)),C);return jht.default.createElement(\"ink-text\",{style:{flexGrow:0,flexShrink:1,flexDirection:\"row\",textWrap:p},internal_transform:E},h)};QW.displayName=\"Text\";QW.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:\"wrap\"};nD.default=QW});var J1e=_(nf=>{\"use strict\";var Ght=nf&&nf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),qht=nf&&nf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Wht=nf&&nf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&Ght(e,t,r);return qht(e,t),e},iD=nf&&nf.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nf,\"__esModule\",{value:!0});var W1e=Wht(Ie(\"fs\")),Qs=iD(hn()),Y1e=iD(M1e()),Yht=iD(j1e()),$p=iD(HF()),AA=iD(TW()),V1e=new Y1e.default({cwd:process.cwd(),internals:Y1e.default.nodeInternals()}),Vht=({error:t})=>{let e=t.stack?t.stack.split(`\n`).slice(1):void 0,r=e?V1e.parseLine(e[0]):void 0,s,a=0;if(r?.file&&r?.line&&W1e.existsSync(r.file)){let n=W1e.readFileSync(r.file,\"utf8\");if(s=Yht.default(n,r.line),s)for(let{line:c}of s)a=Math.max(a,String(c).length)}return Qs.default.createElement($p.default,{flexDirection:\"column\",padding:1},Qs.default.createElement($p.default,null,Qs.default.createElement(AA.default,{backgroundColor:\"red\",color:\"white\"},\" \",\"ERROR\",\" \"),Qs.default.createElement(AA.default,null,\" \",t.message)),r&&Qs.default.createElement($p.default,{marginTop:1},Qs.default.createElement(AA.default,{dimColor:!0},r.file,\":\",r.line,\":\",r.column)),r&&s&&Qs.default.createElement($p.default,{marginTop:1,flexDirection:\"column\"},s.map(({line:n,value:c})=>Qs.default.createElement($p.default,{key:n},Qs.default.createElement($p.default,{width:a+1},Qs.default.createElement(AA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?\"red\":void 0,color:n===r.line?\"white\":void 0},String(n).padStart(a,\" \"),\":\")),Qs.default.createElement(AA.default,{key:n,backgroundColor:n===r.line?\"red\":void 0,color:n===r.line?\"white\":void 0},\" \"+c)))),t.stack&&Qs.default.createElement($p.default,{marginTop:1,flexDirection:\"column\"},t.stack.split(`\n`).slice(1).map(n=>{let c=V1e.parseLine(n);return c?Qs.default.createElement($p.default,{key:n},Qs.default.createElement(AA.default,{dimColor:!0},\"- \"),Qs.default.createElement(AA.default,{dimColor:!0,bold:!0},c.function),Qs.default.createElement(AA.default,{dimColor:!0,color:\"gray\"},\" \",\"(\",c.file,\":\",c.line,\":\",c.column,\")\")):Qs.default.createElement($p.default,{key:n},Qs.default.createElement(AA.default,{dimColor:!0},\"- \"),Qs.default.createElement(AA.default,{dimColor:!0,bold:!0},n))})))};nf.default=Vht});var z1e=_(sf=>{\"use strict\";var Jht=sf&&sf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Kht=sf&&sf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zht=sf&&sf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&Jht(e,t,r);return Kht(e,t),e},Lm=sf&&sf.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sf,\"__esModule\",{value:!0});var Om=zht(hn()),K1e=Lm(F9()),Xht=Lm(IW()),Zht=Lm(wW()),$ht=Lm(vW()),e0t=Lm(DW()),t0t=Lm(_F()),r0t=Lm(J1e()),n0t=\"\t\",i0t=\"\\x1B[Z\",s0t=\"\\x1B\",jF=class extends Om.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.\nRead about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.\nRead about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding(\"utf8\"),e){this.rawModeEnabledCount===0&&(r.addListener(\"data\",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener(\"data\",this.handleInput),r.pause())},this.handleInput=e=>{e===\"\u0003\"&&this.props.exitOnCtrlC&&this.handleExit(),e===s0t&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===n0t&&this.focusNext(),e===i0t&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focus=e=>{this.setState(r=>r.focusables.some(a=>a?.id===e)?{activeFocusId:e}:r)},this.focusNext=()=>{this.setState(e=>{var r;let s=(r=e.focusables[0])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findNextFocusable(e)||s}})},this.focusPrevious=()=>{this.setState(e=>{var r;let s=(r=e.focusables[e.focusables.length-1])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findPreviousFocusable(e)||s}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(s=>{let a=s.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...s.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(s=>s.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s+1;a<e.focusables.length;a++)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id},this.findPreviousFocusable=e=>{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s-1;a>=0;a--)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return Om.default.createElement(Xht.default.Provider,{value:{exit:this.handleExit}},Om.default.createElement(Zht.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},Om.default.createElement($ht.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},Om.default.createElement(e0t.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},Om.default.createElement(t0t.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},this.state.error?Om.default.createElement(r0t.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){K1e.default.hide(this.props.stdout)}componentWillUnmount(){K1e.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};sf.default=jF;jF.displayName=\"InternalApp\"});var $1e=_(of=>{\"use strict\";var o0t=of&&of.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),a0t=of&&of.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),l0t=of&&of.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&o0t(e,t,r);return a0t(e,t),e},af=of&&of.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(of,\"__esModule\",{value:!0});var c0t=af(hn()),X1e=WCe(),u0t=af(awe()),f0t=af(x9()),A0t=af(pwe()),p0t=af(gwe()),RW=af(a1e()),h0t=af(B1e()),g0t=af(R9()),d0t=af(b1e()),m0t=l0t(uW()),y0t=af(yW()),E0t=af(z1e()),Ew=process.env.CI===\"false\"?!1:A0t.default,Z1e=()=>{},FW=class{constructor(e){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:s,staticOutput:a}=h0t.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==`\n`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(Ew){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),s>=this.options.stdout.rows){this.options.stdout.write(f0t.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},p0t.default(this),this.options=e,this.rootNode=m0t.createNode(\"ink-root\"),this.rootNode.onRender=e.debug?this.onRender:X1e(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=u0t.default.create(e.stdout),this.throttledLog=e.debug?this.log:X1e(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput=\"\",this.fullStaticOutput=\"\",this.container=RW.default.createContainer(this.rootNode,0,!1,null),this.unsubscribeExit=g0t.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),Ew||(e.stdout.on(\"resize\",this.onRender),this.unsubscribeResize=()=>{e.stdout.off(\"resize\",this.onRender)})}render(e){let r=c0t.default.createElement(E0t.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);RW.default.updateContainer(r,this.container,null,Z1e)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(Ew){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(Ew){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole==\"function\"&&this.restoreConsole(),typeof this.unsubscribeResize==\"function\"&&this.unsubscribeResize(),Ew?this.options.stdout.write(this.lastOutput+`\n`):this.options.debug||this.log.done(),this.isUnmounted=!0,RW.default.updateContainer(null,this.container,null,Z1e),y0t.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!Ew&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=d0t.default((e,r)=>{e===\"stdout\"&&this.writeToStdout(r),e===\"stderr\"&&(r.startsWith(\"The above error occurred\")||this.writeToStderr(r))}))}};of.default=FW});var t2e=_(sD=>{\"use strict\";var e2e=sD&&sD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sD,\"__esModule\",{value:!0});var I0t=e2e($1e()),GF=e2e(yW()),C0t=Ie(\"stream\"),w0t=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},B0t(e)),s=v0t(r.stdout,()=>new I0t.default(r));return s.render(t),{rerender:s.render,unmount:()=>s.unmount(),waitUntilExit:s.waitUntilExit,cleanup:()=>GF.default.delete(r.stdout),clear:s.clear}};sD.default=w0t;var B0t=(t={})=>t instanceof C0t.Stream?{stdout:t,stdin:process.stdin}:t,v0t=(t,e)=>{let r;return GF.default.has(t)?r=GF.default.get(t):(r=e(),GF.default.set(t,r)),r}});var n2e=_(eh=>{\"use strict\";var S0t=eh&&eh.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),D0t=eh&&eh.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),b0t=eh&&eh.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.hasOwnProperty.call(t,r)&&S0t(e,t,r);return D0t(e,t),e};Object.defineProperty(eh,\"__esModule\",{value:!0});var oD=b0t(hn()),r2e=t=>{let{items:e,children:r,style:s}=t,[a,n]=oD.useState(0),c=oD.useMemo(()=>e.slice(a),[e,a]);oD.useLayoutEffect(()=>{n(e.length)},[e.length]);let f=c.map((h,E)=>r(h,a+E)),p=oD.useMemo(()=>Object.assign({position:\"absolute\",flexDirection:\"column\"},s),[s]);return oD.default.createElement(\"ink-box\",{internal_static:!0,style:p},f)};r2e.displayName=\"Static\";eh.default=r2e});var s2e=_(aD=>{\"use strict\";var P0t=aD&&aD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(aD,\"__esModule\",{value:!0});var x0t=P0t(hn()),i2e=({children:t,transform:e})=>t==null?null:x0t.default.createElement(\"ink-text\",{style:{flexGrow:0,flexShrink:1,flexDirection:\"row\"},internal_transform:e},t);i2e.displayName=\"Transform\";aD.default=i2e});var a2e=_(lD=>{\"use strict\";var k0t=lD&&lD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lD,\"__esModule\",{value:!0});var Q0t=k0t(hn()),o2e=({count:t=1})=>Q0t.default.createElement(\"ink-text\",null,`\n`.repeat(t));o2e.displayName=\"Newline\";lD.default=o2e});var u2e=_(cD=>{\"use strict\";var l2e=cD&&cD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cD,\"__esModule\",{value:!0});var T0t=l2e(hn()),R0t=l2e(HF()),c2e=()=>T0t.default.createElement(R0t.default,{flexGrow:1});c2e.displayName=\"Spacer\";cD.default=c2e});var qF=_(uD=>{\"use strict\";var F0t=uD&&uD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uD,\"__esModule\",{value:!0});var N0t=hn(),O0t=F0t(wW()),L0t=()=>N0t.useContext(O0t.default);uD.default=L0t});var A2e=_(fD=>{\"use strict\";var M0t=fD&&fD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fD,\"__esModule\",{value:!0});var f2e=hn(),U0t=M0t(qF()),_0t=(t,e={})=>{let{stdin:r,setRawMode:s,internal_exitOnCtrlC:a}=U0t.default();f2e.useEffect(()=>{if(e.isActive!==!1)return s(!0),()=>{s(!1)}},[e.isActive,s]),f2e.useEffect(()=>{if(e.isActive===!1)return;let n=c=>{let f=String(c),p={upArrow:f===\"\\x1B[A\",downArrow:f===\"\\x1B[B\",leftArrow:f===\"\\x1B[D\",rightArrow:f===\"\\x1B[C\",pageDown:f===\"\\x1B[6~\",pageUp:f===\"\\x1B[5~\",return:f===\"\\r\",escape:f===\"\\x1B\",ctrl:!1,shift:!1,tab:f===\"\t\"||f===\"\\x1B[Z\",backspace:f===\"\\b\",delete:f===\"\\x7F\"||f===\"\\x1B[3~\",meta:!1};f<=\"\u001a\"&&!p.return&&(f=String.fromCharCode(f.charCodeAt(0)+97-1),p.ctrl=!0),f.startsWith(\"\\x1B\")&&(f=f.slice(1),p.meta=!0);let h=f>=\"A\"&&f<=\"Z\",E=f>=\"\\u0410\"&&f<=\"\\u042F\";f.length===1&&(h||E)&&(p.shift=!0),p.tab&&f===\"[Z\"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(f=\"\"),(!(f===\"c\"&&p.ctrl)||!a)&&t(f,p)};return r?.on(\"data\",n),()=>{r?.off(\"data\",n)}},[e.isActive,r,a,t])};fD.default=_0t});var p2e=_(AD=>{\"use strict\";var H0t=AD&&AD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AD,\"__esModule\",{value:!0});var j0t=hn(),G0t=H0t(IW()),q0t=()=>j0t.useContext(G0t.default);AD.default=q0t});var h2e=_(pD=>{\"use strict\";var W0t=pD&&pD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pD,\"__esModule\",{value:!0});var Y0t=hn(),V0t=W0t(vW()),J0t=()=>Y0t.useContext(V0t.default);pD.default=J0t});var g2e=_(hD=>{\"use strict\";var K0t=hD&&hD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hD,\"__esModule\",{value:!0});var z0t=hn(),X0t=K0t(DW()),Z0t=()=>z0t.useContext(X0t.default);hD.default=Z0t});var m2e=_(dD=>{\"use strict\";var d2e=dD&&dD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dD,\"__esModule\",{value:!0});var gD=hn(),$0t=d2e(_F()),egt=d2e(qF()),tgt=({isActive:t=!0,autoFocus:e=!1,id:r}={})=>{let{isRawModeSupported:s,setRawMode:a}=egt.default(),{activeId:n,add:c,remove:f,activate:p,deactivate:h,focus:E}=gD.useContext($0t.default),C=gD.useMemo(()=>r??Math.random().toString().slice(2,7),[r]);return gD.useEffect(()=>(c(C,{autoFocus:e}),()=>{f(C)}),[C,e]),gD.useEffect(()=>{t?p(C):h(C)},[t,C]),gD.useEffect(()=>{if(!(!s||!t))return a(!0),()=>{a(!1)}},[t]),{isFocused:!!C&&n===C,focus:E}};dD.default=tgt});var y2e=_(mD=>{\"use strict\";var rgt=mD&&mD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mD,\"__esModule\",{value:!0});var ngt=hn(),igt=rgt(_F()),sgt=()=>{let t=ngt.useContext(igt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious,focus:t.focus}};mD.default=sgt});var E2e=_(NW=>{\"use strict\";Object.defineProperty(NW,\"__esModule\",{value:!0});NW.default=t=>{var e,r,s,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(s=t.yogaNode)===null||s===void 0?void 0:s.getComputedHeight())!==null&&a!==void 0?a:0}}});var Wc=_(mo=>{\"use strict\";Object.defineProperty(mo,\"__esModule\",{value:!0});var ogt=t2e();Object.defineProperty(mo,\"render\",{enumerable:!0,get:function(){return ogt.default}});var agt=HF();Object.defineProperty(mo,\"Box\",{enumerable:!0,get:function(){return agt.default}});var lgt=TW();Object.defineProperty(mo,\"Text\",{enumerable:!0,get:function(){return lgt.default}});var cgt=n2e();Object.defineProperty(mo,\"Static\",{enumerable:!0,get:function(){return cgt.default}});var ugt=s2e();Object.defineProperty(mo,\"Transform\",{enumerable:!0,get:function(){return ugt.default}});var fgt=a2e();Object.defineProperty(mo,\"Newline\",{enumerable:!0,get:function(){return fgt.default}});var Agt=u2e();Object.defineProperty(mo,\"Spacer\",{enumerable:!0,get:function(){return Agt.default}});var pgt=A2e();Object.defineProperty(mo,\"useInput\",{enumerable:!0,get:function(){return pgt.default}});var hgt=p2e();Object.defineProperty(mo,\"useApp\",{enumerable:!0,get:function(){return hgt.default}});var ggt=qF();Object.defineProperty(mo,\"useStdin\",{enumerable:!0,get:function(){return ggt.default}});var dgt=h2e();Object.defineProperty(mo,\"useStdout\",{enumerable:!0,get:function(){return dgt.default}});var mgt=g2e();Object.defineProperty(mo,\"useStderr\",{enumerable:!0,get:function(){return mgt.default}});var ygt=m2e();Object.defineProperty(mo,\"useFocus\",{enumerable:!0,get:function(){return ygt.default}});var Egt=y2e();Object.defineProperty(mo,\"useFocusManager\",{enumerable:!0,get:function(){return Egt.default}});var Igt=E2e();Object.defineProperty(mo,\"measureElement\",{enumerable:!0,get:function(){return Igt.default}})});var LW={};Vt(LW,{Gem:()=>OW});var I2e,Mm,OW,WF=Xe(()=>{I2e=ut(Wc()),Mm=ut(hn()),OW=(0,Mm.memo)(({active:t})=>{let e=(0,Mm.useMemo)(()=>t?\"\\u25C9\":\"\\u25EF\",[t]),r=(0,Mm.useMemo)(()=>t?\"green\":\"yellow\",[t]);return Mm.default.createElement(I2e.Text,{color:r},e)})});var w2e={};Vt(w2e,{useKeypress:()=>Um});function Um({active:t},e,r){let{stdin:s}=(0,C2e.useStdin)(),a=(0,YF.useCallback)((n,c)=>e(n,c),r);(0,YF.useEffect)(()=>{if(!(!t||!s))return s.on(\"keypress\",a),()=>{s.off(\"keypress\",a)}},[t,a,s])}var C2e,YF,yD=Xe(()=>{C2e=ut(Wc()),YF=ut(hn())});var v2e={};Vt(v2e,{FocusRequest:()=>B2e,useFocusRequest:()=>MW});var B2e,MW,UW=Xe(()=>{yD();B2e=(r=>(r.BEFORE=\"before\",r.AFTER=\"after\",r))(B2e||{}),MW=function({active:t},e,r){Um({active:t},(s,a)=>{a.name===\"tab\"&&(a.shift?e(\"before\"):e(\"after\"))},r)}});var S2e={};Vt(S2e,{useListInput:()=>ED});var ED,VF=Xe(()=>{yD();ED=function(t,e,{active:r,minus:s,plus:a,set:n,loop:c=!0}){Um({active:r},(f,p)=>{let h=e.indexOf(t);switch(p.name){case s:{let E=h-1;if(c){n(e[(e.length+E)%e.length]);return}if(E<0)return;n(e[E])}break;case a:{let E=h+1;if(c){n(e[E%e.length]);return}if(E>=e.length)return;n(e[E])}break}},[e,t,a,n,c])}});var JF={};Vt(JF,{ScrollableItems:()=>Cgt});var eg,dl,Cgt,KF=Xe(()=>{eg=ut(Wc()),dl=ut(hn());UW();VF();Cgt=({active:t=!0,children:e=[],radius:r=10,size:s=1,loop:a=!0,onFocusRequest:n,willReachEnd:c})=>{let f=N=>{if(N.key===null)throw new Error(\"Expected all children to have a key\");return N.key},p=dl.default.Children.map(e,N=>f(N)),h=p[0],[E,C]=(0,dl.useState)(h),S=p.indexOf(E);(0,dl.useEffect)(()=>{p.includes(E)||C(h)},[e]),(0,dl.useEffect)(()=>{c&&S>=p.length-2&&c()},[S]),MW({active:t&&!!n},N=>{n?.(N)},[n]),ED(E,p,{active:t,minus:\"up\",plus:\"down\",set:C,loop:a});let P=S-r,I=S+r;I>p.length&&(P-=I-p.length,I=p.length),P<0&&(I+=-P,P=0),I>=p.length&&(I=p.length-1);let R=[];for(let N=P;N<=I;++N){let U=p[N],W=t&&U===E;R.push(dl.default.createElement(eg.Box,{key:U,height:s},dl.default.createElement(eg.Box,{marginLeft:1,marginRight:1},dl.default.createElement(eg.Text,null,W?dl.default.createElement(eg.Text,{color:\"cyan\",bold:!0},\">\"):\" \")),dl.default.createElement(eg.Box,null,dl.default.cloneElement(e[N],{active:W}))))}return dl.default.createElement(eg.Box,{flexDirection:\"column\",width:\"100%\"},R)}});var D2e,th,b2e,_W,P2e,HW=Xe(()=>{D2e=ut(Wc()),th=ut(hn()),b2e=Ie(\"readline\"),_W=th.default.createContext(null),P2e=({children:t})=>{let{stdin:e,setRawMode:r}=(0,D2e.useStdin)();(0,th.useEffect)(()=>{r&&r(!0),e&&(0,b2e.emitKeypressEvents)(e)},[e,r]);let[s,a]=(0,th.useState)(new Map),n=(0,th.useMemo)(()=>({getAll:()=>s,get:c=>s.get(c),set:(c,f)=>a(new Map([...s,[c,f]]))}),[s,a]);return th.default.createElement(_W.Provider,{value:n,children:t})}});var jW={};Vt(jW,{useMinistore:()=>wgt});function wgt(t,e){let r=(0,zF.useContext)(_W);if(r===null)throw new Error(\"Expected this hook to run with a ministore context attached\");if(typeof t>\"u\")return r.getAll();let s=(0,zF.useCallback)(n=>{r.set(t,n)},[t,r.set]),a=r.get(t);return typeof a>\"u\"&&(a=e),[a,s]}var zF,GW=Xe(()=>{zF=ut(hn());HW()});var ZF={};Vt(ZF,{renderForm:()=>Bgt});async function Bgt(t,e,{stdin:r,stdout:s,stderr:a}){let n,c=p=>{let{exit:h}=(0,XF.useApp)();Um({active:!0},(E,C)=>{C.name===\"return\"&&(n=p,h())},[h,p])},{waitUntilExit:f}=(0,XF.render)(qW.default.createElement(P2e,null,qW.default.createElement(t,{...e,useSubmit:c})),{stdin:r,stdout:s,stderr:a});return await f(),n}var XF,qW,$F=Xe(()=>{XF=ut(Wc()),qW=ut(hn());HW();yD()});var T2e=_(ID=>{\"use strict\";Object.defineProperty(ID,\"__esModule\",{value:!0});ID.UncontrolledTextInput=void 0;var k2e=hn(),WW=hn(),x2e=Wc(),_m=TE(),Q2e=({value:t,placeholder:e=\"\",focus:r=!0,mask:s,highlightPastedText:a=!1,showCursor:n=!0,onChange:c,onSubmit:f})=>{let[{cursorOffset:p,cursorWidth:h},E]=WW.useState({cursorOffset:(t||\"\").length,cursorWidth:0});WW.useEffect(()=>{E(R=>{if(!r||!n)return R;let N=t||\"\";return R.cursorOffset>N.length-1?{cursorOffset:N.length,cursorWidth:0}:R})},[t,r,n]);let C=a?h:0,S=s?s.repeat(t.length):t,P=S,I=e?_m.grey(e):void 0;if(n&&r){I=e.length>0?_m.inverse(e[0])+_m.grey(e.slice(1)):_m.inverse(\" \"),P=S.length>0?\"\":_m.inverse(\" \");let R=0;for(let N of S)R>=p-C&&R<=p?P+=_m.inverse(N):P+=N,R++;S.length>0&&p===S.length&&(P+=_m.inverse(\" \"))}return x2e.useInput((R,N)=>{if(N.upArrow||N.downArrow||N.ctrl&&R===\"c\"||N.tab||N.shift&&N.tab)return;if(N.return){f&&f(t);return}let U=p,W=t,ee=0;N.leftArrow?n&&U--:N.rightArrow?n&&U++:N.backspace||N.delete?p>0&&(W=t.slice(0,p-1)+t.slice(p,t.length),U--):(W=t.slice(0,p)+R+t.slice(p,t.length),U+=R.length,R.length>1&&(ee=R.length)),p<0&&(U=0),p>t.length&&(U=t.length),E({cursorOffset:U,cursorWidth:ee}),W!==t&&c(W)},{isActive:r}),k2e.createElement(x2e.Text,null,e?S.length>0?P:I:P)};ID.default=Q2e;ID.UncontrolledTextInput=({initialValue:t=\"\",...e})=>{let[r,s]=WW.useState(t);return k2e.createElement(Q2e,Object.assign({},e,{value:r,onChange:s}))}});var N2e={};Vt(N2e,{Pad:()=>YW});var R2e,F2e,YW,VW=Xe(()=>{R2e=ut(Wc()),F2e=ut(hn()),YW=({length:t,active:e})=>{if(t===0)return null;let r=t>1?` ${\"-\".repeat(t-1)}`:\" \";return F2e.default.createElement(R2e.Text,{dimColor:!e},r)}});var O2e={};Vt(O2e,{ItemOptions:()=>vgt});var wD,tg,vgt,L2e=Xe(()=>{wD=ut(Wc()),tg=ut(hn());VF();WF();VW();vgt=function({active:t,skewer:e,options:r,value:s,onChange:a,sizes:n=[]}){let c=r.filter(({label:p})=>!!p).map(({value:p})=>p),f=r.findIndex(p=>p.value===s&&p.label!=\"\");return ED(s,c,{active:t,minus:\"left\",plus:\"right\",set:a}),tg.default.createElement(tg.default.Fragment,null,r.map(({label:p},h)=>{let E=h===f,C=n[h]-1||0,S=p.replace(/[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,\"\"),P=Math.max(0,C-S.length-2);return p?tg.default.createElement(wD.Box,{key:p,width:C,marginLeft:1},tg.default.createElement(wD.Text,{wrap:\"truncate\"},tg.default.createElement(OW,{active:E}),\" \",p),e?tg.default.createElement(YW,{active:t,length:P}):null):tg.default.createElement(wD.Box,{key:`spacer-${h}`,width:C,marginLeft:1})}))}});var Z2e=_((AZt,X2e)=>{var iY;X2e.exports=()=>(typeof iY>\"u\"&&(iY=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"WzmldgG9bVwKtw2AiKrr15/TXjBi3O6p4GPsCmiaKasTbJt2D+y21UTTKAOXMxqqqpq6VIbMhM6nhTJgV91V/5cFDwSquCGpJ1XeWdjhTo079eGQs7AbMhPpEM0oNVKxWVSokGh1zUG1OJFHO+BouYdnwZE6MKWCZkTDEH/XOa63elQXHNewNtw3eZjOST/PFzqE15siLy8+9Pwl5wiSrGtqcy24yMtDbvbtnc6+SKLjQeHW8wsYF3HDH+mfwvahWfT13uhuqPbHARtcHABFCLFV+2AucYtH5HCfSPg0sVm+8ec1x5FggZBS6voI6fWF2RVXSgNifmuv/0ZNERTIsq4D3OVL3+xRCpTLpvbP52V0hXXqrhAMQ4qu15dSVmBI5AI7MVyT5/xv7+y/vukaU4ZnwuRwn4hn5d1As6UWYtXwXrV3/8ukdDu1OBMnIX+eJdAD2VdSuCm1+OVPq69f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om6zv/9neYg4H7CEvf0/Qu0OsPHo3OcaVbncU/7ru6MOHKxdyjIlJzjWV398Xqzry9np1Yj4SqnuOz5WypqTsrv7FSWPCWZjlp0Oqb4+1wcft0yIHShagyc0G4PsKWZJTzOUQCbXrybrV1DP78JdXSBu73hBT8wlTtND+iHyNaBsN/sKNUtkCUcnuvLZu4Nv2l7/J/WRZel3F8H\",\"base64\")).toString()),iY)});var EBe=_((LZt,yBe)=>{var pY=Symbol(\"arg flag\"),Yc=class t extends Error{constructor(e,r){super(e),this.name=\"ArgError\",this.code=r,Object.setPrototypeOf(this,t.prototype)}};function UD(t,{argv:e=process.argv.slice(2),permissive:r=!1,stopAtPositional:s=!1}={}){if(!t)throw new Yc(\"argument specification object is required\",\"ARG_CONFIG_NO_SPEC\");let a={_:[]},n={},c={};for(let f of Object.keys(t)){if(!f)throw new Yc(\"argument key cannot be an empty string\",\"ARG_CONFIG_EMPTY_KEY\");if(f[0]!==\"-\")throw new Yc(`argument key must start with '-' but found: '${f}'`,\"ARG_CONFIG_NONOPT_KEY\");if(f.length===1)throw new Yc(`argument key must have a name; singular '-' keys are not allowed: ${f}`,\"ARG_CONFIG_NONAME_KEY\");if(typeof t[f]==\"string\"){n[f]=t[f];continue}let p=t[f],h=!1;if(Array.isArray(p)&&p.length===1&&typeof p[0]==\"function\"){let[E]=p;p=(C,S,P=[])=>(P.push(E(C,S,P[P.length-1])),P),h=E===Boolean||E[pY]===!0}else if(typeof p==\"function\")h=p===Boolean||p[pY]===!0;else throw new Yc(`type missing or not a function or valid array type: ${f}`,\"ARG_CONFIG_VAD_TYPE\");if(f[1]!==\"-\"&&f.length>2)throw new Yc(`short argument keys (with a single hyphen) must have only one character: ${f}`,\"ARG_CONFIG_SHORTOPT_TOOLONG\");c[f]=[p,h]}for(let f=0,p=e.length;f<p;f++){let h=e[f];if(s&&a._.length>0){a._=a._.concat(e.slice(f));break}if(h===\"--\"){a._=a._.concat(e.slice(f+1));break}if(h.length>1&&h[0]===\"-\"){let E=h[1]===\"-\"||h.length===2?[h]:h.slice(1).split(\"\").map(C=>`-${C}`);for(let C=0;C<E.length;C++){let S=E[C],[P,I]=S[1]===\"-\"?S.split(/=(.*)/,2):[S,void 0],R=P;for(;R in n;)R=n[R];if(!(R in c))if(r){a._.push(S);continue}else throw new Yc(`unknown or unexpected option: ${P}`,\"ARG_UNKNOWN_OPTION\");let[N,U]=c[R];if(!U&&C+1<E.length)throw new Yc(`option requires argument (but was followed by another short argument): ${P}`,\"ARG_MISSING_REQUIRED_SHORTARG\");if(U)a[R]=N(!0,R,a[R]);else if(I===void 0){if(e.length<f+2||e[f+1].length>1&&e[f+1][0]===\"-\"&&!(e[f+1].match(/^-?\\d*(\\.(?=\\d))?\\d*$/)&&(N===Number||typeof BigInt<\"u\"&&N===BigInt))){let W=P===R?\"\":` (alias for ${R})`;throw new Yc(`option requires argument: ${P}${W}`,\"ARG_MISSING_REQUIRED_LONGARG\")}a[R]=N(e[f+1],R,a[R]),++f}else a[R]=N(I,R,a[R])}}else a._.push(h)}return a}UD.flag=t=>(t[pY]=!0,t);UD.COUNT=UD.flag((t,e,r)=>(r||0)+1);UD.ArgError=Yc;yBe.exports=UD});var bBe=_((p$t,DBe)=>{var mY;DBe.exports=()=>(typeof mY>\"u\"&&(mY=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"W7YZIYpg4/ADhvxMjEQIGwcAGt8pgGWBbYj0o7UviYayJiw3vPFeTWWzdDZyI4g/zgB3ckSMeng+3aqqyQXxrRke/8Sqq0wDa5K1CuJ/ezX/3z9fZ50Gk2s5pcrpxSnVo3lixZWXGAHDxdl15uF/qnNnmbDSZHOomC6KSBu2bPKR50q1+UC6iJWq1rOp1jRMYxXuzFYYDpzTV4Je9yHEA03SbVpbvGIj/FQJeL7mh66qm3q9nguUEq1qZdc5Bn12j6J2/kKrr2lzEef375uWG0mAuCZIlekoidc4xutCHUUBu+q+d8U26Bl0A9ACxME4cD051ryqev+hu9GDRYNcCVxyjXWRjAtdF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nZYubJHccY6zt3Iqw3jp0ehCj26dOpVzveIQ+JdBs7z9mi1F1WRHbG1nCZKkjzXeZWRsmAVuV63K+6fxczgXicHNOJ1byuXpDxgsiM4vGlf37hbCEojg5vBE/THcQU9c5ulMBqczQkatKAOyj1PTEHtuASZ7plKRQ86aNZPWcDTKBdjsZ8Q2H5ayc9oD/mPycHq6U+1y4P8yFbZkvfoLHvnE+hzdismty7Na2YWmYHREuaa7nfhBpxqKVsf0TI1f917qMKTieUfdlNsEnYhT7TbcgKFvREH46deSh9qjtW9KUSpPOWMqONNPcL1F4LUzN2UCO89sAnoX1H/WtjHdkqMtYzswsd1El/me4hRszg6YO0GgWxNuH38Tm2nUIAdMxaZmEKJ8L4rRiAe5WH7Hg8W8njHEcVDB2flFwshvQiuTLoN0XbKrhWHNW+CSKj/6oZf6TL52UpV5UHr/4fY3zbEnkSctnyS1fq8mlfy7IDBeKTRksjn5uKai+tWArnq4FyLGWTCS9Ajp60isRCoFJi1+ndJekdhnWAhnveiA6icBgsxQzkEVrAjZALn3tw/1UmTqKt8m1OdOY/v38fB3j4mcnBX2rrU1uGtLz+9jTF4/o6Ytlk4O5NiiyTKBCLOwKP7HhZqG1fQnBYtxks9dVZRHYDpVvtIokwERT7NPeSwnKqAWGHxPsiAL6YvVI+BBMtunYk+99NOWWtyiadeaGwCbDFz+OFqnQM9GPHlQ5/Lnt3tnrRWyXyaR/4mO/E/fv65K911gFohqGSVGLnzgM71eBIw8LF2+BLqq+mPqi8ovIVdliBIwN+MDY4zKOxfyM4zPjWIdHsZM19d1SrB7nmiLRA8+AP2XBcFaAm6B/sJ2iJA8=\",\"base64\")).toString()),mY)});var TBe=_((BY,vY)=>{(function(t){BY&&typeof BY==\"object\"&&typeof vY<\"u\"?vY.exports=t():typeof define==\"function\"&&define.amd?define([],t):typeof window<\"u\"?window.isWindows=t():typeof global<\"u\"?global.isWindows=t():typeof self<\"u\"?self.isWindows=t():this.isWindows=t()})(function(){\"use strict\";return function(){return process&&(process.platform===\"win32\"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var OBe=_((fer,NBe)=>{\"use strict\";SY.ifExists=Sdt;var Dw=Ie(\"util\"),Vc=Ie(\"path\"),RBe=TBe(),wdt=/^#!\\s*(?:\\/usr\\/bin\\/env)?\\s*([^ \\t]+)(.*)$/,Bdt={createPwshFile:!0,createCmdFile:RBe(),fs:Ie(\"fs\")},vdt=new Map([[\".js\",\"node\"],[\".cjs\",\"node\"],[\".mjs\",\"node\"],[\".cmd\",\"cmd\"],[\".bat\",\"cmd\"],[\".ps1\",\"pwsh\"],[\".sh\",\"sh\"]]);function FBe(t){let e={...Bdt,...t},r=e.fs;return e.fs_={chmod:r.chmod?Dw.promisify(r.chmod):async()=>{},mkdir:Dw.promisify(r.mkdir),readFile:Dw.promisify(r.readFile),stat:Dw.promisify(r.stat),unlink:Dw.promisify(r.unlink),writeFile:Dw.promisify(r.writeFile)},e}async function SY(t,e,r){let s=FBe(r);await s.fs_.stat(t),await bdt(t,e,s)}function Sdt(t,e,r){return SY(t,e,r).catch(()=>{})}function Ddt(t,e){return e.fs_.unlink(t).catch(()=>{})}async function bdt(t,e,r){let s=await Tdt(t,r);return await Pdt(e,r),xdt(t,e,s,r)}function Pdt(t,e){return e.fs_.mkdir(Vc.dirname(t),{recursive:!0})}function xdt(t,e,r,s){let a=FBe(s),n=[{generator:Ndt,extension:\"\"}];return a.createCmdFile&&n.push({generator:Fdt,extension:\".cmd\"}),a.createPwshFile&&n.push({generator:Odt,extension:\".ps1\"}),Promise.all(n.map(c=>Rdt(t,e+c.extension,r,c.generator,a)))}function kdt(t,e){return Ddt(t,e)}function Qdt(t,e){return Ldt(t,e)}async function Tdt(t,e){let a=(await e.fs_.readFile(t,\"utf8\")).trim().split(/\\r*\\n/)[0].match(wdt);if(!a){let n=Vc.extname(t).toLowerCase();return{program:vdt.get(n)||null,additionalArgs:\"\"}}return{program:a[1],additionalArgs:a[2]}}async function Rdt(t,e,r,s,a){let n=a.preserveSymlinks?\"--preserve-symlinks\":\"\",c=[r.additionalArgs,n].filter(f=>f).join(\" \");return a=Object.assign({},a,{prog:r.program,args:c}),await kdt(e,a),await a.fs_.writeFile(e,s(t,e,a),\"utf8\"),Qdt(e,a)}function Fdt(t,e,r){let a=Vc.relative(Vc.dirname(e),t).split(\"/\").join(\"\\\\\"),n=Vc.isAbsolute(a)?`\"${a}\"`:`\"%~dp0\\\\${a}\"`,c,f=r.prog,p=r.args||\"\",h=DY(r.nodePath).win32;f?(c=`\"%~dp0\\\\${f}.exe\"`,a=n):(f=n,p=\"\",a=\"\");let E=r.progArgs?`${r.progArgs.join(\" \")} `:\"\",C=h?`@SET NODE_PATH=${h}\\r\n`:\"\";return c?C+=`@IF EXIST ${c} (\\r\n  ${c} ${p} ${a} ${E}%*\\r\n) ELSE (\\r\n  @SETLOCAL\\r\n  @SET PATHEXT=%PATHEXT:;.JS;=;%\\r\n  ${f} ${p} ${a} ${E}%*\\r\n)\\r\n`:C+=`@${f} ${p} ${a} ${E}%*\\r\n`,C}function Ndt(t,e,r){let s=Vc.relative(Vc.dirname(e),t),a=r.prog&&r.prog.split(\"\\\\\").join(\"/\"),n;s=s.split(\"\\\\\").join(\"/\");let c=Vc.isAbsolute(s)?`\"${s}\"`:`\"$basedir/${s}\"`,f=r.args||\"\",p=DY(r.nodePath).posix;a?(n=`\"$basedir/${r.prog}\"`,s=c):(a=c,f=\"\",s=\"\");let h=r.progArgs?`${r.progArgs.join(\" \")} `:\"\",E=`#!/bin/sh\nbasedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\\\\\,/,g')\")\n\ncase \\`uname\\` in\n    *CYGWIN*) basedir=\\`cygpath -w \"$basedir\"\\`;;\nesac\n\n`,C=r.nodePath?`export NODE_PATH=\"${p}\"\n`:\"\";return n?E+=`${C}if [ -x ${n} ]; then\n  exec ${n} ${f} ${s} ${h}\"$@\"\nelse\n  exec ${a} ${f} ${s} ${h}\"$@\"\nfi\n`:E+=`${C}${a} ${f} ${s} ${h}\"$@\"\nexit $?\n`,E}function Odt(t,e,r){let s=Vc.relative(Vc.dirname(e),t),a=r.prog&&r.prog.split(\"\\\\\").join(\"/\"),n=a&&`\"${a}$exe\"`,c;s=s.split(\"\\\\\").join(\"/\");let f=Vc.isAbsolute(s)?`\"${s}\"`:`\"$basedir/${s}\"`,p=r.args||\"\",h=DY(r.nodePath),E=h.win32,C=h.posix;n?(c=`\"$basedir/${r.prog}$exe\"`,s=f):(n=f,p=\"\",s=\"\");let S=r.progArgs?`${r.progArgs.join(\" \")} `:\"\",P=`#!/usr/bin/env pwsh\n$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n\n$exe=\"\"\n${r.nodePath?`$env_node_path=$env:NODE_PATH\n$env:NODE_PATH=\"${E}\"\n`:\"\"}if ($PSVersionTable.PSVersion -lt \"6.0\" -or $IsWindows) {\n  # Fix case when both the Windows and Linux builds of Node\n  # are installed in the same directory\n  $exe=\".exe\"\n}`;return r.nodePath&&(P+=` else {\n  $env:NODE_PATH=\"${C}\"\n}`),c?P+=`\n$ret=0\nif (Test-Path ${c}) {\n  # Support pipeline input\n  if ($MyInvocation.ExpectingInput) {\n    $input | & ${c} ${p} ${s} ${S}$args\n  } else {\n    & ${c} ${p} ${s} ${S}$args\n  }\n  $ret=$LASTEXITCODE\n} else {\n  # Support pipeline input\n  if ($MyInvocation.ExpectingInput) {\n    $input | & ${n} ${p} ${s} ${S}$args\n  } else {\n    & ${n} ${p} ${s} ${S}$args\n  }\n  $ret=$LASTEXITCODE\n}\n${r.nodePath?`$env:NODE_PATH=$env_node_path\n`:\"\"}exit $ret\n`:P+=`\n# Support pipeline input\nif ($MyInvocation.ExpectingInput) {\n  $input | & ${n} ${p} ${s} ${S}$args\n} else {\n  & ${n} ${p} ${s} ${S}$args\n}\n${r.nodePath?`$env:NODE_PATH=$env_node_path\n`:\"\"}exit $LASTEXITCODE\n`,P}function Ldt(t,e){return e.fs_.chmod(t,493)}function DY(t){if(!t)return{win32:\"\",posix:\"\"};let e=typeof t==\"string\"?t.split(Vc.delimiter):Array.from(t),r={};for(let s=0;s<e.length;s++){let a=e[s].split(\"/\").join(\"\\\\\"),n=RBe()?e[s].split(\"\\\\\").join(\"/\").replace(/^([^:\\\\/]*):/,(c,f)=>`/mnt/${f.toLowerCase()}`):e[s];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[s]={win32:a,posix:n}}return r}NBe.exports=SY});var _Y=_((_tr,tve)=>{tve.exports=Ie(\"stream\")});var sve=_((Htr,ive)=>{\"use strict\";function rve(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,s)}return r}function mmt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rve(Object(r),!0).forEach(function(s){ymt(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rve(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function ymt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Emt(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function nve(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,\"value\"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function Imt(t,e,r){return e&&nve(t.prototype,e),r&&nve(t,r),t}var Cmt=Ie(\"buffer\"),pN=Cmt.Buffer,wmt=Ie(\"util\"),HY=wmt.inspect,Bmt=HY&&HY.custom||\"inspect\";function vmt(t,e,r){pN.prototype.copy.call(t,e,r)}ive.exports=function(){function t(){Emt(this,t),this.head=null,this.tail=null,this.length=0}return Imt(t,[{key:\"push\",value:function(r){var s={data:r,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length}},{key:\"unshift\",value:function(r){var s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}},{key:\"shift\",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(r){if(this.length===0)return\"\";for(var s=this.head,a=\"\"+s.data;s=s.next;)a+=r+s.data;return a}},{key:\"concat\",value:function(r){if(this.length===0)return pN.alloc(0);for(var s=pN.allocUnsafe(r>>>0),a=this.head,n=0;a;)vmt(a.data,s,n),n+=a.data.length,a=a.next;return s}},{key:\"consume\",value:function(r,s){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=s?this._getString(r):this._getBuffer(r),a}},{key:\"first\",value:function(){return this.head.data}},{key:\"_getString\",value:function(r){var s=this.head,a=1,n=s.data;for(r-=n.length;s=s.next;){var c=s.data,f=r>c.length?c.length:r;if(f===c.length?n+=c:n+=c.slice(0,r),r-=f,r===0){f===c.length?(++a,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=c.slice(f));break}++a}return this.length-=a,n}},{key:\"_getBuffer\",value:function(r){var s=pN.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(s),r-=a.data.length;a=a.next;){var c=a.data,f=r>c.length?c.length:r;if(c.copy(s,s.length-r,0,f),r-=f,r===0){f===c.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=c.slice(f));break}++n}return this.length-=n,s}},{key:Bmt,value:function(r,s){return HY(this,mmt({},s,{depth:0,customInspect:!1}))}}]),t}()});var GY=_((jtr,ave)=>{\"use strict\";function Smt(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(jY,this,t)):process.nextTick(jY,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(hN,r):(r._writableState.errorEmitted=!0,process.nextTick(ove,r,n)):process.nextTick(ove,r,n):e?(process.nextTick(hN,r),e(n)):process.nextTick(hN,r)}),this)}function ove(t,e){jY(t,e),hN(t)}function hN(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit(\"close\")}function Dmt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function jY(t,e){t.emit(\"error\",e)}function bmt(t,e){var r=t._readableState,s=t._writableState;r&&r.autoDestroy||s&&s.autoDestroy?t.destroy(e):t.emit(\"error\",e)}ave.exports={destroy:Smt,undestroy:Dmt,errorOrDestroy:bmt}});var lg=_((Gtr,uve)=>{\"use strict\";var cve={};function Kc(t,e,r){r||(r=Error);function s(n,c,f){return typeof e==\"string\"?e:e(n,c,f)}class a extends r{constructor(c,f,p){super(s(c,f,p))}}a.prototype.name=r.name,a.prototype.code=t,cve[t]=a}function lve(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(s=>String(s)),r>2?`one of ${e} ${t.slice(0,r-1).join(\", \")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function Pmt(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function xmt(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function kmt(t,e,r){return typeof r!=\"number\"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Kc(\"ERR_INVALID_OPT_VALUE\",function(t,e){return'The value \"'+e+'\" is invalid for option \"'+t+'\"'},TypeError);Kc(\"ERR_INVALID_ARG_TYPE\",function(t,e,r){let s;typeof e==\"string\"&&Pmt(e,\"not \")?(s=\"must not be\",e=e.replace(/^not /,\"\")):s=\"must be\";let a;if(xmt(t,\" argument\"))a=`The ${t} ${s} ${lve(e,\"type\")}`;else{let n=kmt(t,\".\")?\"property\":\"argument\";a=`The \"${t}\" ${n} ${s} ${lve(e,\"type\")}`}return a+=`. Received type ${typeof r}`,a},TypeError);Kc(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\");Kc(\"ERR_METHOD_NOT_IMPLEMENTED\",function(t){return\"The \"+t+\" method is not implemented\"});Kc(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\");Kc(\"ERR_STREAM_DESTROYED\",function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"});Kc(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\");Kc(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\");Kc(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\");Kc(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError);Kc(\"ERR_UNKNOWN_ENCODING\",function(t){return\"Unknown encoding: \"+t},TypeError);Kc(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\");uve.exports.codes=cve});var qY=_((qtr,fve)=>{\"use strict\";var Qmt=lg().codes.ERR_INVALID_OPT_VALUE;function Tmt(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Rmt(t,e,r,s){var a=Tmt(e,s,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=s?r:\"highWaterMark\";throw new Qmt(n,a)}return Math.floor(a)}return t.objectMode?16:16*1024}fve.exports={getHighWaterMark:Rmt}});var Ave=_((Wtr,WY)=>{typeof Object.create==\"function\"?WY.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:WY.exports=function(e,r){if(r){e.super_=r;var s=function(){};s.prototype=r.prototype,e.prototype=new s,e.prototype.constructor=e}}});var cg=_((Ytr,VY)=>{try{if(YY=Ie(\"util\"),typeof YY.inherits!=\"function\")throw\"\";VY.exports=YY.inherits}catch{VY.exports=Ave()}var YY});var hve=_((Vtr,pve)=>{pve.exports=Ie(\"util\").deprecate});var zY=_((Jtr,Ive)=>{\"use strict\";Ive.exports=Vi;function dve(t){var e=this;this.next=null,this.entry=null,this.finish=function(){oyt(e,t)}}var Tw;Vi.WritableState=ZD;var Fmt={deprecate:hve()},mve=_Y(),dN=Ie(\"buffer\").Buffer,Nmt=global.Uint8Array||function(){};function Omt(t){return dN.from(t)}function Lmt(t){return dN.isBuffer(t)||t instanceof Nmt}var KY=GY(),Mmt=qY(),Umt=Mmt.getHighWaterMark,ug=lg().codes,_mt=ug.ERR_INVALID_ARG_TYPE,Hmt=ug.ERR_METHOD_NOT_IMPLEMENTED,jmt=ug.ERR_MULTIPLE_CALLBACK,Gmt=ug.ERR_STREAM_CANNOT_PIPE,qmt=ug.ERR_STREAM_DESTROYED,Wmt=ug.ERR_STREAM_NULL_VALUES,Ymt=ug.ERR_STREAM_WRITE_AFTER_END,Vmt=ug.ERR_UNKNOWN_ENCODING,Rw=KY.errorOrDestroy;cg()(Vi,mve);function Jmt(){}function ZD(t,e,r){Tw=Tw||Ym(),t=t||{},typeof r!=\"boolean\"&&(r=e instanceof Tw),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Umt(this,t,\"writableHighWaterMark\",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){tyt(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new dve(this)}ZD.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ZD.prototype,\"buffer\",{get:Fmt.deprecate(function(){return this.getBuffer()},\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch{}})();var gN;typeof Symbol==\"function\"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==\"function\"?(gN=Function.prototype[Symbol.hasInstance],Object.defineProperty(Vi,Symbol.hasInstance,{value:function(e){return gN.call(this,e)?!0:this!==Vi?!1:e&&e._writableState instanceof ZD}})):gN=function(e){return e instanceof this};function Vi(t){Tw=Tw||Ym();var e=this instanceof Tw;if(!e&&!gN.call(Vi,this))return new Vi(t);this._writableState=new ZD(t,this,e),this.writable=!0,t&&(typeof t.write==\"function\"&&(this._write=t.write),typeof t.writev==\"function\"&&(this._writev=t.writev),typeof t.destroy==\"function\"&&(this._destroy=t.destroy),typeof t.final==\"function\"&&(this._final=t.final)),mve.call(this)}Vi.prototype.pipe=function(){Rw(this,new Gmt)};function Kmt(t,e){var r=new Ymt;Rw(t,r),process.nextTick(e,r)}function zmt(t,e,r,s){var a;return r===null?a=new Wmt:typeof r!=\"string\"&&!e.objectMode&&(a=new _mt(\"chunk\",[\"string\",\"Buffer\"],r)),a?(Rw(t,a),process.nextTick(s,a),!1):!0}Vi.prototype.write=function(t,e,r){var s=this._writableState,a=!1,n=!s.objectMode&&Lmt(t);return n&&!dN.isBuffer(t)&&(t=Omt(t)),typeof e==\"function\"&&(r=e,e=null),n?e=\"buffer\":e||(e=s.defaultEncoding),typeof r!=\"function\"&&(r=Jmt),s.ending?Kmt(this,r):(n||zmt(this,s,t,r))&&(s.pendingcb++,a=Zmt(this,s,n,t,e,r)),a};Vi.prototype.cork=function(){this._writableState.corked++};Vi.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&yve(this,t))};Vi.prototype.setDefaultEncoding=function(e){if(typeof e==\"string\"&&(e=e.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((e+\"\").toLowerCase())>-1))throw new Vmt(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Vi.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Xmt(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e==\"string\"&&(e=dN.from(e,r)),e}Object.defineProperty(Vi.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Zmt(t,e,r,s,a,n){if(!r){var c=Xmt(e,s,a);s!==c&&(r=!0,a=\"buffer\",s=c)}var f=e.objectMode?1:s.length;e.length+=f;var p=e.length<e.highWaterMark;if(p||(e.needDrain=!0),e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:s,encoding:a,isBuf:r,callback:n,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else JY(t,e,!1,f,s,a,n);return p}function JY(t,e,r,s,a,n,c){e.writelen=s,e.writecb=c,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new qmt(\"write\")):r?t._writev(a,e.onwrite):t._write(a,n,e.onwrite),e.sync=!1}function $mt(t,e,r,s,a){--e.pendingcb,r?(process.nextTick(a,s),process.nextTick(XD,t,e),t._writableState.errorEmitted=!0,Rw(t,s)):(a(s),t._writableState.errorEmitted=!0,Rw(t,s),XD(t,e))}function eyt(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function tyt(t,e){var r=t._writableState,s=r.sync,a=r.writecb;if(typeof a!=\"function\")throw new jmt;if(eyt(r),e)$mt(t,r,s,e,a);else{var n=Eve(r)||t.destroyed;!n&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&yve(t,r),s?process.nextTick(gve,t,r,n,a):gve(t,r,n,a)}}function gve(t,e,r,s){r||ryt(t,e),e.pendingcb--,s(),XD(t,e)}function ryt(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"))}function yve(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var s=e.bufferedRequestCount,a=new Array(s),n=e.corkedRequestsFree;n.entry=r;for(var c=0,f=!0;r;)a[c]=r,r.isBuf||(f=!1),r=r.next,c+=1;a.allBuffers=f,JY(t,e,!0,e.length,a,\"\",n.finish),e.pendingcb++,e.lastBufferedRequest=null,n.next?(e.corkedRequestsFree=n.next,n.next=null):e.corkedRequestsFree=new dve(e),e.bufferedRequestCount=0}else{for(;r;){var p=r.chunk,h=r.encoding,E=r.callback,C=e.objectMode?1:p.length;if(JY(t,e,!1,C,p,h,E),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Vi.prototype._write=function(t,e,r){r(new Hmt(\"_write()\"))};Vi.prototype._writev=null;Vi.prototype.end=function(t,e,r){var s=this._writableState;return typeof t==\"function\"?(r=t,t=null,e=null):typeof e==\"function\"&&(r=e,e=null),t!=null&&this.write(t,e),s.corked&&(s.corked=1,this.uncork()),s.ending||syt(this,s,r),this};Object.defineProperty(Vi.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}});function Eve(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function nyt(t,e){t._final(function(r){e.pendingcb--,r&&Rw(t,r),e.prefinished=!0,t.emit(\"prefinish\"),XD(t,e)})}function iyt(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final==\"function\"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(nyt,t,e)):(e.prefinished=!0,t.emit(\"prefinish\")))}function XD(t,e){var r=Eve(e);if(r&&(iyt(t,e),e.pendingcb===0&&(e.finished=!0,t.emit(\"finish\"),e.autoDestroy))){var s=t._readableState;(!s||s.autoDestroy&&s.endEmitted)&&t.destroy()}return r}function syt(t,e,r){e.ending=!0,XD(t,e),r&&(e.finished?process.nextTick(r):t.once(\"finish\",r)),e.ended=!0,t.writable=!1}function oyt(t,e,r){var s=t.entry;for(t.entry=null;s;){var a=s.callback;e.pendingcb--,a(r),s=s.next}e.corkedRequestsFree.next=t}Object.defineProperty(Vi.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Vi.prototype.destroy=KY.destroy;Vi.prototype._undestroy=KY.undestroy;Vi.prototype._destroy=function(t,e){e(t)}});var Ym=_((Ktr,wve)=>{\"use strict\";var ayt=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};wve.exports=dA;var Cve=$Y(),ZY=zY();cg()(dA,Cve);for(XY=ayt(ZY.prototype),mN=0;mN<XY.length;mN++)yN=XY[mN],dA.prototype[yN]||(dA.prototype[yN]=ZY.prototype[yN]);var XY,yN,mN;function dA(t){if(!(this instanceof dA))return new dA(t);Cve.call(this,t),ZY.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once(\"end\",lyt)))}Object.defineProperty(dA.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(dA.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(dA.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}});function lyt(){this._writableState.ended||process.nextTick(cyt,this)}function cyt(t){t.end()}Object.defineProperty(dA.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Sve=_((eV,vve)=>{var EN=Ie(\"buffer\"),ah=EN.Buffer;function Bve(t,e){for(var r in t)e[r]=t[r]}ah.from&&ah.alloc&&ah.allocUnsafe&&ah.allocUnsafeSlow?vve.exports=EN:(Bve(EN,eV),eV.Buffer=Fw);function Fw(t,e,r){return ah(t,e,r)}Bve(ah,Fw);Fw.from=function(t,e,r){if(typeof t==\"number\")throw new TypeError(\"Argument must not be a number\");return ah(t,e,r)};Fw.alloc=function(t,e,r){if(typeof t!=\"number\")throw new TypeError(\"Argument must be a number\");var s=ah(t);return e!==void 0?typeof r==\"string\"?s.fill(e,r):s.fill(e):s.fill(0),s};Fw.allocUnsafe=function(t){if(typeof t!=\"number\")throw new TypeError(\"Argument must be a number\");return ah(t)};Fw.allocUnsafeSlow=function(t){if(typeof t!=\"number\")throw new TypeError(\"Argument must be a number\");return EN.SlowBuffer(t)}});var nV=_(bve=>{\"use strict\";var rV=Sve().Buffer,Dve=rV.isEncoding||function(t){switch(t=\"\"+t,t&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function uyt(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}function fyt(t){var e=uyt(t);if(typeof e!=\"string\"&&(rV.isEncoding===Dve||!Dve(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}bve.StringDecoder=$D;function $D(t){this.encoding=fyt(t);var e;switch(this.encoding){case\"utf16le\":this.text=myt,this.end=yyt,e=4;break;case\"utf8\":this.fillLast=hyt,e=4;break;case\"base64\":this.text=Eyt,this.end=Iyt,e=3;break;default:this.write=Cyt,this.end=wyt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=rV.allocUnsafe(e)}$D.prototype.write=function(t){if(t.length===0)return\"\";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||\"\"};$D.prototype.end=dyt;$D.prototype.text=gyt;$D.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function tV(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Ayt(t,e,r){var s=e.length-1;if(s<r)return 0;var a=tV(e[s]);return a>=0?(a>0&&(t.lastNeed=a-1),a):--s<r||a===-2?0:(a=tV(e[s]),a>=0?(a>0&&(t.lastNeed=a-2),a):--s<r||a===-2?0:(a=tV(e[s]),a>=0?(a>0&&(a===2?a=0:t.lastNeed=a-3),a):0))}function pyt(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,\"\\uFFFD\";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,\"\\uFFFD\";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,\"\\uFFFD\"}}function hyt(t){var e=this.lastTotal-this.lastNeed,r=pyt(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function gyt(t,e){var r=Ayt(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var s=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,s),t.toString(\"utf8\",e,s)}function dyt(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+\"\\uFFFD\":e}function myt(t,e){if((t.length-e)%2===0){var r=t.toString(\"utf16le\",e);if(r){var s=r.charCodeAt(r.length-1);if(s>=55296&&s<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function yyt(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function Eyt(t,e){var r=(t.length-e)%3;return r===0?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function Iyt(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function Cyt(t){return t.toString(this.encoding)}function wyt(t){return t&&t.length?this.write(t):\"\"}});var IN=_((Xtr,kve)=>{\"use strict\";var Pve=lg().codes.ERR_STREAM_PREMATURE_CLOSE;function Byt(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];t.apply(this,s)}}}function vyt(){}function Syt(t){return t.setHeader&&typeof t.abort==\"function\"}function xve(t,e,r){if(typeof e==\"function\")return xve(t,null,e);e||(e={}),r=Byt(r||vyt);var s=e.readable||e.readable!==!1&&t.readable,a=e.writable||e.writable!==!1&&t.writable,n=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){a=!1,c=!0,s||r.call(t)},p=t._readableState&&t._readableState.endEmitted,h=function(){s=!1,p=!0,a||r.call(t)},E=function(I){r.call(t,I)},C=function(){var I;if(s&&!p)return(!t._readableState||!t._readableState.ended)&&(I=new Pve),r.call(t,I);if(a&&!c)return(!t._writableState||!t._writableState.ended)&&(I=new Pve),r.call(t,I)},S=function(){t.req.on(\"finish\",f)};return Syt(t)?(t.on(\"complete\",f),t.on(\"abort\",C),t.req?S():t.on(\"request\",S)):a&&!t._writableState&&(t.on(\"end\",n),t.on(\"close\",n)),t.on(\"end\",h),t.on(\"finish\",f),e.error!==!1&&t.on(\"error\",E),t.on(\"close\",C),function(){t.removeListener(\"complete\",f),t.removeListener(\"abort\",C),t.removeListener(\"request\",S),t.req&&t.req.removeListener(\"finish\",f),t.removeListener(\"end\",n),t.removeListener(\"close\",n),t.removeListener(\"finish\",f),t.removeListener(\"end\",h),t.removeListener(\"error\",E),t.removeListener(\"close\",C)}}kve.exports=xve});var Tve=_((Ztr,Qve)=>{\"use strict\";var CN;function fg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Dyt=IN(),Ag=Symbol(\"lastResolve\"),Vm=Symbol(\"lastReject\"),eb=Symbol(\"error\"),wN=Symbol(\"ended\"),Jm=Symbol(\"lastPromise\"),iV=Symbol(\"handlePromise\"),Km=Symbol(\"stream\");function pg(t,e){return{value:t,done:e}}function byt(t){var e=t[Ag];if(e!==null){var r=t[Km].read();r!==null&&(t[Jm]=null,t[Ag]=null,t[Vm]=null,e(pg(r,!1)))}}function Pyt(t){process.nextTick(byt,t)}function xyt(t,e){return function(r,s){t.then(function(){if(e[wN]){r(pg(void 0,!0));return}e[iV](r,s)},s)}}var kyt=Object.getPrototypeOf(function(){}),Qyt=Object.setPrototypeOf((CN={get stream(){return this[Km]},next:function(){var e=this,r=this[eb];if(r!==null)return Promise.reject(r);if(this[wN])return Promise.resolve(pg(void 0,!0));if(this[Km].destroyed)return new Promise(function(c,f){process.nextTick(function(){e[eb]?f(e[eb]):c(pg(void 0,!0))})});var s=this[Jm],a;if(s)a=new Promise(xyt(s,this));else{var n=this[Km].read();if(n!==null)return Promise.resolve(pg(n,!1));a=new Promise(this[iV])}return this[Jm]=a,a}},fg(CN,Symbol.asyncIterator,function(){return this}),fg(CN,\"return\",function(){var e=this;return new Promise(function(r,s){e[Km].destroy(null,function(a){if(a){s(a);return}r(pg(void 0,!0))})})}),CN),kyt),Tyt=function(e){var r,s=Object.create(Qyt,(r={},fg(r,Km,{value:e,writable:!0}),fg(r,Ag,{value:null,writable:!0}),fg(r,Vm,{value:null,writable:!0}),fg(r,eb,{value:null,writable:!0}),fg(r,wN,{value:e._readableState.endEmitted,writable:!0}),fg(r,iV,{value:function(n,c){var f=s[Km].read();f?(s[Jm]=null,s[Ag]=null,s[Vm]=null,n(pg(f,!1))):(s[Ag]=n,s[Vm]=c)},writable:!0}),r));return s[Jm]=null,Dyt(e,function(a){if(a&&a.code!==\"ERR_STREAM_PREMATURE_CLOSE\"){var n=s[Vm];n!==null&&(s[Jm]=null,s[Ag]=null,s[Vm]=null,n(a)),s[eb]=a;return}var c=s[Ag];c!==null&&(s[Jm]=null,s[Ag]=null,s[Vm]=null,c(pg(void 0,!0))),s[wN]=!0}),e.on(\"readable\",Pyt.bind(null,s)),s};Qve.exports=Tyt});var Ove=_(($tr,Nve)=>{\"use strict\";function Rve(t,e,r,s,a,n,c){try{var f=t[n](c),p=f.value}catch(h){r(h);return}f.done?e(p):Promise.resolve(p).then(s,a)}function Ryt(t){return function(){var e=this,r=arguments;return new Promise(function(s,a){var n=t.apply(e,r);function c(p){Rve(n,s,a,c,f,\"next\",p)}function f(p){Rve(n,s,a,c,f,\"throw\",p)}c(void 0)})}}function Fve(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,s)}return r}function Fyt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fve(Object(r),!0).forEach(function(s){Nyt(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fve(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function Nyt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Oyt=lg().codes.ERR_INVALID_ARG_TYPE;function Lyt(t,e,r){var s;if(e&&typeof e.next==\"function\")s=e;else if(e&&e[Symbol.asyncIterator])s=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])s=e[Symbol.iterator]();else throw new Oyt(\"iterable\",[\"Iterable\"],e);var a=new t(Fyt({objectMode:!0},r)),n=!1;a._read=function(){n||(n=!0,c())};function c(){return f.apply(this,arguments)}function f(){return f=Ryt(function*(){try{var p=yield s.next(),h=p.value,E=p.done;E?a.push(null):a.push(yield h)?c():n=!1}catch(C){a.destroy(C)}}),f.apply(this,arguments)}return a}Nve.exports=Lyt});var $Y=_((rrr,Yve)=>{\"use strict\";Yve.exports=Pn;var Nw;Pn.ReadableState=_ve;var trr=Ie(\"events\").EventEmitter,Uve=function(e,r){return e.listeners(r).length},rb=_Y(),BN=Ie(\"buffer\").Buffer,Myt=global.Uint8Array||function(){};function Uyt(t){return BN.from(t)}function _yt(t){return BN.isBuffer(t)||t instanceof Myt}var sV=Ie(\"util\"),cn;sV&&sV.debuglog?cn=sV.debuglog(\"stream\"):cn=function(){};var Hyt=sve(),AV=GY(),jyt=qY(),Gyt=jyt.getHighWaterMark,vN=lg().codes,qyt=vN.ERR_INVALID_ARG_TYPE,Wyt=vN.ERR_STREAM_PUSH_AFTER_EOF,Yyt=vN.ERR_METHOD_NOT_IMPLEMENTED,Vyt=vN.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ow,oV,aV;cg()(Pn,rb);var tb=AV.errorOrDestroy,lV=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function Jyt(t,e,r){if(typeof t.prependListener==\"function\")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function _ve(t,e,r){Nw=Nw||Ym(),t=t||{},typeof r!=\"boolean\"&&(r=e instanceof Nw),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Gyt(this,t,\"readableHighWaterMark\",r),this.buffer=new Hyt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Ow||(Ow=nV().StringDecoder),this.decoder=new Ow(t.encoding),this.encoding=t.encoding)}function Pn(t){if(Nw=Nw||Ym(),!(this instanceof Pn))return new Pn(t);var e=this instanceof Nw;this._readableState=new _ve(t,this,e),this.readable=!0,t&&(typeof t.read==\"function\"&&(this._read=t.read),typeof t.destroy==\"function\"&&(this._destroy=t.destroy)),rb.call(this)}Object.defineProperty(Pn.prototype,\"destroyed\",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Pn.prototype.destroy=AV.destroy;Pn.prototype._undestroy=AV.undestroy;Pn.prototype._destroy=function(t,e){e(t)};Pn.prototype.push=function(t,e){var r=this._readableState,s;return r.objectMode?s=!0:typeof t==\"string\"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=BN.from(t,e),e=\"\"),s=!0),Hve(this,t,e,!1,s)};Pn.prototype.unshift=function(t){return Hve(this,t,null,!0,!1)};function Hve(t,e,r,s,a){cn(\"readableAddChunk\",e);var n=t._readableState;if(e===null)n.reading=!1,Xyt(t,n);else{var c;if(a||(c=Kyt(n,e)),c)tb(t,c);else if(n.objectMode||e&&e.length>0)if(typeof e!=\"string\"&&!n.objectMode&&Object.getPrototypeOf(e)!==BN.prototype&&(e=Uyt(e)),s)n.endEmitted?tb(t,new Vyt):cV(t,n,e,!0);else if(n.ended)tb(t,new Wyt);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?cV(t,n,e,!1):fV(t,n)):cV(t,n,e,!1)}else s||(n.reading=!1,fV(t,n))}return!n.ended&&(n.length<n.highWaterMark||n.length===0)}function cV(t,e,r,s){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit(\"data\",r)):(e.length+=e.objectMode?1:r.length,s?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&SN(t)),fV(t,e)}function Kyt(t,e){var r;return!_yt(e)&&typeof e!=\"string\"&&e!==void 0&&!t.objectMode&&(r=new qyt(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e)),r}Pn.prototype.isPaused=function(){return this._readableState.flowing===!1};Pn.prototype.setEncoding=function(t){Ow||(Ow=nV().StringDecoder);var e=new Ow(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,s=\"\";r!==null;)s+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),s!==\"\"&&this._readableState.buffer.push(s),this._readableState.length=s.length,this};var Lve=1073741824;function zyt(t){return t>=Lve?t=Lve:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Mve(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=zyt(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Pn.prototype.read=function(t){cn(\"read\",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return cn(\"read: emitReadable\",e.length,e.ended),e.length===0&&e.ended?uV(this):SN(this),null;if(t=Mve(t,e),t===0&&e.ended)return e.length===0&&uV(this),null;var s=e.needReadable;cn(\"need readable\",s),(e.length===0||e.length-t<e.highWaterMark)&&(s=!0,cn(\"length less than watermark\",s)),e.ended||e.reading?(s=!1,cn(\"reading or ended\",s)):s&&(cn(\"do read\"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Mve(r,e)));var a;return t>0?a=qve(t,e):a=null,a===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&uV(this)),a!==null&&this.emit(\"data\",a),a};function Xyt(t,e){if(cn(\"onEofChunk\"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?SN(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,jve(t)))}}function SN(t){var e=t._readableState;cn(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(cn(\"emitReadable\",e.flowing),e.emittedReadable=!0,process.nextTick(jve,t))}function jve(t){var e=t._readableState;cn(\"emitReadable_\",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,pV(t)}function fV(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Zyt,t,e))}function Zyt(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(cn(\"maybeReadMore read 0\"),t.read(0),r===e.length)break}e.readingMore=!1}Pn.prototype._read=function(t){tb(this,new Yyt(\"_read()\"))};Pn.prototype.pipe=function(t,e){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t);break}s.pipesCount+=1,cn(\"pipe count=%d opts=%j\",s.pipesCount,e);var a=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,n=a?f:R;s.endEmitted?process.nextTick(n):r.once(\"end\",n),t.on(\"unpipe\",c);function c(N,U){cn(\"onunpipe\"),N===r&&U&&U.hasUnpiped===!1&&(U.hasUnpiped=!0,E())}function f(){cn(\"onend\"),t.end()}var p=$yt(r);t.on(\"drain\",p);var h=!1;function E(){cn(\"cleanup\"),t.removeListener(\"close\",P),t.removeListener(\"finish\",I),t.removeListener(\"drain\",p),t.removeListener(\"error\",S),t.removeListener(\"unpipe\",c),r.removeListener(\"end\",f),r.removeListener(\"end\",R),r.removeListener(\"data\",C),h=!0,s.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&p()}r.on(\"data\",C);function C(N){cn(\"ondata\");var U=t.write(N);cn(\"dest.write\",U),U===!1&&((s.pipesCount===1&&s.pipes===t||s.pipesCount>1&&Wve(s.pipes,t)!==-1)&&!h&&(cn(\"false write response, pause\",s.awaitDrain),s.awaitDrain++),r.pause())}function S(N){cn(\"onerror\",N),R(),t.removeListener(\"error\",S),Uve(t,\"error\")===0&&tb(t,N)}Jyt(t,\"error\",S);function P(){t.removeListener(\"finish\",I),R()}t.once(\"close\",P);function I(){cn(\"onfinish\"),t.removeListener(\"close\",P),R()}t.once(\"finish\",I);function R(){cn(\"unpipe\"),r.unpipe(t)}return t.emit(\"pipe\",r),s.flowing||(cn(\"pipe resume\"),r.resume()),t};function $yt(t){return function(){var r=t._readableState;cn(\"pipeOnDrain\",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Uve(t,\"data\")&&(r.flowing=!0,pV(t))}}Pn.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r),this);if(!t){var s=e.pipes,a=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n<a;n++)s[n].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var c=Wve(e.pipes,t);return c===-1?this:(e.pipes.splice(c,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit(\"unpipe\",this,r),this)};Pn.prototype.on=function(t,e){var r=rb.prototype.on.call(this,t,e),s=this._readableState;return t===\"data\"?(s.readableListening=this.listenerCount(\"readable\")>0,s.flowing!==!1&&this.resume()):t===\"readable\"&&!s.endEmitted&&!s.readableListening&&(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,cn(\"on readable\",s.length,s.reading),s.length?SN(this):s.reading||process.nextTick(eEt,this)),r};Pn.prototype.addListener=Pn.prototype.on;Pn.prototype.removeListener=function(t,e){var r=rb.prototype.removeListener.call(this,t,e);return t===\"readable\"&&process.nextTick(Gve,this),r};Pn.prototype.removeAllListeners=function(t){var e=rb.prototype.removeAllListeners.apply(this,arguments);return(t===\"readable\"||t===void 0)&&process.nextTick(Gve,this),e};function Gve(t){var e=t._readableState;e.readableListening=t.listenerCount(\"readable\")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\"data\")>0&&t.resume()}function eEt(t){cn(\"readable nexttick read 0\"),t.read(0)}Pn.prototype.resume=function(){var t=this._readableState;return t.flowing||(cn(\"resume\"),t.flowing=!t.readableListening,tEt(this,t)),t.paused=!1,this};function tEt(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(rEt,t,e))}function rEt(t,e){cn(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),pV(t),e.flowing&&!e.reading&&t.read(0)}Pn.prototype.pause=function(){return cn(\"call pause flowing=%j\",this._readableState.flowing),this._readableState.flowing!==!1&&(cn(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this};function pV(t){var e=t._readableState;for(cn(\"flow\",e.flowing);e.flowing&&t.read()!==null;);}Pn.prototype.wrap=function(t){var e=this,r=this._readableState,s=!1;t.on(\"end\",function(){if(cn(\"wrapped end\"),r.decoder&&!r.ended){var c=r.decoder.end();c&&c.length&&e.push(c)}e.push(null)}),t.on(\"data\",function(c){if(cn(\"wrapped data\"),r.decoder&&(c=r.decoder.write(c)),!(r.objectMode&&c==null)&&!(!r.objectMode&&(!c||!c.length))){var f=e.push(c);f||(s=!0,t.pause())}});for(var a in t)this[a]===void 0&&typeof t[a]==\"function\"&&(this[a]=function(f){return function(){return t[f].apply(t,arguments)}}(a));for(var n=0;n<lV.length;n++)t.on(lV[n],this.emit.bind(this,lV[n]));return this._read=function(c){cn(\"wrapped _read\",c),s&&(s=!1,t.resume())},this};typeof Symbol==\"function\"&&(Pn.prototype[Symbol.asyncIterator]=function(){return oV===void 0&&(oV=Tve()),oV(this)});Object.defineProperty(Pn.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Pn.prototype,\"readableBuffer\",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Pn.prototype,\"readableFlowing\",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Pn._fromList=qve;Object.defineProperty(Pn.prototype,\"readableLength\",{enumerable:!1,get:function(){return this._readableState.length}});function qve(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(\"\"):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function uV(t){var e=t._readableState;cn(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(nEt,e,t))}function nEt(t,e){if(cn(\"endReadableNT\",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol==\"function\"&&(Pn.from=function(t,e){return aV===void 0&&(aV=Ove()),aV(Pn,t,e)});function Wve(t,e){for(var r=0,s=t.length;r<s;r++)if(t[r]===e)return r;return-1}});var hV=_((nrr,Jve)=>{\"use strict\";Jve.exports=lh;var DN=lg().codes,iEt=DN.ERR_METHOD_NOT_IMPLEMENTED,sEt=DN.ERR_MULTIPLE_CALLBACK,oEt=DN.ERR_TRANSFORM_ALREADY_TRANSFORMING,aEt=DN.ERR_TRANSFORM_WITH_LENGTH_0,bN=Ym();cg()(lh,bN);function lEt(t,e){var r=this._transformState;r.transforming=!1;var s=r.writecb;if(s===null)return this.emit(\"error\",new sEt);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),s(t);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function lh(t){if(!(this instanceof lh))return new lh(t);bN.call(this,t),this._transformState={afterTransform:lEt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform==\"function\"&&(this._transform=t.transform),typeof t.flush==\"function\"&&(this._flush=t.flush)),this.on(\"prefinish\",cEt)}function cEt(){var t=this;typeof this._flush==\"function\"&&!this._readableState.destroyed?this._flush(function(e,r){Vve(t,e,r)}):Vve(this,null,null)}lh.prototype.push=function(t,e){return this._transformState.needTransform=!1,bN.prototype.push.call(this,t,e)};lh.prototype._transform=function(t,e,r){r(new iEt(\"_transform()\"))};lh.prototype._write=function(t,e,r){var s=this._transformState;if(s.writecb=r,s.writechunk=t,s.writeencoding=e,!s.transforming){var a=this._readableState;(s.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};lh.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};lh.prototype._destroy=function(t,e){bN.prototype._destroy.call(this,t,function(r){e(r)})};function Vve(t,e,r){if(e)return t.emit(\"error\",e);if(r!=null&&t.push(r),t._writableState.length)throw new aEt;if(t._transformState.transforming)throw new oEt;return t.push(null)}});var Xve=_((irr,zve)=>{\"use strict\";zve.exports=nb;var Kve=hV();cg()(nb,Kve);function nb(t){if(!(this instanceof nb))return new nb(t);Kve.call(this,t)}nb.prototype._transform=function(t,e,r){r(null,t)}});var rSe=_((srr,tSe)=>{\"use strict\";var gV;function uEt(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var eSe=lg().codes,fEt=eSe.ERR_MISSING_ARGS,AEt=eSe.ERR_STREAM_DESTROYED;function Zve(t){if(t)throw t}function pEt(t){return t.setHeader&&typeof t.abort==\"function\"}function hEt(t,e,r,s){s=uEt(s);var a=!1;t.on(\"close\",function(){a=!0}),gV===void 0&&(gV=IN()),gV(t,{readable:e,writable:r},function(c){if(c)return s(c);a=!0,s()});var n=!1;return function(c){if(!a&&!n){if(n=!0,pEt(t))return t.abort();if(typeof t.destroy==\"function\")return t.destroy();s(c||new AEt(\"pipe\"))}}}function $ve(t){t()}function gEt(t,e){return t.pipe(e)}function dEt(t){return!t.length||typeof t[t.length-1]!=\"function\"?Zve:t.pop()}function mEt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var s=dEt(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new fEt(\"streams\");var a,n=e.map(function(c,f){var p=f<e.length-1,h=f>0;return hEt(c,p,h,function(E){a||(a=E),E&&n.forEach($ve),!p&&(n.forEach($ve),s(a))})});return e.reduce(gEt)}tSe.exports=mEt});var Lw=_((zc,sb)=>{var ib=Ie(\"stream\");process.env.READABLE_STREAM===\"disable\"&&ib?(sb.exports=ib.Readable,Object.assign(sb.exports,ib),sb.exports.Stream=ib):(zc=sb.exports=$Y(),zc.Stream=ib||zc,zc.Readable=zc,zc.Writable=zY(),zc.Duplex=Ym(),zc.Transform=hV(),zc.PassThrough=Xve(),zc.finished=IN(),zc.pipeline=rSe())});var sSe=_((orr,iSe)=>{\"use strict\";var{Buffer:cf}=Ie(\"buffer\"),nSe=Symbol.for(\"BufferList\");function Ci(t){if(!(this instanceof Ci))return new Ci(t);Ci._init.call(this,t)}Ci._init=function(e){Object.defineProperty(this,nSe,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};Ci.prototype._new=function(e){return new Ci(e)};Ci.prototype._offset=function(e){if(e===0)return[0,0];let r=0;for(let s=0;s<this._bufs.length;s++){let a=r+this._bufs[s].length;if(e<a||s===this._bufs.length-1)return[s,e-r];r=a}};Ci.prototype._reverseOffset=function(t){let e=t[0],r=t[1];for(let s=0;s<e;s++)r+=this._bufs[s].length;return r};Ci.prototype.get=function(e){if(e>this.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};Ci.prototype.slice=function(e,r){return typeof e==\"number\"&&e<0&&(e+=this.length),typeof r==\"number\"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};Ci.prototype.copy=function(e,r,s,a){if((typeof s!=\"number\"||s<0)&&(s=0),(typeof a!=\"number\"||a>this.length)&&(a=this.length),s>=this.length||a<=0)return e||cf.alloc(0);let n=!!e,c=this._offset(s),f=a-s,p=f,h=n&&r||0,E=c[1];if(s===0&&a===this.length){if(!n)return this._bufs.length===1?this._bufs[0]:cf.concat(this._bufs,this.length);for(let C=0;C<this._bufs.length;C++)this._bufs[C].copy(e,h),h+=this._bufs[C].length;return e}if(p<=this._bufs[c[0]].length-E)return n?this._bufs[c[0]].copy(e,r,E,E+p):this._bufs[c[0]].slice(E,E+p);n||(e=cf.allocUnsafe(f));for(let C=c[0];C<this._bufs.length;C++){let S=this._bufs[C].length-E;if(p>S)this._bufs[C].copy(e,h,E),h+=S;else{this._bufs[C].copy(e,h,E,E+p),h+=S;break}p-=S,E&&(E=0)}return e.length>h?e.slice(0,h):e};Ci.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!=\"number\"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let s=this._offset(e),a=this._offset(r),n=this._bufs.slice(s[0],a[0]+1);return a[1]===0?n.pop():n[n.length-1]=n[n.length-1].slice(0,a[1]),s[1]!==0&&(n[0]=n[0].slice(s[1])),this._new(n)};Ci.prototype.toString=function(e,r,s){return this.slice(r,s).toString(e)};Ci.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};Ci.prototype.duplicate=function(){let e=this._new();for(let r=0;r<this._bufs.length;r++)e.append(this._bufs[r]);return e};Ci.prototype.append=function(e){if(e==null)return this;if(e.buffer)this._appendBuffer(cf.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let r=0;r<e.length;r++)this.append(e[r]);else if(this._isBufferList(e))for(let r=0;r<e._bufs.length;r++)this.append(e._bufs[r]);else typeof e==\"number\"&&(e=e.toString()),this._appendBuffer(cf.from(e));return this};Ci.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length};Ci.prototype.indexOf=function(t,e,r){if(r===void 0&&typeof e==\"string\"&&(r=e,e=void 0),typeof t==\"function\"||Array.isArray(t))throw new TypeError('The \"value\" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof t==\"number\"?t=cf.from([t]):typeof t==\"string\"?t=cf.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=cf.from(t.buffer,t.byteOffset,t.byteLength):cf.isBuffer(t)||(t=cf.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),t.length===0)return e>this.length?this.length:e;let s=this._offset(e),a=s[0],n=s[1];for(;a<this._bufs.length;a++){let c=this._bufs[a];for(;n<c.length;)if(c.length-n>=t.length){let p=c.indexOf(t,n);if(p!==-1)return this._reverseOffset([a,p]);n=c.length-t.length+1}else{let p=this._reverseOffset([a,n]);if(this._match(p,t))return p;n++}n=0}return-1};Ci.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0};(function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in t)(function(r){t[r]===null?Ci.prototype[r]=function(s,a){return this.slice(s,s+a)[r](0,a)}:Ci.prototype[r]=function(s=0){return this.slice(s,s+t[r])[r](0)}})(e)})();Ci.prototype._isBufferList=function(e){return e instanceof Ci||Ci.isBufferList(e)};Ci.isBufferList=function(e){return e!=null&&e[nSe]};iSe.exports=Ci});var oSe=_((arr,PN)=>{\"use strict\";var dV=Lw().Duplex,yEt=cg(),ob=sSe();function ra(t){if(!(this instanceof ra))return new ra(t);if(typeof t==\"function\"){this._callback=t;let e=function(s){this._callback&&(this._callback(s),this._callback=null)}.bind(this);this.on(\"pipe\",function(s){s.on(\"error\",e)}),this.on(\"unpipe\",function(s){s.removeListener(\"error\",e)}),t=null}ob._init.call(this,t),dV.call(this)}yEt(ra,dV);Object.assign(ra.prototype,ob.prototype);ra.prototype._new=function(e){return new ra(e)};ra.prototype._write=function(e,r,s){this._appendBuffer(e),typeof s==\"function\"&&s()};ra.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)};ra.prototype.end=function(e){dV.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};ra.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e)};ra.prototype._isBufferList=function(e){return e instanceof ra||e instanceof ob||ra.isBufferList(e)};ra.isBufferList=ob.isBufferList;PN.exports=ra;PN.exports.BufferListStream=ra;PN.exports.BufferList=ob});var EV=_(Uw=>{var EEt=Buffer.alloc,IEt=\"0000000000000000000\",CEt=\"7777777777777777777\",aSe=48,lSe=Buffer.from(\"ustar\\0\",\"binary\"),wEt=Buffer.from(\"00\",\"binary\"),BEt=Buffer.from(\"ustar \",\"binary\"),vEt=Buffer.from(\" \\0\",\"binary\"),SEt=parseInt(\"7777\",8),ab=257,yV=263,DEt=function(t,e,r){return typeof t!=\"number\"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)},bEt=function(t){switch(t){case 0:return\"file\";case 1:return\"link\";case 2:return\"symlink\";case 3:return\"character-device\";case 4:return\"block-device\";case 5:return\"directory\";case 6:return\"fifo\";case 7:return\"contiguous-file\";case 72:return\"pax-header\";case 55:return\"pax-global-header\";case 27:return\"gnu-long-link-path\";case 28:case 30:return\"gnu-long-path\"}return null},PEt=function(t){switch(t){case\"file\":return 0;case\"link\":return 1;case\"symlink\":return 2;case\"character-device\":return 3;case\"block-device\":return 4;case\"directory\":return 5;case\"fifo\":return 6;case\"contiguous-file\":return 7;case\"pax-header\":return 72}return 0},cSe=function(t,e,r,s){for(;r<s;r++)if(t[r]===e)return r;return s},uSe=function(t){for(var e=256,r=0;r<148;r++)e+=t[r];for(var s=156;s<512;s++)e+=t[s];return e},hg=function(t,e){return t=t.toString(8),t.length>e?CEt.slice(0,e)+\" \":IEt.slice(0,e-t.length)+t+\" \"};function xEt(t){var e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;for(var r=[],s=t.length-1;s>0;s--){var a=t[s];e?r.push(a):r.push(255-a)}var n=0,c=r.length;for(s=0;s<c;s++)n+=r[s]*Math.pow(256,s);return e?n:-1*n}var gg=function(t,e,r){if(t=t.slice(e,e+r),e=0,t[e]&128)return xEt(t);for(;e<t.length&&t[e]===32;)e++;for(var s=DEt(cSe(t,32,e,t.length),t.length,t.length);e<s&&t[e]===0;)e++;return s===e?0:parseInt(t.slice(e,s).toString(),8)},Mw=function(t,e,r,s){return t.slice(e,cSe(t,0,e,e+r)).toString(s)},mV=function(t){var e=Buffer.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t};Uw.decodeLongPath=function(t,e){return Mw(t,0,t.length,e)};Uw.encodePax=function(t){var e=\"\";t.name&&(e+=mV(\" path=\"+t.name+`\n`)),t.linkname&&(e+=mV(\" linkpath=\"+t.linkname+`\n`));var r=t.pax;if(r)for(var s in r)e+=mV(\" \"+s+\"=\"+r[s]+`\n`);return Buffer.from(e)};Uw.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var s=parseInt(t.slice(0,r).toString(),10);if(!s)return e;var a=t.slice(r+1,s-1).toString(),n=a.indexOf(\"=\");if(n===-1)return e;e[a.slice(0,n)]=a.slice(n+1),t=t.slice(s)}return e};Uw.encode=function(t){var e=EEt(512),r=t.name,s=\"\";if(t.typeflag===5&&r[r.length-1]!==\"/\"&&(r+=\"/\"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf(\"/\");if(a===-1)return null;s+=s?\"/\"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(s)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(hg(t.mode&SEt,6),100),e.write(hg(t.uid,6),108),e.write(hg(t.gid,6),116),e.write(hg(t.size,11),124),e.write(hg(t.mtime.getTime()/1e3|0,11),136),e[156]=aSe+PEt(t.type),t.linkname&&e.write(t.linkname,157),lSe.copy(e,ab),wEt.copy(e,yV),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(hg(t.devmajor||0,6),329),e.write(hg(t.devminor||0,6),337),s&&e.write(s,345),e.write(hg(uSe(e),6),148),e)};Uw.decode=function(t,e,r){var s=t[156]===0?0:t[156]-aSe,a=Mw(t,0,100,e),n=gg(t,100,8),c=gg(t,108,8),f=gg(t,116,8),p=gg(t,124,12),h=gg(t,136,12),E=bEt(s),C=t[157]===0?null:Mw(t,157,100,e),S=Mw(t,265,32),P=Mw(t,297,32),I=gg(t,329,8),R=gg(t,337,8),N=uSe(t);if(N===8*32)return null;if(N!==gg(t,148,8))throw new Error(\"Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?\");if(lSe.compare(t,ab,ab+6)===0)t[345]&&(a=Mw(t,345,155,e)+\"/\"+a);else if(!(BEt.compare(t,ab,ab+6)===0&&vEt.compare(t,yV,yV+2)===0)){if(!r)throw new Error(\"Invalid tar header: unknown format.\")}return s===0&&a&&a[a.length-1]===\"/\"&&(s=5),{name:a,mode:n,uid:c,gid:f,size:p,mtime:new Date(1e3*h),type:E,linkname:C,uname:S,gname:P,devmajor:I,devminor:R}}});var mSe=_((crr,dSe)=>{var ASe=Ie(\"util\"),kEt=oSe(),lb=EV(),pSe=Lw().Writable,hSe=Lw().PassThrough,gSe=function(){},fSe=function(t){return t&=511,t&&512-t},QEt=function(t,e){var r=new xN(t,e);return r.end(),r},TEt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},xN=function(t,e){this._parent=t,this.offset=e,hSe.call(this,{autoDestroy:!1})};ASe.inherits(xN,hSe);xN.prototype.destroy=function(t){this._parent.destroy(t)};var ch=function(t){if(!(this instanceof ch))return new ch(t);pSe.call(this,t),t=t||{},this._offset=0,this._buffer=kEt(),this._missing=0,this._partial=!1,this._onparse=gSe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,s=function(){e._continue()},a=function(S){if(e._locked=!1,S)return e.destroy(S);e._stream||s()},n=function(){e._stream=null;var S=fSe(e._header.size);S?e._parse(S,c):e._parse(512,C),e._locked||s()},c=function(){e._buffer.consume(fSe(e._header.size)),e._parse(512,C),s()},f=function(){var S=e._header.size;e._paxGlobal=lb.decodePax(r.slice(0,S)),r.consume(S),n()},p=function(){var S=e._header.size;e._pax=lb.decodePax(r.slice(0,S)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(S),n()},h=function(){var S=e._header.size;this._gnuLongPath=lb.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},E=function(){var S=e._header.size;this._gnuLongLinkPath=lb.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},C=function(){var S=e._offset,P;try{P=e._header=lb.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(I){e.emit(\"error\",I)}if(r.consume(512),!P){e._parse(512,C),s();return}if(P.type===\"gnu-long-path\"){e._parse(P.size,h),s();return}if(P.type===\"gnu-long-link-path\"){e._parse(P.size,E),s();return}if(P.type===\"pax-global-header\"){e._parse(P.size,f),s();return}if(P.type===\"pax-header\"){e._parse(P.size,p),s();return}if(e._gnuLongPath&&(P.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(P.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=P=TEt(P,e._pax),e._pax=null),e._locked=!0,!P.size||P.type===\"directory\"){e._parse(512,C),e.emit(\"entry\",P,QEt(e,S),a);return}e._stream=new xN(e,S),e.emit(\"entry\",P,e._stream,a),e._parse(P.size,n),s()};this._onheader=C,this._parse(512,C)};ASe.inherits(ch,pSe);ch.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit(\"error\",t),this.emit(\"close\"),this._stream&&this._stream.emit(\"close\"))};ch.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};ch.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=gSe,this._overflow?this._write(this._overflow,void 0,t):t()}};ch.prototype._write=function(t,e,r){if(!this._destroyed){var s=this._stream,a=this._buffer,n=this._missing;if(t.length&&(this._partial=!0),t.length<n)return this._missing-=t.length,this._overflow=null,s?s.write(t,r):(a.append(t),r());this._cb=r,this._missing=0;var c=null;t.length>n&&(c=t.slice(n),t=t.slice(0,n)),s?s.end(t):a.append(t),this._overflow=c,this._onparse()}};ch.prototype._final=function(t){if(this._partial)return this.destroy(new Error(\"Unexpected end of data\"));t()};dSe.exports=ch});var ESe=_((urr,ySe)=>{ySe.exports=Ie(\"fs\").constants||Ie(\"constants\")});var vSe=_((frr,BSe)=>{var _w=ESe(),ISe=cH(),QN=cg(),REt=Buffer.alloc,CSe=Lw().Readable,Hw=Lw().Writable,FEt=Ie(\"string_decoder\").StringDecoder,kN=EV(),NEt=parseInt(\"755\",8),OEt=parseInt(\"644\",8),wSe=REt(1024),CV=function(){},IV=function(t,e){e&=511,e&&t.push(wSe.slice(0,512-e))};function LEt(t){switch(t&_w.S_IFMT){case _w.S_IFBLK:return\"block-device\";case _w.S_IFCHR:return\"character-device\";case _w.S_IFDIR:return\"directory\";case _w.S_IFIFO:return\"fifo\";case _w.S_IFLNK:return\"symlink\"}return\"file\"}var TN=function(t){Hw.call(this),this.written=0,this._to=t,this._destroyed=!1};QN(TN,Hw);TN.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r};TN.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit(\"close\"))};var RN=function(){Hw.call(this),this.linkname=\"\",this._decoder=new FEt(\"utf-8\"),this._destroyed=!1};QN(RN,Hw);RN.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()};RN.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit(\"close\"))};var ub=function(){Hw.call(this),this._destroyed=!1};QN(ub,Hw);ub.prototype._write=function(t,e,r){r(new Error(\"No body allowed for this entry\"))};ub.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit(\"close\"))};var mA=function(t){if(!(this instanceof mA))return new mA(t);CSe.call(this,t),this._drain=CV,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};QN(mA,CSe);mA.prototype.entry=function(t,e,r){if(this._stream)throw new Error(\"already piping an entry\");if(!(this._finalized||this._destroyed)){typeof e==\"function\"&&(r=e,e=null),r||(r=CV);var s=this;if((!t.size||t.type===\"symlink\")&&(t.size=0),t.type||(t.type=LEt(t.mode)),t.mode||(t.mode=t.type===\"directory\"?NEt:OEt),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),typeof e==\"string\"&&(e=Buffer.from(e)),Buffer.isBuffer(e)){t.size=e.length,this._encode(t);var a=this.push(e);return IV(s,t.size),a?process.nextTick(r):this._drain=r,new ub}if(t.type===\"symlink\"&&!t.linkname){var n=new RN;return ISe(n,function(f){if(f)return s.destroy(),r(f);t.linkname=n.linkname,s._encode(t),r()}),n}if(this._encode(t),t.type!==\"file\"&&t.type!==\"contiguous-file\")return process.nextTick(r),new ub;var c=new TN(this);return this._stream=c,ISe(c,function(f){if(s._stream=null,f)return s.destroy(),r(f);if(c.written!==t.size)return s.destroy(),r(new Error(\"size mismatch\"));IV(s,t.size),s._finalizing&&s.finalize(),r()}),c}};mA.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(wSe),this.push(null))};mA.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit(\"error\",t),this.emit(\"close\"),this._stream&&this._stream.destroy&&this._stream.destroy())};mA.prototype._encode=function(t){if(!t.pax){var e=kN.encode(t);if(e){this.push(e);return}}this._encodePax(t)};mA.prototype._encodePax=function(t){var e=kN.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:\"PaxHeader\",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:\"pax-header\",linkname:t.linkname&&\"PaxHeader\",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(kN.encode(r)),this.push(e),IV(this,e.length),r.size=t.size,r.type=t.type,this.push(kN.encode(r))};mA.prototype._read=function(t){var e=this._drain;this._drain=CV,e()};BSe.exports=mA});var SSe=_(wV=>{wV.extract=mSe();wV.pack=vSe()});var MSe=_(Ta=>{\"use strict\";var zEt=Ta&&Ta.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ta,\"__esModule\",{value:!0});Ta.Minipass=Ta.isWritable=Ta.isReadable=Ta.isStream=void 0;var RSe=typeof process==\"object\"&&process?process:{stdout:null,stderr:null},FV=Ie(\"node:events\"),LSe=zEt(Ie(\"node:stream\")),XEt=Ie(\"node:string_decoder\"),ZEt=t=>!!t&&typeof t==\"object\"&&(t instanceof jN||t instanceof LSe.default||(0,Ta.isReadable)(t)||(0,Ta.isWritable)(t));Ta.isStream=ZEt;var $Et=t=>!!t&&typeof t==\"object\"&&t instanceof FV.EventEmitter&&typeof t.pipe==\"function\"&&t.pipe!==LSe.default.Writable.prototype.pipe;Ta.isReadable=$Et;var eIt=t=>!!t&&typeof t==\"object\"&&t instanceof FV.EventEmitter&&typeof t.write==\"function\"&&typeof t.end==\"function\";Ta.isWritable=eIt;var uh=Symbol(\"EOF\"),fh=Symbol(\"maybeEmitEnd\"),dg=Symbol(\"emittedEnd\"),ON=Symbol(\"emittingEnd\"),fb=Symbol(\"emittedError\"),LN=Symbol(\"closed\"),FSe=Symbol(\"read\"),MN=Symbol(\"flush\"),NSe=Symbol(\"flushChunk\"),uf=Symbol(\"encoding\"),Gw=Symbol(\"decoder\"),Ks=Symbol(\"flowing\"),Ab=Symbol(\"paused\"),qw=Symbol(\"resume\"),zs=Symbol(\"buffer\"),Qa=Symbol(\"pipes\"),Xs=Symbol(\"bufferLength\"),PV=Symbol(\"bufferPush\"),UN=Symbol(\"bufferShift\"),na=Symbol(\"objectMode\"),ts=Symbol(\"destroyed\"),xV=Symbol(\"error\"),kV=Symbol(\"emitData\"),OSe=Symbol(\"emitEnd\"),QV=Symbol(\"emitEnd2\"),EA=Symbol(\"async\"),TV=Symbol(\"abort\"),_N=Symbol(\"aborted\"),pb=Symbol(\"signal\"),zm=Symbol(\"dataListeners\"),rc=Symbol(\"discarded\"),hb=t=>Promise.resolve().then(t),tIt=t=>t(),rIt=t=>t===\"end\"||t===\"finish\"||t===\"prefinish\",nIt=t=>t instanceof ArrayBuffer||!!t&&typeof t==\"object\"&&t.constructor&&t.constructor.name===\"ArrayBuffer\"&&t.byteLength>=0,iIt=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),HN=class{src;dest;opts;ondrain;constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[qw](),this.dest.on(\"drain\",this.ondrain)}unpipe(){this.dest.removeListener(\"drain\",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},RV=class extends HN{unpipe(){this.src.removeListener(\"error\",this.proxyErrors),super.unpipe()}constructor(e,r,s){super(e,r,s),this.proxyErrors=a=>r.emit(\"error\",a),e.on(\"error\",this.proxyErrors)}},sIt=t=>!!t.objectMode,oIt=t=>!t.objectMode&&!!t.encoding&&t.encoding!==\"buffer\",jN=class extends FV.EventEmitter{[Ks]=!1;[Ab]=!1;[Qa]=[];[zs]=[];[na];[uf];[EA];[Gw];[uh]=!1;[dg]=!1;[ON]=!1;[LN]=!1;[fb]=null;[Xs]=0;[ts]=!1;[pb];[_N]=!1;[zm]=0;[rc]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding==\"string\")throw new TypeError(\"Encoding and objectMode may not be used together\");sIt(r)?(this[na]=!0,this[uf]=null):oIt(r)?(this[uf]=r.encoding,this[na]=!1):(this[na]=!1,this[uf]=null),this[EA]=!!r.async,this[Gw]=this[uf]?new XEt.StringDecoder(this[uf]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,\"buffer\",{get:()=>this[zs]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,\"pipes\",{get:()=>this[Qa]});let{signal:s}=r;s&&(this[pb]=s,s.aborted?this[TV]():s.addEventListener(\"abort\",()=>this[TV]()))}get bufferLength(){return this[Xs]}get encoding(){return this[uf]}set encoding(e){throw new Error(\"Encoding must be set at instantiation time\")}setEncoding(e){throw new Error(\"Encoding must be set at instantiation time\")}get objectMode(){return this[na]}set objectMode(e){throw new Error(\"objectMode must be set at instantiation time\")}get async(){return this[EA]}set async(e){this[EA]=this[EA]||!!e}[TV](){this[_N]=!0,this.emit(\"abort\",this[pb]?.reason),this.destroy(this[pb]?.reason)}get aborted(){return this[_N]}set aborted(e){}write(e,r,s){if(this[_N])return!1;if(this[uh])throw new Error(\"write after end\");if(this[ts])return this.emit(\"error\",Object.assign(new Error(\"Cannot call write after a stream was destroyed\"),{code:\"ERR_STREAM_DESTROYED\"})),!0;typeof r==\"function\"&&(s=r,r=\"utf8\"),r||(r=\"utf8\");let a=this[EA]?hb:tIt;if(!this[na]&&!Buffer.isBuffer(e)){if(iIt(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(nIt(e))e=Buffer.from(e);else if(typeof e!=\"string\")throw new Error(\"Non-contiguous data written to non-objectMode stream\")}return this[na]?(this[Ks]&&this[Xs]!==0&&this[MN](!0),this[Ks]?this.emit(\"data\",e):this[PV](e),this[Xs]!==0&&this.emit(\"readable\"),s&&a(s),this[Ks]):e.length?(typeof e==\"string\"&&!(r===this[uf]&&!this[Gw]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[uf]&&(e=this[Gw].write(e)),this[Ks]&&this[Xs]!==0&&this[MN](!0),this[Ks]?this.emit(\"data\",e):this[PV](e),this[Xs]!==0&&this.emit(\"readable\"),s&&a(s),this[Ks]):(this[Xs]!==0&&this.emit(\"readable\"),s&&a(s),this[Ks])}read(e){if(this[ts])return null;if(this[rc]=!1,this[Xs]===0||e===0||e&&e>this[Xs])return this[fh](),null;this[na]&&(e=null),this[zs].length>1&&!this[na]&&(this[zs]=[this[uf]?this[zs].join(\"\"):Buffer.concat(this[zs],this[Xs])]);let r=this[FSe](e||null,this[zs][0]);return this[fh](),r}[FSe](e,r){if(this[na])this[UN]();else{let s=r;e===s.length||e===null?this[UN]():typeof s==\"string\"?(this[zs][0]=s.slice(e),r=s.slice(0,e),this[Xs]-=e):(this[zs][0]=s.subarray(e),r=s.subarray(0,e),this[Xs]-=e)}return this.emit(\"data\",r),!this[zs].length&&!this[uh]&&this.emit(\"drain\"),r}end(e,r,s){return typeof e==\"function\"&&(s=e,e=void 0),typeof r==\"function\"&&(s=r,r=\"utf8\"),e!==void 0&&this.write(e,r),s&&this.once(\"end\",s),this[uh]=!0,this.writable=!1,(this[Ks]||!this[Ab])&&this[fh](),this}[qw](){this[ts]||(!this[zm]&&!this[Qa].length&&(this[rc]=!0),this[Ab]=!1,this[Ks]=!0,this.emit(\"resume\"),this[zs].length?this[MN]():this[uh]?this[fh]():this.emit(\"drain\"))}resume(){return this[qw]()}pause(){this[Ks]=!1,this[Ab]=!0,this[rc]=!1}get destroyed(){return this[ts]}get flowing(){return this[Ks]}get paused(){return this[Ab]}[PV](e){this[na]?this[Xs]+=1:this[Xs]+=e.length,this[zs].push(e)}[UN](){return this[na]?this[Xs]-=1:this[Xs]-=this[zs][0].length,this[zs].shift()}[MN](e=!1){do;while(this[NSe](this[UN]())&&this[zs].length);!e&&!this[zs].length&&!this[uh]&&this.emit(\"drain\")}[NSe](e){return this.emit(\"data\",e),this[Ks]}pipe(e,r){if(this[ts])return e;this[rc]=!1;let s=this[dg];return r=r||{},e===RSe.stdout||e===RSe.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,s?r.end&&e.end():(this[Qa].push(r.proxyErrors?new RV(this,e,r):new HN(this,e,r)),this[EA]?hb(()=>this[qw]()):this[qw]()),e}unpipe(e){let r=this[Qa].find(s=>s.dest===e);r&&(this[Qa].length===1?(this[Ks]&&this[zm]===0&&(this[Ks]=!1),this[Qa]=[]):this[Qa].splice(this[Qa].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let s=super.on(e,r);if(e===\"data\")this[rc]=!1,this[zm]++,!this[Qa].length&&!this[Ks]&&this[qw]();else if(e===\"readable\"&&this[Xs]!==0)super.emit(\"readable\");else if(rIt(e)&&this[dg])super.emit(e),this.removeAllListeners(e);else if(e===\"error\"&&this[fb]){let a=r;this[EA]?hb(()=>a.call(this,this[fb])):a.call(this,this[fb])}return s}removeListener(e,r){return this.off(e,r)}off(e,r){let s=super.off(e,r);return e===\"data\"&&(this[zm]=this.listeners(\"data\").length,this[zm]===0&&!this[rc]&&!this[Qa].length&&(this[Ks]=!1)),s}removeAllListeners(e){let r=super.removeAllListeners(e);return(e===\"data\"||e===void 0)&&(this[zm]=0,!this[rc]&&!this[Qa].length&&(this[Ks]=!1)),r}get emittedEnd(){return this[dg]}[fh](){!this[ON]&&!this[dg]&&!this[ts]&&this[zs].length===0&&this[uh]&&(this[ON]=!0,this.emit(\"end\"),this.emit(\"prefinish\"),this.emit(\"finish\"),this[LN]&&this.emit(\"close\"),this[ON]=!1)}emit(e,...r){let s=r[0];if(e!==\"error\"&&e!==\"close\"&&e!==ts&&this[ts])return!1;if(e===\"data\")return!this[na]&&!s?!1:this[EA]?(hb(()=>this[kV](s)),!0):this[kV](s);if(e===\"end\")return this[OSe]();if(e===\"close\"){if(this[LN]=!0,!this[dg]&&!this[ts])return!1;let n=super.emit(\"close\");return this.removeAllListeners(\"close\"),n}else if(e===\"error\"){this[fb]=s,super.emit(xV,s);let n=!this[pb]||this.listeners(\"error\").length?super.emit(\"error\",s):!1;return this[fh](),n}else if(e===\"resume\"){let n=super.emit(\"resume\");return this[fh](),n}else if(e===\"finish\"||e===\"prefinish\"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,...r);return this[fh](),a}[kV](e){for(let s of this[Qa])s.dest.write(e)===!1&&this.pause();let r=this[rc]?!1:super.emit(\"data\",e);return this[fh](),r}[OSe](){return this[dg]?!1:(this[dg]=!0,this.readable=!1,this[EA]?(hb(()=>this[QV]()),!0):this[QV]())}[QV](){if(this[Gw]){let r=this[Gw].end();if(r){for(let s of this[Qa])s.dest.write(r);this[rc]||super.emit(\"data\",r)}}for(let r of this[Qa])r.end();let e=super.emit(\"end\");return this.removeAllListeners(\"end\"),e}async collect(){let e=Object.assign([],{dataLength:0});this[na]||(e.dataLength=0);let r=this.promise();return this.on(\"data\",s=>{e.push(s),this[na]||(e.dataLength+=s.length)}),await r,e}async concat(){if(this[na])throw new Error(\"cannot concat in objectMode\");let e=await this.collect();return this[uf]?e.join(\"\"):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ts,()=>r(new Error(\"stream destroyed\"))),this.on(\"error\",s=>r(s)),this.on(\"end\",()=>e())})}[Symbol.asyncIterator](){this[rc]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let a=this.read();if(a!==null)return Promise.resolve({done:!1,value:a});if(this[uh])return r();let n,c,f=C=>{this.off(\"data\",p),this.off(\"end\",h),this.off(ts,E),r(),c(C)},p=C=>{this.off(\"error\",f),this.off(\"end\",h),this.off(ts,E),this.pause(),n({value:C,done:!!this[uh]})},h=()=>{this.off(\"error\",f),this.off(\"data\",p),this.off(ts,E),r(),n({done:!0,value:void 0})},E=()=>f(new Error(\"stream destroyed\"));return new Promise((C,S)=>{c=S,n=C,this.once(ts,E),this.once(\"error\",f),this.once(\"end\",h),this.once(\"data\",p)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[rc]=!1;let e=!1,r=()=>(this.pause(),this.off(xV,r),this.off(ts,r),this.off(\"end\",r),e=!0,{done:!0,value:void 0}),s=()=>{if(e)return r();let a=this.read();return a===null?r():{done:!1,value:a}};return this.once(\"end\",r),this.once(xV,r),this.once(ts,r),{next:s,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ts])return e?this.emit(\"error\",e):this.emit(ts),this;this[ts]=!0,this[rc]=!0,this[zs].length=0,this[Xs]=0;let r=this;return typeof r.close==\"function\"&&!this[LN]&&r.close(),e?this.emit(\"error\",e):this.emit(ts),this}static get isStream(){return Ta.isStream}};Ta.Minipass=jN});var HSe=_((Trr,IA)=>{\"use strict\";var db=Ie(\"crypto\"),{Minipass:aIt}=MSe(),OV=[\"sha512\",\"sha384\",\"sha256\"],MV=[\"sha512\"],lIt=/^[a-z0-9+/]+(?:=?=?)$/i,cIt=/^([a-z0-9]+)-([^?]+)([?\\S*]*)$/,uIt=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\\?[\\x21-\\x7E]*)?$/,fIt=/^[\\x21-\\x7E]+$/,mb=t=>t?.length?`?${t.join(\"?\")}`:\"\",LV=class extends aIt{#t;#r;#i;constructor(e){super(),this.size=0,this.opts=e,this.#e(),e?.algorithms?this.algorithms=[...e.algorithms]:this.algorithms=[...MV],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(db.createHash)}#e(){this.sri=this.opts?.integrity?nc(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=mb(this.opts?.options)}on(e,r){return e===\"size\"&&this.#r?r(this.#r):e===\"integrity\"&&this.#t?r(this.#t):e===\"verified\"&&this.#i?r(this.#i):super.on(e,r)}emit(e,r){return e===\"end\"&&this.#n(),super.emit(e,r)}write(e){return this.size+=e.length,this.hashes.forEach(r=>r.update(e)),super.write(e)}#n(){this.goodSri||this.#e();let e=nc(this.hashes.map((s,a)=>`${this.algorithms[a]}-${s.digest(\"base64\")}${this.optString}`).join(\" \"),this.opts),r=this.goodSri&&e.match(this.sri,this.opts);if(typeof this.expectedSize==\"number\"&&this.size!==this.expectedSize){let s=new Error(`stream size mismatch when checking ${this.sri}.\n  Wanted: ${this.expectedSize}\n  Found: ${this.size}`);s.code=\"EBADSIZE\",s.found=this.size,s.expected=this.expectedSize,s.sri=this.sri,this.emit(\"error\",s)}else if(this.sri&&!r){let s=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);s.code=\"EINTEGRITY\",s.found=e,s.expected=this.digests,s.algorithm=this.algorithm,s.sri=this.sri,this.emit(\"error\",s)}else this.#r=this.size,this.emit(\"size\",this.size),this.#t=e,this.emit(\"integrity\",e),r&&(this.#i=r,this.emit(\"verified\",r))}},Ah=class{get isHash(){return!0}constructor(e,r){let s=r?.strict;this.source=e.trim(),this.digest=\"\",this.algorithm=\"\",this.options=[];let a=this.source.match(s?uIt:cIt);if(!a||s&&!OV.includes(a[1]))return;this.algorithm=a[1],this.digest=a[2];let n=a[3];n&&(this.options=n.slice(1).split(\"?\"))}hexDigest(){return this.digest&&Buffer.from(this.digest,\"base64\").toString(\"hex\")}toJSON(){return this.toString()}match(e,r){let s=nc(e,r);if(!s)return!1;if(s.isIntegrity){let a=s.pickAlgorithm(r,[this.algorithm]);if(!a)return!1;let n=s[a].find(c=>c.digest===this.digest);return n||!1}return s.digest===this.digest?s:!1}toString(e){return e?.strict&&!(OV.includes(this.algorithm)&&this.digest.match(lIt)&&this.options.every(r=>r.match(fIt)))?\"\":`${this.algorithm}-${this.digest}${mb(this.options)}`}};function USe(t,e,r,s){let a=t!==\"\",n=!1,c=\"\",f=s.length-1;for(let h=0;h<f;h++){let E=Ah.prototype.toString.call(s[h],r);E&&(n=!0,c+=E,c+=e)}let p=Ah.prototype.toString.call(s[f],r);return p&&(n=!0,c+=p),a&&n?t+e+c:t+c}var Xm=class{get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(e){let r=e?.sep||\" \",s=\"\";if(e?.strict){r=r.replace(/\\S+/g,\" \");for(let a of OV)this[a]&&(s=USe(s,r,e,this[a]))}else for(let a of Object.keys(this))s=USe(s,r,e,this[a]);return s}concat(e,r){let s=typeof e==\"string\"?e:gb(e,r);return nc(`${this.toString(r)} ${s}`,r)}hexDigest(){return nc(this,{single:!0}).hexDigest()}merge(e,r){let s=nc(e,r);for(let a in s)if(this[a]){if(!this[a].find(n=>s[a].find(c=>n.digest===c.digest)))throw new Error(\"hashes do not match, cannot update integrity\")}else this[a]=s[a]}match(e,r){let s=nc(e,r);if(!s)return!1;let a=s.pickAlgorithm(r,Object.keys(this));return!!a&&this[a]&&s[a]&&this[a].find(n=>s[a].find(c=>n.digest===c.digest))||!1}pickAlgorithm(e,r){let s=e?.pickAlgorithm||EIt,a=Object.keys(this).filter(n=>r?.length?r.includes(n):!0);return a.length?a.reduce((n,c)=>s(n,c)||n):null}};IA.exports.parse=nc;function nc(t,e){if(!t)return null;if(typeof t==\"string\")return NV(t,e);if(t.algorithm&&t.digest){let r=new Xm;return r[t.algorithm]=[t],NV(gb(r,e),e)}else return NV(gb(t,e),e)}function NV(t,e){if(e?.single)return new Ah(t,e);let r=t.trim().split(/\\s+/).reduce((s,a)=>{let n=new Ah(a,e);if(n.algorithm&&n.digest){let c=n.algorithm;s[c]||(s[c]=[]),s[c].push(n)}return s},new Xm);return r.isEmpty()?null:r}IA.exports.stringify=gb;function gb(t,e){return t.algorithm&&t.digest?Ah.prototype.toString.call(t,e):typeof t==\"string\"?gb(nc(t,e),e):Xm.prototype.toString.call(t,e)}IA.exports.fromHex=AIt;function AIt(t,e,r){let s=mb(r?.options);return nc(`${e}-${Buffer.from(t,\"hex\").toString(\"base64\")}${s}`,r)}IA.exports.fromData=pIt;function pIt(t,e){let r=e?.algorithms||[...MV],s=mb(e?.options);return r.reduce((a,n)=>{let c=db.createHash(n).update(t).digest(\"base64\"),f=new Ah(`${n}-${c}${s}`,e);if(f.algorithm&&f.digest){let p=f.algorithm;a[p]||(a[p]=[]),a[p].push(f)}return a},new Xm)}IA.exports.fromStream=hIt;function hIt(t,e){let r=UV(e);return new Promise((s,a)=>{t.pipe(r),t.on(\"error\",a),r.on(\"error\",a);let n;r.on(\"integrity\",c=>{n=c}),r.on(\"end\",()=>s(n)),r.resume()})}IA.exports.checkData=gIt;function gIt(t,e,r){if(e=nc(e,r),!e||!Object.keys(e).length){if(r?.error)throw Object.assign(new Error(\"No valid integrity hashes to check against\"),{code:\"EINTEGRITY\"});return!1}let s=e.pickAlgorithm(r),a=db.createHash(s).update(t).digest(\"base64\"),n=nc({algorithm:s,digest:a}),c=n.match(e,r);if(r=r||{},c||!r.error)return c;if(typeof r.size==\"number\"&&t.length!==r.size){let f=new Error(`data size mismatch when checking ${e}.\n  Wanted: ${r.size}\n  Found: ${t.length}`);throw f.code=\"EBADSIZE\",f.found=t.length,f.expected=r.size,f.sri=e,f}else{let f=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw f.code=\"EINTEGRITY\",f.found=n,f.expected=e,f.algorithm=s,f.sri=e,f}}IA.exports.checkStream=dIt;function dIt(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=nc(e,r),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error(\"No valid integrity hashes to check against\"),{code:\"EINTEGRITY\"}));let s=UV(r);return new Promise((a,n)=>{t.pipe(s),t.on(\"error\",n),s.on(\"error\",n);let c;s.on(\"verified\",f=>{c=f}),s.on(\"end\",()=>a(c)),s.resume()})}IA.exports.integrityStream=UV;function UV(t=Object.create(null)){return new LV(t)}IA.exports.create=mIt;function mIt(t){let e=t?.algorithms||[...MV],r=mb(t?.options),s=e.map(db.createHash);return{update:function(a,n){return s.forEach(c=>c.update(a,n)),this},digest:function(){return e.reduce((n,c)=>{let f=s.shift().digest(\"base64\"),p=new Ah(`${c}-${f}${r}`,t);if(p.algorithm&&p.digest){let h=p.algorithm;n[h]||(n[h]=[]),n[h].push(p)}return n},new Xm)}}}var yIt=db.getHashes(),_Se=[\"md5\",\"whirlpool\",\"sha1\",\"sha224\",\"sha256\",\"sha384\",\"sha512\",\"sha3\",\"sha3-256\",\"sha3-384\",\"sha3-512\",\"sha3_256\",\"sha3_384\",\"sha3_512\"].filter(t=>yIt.includes(t));function EIt(t,e){return _Se.indexOf(t.toLowerCase())>=_Se.indexOf(e.toLowerCase())?t:e}});var _V=_(mg=>{\"use strict\";Object.defineProperty(mg,\"__esModule\",{value:!0});mg.Signature=mg.Envelope=void 0;mg.Envelope={fromJSON(t){return{payload:GN(t.payload)?Buffer.from(jSe(t.payload)):Buffer.alloc(0),payloadType:GN(t.payloadType)?globalThis.String(t.payloadType):\"\",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>mg.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=GSe(t.payload)),t.payloadType!==\"\"&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>mg.Signature.toJSON(r))),e}};mg.Signature={fromJSON(t){return{sig:GN(t.sig)?Buffer.from(jSe(t.sig)):Buffer.alloc(0),keyid:GN(t.keyid)?globalThis.String(t.keyid):\"\"}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=GSe(t.sig)),t.keyid!==\"\"&&(e.keyid=t.keyid),e}};function jSe(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function GSe(t){return globalThis.Buffer.from(t).toString(\"base64\")}function GN(t){return t!=null}});var WSe=_(qN=>{\"use strict\";Object.defineProperty(qN,\"__esModule\",{value:!0});qN.Timestamp=void 0;qN.Timestamp={fromJSON(t){return{seconds:qSe(t.seconds)?globalThis.String(t.seconds):\"0\",nanos:qSe(t.nanos)?globalThis.Number(t.nanos):0}},toJSON(t){let e={};return t.seconds!==\"0\"&&(e.seconds=t.seconds),t.nanos!==0&&(e.nanos=Math.round(t.nanos)),e}};function qSe(t){return t!=null}});var Ww=_(Ur=>{\"use strict\";Object.defineProperty(Ur,\"__esModule\",{value:!0});Ur.TimeRange=Ur.X509CertificateChain=Ur.SubjectAlternativeName=Ur.X509Certificate=Ur.DistinguishedName=Ur.ObjectIdentifierValuePair=Ur.ObjectIdentifier=Ur.PublicKeyIdentifier=Ur.PublicKey=Ur.RFC3161SignedTimestamp=Ur.LogId=Ur.MessageSignature=Ur.HashOutput=Ur.SubjectAlternativeNameType=Ur.PublicKeyDetails=Ur.HashAlgorithm=void 0;Ur.hashAlgorithmFromJSON=VSe;Ur.hashAlgorithmToJSON=JSe;Ur.publicKeyDetailsFromJSON=KSe;Ur.publicKeyDetailsToJSON=zSe;Ur.subjectAlternativeNameTypeFromJSON=XSe;Ur.subjectAlternativeNameTypeToJSON=ZSe;var IIt=WSe(),yl;(function(t){t[t.HASH_ALGORITHM_UNSPECIFIED=0]=\"HASH_ALGORITHM_UNSPECIFIED\",t[t.SHA2_256=1]=\"SHA2_256\",t[t.SHA2_384=2]=\"SHA2_384\",t[t.SHA2_512=3]=\"SHA2_512\",t[t.SHA3_256=4]=\"SHA3_256\",t[t.SHA3_384=5]=\"SHA3_384\"})(yl||(Ur.HashAlgorithm=yl={}));function VSe(t){switch(t){case 0:case\"HASH_ALGORITHM_UNSPECIFIED\":return yl.HASH_ALGORITHM_UNSPECIFIED;case 1:case\"SHA2_256\":return yl.SHA2_256;case 2:case\"SHA2_384\":return yl.SHA2_384;case 3:case\"SHA2_512\":return yl.SHA2_512;case 4:case\"SHA3_256\":return yl.SHA3_256;case 5:case\"SHA3_384\":return yl.SHA3_384;default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum HashAlgorithm\")}}function JSe(t){switch(t){case yl.HASH_ALGORITHM_UNSPECIFIED:return\"HASH_ALGORITHM_UNSPECIFIED\";case yl.SHA2_256:return\"SHA2_256\";case yl.SHA2_384:return\"SHA2_384\";case yl.SHA2_512:return\"SHA2_512\";case yl.SHA3_256:return\"SHA3_256\";case yl.SHA3_384:return\"SHA3_384\";default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum HashAlgorithm\")}}var sn;(function(t){t[t.PUBLIC_KEY_DETAILS_UNSPECIFIED=0]=\"PUBLIC_KEY_DETAILS_UNSPECIFIED\",t[t.PKCS1_RSA_PKCS1V5=1]=\"PKCS1_RSA_PKCS1V5\",t[t.PKCS1_RSA_PSS=2]=\"PKCS1_RSA_PSS\",t[t.PKIX_RSA_PKCS1V5=3]=\"PKIX_RSA_PKCS1V5\",t[t.PKIX_RSA_PSS=4]=\"PKIX_RSA_PSS\",t[t.PKIX_RSA_PKCS1V15_2048_SHA256=9]=\"PKIX_RSA_PKCS1V15_2048_SHA256\",t[t.PKIX_RSA_PKCS1V15_3072_SHA256=10]=\"PKIX_RSA_PKCS1V15_3072_SHA256\",t[t.PKIX_RSA_PKCS1V15_4096_SHA256=11]=\"PKIX_RSA_PKCS1V15_4096_SHA256\",t[t.PKIX_RSA_PSS_2048_SHA256=16]=\"PKIX_RSA_PSS_2048_SHA256\",t[t.PKIX_RSA_PSS_3072_SHA256=17]=\"PKIX_RSA_PSS_3072_SHA256\",t[t.PKIX_RSA_PSS_4096_SHA256=18]=\"PKIX_RSA_PSS_4096_SHA256\",t[t.PKIX_ECDSA_P256_HMAC_SHA_256=6]=\"PKIX_ECDSA_P256_HMAC_SHA_256\",t[t.PKIX_ECDSA_P256_SHA_256=5]=\"PKIX_ECDSA_P256_SHA_256\",t[t.PKIX_ECDSA_P384_SHA_384=12]=\"PKIX_ECDSA_P384_SHA_384\",t[t.PKIX_ECDSA_P521_SHA_512=13]=\"PKIX_ECDSA_P521_SHA_512\",t[t.PKIX_ED25519=7]=\"PKIX_ED25519\",t[t.PKIX_ED25519_PH=8]=\"PKIX_ED25519_PH\",t[t.LMS_SHA256=14]=\"LMS_SHA256\",t[t.LMOTS_SHA256=15]=\"LMOTS_SHA256\"})(sn||(Ur.PublicKeyDetails=sn={}));function KSe(t){switch(t){case 0:case\"PUBLIC_KEY_DETAILS_UNSPECIFIED\":return sn.PUBLIC_KEY_DETAILS_UNSPECIFIED;case 1:case\"PKCS1_RSA_PKCS1V5\":return sn.PKCS1_RSA_PKCS1V5;case 2:case\"PKCS1_RSA_PSS\":return sn.PKCS1_RSA_PSS;case 3:case\"PKIX_RSA_PKCS1V5\":return sn.PKIX_RSA_PKCS1V5;case 4:case\"PKIX_RSA_PSS\":return sn.PKIX_RSA_PSS;case 9:case\"PKIX_RSA_PKCS1V15_2048_SHA256\":return sn.PKIX_RSA_PKCS1V15_2048_SHA256;case 10:case\"PKIX_RSA_PKCS1V15_3072_SHA256\":return sn.PKIX_RSA_PKCS1V15_3072_SHA256;case 11:case\"PKIX_RSA_PKCS1V15_4096_SHA256\":return sn.PKIX_RSA_PKCS1V15_4096_SHA256;case 16:case\"PKIX_RSA_PSS_2048_SHA256\":return sn.PKIX_RSA_PSS_2048_SHA256;case 17:case\"PKIX_RSA_PSS_3072_SHA256\":return sn.PKIX_RSA_PSS_3072_SHA256;case 18:case\"PKIX_RSA_PSS_4096_SHA256\":return sn.PKIX_RSA_PSS_4096_SHA256;case 6:case\"PKIX_ECDSA_P256_HMAC_SHA_256\":return sn.PKIX_ECDSA_P256_HMAC_SHA_256;case 5:case\"PKIX_ECDSA_P256_SHA_256\":return sn.PKIX_ECDSA_P256_SHA_256;case 12:case\"PKIX_ECDSA_P384_SHA_384\":return sn.PKIX_ECDSA_P384_SHA_384;case 13:case\"PKIX_ECDSA_P521_SHA_512\":return sn.PKIX_ECDSA_P521_SHA_512;case 7:case\"PKIX_ED25519\":return sn.PKIX_ED25519;case 8:case\"PKIX_ED25519_PH\":return sn.PKIX_ED25519_PH;case 14:case\"LMS_SHA256\":return sn.LMS_SHA256;case 15:case\"LMOTS_SHA256\":return sn.LMOTS_SHA256;default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum PublicKeyDetails\")}}function zSe(t){switch(t){case sn.PUBLIC_KEY_DETAILS_UNSPECIFIED:return\"PUBLIC_KEY_DETAILS_UNSPECIFIED\";case sn.PKCS1_RSA_PKCS1V5:return\"PKCS1_RSA_PKCS1V5\";case sn.PKCS1_RSA_PSS:return\"PKCS1_RSA_PSS\";case sn.PKIX_RSA_PKCS1V5:return\"PKIX_RSA_PKCS1V5\";case sn.PKIX_RSA_PSS:return\"PKIX_RSA_PSS\";case sn.PKIX_RSA_PKCS1V15_2048_SHA256:return\"PKIX_RSA_PKCS1V15_2048_SHA256\";case sn.PKIX_RSA_PKCS1V15_3072_SHA256:return\"PKIX_RSA_PKCS1V15_3072_SHA256\";case sn.PKIX_RSA_PKCS1V15_4096_SHA256:return\"PKIX_RSA_PKCS1V15_4096_SHA256\";case sn.PKIX_RSA_PSS_2048_SHA256:return\"PKIX_RSA_PSS_2048_SHA256\";case sn.PKIX_RSA_PSS_3072_SHA256:return\"PKIX_RSA_PSS_3072_SHA256\";case sn.PKIX_RSA_PSS_4096_SHA256:return\"PKIX_RSA_PSS_4096_SHA256\";case sn.PKIX_ECDSA_P256_HMAC_SHA_256:return\"PKIX_ECDSA_P256_HMAC_SHA_256\";case sn.PKIX_ECDSA_P256_SHA_256:return\"PKIX_ECDSA_P256_SHA_256\";case sn.PKIX_ECDSA_P384_SHA_384:return\"PKIX_ECDSA_P384_SHA_384\";case sn.PKIX_ECDSA_P521_SHA_512:return\"PKIX_ECDSA_P521_SHA_512\";case sn.PKIX_ED25519:return\"PKIX_ED25519\";case sn.PKIX_ED25519_PH:return\"PKIX_ED25519_PH\";case sn.LMS_SHA256:return\"LMS_SHA256\";case sn.LMOTS_SHA256:return\"LMOTS_SHA256\";default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum PublicKeyDetails\")}}var CA;(function(t){t[t.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED=0]=\"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\",t[t.EMAIL=1]=\"EMAIL\",t[t.URI=2]=\"URI\",t[t.OTHER_NAME=3]=\"OTHER_NAME\"})(CA||(Ur.SubjectAlternativeNameType=CA={}));function XSe(t){switch(t){case 0:case\"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\":return CA.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED;case 1:case\"EMAIL\":return CA.EMAIL;case 2:case\"URI\":return CA.URI;case 3:case\"OTHER_NAME\":return CA.OTHER_NAME;default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum SubjectAlternativeNameType\")}}function ZSe(t){switch(t){case CA.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED:return\"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED\";case CA.EMAIL:return\"EMAIL\";case CA.URI:return\"URI\";case CA.OTHER_NAME:return\"OTHER_NAME\";default:throw new globalThis.Error(\"Unrecognized enum value \"+t+\" for enum SubjectAlternativeNameType\")}}Ur.HashOutput={fromJSON(t){return{algorithm:ds(t.algorithm)?VSe(t.algorithm):0,digest:ds(t.digest)?Buffer.from(Zm(t.digest)):Buffer.alloc(0)}},toJSON(t){let e={};return t.algorithm!==0&&(e.algorithm=JSe(t.algorithm)),t.digest.length!==0&&(e.digest=$m(t.digest)),e}};Ur.MessageSignature={fromJSON(t){return{messageDigest:ds(t.messageDigest)?Ur.HashOutput.fromJSON(t.messageDigest):void 0,signature:ds(t.signature)?Buffer.from(Zm(t.signature)):Buffer.alloc(0)}},toJSON(t){let e={};return t.messageDigest!==void 0&&(e.messageDigest=Ur.HashOutput.toJSON(t.messageDigest)),t.signature.length!==0&&(e.signature=$m(t.signature)),e}};Ur.LogId={fromJSON(t){return{keyId:ds(t.keyId)?Buffer.from(Zm(t.keyId)):Buffer.alloc(0)}},toJSON(t){let e={};return t.keyId.length!==0&&(e.keyId=$m(t.keyId)),e}};Ur.RFC3161SignedTimestamp={fromJSON(t){return{signedTimestamp:ds(t.signedTimestamp)?Buffer.from(Zm(t.signedTimestamp)):Buffer.alloc(0)}},toJSON(t){let e={};return t.signedTimestamp.length!==0&&(e.signedTimestamp=$m(t.signedTimestamp)),e}};Ur.PublicKey={fromJSON(t){return{rawBytes:ds(t.rawBytes)?Buffer.from(Zm(t.rawBytes)):void 0,keyDetails:ds(t.keyDetails)?KSe(t.keyDetails):0,validFor:ds(t.validFor)?Ur.TimeRange.fromJSON(t.validFor):void 0}},toJSON(t){let e={};return t.rawBytes!==void 0&&(e.rawBytes=$m(t.rawBytes)),t.keyDetails!==0&&(e.keyDetails=zSe(t.keyDetails)),t.validFor!==void 0&&(e.validFor=Ur.TimeRange.toJSON(t.validFor)),e}};Ur.PublicKeyIdentifier={fromJSON(t){return{hint:ds(t.hint)?globalThis.String(t.hint):\"\"}},toJSON(t){let e={};return t.hint!==\"\"&&(e.hint=t.hint),e}};Ur.ObjectIdentifier={fromJSON(t){return{id:globalThis.Array.isArray(t?.id)?t.id.map(e=>globalThis.Number(e)):[]}},toJSON(t){let e={};return t.id?.length&&(e.id=t.id.map(r=>Math.round(r))),e}};Ur.ObjectIdentifierValuePair={fromJSON(t){return{oid:ds(t.oid)?Ur.ObjectIdentifier.fromJSON(t.oid):void 0,value:ds(t.value)?Buffer.from(Zm(t.value)):Buffer.alloc(0)}},toJSON(t){let e={};return t.oid!==void 0&&(e.oid=Ur.ObjectIdentifier.toJSON(t.oid)),t.value.length!==0&&(e.value=$m(t.value)),e}};Ur.DistinguishedName={fromJSON(t){return{organization:ds(t.organization)?globalThis.String(t.organization):\"\",commonName:ds(t.commonName)?globalThis.String(t.commonName):\"\"}},toJSON(t){let e={};return t.organization!==\"\"&&(e.organization=t.organization),t.commonName!==\"\"&&(e.commonName=t.commonName),e}};Ur.X509Certificate={fromJSON(t){return{rawBytes:ds(t.rawBytes)?Buffer.from(Zm(t.rawBytes)):Buffer.alloc(0)}},toJSON(t){let e={};return t.rawBytes.length!==0&&(e.rawBytes=$m(t.rawBytes)),e}};Ur.SubjectAlternativeName={fromJSON(t){return{type:ds(t.type)?XSe(t.type):0,identity:ds(t.regexp)?{$case:\"regexp\",regexp:globalThis.String(t.regexp)}:ds(t.value)?{$case:\"value\",value:globalThis.String(t.value)}:void 0}},toJSON(t){let e={};return t.type!==0&&(e.type=ZSe(t.type)),t.identity?.$case===\"regexp\"?e.regexp=t.identity.regexp:t.identity?.$case===\"value\"&&(e.value=t.identity.value),e}};Ur.X509CertificateChain={fromJSON(t){return{certificates:globalThis.Array.isArray(t?.certificates)?t.certificates.map(e=>Ur.X509Certificate.fromJSON(e)):[]}},toJSON(t){let e={};return t.certificates?.length&&(e.certificates=t.certificates.map(r=>Ur.X509Certificate.toJSON(r))),e}};Ur.TimeRange={fromJSON(t){return{start:ds(t.start)?YSe(t.start):void 0,end:ds(t.end)?YSe(t.end):void 0}},toJSON(t){let e={};return t.start!==void 0&&(e.start=t.start.toISOString()),t.end!==void 0&&(e.end=t.end.toISOString()),e}};function Zm(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function $m(t){return globalThis.Buffer.from(t).toString(\"base64\")}function CIt(t){let e=(globalThis.Number(t.seconds)||0)*1e3;return e+=(t.nanos||0)/1e6,new globalThis.Date(e)}function YSe(t){return t instanceof globalThis.Date?t:typeof t==\"string\"?new globalThis.Date(t):CIt(IIt.Timestamp.fromJSON(t))}function ds(t){return t!=null}});var HV=_(ms=>{\"use strict\";Object.defineProperty(ms,\"__esModule\",{value:!0});ms.TransparencyLogEntry=ms.InclusionPromise=ms.InclusionProof=ms.Checkpoint=ms.KindVersion=void 0;var $Se=Ww();ms.KindVersion={fromJSON(t){return{kind:Ra(t.kind)?globalThis.String(t.kind):\"\",version:Ra(t.version)?globalThis.String(t.version):\"\"}},toJSON(t){let e={};return t.kind!==\"\"&&(e.kind=t.kind),t.version!==\"\"&&(e.version=t.version),e}};ms.Checkpoint={fromJSON(t){return{envelope:Ra(t.envelope)?globalThis.String(t.envelope):\"\"}},toJSON(t){let e={};return t.envelope!==\"\"&&(e.envelope=t.envelope),e}};ms.InclusionProof={fromJSON(t){return{logIndex:Ra(t.logIndex)?globalThis.String(t.logIndex):\"0\",rootHash:Ra(t.rootHash)?Buffer.from(WN(t.rootHash)):Buffer.alloc(0),treeSize:Ra(t.treeSize)?globalThis.String(t.treeSize):\"0\",hashes:globalThis.Array.isArray(t?.hashes)?t.hashes.map(e=>Buffer.from(WN(e))):[],checkpoint:Ra(t.checkpoint)?ms.Checkpoint.fromJSON(t.checkpoint):void 0}},toJSON(t){let e={};return t.logIndex!==\"0\"&&(e.logIndex=t.logIndex),t.rootHash.length!==0&&(e.rootHash=YN(t.rootHash)),t.treeSize!==\"0\"&&(e.treeSize=t.treeSize),t.hashes?.length&&(e.hashes=t.hashes.map(r=>YN(r))),t.checkpoint!==void 0&&(e.checkpoint=ms.Checkpoint.toJSON(t.checkpoint)),e}};ms.InclusionPromise={fromJSON(t){return{signedEntryTimestamp:Ra(t.signedEntryTimestamp)?Buffer.from(WN(t.signedEntryTimestamp)):Buffer.alloc(0)}},toJSON(t){let e={};return t.signedEntryTimestamp.length!==0&&(e.signedEntryTimestamp=YN(t.signedEntryTimestamp)),e}};ms.TransparencyLogEntry={fromJSON(t){return{logIndex:Ra(t.logIndex)?globalThis.String(t.logIndex):\"0\",logId:Ra(t.logId)?$Se.LogId.fromJSON(t.logId):void 0,kindVersion:Ra(t.kindVersion)?ms.KindVersion.fromJSON(t.kindVersion):void 0,integratedTime:Ra(t.integratedTime)?globalThis.String(t.integratedTime):\"0\",inclusionPromise:Ra(t.inclusionPromise)?ms.InclusionPromise.fromJSON(t.inclusionPromise):void 0,inclusionProof:Ra(t.inclusionProof)?ms.InclusionProof.fromJSON(t.inclusionProof):void 0,canonicalizedBody:Ra(t.canonicalizedBody)?Buffer.from(WN(t.canonicalizedBody)):Buffer.alloc(0)}},toJSON(t){let e={};return t.logIndex!==\"0\"&&(e.logIndex=t.logIndex),t.logId!==void 0&&(e.logId=$Se.LogId.toJSON(t.logId)),t.kindVersion!==void 0&&(e.kindVersion=ms.KindVersion.toJSON(t.kindVersion)),t.integratedTime!==\"0\"&&(e.integratedTime=t.integratedTime),t.inclusionPromise!==void 0&&(e.inclusionPromise=ms.InclusionPromise.toJSON(t.inclusionPromise)),t.inclusionProof!==void 0&&(e.inclusionProof=ms.InclusionProof.toJSON(t.inclusionProof)),t.canonicalizedBody.length!==0&&(e.canonicalizedBody=YN(t.canonicalizedBody)),e}};function WN(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function YN(t){return globalThis.Buffer.from(t).toString(\"base64\")}function Ra(t){return t!=null}});var jV=_(Xc=>{\"use strict\";Object.defineProperty(Xc,\"__esModule\",{value:!0});Xc.Bundle=Xc.VerificationMaterial=Xc.TimestampVerificationData=void 0;var eDe=_V(),wA=Ww(),tDe=HV();Xc.TimestampVerificationData={fromJSON(t){return{rfc3161Timestamps:globalThis.Array.isArray(t?.rfc3161Timestamps)?t.rfc3161Timestamps.map(e=>wA.RFC3161SignedTimestamp.fromJSON(e)):[]}},toJSON(t){let e={};return t.rfc3161Timestamps?.length&&(e.rfc3161Timestamps=t.rfc3161Timestamps.map(r=>wA.RFC3161SignedTimestamp.toJSON(r))),e}};Xc.VerificationMaterial={fromJSON(t){return{content:yg(t.publicKey)?{$case:\"publicKey\",publicKey:wA.PublicKeyIdentifier.fromJSON(t.publicKey)}:yg(t.x509CertificateChain)?{$case:\"x509CertificateChain\",x509CertificateChain:wA.X509CertificateChain.fromJSON(t.x509CertificateChain)}:yg(t.certificate)?{$case:\"certificate\",certificate:wA.X509Certificate.fromJSON(t.certificate)}:void 0,tlogEntries:globalThis.Array.isArray(t?.tlogEntries)?t.tlogEntries.map(e=>tDe.TransparencyLogEntry.fromJSON(e)):[],timestampVerificationData:yg(t.timestampVerificationData)?Xc.TimestampVerificationData.fromJSON(t.timestampVerificationData):void 0}},toJSON(t){let e={};return t.content?.$case===\"publicKey\"?e.publicKey=wA.PublicKeyIdentifier.toJSON(t.content.publicKey):t.content?.$case===\"x509CertificateChain\"?e.x509CertificateChain=wA.X509CertificateChain.toJSON(t.content.x509CertificateChain):t.content?.$case===\"certificate\"&&(e.certificate=wA.X509Certificate.toJSON(t.content.certificate)),t.tlogEntries?.length&&(e.tlogEntries=t.tlogEntries.map(r=>tDe.TransparencyLogEntry.toJSON(r))),t.timestampVerificationData!==void 0&&(e.timestampVerificationData=Xc.TimestampVerificationData.toJSON(t.timestampVerificationData)),e}};Xc.Bundle={fromJSON(t){return{mediaType:yg(t.mediaType)?globalThis.String(t.mediaType):\"\",verificationMaterial:yg(t.verificationMaterial)?Xc.VerificationMaterial.fromJSON(t.verificationMaterial):void 0,content:yg(t.messageSignature)?{$case:\"messageSignature\",messageSignature:wA.MessageSignature.fromJSON(t.messageSignature)}:yg(t.dsseEnvelope)?{$case:\"dsseEnvelope\",dsseEnvelope:eDe.Envelope.fromJSON(t.dsseEnvelope)}:void 0}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.verificationMaterial!==void 0&&(e.verificationMaterial=Xc.VerificationMaterial.toJSON(t.verificationMaterial)),t.content?.$case===\"messageSignature\"?e.messageSignature=wA.MessageSignature.toJSON(t.content.messageSignature):t.content?.$case===\"dsseEnvelope\"&&(e.dsseEnvelope=eDe.Envelope.toJSON(t.content.dsseEnvelope)),e}};function yg(t){return t!=null}});var GV=_(Ri=>{\"use strict\";Object.defineProperty(Ri,\"__esModule\",{value:!0});Ri.ClientTrustConfig=Ri.SigningConfig=Ri.TrustedRoot=Ri.CertificateAuthority=Ri.TransparencyLogInstance=void 0;var El=Ww();Ri.TransparencyLogInstance={fromJSON(t){return{baseUrl:ia(t.baseUrl)?globalThis.String(t.baseUrl):\"\",hashAlgorithm:ia(t.hashAlgorithm)?(0,El.hashAlgorithmFromJSON)(t.hashAlgorithm):0,publicKey:ia(t.publicKey)?El.PublicKey.fromJSON(t.publicKey):void 0,logId:ia(t.logId)?El.LogId.fromJSON(t.logId):void 0,checkpointKeyId:ia(t.checkpointKeyId)?El.LogId.fromJSON(t.checkpointKeyId):void 0}},toJSON(t){let e={};return t.baseUrl!==\"\"&&(e.baseUrl=t.baseUrl),t.hashAlgorithm!==0&&(e.hashAlgorithm=(0,El.hashAlgorithmToJSON)(t.hashAlgorithm)),t.publicKey!==void 0&&(e.publicKey=El.PublicKey.toJSON(t.publicKey)),t.logId!==void 0&&(e.logId=El.LogId.toJSON(t.logId)),t.checkpointKeyId!==void 0&&(e.checkpointKeyId=El.LogId.toJSON(t.checkpointKeyId)),e}};Ri.CertificateAuthority={fromJSON(t){return{subject:ia(t.subject)?El.DistinguishedName.fromJSON(t.subject):void 0,uri:ia(t.uri)?globalThis.String(t.uri):\"\",certChain:ia(t.certChain)?El.X509CertificateChain.fromJSON(t.certChain):void 0,validFor:ia(t.validFor)?El.TimeRange.fromJSON(t.validFor):void 0}},toJSON(t){let e={};return t.subject!==void 0&&(e.subject=El.DistinguishedName.toJSON(t.subject)),t.uri!==\"\"&&(e.uri=t.uri),t.certChain!==void 0&&(e.certChain=El.X509CertificateChain.toJSON(t.certChain)),t.validFor!==void 0&&(e.validFor=El.TimeRange.toJSON(t.validFor)),e}};Ri.TrustedRoot={fromJSON(t){return{mediaType:ia(t.mediaType)?globalThis.String(t.mediaType):\"\",tlogs:globalThis.Array.isArray(t?.tlogs)?t.tlogs.map(e=>Ri.TransparencyLogInstance.fromJSON(e)):[],certificateAuthorities:globalThis.Array.isArray(t?.certificateAuthorities)?t.certificateAuthorities.map(e=>Ri.CertificateAuthority.fromJSON(e)):[],ctlogs:globalThis.Array.isArray(t?.ctlogs)?t.ctlogs.map(e=>Ri.TransparencyLogInstance.fromJSON(e)):[],timestampAuthorities:globalThis.Array.isArray(t?.timestampAuthorities)?t.timestampAuthorities.map(e=>Ri.CertificateAuthority.fromJSON(e)):[]}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.tlogs?.length&&(e.tlogs=t.tlogs.map(r=>Ri.TransparencyLogInstance.toJSON(r))),t.certificateAuthorities?.length&&(e.certificateAuthorities=t.certificateAuthorities.map(r=>Ri.CertificateAuthority.toJSON(r))),t.ctlogs?.length&&(e.ctlogs=t.ctlogs.map(r=>Ri.TransparencyLogInstance.toJSON(r))),t.timestampAuthorities?.length&&(e.timestampAuthorities=t.timestampAuthorities.map(r=>Ri.CertificateAuthority.toJSON(r))),e}};Ri.SigningConfig={fromJSON(t){return{mediaType:ia(t.mediaType)?globalThis.String(t.mediaType):\"\",caUrl:ia(t.caUrl)?globalThis.String(t.caUrl):\"\",oidcUrl:ia(t.oidcUrl)?globalThis.String(t.oidcUrl):\"\",tlogUrls:globalThis.Array.isArray(t?.tlogUrls)?t.tlogUrls.map(e=>globalThis.String(e)):[],tsaUrls:globalThis.Array.isArray(t?.tsaUrls)?t.tsaUrls.map(e=>globalThis.String(e)):[]}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.caUrl!==\"\"&&(e.caUrl=t.caUrl),t.oidcUrl!==\"\"&&(e.oidcUrl=t.oidcUrl),t.tlogUrls?.length&&(e.tlogUrls=t.tlogUrls),t.tsaUrls?.length&&(e.tsaUrls=t.tsaUrls),e}};Ri.ClientTrustConfig={fromJSON(t){return{mediaType:ia(t.mediaType)?globalThis.String(t.mediaType):\"\",trustedRoot:ia(t.trustedRoot)?Ri.TrustedRoot.fromJSON(t.trustedRoot):void 0,signingConfig:ia(t.signingConfig)?Ri.SigningConfig.fromJSON(t.signingConfig):void 0}},toJSON(t){let e={};return t.mediaType!==\"\"&&(e.mediaType=t.mediaType),t.trustedRoot!==void 0&&(e.trustedRoot=Ri.TrustedRoot.toJSON(t.trustedRoot)),t.signingConfig!==void 0&&(e.signingConfig=Ri.SigningConfig.toJSON(t.signingConfig)),e}};function ia(t){return t!=null}});var iDe=_(Vr=>{\"use strict\";Object.defineProperty(Vr,\"__esModule\",{value:!0});Vr.Input=Vr.Artifact=Vr.ArtifactVerificationOptions_ObserverTimestampOptions=Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions=Vr.ArtifactVerificationOptions_TimestampAuthorityOptions=Vr.ArtifactVerificationOptions_CtlogOptions=Vr.ArtifactVerificationOptions_TlogOptions=Vr.ArtifactVerificationOptions=Vr.PublicKeyIdentities=Vr.CertificateIdentities=Vr.CertificateIdentity=void 0;var rDe=jV(),Eg=Ww(),nDe=GV();Vr.CertificateIdentity={fromJSON(t){return{issuer:gi(t.issuer)?globalThis.String(t.issuer):\"\",san:gi(t.san)?Eg.SubjectAlternativeName.fromJSON(t.san):void 0,oids:globalThis.Array.isArray(t?.oids)?t.oids.map(e=>Eg.ObjectIdentifierValuePair.fromJSON(e)):[]}},toJSON(t){let e={};return t.issuer!==\"\"&&(e.issuer=t.issuer),t.san!==void 0&&(e.san=Eg.SubjectAlternativeName.toJSON(t.san)),t.oids?.length&&(e.oids=t.oids.map(r=>Eg.ObjectIdentifierValuePair.toJSON(r))),e}};Vr.CertificateIdentities={fromJSON(t){return{identities:globalThis.Array.isArray(t?.identities)?t.identities.map(e=>Vr.CertificateIdentity.fromJSON(e)):[]}},toJSON(t){let e={};return t.identities?.length&&(e.identities=t.identities.map(r=>Vr.CertificateIdentity.toJSON(r))),e}};Vr.PublicKeyIdentities={fromJSON(t){return{publicKeys:globalThis.Array.isArray(t?.publicKeys)?t.publicKeys.map(e=>Eg.PublicKey.fromJSON(e)):[]}},toJSON(t){let e={};return t.publicKeys?.length&&(e.publicKeys=t.publicKeys.map(r=>Eg.PublicKey.toJSON(r))),e}};Vr.ArtifactVerificationOptions={fromJSON(t){return{signers:gi(t.certificateIdentities)?{$case:\"certificateIdentities\",certificateIdentities:Vr.CertificateIdentities.fromJSON(t.certificateIdentities)}:gi(t.publicKeys)?{$case:\"publicKeys\",publicKeys:Vr.PublicKeyIdentities.fromJSON(t.publicKeys)}:void 0,tlogOptions:gi(t.tlogOptions)?Vr.ArtifactVerificationOptions_TlogOptions.fromJSON(t.tlogOptions):void 0,ctlogOptions:gi(t.ctlogOptions)?Vr.ArtifactVerificationOptions_CtlogOptions.fromJSON(t.ctlogOptions):void 0,tsaOptions:gi(t.tsaOptions)?Vr.ArtifactVerificationOptions_TimestampAuthorityOptions.fromJSON(t.tsaOptions):void 0,integratedTsOptions:gi(t.integratedTsOptions)?Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.fromJSON(t.integratedTsOptions):void 0,observerOptions:gi(t.observerOptions)?Vr.ArtifactVerificationOptions_ObserverTimestampOptions.fromJSON(t.observerOptions):void 0}},toJSON(t){let e={};return t.signers?.$case===\"certificateIdentities\"?e.certificateIdentities=Vr.CertificateIdentities.toJSON(t.signers.certificateIdentities):t.signers?.$case===\"publicKeys\"&&(e.publicKeys=Vr.PublicKeyIdentities.toJSON(t.signers.publicKeys)),t.tlogOptions!==void 0&&(e.tlogOptions=Vr.ArtifactVerificationOptions_TlogOptions.toJSON(t.tlogOptions)),t.ctlogOptions!==void 0&&(e.ctlogOptions=Vr.ArtifactVerificationOptions_CtlogOptions.toJSON(t.ctlogOptions)),t.tsaOptions!==void 0&&(e.tsaOptions=Vr.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(t.tsaOptions)),t.integratedTsOptions!==void 0&&(e.integratedTsOptions=Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.toJSON(t.integratedTsOptions)),t.observerOptions!==void 0&&(e.observerOptions=Vr.ArtifactVerificationOptions_ObserverTimestampOptions.toJSON(t.observerOptions)),e}};Vr.ArtifactVerificationOptions_TlogOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,performOnlineVerification:gi(t.performOnlineVerification)?globalThis.Boolean(t.performOnlineVerification):!1,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.performOnlineVerification!==!1&&(e.performOnlineVerification=t.performOnlineVerification),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_CtlogOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_TimestampAuthorityOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_ObserverTimestampOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.Artifact={fromJSON(t){return{data:gi(t.artifactUri)?{$case:\"artifactUri\",artifactUri:globalThis.String(t.artifactUri)}:gi(t.artifact)?{$case:\"artifact\",artifact:Buffer.from(wIt(t.artifact))}:gi(t.artifactDigest)?{$case:\"artifactDigest\",artifactDigest:Eg.HashOutput.fromJSON(t.artifactDigest)}:void 0}},toJSON(t){let e={};return t.data?.$case===\"artifactUri\"?e.artifactUri=t.data.artifactUri:t.data?.$case===\"artifact\"?e.artifact=BIt(t.data.artifact):t.data?.$case===\"artifactDigest\"&&(e.artifactDigest=Eg.HashOutput.toJSON(t.data.artifactDigest)),e}};Vr.Input={fromJSON(t){return{artifactTrustRoot:gi(t.artifactTrustRoot)?nDe.TrustedRoot.fromJSON(t.artifactTrustRoot):void 0,artifactVerificationOptions:gi(t.artifactVerificationOptions)?Vr.ArtifactVerificationOptions.fromJSON(t.artifactVerificationOptions):void 0,bundle:gi(t.bundle)?rDe.Bundle.fromJSON(t.bundle):void 0,artifact:gi(t.artifact)?Vr.Artifact.fromJSON(t.artifact):void 0}},toJSON(t){let e={};return t.artifactTrustRoot!==void 0&&(e.artifactTrustRoot=nDe.TrustedRoot.toJSON(t.artifactTrustRoot)),t.artifactVerificationOptions!==void 0&&(e.artifactVerificationOptions=Vr.ArtifactVerificationOptions.toJSON(t.artifactVerificationOptions)),t.bundle!==void 0&&(e.bundle=rDe.Bundle.toJSON(t.bundle)),t.artifact!==void 0&&(e.artifact=Vr.Artifact.toJSON(t.artifact)),e}};function wIt(t){return Uint8Array.from(globalThis.Buffer.from(t,\"base64\"))}function BIt(t){return globalThis.Buffer.from(t).toString(\"base64\")}function gi(t){return t!=null}});var yb=_(Zc=>{\"use strict\";var vIt=Zc&&Zc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Yw=Zc&&Zc.__exportStar||function(t,e){for(var r in t)r!==\"default\"&&!Object.prototype.hasOwnProperty.call(e,r)&&vIt(e,t,r)};Object.defineProperty(Zc,\"__esModule\",{value:!0});Yw(_V(),Zc);Yw(jV(),Zc);Yw(Ww(),Zc);Yw(HV(),Zc);Yw(GV(),Zc);Yw(iDe(),Zc)});var VN=_(Il=>{\"use strict\";Object.defineProperty(Il,\"__esModule\",{value:!0});Il.BUNDLE_V03_MEDIA_TYPE=Il.BUNDLE_V03_LEGACY_MEDIA_TYPE=Il.BUNDLE_V02_MEDIA_TYPE=Il.BUNDLE_V01_MEDIA_TYPE=void 0;Il.isBundleWithCertificateChain=SIt;Il.isBundleWithPublicKey=DIt;Il.isBundleWithMessageSignature=bIt;Il.isBundleWithDsseEnvelope=PIt;Il.BUNDLE_V01_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle+json;version=0.1\";Il.BUNDLE_V02_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle+json;version=0.2\";Il.BUNDLE_V03_LEGACY_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle+json;version=0.3\";Il.BUNDLE_V03_MEDIA_TYPE=\"application/vnd.dev.sigstore.bundle.v0.3+json\";function SIt(t){return t.verificationMaterial.content.$case===\"x509CertificateChain\"}function DIt(t){return t.verificationMaterial.content.$case===\"publicKey\"}function bIt(t){return t.content.$case===\"messageSignature\"}function PIt(t){return t.content.$case===\"dsseEnvelope\"}});var oDe=_(KN=>{\"use strict\";Object.defineProperty(KN,\"__esModule\",{value:!0});KN.toMessageSignatureBundle=kIt;KN.toDSSEBundle=QIt;var xIt=yb(),JN=VN();function kIt(t){return{mediaType:t.certificateChain?JN.BUNDLE_V02_MEDIA_TYPE:JN.BUNDLE_V03_MEDIA_TYPE,content:{$case:\"messageSignature\",messageSignature:{messageDigest:{algorithm:xIt.HashAlgorithm.SHA2_256,digest:t.digest},signature:t.signature}},verificationMaterial:sDe(t)}}function QIt(t){return{mediaType:t.certificateChain?JN.BUNDLE_V02_MEDIA_TYPE:JN.BUNDLE_V03_MEDIA_TYPE,content:{$case:\"dsseEnvelope\",dsseEnvelope:TIt(t)},verificationMaterial:sDe(t)}}function TIt(t){return{payloadType:t.artifactType,payload:t.artifact,signatures:[RIt(t)]}}function RIt(t){return{keyid:t.keyHint||\"\",sig:t.signature}}function sDe(t){return{content:FIt(t),tlogEntries:[],timestampVerificationData:{rfc3161Timestamps:[]}}}function FIt(t){return t.certificate?t.certificateChain?{$case:\"x509CertificateChain\",x509CertificateChain:{certificates:[{rawBytes:t.certificate}]}}:{$case:\"certificate\",certificate:{rawBytes:t.certificate}}:{$case:\"publicKey\",publicKey:{hint:t.keyHint||\"\"}}}});var WV=_(zN=>{\"use strict\";Object.defineProperty(zN,\"__esModule\",{value:!0});zN.ValidationError=void 0;var qV=class extends Error{constructor(e,r){super(e),this.fields=r}};zN.ValidationError=qV});var YV=_(ey=>{\"use strict\";Object.defineProperty(ey,\"__esModule\",{value:!0});ey.assertBundle=NIt;ey.assertBundleV01=aDe;ey.isBundleV01=OIt;ey.assertBundleV02=LIt;ey.assertBundleLatest=MIt;var XN=WV();function NIt(t){let e=ZN(t);if(e.length>0)throw new XN.ValidationError(\"invalid bundle\",e)}function aDe(t){let e=[];if(e.push(...ZN(t)),e.push(...UIt(t)),e.length>0)throw new XN.ValidationError(\"invalid v0.1 bundle\",e)}function OIt(t){try{return aDe(t),!0}catch{return!1}}function LIt(t){let e=[];if(e.push(...ZN(t)),e.push(...lDe(t)),e.length>0)throw new XN.ValidationError(\"invalid v0.2 bundle\",e)}function MIt(t){let e=[];if(e.push(...ZN(t)),e.push(...lDe(t)),e.push(..._It(t)),e.length>0)throw new XN.ValidationError(\"invalid bundle\",e)}function ZN(t){let e=[];if((t.mediaType===void 0||!t.mediaType.match(/^application\\/vnd\\.dev\\.sigstore\\.bundle\\+json;version=\\d\\.\\d/)&&!t.mediaType.match(/^application\\/vnd\\.dev\\.sigstore\\.bundle\\.v\\d\\.\\d\\+json/))&&e.push(\"mediaType\"),t.content===void 0)e.push(\"content\");else switch(t.content.$case){case\"messageSignature\":t.content.messageSignature.messageDigest===void 0?e.push(\"content.messageSignature.messageDigest\"):t.content.messageSignature.messageDigest.digest.length===0&&e.push(\"content.messageSignature.messageDigest.digest\"),t.content.messageSignature.signature.length===0&&e.push(\"content.messageSignature.signature\");break;case\"dsseEnvelope\":t.content.dsseEnvelope.payload.length===0&&e.push(\"content.dsseEnvelope.payload\"),t.content.dsseEnvelope.signatures.length!==1?e.push(\"content.dsseEnvelope.signatures\"):t.content.dsseEnvelope.signatures[0].sig.length===0&&e.push(\"content.dsseEnvelope.signatures[0].sig\");break}if(t.verificationMaterial===void 0)e.push(\"verificationMaterial\");else{if(t.verificationMaterial.content===void 0)e.push(\"verificationMaterial.content\");else switch(t.verificationMaterial.content.$case){case\"x509CertificateChain\":t.verificationMaterial.content.x509CertificateChain.certificates.length===0&&e.push(\"verificationMaterial.content.x509CertificateChain.certificates\"),t.verificationMaterial.content.x509CertificateChain.certificates.forEach((r,s)=>{r.rawBytes.length===0&&e.push(`verificationMaterial.content.x509CertificateChain.certificates[${s}].rawBytes`)});break;case\"certificate\":t.verificationMaterial.content.certificate.rawBytes.length===0&&e.push(\"verificationMaterial.content.certificate.rawBytes\");break}t.verificationMaterial.tlogEntries===void 0?e.push(\"verificationMaterial.tlogEntries\"):t.verificationMaterial.tlogEntries.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.logId===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].logId`),r.kindVersion===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].kindVersion`)})}return e}function UIt(t){let e=[];return t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.inclusionPromise===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].inclusionPromise`)}),e}function lDe(t){let e=[];return t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.inclusionProof===void 0?e.push(`verificationMaterial.tlogEntries[${s}].inclusionProof`):r.inclusionProof.checkpoint===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].inclusionProof.checkpoint`)}),e}function _It(t){let e=[];return t.verificationMaterial?.content?.$case===\"x509CertificateChain\"&&e.push(\"verificationMaterial.content.$case\"),e}});var uDe=_(BA=>{\"use strict\";Object.defineProperty(BA,\"__esModule\",{value:!0});BA.envelopeToJSON=BA.envelopeFromJSON=BA.bundleToJSON=BA.bundleFromJSON=void 0;var $N=yb(),cDe=VN(),VV=YV(),HIt=t=>{let e=$N.Bundle.fromJSON(t);switch(e.mediaType){case cDe.BUNDLE_V01_MEDIA_TYPE:(0,VV.assertBundleV01)(e);break;case cDe.BUNDLE_V02_MEDIA_TYPE:(0,VV.assertBundleV02)(e);break;default:(0,VV.assertBundleLatest)(e);break}return e};BA.bundleFromJSON=HIt;var jIt=t=>$N.Bundle.toJSON(t);BA.bundleToJSON=jIt;var GIt=t=>$N.Envelope.fromJSON(t);BA.envelopeFromJSON=GIt;var qIt=t=>$N.Envelope.toJSON(t);BA.envelopeToJSON=qIt});var Ib=_(Xr=>{\"use strict\";Object.defineProperty(Xr,\"__esModule\",{value:!0});Xr.isBundleV01=Xr.assertBundleV02=Xr.assertBundleV01=Xr.assertBundleLatest=Xr.assertBundle=Xr.envelopeToJSON=Xr.envelopeFromJSON=Xr.bundleToJSON=Xr.bundleFromJSON=Xr.ValidationError=Xr.isBundleWithPublicKey=Xr.isBundleWithMessageSignature=Xr.isBundleWithDsseEnvelope=Xr.isBundleWithCertificateChain=Xr.BUNDLE_V03_MEDIA_TYPE=Xr.BUNDLE_V03_LEGACY_MEDIA_TYPE=Xr.BUNDLE_V02_MEDIA_TYPE=Xr.BUNDLE_V01_MEDIA_TYPE=Xr.toMessageSignatureBundle=Xr.toDSSEBundle=void 0;var fDe=oDe();Object.defineProperty(Xr,\"toDSSEBundle\",{enumerable:!0,get:function(){return fDe.toDSSEBundle}});Object.defineProperty(Xr,\"toMessageSignatureBundle\",{enumerable:!0,get:function(){return fDe.toMessageSignatureBundle}});var Ig=VN();Object.defineProperty(Xr,\"BUNDLE_V01_MEDIA_TYPE\",{enumerable:!0,get:function(){return Ig.BUNDLE_V01_MEDIA_TYPE}});Object.defineProperty(Xr,\"BUNDLE_V02_MEDIA_TYPE\",{enumerable:!0,get:function(){return Ig.BUNDLE_V02_MEDIA_TYPE}});Object.defineProperty(Xr,\"BUNDLE_V03_LEGACY_MEDIA_TYPE\",{enumerable:!0,get:function(){return Ig.BUNDLE_V03_LEGACY_MEDIA_TYPE}});Object.defineProperty(Xr,\"BUNDLE_V03_MEDIA_TYPE\",{enumerable:!0,get:function(){return Ig.BUNDLE_V03_MEDIA_TYPE}});Object.defineProperty(Xr,\"isBundleWithCertificateChain\",{enumerable:!0,get:function(){return Ig.isBundleWithCertificateChain}});Object.defineProperty(Xr,\"isBundleWithDsseEnvelope\",{enumerable:!0,get:function(){return Ig.isBundleWithDsseEnvelope}});Object.defineProperty(Xr,\"isBundleWithMessageSignature\",{enumerable:!0,get:function(){return Ig.isBundleWithMessageSignature}});Object.defineProperty(Xr,\"isBundleWithPublicKey\",{enumerable:!0,get:function(){return Ig.isBundleWithPublicKey}});var WIt=WV();Object.defineProperty(Xr,\"ValidationError\",{enumerable:!0,get:function(){return WIt.ValidationError}});var eO=uDe();Object.defineProperty(Xr,\"bundleFromJSON\",{enumerable:!0,get:function(){return eO.bundleFromJSON}});Object.defineProperty(Xr,\"bundleToJSON\",{enumerable:!0,get:function(){return eO.bundleToJSON}});Object.defineProperty(Xr,\"envelopeFromJSON\",{enumerable:!0,get:function(){return eO.envelopeFromJSON}});Object.defineProperty(Xr,\"envelopeToJSON\",{enumerable:!0,get:function(){return eO.envelopeToJSON}});var Eb=YV();Object.defineProperty(Xr,\"assertBundle\",{enumerable:!0,get:function(){return Eb.assertBundle}});Object.defineProperty(Xr,\"assertBundleLatest\",{enumerable:!0,get:function(){return Eb.assertBundleLatest}});Object.defineProperty(Xr,\"assertBundleV01\",{enumerable:!0,get:function(){return Eb.assertBundleV01}});Object.defineProperty(Xr,\"assertBundleV02\",{enumerable:!0,get:function(){return Eb.assertBundleV02}});Object.defineProperty(Xr,\"isBundleV01\",{enumerable:!0,get:function(){return Eb.isBundleV01}})});var Cb=_(rO=>{\"use strict\";Object.defineProperty(rO,\"__esModule\",{value:!0});rO.ByteStream=void 0;var JV=class extends Error{},tO=class t{constructor(e){this.start=0,e?(this.buf=e,this.view=Buffer.from(e)):(this.buf=new ArrayBuffer(0),this.view=Buffer.from(this.buf))}get buffer(){return this.view.subarray(0,this.start)}get length(){return this.view.byteLength}get position(){return this.start}seek(e){this.start=e}slice(e,r){let s=e+r;if(s>this.length)throw new JV(\"request past end of buffer\");return this.view.subarray(e,s)}appendChar(e){this.ensureCapacity(1),this.view[this.start]=e,this.start+=1}appendUint16(e){this.ensureCapacity(2);let r=new Uint16Array([e]),s=new Uint8Array(r.buffer);this.view[this.start]=s[1],this.view[this.start+1]=s[0],this.start+=2}appendUint24(e){this.ensureCapacity(3);let r=new Uint32Array([e]),s=new Uint8Array(r.buffer);this.view[this.start]=s[2],this.view[this.start+1]=s[1],this.view[this.start+2]=s[0],this.start+=3}appendView(e){this.ensureCapacity(e.length),this.view.set(e,this.start),this.start+=e.length}getBlock(e){if(e<=0)return Buffer.alloc(0);if(this.start+e>this.view.length)throw new Error(\"request past end of buffer\");let r=this.view.subarray(this.start,this.start+e);return this.start+=e,r}getUint8(){return this.getBlock(1)[0]}getUint16(){let e=this.getBlock(2);return e[0]<<8|e[1]}ensureCapacity(e){if(this.start+e>this.view.byteLength){let r=t.BLOCK_SIZE+(e>t.BLOCK_SIZE?e:0);this.realloc(this.view.byteLength+r)}}realloc(e){let r=new ArrayBuffer(e),s=Buffer.from(r);s.set(this.view),this.buf=r,this.view=s}};rO.ByteStream=tO;tO.BLOCK_SIZE=1024});var nO=_(Vw=>{\"use strict\";Object.defineProperty(Vw,\"__esModule\",{value:!0});Vw.ASN1TypeError=Vw.ASN1ParseError=void 0;var KV=class extends Error{};Vw.ASN1ParseError=KV;var zV=class extends Error{};Vw.ASN1TypeError=zV});var pDe=_(iO=>{\"use strict\";Object.defineProperty(iO,\"__esModule\",{value:!0});iO.decodeLength=YIt;iO.encodeLength=VIt;var ADe=nO();function YIt(t){let e=t.getUint8();if(!(e&128))return e;let r=e&127;if(r>6)throw new ADe.ASN1ParseError(\"length exceeds 6 byte limit\");let s=0;for(let a=0;a<r;a++)s=s*256+t.getUint8();if(s===0)throw new ADe.ASN1ParseError(\"indefinite length encoding not supported\");return s}function VIt(t){if(t<128)return Buffer.from([t]);let e=BigInt(t),r=[];for(;e>0n;)r.unshift(Number(e&255n)),e=e>>8n;return Buffer.from([128|r.length,...r])}});var gDe=_(Cg=>{\"use strict\";Object.defineProperty(Cg,\"__esModule\",{value:!0});Cg.parseInteger=zIt;Cg.parseStringASCII=hDe;Cg.parseTime=XIt;Cg.parseOID=ZIt;Cg.parseBoolean=$It;Cg.parseBitString=eCt;var JIt=/^(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\.\\d{3})?Z$/,KIt=/^(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\.\\d{3})?Z$/;function zIt(t){let e=0,r=t.length,s=t[e],a=s>127,n=a?255:0;for(;s==n&&++e<r;)s=t[e];if(r-e===0)return BigInt(a?-1:0);s=a?s-256:s;let f=BigInt(s);for(let p=e+1;p<r;++p)f=f*BigInt(256)+BigInt(t[p]);return f}function hDe(t){return t.toString(\"ascii\")}function XIt(t,e){let r=hDe(t),s=e?JIt.exec(r):KIt.exec(r);if(!s)throw new Error(\"invalid time\");if(e){let a=Number(s[1]);a+=a>=50?1900:2e3,s[1]=a.toString()}return new Date(`${s[1]}-${s[2]}-${s[3]}T${s[4]}:${s[5]}:${s[6]}Z`)}function ZIt(t){let e=0,r=t.length,s=t[e++],a=Math.floor(s/40),n=s%40,c=`${a}.${n}`,f=0;for(;e<r;++e)s=t[e],f=(f<<7)+(s&127),s&128||(c+=`.${f}`,f=0);return c}function $It(t){return t[0]!==0}function eCt(t){let e=t[0],r=1,s=t.length,a=[];for(let n=r;n<s;++n){let c=t[n],f=n===s-1?e:0;for(let p=7;p>=f;--p)a.push(c>>p&1)}return a}});var mDe=_(sO=>{\"use strict\";Object.defineProperty(sO,\"__esModule\",{value:!0});sO.ASN1Tag=void 0;var dDe=nO(),ty={BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,OBJECT_IDENTIFIER:6,SEQUENCE:16,SET:17,PRINTABLE_STRING:19,UTC_TIME:23,GENERALIZED_TIME:24},XV={UNIVERSAL:0,APPLICATION:1,CONTEXT_SPECIFIC:2,PRIVATE:3},ZV=class{constructor(e){if(this.number=e&31,this.constructed=(e&32)===32,this.class=e>>6,this.number===31)throw new dDe.ASN1ParseError(\"long form tags not supported\");if(this.class===XV.UNIVERSAL&&this.number===0)throw new dDe.ASN1ParseError(\"unsupported tag 0x00\")}isUniversal(){return this.class===XV.UNIVERSAL}isContextSpecific(e){let r=this.class===XV.CONTEXT_SPECIFIC;return e!==void 0?r&&this.number===e:r}isBoolean(){return this.isUniversal()&&this.number===ty.BOOLEAN}isInteger(){return this.isUniversal()&&this.number===ty.INTEGER}isBitString(){return this.isUniversal()&&this.number===ty.BIT_STRING}isOctetString(){return this.isUniversal()&&this.number===ty.OCTET_STRING}isOID(){return this.isUniversal()&&this.number===ty.OBJECT_IDENTIFIER}isUTCTime(){return this.isUniversal()&&this.number===ty.UTC_TIME}isGeneralizedTime(){return this.isUniversal()&&this.number===ty.GENERALIZED_TIME}toDER(){return this.number|(this.constructed?32:0)|this.class<<6}};sO.ASN1Tag=ZV});var CDe=_(aO=>{\"use strict\";Object.defineProperty(aO,\"__esModule\",{value:!0});aO.ASN1Obj=void 0;var $V=Cb(),ry=nO(),EDe=pDe(),Jw=gDe(),tCt=mDe(),oO=class{constructor(e,r,s){this.tag=e,this.value=r,this.subs=s}static parseBuffer(e){return IDe(new $V.ByteStream(e))}toDER(){let e=new $V.ByteStream;if(this.subs.length>0)for(let a of this.subs)e.appendView(a.toDER());else e.appendView(this.value);let r=e.buffer,s=new $V.ByteStream;return s.appendChar(this.tag.toDER()),s.appendView((0,EDe.encodeLength)(r.length)),s.appendView(r),s.buffer}toBoolean(){if(!this.tag.isBoolean())throw new ry.ASN1TypeError(\"not a boolean\");return(0,Jw.parseBoolean)(this.value)}toInteger(){if(!this.tag.isInteger())throw new ry.ASN1TypeError(\"not an integer\");return(0,Jw.parseInteger)(this.value)}toOID(){if(!this.tag.isOID())throw new ry.ASN1TypeError(\"not an OID\");return(0,Jw.parseOID)(this.value)}toDate(){switch(!0){case this.tag.isUTCTime():return(0,Jw.parseTime)(this.value,!0);case this.tag.isGeneralizedTime():return(0,Jw.parseTime)(this.value,!1);default:throw new ry.ASN1TypeError(\"not a date\")}}toBitString(){if(!this.tag.isBitString())throw new ry.ASN1TypeError(\"not a bit string\");return(0,Jw.parseBitString)(this.value)}};aO.ASN1Obj=oO;function IDe(t){let e=new tCt.ASN1Tag(t.getUint8()),r=(0,EDe.decodeLength)(t),s=t.slice(t.position,r),a=t.position,n=[];if(e.constructed)n=yDe(t,r);else if(e.isOctetString())try{n=yDe(t,r)}catch{}return n.length===0&&t.seek(a+r),new oO(e,s,n)}function yDe(t,e){let r=t.position+e;if(r>t.length)throw new ry.ASN1ParseError(\"invalid length\");let s=[];for(;t.position<r;)s.push(IDe(t));if(t.position!==r)throw new ry.ASN1ParseError(\"invalid length\");return s}});var cO=_(lO=>{\"use strict\";Object.defineProperty(lO,\"__esModule\",{value:!0});lO.ASN1Obj=void 0;var rCt=CDe();Object.defineProperty(lO,\"ASN1Obj\",{enumerable:!0,get:function(){return rCt.ASN1Obj}})});var Kw=_(wg=>{\"use strict\";var nCt=wg&&wg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wg,\"__esModule\",{value:!0});wg.createPublicKey=iCt;wg.digest=sCt;wg.verify=oCt;wg.bufferEqual=aCt;var wb=nCt(Ie(\"crypto\"));function iCt(t,e=\"spki\"){return typeof t==\"string\"?wb.default.createPublicKey(t):wb.default.createPublicKey({key:t,format:\"der\",type:e})}function sCt(t,...e){let r=wb.default.createHash(t);for(let s of e)r.update(s);return r.digest()}function oCt(t,e,r,s){try{return wb.default.verify(s,t,e,r)}catch{return!1}}function aCt(t,e){try{return wb.default.timingSafeEqual(t,e)}catch{return!1}}});var wDe=_(e7=>{\"use strict\";Object.defineProperty(e7,\"__esModule\",{value:!0});e7.preAuthEncoding=cCt;var lCt=\"DSSEv1\";function cCt(t,e){let r=[lCt,t.length,t,e.length,\"\"].join(\" \");return Buffer.concat([Buffer.from(r,\"ascii\"),e])}});var SDe=_(uO=>{\"use strict\";Object.defineProperty(uO,\"__esModule\",{value:!0});uO.base64Encode=uCt;uO.base64Decode=fCt;var BDe=\"base64\",vDe=\"utf-8\";function uCt(t){return Buffer.from(t,vDe).toString(BDe)}function fCt(t){return Buffer.from(t,BDe).toString(vDe)}});var DDe=_(r7=>{\"use strict\";Object.defineProperty(r7,\"__esModule\",{value:!0});r7.canonicalize=t7;function t7(t){let e=\"\";if(t===null||typeof t!=\"object\"||t.toJSON!=null)e+=JSON.stringify(t);else if(Array.isArray(t)){e+=\"[\";let r=!0;t.forEach(s=>{r||(e+=\",\"),r=!1,e+=t7(s)}),e+=\"]\"}else{e+=\"{\";let r=!0;Object.keys(t).sort().forEach(s=>{r||(e+=\",\"),r=!1,e+=JSON.stringify(s),e+=\":\",e+=t7(t[s])}),e+=\"}\"}return e}});var n7=_(fO=>{\"use strict\";Object.defineProperty(fO,\"__esModule\",{value:!0});fO.toDER=hCt;fO.fromDER=gCt;var ACt=/-----BEGIN (.*)-----/,pCt=/-----END (.*)-----/;function hCt(t){let e=\"\";return t.split(`\n`).forEach(r=>{r.match(ACt)||r.match(pCt)||(e+=r)}),Buffer.from(e,\"base64\")}function gCt(t,e=\"CERTIFICATE\"){let s=t.toString(\"base64\").match(/.{1,64}/g)||\"\";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(`\n`).concat(`\n`)}});var AO=_(zw=>{\"use strict\";Object.defineProperty(zw,\"__esModule\",{value:!0});zw.SHA2_HASH_ALGOS=zw.ECDSA_SIGNATURE_ALGOS=void 0;zw.ECDSA_SIGNATURE_ALGOS={\"1.2.840.10045.4.3.1\":\"sha224\",\"1.2.840.10045.4.3.2\":\"sha256\",\"1.2.840.10045.4.3.3\":\"sha384\",\"1.2.840.10045.4.3.4\":\"sha512\"};zw.SHA2_HASH_ALGOS={\"2.16.840.1.101.3.4.2.1\":\"sha256\",\"2.16.840.1.101.3.4.2.2\":\"sha384\",\"2.16.840.1.101.3.4.2.3\":\"sha512\"}});var s7=_(pO=>{\"use strict\";Object.defineProperty(pO,\"__esModule\",{value:!0});pO.RFC3161TimestampVerificationError=void 0;var i7=class extends Error{};pO.RFC3161TimestampVerificationError=i7});var PDe=_(vA=>{\"use strict\";var dCt=vA&&vA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),mCt=vA&&vA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yCt=vA&&vA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&dCt(e,t,r);return mCt(e,t),e};Object.defineProperty(vA,\"__esModule\",{value:!0});vA.TSTInfo=void 0;var bDe=yCt(Kw()),ECt=AO(),ICt=s7(),o7=class{constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return ECt.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=bDe.digest(this.messageImprintHashAlgorithm,e);if(!bDe.bufferEqual(r,this.messageImprintHashedMessage))throw new ICt.RFC3161TimestampVerificationError(\"message imprint does not match artifact\")}get messageImprintObj(){return this.root.subs[2]}};vA.TSTInfo=o7});var kDe=_(SA=>{\"use strict\";var CCt=SA&&SA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),wCt=SA&&SA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),BCt=SA&&SA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&CCt(e,t,r);return wCt(e,t),e};Object.defineProperty(SA,\"__esModule\",{value:!0});SA.RFC3161Timestamp=void 0;var vCt=cO(),a7=BCt(Kw()),xDe=AO(),Bb=s7(),SCt=PDe(),DCt=\"1.2.840.113549.1.7.2\",bCt=\"1.2.840.113549.1.9.16.1.4\",PCt=\"1.2.840.113549.1.9.4\",l7=class t{constructor(e){this.root=e}static parse(e){let r=vCt.ASN1Obj.parseBuffer(e);return new t(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return xDe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return xDe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new SCt.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new Bb.RFC3161TimestampVerificationError(\"timeStampToken is missing\");if(this.contentType!==DCt)throw new Bb.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==bCt)throw new Bb.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=a7.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!a7.bufferEqual(e,r))throw new Bb.RFC3161TimestampVerificationError(\"signed data does not match tstInfo\")}verifySignature(e){let r=this.signedAttrsObj.toDER();if(r[0]=49,!a7.verify(r,e,this.signatureValue,this.signatureAlgorithm))throw new Bb.RFC3161TimestampVerificationError(\"signature verification failed\")}get pkiStatusInfoObj(){return this.root.subs[0]}get timeStampTokenObj(){return this.root.subs[1]}get contentTypeObj(){return this.timeStampTokenObj.subs[0]}get signedDataObj(){return this.timeStampTokenObj.subs.find(r=>r.tag.isContextSpecific(0)).subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){let e=this.signedDataObj;return e.subs[e.subs.length-1]}get signerInfoObj(){return this.signerInfosObj.subs[0]}get eContentTypeObj(){return this.encapContentInfoObj.subs[0]}get eContentObj(){return this.encapContentInfoObj.subs[1]}get signedAttrsObj(){return this.signerInfoObj.subs.find(r=>r.tag.isContextSpecific(0))}get messageDigestAttributeObj(){return this.signedAttrsObj.subs.find(r=>r.subs[0].tag.isOID()&&r.subs[0].toOID()===PCt)}get signerSidObj(){return this.signerInfoObj.subs[1]}get signerDigestAlgorithmObj(){return this.signerInfoObj.subs[2]}get signatureAlgorithmObj(){return this.signerInfoObj.subs[4]}get signatureValueObj(){return this.signerInfoObj.subs[5]}};SA.RFC3161Timestamp=l7});var QDe=_(hO=>{\"use strict\";Object.defineProperty(hO,\"__esModule\",{value:!0});hO.RFC3161Timestamp=void 0;var xCt=kDe();Object.defineProperty(hO,\"RFC3161Timestamp\",{enumerable:!0,get:function(){return xCt.RFC3161Timestamp}})});var RDe=_(DA=>{\"use strict\";var kCt=DA&&DA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),QCt=DA&&DA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),TCt=DA&&DA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&kCt(e,t,r);return QCt(e,t),e};Object.defineProperty(DA,\"__esModule\",{value:!0});DA.SignedCertificateTimestamp=void 0;var RCt=TCt(Kw()),TDe=Cb(),c7=class t{constructor(e){this.version=e.version,this.logID=e.logID,this.timestamp=e.timestamp,this.extensions=e.extensions,this.hashAlgorithm=e.hashAlgorithm,this.signatureAlgorithm=e.signatureAlgorithm,this.signature=e.signature}get datetime(){return new Date(Number(this.timestamp.readBigInt64BE()))}get algorithm(){switch(this.hashAlgorithm){case 0:return\"none\";case 1:return\"md5\";case 2:return\"sha1\";case 3:return\"sha224\";case 4:return\"sha256\";case 5:return\"sha384\";case 6:return\"sha512\";default:return\"unknown\"}}verify(e,r){let s=new TDe.ByteStream;return s.appendChar(this.version),s.appendChar(0),s.appendView(this.timestamp),s.appendUint16(1),s.appendView(e),s.appendUint16(this.extensions.byteLength),this.extensions.byteLength>0&&s.appendView(this.extensions),RCt.verify(s.buffer,r,this.signature,this.algorithm)}static parse(e){let r=new TDe.ByteStream(e),s=r.getUint8(),a=r.getBlock(32),n=r.getBlock(8),c=r.getUint16(),f=r.getBlock(c),p=r.getUint8(),h=r.getUint8(),E=r.getUint16(),C=r.getBlock(E);if(r.position!==e.length)throw new Error(\"SCT buffer length mismatch\");return new t({version:s,logID:a,timestamp:n,extensions:f,hashAlgorithm:p,signatureAlgorithm:h,signature:C})}};DA.SignedCertificateTimestamp=c7});var d7=_(sa=>{\"use strict\";Object.defineProperty(sa,\"__esModule\",{value:!0});sa.X509SCTExtension=sa.X509SubjectKeyIDExtension=sa.X509AuthorityKeyIDExtension=sa.X509SubjectAlternativeNameExtension=sa.X509KeyUsageExtension=sa.X509BasicConstraintsExtension=sa.X509Extension=void 0;var FCt=Cb(),NCt=RDe(),ph=class{constructor(e){this.root=e}get oid(){return this.root.subs[0].toOID()}get critical(){return this.root.subs.length===3?this.root.subs[1].toBoolean():!1}get value(){return this.extnValueObj.value}get valueObj(){return this.extnValueObj}get extnValueObj(){return this.root.subs[this.root.subs.length-1]}};sa.X509Extension=ph;var u7=class extends ph{get isCA(){return this.sequence.subs[0]?.toBoolean()??!1}get pathLenConstraint(){return this.sequence.subs.length>1?this.sequence.subs[1].toInteger():void 0}get sequence(){return this.extnValueObj.subs[0]}};sa.X509BasicConstraintsExtension=u7;var f7=class extends ph{get digitalSignature(){return this.bitString[0]===1}get keyCertSign(){return this.bitString[5]===1}get crlSign(){return this.bitString[6]===1}get bitString(){return this.extnValueObj.subs[0].toBitString()}};sa.X509KeyUsageExtension=f7;var A7=class extends ph{get rfc822Name(){return this.findGeneralName(1)?.value.toString(\"ascii\")}get uri(){return this.findGeneralName(6)?.value.toString(\"ascii\")}otherName(e){let r=this.findGeneralName(0);return r===void 0||r.subs[0].toOID()!==e?void 0:r.subs[1].subs[0].value.toString(\"ascii\")}findGeneralName(e){return this.generalNames.find(r=>r.tag.isContextSpecific(e))}get generalNames(){return this.extnValueObj.subs[0].subs}};sa.X509SubjectAlternativeNameExtension=A7;var p7=class extends ph{get keyIdentifier(){return this.findSequenceMember(0)?.value}findSequenceMember(e){return this.sequence.subs.find(r=>r.tag.isContextSpecific(e))}get sequence(){return this.extnValueObj.subs[0]}};sa.X509AuthorityKeyIDExtension=p7;var h7=class extends ph{get keyIdentifier(){return this.extnValueObj.subs[0].value}};sa.X509SubjectKeyIDExtension=h7;var g7=class extends ph{constructor(e){super(e)}get signedCertificateTimestamps(){let e=this.extnValueObj.subs[0].value,r=new FCt.ByteStream(e),s=r.getUint16()+2,a=[];for(;r.position<s;){let n=r.getUint16(),c=r.getBlock(n);a.push(NCt.SignedCertificateTimestamp.parse(c))}if(r.position!==s)throw new Error(\"SCT list length does not match actual length\");return a}};sa.X509SCTExtension=g7});var ODe=_(ic=>{\"use strict\";var OCt=ic&&ic.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),LCt=ic&&ic.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NDe=ic&&ic.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&OCt(e,t,r);return LCt(e,t),e};Object.defineProperty(ic,\"__esModule\",{value:!0});ic.X509Certificate=ic.EXTENSION_OID_SCT=void 0;var MCt=cO(),FDe=NDe(Kw()),UCt=AO(),_Ct=NDe(n7()),ny=d7(),HCt=\"2.5.29.14\",jCt=\"2.5.29.15\",GCt=\"2.5.29.17\",qCt=\"2.5.29.19\",WCt=\"2.5.29.35\";ic.EXTENSION_OID_SCT=\"1.3.6.1.4.1.11129.2.4.2\";var m7=class t{constructor(e){this.root=e}static parse(e){let r=typeof e==\"string\"?_Ct.toDER(e):e,s=MCt.ASN1Obj.parseBuffer(r);return new t(s)}get tbsCertificate(){return this.tbsCertificateObj}get version(){return`v${(this.versionObj.subs[0].toInteger()+BigInt(1)).toString()}`}get serialNumber(){return this.serialNumberObj.value}get notBefore(){return this.validityObj.subs[0].toDate()}get notAfter(){return this.validityObj.subs[1].toDate()}get issuer(){return this.issuerObj.value}get subject(){return this.subjectObj.value}get publicKey(){return this.subjectPublicKeyInfoObj.toDER()}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return UCt.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value.subarray(1)}get subjectAltName(){let e=this.extSubjectAltName;return e?.uri||e?.rfc822Name}get extensions(){return this.extensionsObj?.subs[0]?.subs||[]}get extKeyUsage(){let e=this.findExtension(jCt);return e?new ny.X509KeyUsageExtension(e):void 0}get extBasicConstraints(){let e=this.findExtension(qCt);return e?new ny.X509BasicConstraintsExtension(e):void 0}get extSubjectAltName(){let e=this.findExtension(GCt);return e?new ny.X509SubjectAlternativeNameExtension(e):void 0}get extAuthorityKeyID(){let e=this.findExtension(WCt);return e?new ny.X509AuthorityKeyIDExtension(e):void 0}get extSubjectKeyID(){let e=this.findExtension(HCt);return e?new ny.X509SubjectKeyIDExtension(e):void 0}get extSCT(){let e=this.findExtension(ic.EXTENSION_OID_SCT);return e?new ny.X509SCTExtension(e):void 0}get isCA(){let e=this.extBasicConstraints?.isCA||!1;return this.extKeyUsage?e&&this.extKeyUsage.keyCertSign:e}extension(e){let r=this.findExtension(e);return r?new ny.X509Extension(r):void 0}verify(e){let r=e?.publicKey||this.publicKey,s=FDe.createPublicKey(r);return FDe.verify(this.tbsCertificate.toDER(),s,this.signatureValue,this.signatureAlgorithm)}validForDate(e){return this.notBefore<=e&&e<=this.notAfter}equals(e){return this.root.toDER().equals(e.root.toDER())}clone(){let e=this.root.toDER(),r=Buffer.alloc(e.length);return e.copy(r),t.parse(r)}findExtension(e){return this.extensions.find(r=>r.subs[0].toOID()===e)}get tbsCertificateObj(){return this.root.subs[0]}get signatureAlgorithmObj(){return this.root.subs[1]}get signatureValueObj(){return this.root.subs[2]}get versionObj(){return this.tbsCertificateObj.subs[0]}get serialNumberObj(){return this.tbsCertificateObj.subs[1]}get issuerObj(){return this.tbsCertificateObj.subs[3]}get validityObj(){return this.tbsCertificateObj.subs[4]}get subjectObj(){return this.tbsCertificateObj.subs[5]}get subjectPublicKeyInfoObj(){return this.tbsCertificateObj.subs[6]}get extensionsObj(){return this.tbsCertificateObj.subs.find(e=>e.tag.isContextSpecific(3))}};ic.X509Certificate=m7});var MDe=_(Bg=>{\"use strict\";Object.defineProperty(Bg,\"__esModule\",{value:!0});Bg.X509SCTExtension=Bg.X509Certificate=Bg.EXTENSION_OID_SCT=void 0;var LDe=ODe();Object.defineProperty(Bg,\"EXTENSION_OID_SCT\",{enumerable:!0,get:function(){return LDe.EXTENSION_OID_SCT}});Object.defineProperty(Bg,\"X509Certificate\",{enumerable:!0,get:function(){return LDe.X509Certificate}});var YCt=d7();Object.defineProperty(Bg,\"X509SCTExtension\",{enumerable:!0,get:function(){return YCt.X509SCTExtension}})});var Cl=_(Jn=>{\"use strict\";var VCt=Jn&&Jn.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),JCt=Jn&&Jn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vb=Jn&&Jn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&VCt(e,t,r);return JCt(e,t),e};Object.defineProperty(Jn,\"__esModule\",{value:!0});Jn.X509SCTExtension=Jn.X509Certificate=Jn.EXTENSION_OID_SCT=Jn.ByteStream=Jn.RFC3161Timestamp=Jn.pem=Jn.json=Jn.encoding=Jn.dsse=Jn.crypto=Jn.ASN1Obj=void 0;var KCt=cO();Object.defineProperty(Jn,\"ASN1Obj\",{enumerable:!0,get:function(){return KCt.ASN1Obj}});Jn.crypto=vb(Kw());Jn.dsse=vb(wDe());Jn.encoding=vb(SDe());Jn.json=vb(DDe());Jn.pem=vb(n7());var zCt=QDe();Object.defineProperty(Jn,\"RFC3161Timestamp\",{enumerable:!0,get:function(){return zCt.RFC3161Timestamp}});var XCt=Cb();Object.defineProperty(Jn,\"ByteStream\",{enumerable:!0,get:function(){return XCt.ByteStream}});var y7=MDe();Object.defineProperty(Jn,\"EXTENSION_OID_SCT\",{enumerable:!0,get:function(){return y7.EXTENSION_OID_SCT}});Object.defineProperty(Jn,\"X509Certificate\",{enumerable:!0,get:function(){return y7.X509Certificate}});Object.defineProperty(Jn,\"X509SCTExtension\",{enumerable:!0,get:function(){return y7.X509SCTExtension}})});var UDe=_(E7=>{\"use strict\";Object.defineProperty(E7,\"__esModule\",{value:!0});E7.extractJWTSubject=$Ct;var ZCt=Cl();function $Ct(t){let e=t.split(\".\",3),r=JSON.parse(ZCt.encoding.base64Decode(e[1]));switch(r.iss){case\"https://accounts.google.com\":case\"https://oauth2.sigstore.dev/auth\":return r.email;default:return r.sub}}});var _De=_((dnr,ewt)=>{ewt.exports={name:\"@sigstore/sign\",version:\"3.1.0\",description:\"Sigstore signing library\",main:\"dist/index.js\",types:\"dist/index.d.ts\",scripts:{clean:\"shx rm -rf dist *.tsbuildinfo\",build:\"tsc --build\",test:\"jest\"},files:[\"dist\"],author:\"bdehamer@github.com\",license:\"Apache-2.0\",repository:{type:\"git\",url:\"git+https://github.com/sigstore/sigstore-js.git\"},bugs:{url:\"https://github.com/sigstore/sigstore-js/issues\"},homepage:\"https://github.com/sigstore/sigstore-js/tree/main/packages/sign#readme\",publishConfig:{provenance:!0},devDependencies:{\"@sigstore/jest\":\"^0.0.0\",\"@sigstore/mock\":\"^0.10.0\",\"@sigstore/rekor-types\":\"^3.0.0\",\"@types/make-fetch-happen\":\"^10.0.4\",\"@types/promise-retry\":\"^1.1.6\"},dependencies:{\"@sigstore/bundle\":\"^3.1.0\",\"@sigstore/core\":\"^2.0.0\",\"@sigstore/protobuf-specs\":\"^0.4.0\",\"make-fetch-happen\":\"^14.0.2\",\"proc-log\":\"^5.0.0\",\"promise-retry\":\"^2.0.1\"},engines:{node:\"^18.17.0 || >=20.5.0\"}}});var jDe=_(Xw=>{\"use strict\";var twt=Xw&&Xw.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xw,\"__esModule\",{value:!0});Xw.getUserAgent=void 0;var HDe=twt(Ie(\"os\")),rwt=()=>{let t=_De().version,e=process.version,r=HDe.default.platform(),s=HDe.default.arch();return`sigstore-js/${t} (Node ${e}) (${r}/${s})`};Xw.getUserAgent=rwt});var vg=_(Ji=>{\"use strict\";var nwt=Ji&&Ji.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),iwt=Ji&&Ji.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),GDe=Ji&&Ji.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a<s.length;a++)s[a]!==\"default\"&&nwt(r,e,s[a]);return iwt(r,e),r}}();Object.defineProperty(Ji,\"__esModule\",{value:!0});Ji.ua=Ji.oidc=Ji.pem=Ji.json=Ji.encoding=Ji.dsse=Ji.crypto=void 0;var Sb=Cl();Object.defineProperty(Ji,\"crypto\",{enumerable:!0,get:function(){return Sb.crypto}});Object.defineProperty(Ji,\"dsse\",{enumerable:!0,get:function(){return Sb.dsse}});Object.defineProperty(Ji,\"encoding\",{enumerable:!0,get:function(){return Sb.encoding}});Object.defineProperty(Ji,\"json\",{enumerable:!0,get:function(){return Sb.json}});Object.defineProperty(Ji,\"pem\",{enumerable:!0,get:function(){return Sb.pem}});Ji.oidc=GDe(UDe());Ji.ua=GDe(jDe())});var C7=_(gO=>{\"use strict\";Object.defineProperty(gO,\"__esModule\",{value:!0});gO.BaseBundleBuilder=void 0;var I7=class{constructor(e){this.signer=e.signer,this.witnesses=e.witnesses}async create(e){let r=await this.prepare(e).then(f=>this.signer.sign(f)),s=await this.package(e,r),a=await Promise.all(this.witnesses.map(f=>f.testify(s.content,swt(r.key)))),n=[],c=[];return a.forEach(({tlogEntries:f,rfc3161Timestamps:p})=>{n.push(...f??[]),c.push(...p??[])}),s.verificationMaterial.tlogEntries=n,s.verificationMaterial.timestampVerificationData={rfc3161Timestamps:c},s}async prepare(e){return e.data}};gO.BaseBundleBuilder=I7;function swt(t){switch(t.$case){case\"publicKey\":return t.publicKey;case\"x509Certificate\":return t.certificate}}});var B7=_(bA=>{\"use strict\";var owt=bA&&bA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),awt=bA&&bA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lwt=bA&&bA.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a<s.length;a++)s[a]!==\"default\"&&owt(r,e,s[a]);return awt(r,e),r}}();Object.defineProperty(bA,\"__esModule\",{value:!0});bA.toMessageSignatureBundle=cwt;bA.toDSSEBundle=uwt;var qDe=lwt(Ib()),w7=vg();function cwt(t,e){let r=w7.crypto.digest(\"sha256\",t.data);return qDe.toMessageSignatureBundle({digest:r,signature:e.signature,certificate:e.key.$case===\"x509Certificate\"?w7.pem.toDER(e.key.certificate):void 0,keyHint:e.key.$case===\"publicKey\"?e.key.hint:void 0,certificateChain:!0})}function uwt(t,e,r){return qDe.toDSSEBundle({artifact:t.data,artifactType:t.type,signature:e.signature,certificate:e.key.$case===\"x509Certificate\"?w7.pem.toDER(e.key.certificate):void 0,keyHint:e.key.$case===\"publicKey\"?e.key.hint:void 0,certificateChain:r})}});var YDe=_(dO=>{\"use strict\";Object.defineProperty(dO,\"__esModule\",{value:!0});dO.DSSEBundleBuilder=void 0;var fwt=vg(),Awt=C7(),pwt=B7(),v7=class extends Awt.BaseBundleBuilder{constructor(e){super(e),this.certificateChain=e.certificateChain??!1}async prepare(e){let r=WDe(e);return fwt.dsse.preAuthEncoding(r.type,r.data)}async package(e,r){return(0,pwt.toDSSEBundle)(WDe(e),r,this.certificateChain)}};dO.DSSEBundleBuilder=v7;function WDe(t){return{...t,type:t.type??\"\"}}});var VDe=_(mO=>{\"use strict\";Object.defineProperty(mO,\"__esModule\",{value:!0});mO.MessageSignatureBundleBuilder=void 0;var hwt=C7(),gwt=B7(),S7=class extends hwt.BaseBundleBuilder{constructor(e){super(e)}async package(e,r){return(0,gwt.toMessageSignatureBundle)(e,r)}};mO.MessageSignatureBundleBuilder=S7});var JDe=_(Zw=>{\"use strict\";Object.defineProperty(Zw,\"__esModule\",{value:!0});Zw.MessageSignatureBundleBuilder=Zw.DSSEBundleBuilder=void 0;var dwt=YDe();Object.defineProperty(Zw,\"DSSEBundleBuilder\",{enumerable:!0,get:function(){return dwt.DSSEBundleBuilder}});var mwt=VDe();Object.defineProperty(Zw,\"MessageSignatureBundleBuilder\",{enumerable:!0,get:function(){return mwt.MessageSignatureBundleBuilder}})});var EO=_(yO=>{\"use strict\";Object.defineProperty(yO,\"__esModule\",{value:!0});yO.HTTPError=void 0;var D7=class extends Error{constructor({status:e,message:r,location:s}){super(`(${e}) ${r}`),this.statusCode=e,this.location=s}};yO.HTTPError=D7});var $w=_(Db=>{\"use strict\";Object.defineProperty(Db,\"__esModule\",{value:!0});Db.InternalError=void 0;Db.internalError=Ewt;var ywt=EO(),IO=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.name=this.constructor.name,this.cause=s,this.code=e}};Db.InternalError=IO;function Ewt(t,e,r){throw t instanceof ywt.HTTPError&&(r+=` - ${t.message}`),new IO({code:e,message:r,cause:t})}});var CO=_((Dnr,KDe)=>{KDe.exports=fetch});var zDe=_(e1=>{\"use strict\";var Iwt=e1&&e1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e1,\"__esModule\",{value:!0});e1.CIContextProvider=void 0;var Cwt=Iwt(CO()),wwt=[Bwt,vwt],b7=class{constructor(e=\"sigstore\"){this.audience=e}async getToken(){return Promise.any(wwt.map(e=>e(this.audience))).catch(()=>Promise.reject(\"CI: no tokens available\"))}};e1.CIContextProvider=b7;async function Bwt(t){if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL||!process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN)return Promise.reject(\"no token available\");let e=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);return e.searchParams.append(\"audience\",t),(await(0,Cwt.default)(e.href,{retry:2,headers:{Accept:\"application/json\",Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).json().then(s=>s.value)}async function vwt(){return process.env.SIGSTORE_ID_TOKEN?process.env.SIGSTORE_ID_TOKEN:Promise.reject(\"no token available\")}});var XDe=_(wO=>{\"use strict\";Object.defineProperty(wO,\"__esModule\",{value:!0});wO.CIContextProvider=void 0;var Swt=zDe();Object.defineProperty(wO,\"CIContextProvider\",{enumerable:!0,get:function(){return Swt.CIContextProvider}})});var $De=_((xnr,ZDe)=>{var Dwt=Symbol(\"proc-log.meta\");ZDe.exports={META:Dwt,output:{LEVELS:[\"standard\",\"error\",\"buffer\",\"flush\"],KEYS:{standard:\"standard\",error:\"error\",buffer:\"buffer\",flush:\"flush\"},standard:function(...t){return process.emit(\"output\",\"standard\",...t)},error:function(...t){return process.emit(\"output\",\"error\",...t)},buffer:function(...t){return process.emit(\"output\",\"buffer\",...t)},flush:function(...t){return process.emit(\"output\",\"flush\",...t)}},log:{LEVELS:[\"notice\",\"error\",\"warn\",\"info\",\"verbose\",\"http\",\"silly\",\"timing\",\"pause\",\"resume\"],KEYS:{notice:\"notice\",error:\"error\",warn:\"warn\",info:\"info\",verbose:\"verbose\",http:\"http\",silly:\"silly\",timing:\"timing\",pause:\"pause\",resume:\"resume\"},error:function(...t){return process.emit(\"log\",\"error\",...t)},notice:function(...t){return process.emit(\"log\",\"notice\",...t)},warn:function(...t){return process.emit(\"log\",\"warn\",...t)},info:function(...t){return process.emit(\"log\",\"info\",...t)},verbose:function(...t){return process.emit(\"log\",\"verbose\",...t)},http:function(...t){return process.emit(\"log\",\"http\",...t)},silly:function(...t){return process.emit(\"log\",\"silly\",...t)},timing:function(...t){return process.emit(\"log\",\"timing\",...t)},pause:function(){return process.emit(\"log\",\"pause\")},resume:function(){return process.emit(\"log\",\"resume\")}},time:{LEVELS:[\"start\",\"end\"],KEYS:{start:\"start\",end:\"end\"},start:function(t,e){process.emit(\"time\",\"start\",t);function r(){return process.emit(\"time\",\"end\",t)}if(typeof e==\"function\"){let s=e();return s&&s.finally?s.finally(r):(r(),s)}return r},end:function(t){return process.emit(\"time\",\"end\",t)}},input:{LEVELS:[\"start\",\"end\",\"read\"],KEYS:{start:\"start\",end:\"end\",read:\"read\"},start:function(t){process.emit(\"input\",\"start\");function e(){return process.emit(\"input\",\"end\")}if(typeof t==\"function\"){let r=t();return r&&r.finally?r.finally(e):(e(),r)}return e},end:function(){return process.emit(\"input\",\"end\")},read:function(...t){let e,r,s=new Promise((a,n)=>{e=a,r=n});return process.emit(\"input\",\"read\",e,r,...t),s}}}});var rbe=_((knr,tbe)=>{\"use strict\";function ebe(t,e){for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!0,configurable:!0});return t}function bwt(t,e,r){if(!t||typeof t==\"string\")throw new TypeError(\"Please pass an Error to err-code\");r||(r={}),typeof e==\"object\"&&(r=e,e=void 0),e!=null&&(r.code=e);try{return ebe(t,r)}catch{r.message=t.message,r.stack=t.stack;let a=function(){};return a.prototype=Object.create(Object.getPrototypeOf(t)),ebe(new a,r)}}tbe.exports=bwt});var ibe=_((Qnr,nbe)=>{function $c(t,e){typeof e==\"boolean\"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}nbe.exports=$c;$c.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};$c.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};$c.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error(\"RetryOperation timeout occurred\")),!1;this._errors.push(t);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift();else return!1;var s=this,a=setTimeout(function(){s._attempts++,s._operationTimeoutCb&&(s._timeout=setTimeout(function(){s._operationTimeoutCb(s._attempts)},s._operationTimeout),s._options.unref&&s._timeout.unref()),s._fn(s._attempts)},r);return this._options.unref&&a.unref(),!0};$c.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};$c.prototype.try=function(t){console.log(\"Using RetryOperation.try() is deprecated\"),this.attempt(t)};$c.prototype.start=function(t){console.log(\"Using RetryOperation.start() is deprecated\"),this.attempt(t)};$c.prototype.start=$c.prototype.try;$c.prototype.errors=function(){return this._errors};$c.prototype.attempts=function(){return this._attempts};$c.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,r=0,s=0;s<this._errors.length;s++){var a=this._errors[s],n=a.message,c=(t[n]||0)+1;t[n]=c,c>=r&&(e=a,r=c)}return e}});var sbe=_(iy=>{var Pwt=ibe();iy.operation=function(t){var e=iy.timeouts(t);return new Pwt(e,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};iy.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error(\"minTimeout is greater than maxTimeout\");for(var s=[],a=0;a<e.retries;a++)s.push(this.createTimeout(a,e));return t&&t.forever&&!s.length&&s.push(this.createTimeout(a,e)),s.sort(function(n,c){return n-c}),s};iy.createTimeout=function(t,e){var r=e.randomize?Math.random()+1:1,s=Math.round(r*e.minTimeout*Math.pow(e.factor,t));return s=Math.min(s,e.maxTimeout),s};iy.wrap=function(t,e,r){if(e instanceof Array&&(r=e,e=null),!r){r=[];for(var s in t)typeof t[s]==\"function\"&&r.push(s)}for(var a=0;a<r.length;a++){var n=r[a],c=t[n];t[n]=function(p){var h=iy.operation(e),E=Array.prototype.slice.call(arguments,1),C=E.pop();E.push(function(S){h.retry(S)||(S&&(arguments[0]=h.mainError()),C.apply(this,arguments))}),h.attempt(function(){p.apply(t,E)})}.bind(t,c),t[n].options=e}}});var abe=_((Rnr,obe)=>{obe.exports=sbe()});var ube=_((Fnr,cbe)=>{\"use strict\";var xwt=rbe(),kwt=abe(),Qwt=Object.prototype.hasOwnProperty;function lbe(t){return t&&t.code===\"EPROMISERETRY\"&&Qwt.call(t,\"retried\")}function Twt(t,e){var r,s;return typeof t==\"object\"&&typeof e==\"function\"&&(r=e,e=t,t=r),s=kwt.operation(e),new Promise(function(a,n){s.attempt(function(c){Promise.resolve().then(function(){return t(function(f){throw lbe(f)&&(f=f.retried),xwt(new Error(\"Retrying\"),\"EPROMISERETRY\",{retried:f})},c)}).then(a,function(f){lbe(f)&&(f=f.retried,s.retry(f||new Error))||n(f)})})})}cbe.exports=Twt});var BO=_(bb=>{\"use strict\";var Abe=bb&&bb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bb,\"__esModule\",{value:!0});bb.fetchWithRetry=qwt;var Rwt=Ie(\"http2\"),Fwt=Abe(CO()),fbe=$De(),Nwt=Abe(ube()),Owt=vg(),Lwt=EO(),{HTTP2_HEADER_LOCATION:Mwt,HTTP2_HEADER_CONTENT_TYPE:Uwt,HTTP2_HEADER_USER_AGENT:_wt,HTTP_STATUS_INTERNAL_SERVER_ERROR:Hwt,HTTP_STATUS_TOO_MANY_REQUESTS:jwt,HTTP_STATUS_REQUEST_TIMEOUT:Gwt}=Rwt.constants;async function qwt(t,e){return(0,Nwt.default)(async(r,s)=>{let a=e.method||\"POST\",n={[_wt]:Owt.ua.getUserAgent(),...e.headers},c=await(0,Fwt.default)(t,{method:a,headers:n,body:e.body,timeout:e.timeout,retry:!1}).catch(f=>(fbe.log.http(\"fetch\",`${a} ${t} attempt ${s} failed with ${f}`),r(f)));if(c.ok)return c;{let f=await Wwt(c);if(fbe.log.http(\"fetch\",`${a} ${t} attempt ${s} failed with ${c.status}`),Ywt(c.status))return r(f);throw f}},Vwt(e.retry))}var Wwt=async t=>{let e=t.statusText,r=t.headers.get(Mwt)||void 0;if(t.headers.get(Uwt)?.includes(\"application/json\"))try{e=(await t.json()).message||e}catch{}return new Lwt.HTTPError({status:t.status,message:e,location:r})},Ywt=t=>[Gwt,jwt].includes(t)||t>=Hwt,Vwt=t=>typeof t==\"boolean\"?{retries:t?1:0}:typeof t==\"number\"?{retries:t}:{retries:0,...t}});var pbe=_(vO=>{\"use strict\";Object.defineProperty(vO,\"__esModule\",{value:!0});vO.Fulcio=void 0;var Jwt=BO(),P7=class{constructor(e){this.options=e}async createSigningCertificate(e){let{baseURL:r,retry:s,timeout:a}=this.options,n=`${r}/api/v2/signingCert`;return(await(0,Jwt.fetchWithRetry)(n,{headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(e),timeout:a,retry:s})).json()}};vO.Fulcio=P7});var hbe=_(SO=>{\"use strict\";Object.defineProperty(SO,\"__esModule\",{value:!0});SO.CAClient=void 0;var Kwt=$w(),zwt=pbe(),x7=class{constructor(e){this.fulcio=new zwt.Fulcio({baseURL:e.fulcioBaseURL,retry:e.retry,timeout:e.timeout})}async createSigningCertificate(e,r,s){let a=Xwt(e,r,s);try{let n=await this.fulcio.createSigningCertificate(a);return(n.signedCertificateEmbeddedSct?n.signedCertificateEmbeddedSct:n.signedCertificateDetachedSct).chain.certificates}catch(n){(0,Kwt.internalError)(n,\"CA_CREATE_SIGNING_CERTIFICATE_ERROR\",\"error creating signing certificate\")}}};SO.CAClient=x7;function Xwt(t,e,r){return{credentials:{oidcIdentityToken:t},publicKeyRequest:{publicKey:{algorithm:\"ECDSA\",content:e},proofOfPossession:r.toString(\"base64\")}}}});var dbe=_(t1=>{\"use strict\";var Zwt=t1&&t1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t1,\"__esModule\",{value:!0});t1.EphemeralSigner=void 0;var gbe=Zwt(Ie(\"crypto\")),$wt=\"ec\",e1t=\"P-256\",k7=class{constructor(){this.keypair=gbe.default.generateKeyPairSync($wt,{namedCurve:e1t})}async sign(e){let r=gbe.default.sign(null,e,this.keypair.privateKey),s=this.keypair.publicKey.export({format:\"pem\",type:\"spki\"}).toString(\"ascii\");return{signature:r,key:{$case:\"publicKey\",publicKey:s}}}};t1.EphemeralSigner=k7});var mbe=_(sy=>{\"use strict\";Object.defineProperty(sy,\"__esModule\",{value:!0});sy.FulcioSigner=sy.DEFAULT_FULCIO_URL=void 0;var Q7=$w(),t1t=vg(),r1t=hbe(),n1t=dbe();sy.DEFAULT_FULCIO_URL=\"https://fulcio.sigstore.dev\";var T7=class{constructor(e){this.ca=new r1t.CAClient({...e,fulcioBaseURL:e.fulcioBaseURL||sy.DEFAULT_FULCIO_URL}),this.identityProvider=e.identityProvider,this.keyHolder=e.keyHolder||new n1t.EphemeralSigner}async sign(e){let r=await this.getIdentityToken(),s;try{s=t1t.oidc.extractJWTSubject(r)}catch(f){throw new Q7.InternalError({code:\"IDENTITY_TOKEN_PARSE_ERROR\",message:`invalid identity token: ${r}`,cause:f})}let a=await this.keyHolder.sign(Buffer.from(s));if(a.key.$case!==\"publicKey\")throw new Q7.InternalError({code:\"CA_CREATE_SIGNING_CERTIFICATE_ERROR\",message:\"unexpected format for signing key\"});let n=await this.ca.createSigningCertificate(r,a.key.publicKey,a.signature);return{signature:(await this.keyHolder.sign(e)).signature,key:{$case:\"x509Certificate\",certificate:n[0]}}}async getIdentityToken(){try{return await this.identityProvider.getToken()}catch(e){throw new Q7.InternalError({code:\"IDENTITY_TOKEN_READ_ERROR\",message:\"error retrieving identity token\",cause:e})}}};sy.FulcioSigner=T7});var Ebe=_(r1=>{\"use strict\";Object.defineProperty(r1,\"__esModule\",{value:!0});r1.FulcioSigner=r1.DEFAULT_FULCIO_URL=void 0;var ybe=mbe();Object.defineProperty(r1,\"DEFAULT_FULCIO_URL\",{enumerable:!0,get:function(){return ybe.DEFAULT_FULCIO_URL}});Object.defineProperty(r1,\"FulcioSigner\",{enumerable:!0,get:function(){return ybe.FulcioSigner}})});var wbe=_(DO=>{\"use strict\";Object.defineProperty(DO,\"__esModule\",{value:!0});DO.Rekor=void 0;var Ibe=BO(),R7=class{constructor(e){this.options=e}async createEntry(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/log/entries`,f=await(await(0,Ibe.fetchWithRetry)(n,{headers:{\"Content-Type\":\"application/json\",Accept:\"application/json\"},body:JSON.stringify(e),timeout:s,retry:a})).json();return Cbe(f)}async getEntry(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/log/entries/${e}`,f=await(await(0,Ibe.fetchWithRetry)(n,{method:\"GET\",headers:{Accept:\"application/json\"},timeout:s,retry:a})).json();return Cbe(f)}};DO.Rekor=R7;function Cbe(t){let e=Object.entries(t);if(e.length!=1)throw new Error(\"Received multiple entries in Rekor response\");let[r,s]=e[0];return{...s,uuid:r}}});var vbe=_(bO=>{\"use strict\";Object.defineProperty(bO,\"__esModule\",{value:!0});bO.TLogClient=void 0;var Bbe=$w(),i1t=EO(),s1t=wbe(),F7=class{constructor(e){this.fetchOnConflict=e.fetchOnConflict??!1,this.rekor=new s1t.Rekor({baseURL:e.rekorBaseURL,retry:e.retry,timeout:e.timeout})}async createEntry(e){let r;try{r=await this.rekor.createEntry(e)}catch(s){if(o1t(s)&&this.fetchOnConflict){let a=s.location.split(\"/\").pop()||\"\";try{r=await this.rekor.getEntry(a)}catch(n){(0,Bbe.internalError)(n,\"TLOG_FETCH_ENTRY_ERROR\",\"error fetching tlog entry\")}}else(0,Bbe.internalError)(s,\"TLOG_CREATE_ENTRY_ERROR\",\"error creating tlog entry\")}return r}};bO.TLogClient=F7;function o1t(t){return t instanceof i1t.HTTPError&&t.statusCode===409&&t.location!==void 0}});var Sbe=_(N7=>{\"use strict\";Object.defineProperty(N7,\"__esModule\",{value:!0});N7.toProposedEntry=l1t;var a1t=Ib(),Sg=vg(),Pb=\"sha256\";function l1t(t,e,r=\"dsse\"){switch(t.$case){case\"dsseEnvelope\":return r===\"intoto\"?f1t(t.dsseEnvelope,e):u1t(t.dsseEnvelope,e);case\"messageSignature\":return c1t(t.messageSignature,e)}}function c1t(t,e){let r=t.messageDigest.digest.toString(\"hex\"),s=t.signature.toString(\"base64\"),a=Sg.encoding.base64Encode(e);return{apiVersion:\"0.0.1\",kind:\"hashedrekord\",spec:{data:{hash:{algorithm:Pb,value:r}},signature:{content:s,publicKey:{content:a}}}}}function u1t(t,e){let r=JSON.stringify((0,a1t.envelopeToJSON)(t)),s=Sg.encoding.base64Encode(e);return{apiVersion:\"0.0.1\",kind:\"dsse\",spec:{proposedContent:{envelope:r,verifiers:[s]}}}}function f1t(t,e){let r=Sg.crypto.digest(Pb,t.payload).toString(\"hex\"),s=A1t(t,e),a=Sg.encoding.base64Encode(t.payload.toString(\"base64\")),n=Sg.encoding.base64Encode(t.signatures[0].sig.toString(\"base64\")),c=t.signatures[0].keyid,f=Sg.encoding.base64Encode(e),p={payloadType:t.payloadType,payload:a,signatures:[{sig:n,publicKey:f}]};return c.length>0&&(p.signatures[0].keyid=c),{apiVersion:\"0.0.2\",kind:\"intoto\",spec:{content:{envelope:p,hash:{algorithm:Pb,value:s},payloadHash:{algorithm:Pb,value:r}}}}}function A1t(t,e){let r={payloadType:t.payloadType,payload:t.payload.toString(\"base64\"),signatures:[{sig:t.signatures[0].sig.toString(\"base64\"),publicKey:e}]};return t.signatures[0].keyid.length>0&&(r.signatures[0].keyid=t.signatures[0].keyid),Sg.crypto.digest(Pb,Sg.json.canonicalize(r)).toString(\"hex\")}});var Dbe=_(oy=>{\"use strict\";Object.defineProperty(oy,\"__esModule\",{value:!0});oy.RekorWitness=oy.DEFAULT_REKOR_URL=void 0;var p1t=vg(),h1t=vbe(),g1t=Sbe();oy.DEFAULT_REKOR_URL=\"https://rekor.sigstore.dev\";var O7=class{constructor(e){this.entryType=e.entryType,this.tlog=new h1t.TLogClient({...e,rekorBaseURL:e.rekorBaseURL||oy.DEFAULT_REKOR_URL})}async testify(e,r){let s=(0,g1t.toProposedEntry)(e,r,this.entryType),a=await this.tlog.createEntry(s);return d1t(a)}};oy.RekorWitness=O7;function d1t(t){let e=Buffer.from(t.logID,\"hex\"),r=p1t.encoding.base64Decode(t.body),s=JSON.parse(r),a=t?.verification?.signedEntryTimestamp?m1t(t.verification.signedEntryTimestamp):void 0,n=t?.verification?.inclusionProof?y1t(t.verification.inclusionProof):void 0;return{tlogEntries:[{logIndex:t.logIndex.toString(),logId:{keyId:e},integratedTime:t.integratedTime.toString(),kindVersion:{kind:s.kind,version:s.apiVersion},inclusionPromise:a,inclusionProof:n,canonicalizedBody:Buffer.from(t.body,\"base64\")}]}}function m1t(t){return{signedEntryTimestamp:Buffer.from(t,\"base64\")}}function y1t(t){return{logIndex:t.logIndex.toString(),treeSize:t.treeSize.toString(),rootHash:Buffer.from(t.rootHash,\"hex\"),hashes:t.hashes.map(e=>Buffer.from(e,\"hex\")),checkpoint:{envelope:t.checkpoint}}}});var bbe=_(PO=>{\"use strict\";Object.defineProperty(PO,\"__esModule\",{value:!0});PO.TimestampAuthority=void 0;var E1t=BO(),L7=class{constructor(e){this.options=e}async createTimestamp(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/timestamp`;return(await(0,E1t.fetchWithRetry)(n,{headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(e),timeout:s,retry:a})).buffer()}};PO.TimestampAuthority=L7});var xbe=_(xO=>{\"use strict\";Object.defineProperty(xO,\"__esModule\",{value:!0});xO.TSAClient=void 0;var I1t=$w(),C1t=bbe(),w1t=vg(),Pbe=\"sha256\",M7=class{constructor(e){this.tsa=new C1t.TimestampAuthority({baseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async createTimestamp(e){let r={artifactHash:w1t.crypto.digest(Pbe,e).toString(\"base64\"),hashAlgorithm:Pbe};try{return await this.tsa.createTimestamp(r)}catch(s){(0,I1t.internalError)(s,\"TSA_CREATE_TIMESTAMP_ERROR\",\"error creating timestamp\")}}};xO.TSAClient=M7});var kbe=_(kO=>{\"use strict\";Object.defineProperty(kO,\"__esModule\",{value:!0});kO.TSAWitness=void 0;var B1t=xbe(),U7=class{constructor(e){this.tsa=new B1t.TSAClient({tsaBaseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async testify(e){let r=v1t(e);return{rfc3161Timestamps:[{signedTimestamp:await this.tsa.createTimestamp(r)}]}}};kO.TSAWitness=U7;function v1t(t){switch(t.$case){case\"dsseEnvelope\":return t.dsseEnvelope.signatures[0].sig;case\"messageSignature\":return t.messageSignature.signature}}});var Tbe=_(Dg=>{\"use strict\";Object.defineProperty(Dg,\"__esModule\",{value:!0});Dg.TSAWitness=Dg.RekorWitness=Dg.DEFAULT_REKOR_URL=void 0;var Qbe=Dbe();Object.defineProperty(Dg,\"DEFAULT_REKOR_URL\",{enumerable:!0,get:function(){return Qbe.DEFAULT_REKOR_URL}});Object.defineProperty(Dg,\"RekorWitness\",{enumerable:!0,get:function(){return Qbe.RekorWitness}});var S1t=kbe();Object.defineProperty(Dg,\"TSAWitness\",{enumerable:!0,get:function(){return S1t.TSAWitness}})});var H7=_(ys=>{\"use strict\";Object.defineProperty(ys,\"__esModule\",{value:!0});ys.TSAWitness=ys.RekorWitness=ys.DEFAULT_REKOR_URL=ys.FulcioSigner=ys.DEFAULT_FULCIO_URL=ys.CIContextProvider=ys.InternalError=ys.MessageSignatureBundleBuilder=ys.DSSEBundleBuilder=void 0;var Rbe=JDe();Object.defineProperty(ys,\"DSSEBundleBuilder\",{enumerable:!0,get:function(){return Rbe.DSSEBundleBuilder}});Object.defineProperty(ys,\"MessageSignatureBundleBuilder\",{enumerable:!0,get:function(){return Rbe.MessageSignatureBundleBuilder}});var D1t=$w();Object.defineProperty(ys,\"InternalError\",{enumerable:!0,get:function(){return D1t.InternalError}});var b1t=XDe();Object.defineProperty(ys,\"CIContextProvider\",{enumerable:!0,get:function(){return b1t.CIContextProvider}});var Fbe=Ebe();Object.defineProperty(ys,\"DEFAULT_FULCIO_URL\",{enumerable:!0,get:function(){return Fbe.DEFAULT_FULCIO_URL}});Object.defineProperty(ys,\"FulcioSigner\",{enumerable:!0,get:function(){return Fbe.FulcioSigner}});var _7=Tbe();Object.defineProperty(ys,\"DEFAULT_REKOR_URL\",{enumerable:!0,get:function(){return _7.DEFAULT_REKOR_URL}});Object.defineProperty(ys,\"RekorWitness\",{enumerable:!0,get:function(){return _7.RekorWitness}});Object.defineProperty(ys,\"TSAWitness\",{enumerable:!0,get:function(){return _7.TSAWitness}})});var Obe=_(xb=>{\"use strict\";var Nbe=xb&&xb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xb,\"__esModule\",{value:!0});xb.appDataPath=x1t;var P1t=Nbe(Ie(\"os\")),n1=Nbe(Ie(\"path\"));function x1t(t){let e=P1t.default.homedir();switch(process.platform){case\"darwin\":{let r=n1.default.join(e,\"Library\",\"Application Support\");return n1.default.join(r,t)}case\"win32\":{let r=process.env.LOCALAPPDATA||n1.default.join(e,\"AppData\",\"Local\");return n1.default.join(r,t,\"Data\")}default:{let r=process.env.XDG_DATA_HOME||n1.default.join(e,\".local\",\"share\");return n1.default.join(r,t)}}}});var PA=_(wl=>{\"use strict\";Object.defineProperty(wl,\"__esModule\",{value:!0});wl.UnsupportedAlgorithmError=wl.CryptoError=wl.LengthOrHashMismatchError=wl.UnsignedMetadataError=wl.RepositoryError=wl.ValueError=void 0;var j7=class extends Error{};wl.ValueError=j7;var kb=class extends Error{};wl.RepositoryError=kb;var G7=class extends kb{};wl.UnsignedMetadataError=G7;var q7=class extends kb{};wl.LengthOrHashMismatchError=q7;var QO=class extends Error{};wl.CryptoError=QO;var W7=class extends QO{};wl.UnsupportedAlgorithmError=W7});var Mbe=_(bg=>{\"use strict\";Object.defineProperty(bg,\"__esModule\",{value:!0});bg.isDefined=k1t;bg.isObject=Lbe;bg.isStringArray=Q1t;bg.isObjectArray=T1t;bg.isStringRecord=R1t;bg.isObjectRecord=F1t;function k1t(t){return t!==void 0}function Lbe(t){return typeof t==\"object\"&&t!==null}function Q1t(t){return Array.isArray(t)&&t.every(e=>typeof e==\"string\")}function T1t(t){return Array.isArray(t)&&t.every(Lbe)}function R1t(t){return typeof t==\"object\"&&t!==null&&Object.keys(t).every(e=>typeof e==\"string\")&&Object.values(t).every(e=>typeof e==\"string\")}function F1t(t){return typeof t==\"object\"&&t!==null&&Object.keys(t).every(e=>typeof e==\"string\")&&Object.values(t).every(e=>typeof e==\"object\"&&e!==null)}});var V7=_(($nr,Hbe)=>{var Ube=\",\",N1t=\":\",O1t=\"[\",L1t=\"]\",M1t=\"{\",U1t=\"}\";function Y7(t){let e=[];if(typeof t==\"string\")e.push(_be(t));else if(typeof t==\"boolean\")e.push(JSON.stringify(t));else if(Number.isInteger(t))e.push(JSON.stringify(t));else if(t===null)e.push(JSON.stringify(t));else if(Array.isArray(t)){e.push(O1t);let r=!0;t.forEach(s=>{r||e.push(Ube),r=!1,e.push(Y7(s))}),e.push(L1t)}else if(typeof t==\"object\"){e.push(M1t);let r=!0;Object.keys(t).sort().forEach(s=>{r||e.push(Ube),r=!1,e.push(_be(s)),e.push(N1t),e.push(Y7(t[s]))}),e.push(U1t)}else throw new TypeError(\"cannot encode \"+t.toString());return e.join(\"\")}function _be(t){return'\"'+t.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')+'\"'}Hbe.exports={canonicalize:Y7}});var jbe=_(i1=>{\"use strict\";var _1t=i1&&i1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i1,\"__esModule\",{value:!0});i1.verifySignature=void 0;var H1t=V7(),j1t=_1t(Ie(\"crypto\")),G1t=(t,e,r)=>{let s=Buffer.from((0,H1t.canonicalize)(t));return j1t.default.verify(void 0,s,e,Buffer.from(r,\"hex\"))};i1.verifySignature=G1t});var ff=_(eu=>{\"use strict\";var q1t=eu&&eu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),W1t=eu&&eu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Gbe=eu&&eu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&q1t(e,t,r);return W1t(e,t),e};Object.defineProperty(eu,\"__esModule\",{value:!0});eu.crypto=eu.guard=void 0;eu.guard=Gbe(Mbe());eu.crypto=Gbe(jbe())});var ay=_(hh=>{\"use strict\";var Y1t=hh&&hh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hh,\"__esModule\",{value:!0});hh.Signed=hh.MetadataKind=void 0;hh.isMetadataKind=J1t;var V1t=Y1t(Ie(\"util\")),Qb=PA(),J7=ff(),qbe=[\"1\",\"0\",\"31\"],K7;(function(t){t.Root=\"root\",t.Timestamp=\"timestamp\",t.Snapshot=\"snapshot\",t.Targets=\"targets\"})(K7||(hh.MetadataKind=K7={}));function J1t(t){return typeof t==\"string\"&&Object.values(K7).includes(t)}var z7=class t{constructor(e){this.specVersion=e.specVersion||qbe.join(\".\");let r=this.specVersion.split(\".\");if(!(r.length===2||r.length===3)||!r.every(s=>K1t(s)))throw new Qb.ValueError(\"Failed to parse specVersion\");if(r[0]!=qbe[0])throw new Qb.ValueError(\"Unsupported specVersion\");this.expires=e.expires,this.version=e.version,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof t?this.specVersion===e.specVersion&&this.expires===e.expires&&this.version===e.version&&V1t.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}isExpired(e){return e||(e=new Date),e>=new Date(this.expires)}static commonFieldsFromJSON(e){let{spec_version:r,expires:s,version:a,...n}=e;if(J7.guard.isDefined(r)){if(typeof r!=\"string\")throw new TypeError(\"spec_version must be a string\")}else throw new Qb.ValueError(\"spec_version is not defined\");if(J7.guard.isDefined(s)){if(typeof s!=\"string\")throw new TypeError(\"expires must be a string\")}else throw new Qb.ValueError(\"expires is not defined\");if(J7.guard.isDefined(a)){if(typeof a!=\"number\")throw new TypeError(\"version must be a number\")}else throw new Qb.ValueError(\"version is not defined\");return{specVersion:r,expires:s,version:a,unrecognizedFields:n}}};hh.Signed=z7;function K1t(t){return!isNaN(Number(t))}});var Tb=_(xg=>{\"use strict\";var Wbe=xg&&xg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xg,\"__esModule\",{value:!0});xg.TargetFile=xg.MetaFile=void 0;var Ybe=Wbe(Ie(\"crypto\")),RO=Wbe(Ie(\"util\")),Pg=PA(),TO=ff(),X7=class t{constructor(e){if(e.version<=0)throw new Pg.ValueError(\"Metafile version must be at least 1\");e.length!==void 0&&Vbe(e.length),this.version=e.version,this.length=e.length,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof t?this.version===e.version&&this.length===e.length&&RO.default.isDeepStrictEqual(this.hashes,e.hashes)&&RO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}verify(e){if(this.length!==void 0&&e.length!==this.length)throw new Pg.LengthOrHashMismatchError(`Expected length ${this.length} but got ${e.length}`);this.hashes&&Object.entries(this.hashes).forEach(([r,s])=>{let a;try{a=Ybe.default.createHash(r)}catch{throw new Pg.LengthOrHashMismatchError(`Hash algorithm ${r} not supported`)}let n=a.update(e).digest(\"hex\");if(n!==s)throw new Pg.LengthOrHashMismatchError(`Expected hash ${s} but got ${n}`)})}toJSON(){let e={version:this.version,...this.unrecognizedFields};return this.length!==void 0&&(e.length=this.length),this.hashes&&(e.hashes=this.hashes),e}static fromJSON(e){let{version:r,length:s,hashes:a,...n}=e;if(typeof r!=\"number\")throw new TypeError(\"version must be a number\");if(TO.guard.isDefined(s)&&typeof s!=\"number\")throw new TypeError(\"length must be a number\");if(TO.guard.isDefined(a)&&!TO.guard.isStringRecord(a))throw new TypeError(\"hashes must be string keys and values\");return new t({version:r,length:s,hashes:a,unrecognizedFields:n})}};xg.MetaFile=X7;var Z7=class t{constructor(e){Vbe(e.length),this.length=e.length,this.path=e.path,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}get custom(){let e=this.unrecognizedFields.custom;return!e||Array.isArray(e)||typeof e!=\"object\"?{}:e}equals(e){return e instanceof t?this.length===e.length&&this.path===e.path&&RO.default.isDeepStrictEqual(this.hashes,e.hashes)&&RO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}async verify(e){let r=0,s=Object.keys(this.hashes).reduce((a,n)=>{try{a[n]=Ybe.default.createHash(n)}catch{throw new Pg.LengthOrHashMismatchError(`Hash algorithm ${n} not supported`)}return a},{});for await(let a of e)r+=a.length,Object.values(s).forEach(n=>{n.update(a)});if(r!==this.length)throw new Pg.LengthOrHashMismatchError(`Expected length ${this.length} but got ${r}`);Object.entries(s).forEach(([a,n])=>{let c=this.hashes[a],f=n.digest(\"hex\");if(f!==c)throw new Pg.LengthOrHashMismatchError(`Expected hash ${c} but got ${f}`)})}toJSON(){return{length:this.length,hashes:this.hashes,...this.unrecognizedFields}}static fromJSON(e,r){let{length:s,hashes:a,...n}=r;if(typeof s!=\"number\")throw new TypeError(\"length must be a number\");if(!TO.guard.isStringRecord(a))throw new TypeError(\"hashes must have string keys and values\");return new t({length:s,path:e,hashes:a,unrecognizedFields:n})}};xg.TargetFile=Z7;function Vbe(t){if(t<0)throw new Pg.ValueError(\"Length must be at least 0\")}});var Jbe=_($7=>{\"use strict\";Object.defineProperty($7,\"__esModule\",{value:!0});$7.encodeOIDString=X1t;var z1t=6;function X1t(t){let e=t.split(\".\"),r=parseInt(e[0],10)*40+parseInt(e[1],10),s=[];e.slice(2).forEach(n=>{let c=Z1t(parseInt(n,10));s.push(...c)});let a=Buffer.from([r,...s]);return Buffer.from([z1t,a.length,...a])}function Z1t(t){let e=[],r=0;for(;t>0;)e.unshift(t&127|r),t>>=7,r=128;return e}});var Zbe=_(Fb=>{\"use strict\";var $1t=Fb&&Fb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fb,\"__esModule\",{value:!0});Fb.getPublicKey=n2t;var s1=$1t(Ie(\"crypto\")),Rb=PA(),eJ=Jbe(),FO=48,Kbe=3,zbe=0,e2t=\"1.3.101.112\",t2t=\"1.2.840.10045.2.1\",r2t=\"1.2.840.10045.3.1.7\",tJ=\"-----BEGIN PUBLIC KEY-----\";function n2t(t){switch(t.keyType){case\"rsa\":return i2t(t);case\"ed25519\":return s2t(t);case\"ecdsa\":case\"ecdsa-sha2-nistp256\":case\"ecdsa-sha2-nistp384\":return o2t(t);default:throw new Rb.UnsupportedAlgorithmError(`Unsupported key type: ${t.keyType}`)}}function i2t(t){if(!t.keyVal.startsWith(tJ))throw new Rb.CryptoError(\"Invalid key format\");let e=s1.default.createPublicKey(t.keyVal);switch(t.scheme){case\"rsassa-pss-sha256\":return{key:e,padding:s1.default.constants.RSA_PKCS1_PSS_PADDING};default:throw new Rb.UnsupportedAlgorithmError(`Unsupported RSA scheme: ${t.scheme}`)}}function s2t(t){let e;if(t.keyVal.startsWith(tJ))e=s1.default.createPublicKey(t.keyVal);else{if(!Xbe(t.keyVal))throw new Rb.CryptoError(\"Invalid key format\");e=s1.default.createPublicKey({key:a2t.hexToDER(t.keyVal),format:\"der\",type:\"spki\"})}return{key:e}}function o2t(t){let e;if(t.keyVal.startsWith(tJ))e=s1.default.createPublicKey(t.keyVal);else{if(!Xbe(t.keyVal))throw new Rb.CryptoError(\"Invalid key format\");e=s1.default.createPublicKey({key:l2t.hexToDER(t.keyVal),format:\"der\",type:\"spki\"})}return{key:e}}var a2t={hexToDER:t=>{let e=Buffer.from(t,\"hex\"),r=(0,eJ.encodeOIDString)(e2t),s=Buffer.concat([Buffer.concat([Buffer.from([FO]),Buffer.from([r.length]),r]),Buffer.concat([Buffer.from([Kbe]),Buffer.from([e.length+1]),Buffer.from([zbe]),e])]);return Buffer.concat([Buffer.from([FO]),Buffer.from([s.length]),s])}},l2t={hexToDER:t=>{let e=Buffer.from(t,\"hex\"),r=Buffer.concat([Buffer.from([Kbe]),Buffer.from([e.length+1]),Buffer.from([zbe]),e]),s=Buffer.concat([(0,eJ.encodeOIDString)(t2t),(0,eJ.encodeOIDString)(r2t)]),a=Buffer.concat([Buffer.from([FO]),Buffer.from([s.length]),s]);return Buffer.concat([Buffer.from([FO]),Buffer.from([a.length+r.length]),a,r])}},Xbe=t=>/^[0-9a-fA-F]+$/.test(t)});var NO=_(o1=>{\"use strict\";var c2t=o1&&o1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(o1,\"__esModule\",{value:!0});o1.Key=void 0;var $be=c2t(Ie(\"util\")),Nb=PA(),ePe=ff(),u2t=Zbe(),rJ=class t{constructor(e){let{keyID:r,keyType:s,scheme:a,keyVal:n,unrecognizedFields:c}=e;this.keyID=r,this.keyType=s,this.scheme=a,this.keyVal=n,this.unrecognizedFields=c||{}}verifySignature(e){let r=e.signatures[this.keyID];if(!r)throw new Nb.UnsignedMetadataError(\"no signature for key found in metadata\");if(!this.keyVal.public)throw new Nb.UnsignedMetadataError(\"no public key found\");let s=(0,u2t.getPublicKey)({keyType:this.keyType,scheme:this.scheme,keyVal:this.keyVal.public}),a=e.signed.toJSON();try{if(!ePe.crypto.verifySignature(a,s,r.sig))throw new Nb.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}catch(n){throw n instanceof Nb.UnsignedMetadataError?n:new Nb.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}}equals(e){return e instanceof t?this.keyID===e.keyID&&this.keyType===e.keyType&&this.scheme===e.scheme&&$be.default.isDeepStrictEqual(this.keyVal,e.keyVal)&&$be.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keytype:this.keyType,scheme:this.scheme,keyval:this.keyVal,...this.unrecognizedFields}}static fromJSON(e,r){let{keytype:s,scheme:a,keyval:n,...c}=r;if(typeof s!=\"string\")throw new TypeError(\"keytype must be a string\");if(typeof a!=\"string\")throw new TypeError(\"scheme must be a string\");if(!ePe.guard.isStringRecord(n))throw new TypeError(\"keyval must be a string record\");return new t({keyID:e,keyType:s,scheme:a,keyVal:n,unrecognizedFields:c})}};o1.Key=rJ});var sPe=_((air,iPe)=>{\"use strict\";iPe.exports=rPe;function rPe(t,e,r){t instanceof RegExp&&(t=tPe(t,r)),e instanceof RegExp&&(e=tPe(e,r));var s=nPe(t,e,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+t.length,s[1]),post:r.slice(s[1]+e.length)}}function tPe(t,e){var r=e.match(t);return r?r[0]:null}rPe.range=nPe;function nPe(t,e,r){var s,a,n,c,f,p=r.indexOf(t),h=r.indexOf(e,p+1),E=p;if(p>=0&&h>0){for(s=[],n=r.length;E>=0&&!f;)E==p?(s.push(E),p=r.indexOf(t,E+1)):s.length==1?f=[s.pop(),h]:(a=s.pop(),a<n&&(n=a,c=h),h=r.indexOf(e,E+1)),E=p<h&&p>=0?p:h;s.length&&(f=[n,c])}return f}});var pPe=_((lir,APe)=>{var oPe=sPe();APe.exports=p2t;var aPe=\"\\0SLASH\"+Math.random()+\"\\0\",lPe=\"\\0OPEN\"+Math.random()+\"\\0\",iJ=\"\\0CLOSE\"+Math.random()+\"\\0\",cPe=\"\\0COMMA\"+Math.random()+\"\\0\",uPe=\"\\0PERIOD\"+Math.random()+\"\\0\";function nJ(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function f2t(t){return t.split(\"\\\\\\\\\").join(aPe).split(\"\\\\{\").join(lPe).split(\"\\\\}\").join(iJ).split(\"\\\\,\").join(cPe).split(\"\\\\.\").join(uPe)}function A2t(t){return t.split(aPe).join(\"\\\\\").split(lPe).join(\"{\").split(iJ).join(\"}\").split(cPe).join(\",\").split(uPe).join(\".\")}function fPe(t){if(!t)return[\"\"];var e=[],r=oPe(\"{\",\"}\",t);if(!r)return t.split(\",\");var s=r.pre,a=r.body,n=r.post,c=s.split(\",\");c[c.length-1]+=\"{\"+a+\"}\";var f=fPe(n);return n.length&&(c[c.length-1]+=f.shift(),c.push.apply(c,f)),e.push.apply(e,c),e}function p2t(t){return t?(t.substr(0,2)===\"{}\"&&(t=\"\\\\{\\\\}\"+t.substr(2)),Ob(f2t(t),!0).map(A2t)):[]}function h2t(t){return\"{\"+t+\"}\"}function g2t(t){return/^-?0\\d/.test(t)}function d2t(t,e){return t<=e}function m2t(t,e){return t>=e}function Ob(t,e){var r=[],s=oPe(\"{\",\"}\",t);if(!s)return[t];var a=s.pre,n=s.post.length?Ob(s.post,!1):[\"\"];if(/\\$$/.test(s.pre))for(var c=0;c<n.length;c++){var f=a+\"{\"+s.body+\"}\"+n[c];r.push(f)}else{var p=/^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(s.body),h=/^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(s.body),E=p||h,C=s.body.indexOf(\",\")>=0;if(!E&&!C)return s.post.match(/,.*\\}/)?(t=s.pre+\"{\"+s.body+iJ+s.post,Ob(t)):[t];var S;if(E)S=s.body.split(/\\.\\./);else if(S=fPe(s.body),S.length===1&&(S=Ob(S[0],!1).map(h2t),S.length===1))return n.map(function(Ce){return s.pre+S[0]+Ce});var P;if(E){var I=nJ(S[0]),R=nJ(S[1]),N=Math.max(S[0].length,S[1].length),U=S.length==3?Math.abs(nJ(S[2])):1,W=d2t,ee=R<I;ee&&(U*=-1,W=m2t);var ie=S.some(g2t);P=[];for(var ue=I;W(ue,R);ue+=U){var le;if(h)le=String.fromCharCode(ue),le===\"\\\\\"&&(le=\"\");else if(le=String(ue),ie){var me=N-le.length;if(me>0){var pe=new Array(me+1).join(\"0\");ue<0?le=\"-\"+pe+le.slice(1):le=pe+le}}P.push(le)}}else{P=[];for(var Be=0;Be<S.length;Be++)P.push.apply(P,Ob(S[Be],!1))}for(var Be=0;Be<P.length;Be++)for(var c=0;c<n.length;c++){var f=a+P[Be]+n[c];(!e||E||f)&&r.push(f)}}return r}});var hPe=_(OO=>{\"use strict\";Object.defineProperty(OO,\"__esModule\",{value:!0});OO.assertValidPattern=void 0;var y2t=1024*64,E2t=t=>{if(typeof t!=\"string\")throw new TypeError(\"invalid pattern\");if(t.length>y2t)throw new TypeError(\"pattern is too long\")};OO.assertValidPattern=E2t});var dPe=_(LO=>{\"use strict\";Object.defineProperty(LO,\"__esModule\",{value:!0});LO.parseClass=void 0;var I2t={\"[:alnum:]\":[\"\\\\p{L}\\\\p{Nl}\\\\p{Nd}\",!0],\"[:alpha:]\":[\"\\\\p{L}\\\\p{Nl}\",!0],\"[:ascii:]\":[\"\\\\x00-\\\\x7f\",!1],\"[:blank:]\":[\"\\\\p{Zs}\\\\t\",!0],\"[:cntrl:]\":[\"\\\\p{Cc}\",!0],\"[:digit:]\":[\"\\\\p{Nd}\",!0],\"[:graph:]\":[\"\\\\p{Z}\\\\p{C}\",!0,!0],\"[:lower:]\":[\"\\\\p{Ll}\",!0],\"[:print:]\":[\"\\\\p{C}\",!0],\"[:punct:]\":[\"\\\\p{P}\",!0],\"[:space:]\":[\"\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f\",!0],\"[:upper:]\":[\"\\\\p{Lu}\",!0],\"[:word:]\":[\"\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}\",!0],\"[:xdigit:]\":[\"A-Fa-f0-9\",!1]},Lb=t=>t.replace(/[[\\]\\\\-]/g,\"\\\\$&\"),C2t=t=>t.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"),gPe=t=>t.join(\"\"),w2t=(t,e)=>{let r=e;if(t.charAt(r)!==\"[\")throw new Error(\"not in a brace expression\");let s=[],a=[],n=r+1,c=!1,f=!1,p=!1,h=!1,E=r,C=\"\";e:for(;n<t.length;){let R=t.charAt(n);if((R===\"!\"||R===\"^\")&&n===r+1){h=!0,n++;continue}if(R===\"]\"&&c&&!p){E=n+1;break}if(c=!0,R===\"\\\\\"&&!p){p=!0,n++;continue}if(R===\"[\"&&!p){for(let[N,[U,W,ee]]of Object.entries(I2t))if(t.startsWith(N,n)){if(C)return[\"$.\",!1,t.length-r,!0];n+=N.length,ee?a.push(U):s.push(U),f=f||W;continue e}}if(p=!1,C){R>C?s.push(Lb(C)+\"-\"+Lb(R)):R===C&&s.push(Lb(R)),C=\"\",n++;continue}if(t.startsWith(\"-]\",n+1)){s.push(Lb(R+\"-\")),n+=2;continue}if(t.startsWith(\"-\",n+1)){C=R,n+=2;continue}s.push(Lb(R)),n++}if(E<n)return[\"\",!1,0,!1];if(!s.length&&!a.length)return[\"$.\",!1,t.length-r,!0];if(a.length===0&&s.length===1&&/^\\\\?.$/.test(s[0])&&!h){let R=s[0].length===2?s[0].slice(-1):s[0];return[C2t(R),!1,E-r,!1]}let S=\"[\"+(h?\"^\":\"\")+gPe(s)+\"]\",P=\"[\"+(h?\"\":\"^\")+gPe(a)+\"]\";return[s.length&&a.length?\"(\"+S+\"|\"+P+\")\":s.length?S:P,f,E-r,!0]};LO.parseClass=w2t});var UO=_(MO=>{\"use strict\";Object.defineProperty(MO,\"__esModule\",{value:!0});MO.unescape=void 0;var B2t=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\\[([^\\/\\\\])\\]/g,\"$1\"):t.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g,\"$1$2\").replace(/\\\\([^\\/])/g,\"$1\");MO.unescape=B2t});var aJ=_(jO=>{\"use strict\";Object.defineProperty(jO,\"__esModule\",{value:!0});jO.AST=void 0;var v2t=dPe(),_O=UO(),S2t=new Set([\"!\",\"?\",\"+\",\"*\",\"@\"]),mPe=t=>S2t.has(t),D2t=\"(?!(?:^|/)\\\\.\\\\.?(?:$|/))\",HO=\"(?!\\\\.)\",b2t=new Set([\"[\",\".\"]),P2t=new Set([\"..\",\".\"]),x2t=new Set(\"().*{}+?[]^$\\\\!\"),k2t=t=>t.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"),oJ=\"[^/]\",yPe=oJ+\"*?\",EPe=oJ+\"+?\",sJ=class t{type;#t;#r;#i=!1;#e=[];#n;#o;#l;#a=!1;#s;#c;#f=!1;constructor(e,r,s={}){this.type=e,e&&(this.#r=!0),this.#n=r,this.#t=this.#n?this.#n.#t:this,this.#s=this.#t===this?s:this.#t.#s,this.#l=this.#t===this?[]:this.#t.#l,e===\"!\"&&!this.#t.#a&&this.#l.push(this),this.#o=this.#n?this.#n.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!=\"string\"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+\"(\"+this.#e.map(e=>String(e)).join(\"|\")+\")\":this.#c=this.#e.map(e=>String(e)).join(\"\")}#p(){if(this!==this.#t)throw new Error(\"should only call on root\");if(this.#a)return this;this.toString(),this.#a=!0;let e;for(;e=this.#l.pop();){if(e.type!==\"!\")continue;let r=e,s=r.#n;for(;s;){for(let a=r.#o+1;!s.type&&a<s.#e.length;a++)for(let n of e.#e){if(typeof n==\"string\")throw new Error(\"string part in extglob AST??\");n.copyIn(s.#e[a])}r=s,s=r.#n}}return this}push(...e){for(let r of e)if(r!==\"\"){if(typeof r!=\"string\"&&!(r instanceof t&&r.#n===this))throw new Error(\"invalid part: \"+r);this.#e.push(r)}}toJSON(){let e=this.type===null?this.#e.slice().map(r=>typeof r==\"string\"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&this.#n?.type===\"!\")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#n?.isStart())return!1;if(this.#o===0)return!0;let e=this.#n;for(let r=0;r<this.#o;r++){let s=e.#e[r];if(!(s instanceof t&&s.type===\"!\"))return!1}return!0}isEnd(){if(this.#t===this||this.#n?.type===\"!\")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();let e=this.#n?this.#n.#e.length:0;return this.#o===e-1}copyIn(e){typeof e==\"string\"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let s of this.#e)r.copyIn(s);return r}static#u(e,r,s,a){let n=!1,c=!1,f=-1,p=!1;if(r.type===null){let P=s,I=\"\";for(;P<e.length;){let R=e.charAt(P++);if(n||R===\"\\\\\"){n=!n,I+=R;continue}if(c){P===f+1?(R===\"^\"||R===\"!\")&&(p=!0):R===\"]\"&&!(P===f+2&&p)&&(c=!1),I+=R;continue}else if(R===\"[\"){c=!0,f=P,p=!1,I+=R;continue}if(!a.noext&&mPe(R)&&e.charAt(P)===\"(\"){r.push(I),I=\"\";let N=new t(R,r);P=t.#u(e,N,P,a),r.push(N);continue}I+=R}return r.push(I),P}let h=s+1,E=new t(null,r),C=[],S=\"\";for(;h<e.length;){let P=e.charAt(h++);if(n||P===\"\\\\\"){n=!n,S+=P;continue}if(c){h===f+1?(P===\"^\"||P===\"!\")&&(p=!0):P===\"]\"&&!(h===f+2&&p)&&(c=!1),S+=P;continue}else if(P===\"[\"){c=!0,f=h,p=!1,S+=P;continue}if(mPe(P)&&e.charAt(h)===\"(\"){E.push(S),S=\"\";let I=new t(P,E);E.push(I),h=t.#u(e,I,h,a);continue}if(P===\"|\"){E.push(S),S=\"\",C.push(E),E=new t(null,r);continue}if(P===\")\")return S===\"\"&&r.#e.length===0&&(r.#f=!0),E.push(S),S=\"\",r.push(...C,E),h;S+=P}return r.type=null,r.#r=void 0,r.#e=[e.substring(s-1)],h}static fromGlob(e,r={}){let s=new t(null,void 0,r);return t.#u(e,s,0,r),s}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[r,s,a,n]=this.toRegExpSource();if(!(a||this.#r||this.#s.nocase&&!this.#s.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return s;let f=(this.#s.nocase?\"i\":\"\")+(n?\"u\":\"\");return Object.assign(new RegExp(`^${r}$`,f),{_src:r,_glob:e})}get options(){return this.#s}toRegExpSource(e){let r=e??!!this.#s.dot;if(this.#t===this&&this.#p(),!this.type){let p=this.isStart()&&this.isEnd(),h=this.#e.map(P=>{let[I,R,N,U]=typeof P==\"string\"?t.#h(P,this.#r,p):P.toRegExpSource(e);return this.#r=this.#r||N,this.#i=this.#i||U,I}).join(\"\"),E=\"\";if(this.isStart()&&typeof this.#e[0]==\"string\"&&!(this.#e.length===1&&P2t.has(this.#e[0]))){let I=b2t,R=r&&I.has(h.charAt(0))||h.startsWith(\"\\\\.\")&&I.has(h.charAt(2))||h.startsWith(\"\\\\.\\\\.\")&&I.has(h.charAt(4)),N=!r&&!e&&I.has(h.charAt(0));E=R?D2t:N?HO:\"\"}let C=\"\";return this.isEnd()&&this.#t.#a&&this.#n?.type===\"!\"&&(C=\"(?:$|\\\\/)\"),[E+h+C,(0,_O.unescape)(h),this.#r=!!this.#r,this.#i]}let s=this.type===\"*\"||this.type===\"+\",a=this.type===\"!\"?\"(?:(?!(?:\":\"(?:\",n=this.#A(r);if(this.isStart()&&this.isEnd()&&!n&&this.type!==\"!\"){let p=this.toString();return this.#e=[p],this.type=null,this.#r=void 0,[p,(0,_O.unescape)(this.toString()),!1,!1]}let c=!s||e||r||!HO?\"\":this.#A(!0);c===n&&(c=\"\"),c&&(n=`(?:${n})(?:${c})*?`);let f=\"\";if(this.type===\"!\"&&this.#f)f=(this.isStart()&&!r?HO:\"\")+EPe;else{let p=this.type===\"!\"?\"))\"+(this.isStart()&&!r&&!e?HO:\"\")+yPe+\")\":this.type===\"@\"?\")\":this.type===\"?\"?\")?\":this.type===\"+\"&&c?\")\":this.type===\"*\"&&c?\")?\":`)${this.type}`;f=a+n+p}return[f,(0,_O.unescape)(n),this.#r=!!this.#r,this.#i]}#A(e){return this.#e.map(r=>{if(typeof r==\"string\")throw new Error(\"string type in extglob ast??\");let[s,a,n,c]=r.toRegExpSource(e);return this.#i=this.#i||c,s}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join(\"|\")}static#h(e,r,s=!1){let a=!1,n=\"\",c=!1;for(let f=0;f<e.length;f++){let p=e.charAt(f);if(a){a=!1,n+=(x2t.has(p)?\"\\\\\":\"\")+p;continue}if(p===\"\\\\\"){f===e.length-1?n+=\"\\\\\\\\\":a=!0;continue}if(p===\"[\"){let[h,E,C,S]=(0,v2t.parseClass)(e,f);if(C){n+=h,c=c||E,f+=C-1,r=r||S;continue}}if(p===\"*\"){s&&e===\"*\"?n+=EPe:n+=yPe,r=!0;continue}if(p===\"?\"){n+=oJ,r=!0;continue}n+=k2t(p)}return[n,(0,_O.unescape)(e),!!r,c]}};jO.AST=sJ});var lJ=_(GO=>{\"use strict\";Object.defineProperty(GO,\"__esModule\",{value:!0});GO.escape=void 0;var Q2t=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\\]]/g,\"[$&]\"):t.replace(/[?*()[\\]\\\\]/g,\"\\\\$&\");GO.escape=Q2t});var DPe=_(pr=>{\"use strict\";var T2t=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pr,\"__esModule\",{value:!0});pr.unescape=pr.escape=pr.AST=pr.Minimatch=pr.match=pr.makeRe=pr.braceExpand=pr.defaults=pr.filter=pr.GLOBSTAR=pr.sep=pr.minimatch=void 0;var R2t=T2t(pPe()),qO=hPe(),wPe=aJ(),F2t=lJ(),N2t=UO(),O2t=(t,e,r={})=>((0,qO.assertValidPattern)(e),!r.nocomment&&e.charAt(0)===\"#\"?!1:new ly(e,r).match(t));pr.minimatch=O2t;var L2t=/^\\*+([^+@!?\\*\\[\\(]*)$/,M2t=t=>e=>!e.startsWith(\".\")&&e.endsWith(t),U2t=t=>e=>e.endsWith(t),_2t=t=>(t=t.toLowerCase(),e=>!e.startsWith(\".\")&&e.toLowerCase().endsWith(t)),H2t=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),j2t=/^\\*+\\.\\*+$/,G2t=t=>!t.startsWith(\".\")&&t.includes(\".\"),q2t=t=>t!==\".\"&&t!==\"..\"&&t.includes(\".\"),W2t=/^\\.\\*+$/,Y2t=t=>t!==\".\"&&t!==\"..\"&&t.startsWith(\".\"),V2t=/^\\*+$/,J2t=t=>t.length!==0&&!t.startsWith(\".\"),K2t=t=>t.length!==0&&t!==\".\"&&t!==\"..\",z2t=/^\\?+([^+@!?\\*\\[\\(]*)?$/,X2t=([t,e=\"\"])=>{let r=BPe([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},Z2t=([t,e=\"\"])=>{let r=vPe([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},$2t=([t,e=\"\"])=>{let r=vPe([t]);return e?s=>r(s)&&s.endsWith(e):r},eBt=([t,e=\"\"])=>{let r=BPe([t]);return e?s=>r(s)&&s.endsWith(e):r},BPe=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(\".\")},vPe=([t])=>{let e=t.length;return r=>r.length===e&&r!==\".\"&&r!==\"..\"},SPe=typeof process==\"object\"&&process?typeof process.env==\"object\"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:\"posix\",IPe={win32:{sep:\"\\\\\"},posix:{sep:\"/\"}};pr.sep=SPe===\"win32\"?IPe.win32.sep:IPe.posix.sep;pr.minimatch.sep=pr.sep;pr.GLOBSTAR=Symbol(\"globstar **\");pr.minimatch.GLOBSTAR=pr.GLOBSTAR;var tBt=\"[^/]\",rBt=tBt+\"*?\",nBt=\"(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?\",iBt=\"(?:(?!(?:\\\\/|^)\\\\.).)*?\",sBt=(t,e={})=>r=>(0,pr.minimatch)(r,t,e);pr.filter=sBt;pr.minimatch.filter=pr.filter;var tu=(t,e={})=>Object.assign({},t,e),oBt=t=>{if(!t||typeof t!=\"object\"||!Object.keys(t).length)return pr.minimatch;let e=pr.minimatch;return Object.assign((s,a,n={})=>e(s,a,tu(t,n)),{Minimatch:class extends e.Minimatch{constructor(a,n={}){super(a,tu(t,n))}static defaults(a){return e.defaults(tu(t,a)).Minimatch}},AST:class extends e.AST{constructor(a,n,c={}){super(a,n,tu(t,c))}static fromGlob(a,n={}){return e.AST.fromGlob(a,tu(t,n))}},unescape:(s,a={})=>e.unescape(s,tu(t,a)),escape:(s,a={})=>e.escape(s,tu(t,a)),filter:(s,a={})=>e.filter(s,tu(t,a)),defaults:s=>e.defaults(tu(t,s)),makeRe:(s,a={})=>e.makeRe(s,tu(t,a)),braceExpand:(s,a={})=>e.braceExpand(s,tu(t,a)),match:(s,a,n={})=>e.match(s,a,tu(t,n)),sep:e.sep,GLOBSTAR:pr.GLOBSTAR})};pr.defaults=oBt;pr.minimatch.defaults=pr.defaults;var aBt=(t,e={})=>((0,qO.assertValidPattern)(t),e.nobrace||!/\\{(?:(?!\\{).)*\\}/.test(t)?[t]:(0,R2t.default)(t));pr.braceExpand=aBt;pr.minimatch.braceExpand=pr.braceExpand;var lBt=(t,e={})=>new ly(t,e).makeRe();pr.makeRe=lBt;pr.minimatch.makeRe=pr.makeRe;var cBt=(t,e,r={})=>{let s=new ly(e,r);return t=t.filter(a=>s.match(a)),s.options.nonull&&!t.length&&t.push(e),t};pr.match=cBt;pr.minimatch.match=pr.match;var CPe=/[?*]|[+@!]\\(.*?\\)|\\[|\\]/,uBt=t=>t.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"),ly=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){(0,qO.assertValidPattern)(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||SPe,this.isWindows=this.platform===\"win32\",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\\\/g,\"/\")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!=\"string\")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)===\"#\"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let a=this.globParts.map((n,c,f)=>{if(this.isWindows&&this.windowsNoMagicRoot){let p=n[0]===\"\"&&n[1]===\"\"&&(n[2]===\"?\"||!CPe.test(n[2]))&&!CPe.test(n[3]),h=/^[a-z]:/i.test(n[0]);if(p)return[...n.slice(0,4),...n.slice(4).map(E=>this.parse(E))];if(h)return[n[0],...n.slice(1).map(E=>this.parse(E))]}return n.map(p=>this.parse(p))});if(this.debug(this.pattern,a),this.set=a.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let c=this.set[n];c[0]===\"\"&&c[1]===\"\"&&this.globParts[n][2]===\"?\"&&typeof c[3]==\"string\"&&/^[a-z]:$/i.test(c[3])&&(c[2]=\"?\")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let s=0;s<e.length;s++)for(let a=0;a<e[s].length;a++)e[s][a]===\"**\"&&(e[s][a]=\"*\");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let s=-1;for(;(s=r.indexOf(\"**\",s+1))!==-1;){let a=s;for(;r[a+1]===\"**\";)a++;a!==s&&r.splice(s,a-s)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((s,a)=>{let n=s[s.length-1];return a===\"**\"&&n===\"**\"?s:a===\"..\"&&n&&n!==\"..\"&&n!==\".\"&&n!==\"**\"?(s.pop(),s):(s.push(a),s)},[]),r.length===0?[\"\"]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let a=1;a<e.length-1;a++){let n=e[a];a===1&&n===\"\"&&e[0]===\"\"||(n===\".\"||n===\"\")&&(r=!0,e.splice(a,1),a--)}e[0]===\".\"&&e.length===2&&(e[1]===\".\"||e[1]===\"\")&&(r=!0,e.pop())}let s=0;for(;(s=e.indexOf(\"..\",s+1))!==-1;){let a=e[s-1];a&&a!==\".\"&&a!==\"..\"&&a!==\"**\"&&(r=!0,e.splice(s-1,2),s-=2)}}while(r);return e.length===0?[\"\"]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let s of e){let a=-1;for(;(a=s.indexOf(\"**\",a+1))!==-1;){let c=a;for(;s[c+1]===\"**\";)c++;c>a&&s.splice(a+1,c-a);let f=s[a+1],p=s[a+2],h=s[a+3];if(f!==\"..\"||!p||p===\".\"||p===\"..\"||!h||h===\".\"||h===\"..\")continue;r=!0,s.splice(a,1);let E=s.slice(0);E[a]=\"**\",e.push(E),a--}if(!this.preserveMultipleSlashes){for(let c=1;c<s.length-1;c++){let f=s[c];c===1&&f===\"\"&&s[0]===\"\"||(f===\".\"||f===\"\")&&(r=!0,s.splice(c,1),c--)}s[0]===\".\"&&s.length===2&&(s[1]===\".\"||s[1]===\"\")&&(r=!0,s.pop())}let n=0;for(;(n=s.indexOf(\"..\",n+1))!==-1;){let c=s[n-1];if(c&&c!==\".\"&&c!==\"..\"&&c!==\"**\"){r=!0;let p=n===1&&s[n+1]===\"**\"?[\".\"]:[];s.splice(n-1,2,...p),s.length===0&&s.push(\"\"),n-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let s=r+1;s<e.length;s++){let a=this.partsMatch(e[r],e[s],!this.preserveMultipleSlashes);if(a){e[r]=[],e[s]=a;break}}return e.filter(r=>r.length)}partsMatch(e,r,s=!1){let a=0,n=0,c=[],f=\"\";for(;a<e.length&&n<r.length;)if(e[a]===r[n])c.push(f===\"b\"?r[n]:e[a]),a++,n++;else if(s&&e[a]===\"**\"&&r[n]===e[a+1])c.push(e[a]),a++;else if(s&&r[n]===\"**\"&&e[a]===r[n+1])c.push(r[n]),n++;else if(e[a]===\"*\"&&r[n]&&(this.options.dot||!r[n].startsWith(\".\"))&&r[n]!==\"**\"){if(f===\"b\")return!1;f=\"a\",c.push(e[a]),a++,n++}else if(r[n]===\"*\"&&e[a]&&(this.options.dot||!e[a].startsWith(\".\"))&&e[a]!==\"**\"){if(f===\"a\")return!1;f=\"b\",c.push(r[n]),a++,n++}else return!1;return e.length===r.length&&c}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,s=0;for(let a=0;a<e.length&&e.charAt(a)===\"!\";a++)r=!r,s++;s&&(this.pattern=e.slice(s)),this.negate=r}matchOne(e,r,s=!1){let a=this.options;if(this.isWindows){let R=typeof e[0]==\"string\"&&/^[a-z]:$/i.test(e[0]),N=!R&&e[0]===\"\"&&e[1]===\"\"&&e[2]===\"?\"&&/^[a-z]:$/i.test(e[3]),U=typeof r[0]==\"string\"&&/^[a-z]:$/i.test(r[0]),W=!U&&r[0]===\"\"&&r[1]===\"\"&&r[2]===\"?\"&&typeof r[3]==\"string\"&&/^[a-z]:$/i.test(r[3]),ee=N?3:R?0:void 0,ie=W?3:U?0:void 0;if(typeof ee==\"number\"&&typeof ie==\"number\"){let[ue,le]=[e[ee],r[ie]];ue.toLowerCase()===le.toLowerCase()&&(r[ie]=ue,ie>ee?r=r.slice(ie):ee>ie&&(e=e.slice(ee)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug(\"matchOne\",this,{file:e,pattern:r}),this.debug(\"matchOne\",e.length,r.length);for(var c=0,f=0,p=e.length,h=r.length;c<p&&f<h;c++,f++){this.debug(\"matchOne loop\");var E=r[f],C=e[c];if(this.debug(r,E,C),E===!1)return!1;if(E===pr.GLOBSTAR){this.debug(\"GLOBSTAR\",[r,E,C]);var S=c,P=f+1;if(P===h){for(this.debug(\"** at the end\");c<p;c++)if(e[c]===\".\"||e[c]===\"..\"||!a.dot&&e[c].charAt(0)===\".\")return!1;return!0}for(;S<p;){var I=e[S];if(this.debug(`\nglobstar while`,e,S,r,P,I),this.matchOne(e.slice(S),r.slice(P),s))return this.debug(\"globstar found match!\",S,p,I),!0;if(I===\".\"||I===\"..\"||!a.dot&&I.charAt(0)===\".\"){this.debug(\"dot detected!\",e,S,r,P);break}this.debug(\"globstar swallow a segment, and continue\"),S++}return!!(s&&(this.debug(`\n>>> no match, partial?`,e,S,r,P),S===p))}let R;if(typeof E==\"string\"?(R=C===E,this.debug(\"string match\",E,C,R)):(R=E.test(C),this.debug(\"pattern match\",E,C,R)),!R)return!1}if(c===p&&f===h)return!0;if(c===p)return s;if(f===h)return c===p-1&&e[c]===\"\";throw new Error(\"wtf?\")}braceExpand(){return(0,pr.braceExpand)(this.pattern,this.options)}parse(e){(0,qO.assertValidPattern)(e);let r=this.options;if(e===\"**\")return pr.GLOBSTAR;if(e===\"\")return\"\";let s,a=null;(s=e.match(V2t))?a=r.dot?K2t:J2t:(s=e.match(L2t))?a=(r.nocase?r.dot?H2t:_2t:r.dot?U2t:M2t)(s[1]):(s=e.match(z2t))?a=(r.nocase?r.dot?Z2t:X2t:r.dot?$2t:eBt)(s):(s=e.match(j2t))?a=r.dot?q2t:G2t:(s=e.match(W2t))&&(a=Y2t);let n=wPe.AST.fromGlob(e,this.options).toMMPattern();return a&&typeof n==\"object\"&&Reflect.defineProperty(n,\"test\",{value:a}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,s=r.noglobstar?rBt:r.dot?nBt:iBt,a=new Set(r.nocase?[\"i\"]:[]),n=e.map(p=>{let h=p.map(E=>{if(E instanceof RegExp)for(let C of E.flags.split(\"\"))a.add(C);return typeof E==\"string\"?uBt(E):E===pr.GLOBSTAR?pr.GLOBSTAR:E._src});return h.forEach((E,C)=>{let S=h[C+1],P=h[C-1];E!==pr.GLOBSTAR||P===pr.GLOBSTAR||(P===void 0?S!==void 0&&S!==pr.GLOBSTAR?h[C+1]=\"(?:\\\\/|\"+s+\"\\\\/)?\"+S:h[C]=s:S===void 0?h[C-1]=P+\"(?:\\\\/|\"+s+\")?\":S!==pr.GLOBSTAR&&(h[C-1]=P+\"(?:\\\\/|\\\\/\"+s+\"\\\\/)\"+S,h[C+1]=pr.GLOBSTAR))}),h.filter(E=>E!==pr.GLOBSTAR).join(\"/\")}).join(\"|\"),[c,f]=e.length>1?[\"(?:\",\")\"]:[\"\",\"\"];n=\"^\"+c+n+f+\"$\",this.negate&&(n=\"^(?!\"+n+\").+$\");try{this.regexp=new RegExp(n,[...a].join(\"\"))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(\"/\"):this.isWindows&&/^\\/\\/[^\\/]+/.test(e)?[\"\",...e.split(/\\/+/)]:e.split(/\\/+/)}match(e,r=this.partial){if(this.debug(\"match\",e,this.pattern),this.comment)return!1;if(this.empty)return e===\"\";if(e===\"/\"&&r)return!0;let s=this.options;this.isWindows&&(e=e.split(\"\\\\\").join(\"/\"));let a=this.slashSplit(e);this.debug(this.pattern,\"split\",a);let n=this.set;this.debug(this.pattern,\"set\",n);let c=a[a.length-1];if(!c)for(let f=a.length-2;!c&&f>=0;f--)c=a[f];for(let f=0;f<n.length;f++){let p=n[f],h=a;if(s.matchBase&&p.length===1&&(h=[c]),this.matchOne(h,p,r))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(e){return pr.minimatch.defaults(e).Minimatch}};pr.Minimatch=ly;var fBt=aJ();Object.defineProperty(pr,\"AST\",{enumerable:!0,get:function(){return fBt.AST}});var ABt=lJ();Object.defineProperty(pr,\"escape\",{enumerable:!0,get:function(){return ABt.escape}});var pBt=UO();Object.defineProperty(pr,\"unescape\",{enumerable:!0,get:function(){return pBt.unescape}});pr.minimatch.AST=wPe.AST;pr.minimatch.Minimatch=ly;pr.minimatch.escape=F2t.escape;pr.minimatch.unescape=N2t.unescape});var fJ=_(ru=>{\"use strict\";var bPe=ru&&ru.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ru,\"__esModule\",{value:!0});ru.SuccinctRoles=ru.DelegatedRole=ru.Role=ru.TOP_LEVEL_ROLE_NAMES=void 0;var PPe=bPe(Ie(\"crypto\")),hBt=DPe(),WO=bPe(Ie(\"util\")),YO=PA(),cy=ff();ru.TOP_LEVEL_ROLE_NAMES=[\"root\",\"targets\",\"snapshot\",\"timestamp\"];var Mb=class t{constructor(e){let{keyIDs:r,threshold:s,unrecognizedFields:a}=e;if(gBt(r))throw new YO.ValueError(\"duplicate key IDs found\");if(s<1)throw new YO.ValueError(\"threshold must be at least 1\");this.keyIDs=r,this.threshold=s,this.unrecognizedFields=a||{}}equals(e){return e instanceof t?this.threshold===e.threshold&&WO.default.isDeepStrictEqual(this.keyIDs,e.keyIDs)&&WO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(e){let{keyids:r,threshold:s,...a}=e;if(!cy.guard.isStringArray(r))throw new TypeError(\"keyids must be an array\");if(typeof s!=\"number\")throw new TypeError(\"threshold must be a number\");return new t({keyIDs:r,threshold:s,unrecognizedFields:a})}};ru.Role=Mb;function gBt(t){return new Set(t).size!==t.length}var cJ=class t extends Mb{constructor(e){super(e);let{name:r,terminating:s,paths:a,pathHashPrefixes:n}=e;if(this.name=r,this.terminating=s,e.paths&&e.pathHashPrefixes)throw new YO.ValueError(\"paths and pathHashPrefixes are mutually exclusive\");this.paths=a,this.pathHashPrefixes=n}equals(e){return e instanceof t?super.equals(e)&&this.name===e.name&&this.terminating===e.terminating&&WO.default.isDeepStrictEqual(this.paths,e.paths)&&WO.default.isDeepStrictEqual(this.pathHashPrefixes,e.pathHashPrefixes):!1}isDelegatedPath(e){if(this.paths)return this.paths.some(r=>mBt(e,r));if(this.pathHashPrefixes){let s=PPe.default.createHash(\"sha256\").update(e).digest(\"hex\");return this.pathHashPrefixes.some(a=>s.startsWith(a))}return!1}toJSON(){let e={...super.toJSON(),name:this.name,terminating:this.terminating};return this.paths&&(e.paths=this.paths),this.pathHashPrefixes&&(e.path_hash_prefixes=this.pathHashPrefixes),e}static fromJSON(e){let{keyids:r,threshold:s,name:a,terminating:n,paths:c,path_hash_prefixes:f,...p}=e;if(!cy.guard.isStringArray(r))throw new TypeError(\"keyids must be an array of strings\");if(typeof s!=\"number\")throw new TypeError(\"threshold must be a number\");if(typeof a!=\"string\")throw new TypeError(\"name must be a string\");if(typeof n!=\"boolean\")throw new TypeError(\"terminating must be a boolean\");if(cy.guard.isDefined(c)&&!cy.guard.isStringArray(c))throw new TypeError(\"paths must be an array of strings\");if(cy.guard.isDefined(f)&&!cy.guard.isStringArray(f))throw new TypeError(\"path_hash_prefixes must be an array of strings\");return new t({keyIDs:r,threshold:s,name:a,terminating:n,paths:c,pathHashPrefixes:f,unrecognizedFields:p})}};ru.DelegatedRole=cJ;var dBt=(t,e)=>t.map((r,s)=>[r,e[s]]);function mBt(t,e){let r=t.split(\"/\"),s=e.split(\"/\");return s.length!=r.length?!1:dBt(r,s).every(([a,n])=>(0,hBt.minimatch)(a,n))}var uJ=class t extends Mb{constructor(e){super(e);let{bitLength:r,namePrefix:s}=e;if(r<=0||r>32)throw new YO.ValueError(\"bitLength must be between 1 and 32\");this.bitLength=r,this.namePrefix=s,this.numberOfBins=Math.pow(2,r),this.suffixLen=(this.numberOfBins-1).toString(16).length}equals(e){return e instanceof t?super.equals(e)&&this.bitLength===e.bitLength&&this.namePrefix===e.namePrefix:!1}getRoleForTarget(e){let a=PPe.default.createHash(\"sha256\").update(e).digest().subarray(0,4),n=32-this.bitLength,f=(a.readUInt32BE()>>>n).toString(16).padStart(this.suffixLen,\"0\");return`${this.namePrefix}-${f}`}*getRoles(){for(let e=0;e<this.numberOfBins;e++){let r=e.toString(16).padStart(this.suffixLen,\"0\");yield`${this.namePrefix}-${r}`}}isDelegatedRole(e){let r=this.namePrefix+\"-\";if(!e.startsWith(r))return!1;let s=e.slice(r.length,e.length);if(s.length!=this.suffixLen||!s.match(/^[0-9a-fA-F]+$/))return!1;let a=parseInt(s,16);return 0<=a&&a<this.numberOfBins}toJSON(){return{...super.toJSON(),bit_length:this.bitLength,name_prefix:this.namePrefix}}static fromJSON(e){let{keyids:r,threshold:s,bit_length:a,name_prefix:n,...c}=e;if(!cy.guard.isStringArray(r))throw new TypeError(\"keyids must be an array of strings\");if(typeof s!=\"number\")throw new TypeError(\"threshold must be a number\");if(typeof a!=\"number\")throw new TypeError(\"bit_length must be a number\");if(typeof n!=\"string\")throw new TypeError(\"name_prefix must be a string\");return new t({keyIDs:r,threshold:s,bitLength:a,namePrefix:n,unrecognizedFields:c})}};ru.SuccinctRoles=uJ});var hJ=_(a1=>{\"use strict\";var yBt=a1&&a1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(a1,\"__esModule\",{value:!0});a1.Root=void 0;var xPe=yBt(Ie(\"util\")),AJ=ay(),kPe=PA(),EBt=NO(),VO=fJ(),JO=ff(),pJ=class t extends AJ.Signed{constructor(e){if(super(e),this.type=AJ.MetadataKind.Root,this.keys=e.keys||{},this.consistentSnapshot=e.consistentSnapshot??!0,!e.roles)this.roles=VO.TOP_LEVEL_ROLE_NAMES.reduce((r,s)=>({...r,[s]:new VO.Role({keyIDs:[],threshold:1})}),{});else{let r=new Set(Object.keys(e.roles));if(!VO.TOP_LEVEL_ROLE_NAMES.every(s=>r.has(s)))throw new kPe.ValueError(\"missing top-level role\");this.roles=e.roles}}addKey(e,r){if(!this.roles[r])throw new kPe.ValueError(`role ${r} does not exist`);this.roles[r].keyIDs.includes(e.keyID)||this.roles[r].keyIDs.push(e.keyID),this.keys[e.keyID]=e}equals(e){return e instanceof t?super.equals(e)&&this.consistentSnapshot===e.consistentSnapshot&&xPe.default.isDeepStrictEqual(this.keys,e.keys)&&xPe.default.isDeepStrictEqual(this.roles,e.roles):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,keys:IBt(this.keys),roles:CBt(this.roles),consistent_snapshot:this.consistentSnapshot,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=AJ.Signed.commonFieldsFromJSON(e),{keys:a,roles:n,consistent_snapshot:c,...f}=r;if(typeof c!=\"boolean\")throw new TypeError(\"consistent_snapshot must be a boolean\");return new t({...s,keys:wBt(a),roles:BBt(n),consistentSnapshot:c,unrecognizedFields:f})}};a1.Root=pJ;function IBt(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function CBt(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function wBt(t){let e;if(JO.guard.isDefined(t)){if(!JO.guard.isObjectRecord(t))throw new TypeError(\"keys must be an object\");e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:EBt.Key.fromJSON(s,a)}),{})}return e}function BBt(t){let e;if(JO.guard.isDefined(t)){if(!JO.guard.isObjectRecord(t))throw new TypeError(\"roles must be an object\");e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:VO.Role.fromJSON(a)}),{})}return e}});var dJ=_(KO=>{\"use strict\";Object.defineProperty(KO,\"__esModule\",{value:!0});KO.Signature=void 0;var gJ=class t{constructor(e){let{keyID:r,sig:s}=e;this.keyID=r,this.sig=s}toJSON(){return{keyid:this.keyID,sig:this.sig}}static fromJSON(e){let{keyid:r,sig:s}=e;if(typeof r!=\"string\")throw new TypeError(\"keyid must be a string\");if(typeof s!=\"string\")throw new TypeError(\"sig must be a string\");return new t({keyID:r,sig:s})}};KO.Signature=gJ});var EJ=_(l1=>{\"use strict\";var vBt=l1&&l1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(l1,\"__esModule\",{value:!0});l1.Snapshot=void 0;var SBt=vBt(Ie(\"util\")),mJ=ay(),TPe=Tb(),QPe=ff(),yJ=class t extends mJ.Signed{constructor(e){super(e),this.type=mJ.MetadataKind.Snapshot,this.meta=e.meta||{\"targets.json\":new TPe.MetaFile({version:1})}}equals(e){return e instanceof t?super.equals(e)&&SBt.default.isDeepStrictEqual(this.meta,e.meta):!1}toJSON(){return{_type:this.type,meta:DBt(this.meta),spec_version:this.specVersion,version:this.version,expires:this.expires,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=mJ.Signed.commonFieldsFromJSON(e),{meta:a,...n}=r;return new t({...s,meta:bBt(a),unrecognizedFields:n})}};l1.Snapshot=yJ;function DBt(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function bBt(t){let e;if(QPe.guard.isDefined(t))if(QPe.guard.isObjectRecord(t))e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:TPe.MetaFile.fromJSON(a)}),{});else throw new TypeError(\"meta field is malformed\");return e}});var RPe=_(c1=>{\"use strict\";var PBt=c1&&c1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c1,\"__esModule\",{value:!0});c1.Delegations=void 0;var zO=PBt(Ie(\"util\")),xBt=PA(),kBt=NO(),IJ=fJ(),XO=ff(),CJ=class t{constructor(e){if(this.keys=e.keys,this.unrecognizedFields=e.unrecognizedFields||{},e.roles&&Object.keys(e.roles).some(r=>IJ.TOP_LEVEL_ROLE_NAMES.includes(r)))throw new xBt.ValueError(\"Delegated role name conflicts with top-level role name\");this.succinctRoles=e.succinctRoles,this.roles=e.roles}equals(e){return e instanceof t?zO.default.isDeepStrictEqual(this.keys,e.keys)&&zO.default.isDeepStrictEqual(this.roles,e.roles)&&zO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields)&&zO.default.isDeepStrictEqual(this.succinctRoles,e.succinctRoles):!1}*rolesForTarget(e){if(this.roles)for(let r of Object.values(this.roles))r.isDelegatedPath(e)&&(yield{role:r.name,terminating:r.terminating});else this.succinctRoles&&(yield{role:this.succinctRoles.getRoleForTarget(e),terminating:!0})}toJSON(){let e={keys:QBt(this.keys),...this.unrecognizedFields};return this.roles?e.roles=TBt(this.roles):this.succinctRoles&&(e.succinct_roles=this.succinctRoles.toJSON()),e}static fromJSON(e){let{keys:r,roles:s,succinct_roles:a,...n}=e,c;return XO.guard.isObject(a)&&(c=IJ.SuccinctRoles.fromJSON(a)),new t({keys:RBt(r),roles:FBt(s),unrecognizedFields:n,succinctRoles:c})}};c1.Delegations=CJ;function QBt(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function TBt(t){return Object.values(t).map(e=>e.toJSON())}function RBt(t){if(!XO.guard.isObjectRecord(t))throw new TypeError(\"keys is malformed\");return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:kBt.Key.fromJSON(r,s)}),{})}function FBt(t){let e;if(XO.guard.isDefined(t)){if(!XO.guard.isObjectArray(t))throw new TypeError(\"roles is malformed\");e=t.reduce((r,s)=>{let a=IJ.DelegatedRole.fromJSON(s);return{...r,[a.name]:a}},{})}return e}});var vJ=_(u1=>{\"use strict\";var NBt=u1&&u1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(u1,\"__esModule\",{value:!0});u1.Targets=void 0;var FPe=NBt(Ie(\"util\")),wJ=ay(),OBt=RPe(),LBt=Tb(),ZO=ff(),BJ=class t extends wJ.Signed{constructor(e){super(e),this.type=wJ.MetadataKind.Targets,this.targets=e.targets||{},this.delegations=e.delegations}addTarget(e){this.targets[e.path]=e}equals(e){return e instanceof t?super.equals(e)&&FPe.default.isDeepStrictEqual(this.targets,e.targets)&&FPe.default.isDeepStrictEqual(this.delegations,e.delegations):!1}toJSON(){let e={_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,targets:MBt(this.targets),...this.unrecognizedFields};return this.delegations&&(e.delegations=this.delegations.toJSON()),e}static fromJSON(e){let{unrecognizedFields:r,...s}=wJ.Signed.commonFieldsFromJSON(e),{targets:a,delegations:n,...c}=r;return new t({...s,targets:UBt(a),delegations:_Bt(n),unrecognizedFields:c})}};u1.Targets=BJ;function MBt(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function UBt(t){let e;if(ZO.guard.isDefined(t))if(ZO.guard.isObjectRecord(t))e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:LBt.TargetFile.fromJSON(s,a)}),{});else throw new TypeError(\"targets must be an object\");return e}function _Bt(t){let e;if(ZO.guard.isDefined(t))if(ZO.guard.isObject(t))e=OBt.Delegations.fromJSON(t);else throw new TypeError(\"delegations must be an object\");return e}});var PJ=_($O=>{\"use strict\";Object.defineProperty($O,\"__esModule\",{value:!0});$O.Timestamp=void 0;var SJ=ay(),NPe=Tb(),DJ=ff(),bJ=class t extends SJ.Signed{constructor(e){super(e),this.type=SJ.MetadataKind.Timestamp,this.snapshotMeta=e.snapshotMeta||new NPe.MetaFile({version:1})}equals(e){return e instanceof t?super.equals(e)&&this.snapshotMeta.equals(e.snapshotMeta):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,meta:{\"snapshot.json\":this.snapshotMeta.toJSON()},...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=SJ.Signed.commonFieldsFromJSON(e),{meta:a,...n}=r;return new t({...s,snapshotMeta:HBt(a),unrecognizedFields:n})}};$O.Timestamp=bJ;function HBt(t){let e;if(DJ.guard.isDefined(t)){let r=t[\"snapshot.json\"];if(!DJ.guard.isDefined(r)||!DJ.guard.isObject(r))throw new TypeError(\"missing snapshot.json in meta\");e=NPe.MetaFile.fromJSON(r)}return e}});var LPe=_(A1=>{\"use strict\";var jBt=A1&&A1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(A1,\"__esModule\",{value:!0});A1.Metadata=void 0;var GBt=V7(),OPe=jBt(Ie(\"util\")),f1=ay(),Ub=PA(),qBt=hJ(),WBt=dJ(),YBt=EJ(),VBt=vJ(),JBt=PJ(),xJ=ff(),kJ=class t{constructor(e,r,s){this.signed=e,this.signatures=r||{},this.unrecognizedFields=s||{}}sign(e,r=!0){let s=Buffer.from((0,GBt.canonicalize)(this.signed.toJSON())),a=e(s);r||(this.signatures={}),this.signatures[a.keyID]=a}verifyDelegate(e,r){let s,a={};switch(this.signed.type){case f1.MetadataKind.Root:a=this.signed.keys,s=this.signed.roles[e];break;case f1.MetadataKind.Targets:if(!this.signed.delegations)throw new Ub.ValueError(`No delegations found for ${e}`);a=this.signed.delegations.keys,this.signed.delegations.roles?s=this.signed.delegations.roles[e]:this.signed.delegations.succinctRoles&&this.signed.delegations.succinctRoles.isDelegatedRole(e)&&(s=this.signed.delegations.succinctRoles);break;default:throw new TypeError(\"invalid metadata type\")}if(!s)throw new Ub.ValueError(`no delegation found for ${e}`);let n=new Set;if(s.keyIDs.forEach(c=>{let f=a[c];if(f)try{f.verifySignature(r),n.add(f.keyID)}catch{}}),n.size<s.threshold)throw new Ub.UnsignedMetadataError(`${e} was signed by ${n.size}/${s.threshold} keys`)}equals(e){return e instanceof t?this.signed.equals(e.signed)&&OPe.default.isDeepStrictEqual(this.signatures,e.signatures)&&OPe.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{signatures:Object.values(this.signatures).map(r=>r.toJSON()),signed:this.signed.toJSON(),...this.unrecognizedFields}}static fromJSON(e,r){let{signed:s,signatures:a,...n}=r;if(!xJ.guard.isDefined(s)||!xJ.guard.isObject(s))throw new TypeError(\"signed is not defined\");if(e!==s._type)throw new Ub.ValueError(`expected '${e}', got ${s._type}`);if(!xJ.guard.isObjectArray(a))throw new TypeError(\"signatures is not an array\");let c;switch(e){case f1.MetadataKind.Root:c=qBt.Root.fromJSON(s);break;case f1.MetadataKind.Timestamp:c=JBt.Timestamp.fromJSON(s);break;case f1.MetadataKind.Snapshot:c=YBt.Snapshot.fromJSON(s);break;case f1.MetadataKind.Targets:c=VBt.Targets.fromJSON(s);break;default:throw new TypeError(\"invalid metadata type\")}let f={};return a.forEach(p=>{let h=WBt.Signature.fromJSON(p);if(f[h.keyID])throw new Ub.ValueError(`multiple signatures found for keyid: ${h.keyID}`);f[h.keyID]=h}),new t(c,f,n)}};A1.Metadata=kJ});var eL=_(Fi=>{\"use strict\";Object.defineProperty(Fi,\"__esModule\",{value:!0});Fi.Timestamp=Fi.Targets=Fi.Snapshot=Fi.Signature=Fi.Root=Fi.Metadata=Fi.Key=Fi.TargetFile=Fi.MetaFile=Fi.ValueError=Fi.MetadataKind=void 0;var KBt=ay();Object.defineProperty(Fi,\"MetadataKind\",{enumerable:!0,get:function(){return KBt.MetadataKind}});var zBt=PA();Object.defineProperty(Fi,\"ValueError\",{enumerable:!0,get:function(){return zBt.ValueError}});var MPe=Tb();Object.defineProperty(Fi,\"MetaFile\",{enumerable:!0,get:function(){return MPe.MetaFile}});Object.defineProperty(Fi,\"TargetFile\",{enumerable:!0,get:function(){return MPe.TargetFile}});var XBt=NO();Object.defineProperty(Fi,\"Key\",{enumerable:!0,get:function(){return XBt.Key}});var ZBt=LPe();Object.defineProperty(Fi,\"Metadata\",{enumerable:!0,get:function(){return ZBt.Metadata}});var $Bt=hJ();Object.defineProperty(Fi,\"Root\",{enumerable:!0,get:function(){return $Bt.Root}});var evt=dJ();Object.defineProperty(Fi,\"Signature\",{enumerable:!0,get:function(){return evt.Signature}});var tvt=EJ();Object.defineProperty(Fi,\"Snapshot\",{enumerable:!0,get:function(){return tvt.Snapshot}});var rvt=vJ();Object.defineProperty(Fi,\"Targets\",{enumerable:!0,get:function(){return rvt.Targets}});var nvt=PJ();Object.defineProperty(Fi,\"Timestamp\",{enumerable:!0,get:function(){return nvt.Timestamp}})});var _Pe=_((Dir,UPe)=>{var p1=1e3,h1=p1*60,g1=h1*60,uy=g1*24,ivt=uy*7,svt=uy*365.25;UPe.exports=function(t,e){e=e||{};var r=typeof t;if(r===\"string\"&&t.length>0)return ovt(t);if(r===\"number\"&&isFinite(t))return e.long?lvt(t):avt(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))};function ovt(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),s=(e[2]||\"ms\").toLowerCase();switch(s){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return r*svt;case\"weeks\":case\"week\":case\"w\":return r*ivt;case\"days\":case\"day\":case\"d\":return r*uy;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return r*g1;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return r*h1;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return r*p1;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return r;default:return}}}}function avt(t){var e=Math.abs(t);return e>=uy?Math.round(t/uy)+\"d\":e>=g1?Math.round(t/g1)+\"h\":e>=h1?Math.round(t/h1)+\"m\":e>=p1?Math.round(t/p1)+\"s\":t+\"ms\"}function lvt(t){var e=Math.abs(t);return e>=uy?tL(t,e,uy,\"day\"):e>=g1?tL(t,e,g1,\"hour\"):e>=h1?tL(t,e,h1,\"minute\"):e>=p1?tL(t,e,p1,\"second\"):t+\" ms\"}function tL(t,e,r,s){var a=e>=r*1.5;return Math.round(t/r)+\" \"+s+(a?\"s\":\"\")}});var QJ=_((bir,HPe)=>{function cvt(t){r.debug=r,r.default=r,r.coerce=p,r.disable=c,r.enable=a,r.enabled=f,r.humanize=_Pe(),r.destroy=h,Object.keys(t).forEach(E=>{r[E]=t[E]}),r.names=[],r.skips=[],r.formatters={};function e(E){let C=0;for(let S=0;S<E.length;S++)C=(C<<5)-C+E.charCodeAt(S),C|=0;return r.colors[Math.abs(C)%r.colors.length]}r.selectColor=e;function r(E){let C,S=null,P,I;function R(...N){if(!R.enabled)return;let U=R,W=Number(new Date),ee=W-(C||W);U.diff=ee,U.prev=C,U.curr=W,C=W,N[0]=r.coerce(N[0]),typeof N[0]!=\"string\"&&N.unshift(\"%O\");let ie=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(le,me)=>{if(le===\"%%\")return\"%\";ie++;let pe=r.formatters[me];if(typeof pe==\"function\"){let Be=N[ie];le=pe.call(U,Be),N.splice(ie,1),ie--}return le}),r.formatArgs.call(U,N),(U.log||r.log).apply(U,N)}return R.namespace=E,R.useColors=r.useColors(),R.color=r.selectColor(E),R.extend=s,R.destroy=r.destroy,Object.defineProperty(R,\"enabled\",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(P!==r.namespaces&&(P=r.namespaces,I=r.enabled(E)),I),set:N=>{S=N}}),typeof r.init==\"function\"&&r.init(R),R}function s(E,C){let S=r(this.namespace+(typeof C>\"u\"?\":\":C)+E);return S.log=this.log,S}function a(E){r.save(E),r.namespaces=E,r.names=[],r.skips=[];let C=(typeof E==\"string\"?E:\"\").trim().replace(\" \",\",\").split(\",\").filter(Boolean);for(let S of C)S[0]===\"-\"?r.skips.push(S.slice(1)):r.names.push(S)}function n(E,C){let S=0,P=0,I=-1,R=0;for(;S<E.length;)if(P<C.length&&(C[P]===E[S]||C[P]===\"*\"))C[P]===\"*\"?(I=P,R=S,P++):(S++,P++);else if(I!==-1)P=I+1,R++,S=R;else return!1;for(;P<C.length&&C[P]===\"*\";)P++;return P===C.length}function c(){let E=[...r.names,...r.skips.map(C=>\"-\"+C)].join(\",\");return r.enable(\"\"),E}function f(E){for(let C of r.skips)if(n(E,C))return!1;for(let C of r.names)if(n(E,C))return!0;return!1}function p(E){return E instanceof Error?E.stack||E.message:E}function h(){console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\")}return r.enable(r.load()),r}HPe.exports=cvt});var jPe=_((sc,rL)=>{sc.formatArgs=fvt;sc.save=Avt;sc.load=pvt;sc.useColors=uvt;sc.storage=hvt();sc.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"))}})();sc.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"];function uvt(){if(typeof window<\"u\"&&window.process&&(window.process.type===\"renderer\"||window.process.__nwjs))return!0;if(typeof navigator<\"u\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;let t;return typeof document<\"u\"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<\"u\"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<\"u\"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<\"u\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}function fvt(t){if(t[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+t[0]+(this.useColors?\"%c \":\" \")+\"+\"+rL.exports.humanize(this.diff),!this.useColors)return;let e=\"color: \"+this.color;t.splice(1,0,e,\"color: inherit\");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,a=>{a!==\"%%\"&&(r++,a===\"%c\"&&(s=r))}),t.splice(s,0,e)}sc.log=console.debug||console.log||(()=>{});function Avt(t){try{t?sc.storage.setItem(\"debug\",t):sc.storage.removeItem(\"debug\")}catch{}}function pvt(){let t;try{t=sc.storage.getItem(\"debug\")}catch{}return!t&&typeof process<\"u\"&&\"env\"in process&&(t=process.env.DEBUG),t}function hvt(){try{return localStorage}catch{}}rL.exports=QJ()(sc);var{formatters:gvt}=rL.exports;gvt.j=function(t){try{return JSON.stringify(t)}catch(e){return\"[UnexpectedJSONParseError]: \"+e.message}}});var qPe=_((Zs,iL)=>{var dvt=Ie(\"tty\"),nL=Ie(\"util\");Zs.init=Bvt;Zs.log=Ivt;Zs.formatArgs=yvt;Zs.save=Cvt;Zs.load=wvt;Zs.useColors=mvt;Zs.destroy=nL.deprecate(()=>{},\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\");Zs.colors=[6,2,3,4,5,1];try{let t=Ie(\"supports-color\");t&&(t.stderr||t).level>=2&&(Zs.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Zs.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(a,n)=>n.toUpperCase()),s=process.env[e];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s===\"null\"?s=null:s=Number(s),t[r]=s,t},{});function mvt(){return\"colors\"in Zs.inspectOpts?!!Zs.inspectOpts.colors:dvt.isatty(process.stderr.fd)}function yvt(t){let{namespace:e,useColors:r}=this;if(r){let s=this.color,a=\"\\x1B[3\"+(s<8?s:\"8;5;\"+s),n=`  ${a};1m${e} \\x1B[0m`;t[0]=n+t[0].split(`\n`).join(`\n`+n),t.push(a+\"m+\"+iL.exports.humanize(this.diff)+\"\\x1B[0m\")}else t[0]=Evt()+e+\" \"+t[0]}function Evt(){return Zs.inspectOpts.hideDate?\"\":new Date().toISOString()+\" \"}function Ivt(...t){return process.stderr.write(nL.formatWithOptions(Zs.inspectOpts,...t)+`\n`)}function Cvt(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function wvt(){return process.env.DEBUG}function Bvt(t){t.inspectOpts={};let e=Object.keys(Zs.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Zs.inspectOpts[e[r]]}iL.exports=QJ()(Zs);var{formatters:GPe}=iL.exports;GPe.o=function(t){return this.inspectOpts.colors=this.useColors,nL.inspect(t,this.inspectOpts).split(`\n`).map(e=>e.trim()).join(\" \")};GPe.O=function(t){return this.inspectOpts.colors=this.useColors,nL.inspect(t,this.inspectOpts)}});var RJ=_((Pir,TJ)=>{typeof process>\"u\"||process.type===\"renderer\"||process.browser===!0||process.__nwjs?TJ.exports=jPe():TJ.exports=qPe()});var oL=_(Ki=>{\"use strict\";Object.defineProperty(Ki,\"__esModule\",{value:!0});Ki.DownloadHTTPError=Ki.DownloadLengthMismatchError=Ki.DownloadError=Ki.ExpiredMetadataError=Ki.EqualVersionError=Ki.BadVersionError=Ki.RepositoryError=Ki.PersistError=Ki.RuntimeError=Ki.ValueError=void 0;var FJ=class extends Error{};Ki.ValueError=FJ;var NJ=class extends Error{};Ki.RuntimeError=NJ;var OJ=class extends Error{};Ki.PersistError=OJ;var _b=class extends Error{};Ki.RepositoryError=_b;var sL=class extends _b{};Ki.BadVersionError=sL;var LJ=class extends sL{};Ki.EqualVersionError=LJ;var MJ=class extends _b{};Ki.ExpiredMetadataError=MJ;var Hb=class extends Error{};Ki.DownloadError=Hb;var UJ=class extends Hb{};Ki.DownloadLengthMismatchError=UJ;var _J=class extends Hb{constructor(e,r){super(e),this.statusCode=r}};Ki.DownloadHTTPError=_J});var YPe=_(d1=>{\"use strict\";var jJ=d1&&d1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(d1,\"__esModule\",{value:!0});d1.withTempFile=void 0;var HJ=jJ(Ie(\"fs/promises\")),vvt=jJ(Ie(\"os\")),WPe=jJ(Ie(\"path\")),Svt=async t=>Dvt(async e=>t(WPe.default.join(e,\"tempfile\")));d1.withTempFile=Svt;var Dvt=async t=>{let e=await HJ.default.realpath(vvt.default.tmpdir()),r=await HJ.default.mkdtemp(e+WPe.default.sep);try{return await t(r)}finally{await HJ.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}}});var qJ=_(kg=>{\"use strict\";var lL=kg&&kg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kg,\"__esModule\",{value:!0});kg.DefaultFetcher=kg.BaseFetcher=void 0;var bvt=lL(RJ()),VPe=lL(Ie(\"fs\")),Pvt=lL(CO()),xvt=lL(Ie(\"util\")),JPe=oL(),kvt=YPe(),Qvt=(0,bvt.default)(\"tuf:fetch\"),aL=class{async downloadFile(e,r,s){return(0,kvt.withTempFile)(async a=>{let n=await this.fetch(e),c=0,f=VPe.default.createWriteStream(a);try{for await(let p of n){let h=Buffer.from(p);if(c+=h.length,c>r)throw new JPe.DownloadLengthMismatchError(\"Max length reached\");await Tvt(f,h)}}finally{await xvt.default.promisify(f.close).bind(f)()}return s(a)})}async downloadBytes(e,r){return this.downloadFile(e,r,async s=>{let a=VPe.default.createReadStream(s),n=[];for await(let c of a)n.push(c);return Buffer.concat(n)})}};kg.BaseFetcher=aL;var GJ=class extends aL{constructor(e={}){super(),this.timeout=e.timeout,this.retry=e.retry}async fetch(e){Qvt(\"GET %s\",e);let r=await(0,Pvt.default)(e,{timeout:this.timeout,retry:this.retry});if(!r.ok||!r?.body)throw new JPe.DownloadHTTPError(\"Failed to download\",r.status);return r.body}};kg.DefaultFetcher=GJ;var Tvt=async(t,e)=>new Promise((r,s)=>{t.write(e,a=>{a&&s(a),r(!0)})})});var KPe=_(cL=>{\"use strict\";Object.defineProperty(cL,\"__esModule\",{value:!0});cL.defaultConfig=void 0;cL.defaultConfig={maxRootRotations:256,maxDelegations:32,rootMaxLength:512e3,timestampMaxLength:16384,snapshotMaxLength:2e6,targetsMaxLength:5e6,prefixTargetsWithHash:!0,fetchTimeout:1e5,fetchRetries:void 0,fetchRetry:2}});var zPe=_(uL=>{\"use strict\";Object.defineProperty(uL,\"__esModule\",{value:!0});uL.TrustedMetadataStore=void 0;var Es=eL(),Hi=oL(),WJ=class{constructor(e){this.trustedSet={},this.referenceTime=new Date,this.loadTrustedRoot(e)}get root(){if(!this.trustedSet.root)throw new ReferenceError(\"No trusted root metadata\");return this.trustedSet.root}get timestamp(){return this.trustedSet.timestamp}get snapshot(){return this.trustedSet.snapshot}get targets(){return this.trustedSet.targets}getRole(e){return this.trustedSet[e]}updateRoot(e){let r=JSON.parse(e.toString(\"utf8\")),s=Es.Metadata.fromJSON(Es.MetadataKind.Root,r);if(s.signed.type!=Es.MetadataKind.Root)throw new Hi.RepositoryError(`Expected 'root', got ${s.signed.type}`);if(this.root.verifyDelegate(Es.MetadataKind.Root,s),s.signed.version!=this.root.signed.version+1)throw new Hi.BadVersionError(`Expected version ${this.root.signed.version+1}, got ${s.signed.version}`);return s.verifyDelegate(Es.MetadataKind.Root,s),this.trustedSet.root=s,s}updateTimestamp(e){if(this.snapshot)throw new Hi.RuntimeError(\"Cannot update timestamp after snapshot\");if(this.root.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError(\"Final root.json is expired\");let r=JSON.parse(e.toString(\"utf8\")),s=Es.Metadata.fromJSON(Es.MetadataKind.Timestamp,r);if(s.signed.type!=Es.MetadataKind.Timestamp)throw new Hi.RepositoryError(`Expected 'timestamp', got ${s.signed.type}`);if(this.root.verifyDelegate(Es.MetadataKind.Timestamp,s),this.timestamp){if(s.signed.version<this.timestamp.signed.version)throw new Hi.BadVersionError(`New timestamp version ${s.signed.version} is less than current version ${this.timestamp.signed.version}`);if(s.signed.version===this.timestamp.signed.version)throw new Hi.EqualVersionError(`New timestamp version ${s.signed.version} is equal to current version ${this.timestamp.signed.version}`);let a=this.timestamp.signed.snapshotMeta,n=s.signed.snapshotMeta;if(n.version<a.version)throw new Hi.BadVersionError(`New snapshot version ${n.version} is less than current version ${a.version}`)}return this.trustedSet.timestamp=s,this.checkFinalTimestamp(),s}updateSnapshot(e,r=!1){if(!this.timestamp)throw new Hi.RuntimeError(\"Cannot update snapshot before timestamp\");if(this.targets)throw new Hi.RuntimeError(\"Cannot update snapshot after targets\");this.checkFinalTimestamp();let s=this.timestamp.signed.snapshotMeta;r||s.verify(e);let a=JSON.parse(e.toString(\"utf8\")),n=Es.Metadata.fromJSON(Es.MetadataKind.Snapshot,a);if(n.signed.type!=Es.MetadataKind.Snapshot)throw new Hi.RepositoryError(`Expected 'snapshot', got ${n.signed.type}`);return this.root.verifyDelegate(Es.MetadataKind.Snapshot,n),this.snapshot&&Object.entries(this.snapshot.signed.meta).forEach(([c,f])=>{let p=n.signed.meta[c];if(!p)throw new Hi.RepositoryError(`Missing file ${c} in new snapshot`);if(p.version<f.version)throw new Hi.BadVersionError(`New version ${p.version} of ${c} is less than current version ${f.version}`)}),this.trustedSet.snapshot=n,this.checkFinalSnapsnot(),n}updateDelegatedTargets(e,r,s){if(!this.snapshot)throw new Hi.RuntimeError(\"Cannot update delegated targets before snapshot\");this.checkFinalSnapsnot();let a=this.trustedSet[s];if(!a)throw new Hi.RuntimeError(`No trusted ${s} metadata`);let n=this.snapshot.signed.meta?.[`${r}.json`];if(!n)throw new Hi.RepositoryError(`Missing ${r}.json in snapshot`);n.verify(e);let c=JSON.parse(e.toString(\"utf8\")),f=Es.Metadata.fromJSON(Es.MetadataKind.Targets,c);if(f.signed.type!=Es.MetadataKind.Targets)throw new Hi.RepositoryError(`Expected 'targets', got ${f.signed.type}`);a.verifyDelegate(r,f);let p=f.signed.version;if(p!=n.version)throw new Hi.BadVersionError(`Version ${p} of ${r} does not match snapshot version ${n.version}`);if(f.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError(`${r}.json is expired`);this.trustedSet[r]=f}loadTrustedRoot(e){let r=JSON.parse(e.toString(\"utf8\")),s=Es.Metadata.fromJSON(Es.MetadataKind.Root,r);if(s.signed.type!=Es.MetadataKind.Root)throw new Hi.RepositoryError(`Expected 'root', got ${s.signed.type}`);s.verifyDelegate(Es.MetadataKind.Root,s),this.trustedSet.root=s}checkFinalTimestamp(){if(!this.timestamp)throw new ReferenceError(\"No trusted timestamp metadata\");if(this.timestamp.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError(\"Final timestamp.json is expired\")}checkFinalSnapsnot(){if(!this.snapshot)throw new ReferenceError(\"No trusted snapshot metadata\");if(!this.timestamp)throw new ReferenceError(\"No trusted timestamp metadata\");if(this.snapshot.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError(\"snapshot.json is expired\");let e=this.timestamp.signed.snapshotMeta;if(this.snapshot.signed.version!==e.version)throw new Hi.BadVersionError(\"Snapshot version doesn't match timestamp\")}};uL.TrustedMetadataStore=WJ});var XPe=_(YJ=>{\"use strict\";Object.defineProperty(YJ,\"__esModule\",{value:!0});YJ.join=Fvt;var Rvt=Ie(\"url\");function Fvt(t,e){return new Rvt.URL(Nvt(t)+Ovt(e)).toString()}function Nvt(t){return t.endsWith(\"/\")?t:t+\"/\"}function Ovt(t){return t.startsWith(\"/\")?t.slice(1):t}});var ZPe=_(nu=>{\"use strict\";var Lvt=nu&&nu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Mvt=nu&&nu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KJ=nu&&nu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!==\"default\"&&Object.prototype.hasOwnProperty.call(t,r)&&Lvt(e,t,r);return Mvt(e,t),e},Uvt=nu&&nu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nu,\"__esModule\",{value:!0});nu.Updater=void 0;var xA=eL(),_vt=Uvt(RJ()),m1=KJ(Ie(\"fs\")),fL=KJ(Ie(\"path\")),Hvt=KPe(),fy=oL(),jvt=qJ(),Gvt=zPe(),jb=KJ(XPe()),VJ=(0,_vt.default)(\"tuf:cache\"),JJ=class{constructor(e){let{metadataDir:r,metadataBaseUrl:s,targetDir:a,targetBaseUrl:n,fetcher:c,config:f}=e;this.dir=r,this.metadataBaseUrl=s,this.targetDir=a,this.targetBaseUrl=n,this.forceCache=e.forceCache??!1;let p=this.loadLocalMetadata(xA.MetadataKind.Root);this.trustedSet=new Gvt.TrustedMetadataStore(p),this.config={...Hvt.defaultConfig,...f},this.fetcher=c||new jvt.DefaultFetcher({timeout:this.config.fetchTimeout,retry:this.config.fetchRetries??this.config.fetchRetry})}async refresh(){if(this.forceCache)try{await this.loadTimestamp({checkRemote:!1})}catch{await this.loadRoot(),await this.loadTimestamp()}else await this.loadRoot(),await this.loadTimestamp();await this.loadSnapshot(),await this.loadTargets(xA.MetadataKind.Targets,xA.MetadataKind.Root)}async getTargetInfo(e){return this.trustedSet.targets||await this.refresh(),this.preorderDepthFirstWalk(e)}async downloadTarget(e,r,s){let a=r||this.generateTargetPath(e);if(!s){if(!this.targetBaseUrl)throw new fy.ValueError(\"Target base URL not set\");s=this.targetBaseUrl}let n=e.path;if(this.trustedSet.root.signed.consistentSnapshot&&this.config.prefixTargetsWithHash){let p=Object.values(e.hashes),{dir:h,base:E}=fL.parse(n),C=`${p[0]}.${E}`;n=h?`${h}/${C}`:C}let f=jb.join(s,n);return await this.fetcher.downloadFile(f,e.length,async p=>{await e.verify(m1.createReadStream(p)),VJ(\"WRITE %s\",a),m1.copyFileSync(p,a)}),a}async findCachedTarget(e,r){r||(r=this.generateTargetPath(e));try{if(m1.existsSync(r))return await e.verify(m1.createReadStream(r)),r}catch{return}}loadLocalMetadata(e){let r=fL.join(this.dir,`${e}.json`);return VJ(\"READ %s\",r),m1.readFileSync(r)}async loadRoot(){let r=this.trustedSet.root.signed.version+1,s=r+this.config.maxRootRotations;for(let a=r;a<s;a++){let n=jb.join(this.metadataBaseUrl,`${a}.root.json`);try{let c=await this.fetcher.downloadBytes(n,this.config.rootMaxLength);this.trustedSet.updateRoot(c),this.persistMetadata(xA.MetadataKind.Root,c)}catch(c){if(c instanceof fy.DownloadHTTPError&&[403,404].includes(c.statusCode))break;throw c}}}async loadTimestamp({checkRemote:e}={checkRemote:!0}){try{let a=this.loadLocalMetadata(xA.MetadataKind.Timestamp);if(this.trustedSet.updateTimestamp(a),!e)return}catch{}let r=jb.join(this.metadataBaseUrl,\"timestamp.json\"),s=await this.fetcher.downloadBytes(r,this.config.timestampMaxLength);try{this.trustedSet.updateTimestamp(s)}catch(a){if(a instanceof fy.EqualVersionError)return;throw a}this.persistMetadata(xA.MetadataKind.Timestamp,s)}async loadSnapshot(){try{let e=this.loadLocalMetadata(xA.MetadataKind.Snapshot);this.trustedSet.updateSnapshot(e,!0)}catch{if(!this.trustedSet.timestamp)throw new ReferenceError(\"No timestamp metadata\");let r=this.trustedSet.timestamp.signed.snapshotMeta,s=r.length||this.config.snapshotMaxLength,a=this.trustedSet.root.signed.consistentSnapshot?r.version:void 0,n=jb.join(this.metadataBaseUrl,a?`${a}.snapshot.json`:\"snapshot.json\");try{let c=await this.fetcher.downloadBytes(n,s);this.trustedSet.updateSnapshot(c),this.persistMetadata(xA.MetadataKind.Snapshot,c)}catch(c){throw new fy.RuntimeError(`Unable to load snapshot metadata error ${c}`)}}}async loadTargets(e,r){if(this.trustedSet.getRole(e))return this.trustedSet.getRole(e);try{let s=this.loadLocalMetadata(e);this.trustedSet.updateDelegatedTargets(s,e,r)}catch{if(!this.trustedSet.snapshot)throw new ReferenceError(\"No snapshot metadata\");let a=this.trustedSet.snapshot.signed.meta[`${e}.json`],n=a.length||this.config.targetsMaxLength,c=this.trustedSet.root.signed.consistentSnapshot?a.version:void 0,f=encodeURIComponent(e),p=jb.join(this.metadataBaseUrl,c?`${c}.${f}.json`:`${f}.json`);try{let h=await this.fetcher.downloadBytes(p,n);this.trustedSet.updateDelegatedTargets(h,e,r),this.persistMetadata(e,h)}catch(h){throw new fy.RuntimeError(`Unable to load targets error ${h}`)}}return this.trustedSet.getRole(e)}async preorderDepthFirstWalk(e){let r=[{roleName:xA.MetadataKind.Targets,parentRoleName:xA.MetadataKind.Root}],s=new Set;for(;s.size<=this.config.maxDelegations&&r.length>0;){let{roleName:a,parentRoleName:n}=r.pop();if(s.has(a))continue;let c=(await this.loadTargets(a,n))?.signed;if(!c)continue;let f=c.targets?.[e];if(f)return f;if(s.add(a),c.delegations){let p=[],h=c.delegations.rolesForTarget(e);for(let{role:E,terminating:C}of h)if(p.push({roleName:E,parentRoleName:a}),C){r.splice(0);break}p.reverse(),r.push(...p)}}}generateTargetPath(e){if(!this.targetDir)throw new fy.ValueError(\"Target directory not set\");let r=encodeURIComponent(e.path);return fL.join(this.targetDir,r)}persistMetadata(e,r){let s=encodeURIComponent(e);try{let a=fL.join(this.dir,`${s}.json`);VJ(\"WRITE %s\",a),m1.writeFileSync(a,r.toString(\"utf8\"))}catch(a){throw new fy.PersistError(`Failed to persist metadata ${s} error: ${a}`)}}};nu.Updater=JJ});var $Pe=_(Qg=>{\"use strict\";Object.defineProperty(Qg,\"__esModule\",{value:!0});Qg.Updater=Qg.BaseFetcher=Qg.TargetFile=void 0;var qvt=eL();Object.defineProperty(Qg,\"TargetFile\",{enumerable:!0,get:function(){return qvt.TargetFile}});var Wvt=qJ();Object.defineProperty(Qg,\"BaseFetcher\",{enumerable:!0,get:function(){return Wvt.BaseFetcher}});var Yvt=ZPe();Object.defineProperty(Qg,\"Updater\",{enumerable:!0,get:function(){return Yvt.Updater}})});var XJ=_(AL=>{\"use strict\";Object.defineProperty(AL,\"__esModule\",{value:!0});AL.TUFError=void 0;var zJ=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.code=e,this.cause=s,this.name=this.constructor.name}};AL.TUFError=zJ});var exe=_(Gb=>{\"use strict\";var Vvt=Gb&&Gb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Gb,\"__esModule\",{value:!0});Gb.readTarget=Kvt;var Jvt=Vvt(Ie(\"fs\")),pL=XJ();async function Kvt(t,e){let r=await zvt(t,e);return new Promise((s,a)=>{Jvt.default.readFile(r,\"utf-8\",(n,c)=>{n?a(new pL.TUFError({code:\"TUF_READ_TARGET_ERROR\",message:`error reading target ${r}`,cause:n})):s(c)})})}async function zvt(t,e){let r;try{r=await t.getTargetInfo(e)}catch(a){throw new pL.TUFError({code:\"TUF_REFRESH_METADATA_ERROR\",message:\"error refreshing TUF metadata\",cause:a})}if(!r)throw new pL.TUFError({code:\"TUF_FIND_TARGET_ERROR\",message:`target ${e} not found`});let s=await t.findCachedTarget(r);if(!s)try{s=await t.downloadTarget(r)}catch(a){throw new pL.TUFError({code:\"TUF_DOWNLOAD_TARGET_ERROR\",message:`error downloading target ${s}`,cause:a})}return s}});var txe=_((Uir,Xvt)=>{Xvt.exports={\"https://tuf-repo-cdn.sigstore.dev\":{\"root.json\":\"ewogInNpZ25hdHVyZXMiOiBbCiAgewogICAia2V5aWQiOiAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICJzaWciOiAiMzA0NjAyMjEwMDhhYjFmNmYxN2Q0ZjllNmQ3ZGNmMWM4ODkxMmI2YjUzY2MxMDM4ODY0NGFlMWYwOWJjMzdhMDgyY2QwNjAwM2UwMjIxMDBlMTQ1ZWY0YzdiNzgyZDRlODEwN2I1MzQzN2U2NjlkMDQ3Njg5MmNlOTk5OTAzYWUzM2QxNDQ0ODM2Njk5NmU3IgogIH0sCiAgewogICAia2V5aWQiOiAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICJzaWciOiAiMzA0NTAyMjEwMGM3NjhiMmY4NmRhOTk1NjkwMTljMTYwYTA4MWRhNTRhZTM2YzM0YzBhMzEyMGQzY2I2OWI1M2I3ZDExMzc1OGUwMjIwNGY2NzE1MThmNjE3YjIwZDQ2NTM3ZmFlNmMzYjYzYmFlODkxM2Y0ZjE5NjIxNTYxMDVjYzRmMDE5YWMzNWM2YSIKICB9LAogIHsKICAgImtleWlkIjogIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAic2lnIjogIjMwNDUwMjIxMDB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QVFZd0VnWURWUjBUQVFIL0JBZ3dCZ0VCL3dJQkFqQWRCZ05WSFE0RUZnUVU5TllZbG9ibkFHNGMwL3FqeHlIL2xxL3d6K1F3Q2dZSUtvWkl6ajBFQXdNRGFBQXdaUUl4QUxaTFo4QmdSWHpLeExNTU45VklsTytlNGhyQm5OQmdGN3R6N0hucm93djJOZXRaRXJJQUNLRnltQmx2V0R2dE1BSXdaTytraTZzc1ExYnNabzk4TzhtRUFmMk5aN2lpQ2dERFUwVndqZWNvNnp5ZWgwekJUczkvN2dWNkFITlE1M3hEIgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgInZhbGlkRm9yIjogewogICAgICAgICJzdGFydCI6ICIyMDIzLTA0LTE0VDAwOjAwOjAwLjAwMFoiCiAgICAgIH0KICAgIH0KICBdCn0K\",\"registry.npmjs.org%2Fkeys.json\":\"ewogICAgImtleXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OmpsM2J3c3d1ODBQampva0NnaDBvMnc1YzJVNExoUUFFNTdnajljejFrekEiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTFPbGIzek1BRkZ4WEtIaUlrUU81Y0ozWWhsNWk2VVBwK0lodXRlQkpidUhjQTVVb2dLbzBFV3RsV3dXNktTYUtvVE5FWUw3SmxDUWlWbmtoQmt0VWdnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIxOTk5LTAxLTAxVDAwOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAgICAgICAgICJlbmQiOiAiMjAyNS0wMS0yOVQwMDowMDowMC4wMDBaIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJrZXlJZCI6ICJTSEEyNTY6amwzYndzd3U4MFBqam9rQ2doMG8ydzVjMlU0TGhRQUU1N2dqOWN6MWt6QSIsCiAgICAgICAgICAgICJrZXlVc2FnZSI6ICJucG06YXR0ZXN0YXRpb25zIiwKICAgICAgICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUxT2xiM3pNQUZGeFhLSGlJa1FPNWNKM1lobDVpNlVQcCtJaHV0ZUJKYnVIY0E1VW9nS28wRVd0bFd3VzZLU2FLb1RORVlMN0psQ1FpVm5raEJrdFVnZz09IiwKICAgICAgICAgICAgICAgICJrZXlEZXRhaWxzIjogIlBLSVhfRUNEU0FfUDI1Nl9TSEFfMjU2IiwKICAgICAgICAgICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICAgICAgICAgICAic3RhcnQiOiAiMjAyMi0xMi0wMVQwMDowMDowMC4wMDBaIiwKICAgICAgICAgICAgICAgICAgICAiZW5kIjogIjIwMjUtMDEtMjlUMDA6MDA6MDAuMDAwWiIKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OkRoUTh3UjVBUEJ2RkhMRi8rVGMrQVl2UE9kVHBjSURxT2h4c0JIUndDN1UiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImtleUlkIjogIlNIQTI1NjpEaFE4d1I1QVBCdkZITEYvK1RjK0FZdlBPZFRwY0lEcU9oeHNCSFJ3QzdVIiwKICAgICAgICAgICAgImtleVVzYWdlIjogIm5wbTphdHRlc3RhdGlvbnMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdCn0K\"}}}});var nxe=_(y1=>{\"use strict\";var rxe=y1&&y1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(y1,\"__esModule\",{value:!0});y1.TUFClient=void 0;var Tg=rxe(Ie(\"fs\")),qb=rxe(Ie(\"path\")),Zvt=$Pe(),$vt=hL(),eSt=exe(),$J=\"targets\",ZJ=class{constructor(e){let r=new URL(e.mirrorURL),s=encodeURIComponent(r.host+r.pathname.replace(/\\/$/,\"\")),a=qb.default.join(e.cachePath,s);tSt(a),rSt({cachePath:a,mirrorURL:e.mirrorURL,tufRootPath:e.rootPath,forceInit:e.forceInit}),this.updater=nSt({mirrorURL:e.mirrorURL,cachePath:a,forceCache:e.forceCache,retry:e.retry,timeout:e.timeout})}async refresh(){return this.updater.refresh()}getTarget(e){return(0,eSt.readTarget)(this.updater,e)}};y1.TUFClient=ZJ;function tSt(t){let e=qb.default.join(t,$J);Tg.default.existsSync(t)||Tg.default.mkdirSync(t,{recursive:!0}),Tg.default.existsSync(e)||Tg.default.mkdirSync(e)}function rSt({cachePath:t,mirrorURL:e,tufRootPath:r,forceInit:s}){let a=qb.default.join(t,\"root.json\");if(!Tg.default.existsSync(a)||s)if(r)Tg.default.copyFileSync(r,a);else{let c=txe()[e];if(!c)throw new $vt.TUFError({code:\"TUF_INIT_CACHE_ERROR\",message:`No root.json found for mirror: ${e}`});Tg.default.writeFileSync(a,Buffer.from(c[\"root.json\"],\"base64\")),Object.entries(c.targets).forEach(([f,p])=>{Tg.default.writeFileSync(qb.default.join(t,$J,f),Buffer.from(p,\"base64\"))})}}function nSt(t){let e={fetchTimeout:t.timeout,fetchRetry:t.retry};return new Zvt.Updater({metadataBaseUrl:t.mirrorURL,targetBaseUrl:`${t.mirrorURL}/targets`,metadataDir:t.cachePath,targetDir:qb.default.join(t.cachePath,$J),forceCache:t.forceCache,config:e})}});var hL=_(gh=>{\"use strict\";Object.defineProperty(gh,\"__esModule\",{value:!0});gh.TUFError=gh.DEFAULT_MIRROR_URL=void 0;gh.getTrustedRoot=fSt;gh.initTUF=ASt;var iSt=yb(),sSt=Obe(),oSt=nxe();gh.DEFAULT_MIRROR_URL=\"https://tuf-repo-cdn.sigstore.dev\";var aSt=\"sigstore-js\",lSt={retries:2},cSt=5e3,uSt=\"trusted_root.json\";async function fSt(t={}){let r=await ixe(t).getTarget(uSt);return iSt.TrustedRoot.fromJSON(JSON.parse(r))}async function ASt(t={}){let e=ixe(t);return e.refresh().then(()=>e)}function ixe(t){return new oSt.TUFClient({cachePath:t.cachePath||(0,sSt.appDataPath)(aSt),rootPath:t.rootPath,mirrorURL:t.mirrorURL||gh.DEFAULT_MIRROR_URL,retry:t.retry??lSt,timeout:t.timeout??cSt,forceCache:t.forceCache??!1,forceInit:t.forceInit??t.force??!1})}var pSt=XJ();Object.defineProperty(gh,\"TUFError\",{enumerable:!0,get:function(){return pSt.TUFError}})});var sxe=_(gL=>{\"use strict\";Object.defineProperty(gL,\"__esModule\",{value:!0});gL.DSSESignatureContent=void 0;var Wb=Cl(),eK=class{constructor(e){this.env=e}compareDigest(e){return Wb.crypto.bufferEqual(e,Wb.crypto.digest(\"sha256\",this.env.payload))}compareSignature(e){return Wb.crypto.bufferEqual(e,this.signature)}verifySignature(e){return Wb.crypto.verify(this.preAuthEncoding,e,this.signature)}get signature(){return this.env.signatures.length>0?this.env.signatures[0].sig:Buffer.from(\"\")}get preAuthEncoding(){return Wb.dsse.preAuthEncoding(this.env.payloadType,this.env.payload)}};gL.DSSESignatureContent=eK});var oxe=_(dL=>{\"use strict\";Object.defineProperty(dL,\"__esModule\",{value:!0});dL.MessageSignatureContent=void 0;var tK=Cl(),rK=class{constructor(e,r){this.signature=e.signature,this.messageDigest=e.messageDigest.digest,this.artifact=r}compareSignature(e){return tK.crypto.bufferEqual(e,this.signature)}compareDigest(e){return tK.crypto.bufferEqual(e,this.messageDigest)}verifySignature(e){return tK.crypto.verify(this.artifact,e,this.signature)}};dL.MessageSignatureContent=rK});var lxe=_(mL=>{\"use strict\";Object.defineProperty(mL,\"__esModule\",{value:!0});mL.toSignedEntity=dSt;mL.signatureContent=axe;var nK=Cl(),hSt=sxe(),gSt=oxe();function dSt(t,e){let{tlogEntries:r,timestampVerificationData:s}=t.verificationMaterial,a=[];for(let n of r)a.push({$case:\"transparency-log\",tlogEntry:n});for(let n of s?.rfc3161Timestamps??[])a.push({$case:\"timestamp-authority\",timestamp:nK.RFC3161Timestamp.parse(n.signedTimestamp)});return{signature:axe(t,e),key:mSt(t),tlogEntries:r,timestamps:a}}function axe(t,e){switch(t.content.$case){case\"dsseEnvelope\":return new hSt.DSSESignatureContent(t.content.dsseEnvelope);case\"messageSignature\":return new gSt.MessageSignatureContent(t.content.messageSignature,e)}}function mSt(t){switch(t.verificationMaterial.content.$case){case\"publicKey\":return{$case:\"public-key\",hint:t.verificationMaterial.content.publicKey.hint};case\"x509CertificateChain\":return{$case:\"certificate\",certificate:nK.X509Certificate.parse(t.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes)};case\"certificate\":return{$case:\"certificate\",certificate:nK.X509Certificate.parse(t.verificationMaterial.content.certificate.rawBytes)}}}});var Eo=_(E1=>{\"use strict\";Object.defineProperty(E1,\"__esModule\",{value:!0});E1.PolicyError=E1.VerificationError=void 0;var yL=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.code=e,this.cause=s,this.name=this.constructor.name}},iK=class extends yL{};E1.VerificationError=iK;var sK=class extends yL{};E1.PolicyError=sK});var cxe=_(EL=>{\"use strict\";Object.defineProperty(EL,\"__esModule\",{value:!0});EL.filterCertAuthorities=ySt;EL.filterTLogAuthorities=ESt;function ySt(t,e){return t.filter(r=>r.validFor.start<=e.start&&r.validFor.end>=e.end)}function ESt(t,e){return t.filter(r=>e.logID&&!r.logID.equals(e.logID)?!1:r.validFor.start<=e.targetDate&&e.targetDate<=r.validFor.end)}});var py=_(Ay=>{\"use strict\";Object.defineProperty(Ay,\"__esModule\",{value:!0});Ay.filterTLogAuthorities=Ay.filterCertAuthorities=void 0;Ay.toTrustMaterial=CSt;var oK=Cl(),Yb=yb(),ISt=Eo(),aK=new Date(0),lK=new Date(864e13),Axe=cxe();Object.defineProperty(Ay,\"filterCertAuthorities\",{enumerable:!0,get:function(){return Axe.filterCertAuthorities}});Object.defineProperty(Ay,\"filterTLogAuthorities\",{enumerable:!0,get:function(){return Axe.filterTLogAuthorities}});function CSt(t,e){let r=typeof e==\"function\"?e:wSt(e);return{certificateAuthorities:t.certificateAuthorities.map(fxe),timestampAuthorities:t.timestampAuthorities.map(fxe),tlogs:t.tlogs.map(uxe),ctlogs:t.ctlogs.map(uxe),publicKey:r}}function uxe(t){let e=t.publicKey.keyDetails,r=e===Yb.PublicKeyDetails.PKCS1_RSA_PKCS1V5||e===Yb.PublicKeyDetails.PKIX_RSA_PKCS1V5||e===Yb.PublicKeyDetails.PKIX_RSA_PKCS1V15_2048_SHA256||e===Yb.PublicKeyDetails.PKIX_RSA_PKCS1V15_3072_SHA256||e===Yb.PublicKeyDetails.PKIX_RSA_PKCS1V15_4096_SHA256?\"pkcs1\":\"spki\";return{logID:t.logId.keyId,publicKey:oK.crypto.createPublicKey(t.publicKey.rawBytes,r),validFor:{start:t.publicKey.validFor?.start||aK,end:t.publicKey.validFor?.end||lK}}}function fxe(t){return{certChain:t.certChain.certificates.map(e=>oK.X509Certificate.parse(e.rawBytes)),validFor:{start:t.validFor?.start||aK,end:t.validFor?.end||lK}}}function wSt(t){return e=>{let r=(t||{})[e];if(!r)throw new ISt.VerificationError({code:\"PUBLIC_KEY_ERROR\",message:`key not found: ${e}`});return{publicKey:oK.crypto.createPublicKey(r.rawBytes),validFor:s=>(r.validFor?.start||aK)<=s&&(r.validFor?.end||lK)>=s}}}});var cK=_(Vb=>{\"use strict\";Object.defineProperty(Vb,\"__esModule\",{value:!0});Vb.CertificateChainVerifier=void 0;Vb.verifyCertificateChain=vSt;var hy=Eo(),BSt=py();function vSt(t,e){let r=(0,BSt.filterCertAuthorities)(e,{start:t.notBefore,end:t.notAfter}),s;for(let a of r)try{return new IL({trustedCerts:a.certChain,untrustedCert:t}).verify()}catch(n){s=n}throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"Failed to verify certificate chain\",cause:s})}var IL=class{constructor(e){this.untrustedCert=e.untrustedCert,this.trustedCerts=e.trustedCerts,this.localCerts=SSt([...e.trustedCerts,e.untrustedCert])}verify(){let e=this.sort();return this.checkPath(e),e}sort(){let e=this.untrustedCert,r=this.buildPaths(e);if(r=r.filter(a=>a.some(n=>this.trustedCerts.includes(n))),r.length===0)throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"no trusted certificate path found\"});let s=r.reduce((a,n)=>a.length<n.length?a:n);return[e,...s].slice(0,-1)}buildPaths(e){let r=[],s=this.findIssuer(e);if(s.length===0)throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"no valid certificate path found\"});for(let a=0;a<s.length;a++){let n=s[a];if(n.equals(e)){r.push([e]);continue}let c=this.buildPaths(n);for(let f=0;f<c.length;f++)r.push([n,...c[f]])}return r}findIssuer(e){let r=[],s;return e.subject.equals(e.issuer)&&e.verify()?[e]:(e.extAuthorityKeyID&&(s=e.extAuthorityKeyID.keyIdentifier),this.localCerts.forEach(a=>{if(s&&a.extSubjectKeyID){a.extSubjectKeyID.keyIdentifier.equals(s)&&r.push(a);return}a.subject.equals(e.issuer)&&r.push(a)}),r=r.filter(a=>{try{return e.verify(a)}catch{return!1}}),r)}checkPath(e){if(e.length<1)throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"certificate chain must contain at least one certificate\"});if(!e.slice(1).every(s=>s.isCA))throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"intermediate certificate is not a CA\"});for(let s=e.length-2;s>=0;s--)if(!e[s].issuer.equals(e[s+1].subject))throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"incorrect certificate name chaining\"});for(let s=0;s<e.length;s++){let a=e[s];if(a.extBasicConstraints?.isCA){let n=a.extBasicConstraints.pathLenConstraint;if(n!==void 0&&n<s-1)throw new hy.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"path length constraint exceeded\"})}}}};Vb.CertificateChainVerifier=IL;function SSt(t){for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++)t[e].equals(t[r])&&(t.splice(r,1),r--);return t}});var pxe=_(uK=>{\"use strict\";Object.defineProperty(uK,\"__esModule\",{value:!0});uK.verifySCTs=PSt;var CL=Cl(),DSt=Eo(),bSt=py();function PSt(t,e,r){let s,a=t.clone();for(let p=0;p<a.extensions.length;p++){let h=a.extensions[p];if(h.subs[0].toOID()===CL.EXTENSION_OID_SCT){s=new CL.X509SCTExtension(h),a.extensions.splice(p,1);break}}if(!s)return[];if(s.signedCertificateTimestamps.length===0)return[];let n=new CL.ByteStream,c=CL.crypto.digest(\"sha256\",e.publicKey);n.appendView(c);let f=a.tbsCertificate.toDER();return n.appendUint24(f.length),n.appendView(f),s.signedCertificateTimestamps.map(p=>{if(!(0,bSt.filterTLogAuthorities)(r,{logID:p.logID,targetDate:p.datetime}).some(C=>p.verify(n.buffer,C.publicKey)))throw new DSt.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"SCT verification failed\"});return p.logID})}});var gxe=_(wL=>{\"use strict\";Object.defineProperty(wL,\"__esModule\",{value:!0});wL.verifyPublicKey=FSt;wL.verifyCertificate=NSt;var xSt=Cl(),hxe=Eo(),kSt=cK(),QSt=pxe(),TSt=\"1.3.6.1.4.1.57264.1.1\",RSt=\"1.3.6.1.4.1.57264.1.8\";function FSt(t,e,r){let s=r.publicKey(t);return e.forEach(a=>{if(!s.validFor(a))throw new hxe.VerificationError({code:\"PUBLIC_KEY_ERROR\",message:`Public key is not valid for timestamp: ${a.toISOString()}`})}),{key:s.publicKey}}function NSt(t,e,r){let s=(0,kSt.verifyCertificateChain)(t,r.certificateAuthorities);if(!e.every(n=>s.every(c=>c.validForDate(n))))throw new hxe.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"certificate is not valid or expired at the specified date\"});return{scts:(0,QSt.verifySCTs)(s[0],s[1],r.ctlogs),signer:OSt(s[0])}}function OSt(t){let e,r=t.extension(RSt);r?e=r.valueObj.subs?.[0]?.value.toString(\"ascii\"):e=t.extension(TSt)?.value.toString(\"ascii\");let s={extensions:{issuer:e},subjectAlternativeName:t.subjectAltName};return{key:xSt.crypto.createPublicKey(t.publicKey),identity:s}}});var mxe=_(BL=>{\"use strict\";Object.defineProperty(BL,\"__esModule\",{value:!0});BL.verifySubjectAlternativeName=LSt;BL.verifyExtensions=MSt;var dxe=Eo();function LSt(t,e){if(e===void 0||!e.match(t))throw new dxe.PolicyError({code:\"UNTRUSTED_SIGNER_ERROR\",message:`certificate identity error - expected ${t}, got ${e}`})}function MSt(t,e={}){let r;for(r in t)if(e[r]!==t[r])throw new dxe.PolicyError({code:\"UNTRUSTED_SIGNER_ERROR\",message:`invalid certificate extension - expected ${r}=${t[r]}, got ${r}=${e[r]}`})}});var yxe=_(gK=>{\"use strict\";Object.defineProperty(gK,\"__esModule\",{value:!0});gK.verifyCheckpoint=HSt;var AK=Cl(),I1=Eo(),USt=py(),fK=`\n\n`,_St=/\\u2014 (\\S+) (\\S+)\\n/g;function HSt(t,e){let r=(0,USt.filterTLogAuthorities)(e,{targetDate:new Date(Number(t.integratedTime)*1e3)}),s=t.inclusionProof,a=pK.fromString(s.checkpoint.envelope),n=hK.fromString(a.note);if(!jSt(a,r))throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"invalid checkpoint signature\"});if(!AK.crypto.bufferEqual(n.logHash,s.rootHash))throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"root hash mismatch\"})}function jSt(t,e){let r=Buffer.from(t.note,\"utf-8\");return t.signatures.every(s=>{let a=e.find(n=>AK.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint));return a?AK.crypto.verify(r,a.publicKey,s.signature):!1})}var pK=class t{constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(fK))throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"missing checkpoint separator\"});let r=e.indexOf(fK),s=e.slice(0,r+1),n=e.slice(r+fK.length).matchAll(_St),c=Array.from(n,f=>{let[,p,h]=f,E=Buffer.from(h,\"base64\");if(E.length<5)throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"malformed checkpoint signature\"});return{name:p,keyHint:E.subarray(0,4),signature:E.subarray(4)}});if(c.length===0)throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"no signatures found in checkpoint\"});return new t(s,c)}},hK=class t{constructor(e,r,s,a){this.origin=e,this.logSize=r,this.logHash=s,this.rest=a}static fromString(e){let r=e.trimEnd().split(`\n`);if(r.length<3)throw new I1.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"too few lines in checkpoint header\"});let s=r[0],a=BigInt(r[1]),n=Buffer.from(r[2],\"base64\"),c=r.slice(3);return new t(s,a,n,c)}}});var Exe=_(EK=>{\"use strict\";Object.defineProperty(EK,\"__esModule\",{value:!0});EK.verifyMerkleInclusion=WSt;var yK=Cl(),dK=Eo(),GSt=Buffer.from([0]),qSt=Buffer.from([1]);function WSt(t){let e=t.inclusionProof,r=BigInt(e.logIndex),s=BigInt(e.treeSize);if(r<0n||r>=s)throw new dK.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:`invalid index: ${r}`});let{inner:a,border:n}=YSt(r,s);if(e.hashes.length!==a+n)throw new dK.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"invalid hash count\"});let c=e.hashes.slice(0,a),f=e.hashes.slice(a),p=ZSt(t.canonicalizedBody),h=JSt(VSt(p,c,r),f);if(!yK.crypto.bufferEqual(h,e.rootHash))throw new dK.VerificationError({code:\"TLOG_INCLUSION_PROOF_ERROR\",message:\"calculated root hash does not match inclusion proof\"})}function YSt(t,e){let r=KSt(t,e),s=zSt(t>>BigInt(r));return{inner:r,border:s}}function VSt(t,e,r){return e.reduce((s,a,n)=>r>>BigInt(n)&BigInt(1)?mK(a,s):mK(s,a),t)}function JSt(t,e){return e.reduce((r,s)=>mK(s,r),t)}function KSt(t,e){return XSt(t^e-BigInt(1))}function zSt(t){return t.toString(2).split(\"1\").length-1}function XSt(t){return t===0n?0:t.toString(2).length}function mK(t,e){return yK.crypto.digest(\"sha256\",qSt,t,e)}function ZSt(t){return yK.crypto.digest(\"sha256\",GSt,t)}});var Cxe=_(IK=>{\"use strict\";Object.defineProperty(IK,\"__esModule\",{value:!0});IK.verifyTLogSET=tDt;var Ixe=Cl(),$St=Eo(),eDt=py();function tDt(t,e){if(!(0,eDt.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(a=>{let n=rDt(t),c=Buffer.from(Ixe.json.canonicalize(n),\"utf8\"),f=t.inclusionPromise.signedEntryTimestamp;return Ixe.crypto.verify(c,a.publicKey,f)}))throw new $St.VerificationError({code:\"TLOG_INCLUSION_PROMISE_ERROR\",message:\"inclusion promise could not be verified\"})}function rDt(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:a}=t;return{body:a.toString(\"base64\"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString(\"hex\")}}});var wxe=_(BK=>{\"use strict\";Object.defineProperty(BK,\"__esModule\",{value:!0});BK.verifyRFC3161Timestamp=sDt;var CK=Cl(),wK=Eo(),nDt=cK(),iDt=py();function sDt(t,e,r){let s=t.signingTime;if(r=(0,iDt.filterCertAuthorities)(r,{start:s,end:s}),r=aDt(r,{serialNumber:t.signerSerialNumber,issuer:t.signerIssuer}),!r.some(n=>{try{return oDt(t,e,n),!0}catch{return!1}}))throw new wK.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"timestamp could not be verified\"})}function oDt(t,e,r){let[s,...a]=r.certChain,n=CK.crypto.createPublicKey(s.publicKey),c=t.signingTime;try{new nDt.CertificateChainVerifier({untrustedCert:s,trustedCerts:a}).verify()}catch{throw new wK.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"invalid certificate chain\"})}if(!r.certChain.every(p=>p.validForDate(c)))throw new wK.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"timestamp was signed with an expired certificate\"});t.verify(e,n)}function aDt(t,e){return t.filter(r=>r.certChain.length>0&&CK.crypto.bufferEqual(r.certChain[0].serialNumber,e.serialNumber)&&CK.crypto.bufferEqual(r.certChain[0].issuer,e.issuer))}});var Bxe=_(vL=>{\"use strict\";Object.defineProperty(vL,\"__esModule\",{value:!0});vL.verifyTSATimestamp=pDt;vL.verifyTLogTimestamp=hDt;var lDt=Eo(),cDt=yxe(),uDt=Exe(),fDt=Cxe(),ADt=wxe();function pDt(t,e,r){return(0,ADt.verifyRFC3161Timestamp)(t,e,r),{type:\"timestamp-authority\",logID:t.signerSerialNumber,timestamp:t.signingTime}}function hDt(t,e){let r=!1;if(gDt(t)&&((0,fDt.verifyTLogSET)(t,e),r=!0),dDt(t)&&((0,uDt.verifyMerkleInclusion)(t),(0,cDt.verifyCheckpoint)(t,e),r=!0),!r)throw new lDt.VerificationError({code:\"TLOG_MISSING_INCLUSION_ERROR\",message:\"inclusion could not be verified\"});return{type:\"transparency-log\",logID:t.logId.keyId,timestamp:new Date(Number(t.integratedTime)*1e3)}}function gDt(t){return t.inclusionPromise!==void 0}function dDt(t){return t.inclusionProof!==void 0}});var vxe=_(vK=>{\"use strict\";Object.defineProperty(vK,\"__esModule\",{value:!0});vK.verifyDSSETLogBody=mDt;var SL=Eo();function mDt(t,e){switch(t.apiVersion){case\"0.0.1\":return yDt(t,e);default:throw new SL.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported dsse version: ${t.apiVersion}`})}}function yDt(t,e){if(t.spec.signatures?.length!==1)throw new SL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"signature count mismatch\"});let r=t.spec.signatures[0].signature;if(!e.compareSignature(Buffer.from(r,\"base64\")))throw new SL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"tlog entry signature mismatch\"});let s=t.spec.payloadHash?.value||\"\";if(!e.compareDigest(Buffer.from(s,\"hex\")))throw new SL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"DSSE payload hash mismatch\"})}});var Sxe=_(DK=>{\"use strict\";Object.defineProperty(DK,\"__esModule\",{value:!0});DK.verifyHashedRekordTLogBody=EDt;var SK=Eo();function EDt(t,e){switch(t.apiVersion){case\"0.0.1\":return IDt(t,e);default:throw new SK.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported hashedrekord version: ${t.apiVersion}`})}}function IDt(t,e){let r=t.spec.signature.content||\"\";if(!e.compareSignature(Buffer.from(r,\"base64\")))throw new SK.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"signature mismatch\"});let s=t.spec.data.hash?.value||\"\";if(!e.compareDigest(Buffer.from(s,\"hex\")))throw new SK.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"digest mismatch\"})}});var Dxe=_(bK=>{\"use strict\";Object.defineProperty(bK,\"__esModule\",{value:!0});bK.verifyIntotoTLogBody=CDt;var DL=Eo();function CDt(t,e){switch(t.apiVersion){case\"0.0.2\":return wDt(t,e);default:throw new DL.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported intoto version: ${t.apiVersion}`})}}function wDt(t,e){if(t.spec.content.envelope.signatures?.length!==1)throw new DL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"signature count mismatch\"});let r=BDt(t.spec.content.envelope.signatures[0].sig);if(!e.compareSignature(Buffer.from(r,\"base64\")))throw new DL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"tlog entry signature mismatch\"});let s=t.spec.content.payloadHash?.value||\"\";if(!e.compareDigest(Buffer.from(s,\"hex\")))throw new DL.VerificationError({code:\"TLOG_BODY_ERROR\",message:\"DSSE payload hash mismatch\"})}function BDt(t){return Buffer.from(t,\"base64\").toString(\"utf-8\")}});var Pxe=_(PK=>{\"use strict\";Object.defineProperty(PK,\"__esModule\",{value:!0});PK.verifyTLogBody=bDt;var bxe=Eo(),vDt=vxe(),SDt=Sxe(),DDt=Dxe();function bDt(t,e){let{kind:r,version:s}=t.kindVersion,a=JSON.parse(t.canonicalizedBody.toString(\"utf8\"));if(r!==a.kind||s!==a.apiVersion)throw new bxe.VerificationError({code:\"TLOG_BODY_ERROR\",message:`kind/version mismatch - expected: ${r}/${s}, received: ${a.kind}/${a.apiVersion}`});switch(a.kind){case\"dsse\":return(0,vDt.verifyDSSETLogBody)(a,e);case\"intoto\":return(0,DDt.verifyIntotoTLogBody)(a,e);case\"hashedrekord\":return(0,SDt.verifyHashedRekordTLogBody)(a,e);default:throw new bxe.VerificationError({code:\"TLOG_BODY_ERROR\",message:`unsupported kind: ${r}`})}}});var Rxe=_(bL=>{\"use strict\";Object.defineProperty(bL,\"__esModule\",{value:!0});bL.Verifier=void 0;var PDt=Ie(\"util\"),C1=Eo(),xxe=gxe(),kxe=mxe(),Qxe=Bxe(),xDt=Pxe(),xK=class{constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,tsaThreshold:r.tsaThreshold??0}}verify(e,r){let s=this.verifyTimestamps(e),a=this.verifySigningKey(e,s);return this.verifyTLogs(e),this.verifySignature(e,a),r&&this.verifyPolicy(r,a.identity||{}),a}verifyTimestamps(e){let r=0,s=0,a=e.timestamps.map(n=>{switch(n.$case){case\"timestamp-authority\":return s++,(0,Qxe.verifyTSATimestamp)(n.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities);case\"transparency-log\":return r++,(0,Qxe.verifyTLogTimestamp)(n.tlogEntry,this.trustMaterial.tlogs)}});if(Txe(a))throw new C1.VerificationError({code:\"TIMESTAMP_ERROR\",message:\"duplicate timestamp\"});if(r<this.options.tlogThreshold)throw new C1.VerificationError({code:\"TIMESTAMP_ERROR\",message:`expected ${this.options.tlogThreshold} tlog timestamps, got ${r}`});if(s<this.options.tsaThreshold)throw new C1.VerificationError({code:\"TIMESTAMP_ERROR\",message:`expected ${this.options.tsaThreshold} tsa timestamps, got ${s}`});return a.map(n=>n.timestamp)}verifySigningKey({key:e},r){switch(e.$case){case\"public-key\":return(0,xxe.verifyPublicKey)(e.hint,r,this.trustMaterial);case\"certificate\":{let s=(0,xxe.verifyCertificate)(e.certificate,r,this.trustMaterial);if(Txe(s.scts))throw new C1.VerificationError({code:\"CERTIFICATE_ERROR\",message:\"duplicate SCT\"});if(s.scts.length<this.options.ctlogThreshold)throw new C1.VerificationError({code:\"CERTIFICATE_ERROR\",message:`expected ${this.options.ctlogThreshold} SCTs, got ${s.scts.length}`});return s.signer}}}verifyTLogs({signature:e,tlogEntries:r}){r.forEach(s=>(0,xDt.verifyTLogBody)(s,e))}verifySignature(e,r){if(!e.signature.verifySignature(r.key))throw new C1.VerificationError({code:\"SIGNATURE_ERROR\",message:\"signature verification failed\"})}verifyPolicy(e,r){e.subjectAlternativeName&&(0,kxe.verifySubjectAlternativeName)(e.subjectAlternativeName,r.subjectAlternativeName),e.extensions&&(0,kxe.verifyExtensions)(e.extensions,r.extensions)}};bL.Verifier=xK;function Txe(t){for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++)if((0,PDt.isDeepStrictEqual)(t[e],t[r]))return!0;return!1}});var PL=_(iu=>{\"use strict\";Object.defineProperty(iu,\"__esModule\",{value:!0});iu.Verifier=iu.toTrustMaterial=iu.VerificationError=iu.PolicyError=iu.toSignedEntity=void 0;var kDt=lxe();Object.defineProperty(iu,\"toSignedEntity\",{enumerable:!0,get:function(){return kDt.toSignedEntity}});var Fxe=Eo();Object.defineProperty(iu,\"PolicyError\",{enumerable:!0,get:function(){return Fxe.PolicyError}});Object.defineProperty(iu,\"VerificationError\",{enumerable:!0,get:function(){return Fxe.VerificationError}});var QDt=py();Object.defineProperty(iu,\"toTrustMaterial\",{enumerable:!0,get:function(){return QDt.toTrustMaterial}});var TDt=Rxe();Object.defineProperty(iu,\"Verifier\",{enumerable:!0,get:function(){return TDt.Verifier}})});var Nxe=_(Fa=>{\"use strict\";Object.defineProperty(Fa,\"__esModule\",{value:!0});Fa.DEFAULT_TIMEOUT=Fa.DEFAULT_RETRY=void 0;Fa.createBundleBuilder=NDt;Fa.createKeyFinder=ODt;Fa.createVerificationPolicy=LDt;var RDt=Cl(),w1=H7(),FDt=PL();Fa.DEFAULT_RETRY={retries:2};Fa.DEFAULT_TIMEOUT=5e3;function NDt(t,e){let r={signer:MDt(e),witnesses:_Dt(e)};switch(t){case\"messageSignature\":return new w1.MessageSignatureBundleBuilder(r);case\"dsseEnvelope\":return new w1.DSSEBundleBuilder({...r,certificateChain:e.legacyCompatibility})}}function ODt(t){return e=>{let r=t(e);if(!r)throw new FDt.VerificationError({code:\"PUBLIC_KEY_ERROR\",message:`key not found: ${e}`});return{publicKey:RDt.crypto.createPublicKey(r),validFor:()=>!0}}}function LDt(t){let e={},r=t.certificateIdentityEmail||t.certificateIdentityURI;return r&&(e.subjectAlternativeName=r),t.certificateIssuer&&(e.extensions={issuer:t.certificateIssuer}),e}function MDt(t){return new w1.FulcioSigner({fulcioBaseURL:t.fulcioURL,identityProvider:t.identityProvider||UDt(t),retry:t.retry??Fa.DEFAULT_RETRY,timeout:t.timeout??Fa.DEFAULT_TIMEOUT})}function UDt(t){let e=t.identityToken;return e?{getToken:()=>Promise.resolve(e)}:new w1.CIContextProvider(\"sigstore\")}function _Dt(t){let e=[];return HDt(t)&&e.push(new w1.RekorWitness({rekorBaseURL:t.rekorURL,entryType:t.legacyCompatibility?\"intoto\":\"dsse\",fetchOnConflict:!1,retry:t.retry??Fa.DEFAULT_RETRY,timeout:t.timeout??Fa.DEFAULT_TIMEOUT})),jDt(t)&&e.push(new w1.TSAWitness({tsaBaseURL:t.tsaServerURL,retry:t.retry??Fa.DEFAULT_RETRY,timeout:t.timeout??Fa.DEFAULT_TIMEOUT})),e}function HDt(t){return t.tlogUpload!==!1}function jDt(t){return t.tsaServerURL!==void 0}});var Mxe=_(su=>{\"use strict\";var GDt=su&&su.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||(\"get\"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),qDt=su&&su.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Oxe=su&&su.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a<s.length;a++)s[a]!==\"default\"&&GDt(r,e,s[a]);return qDt(r,e),r}}();Object.defineProperty(su,\"__esModule\",{value:!0});su.sign=YDt;su.attest=VDt;su.verify=JDt;su.createVerifier=Lxe;var QK=Ib(),WDt=Oxe(hL()),kK=PL(),B1=Oxe(Nxe());async function YDt(t,e={}){let s=await B1.createBundleBuilder(\"messageSignature\",e).create({data:t});return(0,QK.bundleToJSON)(s)}async function VDt(t,e,r={}){let a=await B1.createBundleBuilder(\"dsseEnvelope\",r).create({data:t,type:e});return(0,QK.bundleToJSON)(a)}async function JDt(t,e,r){let s;return Buffer.isBuffer(e)?s=e:r=e,Lxe(r).then(a=>a.verify(t,s))}async function Lxe(t={}){let e=await WDt.getTrustedRoot({mirrorURL:t.tufMirrorURL,rootPath:t.tufRootPath,cachePath:t.tufCachePath,forceCache:t.tufForceCache,retry:t.retry??B1.DEFAULT_RETRY,timeout:t.timeout??B1.DEFAULT_TIMEOUT}),r=t.keySelector?B1.createKeyFinder(t.keySelector):void 0,s=(0,kK.toTrustMaterial)(e,r),a={ctlogThreshold:t.ctLogThreshold,tlogThreshold:t.tlogThreshold},n=new kK.Verifier(s,a),c=B1.createVerificationPolicy(t);return{verify:(f,p)=>{let h=(0,QK.bundleFromJSON)(f),E=(0,kK.toSignedEntity)(h,p);n.verify(E,c)}}}});var _xe=_(Ni=>{\"use strict\";Object.defineProperty(Ni,\"__esModule\",{value:!0});Ni.verify=Ni.sign=Ni.createVerifier=Ni.attest=Ni.VerificationError=Ni.PolicyError=Ni.TUFError=Ni.InternalError=Ni.DEFAULT_REKOR_URL=Ni.DEFAULT_FULCIO_URL=Ni.ValidationError=void 0;var KDt=Ib();Object.defineProperty(Ni,\"ValidationError\",{enumerable:!0,get:function(){return KDt.ValidationError}});var TK=H7();Object.defineProperty(Ni,\"DEFAULT_FULCIO_URL\",{enumerable:!0,get:function(){return TK.DEFAULT_FULCIO_URL}});Object.defineProperty(Ni,\"DEFAULT_REKOR_URL\",{enumerable:!0,get:function(){return TK.DEFAULT_REKOR_URL}});Object.defineProperty(Ni,\"InternalError\",{enumerable:!0,get:function(){return TK.InternalError}});var zDt=hL();Object.defineProperty(Ni,\"TUFError\",{enumerable:!0,get:function(){return zDt.TUFError}});var Uxe=PL();Object.defineProperty(Ni,\"PolicyError\",{enumerable:!0,get:function(){return Uxe.PolicyError}});Object.defineProperty(Ni,\"VerificationError\",{enumerable:!0,get:function(){return Uxe.VerificationError}});var xL=Mxe();Object.defineProperty(Ni,\"attest\",{enumerable:!0,get:function(){return xL.attest}});Object.defineProperty(Ni,\"createVerifier\",{enumerable:!0,get:function(){return xL.createVerifier}});Object.defineProperty(Ni,\"sign\",{enumerable:!0,get:function(){return xL.sign}});Object.defineProperty(Ni,\"verify\",{enumerable:!0,get:function(){return xL.verify}})});Dt();Ge();Dt();var dke=Ie(\"child_process\"),mke=ut(Fd());Yt();var $I=new Map([]);var Gv={};Vt(Gv,{BaseCommand:()=>ft,WorkspaceRequiredError:()=>ar,getCli:()=>bde,getDynamicLibs:()=>Dde,getPluginConfiguration:()=>tC,openWorkspace:()=>eC,pluginCommands:()=>$I,runExit:()=>VR});Yt();var ft=class extends ot{constructor(){super(...arguments);this.cwd=ge.String(\"--cwd\",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<\"u\")throw new nt(\"The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path\");return super.validateAndExecute()}};Ge();Dt();Yt();var ar=class extends nt{constructor(e,r){let s=J.relative(e,r),a=J.join(e,Ut.fileName);super(`This command can only be run from within a workspace of your project (${s} isn't a workspace of ${a}).`)}};Ge();Dt();eA();wc();pv();Yt();var yat=ut(Ai());Ul();var Dde=()=>new Map([[\"@yarnpkg/cli\",Gv],[\"@yarnpkg/core\",jv],[\"@yarnpkg/fslib\",_2],[\"@yarnpkg/libzip\",fv],[\"@yarnpkg/parsers\",J2],[\"@yarnpkg/shell\",mv],[\"clipanion\",oB],[\"semver\",yat],[\"typanion\",Ea]]);Ge();async function eC(t,e){let{project:r,workspace:s}=await Tt.find(t,e);if(!s)throw new ar(r.cwd,e);return s}Ge();Dt();eA();wc();pv();Yt();var IPt=ut(Ai());Ul();var hq={};Vt(hq,{AddCommand:()=>sC,BinCommand:()=>oC,CacheCleanCommand:()=>aC,ClipanionCommand:()=>pC,ConfigCommand:()=>fC,ConfigGetCommand:()=>lC,ConfigSetCommand:()=>cC,ConfigUnsetCommand:()=>uC,DedupeCommand:()=>AC,EntryCommand:()=>gC,ExecCommand:()=>mC,ExplainCommand:()=>IC,ExplainPeerRequirementsCommand:()=>yC,HelpCommand:()=>hC,InfoCommand:()=>CC,LinkCommand:()=>BC,NodeCommand:()=>vC,PluginCheckCommand:()=>SC,PluginImportCommand:()=>PC,PluginImportSourcesCommand:()=>xC,PluginListCommand:()=>DC,PluginRemoveCommand:()=>kC,PluginRuntimeCommand:()=>QC,RebuildCommand:()=>TC,RemoveCommand:()=>RC,RunCommand:()=>NC,RunIndexCommand:()=>FC,SetResolutionCommand:()=>OC,SetVersionCommand:()=>EC,SetVersionSourcesCommand:()=>bC,UnlinkCommand:()=>LC,UpCommand:()=>MC,VersionCommand:()=>dC,WhyCommand:()=>UC,WorkspaceCommand:()=>qC,WorkspacesListCommand:()=>GC,YarnCommand:()=>wC,dedupeUtils:()=>rF,default:()=>Tct,suggestUtils:()=>Xu});var zye=ut(Fd());Ge();Ge();Ge();Yt();var hye=ut(Vv());Ul();var Xu={};Vt(Xu,{Modifier:()=>W5,Strategy:()=>eF,Target:()=>Jv,WorkspaceModifier:()=>cye,applyModifier:()=>Mlt,extractDescriptorFromPath:()=>Y5,extractRangeModifier:()=>uye,fetchDescriptorFrom:()=>V5,findProjectDescriptors:()=>pye,getModifier:()=>Kv,getSuggestedDescriptors:()=>zv,makeWorkspaceDescriptor:()=>Aye,toWorkspaceModifier:()=>fye});Ge();Ge();Dt();var q5=ut(Ai()),Olt=\"workspace:\",Jv=(s=>(s.REGULAR=\"dependencies\",s.DEVELOPMENT=\"devDependencies\",s.PEER=\"peerDependencies\",s))(Jv||{}),W5=(s=>(s.CARET=\"^\",s.TILDE=\"~\",s.EXACT=\"\",s))(W5||{}),cye=(s=>(s.CARET=\"^\",s.TILDE=\"~\",s.EXACT=\"*\",s))(cye||{}),eF=(n=>(n.KEEP=\"keep\",n.REUSE=\"reuse\",n.PROJECT=\"project\",n.LATEST=\"latest\",n.CACHE=\"cache\",n))(eF||{});function Kv(t,e){return t.exact?\"\":t.caret?\"^\":t.tilde?\"~\":e.configuration.get(\"defaultSemverRangePrefix\")}var Llt=/^([\\^~]?)[0-9]+(?:\\.[0-9]+){0,2}(?:-\\S+)?$/;function uye(t,{project:e}){let r=t.match(Llt);return r?r[1]:e.configuration.get(\"defaultSemverRangePrefix\")}function Mlt(t,e){let{protocol:r,source:s,params:a,selector:n}=G.parseRange(t.range);return q5.default.valid(n)&&(n=`${e}${t.range}`),G.makeDescriptor(t,G.makeRange({protocol:r,source:s,params:a,selector:n}))}function fye(t){switch(t){case\"^\":return\"^\";case\"~\":return\"~\";case\"\":return\"*\";default:throw new Error(`Assertion failed: Unknown modifier: \"${t}\"`)}}function Aye(t,e){return G.makeDescriptor(t.anchoredDescriptor,`${Olt}${fye(e)}`)}async function pye(t,{project:e,target:r}){let s=new Map,a=n=>{let c=s.get(n.descriptorHash);return c||s.set(n.descriptorHash,c={descriptor:n,locators:[]}),c};for(let n of e.workspaces)if(r===\"peerDependencies\"){let c=n.manifest.peerDependencies.get(t.identHash);c!==void 0&&a(c).locators.push(n.anchoredLocator)}else{let c=n.manifest.dependencies.get(t.identHash),f=n.manifest.devDependencies.get(t.identHash);r===\"devDependencies\"?f!==void 0?a(f).locators.push(n.anchoredLocator):c!==void 0&&a(c).locators.push(n.anchoredLocator):c!==void 0?a(c).locators.push(n.anchoredLocator):f!==void 0&&a(f).locators.push(n.anchoredLocator)}return s}async function Y5(t,{cwd:e,workspace:r}){return await _lt(async s=>{J.isAbsolute(t)||(t=J.relative(r.cwd,J.resolve(e,t)),t.match(/^\\.{0,2}\\//)||(t=`./${t}`));let{project:a}=r,n=await V5(G.makeIdent(null,\"archive\"),t,{project:r.project,cache:s,workspace:r});if(!n)throw new Error(\"Assertion failed: The descriptor should have been found\");let c=new ki,f=a.configuration.makeResolver(),p=a.configuration.makeFetcher(),h={checksums:a.storedChecksums,project:a,cache:s,fetcher:p,report:c,resolver:f},E=f.bindDescriptor(n,r.anchoredLocator,h),C=G.convertDescriptorToLocator(E),S=await p.fetch(C,h),P=await Ut.find(S.prefixPath,{baseFs:S.packageFs});if(!P.name)throw new Error(\"Target path doesn't have a name\");return G.makeDescriptor(P.name,t)})}function Ult(t){if(t.range===\"unknown\")return{type:\"resolve\",range:\"latest\"};if(Fr.validRange(t.range))return{type:\"fixed\",range:t.range};if(Mp.test(t.range))return{type:\"resolve\",range:t.range};let e=t.range.match(/^(?:jsr:|npm:)(.*)/);if(!e)return{type:\"fixed\",range:t.range};let[,r]=e,s=`${G.stringifyIdent(t)}@`;return r.startsWith(s)&&(r=r.slice(s.length)),Fr.validRange(r)?{type:\"fixed\",range:t.range}:Mp.test(r)?{type:\"resolve\",range:t.range}:{type:\"fixed\",range:t.range}}async function zv(t,{project:e,workspace:r,cache:s,target:a,fixed:n,modifier:c,strategies:f,maxResults:p=1/0}){if(!(p>=0))throw new Error(`Invalid maxResults (${p})`);let h=!n||t.range===\"unknown\"?Ult(t):{type:\"fixed\",range:t.range};if(h.type===\"fixed\")return{suggestions:[{descriptor:t,name:`Use ${G.prettyDescriptor(e.configuration,t)}`,reason:\"(unambiguous explicit request)\"}],rejections:[]};let E=typeof r<\"u\"&&r!==null&&r.manifest[a].get(t.identHash)||null,C=[],S=[],P=async I=>{try{await I()}catch(R){S.push(R)}};for(let I of f){if(C.length>=p)break;switch(I){case\"keep\":await P(async()=>{E&&C.push({descriptor:E,name:`Keep ${G.prettyDescriptor(e.configuration,E)}`,reason:\"(no changes)\"})});break;case\"reuse\":await P(async()=>{for(let{descriptor:R,locators:N}of(await pye(t,{project:e,target:a})).values()){if(N.length===1&&N[0].locatorHash===r.anchoredLocator.locatorHash&&f.includes(\"keep\"))continue;let U=`(originally used by ${G.prettyLocator(e.configuration,N[0])}`;U+=N.length>1?` and ${N.length-1} other${N.length>2?\"s\":\"\"})`:\")\",C.push({descriptor:R,name:`Reuse ${G.prettyDescriptor(e.configuration,R)}`,reason:U})}});break;case\"cache\":await P(async()=>{for(let R of e.storedDescriptors.values())R.identHash===t.identHash&&C.push({descriptor:R,name:`Reuse ${G.prettyDescriptor(e.configuration,R)}`,reason:\"(already used somewhere in the lockfile)\"})});break;case\"project\":await P(async()=>{if(r.manifest.name!==null&&t.identHash===r.manifest.name.identHash)return;let R=e.tryWorkspaceByIdent(t);if(R===null)return;let N=Aye(R,c);C.push({descriptor:N,name:`Attach ${G.prettyDescriptor(e.configuration,N)}`,reason:`(local workspace at ${he.pretty(e.configuration,R.relativeCwd,he.Type.PATH)})`})});break;case\"latest\":{let R=e.configuration.get(\"enableNetwork\"),N=e.configuration.get(\"enableOfflineMode\");await P(async()=>{if(a===\"peerDependencies\")C.push({descriptor:G.makeDescriptor(t,\"*\"),name:\"Use *\",reason:\"(catch-all peer dependency pattern)\"});else if(!R&&!N)C.push({descriptor:null,name:\"Resolve from latest\",reason:he.pretty(e.configuration,\"(unavailable because enableNetwork is toggled off)\",\"grey\")});else{let U=await V5(t,h.range,{project:e,cache:s,workspace:r,modifier:c});U&&C.push({descriptor:U,name:`Use ${G.prettyDescriptor(e.configuration,U)}`,reason:`(resolved from ${N?\"the cache\":\"latest\"})`})}})}break}}return{suggestions:C.slice(0,p),rejections:S.slice(0,p)}}async function V5(t,e,{project:r,cache:s,workspace:a,preserveModifier:n=!0,modifier:c}){let f=r.configuration.normalizeDependency(G.makeDescriptor(t,e)),p=new ki,h=r.configuration.makeFetcher(),E=r.configuration.makeResolver(),C={project:r,fetcher:h,cache:s,checksums:r.storedChecksums,report:p,cacheOptions:{skipIntegrityCheck:!0}},S={...C,resolver:E,fetchOptions:C},P=E.bindDescriptor(f,a.anchoredLocator,S),I=await E.getCandidates(P,{},S);if(I.length===0)return null;let R=I[0],{protocol:N,source:U,params:W,selector:ee}=G.parseRange(G.convertToManifestRange(R.reference));if(N===r.configuration.get(\"defaultProtocol\")&&(N=null),q5.default.valid(ee)){let ie=ee;if(typeof c<\"u\")ee=c+ee;else if(n!==!1){let me=typeof n==\"string\"?n:f.range;ee=uye(me,{project:r})+ee}let ue=G.makeDescriptor(R,G.makeRange({protocol:N,source:U,params:W,selector:ee}));(await E.getCandidates(r.configuration.normalizeDependency(ue),{},S)).length!==1&&(ee=ie)}return G.makeDescriptor(R,G.makeRange({protocol:N,source:U,params:W,selector:ee}))}async function _lt(t){return await ce.mktempPromise(async e=>{let r=ze.create(e);return r.useWithSource(e,{enableMirror:!1,compressionLevel:0},e,{overwrite:!0}),await t(new Kr(e,{configuration:r,check:!1,immutable:!1}))})}var sC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.fixed=ge.Boolean(\"-F,--fixed\",!1,{description:\"Store dependency tags as-is instead of resolving them\"});this.exact=ge.Boolean(\"-E,--exact\",!1,{description:\"Don't use any semver modifier on the resolved range\"});this.tilde=ge.Boolean(\"-T,--tilde\",!1,{description:\"Use the `~` semver modifier on the resolved range\"});this.caret=ge.Boolean(\"-C,--caret\",!1,{description:\"Use the `^` semver modifier on the resolved range\"});this.dev=ge.Boolean(\"-D,--dev\",!1,{description:\"Add a package as a dev dependency\"});this.peer=ge.Boolean(\"-P,--peer\",!1,{description:\"Add a package as a peer dependency\"});this.optional=ge.Boolean(\"-O,--optional\",!1,{description:\"Add / upgrade a package to an optional regular / peer dependency\"});this.preferDev=ge.Boolean(\"--prefer-dev\",!1,{description:\"Add / upgrade a package to a dev dependency\"});this.interactive=ge.Boolean(\"-i,--interactive\",{description:\"Reuse the specified package from other workspaces in the project\"});this.cached=ge.Boolean(\"--cached\",!1,{description:\"Reuse the highest version already used somewhere within the project\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:fo($l)});this.silent=ge.Boolean(\"--silent\",{hidden:!0});this.packages=ge.Rest()}static{this.paths=[[\"add\"]]}static{this.usage=ot.Usage({description:\"add dependencies to the project\",details:\"\\n      This command adds a package to the package.json for the nearest workspace.\\n\\n      - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\\n\\n      - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\\n\\n      - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\\n\\n      - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\\\"peerDependenciesMeta\\\": { \\\"<package>\\\": { \\\"optional\\\": true } }`\\n\\n      - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\\n\\n      - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\\n\\n      If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\\n\\n      If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n\\n      For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/protocols.\\n    \",examples:[[\"Add a regular package to the current workspace\",\"$0 add lodash\"],[\"Add a specific version for a package to the current workspace\",\"$0 add lodash@1.2.3\"],[\"Add a package from a GitHub repository (the master branch) to the current workspace using a URL\",\"$0 add lodash@https://github.com/lodash/lodash\"],[\"Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol\",\"$0 add lodash@github:lodash/lodash\"],[\"Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)\",\"$0 add lodash@lodash/lodash\"],[\"Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)\",\"$0 add lodash-es@lodash/lodash#es\"],[\"Add a local package (gzipped tarball format) to the current workspace\",\"$0 add local-package-name@file:../path/to/local-package-name-v0.1.2.tgz\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.fixed,f=r.isInteractive({interactive:this.interactive,stdout:this.context.stdout}),p=f||r.get(\"preferReuse\"),h=Kv(this,s),E=[p?\"reuse\":void 0,\"project\",this.cached?\"cache\":void 0,\"latest\"].filter(W=>typeof W<\"u\"),C=f?1/0:1,S=W=>{let ee=G.tryParseDescriptor(W.slice(4));return ee?ee.range===\"unknown\"?G.makeDescriptor(ee,`jsr:${G.stringifyIdent(ee)}@latest`):G.makeDescriptor(ee,`jsr:${ee.range}`):null},P=await Promise.all(this.packages.map(async W=>{let ee=W.match(/^\\.{0,2}\\//)?await Y5(W,{cwd:this.context.cwd,workspace:a}):W.startsWith(\"jsr:\")?S(W):G.tryParseDescriptor(W),ie=W.match(/^(https?:|git@github)/);if(ie)throw new nt(`It seems you are trying to add a package using a ${he.pretty(r,`${ie[0]}...`,he.Type.RANGE)} url; we now require package names to be explicitly specified.\nTry running the command again with the package name prefixed: ${he.pretty(r,\"yarn add\",he.Type.CODE)} ${he.pretty(r,G.makeDescriptor(G.makeIdent(null,\"my-package\"),`${ie[0]}...`),he.Type.DESCRIPTOR)}`);if(!ee)throw new nt(`The ${he.pretty(r,W,he.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let ue=Hlt(a,ee,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(ue.map(async me=>{let pe=await zv(ee,{project:s,workspace:a,cache:n,fixed:c,target:me,modifier:h,strategies:E,maxResults:C});return{request:ee,suggestedDescriptors:pe,target:me}}))})).then(W=>W.flat()),I=await lA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async W=>{for(let{request:ee,suggestedDescriptors:{suggestions:ie,rejections:ue}}of P)if(ie.filter(me=>me.descriptor!==null).length===0){let[me]=ue;if(typeof me>\"u\")throw new Error(\"Assertion failed: Expected an error to have been set\");s.configuration.get(\"enableNetwork\")?W.reportError(27,`${G.prettyDescriptor(r,ee)} can't be resolved to a satisfying range`):W.reportError(27,`${G.prettyDescriptor(r,ee)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),W.reportSeparator(),W.reportExceptionOnce(me)}});if(I.hasErrors())return I.exitCode();let R=!1,N=[],U=[];for(let{suggestedDescriptors:{suggestions:W},target:ee}of P){let ie,ue=W.filter(Be=>Be.descriptor!==null),le=ue[0].descriptor,me=ue.every(Be=>G.areDescriptorsEqual(Be.descriptor,le));ue.length===1||me?ie=le:(R=!0,{answer:ie}=await(0,hye.prompt)({type:\"select\",name:\"answer\",message:\"Which range do you want to use?\",choices:W.map(({descriptor:Be,name:Ce,reason:g})=>Be?{name:Ce,hint:g,descriptor:Be}:{name:Ce,hint:g,disabled:!0}),onCancel:()=>process.exit(130),result(Be){return this.find(Be,\"descriptor\")},stdin:this.context.stdin,stdout:this.context.stdout}));let pe=a.manifest[ee].get(ie.identHash);(typeof pe>\"u\"||pe.descriptorHash!==ie.descriptorHash)&&(a.manifest[ee].set(ie.identHash,ie),this.optional&&(ee===\"dependencies\"?a.manifest.ensureDependencyMeta({...ie,range:\"unknown\"}).optional=!0:ee===\"peerDependencies\"&&(a.manifest.ensurePeerDependencyMeta({...ie,range:\"unknown\"}).optional=!0)),typeof pe>\"u\"?N.push([a,ee,ie,E]):U.push([a,ee,pe,ie]))}return await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyAddition,N),await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyReplacement,U),R&&this.context.stdout.write(`\n`),await s.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};function Hlt(t,e,{dev:r,peer:s,preferDev:a,optional:n}){let c=t.manifest.dependencies.has(e.identHash),f=t.manifest.devDependencies.has(e.identHash),p=t.manifest.peerDependencies.has(e.identHash);if((r||s)&&c)throw new nt(`Package \"${G.prettyIdent(t.project.configuration,e)}\" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!s&&p)throw new nt(`Package \"${G.prettyIdent(t.project.configuration,e)}\" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&f)throw new nt(`Package \"${G.prettyIdent(t.project.configuration,e)}\" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!s&&p)throw new nt(`Package \"${G.prettyIdent(t.project.configuration,e)}\" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new nt(`Package \"${G.prettyIdent(t.project.configuration,e)}\" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return s&&h.push(\"peerDependencies\"),(r||a)&&h.push(\"devDependencies\"),n&&h.push(\"dependencies\"),h.length>0?h:f?[\"devDependencies\"]:p?[\"peerDependencies\"]:[\"dependencies\"]}Ge();Ge();Yt();var oC=class extends ft{constructor(){super(...arguments);this.verbose=ge.Boolean(\"-v,--verbose\",!1,{description:\"Print both the binary name and the locator of the package that provides the binary\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.name=ge.String({required:!1})}static{this.paths=[[\"bin\"]]}static{this.usage=ot.Usage({description:\"get the path to a binary script\",details:`\n      When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \\`-v,--verbose\\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.\n\n      When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.\n    `,examples:[[\"List all the available binaries\",\"$0 bin\"],[\"Print the path to a specific binary\",\"$0 bin eslint\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Tt.find(r,this.context.cwd);if(await s.restoreInstallState(),this.name){let f=(await In.getPackageAccessibleBinaries(a,{project:s})).get(this.name);if(!f)throw new nt(`Couldn't find a binary named \"${this.name}\" for package \"${G.prettyLocator(r,a)}\"`);let[,p]=f;return this.context.stdout.write(`${p}\n`),0}return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async c=>{let f=await In.getPackageAccessibleBinaries(a,{project:s}),h=Array.from(f.keys()).reduce((E,C)=>Math.max(E,C.length),0);for(let[E,[C,S]]of f)c.reportJson({name:E,source:G.stringifyIdent(C),path:S});if(this.verbose)for(let[E,[C]]of f)c.reportInfo(null,`${E.padEnd(h,\" \")}   ${G.prettyLocator(r,C)}`);else for(let E of f.keys())c.reportInfo(null,E)})).exitCode()}};Ge();Dt();Yt();var aC=class extends ft{constructor(){super(...arguments);this.mirror=ge.Boolean(\"--mirror\",!1,{description:\"Remove the global cache files instead of the local cache files\"});this.all=ge.Boolean(\"--all\",!1,{description:\"Remove both the global cache files and the local cache files of the current project\"})}static{this.paths=[[\"cache\",\"clean\"],[\"cache\",\"clear\"]]}static{this.usage=ot.Usage({description:\"remove the shared cache files\",details:`\n      This command will remove all the files from the cache.\n    `,examples:[[\"Remove all the local archives\",\"$0 cache clean\"],[\"Remove all the archives stored in the ~/.yarn directory\",\"$0 cache clean --mirror\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(!r.get(\"enableCacheClean\"))throw new nt(\"Cache cleaning is currently disabled. To enable it, set `enableCacheClean: true` in your configuration file. Note: Cache cleaning is typically not required and should be avoided when using Zero-Installs.\");let s=await Kr.find(r);return(await Ot.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&s.mirrorCwd!==null,c=!this.mirror;n&&(await ce.removePromise(s.mirrorCwd),await r.triggerHook(f=>f.cleanGlobalArtifacts,r)),c&&await ce.removePromise(s.cwd)})).exitCode()}};Ge();Yt();ql();var J5=Ie(\"util\"),lC=class extends ft{constructor(){super(...arguments);this.why=ge.Boolean(\"--why\",!1,{description:\"Print the explanation for why a setting has its value\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.unsafe=ge.Boolean(\"--no-redacted\",!1,{description:\"Don't redact secrets (such as tokens) from the output\"});this.name=ge.String()}static{this.paths=[[\"config\",\"get\"]]}static{this.usage=ot.Usage({description:\"read a configuration settings\",details:`\n      This command will print a configuration setting.\n\n      Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \\`--no-redacted\\` to get the untransformed value.\n    `,examples:[[\"Print a simple configuration setting\",\"yarn config get yarnPath\"],[\"Print a complex configuration setting\",\"yarn config get packageExtensions\"],[\"Print a nested field from the configuration\",`yarn config get 'npmScopes[\"my-company\"].npmRegistryServer'`],[\"Print a token from the configuration\",\"yarn config get npmAuthToken --no-redacted\"],[\"Print a configuration setting as JSON\",\"yarn config get packageExtensions --json\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=this.name.replace(/[.[].*$/,\"\"),a=this.name.replace(/^[^.[]*/,\"\");if(typeof r.settings.get(s)>\"u\")throw new nt(`Couldn't find a configuration settings named \"${s}\"`);let c=r.getSpecial(s,{hideSecrets:!this.unsafe,getNativePaths:!0}),f=je.convertMapsToIndexableObjects(c),p=a?va(f,a):f,h=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p==\"string\")return this.context.stdout.write(`${p}\n`),h.exitCode();J5.inspect.styles.name=\"cyan\",this.context.stdout.write(`${(0,J5.inspect)(p,{depth:1/0,colors:r.get(\"enableColors\"),compact:!1})}\n`)}return h.exitCode()}};Ge();Yt();ql();var K5=Ie(\"util\"),cC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Set complex configuration settings to JSON values\"});this.home=ge.Boolean(\"-H,--home\",!1,{description:\"Update the home configuration instead of the project configuration\"});this.name=ge.String();this.value=ge.String()}static{this.paths=[[\"config\",\"set\"]]}static{this.usage=ot.Usage({description:\"change a configuration settings\",details:`\n      This command will set a configuration setting.\n\n      When used without the \\`--json\\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).\n\n      When used with the \\`--json\\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.\n    `,examples:[[\"Set a simple configuration setting (a string, a number, or a boolean)\",\"yarn config set initScope myScope\"],[\"Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag\",'yarn config set initScope --json \\\\\"myScope\\\\\"'],[\"Set a complex configuration setting (an Array) using the `--json` flag\",`yarn config set unsafeHttpWhitelist --json '[\"*.example.com\", \"example.com\"]'`],[\"Set a complex configuration setting (an Object) using the `--json` flag\",`yarn config set packageExtensions --json '{ \"@babel/parser@*\": { \"dependencies\": { \"@babel/types\": \"*\" } } }'`],[\"Set a nested configuration setting\",'yarn config set npmScopes.company.npmRegistryServer \"https://npm.example.com\"'],[\"Set a nested configuration setting using indexed access for non-simple keys\",`yarn config set 'npmRegistries[\"//npm.example.com\"].npmAuthToken' \"ffffffff-ffff-ffff-ffff-ffffffffffff\"`]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt(\"This command must be run from within a project folder\");return r.projectCwd},a=this.name.replace(/[.[].*$/,\"\"),n=this.name.replace(/^[^.[]*\\.?/,\"\");if(typeof r.settings.get(a)>\"u\")throw new nt(`Couldn't find a configuration settings named \"${a}\"`);if(a===\"enableStrictSettings\")throw new nt(\"This setting only affects the file it's in, and thus cannot be set from the CLI\");let f=this.json?JSON.parse(this.value):this.value;await(this.home?I=>ze.updateHomeConfiguration(I):I=>ze.updateConfiguration(s(),I))(I=>{if(n){let R=f0(I);return Jd(R,this.name,f),R}else return{...I,[a]:f}});let E=(await ze.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),C=je.convertMapsToIndexableObjects(E),S=n?va(C,n):C;return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async I=>{K5.inspect.styles.name=\"cyan\",I.reportInfo(0,`Successfully set ${this.name} to ${(0,K5.inspect)(S,{depth:1/0,colors:r.get(\"enableColors\"),compact:!1})}`)})).exitCode()}};Ge();Yt();ql();var uC=class extends ft{constructor(){super(...arguments);this.home=ge.Boolean(\"-H,--home\",!1,{description:\"Update the home configuration instead of the project configuration\"});this.name=ge.String()}static{this.paths=[[\"config\",\"unset\"]]}static{this.usage=ot.Usage({description:\"unset a configuration setting\",details:`\n      This command will unset a configuration setting.\n    `,examples:[[\"Unset a simple configuration setting\",\"yarn config unset initScope\"],[\"Unset a complex configuration setting\",\"yarn config unset packageExtensions\"],[\"Unset a nested configuration setting\",\"yarn config unset npmScopes.company.npmRegistryServer\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt(\"This command must be run from within a project folder\");return r.projectCwd},a=this.name.replace(/[.[].*$/,\"\"),n=this.name.replace(/^[^.[]*\\.?/,\"\");if(typeof r.settings.get(a)>\"u\")throw new nt(`Couldn't find a configuration settings named \"${a}\"`);let f=this.home?h=>ze.updateHomeConfiguration(h):h=>ze.updateConfiguration(s(),h);return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await f(C=>{if(!vB(C,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,C;let S=n?f0(C):{...C};return A0(S,this.name),S}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Ge();Dt();Yt();var tF=Ie(\"util\"),fC=class extends ft{constructor(){super(...arguments);this.noDefaults=ge.Boolean(\"--no-defaults\",!1,{description:\"Omit the default values from the display\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.verbose=ge.Boolean(\"-v,--verbose\",{hidden:!0});this.why=ge.Boolean(\"--why\",{hidden:!0});this.names=ge.Rest()}static{this.paths=[[\"config\"]]}static{this.usage=ot.Usage({description:\"display the current configuration\",details:`\n      This command prints the current active configuration settings.\n    `,examples:[[\"Print the active configuration settings\",\"$0 config\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins,{strict:!1}),s=await SI({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:\"The --verbose option is deprecated, the settings' descriptions are now always displayed\"},{option:this.why,message:\"The --why option is deprecated, the settings' sources are now always displayed\"}]);if(s!==null)return s;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async f=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)f.reportError(34,`Invalid configuration key \"${p}\" in ${h}`);f.reportSeparator()}if(this.json)for(let p of a){if(this.noDefaults&&!r.sources.has(p))continue;let h=r.settings.get(p);typeof h>\"u\"&&f.reportError(34,`No configuration key named \"${p}\"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),C=r.sources.get(p)??\"<default>\",S=C&&C[0]!==\"<\"?fe.fromPortablePath(C):C;f.reportJson({key:p,effective:E,source:S,...h})}else{let p={breakLength:1/0,colors:r.get(\"enableColors\"),maxArrayLength:2},h={},E={children:h};for(let C of a){if(this.noDefaults&&!r.sources.has(C))continue;let S=r.settings.get(C),P=r.sources.get(C)??\"<default>\",I=r.getSpecial(C,{hideSecrets:!0,getNativePaths:!0}),R={Description:{label:\"Description\",value:he.tuple(he.Type.MARKDOWN,{text:S.description,format:this.cli.format(),paragraphs:!1})},Source:{label:\"Source\",value:he.tuple(P[0]===\"<\"?he.Type.CODE:he.Type.PATH,P)}};h[C]={value:he.tuple(he.Type.CODE,C),children:R};let N=(U,W)=>{for(let[ee,ie]of W)if(ie instanceof Map){let ue={};U[ee]={children:ue},N(ue,ie)}else U[ee]={label:ee,value:he.tuple(he.Type.NO_HINT,(0,tF.inspect)(ie,p))}};I instanceof Map?N(R,I):R.Value={label:\"Value\",value:he.tuple(he.Type.NO_HINT,(0,tF.inspect)(I,p))}}a.length!==1&&(n=void 0),xs.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<\"u\"){let f=a[0],p=(0,tF.inspect)(r.getSpecial(f,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get(\"enableColors\")});this.context.stdout.write(`\n`),this.context.stdout.write(`${p}\n`)}return c.exitCode()}};Ge();Yt();Ul();var rF={};Vt(rF,{Strategy:()=>Xv,acceptedStrategies:()=>jlt,dedupe:()=>z5});Ge();Ge();var gye=ut(Go()),Xv=(e=>(e.HIGHEST=\"highest\",e))(Xv||{}),jlt=new Set(Object.values(Xv)),Glt={highest:async(t,e,{resolver:r,fetcher:s,resolveOptions:a,fetchOptions:n})=>{let c=new Map;for(let[p,h]of t.storedResolutions){let E=t.storedDescriptors.get(p);if(typeof E>\"u\")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);je.getSetWithDefault(c,E.identHash).add(h)}let f=new Map(je.mapAndFilter(t.storedDescriptors.values(),p=>G.isVirtualDescriptor(p)?je.mapAndFilter.skip:[p.descriptorHash,je.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=f.get(p.descriptorHash);if(typeof h>\"u\")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=t.storedResolutions.get(p.descriptorHash);if(typeof E>\"u\")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let C=t.originalPackages.get(E);if(typeof C>\"u\")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let S=r.getResolutionDependencies(p,a),P=Object.fromEntries(await je.allSettledSafe(Object.entries(S).map(async([ee,ie])=>{let ue=f.get(ie.descriptorHash);if(typeof ue>\"u\")throw new Error(`Assertion failed: The descriptor (${ie.descriptorHash}) should have been registered`);let le=await ue.promise;if(!le)throw new Error(\"Assertion failed: Expected the dependency to have been through the dedupe process itself\");return[ee,le.updatedPackage]})));if(e.length&&!gye.default.isMatch(G.stringifyIdent(p),e)||!r.shouldPersistResolution(C,a))return C;let I=c.get(p.identHash);if(typeof I>\"u\")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(I.size===1)return C;let R=[...I].map(ee=>{let ie=t.originalPackages.get(ee);if(typeof ie>\"u\")throw new Error(`Assertion failed: The package (${ee}) should have been registered`);return ie}),N=await r.getSatisfying(p,P,R,a),U=N.locators?.[0];if(typeof U>\"u\"||!N.sorted)return C;let W=t.originalPackages.get(U.locatorHash);if(typeof W>\"u\")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return W}).then(async S=>{let P=await t.preparePackage(S,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:C,updatedPackage:S,resolvedPackage:P})}).catch(S=>{h.reject(S)})}return[...f.values()].map(p=>p.promise)}};async function z5(t,{strategy:e,patterns:r,cache:s,report:a}){let{configuration:n}=t,c=new ki,f=n.makeResolver(),p=n.makeFetcher(),h={cache:s,checksums:t.storedChecksums,fetcher:p,project:t,report:c,cacheOptions:{skipIntegrityCheck:!0}},E={project:t,resolver:f,report:c,fetchOptions:h};return await a.startTimerPromise(\"Deduplication step\",async()=>{let C=Glt[e],S=await C(t,r,{resolver:f,resolveOptions:E,fetcher:p,fetchOptions:h}),P=Ao.progressViaCounter(S.length);await a.reportProgress(P);let I=0;await Promise.all(S.map(U=>U.then(W=>{if(W===null||W.currentPackage.locatorHash===W.updatedPackage.locatorHash)return;I++;let{descriptor:ee,currentPackage:ie,updatedPackage:ue}=W;a.reportInfo(0,`${G.prettyDescriptor(n,ee)} can be deduped from ${G.prettyLocator(n,ie)} to ${G.prettyLocator(n,ue)}`),a.reportJson({descriptor:G.stringifyDescriptor(ee),currentResolution:G.stringifyLocator(ie),updatedResolution:G.stringifyLocator(ue)}),t.storedResolutions.set(ee.descriptorHash,ue.locatorHash)}).finally(()=>P.tick())));let R;switch(I){case 0:R=\"No packages\";break;case 1:R=\"One package\";break;default:R=`${I} packages`}let N=he.pretty(n,e,he.Type.CODE);return a.reportInfo(0,`${R} can be deduped using the ${N} strategy`),I})}var AC=class extends ft{constructor(){super(...arguments);this.strategy=ge.String(\"-s,--strategy\",\"highest\",{description:\"The strategy to use when deduping dependencies\",validator:fo(Xv)});this.check=ge.Boolean(\"-c,--check\",!1,{description:\"Exit with exit code 1 when duplicates are found, without persisting the dependency tree\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:fo($l)});this.patterns=ge.Rest()}static{this.paths=[[\"dedupe\"]]}static{this.usage=ot.Usage({description:\"deduplicate dependencies with overlapping ranges\",details:\"\\n      Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\\n\\n      This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\\n\\n      - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\\n\\n      **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\\n\\n      If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n\\n      This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\\n\\n      ### In-depth explanation:\\n\\n      Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\\n\\n      **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\\n\\n      Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\\n\\n      **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\\n    \",examples:[[\"Dedupe all packages\",\"$0 dedupe\"],[\"Dedupe all packages using a specific strategy\",\"$0 dedupe --strategy highest\"],[\"Dedupe a specific package\",\"$0 dedupe lodash\"],[\"Dedupe all packages with the `@babel/*` scope\",\"$0 dedupe '@babel/*'\"],[\"Check for duplicates (can be used as a CI step)\",\"$0 dedupe --check\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=await Kr.find(r);await s.restoreInstallState({restoreResolutions:!1});let n=0,c=await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout,json:this.json},async f=>{n=await z5(s,{strategy:this.strategy,patterns:this.patterns,cache:a,report:f})});return c.hasErrors()?c.exitCode():this.check?n?1:0:await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:a,mode:this.mode})}};Ge();Yt();var pC=class extends ft{static{this.paths=[[\"--clipanion=definitions\"]]}async execute(){let{plugins:e}=await ze.find(this.context.cwd,this.context.plugins),r=[];for(let c of e){let{commands:f}=c[1];if(f){let h=Ca.from(f).definitions();r.push([c[0],h])}}let s=this.cli.definitions(),a=(c,f)=>c.split(\" \").slice(1).join()===f.split(\" \").slice(1).join(),n=dye()[\"@yarnpkg/builder\"].bundles.standard;for(let c of r){let f=c[1];for(let p of f)s.find(h=>a(h.path,p.path)).plugin={name:c[0],isDefault:n.includes(c[0])}}this.context.stdout.write(`${JSON.stringify(s,null,2)}\n`)}};var hC=class extends ft{static{this.paths=[[\"help\"],[\"--help\"],[\"-h\"]]}async execute(){this.context.stdout.write(this.cli.usage(null))}};Ge();Dt();Yt();var gC=class extends ft{constructor(){super(...arguments);this.leadingArgument=ge.String();this.args=ge.Proxy()}async execute(){if(this.leadingArgument.match(/[\\\\/]/)&&!G.tryParseIdent(this.leadingArgument)){let r=J.resolve(this.context.cwd,fe.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run([\"run\",this.leadingArgument,...this.args])}};Ge();var dC=class extends ft{static{this.paths=[[\"-v\"],[\"--version\"]]}async execute(){this.context.stdout.write(`${fn||\"<unknown>\"}\n`)}};Ge();Ge();Yt();var mC=class extends ft{constructor(){super(...arguments);this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"exec\"]]}static{this.usage=ot.Usage({description:\"execute a shell script\",details:`\n      This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.\n\n      It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n    `,examples:[[\"Execute a single shell command\",\"$0 exec echo Hello World\"],[\"Execute a shell script\",'$0 exec \"tsc & babel src --out-dir lib\"']]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Tt.find(r,this.context.cwd);return await s.restoreInstallState(),await In.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:s})}};Ge();Yt();Ul();var yC=class extends ft{constructor(){super(...arguments);this.hash=ge.String({required:!1,validator:Nx(wE(),[Z2(/^p[0-9a-f]{6}$/)])})}static{this.paths=[[\"explain\",\"peer-requirements\"]]}static{this.usage=ot.Usage({description:\"explain a set of peer requirements\",details:`\n      A peer requirement represents all peer requests that a subject must satisfy when providing a requested package to requesters.\n\n      When the hash argument is specified, this command prints a detailed explanation of the peer requirement corresponding to the hash and whether it is satisfied or not.\n\n      When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement.\n\n      **Note:** A hash is a seven-letter code consisting of the letter 'p' followed by six characters that can be obtained from peer dependency warnings or from the list of all peer requirements(\\`yarn explain peer-requirements\\`).\n    `,examples:[[\"Explain the corresponding peer requirement for a hash\",\"$0 explain peer-requirements p1a4ed\"],[\"List all peer requirements\",\"$0 explain peer-requirements\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return await s.restoreInstallState({restoreResolutions:!1}),await s.applyLightResolution(),typeof this.hash<\"u\"?await Wlt(this.hash,s,{stdout:this.context.stdout}):await Ylt(s,{stdout:this.context.stdout})}};async function Wlt(t,e,r){let s=e.peerRequirementNodes.get(t);if(typeof s>\"u\")throw new Error(`No peerDependency requirements found for hash: \"${t}\"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:he.tuple(he.Type.NO_HINT,\"...\")}]:[]}:(a.add(p.requester.locatorHash),{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[G.stringifyLocator(h.requester),n(h)]))}),c=e.peerWarnings.find(p=>p.hash===t);return(await Ot.start({configuration:e.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=he.mark(e.configuration),E=c?h.Cross:h.Check;if(p.reportInfo(0,`Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} is requested to provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} by its descendants`),p.reportSeparator(),p.reportInfo(0,he.pretty(e.configuration,s.subject,he.Type.LOCATOR)),xs.emitTree({children:Object.fromEntries(Array.from(s.requests.values(),C=>[G.stringifyLocator(C.requester),n(C)]))},{configuration:e.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),s.provided.range===\"missing:\"){let C=c?\"\":\" , but all peer requests are optional\";p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} does not provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)}${C}.`)}else{let C=e.storedResolutions.get(s.provided.descriptorHash);if(!C)throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let S=e.storedPackages.get(C);if(!S)throw new Error(\"Assertion failed: Expected the package to be registered\");p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} provides ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} with version ${G.prettyReference(e.configuration,S.version??\"0.0.0\")}, ${c?\"which does not satisfy all requests.\":\"which satisfies all requests\"}`),c?.type===3&&(c.range?p.reportInfo(0,`  The combined requested range is ${he.pretty(e.configuration,c.range,he.Type.RANGE)}`):p.reportInfo(0,\"  Unfortunately, the requested ranges have no overlap\"))}})).exitCode()}async function Ylt(t,e){return(await Ot.start({configuration:t.configuration,stdout:e.stdout,includeFooter:!1,includePrefix:!1},async s=>{let a=he.mark(t.configuration),n=je.sortMap(t.peerRequirementNodes,[([,c])=>G.stringifyLocator(c.subject),([,c])=>G.stringifyIdent(c.ident)]);for(let[,c]of n.values()){if(!c.root)continue;let f=t.peerWarnings.find(E=>E.hash===c.hash),p=[...G.allPeerRequests(c)],h;if(p.length>2?h=` and ${p.length-1} other dependencies`:p.length===2?h=\" and 1 other dependency\":h=\"\",c.provided.range!==\"missing:\"){let E=t.storedResolutions.get(c.provided.descriptorHash);if(!E)throw new Error(\"Assertion failed: Expected the resolution to have been registered\");let C=t.storedPackages.get(E);if(!C)throw new Error(\"Assertion failed: Expected the provided package to have been registered\");let S=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \\u2192 ${f?a.Cross:a.Check} ${G.prettyLocator(t.configuration,c.subject)} provides ${G.prettyLocator(t.configuration,C)} to ${G.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,S):s.reportInfo(0,S)}else{let E=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \\u2192 ${f?a.Cross:a.Check} ${G.prettyLocator(t.configuration,c.subject)} doesn't provide ${G.prettyIdent(t.configuration,c.ident)} to ${G.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,E):s.reportInfo(0,E)}}})).exitCode()}Ge();Yt();Ul();Ge();Ge();Dt();Yt();var mye=ut(Ai()),EC=class extends ft{constructor(){super(...arguments);this.useYarnPath=ge.Boolean(\"--yarn-path\",{description:\"Set the yarnPath setting even if the version can be accessed by Corepack\"});this.onlyIfNeeded=ge.Boolean(\"--only-if-needed\",!1,{description:\"Only lock the Yarn version if it isn't already locked\"});this.version=ge.String()}static{this.paths=[[\"set\",\"version\"]]}static{this.usage=ot.Usage({description:\"lock the Yarn version used by the project\",details:\"\\n      This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\\n\\n      By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set the `--yarn-path` command line flag, then the release will also be downloaded from the Yarn GitHub repository, stored inside your project, and referenced via the `yarnPath` settings from your project `.yarnrc.yml` file.\\n\\n      A very good use case for this command is to enforce the version of Yarn used by any single member of your team inside the same project - by doing this you ensure that you have control over Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting different behavior.\\n\\n      The version specifier can be:\\n\\n      - a tag:\\n        - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release\\n        - `canary` -> the most recent canary (release candidate) berry (`>=2.0.0`) release\\n        - `classic` -> the most recent classic (`^0.x || ^1.x`) release\\n\\n      - a semver range (e.g. `2.x`) -> the most recent version satisfying the range (limited to berry releases)\\n\\n      - a semver version (e.g. `2.4.1`, `1.22.1`)\\n\\n      - a local file referenced through either a relative or absolute path\\n\\n      - `self` -> the version used to invoke the command\\n    \",examples:[[\"Download the latest release from the Yarn repository\",\"$0 set version latest\"],[\"Download the latest canary release from the Yarn repository\",\"$0 set version canary\"],[\"Download the latest classic release from the Yarn repository\",\"$0 set version classic\"],[\"Download the most recent Yarn 3 build\",\"$0 set version 3.x\"],[\"Download a specific Yarn 2 build\",\"$0 set version 2.0.0-rc.30\"],[\"Switch back to a specific Yarn 1 release\",\"$0 set version 1.22.1\"],[\"Use a release from the local filesystem\",\"$0 set version ./yarn.cjs\"],[\"Use a release from a URL\",\"$0 set version https://repo.yarnpkg.com/3.1.0/packages/yarnpkg-cli/bin/yarn.js\"],[\"Download the version used to invoke the command\",\"$0 set version self\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&r.get(\"yarnPath\")){let f=r.sources.get(\"yarnPath\");if(!f)throw new Error(\"Assertion failed: Expected 'yarnPath' to have a source\");let p=r.projectCwd??r.startingCwd;if(J.contains(p,f))return 0}let s=()=>{if(typeof fn>\"u\")throw new nt(\"The --install flag can only be used without explicit version specifier from the Yarn CLI\");return`file://${process.argv[1]}`},a,n=(f,p)=>({version:p,url:f.replace(/\\{\\}/g,p)});if(this.version===\"self\")a={url:s(),version:fn??\"self\"};else if(this.version===\"latest\"||this.version===\"berry\"||this.version===\"stable\")a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",await Zv(r,\"stable\"));else if(this.version===\"canary\")a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",await Zv(r,\"canary\"));else if(this.version===\"classic\")a={url:\"https://classic.yarnpkg.com/latest.js\",version:\"classic\"};else if(this.version.match(/^https?:/))a={url:this.version,version:\"remote\"};else if(this.version.match(/^\\.{0,2}[\\\\/]/)||fe.isAbsolute(this.version))a={url:`file://${J.resolve(fe.toPortablePath(this.version))}`,version:\"file\"};else if(Fr.satisfiesWithPrereleases(this.version,\">=2.0.0\"))a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",this.version);else if(Fr.satisfiesWithPrereleases(this.version,\"^0.x || ^1.x\"))a=n(\"https://github.com/yarnpkg/yarn/releases/download/v{}/yarn-{}.js\",this.version);else if(Fr.validRange(this.version))a=n(\"https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js\",await Vlt(r,this.version));else throw new nt(`Invalid version descriptor \"${this.version}\"`);return(await Ot.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},async f=>{let p=async()=>{let h=\"file://\";return a.url.startsWith(h)?(f.reportInfo(0,`Retrieving ${he.pretty(r,a.url,he.Type.PATH)}`),await ce.readFilePromise(a.url.slice(h.length))):(f.reportInfo(0,`Downloading ${he.pretty(r,a.url,he.Type.URL)}`),await nn.get(a.url,{configuration:r}))};await X5(r,a.version,p,{report:f,useYarnPath:this.useYarnPath})})).exitCode()}};async function Vlt(t,e){let s=(await nn.get(\"https://repo.yarnpkg.com/tags\",{configuration:t,jsonResponse:!0})).tags.filter(a=>Fr.satisfiesWithPrereleases(a,e));if(s.length===0)throw new nt(`No matching release found for range ${he.pretty(t,e,he.Type.RANGE)}.`);return s[0]}async function Zv(t,e){let r=await nn.get(\"https://repo.yarnpkg.com/tags\",{configuration:t,jsonResponse:!0});if(!r.latest[e])throw new nt(`Tag ${he.pretty(t,e,he.Type.RANGE)} not found`);return r.latest[e]}async function X5(t,e,r,{report:s,useYarnPath:a}){let n,c=async()=>(typeof n>\"u\"&&(n=await r()),n);if(e===null){let ee=await c();await ce.mktempPromise(async ie=>{let ue=J.join(ie,\"yarn.cjs\");await ce.writeFilePromise(ue,ee);let{stdout:le}=await qr.execvp(process.execPath,[fe.fromPortablePath(ue),\"--version\"],{cwd:ie,env:{...t.env,YARN_IGNORE_PATH:\"1\"}});if(e=le.trim(),!mye.default.valid(e))throw new Error(`Invalid semver version. ${he.pretty(t,\"yarn --version\",he.Type.CODE)} returned:\n${e}`)})}let f=t.projectCwd??t.startingCwd,p=J.resolve(f,\".yarn/releases\"),h=J.resolve(p,`yarn-${e}.cjs`),E=J.relative(t.startingCwd,h),C=je.isTaggedYarnVersion(e),S=t.get(\"yarnPath\"),P=!C,I=P||!!S||!!a;if(a===!1){if(P)throw new jt(0,\"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack\");I=!1}else!I&&!process.env.COREPACK_ROOT&&(s.reportWarning(0,`You don't seem to have ${he.applyHyperlink(t,\"Corepack\",\"https://nodejs.org/api/corepack.html\")} enabled; we'll have to rely on ${he.applyHyperlink(t,\"yarnPath\",\"https://yarnpkg.com/configuration/yarnrc#yarnPath\")} instead`),I=!0);if(I){let ee=await c();s.reportInfo(0,`Saving the new release in ${he.pretty(t,E,\"magenta\")}`),await ce.removePromise(J.dirname(h)),await ce.mkdirPromise(J.dirname(h),{recursive:!0}),await ce.writeFilePromise(h,ee,{mode:493}),await ze.updateConfiguration(f,{yarnPath:J.relative(f,h)})}else await ce.removePromise(J.dirname(h)),await ze.updateConfiguration(f,{yarnPath:ze.deleteProperty});let R=await Ut.tryFind(f)||new Ut;R.packageManager=`yarn@${C?e:await Zv(t,\"stable\")}`;let N={};R.exportTo(N);let U=J.join(f,Ut.fileName),W=`${JSON.stringify(N,null,R.indent)}\n`;return await ce.changeFilePromise(U,W,{automaticNewlines:!0}),{bundleVersion:e}}function yye(t){return Br[jx(t)]}var Jlt=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\\n\\n(?<details>(?:.(?!##))+)/gs;async function Klt(t){let r=`https://repo.yarnpkg.com/${je.isTaggedYarnVersion(fn)?fn:await Zv(t,\"canary\")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,s=await nn.get(r,{configuration:t});return new Map(Array.from(s.toString().matchAll(Jlt),({groups:a})=>{if(!a)throw new Error(\"Assertion failed: Expected the match to have been successful\");let n=yye(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected \"${a.name}\" to be named \"${n}\"`);return[a.code,a.details]}))}var IC=class extends ft{constructor(){super(...arguments);this.code=ge.String({required:!1,validator:$2(wE(),[Z2(/^YN[0-9]{4}$/)])});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"explain\"]]}static{this.usage=ot.Usage({description:\"explain an error code\",details:`\n      When the code argument is specified, this command prints its name and its details.\n\n      When used without arguments, this command lists all error codes and their names.\n    `,examples:[[\"Explain an error code\",\"$0 explain YN0006\"],[\"List all error codes\",\"$0 explain\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(typeof this.code<\"u\"){let s=yye(this.code),a=he.pretty(r,s,he.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),f=(await Klt(r)).get(this.code),p=typeof f<\"u\"?he.jsonOrPretty(this.json,r,he.tuple(he.Type.MARKDOWN,{text:f,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.\n\nYou can help us by editing this page on GitHub \\u{1F642}:\n${he.jsonOrPretty(this.json,r,he.tuple(he.Type.URL,\"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx\"))}\n`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:s,details:p})}\n`):this.context.stdout.write(`${n}\n\n${p}\n`)}else{let s={children:je.mapAndFilter(Object.entries(Br),([a,n])=>Number.isNaN(Number(a))?je.mapAndFilter.skip:{label:Yf(Number(a)),value:he.tuple(he.Type.CODE,n)})};xs.emitTree(s,{configuration:r,stdout:this.context.stdout,json:this.json})}}};Ge();Dt();Yt();var Eye=ut(Go()),CC=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Print versions of a package from the whole project\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Print information for all packages, including transitive dependencies\"});this.extra=ge.Array(\"-X,--extra\",[],{description:\"An array of requests of extra data provided by plugins\"});this.cache=ge.Boolean(\"--cache\",!1,{description:\"Print information about the cache entry of a package (path, size, checksum)\"});this.dependents=ge.Boolean(\"--dependents\",!1,{description:\"Print all dependents for each matching package\"});this.manifest=ge.Boolean(\"--manifest\",!1,{description:\"Print data obtained by looking at the package archive (license, homepage, ...)\"});this.nameOnly=ge.Boolean(\"--name-only\",!1,{description:\"Only print the name for the matching packages\"});this.virtuals=ge.Boolean(\"--virtuals\",!1,{description:\"Print each instance of the virtual packages\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.patterns=ge.Rest()}static{this.paths=[[\"info\"]]}static{this.usage=ot.Usage({description:\"see information related to packages\",details:\"\\n      This command prints various information related to the specified packages, accepting glob patterns.\\n\\n      By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\\n\\n      Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\\n\\n      Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\\n    \",examples:[[\"Show information about Lodash\",\"$0 info lodash\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a&&!this.all)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=new Set(this.extra);this.cache&&c.add(\"cache\"),this.dependents&&c.add(\"dependents\"),this.manifest&&c.add(\"manifest\");let f=(ie,{recursive:ue})=>{let le=ie.anchoredLocator.locatorHash,me=new Map,pe=[le];for(;pe.length>0;){let Be=pe.shift();if(me.has(Be))continue;let Ce=s.storedPackages.get(Be);if(typeof Ce>\"u\")throw new Error(\"Assertion failed: Expected the package to be registered\");if(me.set(Be,Ce),G.isVirtualLocator(Ce)&&pe.push(G.devirtualizeLocator(Ce).locatorHash),!(!ue&&Be!==le))for(let g of Ce.dependencies.values()){let we=s.storedResolutions.get(g.descriptorHash);if(typeof we>\"u\")throw new Error(\"Assertion failed: Expected the resolution to be registered\");pe.push(we)}}return me.values()},p=({recursive:ie})=>{let ue=new Map;for(let le of s.workspaces)for(let me of f(le,{recursive:ie}))ue.set(me.locatorHash,me);return ue.values()},h=({all:ie,recursive:ue})=>ie&&ue?s.storedPackages.values():ie?p({recursive:ue}):f(a,{recursive:ue}),E=({all:ie,recursive:ue})=>{let le=h({all:ie,recursive:ue}),me=this.patterns.map(Ce=>{let g=G.parseLocator(Ce),we=Eye.default.makeRe(G.stringifyIdent(g)),ye=G.isVirtualLocator(g),Ae=ye?G.devirtualizeLocator(g):g;return se=>{let Z=G.stringifyIdent(se);if(!we.test(Z))return!1;if(g.reference===\"unknown\")return!0;let De=G.isVirtualLocator(se),Re=De?G.devirtualizeLocator(se):se;return!(ye&&De&&g.reference!==se.reference||Ae.reference!==Re.reference)}}),pe=je.sortMap([...le],Ce=>G.stringifyLocator(Ce));return{selection:pe.filter(Ce=>me.length===0||me.some(g=>g(Ce))),sortedLookup:pe}},{selection:C,sortedLookup:S}=E({all:this.all,recursive:this.recursive});if(C.length===0)throw new nt(\"No package matched your request\");let P=new Map;if(this.dependents)for(let ie of S)for(let ue of ie.dependencies.values()){let le=s.storedResolutions.get(ue.descriptorHash);if(typeof le>\"u\")throw new Error(\"Assertion failed: Expected the resolution to be registered\");je.getArrayWithDefault(P,le).push(ie)}let I=new Map;for(let ie of S){if(!G.isVirtualLocator(ie))continue;let ue=G.devirtualizeLocator(ie);je.getArrayWithDefault(I,ue.locatorHash).push(ie)}let R={},N={children:R},U=r.makeFetcher(),W={project:s,fetcher:U,cache:n,checksums:s.storedChecksums,report:new ki,cacheOptions:{skipIntegrityCheck:!0}},ee=[async(ie,ue,le)=>{if(!ue.has(\"manifest\"))return;let me=await U.fetch(ie,W),pe;try{pe=await Ut.find(me.prefixPath,{baseFs:me.packageFs})}finally{me.releaseFs?.()}le(\"Manifest\",{License:he.tuple(he.Type.NO_HINT,pe.license),Homepage:he.tuple(he.Type.URL,pe.raw.homepage??null)})},async(ie,ue,le)=>{if(!ue.has(\"cache\"))return;let me=s.storedChecksums.get(ie.locatorHash)??null,pe=n.getLocatorPath(ie,me),Be;if(pe!==null)try{Be=await ce.statPromise(pe)}catch{}let Ce=typeof Be<\"u\"?[Be.size,he.Type.SIZE]:void 0;le(\"Cache\",{Checksum:he.tuple(he.Type.NO_HINT,me),Path:he.tuple(he.Type.PATH,pe),Size:Ce})}];for(let ie of C){let ue=G.isVirtualLocator(ie);if(!this.virtuals&&ue)continue;let le={},me={value:[ie,he.Type.LOCATOR],children:le};if(R[G.stringifyLocator(ie)]=me,this.nameOnly){delete me.children;continue}let pe=I.get(ie.locatorHash);typeof pe<\"u\"&&(le.Instances={label:\"Instances\",value:he.tuple(he.Type.NUMBER,pe.length)}),le.Version={label:\"Version\",value:he.tuple(he.Type.NO_HINT,ie.version)};let Be=(g,we)=>{let ye={};if(le[g]=ye,Array.isArray(we))ye.children=we.map(Ae=>({value:Ae}));else{let Ae={};ye.children=Ae;for(let[se,Z]of Object.entries(we))typeof Z>\"u\"||(Ae[se]={label:se,value:Z})}};if(!ue){for(let g of ee)await g(ie,c,Be);await r.triggerHook(g=>g.fetchPackageInfo,ie,c,Be)}ie.bin.size>0&&!ue&&Be(\"Exported Binaries\",[...ie.bin.keys()].map(g=>he.tuple(he.Type.PATH,g)));let Ce=P.get(ie.locatorHash);typeof Ce<\"u\"&&Ce.length>0&&Be(\"Dependents\",Ce.map(g=>he.tuple(he.Type.LOCATOR,g))),ie.dependencies.size>0&&!ue&&Be(\"Dependencies\",[...ie.dependencies.values()].map(g=>{let we=s.storedResolutions.get(g.descriptorHash),ye=typeof we<\"u\"?s.storedPackages.get(we)??null:null;return he.tuple(he.Type.RESOLUTION,{descriptor:g,locator:ye})})),ie.peerDependencies.size>0&&ue&&Be(\"Peer dependencies\",[...ie.peerDependencies.values()].map(g=>{let we=ie.dependencies.get(g.identHash),ye=typeof we<\"u\"?s.storedResolutions.get(we.descriptorHash)??null:null,Ae=ye!==null?s.storedPackages.get(ye)??null:null;return he.tuple(he.Type.RESOLUTION,{descriptor:g,locator:Ae})}))}xs.emitTree(N,{configuration:r,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}};Ge();Dt();wc();var nF=ut(Fd());Yt();var Z5=ut(Ai());Ul();var zlt=[{selector:t=>t===-1,name:\"nodeLinker\",value:\"node-modules\"},{selector:t=>t!==-1&&t<8,name:\"enableGlobalCache\",value:!1},{selector:t=>t!==-1&&t<8,name:\"compressionLevel\",value:\"mixed\"}],wC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.immutable=ge.Boolean(\"--immutable\",{description:\"Abort with an error exit code if the lockfile was to be modified\"});this.immutableCache=ge.Boolean(\"--immutable-cache\",{description:\"Abort with an error exit code if the cache folder was to be modified\"});this.refreshLockfile=ge.Boolean(\"--refresh-lockfile\",{description:\"Refresh the package metadata stored in the lockfile\"});this.checkCache=ge.Boolean(\"--check-cache\",{description:\"Always refetch the packages and ensure that their checksums are consistent\"});this.checkResolutions=ge.Boolean(\"--check-resolutions\",{description:\"Validates that the package resolutions are coherent\"});this.inlineBuilds=ge.Boolean(\"--inline-builds\",{description:\"Verbosely print the output of the build steps of dependencies\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:fo($l)});this.cacheFolder=ge.String(\"--cache-folder\",{hidden:!0});this.frozenLockfile=ge.Boolean(\"--frozen-lockfile\",{hidden:!0});this.ignoreEngines=ge.Boolean(\"--ignore-engines\",{hidden:!0});this.nonInteractive=ge.Boolean(\"--non-interactive\",{hidden:!0});this.preferOffline=ge.Boolean(\"--prefer-offline\",{hidden:!0});this.production=ge.Boolean(\"--production\",{hidden:!0});this.registry=ge.String(\"--registry\",{hidden:!0});this.silent=ge.Boolean(\"--silent\",{hidden:!0});this.networkTimeout=ge.String(\"--network-timeout\",{hidden:!0})}static{this.paths=[[\"install\"],ot.Default]}static{this.usage=ot.Usage({description:\"install the project dependencies\",details:\"\\n      This command sets up your project if needed. The installation is split into four different steps that each have their own characteristics:\\n\\n      - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\\n\\n      - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where the cache files are stored).\\n\\n      - **Link:** Then we send the dependency tree information to internal plugins tasked with writing them on the disk in some form (for example by generating the `.pnp.cjs` file you might know).\\n\\n      - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another. See https://yarnpkg.com/advanced/lifecycle-scripts for detail.\\n\\n      Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your `.pnp.cjs` file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\\n\\n      If the `--immutable` option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the `immutablePatterns` configuration setting). For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\\n\\n      If the `--immutable-cache` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).\\n\\n      If the `--refresh-lockfile` option is set, Yarn will keep the same resolution for the packages currently in the lockfile but will refresh their metadata. If used together with `--immutable`, it can validate that the lockfile information are consistent. This flag is enabled by default when Yarn detects it runs within a pull request context.\\n\\n      If the `--check-cache` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.\\n\\n      If the `--inline-builds` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n    \",examples:[[\"Install the project\",\"$0 install\"],[\"Validate a project when using Zero-Installs\",\"$0 install --immutable --immutable-cache\"],[\"Validate a project when using Zero-Installs (slightly safer if you accept external PRs)\",\"$0 install --immutable --immutable-cache --check-cache\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);typeof this.inlineBuilds<\"u\"&&r.useWithSource(\"<cli>\",{enableInlineBuilds:this.inlineBuilds},r.startingCwd,{overwrite:!0});let s=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=await SI({configuration:r,stdout:this.context.stdout},[{option:this.ignoreEngines,message:\"The --ignore-engines option is deprecated; engine checking isn't a core feature anymore\",error:!nF.default.VERCEL},{option:this.registry,message:\"The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file\"},{option:this.preferOffline,message:\"The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead\",error:!nF.default.VERCEL},{option:this.production,message:\"The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead\",error:!0},{option:this.nonInteractive,message:\"The --non-interactive option is deprecated\",error:!s},{option:this.frozenLockfile,message:\"The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead\",callback:()=>this.immutable=this.frozenLockfile},{option:this.cacheFolder,message:\"The cache-folder option has been deprecated; use rc settings instead\",error:!nF.default.NETLIFY}]);if(a!==null)return a;let n=this.mode===\"update-lockfile\";if(n&&(this.immutable||this.immutableCache))throw new nt(`${he.pretty(r,\"--immutable\",he.Type.CODE)} and ${he.pretty(r,\"--immutable-cache\",he.Type.CODE)} cannot be used with ${he.pretty(r,\"--mode=update-lockfile\",he.Type.CODE)}`);let c=(this.immutable??r.get(\"enableImmutableInstalls\"))&&!n,f=this.immutableCache&&!n;if(r.projectCwd!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U=!1;await $lt(r,c)&&(N.reportInfo(48,\"Automatically removed core plugins that are now builtins \\u{1F44D}\"),U=!0),await Zlt(r,c)&&(N.reportInfo(48,\"Automatically fixed merge conflicts \\u{1F44D}\"),U=!0),U&&N.reportSeparator()});if(R.hasErrors())return R.exitCode()}if(r.projectCwd!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{if(ze.telemetry?.isNew)ze.telemetry.commitTips(),N.reportInfo(65,\"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry\"),N.reportInfo(65,`Run ${he.pretty(r,\"yarn config set --home enableTelemetry 0\",he.Type.CODE)} to disable`),N.reportSeparator();else if(ze.telemetry?.shouldShowTips){let U=await nn.get(\"https://repo.yarnpkg.com/tags\",{configuration:r,jsonResponse:!0}).catch(()=>null);if(U!==null){let W=null;if(fn!==null){let ie=Z5.default.prerelease(fn)?\"canary\":\"stable\",ue=U.latest[ie];Z5.default.gt(ue,fn)&&(W=[ie,ue])}if(W)ze.telemetry.commitTips(),N.reportInfo(88,`${he.applyStyle(r,`A new ${W[0]} version of Yarn is available:`,he.Style.BOLD)} ${G.prettyReference(r,W[1])}!`),N.reportInfo(88,`Upgrade now by running ${he.pretty(r,`yarn set version ${W[1]}`,he.Type.CODE)}`),N.reportSeparator();else{let ee=ze.telemetry.selectTip(U.tips);ee&&(N.reportInfo(89,he.pretty(r,ee.message,he.Type.MARKDOWN_INLINE)),ee.url&&N.reportInfo(89,`Learn more at ${ee.url}`),N.reportSeparator())}}}});if(R.hasErrors())return R.exitCode()}let{project:p,workspace:h}=await Tt.find(r,this.context.cwd),E=p.lockfileLastVersion;if(E!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U={};for(let W of zlt)W.selector(E)&&typeof r.sources.get(W.name)>\"u\"&&(r.use(\"<compat>\",{[W.name]:W.value},p.cwd,{overwrite:!0}),U[W.name]=W.value);Object.keys(U).length>0&&(await ze.updateConfiguration(p.cwd,U),N.reportInfo(87,\"Migrated your project to the latest Yarn version \\u{1F680}\"),N.reportSeparator())});if(R.hasErrors())return R.exitCode()}let C=await Kr.find(r,{immutable:f,check:this.checkCache});if(!h)throw new ar(p.cwd,this.context.cwd);await p.restoreInstallState({restoreResolutions:!1});let S=r.get(\"enableHardenedMode\");S&&typeof r.sources.get(\"enableHardenedMode\")>\"u\"&&await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async R=>{R.reportWarning(0,\"Yarn detected that the current workflow is executed from a public pull request. For safety the hardened mode has been enabled.\"),R.reportWarning(0,`It will prevent malicious lockfile manipulations, in exchange for a slower install time. You can opt-out if necessary; check our ${he.applyHyperlink(r,\"documentation\",\"https://yarnpkg.com/features/security#hardened-mode\")} for more details.`),R.reportSeparator()}),(this.refreshLockfile??S)&&(p.lockfileNeedsRefresh=!0);let P=this.checkResolutions??S;return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,forceSectionAlignment:!0,includeLogs:!0,includeVersion:!0},async R=>{await p.install({cache:C,report:R,immutable:c,checkResolutions:P,mode:this.mode})})).exitCode()}},Xlt=\"<<<<<<<\";async function Zlt(t,e){if(!t.projectCwd)return!1;let r=J.join(t.projectCwd,Er.lockfile);if(!await ce.existsPromise(r)||!(await ce.readFilePromise(r,\"utf8\")).includes(Xlt))return!1;if(e)throw new jt(47,\"Cannot autofix a lockfile when running an immutable install\");let a=await qr.execvp(\"git\",[\"rev-parse\",\"MERGE_HEAD\",\"HEAD\"],{cwd:t.projectCwd});if(a.code!==0&&(a=await qr.execvp(\"git\",[\"rev-parse\",\"REBASE_HEAD\",\"HEAD\"],{cwd:t.projectCwd})),a.code!==0&&(a=await qr.execvp(\"git\",[\"rev-parse\",\"CHERRY_PICK_HEAD\",\"HEAD\"],{cwd:t.projectCwd})),a.code!==0)throw new jt(83,\"Git returned an error when trying to find the commits pertaining to the conflict\");let n=await Promise.all(a.stdout.trim().split(/\\n/).map(async f=>{let p=await qr.execvp(\"git\",[\"show\",`${f}:./${Er.lockfile}`],{cwd:t.projectCwd});if(p.code!==0)throw new jt(83,`Git returned an error when trying to access the lockfile content in ${f}`);try{return ls(p.stdout)}catch{throw new jt(46,\"A variant of the conflicting lockfile failed to parse\")}}));n=n.filter(f=>!!f.__metadata);for(let f of n){if(f.__metadata.version<7)for(let p of Object.keys(f)){if(p===\"__metadata\")continue;let h=G.parseDescriptor(p,!0),E=t.normalizeDependency(h),C=G.stringifyDescriptor(E);C!==p&&(f[C]=f[p],delete f[p])}for(let p of Object.keys(f)){if(p===\"__metadata\")continue;let h=f[p].checksum;typeof h>\"u\"||h.includes(\"/\")||(f[p].checksum=`${f.__metadata.cacheKey}/${h}`)}}let c=Object.assign({},...n);c.__metadata.version=`${Math.min(...n.map(f=>parseInt(f.__metadata.version??0)))}`,c.__metadata.cacheKey=\"merged\";for(let[f,p]of Object.entries(c))typeof p==\"string\"&&delete c[f];return await ce.changeFilePromise(r,nl(c),{automaticNewlines:!0}),!0}async function $lt(t,e){if(!t.projectCwd)return!1;let r=[],s=J.join(t.projectCwd,\".yarn/plugins/@yarnpkg\");return await ze.updateConfiguration(t.projectCwd,{plugins:n=>{if(!Array.isArray(n))return n;let c=n.filter(f=>{if(!f.path)return!0;let p=J.resolve(t.projectCwd,f.path),h=ov.has(f.spec)&&J.contains(s,p);return h&&r.push(p),!h});return c.length===0?ze.deleteProperty:c.length===n.length?n:c}},{immutable:e})?(await Promise.all(r.map(async n=>{await ce.removePromise(n)})),!0):!1}Ge();Dt();Yt();var BC=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Link all workspaces belonging to the target projects to the current one\"});this.private=ge.Boolean(\"-p,--private\",!1,{description:\"Also link private workspaces belonging to the target projects to the current one\"});this.relative=ge.Boolean(\"-r,--relative\",!1,{description:\"Link workspaces using relative paths instead of absolute paths\"});this.destinations=ge.Rest()}static{this.paths=[[\"link\"]]}static{this.usage=ot.Usage({description:\"connect the local project to another one\",details:\"\\n      This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\\n    \",examples:[[\"Register one or more remote workspaces for use in the current project\",\"$0 link ~/ts-loader ~/jest\"],[\"Register all workspaces from a remote project for use in the current project\",\"$0 link ~/jest --all\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=s.topLevelWorkspace,f=[];for(let p of this.destinations){let h=J.resolve(this.context.cwd,fe.toPortablePath(p)),E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Tt.find(E,h);if(s.cwd===C.cwd)throw new nt(`Invalid destination '${p}'; Can't link the project to itself`);if(!S)throw new ar(C.cwd,h);if(this.all){let P=!1;for(let I of C.workspaces)I.manifest.name&&(!I.manifest.private||this.private)&&(f.push(I),P=!0);if(!P)throw new nt(`No workspace found to be linked in the target project: ${p}`)}else{if(!S.manifest.name)throw new nt(`The target workspace at '${p}' doesn't have a name and thus cannot be linked`);if(S.manifest.private&&!this.private)throw new nt(`The target workspace at '${p}' is marked private - use the --private flag to link it anyway`);f.push(S)}}for(let p of f){let h=G.stringifyIdent(p.anchoredLocator),E=this.relative?J.relative(s.cwd,p.cwd):p.cwd;c.manifest.resolutions.push({pattern:{descriptor:{fullName:h}},reference:`portal:${E}`})}return await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Yt();var vC=class extends ft{constructor(){super(...arguments);this.args=ge.Proxy()}static{this.paths=[[\"node\"]]}static{this.usage=ot.Usage({description:\"run node with the hook already setup\",details:`\n      This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n\n      The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.\n    `,examples:[[\"Run a Node script\",\"$0 node ./my-script.js\"]]})}async execute(){return this.cli.run([\"exec\",\"node\",...this.args])}};Ge();Yt();var SC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"plugin\",\"check\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"find all third-party plugins that differ from their own spec\",details:`\n      Check only the plugins from https.\n\n      If this command detects any plugin differences in the CI environment, it will throw an error.\n    `,examples:[[\"find all third-party plugins that differ from their own spec\",\"$0 plugin check\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await ze.findRcFiles(this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let c of s)if(c.data?.plugins)for(let f of c.data.plugins){if(!f.checksum||!f.spec.match(/^https?:/))continue;let p=await nn.get(f.spec,{configuration:r}),h=Nn.makeHash(p);if(f.checksum===h)continue;let E=he.pretty(r,f.path,he.Type.PATH),C=he.pretty(r,f.spec,he.Type.URL),S=`${E} is different from the file provided by ${C}`;n.reportJson({...f,newChecksum:h}),n.reportError(0,S)}})).exitCode()}};Ge();Ge();Dt();Yt();var vye=Ie(\"os\");Ge();Dt();Yt();var Iye=Ie(\"os\");Ge();wc();Yt();var ect=\"https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml\";async function Sm(t,e){let r=await nn.get(ect,{configuration:t}),s=ls(r.toString());return Object.fromEntries(Object.entries(s).filter(([a,n])=>!e||Fr.satisfiesWithPrereleases(e,n.range??\"<4.0.0-rc.1\")))}var DC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"plugin\",\"list\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"list the available official plugins\",details:\"\\n      This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\\n    \",examples:[[\"List the official plugins\",\"$0 plugin list\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Sm(r,fn);for(let[c,{experimental:f,...p}]of Object.entries(n)){let h=c;f&&(h+=\" [experimental]\"),a.reportJson({name:c,experimental:f,...p}),a.reportInfo(null,h)}})).exitCode()}};var tct=/^[0-9]+$/,rct=process.platform===\"win32\";function Cye(t){return tct.test(t)?`pull/${t}/head`:t}var nct=({repository:t,branch:e},r)=>[[\"git\",\"init\",fe.fromPortablePath(r)],[\"git\",\"remote\",\"add\",\"origin\",t],[\"git\",\"fetch\",\"origin\",\"--depth=1\",Cye(e)],[\"git\",\"reset\",\"--hard\",\"FETCH_HEAD\"]],ict=({branch:t})=>[[\"git\",\"fetch\",\"origin\",\"--depth=1\",Cye(t),\"--force\"],[\"git\",\"reset\",\"--hard\",\"FETCH_HEAD\"],[\"git\",\"clean\",\"-dfx\",\"-e\",\"packages/yarnpkg-cli/bundles\"]],sct=({plugins:t,noMinify:e},r,s)=>[[\"yarn\",\"build:cli\",...new Array().concat(...t.map(a=>[\"--plugin\",J.resolve(s,a)])),...e?[\"--no-minify\"]:[],\"|\"],[rct?\"move\":\"mv\",\"packages/yarnpkg-cli/bundles/yarn.js\",fe.fromPortablePath(r),\"|\"]],bC=class extends ft{constructor(){super(...arguments);this.installPath=ge.String(\"--path\",{description:\"The path where the repository should be cloned to\"});this.repository=ge.String(\"--repository\",\"https://github.com/yarnpkg/berry.git\",{description:\"The repository that should be cloned\"});this.branch=ge.String(\"--branch\",\"master\",{description:\"The branch of the repository that should be cloned\"});this.plugins=ge.Array(\"--plugin\",[],{description:\"An array of additional plugins that should be included in the bundle\"});this.dryRun=ge.Boolean(\"-n,--dry-run\",!1,{description:\"If set, the bundle will be built but not added to the project\"});this.noMinify=ge.Boolean(\"--no-minify\",!1,{description:\"Build a bundle for development (debugging) - non-minified and non-mangled\"});this.force=ge.Boolean(\"-f,--force\",!1,{description:\"Always clone the repository instead of trying to fetch the latest commits\"});this.skipPlugins=ge.Boolean(\"--skip-plugins\",!1,{description:\"Skip updating the contrib plugins\"})}static{this.paths=[[\"set\",\"version\",\"from\",\"sources\"]]}static{this.usage=ot.Usage({description:\"build Yarn from master\",details:`\n      This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.\n\n      By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \\`--skip-plugins\\` flag.\n    `,examples:[[\"Build Yarn from master\",\"$0 set version from sources\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=typeof this.installPath<\"u\"?J.resolve(this.context.cwd,fe.toPortablePath(this.installPath)):J.resolve(fe.toPortablePath((0,Iye.tmpdir)()),\"yarnpkg-sources\",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{await $5(this,{configuration:r,report:c,target:a}),c.reportSeparator(),c.reportInfo(0,\"Building a fresh bundle\"),c.reportSeparator();let f=await qr.execvp(\"git\",[\"rev-parse\",\"--short\",\"HEAD\"],{cwd:a,strict:!0}),p=J.join(a,`packages/yarnpkg-cli/bundles/yarn-${f.stdout.trim()}.js`);ce.existsSync(p)||(await $v(sct(this,p,a),{configuration:r,context:this.context,target:a}),c.reportSeparator());let h=await ce.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await X5(r,null,async()=>h,{report:c});this.skipPlugins||await oct(this,E,{project:s,report:c,target:a})}})).exitCode()}};async function $v(t,{configuration:e,context:r,target:s}){for(let[a,...n]of t){let c=n[n.length-1]===\"|\";if(c&&n.pop(),c)await qr.pipevp(a,n,{cwd:s,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${he.pretty(e,`  $ ${[a,...n].join(\" \")}`,\"grey\")}\n`);try{await qr.execvp(a,n,{cwd:s,strict:!0})}catch(f){throw r.stdout.write(f.stdout||f.stack),f}}}}async function $5(t,{configuration:e,report:r,target:s}){let a=!1;if(!t.force&&ce.existsSync(J.join(s,\".git\"))){r.reportInfo(0,\"Fetching the latest commits\"),r.reportSeparator();try{await $v(ict(t),{configuration:e,context:t.context,target:s}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,\"Repository update failed; we'll try to regenerate it\")}}a||(r.reportInfo(0,\"Cloning the remote repository\"),r.reportSeparator(),await ce.removePromise(s),await ce.mkdirPromise(s,{recursive:!0}),await $v(nct(t,s),{configuration:e,context:t.context,target:s}))}async function oct(t,e,{project:r,report:s,target:a}){let n=await Sm(r.configuration,e),c=new Set(Object.keys(n));for(let f of r.configuration.plugins.keys())c.has(f)&&await eq(f,t,{project:r,report:s,target:a})}Ge();Ge();Dt();Yt();var wye=ut(Ai()),Bye=Ie(\"vm\");var PC=class extends ft{constructor(){super(...arguments);this.name=ge.String();this.checksum=ge.Boolean(\"--checksum\",!0,{description:\"Whether to care if this plugin is modified\"})}static{this.paths=[[\"plugin\",\"import\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"download a plugin\",details:`\n      This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.\n\n      Three types of plugin references are accepted:\n\n      - If the plugin is stored within the Yarn repository, it can be referenced by name.\n      - Third-party plugins can be referenced directly through their public urls.\n      - Local plugins can be referenced by their path on the disk.\n\n      If the \\`--no-checksum\\` option is set, Yarn will no longer care if the plugin is modified.\n\n      Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \\`@yarnpkg/builder\\` package).\n    `,examples:[['Download and activate the \"@yarnpkg/plugin-exec\" plugin',\"$0 plugin import @yarnpkg/plugin-exec\"],['Download and activate the \"@yarnpkg/plugin-exec\" plugin (shorthand)',\"$0 plugin import exec\"],[\"Download and activate a community plugin\",\"$0 plugin import https://example.org/path/to/plugin.js\"],[\"Activate a local plugin\",\"$0 plugin import ./path/to/plugin.js\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Tt.find(r,this.context.cwd),c,f;if(this.name.match(/^\\.{0,2}[\\\\/]/)||fe.isAbsolute(this.name)){let p=J.resolve(this.context.cwd,fe.toPortablePath(this.name));a.reportInfo(0,`Reading ${he.pretty(r,p,he.Type.PATH)}`),c=J.relative(n.cwd,p),f=await ce.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new jt(52,`Plugin specifier \"${this.name}\" is neither a plugin name nor a valid url`)}c=this.name,p=this.name}else{let h=G.parseLocator(this.name.replace(/^((@yarnpkg\\/)?plugin-)?/,\"@yarnpkg/plugin-\"));if(h.reference!==\"unknown\"&&!wye.default.valid(h.reference))throw new jt(0,\"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.\");let E=G.stringifyIdent(h),C=await Sm(r,fn);if(!Object.hasOwn(C,E)){let S=`Couldn't find a plugin named ${G.prettyIdent(r,h)} on the remote registry.\n`;throw r.plugins.has(E)?S+=`A plugin named ${G.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:S+=`Note that only the plugins referenced on our website (${he.pretty(r,\"https://github.com/yarnpkg/berry/blob/master/plugins.yml\",he.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${he.pretty(r,\"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js\",he.Type.URL)}).`,new jt(51,S)}c=E,p=C[E].url,h.reference!==\"unknown\"?p=p.replace(/\\/master\\//,`/${E}/${h.reference}/`):fn!==null&&(p=p.replace(/\\/master\\//,`/@yarnpkg/cli/${fn}/`))}a.reportInfo(0,`Downloading ${he.pretty(r,p,\"green\")}`),f=await nn.get(p,{configuration:r})}await tq(c,f,{checksum:this.checksum,project:n,report:a})})).exitCode()}};async function tq(t,e,{checksum:r=!0,project:s,report:a}){let{configuration:n}=s,c={},f={exports:c};(0,Bye.runInNewContext)(e.toString(),{module:f,exports:c});let h=`.yarn/plugins/${f.exports.name}.cjs`,E=J.resolve(s.cwd,h);a.reportInfo(0,`Saving the new plugin in ${he.pretty(n,h,\"magenta\")}`),await ce.mkdirPromise(J.dirname(E),{recursive:!0}),await ce.writeFilePromise(E,e);let C={path:h,spec:t};r&&(C.checksum=Nn.makeHash(e)),await ze.addPlugin(s.cwd,[C])}var act=({pluginName:t,noMinify:e},r)=>[[\"yarn\",`build:${t}`,...e?[\"--no-minify\"]:[],\"|\"]],xC=class extends ft{constructor(){super(...arguments);this.installPath=ge.String(\"--path\",{description:\"The path where the repository should be cloned to\"});this.repository=ge.String(\"--repository\",\"https://github.com/yarnpkg/berry.git\",{description:\"The repository that should be cloned\"});this.branch=ge.String(\"--branch\",\"master\",{description:\"The branch of the repository that should be cloned\"});this.noMinify=ge.Boolean(\"--no-minify\",!1,{description:\"Build a plugin for development (debugging) - non-minified and non-mangled\"});this.force=ge.Boolean(\"-f,--force\",!1,{description:\"Always clone the repository instead of trying to fetch the latest commits\"});this.name=ge.String()}static{this.paths=[[\"plugin\",\"import\",\"from\",\"sources\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"build a plugin from sources\",details:`\n      This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.\n\n      The plugins can be referenced by their short name if sourced from the official Yarn repository.\n    `,examples:[['Build and activate the \"@yarnpkg/plugin-exec\" plugin',\"$0 plugin import from sources @yarnpkg/plugin-exec\"],['Build and activate the \"@yarnpkg/plugin-exec\" plugin (shorthand)',\"$0 plugin import from sources exec\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.installPath<\"u\"?J.resolve(this.context.cwd,fe.toPortablePath(this.installPath)):J.resolve(fe.toPortablePath((0,vye.tmpdir)()),\"yarnpkg-sources\",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:c}=await Tt.find(r,this.context.cwd),f=G.parseIdent(this.name.replace(/^((@yarnpkg\\/)?plugin-)?/,\"@yarnpkg/plugin-\")),p=G.stringifyIdent(f),h=await Sm(r,fn);if(!Object.hasOwn(h,p))throw new jt(51,`Couldn't find a plugin named \"${p}\" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let E=p;await $5(this,{configuration:r,report:n,target:s}),await eq(E,this,{project:c,report:n,target:s})})).exitCode()}};async function eq(t,{context:e,noMinify:r},{project:s,report:a,target:n}){let c=t.replace(/@yarnpkg\\//,\"\"),{configuration:f}=s;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${c}`),a.reportSeparator(),await $v(act({pluginName:c,noMinify:r},n),{configuration:f,context:e,target:n}),a.reportSeparator();let p=J.resolve(n,`packages/${c}/bundles/${t}.js`),h=await ce.readFilePromise(p);await tq(t,h,{project:s,report:a})}Ge();Dt();Yt();var kC=class extends ft{constructor(){super(...arguments);this.name=ge.String()}static{this.paths=[[\"plugin\",\"remove\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"remove a plugin\",details:`\n      This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.\n\n      **Note:** The plugins have to be referenced by their name property, which can be obtained using the \\`yarn plugin runtime\\` command. Shorthands are not allowed.\n   `,examples:[[\"Remove a plugin imported from the Yarn repository\",\"$0 plugin remove @yarnpkg/plugin-typescript\"],[\"Remove a plugin imported from a local file\",\"$0 plugin remove my-local-plugin\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c=this.name,f=G.parseIdent(c);if(!r.plugins.has(c))throw new nt(`${G.prettyIdent(r,f)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${c}.cjs`,h=J.resolve(s.cwd,p);ce.existsSync(h)&&(n.reportInfo(0,`Removing ${he.pretty(r,p,he.Type.PATH)}...`),await ce.removePromise(h)),n.reportInfo(0,\"Updating the configuration...\"),await ze.updateConfiguration(s.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let C=E.filter(S=>S.path!==p);return C.length===0?ze.deleteProperty:C.length===E.length?E:C}})})).exitCode()}};Ge();Yt();var QC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"plugin\",\"runtime\"]]}static{this.usage=ot.Usage({category:\"Plugin-related commands\",description:\"list the active plugins\",details:`\n      This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.\n    `,examples:[[\"List the currently active plugins\",\"$0 plugin runtime\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let c=this.context.plugins.plugins.has(n),f=n;c&&(f+=\" [builtin]\"),a.reportJson({name:n,builtin:c}),a.reportInfo(null,`${f}`)}})).exitCode()}};Ge();Ge();Yt();var TC=class extends ft{constructor(){super(...arguments);this.idents=ge.Rest()}static{this.paths=[[\"rebuild\"]]}static{this.usage=ot.Usage({description:\"rebuild the project's native packages\",details:`\n      This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.\n\n      Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).\n\n      By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.\n    `,examples:[[\"Rebuild all packages\",\"$0 rebuild\"],[\"Rebuild fsevents only\",\"$0 rebuild fsevents\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=new Set;for(let f of this.idents)c.add(G.parseIdent(f).identHash);if(await s.restoreInstallState({restoreResolutions:!1}),await s.resolveEverything({cache:n,report:new ki}),c.size>0)for(let f of s.storedPackages.values())c.has(f.identHash)&&(s.storedBuildState.delete(f.locatorHash),s.skippedBuilds.delete(f.locatorHash));else s.storedBuildState.clear(),s.skippedBuilds.clear();return await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ge();Ge();Ge();Yt();var rq=ut(Go());Ul();var RC=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Apply the operation to all workspaces from the current project\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:fo($l)});this.patterns=ge.Rest()}static{this.paths=[[\"remove\"]]}static{this.usage=ot.Usage({description:\"remove dependencies from the project\",details:`\n      This command will remove the packages matching the specified patterns from the current workspace.\n\n      If the \\`--mode=<mode>\\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n      - \\`skip-build\\` will not run the build scripts at all. Note that this is different from setting \\`enableScripts\\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n      - \\`update-lockfile\\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n      This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n    `,examples:[[\"Remove a dependency from the current project\",\"$0 remove lodash\"],[\"Remove a dependency from all workspaces at once\",\"$0 remove lodash --all\"],[\"Remove all dependencies starting with `eslint-`\",\"$0 remove 'eslint-*'\"],[\"Remove all dependencies with the `@babel` scope\",\"$0 remove '@babel/*'\"],[\"Remove all dependencies matching `react-dom` or `react-helmet`\",\"$0 remove 'react-{dom,helmet}'\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.all?s.workspaces:[a],f=[\"dependencies\",\"devDependencies\",\"peerDependencies\"],p=[],h=!1,E=[];for(let I of this.patterns){let R=!1,N=G.parseIdent(I);for(let U of c){let W=[...U.manifest.peerDependenciesMeta.keys()];for(let ee of(0,rq.default)(W,I))U.manifest.peerDependenciesMeta.delete(ee),h=!0,R=!0;for(let ee of f){let ie=U.manifest.getForScope(ee),ue=[...ie.values()].map(le=>G.stringifyIdent(le));for(let le of(0,rq.default)(ue,G.stringifyIdent(N))){let{identHash:me}=G.parseIdent(le),pe=ie.get(me);if(typeof pe>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");U.manifest[ee].delete(me),E.push([U,ee,pe]),h=!0,R=!0}}}R||p.push(I)}let C=p.length>1?\"Patterns\":\"Pattern\",S=p.length>1?\"don't\":\"doesn't\",P=this.all?\"any\":\"this\";if(p.length>0)throw new nt(`${C} ${he.prettyList(r,p,he.Type.CODE)} ${S} match any packages referenced by ${P} workspace`);return h?(await r.triggerMultipleHooks(I=>I.afterWorkspaceDependencyRemoval,E),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};Ge();Ge();Yt();var Sye=Ie(\"util\"),FC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"run\"]]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async c=>{let f=a.manifest.scripts,p=je.sortMap(f.keys(),C=>C),h={breakLength:1/0,colors:r.get(\"enableColors\"),maxArrayLength:2},E=p.reduce((C,S)=>Math.max(C,S.length),0);for(let[C,S]of f.entries())c.reportInfo(null,`${C.padEnd(E,\" \")}   ${(0,Sye.inspect)(S,h)}`),c.reportJson({name:C,script:S})})).exitCode()}};Ge();Ge();Yt();var NC=class extends ft{constructor(){super(...arguments);this.inspect=ge.String(\"--inspect\",!1,{tolerateBoolean:!0,description:\"Forwarded to the underlying Node process when executing a binary\"});this.inspectBrk=ge.String(\"--inspect-brk\",!1,{tolerateBoolean:!0,description:\"Forwarded to the underlying Node process when executing a binary\"});this.topLevel=ge.Boolean(\"-T,--top-level\",!1,{description:\"Check the root workspace for scripts and/or binaries instead of the current one\"});this.binariesOnly=ge.Boolean(\"-B,--binaries-only\",!1,{description:\"Ignore any user defined scripts and only check for binaries\"});this.require=ge.String(\"--require\",{description:\"Forwarded to the underlying Node process when executing a binary\"});this.silent=ge.Boolean(\"--silent\",{hidden:!0});this.scriptName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"run\"]]}static{this.usage=ot.Usage({description:\"run a script defined in the package.json\",details:`\n      This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:\n\n      - If the \\`scripts\\` field from your local package.json contains a matching script name, its definition will get executed.\n\n      - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.\n\n      - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.\n\n      Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).\n    `,examples:[[\"Run the tests from the local workspace\",\"$0 run test\"],['Same thing, but without the \"run\" keyword',\"$0 test\"],[\"Inspect Webpack while running\",\"$0 run --inspect-brk webpack\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a,locator:n}=await Tt.find(r,this.context.cwd);await s.restoreInstallState();let c=this.topLevel?s.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await In.hasPackageScript(c,this.scriptName,{project:s}))return await In.executePackageScript(c,this.scriptName,this.args,{project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let f=await In.getPackageAccessibleBinaries(c,{project:s});if(f.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect==\"string\"?h.push(`--inspect=${this.inspect}`):h.push(\"--inspect\")),this.inspectBrk&&(typeof this.inspectBrk==\"string\"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push(\"--inspect-brk\")),this.require&&h.push(`--require=${this.require}`),await In.executePackageAccessibleBinary(c,this.scriptName,this.args,{cwd:this.context.cwd,project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:f})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(\":\")){let E=(await Promise.all(s.workspaces.map(async C=>C.manifest.scripts.has(this.scriptName)?C:null))).filter(C=>C!==null);if(E.length===1)return await In.executeWorkspaceScript(E[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName===\"node-gyp\"?new nt(`Couldn't find a script name \"${this.scriptName}\" in the top-level (used by ${G.prettyLocator(r,n)}). This typically happens because some package depends on \"node-gyp\" to build itself, but didn't list it in their dependencies. To fix that, please run \"yarn add node-gyp\" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new nt(`Couldn't find a script name \"${this.scriptName}\" in the top-level (used by ${G.prettyLocator(r,n)}).`);{if(this.scriptName===\"global\")throw new nt(\"The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead\");let h=[this.scriptName].concat(this.args);for(let[E,C]of $I)for(let S of C)if(h.length>=S.length&&JSON.stringify(h.slice(0,S.length))===JSON.stringify(S))throw new nt(`Couldn't find a script named \"${this.scriptName}\", but a matching command can be found in the ${E} plugin. You can install it with \"yarn plugin import ${E}\".`);throw new nt(`Couldn't find a script named \"${this.scriptName}\".`)}}};Ge();Ge();Yt();var OC=class extends ft{constructor(){super(...arguments);this.descriptor=ge.String();this.resolution=ge.String()}static{this.paths=[[\"set\",\"resolution\"]]}static{this.usage=ot.Usage({description:\"enforce a package resolution\",details:'\\n      This command updates the resolution table so that `descriptor` is resolved by `resolution`.\\n\\n      Note that by default this command only affect the current resolution table - meaning that this \"manual override\" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, edit the `resolutions` field in your top-level manifest.\\n\\n      Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\\n    ',examples:[[\"Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0\",\"$0 set resolution lodash@npm:^1.2.3 npm:1.5.0\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(await s.restoreInstallState({restoreResolutions:!1}),!a)throw new ar(s.cwd,this.context.cwd);let c=G.parseDescriptor(this.descriptor,!0),f=G.makeDescriptor(c,this.resolution);return s.storedDescriptors.set(c.descriptorHash,c),s.storedDescriptors.set(f.descriptorHash,f),s.resolutionAliases.set(c.descriptorHash,f.descriptorHash),await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Ge();Dt();Yt();var Dye=ut(Go()),LC=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Unlink all workspaces belonging to the target project from the current one\"});this.leadingArguments=ge.Rest()}static{this.paths=[[\"unlink\"]]}static{this.usage=ot.Usage({description:\"disconnect the local project from another one\",details:`\n      This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.\n    `,examples:[[\"Unregister a remote workspace in the current project\",\"$0 unlink ~/ts-loader\"],[\"Unregister all workspaces from a remote project in the current project\",\"$0 unlink ~/jest --all\"],[\"Unregister all previously linked workspaces\",\"$0 unlink --all\"],[\"Unregister all workspaces matching a glob\",\"$0 unlink '@babel/*' 'pkg-{a,b}'\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=s.topLevelWorkspace,f=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of c.manifest.resolutions)h.startsWith(\"portal:\")&&f.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=J.resolve(this.context.cwd,fe.toPortablePath(p));if(je.isPathLike(p)){let E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Tt.find(E,h);if(!S)throw new ar(C.cwd,h);if(this.all){for(let P of C.workspaces)P.manifest.name&&f.add(G.stringifyIdent(P.anchoredLocator));if(f.size===0)throw new nt(\"No workspace found to be unlinked in the target project\")}else{if(!S.manifest.name)throw new nt(\"The target workspace doesn't have a name and thus cannot be unlinked\");f.add(G.stringifyIdent(S.anchoredLocator))}}else{let E=[...c.manifest.resolutions.map(({pattern:C})=>C.descriptor.fullName)];for(let C of(0,Dye.default)(E,p))f.add(C)}}return c.manifest.resolutions=c.manifest.resolutions.filter(({pattern:p})=>!f.has(p.descriptor.fullName)),await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ge();Ge();Ge();Yt();var bye=ut(Vv()),nq=ut(Go());Ul();var MC=class extends ft{constructor(){super(...arguments);this.interactive=ge.Boolean(\"-i,--interactive\",{description:\"Offer various choices, depending on the detected upgrade paths\"});this.fixed=ge.Boolean(\"-F,--fixed\",!1,{description:\"Store dependency tags as-is instead of resolving them\"});this.exact=ge.Boolean(\"-E,--exact\",!1,{description:\"Don't use any semver modifier on the resolved range\"});this.tilde=ge.Boolean(\"-T,--tilde\",!1,{description:\"Use the `~` semver modifier on the resolved range\"});this.caret=ge.Boolean(\"-C,--caret\",!1,{description:\"Use the `^` semver modifier on the resolved range\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Resolve again ALL resolutions for those packages\"});this.mode=ge.String(\"--mode\",{description:\"Change what artifacts installs generate\",validator:fo($l)});this.patterns=ge.Rest()}static{this.paths=[[\"up\"]]}static{this.usage=ot.Usage({description:\"upgrade dependencies across the project\",details:\"\\n      This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\\n\\n      If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\\n\\n      If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\\n\\n      The, `-C,--caret`, `-E,--exact` and  `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\\n\\n      If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\\n\\n      - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\\n\\n      - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\\n\\n      Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\\n\\n      This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\\n\\n      **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\\n    \",examples:[[\"Upgrade all instances of lodash to the latest release\",\"$0 up lodash\"],[\"Upgrade all instances of lodash to the latest release, but ask confirmation for each\",\"$0 up lodash -i\"],[\"Upgrade all instances of lodash to 1.2.3\",\"$0 up lodash@1.2.3\"],[\"Upgrade all instances of packages with the `@babel` scope to the latest release\",\"$0 up '@babel/*'\"],[\"Upgrade all instances of packages containing the word `jest` to the latest release\",\"$0 up '*jest*'\"],[\"Upgrade all instances of packages with the `@babel` scope to 7.0.0\",\"$0 up '@babel/*@7.0.0'\"]]})}static{this.schema=[tB(\"recursive\",qf.Forbids,[\"interactive\",\"exact\",\"tilde\",\"caret\"],{ignore:[void 0,!1]})]}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=[...s.storedDescriptors.values()],f=c.map(E=>G.stringifyIdent(E)),p=new Set;for(let E of this.patterns){if(G.parseDescriptor(E).range!==\"unknown\")throw new nt(\"Ranges aren't allowed when using --recursive\");for(let C of(0,nq.default)(f,E)){let S=G.parseIdent(C);p.add(S.identHash)}}let h=c.filter(E=>p.has(E.identHash));for(let E of h)s.storedDescriptors.delete(E.descriptorHash),s.storedResolutions.delete(E.descriptorHash);return await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}async executeUpClassic(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.fixed,f=r.isInteractive({interactive:this.interactive,stdout:this.context.stdout}),p=Kv(this,s),h=f?[\"keep\",\"reuse\",\"project\",\"latest\"]:[\"project\",\"latest\"],E=[],C=[];for(let N of this.patterns){let U=!1,W=G.parseDescriptor(N),ee=G.stringifyIdent(W);for(let ie of s.workspaces)for(let ue of[\"dependencies\",\"devDependencies\"]){let me=[...ie.manifest.getForScope(ue).values()].map(Be=>G.stringifyIdent(Be)),pe=ee===\"*\"?me:(0,nq.default)(me,ee);for(let Be of pe){let Ce=G.parseIdent(Be),g=ie.manifest[ue].get(Ce.identHash);if(typeof g>\"u\")throw new Error(\"Assertion failed: Expected the descriptor to be registered\");let we=G.makeDescriptor(Ce,W.range);E.push(Promise.resolve().then(async()=>[ie,ue,g,await zv(we,{project:s,workspace:ie,cache:n,target:ue,fixed:c,modifier:p,strategies:h})])),U=!0}}U||C.push(N)}if(C.length>1)throw new nt(`Patterns ${he.prettyList(r,C,he.Type.CODE)} don't match any packages referenced by any workspace`);if(C.length>0)throw new nt(`Pattern ${he.prettyList(r,C,he.Type.CODE)} doesn't match any packages referenced by any workspace`);let S=await Promise.all(E),P=await lA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async N=>{for(let[,,U,{suggestions:W,rejections:ee}]of S){let ie=W.filter(ue=>ue.descriptor!==null);if(ie.length===0){let[ue]=ee;if(typeof ue>\"u\")throw new Error(\"Assertion failed: Expected an error to have been set\");let le=this.cli.error(ue);s.configuration.get(\"enableNetwork\")?N.reportError(27,`${G.prettyDescriptor(r,U)} can't be resolved to a satisfying range\n\n${le}`):N.reportError(27,`${G.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)\n\n${le}`)}else ie.length>1&&!f&&N.reportError(27,`${G.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(P.hasErrors())return P.exitCode();let I=!1,R=[];for(let[N,U,,{suggestions:W}]of S){let ee,ie=W.filter(pe=>pe.descriptor!==null),ue=ie[0].descriptor,le=ie.every(pe=>G.areDescriptorsEqual(pe.descriptor,ue));ie.length===1||le?ee=ue:(I=!0,{answer:ee}=await(0,bye.prompt)({type:\"select\",name:\"answer\",message:`Which range do you want to use in ${G.prettyWorkspace(r,N)} \\u276F ${U}?`,choices:W.map(({descriptor:pe,name:Be,reason:Ce})=>pe?{name:Be,hint:Ce,descriptor:pe}:{name:Be,hint:Ce,disabled:!0}),onCancel:()=>process.exit(130),result(pe){return this.find(pe,\"descriptor\")},stdin:this.context.stdin,stdout:this.context.stdout}));let me=N.manifest[U].get(ee.identHash);if(typeof me>\"u\")throw new Error(\"Assertion failed: This descriptor should have a matching entry\");if(me.descriptorHash!==ee.descriptorHash)N.manifest[U].set(ee.identHash,ee),R.push([N,U,me,ee]);else{let pe=r.makeResolver(),Be={project:s,resolver:pe},Ce=r.normalizeDependency(me),g=pe.bindDescriptor(Ce,N.anchoredLocator,Be);s.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,R),I&&this.context.stdout.write(`\n`),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Ge();Ge();Ge();Yt();var UC=class extends ft{constructor(){super(...arguments);this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"List, for each workspace, what are all the paths that lead to the dependency\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.peers=ge.Boolean(\"--peers\",!1,{description:\"Also print the peer dependencies that match the specified name\"});this.package=ge.String()}static{this.paths=[[\"why\"]]}static{this.usage=ot.Usage({description:\"display the reason why a package is needed\",details:`\n      This command prints the exact reasons why a package appears in the dependency tree.\n\n      If \\`-R,--recursive\\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named \"Foo\" when looking for \"Bar\", it means that \"Foo\" already got printed higher in the tree.\n    `,examples:[[\"Explain why lodash is used in your project\",\"$0 why lodash\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=G.parseIdent(this.package).identHash,c=this.recursive?cct(s,n,{configuration:r,peers:this.peers}):lct(s,n,{configuration:r,peers:this.peers});xs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};function lct(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.storedPackages.values(),f=>G.stringifyLocator(f)),n={},c={children:n};for(let f of a){let p={};for(let E of f.dependencies.values()){if(!s&&f.peerDependencies.has(E.identHash))continue;let C=t.storedResolutions.get(E.descriptorHash);if(!C)throw new Error(\"Assertion failed: The resolution should have been registered\");let S=t.storedPackages.get(C);if(!S)throw new Error(\"Assertion failed: The package should have been registered\");if(S.identHash!==e)continue;{let I=G.stringifyLocator(f);n[I]={value:[f,he.Type.LOCATOR],children:p}}let P=G.stringifyLocator(S);p[P]={value:[{descriptor:E,locator:S},he.Type.DEPENDENT]}}}return c}function cct(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.workspaces,S=>G.stringifyLocator(S.anchoredLocator)),n=new Set,c=new Set,f=S=>{if(n.has(S.locatorHash))return c.has(S.locatorHash);if(n.add(S.locatorHash),S.identHash===e)return c.add(S.locatorHash),!0;let P=!1;S.identHash===e&&(P=!0);for(let I of S.dependencies.values()){if(!s&&S.peerDependencies.has(I.identHash))continue;let R=t.storedResolutions.get(I.descriptorHash);if(!R)throw new Error(\"Assertion failed: The resolution should have been registered\");let N=t.storedPackages.get(R);if(!N)throw new Error(\"Assertion failed: The package should have been registered\");f(N)&&(P=!0)}return P&&c.add(S.locatorHash),P};for(let S of a)f(S.anchoredPackage);let p=new Set,h={},E={children:h},C=(S,P,I)=>{if(!c.has(S.locatorHash))return;let R=I!==null?he.tuple(he.Type.DEPENDENT,{locator:S,descriptor:I}):he.tuple(he.Type.LOCATOR,S),N={},U={value:R,children:N},W=G.stringifyLocator(S);if(P[W]=U,!(I!==null&&t.tryWorkspaceByLocator(S))&&!p.has(S.locatorHash)){p.add(S.locatorHash);for(let ee of S.dependencies.values()){if(!s&&S.peerDependencies.has(ee.identHash))continue;let ie=t.storedResolutions.get(ee.descriptorHash);if(!ie)throw new Error(\"Assertion failed: The resolution should have been registered\");let ue=t.storedPackages.get(ie);if(!ue)throw new Error(\"Assertion failed: The package should have been registered\");C(ue,N,ee)}}};for(let S of a)C(S.anchoredPackage,h,null);return E}Ge();var pq={};Vt(pq,{GitFetcher:()=>tS,GitResolver:()=>rS,default:()=>kct,gitUtils:()=>ka});Ge();Dt();var ka={};Vt(ka,{TreeishProtocols:()=>eS,clone:()=>Aq,fetchBase:()=>Jye,fetchChangedFiles:()=>Kye,fetchChangedWorkspaces:()=>Pct,fetchRoot:()=>Vye,isGitUrl:()=>jC,lsRemote:()=>Yye,normalizeLocator:()=>bct,normalizeRepoUrl:()=>_C,resolveUrl:()=>fq,splitRepoUrl:()=>W0,validateRepoUrl:()=>uq});Ge();Dt();Yt();ql();var qye=ut(Hye()),HC=ut(Ie(\"querystring\")),lq=ut(Ai());function aq(t,e,r){let s=t.indexOf(r);return t.lastIndexOf(e,s>-1?s:1/0)}function jye(t){try{return new URL(t)}catch{return}}function Sct(t){let e=aq(t,\"@\",\"#\"),r=aq(t,\":\",\"#\");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),aq(t,\":\",\"#\")===-1&&t.indexOf(\"//\")===-1&&(t=`ssh://${t}`),t}function Gye(t){return jye(t)||jye(Sct(t))}function _C(t,{git:e=!1}={}){if(t=t.replace(/^git\\+https:/,\"https:\"),t=t.replace(/^(?:github:|https:\\/\\/github\\.com\\/|git:\\/\\/github\\.com\\/)?(?!\\.{1,2}\\/)([a-zA-Z0-9._-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\\.git)?(#.*)?$/,\"https://github.com/$1/$2.git$3\"),t=t.replace(/^https:\\/\\/github\\.com\\/(?!\\.{1,2}\\/)([a-zA-Z0-9._-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\\/tarball\\/(.+)?$/,\"https://github.com/$1/$2.git#$3\"),e){let r=Gye(t);r&&(t=r.href),t=t.replace(/^git\\+([^:]+):/,\"$1:\")}return t}function Wye(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||\"ssh\"} -o BatchMode=yes`}}var Dct=[/^ssh:/,/^git(?:\\+[^:]+)?:/,/^(?:git\\+)?https?:[^#]+\\/[^#]+(?:\\.git)(?:#.*)?$/,/^git@[^#]+\\/[^#]+\\.git(?:#.*)?$/,/^(?:github:|https:\\/\\/github\\.com\\/)?(?!\\.{1,2}\\/)([a-zA-Z._0-9-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\\.git)?(?:#.*)?$/,/^https:\\/\\/github\\.com\\/(?!\\.{1,2}\\/)([a-zA-Z0-9._-]+)\\/(?!\\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\\/tarball\\/(.+)?$/],eS=(a=>(a.Commit=\"commit\",a.Head=\"head\",a.Tag=\"tag\",a.Semver=\"semver\",a))(eS||{});function jC(t){return t?Dct.some(e=>!!t.match(e)):!1}function W0(t){t=_C(t);let e=t.indexOf(\"#\");if(e===-1)return{repo:t,treeish:{protocol:\"head\",request:\"HEAD\"},extra:{}};let r=t.slice(0,e),s=t.slice(e+1);if(s.match(/^[a-z]+=/)){let a=HC.default.parse(s);for(let[p,h]of Object.entries(a))if(typeof h!=\"string\")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values(eS).find(p=>Object.hasOwn(a,p)),[c,f]=typeof n<\"u\"?[n,a[n]]:[\"head\",\"HEAD\"];for(let p of Object.values(eS))delete a[p];return{repo:r,treeish:{protocol:c,request:f},extra:a}}else{let a=s.indexOf(\":\"),[n,c]=a===-1?[null,s]:[s.slice(0,a),s.slice(a+1)];return{repo:r,treeish:{protocol:n,request:c},extra:{}}}}function bct(t){return G.makeLocator(t,_C(t.reference))}function uq(t,{configuration:e}){let r=_C(t,{git:!0});if(!nn.getNetworkSettings(`https://${(0,qye.default)(r).resource}`,{configuration:e}).enableNetwork)throw new jt(80,`Request to '${r}' has been blocked because of your configuration settings`);return r}async function Yye(t,e){let r=uq(t,{configuration:e}),s=await cq(\"listing refs\",[\"ls-remote\",r],{cwd:e.startingCwd,env:Wye()},{configuration:e,normalizedRepoUrl:r}),a=new Map,n=/^([a-f0-9]{40})\\t([^\\n]+)/gm,c;for(;(c=n.exec(s.stdout))!==null;)a.set(c[2],c[1]);return a}async function fq(t,e){let{repo:r,treeish:{protocol:s,request:a},extra:n}=W0(t),c=await Yye(r,e),f=(h,E)=>{switch(h){case\"commit\":{if(!E.match(/^[a-f0-9]{40}$/))throw new Error(\"Invalid commit hash\");return HC.default.stringify({...n,commit:E})}case\"head\":{let C=c.get(E===\"HEAD\"?E:`refs/heads/${E}`);if(typeof C>\"u\")throw new Error(`Unknown head (\"${E}\")`);return HC.default.stringify({...n,commit:C})}case\"tag\":{let C=c.get(`refs/tags/${E}`);if(typeof C>\"u\")throw new Error(`Unknown tag (\"${E}\")`);return HC.default.stringify({...n,commit:C})}case\"semver\":{let C=Fr.validRange(E);if(!C)throw new Error(`Invalid range (\"${E}\")`);let S=new Map([...c.entries()].filter(([I])=>I.startsWith(\"refs/tags/\")).map(([I,R])=>[lq.default.parse(I.slice(10)),R]).filter(I=>I[0]!==null)),P=lq.default.maxSatisfying([...S.keys()],C);if(P===null)throw new Error(`No matching range (\"${E}\")`);return HC.default.stringify({...n,commit:S.get(P)})}case null:{let C;if((C=p(\"commit\",E))!==null||(C=p(\"tag\",E))!==null||(C=p(\"head\",E))!==null)return C;throw E.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve \"${E}\" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve \"${E}\" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol (\"${h}\")`)}},p=(h,E)=>{try{return f(h,E)}catch{return null}};return _C(`${r}#${f(s,a)}`)}async function Aq(t,e){return await e.getLimit(\"cloneConcurrency\")(async()=>{let{repo:r,treeish:{protocol:s,request:a}}=W0(t);if(s!==\"commit\")throw new Error(\"Invalid treeish protocol when cloning\");let n=uq(r,{configuration:e}),c=await ce.mktempPromise(),f={cwd:c,env:Wye()};return await cq(\"cloning the repository\",[\"clone\",\"-c\",\"core.autocrlf=false\",n,fe.fromPortablePath(c)],f,{configuration:e,normalizedRepoUrl:n}),await cq(\"switching branch\",[\"checkout\",`${a}`],f,{configuration:e,normalizedRepoUrl:n}),c})}async function Vye(t){let e,r=t;do{if(e=r,await ce.existsPromise(J.join(e,\".git\")))return e;r=J.dirname(e)}while(r!==e);return null}async function Jye(t,{baseRefs:e}){if(e.length===0)throw new nt(\"Can't run this command with zero base refs specified.\");let r=[];for(let f of e){let{code:p}=await qr.execvp(\"git\",[\"merge-base\",f,\"HEAD\"],{cwd:t});p===0&&r.push(f)}if(r.length===0)throw new nt(`No ancestor could be found between any of HEAD and ${e.join(\", \")}`);let{stdout:s}=await qr.execvp(\"git\",[\"merge-base\",\"HEAD\",...r],{cwd:t,strict:!0}),a=s.trim(),{stdout:n}=await qr.execvp(\"git\",[\"show\",\"--quiet\",\"--pretty=format:%s\",a],{cwd:t,strict:!0}),c=n.trim();return{hash:a,title:c}}async function Kye(t,{base:e,project:r}){let s=je.buildIgnorePattern(r.configuration.get(\"changesetIgnorePatterns\")),{stdout:a}=await qr.execvp(\"git\",[\"diff\",\"--name-only\",`${e}`],{cwd:t,strict:!0}),n=a.split(/\\r\\n|\\r|\\n/).filter(h=>h.length>0).map(h=>J.resolve(t,fe.toPortablePath(h))),{stdout:c}=await qr.execvp(\"git\",[\"ls-files\",\"--others\",\"--exclude-standard\"],{cwd:t,strict:!0}),f=c.split(/\\r\\n|\\r|\\n/).filter(h=>h.length>0).map(h=>J.resolve(t,fe.toPortablePath(h))),p=[...new Set([...n,...f].sort())];return s?p.filter(h=>!J.relative(r.cwd,h).match(s)):p}async function Pct({ref:t,project:e}){if(e.configuration.projectCwd===null)throw new nt(\"This command can only be run from within a Yarn project\");let r=[J.resolve(e.cwd,Er.lockfile),J.resolve(e.cwd,e.configuration.get(\"cacheFolder\")),J.resolve(e.cwd,e.configuration.get(\"installStatePath\")),J.resolve(e.cwd,e.configuration.get(\"virtualFolder\"))];await e.configuration.triggerHook(c=>c.populateYarnPaths,e,c=>{c!=null&&r.push(c)});let s=await Vye(e.configuration.projectCwd);if(s==null)throw new nt(\"This command can only be run on Git repositories\");let a=await Jye(s,{baseRefs:typeof t==\"string\"?[t]:e.configuration.get(\"changesetBaseRefs\")}),n=await Kye(s,{base:a.hash,project:e});return new Set(je.mapAndFilter(n,c=>{let f=e.tryWorkspaceByFilePath(c);return f===null?je.mapAndFilter.skip:r.some(p=>c.startsWith(p))?je.mapAndFilter.skip:f}))}async function cq(t,e,r,{configuration:s,normalizedRepoUrl:a}){try{return await qr.execvp(\"git\",e,{...r,strict:!0})}catch(n){if(!(n instanceof qr.ExecError))throw n;let c=n.reportExtra,f=n.stderr.toString();throw new jt(1,`Failed ${t}`,p=>{p.reportError(1,`  ${he.prettyField(s,{label:\"Repository URL\",value:he.tuple(he.Type.URL,a)})}`);for(let h of f.matchAll(/^(.+?): (.*)$/gm)){let[,E,C]=h;E=E.toLowerCase();let S=E===\"error\"?\"Error\":`${bB(E)} Error`;p.reportError(1,`  ${he.prettyField(s,{label:S,value:he.tuple(he.Type.NO_HINT,C)})}`)}c?.(p)})}}var tS=class{supports(e,r){return jC(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,a=new Map(r.checksums);a.set(e.locatorHash,s);let n={...r,checksums:a},c=await this.downloadHosted(e,n);if(c!==null)return c;let[f,p,h]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote repository`),loader:()=>this.cloneFromRemote(e,n),...r.cacheOptions});return{packageFs:f,releaseFs:p,prefixPath:G.getIdentVendorPath(e),checksum:h}}async downloadHosted(e,r){return r.project.configuration.reduceHook(s=>s.fetchHostedRepository,null,e,r)}async cloneFromRemote(e,r){let s=W0(e.reference),a=await Aq(e.reference,r.project.configuration),n=J.resolve(a,s.extra.cwd??vt.dot),c=J.join(n,\"package.tgz\");await In.prepareExternalProject(n,c,{configuration:r.project.configuration,report:r.report,workspace:s.extra.workspace,locator:e});let f=await ce.readFilePromise(c);return await je.releaseAfterUseAsync(async()=>await ps.convertToZip(f,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1}))}};Ge();Ge();var rS=class{supportsDescriptor(e,r){return jC(e.range)}supportsLocator(e,r){return jC(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=await fq(e.range,s.project.configuration);return[G.makeLocator(e,a)]}async getSatisfying(e,r,s,a){let n=W0(e.range);return{locators:s.filter(f=>{if(f.identHash!==e.identHash)return!1;let p=W0(f.reference);return!(n.repo!==p.repo||n.treeish.protocol===\"commit\"&&n.treeish.request!==p.treeish.request)}),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var xct={configuration:{changesetBaseRefs:{description:\"The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.\",type:\"STRING\",isArray:!0,isNullable:!1,default:[\"master\",\"origin/master\",\"upstream/master\",\"main\",\"origin/main\",\"upstream/main\"]},changesetIgnorePatterns:{description:\"Array of glob patterns; files matching them will be ignored when fetching the changed files\",type:\"STRING\",default:[],isArray:!0},cloneConcurrency:{description:\"Maximal number of concurrent clones\",type:\"NUMBER\",default:2}},fetchers:[tS],resolvers:[rS]};var kct=xct;Yt();var GC=class extends ft{constructor(){super(...arguments);this.since=ge.String(\"--since\",{description:\"Only include workspaces that have been changed since the specified ref.\",tolerateBoolean:!0});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Find packages via dependencies/devDependencies instead of using the workspaces field\"});this.noPrivate=ge.Boolean(\"--no-private\",{description:\"Exclude workspaces that have the private field set to true\"});this.verbose=ge.Boolean(\"-v,--verbose\",!1,{description:\"Also return the cross-dependencies between workspaces\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"workspaces\",\"list\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"list all available workspaces\",details:\"\\n      This command will print the list of all workspaces in the project.\\n\\n      - If `--since` is set, Yarn will only list workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\\n\\n      - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\\n\\n      - If `--no-private` is set, Yarn will not list any workspaces that have the `private` field set to `true`.\\n\\n      - If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{let c=this.since?await ka.fetchChangedWorkspaces({ref:this.since,project:s}):s.workspaces,f=new Set(c);if(this.recursive)for(let p of[...c].map(h=>h.getRecursiveWorkspaceDependents()))for(let h of p)f.add(h);for(let p of f){let{manifest:h}=p;if(h.private&&this.noPrivate)continue;let E;if(this.verbose){let C=new Set,S=new Set;for(let P of Ut.hardDependencies)for(let[I,R]of h.getForScope(P)){let N=s.tryWorkspaceByDescriptor(R);N===null?s.workspacesByIdent.has(I)&&S.add(R):C.add(N)}E={workspaceDependencies:Array.from(C).map(P=>P.relativeCwd),mismatchedWorkspaceDependencies:Array.from(S).map(P=>G.stringifyDescriptor(P))}}n.reportInfo(null,`${p.relativeCwd}`),n.reportJson({location:p.relativeCwd,name:h.name?G.stringifyIdent(h.name):null,...E})}})).exitCode()}};Ge();Ge();Yt();var qC=class extends ft{constructor(){super(...arguments);this.workspaceName=ge.String();this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"workspace\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"run a command within the specified workspace\",details:`\n      This command will run a given sub-command on a single workspace.\n    `,examples:[[\"Add a package to a single workspace\",\"yarn workspace components add -D react\"],[\"Run build script on a single workspace\",\"yarn workspace components run build\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=s.workspaces,c=new Map(n.map(p=>[G.stringifyIdent(p.anchoredLocator),p])),f=c.get(this.workspaceName);if(f===void 0){let p=Array.from(c.keys()).sort();throw new nt(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:\n  - ${p.join(`\n  - `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:f.cwd})}};var Qct={configuration:{enableImmutableInstalls:{description:\"If true (the default on CI), prevents the install command from modifying the lockfile\",type:\"BOOLEAN\",default:zye.isCI},defaultSemverRangePrefix:{description:\"The default save prefix: '^', '~' or ''\",type:\"STRING\",values:[\"^\",\"~\",\"\"],default:\"^\"},preferReuse:{description:\"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.\",type:\"BOOLEAN\",default:!1}},commands:[aC,lC,cC,uC,OC,bC,EC,GC,pC,hC,gC,dC,sC,oC,fC,AC,mC,yC,IC,CC,wC,BC,LC,vC,SC,xC,PC,kC,DC,QC,TC,RC,FC,NC,MC,UC,qC]},Tct=Qct;var yq={};Vt(yq,{default:()=>Oct});Ge();Ge();var gq=\"catalog:\";var dq=t=>t.startsWith(gq),Rct=t=>t.range.slice(gq.length)||null,Xye=t=>t===null?\"default catalog\":`catalog \"${t}\"`,Fct=t=>t.scope?`@${t.scope}/${t.name}`:t.name,mq=(t,e,r,s)=>{let a=Rct(e),n;if(a===null)n=t.configuration.get(\"catalog\");else try{let E=t.configuration.get(\"catalogs\");E&&(n=E.get(a))}catch{n=void 0}if(!n||n.size===0)throw new jt(82,`${G.prettyDescriptor(t.configuration,e)}: ${Xye(a)} not found or empty`);let c=Fct(e),f=n.get(c);if(!f)throw new jt(82,`${G.prettyDescriptor(t.configuration,e)}: entry not found in ${Xye(a)}`);let p=t.configuration.normalizeDependency(G.makeDescriptor(e,f));return r.supportsDescriptor(p,s)?r.bindDescriptor(p,t.topLevelWorkspace.anchoredLocator,s):p};var Nct={configuration:{catalog:{description:\"The default catalog of packages\",type:\"MAP\",valueDefinition:{description:\"The catalog of packages\",type:\"STRING\"}},catalogs:{description:\"Named catalogs of packages\",type:\"MAP\",valueDefinition:{description:\"A named catalog\",type:\"MAP\",valueDefinition:{description:\"Package version in the catalog\",type:\"STRING\"}}}},hooks:{beforeWorkspacePacking:(t,e)=>{let r=t.project,s=r.configuration.makeResolver(),a={project:r,resolver:s,report:new ki};for(let n of Ut.allDependencies){let c=e[n];if(c)for(let[f,p]of Object.entries(c)){if(typeof p!=\"string\"||!dq(p))continue;let h=G.parseIdent(f),E=G.makeDescriptor(h,p),C=mq(r,E,s,a),{protocol:S,source:P,params:I,selector:R}=G.parseRange(G.convertToManifestRange(C.range));S===t.project.configuration.get(\"defaultProtocol\")&&(S=null),c[f]=G.makeRange({protocol:S,source:P,params:I,selector:R})}}},reduceDependency:async(t,e,r,s,{resolver:a,resolveOptions:n})=>dq(t.range)?mq(e,t,a,n):t}},Oct=Nct;var Bq={};Vt(Bq,{default:()=>Mct});Ge();var Qt={optional:!0},Eq=[[\"@tailwindcss/aspect-ratio@<0.2.1\",{peerDependencies:{tailwindcss:\"^2.0.2\"}}],[\"@tailwindcss/line-clamp@<0.2.1\",{peerDependencies:{tailwindcss:\"^2.0.2\"}}],[\"@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0\",{peerDependencies:{postcss:\"^8.0.0\"}}],[\"@samverschueren/stream-to-observable@<0.3.1\",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],[\"any-observable@<0.5.1\",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],[\"@pm2/agent@<1.0.4\",{dependencies:{debug:\"*\"}}],[\"debug@<4.2.0\",{peerDependenciesMeta:{\"supports-color\":Qt}}],[\"got@<11\",{dependencies:{\"@types/responselike\":\"^1.0.0\",\"@types/keyv\":\"^3.1.1\"}}],[\"cacheable-lookup@<4.1.2\",{dependencies:{\"@types/keyv\":\"^3.1.1\"}}],[\"http-link-dataloader@*\",{peerDependencies:{graphql:\"^0.13.1 || ^14.0.0\"}}],[\"typescript-language-server@*\",{dependencies:{\"vscode-jsonrpc\":\"^5.0.1\",\"vscode-languageserver-protocol\":\"^3.15.0\"}}],[\"postcss-syntax@*\",{peerDependenciesMeta:{\"postcss-html\":Qt,\"postcss-jsx\":Qt,\"postcss-less\":Qt,\"postcss-markdown\":Qt,\"postcss-scss\":Qt}}],[\"jss-plugin-rule-value-function@<=10.1.1\",{dependencies:{\"tiny-warning\":\"^1.0.2\"}}],[\"ink-select-input@<4.1.0\",{peerDependencies:{react:\"^16.8.2\"}}],[\"license-webpack-plugin@<2.3.18\",{peerDependenciesMeta:{webpack:Qt}}],[\"snowpack@>=3.3.0\",{dependencies:{\"node-gyp\":\"^7.1.0\"}}],[\"promise-inflight@*\",{peerDependenciesMeta:{bluebird:Qt}}],[\"reactcss@*\",{peerDependencies:{react:\"*\"}}],[\"react-color@<=2.19.0\",{peerDependencies:{react:\"*\"}}],[\"gatsby-plugin-i18n@*\",{dependencies:{ramda:\"^0.24.1\"}}],[\"useragent@^2.0.0\",{dependencies:{request:\"^2.88.0\",yamlparser:\"0.0.x\",semver:\"5.5.x\"}}],[\"@apollographql/apollo-tools@<=0.5.2\",{peerDependencies:{graphql:\"^14.2.1 || ^15.0.0\"}}],[\"material-table@^2.0.0\",{dependencies:{\"@babel/runtime\":\"^7.11.2\"}}],[\"@babel/parser@*\",{dependencies:{\"@babel/types\":\"^7.8.3\"}}],[\"fork-ts-checker-webpack-plugin@<=6.3.4\",{peerDependencies:{eslint:\">= 6\",typescript:\">= 2.7\",webpack:\">= 4\",\"vue-template-compiler\":\"*\"},peerDependenciesMeta:{eslint:Qt,\"vue-template-compiler\":Qt}}],[\"rc-animate@<=3.1.1\",{peerDependencies:{react:\">=16.9.0\",\"react-dom\":\">=16.9.0\"}}],[\"react-bootstrap-table2-paginator@*\",{dependencies:{classnames:\"^2.2.6\"}}],[\"react-draggable@<=4.4.3\",{peerDependencies:{react:\">= 16.3.0\",\"react-dom\":\">= 16.3.0\"}}],[\"apollo-upload-client@<14\",{peerDependencies:{graphql:\"14 - 15\"}}],[\"react-instantsearch-core@<=6.7.0\",{peerDependencies:{algoliasearch:\">= 3.1 < 5\"}}],[\"react-instantsearch-dom@<=6.7.0\",{dependencies:{\"react-fast-compare\":\"^3.0.0\"}}],[\"ws@<7.2.1\",{peerDependencies:{bufferutil:\"^4.0.1\",\"utf-8-validate\":\"^5.0.2\"},peerDependenciesMeta:{bufferutil:Qt,\"utf-8-validate\":Qt}}],[\"react-portal@<4.2.2\",{peerDependencies:{\"react-dom\":\"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0\"}}],[\"react-scripts@<=4.0.1\",{peerDependencies:{react:\"*\"}}],[\"testcafe@<=1.10.1\",{dependencies:{\"@babel/plugin-transform-for-of\":\"^7.12.1\",\"@babel/runtime\":\"^7.12.5\"}}],[\"testcafe-legacy-api@<=4.2.0\",{dependencies:{\"testcafe-hammerhead\":\"^17.0.1\",\"read-file-relative\":\"^1.2.0\"}}],[\"@google-cloud/firestore@<=4.9.3\",{dependencies:{protobufjs:\"^6.8.6\"}}],[\"gatsby-source-apiserver@*\",{dependencies:{\"babel-polyfill\":\"^6.26.0\"}}],[\"@webpack-cli/package-utils@<=1.0.1-alpha.4\",{dependencies:{\"cross-spawn\":\"^7.0.3\"}}],[\"gatsby-remark-prismjs@<3.3.28\",{dependencies:{lodash:\"^4\"}}],[\"gatsby-plugin-favicon@*\",{peerDependencies:{webpack:\"*\"}}],[\"gatsby-plugin-sharp@<=4.6.0-next.3\",{dependencies:{debug:\"^4.3.1\"}}],[\"gatsby-react-router-scroll@<=5.6.0-next.0\",{dependencies:{\"prop-types\":\"^15.7.2\"}}],[\"@rebass/forms@*\",{dependencies:{\"@styled-system/should-forward-prop\":\"^5.0.0\"},peerDependencies:{react:\"^16.8.6\"}}],[\"rebass@*\",{peerDependencies:{react:\"^16.8.6\"}}],[\"@ant-design/react-slick@<=0.28.3\",{peerDependencies:{react:\">=16.0.0\"}}],[\"mqtt@<4.2.7\",{dependencies:{duplexify:\"^4.1.1\"}}],[\"vue-cli-plugin-vuetify@<=2.0.3\",{dependencies:{semver:\"^6.3.0\"},peerDependenciesMeta:{\"sass-loader\":Qt,\"vuetify-loader\":Qt}}],[\"vue-cli-plugin-vuetify@<=2.0.4\",{dependencies:{\"null-loader\":\"^3.0.0\"}}],[\"vue-cli-plugin-vuetify@>=2.4.3\",{peerDependencies:{vue:\"*\"}}],[\"@vuetify/cli-plugin-utils@<=0.0.4\",{dependencies:{semver:\"^6.3.0\"},peerDependenciesMeta:{\"sass-loader\":Qt}}],[\"@vue/cli-plugin-typescript@<=5.0.0-alpha.0\",{dependencies:{\"babel-loader\":\"^8.1.0\"}}],[\"@vue/cli-plugin-typescript@<=5.0.0-beta.0\",{dependencies:{\"@babel/core\":\"^7.12.16\"},peerDependencies:{\"vue-template-compiler\":\"^2.0.0\"},peerDependenciesMeta:{\"vue-template-compiler\":Qt}}],[\"cordova-ios@<=6.3.0\",{dependencies:{underscore:\"^1.9.2\"}}],[\"cordova-lib@<=10.0.1\",{dependencies:{underscore:\"^1.9.2\"}}],[\"git-node-fs@*\",{peerDependencies:{\"js-git\":\"^0.7.8\"},peerDependenciesMeta:{\"js-git\":Qt}}],[\"consolidate@<0.16.0\",{peerDependencies:{mustache:\"^3.0.0\"},peerDependenciesMeta:{mustache:Qt}}],[\"consolidate@<=0.16.0\",{peerDependencies:{velocityjs:\"^2.0.1\",tinyliquid:\"^0.2.34\",\"liquid-node\":\"^3.0.1\",jade:\"^1.11.0\",\"then-jade\":\"*\",dust:\"^0.3.0\",\"dustjs-helpers\":\"^1.7.4\",\"dustjs-linkedin\":\"^2.7.5\",swig:\"^1.4.2\",\"swig-templates\":\"^2.0.3\",\"razor-tmpl\":\"^1.3.1\",atpl:\">=0.7.6\",liquor:\"^0.0.5\",twig:\"^1.15.2\",ejs:\"^3.1.5\",eco:\"^1.1.0-rc-3\",jazz:\"^0.0.18\",jqtpl:\"~1.1.0\",hamljs:\"^0.6.2\",hamlet:\"^0.3.3\",whiskers:\"^0.4.0\",\"haml-coffee\":\"^1.14.1\",\"hogan.js\":\"^3.0.2\",templayed:\">=0.2.3\",handlebars:\"^4.7.6\",underscore:\"^1.11.0\",lodash:\"^4.17.20\",pug:\"^3.0.0\",\"then-pug\":\"*\",qejs:\"^3.0.5\",walrus:\"^0.10.1\",mustache:\"^4.0.1\",just:\"^0.1.8\",ect:\"^0.5.9\",mote:\"^0.2.0\",toffee:\"^0.3.6\",dot:\"^1.1.3\",\"bracket-template\":\"^1.1.5\",ractive:\"^1.3.12\",nunjucks:\"^3.2.2\",htmling:\"^0.0.8\",\"babel-core\":\"^6.26.3\",plates:\"~0.4.11\",\"react-dom\":\"^16.13.1\",react:\"^16.13.1\",\"arc-templates\":\"^0.5.3\",vash:\"^0.13.0\",slm:\"^2.0.0\",marko:\"^3.14.4\",teacup:\"^2.0.0\",\"coffee-script\":\"^1.12.7\",squirrelly:\"^5.1.0\",twing:\"^5.0.2\"},peerDependenciesMeta:{velocityjs:Qt,tinyliquid:Qt,\"liquid-node\":Qt,jade:Qt,\"then-jade\":Qt,dust:Qt,\"dustjs-helpers\":Qt,\"dustjs-linkedin\":Qt,swig:Qt,\"swig-templates\":Qt,\"razor-tmpl\":Qt,atpl:Qt,liquor:Qt,twig:Qt,ejs:Qt,eco:Qt,jazz:Qt,jqtpl:Qt,hamljs:Qt,hamlet:Qt,whiskers:Qt,\"haml-coffee\":Qt,\"hogan.js\":Qt,templayed:Qt,handlebars:Qt,underscore:Qt,lodash:Qt,pug:Qt,\"then-pug\":Qt,qejs:Qt,walrus:Qt,mustache:Qt,just:Qt,ect:Qt,mote:Qt,toffee:Qt,dot:Qt,\"bracket-template\":Qt,ractive:Qt,nunjucks:Qt,htmling:Qt,\"babel-core\":Qt,plates:Qt,\"react-dom\":Qt,react:Qt,\"arc-templates\":Qt,vash:Qt,slm:Qt,marko:Qt,teacup:Qt,\"coffee-script\":Qt,squirrelly:Qt,twing:Qt}}],[\"vue-loader@<=16.3.3\",{peerDependencies:{\"@vue/compiler-sfc\":\"^3.0.8\",webpack:\"^4.1.0 || ^5.0.0-0\"},peerDependenciesMeta:{\"@vue/compiler-sfc\":Qt}}],[\"vue-loader@^16.7.0\",{peerDependencies:{\"@vue/compiler-sfc\":\"^3.0.8\",vue:\"^3.2.13\"},peerDependenciesMeta:{\"@vue/compiler-sfc\":Qt,vue:Qt}}],[\"scss-parser@<=1.0.5\",{dependencies:{lodash:\"^4.17.21\"}}],[\"query-ast@<1.0.5\",{dependencies:{lodash:\"^4.17.21\"}}],[\"redux-thunk@<=2.3.0\",{peerDependencies:{redux:\"^4.0.0\"}}],[\"skypack@<=0.3.2\",{dependencies:{tar:\"^6.1.0\"}}],[\"@npmcli/metavuln-calculator@<2.0.0\",{dependencies:{\"json-parse-even-better-errors\":\"^2.3.1\"}}],[\"bin-links@<2.3.0\",{dependencies:{\"mkdirp-infer-owner\":\"^1.0.2\"}}],[\"rollup-plugin-polyfill-node@<=0.8.0\",{peerDependencies:{rollup:\"^1.20.0 || ^2.0.0\"}}],[\"snowpack@<3.8.6\",{dependencies:{\"magic-string\":\"^0.25.7\"}}],[\"elm-webpack-loader@*\",{dependencies:{temp:\"^0.9.4\"}}],[\"winston-transport@<=4.4.0\",{dependencies:{logform:\"^2.2.0\"}}],[\"jest-vue-preprocessor@*\",{dependencies:{\"@babel/core\":\"7.8.7\",\"@babel/template\":\"7.8.6\"},peerDependencies:{pug:\"^2.0.4\"},peerDependenciesMeta:{pug:Qt}}],[\"redux-persist@*\",{peerDependencies:{react:\">=16\"},peerDependenciesMeta:{react:Qt}}],[\"sodium@>=3\",{dependencies:{\"node-gyp\":\"^3.8.0\"}}],[\"babel-plugin-graphql-tag@<=3.1.0\",{peerDependencies:{graphql:\"^14.0.0 || ^15.0.0\"}}],[\"@playwright/test@<=1.14.1\",{dependencies:{\"jest-matcher-utils\":\"^26.4.2\"}}],...[\"babel-plugin-remove-graphql-queries@<3.14.0-next.1\",\"babel-preset-gatsby-package@<1.14.0-next.1\",\"create-gatsby@<1.14.0-next.1\",\"gatsby-admin@<0.24.0-next.1\",\"gatsby-cli@<3.14.0-next.1\",\"gatsby-core-utils@<2.14.0-next.1\",\"gatsby-design-tokens@<3.14.0-next.1\",\"gatsby-legacy-polyfills@<1.14.0-next.1\",\"gatsby-plugin-benchmark-reporting@<1.14.0-next.1\",\"gatsby-plugin-graphql-config@<0.23.0-next.1\",\"gatsby-plugin-image@<1.14.0-next.1\",\"gatsby-plugin-mdx@<2.14.0-next.1\",\"gatsby-plugin-netlify-cms@<5.14.0-next.1\",\"gatsby-plugin-no-sourcemaps@<3.14.0-next.1\",\"gatsby-plugin-page-creator@<3.14.0-next.1\",\"gatsby-plugin-preact@<5.14.0-next.1\",\"gatsby-plugin-preload-fonts@<2.14.0-next.1\",\"gatsby-plugin-schema-snapshot@<2.14.0-next.1\",\"gatsby-plugin-styletron@<6.14.0-next.1\",\"gatsby-plugin-subfont@<3.14.0-next.1\",\"gatsby-plugin-utils@<1.14.0-next.1\",\"gatsby-recipes@<0.25.0-next.1\",\"gatsby-source-shopify@<5.6.0-next.1\",\"gatsby-source-wikipedia@<3.14.0-next.1\",\"gatsby-transformer-screenshot@<3.14.0-next.1\",\"gatsby-worker@<0.5.0-next.1\"].map(t=>[t,{dependencies:{\"@babel/runtime\":\"^7.14.8\"}}]),[\"gatsby-core-utils@<2.14.0-next.1\",{dependencies:{got:\"8.3.2\"}}],[\"gatsby-plugin-gatsby-cloud@<=3.1.0-next.0\",{dependencies:{\"gatsby-core-utils\":\"^2.13.0-next.0\"}}],[\"gatsby-plugin-gatsby-cloud@<=3.2.0-next.1\",{peerDependencies:{webpack:\"*\"}}],[\"babel-plugin-remove-graphql-queries@<=3.14.0-next.1\",{dependencies:{\"gatsby-core-utils\":\"^2.8.0-next.1\"}}],[\"gatsby-plugin-netlify@3.13.0-next.1\",{dependencies:{\"gatsby-core-utils\":\"^2.13.0-next.0\"}}],[\"clipanion-v3-codemod@<=0.2.0\",{peerDependencies:{jscodeshift:\"^0.11.0\"}}],[\"react-live@*\",{peerDependencies:{\"react-dom\":\"*\",react:\"*\"}}],[\"webpack@<4.44.1\",{peerDependenciesMeta:{\"webpack-cli\":Qt,\"webpack-command\":Qt}}],[\"webpack@<5.0.0-beta.23\",{peerDependenciesMeta:{\"webpack-cli\":Qt}}],[\"webpack-dev-server@<3.10.2\",{peerDependenciesMeta:{\"webpack-cli\":Qt}}],[\"@docusaurus/responsive-loader@<1.5.0\",{peerDependenciesMeta:{sharp:Qt,jimp:Qt}}],[\"eslint-module-utils@*\",{peerDependenciesMeta:{\"eslint-import-resolver-node\":Qt,\"eslint-import-resolver-typescript\":Qt,\"eslint-import-resolver-webpack\":Qt,\"@typescript-eslint/parser\":Qt}}],[\"eslint-plugin-import@*\",{peerDependenciesMeta:{\"@typescript-eslint/parser\":Qt}}],[\"critters-webpack-plugin@<3.0.2\",{peerDependenciesMeta:{\"html-webpack-plugin\":Qt}}],[\"terser@<=5.10.0\",{dependencies:{acorn:\"^8.5.0\"}}],[\"babel-preset-react-app@10.0.x <10.0.2\",{dependencies:{\"@babel/plugin-proposal-private-property-in-object\":\"^7.16.7\"}}],[\"eslint-config-react-app@*\",{peerDependenciesMeta:{typescript:Qt}}],[\"@vue/eslint-config-typescript@<11.0.0\",{peerDependenciesMeta:{typescript:Qt}}],[\"unplugin-vue2-script-setup@<0.9.1\",{peerDependencies:{\"@vue/composition-api\":\"^1.4.3\",\"@vue/runtime-dom\":\"^3.2.26\"}}],[\"@cypress/snapshot@*\",{dependencies:{debug:\"^3.2.7\"}}],[\"auto-relay@<=0.14.0\",{peerDependencies:{\"reflect-metadata\":\"^0.1.13\"}}],[\"vue-template-babel-compiler@<1.2.0\",{peerDependencies:{\"vue-template-compiler\":\"^2.6.0\"}}],[\"@parcel/transformer-image@<2.5.0\",{peerDependencies:{\"@parcel/core\":\"*\"}}],[\"@parcel/transformer-js@<2.5.0\",{peerDependencies:{\"@parcel/core\":\"*\"}}],[\"parcel@*\",{peerDependenciesMeta:{\"@parcel/core\":Qt}}],[\"react-scripts@*\",{peerDependencies:{eslint:\"*\"}}],[\"focus-trap-react@^8.0.0\",{dependencies:{tabbable:\"^5.3.2\"}}],[\"react-rnd@<10.3.7\",{peerDependencies:{react:\">=16.3.0\",\"react-dom\":\">=16.3.0\"}}],[\"connect-mongo@<5.0.0\",{peerDependencies:{\"express-session\":\"^1.17.1\"}}],[\"vue-i18n@<9\",{peerDependencies:{vue:\"^2\"}}],[\"vue-router@<4\",{peerDependencies:{vue:\"^2\"}}],[\"unified@<10\",{dependencies:{\"@types/unist\":\"^2.0.0\"}}],[\"react-github-btn@<=1.3.0\",{peerDependencies:{react:\">=16.3.0\"}}],[\"react-dev-utils@*\",{peerDependencies:{typescript:\">=2.7\",webpack:\">=4\"},peerDependenciesMeta:{typescript:Qt}}],[\"@asyncapi/react-component@<=1.0.0-next.39\",{peerDependencies:{react:\">=16.8.0\",\"react-dom\":\">=16.8.0\"}}],[\"xo@*\",{peerDependencies:{webpack:\">=1.11.0\"},peerDependenciesMeta:{webpack:Qt}}],[\"babel-plugin-remove-graphql-queries@<=4.20.0-next.0\",{dependencies:{\"@babel/types\":\"^7.15.4\"}}],[\"gatsby-plugin-page-creator@<=4.20.0-next.1\",{dependencies:{\"fs-extra\":\"^10.1.0\"}}],[\"gatsby-plugin-utils@<=3.14.0-next.1\",{dependencies:{fastq:\"^1.13.0\"},peerDependencies:{graphql:\"^15.0.0\"}}],[\"gatsby-plugin-mdx@<3.1.0-next.1\",{dependencies:{mkdirp:\"^1.0.4\"}}],[\"gatsby-plugin-mdx@^2\",{peerDependencies:{gatsby:\"^3.0.0-next\"}}],[\"fdir@<=5.2.0\",{peerDependencies:{picomatch:\"2.x\"},peerDependenciesMeta:{picomatch:Qt}}],[\"babel-plugin-transform-typescript-metadata@<=0.3.2\",{peerDependencies:{\"@babel/core\":\"^7\",\"@babel/traverse\":\"^7\"},peerDependenciesMeta:{\"@babel/traverse\":Qt}}],[\"graphql-compose@>=9.0.10\",{peerDependencies:{graphql:\"^14.2.0 || ^15.0.0 || ^16.0.0\"}}],[\"vite-plugin-vuetify@<=1.0.2\",{peerDependencies:{vue:\"^3.0.0\"}}],[\"webpack-plugin-vuetify@<=2.0.1\",{peerDependencies:{vue:\"^3.2.6\"}}],[\"eslint-import-resolver-vite@<2.0.1\",{dependencies:{debug:\"^4.3.4\",resolve:\"^1.22.8\"}}],[\"notistack@^3.0.0\",{dependencies:{csstype:\"^3.0.10\"}}],[\"@fastify/type-provider-typebox@^5.0.0\",{peerDependencies:{fastify:\"^5.0.0\"}}],[\"@fastify/type-provider-typebox@^4.0.0\",{peerDependencies:{fastify:\"^4.0.0\"}}]];var Iq;function Zye(){return typeof Iq>\"u\"&&(Iq=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m8UT+M2+V+AkFST4BlKneiAQRSdST8KEAIyFlULt6wa9EBd0Ds28VmpaxquJdVt+nwdEs5xUskI13OVtFyY0UrQIRAlCuvvWivvlSKQfTO+2Q8OyUR1W5RvetaPz4jD27hdtwHFFA1Ptx6Ee/t2cY2rg2G46M1pNDRf2pWhvpy8pqMnuI3++4OF3+7OFIWXGjh+o7Nr2jNvbiYcQdQS1h903/jVFgOpA0yJ78z+x759bFA0rq+6aY5qPB4FzS3oYoLupDUhD9nDz6F6H7hpnlMf18KNKDu4IKjTWwrAnY6MFQw1W6ymOALHlFyCZmQhldg1MQHaMVVQTVgDC60TfaBqG++Y8PEoFhN/PBTZT175KNP/BlHDYGOOBmnBdzqJKplZ/ljiVG0ZBzfqeBRrrUkn6rA54462SgiliKoYVnbeptMdXNfAuaupIEi0bApF10TlgHfmEJAPUVidRVFyDupSem5po5vErPqWKhKbUIp0LozpYsIKK57dM/HKr+nguF+7924IIWMICkQ8JUigs9D+W+c4LnNoRtPPKNRUiCYmP+Jfo2lfKCKw8qpraEeWU3uiNRO6zcyKQoXPR5htmzzLznke7b4YbXW3I1lIRzmgG02Udb58U+7TpwyN7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==\",\"base64\")).toString()),Iq}var Cq;function $ye(){return typeof Cq>\"u\"&&(Cq=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"G8MSIIzURnVBnObTcvb3XE6v2S9Qgc2K801Oa5otNKEtK8BINZNcaQHy+9/vf/WXBimwutXC33P2DPc64pps5rz7NGGWaOKNSPL4Y2KRE8twut2lFOIN+OXPtRmPMRhMTILib2bEQx43az2I5d3YS8Roa5UZpF/ujHb3Djd3GDvYUfvFYSUQ39vb2cmifp/rgB4J/65JK3wRBTvMBoNBmn3mbXC63/gbBkW/2IRPri0O8bcsRBsmarF328pAln04nyJFkwUAvNu934supAqLtyerZZpJ8I8suJHhf/ocMV+scKwa8NOiDKIPXw6Ex/EEZD6TEGaW8N5zvNHYF10l6Lfooj7D5W2k3dgvQSbp2Wv8TGOayS978gxlOLVjTGXs66ozewbrjwElLtyrYNnWTfzzdEutgROUFPVMhnMoy8EjJLLlWwIEo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/xjddxhMcyqtzFyONb2Zdu90NkI8pAeufe7YlXrp53v8Dj/l8vWeVspRKBGXScBBPI/HinSTGmLDOGGOCIyH0JFdOZx0gWsacNlQLJMIrBhqRxXxHF/5pseWwejlAAvZ3klZSDSYY8mkToaWejXhgNomeGtx1DTLEUFMRkgF5yFB22WYdJnaWN14r1YJj81hGi45+jrADS5nYRhCiSlCJJ1nL8pYX+HDSMhdTEWyRcgHVp/IsUIZYMfT+YYncUQPgcxNGCHfZ88vDdrcUuaGIl6zhAsiaq7R5dfqrqXH/JcBhfjT8D0azayIyEz75Nxp6YkcyDxlJq3EXnJUpqDohJJOysL1t1uNiHESlvsxPb5cpbW0+ICZqJmUZus1BMW0F5IVBODLIo2zHHjA0=\",\"base64\")).toString()),Cq}var wq;function eEe(){return typeof wq>\"u\"&&(wq=Ie(\"zlib\").brotliDecompressSync(Buffer.from(\"m9XmPqMRsZ7bFo1U5CxexdgYepcdMsrcAbbqv7/rCXGM7SZhmJ2jPScITf1tA+qxuDFE8KC9mQaCs84ftss/pB0UrlDfSS52Q7rXyYIcHbrGG2egYMqC8FFfnNfZVLU+4ZieJEVLu1qxY0MYkbD8opX7TYstjKzqxwBObq8HUIQwogljOgs72xyCrxj0q79cf/hN2Ys/0fU6gkRgxFedikACuQLS4lvO/N5NpZ85m+BdO3c5VplDLMcfEDt6umRCbfM16uxnqUKPvPFg/qtuzzId3SjAxZFoZRqK3pdtWt/C+VU6+zuX09NsoBs3MwobpU1yyoXZnzA1EmiMRS5GfJeLxV51/jSXrfgTWr1af9hwKvqCfSVHiQuk+uO/N16Cror2c1QlthM7WkS/86azhK3b47PG6f5TAJVtrK7g+zlR2boyKBV+QkdOXcfBDrI8yCciS3LktLb+d3gopE3R1QYFN1QWdQtrso2qK3+OTVYpTdPAfICTe9//3y/1+6mixIob4kfOI1WT3DxyD2ZuR06a6RPOPlftc/bZeqWqUtoqSetJlgP0AOBsOOeWqkpKJDtgP25CmIz+ZAo8+zwb3wI5ZD/0a7Qb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sevents\").identHash,Zye],[G.makeIdent(null,\"resolve\").identHash,$ye],[G.makeIdent(null,\"typescript\").identHash,eEe]]),Lct={hooks:{registerPackageExtensions:async(t,e)=>{for(let[r,s]of Eq)e(G.parseDescriptor(r,!0),s)},getBuiltinPatch:async(t,e)=>{let r=\"compat/\";if(!e.startsWith(r))return;let s=G.parseIdent(e.slice(r.length)),a=tEe.get(s.identHash)?.();return typeof a<\"u\"?a:null},reduceDependency:async(t,e,r,s)=>typeof tEe.get(t.identHash)>\"u\"?t:G.makeDescriptor(t,G.makeRange({protocol:\"patch:\",source:G.stringifyDescriptor(t),selector:`optional!builtin<compat/${G.stringifyIdent(t)}>`,params:null}))}},Mct=Lct;var _q={};Vt(_q,{ConstraintsCheckCommand:()=>ZC,ConstraintsQueryCommand:()=>zC,ConstraintsSourceCommand:()=>XC,default:()=>nut});Ge();Ge();iS();var YC=class{constructor(e){this.project=e}createEnvironment(){let e=new WC([\"cwd\",\"ident\"]),r=new WC([\"workspace\",\"type\",\"ident\"]),s=new WC([\"ident\"]),a={manifestUpdates:new Map,reportedErrors:new Map},n=new Map,c=new Map;for(let f of this.project.storedPackages.values()){let p=Array.from(f.peerDependencies.values(),h=>[G.stringifyIdent(h),h.range]);n.set(f.locatorHash,{workspace:null,ident:G.stringifyIdent(f),version:f.version,dependencies:new Map,peerDependencies:new Map(p.filter(([h])=>f.peerDependenciesMeta.get(h)?.optional!==!0)),optionalPeerDependencies:new Map(p.filter(([h])=>f.peerDependenciesMeta.get(h)?.optional===!0))})}for(let f of this.project.storedPackages.values()){let p=n.get(f.locatorHash);p.dependencies=new Map(Array.from(f.dependencies.values(),h=>{let E=this.project.storedResolutions.get(h.descriptorHash);if(typeof E>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");let C=n.get(E);if(typeof C>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");return[G.stringifyIdent(h),C]})),p.dependencies.delete(p.ident)}for(let f of this.project.workspaces){let p=G.stringifyIdent(f.anchoredLocator),h=f.manifest.exportTo({}),E=n.get(f.anchoredLocator.locatorHash);if(typeof E>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");let C=(R,N,{caller:U=Ui.getCaller()}={})=>{let W=nS(R),ee=je.getMapWithDefault(a.manifestUpdates,f.cwd),ie=je.getMapWithDefault(ee,W),ue=je.getSetWithDefault(ie,N);U!==null&&ue.add(U)},S=R=>C(R,void 0,{caller:Ui.getCaller()}),P=R=>{je.getArrayWithDefault(a.reportedErrors,f.cwd).push(R)},I=e.insert({cwd:f.relativeCwd,ident:p,manifest:h,pkg:E,set:C,unset:S,error:P});c.set(f,I);for(let R of Ut.allDependencies)for(let N of f.manifest[R].values()){let U=G.stringifyIdent(N),W=()=>{C([R,U],void 0,{caller:Ui.getCaller()})},ee=ue=>{C([R,U],ue,{caller:Ui.getCaller()})},ie=null;if(R!==\"peerDependencies\"&&(R!==\"dependencies\"||!f.manifest.devDependencies.has(N.identHash))){let ue=f.anchoredPackage.dependencies.get(N.identHash);if(ue){if(typeof ue>\"u\")throw new Error(\"Assertion failed: The dependency should have been registered\");let le=this.project.storedResolutions.get(ue.descriptorHash);if(typeof le>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");let me=n.get(le);if(typeof me>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");ie=me}}r.insert({workspace:I,ident:U,range:N.range,type:R,resolution:ie,update:ee,delete:W,error:P})}}for(let f of this.project.storedPackages.values()){let p=this.project.tryWorkspaceByLocator(f);if(!p)continue;let h=c.get(p);if(typeof h>\"u\")throw new Error(\"Assertion failed: The workspace should have been registered\");let E=n.get(f.locatorHash);if(typeof E>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");E.workspace=h}return{workspaces:e,dependencies:r,packages:s,result:a}}async process(){let e=this.createEnvironment(),r={Yarn:{workspace:a=>e.workspaces.find(a)[0]??null,workspaces:a=>e.workspaces.find(a),dependency:a=>e.dependencies.find(a)[0]??null,dependencies:a=>e.dependencies.find(a),package:a=>e.packages.find(a)[0]??null,packages:a=>e.packages.find(a)}},s=await this.project.loadUserConfig();return s?.constraints?(await s.constraints(r),e.result):null}};Ge();Ge();Yt();var zC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.query=ge.String()}static{this.paths=[[\"constraints\",\"query\"]]}static{this.usage=ot.Usage({category:\"Constraints-related commands\",description:\"query the constraints fact database\",details:`\n      This command will output all matches to the given prolog query.\n    `,examples:[[\"List all dependencies throughout the workspace\",\"yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'\"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(lS(),aS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Tt.find(s,this.context.cwd),n=await r.find(a),c=this.query;return c.endsWith(\".\")||(c=`${c}.`),(await Ot.start({configuration:s,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(c)){let E=Array.from(Object.entries(h)),C=E.length,S=E.reduce((P,[I])=>Math.max(P,I.length),0);for(let P=0;P<C;P++){let[I,R]=E[P];p.reportInfo(null,`${tut(P,C)}${I.padEnd(S,\" \")} = ${eut(R)}`)}p.reportJson(h)}})).exitCode()}};function eut(t){return typeof t!=\"string\"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function tut(t,e){let r=t===0,s=t===e-1;return r&&s?\"\":r?\"\\u250C \":s?\"\\u2514 \":\"\\u2502 \"}Ge();Yt();var XC=class extends ft{constructor(){super(...arguments);this.verbose=ge.Boolean(\"-v,--verbose\",!1,{description:\"Also print the fact database automatically compiled from the workspace manifests\"})}static{this.paths=[[\"constraints\",\"source\"]]}static{this.usage=ot.Usage({category:\"Constraints-related commands\",description:\"print the source code for the constraints\",details:\"\\n      This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\\n    \",examples:[[\"Prints the source code\",\"yarn constraints source\"],[\"Print the source code and the fact database\",\"yarn constraints source -v\"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(lS(),aS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Tt.find(s,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};Ge();Ge();Yt();iS();var ZC=class extends ft{constructor(){super(...arguments);this.fix=ge.Boolean(\"--fix\",!1,{description:\"Attempt to automatically fix unambiguous issues, following a multi-pass process\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"constraints\"]]}static{this.usage=ot.Usage({category:\"Constraints-related commands\",description:\"check that the project constraints are met\",details:`\n      This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.\n\n      If the \\`--fix\\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.\n\n      For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.\n    `,examples:[[\"Check that all constraints are satisfied\",\"yarn constraints\"],[\"Autofix all unmet constraints\",\"yarn constraints --fix\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);await s.restoreInstallState();let a=await s.loadUserConfig(),n;if(a?.constraints)n=new YC(s);else{let{Constraints:h}=await Promise.resolve().then(()=>(lS(),aS));n=await h.find(s)}let c,f=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:C,remainingErrors:S}=iF(s,E,{fix:this.fix}),P=[];for(let[I,R]of C){let N=I.manifest.indent;I.manifest=new Ut,I.manifest.indent=N,I.manifest.load(R),P.push(I.persistManifest())}if(await Promise.all(P),!(C.size>0&&h>1)){c=rEe(S,{configuration:r}),f=!1,p=!0;for(let[,I]of S)for(let R of I)R.fixable?f=!0:p=!1}}if(c.children.length===0)return 0;if(f){let h=p?`Those errors can all be fixed by running ${he.pretty(r,\"yarn constraints --fix\",he.Type.CODE)}`:`Errors prefixed by '\\u2699' can be fixed by running ${he.pretty(r,\"yarn constraints --fix\",he.Type.CODE)}`;await Ot.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return c.children=je.sortMap(c.children,h=>h.value[1]),xs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};iS();var rut={configuration:{enableConstraintsChecks:{description:\"If true, constraints will run during installs\",type:\"BOOLEAN\",default:!1},constraintsPath:{description:\"The path of the constraints file.\",type:\"ABSOLUTE_PATH\",default:\"./constraints.pro\"}},commands:[zC,XC,ZC],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get(\"enableConstraintsChecks\"))return;let r=await t.loadUserConfig(),s;if(r?.constraints)s=new YC(t);else{let{Constraints:c}=await Promise.resolve().then(()=>(lS(),aS));s=await c.find(t)}let a=await s.process();if(!a)return;let{remainingErrors:n}=iF(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[c,f]of n)for(let p of f)e(84,`${he.pretty(t.configuration,c.anchoredLocator,he.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${he.pretty(t.configuration,\"yarn constraints\",he.Type.CODE)} for more details`)}}},nut=rut;var Hq={};Vt(Hq,{CreateCommand:()=>$C,DlxCommand:()=>ew,default:()=>sut});Ge();Yt();var $C=class extends ft{constructor(){super(...arguments);this.pkg=ge.String(\"-p,--package\",{description:\"The package to run the provided command from\"});this.quiet=ge.Boolean(\"-q,--quiet\",!1,{description:\"Only report critical errors instead of printing the full install logs\"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"create\"]]}async execute(){let r=[];this.pkg&&r.push(\"--package\",this.pkg),this.quiet&&r.push(\"--quiet\");let s=this.command.replace(/^(@[^@/]+)(@|$)/,\"$1/create$2\"),a=G.parseDescriptor(s),n=a.name.match(/^create(-|$)/)?a:a.scope?G.makeIdent(a.scope,`create-${a.name}`):G.makeIdent(null,`create-${a.name}`),c=G.stringifyIdent(n);return a.range!==\"unknown\"&&(c+=`@${a.range}`),this.cli.run([\"dlx\",...r,c,...this.args])}};Ge();Ge();Dt();Yt();var ew=class extends ft{constructor(){super(...arguments);this.packages=ge.Array(\"-p,--package\",{description:\"The package(s) to install before running the command\"});this.quiet=ge.Boolean(\"-q,--quiet\",!1,{description:\"Only report critical errors instead of printing the full install logs\"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"dlx\"]]}static{this.usage=ot.Usage({description:\"run a package in a temporary environment\",details:\"\\n      This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\\n\\n      By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\\n\\n      Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\\n    \",examples:[[\"Use create-vite to scaffold a new Vite project\",\"yarn dlx create-vite\"],[\"Install multiple packages for a single command\",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e \"console.log('hello!')\"`]]})}async execute(){return ze.telemetry=null,await ce.mktempPromise(async r=>{let s=J.join(r,`dlx-${process.pid}`);await ce.mkdirPromise(s),await ce.writeFilePromise(J.join(s,\"package.json\"),`{}\n`),await ce.writeFilePromise(J.join(s,\"yarn.lock\"),\"\");let a=J.join(s,\".yarnrc.yml\"),n=await ze.findProjectCwd(this.context.cwd),f={enableGlobalCache:!(await ze.find(this.context.cwd,null,{strict:!1})).get(\"enableGlobalCache\"),enableTelemetry:!1,logFilters:[{code:Yf(68),level:he.LogLevel.Discard}]},p=n!==null?J.join(n,\".yarnrc.yml\"):null;p!==null&&ce.existsSync(p)?(await ce.copyFilePromise(p,a),await ze.updateConfiguration(s,N=>{let U=je.toMerged(N,f);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(W=>{let ee=typeof W==\"string\"?W:W.path,ie=fe.isAbsolute(ee)?ee:fe.resolve(fe.fromPortablePath(n),ee);return typeof W==\"string\"?ie:{path:ie,spec:W.spec}})),U})):await ce.writeJsonPromise(a,f);let h=this.packages??[this.command],E=G.parseDescriptor(this.command).name,C=await this.cli.run([\"add\",\"--fixed\",\"--\",...h],{cwd:s,quiet:this.quiet});if(C!==0)return C;this.quiet||this.context.stdout.write(`\n`);let S=await ze.find(s,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,s);if(I===null)throw new ar(P.cwd,s);await P.restoreInstallState();let R=await In.getWorkspaceAccessibleBinaries(I);return R.has(E)===!1&&R.size===1&&typeof this.packages>\"u\"&&(E=Array.from(R)[0][0]),await In.executeWorkspaceAccessibleBinary(I,E,this.args,{packageAccessibleBinaries:R,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};var iut={commands:[$C,ew]},sut=iut;var qq={};Vt(qq,{ExecFetcher:()=>uS,ExecResolver:()=>fS,default:()=>lut,execUtils:()=>lF});Ge();Ge();Dt();var cA=\"exec:\";var lF={};Vt(lF,{loadGeneratorFile:()=>cS,makeLocator:()=>Gq,makeSpec:()=>PEe,parseSpec:()=>jq});Ge();Dt();function jq(t){let{params:e,selector:r}=G.parseRange(t),s=fe.toPortablePath(r);return{parentLocator:e&&typeof e.locator==\"string\"?G.parseLocator(e.locator):null,path:s}}function PEe({parentLocator:t,path:e,generatorHash:r,protocol:s}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<\"u\"?{hash:r}:{};return G.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function Gq(t,{parentLocator:e,path:r,generatorHash:s,protocol:a}){return G.makeLocator(t,PEe({parentLocator:e,path:r,generatorHash:s,protocol:a}))}async function cS(t,e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(t,{protocol:e}),n=J.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,n.localPath)}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=J.join(c.prefixPath,a);return await f.readFilePromise(p,\"utf8\")}var uS=class{supports(e,r){return!!e.reference.startsWith(cA)}getLocalPath(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:cA});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){let s=await cS(e.reference,cA,r);return ce.mktempPromise(async a=>{let n=J.join(a,\"generator.js\");return await ce.writeFilePromise(n,s),ce.mktempPromise(async c=>{if(await this.generatePackage(c,e,n,r),!ce.existsSync(J.join(c,\"build\")))throw new Error(\"The script should have generated a build directory\");return await ps.makeArchiveFromDirectory(J.join(c,\"build\"),{prefixPath:G.getIdentVendorPath(e),compressionLevel:r.project.configuration.get(\"compressionLevel\")})})})}async generatePackage(e,r,s,a){return await ce.mktempPromise(async n=>{let c=await In.makeScriptEnv({project:a.project,binFolder:n}),f=J.join(e,\"runtime.js\");return await ce.mktempPromise(async p=>{let h=J.join(p,\"buildfile.log\"),E=J.join(e,\"generator\"),C=J.join(e,\"build\");await ce.mkdirPromise(E),await ce.mkdirPromise(C);let S={tempDir:fe.fromPortablePath(E),buildDir:fe.fromPortablePath(C),locator:G.stringifyLocator(r)};await ce.writeFilePromise(f,`\n          // Expose 'Module' as a global variable\n          Object.defineProperty(global, 'Module', {\n            get: () => require('module'),\n            configurable: true,\n            enumerable: false,\n          });\n\n          // Expose non-hidden built-in modules as global variables\n          for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) {\n            Object.defineProperty(global, name, {\n              get: () => require(name),\n              configurable: true,\n              enumerable: false,\n            });\n          }\n\n          // Expose the 'execEnv' global variable\n          Object.defineProperty(global, 'execEnv', {\n            value: {\n              ...${JSON.stringify(S)},\n            },\n            enumerable: true,\n          });\n        `);let P=c.NODE_OPTIONS||\"\",I=/\\s*--require\\s+\\S*\\.pnp\\.c?js\\s*/g;P=P.replace(I,\" \").trim(),c.NODE_OPTIONS=P;let{stdout:R,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${G.stringifyLocator(r)})\n`,prefix:G.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await qr.pipevp(process.execPath,[\"--require\",fe.fromPortablePath(f),fe.fromPortablePath(s),G.stringifyIdent(r)],{cwd:e,env:c,stdin:null,stdout:R,stderr:N});if(U!==0)throw ce.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${he.pretty(a.project.configuration,h,he.Type.PATH)})`)})})}};Ge();Ge();var out=2,fS=class{supportsDescriptor(e,r){return!!e.range.startsWith(cA)}supportsLocator(e,r){return!!e.reference.startsWith(cA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{path:a,parentLocator:n}=jq(e.range);if(n===null)throw new Error(\"Assertion failed: The descriptor should have been bound\");let c=await cS(G.makeRange({protocol:cA,source:a,selector:a,params:{locator:G.stringifyLocator(n)}}),cA,s.fetchOptions),f=Nn.makeHash(`${out}`,c).slice(0,6);return[Gq(e,{parentLocator:n,path:a,generatorHash:f,protocol:cA})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var aut={fetchers:[uS],resolvers:[fS]},lut=aut;var Yq={};Vt(Yq,{FileFetcher:()=>gS,FileResolver:()=>dS,TarballFileFetcher:()=>mS,TarballFileResolver:()=>yS,default:()=>fut,fileUtils:()=>xm});Ge();Dt();var tw=/^(?:[a-zA-Z]:[\\\\/]|\\.{0,2}\\/)/,AS=/^[^?]*\\.(?:tar\\.gz|tgz)(?:::.*)?$/,es=\"file:\";var xm={};Vt(xm,{fetchArchiveFromLocator:()=>hS,makeArchiveFromLocator:()=>cF,makeBufferFromLocator:()=>Wq,makeLocator:()=>rw,makeSpec:()=>xEe,parseSpec:()=>pS});Ge();Dt();function pS(t){let{params:e,selector:r}=G.parseRange(t),s=fe.toPortablePath(r);return{parentLocator:e&&typeof e.locator==\"string\"?G.parseLocator(e.locator):null,path:s}}function xEe({parentLocator:t,path:e,hash:r,protocol:s}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<\"u\"?{hash:r}:{};return G.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function rw(t,{parentLocator:e,path:r,hash:s,protocol:a}){return G.makeLocator(t,xEe({parentLocator:e,path:r,hash:s,protocol:a}))}async function hS(t,e){let{parentLocator:r,path:s}=G.parseFileStyleRange(t.reference,{protocol:es}),a=J.isAbsolute(s)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let c=n.packageFs,f=J.join(n.prefixPath,s);return await je.releaseAfterUseAsync(async()=>await c.readFilePromise(f),n.releaseFs)}async function cF(t,{protocol:e,fetchOptions:r,inMemory:s=!1}){let{parentLocator:a,path:n}=G.parseFileStyleRange(t.reference,{protocol:e}),c=J.isAbsolute(n)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(a,r),f=c.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,c.localPath)}:c;c!==f&&c.releaseFs&&c.releaseFs();let p=f.packageFs,h=J.join(f.prefixPath,n);return await je.releaseAfterUseAsync(async()=>await ps.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:G.getIdentVendorPath(t),compressionLevel:r.project.configuration.get(\"compressionLevel\"),inMemory:s}),f.releaseFs)}async function Wq(t,{protocol:e,fetchOptions:r}){return(await cF(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var gS=class{supports(e,r){return!!e.reference.startsWith(es)}getLocalPath(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:es});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){return cF(e,{protocol:es,fetchOptions:r})}};Ge();Ge();var cut=2,dS=class{supportsDescriptor(e,r){return e.range.match(tw)?!0:!!e.range.startsWith(es)}supportsLocator(e,r){return!!e.reference.startsWith(es)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return tw.test(e.range)&&(e=G.makeDescriptor(e,`${es}${e.range}`)),G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{path:a,parentLocator:n}=pS(e.range);if(n===null)throw new Error(\"Assertion failed: The descriptor should have been bound\");let c=await Wq(G.makeLocator(e,G.makeRange({protocol:es,source:a,selector:a,params:{locator:G.stringifyLocator(n)}})),{protocol:es,fetchOptions:s.fetchOptions}),f=Nn.makeHash(`${cut}`,c).slice(0,6);return[rw(e,{parentLocator:n,path:a,hash:f,protocol:es})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};Ge();var mS=class{supports(e,r){return AS.test(e.reference)?!!e.reference.startsWith(es):!1}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromDisk(e,r){let s=await hS(e,r);return await ps.convertToZip(s,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}};Ge();Ge();Ge();var yS=class{supportsDescriptor(e,r){return AS.test(e.range)?!!(e.range.startsWith(es)||tw.test(e.range)):!1}supportsLocator(e,r){return AS.test(e.reference)?!!e.reference.startsWith(es):!1}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return tw.test(e.range)&&(e=G.makeDescriptor(e,`${es}${e.range}`)),G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{path:a,parentLocator:n}=pS(e.range);if(n===null)throw new Error(\"Assertion failed: The descriptor should have been bound\");let c=rw(e,{parentLocator:n,path:a,hash:\"\",protocol:es}),f=await hS(c,s.fetchOptions),p=Nn.makeHash(f).slice(0,6);return[rw(e,{parentLocator:n,path:a,hash:p,protocol:es})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var uut={fetchers:[mS,gS],resolvers:[yS,dS]},fut=uut;var Kq={};Vt(Kq,{GithubFetcher:()=>ES,default:()=>put,githubUtils:()=>uF});Ge();Dt();var uF={};Vt(uF,{invalidGithubUrlMessage:()=>TEe,isGithubUrl:()=>Vq,parseGithubUrl:()=>Jq});var kEe=ut(Ie(\"querystring\")),QEe=[/^https?:\\/\\/(?:([^/]+?)@)?github.com\\/([^/#]+)\\/([^/#]+)\\/tarball\\/([^/#]+)(?:#(.*))?$/,/^https?:\\/\\/(?:([^/]+?)@)?github.com\\/([^/#]+)\\/([^/#]+?)(?:\\.git)?(?:#(.*))?$/];function Vq(t){return t?QEe.some(e=>!!t.match(e)):!1}function Jq(t){let e;for(let f of QEe)if(e=t.match(f),e)break;if(!e)throw new Error(TEe(t));let[,r,s,a,n=\"master\"]=e,{commit:c}=kEe.default.parse(n);return n=c||n.replace(/[^:]*:/,\"\"),{auth:r,username:s,reponame:a,treeish:n}}function TEe(t){return`Input cannot be parsed as a valid GitHub URL ('${t}').`}var ES=class{supports(e,r){return!!Vq(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from GitHub`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s=await nn.get(this.getLocatorUrl(e,r),{configuration:r.project.configuration});return await ce.mktempPromise(async a=>{let n=new Sn(a);await ps.extractArchiveTo(s,n,{stripComponents:1});let c=ka.splitRepoUrl(e.reference),f=J.join(a,\"package.tgz\");await In.prepareExternalProject(a,f,{configuration:r.project.configuration,report:r.report,workspace:c.extra.workspace,locator:e});let p=await ce.readFilePromise(f);return await ps.convertToZip(p,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,r){let{auth:s,username:a,reponame:n,treeish:c}=Jq(e.reference);return`https://${s?`${s}@`:\"\"}github.com/${a}/${n}/archive/${c}.tar.gz`}};var Aut={hooks:{async fetchHostedRepository(t,e,r){if(t!==null)return t;let s=new ES;if(!s.supports(e,r))return null;try{return await s.fetch(e,r)}catch{return null}}}},put=Aut;var zq={};Vt(zq,{TarballHttpFetcher:()=>CS,TarballHttpResolver:()=>wS,default:()=>gut});Ge();function IS(t){let e;try{e=new URL(t)}catch{return!1}return!(e.protocol!==\"http:\"&&e.protocol!==\"https:\"||!e.pathname.match(/(\\.tar\\.gz|\\.tgz|\\/[^.]+)$/))}var CS=class{supports(e,r){return IS(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s=await nn.get(e.reference,{configuration:r.project.configuration});return await ps.convertToZip(s,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}};Ge();Ge();var wS=class{supportsDescriptor(e,r){return IS(e.range)}supportsLocator(e,r){return IS(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){return[G.convertDescriptorToLocator(e)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"HARD\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var hut={fetchers:[CS],resolvers:[wS]},gut=hut;var Xq={};Vt(Xq,{InitCommand:()=>z0,InitInitializerCommand:()=>nw,default:()=>mut});Yt();Ge();Ge();Dt();Yt();var z0=class extends ft{constructor(){super(...arguments);this.private=ge.Boolean(\"-p,--private\",!1,{description:\"Initialize a private package\"});this.workspace=ge.Boolean(\"-w,--workspace\",!1,{description:\"Initialize a workspace root with a `packages/` directory\"});this.install=ge.String(\"-i,--install\",!1,{tolerateBoolean:!0,description:\"Initialize a package with a specific bundle that will be locked in the project\"});this.name=ge.String(\"-n,--name\",{description:\"Initialize a package with the given name\"});this.usev2=ge.Boolean(\"-2\",!1,{hidden:!0});this.yes=ge.Boolean(\"-y,--yes\",{hidden:!0})}static{this.paths=[[\"init\"]]}static{this.usage=ot.Usage({description:\"create a new package\",details:\"\\n      This command will setup a new package in your local directory.\\n\\n      If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\\n\\n      If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\\n\\n      If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\\n\\n      The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\\n    \",examples:[[\"Create a new package in the local directory\",\"yarn init\"],[\"Create a new private package in the local directory\",\"yarn init -p\"],[\"Create a new package and store the Yarn release inside\",\"yarn init -i=latest\"],[\"Create a new private package and defines it as a workspace root\",\"yarn init -w\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.install==\"string\"?this.install:this.usev2||this.install===!0?\"latest\":null;return s!==null?await this.executeProxy(r,s):await this.executeRegular(r)}async executeProxy(r,s){if(r.projectCwd!==null&&r.projectCwd!==this.context.cwd)throw new nt(\"Cannot use the --install flag from within a project subdirectory\");ce.existsSync(this.context.cwd)||await ce.mkdirPromise(this.context.cwd,{recursive:!0});let a=J.join(this.context.cwd,Er.lockfile);ce.existsSync(a)||await ce.writeFilePromise(a,\"\");let n=await this.cli.run([\"set\",\"version\",s],{quiet:!0});if(n!==0)return n;let c=[];return this.private&&c.push(\"-p\"),this.workspace&&c.push(\"-w\"),this.name&&c.push(`-n=${this.name}`),this.yes&&c.push(\"-y\"),await ce.mktempPromise(async f=>{let{code:p}=await qr.pipevp(\"yarn\",[\"init\",...c],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await In.makeScriptEnv({binFolder:f})});return p})}async initialize(){}async executeRegular(r){let s=null;try{s=(await Tt.find(r,this.context.cwd)).project}catch{s=null}ce.existsSync(this.context.cwd)||await ce.mkdirPromise(this.context.cwd,{recursive:!0});let a=await Ut.tryFind(this.context.cwd),n=a??new Ut,c=Object.fromEntries(r.get(\"initFields\").entries());n.load(c),n.name=n.name??G.makeIdent(r.get(\"initScope\"),this.name??J.basename(this.context.cwd)),n.packageManager=fn&&je.isTaggedYarnVersion(fn)?`yarn@${fn}`:null,(!a&&this.workspace||this.private)&&(n.private=!0),this.workspace&&n.workspaceDefinitions.length===0&&(await ce.mkdirPromise(J.join(this.context.cwd,\"packages\"),{recursive:!0}),n.workspaceDefinitions=[{pattern:\"packages/*\"}]);let f={};n.exportTo(f);let p=J.join(this.context.cwd,Ut.fileName);await ce.changeFilePromise(p,`${JSON.stringify(f,null,2)}\n`,{automaticNewlines:!0});let h=[p],E=J.join(this.context.cwd,\"README.md\");if(ce.existsSync(E)||(await ce.writeFilePromise(E,`# ${G.stringifyIdent(n.name)}\n`),h.push(E)),!s||s.cwd===this.context.cwd){let C=J.join(this.context.cwd,Er.lockfile);ce.existsSync(C)||(await ce.writeFilePromise(C,\"\"),h.push(C));let P=[\".yarn/*\",\"!.yarn/patches\",\"!.yarn/plugins\",\"!.yarn/releases\",\"!.yarn/sdks\",\"!.yarn/versions\",\"\",\"# Whether you use PnP or not, the node_modules folder is often used to store\",\"# build artifacts that should be gitignored\",\"node_modules\",\"\",\"# Swap the comments on the following lines if you wish to use zero-installs\",\"# In that case, don't forget to run `yarn config set enableGlobalCache false`!\",\"# Documentation here: https://yarnpkg.com/features/caching#zero-installs\",\"\",\"#!.yarn/cache\",\".pnp.*\"].map(ue=>`${ue}\n`).join(\"\"),I=J.join(this.context.cwd,\".gitignore\");ce.existsSync(I)||(await ce.writeFilePromise(I,P),h.push(I));let N=[\"/.yarn/**            linguist-vendored\",\"/.yarn/releases/*    binary\",\"/.yarn/plugins/**/*  binary\",\"/.pnp.*              binary linguist-generated\"].map(ue=>`${ue}\n`).join(\"\"),U=J.join(this.context.cwd,\".gitattributes\");ce.existsSync(U)||(await ce.writeFilePromise(U,N),h.push(U));let W={\"*\":{charset:\"utf-8\",endOfLine:\"lf\",indentSize:2,indentStyle:\"space\",insertFinalNewline:!0}};je.mergeIntoTarget(W,r.get(\"initEditorConfig\"));let ee=`root = true\n`;for(let[ue,le]of Object.entries(W)){ee+=`\n[${ue}]\n`;for(let[me,pe]of Object.entries(le)){let Be=me.replace(/[A-Z]/g,Ce=>`_${Ce.toLowerCase()}`);ee+=`${Be} = ${pe}\n`}}let ie=J.join(this.context.cwd,\".editorconfig\");ce.existsSync(ie)||(await ce.writeFilePromise(ie,ee),h.push(ie)),await this.cli.run([\"install\"],{quiet:!0}),await this.initialize(),ce.existsSync(J.join(this.context.cwd,\".git\"))||(await qr.execvp(\"git\",[\"init\"],{cwd:this.context.cwd}),await qr.execvp(\"git\",[\"add\",\"--\",...h],{cwd:this.context.cwd}),await qr.execvp(\"git\",[\"commit\",\"--allow-empty\",\"-m\",\"First commit\"],{cwd:this.context.cwd}))}}};var nw=class extends z0{constructor(){super(...arguments);this.initializer=ge.String();this.argv=ge.Proxy()}static{this.paths=[[\"init\"]]}async initialize(){this.context.stdout.write(`\n`),await this.cli.run([\"dlx\",this.initializer,...this.argv],{quiet:!0})}};var dut={configuration:{initScope:{description:\"Scope used when creating packages via the init command\",type:\"STRING\",default:null},initFields:{description:\"Additional fields to set when creating packages via the init command\",type:\"MAP\",valueDefinition:{description:\"\",type:\"ANY\"}},initEditorConfig:{description:\"Extra rules to define in the generator editorconfig\",type:\"MAP\",valueDefinition:{description:\"\",type:\"ANY\"}}},commands:[z0,nw]},mut=dut;var JW={};Vt(JW,{SearchCommand:()=>Iw,UpgradeInteractiveCommand:()=>Cw,default:()=>Dgt});Ge();var FEe=ut(Ie(\"os\"));function iw({stdout:t}){if(FEe.default.endianness()===\"BE\")throw new Error(\"Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures\");if(!t.isTTY)throw new Error(\"Interactive commands can only be used inside a TTY environment\")}Yt();var YIe=ut(g9()),d9={appId:\"OFCNCOG2CU\",apiKey:\"6fe4476ee5a1832882e326b506d14126\",indexName:\"npm-search\"},hAt=(0,YIe.default)(d9.appId,d9.apiKey).initIndex(d9.indexName),m9=async(t,e=0)=>await hAt.search(t,{analyticsTags:[\"yarn-plugin-interactive-tools\"],attributesToRetrieve:[\"name\",\"version\",\"owner\",\"repository\",\"humanDownloadsLast30Days\"],page:e,hitsPerPage:10});var CD=[\"regular\",\"dev\",\"peer\"],Iw=class extends ft{static{this.paths=[[\"search\"]]}static{this.usage=ot.Usage({category:\"Interactive commands\",description:\"open the search interface\",details:`\n    This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.\n    `,examples:[[\"Open the search window\",\"yarn search\"]]})}async execute(){iw(this.context);let{Gem:e}=await Promise.resolve().then(()=>(WF(),LW)),{ScrollableItems:r}=await Promise.resolve().then(()=>(KF(),JF)),{useKeypress:s}=await Promise.resolve().then(()=>(yD(),w2e)),{useMinistore:a}=await Promise.resolve().then(()=>(GW(),jW)),{renderForm:n}=await Promise.resolve().then(()=>($F(),ZF)),{default:c}=await Promise.resolve().then(()=>ut(T2e())),{Box:f,Text:p}=await Promise.resolve().then(()=>ut(Wc())),{default:h,useEffect:E,useState:C}=await Promise.resolve().then(()=>ut(hn())),S=await ze.find(this.context.cwd,this.context.plugins),P=()=>h.createElement(f,{flexDirection:\"row\"},h.createElement(f,{flexDirection:\"column\",width:48},h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<up>\"),\"/\",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<down>\"),\" to move between packages.\")),h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<space>\"),\" to select a package.\")),h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<space>\"),\" again to change the target.\"))),h.createElement(f,{flexDirection:\"column\"},h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<enter>\"),\" to install the selected packages.\")),h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<ctrl+c>\"),\" to abort.\")))),I=()=>h.createElement(h.Fragment,null,h.createElement(f,{width:15},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Owner\")),h.createElement(f,{width:11},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Version\")),h.createElement(f,{width:10},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Downloads\"))),R=()=>h.createElement(f,{width:17},h.createElement(p,{bold:!0,underline:!0,color:\"gray\"},\"Target\")),N=({hit:pe,active:Be})=>{let[Ce,g]=a(pe.name,null);s({active:Be},(Ae,se)=>{if(se.name!==\"space\")return;if(!Ce){g(CD[0]);return}let Z=CD.indexOf(Ce)+1;Z===CD.length?g(null):g(CD[Z])},[Ce,g]);let we=G.parseIdent(pe.name),ye=G.prettyIdent(S,we);return h.createElement(f,null,h.createElement(f,{width:45},h.createElement(p,{bold:!0,wrap:\"wrap\"},ye)),h.createElement(f,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:\"truncate\"},pe.owner.name)),h.createElement(f,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:\"truncate\"},pe.version)),h.createElement(f,{width:16,marginLeft:1},h.createElement(p,null,pe.humanDownloadsLast30Days)))},U=({name:pe,active:Be})=>{let[Ce]=a(pe,null),g=G.parseIdent(pe);return h.createElement(f,null,h.createElement(f,{width:47},h.createElement(p,{bold:!0},\" - \",G.prettyIdent(S,g))),CD.map(we=>h.createElement(f,{key:we,width:14,marginLeft:1},h.createElement(p,null,\" \",h.createElement(e,{active:Ce===we}),\" \",h.createElement(p,{bold:!0},we)))))},W=()=>h.createElement(f,{marginTop:1},h.createElement(p,null,\"Powered by Algolia.\")),ie=await n(({useSubmit:pe})=>{let Be=a();pe(Be);let Ce=Array.from(Be.keys()).filter(j=>Be.get(j)!==null),[g,we]=C(\"\"),[ye,Ae]=C(0),[se,Z]=C([]),De=j=>{j.match(/\\t| /)||we(j)},Re=async()=>{Ae(0);let j=await m9(g);j.query===g&&Z(j.hits)},mt=async()=>{let j=await m9(g,ye+1);j.query===g&&j.page-1===ye&&(Ae(j.page),Z([...se,...j.hits]))};return E(()=>{g?Re():Z([])},[g]),h.createElement(f,{flexDirection:\"column\"},h.createElement(P,null),h.createElement(f,{flexDirection:\"row\",marginTop:1},h.createElement(p,{bold:!0},\"Search: \"),h.createElement(f,{width:41},h.createElement(c,{value:g,onChange:De,placeholder:\"i.e. babel, webpack, react...\",showCursor:!1})),h.createElement(I,null)),se.length?h.createElement(r,{radius:2,loop:!1,children:se.map(j=>h.createElement(N,{key:j.name,hit:j,active:!1})),willReachEnd:mt}):h.createElement(p,{color:\"gray\"},\"Start typing...\"),h.createElement(f,{flexDirection:\"row\",marginTop:1},h.createElement(f,{width:49},h.createElement(p,{bold:!0},\"Selected:\")),h.createElement(R,null)),Ce.length?Ce.map(j=>h.createElement(U,{key:j,name:j,active:!1})):h.createElement(p,{color:\"gray\"},\"No selected packages...\"),h.createElement(W,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ie>\"u\")return 1;let ue=Array.from(ie.keys()).filter(pe=>ie.get(pe)===\"regular\"),le=Array.from(ie.keys()).filter(pe=>ie.get(pe)===\"dev\"),me=Array.from(ie.keys()).filter(pe=>ie.get(pe)===\"peer\");return ue.length&&await this.cli.run([\"add\",...ue]),le.length&&await this.cli.run([\"add\",\"--dev\",...le]),me&&await this.cli.run([\"add\",\"--peer\",...me]),0}};Ge();Yt();YG();var U2e=ut(Ai()),M2e=/^((?:[\\^~]|>=?)?)([0-9]+)(\\.[0-9]+)(\\.[0-9]+)((?:-\\S+)?)$/;function _2e(t,e){return t.length>0?[t.slice(0,e)].concat(_2e(t.slice(e),e)):[]}var Cw=class extends ft{static{this.paths=[[\"upgrade-interactive\"]]}static{this.usage=ot.Usage({category:\"Interactive commands\",description:\"open the upgrade interface\",details:`\n      This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade.\n    `,examples:[[\"Open the upgrade window\",\"yarn upgrade-interactive\"]]})}async execute(){iw(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(L2e(),O2e)),{Pad:r}=await Promise.resolve().then(()=>(VW(),N2e)),{ScrollableItems:s}=await Promise.resolve().then(()=>(KF(),JF)),{useMinistore:a}=await Promise.resolve().then(()=>(GW(),jW)),{renderForm:n}=await Promise.resolve().then(()=>($F(),ZF)),{Box:c,Text:f}=await Promise.resolve().then(()=>ut(Wc())),{default:p,useEffect:h,useRef:E,useState:C}=await Promise.resolve().then(()=>ut(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,this.context.cwd),R=await Kr.find(S);if(!I)throw new ar(P.cwd,this.context.cwd);await P.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(we,ye)=>{let Ae=mde(we,ye),se=\"\";for(let Z of Ae)Z.added?se+=he.pretty(S,Z.value,\"green\"):Z.removed||(se+=Z.value);return se},W=(we,ye)=>{if(we===ye)return ye;let Ae=G.parseRange(we),se=G.parseRange(ye),Z=Ae.selector.match(M2e),De=se.selector.match(M2e);if(!Z||!De)return U(we,ye);let Re=[\"gray\",\"red\",\"yellow\",\"green\",\"magenta\"],mt=null,j=\"\";for(let rt=1;rt<Re.length;++rt)mt!==null||Z[rt]!==De[rt]?(mt===null&&(mt=Re[rt-1]),j+=he.pretty(S,De[rt],mt)):j+=De[rt];return j},ee=async(we,ye,Ae)=>{let se=await Xu.fetchDescriptorFrom(we,Ae,{project:P,cache:R,preserveModifier:ye,workspace:I});return se!==null?se.range:we.range},ie=async we=>{let ye=U2e.default.valid(we.range)?`^${we.range}`:we.range,[Ae,se]=await Promise.all([ee(we,we.range,ye).catch(()=>null),ee(we,we.range,\"latest\").catch(()=>null)]),Z=[{value:null,label:we.range}];return Ae&&Ae!==we.range?Z.push({value:Ae,label:W(we.range,Ae)}):Z.push({value:null,label:\"\"}),se&&se!==Ae&&se!==we.range?Z.push({value:se,label:W(we.range,se)}):Z.push({value:null,label:\"\"}),Z},ue=()=>p.createElement(c,{flexDirection:\"row\"},p.createElement(c,{flexDirection:\"column\",width:49},p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<up>\"),\"/\",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<down>\"),\" to select packages.\")),p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<left>\"),\"/\",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<right>\"),\" to select versions.\"))),p.createElement(c,{flexDirection:\"column\"},p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<enter>\"),\" to install.\")),p.createElement(c,{marginLeft:1},p.createElement(f,null,\"Press \",p.createElement(f,{bold:!0,color:\"cyanBright\"},\"<ctrl+c>\"),\" to abort.\")))),le=()=>p.createElement(c,{flexDirection:\"row\",paddingTop:1,paddingBottom:1},p.createElement(c,{width:50},p.createElement(f,{bold:!0},p.createElement(f,{color:\"greenBright\"},\"?\"),\" Pick the packages you want to upgrade.\")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:\"gray\"},\"Current\")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:\"gray\"},\"Range\")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:\"gray\"},\"Latest\"))),me=({active:we,descriptor:ye,suggestions:Ae})=>{let[se,Z]=a(ye.descriptorHash,null),De=G.stringifyIdent(ye),Re=Math.max(0,45-De.length);return p.createElement(p.Fragment,null,p.createElement(c,null,p.createElement(c,{width:45},p.createElement(f,{bold:!0},G.prettyIdent(S,ye)),p.createElement(r,{active:we,length:Re})),p.createElement(e,{active:we,options:Ae,value:se,skewer:!0,onChange:Z,sizes:[17,17,17]})))},pe=({dependencies:we})=>{let[ye,Ae]=C(we.map(()=>null)),se=E(!0),Z=async De=>{let Re=await ie(De);return Re.filter(mt=>mt.label!==\"\").length<=1?null:{descriptor:De,suggestions:Re}};return h(()=>()=>{se.current=!1},[]),h(()=>{let De=Math.trunc(N*1.75),Re=we.slice(0,De),mt=we.slice(De),j=_2e(mt,N),rt=Re.map(Z).reduce(async(Fe,Ne)=>{await Fe;let Pe=await Ne;Pe!==null&&se.current&&Ae(Ve=>{let ke=Ve.findIndex(Ue=>Ue===null),it=[...Ve];return it[ke]=Pe,it})},Promise.resolve());j.reduce((Fe,Ne)=>Promise.all(Ne.map(Pe=>Promise.resolve().then(()=>Z(Pe)))).then(async Pe=>{Pe=Pe.filter(Ve=>Ve!==null),await Fe,se.current&&Ae(Ve=>{let ke=Ve.findIndex(it=>it===null);return Ve.slice(0,ke).concat(Pe).concat(Ve.slice(ke+Pe.length))})}),rt).then(()=>{se.current&&Ae(Fe=>Fe.filter(Ne=>Ne!==null))})},[]),ye.length?p.createElement(s,{radius:N>>1,children:ye.map((De,Re)=>De!==null?p.createElement(me,{key:Re,active:!1,descriptor:De.descriptor,suggestions:De.suggestions}):p.createElement(f,{key:Re},\"Loading...\"))}):p.createElement(f,null,\"No upgrades found\")},Ce=await n(({useSubmit:we})=>{we(a());let ye=new Map;for(let se of P.workspaces)for(let Z of[\"dependencies\",\"devDependencies\"])for(let De of se.manifest[Z].values())P.tryWorkspaceByDescriptor(De)===null&&(De.range.startsWith(\"link:\")||ye.set(De.descriptorHash,De));let Ae=je.sortMap(ye.values(),se=>G.stringifyDescriptor(se));return p.createElement(c,{flexDirection:\"column\"},p.createElement(ue,null),p.createElement(le,null),p.createElement(pe,{dependencies:Ae}))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof Ce>\"u\")return 1;let g=!1;for(let we of P.workspaces)for(let ye of[\"dependencies\",\"devDependencies\"]){let Ae=we.manifest[ye];for(let se of Ae.values()){let Z=Ce.get(se.descriptorHash);typeof Z<\"u\"&&Z!==null&&(Ae.set(se.identHash,G.makeDescriptor(se,Z)),g=!0)}}return g?await P.installWithNewReport({quiet:this.context.quiet,stdout:this.context.stdout},{cache:R}):0}};var Sgt={commands:[Iw,Cw]},Dgt=Sgt;var zW={};Vt(zW,{default:()=>kgt});Ge();var BD=\"jsr:\";Ge();Ge();function ww(t){let e=t.range.slice(4);if(Fr.validRange(e))return G.makeDescriptor(t,`npm:${G.stringifyIdent(G.wrapIdentIntoScope(t,\"jsr\"))}@${e}`);let r=G.tryParseDescriptor(e,!0);if(r!==null)return G.makeDescriptor(t,`npm:${G.stringifyIdent(G.wrapIdentIntoScope(r,\"jsr\"))}@${r.range}`);throw new Error(`Invalid range: ${t.range}`)}function Bw(t){return G.makeLocator(G.wrapIdentIntoScope(t,\"jsr\"),`npm:${t.reference.slice(4)}`)}function KW(t){return G.makeLocator(G.unwrapIdentFromScope(t,\"jsr\"),`jsr:${t.reference.slice(4)}`)}var eN=class{supports(e,r){return e.reference.startsWith(BD)}getLocalPath(e,r){let s=Bw(e);return r.fetcher.getLocalPath(s,r)}fetch(e,r){let s=Bw(e);return r.fetcher.fetch(s,r)}};var tN=class{supportsDescriptor(e,r){return!!e.range.startsWith(BD)}supportsLocator(e,r){return!!e.reference.startsWith(BD)}shouldPersistResolution(e,r){let s=Bw(e);return r.resolver.shouldPersistResolution(s,r)}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{inner:ww(e)}}async getCandidates(e,r,s){let a=s.project.configuration.normalizeDependency(ww(e));return(await s.resolver.getCandidates(a,r,s)).map(c=>KW(c))}async getSatisfying(e,r,s,a){let n=a.project.configuration.normalizeDependency(ww(e));return a.resolver.getSatisfying(n,r,s,a)}async resolve(e,r){let s=Bw(e),a=await r.resolver.resolve(s,r);return{...a,...KW(a)}}};var bgt=[\"dependencies\",\"devDependencies\",\"peerDependencies\"];function Pgt(t,e){for(let r of bgt)for(let s of t.manifest.getForScope(r).values()){if(!s.range.startsWith(\"jsr:\"))continue;let a=ww(s),n=r===\"dependencies\"?G.makeDescriptor(s,\"unknown\"):null,c=n!==null&&t.manifest.ensureDependencyMeta(n).optional?\"optionalDependencies\":r;e[c][G.stringifyIdent(s)]=a.range}}var xgt={hooks:{beforeWorkspacePacking:Pgt},resolvers:[tN],fetchers:[eN]},kgt=xgt;var XW={};Vt(XW,{LinkFetcher:()=>vD,LinkResolver:()=>SD,PortalFetcher:()=>DD,PortalResolver:()=>bD,default:()=>Tgt});Ge();Dt();var rh=\"portal:\",nh=\"link:\";var vD=class{supports(e,r){return!!e.reference.startsWith(nh)}getLocalPath(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:nh});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:nh}),n=J.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,n.localPath),localPath:vt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=J.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Sn(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,discardFromLookup:!0,localPath:p}:{packageFs:new Hf(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,discardFromLookup:!0}}};Ge();Dt();var SD=class{supportsDescriptor(e,r){return!!e.range.startsWith(nh)}supportsLocator(e,r){return!!e.reference.startsWith(nh)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(nh.length);return[G.makeLocator(e,`${nh}${fe.toPortablePath(a)}`)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){return{...e,version:\"0.0.0\",languageName:r.project.configuration.get(\"defaultLanguageName\"),linkType:\"SOFT\",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};Ge();Dt();var DD=class{supports(e,r){return!!e.reference.startsWith(rh)}getLocalPath(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:rh});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:rh}),n=J.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,n.localPath),localPath:vt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=J.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Sn(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,localPath:p}:{packageFs:new Hf(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot}}};Ge();Ge();Dt();var bD=class{supportsDescriptor(e,r){return!!e.range.startsWith(rh)}supportsLocator(e,r){return!!e.reference.startsWith(rh)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(rh.length);return[G.makeLocator(e,`${rh}${fe.toPortablePath(a)}`)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ut.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||\"0.0.0\",languageName:a.languageName||r.project.configuration.get(\"defaultLanguageName\"),linkType:\"SOFT\",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var Qgt={fetchers:[vD,DD],resolvers:[SD,bD]},Tgt=Qgt;var FY={};Vt(FY,{NodeModulesLinker:()=>jD,NodeModulesMode:()=>kY,PnpLooseLinker:()=>GD,default:()=>Kdt});Dt();Ge();Dt();Dt();var $W=(t,e)=>`${t}@${e}`,H2e=(t,e)=>{let r=e.indexOf(\"#\"),s=r>=0?e.substring(r+1):e;return $W(t,s)};var G2e=(t,e={})=>{let r=e.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),s=e.check||r>=9,a=e.hoistingLimits||new Map,n={check:s,debugLevel:r,hoistingLimits:a,fastLookupPossible:!0},c;n.debugLevel>=0&&(c=Date.now());let f=Ugt(t,n),p=!1,h=0;do{let E=eY(f,[f],new Set([f.locator]),new Map,n);p=E.anotherRoundNeeded||E.isGraphChanged,n.fastLookupPossible=!1,h++}while(p);if(n.debugLevel>=0&&console.log(`hoist time: ${Date.now()-c}ms, rounds: ${h}`),n.debugLevel>=1){let E=PD(f);if(eY(f,[f],new Set([f.locator]),new Map,n).isGraphChanged)throw new Error(`The hoisting result is not terminal, prev tree:\n${E}, next tree:\n${PD(f)}`);let S=q2e(f);if(S)throw new Error(`${S}, after hoisting finished:\n${PD(f)}`)}return n.debugLevel>=2&&console.log(PD(f)),_gt(f)},Rgt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=n=>{if(!s.has(n)){s.add(n);for(let c of n.hoistedDependencies.values())r.set(c.name,c);for(let c of n.dependencies.values())n.peerNames.has(c.name)||a(c)}};return a(e),r},Fgt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=new Set,n=(c,f)=>{if(s.has(c))return;s.add(c);for(let h of c.hoistedDependencies.values())if(!f.has(h.name)){let E;for(let C of t)E=C.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of c.dependencies.values())p.add(h.name);for(let h of c.dependencies.values())c.peerNames.has(h.name)||n(h,p)};return n(e,a),r},j2e=(t,e)=>{if(e.decoupled)return e;let{name:r,references:s,ident:a,locator:n,dependencies:c,originalDependencies:f,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:C,hoistPriority:S,dependencyKind:P,hoistedFrom:I,hoistedTo:R}=e,N={name:r,references:new Set(s),ident:a,locator:n,dependencies:new Map(c),originalDependencies:new Map(f),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:C,hoistPriority:S,dependencyKind:P,hoistedFrom:new Map(I),hoistedTo:new Map(R)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),t.dependencies.set(N.name,N),N},Ngt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let s=Array.from(e.keys());s.sort((a,n)=>{let c=e.get(a),f=e.get(n);if(f.hoistPriority!==c.hoistPriority)return f.hoistPriority-c.hoistPriority;{let p=c.dependents.size+c.peerDependents.size;return f.dependents.size+f.peerDependents.size-p}});for(let a of s){let n=a.substring(0,a.indexOf(\"@\",1)),c=a.substring(n.length+1);if(!t.peerNames.has(n)){let f=r.get(n);f||(f=[],r.set(n,f)),f.indexOf(c)<0&&f.push(c)}}return r},ZW=t=>{let e=new Set,r=(s,a=new Set)=>{if(!a.has(s)){a.add(s);for(let n of s.peerNames)if(!t.peerNames.has(n)){let c=t.dependencies.get(n);c&&!e.has(c)&&r(c,a)}e.add(s)}};for(let s of t.dependencies.values())t.peerNames.has(s.name)||r(s);return e},eY=(t,e,r,s,a,n=new Set)=>{let c=e[e.length-1];if(n.has(c))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(c);let f=Hgt(c),p=Ngt(c,f),h=t==c?new Map:a.fastLookupPossible?Rgt(e):Fgt(e),E,C=!1,S=!1,P=new Map(Array.from(p.entries()).map(([R,N])=>[R,N[0]])),I=new Map;do{let R=Mgt(t,e,r,h,P,p,s,I,a);R.isGraphChanged&&(S=!0),R.anotherRoundNeeded&&(C=!0),E=!1;for(let[N,U]of p)U.length>1&&!c.dependencies.has(N)&&(P.delete(N),U.shift(),P.set(N,U[0]),E=!0)}while(E);for(let R of c.dependencies.values())if(!c.peerNames.has(R.name)&&!r.has(R.locator)){r.add(R.locator);let N=eY(t,[...e,R],r,I,a);N.isGraphChanged&&(S=!0),N.anotherRoundNeeded&&(C=!0),r.delete(R.locator)}return{anotherRoundNeeded:C,isGraphChanged:S}},Ogt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},Lgt=(t,e,r,s,a,n,c,f,{outputReason:p,fastLookupPossible:h})=>{let E,C=null,S=new Set;p&&(E=`${Array.from(e).map(N=>yo(N)).join(\"\\u2192\")}`);let P=r[r.length-1],R=!(s.ident===P.ident);if(p&&!R&&(C=\"- self-reference\"),R&&(R=s.dependencyKind!==1,p&&!R&&(C=\"- workspace\")),R&&s.dependencyKind===2&&(R=!Ogt(s),p&&!R&&(C=\"- external soft link with unhoisted dependencies\")),R&&(R=!t.peerNames.has(s.name),p&&!R&&(C=`- cannot shadow peer: ${yo(t.originalDependencies.get(s.name).locator)} at ${E}`)),R){let N=!1,U=a.get(s.name);if(N=!U||U.ident===s.ident,p&&!N&&(C=`- filled by: ${yo(U.locator)} at ${E}`),N)for(let W=r.length-1;W>=1;W--){let ie=r[W].dependencies.get(s.name);if(ie&&ie.ident!==s.ident){N=!1;let ue=f.get(P);ue||(ue=new Set,f.set(P,ue)),ue.add(s.name),p&&(C=`- filled by ${yo(ie.locator)} at ${r.slice(0,W).map(le=>yo(le.locator)).join(\"\\u2192\")}`);break}}R=N}if(R&&(R=n.get(s.name)===s.ident,p&&!R&&(C=`- filled by: ${yo(c.get(s.name)[0])} at ${E}`)),R){let N=!0,U=new Set(s.peerNames);for(let W=r.length-1;W>=1;W--){let ee=r[W];for(let ie of U){if(ee.peerNames.has(ie)&&ee.originalDependencies.has(ie))continue;let ue=ee.dependencies.get(ie);ue&&t.dependencies.get(ie)!==ue&&(W===r.length-1?S.add(ue):(S=null,N=!1,p&&(C=`- peer dependency ${yo(ue.locator)} from parent ${yo(ee.locator)} was not hoisted to ${E}`))),U.delete(ie)}if(!N)break}R=N}if(R&&!h)for(let N of s.hoistedDependencies.values()){let U=a.get(N.name)||t.dependencies.get(N.name);if(!U||N.ident!==U.ident){R=!1,p&&(C=`- previously hoisted dependency mismatch, needed: ${yo(N.locator)}, available: ${yo(U?.locator)}`);break}}return S!==null&&S.size>0?{isHoistable:2,dependsOn:S,reason:C}:{isHoistable:R?0:1,reason:C}},rN=t=>`${t.name}@${t.locator}`,Mgt=(t,e,r,s,a,n,c,f,p)=>{let h=e[e.length-1],E=new Set,C=!1,S=!1,P=(U,W,ee,ie,ue)=>{if(E.has(ie))return;let le=[...W,rN(ie)],me=[...ee,rN(ie)],pe=new Map,Be=new Map;for(let Ae of ZW(ie)){let se=Lgt(h,r,[h,...U,ie],Ae,s,a,n,f,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(Be.set(Ae,se),se.isHoistable===2)for(let Z of se.dependsOn){let De=pe.get(Z.name)||new Set;De.add(Ae.name),pe.set(Z.name,De)}}let Ce=new Set,g=(Ae,se,Z)=>{if(!Ce.has(Ae)){Ce.add(Ae),Be.set(Ae,{isHoistable:1,reason:Z});for(let De of pe.get(Ae.name)||[])g(ie.dependencies.get(De),se,p.debugLevel>=2?`- peer dependency ${yo(Ae.locator)} from parent ${yo(ie.locator)} was not hoisted`:\"\")}};for(let[Ae,se]of Be)se.isHoistable===1&&g(Ae,se,se.reason);let we=!1;for(let Ae of Be.keys())if(!Ce.has(Ae)){S=!0;let se=c.get(ie);se&&se.has(Ae.name)&&(C=!0),we=!0,ie.dependencies.delete(Ae.name),ie.hoistedDependencies.set(Ae.name,Ae),ie.reasons.delete(Ae.name);let Z=h.dependencies.get(Ae.name);if(p.debugLevel>=2){let De=Array.from(W).concat([ie.locator]).map(mt=>yo(mt)).join(\"\\u2192\"),Re=h.hoistedFrom.get(Ae.name);Re||(Re=[],h.hoistedFrom.set(Ae.name,Re)),Re.push(De),ie.hoistedTo.set(Ae.name,Array.from(e).map(mt=>yo(mt.locator)).join(\"\\u2192\"))}if(!Z)h.ident!==Ae.ident&&(h.dependencies.set(Ae.name,Ae),ue.add(Ae));else for(let De of Ae.references)Z.references.add(De)}if(ie.dependencyKind===2&&we&&(C=!0),p.check){let Ae=q2e(t);if(Ae)throw new Error(`${Ae}, after hoisting dependencies of ${[h,...U,ie].map(se=>yo(se.locator)).join(\"\\u2192\")}:\n${PD(t)}`)}let ye=ZW(ie);for(let Ae of ye)if(Ce.has(Ae)){let se=Be.get(Ae);if((a.get(Ae.name)===Ae.ident||!ie.reasons.has(Ae.name))&&se.isHoistable!==0&&ie.reasons.set(Ae.name,se.reason),!Ae.isHoistBorder&&me.indexOf(rN(Ae))<0){E.add(ie);let De=j2e(ie,Ae);P([...U,ie],le,me,De,R),E.delete(ie)}}},I,R=new Set(ZW(h)),N=Array.from(e).map(U=>rN(U));do{I=R,R=new Set;for(let U of I){if(U.locator===h.locator||U.isHoistBorder)continue;let W=j2e(h,U);P([],Array.from(r),N,W,R)}}while(R.size>0);return{anotherRoundNeeded:C,isGraphChanged:S}},q2e=t=>{let e=[],r=new Set,s=new Set,a=(n,c,f)=>{if(r.has(n)||(r.add(n),s.has(n)))return;let p=new Map(c);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),C=()=>`${Array.from(s).concat([n]).map(S=>yo(S.locator)).join(\"\\u2192\")}`;if(n.peerNames.has(h.name)){let S=c.get(h.name);(S!==E||!S||S.ident!==h.ident)&&e.push(`${C()} - broken peer promise: expected ${h.ident} but found ${S&&S.ident}`)}else{let S=f.hoistedFrom.get(n.name),P=n.hoistedTo.get(h.name),I=`${S?` hoisted from ${S.join(\", \")}`:\"\"}`,R=`${P?` hoisted to ${P}`:\"\"}`,N=`${C()}${I}`;E?E.ident!==h.ident&&e.push(`${N} - broken require promise for ${h.name}${R}: expected ${h.ident}, but found: ${E.ident}`):e.push(`${N} - broken require promise: no required dependency ${h.name}${R} found`)}}s.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);s.delete(n)};return a(t,t.dependencies,t),e.join(`\n`)},Ugt=(t,e)=>{let{identName:r,name:s,reference:a,peerNames:n}=t,c={name:s,references:new Set([a]),locator:$W(r,a),ident:H2e(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},f=new Map([[t,c]]),p=(h,E)=>{let C=f.get(h),S=!!C;if(!C){let{name:P,identName:I,reference:R,peerNames:N,hoistPriority:U,dependencyKind:W}=h,ee=e.hoistingLimits.get(E.locator);C={name:P,references:new Set([R]),locator:$W(I,R),ident:H2e(I,R),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:ee?ee.has(P):!1,hoistPriority:U||0,dependencyKind:W||0,hoistedFrom:new Map,hoistedTo:new Map},f.set(h,C)}if(E.dependencies.set(h.name,C),E.originalDependencies.set(h.name,C),S){let P=new Set,I=R=>{if(!P.has(R)){P.add(R),R.decoupled=!1;for(let N of R.dependencies.values())R.peerNames.has(N.name)||I(N)}};I(C)}else for(let P of h.dependencies)p(P,C)};for(let h of t.dependencies)p(h,c);return c},tY=t=>t.substring(0,t.indexOf(\"@\",1)),_gt=t=>{let e={name:t.name,identName:tY(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),s=(a,n,c)=>{let f=r.has(a),p;if(n===a)p=c;else{let{name:h,references:E,locator:C}=a;p={name:h,identName:tY(C),references:E,dependencies:new Set}}if(c.dependencies.add(p),!f){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||s(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())s(a,t,e);return e},Hgt=t=>{let e=new Map,r=new Set([t]),s=c=>`${c.name}@${c.ident}`,a=c=>{let f=s(c),p=e.get(f);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(f,p)),p},n=(c,f)=>{let p=!!r.has(f);if(a(f).dependents.add(c.ident),!p){r.add(f);for(let E of f.dependencies.values()){let C=a(E);C.hoistPriority=Math.max(C.hoistPriority,E.hoistPriority),f.peerNames.has(E.name)?C.peerDependents.add(f.ident):n(f,E)}}};for(let c of t.dependencies.values())t.peerNames.has(c.name)||n(t,c);return e},yo=t=>{if(!t)return\"none\";let e=t.indexOf(\"@\",1),r=t.substring(0,e);r.endsWith(\"$wsroot$\")&&(r=`wh:${r.replace(\"$wsroot$\",\"\")}`);let s=t.substring(e+1);if(s===\"workspace:.\")return\".\";if(s){let a=(s.indexOf(\"#\")>0?s.split(\"#\")[1]:s).replace(\"npm:\",\"\");return s.startsWith(\"virtual\")&&(r=`v:${r}`),a.startsWith(\"workspace\")&&(r=`w:${r}`,a=\"\"),`${r}${a?`@${a}`:\"\"}`}else return`${r}`};var PD=t=>{let e=0,r=(a,n,c=\"\")=>{if(e>5e4||n.has(a))return\"\";e++;let f=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p=\"\";n.add(a);for(let h=0;h<f.length;h++){let E=f[h];if(!a.peerNames.has(E.name)&&E!==a){let C=a.reasons.get(E.name),S=tY(E.locator);p+=`${c}${h<f.length-1?\"\\u251C\\u2500\":\"\\u2514\\u2500\"}${(n.has(E)?\">\":\"\")+(S!==E.name?`a:${E.name}:`:\"\")+yo(E.locator)+(C?` ${C}`:\"\")}\n`,p+=r(E,n,`${c}${h<f.length-1?\"\\u2502 \":\"  \"}`)}}return n.delete(a),p};return r(t,new Set)+(e>5e4?`\nTree is too large, part of the tree has been dunped\n`:\"\")};var xD=(s=>(s.WORKSPACES=\"workspaces\",s.DEPENDENCIES=\"dependencies\",s.NONE=\"none\",s))(xD||{}),W2e=\"node_modules\",rg=\"$wsroot$\";var kD=(t,e)=>{let{packageTree:r,hoistingLimits:s,errors:a,preserveSymlinksRequired:n}=Ggt(t,e),c=null;if(a.length===0){let f=G2e(r,{hoistingLimits:s});c=Wgt(t,f,e)}return{tree:c,errors:a,preserveSymlinksRequired:n}},pA=t=>`${t.name}@${t.reference}`,nY=t=>{let e=new Map;for(let[r,s]of t.entries())if(!s.dirList){let a=e.get(s.locator);a||(a={target:s.target,linkType:s.linkType,locations:[],aliases:s.aliases},e.set(s.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((s,a)=>{let n=s.split(J.delimiter).length,c=a.split(J.delimiter).length;return a===s?0:n!==c?c-n:a>s?1:-1});return e},Y2e=(t,e)=>{let r=G.isVirtualLocator(t)?G.devirtualizeLocator(t):t,s=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e;return G.areLocatorsEqual(r,s)},rY=(t,e,r,s)=>{if(t.linkType!==\"SOFT\")return!1;let a=fe.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith(\"virtual:\")?r.resolveVirtual(t.packageLocation):t.packageLocation);return J.contains(s,a)===null},jgt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error(\"Assertion failed: Expected the top-level package to have been registered\");if(t.findPackageLocator(e.packageLocation)===null)throw new Error(\"Assertion failed: Expected the top-level package to have a physical locator\");let s=fe.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},c=t.getDependencyTreeRoots(),f=new Map,p=new Set,h=(S,P)=>{let I=pA(S);if(p.has(I))return;p.add(I);let R=t.getPackageInformation(S);if(R){let N=P?pA(P):\"\";if(pA(S)!==N&&R.linkType===\"SOFT\"&&!S.reference.startsWith(\"link:\")&&!rY(R,S,t,s)){let U=V2e(R,S,t);(!f.get(U)||S.reference.startsWith(\"workspace:\"))&&f.set(U,S)}for(let[U,W]of R.packageDependencies)W!==null&&(R.packagePeers.has(U)||h(t.getLocator(U,W),S))}};for(let S of c)h(S,null);let E=s.split(J.sep);for(let S of f.values()){let P=t.getPackageInformation(S),R=fe.toPortablePath(P.packageLocation.slice(0,-1)).split(J.sep).slice(E.length),N=n;for(let U of R){let W=N.children.get(U);W||(W={children:new Map},N.children.set(U,W)),N=W}N.workspaceLocator=S}let C=(S,P)=>{if(S.workspaceLocator){let I=pA(P),R=a.get(I);R||(R=new Set,a.set(I,R)),R.add(S.workspaceLocator)}for(let I of S.children.values())C(I,S.workspaceLocator||P)};for(let S of n.children.values())C(S,n.workspaceLocator);return a},Ggt=(t,e)=>{let r=[],s=!1,a=new Map,n=jgt(t),c=t.getPackageInformation(t.topLevel);if(c===null)throw new Error(\"Assertion failed: Expected the top-level package to have been registered\");let f=t.findPackageLocator(c.packageLocation);if(f===null)throw new Error(\"Assertion failed: Expected the top-level package to have a physical locator\");let p=fe.toPortablePath(c.packageLocation.slice(0,-1)),h={name:f.name,identName:f.name,reference:f.reference,peerNames:c.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,C=(P,I)=>`${pA(I)}:${P}`,S=(P,I,R,N,U,W,ee,ie)=>{let ue=C(P,R),le=E.get(ue),me=!!le;!me&&R.name===f.name&&R.reference===f.reference&&(le=h,E.set(ue,h));let pe=rY(I,R,t,p);if(!le){let Ae=0;pe?Ae=2:I.linkType===\"SOFT\"&&R.name.endsWith(rg)&&(Ae=1),le={name:P,identName:R.name,reference:R.reference,dependencies:new Set,peerNames:Ae===1?new Set:I.packagePeers,dependencyKind:Ae},E.set(ue,le)}let Be;if(pe?Be=2:U.linkType===\"SOFT\"?Be=1:Be=0,le.hoistPriority=Math.max(le.hoistPriority||0,Be),ie&&!pe){let Ae=pA({name:N.identName,reference:N.reference}),se=a.get(Ae)||new Set;a.set(Ae,se),se.add(le.name)}let Ce=new Map(I.packageDependencies);if(e.project){let Ae=e.project.workspacesByCwd.get(fe.toPortablePath(I.packageLocation.slice(0,-1)));if(Ae){let se=new Set([...Array.from(Ae.manifest.peerDependencies.values(),Z=>G.stringifyIdent(Z)),...Array.from(Ae.manifest.peerDependenciesMeta.keys())]);for(let Z of se)Ce.has(Z)||(Ce.set(Z,W.get(Z)||null),le.peerNames.add(Z))}}let g=pA({name:R.name.replace(rg,\"\"),reference:R.reference}),we=n.get(g);if(we)for(let Ae of we)Ce.set(`${Ae.name}${rg}`,Ae.reference);(I!==U||I.linkType!==\"SOFT\"||!pe&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(ee)))&&N.dependencies.add(le);let ye=R!==f&&I.linkType===\"SOFT\"&&!R.name.endsWith(rg)&&!pe;if(!me&&!ye){let Ae=new Map;for(let[se,Z]of Ce)if(Z!==null){let De=t.getLocator(se,Z),Re=t.getLocator(se.replace(rg,\"\"),Z),mt=t.getPackageInformation(Re);if(mt===null)throw new Error(\"Assertion failed: Expected the package to have been registered\");let j=rY(mt,De,t,p);if(e.validateExternalSoftLinks&&e.project&&j){mt.packageDependencies.size>0&&(s=!0);for(let[Ve,ke]of mt.packageDependencies)if(ke!==null){let it=G.parseLocator(Array.isArray(ke)?`${ke[0]}@${ke[1]}`:`${Ve}@${ke}`);if(pA(it)!==pA(De)){let Ue=Ce.get(Ve);if(Ue){let x=G.parseLocator(Array.isArray(Ue)?`${Ue[0]}@${Ue[1]}`:`${Ve}@${Ue}`);Y2e(x,it)||r.push({messageName:71,text:`Cannot link ${G.prettyIdent(e.project.configuration,G.parseIdent(De.name))} into ${G.prettyLocator(e.project.configuration,G.parseLocator(`${R.name}@${R.reference}`))} dependency ${G.prettyLocator(e.project.configuration,it)} conflicts with parent dependency ${G.prettyLocator(e.project.configuration,x)}`})}else{let x=Ae.get(Ve);if(x){let w=x.target,b=G.parseLocator(Array.isArray(w)?`${w[0]}@${w[1]}`:`${Ve}@${w}`);Y2e(b,it)||r.push({messageName:71,text:`Cannot link ${G.prettyIdent(e.project.configuration,G.parseIdent(De.name))} into ${G.prettyLocator(e.project.configuration,G.parseLocator(`${R.name}@${R.reference}`))} dependency ${G.prettyLocator(e.project.configuration,it)} conflicts with dependency ${G.prettyLocator(e.project.configuration,b)} from sibling portal ${G.prettyIdent(e.project.configuration,G.parseIdent(x.portal.name))}`})}else Ae.set(Ve,{target:it.reference,portal:De})}}}}let rt=e.hoistingLimitsByCwd?.get(ee),Fe=j?ee:J.relative(p,fe.toPortablePath(mt.packageLocation))||vt.dot,Ne=e.hoistingLimitsByCwd?.get(Fe);S(se,mt,De,le,I,Ce,Fe,rt===\"dependencies\"||Ne===\"dependencies\"||Ne===\"workspaces\")}}};return S(f.name,c,f,h,c,c.packageDependencies,vt.dot,!1),{packageTree:h,hoistingLimits:a,errors:r,preserveSymlinksRequired:s}};function V2e(t,e,r){let s=r.resolveVirtual&&e.reference&&e.reference.startsWith(\"virtual:\")?r.resolveVirtual(t.packageLocation):t.packageLocation;return fe.toPortablePath(s||t.packageLocation)}function qgt(t,e,r){let s=e.getLocator(t.name.replace(rg,\"\"),t.reference),a=e.getPackageInformation(s);if(a===null)throw new Error(\"Assertion failed: Expected the package to be registered\");return r.pnpifyFs?{linkType:\"SOFT\",target:fe.toPortablePath(a.packageLocation)}:{linkType:a.linkType,target:V2e(a,t,e)}}var Wgt=(t,e,r)=>{let s=new Map,a=(E,C,S)=>{let{linkType:P,target:I}=qgt(E,t,r);return{locator:pA(E),nodePath:C,target:I,linkType:P,aliases:S}},n=E=>{let[C,S]=E.split(\"/\");return S?{scope:C,name:S}:{scope:null,name:C}},c=new Set,f=(E,C,S)=>{if(c.has(E))return;c.add(E);let P=Array.from(E.references).sort().join(\"#\");for(let I of E.dependencies){let R=Array.from(I.references).sort().join(\"#\");if(I.identName===E.identName.replace(rg,\"\")&&R===P)continue;let N=Array.from(I.references).sort(),U={name:I.identName,reference:N[0]},{name:W,scope:ee}=n(I.name),ie=ee?[ee,W]:[W],ue=J.join(C,W2e),le=J.join(ue,...ie),me=`${S}/${U.name}`,pe=a(U,S,N.slice(1)),Be=!1;if(pe.linkType===\"SOFT\"&&r.project){let Ce=r.project.workspacesByCwd.get(pe.target.slice(0,-1));Be=!!(Ce&&!Ce.manifest.name)}if(!I.name.endsWith(rg)&&!Be){let Ce=s.get(le);if(Ce){if(Ce.dirList)throw new Error(`Assertion failed: ${le} cannot merge dir node with leaf node`);{let ye=G.parseLocator(Ce.locator),Ae=G.parseLocator(pe.locator);if(Ce.linkType!==pe.linkType)throw new Error(`Assertion failed: ${le} cannot merge nodes with different link types ${Ce.nodePath}/${G.stringifyLocator(ye)} and ${S}/${G.stringifyLocator(Ae)}`);if(ye.identHash!==Ae.identHash)throw new Error(`Assertion failed: ${le} cannot merge nodes with different idents ${Ce.nodePath}/${G.stringifyLocator(ye)} and ${S}/s${G.stringifyLocator(Ae)}`);pe.aliases=[...pe.aliases,...Ce.aliases,G.parseLocator(Ce.locator).reference]}}s.set(le,pe);let g=le.split(\"/\"),we=g.indexOf(W2e);for(let ye=g.length-1;we>=0&&ye>we;ye--){let Ae=fe.toPortablePath(g.slice(0,ye).join(J.sep)),se=g[ye],Z=s.get(Ae);if(!Z)s.set(Ae,{dirList:new Set([se])});else if(Z.dirList){if(Z.dirList.has(se))break;Z.dirList.add(se)}}}f(I,pe.linkType===\"SOFT\"?pe.target:le,me)}},p=a({name:e.name,reference:Array.from(e.references)[0]},\"\",[]),h=p.target;return s.set(h,p),f(e,h,\"\"),s};Ge();Ge();Dt();Dt();eA();wc();var wY={};Vt(wY,{PnpInstaller:()=>Gm,PnpLinker:()=>sg,UnplugCommand:()=>Sw,default:()=>Cdt,getPnpPath:()=>og,jsInstallUtils:()=>gA,pnpUtils:()=>HD,quotePathIfNeeded:()=>QBe});Dt();var kBe=Ie(\"url\");Ge();Ge();Dt();Dt();var J2e={DEFAULT:{collapsed:!1,next:{\"*\":\"DEFAULT\"}},TOP_LEVEL:{collapsed:!1,next:{fallbackExclusionList:\"FALLBACK_EXCLUSION_LIST\",packageRegistryData:\"PACKAGE_REGISTRY_DATA\",\"*\":\"DEFAULT\"}},FALLBACK_EXCLUSION_LIST:{collapsed:!1,next:{\"*\":\"FALLBACK_EXCLUSION_ENTRIES\"}},FALLBACK_EXCLUSION_ENTRIES:{collapsed:!0,next:{\"*\":\"FALLBACK_EXCLUSION_DATA\"}},FALLBACK_EXCLUSION_DATA:{collapsed:!0,next:{\"*\":\"DEFAULT\"}},PACKAGE_REGISTRY_DATA:{collapsed:!1,next:{\"*\":\"PACKAGE_REGISTRY_ENTRIES\"}},PACKAGE_REGISTRY_ENTRIES:{collapsed:!0,next:{\"*\":\"PACKAGE_STORE_DATA\"}},PACKAGE_STORE_DATA:{collapsed:!1,next:{\"*\":\"PACKAGE_STORE_ENTRIES\"}},PACKAGE_STORE_ENTRIES:{collapsed:!0,next:{\"*\":\"PACKAGE_INFORMATION_DATA\"}},PACKAGE_INFORMATION_DATA:{collapsed:!1,next:{packageDependencies:\"PACKAGE_DEPENDENCIES\",\"*\":\"DEFAULT\"}},PACKAGE_DEPENDENCIES:{collapsed:!1,next:{\"*\":\"PACKAGE_DEPENDENCY\"}},PACKAGE_DEPENDENCY:{collapsed:!0,next:{\"*\":\"DEFAULT\"}}};function Ygt(t,e,r){let s=\"\";s+=\"[\";for(let a=0,n=t.length;a<n;++a)s+=nN(String(a),t[a],e,r).replace(/^ +/g,\"\"),a+1<n&&(s+=\", \");return s+=\"]\",s}function Vgt(t,e,r){let s=`${r}  `,a=\"\";a+=r,a+=`[\n`;for(let n=0,c=t.length;n<c;++n)a+=s+nN(String(n),t[n],e,s).replace(/^ +/,\"\"),n+1<c&&(a+=\",\"),a+=`\n`;return a+=r,a+=\"]\",a}function Jgt(t,e,r){let s=Object.keys(t),a=\"\";a+=\"{\";for(let n=0,c=s.length,f=0;n<c;++n){let p=s[n],h=t[p];typeof h>\"u\"||(f!==0&&(a+=\", \"),a+=JSON.stringify(p),a+=\": \",a+=nN(p,h,e,r).replace(/^ +/g,\"\"),f+=1)}return a+=\"}\",a}function Kgt(t,e,r){let s=Object.keys(t),a=`${r}  `,n=\"\";n+=r,n+=`{\n`;let c=0;for(let f=0,p=s.length;f<p;++f){let h=s[f],E=t[h];typeof E>\"u\"||(c!==0&&(n+=\",\",n+=`\n`),n+=a,n+=JSON.stringify(h),n+=\": \",n+=nN(h,E,e,a).replace(/^ +/g,\"\"),c+=1)}return c!==0&&(n+=`\n`),n+=r,n+=\"}\",n}function nN(t,e,r,s){let{next:a}=J2e[r],n=a[t]||a[\"*\"];return K2e(e,n,s)}function K2e(t,e,r){let{collapsed:s}=J2e[e];return Array.isArray(t)?s?Ygt(t,e,r):Vgt(t,e,r):typeof t==\"object\"&&t!==null?s?Jgt(t,e,r):Kgt(t,e,r):JSON.stringify(t)}function z2e(t){return K2e(t,\"TOP_LEVEL\",\"\")}function QD(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]<f[c]?-1:f[n]>f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function zgt(t){let e=new Map,r=QD(t.fallbackExclusionList||[],[({name:s,reference:a})=>s,({name:s,reference:a})=>a]);for(let{name:s,reference:a}of r){let n=e.get(s);typeof n>\"u\"&&e.set(s,n=new Set),n.add(a)}return Array.from(e).map(([s,a])=>[s,Array.from(a)])}function Xgt(t){return QD(t.fallbackPool||[],([e])=>e)}function Zgt(t){let e=[],r=t.dependencyTreeRoots.find(s=>t.packageRegistry.get(s.name)?.get(s.reference)?.packageLocation===\"./\");for(let[s,a]of QD(t.packageRegistry,([n])=>n===null?\"0\":`1${n}`)){if(s===null)continue;let n=[];e.push([s,n]);for(let[c,{packageLocation:f,packageDependencies:p,packagePeers:h,linkType:E,discardFromLookup:C}]of QD(a,([S])=>S===null?\"0\":`1${S}`)){if(c===null)continue;let S=[];s!==null&&c!==null&&!p.has(s)&&S.push([s,c]);for(let[U,W]of p)S.push([U,W]);let P=QD(S,([U])=>U),I=h&&h.size>0?Array.from(h):void 0,N={packageLocation:f,packageDependencies:P,packagePeers:I,linkType:E,discardFromLookup:C||void 0};n.push([c,N]),r&&s===r.name&&c===r.reference&&e.unshift([null,[[null,N]]])}}return e}function TD(t){return{__info:[\"This file is automatically generated. Do not touch it, or risk\",\"your modifications being lost.\"],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,pnpZipBackend:t.pnpZipBackend,fallbackExclusionList:zgt(t),fallbackPool:Xgt(t),packageRegistryData:Zgt(t)}}var $2e=ut(Z2e());function eBe(t,e){return[t?`${t}\n`:\"\",`/* eslint-disable */\n`,`// @ts-nocheck\n`,`\"use strict\";\n`,`\n`,e,`\n`,(0,$2e.default)()].join(\"\")}function $gt(t){return JSON.stringify(t,null,2)}function edt(t){return`'${t.replace(/\\\\/g,\"\\\\\\\\\").replace(/'/g,\"\\\\'\").replace(/\\n/g,`\\\\\n`)}'`}function tdt(t){return[`const RAW_RUNTIME_STATE =\n`,`${edt(z2e(t))};\n\n`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {\n`,`  return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});\n`,`}\n`].join(\"\")}function rdt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {\n`,`  const fs = require('fs');\n`,`  const path = require('path');\n`,`  const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(Er.pnpData)});\n`,`  return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname});\n`,`}\n`].join(\"\")}function tBe(t){let e=TD(t),r=tdt(e);return eBe(t.shebang,r)}function rBe(t){let e=TD(t),r=rdt(),s=eBe(t.shebang,r);return{dataFile:$gt(e),loaderFile:s}}Dt();function sY(t,{basePath:e}){let r=fe.toPortablePath(e),s=J.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,c=new Map(t.packageRegistryData.map(([C,S])=>[C,new Map(S.map(([P,I])=>{if(C===null!=(P===null))throw new Error(\"Assertion failed: The name and reference should be null, or neither should\");let R=I.discardFromLookup??!1,N={name:C,reference:P},U=n.get(I.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&R,R||(U.locator=N)):n.set(I.packageLocation,{locator:N,discardFromLookup:R});let W=null;return[P,{packageDependencies:new Map(I.packageDependencies),packagePeers:new Set(I.packagePeers),linkType:I.linkType,discardFromLookup:R,get packageLocation(){return W||(W=J.join(s,I.packageLocation))}}]}))])),f=new Map(t.fallbackExclusionList.map(([C,S])=>[C,new Set(S)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,E=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:f,pnpZipBackend:t.pnpZipBackend,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:c}}Dt();Dt();var sh=Ie(\"module\"),jm=Ie(\"url\"),gY=Ie(\"util\");var ta=Ie(\"url\");var oBe=ut(Ie(\"assert\"));var oY=Array.isArray,RD=JSON.stringify,FD=Object.getOwnPropertyNames,Hm=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),aY=(t,e)=>RegExp.prototype.exec.call(t,e),lY=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),ng=(t,...e)=>String.prototype.endsWith.apply(t,e),cY=(t,...e)=>String.prototype.includes.apply(t,e),uY=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),ND=(t,...e)=>String.prototype.indexOf.apply(t,e),nBe=(t,...e)=>String.prototype.replace.apply(t,e),ig=(t,...e)=>String.prototype.slice.apply(t,e),hA=(t,...e)=>String.prototype.startsWith.apply(t,e),iBe=Map,sBe=JSON.parse;function OD(t,e,r){return class extends r{constructor(...s){super(e(...s)),this.code=t,this.name=`${r.name} [${t}]`}}}var aBe=OD(\"ERR_PACKAGE_IMPORT_NOT_DEFINED\",(t,e,r)=>`Package import specifier \"${t}\" is not defined${e?` in package ${e}package.json`:\"\"} imported from ${r}`,TypeError),fY=OD(\"ERR_INVALID_MODULE_SPECIFIER\",(t,e,r=void 0)=>`Invalid module \"${t}\" ${e}${r?` imported from ${r}`:\"\"}`,TypeError),lBe=OD(\"ERR_INVALID_PACKAGE_TARGET\",(t,e,r,s=!1,a=void 0)=>{let n=typeof r==\"string\"&&!s&&r.length&&!hA(r,\"./\");return e===\".\"?((0,oBe.default)(s===!1),`Invalid \"exports\" main target ${RD(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:\"\"}${n?'; targets must start with \"./\"':\"\"}`):`Invalid \"${s?\"imports\":\"exports\"}\" target ${RD(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:\"\"}${n?'; targets must start with \"./\"':\"\"}`},Error),LD=OD(\"ERR_INVALID_PACKAGE_CONFIG\",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:\"\"}${r?`. ${r}`:\"\"}`,Error),cBe=OD(\"ERR_PACKAGE_PATH_NOT_EXPORTED\",(t,e,r=void 0)=>e===\".\"?`No \"exports\" main defined in ${t}package.json${r?` imported from ${r}`:\"\"}`:`Package subpath '${e}' is not defined by \"exports\" in ${t}package.json${r?` imported from ${r}`:\"\"}`,Error);var sN=Ie(\"url\");function uBe(t,e){let r=Object.create(null);for(let s=0;s<e.length;s++){let a=e[s];Hm(t,a)&&(r[a]=t[a])}return r}var iN=new iBe;function ndt(t,e,r,s){let a=iN.get(t);if(a!==void 0)return a;let n=s(t);if(n===void 0){let P={pjsonPath:t,exists:!1,main:void 0,name:void 0,type:\"none\",exports:void 0,imports:void 0};return iN.set(t,P),P}let c;try{c=sBe(n)}catch(P){throw new LD(t,(r?`\"${e}\" from `:\"\")+(0,sN.fileURLToPath)(r||e),P.message)}let{imports:f,main:p,name:h,type:E}=uBe(c,[\"imports\",\"main\",\"name\",\"type\"]),C=Hm(c,\"exports\")?c.exports:void 0;(typeof f!=\"object\"||f===null)&&(f=void 0),typeof p!=\"string\"&&(p=void 0),typeof h!=\"string\"&&(h=void 0),E!==\"module\"&&E!==\"commonjs\"&&(E=\"none\");let S={pjsonPath:t,exists:!0,main:p,name:h,type:E,exports:C,imports:f};return iN.set(t,S),S}function fBe(t,e){let r=new URL(\"./package.json\",t);for(;;){let n=r.pathname;if(ng(n,\"node_modules/package.json\"))break;let c=ndt((0,sN.fileURLToPath)(r),t,void 0,e);if(c.exists)return c;let f=r;if(r=new URL(\"../package.json\",r),r.pathname===f.pathname)break}let s=(0,sN.fileURLToPath)(r),a={pjsonPath:s,exists:!1,main:void 0,name:void 0,type:\"none\",exports:void 0,imports:void 0};return iN.set(s,a),a}function idt(t,e,r){throw new aBe(t,e&&(0,ta.fileURLToPath)(new URL(\".\",e)),(0,ta.fileURLToPath)(r))}function sdt(t,e,r,s){let a=`request is not a valid subpath for the \"${r?\"imports\":\"exports\"}\" resolution of ${(0,ta.fileURLToPath)(e)}`;throw new fY(t,a,s&&(0,ta.fileURLToPath)(s))}function MD(t,e,r,s,a){throw typeof e==\"object\"&&e!==null?e=RD(e,null,\"\"):e=`${e}`,new lBe((0,ta.fileURLToPath)(new URL(\".\",r)),t,e,s,a&&(0,ta.fileURLToPath)(a))}var ABe=/(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\\\|\\/|$)/i,pBe=/\\*/g;function odt(t,e,r,s,a,n,c,f){if(e!==\"\"&&!n&&t[t.length-1]!==\"/\"&&MD(r,t,s,c,a),!hA(t,\"./\")){if(c&&!hA(t,\"../\")&&!hA(t,\"/\")){let C=!1;try{new URL(t),C=!0}catch{}if(!C)return n?lY(pBe,t,()=>e):t+e}MD(r,t,s,c,a)}aY(ABe,ig(t,2))!==null&&MD(r,t,s,c,a);let p=new URL(t,s),h=p.pathname,E=new URL(\".\",s).pathname;if(hA(h,E)||MD(r,t,s,c,a),e===\"\")return p;if(aY(ABe,e)!==null){let C=n?nBe(r,\"*\",()=>e):r+e;sdt(C,s,c,a)}return n?new URL(lY(pBe,p.href,()=>e)):new URL(e,p)}function adt(t){let e=+t;return`${e}`!==t?!1:e>=0&&e<4294967295}function vw(t,e,r,s,a,n,c,f){if(typeof e==\"string\")return odt(e,r,s,t,a,n,c,f);if(oY(e)){if(e.length===0)return null;let p;for(let h=0;h<e.length;h++){let E=e[h],C;try{C=vw(t,E,r,s,a,n,c,f)}catch(S){if(p=S,S.code===\"ERR_INVALID_PACKAGE_TARGET\")continue;throw S}if(C!==void 0){if(C===null){p=null;continue}return C}}if(p==null)return p;throw p}else if(typeof e==\"object\"&&e!==null){let p=FD(e);for(let h=0;h<p.length;h++){let E=p[h];if(adt(E))throw new LD((0,ta.fileURLToPath)(t),a,'\"exports\" cannot contain numeric property keys.')}for(let h=0;h<p.length;h++){let E=p[h];if(E===\"default\"||f.has(E)){let C=e[E],S=vw(t,C,r,s,a,n,c,f);if(S===void 0)continue;return S}}return}else if(e===null)return null;MD(s,e,t,c,a)}function gBe(t,e){let r=ND(t,\"*\"),s=ND(e,\"*\"),a=r===-1?t.length:r+1,n=s===-1?e.length:s+1;return a>n?-1:n>a||r===-1?1:s===-1||t.length>e.length?-1:e.length>t.length?1:0}function ldt(t,e,r){if(typeof t==\"string\"||oY(t))return!0;if(typeof t!=\"object\"||t===null)return!1;let s=FD(t),a=!1,n=0;for(let c=0;c<s.length;c++){let f=s[c],p=f===\"\"||f[0]!==\".\";if(n++===0)a=p;else if(a!==p)throw new LD((0,ta.fileURLToPath)(e),r,`\"exports\" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return a}function AY(t,e,r){throw new cBe((0,ta.fileURLToPath)(new URL(\".\",e)),t,r&&(0,ta.fileURLToPath)(r))}var hBe=new Set;function cdt(t,e,r){let s=(0,ta.fileURLToPath)(e);hBe.has(s+\"|\"+t)||(hBe.add(s+\"|\"+t),process.emitWarning(`Use of deprecated trailing slash pattern mapping \"${t}\" in the \"exports\" field module resolution of the package at ${s}${r?` imported from ${(0,ta.fileURLToPath)(r)}`:\"\"}. Mapping specifiers ending in \"/\" is no longer supported.`,\"DeprecationWarning\",\"DEP0155\"))}function dBe({packageJSONUrl:t,packageSubpath:e,exports:r,base:s,conditions:a}){if(ldt(r,t,s)&&(r={\".\":r}),Hm(r,e)&&!cY(e,\"*\")&&!ng(e,\"/\")){let p=r[e],h=vw(t,p,\"\",e,s,!1,!1,a);return h==null&&AY(e,t,s),h}let n=\"\",c,f=FD(r);for(let p=0;p<f.length;p++){let h=f[p],E=ND(h,\"*\");if(E!==-1&&hA(e,ig(h,0,E))){ng(e,\"/\")&&cdt(e,t,s);let C=ig(h,E+1);e.length>=h.length&&ng(e,C)&&gBe(n,h)===1&&uY(h,\"*\")===E&&(n=h,c=ig(e,E,e.length-C.length))}}if(n){let p=r[n],h=vw(t,p,c,n,s,!0,!1,a);return h==null&&AY(e,t,s),h}AY(e,t,s)}function mBe({name:t,base:e,conditions:r,readFileSyncFn:s}){if(t===\"#\"||hA(t,\"#/\")||ng(t,\"/\")){let c=\"is not a valid internal imports specifier name\";throw new fY(t,c,(0,ta.fileURLToPath)(e))}let a,n=fBe(e,s);if(n.exists){a=(0,ta.pathToFileURL)(n.pjsonPath);let c=n.imports;if(c)if(Hm(c,t)&&!cY(t,\"*\")){let f=vw(a,c[t],\"\",t,e,!1,!0,r);if(f!=null)return f}else{let f=\"\",p,h=FD(c);for(let E=0;E<h.length;E++){let C=h[E],S=ND(C,\"*\");if(S!==-1&&hA(t,ig(C,0,S))){let P=ig(C,S+1);t.length>=C.length&&ng(t,P)&&gBe(f,C)===1&&uY(C,\"*\")===S&&(f=C,p=ig(t,S,t.length-P.length))}}if(f){let E=c[f],C=vw(a,E,p,f,e,!0,!0,r);if(C!=null)return C}}}idt(t,a,e)}Dt();var udt=new Set([\"BUILTIN_NODE_RESOLUTION_FAILED\",\"MISSING_DEPENDENCY\",\"MISSING_PEER_DEPENDENCY\",\"QUALIFIED_PATH_RESOLUTION_FAILED\",\"UNDECLARED_DEPENDENCY\"]);function gs(t,e,r={},s){s??=udt.has(t)?\"MODULE_NOT_FOUND\":t;let a={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:{...a,value:s},pnpCode:{...a,value:t},data:{...a,value:r}})}function lf(t){return fe.normalize(fe.fromPortablePath(t))}var CBe=ut(EBe());function wBe(t){return fdt(),hY[t]}var hY;function fdt(){hY||(hY={\"--conditions\":[],...IBe(Adt()),...IBe(process.execArgv)})}function IBe(t){return(0,CBe.default)({\"--conditions\":[String],\"-C\":\"--conditions\"},{argv:t,permissive:!0})}function Adt(){let t=[],e=pdt(process.env.NODE_OPTIONS||\"\",t);return t.length,e}function pdt(t,e){let r=[],s=!1,a=!0;for(let n=0;n<t.length;++n){let c=t[n];if(c===\"\\\\\"&&s){if(n+1===t.length)return e.push(`invalid value for NODE_OPTIONS (invalid escape)\n`),r;c=t[++n]}else if(c===\" \"&&!s){a=!0;continue}else if(c==='\"'){s=!s;continue}a?(r.push(c),a=!1):r[r.length-1]+=c}return s&&e.push(`invalid value for NODE_OPTIONS (unterminated string)\n`),r}Dt();var[ml,ih]=process.versions.node.split(\".\").map(t=>parseInt(t,10)),BBe=ml>19||ml===19&&ih>=2||ml===18&&ih>=13,UZt=ml===20&&ih<6||ml===19&&ih>=3,_Zt=ml>19||ml===19&&ih>=6,HZt=ml>=21||ml===20&&ih>=10||ml===18&&ih>=19,jZt=ml>=21||ml===20&&ih>=10||ml===18&&ih>=20,GZt=ml>=22;function vBe(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>fe.fromPortablePath(uo.resolveVirtual(fe.toPortablePath(e)))),BBe)process.send({\"watch:require\":t});else for(let e of t)process.send({\"watch:require\":e})}function dY(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,s=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\\\/]|\\\\\\\\|\\.{0,2}(?:\\/|$))((?:node:)?(?:@[^/]+\\/)?[^/]+)\\/*(.*|)$/,n=/^(\\/|\\.{1,2}(\\/|$))/,c=/\\/$/,f=/^\\.{0,2}\\//,p={name:null,reference:null},h=[],E=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Fe of[\"react-scripts\",\"gatsby\"]){let Ne=t.packageRegistry.get(Fe);if(Ne)for(let Pe of Ne.keys()){if(Pe===null)throw new Error(\"Assertion failed: This reference shouldn't be null\");h.push({name:Fe,reference:Pe})}}let{ignorePattern:C,packageRegistry:S,packageLocatorsByLocations:P}=t;function I(Fe,Ne){return{fn:Fe,args:Ne,error:null,result:null}}function R(Fe){let Ne=process.stderr?.hasColors?.()??process.stdout.isTTY,Pe=(it,Ue)=>`\\x1B[${it}m${Ue}\\x1B[0m`,Ve=Fe.error;console.error(Ve?Pe(\"31;1\",`\\u2716 ${Fe.error?.message.replace(/\\n.*/s,\"\")}`):Pe(\"33;1\",\"\\u203C Resolution\")),Fe.args.length>0&&console.error();for(let it of Fe.args)console.error(`  ${Pe(\"37;1\",\"In \\u2190\")} ${(0,gY.inspect)(it,{colors:Ne,compact:!0})}`);Fe.result&&(console.error(),console.error(`  ${Pe(\"37;1\",\"Out \\u2192\")} ${(0,gY.inspect)(Fe.result,{colors:Ne,compact:!0})}`));let ke=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(ke.length>0){console.error();for(let it of ke)console.error(`  ${Pe(\"38;5;244\",it)}`)}console.error()}function N(Fe,Ne){if(e.allowDebug===!1)return Ne;if(Number.isFinite(s)){if(s>=2)return(...Pe)=>{let Ve=I(Fe,Pe);try{return Ve.result=Ne(...Pe)}catch(ke){throw Ve.error=ke}finally{R(Ve)}};if(s>=1)return(...Pe)=>{try{return Ne(...Pe)}catch(Ve){let ke=I(Fe,Pe);throw ke.error=Ve,R(ke),Ve}}}return Ne}function U(Fe){let Ne=g(Fe);if(!Ne)throw gs(\"INTERNAL\",\"Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)\");return Ne}function W(Fe){if(Fe.name===null)return!0;for(let Ne of t.dependencyTreeRoots)if(Ne.name===Fe.name&&Ne.reference===Fe.reference)return!0;return!1}let ee=new Set([\"node\",\"require\",...wBe(\"--conditions\")]);function ie(Fe,Ne=ee,Pe){let Ve=Ae(J.join(Fe,\"internal.js\"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Ve===null)throw gs(\"INTERNAL\",`The locator that owns the \"${Fe}\" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:ke}=U(Ve),it=J.join(ke,Er.manifest);if(!e.fakeFs.existsSync(it))return null;let Ue=JSON.parse(e.fakeFs.readFileSync(it,\"utf8\"));if(Ue.exports==null)return null;let x=J.contains(ke,Fe);if(x===null)throw gs(\"INTERNAL\",\"unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)\");x!==\".\"&&!f.test(x)&&(x=`./${x}`);try{let w=dBe({packageJSONUrl:(0,jm.pathToFileURL)(fe.fromPortablePath(it)),packageSubpath:x,exports:Ue.exports,base:Pe?(0,jm.pathToFileURL)(fe.fromPortablePath(Pe)):null,conditions:Ne});return fe.toPortablePath((0,jm.fileURLToPath)(w))}catch(w){throw gs(\"EXPORTS_RESOLUTION_FAILED\",w.message,{unqualifiedPath:lf(Fe),locator:Ve,pkgJson:Ue,subpath:lf(x),conditions:Ne},w.code)}}function ue(Fe,Ne,{extensions:Pe}){let Ve;try{Ne.push(Fe),Ve=e.fakeFs.statSync(Fe)}catch{}if(Ve&&!Ve.isDirectory())return e.fakeFs.realpathSync(Fe);if(Ve&&Ve.isDirectory()){let ke;try{ke=JSON.parse(e.fakeFs.readFileSync(J.join(Fe,Er.manifest),\"utf8\"))}catch{}let it;if(ke&&ke.main&&(it=J.resolve(Fe,ke.main)),it&&it!==Fe){let Ue=ue(it,Ne,{extensions:Pe});if(Ue!==null)return Ue}}for(let ke=0,it=Pe.length;ke<it;ke++){let Ue=`${Fe}${Pe[ke]}`;if(Ne.push(Ue),e.fakeFs.existsSync(Ue))return Ue}if(Ve&&Ve.isDirectory())for(let ke=0,it=Pe.length;ke<it;ke++){let Ue=J.format({dir:Fe,name:\"index\",ext:Pe[ke]});if(Ne.push(Ue),e.fakeFs.existsSync(Ue))return Ue}return null}function le(Fe){let Ne=new sh.Module(Fe,null);return Ne.filename=Fe,Ne.paths=sh.Module._nodeModulePaths(Fe),Ne}function me(Fe,Ne){return Ne.endsWith(\"/\")&&(Ne=J.join(Ne,\"internal.js\")),sh.Module._resolveFilename(fe.fromPortablePath(Fe),le(fe.fromPortablePath(Ne)),!1,{plugnplay:!1})}function pe(Fe){if(C===null)return!1;let Ne=J.contains(t.basePath,Fe);return Ne===null?!1:!!C.test(Ne.replace(/\\/$/,\"\"))}let Be={std:3,resolveVirtual:1,getAllLocators:1},Ce=p;function g({name:Fe,reference:Ne}){let Pe=S.get(Fe);if(!Pe)return null;let Ve=Pe.get(Ne);return Ve||null}function we({name:Fe,reference:Ne}){let Pe=[];for(let[Ve,ke]of S)if(Ve!==null)for(let[it,Ue]of ke)it===null||Ue.packageDependencies.get(Fe)!==Ne||Ve===Fe&&it===Ne||Pe.push({name:Ve,reference:it});return Pe}function ye(Fe,Ne){let Pe=new Map,Ve=new Set,ke=Ue=>{let x=JSON.stringify(Ue.name);if(Ve.has(x))return;Ve.add(x);let w=we(Ue);for(let b of w)if(U(b).packagePeers.has(Fe))ke(b);else{let F=Pe.get(b.name);typeof F>\"u\"&&Pe.set(b.name,F=new Set),F.add(b.reference)}};ke(Ne);let it=[];for(let Ue of[...Pe.keys()].sort())for(let x of[...Pe.get(Ue)].sort())it.push({name:Ue,reference:x});return it}function Ae(Fe,{resolveIgnored:Ne=!1,includeDiscardFromLookup:Pe=!1}={}){if(pe(Fe)&&!Ne)return null;let Ve=J.relative(t.basePath,Fe);Ve.match(n)||(Ve=`./${Ve}`),Ve.endsWith(\"/\")||(Ve=`${Ve}/`);do{let ke=P.get(Ve);if(typeof ke>\"u\"||ke.discardFromLookup&&!Pe){Ve=Ve.substring(0,Ve.lastIndexOf(\"/\",Ve.length-2)+1);continue}return ke.locator}while(Ve!==\"\");return null}function se(Fe){try{return e.fakeFs.readFileSync(fe.toPortablePath(Fe),\"utf8\")}catch(Ne){if(Ne.code===\"ENOENT\")return;throw Ne}}function Z(Fe,Ne,{considerBuiltins:Pe=!0}={}){if(Fe.startsWith(\"#\"))throw new Error(\"resolveToUnqualified can not handle private import mappings\");if(Fe===\"pnpapi\")return fe.toPortablePath(e.pnpapiResolution);if(Pe&&(0,sh.isBuiltin)(Fe))return null;let Ve=lf(Fe),ke=Ne&&lf(Ne);if(Ne&&pe(Ne)&&(!J.isAbsolute(Fe)||Ae(Fe)===null)){let x=me(Fe,Ne);if(x===!1)throw gs(\"BUILTIN_NODE_RESOLUTION_FAILED\",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp)\n\nRequire request: \"${Ve}\"\nRequired by: ${ke}\n`,{request:Ve,issuer:ke});return fe.toPortablePath(x)}let it,Ue=Fe.match(a);if(Ue){if(!Ne)throw gs(\"API_ERROR\",\"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute\",{request:Ve,issuer:ke});let[,x,w]=Ue,b=Ae(Ne);if(!b){let Te=me(Fe,Ne);if(Te===!1)throw gs(\"BUILTIN_NODE_RESOLUTION_FAILED\",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).\n\nRequire path: \"${Ve}\"\nRequired by: ${ke}\n`,{request:Ve,issuer:ke});return fe.toPortablePath(Te)}let F=U(b).packageDependencies.get(x),z=null;if(F==null&&b.name!==null){let Te=t.fallbackExclusionList.get(b.name);if(!Te||!Te.has(b.reference)){for(let Ct=0,qt=h.length;Ct<qt;++Ct){let Pt=U(h[Ct]).packageDependencies.get(x);if(Pt!=null){r?z=Pt:F=Pt;break}}if(t.enableTopLevelFallback&&F==null&&z===null){let Ct=t.fallbackPool.get(x);Ct!=null&&(z=Ct)}}}let X=null;if(F===null)if(W(b))X=gs(\"MISSING_PEER_DEPENDENCY\",`Your application tried to access ${x} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ve,issuer:ke,dependencyName:x});else{let Te=ye(x,b);Te.every(lt=>W(lt))?X=gs(\"MISSING_PEER_DEPENDENCY\",`${b.name} tried to access ${x} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n${Te.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}\n`).join(\"\")}\n`,{request:Ve,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x,brokenAncestors:Te}):X=gs(\"MISSING_PEER_DEPENDENCY\",`${b.name} tried to access ${x} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n\n${Te.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}\n`).join(\"\")}\n`,{request:Ve,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x,brokenAncestors:Te})}else F===void 0&&(!Pe&&(0,sh.isBuiltin)(Fe)?W(b)?X=gs(\"UNDECLARED_DEPENDENCY\",`Your application tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ve,issuer:ke,dependencyName:x}):X=gs(\"UNDECLARED_DEPENDENCY\",`${b.name} tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in ${b.name}'s dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ve,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x}):W(b)?X=gs(\"UNDECLARED_DEPENDENCY\",`Your application tried to access ${x}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${ke}\n`,{request:Ve,issuer:ke,dependencyName:x}):X=gs(\"UNDECLARED_DEPENDENCY\",`${b.name} tried to access ${x}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${x}${x!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n`,{request:Ve,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x}));if(F==null){if(z===null||X===null)throw X||new Error(\"Assertion failed: Expected an error to have been set\");F=z;let Te=X.message.replace(/\\n.*/g,\"\");X.message=Te,!E.has(Te)&&s!==0&&(E.add(Te),process.emitWarning(X))}let $=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:x,reference:F},oe=U($);if(!oe.packageLocation)throw gs(\"MISSING_DEPENDENCY\",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.\n\nRequired package: ${$.name}@${$.reference}${$.name!==Ve?` (via \"${Ve}\")`:\"\"}\nRequired by: ${b.name}@${b.reference} (via ${ke})\n`,{request:Ve,issuer:ke,dependencyLocator:Object.assign({},$)});let xe=oe.packageLocation;w?it=J.join(xe,w):it=xe}else if(J.isAbsolute(Fe))it=J.normalize(Fe);else{if(!Ne)throw gs(\"API_ERROR\",\"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute\",{request:Ve,issuer:ke});let x=J.resolve(Ne);Ne.match(c)?it=J.normalize(J.join(x,Fe)):it=J.normalize(J.join(J.dirname(x),Fe))}return J.normalize(it)}function De(Fe,Ne,Pe=ee,Ve){if(n.test(Fe))return Ne;let ke=ie(Ne,Pe,Ve);return ke?J.normalize(ke):Ne}function Re(Fe,{extensions:Ne=Object.keys(sh.Module._extensions)}={}){let Pe=[],Ve=ue(Fe,Pe,{extensions:Ne});if(Ve)return J.normalize(Ve);{vBe(Pe.map(Ue=>fe.fromPortablePath(Ue)));let ke=lf(Fe),it=Ae(Fe);if(it){let{packageLocation:Ue}=U(it),x=!0;try{e.fakeFs.accessSync(Ue)}catch(w){if(w?.code===\"ENOENT\")x=!1;else{let b=(w?.message??w??\"empty exception thrown\").replace(/^[A-Z]/,y=>y.toLowerCase());throw gs(\"QUALIFIED_PATH_RESOLUTION_FAILED\",`Required package exists but could not be accessed (${b}).\n\nMissing package: ${it.name}@${it.reference}\nExpected package location: ${lf(Ue)}\n`,{unqualifiedPath:ke,extensions:Ne})}}if(!x){let w=Ue.includes(\"/unplugged/\")?\"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).\":\"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.\";throw gs(\"QUALIFIED_PATH_RESOLUTION_FAILED\",`${w}\n\nMissing package: ${it.name}@${it.reference}\nExpected package location: ${lf(Ue)}\n`,{unqualifiedPath:ke,extensions:Ne})}}throw gs(\"QUALIFIED_PATH_RESOLUTION_FAILED\",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.\n\nSource path: ${ke}\n${Pe.map(Ue=>`Not found: ${lf(Ue)}\n`).join(\"\")}`,{unqualifiedPath:ke,extensions:Ne})}}function mt(Fe,Ne,Pe){if(!Ne)throw new Error(\"Assertion failed: An issuer is required to resolve private import mappings\");let Ve=mBe({name:Fe,base:(0,jm.pathToFileURL)(fe.fromPortablePath(Ne)),conditions:Pe.conditions??ee,readFileSyncFn:se});if(Ve instanceof URL)return Re(fe.toPortablePath((0,jm.fileURLToPath)(Ve)),{extensions:Pe.extensions});if(Ve.startsWith(\"#\"))throw new Error(\"Mapping from one private import to another isn't allowed\");return j(Ve,Ne,Pe)}function j(Fe,Ne,Pe={}){try{if(Fe.startsWith(\"#\"))return mt(Fe,Ne,Pe);let{considerBuiltins:Ve,extensions:ke,conditions:it}=Pe,Ue=Z(Fe,Ne,{considerBuiltins:Ve});if(Fe===\"pnpapi\")return Ue;if(Ue===null)return null;let x=()=>Ne!==null?pe(Ne):!1,w=(!Ve||!(0,sh.isBuiltin)(Fe))&&!x()?De(Fe,Ue,it,Ne):Ue;return Re(w,{extensions:ke})}catch(Ve){throw Object.hasOwn(Ve,\"pnpCode\")&&Object.assign(Ve.data,{request:lf(Fe),issuer:Ne&&lf(Ne)}),Ve}}function rt(Fe){let Ne=J.normalize(Fe),Pe=uo.resolveVirtual(Ne);return Pe!==Ne?Pe:null}return{VERSIONS:Be,topLevel:Ce,getLocator:(Fe,Ne)=>Array.isArray(Ne)?{name:Ne[0],reference:Ne[1]}:{name:Fe,reference:Ne},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Fe=[];for(let[Ne,Pe]of S)for(let Ve of Pe.keys())Ne!==null&&Ve!==null&&Fe.push({name:Ne,reference:Ve});return Fe},getPackageInformation:Fe=>{let Ne=g(Fe);if(Ne===null)return null;let Pe=fe.fromPortablePath(Ne.packageLocation);return{...Ne,packageLocation:Pe}},findPackageLocator:Fe=>Ae(fe.toPortablePath(Fe)),resolveToUnqualified:N(\"resolveToUnqualified\",(Fe,Ne,Pe)=>{let Ve=Ne!==null?fe.toPortablePath(Ne):null,ke=Z(fe.toPortablePath(Fe),Ve,Pe);return ke===null?null:fe.fromPortablePath(ke)}),resolveUnqualified:N(\"resolveUnqualified\",(Fe,Ne)=>fe.fromPortablePath(Re(fe.toPortablePath(Fe),Ne))),resolveRequest:N(\"resolveRequest\",(Fe,Ne,Pe)=>{let Ve=Ne!==null?fe.toPortablePath(Ne):null,ke=j(fe.toPortablePath(Fe),Ve,Pe);return ke===null?null:fe.fromPortablePath(ke)}),resolveVirtual:N(\"resolveVirtual\",Fe=>{let Ne=rt(fe.toPortablePath(Fe));return Ne!==null?fe.fromPortablePath(Ne):null})}}Dt();var SBe=(t,e,r)=>{let s=TD(t),a=sY(s,{basePath:e}),n=fe.join(e,Er.pnpCjs);return dY(a,{fakeFs:r,pnpapiResolution:n})};var yY=ut(bBe());Yt();var gA={};Vt(gA,{checkManifestCompatibility:()=>PBe,extractBuildRequest:()=>oN,getExtractHint:()=>EY,hasBindingGyp:()=>IY});Ge();Dt();function PBe(t){return G.isPackageCompatible(t,Ui.getArchitectureSet())}function oN(t,e,r,{configuration:s}){let a=[];for(let n of[\"preinstall\",\"install\",\"postinstall\"])e.manifest.scripts.has(n)&&a.push({type:0,script:n});return!e.manifest.scripts.has(\"install\")&&e.misc.hasBindingGyp&&a.push({type:1,script:\"node-gyp rebuild\"}),a.length===0?null:t.linkType!==\"HARD\"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${G.prettyLocator(s,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${G.prettyLocator(s,t)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!s.get(\"enableScripts\")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${G.prettyLocator(s,t)} lists build scripts, but all build scripts have been disabled.`)}:PBe(t)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${G.prettyLocator(s,t)} The ${Ui.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var gdt=new Set([\".exe\",\".bin\",\".h\",\".hh\",\".hpp\",\".c\",\".cc\",\".cpp\",\".java\",\".jar\",\".node\"]);function EY(t){return t.packageFs.getExtractHint({relevantExtensions:gdt})}function IY(t){let e=J.join(t.prefixPath,\"binding.gyp\");return t.packageFs.existsSync(e)}var HD={};Vt(HD,{getUnpluggedPath:()=>_D});Ge();Dt();function _D(t,{configuration:e}){return J.resolve(e.get(\"pnpUnpluggedFolder\"),G.slugifyLocator(t))}var ddt=new Set([G.makeIdent(null,\"open\").identHash,G.makeIdent(null,\"opn\").identHash]),sg=class{constructor(){this.mode=\"strict\";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:\"PnpLinker\",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error(\"Assertion failed: Expected the PnP linker to be enabled\");let s=og(r.project).cjs;if(!ce.existsSync(s))throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=je.getFactoryWithDefault(this.pnpCache,s,()=>je.dynamicRequire(s,{cachingStrategy:je.CachingStrategy.FsTime})),n={name:G.stringifyIdent(e),reference:e.reference},c=a.getPackageInformation(n);if(!c)throw new nt(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return fe.toPortablePath(c.packageLocation)}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=og(r.project).cjs;if(!ce.existsSync(s))return null;let n=je.getFactoryWithDefault(this.pnpCache,s,()=>je.dynamicRequire(s,{cachingStrategy:je.CachingStrategy.FsTime})).findPackageLocator(fe.fromPortablePath(e));return n?G.makeLocator(G.parseIdent(n.name),n.reference):null}makeInstaller(e){return new Gm(e)}isEnabled(e){return!(e.project.configuration.get(\"nodeLinker\")!==\"pnp\"||e.project.configuration.get(\"pnpMode\")!==this.mode)}},Gm=class{constructor(e){this.opts=e;this.mode=\"strict\";this.asyncActions=new je.AsyncActions(10);this.packageRegistry=new Map;this.virtualTemplates=new Map;this.isESMLoaderRequired=!1;this.customData={store:new Map};this.unpluggedPaths=new Set;this.opts=e}attachCustomData(e){this.customData=e}async installPackage(e,r,s){let a=G.stringifyIdent(e),n=e.reference,c=!!this.opts.project.tryWorkspaceByLocator(e),f=G.isVirtualLocator(e),p=e.peerDependencies.size>0&&!f,h=!p&&!c,E=!p&&e.linkType!==\"SOFT\",C,S;if(h||E){let ee=f?G.devirtualizeLocator(e):e;C=this.customData.store.get(ee.locatorHash),typeof C>\"u\"&&(C=await mdt(r),e.linkType===\"HARD\"&&this.customData.store.set(ee.locatorHash,C)),C.manifest.type===\"module\"&&(this.isESMLoaderRequired=!0),S=this.opts.project.getDependencyMeta(ee,e.version)}let P=h?oN(e,C,S,{configuration:this.opts.project.configuration}):null,I=E?await this.unplugPackageIfNeeded(e,C,r,S,s):r.packageFs;if(J.isAbsolute(r.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${r.prefixPath}) to be relative to the parent`);let R=J.resolve(I.getRealPath(),r.prefixPath),N=CY(this.opts.project.cwd,R),U=new Map,W=new Set;if(f){for(let ee of e.peerDependencies.values())U.set(G.stringifyIdent(ee),null),W.add(G.stringifyIdent(ee));if(!c){let ee=G.devirtualizeLocator(e);this.virtualTemplates.set(ee.locatorHash,{location:CY(this.opts.project.cwd,uo.resolveVirtual(R)),locator:ee})}}return je.getMapWithDefault(this.packageRegistry,a).set(n,{packageLocation:N,packageDependencies:U,packagePeers:W,linkType:e.linkType,discardFromLookup:r.discardFromLookup||!1}),{packageLocation:R,buildRequest:P}}async attachInternalDependencies(e,r){let s=this.getPackageInformation(e);for(let[a,n]of r){let c=G.areIdentsEqual(a,n)?n.reference:[G.stringifyIdent(n),n.reference];s.packageDependencies.set(G.stringifyIdent(a),c)}}async attachExternalDependents(e,r){for(let s of r)this.getDiskInformation(s).packageDependencies.set(G.stringifyIdent(e),e.reference)}async finalizeInstall(){if(this.opts.project.configuration.get(\"pnpMode\")!==this.mode)return;let e=og(this.opts.project);if(this.isEsmEnabled()||await ce.removePromise(e.esmLoader),this.opts.project.configuration.get(\"nodeLinker\")!==\"pnp\"){await ce.removePromise(e.cjs),await ce.removePromise(e.data),await ce.removePromise(e.esmLoader),await ce.removePromise(this.opts.project.configuration.get(\"pnpUnpluggedFolder\"));return}for(let{locator:C,location:S}of this.virtualTemplates.values())je.getMapWithDefault(this.packageRegistry,G.stringifyIdent(C)).set(C.reference,{packageLocation:S,packageDependencies:new Map,packagePeers:new Set,linkType:\"SOFT\",discardFromLookup:!1});let r=this.opts.project.configuration.get(\"pnpFallbackMode\"),s=this.opts.project.workspaces.map(({anchoredLocator:C})=>({name:G.stringifyIdent(C),reference:C.reference})),a=r!==\"none\",n=[],c=new Map,f=je.buildIgnorePattern([\".yarn/sdks/**\",...this.opts.project.configuration.get(\"pnpIgnorePatterns\")]),p=this.packageRegistry,h=this.opts.project.configuration.get(\"pnpShebang\"),E=this.opts.project.configuration.get(\"pnpZipBackend\");if(r===\"dependencies-only\")for(let C of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(C)&&n.push({name:G.stringifyIdent(C),reference:C.reference});return await this.asyncActions.wait(),await this.finalizeInstallWithPnp({dependencyTreeRoots:s,enableTopLevelFallback:a,fallbackExclusionList:n,fallbackPool:c,ignorePattern:f,pnpZipBackend:E,packageRegistry:p,shebang:h}),{customData:this.customData}}async transformPnpSettings(e){}isEsmEnabled(){if(this.opts.project.configuration.sources.has(\"pnpEnableEsmLoader\"))return this.opts.project.configuration.get(\"pnpEnableEsmLoader\");if(this.isESMLoaderRequired)return!0;for(let e of this.opts.project.workspaces)if(e.manifest.type===\"module\")return!0;return!1}async finalizeInstallWithPnp(e){let r=og(this.opts.project),s=await this.locateNodeModules(e.ignorePattern);if(s.length>0){this.opts.report.reportWarning(31,\"One or more node_modules have been detected and will be removed. This operation may take some time.\");for(let n of s)await ce.removePromise(n)}if(await this.transformPnpSettings(e),this.opts.project.configuration.get(\"pnpEnableInlining\")){let n=tBe(e);await ce.changeFilePromise(r.cjs,n,{automaticNewlines:!0,mode:493}),await ce.removePromise(r.data)}else{let{dataFile:n,loaderFile:c}=rBe(e);await ce.changeFilePromise(r.cjs,c,{automaticNewlines:!0,mode:493}),await ce.changeFilePromise(r.data,n,{automaticNewlines:!0,mode:420})}this.isEsmEnabled()&&(this.opts.report.reportWarning(0,\"ESM support for PnP uses the experimental loader API and is therefore experimental\"),await ce.changeFilePromise(r.esmLoader,(0,yY.default)(),{automaticNewlines:!0,mode:420}));let a=this.opts.project.configuration.get(\"pnpUnpluggedFolder\");if(this.unpluggedPaths.size===0)await ce.removePromise(a);else for(let n of await ce.readdirPromise(a)){let c=J.resolve(a,n);this.unpluggedPaths.has(c)||await ce.removePromise(c)}}async locateNodeModules(e){let r=[],s=e?new RegExp(e):null;for(let a of this.opts.project.workspaces){let n=J.join(a.cwd,\"node_modules\");if(s&&s.test(J.relative(this.opts.project.cwd,a.cwd))||!ce.existsSync(n))continue;let c=await ce.readdirPromise(n,{withFileTypes:!0}),f=c.filter(p=>!p.isDirectory()||p.name===\".bin\"||!p.name.startsWith(\".\"));if(f.length===c.length)r.push(n);else for(let p of f)r.push(J.join(n,p.name))}return r}async unplugPackageIfNeeded(e,r,s,a,n){return this.shouldBeUnplugged(e,r,a)?this.unplugPackage(e,s,n):s.packageFs}shouldBeUnplugged(e,r,s){return typeof s.unplugged<\"u\"?s.unplugged:ddt.has(e.identHash)||e.conditions!=null?!0:r.manifest.preferUnplugged!==null?r.manifest.preferUnplugged:!!(oN(e,r,s,{configuration:this.opts.project.configuration})?.skipped===!1||r.misc.extractHint)}async unplugPackage(e,r,s){let a=_D(e,{configuration:this.opts.project.configuration});return this.opts.project.disabledLocators.has(e.locatorHash)?new _f(a,{baseFs:r.packageFs,pathUtils:J}):(this.unpluggedPaths.add(a),s.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{let n=J.join(a,r.prefixPath,\".ready\");await ce.existsPromise(n)||(this.opts.project.storedBuildState.delete(e.locatorHash),await ce.mkdirPromise(a,{recursive:!0}),await ce.copyPromise(a,vt.dot,{baseFs:r.packageFs,overwrite:!1}),await ce.writeFilePromise(n,\"\"))})),new Sn(a))}getPackageInformation(e){let r=G.stringifyIdent(e),s=e.reference,a=this.packageRegistry.get(r);if(!a)throw new Error(`Assertion failed: The package information store should have been available (for ${G.prettyIdent(this.opts.project.configuration,e)})`);let n=a.get(s);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${G.prettyLocator(this.opts.project.configuration,e)})`);return n}getDiskInformation(e){let r=je.getMapWithDefault(this.packageRegistry,\"@@disk\"),s=CY(this.opts.project.cwd,e);return je.getFactoryWithDefault(r,s,()=>({packageLocation:s,packageDependencies:new Map,packagePeers:new Set,linkType:\"SOFT\",discardFromLookup:!1}))}};function CY(t,e){let r=J.relative(t,e);return r.match(/^\\.{0,2}\\//)||(r=`./${r}`),r.replace(/\\/?$/,\"/\")}async function mdt(t){let e=await Ut.tryFind(t.prefixPath,{baseFs:t.packageFs})??new Ut,r=new Set([\"preinstall\",\"install\",\"postinstall\"]);for(let s of e.scripts.keys())r.has(s)||e.scripts.delete(s);return{manifest:{scripts:e.scripts,preferUnplugged:e.preferUnplugged,type:e.type},misc:{extractHint:EY(t),hasBindingGyp:IY(t)}}}Ge();Ge();Yt();var xBe=ut(Go());var Sw=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Unplug direct dependencies from the entire project\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Unplug both direct and transitive dependencies\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.patterns=ge.Rest()}static{this.paths=[[\"unplug\"]]}static{this.usage=ot.Usage({description:\"force the unpacking of a list of packages\",details:\"\\n      This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\\n\\n      A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\\n\\n      Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\\n\\n      By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\\n\\n      This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\\n    \",examples:[[\"Unplug the lodash dependency from the active workspace\",\"yarn unplug lodash\"],[\"Unplug all instances of lodash referenced by any workspace\",\"yarn unplug lodash -A\"],[\"Unplug all instances of lodash referenced by the active workspace and its dependencies\",\"yarn unplug lodash -R\"],[\"Unplug all instances of lodash, anywhere\",\"yarn unplug lodash -AR\"],[\"Unplug one specific version of lodash\",\"yarn unplug lodash@1.2.3\"],[\"Unplug all packages with the `@babel` scope\",\"yarn unplug '@babel/*'\"],[\"Unplug all packages (only for testing, not recommended)\",\"yarn unplug -R '*'\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);if(r.get(\"nodeLinker\")!==\"pnp\")throw new nt(\"This command can only be used if the `nodeLinker` option is set to `pnp`\");await s.restoreInstallState();let c=new Set(this.patterns),f=this.patterns.map(P=>{let I=G.parseDescriptor(P),R=I.range!==\"unknown\"?I:G.makeDescriptor(I,\"*\");if(!Fr.validRange(R.range))throw new nt(`The range of the descriptor patterns must be a valid semver range (${G.prettyDescriptor(r,R)})`);return N=>{let U=G.stringifyIdent(N);return!xBe.default.isMatch(U,G.stringifyIdent(R))||N.version&&!Fr.satisfiesWithPrereleases(N.version,R.range)?!1:(c.delete(P),!0)}}),p=()=>{let P=[];for(let I of s.storedPackages.values())!s.tryWorkspaceByLocator(I)&&!G.isVirtualLocator(I)&&f.some(R=>R(I))&&P.push(I);return P},h=P=>{let I=new Set,R=[],N=(U,W)=>{if(I.has(U.locatorHash))return;let ee=!!s.tryWorkspaceByLocator(U);if(!(W>0&&!this.recursive&&ee)&&(I.add(U.locatorHash),!s.tryWorkspaceByLocator(U)&&f.some(ie=>ie(U))&&R.push(U),!(W>0&&!this.recursive)))for(let ie of U.dependencies.values()){let ue=s.storedResolutions.get(ie.descriptorHash);if(!ue)throw new Error(\"Assertion failed: The resolution should have been registered\");let le=s.storedPackages.get(ue);if(!le)throw new Error(\"Assertion failed: The package should have been registered\");N(le,W+1)}};for(let U of P)N(U.anchoredPackage,0);return R},E,C;if(this.all&&this.recursive?(E=p(),C=\"the project\"):this.all?(E=h(s.workspaces),C=\"any workspace\"):(E=h([a]),C=\"this workspace\"),c.size>1)throw new nt(`Patterns ${he.prettyList(r,c,he.Type.CODE)} don't match any packages referenced by ${C}`);if(c.size>0)throw new nt(`Pattern ${he.prettyList(r,c,he.Type.CODE)} doesn't match any packages referenced by ${C}`);E=je.sortMap(E,P=>G.stringifyLocator(P));let S=await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async P=>{for(let I of E){let R=I.version??\"unknown\",N=s.topLevelWorkspace.manifest.ensureDependencyMeta(G.makeDescriptor(I,R));N.unplugged=!0,P.reportInfo(0,`Will unpack ${G.prettyLocator(r,I)} to ${he.pretty(r,_D(I,{configuration:r}),he.Type.PATH)}`),P.reportJson({locator:G.stringifyLocator(I),version:R})}await s.topLevelWorkspace.persistManifest(),this.json||P.reportSeparator()});return S.hasErrors()?S.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};var og=t=>({cjs:J.join(t.cwd,Er.pnpCjs),data:J.join(t.cwd,Er.pnpData),esmLoader:J.join(t.cwd,Er.pnpEsmLoader)}),QBe=t=>/\\s/.test(t)?JSON.stringify(t):t;async function ydt(t,e,r){let s=/\\s*--require\\s+\\S*\\.pnp\\.c?js\\s*/g,a=/\\s*--experimental-loader\\s+\\S*\\.pnp\\.loader\\.mjs\\s*/,n=(e.NODE_OPTIONS??\"\").replace(s,\" \").replace(a,\" \").trim();if(t.configuration.get(\"nodeLinker\")!==\"pnp\"){e.NODE_OPTIONS=n||void 0;return}let c=og(t),f=`--require ${QBe(fe.fromPortablePath(c.cjs))}`;ce.existsSync(c.esmLoader)&&(f=`${f} --experimental-loader ${(0,kBe.pathToFileURL)(fe.fromPortablePath(c.esmLoader)).href}`),ce.existsSync(c.cjs)&&(e.NODE_OPTIONS=n?`${f} ${n}`:f)}async function Edt(t,e){let r=og(t);e(r.cjs),e(r.data),e(r.esmLoader),e(t.configuration.get(\"pnpUnpluggedFolder\"))}var Idt={hooks:{populateYarnPaths:Edt,setupScriptEnvironment:ydt},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: \"pnp\", \"pnpm\", or \"node-modules\"',type:\"STRING\",default:\"pnp\"},minizip:{description:\"Whether Yarn should use minizip to extract archives\",type:\"BOOLEAN\",default:!1},winLinkType:{description:\"Whether Yarn should use Windows Junctions or symlinks when creating links on Windows.\",type:\"STRING\",values:[\"junctions\",\"symlinks\"],default:\"junctions\"},pnpMode:{description:\"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.\",type:\"STRING\",default:\"strict\"},pnpShebang:{description:\"String to prepend to the generated PnP script\",type:\"STRING\",default:\"#!/usr/bin/env node\"},pnpIgnorePatterns:{description:\"Array of glob patterns; files matching them will use the classic resolution\",type:\"STRING\",default:[],isArray:!0},pnpZipBackend:{description:\"Whether to use the experimental js implementation for the ZipFS\",type:\"STRING\",values:[\"libzip\",\"js\"],default:\"libzip\"},pnpEnableEsmLoader:{description:\"If true, Yarn will generate an ESM loader (`.pnp.loader.mjs`). If this is not explicitly set Yarn tries to automatically detect whether ESM support is required.\",type:\"BOOLEAN\",default:!1},pnpEnableInlining:{description:\"If true, the PnP data will be inlined along with the generated loader\",type:\"BOOLEAN\",default:!0},pnpFallbackMode:{description:\"If true, the generated PnP loader will follow the top-level fallback rule\",type:\"STRING\",default:\"dependencies-only\"},pnpUnpluggedFolder:{description:\"Folder where the unplugged packages must be stored\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/unplugged\"}},linkers:[sg],commands:[Sw]},Cdt=Idt;var UBe=ut(OBe());Yt();var xY=ut(Ie(\"crypto\")),_Be=ut(Ie(\"fs\")),HBe=1,Ti=\"node_modules\",aN=\".bin\",jBe=\".yarn-state.yml\",Mdt=1e3,kY=(s=>(s.CLASSIC=\"classic\",s.HARDLINKS_LOCAL=\"hardlinks-local\",s.HARDLINKS_GLOBAL=\"hardlinks-global\",s))(kY||{}),jD=class{constructor(){this.installStateCache=new Map}getCustomDataKey(){return JSON.stringify({name:\"NodeModulesLinker\",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error(\"Assertion failed: Expected the node-modules linker to be enabled\");let s=r.project.tryWorkspaceByLocator(e);if(s)return s.cwd;let a=await je.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await PY(r.project,{unrollAliases:!0}));if(a===null)throw new nt(\"Couldn't find the node_modules state file - running an install might help (findPackageLocation)\");let n=a.locatorMap.get(G.stringifyLocator(e));if(!n){let p=new nt(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw p.code=\"LOCATOR_NOT_INSTALLED\",p}let c=n.locations.sort((p,h)=>p.split(J.sep).length-h.split(J.sep).length),f=J.join(r.project.configuration.startingCwd,Ti);return c.find(p=>J.contains(f,p))||n.locations[0]}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=await je.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await PY(r.project,{unrollAliases:!0}));if(s===null)return null;let{locationRoot:a,segments:n}=lN(J.resolve(e),{skipPrefix:r.project.cwd}),c=s.locationTree.get(a);if(!c)return null;let f=c.locator;for(let p of n){if(c=c.children.get(p),!c)break;f=c.locator||f}return G.parseLocator(f)}makeInstaller(e){return new bY(e)}isEnabled(e){return e.project.configuration.get(\"nodeLinker\")===\"node-modules\"}},bY=class{constructor(e){this.opts=e;this.localStore=new Map;this.realLocatorChecksums=new Map;this.customData={store:new Map}}attachCustomData(e){this.customData=e}async installPackage(e,r){let s=J.resolve(r.packageFs.getRealPath(),r.prefixPath),a=this.customData.store.get(e.locatorHash);if(typeof a>\"u\"&&(a=await Udt(e,r),e.linkType===\"HARD\"&&this.customData.store.set(e.locatorHash,a)),!G.isPackageCompatible(e,this.opts.project.configuration.getSupportedArchitectures()))return{packageLocation:null,buildRequest:null};let n=new Map,c=new Set;n.has(G.stringifyIdent(e))||n.set(G.stringifyIdent(e),e.reference);let f=e;if(G.isVirtualLocator(e)){f=G.devirtualizeLocator(e);for(let E of e.peerDependencies.values())n.set(G.stringifyIdent(E),null),c.add(G.stringifyIdent(E))}let p={packageLocation:`${fe.fromPortablePath(s)}/`,packageDependencies:n,packagePeers:c,linkType:e.linkType,discardFromLookup:r.discardFromLookup??!1};this.localStore.set(e.locatorHash,{pkg:e,customPackageData:a,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:p});let h=r.checksum?r.checksum.substring(r.checksum.indexOf(\"/\")+1):null;return this.realLocatorChecksums.set(f.locatorHash,h),{packageLocation:s,buildRequest:null}}async attachInternalDependencies(e,r){let s=this.localStore.get(e.locatorHash);if(typeof s>\"u\")throw new Error(\"Assertion failed: Expected information object to have been registered\");for(let[a,n]of r){let c=G.areIdentsEqual(a,n)?n.reference:[G.stringifyIdent(n),n.reference];s.pnpNode.packageDependencies.set(G.stringifyIdent(a),c)}}async attachExternalDependents(e,r){throw new Error(\"External dependencies haven't been implemented for the node-modules linker\")}async finalizeInstall(){if(this.opts.project.configuration.get(\"nodeLinker\")!==\"node-modules\")return;let e=new uo({baseFs:new $f({maxOpenFiles:80,readOnlyArchives:!0})}),r=await PY(this.opts.project),s=this.opts.project.configuration.get(\"nmMode\");(r===null||s!==r.nmMode)&&(this.opts.project.storedBuildState.clear(),r={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map,nmMode:s,mtimeMs:0});let a=new Map(this.opts.project.workspaces.map(S=>{let P=this.opts.project.configuration.get(\"nmHoistingLimits\");try{P=je.validateEnum(xD,S.manifest.installConfig?.hoistingLimits??P)}catch{let I=G.prettyWorkspace(this.opts.project.configuration,S);this.opts.report.reportWarning(57,`${I}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(xD).join(\", \")}, using default: \"${P}\"`)}return[S.relativeCwd,P]})),n=new Map(this.opts.project.workspaces.map(S=>{let P=this.opts.project.configuration.get(\"nmSelfReferences\");return P=S.manifest.installConfig?.selfReferences??P,[S.relativeCwd,P]})),c={VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(S,P)=>Array.isArray(P)?{name:P[0],reference:P[1]}:{name:S,reference:P},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(S=>{let P=S.anchoredLocator;return{name:G.stringifyIdent(P),reference:P.reference}}),getPackageInformation:S=>{let P=S.reference===null?this.opts.project.topLevelWorkspace.anchoredLocator:G.makeLocator(G.parseIdent(S.name),S.reference),I=this.localStore.get(P.locatorHash);if(typeof I>\"u\")throw new Error(\"Assertion failed: Expected the package reference to have been registered\");return I.pnpNode},findPackageLocator:S=>{let P=this.opts.project.tryWorkspaceByCwd(fe.toPortablePath(S));if(P!==null){let I=P.anchoredLocator;return{name:G.stringifyIdent(I),reference:I.reference}}throw new Error(\"Assertion failed: Unimplemented\")},resolveToUnqualified:()=>{throw new Error(\"Assertion failed: Unimplemented\")},resolveUnqualified:()=>{throw new Error(\"Assertion failed: Unimplemented\")},resolveRequest:()=>{throw new Error(\"Assertion failed: Unimplemented\")},resolveVirtual:S=>fe.fromPortablePath(uo.resolveVirtual(fe.toPortablePath(S)))},{tree:f,errors:p,preserveSymlinksRequired:h}=kD(c,{pnpifyFs:!1,validateExternalSoftLinks:!0,hoistingLimitsByCwd:a,project:this.opts.project,selfReferencesByCwd:n});if(!f){for(let{messageName:S,text:P}of p)this.opts.report.reportError(S,P);return}let E=nY(f);await Ydt(r,E,{baseFs:e,project:this.opts.project,report:this.opts.report,realLocatorChecksums:this.realLocatorChecksums,loadManifest:async S=>{let P=G.parseLocator(S),I=this.localStore.get(P.locatorHash);if(typeof I>\"u\")throw new Error(\"Assertion failed: Expected the slot to exist\");return I.customPackageData.manifest}});let C=[];for(let[S,P]of E.entries()){if(WBe(S))continue;let I=G.parseLocator(S),R=this.localStore.get(I.locatorHash);if(typeof R>\"u\")throw new Error(\"Assertion failed: Expected the slot to exist\");if(this.opts.project.tryWorkspaceByLocator(R.pkg))continue;let N=gA.extractBuildRequest(R.pkg,R.customPackageData,R.dependencyMeta,{configuration:this.opts.project.configuration});N&&C.push({buildLocations:P.locations,locator:I,buildRequest:N})}return h&&this.opts.report.reportWarning(72,`The application uses portals and that's why ${he.pretty(this.opts.project.configuration,\"--preserve-symlinks\",he.Type.CODE)} Node option is required for launching it`),{customData:this.customData,records:C}}};async function Udt(t,e){let r=await Ut.tryFind(e.prefixPath,{baseFs:e.packageFs})??new Ut,s=new Set([\"preinstall\",\"install\",\"postinstall\"]);for(let a of r.scripts.keys())s.has(a)||r.scripts.delete(a);return{manifest:{bin:r.bin,scripts:r.scripts},misc:{hasBindingGyp:gA.hasBindingGyp(e)}}}async function _dt(t,e,r,s,{installChangedByUser:a}){let n=\"\";n+=`# Warning: This file is automatically generated. Removing it is fine, but will\n`,n+=`# cause your node_modules installation to become invalidated.\n`,n+=`\n`,n+=`__metadata:\n`,n+=`  version: ${HBe}\n`,n+=`  nmMode: ${s.value}\n`;let c=Array.from(e.keys()).sort(),f=G.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let E of c){let C=e.get(E);n+=`\n`,n+=`${JSON.stringify(E)}:\n`,n+=`  locations:\n`;for(let S of C.locations){let P=J.contains(t.cwd,S);if(P===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=`    - ${JSON.stringify(P)}\n`}if(C.aliases.length>0){n+=`  aliases:\n`;for(let S of C.aliases)n+=`    - ${JSON.stringify(S)}\n`}if(E===f&&r.size>0){n+=`  bin:\n`;for(let[S,P]of r){let I=J.contains(t.cwd,S);if(I===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=`    ${JSON.stringify(I)}:\n`;for(let[R,N]of P){let U=J.relative(J.join(S,Ti),N);n+=`      ${JSON.stringify(R)}: ${JSON.stringify(U)}\n`}}}}let p=t.cwd,h=J.join(p,Ti,jBe);a&&await ce.removePromise(h),await ce.changeFilePromise(h,n,{automaticNewlines:!0})}async function PY(t,{unrollAliases:e=!1}={}){let r=t.cwd,s=J.join(r,Ti,jBe),a;try{a=await ce.statPromise(s)}catch{}if(!a)return null;let n=ls(await ce.readFilePromise(s,\"utf8\"));if(n.__metadata.version>HBe)return null;let c=n.__metadata.nmMode||\"classic\",f=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let C=E.locations.map(P=>J.join(r,P)),S=E.bin;if(S)for(let[P,I]of Object.entries(S)){let R=J.join(r,fe.toPortablePath(P)),N=je.getMapWithDefault(p,R);for(let[U,W]of Object.entries(I))N.set(U,fe.toPortablePath([R,Ti,W].join(J.sep)))}if(f.set(h,{target:vt.dot,linkType:\"HARD\",locations:C,aliases:E.aliases||[]}),e&&E.aliases)for(let P of E.aliases){let{scope:I,name:R}=G.parseLocator(h),N=G.makeLocator(G.makeIdent(I,R),P),U=G.stringifyLocator(N);f.set(U,{target:vt.dot,linkType:\"HARD\",locations:C,aliases:[]})}}return{locatorMap:f,binSymlinks:p,locationTree:GBe(f,{skipPrefix:t.cwd}),nmMode:c,mtimeMs:a.mtimeMs}}var bw=async(t,e)=>{if(t.split(J.sep).indexOf(Ti)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{let r;if(!e.innerLoop&&(r=await ce.lstatPromise(t),!r.isDirectory()&&!r.isSymbolicLink()||r.isSymbolicLink()&&!e.isWorkspaceDir)){await ce.unlinkPromise(t);return}let s=await ce.readdirPromise(t,{withFileTypes:!0});for(let n of s){let c=J.join(t,n.name);n.isDirectory()?(n.name!==Ti||e&&e.innerLoop)&&await bw(c,{innerLoop:!0,contentsOnly:!1}):await ce.unlinkPromise(c)}let a=!e.innerLoop&&e.isWorkspaceDir&&r?.isSymbolicLink();!e.contentsOnly&&!a&&await ce.rmdirPromise(t)}catch(r){if(r.code!==\"ENOENT\"&&r.code!==\"ENOTEMPTY\")throw r}},LBe=4,lN=(t,{skipPrefix:e})=>{let r=J.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let s=r.split(J.sep).filter(p=>p!==\"\"),a=s.indexOf(Ti),n=s.slice(0,a).join(J.sep),c=J.join(e,n),f=s.slice(a);return{locationRoot:c,segments:f}},GBe=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let s=()=>({children:new Map,linkType:\"HARD\"});for(let[a,n]of t.entries()){if(n.linkType===\"SOFT\"&&J.contains(e,n.target)!==null){let f=je.getFactoryWithDefault(r,n.target,s);f.locator=a,f.linkType=n.linkType}for(let c of n.locations){let{locationRoot:f,segments:p}=lN(c,{skipPrefix:e}),h=je.getFactoryWithDefault(r,f,s);for(let E=0;E<p.length;++E){let C=p[E];if(C!==\".\"){let S=je.getFactoryWithDefault(h.children,C,s);h.children.set(C,S),h=S}E===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},QY=async(t,e,r)=>{if(process.platform===\"win32\"&&r===\"junctions\"){let s;try{s=await ce.lstatPromise(t)}catch{}if(!s||s.isDirectory()){await ce.symlinkPromise(t,e,\"junction\");return}}await ce.symlinkPromise(J.relative(J.dirname(e),t),e)};async function qBe(t,e,r){let s=J.join(t,`${xY.default.randomBytes(16).toString(\"hex\")}.tmp`);try{await ce.writeFilePromise(s,r);try{await ce.linkPromise(s,e)}catch{}}finally{await ce.unlinkPromise(s)}}async function Hdt({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:s,baseFs:a,nmMode:n}){if(r.kind===\"file\"){if(n.value===\"hardlinks-global\"&&s&&r.digest){let f=J.join(s,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await ce.statPromise(f);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-Mdt))if(await Nn.checksumFile(f,{baseFs:ce,algorithm:\"sha1\"})!==r.digest){let C=J.join(s,`${xY.default.randomBytes(16).toString(\"hex\")}.tmp`);await ce.renamePromise(f,C);let S=await a.readFilePromise(t);await ce.writeFilePromise(C,S);try{await ce.linkPromise(C,f),r.mtimeMs=new Date().getTime(),await ce.unlinkPromise(C)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await ce.linkPromise(f,e),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(t);await qBe(s,f,h),r.mtimeMs=new Date().getTime();try{await ce.linkPromise(f,e)}catch(E){E&&E.code&&E.code==\"EXDEV\"&&(n.value=\"hardlinks-local\",await a.copyFilePromise(t,e))}}}else await a.copyFilePromise(t,e);let c=r.mode&511;c!==420&&await ce.chmodPromise(e,c)}}var jdt=async(t,e,{baseFs:r,globalHardlinksStore:s,nmMode:a,windowsLinkType:n,packageChecksum:c})=>{await ce.mkdirPromise(t,{recursive:!0});let f=async(E=vt.dot)=>{let C=J.join(e,E),S=await r.readdirPromise(C,{withFileTypes:!0}),P=new Map;for(let I of S){let R=J.join(E,I.name),N,U=J.join(C,I.name);if(I.isFile()){if(N={kind:\"file\",mode:(await r.lstatPromise(U)).mode},a.value===\"hardlinks-global\"){let W=await Nn.checksumFile(U,{baseFs:r,algorithm:\"sha1\"});N.digest=W}}else if(I.isDirectory())N={kind:\"directory\"};else if(I.isSymbolicLink())N={kind:\"symlink\",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,\"0\")})`);if(P.set(R,N),I.isDirectory()&&R!==Ti){let W=await f(R);for(let[ee,ie]of W)P.set(ee,ie)}}return P},p;if(a.value===\"hardlinks-global\"&&s&&c){let E=J.join(s,c.substring(0,2),`${c.substring(2)}.json`);try{p=new Map(Object.entries(JSON.parse(await ce.readFilePromise(E,\"utf8\"))))}catch{p=await f()}}else p=await f();let h=!1;for(let[E,C]of p){let S=J.join(e,E),P=J.join(t,E);if(C.kind===\"directory\")await ce.mkdirPromise(P,{recursive:!0});else if(C.kind===\"file\"){let I=C.mtimeMs;await Hdt({srcPath:S,dstPath:P,entry:C,nmMode:a,baseFs:r,globalHardlinksStore:s}),C.mtimeMs!==I&&(h=!0)}else C.kind===\"symlink\"&&await QY(J.resolve(J.dirname(P),C.symlinkTo),P,n)}if(a.value===\"hardlinks-global\"&&s&&h&&c){let E=J.join(s,c.substring(0,2),`${c.substring(2)}.json`);await ce.removePromise(E),await qBe(s,E,Buffer.from(JSON.stringify(Object.fromEntries(p))))}};function Gdt(t,e,r,s){let a=new Map,n=new Map,c=new Map,f=!1,p=(h,E,C,S,P)=>{let I=!0,R=J.join(h,E),N=new Set;if(E===Ti||E.startsWith(\"@\")){let W;try{W=ce.statSync(R)}catch{}I=!!W,W?W.mtimeMs>r?(f=!0,N=new Set(ce.readdirSync(R))):N=new Set(C.children.get(E).children.keys()):f=!0;let ee=e.get(h);if(ee){let ie=J.join(h,Ti,aN),ue;try{ue=ce.statSync(ie)}catch{}if(!ue)f=!0;else if(ue.mtimeMs>r){f=!0;let le=new Set(ce.readdirSync(ie)),me=new Map;n.set(h,me);for(let[pe,Be]of ee)le.has(pe)&&me.set(pe,Be)}else n.set(h,ee)}}else I=P.has(E);let U=C.children.get(E);if(I){let{linkType:W,locator:ee}=U,ie={children:new Map,linkType:W,locator:ee};if(S.children.set(E,ie),ee){let ue=je.getSetWithDefault(c,ee);ue.add(R),c.set(ee,ue)}for(let ue of U.children.keys())p(R,ue,U,ie,N)}else U.locator&&s.storedBuildState.delete(G.parseLocator(U.locator).locatorHash)};for(let[h,E]of t){let{linkType:C,locator:S}=E,P={children:new Map,linkType:C,locator:S};if(a.set(h,P),S){let I=je.getSetWithDefault(c,E.locator);I.add(h),c.set(E.locator,I)}E.children.has(Ti)&&p(h,Ti,E,P,new Set)}return{locationTree:a,binSymlinks:n,locatorLocations:c,installChangedByUser:f}}function WBe(t){let e=G.parseDescriptor(t);return G.isVirtualDescriptor(e)&&(e=G.devirtualizeDescriptor(e)),e.range.startsWith(\"link:\")}async function qdt(t,e,r,{loadManifest:s}){let a=new Map;for(let[f,{locations:p}]of t){let h=WBe(f)?null:await s(f,p[0]),E=new Map;if(h)for(let[C,S]of h.bin){let P=J.join(p[0],S);S!==\"\"&&ce.existsSync(P)&&E.set(C,S)}a.set(f,E)}let n=new Map,c=(f,p,h)=>{let E=new Map,C=J.contains(r,f);if(h.locator&&C!==null){let S=a.get(h.locator);for(let[P,I]of S){let R=J.join(f,fe.toPortablePath(I));E.set(P,R)}for(let[P,I]of h.children){let R=J.join(f,P),N=c(R,R,I);N.size>0&&n.set(f,new Map([...n.get(f)||new Map,...N]))}}else for(let[S,P]of h.children){let I=c(J.join(f,S),p,P);for(let[R,N]of I)E.set(R,N)}return E};for(let[f,p]of e){let h=c(f,f,p);h.size>0&&n.set(f,new Map([...n.get(f)||new Map,...h]))}return n}var MBe=(t,e)=>{if(!t||!e)return t===e;let r=G.parseLocator(t);G.isVirtualLocator(r)&&(r=G.devirtualizeLocator(r));let s=G.parseLocator(e);return G.isVirtualLocator(s)&&(s=G.devirtualizeLocator(s)),G.areLocatorsEqual(r,s)};function TY(t){return J.join(t.get(\"globalFolder\"),\"store\")}function Wdt(t,e){let r=s=>{let a=s.split(J.sep),n=a.lastIndexOf(Ti);if(n<0||n==a.length-1)throw new Error(`Assertion failed. Path is outside of any node_modules package ${s}`);return a.slice(0,n+(a[n+1].startsWith(\"@\")?3:2)).join(J.sep)};for(let s of t.values())for(let[a,n]of s)e.has(r(n))&&s.delete(a)}async function Ydt(t,e,{baseFs:r,project:s,report:a,loadManifest:n,realLocatorChecksums:c}){let f=J.join(s.cwd,Ti),{locationTree:p,binSymlinks:h,locatorLocations:E,installChangedByUser:C}=Gdt(t.locationTree,t.binSymlinks,t.mtimeMs,s),S=GBe(e,{skipPrefix:s.cwd}),P=[],I=async({srcDir:Be,dstDir:Ce,linkType:g,globalHardlinksStore:we,nmMode:ye,windowsLinkType:Ae,packageChecksum:se})=>{let Z=(async()=>{try{g===\"SOFT\"?(await ce.mkdirPromise(J.dirname(Ce),{recursive:!0}),await QY(J.resolve(Be),Ce,Ae)):await jdt(Ce,Be,{baseFs:r,globalHardlinksStore:we,nmMode:ye,windowsLinkType:Ae,packageChecksum:se})}catch(De){throw De.message=`While persisting ${Be} -> ${Ce} ${De.message}`,De}finally{ie.tick()}})().then(()=>P.splice(P.indexOf(Z),1));P.push(Z),P.length>LBe&&await Promise.race(P)},R=async(Be,Ce,g)=>{let we=(async()=>{let ye=async(Ae,se,Z)=>{try{Z.innerLoop||await ce.mkdirPromise(se,{recursive:!0});let De=await ce.readdirPromise(Ae,{withFileTypes:!0});for(let Re of De){if(!Z.innerLoop&&Re.name===aN)continue;let mt=J.join(Ae,Re.name),j=J.join(se,Re.name);Re.isDirectory()?(Re.name!==Ti||Z&&Z.innerLoop)&&(await ce.mkdirPromise(j,{recursive:!0}),await ye(mt,j,{...Z,innerLoop:!0})):me.value===\"hardlinks-local\"||me.value===\"hardlinks-global\"?await ce.linkPromise(mt,j):await ce.copyFilePromise(mt,j,_Be.default.constants.COPYFILE_FICLONE)}}catch(De){throw Z.innerLoop||(De.message=`While cloning ${Ae} -> ${se} ${De.message}`),De}finally{Z.innerLoop||ie.tick()}};await ye(Be,Ce,g)})().then(()=>P.splice(P.indexOf(we),1));P.push(we),P.length>LBe&&await Promise.race(P)},N=async(Be,Ce,g)=>{if(g)for(let[we,ye]of Ce.children){let Ae=g.children.get(we);await N(J.join(Be,we),ye,Ae)}else{Ce.children.has(Ti)&&await bw(J.join(Be,Ti),{contentsOnly:!1});let we=J.basename(Be)===Ti&&p.has(J.join(J.dirname(Be)));await bw(Be,{contentsOnly:Be===f,isWorkspaceDir:we})}};for(let[Be,Ce]of p){let g=S.get(Be);for(let[we,ye]of Ce.children){if(we===\".\")continue;let Ae=g&&g.children.get(we),se=J.join(Be,we);await N(se,ye,Ae)}}let U=async(Be,Ce,g)=>{if(g){MBe(Ce.locator,g.locator)||await bw(Be,{contentsOnly:Ce.linkType===\"HARD\"});for(let[we,ye]of Ce.children){let Ae=g.children.get(we);await U(J.join(Be,we),ye,Ae)}}else{Ce.children.has(Ti)&&await bw(J.join(Be,Ti),{contentsOnly:!0});let we=J.basename(Be)===Ti&&S.has(J.join(J.dirname(Be)));await bw(Be,{contentsOnly:Ce.linkType===\"HARD\",isWorkspaceDir:we})}};for(let[Be,Ce]of S){let g=p.get(Be);for(let[we,ye]of Ce.children){if(we===\".\")continue;let Ae=g&&g.children.get(we);await U(J.join(Be,we),ye,Ae)}}let W=new Map,ee=[];for(let[Be,Ce]of E)for(let g of Ce){let{locationRoot:we,segments:ye}=lN(g,{skipPrefix:s.cwd}),Ae=S.get(we),se=we;if(Ae){for(let Z of ye)if(se=J.join(se,Z),Ae=Ae.children.get(Z),!Ae)break;if(Ae){let Z=MBe(Ae.locator,Be),De=e.get(Ae.locator),Re=De.target,mt=se,j=De.linkType;if(Z)W.has(Re)||W.set(Re,mt);else if(Re!==mt){let rt=G.parseLocator(Ae.locator);G.isVirtualLocator(rt)&&(rt=G.devirtualizeLocator(rt)),ee.push({srcDir:Re,dstDir:mt,linkType:j,realLocatorHash:rt.locatorHash})}}}}for(let[Be,{locations:Ce}]of e.entries())for(let g of Ce){let{locationRoot:we,segments:ye}=lN(g,{skipPrefix:s.cwd}),Ae=p.get(we),se=S.get(we),Z=we,De=e.get(Be),Re=G.parseLocator(Be);G.isVirtualLocator(Re)&&(Re=G.devirtualizeLocator(Re));let mt=Re.locatorHash,j=De.target,rt=g;if(j===rt)continue;let Fe=De.linkType;for(let Ne of ye)se=se.children.get(Ne);if(!Ae)ee.push({srcDir:j,dstDir:rt,linkType:Fe,realLocatorHash:mt});else for(let Ne of ye)if(Z=J.join(Z,Ne),Ae=Ae.children.get(Ne),!Ae){ee.push({srcDir:j,dstDir:rt,linkType:Fe,realLocatorHash:mt});break}}let ie=Ao.progressViaCounter(ee.length),ue=a.reportProgress(ie),le=s.configuration.get(\"nmMode\"),me={value:le},pe=s.configuration.get(\"winLinkType\");try{let Be=me.value===\"hardlinks-global\"?`${TY(s.configuration)}/v1`:null;if(Be&&!await ce.existsPromise(Be)){await ce.mkdirpPromise(Be);for(let g=0;g<256;g++)await ce.mkdirPromise(J.join(Be,g.toString(16).padStart(2,\"0\")))}for(let g of ee)(g.linkType===\"SOFT\"||!W.has(g.srcDir))&&(W.set(g.srcDir,g.dstDir),await I({...g,globalHardlinksStore:Be,nmMode:me,windowsLinkType:pe,packageChecksum:c.get(g.realLocatorHash)||null}));await Promise.all(P),P.length=0;for(let g of ee){let we=W.get(g.srcDir);g.linkType!==\"SOFT\"&&g.dstDir!==we&&await R(we,g.dstDir,{nmMode:me})}await Promise.all(P),await ce.mkdirPromise(f,{recursive:!0}),Wdt(h,new Set(ee.map(g=>g.dstDir)));let Ce=await qdt(e,S,s.cwd,{loadManifest:n});await Vdt(h,Ce,s.cwd,pe),await _dt(s,e,Ce,me,{installChangedByUser:C}),le==\"hardlinks-global\"&&me.value==\"hardlinks-local\"&&a.reportWarningOnce(74,\"'nmMode' has been downgraded to 'hardlinks-local' due to global cache and install folder being on different devices\")}finally{ue.stop()}}async function Vdt(t,e,r,s){for(let a of t.keys()){if(J.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);if(!e.has(a)){let n=J.join(a,Ti,aN);await ce.removePromise(n)}}for(let[a,n]of e){if(J.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);let c=J.join(a,Ti,aN),f=t.get(a)||new Map;await ce.mkdirPromise(c,{recursive:!0});for(let p of f.keys())n.has(p)||(await ce.removePromise(J.join(c,p)),process.platform===\"win32\"&&await ce.removePromise(J.join(c,`${p}.cmd`)));for(let[p,h]of n){let E=f.get(p),C=J.join(c,p);E!==h&&(process.platform===\"win32\"?await(0,UBe.default)(fe.fromPortablePath(h),fe.fromPortablePath(C),{createPwshFile:!1}):(await ce.removePromise(C),await QY(h,C,s),J.contains(r,await ce.realpathPromise(h))!==null&&await ce.chmodPromise(h,493)))}}}Ge();Dt();eA();var GD=class extends sg{constructor(){super(...arguments);this.mode=\"loose\"}makeInstaller(r){return new RY(r)}},RY=class extends Gm{constructor(){super(...arguments);this.mode=\"loose\"}async transformPnpSettings(r){let s=new uo({baseFs:new $f({maxOpenFiles:80,readOnlyArchives:!0})}),a=SBe(r,this.opts.project.cwd,s),{tree:n,errors:c}=kD(a,{pnpifyFs:!1,project:this.opts.project});if(!n){for(let{messageName:C,text:S}of c)this.opts.report.reportError(C,S);return}let f=new Map;r.fallbackPool=f;let p=(C,S)=>{let P=G.parseLocator(S.locator),I=G.stringifyIdent(P);I===C?f.set(C,P.reference):f.set(C,[I,P.reference])},h=J.join(this.opts.project.cwd,Er.nodeModules),E=n.get(h);if(!(typeof E>\"u\")){if(\"target\"in E)throw new Error(\"Assertion failed: Expected the root junction point to be a directory\");for(let C of E.dirList){let S=J.join(h,C),P=n.get(S);if(typeof P>\"u\")throw new Error(\"Assertion failed: Expected the child to have been registered\");if(\"target\"in P)p(C,P);else for(let I of P.dirList){let R=J.join(S,I),N=n.get(R);if(typeof N>\"u\")throw new Error(\"Assertion failed: Expected the subchild to have been registered\");if(\"target\"in N)p(`${C}/${I}`,N);else throw new Error(\"Assertion failed: Expected the leaf junction to be a package\")}}}}};var Jdt={hooks:{cleanGlobalArtifacts:async t=>{let e=TY(t);await ce.removePromise(e)}},configuration:{nmHoistingLimits:{description:\"Prevents packages to be hoisted past specific levels\",type:\"STRING\",values:[\"workspaces\",\"dependencies\",\"none\"],default:\"none\"},nmMode:{description:\"Defines in which measure Yarn must use hardlinks and symlinks when generated `node_modules` directories.\",type:\"STRING\",values:[\"classic\",\"hardlinks-local\",\"hardlinks-global\"],default:\"classic\"},nmSelfReferences:{description:\"Defines whether the linker should generate self-referencing symlinks for workspaces.\",type:\"BOOLEAN\",default:!0}},linkers:[jD,GD]},Kdt=Jdt;var FK={};Vt(FK,{NpmHttpFetcher:()=>VD,NpmRemapResolver:()=>JD,NpmSemverFetcher:()=>oh,NpmSemverResolver:()=>KD,NpmTagResolver:()=>zD,default:()=>ubt,npmConfigUtils:()=>hi,npmHttpUtils:()=>en,npmPublishUtils:()=>v1});Ge();var $Be=ut(Ai());var oi=\"npm:\";var en={};Vt(en,{AuthType:()=>zBe,customPackageError:()=>qm,del:()=>Amt,get:()=>Wm,getIdentUrl:()=>WD,getPackageMetadata:()=>Qw,handleInvalidAuthenticationError:()=>ag,post:()=>umt,put:()=>fmt});Ge();Ge();Dt();var LY=ut(Vv());ql();var KBe=ut(Ai());var hi={};Vt(hi,{RegistryType:()=>VBe,getAuditRegistry:()=>zdt,getAuthConfiguration:()=>OY,getDefaultRegistry:()=>qD,getPublishRegistry:()=>Xdt,getRegistryConfiguration:()=>JBe,getScopeConfiguration:()=>NY,getScopeRegistry:()=>Pw,isPackageApproved:()=>xw,normalizeRegistry:()=>Jc});Ge();var YBe=ut(Go()),VBe=(s=>(s.AUDIT_REGISTRY=\"npmAuditRegistry\",s.FETCH_REGISTRY=\"npmRegistryServer\",s.PUBLISH_REGISTRY=\"npmPublishRegistry\",s))(VBe||{});function Jc(t){return t.replace(/\\/$/,\"\")}function zdt({configuration:t}){return qD({configuration:t,type:\"npmAuditRegistry\"})}function Xdt(t,{configuration:e}){return t.publishConfig?.registry?Jc(t.publishConfig.registry):t.name?Pw(t.name.scope,{configuration:e,type:\"npmPublishRegistry\"}):qD({configuration:e,type:\"npmPublishRegistry\"})}function Pw(t,{configuration:e,type:r=\"npmRegistryServer\"}){let s=NY(t,{configuration:e});if(s===null)return qD({configuration:e,type:r});let a=s.get(r);return a===null?qD({configuration:e,type:r}):Jc(a)}function qD({configuration:t,type:e=\"npmRegistryServer\"}){let r=t.get(e);return Jc(r!==null?r:t.get(\"npmRegistryServer\"))}function JBe(t,{configuration:e}){let r=e.get(\"npmRegistries\"),s=Jc(t),a=r.get(s);if(typeof a<\"u\")return a;let n=r.get(s.replace(/^[a-z]+:/,\"\"));return typeof n<\"u\"?n:null}var Zdt=new Map([[\"npmRegistryServer\",\"https://npm.jsr.io/\"]]);function NY(t,{configuration:e}){if(t===null)return null;let s=e.get(\"npmScopes\").get(t);return s||(t===\"jsr\"?Zdt:null)}function OY(t,{configuration:e,ident:r}){let s=r&&NY(r.scope,{configuration:e});return s?.get(\"npmAuthIdent\")||s?.get(\"npmAuthToken\")?s:JBe(t,{configuration:e})||e}function $dt({configuration:t,version:e,publishTimes:r}){let s=t.get(\"npmMinimalAgeGate\");if(s){let a=r?.[e];if(typeof a>\"u\"||(new Date().getTime()-new Date(a).getTime())/60/1e3<s)return!0}return!1}function emt(t,e,r){let s=G.tryParseDescriptor(r);if(!s||s.identHash!==t.identHash&&!YBe.default.isMatch(G.stringifyIdent(t),G.stringifyIdent(s)))return!1;if(s.range===\"unknown\")return!0;let a=Fr.validRange(s.range);return!(!a||!a.test(e))}function tmt({configuration:t,ident:e,version:r}){return t.get(\"npmPreapprovedPackages\").some(s=>emt(e,r,s))}function xw(t){return!$dt(t)||tmt(t)}var zBe=(a=>(a[a.NO_AUTH=0]=\"NO_AUTH\",a[a.BEST_EFFORT=1]=\"BEST_EFFORT\",a[a.CONFIGURATION=2]=\"CONFIGURATION\",a[a.ALWAYS_AUTH=3]=\"ALWAYS_AUTH\",a))(zBe||{});async function ag(t,{attemptedAs:e,registry:r,headers:s,configuration:a}){if(uN(t))throw new jt(41,\"Invalid OTP token\");if(t.originalError?.name===\"HTTPError\"&&t.originalError?.response.statusCode===401)throw new jt(41,`Invalid authentication (${typeof e!=\"string\"?`as ${await hmt(r,s,{configuration:a})}`:`attempted as ${e}`})`)}function qm(t,e){let r=t.response?.statusCode;return r?r===404?\"Package not found\":r>=500&&r<600?`The registry appears to be down (using a ${he.applyHyperlink(e,\"local cache\",\"https://yarnpkg.com/advanced/lexicon#local-cache\")} might have protected you against such outages)`:null:null}function WD(t){return t.scope?`/@${t.scope}%2f${t.name}`:`/${t.name}`}var XBe=new Map,rmt=new Map;async function nmt(t){return await je.getFactoryWithDefault(XBe,t,async()=>{let e=null;try{e=await ce.readJsonPromise(t)}catch{}return e})}async function imt(t,e,{configuration:r,cached:s,registry:a,headers:n,version:c,...f}){return await je.getFactoryWithDefault(rmt,t,async()=>await Wm(WD(e),{...f,customErrorMessage:qm,configuration:r,registry:a,ident:e,headers:{...n,\"If-None-Match\":s?.etag,\"If-Modified-Since\":s?.lastModified},wrapNetworkRequest:async p=>async()=>{let h=await p();if(h.statusCode===304){if(s===null)throw new Error(\"Assertion failed: cachedMetadata should not be null\");return{...h,body:s.metadata}}let E=omt(JSON.parse(h.body.toString())),C={metadata:E,etag:h.headers.etag,lastModified:h.headers[\"last-modified\"]};return XBe.set(t,Promise.resolve(C)),Promise.resolve().then(async()=>{let S=`${t}-${process.pid}.tmp`;await ce.mkdirPromise(J.dirname(S),{recursive:!0}),await ce.writeJsonPromise(S,C,{compact:!0}),await ce.renamePromise(S,t)}).catch(()=>{}),{...h,body:E}}}))}function smt(t){return t.scope!==null?`@${t.scope}-${t.name}-${t.scope.length}`:t.name}async function Qw(t,{cache:e,project:r,registry:s,headers:a,version:n,...c}){let{configuration:f}=r;s=YD(f,{ident:t,registry:s});let p=lmt(f,s),h=J.join(p,`${smt(t)}.json`),E=null;if(!r.lockfileNeedsRefresh&&(E=await nmt(h),E)){if(typeof n<\"u\"&&typeof E.metadata.versions[n]<\"u\")return E.metadata;if(f.get(\"enableOfflineMode\")){let C=structuredClone(E.metadata),S=new Set;if(e){for(let I of Object.keys(C.versions)){let R=G.makeLocator(t,`npm:${I}`),N=e.getLocatorMirrorPath(R);(!N||!ce.existsSync(N))&&(delete C.versions[I],S.add(I))}let P=C[\"dist-tags\"].latest;if(S.has(P)){let I=Object.keys(E.metadata.versions).sort(KBe.default.compare),R=I.indexOf(P);for(;S.has(I[R])&&R>=0;)R-=1;R>=0?C[\"dist-tags\"].latest=I[R]:delete C[\"dist-tags\"].latest}}return C}}return await imt(h,t,{...c,configuration:f,cached:E,registry:s,headers:a,version:n})}var ZBe=[\"name\",\"dist.tarball\",\"bin\",\"scripts\",\"os\",\"cpu\",\"libc\",\"dependencies\",\"dependenciesMeta\",\"optionalDependencies\",\"peerDependencies\",\"peerDependenciesMeta\",\"deprecated\"];function omt(t){return{\"dist-tags\":t[\"dist-tags\"],versions:Object.fromEntries(Object.entries(t.versions).map(([e,r])=>[e,Kd(r,ZBe)])),time:t.time}}var amt=Nn.makeHash(\"time\",...ZBe).slice(0,6);function lmt(t,e){let r=cmt(t),s=new URL(e);return J.join(r,amt,s.hostname)}function cmt(t){return J.join(t.get(\"globalFolder\"),\"metadata/npm\")}async function Wm(t,{configuration:e,headers:r,ident:s,authType:a,allowOidc:n,registry:c,...f}){c=YD(e,{ident:s,registry:c}),s&&s.scope&&typeof a>\"u\"&&(a=1);let p=await cN(c,{authType:a,allowOidc:n,configuration:e,ident:s});p&&(r={...r,authorization:p});try{return await nn.get(t.charAt(0)===\"/\"?`${c}${t}`:t,{configuration:e,headers:r,...f})}catch(h){throw await ag(h,{registry:c,configuration:e,headers:r}),h}}async function umt(t,e,{attemptedAs:r,configuration:s,headers:a,ident:n,authType:c=3,allowOidc:f,registry:p,otp:h,...E}){p=YD(s,{ident:n,registry:p});let C=await cN(p,{authType:c,allowOidc:f,configuration:s,ident:n});C&&(a={...a,authorization:C}),h&&(a={...a,...kw(h)});try{return await nn.post(p+t,e,{configuration:s,headers:a,...E})}catch(S){if(!uN(S)||h)throw await ag(S,{attemptedAs:r,registry:p,configuration:s,headers:a}),S;h=await MY(S,{configuration:s});let P={...a,...kw(h)};try{return await nn.post(`${p}${t}`,e,{configuration:s,headers:P,...E})}catch(I){throw await ag(I,{attemptedAs:r,registry:p,configuration:s,headers:a}),I}}}async function fmt(t,e,{attemptedAs:r,configuration:s,headers:a,ident:n,authType:c=3,allowOidc:f,registry:p,otp:h,...E}){p=YD(s,{ident:n,registry:p});let C=await cN(p,{authType:c,allowOidc:f,configuration:s,ident:n});C&&(a={...a,authorization:C}),h&&(a={...a,...kw(h)});try{return await nn.put(p+t,e,{configuration:s,headers:a,...E})}catch(S){if(!uN(S))throw await ag(S,{attemptedAs:r,registry:p,configuration:s,headers:a}),S;h=await MY(S,{configuration:s});let P={...a,...kw(h)};try{return await nn.put(`${p}${t}`,e,{configuration:s,headers:P,...E})}catch(I){throw await ag(I,{attemptedAs:r,registry:p,configuration:s,headers:a}),I}}}async function Amt(t,{attemptedAs:e,configuration:r,headers:s,ident:a,authType:n=3,allowOidc:c,registry:f,otp:p,...h}){f=YD(r,{ident:a,registry:f});let E=await cN(f,{authType:n,allowOidc:c,configuration:r,ident:a});E&&(s={...s,authorization:E}),p&&(s={...s,...kw(p)});try{return await nn.del(f+t,{configuration:r,headers:s,...h})}catch(C){if(!uN(C)||p)throw await ag(C,{attemptedAs:e,registry:f,configuration:r,headers:s}),C;p=await MY(C,{configuration:r});let S={...s,...kw(p)};try{return await nn.del(`${f}${t}`,{configuration:r,headers:S,...h})}catch(P){throw await ag(P,{attemptedAs:e,registry:f,configuration:r,headers:s}),P}}}function YD(t,{ident:e,registry:r}){if(typeof r>\"u\"&&e)return Pw(e.scope,{configuration:t});if(typeof r!=\"string\")throw new Error(\"Assertion failed: The registry should be a string\");return Jc(r)}async function cN(t,{authType:e=2,allowOidc:r=!1,configuration:s,ident:a}){let n=OY(t,{configuration:s,ident:a}),c=pmt(n,e);if(!c)return null;let f=await s.reduceHook(p=>p.getNpmAuthenticationHeader,void 0,t,{configuration:s,ident:a});if(f)return f;if(n.get(\"npmAuthToken\"))return`Bearer ${n.get(\"npmAuthToken\")}`;if(n.get(\"npmAuthIdent\")){let p=n.get(\"npmAuthIdent\");return p.includes(\":\")?`Basic ${Buffer.from(p).toString(\"base64\")}`:`Basic ${p}`}if(r&&a){let p=await gmt(t,{configuration:s,ident:a});if(p)return`Bearer ${p}`}if(c&&e!==1)throw new jt(33,\"No authentication configured for request\");return null}function pmt(t,e){switch(e){case 2:return t.get(\"npmAlwaysAuth\");case 1:case 3:return!0;case 0:return!1;default:throw new Error(\"Unreachable\")}}async function hmt(t,e,{configuration:r}){if(typeof e>\"u\"||typeof e.authorization>\"u\")return\"an anonymous user\";try{return(await nn.get(new URL(`${t}/-/whoami`).href,{configuration:r,headers:e,jsonResponse:!0})).username??\"an unknown user\"}catch{return\"an unknown user\"}}async function MY(t,{configuration:e}){let r=t.originalError?.response.headers[\"npm-notice\"];if(r&&(await Ot.start({configuration:e,stdout:process.stdout,includeFooter:!1},async a=>{if(a.reportInfo(0,r.replace(/(https?:\\/\\/\\S+)/g,he.pretty(e,\"$1\",he.Type.URL))),!process.env.YARN_IS_TEST_ENV){let n=r.match(/open (https?:\\/\\/\\S+)/i);if(n&&Ui.openUrl){let{openNow:c}=await(0,LY.prompt)({type:\"confirm\",name:\"openNow\",message:\"Do you want to try to open this url now?\",required:!0,initial:!0,onCancel:()=>process.exit(130)});c&&(await Ui.openUrl(n[1])||(a.reportSeparator(),a.reportWarning(0,\"We failed to automatically open the url; you'll have to open it yourself in your browser of choice.\")))}}}),process.stdout.write(`\n`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||\"\";let{otp:s}=await(0,LY.prompt)({type:\"password\",name:\"otp\",message:\"One-time password:\",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`\n`),s}function uN(t){if(t.originalError?.name!==\"HTTPError\")return!1;try{return(t.originalError?.response.headers[\"www-authenticate\"].split(/,\\s*/).map(r=>r.toLowerCase())).includes(\"otp\")}catch{return!1}}function kw(t){return{\"npm-otp\":t}}async function gmt(t,{configuration:e,ident:r}){let s=null;if(process.env.GITLAB_CI)s=process.env.NPM_ID_TOKEN||null;else if(process.env.GITHUB_ACTIONS){if(!(process.env.ACTIONS_ID_TOKEN_REQUEST_URL&&process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN))return null;let a=`npm:${new URL(t).host.replace(\"registry.yarnpkg.com\",\"registry.npmjs.org\").replace(\"yarn.npmjs.org\",\"registry.npmjs.org\")}`,n=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);n.searchParams.append(\"audience\",a),s=(await nn.get(n.href,{configuration:e,jsonResponse:!0,headers:{Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).value}if(!s)return null;try{return(await nn.post(`${t}/-/npm/v1/oidc/token/exchange/package${WD(r)}`,null,{configuration:e,jsonResponse:!0,headers:{Authorization:`Bearer ${s}`}})).token||null}catch{}return null}var VD=class{supports(e,r){if(!e.reference.startsWith(oi))return!1;let{selector:s,params:a}=G.parseRange(e.reference);return!(!$Be.default.valid(s)||a===null||typeof a.__archiveUrl!=\"string\")}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let{params:s}=G.parseRange(e.reference);if(s===null||typeof s.__archiveUrl!=\"string\")throw new Error(\"Assertion failed: The archiveUrl querystring parameter should have been available\");let a=await Wm(s.__archiveUrl,{customErrorMessage:qm,configuration:r.project.configuration,ident:e});return await ps.convertToZip(a,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}};Ge();var JD=class{supportsDescriptor(e,r){return!(!e.range.startsWith(oi)||!G.tryParseDescriptor(e.range.slice(oi.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error(\"Unreachable\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){let s=r.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(oi.length),!0));return r.resolver.getResolutionDependencies(s,r)}async getCandidates(e,r,s){let a=s.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(oi.length),!0));return await s.resolver.getCandidates(a,r,s)}async getSatisfying(e,r,s,a){let n=a.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(oi.length),!0));return a.resolver.getSatisfying(n,r,s,a)}resolve(e,r){throw new Error(\"Unreachable\")}};Ge();Ge();var eve=ut(Ai());var oh=class t{supports(e,r){if(!e.reference.startsWith(oi))return!1;let s=new URL(e.reference);return!(!eve.default.valid(s.pathname)||s.searchParams.has(\"__archiveUrl\"))}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s;try{s=await Wm(t.getLocatorUrl(e),{customErrorMessage:qm,configuration:r.project.configuration,ident:e})}catch{s=await Wm(t.getLocatorUrl(e).replace(/%2f/g,\"/\"),{customErrorMessage:qm,configuration:r.project.configuration,ident:e})}return await ps.convertToZip(s,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:s}){let a=Pw(e.scope,{configuration:s}),n=t.getLocatorUrl(e);return r=r.replace(/^https?:(\\/\\/(?:[^/]+\\.)?npmjs.org(?:$|\\/))/,\"https:$1\"),a=a.replace(/^https:\\/\\/registry\\.npmjs\\.org($|\\/)/,\"https://registry.yarnpkg.com$1\"),r=r.replace(/^https:\\/\\/registry\\.npmjs\\.org($|\\/)/,\"https://registry.yarnpkg.com$1\"),r===a+n||r===a+n.replace(/%2f/g,\"/\")}static getLocatorUrl(e){let r=Fr.clean(e.reference.slice(oi.length));if(r===null)throw new jt(10,\"The npm semver resolver got selected, but the version isn't semver\");return`${WD(e)}/-/${e.name}-${r}.tgz`}};Ge();Ge();Ge();var UY=ut(Ai());var fN=G.makeIdent(null,\"node-gyp\"),dmt=/\\b(node-gyp|prebuild-install)\\b/,KD=class{supportsDescriptor(e,r){return e.range.startsWith(oi)?!!Fr.validRange(e.range.slice(oi.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(oi))return!1;let{selector:s}=G.parseRange(e.reference);return!!UY.default.valid(s)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=Fr.validRange(e.range.slice(oi.length));if(a===null)throw new Error(`Expected a valid range, got ${e.range.slice(oi.length)}`);let n=await Qw(e,{cache:s.fetchOptions?.cache,project:s.project,version:UY.default.valid(a.raw)?a.raw:void 0}),c=je.mapAndFilter(Object.keys(n.versions),h=>{try{let E=new Fr.SemVer(h);if(a.test(E))return xw({configuration:s.project.configuration,ident:e,version:h,publishTimes:n.time})?E:je.mapAndFilter.skip}catch{}return je.mapAndFilter.skip}),f=c.filter(h=>!n.versions[h.raw].deprecated),p=f.length>0?f:c;return p.sort((h,E)=>-h.compare(E)),p.map(h=>{let E=G.makeLocator(e,`${oi}${h.raw}`),C=n.versions[h.raw].dist.tarball;return oh.isConventionalTarballUrl(E,C,{configuration:s.project.configuration})?E:G.bindLocator(E,{__archiveUrl:C})})}async getSatisfying(e,r,s,a){let n=Fr.validRange(e.range.slice(oi.length));if(n===null)throw new Error(`Expected a valid range, got ${e.range.slice(oi.length)}`);return{locators:je.mapAndFilter(s,p=>{if(p.identHash!==e.identHash)return je.mapAndFilter.skip;let h=G.tryParseRange(p.reference,{requireProtocol:oi});if(!h)return je.mapAndFilter.skip;let E=new Fr.SemVer(h.selector);return n.test(E)?{locator:p,version:E}:je.mapAndFilter.skip}).sort((p,h)=>-p.version.compare(h.version)).map(({locator:p})=>p),sorted:!0}}async resolve(e,r){let{selector:s}=G.parseRange(e.reference),a=Fr.clean(s);if(a===null)throw new jt(10,\"The npm semver resolver got selected, but the version isn't semver\");let n=await Qw(e,{cache:r.fetchOptions?.cache,project:r.project,version:a});if(!Object.hasOwn(n,\"versions\"))throw new jt(15,'Registry returned invalid data for - missing \"versions\" field');if(!Object.hasOwn(n.versions,a))throw new jt(16,`Registry failed to return reference \"${a}\"`);let c=new Ut;if(c.load(n.versions[a]),!c.dependencies.has(fN.identHash)&&!c.peerDependencies.has(fN.identHash)){for(let f of c.scripts.values())if(f.match(dmt)){c.dependencies.set(fN.identHash,G.makeDescriptor(fN,\"latest\"));break}}return{...e,version:a,languageName:\"node\",linkType:\"HARD\",conditions:c.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(c.dependencies),peerDependencies:c.peerDependencies,dependenciesMeta:c.dependenciesMeta,peerDependenciesMeta:c.peerDependenciesMeta,bin:c.bin}}};Ge();Ge();var AN=ut(Ai());var zD=class{supportsDescriptor(e,r){return!(!e.range.startsWith(oi)||!Mp.test(e.range.slice(oi.length)))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error(\"Unreachable\")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(oi.length),n=await Qw(e,{cache:s.fetchOptions?.cache,project:s.project});if(!Object.hasOwn(n,\"dist-tags\"))throw new jt(15,'Registry returned invalid data - missing \"dist-tags\" field');let c=n[\"dist-tags\"];if(!Object.hasOwn(c,a))throw new jt(16,`Registry failed to return tag \"${a}\"`);let f=Object.keys(n.versions),p=n.time,h=c[a];if(a===\"latest\"&&!xw({configuration:s.project.configuration,ident:e,version:h,publishTimes:p})){let S=h.includes(\"-\"),P=AN.default.rsort(f).find(I=>AN.default.lt(I,h)&&(S||!I.includes(\"-\"))&&xw({configuration:s.project.configuration,ident:e,version:I,publishTimes:p}));if(!P)throw new jt(16,`The version for tag \"${a}\" is quarantined, and no lower version is available`);h=P}let E=G.makeLocator(e,`${oi}${h}`),C=n.versions[h].dist.tarball;return oh.isConventionalTarballUrl(E,C,{configuration:s.project.configuration})?[E]:[G.bindLocator(E,{__archiveUrl:C})]}async getSatisfying(e,r,s,a){let n=[];for(let c of s){if(c.identHash!==e.identHash)continue;let f=G.tryParseRange(c.reference,{requireProtocol:oi});if(!(!f||!AN.default.valid(f.selector))){if(f.params?.__archiveUrl){let p=G.makeRange({protocol:oi,selector:f.selector,source:null,params:null}),[h]=await a.resolver.getCandidates(G.makeDescriptor(e,p),r,a);if(c.reference!==h.reference)continue}n.push(c)}}return{locators:n,sorted:!1}}async resolve(e,r){throw new Error(\"Unreachable\")}};var v1={};Vt(v1,{getGitHead:()=>abt,getPublishAccess:()=>qxe,getReadmeContent:()=>Wxe,makePublishBody:()=>obt});Ge();Ge();Dt();var bV={};Vt(bV,{PackCommand:()=>jw,default:()=>KEt,packUtils:()=>yA});Ge();Ge();Ge();Dt();Yt();var yA={};Vt(yA,{genPackList:()=>NN,genPackStream:()=>DV,genPackageManifest:()=>QSe,hasPackScripts:()=>vV,prepareForPack:()=>SV});Ge();Dt();var BV=ut(Go()),xSe=ut(SSe()),kSe=Ie(\"zlib\"),MEt=[\"/package.json\",\"/readme\",\"/readme.*\",\"/license\",\"/license.*\",\"/licence\",\"/licence.*\",\"/changelog\",\"/changelog.*\"],UEt=[\"/package.tgz\",\".github\",\".git\",\".hg\",\"node_modules\",\".npmignore\",\".gitignore\",\".#*\",\".DS_Store\"];async function vV(t){return!!(In.hasWorkspaceScript(t,\"prepack\")||In.hasWorkspaceScript(t,\"postpack\"))}async function SV(t,{report:e},r){await In.maybeExecuteWorkspaceLifecycleScript(t,\"prepack\",{report:e});try{let s=J.join(t.cwd,Ut.fileName);await ce.existsPromise(s)&&await t.manifest.loadFile(s,{baseFs:ce}),await r()}finally{await In.maybeExecuteWorkspaceLifecycleScript(t,\"postpack\",{report:e})}}async function DV(t,e){typeof e>\"u\"&&(e=await NN(t));let r=new Set;for(let n of t.manifest.publishConfig?.executableFiles??new Set)r.add(J.normalize(n));for(let n of t.manifest.bin.values())r.add(J.normalize(n));let s=xSe.default.pack();process.nextTick(async()=>{for(let n of e){let c=J.normalize(n),f=J.resolve(t.cwd,c),p=J.join(\"package\",c),h=await ce.lstatPromise(f),E={name:p,mtime:new Date(fi.SAFE_TIME*1e3)},C=r.has(c)?493:420,S,P,I=new Promise((N,U)=>{S=N,P=U}),R=N=>{N?P(N):S()};if(h.isFile()){let N;c===\"package.json\"?N=Buffer.from(JSON.stringify(await QSe(t),null,2)):N=await ce.readFilePromise(f),s.entry({...E,mode:C,type:\"file\"},N,R)}else h.isSymbolicLink()?s.entry({...E,mode:C,type:\"symlink\",linkname:await ce.readlinkPromise(f)},R):R(new Error(`Unsupported file type ${h.mode} for ${fe.fromPortablePath(c)}`));await I}s.finalize()});let a=(0,kSe.createGzip)();return s.pipe(a),a}async function QSe(t){let e=JSON.parse(JSON.stringify(t.manifest.raw));return await t.project.configuration.triggerHook(r=>r.beforeWorkspacePacking,t,e),e}async function NN(t){let e=t.project,r=e.configuration,s={accept:[],reject:[]};for(let C of UEt)s.reject.push(C);for(let C of MEt)s.accept.push(C);s.reject.push(r.get(\"rcFilename\"));let a=C=>{if(C===null||!C.startsWith(`${t.cwd}/`))return;let S=J.relative(t.cwd,C),P=J.resolve(vt.root,S);s.reject.push(P)};a(J.resolve(e.cwd,Er.lockfile)),a(r.get(\"cacheFolder\")),a(r.get(\"globalFolder\")),a(r.get(\"installStatePath\")),a(r.get(\"virtualFolder\")),a(r.get(\"yarnPath\")),await r.triggerHook(C=>C.populateYarnPaths,e,C=>{a(C)});for(let C of e.workspaces){let S=J.relative(t.cwd,C.cwd);S!==\"\"&&!S.match(/^(\\.\\.)?\\//)&&s.reject.push(`/${S}`)}let n={accept:[],reject:[]},c=t.manifest.publishConfig?.main??t.manifest.main,f=t.manifest.publishConfig?.module??t.manifest.module,p=t.manifest.publishConfig?.browser??t.manifest.browser,h=t.manifest.publishConfig?.bin??t.manifest.bin;c!=null&&n.accept.push(J.resolve(vt.root,c)),f!=null&&n.accept.push(J.resolve(vt.root,f)),typeof p==\"string\"&&n.accept.push(J.resolve(vt.root,p));for(let C of h.values())n.accept.push(J.resolve(vt.root,C));if(p instanceof Map)for(let[C,S]of p.entries())n.accept.push(J.resolve(vt.root,C)),typeof S==\"string\"&&n.accept.push(J.resolve(vt.root,S));let E=t.manifest.files!==null;if(E){n.reject.push(\"/*\");for(let C of t.manifest.files)TSe(n.accept,C,{cwd:vt.root})}return await _Et(t.cwd,{hasExplicitFileList:E,globalList:s,ignoreList:n})}async function _Et(t,{hasExplicitFileList:e,globalList:r,ignoreList:s}){let a=[],n=new Hf(t),c=[[vt.root,[s]]];for(;c.length>0;){let[f,p]=c.pop(),h=await n.lstatPromise(f);if(!bSe(f,{globalList:r,ignoreLists:h.isDirectory()?null:p}))if(h.isDirectory()){let E=await n.readdirPromise(f),C=!1,S=!1;if(!e||f!==vt.root)for(let R of E)C=C||R===\".gitignore\",S=S||R===\".npmignore\";let P=S?await DSe(n,f,\".npmignore\"):C?await DSe(n,f,\".gitignore\"):null,I=P!==null?[P].concat(p):p;bSe(f,{globalList:r,ignoreLists:p})&&(I=[...p,{accept:[],reject:[\"**/*\"]}]);for(let R of E)c.push([J.resolve(f,R),I])}else(h.isFile()||h.isSymbolicLink())&&a.push(J.relative(vt.root,f))}return a.sort()}async function DSe(t,e,r){let s={accept:[],reject:[]},a=await t.readFilePromise(J.join(e,r),\"utf8\");for(let n of a.split(/\\n/g))TSe(s.reject,n,{cwd:e});return s}function HEt(t,{cwd:e}){let r=t[0]===\"!\";return r&&(t=t.slice(1)),t.match(/\\.{0,1}\\//)&&(t=J.resolve(e,t)),r&&(t=`!${t}`),t}function TSe(t,e,{cwd:r}){let s=e.trim();s===\"\"||s[0]===\"#\"||t.push(HEt(s,{cwd:r}))}function bSe(t,{globalList:e,ignoreLists:r}){let s=FN(t,e.accept);if(s!==0)return s===2;let a=FN(t,e.reject);if(a!==0)return a===1;if(r!==null)for(let n of r){let c=FN(t,n.accept);if(c!==0)return c===2;let f=FN(t,n.reject);if(f!==0)return f===1}return!1}function FN(t,e){let r=e,s=[];for(let a=0;a<e.length;++a)e[a][0]!==\"!\"?r!==e&&r.push(e[a]):(r===e&&(r=e.slice(0,a)),s.push(e[a].slice(1)));return PSe(t,s)?2:PSe(t,r)?1:0}function PSe(t,e){let r=e,s=[];for(let a=0;a<e.length;++a)e[a].includes(\"/\")?r!==e&&r.push(e[a]):(r===e&&(r=e.slice(0,a)),s.push(e[a]));return!!(BV.default.isMatch(t,r,{dot:!0,nocase:!0})||BV.default.isMatch(t,s,{dot:!0,basename:!0,nocase:!0}))}var jw=class extends ft{constructor(){super(...arguments);this.installIfNeeded=ge.Boolean(\"--install-if-needed\",!1,{description:\"Run a preliminary `yarn install` if the package contains build scripts\"});this.dryRun=ge.Boolean(\"-n,--dry-run\",!1,{description:\"Print the file paths without actually generating the package archive\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.out=ge.String(\"-o,--out\",{description:\"Create the archive at the specified path\"});this.filename=ge.String(\"--filename\",{hidden:!0})}static{this.paths=[[\"pack\"]]}static{this.usage=ot.Usage({description:\"generate a tarball from the active workspace\",details:\"\\n      This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\\n\\n      If the `-o,--out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\\n    \",examples:[[\"Create an archive from the active workspace\",\"yarn pack\"],[\"List the files that would be made part of the workspace's archive\",\"yarn pack --dry-run\"],[\"Name and output the archive in a dedicated folder\",\"yarn pack --out /artifacts/%s-%v.tgz\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await vV(a)&&(this.installIfNeeded?await s.install({cache:await Kr.find(r),report:new ki}):await s.restoreInstallState());let n=this.out??this.filename,c=typeof n<\"u\"?J.resolve(this.context.cwd,jEt(n,{workspace:a})):J.resolve(a.cwd,\"package.tgz\");return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async p=>{await SV(a,{report:p},async()=>{p.reportJson({base:fe.fromPortablePath(a.cwd)});let h=await NN(a);for(let E of h)p.reportInfo(null,fe.fromPortablePath(E)),p.reportJson({location:fe.fromPortablePath(E)});if(!this.dryRun){let E=await DV(a,h);await ce.mkdirPromise(J.dirname(c),{recursive:!0});let C=ce.createWriteStream(c);E.pipe(C),await new Promise(S=>{C.on(\"finish\",S)})}}),this.dryRun||(p.reportInfo(0,`Package archive generated in ${he.pretty(r,c,he.Type.PATH)}`),p.reportJson({output:fe.fromPortablePath(c)}))})).exitCode()}};function jEt(t,{workspace:e}){let r=t.replace(\"%s\",GEt(e)).replace(\"%v\",qEt(e));return fe.toPortablePath(r)}function GEt(t){return t.manifest.name!==null?G.slugifyIdent(t.manifest.name):\"package\"}function qEt(t){return t.manifest.version!==null?t.manifest.version:\"unknown\"}var WEt=[\"dependencies\",\"devDependencies\",\"peerDependencies\"],YEt=\"workspace:\",VEt=(t,e)=>{e.publishConfig&&(e.publishConfig.type&&(e.type=e.publishConfig.type),e.publishConfig.main&&(e.main=e.publishConfig.main),e.publishConfig.browser&&(e.browser=e.publishConfig.browser),e.publishConfig.module&&(e.module=e.publishConfig.module),e.publishConfig.exports&&(e.exports=e.publishConfig.exports),e.publishConfig.imports&&(e.imports=e.publishConfig.imports),e.publishConfig.bin&&(e.bin=e.publishConfig.bin));let r=t.project;for(let s of WEt)for(let a of t.manifest.getForScope(s).values()){let n=r.tryWorkspaceByDescriptor(a),c=G.parseRange(a.range);if(c.protocol===YEt)if(n===null){if(r.tryWorkspaceByIdent(a)===null)throw new jt(21,`${G.prettyDescriptor(r.configuration,a)}: No local workspace found for this range`)}else{let f;G.areDescriptorsEqual(a,n.anchoredDescriptor)||c.selector===\"*\"?f=n.manifest.version??\"0.0.0\":c.selector===\"~\"||c.selector===\"^\"?f=`${c.selector}${n.manifest.version??\"0.0.0\"}`:f=c.selector;let p=s===\"dependencies\"?G.makeDescriptor(a,\"unknown\"):null,h=p!==null&&t.manifest.ensureDependencyMeta(p).optional?\"optionalDependencies\":s;e[h][G.stringifyIdent(a)]=f}}},JEt={hooks:{beforeWorkspacePacking:VEt},commands:[jw]},KEt=JEt;var Gxe=ut(HSe());Ge();var Hxe=ut(_xe()),{env:Bt}=process,XDt=\"application/vnd.in-toto+json\",ZDt=\"https://in-toto.io/Statement/v0.1\",$Dt=\"https://in-toto.io/Statement/v1\",ebt=\"https://slsa.dev/provenance/v0.2\",tbt=\"https://slsa.dev/provenance/v1\",rbt=\"https://github.com/actions/runner\",nbt=\"https://slsa-framework.github.io/github-actions-buildtypes/workflow/v1\",ibt=\"https://github.com/npm/cli/gitlab\",sbt=\"v0alpha1\",jxe=async(t,e)=>{let r;if(Bt.GITHUB_ACTIONS){if(!Bt.ACTIONS_ID_TOKEN_REQUEST_URL)throw new jt(91,'Provenance generation in GitHub Actions requires \"write\" access to the \"id-token\" permission');let s=(Bt.GITHUB_WORKFLOW_REF||\"\").replace(`${Bt.GITHUB_REPOSITORY}/`,\"\"),a=s.indexOf(\"@\"),n=s.slice(0,a),c=s.slice(a+1);r={_type:$Dt,subject:t,predicateType:tbt,predicate:{buildDefinition:{buildType:nbt,externalParameters:{workflow:{ref:c,repository:`${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}`,path:n}},internalParameters:{github:{event_name:Bt.GITHUB_EVENT_NAME,repository_id:Bt.GITHUB_REPOSITORY_ID,repository_owner_id:Bt.GITHUB_REPOSITORY_OWNER_ID}},resolvedDependencies:[{uri:`git+${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}@${Bt.GITHUB_REF}`,digest:{gitCommit:Bt.GITHUB_SHA}}]},runDetails:{builder:{id:`${rbt}/${Bt.RUNNER_ENVIRONMENT}`},metadata:{invocationId:`${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}/actions/runs/${Bt.GITHUB_RUN_ID}/attempts/${Bt.GITHUB_RUN_ATTEMPT}`}}}}}else if(Bt.GITLAB_CI){if(!Bt.SIGSTORE_ID_TOKEN)throw new jt(91,`Provenance generation in GitLab CI requires \"SIGSTORE_ID_TOKEN\" with \"sigstore\" audience to be present in \"id_tokens\". For more info see:\nhttps://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html`);r={_type:ZDt,subject:t,predicateType:ebt,predicate:{buildType:`${ibt}/${sbt}`,builder:{id:`${Bt.CI_PROJECT_URL}/-/runners/${Bt.CI_RUNNER_ID}`},invocation:{configSource:{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA},entryPoint:Bt.CI_JOB_NAME},parameters:{CI:Bt.CI,CI_API_GRAPHQL_URL:Bt.CI_API_GRAPHQL_URL,CI_API_V4_URL:Bt.CI_API_V4_URL,CI_BUILD_BEFORE_SHA:Bt.CI_BUILD_BEFORE_SHA,CI_BUILD_ID:Bt.CI_BUILD_ID,CI_BUILD_NAME:Bt.CI_BUILD_NAME,CI_BUILD_REF:Bt.CI_BUILD_REF,CI_BUILD_REF_NAME:Bt.CI_BUILD_REF_NAME,CI_BUILD_REF_SLUG:Bt.CI_BUILD_REF_SLUG,CI_BUILD_STAGE:Bt.CI_BUILD_STAGE,CI_COMMIT_BEFORE_SHA:Bt.CI_COMMIT_BEFORE_SHA,CI_COMMIT_BRANCH:Bt.CI_COMMIT_BRANCH,CI_COMMIT_REF_NAME:Bt.CI_COMMIT_REF_NAME,CI_COMMIT_REF_PROTECTED:Bt.CI_COMMIT_REF_PROTECTED,CI_COMMIT_REF_SLUG:Bt.CI_COMMIT_REF_SLUG,CI_COMMIT_SHA:Bt.CI_COMMIT_SHA,CI_COMMIT_SHORT_SHA:Bt.CI_COMMIT_SHORT_SHA,CI_COMMIT_TIMESTAMP:Bt.CI_COMMIT_TIMESTAMP,CI_COMMIT_TITLE:Bt.CI_COMMIT_TITLE,CI_CONFIG_PATH:Bt.CI_CONFIG_PATH,CI_DEFAULT_BRANCH:Bt.CI_DEFAULT_BRANCH,CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_SERVER:Bt.CI_DEPENDENCY_PROXY_SERVER,CI_DEPENDENCY_PROXY_USER:Bt.CI_DEPENDENCY_PROXY_USER,CI_JOB_ID:Bt.CI_JOB_ID,CI_JOB_NAME:Bt.CI_JOB_NAME,CI_JOB_NAME_SLUG:Bt.CI_JOB_NAME_SLUG,CI_JOB_STAGE:Bt.CI_JOB_STAGE,CI_JOB_STARTED_AT:Bt.CI_JOB_STARTED_AT,CI_JOB_URL:Bt.CI_JOB_URL,CI_NODE_TOTAL:Bt.CI_NODE_TOTAL,CI_PAGES_DOMAIN:Bt.CI_PAGES_DOMAIN,CI_PAGES_URL:Bt.CI_PAGES_URL,CI_PIPELINE_CREATED_AT:Bt.CI_PIPELINE_CREATED_AT,CI_PIPELINE_ID:Bt.CI_PIPELINE_ID,CI_PIPELINE_IID:Bt.CI_PIPELINE_IID,CI_PIPELINE_SOURCE:Bt.CI_PIPELINE_SOURCE,CI_PIPELINE_URL:Bt.CI_PIPELINE_URL,CI_PROJECT_CLASSIFICATION_LABEL:Bt.CI_PROJECT_CLASSIFICATION_LABEL,CI_PROJECT_DESCRIPTION:Bt.CI_PROJECT_DESCRIPTION,CI_PROJECT_ID:Bt.CI_PROJECT_ID,CI_PROJECT_NAME:Bt.CI_PROJECT_NAME,CI_PROJECT_NAMESPACE:Bt.CI_PROJECT_NAMESPACE,CI_PROJECT_NAMESPACE_ID:Bt.CI_PROJECT_NAMESPACE_ID,CI_PROJECT_PATH:Bt.CI_PROJECT_PATH,CI_PROJECT_PATH_SLUG:Bt.CI_PROJECT_PATH_SLUG,CI_PROJECT_REPOSITORY_LANGUAGES:Bt.CI_PROJECT_REPOSITORY_LANGUAGES,CI_PROJECT_ROOT_NAMESPACE:Bt.CI_PROJECT_ROOT_NAMESPACE,CI_PROJECT_TITLE:Bt.CI_PROJECT_TITLE,CI_PROJECT_URL:Bt.CI_PROJECT_URL,CI_PROJECT_VISIBILITY:Bt.CI_PROJECT_VISIBILITY,CI_REGISTRY:Bt.CI_REGISTRY,CI_REGISTRY_IMAGE:Bt.CI_REGISTRY_IMAGE,CI_REGISTRY_USER:Bt.CI_REGISTRY_USER,CI_RUNNER_DESCRIPTION:Bt.CI_RUNNER_DESCRIPTION,CI_RUNNER_ID:Bt.CI_RUNNER_ID,CI_RUNNER_TAGS:Bt.CI_RUNNER_TAGS,CI_SERVER_HOST:Bt.CI_SERVER_HOST,CI_SERVER_NAME:Bt.CI_SERVER_NAME,CI_SERVER_PORT:Bt.CI_SERVER_PORT,CI_SERVER_PROTOCOL:Bt.CI_SERVER_PROTOCOL,CI_SERVER_REVISION:Bt.CI_SERVER_REVISION,CI_SERVER_SHELL_SSH_HOST:Bt.CI_SERVER_SHELL_SSH_HOST,CI_SERVER_SHELL_SSH_PORT:Bt.CI_SERVER_SHELL_SSH_PORT,CI_SERVER_URL:Bt.CI_SERVER_URL,CI_SERVER_VERSION:Bt.CI_SERVER_VERSION,CI_SERVER_VERSION_MAJOR:Bt.CI_SERVER_VERSION_MAJOR,CI_SERVER_VERSION_MINOR:Bt.CI_SERVER_VERSION_MINOR,CI_SERVER_VERSION_PATCH:Bt.CI_SERVER_VERSION_PATCH,CI_TEMPLATE_REGISTRY_HOST:Bt.CI_TEMPLATE_REGISTRY_HOST,GITLAB_CI:Bt.GITLAB_CI,GITLAB_FEATURES:Bt.GITLAB_FEATURES,GITLAB_USER_ID:Bt.GITLAB_USER_ID,GITLAB_USER_LOGIN:Bt.GITLAB_USER_LOGIN,RUNNER_GENERATE_ARTIFACTS_METADATA:Bt.RUNNER_GENERATE_ARTIFACTS_METADATA},environment:{name:Bt.CI_RUNNER_DESCRIPTION,architecture:Bt.CI_RUNNER_EXECUTABLE_ARCH,server:Bt.CI_SERVER_URL,project:Bt.CI_PROJECT_PATH,job:{id:Bt.CI_JOB_ID},pipeline:{id:Bt.CI_PIPELINE_ID,ref:Bt.CI_CONFIG_PATH}}},metadata:{buildInvocationId:`${Bt.CI_JOB_URL}`,completeness:{parameters:!0,environment:!0,materials:!1},reproducible:!1},materials:[{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA}}]}}}else throw new jt(91,\"Provenance generation is only supported in GitHub Actions and GitLab CI\");return Hxe.attest(Buffer.from(JSON.stringify(r)),XDt,e)};async function obt(t,e,{access:r,tag:s,registry:a,gitHead:n,provenance:c}){let f=t.manifest.name,p=t.manifest.version,h=G.stringifyIdent(f),E=Gxe.default.fromData(e,{algorithms:[\"sha1\",\"sha512\"]}),C=r??qxe(t,f),S=await Wxe(t),P=await yA.genPackageManifest(t),I=`${h}-${p}.tgz`,R=new URL(`${Jc(a)}/${h}/-/${I}`),N={[I]:{content_type:\"application/octet-stream\",data:e.toString(\"base64\"),length:e.length}};if(c){let U={name:`pkg:npm/${h.replace(/^@/,\"%40\")}@${p}`,digest:{sha512:E.sha512[0].hexDigest()}},W=await jxe([U]),ee=JSON.stringify(W);N[`${h}-${p}.sigstore`]={content_type:W.mediaType,data:ee,length:ee.length}}return{_id:h,_attachments:N,name:h,access:C,\"dist-tags\":{[s]:p},versions:{[p]:{...P,_id:`${h}@${p}`,name:h,version:p,gitHead:n,dist:{shasum:E.sha1[0].hexDigest(),integrity:E.sha512[0].toString(),tarball:R.toString()}}},readme:S}}async function abt(t){try{let{stdout:e}=await qr.execvp(\"git\",[\"rev-parse\",\"--revs-only\",\"HEAD\"],{cwd:t});return e.trim()===\"\"?void 0:e.trim()}catch{return}}function qxe(t,e){let r=t.project.configuration;return t.manifest.publishConfig&&typeof t.manifest.publishConfig.access==\"string\"?t.manifest.publishConfig.access:r.get(\"npmPublishAccess\")!==null?r.get(\"npmPublishAccess\"):e.scope?\"restricted\":\"public\"}async function Wxe(t){let e=fe.toPortablePath(`${t.cwd}/README.md`),r=t.manifest.name,a=`# ${G.stringifyIdent(r)}\n`;try{a=await ce.readFilePromise(e,\"utf8\")}catch(n){if(n.code===\"ENOENT\")return a;throw n}return a}var RK={npmAlwaysAuth:{description:\"URL of the selected npm registry (note: npm enterprise isn't supported)\",type:\"BOOLEAN\",default:!1},npmAuthIdent:{description:\"Authentication identity for the npm registry (_auth in npm and yarn v1)\",type:\"SECRET\",default:null},npmAuthToken:{description:\"Authentication token for the npm registry (_authToken in npm and yarn v1)\",type:\"SECRET\",default:null}},Yxe={npmAuditRegistry:{description:\"Registry to query for audit reports\",type:\"STRING\",default:null},npmPublishRegistry:{description:\"Registry to push packages to\",type:\"STRING\",default:null},npmRegistryServer:{description:\"URL of the selected npm registry (note: npm enterprise isn't supported)\",type:\"STRING\",default:\"https://registry.yarnpkg.com\"}},lbt={npmMinimalAgeGate:{description:\"Minimum age of a package version according to the publish date on the npm registry to be considered for installation\",type:\"DURATION\",unit:\"m\",default:\"0m\"},npmPreapprovedPackages:{description:\"Array of package descriptors or package name glob patterns to exclude from the minimum release age check\",type:\"STRING\",isArray:!0,default:[]}},cbt={configuration:{...RK,...Yxe,...lbt,npmScopes:{description:\"Settings per package scope\",type:\"MAP\",valueDefinition:{description:\"\",type:\"SHAPE\",properties:{...RK,...Yxe}}},npmRegistries:{description:\"Settings per registry\",type:\"MAP\",normalizeKeys:Jc,valueDefinition:{description:\"\",type:\"SHAPE\",properties:{...RK}}}},fetchers:[VD,oh],resolvers:[JD,KD,zD]},ubt=cbt;var qK={};Vt(qK,{NpmAuditCommand:()=>D1,NpmInfoCommand:()=>b1,NpmLoginCommand:()=>P1,NpmLogoutCommand:()=>k1,NpmPublishCommand:()=>Q1,NpmTagAddCommand:()=>R1,NpmTagListCommand:()=>T1,NpmTagRemoveCommand:()=>F1,NpmWhoamiCommand:()=>N1,default:()=>wbt,npmAuditTypes:()=>zb,npmAuditUtils:()=>kL});Ge();Ge();Yt();var UK=ut(Go());Ul();var zb={};Vt(zb,{Environment:()=>Jb,Severity:()=>Kb});var Jb=(s=>(s.All=\"all\",s.Production=\"production\",s.Development=\"development\",s))(Jb||{}),Kb=(n=>(n.Info=\"info\",n.Low=\"low\",n.Moderate=\"moderate\",n.High=\"high\",n.Critical=\"critical\",n))(Kb||{});var kL={};Vt(kL,{allSeverities:()=>S1,getPackages:()=>MK,getReportTree:()=>OK,getSeverityInclusions:()=>NK,getTopLevelDependencies:()=>LK});Ge();var Vxe=ut(Ai());var S1=[\"info\",\"low\",\"moderate\",\"high\",\"critical\"];function NK(t){if(typeof t>\"u\")return new Set(S1);let e=S1.indexOf(t),r=S1.slice(e);return new Set(r)}function OK(t){let e={},r={children:e};for(let[s,a]of je.sortMap(Object.entries(t),n=>n[0]))for(let n of je.sortMap(a,c=>`${c.id}`))e[`${s}/${n.id}`]={value:he.tuple(he.Type.IDENT,G.parseIdent(s)),children:{ID:typeof n.id<\"u\"&&{label:\"ID\",value:he.tuple(he.Type.ID,n.id)},Issue:{label:\"Issue\",value:he.tuple(he.Type.NO_HINT,n.title)},URL:typeof n.url<\"u\"&&{label:\"URL\",value:he.tuple(he.Type.URL,n.url)},Severity:{label:\"Severity\",value:he.tuple(he.Type.NO_HINT,n.severity)},\"Vulnerable Versions\":{label:\"Vulnerable Versions\",value:he.tuple(he.Type.RANGE,n.vulnerable_versions)},\"Tree Versions\":{label:\"Tree Versions\",children:[...n.versions].sort(Vxe.default.compare).map(c=>({value:he.tuple(he.Type.REFERENCE,c)}))},Dependents:{label:\"Dependents\",children:je.sortMap(n.dependents,c=>G.stringifyLocator(c)).map(c=>({value:he.tuple(he.Type.LOCATOR,c)}))}}};return r}function LK(t,e,{all:r,environment:s}){let a=[],n=r?t.workspaces:[e],c=[\"all\",\"production\"].includes(s),f=[\"all\",\"development\"].includes(s);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!f:!c)||a.push({workspace:p,dependency:h});return a}function MK(t,e,{recursive:r}){let s=new Map,a=new Set,n=[],c=(f,p)=>{let h=t.storedResolutions.get(p.descriptorHash);if(typeof h>\"u\")throw new Error(\"Assertion failed: The resolution should have been registered\");if(!a.has(h))a.add(h);else return;let E=t.storedPackages.get(h);if(typeof E>\"u\")throw new Error(\"Assertion failed: The package should have been registered\");if(G.ensureDevirtualizedLocator(E).reference.startsWith(\"npm:\")&&E.version!==null){let S=G.stringifyIdent(E),P=je.getMapWithDefault(s,S);je.getArrayWithDefault(P,E.version).push(f)}if(r)for(let S of E.dependencies.values())n.push([E,S])};for(let{workspace:f,dependency:p}of e)n.push([f.anchoredLocator,p]);for(;n.length>0;){let[f,p]=n.shift();c(f,p)}return s}var D1=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Audit dependencies from all workspaces\"});this.recursive=ge.Boolean(\"-R,--recursive\",!1,{description:\"Audit transitive dependencies as well\"});this.environment=ge.String(\"--environment\",\"all\",{description:\"Which environments to cover\",validator:fo(Jb)});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.noDeprecations=ge.Boolean(\"--no-deprecations\",!1,{description:\"Don't warn about deprecated packages\"});this.severity=ge.String(\"--severity\",\"info\",{description:\"Minimal severity requested for packages to be displayed\",validator:fo(Kb)});this.excludes=ge.Array(\"--exclude\",[],{description:\"Array of glob patterns of packages to exclude from audit\"});this.ignores=ge.Array(\"--ignore\",[],{description:\"Array of glob patterns of advisory ID's to ignore in the audit report\"})}static{this.paths=[[\"npm\",\"audit\"]]}static{this.usage=ot.Usage({description:\"perform a vulnerability audit against the installed packages\",details:`\n      This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).\n\n      For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \\`-A,--all\\`. To extend this search to both direct and transitive dependencies, use \\`-R,--recursive\\`.\n\n      Applying the \\`--severity\\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${S1.map(r=>`\\`${r}\\``).join(\", \")}.\n\n      If the \\`--json\\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.\n\n      If certain packages produce false positives for a particular environment, the \\`--exclude\\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \\`npmAuditExcludePackages\\` option.\n\n      If particular advisories are needed to be ignored, the \\`--ignore\\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \\`npmAuditIgnoreAdvisories\\` option.\n\n      To understand the dependency tree requiring vulnerable packages, check the raw report with the \\`--json\\` flag or use \\`yarn why package\\` to get more information as to who depends on them.\n    `,examples:[[\"Checks for known security issues with the installed packages. The output is a list of known issues.\",\"yarn npm audit\"],[\"Audit dependencies in all workspaces\",\"yarn npm audit --all\"],[\"Limit auditing to `dependencies` (excludes `devDependencies`)\",\"yarn npm audit --environment production\"],[\"Show audit report as valid JSON\",\"yarn npm audit --json\"],[\"Audit all direct and transitive dependencies\",\"yarn npm audit --recursive\"],[\"Output moderate (or more severe) vulnerabilities\",\"yarn npm audit --severity moderate\"],[\"Exclude certain packages\",\"yarn npm audit --exclude package1 --exclude package2\"],[\"Ignore specific advisories\",\"yarn npm audit --ignore 1234567 --ignore 7654321\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=LK(s,a,{all:this.all,environment:this.environment}),c=MK(s,n,{recursive:this.recursive}),f=Array.from(new Set([...r.get(\"npmAuditExcludePackages\"),...this.excludes])),p=Object.create(null);for(let[N,U]of c)f.some(W=>UK.default.isMatch(N,W))||(p[N]=[...U.keys()]);let h=hi.getAuditRegistry({configuration:r}),E,C=await lA.start({configuration:r,stdout:this.context.stdout},async()=>{let N=en.post(\"/-/npm/v1/security/advisories/bulk\",p,{authType:en.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=this.noDeprecations?[]:await Promise.all(Array.from(Object.entries(p),async([ee,ie])=>{let ue=await en.getPackageMetadata(G.parseIdent(ee),{project:s});return je.mapAndFilter(ie,le=>{let{deprecated:me}=ue.versions[le];return me?[ee,le,me]:je.mapAndFilter.skip})})),W=await N;for(let[ee,ie,ue]of U.flat(1))Object.hasOwn(W,ee)&&W[ee].some(le=>Fr.satisfiesWithPrereleases(ie,le.vulnerable_versions))||(W[ee]??=[],W[ee].push({id:`${ee} (deprecation)`,title:(typeof ue==\"string\"?ue:\"\").trim()||\"This package has been deprecated.\",severity:\"moderate\",vulnerable_versions:ie}));E=W});if(C.hasErrors())return C.exitCode();let S=NK(this.severity),P=Array.from(new Set([...r.get(\"npmAuditIgnoreAdvisories\"),...this.ignores])),I=Object.create(null);for(let[N,U]of Object.entries(E)){let W=U.filter(ee=>!UK.default.isMatch(`${ee.id}`,P)&&S.has(ee.severity));W.length>0&&(I[N]=W.map(ee=>{let ie=c.get(N);if(typeof ie>\"u\")throw new Error(\"Assertion failed: Expected the registry to only return packages that were requested\");let ue=[...ie.keys()].filter(me=>Fr.satisfiesWithPrereleases(me,ee.vulnerable_versions)),le=new Map;for(let me of ue)for(let pe of ie.get(me))le.set(pe.locatorHash,pe);return{...ee,versions:ue,dependents:[...le.values()]}}))}let R=Object.keys(I).length>0;return R?(xs.emitTree(OK(I),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async N=>{N.reportInfo(1,\"No audit suggestions\")}),R?1:0)}};Ge();Ge();Dt();Yt();var _K=ut(Ai()),HK=Ie(\"util\"),b1=class extends ft{constructor(){super(...arguments);this.fields=ge.String(\"-f,--fields\",{description:\"A comma-separated list of manifest fields that should be displayed\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.packages=ge.Rest()}static{this.paths=[[\"npm\",\"info\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"show information about a package\",details:\"\\n      This command fetches information about a package from the npm registry and prints it in a tree format.\\n\\n      The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\\n\\n      Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\\n\\n      If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\\n\\n      By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\\n    \",examples:[[\"Show all available information about react (except the `dist`, `readme`, and `users` fields)\",\"yarn npm info react\"],[\"Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)\",\"yarn npm info react --json\"],[\"Show all available information about react@16.12.0\",\"yarn npm info react@16.12.0\"],[\"Show all available information about react@next\",\"yarn npm info react@next\"],[\"Show the description of react\",\"yarn npm info react --fields description\"],[\"Show all available versions of react\",\"yarn npm info react --fields versions\"],[\"Show the readme of react\",\"yarn npm info react --fields readme\"],[\"Show a few fields of react\",\"yarn npm info react --fields homepage,repository\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=typeof this.fields<\"u\"?new Set([\"name\",...this.fields.split(/\\s*,\\s*/)]):null,n=[],c=!1,f=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let E;if(h===\".\"){let ie=s.topLevelWorkspace;if(!ie.manifest.name)throw new nt(`Missing ${he.pretty(r,\"name\",he.Type.CODE)} field in ${fe.fromPortablePath(J.join(ie.cwd,Er.manifest))}`);E=G.makeDescriptor(ie.manifest.name,\"unknown\")}else E=G.parseDescriptor(h);let C=en.getIdentUrl(E),S=jK(await en.get(C,{configuration:r,ident:E,jsonResponse:!0,customErrorMessage:en.customPackageError})),P=Object.keys(S.versions).sort(_K.default.compareLoose),R=S[\"dist-tags\"].latest||P[P.length-1],N=Fr.validRange(E.range);if(N){let ie=_K.default.maxSatisfying(P,N);ie!==null?R=ie:(p.reportWarning(0,`Unmet range ${G.prettyRange(r,E.range)}; falling back to the latest version`),c=!0)}else Object.hasOwn(S[\"dist-tags\"],E.range)?R=S[\"dist-tags\"][E.range]:E.range!==\"unknown\"&&(p.reportWarning(0,`Unknown tag ${G.prettyRange(r,E.range)}; falling back to the latest version`),c=!0);let U=S.versions[R],W={...S,...U,version:R,versions:P},ee;if(a!==null){ee={};for(let ie of a){let ue=W[ie];if(typeof ue<\"u\")ee[ie]=ue;else{p.reportWarning(1,`The ${he.pretty(r,ie,he.Type.CODE)} field doesn't exist inside ${G.prettyIdent(r,E)}'s information`),c=!0;continue}}}else this.json||(delete W.dist,delete W.readme,delete W.users),ee=W;p.reportJson(ee),this.json||n.push(ee)}});HK.inspect.styles.name=\"cyan\";for(let p of n)(p!==n[0]||c)&&this.context.stdout.write(`\n`),this.context.stdout.write(`${(0,HK.inspect)(p,{depth:1/0,colors:!0,compact:!1})}\n`);return f.exitCode()}};function jK(t){if(Array.isArray(t)){let e=[];for(let r of t)r=jK(r),r&&e.push(r);return e}else if(typeof t==\"object\"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith(\"_\"))continue;let s=jK(t[r]);s&&(e[r]=s)}return e}else return t||null}Ge();Ge();Yt();var GK=ut(Vv()),P1=class extends ft{constructor(){super(...arguments);this.scope=ge.String(\"-s,--scope\",{description:\"Login to the registry configured for a given scope\"});this.publish=ge.Boolean(\"--publish\",!1,{description:\"Login to the publish registry\"});this.alwaysAuth=ge.Boolean(\"--always-auth\",{description:\"Set the npmAlwaysAuth configuration\"});this.webLogin=ge.Boolean(\"--web-login\",{description:\"Enable web login\"})}static{this.paths=[[\"npm\",\"login\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"store new login info to access the npm registry\",details:\"\\n      This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\\n\\n      Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\\n\\n      Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\\n    \",examples:[[\"Login to the default registry\",\"yarn npm login\"],[\"Login to the registry linked to the @my-scope registry\",\"yarn npm login --scope my-scope\"],[\"Login to the publish registry for the current package\",\"yarn npm login --publish\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await QL({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ot.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let c=await gbt({registry:s,configuration:r,report:n,webLogin:this.webLogin,stdin:this.context.stdin,stdout:this.context.stdout});return await mbt(s,c,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,\"Successfully logged in\")})).exitCode()}};async function QL({scope:t,publish:e,configuration:r,cwd:s}){return t&&e?hi.getScopeRegistry(t,{configuration:r,type:hi.RegistryType.PUBLISH_REGISTRY}):t?hi.getScopeRegistry(t,{configuration:r}):e?hi.getPublishRegistry((await eC(r,s)).manifest,{configuration:r}):hi.getDefaultRegistry({configuration:r})}async function fbt(t,e){let r;try{r=await en.post(\"/-/v1/login\",null,{configuration:e,registry:t,authType:en.AuthType.NO_AUTH,jsonResponse:!0,headers:{\"npm-auth-type\":\"web\"}})}catch{return null}return r}async function Abt(t,e){let r=await nn.request(t,null,{configuration:e,jsonResponse:!0});if(r.statusCode===202){let s=r.headers[\"retry-after\"]??\"1\";return{type:\"waiting\",sleep:parseInt(s,10)}}return r.statusCode===200?{type:\"success\",token:r.body.token}:null}async function pbt({registry:t,configuration:e,report:r}){let s=await fbt(t,e);if(!s)return null;if(Ui.openUrl){r.reportInfo(0,\"Starting the web login process...\"),r.reportSeparator();let{openNow:a}=await(0,GK.prompt)({type:\"confirm\",name:\"openNow\",message:\"Do you want to try to open your browser now?\",required:!0,initial:!0,onCancel:()=>process.exit(130)});r.reportSeparator(),(!a||!await Ui.openUrl(s.loginUrl))&&(r.reportWarning(0,\"We failed to automatically open the url; you'll have to open it yourself in your browser of choice:\"),r.reportWarning(0,he.pretty(e,s.loginUrl,he.Type.URL)),r.reportSeparator())}for(;;){let a=await Abt(s.doneUrl,e);if(a===null)return null;if(a.type===\"waiting\")await new Promise(n=>setTimeout(n,a.sleep*1e3));else return a.token}}var hbt=[\"https://registry.yarnpkg.com\",\"https://registry.npmjs.org\"];async function gbt(t){if(t.webLogin??hbt.includes(t.registry)){let e=await pbt(t);if(e!==null)return e}return await dbt(t)}async function dbt({registry:t,configuration:e,report:r,stdin:s,stdout:a}){let n=await ybt({configuration:e,registry:t,report:r,stdin:s,stdout:a}),c=`/-/user/org.couchdb.user:${encodeURIComponent(n.name)}`,f={_id:`org.couchdb.user:${n.name}`,name:n.name,password:n.password,type:\"user\",roles:[],date:new Date().toISOString()},p={attemptedAs:n.name,configuration:e,registry:t,jsonResponse:!0,authType:en.AuthType.NO_AUTH};try{return(await en.put(c,f,p)).token}catch(P){if(!(P.originalError?.name===\"HTTPError\"&&P.originalError?.response.statusCode===409))throw P}let h={...p,authType:en.AuthType.NO_AUTH,headers:{authorization:`Basic ${Buffer.from(`${n.name}:${n.password}`).toString(\"base64\")}`}},E=await en.get(c,h);for(let[P,I]of Object.entries(E))(!f[P]||P===\"roles\")&&(f[P]=I);let C=`${c}/-rev/${f._rev}`;return(await en.put(C,f,h)).token}async function mbt(t,e,{alwaysAuth:r,scope:s}){let a=c=>f=>{let p=je.isIndexableObject(f)?f:{},h=p[c],E=je.isIndexableObject(h)?h:{};return{...p,[c]:{...E,...r!==void 0?{npmAlwaysAuth:r}:{},npmAuthToken:e}}},n=s?{npmScopes:a(s)}:{npmRegistries:a(t)};return await ze.updateHomeConfiguration(n)}async function ybt({configuration:t,registry:e,report:r,stdin:s,stdout:a}){r.reportInfo(0,`Logging in to ${he.pretty(t,e,he.Type.URL)}`);let n=!1;if(e.match(/^https:\\/\\/npm\\.pkg\\.github\\.com(\\/|$)/)&&(r.reportInfo(0,\"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions.\"),n=!0),r.reportSeparator(),t.env.YARN_IS_TEST_ENV)return{name:t.env.YARN_INJECT_NPM_USER||\"\",password:t.env.YARN_INJECT_NPM_PASSWORD||\"\"};let c=await(0,GK.prompt)([{type:\"input\",name:\"name\",message:\"Username:\",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a},{type:\"password\",name:\"password\",message:n?\"Token:\":\"Password:\",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a}]);return r.reportSeparator(),c}Ge();Ge();Yt();var x1=new Set([\"npmAuthIdent\",\"npmAuthToken\"]),k1=class extends ft{constructor(){super(...arguments);this.scope=ge.String(\"-s,--scope\",{description:\"Logout of the registry configured for a given scope\"});this.publish=ge.Boolean(\"--publish\",!1,{description:\"Logout of the publish registry\"});this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Logout of all registries\"})}static{this.paths=[[\"npm\",\"logout\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"logout of the npm registry\",details:\"\\n      This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\\n\\n      Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\\n\\n      Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\\n\\n      Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\\n    \",examples:[[\"Logout of the default registry\",\"yarn npm logout\"],[\"Logout of the @my-scope scope\",\"yarn npm logout --scope my-scope\"],[\"Logout of the publish registry for the current package\",\"yarn npm logout --publish\"],[\"Logout of all registries\",\"yarn npm logout --all\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=async()=>{let n=await QL({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),c=await ze.find(this.context.cwd,this.context.plugins),f=G.makeIdent(this.scope??null,\"pkg\");return!hi.getAuthConfiguration(n,{configuration:c,ident:f}).get(\"npmAuthToken\")};return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{if(this.all&&(await Ibt(),n.reportInfo(0,\"Successfully logged out from everything\")),this.scope){await Jxe(\"npmScopes\",this.scope),await s()?n.reportInfo(0,`Successfully logged out from ${this.scope}`):n.reportWarning(0,\"Scope authentication settings removed, but some other ones settings still apply to it\");return}let c=await QL({configuration:r,cwd:this.context.cwd,publish:this.publish});await Jxe(\"npmRegistries\",c),await s()?n.reportInfo(0,`Successfully logged out from ${c}`):n.reportWarning(0,\"Registry authentication settings removed, but some other ones settings still apply to it\")})).exitCode()}};function Ebt(t,e){let r=t[e];if(!je.isIndexableObject(r))return!1;let s=new Set(Object.keys(r));if([...x1].every(n=>!s.has(n)))return!1;for(let n of x1)s.delete(n);if(s.size===0)return t[e]=void 0,!0;let a={...r};for(let n of x1)delete a[n];return t[e]=a,!0}async function Ibt(){let t=e=>{let r=!1,s=je.isIndexableObject(e)?{...e}:{};s.npmAuthToken&&(delete s.npmAuthToken,r=!0);for(let a of Object.keys(s))Ebt(s,a)&&(r=!0);if(Object.keys(s).length!==0)return r?s:e};return await ze.updateHomeConfiguration({npmRegistries:t,npmScopes:t})}async function Jxe(t,e){return await ze.updateHomeConfiguration({[t]:r=>{let s=je.isIndexableObject(r)?r:{};if(!Object.hasOwn(s,e))return r;let a=s[e],n=je.isIndexableObject(a)?a:{},c=new Set(Object.keys(n));if([...x1].every(p=>!c.has(p)))return r;for(let p of x1)c.delete(p);if(c.size===0)return Object.keys(s).length===1?void 0:{...s,[e]:void 0};let f={};for(let p of x1)f[p]=void 0;return{...s,[e]:{...n,...f}}}})}Ge();Dt();Yt();var Q1=class extends ft{constructor(){super(...arguments);this.access=ge.String(\"--access\",{description:\"The access for the published package (public or restricted)\"});this.tag=ge.String(\"--tag\",\"latest\",{description:\"The tag on the registry that the package should be attached to\"});this.tolerateRepublish=ge.Boolean(\"--tolerate-republish\",!1,{description:\"Warn and exit when republishing an already existing version of a package\"});this.otp=ge.String(\"--otp\",{description:\"The OTP token to use with the command\"});this.provenance=ge.Boolean(\"--provenance\",!1,{description:\"Generate provenance for the package. Only available in GitHub Actions and GitLab CI. Can be set globally through the `npmPublishProvenance` setting or the `YARN_NPM_CONFIG_PROVENANCE` environment variable, or per-package through the `publishConfig.provenance` field in package.json.\"});this.dryRun=ge.Boolean(\"-n,--dry-run\",!1,{description:\"Show what would be published without actually publishing\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Output the result in JSON format\"})}static{this.paths=[[\"npm\",\"publish\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"publish the active workspace to the npm registry\",details:'\\n      This command will pack the active workspace into a fresh archive and upload it to the npm registry.\\n\\n      The package will by default be attached to the `latest` tag on the registry, but this behavior can be overridden by using the `--tag` option.\\n\\n      Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka \"private packages\"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\\n    ',examples:[[\"Publish the active workspace\",\"yarn npm publish\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);if(a.manifest.private)throw new nt(\"Private workspaces cannot be published\");if(a.manifest.name===null||a.manifest.version===null)throw new nt(\"Workspaces must have valid names and versions to be published on an external registry\");await s.restoreInstallState();let n=a.manifest.name,c=a.manifest.version,f=hi.getPublishRegistry(a.manifest,{configuration:r});return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async h=>{if(this.tolerateRepublish)try{let E=await en.get(en.getIdentUrl(n),{configuration:r,registry:f,ident:n,jsonResponse:!0});if(!Object.hasOwn(E,\"versions\"))throw new jt(15,'Registry returned invalid data for - missing \"versions\" field');if(Object.hasOwn(E.versions,c)){let C=`Registry already knows about version ${c}; skipping.`;h.reportWarning(0,C),h.reportJson({name:G.stringifyIdent(n),version:c,registry:f,warning:C,skipped:!0});return}}catch(E){if(E.originalError?.response?.statusCode!==404)throw E}await In.maybeExecuteWorkspaceLifecycleScript(a,\"prepublish\",{report:h}),await yA.prepareForPack(a,{report:h},async()=>{let E=await yA.genPackList(a);for(let W of E)h.reportInfo(null,fe.fromPortablePath(W)),h.reportJson({file:fe.fromPortablePath(W)});let C=await yA.genPackStream(a,E),S=await je.bufferStream(C),P=await v1.getGitHead(a.cwd),I=!1,R=\"\";a.manifest.publishConfig&&\"provenance\"in a.manifest.publishConfig?(I=!!a.manifest.publishConfig.provenance,R=I?\"Generating provenance statement because `publishConfig.provenance` field is set.\":\"Skipping provenance statement because `publishConfig.provenance` field is set to false.\"):this.provenance?(I=!0,R=\"Generating provenance statement because `--provenance` flag is set.\"):r.get(\"npmPublishProvenance\")&&(I=!0,R=\"Generating provenance statement because `npmPublishProvenance` setting is set.\"),R&&(h.reportInfo(null,R),h.reportJson({type:\"provenance\",enabled:I,provenanceMessage:R}));let N=await v1.makePublishBody(a,S,{access:this.access,tag:this.tag,registry:f,gitHead:P,provenance:I});this.dryRun||await en.put(en.getIdentUrl(n),N,{configuration:r,registry:f,ident:n,otp:this.otp,jsonResponse:!0,allowOidc:!!(process.env.CI&&(process.env.GITHUB_ACTIONS||process.env.GITLAB_CI))});let U=this.dryRun?`[DRY RUN] Package would be published to ${f} with tag ${this.tag}`:\"Package archive published\";h.reportInfo(0,U),h.reportJson({name:G.stringifyIdent(n),version:c,registry:f,tag:this.tag||\"latest\",files:E.map(W=>fe.fromPortablePath(W)),access:this.access||null,dryRun:this.dryRun,published:!this.dryRun,message:U,provenance:!!I})})})).exitCode()}};Ge();Yt();var Kxe=ut(Ai());Ge();Dt();Yt();var T1=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.package=ge.String({required:!1})}static{this.paths=[[\"npm\",\"tag\",\"list\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"list all dist-tags of a package\",details:`\n      This command will list all tags of a package from the npm registry.\n\n      If the package is not specified, Yarn will default to the current workspace.\n    `,examples:[[\"List all tags of package `my-pkg`\",\"yarn npm tag list my-pkg\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n;if(typeof this.package<\"u\")n=G.parseIdent(this.package);else{if(!a)throw new ar(s.cwd,this.context.cwd);if(!a.manifest.name)throw new nt(`Missing 'name' field in ${fe.fromPortablePath(J.join(a.cwd,Er.manifest))}`);n=a.manifest.name}let c=await Xb(n,r),p={children:je.sortMap(Object.entries(c),([h])=>h).map(([h,E])=>({value:he.tuple(he.Type.RESOLUTION,{descriptor:G.makeDescriptor(n,h),locator:G.makeLocator(n,E)})}))};return xs.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};async function Xb(t,e){let r=`/-/package${en.getIdentUrl(t)}/dist-tags`;return en.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:en.customPackageError})}var R1=class extends ft{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[[\"npm\",\"tag\",\"add\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"add a tag for a specific version of a package\",details:`\n      This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.\n    `,examples:[[\"Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`\",\"yarn npm tag add my-pkg@2.3.4-beta.4 beta\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=G.parseDescriptor(this.package,!0),c=n.range;if(!Kxe.default.valid(c))throw new nt(`The range ${he.pretty(r,n.range,he.Type.RANGE)} must be a valid semver version`);let f=hi.getPublishRegistry(a.manifest,{configuration:r}),p=he.pretty(r,n,he.Type.IDENT),h=he.pretty(r,c,he.Type.RANGE),E=he.pretty(r,this.tag,he.Type.CODE);return(await Ot.start({configuration:r,stdout:this.context.stdout},async S=>{let P=await Xb(n,r);Object.hasOwn(P,this.tag)&&P[this.tag]===c&&S.reportWarning(0,`Tag ${E} is already set to version ${h}`);let I=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.put(I,c,{configuration:r,registry:f,ident:n,jsonRequest:!0,jsonResponse:!0}),S.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};Ge();Yt();var F1=class extends ft{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[[\"npm\",\"tag\",\"remove\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"remove a tag from a package\",details:`\n      This command will remove a tag from a package from the npm registry.\n    `,examples:[[\"Remove the `beta` tag from package `my-pkg`\",\"yarn npm tag remove my-pkg beta\"]]})}async execute(){if(this.tag===\"latest\")throw new nt(\"The 'latest' tag cannot be removed.\");let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=G.parseIdent(this.package),c=hi.getPublishRegistry(a.manifest,{configuration:r}),f=he.pretty(r,this.tag,he.Type.CODE),p=he.pretty(r,n,he.Type.IDENT),h=await Xb(n,r);if(!Object.hasOwn(h,this.tag))throw new nt(`${f} is not a tag of package ${p}`);return(await Ot.start({configuration:r,stdout:this.context.stdout},async C=>{let S=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.del(S,{configuration:r,registry:c,ident:n,jsonResponse:!0}),C.reportInfo(0,`Tag ${f} removed from package ${p}`)})).exitCode()}};Ge();Ge();Yt();var N1=class extends ft{constructor(){super(...arguments);this.scope=ge.String(\"-s,--scope\",{description:\"Print username for the registry configured for a given scope\"});this.publish=ge.Boolean(\"--publish\",!1,{description:\"Print username for the publish registry\"})}static{this.paths=[[\"npm\",\"whoami\"]]}static{this.usage=ot.Usage({category:\"Npm-related commands\",description:\"display the name of the authenticated user\",details:\"\\n      Print the username associated with the current authentication settings to the standard output.\\n\\n      When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\\n\\n      When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\\n    \",examples:[[\"Print username for the default registry\",\"yarn npm whoami\"],[\"Print username for the registry on a given scope\",\"yarn npm whoami --scope company\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s;return this.scope&&this.publish?s=hi.getScopeRegistry(this.scope,{configuration:r,type:hi.RegistryType.PUBLISH_REGISTRY}):this.scope?s=hi.getScopeRegistry(this.scope,{configuration:r}):this.publish?s=hi.getPublishRegistry((await eC(r,this.context.cwd)).manifest,{configuration:r}):s=hi.getDefaultRegistry({configuration:r}),(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c;try{c=await en.get(\"/-/whoami\",{configuration:r,registry:s,authType:en.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?G.makeIdent(this.scope,\"\"):void 0})}catch(f){if(f.response?.statusCode===401||f.response?.statusCode===403){n.reportError(41,\"Authentication failed - your credentials may have expired\");return}else throw f}n.reportInfo(0,c.username)})).exitCode()}};var Cbt={configuration:{npmPublishAccess:{description:\"Default access of the published packages\",type:\"STRING\",default:null},npmPublishProvenance:{description:\"Whether to generate provenance for the published packages\",type:\"BOOLEAN\",default:!1},npmAuditExcludePackages:{description:\"Array of glob patterns of packages to exclude from npm audit\",type:\"STRING\",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:\"Array of glob patterns of advisory IDs to exclude from npm audit\",type:\"STRING\",default:[],isArray:!0}},commands:[D1,b1,P1,k1,Q1,R1,T1,F1,N1]},wbt=Cbt;var XK={};Vt(XK,{PatchCommand:()=>H1,PatchCommitCommand:()=>_1,PatchFetcher:()=>rP,PatchResolver:()=>nP,default:()=>_bt,patchUtils:()=>gy});Ge();Ge();Dt();eA();var gy={};Vt(gy,{applyPatchFile:()=>RL,diffFolders:()=>KK,ensureUnpatchedDescriptor:()=>WK,ensureUnpatchedLocator:()=>NL,extractPackageToDisk:()=>JK,extractPatchFlags:()=>rke,isParentRequired:()=>VK,isPatchDescriptor:()=>FL,isPatchLocator:()=>Rg,loadPatchFiles:()=>tP,makeDescriptor:()=>OL,makeLocator:()=>YK,makePatchHash:()=>zK,parseDescriptor:()=>$b,parseLocator:()=>eP,parsePatchFile:()=>Zb,unpatchDescriptor:()=>Lbt,unpatchLocator:()=>Mbt});Ge();Dt();Ge();Dt();var Bbt=/^@@ -(\\d+)(,(\\d+))? \\+(\\d+)(,(\\d+))? @@.*/;function O1(t){return J.relative(vt.root,J.resolve(vt.root,fe.toPortablePath(t)))}function vbt(t){let e=t.trim().match(Bbt);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var Sbt=420,Dbt=493;var zxe=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),bbt=t=>({header:vbt(t),parts:[]}),Pbt={\"@\":\"header\",\"-\":\"deletion\",\"+\":\"insertion\",\" \":\"context\",\"\\\\\":\"pragma\",undefined:\"context\"};function xbt(t){let e=[],r=zxe(),s=\"parsing header\",a=null,n=null;function c(){a&&(n&&(a.parts.push(n),n=null),r.hunks.push(a),a=null)}function f(){c(),e.push(r),r=zxe()}for(let p=0;p<t.length;p++){let h=t[p];if(s===\"parsing header\")if(h.startsWith(\"@@\"))s=\"parsing hunks\",r.hunks=[],p-=1;else if(h.startsWith(\"diff --git \")){r&&r.diffLineFromPath&&f();let E=h.match(/^diff --git a\\/(.*?) b\\/(.*?)\\s*$/);if(!E)throw new Error(`Bad diff line: ${h}`);r.diffLineFromPath=E[1],r.diffLineToPath=E[2]}else if(h.startsWith(\"old mode \"))r.oldMode=h.slice(9).trim();else if(h.startsWith(\"new mode \"))r.newMode=h.slice(9).trim();else if(h.startsWith(\"deleted file mode \"))r.deletedFileMode=h.slice(18).trim();else if(h.startsWith(\"new file mode \"))r.newFileMode=h.slice(14).trim();else if(h.startsWith(\"rename from \"))r.renameFrom=h.slice(12).trim();else if(h.startsWith(\"rename to \"))r.renameTo=h.slice(10).trim();else if(h.startsWith(\"index \")){let E=h.match(/(\\w+)\\.\\.(\\w+)/);if(!E)continue;r.beforeHash=E[1],r.afterHash=E[2]}else h.startsWith(\"semver exclusivity \")?r.semverExclusivity=h.slice(19).trim():h.startsWith(\"--- \")?r.fromPath=h.slice(6).trim():h.startsWith(\"+++ \")&&(r.toPath=h.slice(6).trim());else{let E=Pbt[h[0]]||null;switch(E){case\"header\":c(),a=bbt(h);break;case null:s=\"parsing header\",f(),p-=1;break;case\"pragma\":{if(!h.startsWith(\"\\\\ No newline at end of file\"))throw new Error(`Unrecognized pragma in patch file: ${h}`);if(!n)throw new Error(\"Bad parser state: No newline at EOF pragma encountered without context\");n.noNewlineAtEndOfFile=!0}break;case\"context\":case\"deletion\":case\"insertion\":{if(!a)throw new Error(\"Bad parser state: Hunk lines encountered before hunk header\");n&&n.type!==E&&(a.parts.push(n),n=null),n||(n={type:E,lines:[],noNewlineAtEndOfFile:!1}),n.lines.push(h.slice(1))}break;default:je.assertNever(E);break}}}f();for(let{hunks:p}of e)if(p)for(let h of p)Qbt(h);return e}function kbt(t){let e=[];for(let r of t){let{semverExclusivity:s,diffLineFromPath:a,diffLineToPath:n,oldMode:c,newMode:f,deletedFileMode:p,newFileMode:h,renameFrom:E,renameTo:C,beforeHash:S,afterHash:P,fromPath:I,toPath:R,hunks:N}=r,U=E?\"rename\":p?\"file deletion\":h?\"file creation\":N&&N.length>0?\"patch\":\"mode change\",W=null;switch(U){case\"rename\":{if(!E||!C)throw new Error(\"Bad parser state: rename from & to not given\");e.push({type:\"rename\",semverExclusivity:s,fromPath:O1(E),toPath:O1(C)}),W=C}break;case\"file deletion\":{let ee=a||I;if(!ee)throw new Error(\"Bad parse state: no path given for file deletion\");e.push({type:\"file deletion\",semverExclusivity:s,hunk:N&&N[0]||null,path:O1(ee),mode:TL(p),hash:S})}break;case\"file creation\":{let ee=n||R;if(!ee)throw new Error(\"Bad parse state: no path given for file creation\");e.push({type:\"file creation\",semverExclusivity:s,hunk:N&&N[0]||null,path:O1(ee),mode:TL(h),hash:P})}break;case\"patch\":case\"mode change\":W=R||n;break;default:je.assertNever(U);break}W&&c&&f&&c!==f&&e.push({type:\"mode change\",semverExclusivity:s,path:O1(W),oldMode:TL(c),newMode:TL(f)}),W&&N&&N.length&&e.push({type:\"patch\",semverExclusivity:s,path:O1(W),hunks:N,beforeHash:S,afterHash:P})}if(e.length===0)throw new Error(\"Unable to parse patch file: No changes found. Make sure the patch is a valid UTF8 encoded string\");return e}function TL(t){let e=parseInt(t,8)&511;if(e!==Sbt&&e!==Dbt)throw new Error(`Unexpected file mode string: ${t}`);return e}function Zb(t){let e=t.split(/\\n/g);return e[e.length-1]===\"\"&&e.pop(),kbt(xbt(e))}function Qbt(t){let e=0,r=0;for(let{type:s,lines:a}of t.parts)switch(s){case\"context\":r+=a.length,e+=a.length;break;case\"deletion\":e+=a.length;break;case\"insertion\":r+=a.length;break;default:je.assertNever(s);break}if(e!==t.header.original.length||r!==t.header.patched.length){let s=a=>a<0?a:`+${a}`;throw new Error(`hunk header integrity check failed (expected @@ ${s(t.header.original.length)} ${s(t.header.patched.length)} @@, got @@ ${s(e)} ${s(r)} @@)`)}}Ge();Dt();var L1=class extends Error{constructor(r,s){super(`Cannot apply hunk #${r+1}`);this.hunk=s}};async function M1(t,e,r){let s=await t.lstatPromise(e),a=await r();typeof a<\"u\"&&(e=a),await t.lutimesPromise(e,s.atime,s.mtime)}async function RL(t,{baseFs:e=new Yn,dryRun:r=!1,version:s=null}={}){for(let a of t)if(!(a.semverExclusivity!==null&&s!==null&&!Fr.satisfiesWithPrereleases(s,a.semverExclusivity)))switch(a.type){case\"file deletion\":if(r){if(!e.existsSync(a.path))throw new Error(`Trying to delete a file that doesn't exist: ${a.path}`)}else await M1(e,J.dirname(a.path),async()=>{await e.unlinkPromise(a.path)});break;case\"rename\":if(r){if(!e.existsSync(a.fromPath))throw new Error(`Trying to move a file that doesn't exist: ${a.fromPath}`)}else await M1(e,J.dirname(a.fromPath),async()=>{await M1(e,J.dirname(a.toPath),async()=>{await M1(e,a.fromPath,async()=>(await e.movePromise(a.fromPath,a.toPath),a.toPath))})});break;case\"file creation\":if(r){if(e.existsSync(a.path))throw new Error(`Trying to create a file that already exists: ${a.path}`)}else{let n=a.hunk?a.hunk.parts[0].lines.join(`\n`)+(a.hunk.parts[0].noNewlineAtEndOfFile?\"\":`\n`):\"\";await e.mkdirpPromise(J.dirname(a.path),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,fi.SAFE_TIME,fi.SAFE_TIME)}break;case\"patch\":await M1(e,a.path,async()=>{await Fbt(a,{baseFs:e,dryRun:r})});break;case\"mode change\":{let c=(await e.statPromise(a.path)).mode;if(Xxe(a.newMode)!==Xxe(c))continue;await M1(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:je.assertNever(a);break}}function Xxe(t){return(t&64)>0}function Zxe(t){return t.replace(/\\s+$/,\"\")}function Rbt(t,e){return Zxe(t)===Zxe(e)}async function Fbt({hunks:t,path:e},{baseFs:r,dryRun:s=!1}){let a=await r.statSync(e).mode,c=(await r.readFileSync(e,\"utf8\")).split(/\\n/),f=[],p=0,h=0;for(let C of t){let S=Math.max(h,C.header.patched.start+p),P=Math.max(0,S-h),I=Math.max(0,c.length-S-C.header.original.length),R=Math.max(P,I),N=0,U=0,W=null;for(;N<=R;){if(N<=P&&(U=S-N,W=$xe(C,c,U),W!==null)){N=-N;break}if(N<=I&&(U=S+N,W=$xe(C,c,U),W!==null))break;N+=1}if(W===null)throw new L1(t.indexOf(C),C);f.push(W),p+=N,h=U+C.header.original.length}if(s)return;let E=0;for(let C of f)for(let S of C)switch(S.type){case\"splice\":{let P=S.index+E;c.splice(P,S.numToDelete,...S.linesToInsert),E+=S.linesToInsert.length-S.numToDelete}break;case\"pop\":c.pop();break;case\"push\":c.push(S.line);break;default:je.assertNever(S);break}await r.writeFilePromise(e,c.join(`\n`),{mode:a})}function $xe(t,e,r){let s=[];for(let a of t.parts)switch(a.type){case\"context\":case\"deletion\":{for(let n of a.lines){let c=e[r];if(c==null||!Rbt(c,n))return null;r+=1}a.type===\"deletion\"&&(s.push({type:\"splice\",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&s.push({type:\"push\",line:\"\"}))}break;case\"insertion\":s.push({type:\"splice\",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&s.push({type:\"pop\"});break;default:je.assertNever(a.type);break}return s}var Obt=/^builtin<([^>]+)>$/;function U1(t,e){let{protocol:r,source:s,selector:a,params:n}=G.parseRange(t);if(r!==\"patch:\")throw new Error(\"Invalid patch range\");if(s===null)throw new Error(\"Patch locators must explicitly define their source\");let c=a?a.split(/&/).map(E=>fe.toPortablePath(E)):[],f=n&&typeof n.locator==\"string\"?G.parseLocator(n.locator):null,p=n&&typeof n.version==\"string\"?n.version:null,h=e(s);return{parentLocator:f,sourceItem:h,patchPaths:c,sourceVersion:p}}function FL(t){return t.range.startsWith(\"patch:\")}function Rg(t){return t.reference.startsWith(\"patch:\")}function $b(t){let{sourceItem:e,...r}=U1(t.range,G.parseDescriptor);return{...r,sourceDescriptor:e}}function eP(t){let{sourceItem:e,...r}=U1(t.reference,G.parseLocator);return{...r,sourceLocator:e}}function Lbt(t){let{sourceItem:e}=U1(t.range,G.parseDescriptor);return e}function Mbt(t){let{sourceItem:e}=U1(t.reference,G.parseLocator);return e}function WK(t){if(!FL(t))return t;let{sourceItem:e}=U1(t.range,G.parseDescriptor);return e}function NL(t){if(!Rg(t))return t;let{sourceItem:e}=U1(t.reference,G.parseLocator);return e}function eke({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:s,patchHash:a},n){let c=t!==null?{locator:G.stringifyLocator(t)}:{},f=typeof s<\"u\"?{version:s}:{},p=typeof a<\"u\"?{hash:a}:{};return G.makeRange({protocol:\"patch:\",source:n(e),selector:r.join(\"&\"),params:{...f,...p,...c}})}function OL(t,{parentLocator:e,sourceDescriptor:r,patchPaths:s}){return G.makeDescriptor(t,eke({parentLocator:e,sourceItem:r,patchPaths:s},G.stringifyDescriptor))}function YK(t,{parentLocator:e,sourcePackage:r,patchPaths:s,patchHash:a}){return G.makeLocator(t,eke({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:s,patchHash:a},G.stringifyLocator))}function tke({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:s},a){let n=a.lastIndexOf(\"!\");n!==-1&&(a=a.slice(n+1));let c=a.match(Obt);return c!==null?s(c[1]):a.startsWith(\"~/\")?r(a.slice(2)):J.isAbsolute(a)?t(a):e(a)}function rke(t){let e=t.lastIndexOf(\"!\");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has(\"optional\")}}function VK(t){return tke({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function tP(t,e,r){let s=t!==null?await r.fetcher.fetch(t,r):null,a=s&&s.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,s.localPath)}:s;s&&s!==a&&s.releaseFs&&s.releaseFs();let n=await je.releaseAfterUseAsync(async()=>await Promise.all(e.map(async c=>{let f=rke(c),p=await tke({onAbsolute:async h=>await ce.readFilePromise(h,\"utf8\"),onRelative:async h=>{if(a===null)throw new Error(\"Assertion failed: The parent locator should have been fetched\");return await a.packageFs.readFilePromise(J.join(a.prefixPath,h),\"utf8\")},onProject:async h=>await ce.readFilePromise(J.join(r.project.cwd,h),\"utf8\"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},c);return{...f,source:p}})));for(let c of n)typeof c.source==\"string\"&&(c.source=c.source.replace(/\\r\\n?/g,`\n`));return n}async function JK(t,{cache:e,project:r}){let s=r.storedPackages.get(t.locatorHash);if(typeof s>\"u\")throw new Error(\"Assertion failed: Expected the package to be registered\");let a=NL(t),n=r.storedChecksums,c=new ki,f=await ce.mktempPromise(),p=J.join(f,\"source\"),h=J.join(f,\"user\"),E=J.join(f,\".yarn-patch.json\"),C=r.configuration.makeFetcher(),S=[];try{let P,I;if(t.locatorHash===a.locatorHash){let R=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c});S.push(()=>R.releaseFs?.()),P=R,I=R}else P=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>P.releaseFs?.()),I=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>I.releaseFs?.());await Promise.all([ce.copyPromise(p,P.prefixPath,{baseFs:P.packageFs}),ce.copyPromise(h,I.prefixPath,{baseFs:I.packageFs}),ce.writeJsonPromise(E,{locator:G.stringifyLocator(t),version:s.version})])}finally{for(let P of S)P()}return ce.detachTemp(f),h}async function KK(t,e){let r=fe.fromPortablePath(t).replace(/\\\\/g,\"/\"),s=fe.fromPortablePath(e).replace(/\\\\/g,\"/\"),{stdout:a,stderr:n}=await qr.execvp(\"git\",[\"-c\",\"core.safecrlf=false\",\"diff\",\"--src-prefix=a/\",\"--dst-prefix=b/\",\"--ignore-cr-at-eol\",\"--full-index\",\"--no-index\",\"--no-renames\",\"--text\",r,s],{cwd:fe.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:\"1\",HOME:\"\",XDG_CONFIG_HOME:\"\",USERPROFILE:\"\"}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.\nThe following error was reported by 'git':\n${n}`);let c=r.startsWith(\"/\")?f=>f.slice(1):f=>f;return a.replace(new RegExp(`(a|b)(${je.escapeRegExp(`/${c(r)}/`)})`,\"g\"),\"$1/\").replace(new RegExp(`(a|b)${je.escapeRegExp(`/${c(s)}/`)}`,\"g\"),\"$1/\").replace(new RegExp(je.escapeRegExp(`${r}/`),\"g\"),\"\").replace(new RegExp(je.escapeRegExp(`${s}/`),\"g\"),\"\")}function zK(t,e){let r=[];for(let{source:s}of t){if(s===null)continue;let a=Zb(s);for(let n of a){let{semverExclusivity:c,...f}=n;c!==null&&e!==null&&!Fr.satisfiesWithPrereleases(e,c)||r.push(JSON.stringify(f))}}return Nn.makeHash(`${3}`,...r).slice(0,6)}Ge();function nke(t,{configuration:e,report:r}){for(let s of t.parts)for(let a of s.lines)switch(s.type){case\"context\":r.reportInfo(null,`  ${he.pretty(e,a,\"grey\")}`);break;case\"deletion\":r.reportError(28,`- ${he.pretty(e,a,he.Type.REMOVED)}`);break;case\"insertion\":r.reportError(28,`+ ${he.pretty(e,a,he.Type.ADDED)}`);break;default:je.assertNever(s.type)}}var rP=class{supports(e,r){return!!Rg(e)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async patchPackage(e,r){let{parentLocator:s,sourceLocator:a,sourceVersion:n,patchPaths:c}=eP(e),f=await tP(s,c,r),p=await ce.mktempPromise(),h=J.join(p,\"current.zip\"),E=await r.fetcher.fetch(a,r),C=G.getIdentVendorPath(e),S=new As(h,{create:!0,level:r.project.configuration.get(\"compressionLevel\")});await je.releaseAfterUseAsync(async()=>{await S.copyPromise(C,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),S.saveAndClose();for(let{source:P,optional:I}of f){if(P===null)continue;let R=new As(h,{level:r.project.configuration.get(\"compressionLevel\")}),N=new Sn(J.resolve(vt.root,C),{baseFs:R});try{await RL(Zb(P),{baseFs:N,version:n})}catch(U){if(!(U instanceof L1))throw U;let W=r.project.configuration.get(\"enableInlineHunks\"),ee=!W&&!I?\" (set enableInlineHunks for details)\":\"\",ie=`${G.prettyLocator(r.project.configuration,e)}: ${U.message}${ee}`,ue=le=>{W&&nke(U.hunk,{configuration:r.project.configuration,report:le})};if(R.discardAndClose(),I){r.report.reportWarningOnce(66,ie,{reportExtra:ue});continue}else throw new jt(66,ie,ue)}R.saveAndClose()}return new As(h,{level:r.project.configuration.get(\"compressionLevel\")})}};Ge();var nP=class{supportsDescriptor(e,r){return!!FL(e)}supportsLocator(e,r){return!!Rg(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){let{patchPaths:a}=$b(e);return a.every(n=>!VK(n))?e:G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:s}=$b(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(s)}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error(\"Assertion failed: This resolver cannot be used unless a fetcher is configured\");let{parentLocator:a,patchPaths:n}=$b(e),c=await tP(a,n,s.fetchOptions),f=r.sourceDescriptor;if(typeof f>\"u\")throw new Error(\"Assertion failed: The dependency should have been resolved\");let p=zK(c,f.version);return[YK(e,{parentLocator:a,sourcePackage:f,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:s}=eP(e);return{...await r.resolver.resolve(s,r),...e}}};Ge();Dt();Yt();var _1=class extends ft{constructor(){super(...arguments);this.save=ge.Boolean(\"-s,--save\",!1,{description:\"Add the patch to your resolution entries\"});this.patchFolder=ge.String()}static{this.paths=[[\"patch-commit\"]]}static{this.usage=ot.Usage({description:\"generate a patch out of a directory\",details:\"\\n      By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\\n\\n      With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\\n\\n      Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=J.resolve(this.context.cwd,fe.toPortablePath(this.patchFolder)),c=J.join(n,\"../source\"),f=J.join(n,\"../.yarn-patch.json\");if(!ce.existsSync(c))throw new nt(\"The argument folder didn't get created by 'yarn patch'\");let p=await KK(c,n),h=await ce.readJsonPromise(f),E=G.parseLocator(h.locator,!0);if(!s.storedPackages.has(E.locatorHash))throw new nt(\"No package found in the project for the given locator\");if(!this.save){this.context.stdout.write(p);return}let C=r.get(\"patchFolder\"),S=J.join(C,`${G.slugifyLocator(E)}.patch`);await ce.mkdirPromise(C,{recursive:!0}),await ce.writeFilePromise(S,p);let P=[],I=new Map;for(let R of s.storedPackages.values()){if(G.isVirtualLocator(R))continue;let N=R.dependencies.get(E.identHash);if(!N)continue;let U=G.ensureDevirtualizedDescriptor(N),W=WK(U),ee=s.storedResolutions.get(W.descriptorHash);if(!ee)throw new Error(\"Assertion failed: Expected the resolution to have been registered\");if(!s.storedPackages.get(ee))throw new Error(\"Assertion failed: Expected the package to have been registered\");let ue=s.tryWorkspaceByLocator(R);if(ue)P.push(ue);else{let le=s.originalPackages.get(R.locatorHash);if(!le)throw new Error(\"Assertion failed: Expected the original package to have been registered\");let me=le.dependencies.get(N.identHash);if(!me)throw new Error(\"Assertion failed: Expected the original dependency to have been registered\");I.set(me.descriptorHash,me)}}for(let R of P)for(let N of Ut.hardDependencies){let U=R.manifest[N].get(E.identHash);if(!U)continue;let W=OL(U,{parentLocator:null,sourceDescriptor:G.convertLocatorToDescriptor(E),patchPaths:[J.join(Er.home,J.relative(s.cwd,S))]});R.manifest[N].set(U.identHash,W)}for(let R of I.values()){let N=OL(R,{parentLocator:null,sourceDescriptor:G.convertLocatorToDescriptor(E),patchPaths:[J.join(Er.home,J.relative(s.cwd,S))]});s.topLevelWorkspace.manifest.resolutions.push({pattern:{descriptor:{fullName:G.stringifyIdent(N),description:R.range}},reference:N.range})}await s.persist()}};Ge();Dt();Yt();var H1=class extends ft{constructor(){super(...arguments);this.update=ge.Boolean(\"-u,--update\",!1,{description:\"Reapply local patches that already apply to this packages\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.package=ge.String()}static{this.paths=[[\"patch\"]]}static{this.usage=ot.Usage({description:\"prepare a package for patching\",details:\"\\n      This command will cause a package to be extracted in a temporary directory intended to be editable at will.\\n\\n      Once you're done with your changes, run `yarn patch-commit -s path` (with `path` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\\n\\n      Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=G.parseLocator(this.package);if(c.reference===\"unknown\"){let f=je.mapAndFilter([...s.storedPackages.values()],p=>p.identHash!==c.identHash?je.mapAndFilter.skip:G.isVirtualLocator(p)?je.mapAndFilter.skip:Rg(p)!==this.update?je.mapAndFilter.skip:p);if(f.length===0)throw new nt(\"No package found in the project for the given locator\");if(f.length>1)throw new nt(`Multiple candidate packages found; explicitly choose one of them (use \\`yarn why <package>\\` to get more information as to who depends on them):\n${f.map(p=>`\n- ${G.prettyLocator(r,p)}`).join(\"\")}`);c=f[0]}if(!s.storedPackages.has(c.locatorHash))throw new nt(\"No package found in the project for the given locator\");await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=NL(c),h=await JK(c,{cache:n,project:s});f.reportJson({locator:G.stringifyLocator(p),path:fe.fromPortablePath(h)});let E=this.update?\" along with its current modifications\":\"\";f.reportInfo(0,`Package ${G.prettyLocator(r,p)} got extracted with success${E}!`),f.reportInfo(0,`You can now edit the following folder: ${he.pretty(r,fe.fromPortablePath(h),\"magenta\")}`),f.reportInfo(0,`Once you are done run ${he.pretty(r,`yarn patch-commit -s ${process.platform===\"win32\"?'\"':\"\"}${fe.fromPortablePath(h)}${process.platform===\"win32\"?'\"':\"\"}`,\"cyan\")} and Yarn will store a patchfile based on your changes.`)})}};var Ubt={configuration:{enableInlineHunks:{description:\"If true, the installs will print unmatched patch hunks\",type:\"BOOLEAN\",default:!1},patchFolder:{description:\"Folder where the patch files must be written\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/patches\"}},commands:[_1,H1],fetchers:[rP],resolvers:[nP]},_bt=Ubt;var ez={};Vt(ez,{PnpmLinker:()=>iP,default:()=>Ybt});Ge();Dt();Yt();var iP=class{getCustomDataKey(){return JSON.stringify({name:\"PnpmLinker\",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error(\"Assertion failed: Expected the pnpm linker to be enabled\");let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>\"u\")throw new nt(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\\/node_modules\\/(@[^/]*\\/)?[^/]+)(\\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let c=e,f=e;do{f=c,c=J.dirname(f);let p=a.locatorByPath.get(f);if(p)return p}while(c!==f);return null}makeInstaller(e){return new ZK(e)}isEnabled(e){return e.project.configuration.get(\"nodeLinker\")===\"pnpm\"}},ZK=class{constructor(e){this.opts=e;this.asyncActions=new je.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=$P(ce,{indexPath:J.join(e.project.configuration.get(\"globalFolder\"),\"index\")})}attachCustomData(e){}async installPackage(e,r,s){switch(e.linkType){case\"SOFT\":return this.installPackageSoft(e,r,s);case\"HARD\":return this.installPackageHard(e,r,s)}throw new Error(\"Assertion failed: Unsupported package link type\")}async installPackageSoft(e,r,s){let a=J.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?J.join(a,Er.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(e,r,s){let a=jbt(e,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,G.stringifyLocator(e)),this.customData.pathsByLocator.set(e.locatorHash,a),s.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await ce.mkdirPromise(n,{recursive:!0}),await ce.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:\"HardlinkFromIndex\",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let f=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e,p={manifest:await Ut.tryFind(r.prefixPath,{baseFs:r.packageFs})??new Ut,misc:{hasBindingGyp:gA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(f,e.version),E=gA.extractBuildRequest(e,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:E}}async attachInternalDependencies(e,r){if(this.opts.project.configuration.get(\"nodeLinker\")!==\"pnpm\"||!ike(e,{project:this.opts.project}))return;let s=this.customData.pathsByLocator.get(e.locatorHash);if(typeof s>\"u\")throw new Error(`Assertion failed: Expected the package to have been registered (${G.stringifyLocator(e)})`);let{dependenciesLocation:a}=s;a&&this.asyncActions.reduce(e.locatorHash,async n=>{await ce.mkdirPromise(a,{recursive:!0});let c=await Gbt(a),f=new Map(c),p=[n],h=(C,S)=>{let P=S;ike(S,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,\"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies\"),P=G.devirtualizeLocator(S));let I=this.customData.pathsByLocator.get(P.locatorHash);if(typeof I>\"u\")throw new Error(`Assertion failed: Expected the package to have been registered (${G.stringifyLocator(S)})`);let R=G.stringifyIdent(C),N=J.join(a,R),U=J.relative(J.dirname(N),I.packageLocation),W=f.get(R);f.delete(R),p.push(Promise.resolve().then(async()=>{if(W){if(W.isSymbolicLink()&&await ce.readlinkPromise(N)===U)return;await ce.removePromise(N)}await ce.mkdirpPromise(J.dirname(N)),process.platform==\"win32\"&&this.opts.project.configuration.get(\"winLinkType\")===\"junctions\"?await ce.symlinkPromise(I.packageLocation,N,\"junction\"):await ce.symlinkPromise(U,N)}))},E=!1;for(let[C,S]of r)C.identHash===e.identHash&&(E=!0),h(C,S);!E&&!this.opts.project.tryWorkspaceByLocator(e)&&h(G.convertLocatorToDescriptor(e),e),p.push(qbt(a,f)),await Promise.all(p)})}async attachExternalDependents(e,r){throw new Error(\"External dependencies haven't been implemented for the pnpm linker\")}async finalizeInstall(){let e=ske(this.opts.project);if(this.opts.project.configuration.get(\"nodeLinker\")!==\"pnpm\")await ce.removePromise(e);else{let r;try{r=new Set(await ce.readdirPromise(e))}catch{r=new Set}for(let{dependenciesLocation:s}of this.customData.pathsByLocator.values()){if(!s)continue;let a=J.contains(e,s);if(a===null)continue;let[n]=a.split(J.sep);r.delete(n)}await Promise.all([...r].map(async s=>{await ce.removePromise(J.join(e,s))}))}return await this.asyncActions.wait(),await $K(e),this.opts.project.configuration.get(\"nodeLinker\")!==\"node-modules\"&&await $K(Hbt(this.opts.project)),{customData:this.customData}}};function Hbt(t){return J.join(t.cwd,Er.nodeModules)}function ske(t){return t.configuration.get(\"pnpmStoreFolder\")}function jbt(t,{project:e}){let r=G.slugifyLocator(t),s=ske(e),a=J.join(s,r,\"package\"),n=J.join(s,r,Er.nodeModules);return{packageLocation:a,dependenciesLocation:n}}function ike(t,{project:e}){return!G.isVirtualLocator(t)||!e.tryWorkspaceByLocator(t)}async function Gbt(t){let e=new Map,r=[];try{r=await ce.readdirPromise(t,{withFileTypes:!0})}catch(s){if(s.code!==\"ENOENT\")throw s}try{for(let s of r)if(!s.name.startsWith(\".\"))if(s.name.startsWith(\"@\")){let a=await ce.readdirPromise(J.join(t,s.name),{withFileTypes:!0});if(a.length===0)e.set(s.name,s);else for(let n of a)e.set(`${s.name}/${n.name}`,n)}else e.set(s.name,s)}catch(s){if(s.code!==\"ENOENT\")throw s}return e}async function qbt(t,e){let r=[],s=new Set;for(let a of e.keys()){r.push(ce.removePromise(J.join(t,a)));let n=G.tryParseIdent(a)?.scope;n&&s.add(`@${n}`)}return Promise.all(r).then(()=>Promise.all([...s].map(a=>$K(J.join(t,a)))))}async function $K(t){try{await ce.rmdirPromise(t)}catch(e){if(e.code!==\"ENOENT\"&&e.code!==\"ENOTEMPTY\"&&e.code!==\"EBUSY\")throw e}}var Wbt={configuration:{pnpmStoreFolder:{description:\"By default, the store is stored in the 'node_modules/.store' of the project. Sometimes in CI scenario's it is convenient to store this in a different location so it can be cached and reused.\",type:\"ABSOLUTE_PATH\",default:\"./node_modules/.store\"}},linkers:[iP]},Ybt=Wbt;var az={};Vt(az,{StageCommand:()=>j1,default:()=>nPt,stageUtils:()=>ML});Ge();Dt();Yt();Ge();Dt();var ML={};Vt(ML,{ActionType:()=>tz,checkConsensus:()=>LL,expandDirectory:()=>iz,findConsensus:()=>sz,findVcsRoot:()=>rz,genCommitMessage:()=>oz,getCommitPrefix:()=>oke,isYarnFile:()=>nz});Dt();var tz=(n=>(n[n.CREATE=0]=\"CREATE\",n[n.DELETE=1]=\"DELETE\",n[n.ADD=2]=\"ADD\",n[n.REMOVE=3]=\"REMOVE\",n[n.MODIFY=4]=\"MODIFY\",n))(tz||{});async function rz(t,{marker:e}){do if(!ce.existsSync(J.join(t,e)))t=J.dirname(t);else return t;while(t!==\"/\");return null}function nz(t,{roots:e,names:r}){if(r.has(J.basename(t)))return!0;do if(!e.has(t))t=J.dirname(t);else return!0;while(t!==\"/\");return!1}function iz(t){let e=[],r=[t];for(;r.length>0;){let s=r.pop(),a=ce.readdirSync(s);for(let n of a){let c=J.resolve(s,n);ce.lstatSync(c).isDirectory()?r.push(c):e.push(c)}}return e}function LL(t,e){let r=0,s=0;for(let a of t)a!==\"wip\"&&(e.test(a)?r+=1:s+=1);return r>=s}function sz(t){let e=LL(t,/^(\\w\\(\\w+\\):\\s*)?\\w+s/),r=LL(t,/^(\\w\\(\\w+\\):\\s*)?[A-Z]/),s=LL(t,/^\\w\\(\\w+\\):/);return{useThirdPerson:e,useUpperCase:r,useComponent:s}}function oke(t){return t.useComponent?\"chore(yarn): \":\"\"}var Vbt=new Map([[0,\"create\"],[1,\"delete\"],[2,\"add\"],[3,\"remove\"],[4,\"update\"]]);function oz(t,e){let r=oke(t),s=[],a=e.slice().sort((n,c)=>n[0]-c[0]);for(;a.length>0;){let[n,c]=a.shift(),f=Vbt.get(n);t.useUpperCase&&s.length===0&&(f=`${f[0].toUpperCase()}${f.slice(1)}`),t.useThirdPerson&&(f+=\"s\");let p=[c];for(;a.length>0&&a[0][0]===n;){let[,E]=a.shift();p.push(E)}p.sort();let h=p.shift();p.length===1?h+=\" (and one other)\":p.length>1&&(h+=` (and ${p.length} others)`),s.push(`${f} ${h}`)}return`${r}${s.join(\", \")}`}var Jbt=\"Commit generated via `yarn stage`\",Kbt=11;async function ake(t){let{code:e,stdout:r}=await qr.execvp(\"git\",[\"log\",\"-1\",\"--pretty=format:%H\"],{cwd:t});return e===0?r.trim():null}async function zbt(t,e){let r=[],s=e.filter(h=>J.basename(h.path)===\"package.json\");for(let{action:h,path:E}of s){let C=J.relative(t,E);if(h===4){let S=await ake(t),{stdout:P}=await qr.execvp(\"git\",[\"show\",`${S}:${C}`],{cwd:t,strict:!0}),I=await Ut.fromText(P),R=await Ut.fromFile(E),N=new Map([...R.dependencies,...R.devDependencies]),U=new Map([...I.dependencies,...I.devDependencies]);for(let[W,ee]of U){let ie=G.stringifyIdent(ee),ue=N.get(W);ue?ue.range!==ee.range&&r.push([4,`${ie} to ${ue.range}`]):r.push([3,ie])}for(let[W,ee]of N)U.has(W)||r.push([2,G.stringifyIdent(ee)])}else if(h===0){let S=await Ut.fromFile(E);S.name?r.push([0,G.stringifyIdent(S.name)]):r.push([0,\"a package\"])}else if(h===1){let S=await ake(t),{stdout:P}=await qr.execvp(\"git\",[\"show\",`${S}:${C}`],{cwd:t,strict:!0}),I=await Ut.fromText(P);I.name?r.push([1,G.stringifyIdent(I.name)]):r.push([1,\"a package\"])}else throw new Error(\"Assertion failed: Unsupported action type\")}let{code:a,stdout:n}=await qr.execvp(\"git\",[\"log\",`-${Kbt}`,\"--pretty=format:%s\"],{cwd:t}),c=a===0?n.split(/\\n/g).filter(h=>h!==\"\"):[],f=sz(c);return oz(f,r)}var Xbt={0:[\" A \",\"?? \"],4:[\" M \"],1:[\" D \"]},Zbt={0:[\"A  \"],4:[\"M  \"],1:[\"D  \"]},lke={async findRoot(t){return await rz(t,{marker:\".git\"})},async filterChanges(t,e,r,s){let{stdout:a}=await qr.execvp(\"git\",[\"status\",\"-s\"],{cwd:t,strict:!0}),n=a.toString().split(/\\n/g),c=s?.staged?Zbt:Xbt;return[].concat(...n.map(p=>{if(p===\"\")return[];let h=p.slice(0,3),E=J.resolve(t,p.slice(3));if(!s?.staged&&h===\"?? \"&&p.endsWith(\"/\"))return iz(E).map(C=>({action:0,path:C}));{let S=[0,4,1].find(P=>c[P].includes(h));return S!==void 0?[{action:S,path:E}]:[]}})).filter(p=>nz(p.path,{roots:e,names:r}))},async genCommitMessage(t,e){return await zbt(t,e)},async makeStage(t,e){let r=e.map(s=>fe.fromPortablePath(s.path));await qr.execvp(\"git\",[\"add\",\"--\",...r],{cwd:t,strict:!0})},async makeCommit(t,e,r){let s=e.map(a=>fe.fromPortablePath(a.path));await qr.execvp(\"git\",[\"add\",\"-N\",\"--\",...s],{cwd:t,strict:!0}),await qr.execvp(\"git\",[\"commit\",\"-m\",`${r}\n\n${Jbt}\n`,\"--\",...s],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(s=>fe.fromPortablePath(s.path));await qr.execvp(\"git\",[\"reset\",\"HEAD\",\"--\",...r],{cwd:t,strict:!0})}};var $bt=[lke],j1=class extends ft{constructor(){super(...arguments);this.commit=ge.Boolean(\"-c,--commit\",!1,{description:\"Commit the staged files\"});this.reset=ge.Boolean(\"-r,--reset\",!1,{description:\"Remove all files from the staging area\"});this.dryRun=ge.Boolean(\"-n,--dry-run\",!1,{description:\"Print the commit message and the list of modified files without staging / committing\"});this.update=ge.Boolean(\"-u,--update\",!1,{hidden:!0})}static{this.paths=[[\"stage\"]]}static{this.usage=ot.Usage({description:\"add all yarn files to your vcs\",details:\"\\n      This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\\n\\n      Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\\n\\n      Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\\n    \",examples:[[\"Adds all modified project files to the staging area\",\"yarn stage\"],[\"Creates a new commit containing all modified project files\",\"yarn stage --commit\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),{driver:a,root:n}=await ePt(s.cwd),c=[r.get(\"cacheFolder\"),r.get(\"globalFolder\"),r.get(\"virtualFolder\"),r.get(\"yarnPath\")];await r.triggerHook(C=>C.populateYarnPaths,s,C=>{c.push(C)});let f=new Set;for(let C of c)for(let S of tPt(n,C))f.add(S);let p=new Set([r.get(\"rcFilename\"),Er.lockfile,Er.manifest]),h=await a.filterChanges(n,f,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E}\n`);else for(let C of h)this.context.stdout.write(`${fe.fromPortablePath(C.path)}\n`);else if(this.reset){let C=await a.filterChanges(n,f,p,{staged:!0});C.length===0?this.context.stdout.write(\"No staged changes found!\"):await a.makeReset(n,C)}else h.length===0?this.context.stdout.write(\"No changes found!\"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};async function ePt(t){let e=null,r=null;for(let s of $bt)if((r=await s.findRoot(t))!==null){e=s;break}if(e===null||r===null)throw new nt(\"No stage driver has been found for your current project\");return{driver:e,root:r}}function tPt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let s;try{s=ce.statSync(e)}catch{break}if(s.isSymbolicLink())e=J.resolve(J.dirname(e),ce.readlinkSync(e));else break}return r}var rPt={commands:[j1]},nPt=rPt;var lz={};Vt(lz,{default:()=>fPt});Ge();Ge();Dt();var fke=ut(Ai());Ge();var cke=ut(g9()),iPt=\"e8e1bd300d860104bb8c58453ffa1eb4\",sPt=\"OFCNCOG2CU\",uke=async(t,e)=>{let r=G.stringifyIdent(t),a=oPt(e).initIndex(\"npm-search\");try{return(await a.getObject(r,{attributesToRetrieve:[\"types\"]})).types?.ts===\"definitely-typed\"}catch{return!1}},oPt=t=>(0,cke.default)(sPt,iPt,{requester:{async send(r){try{let s=await nn.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var Ake=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,aPt=async(t,e,r,s)=>{if(r.scope===\"types\")return;let{project:a}=t,{configuration:n}=a;if(!(n.get(\"tsEnableAutoTypes\")??(ce.existsSync(J.join(t.cwd,\"tsconfig.json\"))||ce.existsSync(J.join(a.cwd,\"tsconfig.json\")))))return;let f=n.makeResolver(),p={project:a,resolver:f,report:new ki};if(!await uke(r,n))return;let E=Ake(r),C=G.parseRange(r.range).selector;if(!Fr.validRange(C)){let N=n.normalizeDependency(r),U=await f.getCandidates(N,{},p);C=G.parseRange(U[0].reference).selector}let S=fke.default.coerce(C);if(S===null)return;let P=`${Xu.Modifier.CARET}${S.major}`,I=G.makeDescriptor(G.makeIdent(\"types\",E),P),R=je.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,W=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&W!==r.descriptorHash)return je.mapAndFind.skip;let ee=[];for(let ie of Ut.allDependencies){let ue=N.manifest[ie].get(I.identHash);typeof ue>\"u\"||ee.push([ie,ue])}return ee.length===0?je.mapAndFind.skip:ee});if(typeof R<\"u\")for(let[N,U]of R)t.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(I);if((await f.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[Xu.Target.DEVELOPMENT].set(I.identHash,I)}},lPt=async(t,e,r)=>{if(r.scope===\"types\")return;let{project:s}=t,{configuration:a}=s;if(!(a.get(\"tsEnableAutoTypes\")??(ce.existsSync(J.join(t.cwd,\"tsconfig.json\"))||ce.existsSync(J.join(s.cwd,\"tsconfig.json\")))))return;let c=Ake(r),f=G.makeIdent(\"types\",c);for(let p of Ut.allDependencies)typeof t.manifest[p].get(f.identHash)>\"u\"||t.manifest[p].delete(f.identHash)},cPt=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings),e.publishConfig&&e.publishConfig.types&&(e.types=e.publishConfig.types)},uPt={configuration:{tsEnableAutoTypes:{description:\"Whether Yarn should auto-install @types/ dependencies on 'yarn add'\",type:\"BOOLEAN\",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:aPt,afterWorkspaceDependencyRemoval:lPt,beforeWorkspacePacking:cPt}},fPt=uPt;var pz={};Vt(pz,{VersionApplyCommand:()=>Y1,VersionCheckCommand:()=>V1,VersionCommand:()=>J1,default:()=>dPt,versionUtils:()=>W1});Ge();Ge();Yt();var W1={};Vt(W1,{Decision:()=>G1,applyPrerelease:()=>pke,applyReleases:()=>Az,applyStrategy:()=>sP,clearVersionFiles:()=>cz,getUndecidedDependentWorkspaces:()=>aP,getUndecidedWorkspaces:()=>UL,openVersionFile:()=>q1,requireMoreDecisions:()=>pPt,resolveVersionFiles:()=>oP,suggestStrategy:()=>fz,updateVersionFiles:()=>uz,validateReleaseDecision:()=>dy});Ge();Dt();wc();Yt();ql();var kA=ut(Ai()),APt=/^(>=|[~^]|)(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$/,G1=(h=>(h.UNDECIDED=\"undecided\",h.DECLINE=\"decline\",h.MAJOR=\"major\",h.MINOR=\"minor\",h.PATCH=\"patch\",h.PREMAJOR=\"premajor\",h.PREMINOR=\"preminor\",h.PREPATCH=\"prepatch\",h.PRERELEASE=\"prerelease\",h))(G1||{});function dy(t){let e=kA.default.valid(t);return e||je.validateEnum(O4(G1,\"UNDECIDED\"),t)}async function oP(t,{prerelease:e=null}={}){let r=new Map,s=t.configuration.get(\"deferredVersionFolder\");if(!ce.existsSync(s))return r;let a=await ce.readdirPromise(s);for(let n of a){if(!n.endsWith(\".yml\"))continue;let c=J.join(s,n),f=await ce.readFilePromise(c,\"utf8\"),p=ls(f);for(let[h,E]of Object.entries(p.releases||{})){if(E===\"decline\")continue;let C=G.parseIdent(h),S=t.tryWorkspaceByIdent(C);if(S===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspaces (${J.basename(c)} references ${h})`);if(S.manifest.version===null)throw new Error(`Assertion failed: Expected the workspace to have a version (${G.prettyLocator(t.configuration,S.anchoredLocator)})`);let P=S.manifest.raw.stableVersion??S.manifest.version,I=r.get(S),R=sP(E===\"prerelease\"?S.manifest.version:P,dy(E));if(R===null)throw new Error(`Assertion failed: Expected ${P} to support being bumped via strategy ${E}`);let N=typeof I<\"u\"?kA.default.gt(R,I)?R:I:R;r.set(S,N)}}return e&&(r=new Map([...r].map(([n,c])=>[n,pke(c,{current:n.manifest.version,prerelease:e})]))),r}async function cz(t){let e=t.configuration.get(\"deferredVersionFolder\");ce.existsSync(e)&&await ce.removePromise(e)}async function uz(t,e){let r=new Set(e),s=t.configuration.get(\"deferredVersionFolder\");if(!ce.existsSync(s))return;let a=await ce.readdirPromise(s);for(let n of a){if(!n.endsWith(\".yml\"))continue;let c=J.join(s,n),f=await ce.readFilePromise(c,\"utf8\"),p=ls(f),h=p?.releases;if(h){for(let E of Object.keys(h)){let C=G.parseIdent(E),S=t.tryWorkspaceByIdent(C);(S===null||r.has(S))&&delete p.releases[E]}Object.keys(p.releases).length>0?await ce.changeFilePromise(c,nl(new nl.PreserveOrdering(p))):await ce.unlinkPromise(c)}}}async function q1(t,{allowEmpty:e=!1}={}){let r=t.configuration;if(r.projectCwd===null)throw new nt(\"This command can only be run from within a Yarn project\");let s=await ka.fetchRoot(r.projectCwd),a=s!==null?await ka.fetchBase(s,{baseRefs:r.get(\"changesetBaseRefs\")}):null,n=s!==null?await ka.fetchChangedFiles(s,{base:a.hash,project:t}):[],c=r.get(\"deferredVersionFolder\"),f=n.filter(P=>J.contains(c,P)!==null);if(f.length>1)throw new nt(`Your current branch contains multiple versioning files; this isn't supported:\n- ${f.map(P=>fe.fromPortablePath(P)).join(`\n- `)}`);let p=new Set(je.mapAndFilter(n,P=>{let I=t.tryWorkspaceByFilePath(P);return I===null?je.mapAndFilter.skip:I}));if(f.length===0&&p.size===0&&!e)return null;let h=f.length===1?f[0]:J.join(c,`${Nn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=ce.existsSync(h)?await ce.readFilePromise(h,\"utf8\"):\"{}\",C=ls(E),S=new Map;for(let P of C.declined||[]){let I=G.parseIdent(P),R=t.getWorkspaceByIdent(I);S.set(R,\"decline\")}for(let[P,I]of Object.entries(C.releases||{})){let R=G.parseIdent(P),N=t.getWorkspaceByIdent(R);S.set(N,dy(I))}return{project:t,root:s,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(P=>P.manifest.version!==null)),releases:S,async saveAll(){let P={},I=[],R=[];for(let N of t.workspaces){if(N.manifest.version===null)continue;let U=G.stringifyIdent(N.anchoredLocator),W=S.get(N);W===\"decline\"?I.push(U):typeof W<\"u\"?P[U]=dy(W):p.has(N)&&R.push(U)}await ce.mkdirPromise(J.dirname(h),{recursive:!0}),await ce.changeFilePromise(h,nl(new nl.PreserveOrdering({releases:Object.keys(P).length>0?P:void 0,declined:I.length>0?I:void 0,undecided:R.length>0?R:void 0})))}}}function pPt(t){return UL(t).size>0||aP(t).length>0}function UL(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function aP(t,{include:e=new Set}={}){let r=[],s=new Map(je.mapAndFilter([...t.releases],([n,c])=>c===\"decline\"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(je.mapAndFilter([...t.releases],([n,c])=>c!==\"decline\"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||s.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let c of Ut.hardDependencies)for(let f of n.manifest.getForScope(c).values()){let p=t.project.tryWorkspaceByDescriptor(f);p!==null&&s.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function fz(t,e){let r=kA.default.clean(e);for(let s of Object.values(G1))if(s!==\"undecided\"&&s!==\"decline\"&&kA.default.inc(t,s)===r)return s;return null}function sP(t,e){if(kA.default.valid(e))return e;if(t===null)throw new nt(`Cannot apply the release strategy \"${e}\" unless the workspace already has a valid version`);if(!kA.default.valid(t))throw new nt(`Cannot apply the release strategy \"${e}\" on a non-semver version (${t})`);let r=kA.default.inc(t,e);if(r===null)throw new nt(`Cannot apply the release strategy \"${e}\" on the specified version (${t})`);return r}function Az(t,e,{report:r,exact:s}){let a=new Map;for(let n of t.workspaces)for(let c of Ut.allDependencies)for(let f of n.manifest[c].values()){let p=t.tryWorkspaceByDescriptor(f);if(p===null||!e.has(p))continue;je.getArrayWithDefault(a,p).push([n,c,f.identHash])}for(let[n,c]of e){let f=n.manifest.version;n.manifest.version=c,kA.default.prerelease(c)===null?delete n.manifest.raw.stableVersion:n.manifest.raw.stableVersion||(n.manifest.raw.stableVersion=f);let p=n.manifest.name!==null?G.stringifyIdent(n.manifest.name):null;r.reportInfo(0,`${G.prettyLocator(t.configuration,n.anchoredLocator)}: Bumped to ${c}`),r.reportJson({cwd:fe.fromPortablePath(n.cwd),ident:p,oldVersion:f,newVersion:c});let h=a.get(n);if(!(typeof h>\"u\"))for(let[E,C,S]of h){let P=E.manifest[C].get(S);if(typeof P>\"u\")throw new Error(\"Assertion failed: The dependency should have existed\");let I=P.range,R=!1;if(I.startsWith(Ei.protocol)&&(I=I.slice(Ei.protocol.length),R=!0,I===n.relativeCwd))continue;let N=I.match(APt);if(!N){r.reportWarning(0,`Couldn't auto-upgrade range ${I} (in ${G.prettyLocator(t.configuration,E.anchoredLocator)})`);continue}let U=s?`${c}`:`${N[1]}${c}`;R&&(U=`${Ei.protocol}${U}`);let W=G.makeDescriptor(P,U);E.manifest[C].set(S,W)}}}var hPt=new Map([[\"%n\",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function pke(t,{current:e,prerelease:r}){let s=new kA.default.SemVer(e),a=s.prerelease.slice(),n=[];s.prerelease=[],s.format()!==t&&(a.length=0);let c=!0,f=r.split(/\\./g);for(let p of f){let h=hPt.get(p);if(typeof h>\"u\")n.push(p),a[0]===p?a.shift():c=!1;else{let E=c?h.extract(a):null;E!==null&&typeof E[0]==\"number\"?(n.push(h.generate(E[0])),a=E[1]):(n.push(h.generate()),c=!1)}}return s.prerelease&&(s.prerelease=[]),`${t}-${n.join(\".\")}`}var Y1=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean(\"--all\",!1,{description:\"Apply the deferred version changes on all workspaces\"});this.dryRun=ge.Boolean(\"--dry-run\",!1,{description:\"Print the versions without actually generating the package archive\"});this.prerelease=ge.String(\"--prerelease\",{description:\"Add a prerelease identifier to new versions\",tolerateBoolean:!0});this.exact=ge.Boolean(\"--exact\",!1,{description:\"Use the exact version of each package, removes any range. Useful for nightly releases where the range might match another version.\"});this.recursive=ge.Boolean(\"-R,--recursive\",{description:\"Release the transitive workspaces as well\"});this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"})}static{this.paths=[[\"version\",\"apply\"]]}static{this.usage=ot.Usage({category:\"Release-related commands\",description:\"apply all the deferred version bumps at once\",details:`\n      This command will apply the deferred version changes and remove their definitions from the repository.\n\n      Note that if \\`--prerelease\\` is set, the given prerelease identifier (by default \\`rc.%n\\`) will be used on all new versions and the version definitions will be kept as-is.\n\n      By default only the current workspace will be bumped, but you can configure this behavior by using one of:\n\n      - \\`--recursive\\` to also apply the version bump on its dependencies\n      - \\`--all\\` to apply the version bump on all packages in the repository\n\n      Note that this command will also update the \\`workspace:\\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.\n    `,examples:[[\"Apply the version change to the local workspace\",\"yarn version apply\"],[\"Apply the version change to all the workspaces in the local workspace\",\"yarn version apply --all\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=this.prerelease?typeof this.prerelease!=\"boolean\"?this.prerelease:\"rc.%n\":null,h=await oP(s,{prerelease:p}),E=new Map;if(this.all)E=h;else{let C=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let S of C){let P=h.get(S);typeof P<\"u\"&&E.set(S,P)}}if(E.size===0){let C=h.size>0?\" Did you want to add --all?\":\"\";f.reportWarning(0,`The current workspace doesn't seem to require a version bump.${C}`);return}Az(s,E,{report:f,exact:this.exact}),this.dryRun||(p||(this.all?await cz(s):await uz(s,[...E.keys()])),f.reportSeparator())});return this.dryRun||c.hasErrors()?c.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};Ge();Dt();Yt();var _L=ut(Ai());var V1=class extends ft{constructor(){super(...arguments);this.interactive=ge.Boolean(\"-i,--interactive\",{description:\"Open an interactive interface used to set version bumps\"})}static{this.paths=[[\"version\",\"check\"]]}static{this.usage=ot.Usage({category:\"Release-related commands\",description:\"check that all the relevant packages have been bumped\",details:\"\\n      **Warning:** This command currently requires Git.\\n\\n      This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\\n\\n      In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\\n\\n      In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\\n    \",examples:[[\"Check whether the modified packages need a bump\",\"yarn version check\"]]})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){iw(this.context);let{Gem:r}=await Promise.resolve().then(()=>(WF(),LW)),{ScrollableItems:s}=await Promise.resolve().then(()=>(KF(),JF)),{FocusRequest:a}=await Promise.resolve().then(()=>(UW(),v2e)),{useListInput:n}=await Promise.resolve().then(()=>(VF(),S2e)),{renderForm:c}=await Promise.resolve().then(()=>($F(),ZF)),{Box:f,Text:p}=await Promise.resolve().then(()=>ut(Wc())),{default:h,useCallback:E,useState:C}=await Promise.resolve().then(()=>ut(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,this.context.cwd);if(!I)throw new ar(P.cwd,this.context.cwd);await P.restoreInstallState();let R=await q1(P);if(R===null||R.releaseRoots.size===0)return 0;if(R.root===null)throw new nt(\"This command can only be run on Git repositories\");let N=()=>h.createElement(f,{flexDirection:\"row\",paddingBottom:1},h.createElement(f,{flexDirection:\"column\",width:60},h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<up>\"),\"/\",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<down>\"),\" to select workspaces.\")),h.createElement(f,null,h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<left>\"),\"/\",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<right>\"),\" to select release strategies.\"))),h.createElement(f,{flexDirection:\"column\"},h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<enter>\"),\" to save.\")),h.createElement(f,{marginLeft:1},h.createElement(p,null,\"Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<ctrl+c>\"),\" to abort.\")))),U=({workspace:me,active:pe,decision:Be,setDecision:Ce})=>{let g=me.manifest.raw.stableVersion??me.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${G.prettyLocator(S,me.anchoredLocator)})`);if(_L.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let we=[\"undecided\",\"decline\",\"patch\",\"minor\",\"major\"];n(Be,we,{active:pe,minus:\"left\",plus:\"right\",set:Ce});let ye=Be===\"undecided\"?h.createElement(p,{color:\"yellow\"},g):Be===\"decline\"?h.createElement(p,{color:\"green\"},g):h.createElement(p,null,h.createElement(p,{color:\"magenta\"},g),\" \\u2192 \",h.createElement(p,{color:\"green\"},_L.default.valid(Be)?Be:_L.default.inc(g,Be)));return h.createElement(f,{flexDirection:\"column\"},h.createElement(f,null,h.createElement(p,null,G.prettyLocator(S,me.anchoredLocator),\" - \",ye)),h.createElement(f,null,we.map(Ae=>h.createElement(f,{key:Ae,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:Ae===Be}),\" \",Ae)))))},W=me=>{let pe=new Set(R.releaseRoots),Be=new Map([...me].filter(([Ce])=>pe.has(Ce)));for(;;){let Ce=aP({project:R.project,releases:Be}),g=!1;if(Ce.length>0){for(let[we]of Ce)if(!pe.has(we)){pe.add(we),g=!0;let ye=me.get(we);typeof ye<\"u\"&&Be.set(we,ye)}}if(!g)break}return{relevantWorkspaces:pe,relevantReleases:Be}},ee=()=>{let[me,pe]=C(()=>new Map(R.releases)),Be=E((Ce,g)=>{let we=new Map(me);g!==\"undecided\"?we.set(Ce,g):we.delete(Ce);let{relevantReleases:ye}=W(we);pe(ye)},[me,pe]);return[me,Be]},ie=({workspaces:me,releases:pe})=>{let Be=[];Be.push(`${me.size} total`);let Ce=0,g=0;for(let we of me){let ye=pe.get(we);typeof ye>\"u\"?g+=1:ye!==\"decline\"&&(Ce+=1)}return Be.push(`${Ce} release${Ce===1?\"\":\"s\"}`),Be.push(`${g} remaining`),h.createElement(p,{color:\"yellow\"},Be.join(\", \"))},le=await c(({useSubmit:me})=>{let[pe,Be]=ee();me(pe);let{relevantWorkspaces:Ce}=W(pe),g=new Set([...Ce].filter(se=>!R.releaseRoots.has(se))),[we,ye]=C(0),Ae=E(se=>{switch(se){case a.BEFORE:ye(we-1);break;case a.AFTER:ye(we+1);break}},[we,ye]);return h.createElement(f,{flexDirection:\"column\"},h.createElement(N,null),h.createElement(f,null,h.createElement(p,{wrap:\"wrap\"},\"The following files have been modified in your local checkout.\")),h.createElement(f,{flexDirection:\"column\",marginTop:1,paddingLeft:2},[...R.changedFiles].map(se=>h.createElement(f,{key:se},h.createElement(p,null,h.createElement(p,{color:\"grey\"},fe.fromPortablePath(R.root)),fe.sep,fe.relative(fe.fromPortablePath(R.root),fe.fromPortablePath(se)))))),R.releaseRoots.size>0&&h.createElement(h.Fragment,null,h.createElement(f,{marginTop:1},h.createElement(p,{wrap:\"wrap\"},\"Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even though they won't be published, releasing them will allow us to flag their dependents for potential re-release):\")),g.size>3?h.createElement(f,{marginTop:1},h.createElement(ie,{workspaces:R.releaseRoots,releases:pe})):null,h.createElement(f,{marginTop:1,flexDirection:\"column\"},h.createElement(s,{active:we%2===0,radius:1,size:2,onFocusRequest:Ae},[...R.releaseRoots].map(se=>h.createElement(U,{key:se.cwd,workspace:se,decision:pe.get(se)||\"undecided\",setDecision:Z=>Be(se,Z)}))))),g.size>0?h.createElement(h.Fragment,null,h.createElement(f,{marginTop:1},h.createElement(p,{wrap:\"wrap\"},\"The following workspaces depend on other workspaces that have been marked for release, and thus may need to be released as well:\")),h.createElement(f,null,h.createElement(p,null,\"(Press \",h.createElement(p,{bold:!0,color:\"cyanBright\"},\"<tab>\"),\" to move the focus between the workspace groups.)\")),g.size>5?h.createElement(f,{marginTop:1},h.createElement(ie,{workspaces:g,releases:pe})):null,h.createElement(f,{marginTop:1,flexDirection:\"column\"},h.createElement(s,{active:we%2===1,radius:2,size:2,onFocusRequest:Ae},[...g].map(se=>h.createElement(U,{key:se.cwd,workspace:se,decision:pe.get(se)||\"undecided\",setDecision:Z=>Be(se,Z)}))))):null)},{versionFile:R},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof le>\"u\")return 1;R.releases.clear();for(let[me,pe]of le)R.releases.set(me,pe);await R.saveAll()}async executeStandard(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return await s.restoreInstallState(),(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{let f=await q1(s);if(f===null||f.releaseRoots.size===0)return;if(f.root===null)throw new nt(\"This command can only be run on Git repositories\");if(c.reportInfo(0,`Your PR was started right after ${he.pretty(r,f.baseHash.slice(0,7),\"yellow\")} ${he.pretty(r,f.baseTitle,\"magenta\")}`),f.changedFiles.size>0){c.reportInfo(0,\"You have changed the following files since then:\"),c.reportSeparator();for(let S of f.changedFiles)c.reportInfo(null,`${he.pretty(r,fe.fromPortablePath(f.root),\"gray\")}${fe.sep}${fe.relative(fe.fromPortablePath(f.root),fe.fromPortablePath(S))}`)}let p=!1,h=!1,E=UL(f);if(E.size>0){p||c.reportSeparator();for(let S of E)c.reportError(0,`${G.prettyLocator(r,S.anchoredLocator)} has been modified but doesn't have a release strategy attached`);p=!0}let C=aP(f);for(let[S,P]of C)h||c.reportSeparator(),c.reportError(0,`${G.prettyLocator(r,S.anchoredLocator)} doesn't have a release strategy attached, but depends on ${G.prettyWorkspace(r,P)} which is planned for release.`),h=!0;(p||h)&&(c.reportSeparator(),c.reportInfo(0,\"This command detected that at least some workspaces have received modifications without explicit instructions as to how they had to be released (if needed).\"),c.reportInfo(0,\"To correct these errors, run `yarn version check --interactive` then follow the instructions.\"))})).exitCode()}};Ge();Yt();var HL=ut(Ai());var J1=class extends ft{constructor(){super(...arguments);this.deferred=ge.Boolean(\"-d,--deferred\",{description:\"Prepare the version to be bumped during the next release cycle\"});this.immediate=ge.Boolean(\"-i,--immediate\",{description:\"Bump the version immediately\"});this.strategy=ge.String()}static{this.paths=[[\"version\"]]}static{this.usage=ot.Usage({category:\"Release-related commands\",description:\"apply a new version to the current package\",details:\"\\n      This command will bump the version number for the given package, following the specified strategy:\\n\\n      - If `major`, the first number from the semver range will be increased (`X.0.0`).\\n      - If `minor`, the second number from the semver range will be increased (`0.X.0`).\\n      - If `patch`, the third number from the semver range will be increased (`0.0.X`).\\n      - If prefixed by `pre` (`premajor`, ...), a `-0` suffix will be set (`0.0.0-0`).\\n      - If `prerelease`, the suffix will be increased (`0.0.0-X`); the third number from the semver range will also be increased if there was no suffix in the previous version.\\n      - If `decline`, the nonce will be increased for `yarn version check` to pass without version bump.\\n      - If a valid semver range, it will be used as new version.\\n      - If unspecified, Yarn will ask you for guidance.\\n\\n      For more information about the `--deferred` flag, consult our documentation (https://yarnpkg.com/features/release-workflow#deferred-versioning).\\n    \",examples:[[\"Immediately bump the version to the next major\",\"yarn version major\"],[\"Prepare the version to be bumped to the next major\",\"yarn version major --deferred\"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=r.get(\"preferDeferredVersions\");this.deferred&&(n=!0),this.immediate&&(n=!1);let c=HL.default.valid(this.strategy),f=this.strategy===\"decline\",p;if(c)if(a.manifest.version!==null){let E=fz(a.manifest.version,this.strategy);E!==null?p=E:p=this.strategy}else p=this.strategy;else{let E=a.manifest.version;if(!f){if(E===null)throw new nt(\"Can't bump the version if there wasn't a version to begin with - use 0.0.0 as initial version then run the command again.\");if(typeof E!=\"string\"||!HL.default.valid(E))throw new nt(`Can't bump the version (${E}) if it's not valid semver`)}p=dy(this.strategy)}if(!n){let C=(await oP(s)).get(a);if(typeof C<\"u\"&&p!==\"decline\"){let S=sP(a.manifest.version,p);if(HL.default.lt(S,C))throw new nt(`Can't bump the version to one that would be lower than the current deferred one (${C})`)}}let h=await q1(s,{allowEmpty:!0});return h.releases.set(a,p),await h.saveAll(),n?0:await this.cli.run([\"version\",\"apply\"])}};var gPt={configuration:{deferredVersionFolder:{description:\"Folder where are stored the versioning files\",type:\"ABSOLUTE_PATH\",default:\"./.yarn/versions\"},preferDeferredVersions:{description:\"If true, running `yarn version` will assume the `--deferred` flag unless `--immediate` is set\",type:\"BOOLEAN\",default:!1}},commands:[Y1,V1,J1]},dPt=gPt;var hz={};Vt(hz,{WorkspacesFocusCommand:()=>K1,WorkspacesForeachCommand:()=>X1,default:()=>EPt});Ge();Ge();Yt();var K1=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean(\"--json\",!1,{description:\"Format the output as an NDJSON stream\"});this.production=ge.Boolean(\"--production\",!1,{description:\"Only install regular dependencies by omitting dev dependencies\"});this.all=ge.Boolean(\"-A,--all\",!1,{description:\"Install the entire project\"});this.workspaces=ge.Rest()}static{this.paths=[[\"workspaces\",\"focus\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"install a single workspace and its dependencies\",details:\"\\n      This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\\n\\n      Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\\n\\n      If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\\n    \"})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Kr.find(r);await s.restoreInstallState({restoreResolutions:!1});let c;if(this.all)c=new Set(s.workspaces);else if(this.workspaces.length===0){if(!a)throw new ar(s.cwd,this.context.cwd);c=new Set([a])}else c=new Set(this.workspaces.map(f=>s.getWorkspaceByIdent(G.parseIdent(f))));for(let f of c)for(let p of this.production?[\"dependencies\"]:Ut.hardDependencies)for(let h of f.manifest.getForScope(p).values()){let E=s.tryWorkspaceByDescriptor(h);E!==null&&c.add(E)}for(let f of s.workspaces)c.has(f)?this.production&&f.manifest.devDependencies.clear():(f.manifest.installConfig=f.manifest.installConfig||{},f.manifest.installConfig.selfReferences=!1,f.manifest.dependencies.clear(),f.manifest.devDependencies.clear(),f.manifest.peerDependencies.clear(),f.manifest.scripts.clear());return await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n,persistProject:!1})}};Ge();Ge();Ge();Yt();var z1=ut(Go()),gke=ut(Ld());Ul();var X1=class extends ft{constructor(){super(...arguments);this.from=ge.Array(\"--from\",{description:\"An array of glob pattern idents or paths from which to base any recursion\"});this.all=ge.Boolean(\"-A,--all\",{description:\"Run the command on all workspaces of a project\"});this.recursive=ge.Boolean(\"-R,--recursive\",{description:\"Run the command on the current workspace and all of its recursive dependencies\"});this.worktree=ge.Boolean(\"-W,--worktree\",{description:\"Run the command on all workspaces of the current worktree\"});this.verbose=ge.Counter(\"-v,--verbose\",{description:\"Increase level of logging verbosity up to 2 times\"});this.parallel=ge.Boolean(\"-p,--parallel\",!1,{description:\"Run the commands in parallel\"});this.interlaced=ge.Boolean(\"-i,--interlaced\",!1,{description:\"Print the output of commands in real-time instead of buffering it\"});this.jobs=ge.String(\"-j,--jobs\",{description:\"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`\",validator:g_([fo([\"unlimited\"]),$2(h_(),[m_(),d_(1)])])});this.topological=ge.Boolean(\"-t,--topological\",!1,{description:\"Run the command after all workspaces it depends on (regular) have finished\"});this.topologicalDev=ge.Boolean(\"--topological-dev\",!1,{description:\"Run the command after all workspaces it depends on (regular + dev) have finished\"});this.include=ge.Array(\"--include\",[],{description:\"An array of glob pattern idents or paths; only matching workspaces will be traversed\"});this.exclude=ge.Array(\"--exclude\",[],{description:\"An array of glob pattern idents or paths; matching workspaces won't be traversed\"});this.publicOnly=ge.Boolean(\"--no-private\",{description:\"Avoid running the command on private workspaces\"});this.since=ge.String(\"--since\",{description:\"Only include workspaces that have been changed since the specified ref.\",tolerateBoolean:!0});this.dryRun=ge.Boolean(\"-n,--dry-run\",{description:\"Print the commands that would be run, without actually running them\"});this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[[\"workspaces\",\"foreach\"]]}static{this.usage=ot.Usage({category:\"Workspace-related commands\",description:\"run a command on all workspaces\",details:\"\\n      This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\\n\\n      - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\\n\\n      - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\\n\\n      - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\\n\\n      - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project.\\n\\n      - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\\n\\n      - If `-W,--worktree` is set, Yarn will find workspaces to run the command on by looking at the current worktree.\\n\\n      - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\\n\\n      - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\\n\\n      - If `--dry-run` is set, Yarn will explain what it would do without actually doing anything.\\n\\n      - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them. You can also use the `--no-private` flag to avoid running the command in private workspaces.\\n\\n      The `-v,--verbose` flag can be passed up to twice: once to prefix output lines with the originating workspace's name, and again to include start/finish/timing log lines. Maximum verbosity is enabled by default in terminal environments.\\n\\n      If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\\n    \",examples:[[\"Publish all packages\",\"yarn workspaces foreach -A --no-private npm publish --tolerate-republish\"],[\"Run the build script on all descendant packages\",\"yarn workspaces foreach -A run build\"],[\"Run the build script on current and all descendant packages in parallel, building package dependencies first\",\"yarn workspaces foreach -Apt run build\"],[\"Run the build script on several packages and all their dependencies, building dependencies first\",\"yarn workspaces foreach -Rpt --from '{workspace-a,workspace-b}' run build\"]]})}static{this.schema=[tB(\"all\",qf.Forbids,[\"from\",\"recursive\",\"since\",\"worktree\"],{missingIf:\"undefined\"}),y_([\"all\",\"recursive\",\"since\",\"worktree\"],{missingIf:\"undefined\"})]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!this.all&&!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=this.cli.process([this.commandName,...this.args]),c=n.path.length===1&&n.path[0]===\"run\"&&typeof n.scriptName<\"u\"?n.scriptName:null;if(n.path.length===0)throw new nt(\"Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script\");let f=Ce=>{this.dryRun&&this.context.stdout.write(`${Ce}\n`)},p=()=>{let Ce=this.from.map(g=>z1.default.matcher(g));return s.workspaces.filter(g=>{let we=G.stringifyIdent(g.anchoredLocator),ye=g.relativeCwd;return Ce.some(Ae=>Ae(we)||Ae(ye))})},h=[];if(this.since?(f(\"Option --since is set; selecting the changed workspaces as root for workspace selection\"),h=Array.from(await ka.fetchChangedWorkspaces({ref:this.since,project:s}))):this.from?(f(\"Option --from is set; selecting the specified workspaces\"),h=[...p()]):this.worktree?(f(\"Option --worktree is set; selecting the current workspace\"),h=[a]):this.recursive?(f(\"Option --recursive is set; selecting the current workspace\"),h=[a]):this.all&&(f(\"Option --all is set; selecting all workspaces\"),h=[...s.workspaces]),this.dryRun&&!this.all){for(let Ce of h)f(`\n- ${Ce.relativeCwd}\n  ${G.prettyLocator(r,Ce.anchoredLocator)}`);h.length>0&&f(\"\")}let E;if(this.recursive?this.since?(f(\"Option --recursive --since is set; recursively selecting all dependent workspaces\"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependents()]).flat())):(f(\"Option --recursive is set; recursively selecting all transitive dependencies\"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(f(\"Option --worktree is set; recursively selecting all nested workspaces\"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ce of E)f(`\n- ${Ce.relativeCwd}\n  ${G.prettyLocator(r,Ce.anchoredLocator)}`);let C=[],S=!1;if(c?.includes(\":\")){for(let Ce of s.workspaces)if(Ce.manifest.scripts.has(c)&&(S=!S,S===!1))break}for(let Ce of h){if(c&&!Ce.manifest.scripts.has(c)&&!S&&!(await In.getWorkspaceAccessibleBinaries(Ce)).has(c)){f(`Excluding ${Ce.relativeCwd} because it doesn't have a \"${c}\" script`);continue}if(!(c===r.env.npm_lifecycle_event&&Ce.cwd===a.cwd)){if(this.include.length>0&&!z1.default.isMatch(G.stringifyIdent(Ce.anchoredLocator),this.include)&&!z1.default.isMatch(Ce.relativeCwd,this.include)){f(`Excluding ${Ce.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(z1.default.isMatch(G.stringifyIdent(Ce.anchoredLocator),this.exclude)||z1.default.isMatch(Ce.relativeCwd,this.exclude))){f(`Excluding ${Ce.relativeCwd} because it matches the --exclude filter`);continue}if(this.publicOnly&&Ce.manifest.private===!0){f(`Excluding ${Ce.relativeCwd} because it's a private workspace and --no-private was set`);continue}C.push(Ce)}}if(this.dryRun)return 0;let P=this.verbose??(this.context.stdout.isTTY?1/0:0),I=P>0,R=P>1,N=this.parallel?this.jobs===\"unlimited\"?1/0:Number(this.jobs)||Math.ceil(Ui.availableParallelism()/2):1,U=N===1?!1:this.parallel,W=U?this.interlaced:!0,ee=(0,gke.default)(N),ie=new Map,ue=new Set,le=0,me=null,pe=!1,Be=await Ot.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ce=>{let g=async(we,{commandIndex:ye})=>{if(pe)return-1;!U&&R&&ye>1&&Ce.reportSeparator();let Ae=mPt(we,{configuration:r,label:I,commandIndex:ye}),[se,Z]=hke(Ce,{prefix:Ae,interlaced:W}),[De,Re]=hke(Ce,{prefix:Ae,interlaced:W});try{R&&Ce.reportInfo(null,`${Ae?`${Ae} `:\"\"}Process started`);let mt=Date.now(),j=await this.cli.run([this.commandName,...this.args],{cwd:we.cwd,stdout:se,stderr:De})||0;se.end(),De.end(),await Z,await Re;let rt=Date.now();if(R){let Fe=r.get(\"enableTimers\")?`, completed in ${he.pretty(r,rt-mt,he.Type.DURATION)}`:\"\";Ce.reportInfo(null,`${Ae?`${Ae} `:\"\"}Process exited (exit code ${j})${Fe}`)}return j===130&&(pe=!0,me=j),j}catch(mt){throw se.end(),De.end(),await Z,await Re,mt}};for(let we of C)ie.set(we.anchoredLocator.locatorHash,we);for(;ie.size>0&&!Ce.hasErrors();){let we=[];for(let[Z,De]of ie){if(ue.has(De.anchoredDescriptor.descriptorHash))continue;let Re=!0;if(this.topological||this.topologicalDev){let mt=this.topologicalDev?new Map([...De.manifest.dependencies,...De.manifest.devDependencies]):De.manifest.dependencies;for(let j of mt.values()){let rt=s.tryWorkspaceByDescriptor(j);if(Re=rt===null||!ie.has(rt.anchoredLocator.locatorHash),!Re)break}}if(Re&&(ue.add(De.anchoredDescriptor.descriptorHash),we.push(ee(async()=>{let mt=await g(De,{commandIndex:++le});return ie.delete(Z),ue.delete(De.anchoredDescriptor.descriptorHash),{workspace:De,exitCode:mt}})),!U))break}if(we.length===0){let Z=Array.from(ie.values()).map(De=>G.prettyLocator(r,De.anchoredLocator)).join(\", \");Ce.reportError(3,`Dependency cycle detected (${Z})`);return}let ye=await Promise.all(we);ye.forEach(({workspace:Z,exitCode:De})=>{De!==0&&Ce.reportError(0,`The command failed in workspace ${G.prettyLocator(r,Z.anchoredLocator)} with exit code ${De}`)});let se=ye.map(Z=>Z.exitCode).find(Z=>Z!==0);(this.topological||this.topologicalDev)&&typeof se<\"u\"&&Ce.reportError(0,\"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph\")}});return me!==null?me:Be.exitCode()}};function hke(t,{prefix:e,interlaced:r}){let s=t.createStreamReporter(e),a=new je.DefaultStream;a.pipe(s,{end:!1}),a.on(\"finish\",()=>{s.end()});let n=new Promise(f=>{s.on(\"finish\",()=>{f(a.active)})});if(r)return[a,n];let c=new je.BufferStream;return c.pipe(a,{end:!1}),c.on(\"finish\",()=>{a.end()}),[c,n]}function mPt(t,{configuration:e,commandIndex:r,label:s}){if(!s)return null;let n=`[${G.stringifyIdent(t.anchoredLocator)}]:`,c=[\"#2E86AB\",\"#A23B72\",\"#F18F01\",\"#C73E1D\",\"#CCE2A3\"],f=c[r%c.length];return he.pretty(e,n,f)}var yPt={commands:[K1,X1]},EPt=yPt;var tC=()=>({modules:new Map([[\"@yarnpkg/cli\",Gv],[\"@yarnpkg/core\",jv],[\"@yarnpkg/fslib\",_2],[\"@yarnpkg/libzip\",fv],[\"@yarnpkg/parsers\",J2],[\"@yarnpkg/shell\",mv],[\"clipanion\",oB],[\"semver\",IPt],[\"typanion\",Ea],[\"@yarnpkg/plugin-essentials\",hq],[\"@yarnpkg/plugin-catalog\",yq],[\"@yarnpkg/plugin-compat\",Bq],[\"@yarnpkg/plugin-constraints\",_q],[\"@yarnpkg/plugin-dlx\",Hq],[\"@yarnpkg/plugin-exec\",qq],[\"@yarnpkg/plugin-file\",Yq],[\"@yarnpkg/plugin-git\",pq],[\"@yarnpkg/plugin-github\",Kq],[\"@yarnpkg/plugin-http\",zq],[\"@yarnpkg/plugin-init\",Xq],[\"@yarnpkg/plugin-interactive-tools\",JW],[\"@yarnpkg/plugin-jsr\",zW],[\"@yarnpkg/plugin-link\",XW],[\"@yarnpkg/plugin-nm\",FY],[\"@yarnpkg/plugin-npm\",FK],[\"@yarnpkg/plugin-npm-cli\",qK],[\"@yarnpkg/plugin-pack\",bV],[\"@yarnpkg/plugin-patch\",XK],[\"@yarnpkg/plugin-pnp\",wY],[\"@yarnpkg/plugin-pnpm\",ez],[\"@yarnpkg/plugin-stage\",az],[\"@yarnpkg/plugin-typescript\",lz],[\"@yarnpkg/plugin-version\",pz],[\"@yarnpkg/plugin-workspace-tools\",hz]]),plugins:new Set([\"@yarnpkg/plugin-essentials\",\"@yarnpkg/plugin-catalog\",\"@yarnpkg/plugin-compat\",\"@yarnpkg/plugin-constraints\",\"@yarnpkg/plugin-dlx\",\"@yarnpkg/plugin-exec\",\"@yarnpkg/plugin-file\",\"@yarnpkg/plugin-git\",\"@yarnpkg/plugin-github\",\"@yarnpkg/plugin-http\",\"@yarnpkg/plugin-init\",\"@yarnpkg/plugin-interactive-tools\",\"@yarnpkg/plugin-jsr\",\"@yarnpkg/plugin-link\",\"@yarnpkg/plugin-nm\",\"@yarnpkg/plugin-npm\",\"@yarnpkg/plugin-npm-cli\",\"@yarnpkg/plugin-pack\",\"@yarnpkg/plugin-patch\",\"@yarnpkg/plugin-pnp\",\"@yarnpkg/plugin-pnpm\",\"@yarnpkg/plugin-stage\",\"@yarnpkg/plugin-typescript\",\"@yarnpkg/plugin-version\",\"@yarnpkg/plugin-workspace-tools\"])});function yke({cwd:t,pluginConfiguration:e}){let r=new Ca({binaryLabel:\"Yarn Package Manager\",binaryName:\"yarn\",binaryVersion:fn??\"<unknown>\"});return Object.assign(r,{defaultContext:{...Ca.defaultContext,cwd:t,plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr}})}function CPt(t){if(je.parseOptionalBoolean(process.env.YARN_IGNORE_NODE))return!0;let r=process.versions.node,s=\">=18.12.0\";if(Fr.satisfiesWithPrereleases(r,s))return!0;let a=new nt(`This tool requires a Node version compatible with ${s} (got ${r}). Upgrade Node, or set \\`YARN_IGNORE_NODE=1\\` in your environment.`);return Ca.defaultContext.stdout.write(t.error(a)),!1}async function Eke({selfPath:t,pluginConfiguration:e}){return await ze.find(fe.toPortablePath(process.cwd()),e,{strict:!1,usePathCheck:t})}function wPt(t,e,{yarnPath:r}){if(!ce.existsSync(r))return t.error(new Error(`The \"yarn-path\" option has been set, but the specified location doesn't exist (${r}).`)),1;process.on(\"SIGINT\",()=>{});let s={stdio:\"inherit\",env:{...process.env,YARN_IGNORE_PATH:\"1\"}};try{(0,dke.execFileSync)(process.execPath,[fe.fromPortablePath(r),...e],s)}catch(a){return a.status??1}return 0}function BPt(t,e){let r=null,s=e;return e.length>=2&&e[0]===\"--cwd\"?(r=fe.toPortablePath(e[1]),s=e.slice(2)):e.length>=1&&e[0].startsWith(\"--cwd=\")?(r=fe.toPortablePath(e[0].slice(6)),s=e.slice(1)):e[0]===\"add\"&&e[e.length-2]===\"--cwd\"&&(r=fe.toPortablePath(e[e.length-1]),s=e.slice(0,e.length-2)),t.defaultContext.cwd=r!==null?J.resolve(r):J.cwd(),s}function vPt(t,{configuration:e}){if(!e.get(\"enableTelemetry\")||mke.isCI||!process.stdout.isTTY)return;ze.telemetry=new ZI(e,\"puba9cdc10ec5790a2cf4969dd413a47270\");let s=/^@yarnpkg\\/plugin-(.*)$/;for(let a of e.plugins.keys())$I.has(a.match(s)?.[1]??\"\")&&ze.telemetry?.reportPluginName(a);t.binaryVersion&&ze.telemetry.reportVersion(t.binaryVersion)}function Ike(t,{configuration:e}){for(let r of e.plugins.values())for(let s of r.commands||[])t.register(s)}async function SPt(t,e,{selfPath:r,pluginConfiguration:s}){if(!CPt(t))return 1;let a=await Eke({selfPath:r,pluginConfiguration:s}),n=a.get(\"yarnPath\"),c=a.get(\"ignorePath\");if(n&&!c)return wPt(t,e,{yarnPath:n});delete process.env.YARN_IGNORE_PATH;let f=BPt(t,e);vPt(t,{configuration:a}),Ike(t,{configuration:a});let p=t.process(f,t.defaultContext);return p.help||ze.telemetry?.reportCommandName(p.path.join(\" \")),await t.run(p,t.defaultContext)}async function bde({cwd:t=J.cwd(),pluginConfiguration:e=tC()}={}){let r=yke({cwd:t,pluginConfiguration:e}),s=await Eke({pluginConfiguration:e,selfPath:null});return Ike(r,{configuration:s}),r}async function VR(t,{cwd:e=J.cwd(),selfPath:r,pluginConfiguration:s}){let a=yke({cwd:e,pluginConfiguration:s});function n(){Ca.defaultContext.stdout.write(`ERROR: Yarn is terminating due to an unexpected empty event loop.\nPlease report this issue at https://github.com/yarnpkg/berry/issues.`)}process.once(\"beforeExit\",n);try{process.exitCode=42,process.exitCode=await SPt(a,t,{selfPath:r,pluginConfiguration:s})}catch(c){Ca.defaultContext.stdout.write(a.error(c)),process.exitCode=1}finally{process.off(\"beforeExit\",n),await ce.rmtempPromise()}}VR(process.argv.slice(2),{cwd:J.cwd(),selfPath:fe.toPortablePath(fe.resolve(process.argv[1])),pluginConfiguration:tC()});})();\n/**\n  @license\n  Copyright (c) 2015, Rebecca Turner\n\n  Permission to use, copy, modify, and/or distribute this software for any\n  purpose with or without fee is hereby granted, provided that the above\n  copyright notice and this permission notice appear in all copies.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n  FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n  PERFORMANCE OF THIS SOFTWARE.\n */\n/**\n  @license\n  Copyright Node.js contributors. All rights reserved.\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to\n  deal in the Software without restriction, including without limitation the\n  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n  sell copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n  IN THE SOFTWARE.\n*/\n/**\n  @license\n  The MIT License (MIT)\n\n  Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to deal\n  in the Software without restriction, including without limitation the rights\n  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n  copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n  THE SOFTWARE.\n*/\n/**\n  @license\n  Copyright Joyent, Inc. and other Node contributors.\n\n  Permission is hereby granted, free of charge, to any person obtaining a\n  copy of this software and associated documentation files (the\n  \"Software\"), to deal in the Software without restriction, including\n  without limitation the rights to use, copy, modify, merge, publish,\n  distribute, sublicense, and/or sell copies of the Software, and to permit\n  persons to whom the Software is furnished to do so, subject to the\n  following conditions:\n\n  The above copyright notice and this permission notice shall be included\n  in all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n  NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n  OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n  USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n/*! Bundled license information:\n\nis-number/index.js:\n  (*!\n   * is-number <https://github.com/jonschlinkert/is-number>\n   *\n   * Copyright (c) 2014-present, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n\nto-regex-range/index.js:\n  (*!\n   * to-regex-range <https://github.com/micromatch/to-regex-range>\n   *\n   * Copyright (c) 2015-present, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n\nfill-range/index.js:\n  (*!\n   * fill-range <https://github.com/jonschlinkert/fill-range>\n   *\n   * Copyright (c) 2014-present, Jon Schlinkert.\n   * Licensed under the MIT License.\n   *)\n\nis-extglob/index.js:\n  (*!\n   * is-extglob <https://github.com/jonschlinkert/is-extglob>\n   *\n   * Copyright (c) 2014-2016, Jon Schlinkert.\n   * Licensed under the MIT License.\n   *)\n\nis-glob/index.js:\n  (*!\n   * is-glob <https://github.com/jonschlinkert/is-glob>\n   *\n   * Copyright (c) 2014-2017, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n\nqueue-microtask/index.js:\n  (*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)\n\nrun-parallel/index.js:\n  (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)\n\ngit-url-parse/lib/index.js:\n  (*!\n   * buildToken\n   * Builds OAuth token prefix (helper function)\n   *\n   * @name buildToken\n   * @function\n   * @param {GitUrl} obj The parsed Git url object.\n   * @return {String} token prefix\n   *)\n\nobject-assign/index.js:\n  (*\n  object-assign\n  (c) Sindre Sorhus\n  @license MIT\n  *)\n\nreact/cjs/react.production.min.js:\n  (** @license React v17.0.2\n   * react.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   *)\n\nscheduler/cjs/scheduler.production.min.js:\n  (** @license React v0.20.2\n   * scheduler.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   *)\n\nreact-reconciler/cjs/react-reconciler.production.min.js:\n  (** @license React v0.26.2\n   * react-reconciler.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   *)\n\nis-windows/index.js:\n  (*!\n   * is-windows <https://github.com/jonschlinkert/is-windows>\n   *\n   * Copyright © 2015-2018, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n*/\n"
  },
  {
    "path": ".yarn/sdks/eslint/bin/eslint.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require eslint/bin/eslint.js\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real eslint/bin/eslint.js your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`eslint/bin/eslint.js`));\n"
  },
  {
    "path": ".yarn/sdks/eslint/lib/api.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require eslint\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real eslint your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`eslint`));\n"
  },
  {
    "path": ".yarn/sdks/eslint/lib/unsupported-api.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require eslint/use-at-your-own-risk\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real eslint/use-at-your-own-risk your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`eslint/use-at-your-own-risk`));\n"
  },
  {
    "path": ".yarn/sdks/eslint/package.json",
    "content": "{\n  \"name\": \"eslint\",\n  \"version\": \"8.57.0-sdk\",\n  \"main\": \"./lib/api.js\",\n  \"type\": \"commonjs\",\n  \"bin\": {\n    \"eslint\": \"./bin/eslint.js\"\n  },\n  \"exports\": {\n    \"./package.json\": \"./package.json\",\n    \".\": \"./lib/api.js\",\n    \"./use-at-your-own-risk\": \"./lib/unsupported-api.js\"\n  }\n}\n"
  },
  {
    "path": ".yarn/sdks/integrations.yml",
    "content": "# This file is automatically generated by @yarnpkg/sdks.\n# Manual changes might be lost!\n\nintegrations:\n  - vscode\n"
  },
  {
    "path": ".yarn/sdks/prettier/bin/prettier.cjs",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require prettier/bin/prettier.cjs\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real prettier/bin/prettier.cjs your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`prettier/bin/prettier.cjs`));\n"
  },
  {
    "path": ".yarn/sdks/prettier/index.cjs",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require prettier\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real prettier your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`prettier`));\n"
  },
  {
    "path": ".yarn/sdks/prettier/package.json",
    "content": "{\n  \"name\": \"prettier\",\n  \"version\": \"3.3.3-sdk\",\n  \"main\": \"./index.cjs\",\n  \"type\": \"commonjs\",\n  \"bin\": \"./bin/prettier.cjs\"\n}\n"
  },
  {
    "path": ".yarn/sdks/typescript/bin/tsc",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript/bin/tsc\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real typescript/bin/tsc your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`typescript/bin/tsc`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/bin/tsserver",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript/bin/tsserver\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real typescript/bin/tsserver your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`typescript/bin/tsserver`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/lib/tsc.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript/lib/tsc.js\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real typescript/lib/tsc.js your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`typescript/lib/tsc.js`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/lib/tsserver.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript/lib/tsserver.js\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\nconst moduleWrapper = exports => {\n  return wrapWithUserWrapper(moduleWrapperFn(exports));\n};\n\nconst moduleWrapperFn = tsserver => {\n  if (!process.versions.pnp) {\n    return tsserver;\n  }\n\n  const {isAbsolute} = require(`path`);\n  const pnpApi = require(`pnpapi`);\n\n  const isVirtual = str => str.match(/\\/(\\$\\$virtual|__virtual__)\\//);\n  const isPortal = str => str.startsWith(\"portal:/\");\n  const normalize = str => str.replace(/\\\\/g, `/`).replace(/^\\/?/, `/`);\n\n  const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {\n    return `${locator.name}@${locator.reference}`;\n  }));\n\n  // VSCode sends the zip paths to TS using the \"zip://\" prefix, that TS\n  // doesn't understand. This layer makes sure to remove the protocol\n  // before forwarding it to TS, and to add it back on all returned paths.\n\n  function toEditorPath(str) {\n    // We add the `zip:` prefix to both `.zip/` paths and virtual paths\n    if (isAbsolute(str) && !str.match(/^\\^?(zip:|\\/zip\\/)/) && (str.match(/\\.zip\\//) || isVirtual(str))) {\n      // We also take the opportunity to turn virtual paths into physical ones;\n      // this makes it much easier to work with workspaces that list peer\n      // dependencies, since otherwise Ctrl+Click would bring us to the virtual\n      // file instances instead of the real ones.\n      //\n      // We only do this to modules owned by the the dependency tree roots.\n      // This avoids breaking the resolution when jumping inside a vendor\n      // with peer dep (otherwise jumping into react-dom would show resolution\n      // errors on react).\n      //\n      const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;\n      if (resolved) {\n        const locator = pnpApi.findPackageLocator(resolved);\n        if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {\n          str = resolved;\n        }\n      }\n\n      str = normalize(str);\n\n      if (str.match(/\\.zip\\//)) {\n        switch (hostInfo) {\n          // Absolute VSCode `Uri.fsPath`s need to start with a slash.\n          // VSCode only adds it automatically for supported schemes,\n          // so we have to do it manually for the `zip` scheme.\n          // The path needs to start with a caret otherwise VSCode doesn't handle the protocol\n          //\n          // Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910\n          //\n          // 2021-10-08: VSCode changed the format in 1.61.\n          // Before | ^zip:/c:/foo/bar.zip/package.json\n          // After  | ^/zip//c:/foo/bar.zip/package.json\n          //\n          // 2022-04-06: VSCode changed the format in 1.66.\n          // Before | ^/zip//c:/foo/bar.zip/package.json\n          // After  | ^/zip/c:/foo/bar.zip/package.json\n          //\n          // 2022-05-06: VSCode changed the format in 1.68\n          // Before | ^/zip/c:/foo/bar.zip/package.json\n          // After  | ^/zip//c:/foo/bar.zip/package.json\n          //\n          case `vscode <1.61`: {\n            str = `^zip:${str}`;\n          } break;\n\n          case `vscode <1.66`: {\n            str = `^/zip/${str}`;\n          } break;\n\n          case `vscode <1.68`: {\n            str = `^/zip${str}`;\n          } break;\n\n          case `vscode`: {\n            str = `^/zip/${str}`;\n          } break;\n\n          // To make \"go to definition\" work,\n          // We have to resolve the actual file system path from virtual path\n          // and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)\n          case `coc-nvim`: {\n            str = normalize(resolved).replace(/\\.zip\\//, `.zip::`);\n            str = resolve(`zipfile:${str}`);\n          } break;\n\n          // Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server)\n          // We have to resolve the actual file system path from virtual path,\n          // everything else is up to neovim\n          case `neovim`: {\n            str = normalize(resolved).replace(/\\.zip\\//, `.zip::`);\n            str = `zipfile://${str}`;\n          } break;\n\n          default: {\n            str = `zip:${str}`;\n          } break;\n        }\n      } else {\n        str = str.replace(/^\\/?/, process.platform === `win32` ? `` : `/`);\n      }\n    }\n\n    return str;\n  }\n\n  function fromEditorPath(str) {\n    switch (hostInfo) {\n      case `coc-nvim`: {\n        str = str.replace(/\\.zip::/, `.zip/`);\n        // The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...\n        // So in order to convert it back, we use .* to match all the thing\n        // before `zipfile:`\n        return process.platform === `win32`\n          ? str.replace(/^.*zipfile:\\//, ``)\n          : str.replace(/^.*zipfile:/, ``);\n      } break;\n\n      case `neovim`: {\n        str = str.replace(/\\.zip::/, `.zip/`);\n        // The path for neovim is in format of zipfile:///<pwd>/.yarn/...\n        return str.replace(/^zipfile:\\/\\//, ``);\n      } break;\n\n      case `vscode`:\n      default: {\n        return str.replace(/^\\^?(zip:|\\/zip(\\/ts-nul-authority)?)\\/+/, process.platform === `win32` ? `` : `/`)\n      } break;\n    }\n  }\n\n  // Force enable 'allowLocalPluginLoads'\n  // TypeScript tries to resolve plugins using a path relative to itself\n  // which doesn't work when using the global cache\n  // https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238\n  // VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but\n  // TypeScript already does local loads and if this code is running the user trusts the workspace\n  // https://github.com/microsoft/vscode/issues/45856\n  const ConfiguredProject = tsserver.server.ConfiguredProject;\n  const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype;\n  ConfiguredProject.prototype.enablePluginsWithOptions = function() {\n    this.projectService.allowLocalPluginLoads = true;\n    return originalEnablePluginsWithOptions.apply(this, arguments);\n  };\n\n  // And here is the point where we hijack the VSCode <-> TS communications\n  // by adding ourselves in the middle. We locate everything that looks\n  // like an absolute path of ours and normalize it.\n\n  const Session = tsserver.server.Session;\n  const {onMessage: originalOnMessage, send: originalSend} = Session.prototype;\n  let hostInfo = `unknown`;\n\n  Object.assign(Session.prototype, {\n    onMessage(/** @type {string | object} */ message) {\n      const isStringMessage = typeof message === 'string';\n      const parsedMessage = isStringMessage ? JSON.parse(message) : message;\n\n      if (\n        parsedMessage != null &&\n        typeof parsedMessage === `object` &&\n        parsedMessage.arguments &&\n        typeof parsedMessage.arguments.hostInfo === `string`\n      ) {\n        hostInfo = parsedMessage.arguments.hostInfo;\n        if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {\n          const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(\n            // The RegExp from https://semver.org/ but without the caret at the start\n            /(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/\n          ) ?? []).map(Number)\n\n          if (major === 1) {\n            if (minor < 61) {\n              hostInfo += ` <1.61`;\n            } else if (minor < 66) {\n              hostInfo += ` <1.66`;\n            } else if (minor < 68) {\n              hostInfo += ` <1.68`;\n            }\n          }\n        }\n      }\n\n      const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {\n        return typeof value === 'string' ? fromEditorPath(value) : value;\n      });\n\n      return originalOnMessage.call(\n        this,\n        isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)\n      );\n    },\n\n    send(/** @type {any} */ msg) {\n      return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => {\n        return typeof value === `string` ? toEditorPath(value) : value;\n      })));\n    }\n  });\n\n  return tsserver;\n};\n\nconst [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));\n// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.\n// Ref https://github.com/microsoft/TypeScript/pull/55326\nif (major > 5 || (major === 5 && minor >= 5)) {\n  moduleWrapper(absRequire(`typescript`));\n}\n\n// Defer to the real typescript/lib/tsserver.js your application uses\nmodule.exports = moduleWrapper(absRequire(`typescript/lib/tsserver.js`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/lib/tsserverlibrary.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript/lib/tsserverlibrary.js\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\nconst moduleWrapper = exports => {\n  return wrapWithUserWrapper(moduleWrapperFn(exports));\n};\n\nconst moduleWrapperFn = tsserver => {\n  if (!process.versions.pnp) {\n    return tsserver;\n  }\n\n  const {isAbsolute} = require(`path`);\n  const pnpApi = require(`pnpapi`);\n\n  const isVirtual = str => str.match(/\\/(\\$\\$virtual|__virtual__)\\//);\n  const isPortal = str => str.startsWith(\"portal:/\");\n  const normalize = str => str.replace(/\\\\/g, `/`).replace(/^\\/?/, `/`);\n\n  const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {\n    return `${locator.name}@${locator.reference}`;\n  }));\n\n  // VSCode sends the zip paths to TS using the \"zip://\" prefix, that TS\n  // doesn't understand. This layer makes sure to remove the protocol\n  // before forwarding it to TS, and to add it back on all returned paths.\n\n  function toEditorPath(str) {\n    // We add the `zip:` prefix to both `.zip/` paths and virtual paths\n    if (isAbsolute(str) && !str.match(/^\\^?(zip:|\\/zip\\/)/) && (str.match(/\\.zip\\//) || isVirtual(str))) {\n      // We also take the opportunity to turn virtual paths into physical ones;\n      // this makes it much easier to work with workspaces that list peer\n      // dependencies, since otherwise Ctrl+Click would bring us to the virtual\n      // file instances instead of the real ones.\n      //\n      // We only do this to modules owned by the the dependency tree roots.\n      // This avoids breaking the resolution when jumping inside a vendor\n      // with peer dep (otherwise jumping into react-dom would show resolution\n      // errors on react).\n      //\n      const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;\n      if (resolved) {\n        const locator = pnpApi.findPackageLocator(resolved);\n        if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {\n          str = resolved;\n        }\n      }\n\n      str = normalize(str);\n\n      if (str.match(/\\.zip\\//)) {\n        switch (hostInfo) {\n          // Absolute VSCode `Uri.fsPath`s need to start with a slash.\n          // VSCode only adds it automatically for supported schemes,\n          // so we have to do it manually for the `zip` scheme.\n          // The path needs to start with a caret otherwise VSCode doesn't handle the protocol\n          //\n          // Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910\n          //\n          // 2021-10-08: VSCode changed the format in 1.61.\n          // Before | ^zip:/c:/foo/bar.zip/package.json\n          // After  | ^/zip//c:/foo/bar.zip/package.json\n          //\n          // 2022-04-06: VSCode changed the format in 1.66.\n          // Before | ^/zip//c:/foo/bar.zip/package.json\n          // After  | ^/zip/c:/foo/bar.zip/package.json\n          //\n          // 2022-05-06: VSCode changed the format in 1.68\n          // Before | ^/zip/c:/foo/bar.zip/package.json\n          // After  | ^/zip//c:/foo/bar.zip/package.json\n          //\n          case `vscode <1.61`: {\n            str = `^zip:${str}`;\n          } break;\n\n          case `vscode <1.66`: {\n            str = `^/zip/${str}`;\n          } break;\n\n          case `vscode <1.68`: {\n            str = `^/zip${str}`;\n          } break;\n\n          case `vscode`: {\n            str = `^/zip/${str}`;\n          } break;\n\n          // To make \"go to definition\" work,\n          // We have to resolve the actual file system path from virtual path\n          // and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)\n          case `coc-nvim`: {\n            str = normalize(resolved).replace(/\\.zip\\//, `.zip::`);\n            str = resolve(`zipfile:${str}`);\n          } break;\n\n          // Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server)\n          // We have to resolve the actual file system path from virtual path,\n          // everything else is up to neovim\n          case `neovim`: {\n            str = normalize(resolved).replace(/\\.zip\\//, `.zip::`);\n            str = `zipfile://${str}`;\n          } break;\n\n          default: {\n            str = `zip:${str}`;\n          } break;\n        }\n      } else {\n        str = str.replace(/^\\/?/, process.platform === `win32` ? `` : `/`);\n      }\n    }\n\n    return str;\n  }\n\n  function fromEditorPath(str) {\n    switch (hostInfo) {\n      case `coc-nvim`: {\n        str = str.replace(/\\.zip::/, `.zip/`);\n        // The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...\n        // So in order to convert it back, we use .* to match all the thing\n        // before `zipfile:`\n        return process.platform === `win32`\n          ? str.replace(/^.*zipfile:\\//, ``)\n          : str.replace(/^.*zipfile:/, ``);\n      } break;\n\n      case `neovim`: {\n        str = str.replace(/\\.zip::/, `.zip/`);\n        // The path for neovim is in format of zipfile:///<pwd>/.yarn/...\n        return str.replace(/^zipfile:\\/\\//, ``);\n      } break;\n\n      case `vscode`:\n      default: {\n        return str.replace(/^\\^?(zip:|\\/zip(\\/ts-nul-authority)?)\\/+/, process.platform === `win32` ? `` : `/`)\n      } break;\n    }\n  }\n\n  // Force enable 'allowLocalPluginLoads'\n  // TypeScript tries to resolve plugins using a path relative to itself\n  // which doesn't work when using the global cache\n  // https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238\n  // VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but\n  // TypeScript already does local loads and if this code is running the user trusts the workspace\n  // https://github.com/microsoft/vscode/issues/45856\n  const ConfiguredProject = tsserver.server.ConfiguredProject;\n  const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype;\n  ConfiguredProject.prototype.enablePluginsWithOptions = function() {\n    this.projectService.allowLocalPluginLoads = true;\n    return originalEnablePluginsWithOptions.apply(this, arguments);\n  };\n\n  // And here is the point where we hijack the VSCode <-> TS communications\n  // by adding ourselves in the middle. We locate everything that looks\n  // like an absolute path of ours and normalize it.\n\n  const Session = tsserver.server.Session;\n  const {onMessage: originalOnMessage, send: originalSend} = Session.prototype;\n  let hostInfo = `unknown`;\n\n  Object.assign(Session.prototype, {\n    onMessage(/** @type {string | object} */ message) {\n      const isStringMessage = typeof message === 'string';\n      const parsedMessage = isStringMessage ? JSON.parse(message) : message;\n\n      if (\n        parsedMessage != null &&\n        typeof parsedMessage === `object` &&\n        parsedMessage.arguments &&\n        typeof parsedMessage.arguments.hostInfo === `string`\n      ) {\n        hostInfo = parsedMessage.arguments.hostInfo;\n        if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {\n          const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match(\n            // The RegExp from https://semver.org/ but without the caret at the start\n            /(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/\n          ) ?? []).map(Number)\n\n          if (major === 1) {\n            if (minor < 61) {\n              hostInfo += ` <1.61`;\n            } else if (minor < 66) {\n              hostInfo += ` <1.66`;\n            } else if (minor < 68) {\n              hostInfo += ` <1.68`;\n            }\n          }\n        }\n      }\n\n      const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {\n        return typeof value === 'string' ? fromEditorPath(value) : value;\n      });\n\n      return originalOnMessage.call(\n        this,\n        isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)\n      );\n    },\n\n    send(/** @type {any} */ msg) {\n      return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => {\n        return typeof value === `string` ? toEditorPath(value) : value;\n      })));\n    }\n  });\n\n  return tsserver;\n};\n\nconst [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));\n// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.\n// Ref https://github.com/microsoft/TypeScript/pull/55326\nif (major > 5 || (major === 5 && minor >= 5)) {\n  moduleWrapper(absRequire(`typescript`));\n}\n\n// Defer to the real typescript/lib/tsserverlibrary.js your application uses\nmodule.exports = moduleWrapper(absRequire(`typescript/lib/tsserverlibrary.js`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/lib/typescript.js",
    "content": "#!/usr/bin/env node\n\nconst {existsSync} = require(`fs`);\nconst {createRequire, register} = require(`module`);\nconst {resolve} = require(`path`);\nconst {pathToFileURL} = require(`url`);\n\nconst relPnpApiPath = \"../../../../.pnp.cjs\";\n\nconst absPnpApiPath = resolve(__dirname, relPnpApiPath);\nconst absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);\nconst absRequire = createRequire(absPnpApiPath);\n\nconst absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);\nconst isPnpLoaderEnabled = existsSync(absPnpLoaderPath);\n\nif (existsSync(absPnpApiPath)) {\n  if (!process.versions.pnp) {\n    // Setup the environment to be able to require typescript\n    require(absPnpApiPath).setup();\n    if (isPnpLoaderEnabled && register) {\n      register(pathToFileURL(absPnpLoaderPath));\n    }\n  }\n}\n\nconst wrapWithUserWrapper = existsSync(absUserWrapperPath)\n  ? exports => absRequire(absUserWrapperPath)(exports)\n  : exports => exports;\n\n// Defer to the real typescript your application uses\nmodule.exports = wrapWithUserWrapper(absRequire(`typescript`));\n"
  },
  {
    "path": ".yarn/sdks/typescript/package.json",
    "content": "{\n  \"name\": \"typescript\",\n  \"version\": \"5.8.3-sdk\",\n  \"main\": \"./lib/typescript.js\",\n  \"type\": \"commonjs\",\n  \"bin\": {\n    \"tsc\": \"./bin/tsc\",\n    \"tsserver\": \"./bin/tsserver\"\n  }\n}\n"
  },
  {
    "path": ".yarnrc.yml",
    "content": "catalogs:\n  brick-module:\n    brick-module: 0.5.0\n  react-native:\n    '@babel/plugin-transform-flow-strip-types': 7.27.1\n    '@react-native/babel-plugin-codegen': 0.84.0\n    '@react-native/babel-preset': 0.84.0\n    '@react-navigation/elements': 2.9.14\n    '@react-navigation/native': 7.2.2\n    '@react-navigation/native-stack': 7.14.10\n    '@shopify/flash-list': 2.2.2\n    '@types/react': 19.2.0\n    '@types/react-dom': 19.2.3\n    react: 19.2.3\n    react-dom: 19.2.3\n    react-native: 0.84.0\n    '@react-native/dev-middleware': 0.84.0\n    '@react-native-async-storage/async-storage': 2.2.0\n    '@react-native-community/blur': 4.4.1\n    react-native-gesture-handler: 2.30.0\n    react-native-pager-view: 7.0.2\n    react-native-safe-area-context: 5.6.2\n    react-native-screens: 4.23.0\n    react-native-svg: 15.15.3\n    react-native-webview: 13.16.0\n  swc:\n    '@swc/core': 1.15.8\n    '@swc/helpers': 0.5.17\n  tools:\n    react-native-builder-bob: 0.40.17\n    tsdown: 0.20.3\n    typescript: 5.9.3\n    '@types/node': 24.10.12\n\nenableGlobalCache: false\n\nlogFilters:\n  - level: discard\n    pattern: react-native * with version 0.72.6\n\nnodeLinker: pnp\n\nnpmPublishRegistry: 'https://registry.npmjs.org'\n\nnpmRegistries:\n  'https://registry.npmjs.org':\n    npmAlwaysAuth: true\n\npackageExtensions:\n  '@react-native-community/cli-debugger-ui@*':\n    dependencies:\n      '@babel/runtime': ^7\n  '@react-native/codegen@*':\n    dependencies:\n      '@babel/core': ^7\n      '@babel/parser': ^7\n  '@react-native/virtualized-lists@*':\n    peerDependencies:\n      react: '*'\n  '@typescript-eslint/type-utils@^8':\n    dependencies:\n      '@typescript-eslint/types': ^8\n  eslint-plugin-import@*:\n    peerDependencies:\n      typescript: '*'\n  jest-config@*:\n    dependencies:\n      ts-node: '*'\n  react-native-safe-area-context@*:\n    dependencies:\n      '@jest/globals': '*'\n\nplugins:\n  - .yarn/plugins/plugin-licenses.js\n\npnpFallbackMode: none\n\nyarnPath: .yarn/releases/yarn-4.12.0.cjs\n"
  },
  {
    "path": "LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License."
  },
  {
    "path": "README-ko_kr.md",
    "content": "# Granite &middot; [![Apache 2.0 License](https://img.shields.io/badge/license-Apache-blue.svg)](https://github.com/toss/slash/blob/main/LICENSE) [![NPM badge](https://img.shields.io/npm/v/@granite-js/react-native?logo=npm)](https://www.npmjs.com/package/@granite-js/react-native) [![codecov](https://codecov.io/gh/toss/granite/graph/badge.svg?token=LCP519I5BN)](https://codecov.io/gh/toss/granite)\n\n[English](https://github.com/toss/granite/blob/main/README.md) | 한국어\n\nGranite는 브라운필드 통합, 200KB 번들 크기, AWS 지원 인프라를 갖춘 마이크로서비스 앱을 위한 엔터프라이즈급 React Native 프레임워크입니다.\n\n- **기존 앱에 리액트 네이티브 추가** - 리액트 네이티브 화면을 현재 iOS 및 Android 앱에 쉽게 통합할 수 있습니다.\n- **작은 번들** - 번들 분할과 스마트 최적화를 통해 작은 200KB 마이크로서비스 번들을 생성합니다.\n- **빠른 빌드** - ESBuild를 사용하여 JavaScript 번들 빌드 시간을 단 몇 초로 단축하세요.\n- **전체 AWS 설정** - 전체 배포 제어를 통해 완벽한 인프라 구성.\n- **원클릭 인프라** - 단일 CLI 명령으로 CDN 및 인프라를 설정합니다.\n- **단순 기본값** - 사전 구성된 설정으로 설정이 아닌 구축에 집중할 수 있습니다.\n- **종합적인 종단 간 테스트** - 모든 기능에는 종단 간 테스트가 포함되어 있습니다.\n- **빠른 네이티브 빌드** - 미리 구축된 프레임워크로 네이티브 빌드 시간을 빠르게 유지하세요. (WIP)\n\n## 시작하기\n\nGranite를 시작하는 것은 간단합니다. 먼저, 저희 CLI를 사용하여 새로운 Granite 앱을 만드세요:\n\n```sh\nnpx create-granite-app@latest\n```\n\n리액트 네이티브 구성 요소를 작성한 후, 하나의 명령으로 앱을 빌드하세요:\n\n```sh\nnpm run granite build\n```\n\n### 인프라 설정\n\nGranite는 인프라 설정을 단순화하기 위해 [Pulumi](https://www.pulumi.com/) 을 사용해요. '@granite-js/pulumi-aws'를 사용하는 몇 줄의 코드만 있으면 전체 React Native 인프라를 AWS에 배포할 수 있습니다:\n\n```typescript\nimport * as pulumi from '@pulumi/pulumi';\nimport * as aws from '@pulumi/aws';\nimport { ReactNativeBundleCDN } from '@granite-js/pulumi-aws';\n\nconst config = new pulumi.Config();\n\nnew ReactNativeBundleCDN('myReactNativeBundleCDN', {\n  bucketName: config.require('bucketName'),\n  region: config.require('region'),\n});\n```\n\n### 앱 배포하기\n\n단 하나의 명령으로 앱을 프로덕션 환경에 배포하세요. Forge가 번들을 업로드하고 CDN에 올리는 등 나머지 작업을 처리해줘요.\n\n```sh\nnpm run granite-forge deploy --bucket your-s3-bucket-name\n```\n\n간단한 단계별 가이드를 원하시면 [시작 가이드](https://granite.run/guides/quick-start/create-your-app.html)를 방문해 주세요.\n\n## 기여하기\n\n커뮤니티에 있는 모든 분들에게 기여를 환영해요. 아래에 작성되어 있는 기여 가이드를 확인하세요.\n\n[CONTRIBUTING](https://github.com/toss/granite/blob/main/.github/CONTRIBUTING.md)\n\n## 라이선스\n\nApache 2.0 © Viva Republica, Inc. 자세한 내용은 [LICENSE](./LICENSE)를 참고하세요.\n\n<a title=\"Toss\" href=\"https://toss.im\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://static.toss.im/logos/png/4x/logo-toss-reverse.png\">\n    <img alt=\"Toss\" src=\"https://static.toss.im/logos/png/4x/logo-toss.png\" width=\"100\">\n  </picture>\n</a>\n"
  },
  {
    "path": "README.md",
    "content": "# Granite &middot; [![Apache 2.0 License](https://img.shields.io/badge/license-Apache-blue.svg)](https://github.com/toss/slash/blob/main/LICENSE) [![NPM badge](https://img.shields.io/npm/v/@granite-js/react-native?logo=npm)](https://www.npmjs.com/package/@granite-js/react-native) [![codecov](https://codecov.io/gh/toss/granite/graph/badge.svg?token=LCP519I5BN)](https://codecov.io/gh/toss/granite)\n\nEnglish | [한국어](https://github.com/toss/granite/blob/main/README-ko_kr.md)\n\nGranite is an enterprise-grade React Native framework for microservice apps with brownfield integration, 200KB bundle sizes, and AWS-ready infrastructure.\n\n- **Add React Native to existing apps** - Easily integrate React Native screens into your current iOS and Android apps.\n- **Tiny bundles** - Create tiny 200KB microservice bundles with bundle splitting and smart optimization.\n- **Fast builds** - Keep your JavaScript bundle build times down to just seconds using ESBuild.\n- **Full AWS setup** - Complete infrastructure configuration with full deployment control.\n- **One-click infrastructure** - Set up CDN and infrastructure with a single CLI command.\n- **Simple defaults** - Pre-configured settings let you focus on building, not setup.\n- **Comprehensive end-to-end testing** - Every feature comes with end-to-end tests included.\n- **Fast native builds** - Keep your native build times quick with prebuilt frameworks. (WIP)\n\n## Getting Started\n\nGetting started with Granite is simple. First, create a new Granite app using our CLI:\n\n```sh\nnpx create-granite-app@latest\n```\n\nOnce you've written your React Native components, build your app with a single command:\n\n```sh\nnpm run granite build\n```\n\n### Infrastructure Setup\n\nGranite uses [Pulumi](https://www.pulumi.com/) to make infrastructure setup simple. With just a few lines of code using `@granite-js/pulumi-aws`, you can deploy your entire React Native infrastructure to AWS:\n\n```typescript\nimport * as pulumi from '@pulumi/pulumi';\nimport * as aws from '@pulumi/aws';\nimport { ReactNativeBundleCDN } from '@granite-js/pulumi-aws';\n\nconst config = new pulumi.Config();\n\nnew ReactNativeBundleCDN('myReactNativeBundleCDN', {\n  bucketName: config.require('bucketName'),\n  region: config.require('region'),\n});\n```\n\n### Deploying Your App\n\nDeploy your app to production with a single command. Our Forge handles the rest - uploading your bundle and getting it on your CDN.\n\n```sh\nnpm run granite-forge deploy --bucket your-s3-bucket-name\n```\n\nFor a simple, step-by-step guide, please visit our [getting started guide](https://granite.run/guides/quick-start/create-your-app.html).\n\n## Contributing\n\nWe welcome contribution from everyone in the community. Read below for detailed contribution guide.\n\n[CONTRIBUTING](https://github.com/toss/granite/blob/main/.github/CONTRIBUTING.md)\n\n## License\n\nApache 2.0 © Viva Republica, Inc. See [LICENSE](./LICENSE) for details.\n\n<a title=\"Toss\" href=\"https://toss.im\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://static.toss.im/logos/png/4x/logo-toss-reverse.png\">\n    <img alt=\"Toss\" src=\"https://static.toss.im/logos/png/4x/logo-toss.png\" width=\"100\">\n  </picture>\n</a>\n"
  },
  {
    "path": "bin/tools",
    "content": "#!/usr/bin/env bash\n\nset -euo pipefail\n\nBIN_DIR=$(cd \"$(dirname \"$0\")\" && pwd)\nROOT_DIR=\"${BIN_DIR}/..\"\n\nnode --require \"$ROOT_DIR/.pnp.cjs\" \\\n  --import \"$ROOT_DIR/.pnp.loader.mjs\" \\\n  \"$ROOT_DIR/tools/dist/index.js\" \"$@\"\n"
  },
  {
    "path": "docs/.gitignore",
    "content": ".vitepress/cache\n.vitepress/dist\ncache\n\n.vitepress/.temp\nconfig.mts.*.mjs"
  },
  {
    "path": "docs/.gitkeep",
    "content": ""
  },
  {
    "path": "docs/.vitepress/config.mts",
    "content": "import { defineConfig } from 'vitepress';\nimport { en } from './en.mts';\nimport { ko } from './ko.mts';\nimport { shared } from './shared.mts';\n\n// https://vitepress.dev/reference/site-config\nexport default defineConfig({\n  ...shared,\n  locales: {\n    root: {\n      label: 'English',\n      ...en,\n    },\n    ko: {\n      label: '한국어',\n      link: '/ko',\n      ...ko,\n    },\n  },\n});\n"
  },
  {
    "path": "docs/.vitepress/en.mts",
    "content": "import { type DefaultTheme, defineConfig } from 'vitepress';\nimport referenceManifest from '../reference/manifest.json';\nimport { categorizeManifest } from './utils';\n\nexport const en = defineConfig({\n  lang: 'en',\n  title: 'Granite',\n  description: 'React Native Framework',\n  themeConfig: {\n    sidebar: sidebar(),\n    nav: nav(),\n  },\n});\n\nfunction sidebar(): DefaultTheme.Sidebar {\n  return [\n    {\n      text: 'Guide',\n      items: [\n        { text: 'Introduction', link: '/guides/introduction' },\n        { text: 'vs. Traditional RN', link: '/guides/comparison' },\n        {\n          text: 'Quick Start',\n          items: [\n            { text: 'Getting Started', link: '/guides/quick-start/create-your-app' },\n            { text: 'Set Up Infrastructure', link: '/guides/quick-start/setup-aws' },\n            { text: 'Deploy & Run Your App', link: '/guides/quick-start/deploy-your-app' },\n          ],\n        },\n        {\n          text: 'Granite Router',\n          items: [\n            { text: 'Using Plugin', link: '/guides/granite-router/plugin-router' },\n            { text: 'Navigating Screens', link: '/guides/granite-router/routing' },\n            { text: 'Defining Screen Parameters', link: '/guides/granite-router/params' },\n            { text: 'Using Layouts', link: '/guides/granite-router/layouts' },\n          ],\n        },\n        {\n          text: 'Miscellaneous',\n          items: [{ text: 'Install Test App', link: '/guides/miscellaneous/install-native-app' }],\n        },\n      ],\n    },\n    {\n      text: 'Reference',\n      items: categorizeManifest(referenceManifest, 'en'),\n    },\n  ];\n}\n\nfunction nav(): DefaultTheme.NavItem[] {\n  return [\n    { text: 'Introduction', link: '/guides/introduction' },\n    {\n      text: 'Guide',\n      link: '/guides/quick-start/create-your-app',\n    },\n    {\n      text: 'Reference',\n      link: '/reference/react-native/config/defineConfig',\n    },\n  ];\n}\n"
  },
  {
    "path": "docs/.vitepress/ko.mts",
    "content": "import { type DefaultTheme, defineConfig } from 'vitepress';\nimport referenceManifest from '../ko/reference/manifest.json';\nimport { categorizeManifest } from './utils';\n\nexport const ko = defineConfig({\n  lang: 'ko',\n  title: 'Granite',\n  description: 'React Native Framework',\n  themeConfig: {\n    sidebar: sidebar(),\n    nav: nav(),\n    darkModeSwitchLabel: '테마',\n  },\n});\n\nfunction sidebar(): DefaultTheme.Sidebar {\n  return [\n    {\n      text: '가이드',\n      items: [\n        { text: '소개', link: '/ko/guides/introduction' },\n        { text: 'vs 기본 RN', link: '/ko/guides/comparison' },\n        {\n          text: '시작',\n          items: [\n            { text: '첫 Granite 앱 만들기', link: '/ko/guides/quick-start/create-your-app' },\n            { text: 'AWS 인프라 만들기', link: '/ko/guides/quick-start/setup-aws' },\n            { text: 'Granite 앱 배포하고 실행하기', link: '/ko/guides/quick-start/deploy-your-app' },\n          ],\n        },\n        {\n          text: 'Granite Router',\n          items: [\n            { text: '플러그인 사용하기', link: '/ko/guides/granite-router/plugin-router' },\n            { text: '화면 이동하기', link: '/ko/guides/granite-router/routing' },\n            { text: '화면 파라미터 정의하기', link: '/ko/guides/granite-router/params' },\n            { text: '공통 레이아웃 구성하기', link: '/ko/guides/granite-router/layouts' },\n          ],\n        },\n        {\n          text: '기타',\n          items: [{ text: '테스트 앱 설치하기', link: '/ko/guides/miscellaneous/install-native-app' }],\n        },\n      ],\n    },\n    {\n      text: '레퍼런스',\n      items: categorizeManifest(referenceManifest, 'ko'),\n    },\n  ];\n}\n\nexport const search: DefaultTheme.LocalSearchOptions['locales'] = {\n  ko: {\n    translations: {\n      button: {\n        buttonText: '검색',\n        buttonAriaLabel: '검색',\n      },\n      modal: {\n        backButtonTitle: '뒤로가기',\n        displayDetails: '더보기',\n        footer: {\n          closeKeyAriaLabel: '닫기',\n          closeText: '닫기',\n          navigateDownKeyAriaLabel: '아래로',\n          navigateText: '이동',\n          navigateUpKeyAriaLabel: '위로',\n          selectKeyAriaLabel: '선택',\n          selectText: '선택',\n        },\n        noResultsText: '검색 결과를 찾지 못했어요.',\n        resetButtonTitle: '모두 지우기',\n      },\n    },\n  },\n};\n\nfunction nav(): DefaultTheme.NavItem[] {\n  return [\n    { text: '소개', link: '/ko/guides/introduction' },\n    {\n      text: '가이드',\n      link: '/ko/guides/quick-start/create-your-app',\n    },\n    {\n      text: '레퍼런스',\n      link: '/ko/reference/react-native/config/defineConfig',\n    },\n  ];\n}\n"
  },
  {
    "path": "docs/.vitepress/shared.mts",
    "content": "import { createRequire } from 'module';\nimport path from 'path';\nimport { defineConfig } from 'vitepress';\nimport { search as koSearch } from './ko.mts';\n\nconst require = createRequire(import.meta.url);\n\nexport const shared = defineConfig({\n  title: 'Granite',\n  head: [\n    ['link', { rel: 'icon', href: '/favicon.ico' }],\n    ['meta', { name: 'theme-color', content: '#0064FF' }],\n  ],\n  lastUpdated: true,\n  metaChunk: true,\n  themeConfig: {\n    search: {\n      provider: 'local',\n      options: {\n        locales: {\n          ...koSearch,\n        },\n      },\n    },\n    socialLinks: [\n      {\n        icon: 'github',\n        link: 'https://github.com/toss/granite',\n      },\n      {\n        icon: 'npm',\n        link: 'https://www.npmjs.com/package/@granite-js/react-native',\n        ariaLabel: 'npm',\n      },\n    ],\n  },\n\n  vite: {\n    resolve: {\n      alias: [\n        {\n          find: /^vue$/,\n          replacement: path.dirname(\n            require.resolve('vue/package.json', {\n              paths: [require.resolve('vitepress')],\n            })\n          ),\n        },\n        {\n          find: /^vue\\/server-renderer$/g,\n          replacement: path.dirname(\n            require.resolve('vue/server-renderer', {\n              paths: [require.resolve('vitepress')],\n            })\n          ),\n        },\n        {\n          find: /^@components/g,\n          replacement: path.resolve(__dirname, '..', '..', 'components'),\n        },\n      ],\n    },\n  },\n});\n"
  },
  {
    "path": "docs/.vitepress/theme/custom.css",
    "content": "@import url('./style.css');\n\n/* .vitepress/theme/custom.css */\n/** https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css */\n:root {\n  /* --vp-home-hero-name-color: #1e1e1e; */\n  --vp-home-hero-name-color: #808080;\n  --vp-c-brand-1: rgb(27, 109, 225);\n  --vp-code-color: var(--vp-c-text-1);\n  --vp-button-brand-bg: rgb(27, 109, 225);\n}\n\n.content-container {\n  /* 콘텐츠 영역을 넓힘 */\n  max-width: 75rem !important;\n}\n\n.VPBadge-small {\n  padding: 0 6px;\n  line-height: 16px;\n  font-size: 10px;\n}\n"
  },
  {
    "path": "docs/.vitepress/theme/index.ts",
    "content": "// .vitepress/theme/index.js\nimport Theme from 'vitepress/theme';\nimport './custom.css';\n\nexport default {\n  extends: Theme,\n};\n"
  },
  {
    "path": "docs/.vitepress/theme/style.css",
    "content": ":root {\n  --dockit-border: #b0b8c1;\n  --dockit-color-primary: rgb(78, 89, 104);\n  --dockit-red: #f44336;\n  --dockit-green: rgb(0, 166, 97);\n  --dockit-color-secondary: rgb(78, 89, 104);\n}\n\n@media (prefers-color-scheme: dark) {\n  :root {\n    --dockit-border: #5c6064;\n    --dockit-color-primary: #f0f0f0;\n    --dockit-red: #f5645a;\n    --dockit-green: #38cc8e;\n    --dockit-color-secondary: #f0f0f0;\n  }\n}\n\nul.post-parameters-ul {\n  margin-top: 8px;\n  padding: 0;\n  list-style: none;\n}\n\n.post-parameters-ul .post-parameters-li {\n  position: relative;\n  padding-left: 16px;\n  margin-left: 12px;\n  margin-top: 0;\n  margin-bottom: 8px;\n}\n\n.post-parameters-ul .post-parameters-li::before {\n  position: absolute;\n  left: 0;\n  display: block;\n  content: '';\n  top: 6px;\n  width: 8px;\n  height: 8px;\n  border-left: 2px solid var(--dockit-border);\n  border-bottom: 2px solid var(--dockit-border);\n}\n\n.post-parameters-ul .post-parameters-li-root {\n  margin-left: 0;\n  padding-left: 0;\n}\n/* post-parameters-li-root 클래스가 있는 li는 ::before 제거 */\n.post-parameters-ul .post-parameters-li-root::before {\n  content: none;\n}\n\n.post-parameters-li .post-parameters--name {\n  font-size: 14px;\n  font-weight: bold;\n  color: var(--vp-c-text-1);\n  margin-right: 6px;\n  font-family: Menlo, Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;\n}\n\n.post-parameters-li .post-parameters--required {\n  font-size: 14px;\n  color: var(--dockit-red);\n}\n\n.post-parameters-li .post-parameters--type {\n  font-size: 14px;\n  color: var(--dockit-green);\n}\n\n.post-parameters-li .post-parameters--default {\n  font-size: 14px;\n}\n\n.post-parameters-li .post-parameters--description {\n  margin: 0;\n  font-size: 14px;\n  color: var(--vp-c-text-1);\n}\n"
  },
  {
    "path": "docs/.vitepress/utils.ts",
    "content": "import referenceManifest from '../reference/manifest.json';\n\nexport function categorizeManifest(manifest: typeof referenceManifest, locale: 'en' | 'ko') {\n  const categories = new Map<\n    string,\n    {\n      collapsed?: boolean;\n      items: { text: string; link: string }[];\n    }\n  >();\n\n  Object.entries(manifest.documents).filter(([_, packageManifest]) => {\n    const { items } = packageManifest.items[0];\n\n    for (const item of items) {\n      if (!categories.has(item.text)) {\n        categories.set(item.text, { items: [] });\n      }\n\n      categories.set(item.text, {\n        items: [\n          /** */\n          ...categories.get(item.text)!.items,\n          ...item.items.map((x) => {\n            const link = x.link.startsWith('/') ? x.link : `/${x.link}`;\n            return {\n              ...x,\n              link: locale === 'en' ? link : `/${locale}${link}`,\n            };\n          }),\n        ],\n      });\n    }\n  });\n\n  return Array.from(categories).map(([category, { items }]) => {\n    return {\n      text: category,\n      collapsed: true,\n      items,\n    };\n  });\n}\n"
  },
  {
    "path": "docs/components/UsageSection.vue",
    "content": "<template>\n  <section>\n    <div class=\"asset-example\">\n      <img v-if=\"assetType === 'image'\" :src=\"prefixedAssetPath\" />\n      <video v-if=\"assetType === 'video'\" controls>\n        <source :src=\"prefixedAssetPath\" type=\"video/webm\" />\n      </video>\n    </div>\n    <slot></slot>\n    <div class=\"clear-both\"></div>\n  </section>\n</template>\n\n<script>\nexport default {\n  props: {\n    assetType: {\n      type: String,\n      default: 'image',\n      required: false,\n    },\n    assetPath: {\n      type: String,\n      required: true,\n    },\n  },\n  computed: {\n    prefixedAssetPath() {\n      // BASE_URL과 assetPath를 연결하면서 중복된 슬래시를 제거합니다.\n      const baseUrl = import.meta.env.BASE_URL.replace(/\\/$/, ''); // 끝 슬래시 제거\n      const assetPath = this.assetPath.replace(/^\\//, ''); // 앞 슬래시 제거\n      return `${baseUrl}/${assetPath}`; // 슬래시로 연결\n    },\n  },\n};\n</script>\n\n<style scoped>\n.asset-example {\n  float: right;\n  max-width: 33%;\n  width: 250px;\n  margin-left: 24px;\n}\n\n.asset-example > img {\n  border: 1px solid var(--vp-c-divider);\n}\n\n.clear-both {\n  clear: both;\n}\n</style>\n"
  },
  {
    "path": "docs/guides/comparison.md",
    "content": "# Comparison with Traditional RN\n\nWhile Granite is built on React Native, it offers key advantages over traditional React Native development:\n\n|                        | Granite                                          | Traditional React Native                  |\n| ---------------------- | ------------------------------------------------ | ----------------------------------------- |\n| Architecture           | Microservices - built and deployed independently | Monolithic - entire app built as one unit |\n| Brownfield integration | Easy                                             | Hard                                      |\n| JS Build               | Seconds                                          | Minutes or more                           |\n| Bundle Size            | As low as 200KB per service                      | 1-5MB or larger                           |\n| Bundler                | ESBuild                                          | Metro                                     |\n| OTA Updates            | Built-in                                         | Requires third-party solutions            |\n| Native Build           | Fast (uses prebuilt frameworks)                  | Slow (builds from scratch)                |\n"
  },
  {
    "path": "docs/guides/granite-router/layouts.md",
    "content": "<script setup>\n  import UsageSection from '../../components/UsageSection.vue'\n</script>\n\n# Using Layouts\n\nLayouts allow you to easily manage UI elements that are commonly used across multiple pages. By configuring common components like headers, navigation bars, and footers as layouts, you can reduce code duplication and provide a consistent user experience.\n\n## Creating Layout Files\n\nLayouts can be implemented by creating a `_layout.tsx` file. The scope of application varies depending on the location of this file.\n\n```tsx\nimport { PropsWithChildren } from 'react';\n\nexport default function Layout({ children }: PropsWithChildren) {\n  return <>{children}</>;\n}\n```\n\n## Layout Application Scope\n\nLayouts are applied to different scopes depending on their file location.\n\n- `pages/_layout.tsx`: Applies to all pages\n- `pages/about/_layout.tsx`: Applies to all pages under `<scheme>://{serviceName}/about`\n\n<UsageSection assetType=\"image\" assetPath=\"/usage/layout/nested-layout.png\">\n\nLayouts can be nested. When multiple layouts are applied to a page, they are applied sequentially starting from the parent directory.\n\n```\npages/\n├── _layout.tsx          // Global layout\n├── about/\n│   ├── _layout.tsx     // about section layout\n│   ├── index.tsx       // about main page\n│   └── team.tsx        // team introduction page\n└── index.tsx           // Main page\n```\n\nFor example, with the `_layout.tsx` structure above, the `about/team.tsx` page will have layouts applied in the following order:\n\n1. `pages/_layout.tsx` (Top-level layout)\n2. `pages/about/_layout.tsx` (about section layout)\n3. `pages/about/team.tsx` (Actual page component)\n\nBy nesting layouts in this way, you can effectively configure UI elements that are needed globally and those that are only needed in specific sections.\n\n</UsageSection>\n\n## Layout Examples\n\n### Global Layout\n\nCreate a layout that applies to all pages.\n\n::: code-group\n\n```tsx [pages/_layout.tsx]\nimport { PropsWithChildren } from 'react';\nimport { View } from 'react-native';\nimport { Header } from '../components/Header';\nimport { Footer } from '../components/Footer';\n\nexport default function Layout({ children }: PropsWithChildren) {\n  return (\n    <View style={{ flex: 1 }}>\n      <Header />\n      {children}\n      <Footer />\n    </View>\n  );\n}\n```\n\n```tsx [components/Header.tsx]\nimport { View, Text, StyleSheet } from 'react-native';\n\nexport function Header() {\n  return (\n    <View style={styles.header}>\n      <Text style={styles.title}>My App</Text>\n      <View style={styles.nav}>\n        <Text style={styles.navItem}>Home</Text>\n        <Text style={styles.navItem}>About</Text>\n        <Text style={styles.navItem}>Settings</Text>\n      </View>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  header: {\n    padding: 16,\n    backgroundColor: '#ffffff',\n    borderBottomWidth: 1,\n    borderBottomColor: '#e5e5e5',\n  },\n  title: {\n    fontSize: 24,\n    fontWeight: 'bold',\n    marginBottom: 8,\n  },\n  nav: {\n    flexDirection: 'row',\n    gap: 16,\n  },\n  navItem: {\n    fontSize: 16,\n    color: '#666666',\n  },\n});\n```\n\n```tsx [components/Footer.tsx]\nimport { View, Text, StyleSheet } from 'react-native';\n\nexport function Footer() {\n  return (\n    <View style={styles.footer}>\n      <Text style={styles.copyright}>© 2024 My App. All rights reserved.</Text>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  footer: {\n    padding: 16,\n    backgroundColor: '#f5f5f5',\n    alignItems: 'center',\n  },\n  copyright: {\n    fontSize: 14,\n    color: '#666666',\n  },\n});\n```\n\n:::\n\n### Section-Specific Layout\n\nCreate a layout that applies only to a specific section.\n\n::: code-group\n\n```tsx [pages/about/_layout.tsx]\nimport { PropsWithChildren } from 'react';\nimport { View } from 'react-native';\nimport { AboutSidebar } from '../../components/AboutSidebar';\n\nexport default function AboutLayout({ children }: PropsWithChildren) {\n  return (\n    <View style={{ flexDirection: 'row' }}>\n      <AboutSidebar />\n      <View style={{ flex: 1 }}>{children}</View>\n    </View>\n  );\n}\n```\n\n```tsx [components/AboutSidebar.tsx]\nimport { View, Text, StyleSheet } from 'react-native';\n\nexport function AboutSidebar() {\n  return (\n    <View style={styles.sidebar}>\n      <Text style={styles.title}>About</Text>\n      <View style={styles.menu}>\n        <Text style={styles.menuItem}>Company Introduction</Text>\n        <Text style={styles.menuItem}>Team Introduction</Text>\n        <Text style={styles.menuItem}>History</Text>\n        <Text style={styles.menuItem}>Directions</Text>\n      </View>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  sidebar: {\n    width: 200,\n    padding: 16,\n    backgroundColor: '#f8f9fa',\n    borderRightWidth: 1,\n    borderRightColor: '#e5e5e5',\n  },\n  title: {\n    fontSize: 20,\n    fontWeight: 'bold',\n    marginBottom: 16,\n  },\n  menu: {\n    gap: 12,\n  },\n  menuItem: {\n    fontSize: 16,\n    color: '#495057',\n  },\n});\n```\n\n:::\n\n## Getting Query Parameters in Layouts\n\nTo get query parameters in a layout, you can use the `useParams` hook. `useParams` reads the parameters of the current screen and returns them as an object.\n\n### `useParams` Hook Usage Example\n\nThe following is an example of using the `useParams` hook in a `_layout.tsx` file. It dynamically displays a title at the top of the screen based on the `title` value passed as a URL query parameter.\n\n::: code-group\n\n```tsx [pages/_layout.tsx]\nimport { useParams } from '@granite-js/react-native';\nimport { PropsWithChildren } from 'react';\nimport { View, Text } from 'react-native';\n\nexport default function Layout({ children }: PropsWithChildren) {\n  // Get the parameters of the current screen.\n  const params = useParams({ strict: false });\n\n  // Get the 'title' parameter and set a default value.\n  const title = params?.title ?? 'Default Title';\n\n  return (\n    <View style={{ flex: 1 }}>\n      {/* Dynamically generated header */}\n      <View style={{ padding: 16, backgroundColor: '#f0f0f0' }}>\n        <Text style={{ fontSize: 20, fontWeight: 'bold' }}>{title}</Text>\n      </View>\n      {/* Render child components */}\n      <View style={{ flex: 1 }}>{children}</View>\n    </View>\n  );\n}\n```\n\n:::\n\n## References\n\n- [Navigating Screens](/guides/granite-router/routing)\n- [Using Query Parameters](/guides/granite-router/params)\n"
  },
  {
    "path": "docs/guides/granite-router/params.md",
    "content": "<script setup>\n  import UsageSection from '../../components/UsageSection.vue'\n</script>\n\n# Defining Screen Parameters\n\nWhen an application is launched with a [URL Scheme](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier), it can reference the [query string](https://en.wikipedia.org/wiki/Query_string) values included in the scheme. When launching an application with a scheme, you can pass necessary data or activate specific features.\n\n## Passing Data with Parameters\n\nWhen launching an application, you can add key-value pairs of data to the URL in the form of parameters.\n\nFor example, it looks like this:\n\n```\ngranite://{serviceName}?key1=value1&key2=value2\n```\n\nIn this example, an application named `test-app` can be launched, and `name` and `age` data can be passed.\n\n```\ngranite://test-app?name=tom&age=10\n```\n\n## Getting Parameter Values\n\nUsing the `useParams` hook, you can easily get the query string values from the URL when the application is launched. This hook returns the value corresponding to a specific key through the `useParams` method.\n\nAdditionally, by using the `validateParams` option, you can define and validate the parameters required for the screen. Refer to the example below.\n\n```tsx\nimport { createRoute } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\n// Define the screen corresponding to the root path ('/')\nexport const Route = createRoute('/', {\n  component: Index,\n  validateParams: (params) => ({\n    // Set 'name' key as required and convert its type to string.\n    name: params.name as string,\n    // Set 'age' key as required and convert its type to number.\n    age: params.age as number,\n  }),\n});\n\nfunction Index() {\n  // Get the query string value for the 'name' key.\n  const { name, age } = Route.useParams();\n\n  // Alternatively, you can get values from a specific path like this:\n  // const { name, age } = useParams({ from: \"/\" });\n\n  return (\n    <View>\n      <Text>Name: {name}</Text>\n      <Text>Age: {age}</Text>\n    </View>\n  );\n}\n```\n\n## Validating Parameters\n\n<UsageSection assetType=\"image\" assetPath=\"/usage/query-param/query-param-required.png\">\n\nParameters that must be included can be validated using the `validateParams` option.\n\nFor example, the example code below will throw an error if the `name` parameter is missing.\n\nTherefore, use the `validateParams` option to ensure that required parameters are not omitted.\n\n::: code-group\n\n```tsx [vanilla]\nimport { createRoute } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\nexport const Route = createRoute('/', {\n  component: Index,\n  validateParams: (params) => {\n    if (!('name' in params)) {\n      throw Error('name is required');\n    }\n    if (typeof params.name !== 'string') {\n      throw Error('name must be a string');\n    }\n\n    if (!('age' in params)) {\n      throw Error('age is required');\n    }\n    if (typeof params.age !== 'number') {\n      throw Error('age must be a number');\n    }\n\n    return params as {\n      name: string;\n      age: number;\n    };\n  },\n});\n\nfunction Index() {\n  const { name, age } = Route.useParams();\n\n  return (\n    <View>\n      <Text>Name: {name}</Text>\n      <Text>Age: {age}</Text>\n    </View>\n  );\n}\n```\n\n```tsx [valibot]\nimport { createRoute } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\nimport * as v from 'valibot';\n\nexport const Route = createRoute('/', {\n  component: Index,\n  validateParams: v.object({\n    name: v.string(),\n    age: v.number(),\n  }),\n});\n\nfunction Index() {\n  const { name, age } = Route.useParams();\n\n  return (\n    <View>\n      <Text>Name: {name}</Text>\n      <Text>Age: {age}</Text>\n    </View>\n  );\n}\n```\n\n```tsx [zod]\nimport { createRoute } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\nimport { z } from 'zod';\n\nexport const Route = createRoute('/', {\n  component: Index,\n  validateParams: z.object({\n    name: z.string(),\n    age: z.number(),\n  }),\n});\n\nfunction Index() {\n  const { name, age } = Route.useParams();\n\n  return (\n    <View>\n      <Text>Name: {name}</Text>\n      <Text>Age: {age}</Text>\n    </View>\n  );\n}\n```\n\n:::\n\n</UsageSection>\n\n## Advanced Validation\n\nValidation libraries provide powerful features for handling validation errors and transforming values.\n\n::: code-group\n\n```tsx [valibot]\nimport { createRoute } from '@granite-js/react-native';\nimport * as v from 'valibot';\n\n// Using v.fallback() for error resilience\nexport const Route = createRoute('/profile', {\n  component: Profile,\n  validateParams: v.object({\n    name: v.fallback(v.string(), 'Anonymous'),\n    age: v.fallback(v.number(), 0),\n    isActive: v.fallback(v.boolean(), true),\n  }),\n});\n```\n\n```tsx [valibot - optional]\nimport { createRoute } from '@granite-js/react-native';\nimport * as v from 'valibot';\n\n// Using v.optional() with default values\nexport const Route = createRoute('/settings', {\n  component: Settings,\n  validateParams: v.object({\n    theme: v.optional(v.picklist(['light', 'dark']), 'light'),\n    animation: v.optional(v.boolean(), true),\n    fontSize: v.optional(v.number(), 16),\n  }),\n});\n```\n\n```tsx [valibot - transform]\nimport { createRoute } from '@granite-js/react-native';\nimport * as v from 'valibot';\n\n// Using v.transform() for type conversion\nexport const Route = createRoute('/user', {\n  component: User,\n  validateParams: v.object({\n    // Converts string to number\n    id: v.pipe(\n      v.string(),\n      v.transform((v) => parseInt(v))\n    ),\n    // Converts ISO string to Date object\n    createdAt: v.pipe(\n      v.string(),\n      v.transform((v) => new Date(v))\n    ),\n  }),\n});\n```\n\n```tsx [zod]\nimport { createRoute } from '@granite-js/react-native';\nimport { z } from 'zod';\n\n// Using .catch() for error resilience\nexport const Route = createRoute('/profile', {\n  component: Profile,\n  validateParams: z.object({\n    name: z.string().catch('Anonymous'),\n    age: z.number().catch(0),\n    isActive: z.boolean().catch(true),\n  }),\n});\n```\n\n```tsx [zod - default]\nimport { createRoute } from '@granite-js/react-native';\nimport { z } from 'zod';\n\n// Using .default() for optional parameters\nexport const Route = createRoute('/settings', {\n  component: Settings,\n  validateParams: z.object({\n    theme: z.enum(['light', 'dark']).default('light'),\n    animation: z.boolean().default(true),\n    fontSize: z.number().default(16),\n  }),\n});\n```\n\n```tsx [zod - transform]\nimport { createRoute } from '@granite-js/react-native';\nimport { z } from 'zod';\n\n// Using .transform() for type conversion\nexport const Route = createRoute('/user', {\n  component: User,\n  validateParams: z.object({\n    // Converts string to number\n    id: z.string().transform((v) => parseInt(v)),\n    // Converts ISO string to Date object\n    createdAt: z.string().transform((v) => new Date(v)),\n  }),\n});\n\nfunction User() {\n  const params = Route.useParams();\n  // params.id is number (not string)\n  // params.createdAt is Date object\n}\n```\n\n:::\n\n## Transforming Parameter Values\n\nThe `createRoute.parserParams` option allows you to convert `string` values passed as query strings to your desired types.\nBy default, `useParams` automatically converts most simple types like numbers, strings, arrays, and objects, so you rarely need to override the parser directly.\nHowever, when you need to use complex data structures or want to remove specific params, you can define a parser yourself to convert them to the desired types.\n\nThe result of the `parserParams` option is transformed before being passed to the `validateParams` option.\n\n### Type Conversion Using the Default Parser\n\nUsing the default parser, query string values are automatically converted to appropriate types. The example below shows how to convert parameters to their correct types.\n\n```tsx\nimport { createRoute } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\n// Example URL: granite://test-app?name=tom&age=10&arr=1,2,3&obj={\\\"name\\\":\\\"jane\\\",\\\"age\\\":20}\nexport const Route = createRoute('/', {\n  component: Index,\n  validateParams: (params) => ({\n    // Parameter values are automatically converted to the correct types by the default parser\n    name: params.name as string, // Converts to string\n    age: params.age as number, // Converts to number\n    arr: params.arr as string[], // Converts to array\n    obj: params.obj as { name: string; age: number }, // Converts to object\n  }),\n});\n\nfunction Index() {\n  const { name, age, arr, obj } = Route.useParams();\n\n  return (\n    <View>\n      <Text>\n        Name: {name}, Type: {typeof name}\n      </Text>\n      <Text>\n        Age: {age}, Type: {typeof age}\n      </Text>\n      <Text>\n        Array: {JSON.stringify(arr)}, Type: {typeof arr}\n      </Text>\n      <Text>\n        Object: {JSON.stringify(obj)}, Type: {typeof obj}\n      </Text>\n    </View>\n  );\n}\n```\n\n### Overriding the Parser\n\nThe `parserParams` option allows you to define and use a custom function to transform query parameters that are difficult to handle with the default parser. For example, the code below shows how to remove a specific parameter (`referer`) and process the remaining parameters with the default parser.\n\n```tsx\nimport { createRoute, defaultParserParams } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\n// Example URL: granite://test-app?name=tom&age=10&referer=https://google.com\nexport const Route = createRoute('/', {\n  component: Index,\n\n  // Remove a specific parameter and process the rest with the default parser // [!code highlight:5]\n  parserParams: (params) => {\n    const { referer, ...rest } = params;\n    return defaultParserParams(rest);\n  },\n\n  validateParams: (params) => {\n    // [!code highlight:11]\n    // Here, `params` is the value transformed by the parserParams function.\n    // That is, `referer` is passed after being already removed.\n    return {\n      name: params.name,\n      age: params.age,\n    } as {\n      name: string;\n      age: number;\n    };\n  },\n});\n\n// Using parameters in the component\nfunction Index() {\n  const { name, age } = Route.useParams();\n\n  return (\n    <View>\n      <Text>\n        Name: {name}, Type: {typeof name}\n      </Text>\n      <Text>\n        Age: {age}, Type: {typeof age}\n      </Text>\n    </View>\n  );\n}\n```\n\n::: warning Note on Duplicate Parameters\nIf a parameter with the same name is used multiple times, its value will be returned as an array. For example, if the `age` parameter is included twice, it will be processed as follows:\n\n```js\n// Scheme: `granite://test-app?name=tom&age=10&age=20`\nconst params = useParams({\n  from: \"/\",\n});\n\n// params\n{ name: 'tom', age: [10, 20] }\n```\n\n:::\n\n## References\n\n- [useParams](/reference/react-native/screen-control/useParams)\n"
  },
  {
    "path": "docs/guides/granite-router/plugin-router.md",
    "content": "# Router Plugin\n\nGranite Router is a type-safe router that supports file-based routing and automatically assigns types for each path. You can create screens simply by adding files to the `pages/` directory.\n\nTo easily create and manage pages, install the plugin as shown below:\n\n::: code-group\n\n```sh [npm]\n$ npm install @granite-js/plugin-router --save-dev\n```\n\n```sh [pnpm]\n$ pnpm add @granite-js/plugin-router --save-dev\n```\n\n```sh [yarn]\n$ yarn add @granite-js/plugin-router --dev\n```\n\n:::\n\nThe following is an example of adding the router plugin to the `granite.config.ts` configuration. This plugin automatically creates routes based on the `pages/` folder.\n\n```ts\nimport { env } from '@granite-js/plugin-env';\nimport { hermes } from '@granite-js/plugin-hermes';\nimport { router } from '@granite-js/plugin-router';\nimport { defineConfig } from '@granite-js/react-native/config';\n\nexport default defineConfig({\n  /**\n   * granite://example\n   */\n  scheme: 'granite',\n  appName: 'example',\n  plugins: [\n    router(), // [!code highlight]\n  ],\n});\n```\n\n## Development Mode\n\nIn development mode, when you create a new page file, the screen component code and type definitions are automatically generated.\n\n::: code-group\n\n```sh [npm]\n$ npx granite dev\n```\n\n```sh [pnpm]\n$ pnpm granite dev\n```\n\n```sh [yarn]\n$ yarn granite dev\n```\n\n:::\n\nFor example, if you add a `pages/page-a.tsx` file, the following screen component and routing code will be automatically generated:\n\n```tsx\nimport React from 'react';\nimport { Text, View } from 'react-native';\nimport { createRoute } from '@granite-js/react-native';\n\nexport const Route = createRoute('/page-a', {\n  validateParams: (params) => params,\n  component: PageA,\n});\n\nfunction PageA() {\n  return (\n    <View>\n      <Text>Hello PageA</Text>\n    </View>\n  );\n}\n```\n\nThis page can be accessed via the `granite://example/page-a` path.\n\n## Automatically Generated Type Definitions\n\nGranite also automatically defines types for routing paths. Thanks to this, it will generate an error if the path or parameters are incorrect when routing.\n\n```tsx\n// src/router.gen.ts\n\n/* eslint-disable */\n// This file is auto-generated by @granite-js/react-native. DO NOT EDIT.\nimport { Route as _PageARoute } from '../pages/page-a';\nimport { Route as _PageBRoute } from '../pages/page-b';\nimport { Route as _PageCRoute } from '../pages/page-c';\n\ndeclare module '@granite-js/react-native' {\n  interface RegisterScreenInput {\n    '/page-a': (typeof _PageARoute)['_inputType'];\n    '/page-b': (typeof _PageBRoute)['_inputType'];\n    '/page-c': (typeof _PageCRoute)['_inputType'];\n  }\n\n  interface RegisterScreen {\n    '/page-a': (typeof _PageARoute)['_outputType'];\n    '/page-b': (typeof _PageBRoute)['_outputType'];\n    '/page-c': (typeof _PageCRoute)['_outputType'];\n  }\n}\n```\n\nUsing these automatically generated type definitions makes routing safer and helps reduce mistakes.\n"
  },
  {
    "path": "docs/guides/granite-router/routing.md",
    "content": "<script setup>\n  import UsageSection from '../../components/UsageSection.vue'\n</script>\n\n# Navigating Screens\n\nGranite Router makes it easy to handle routing tasks such as navigating to new screens in your application or controlling screen history.\n\nWe'll explain various routing features using the example code below.\n\n::: info\nGranite Router operates based on [React Navigation](https://reactnavigation.org/).\n:::\n\n## Example Code\n\nThe example code consists of a total of 3 pages, and the structure is as follows:\n\n```\nroot\n├─── pages\n│    ├─── page-a.tsx\n│    ├─── page-b.tsx\n│    └─── page-c.tsx\n└─── src\n     └─── ...\n```\n\n::: details `page-a.tsx` Source Code\n\n```tsx\n// page-a.tsx\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\nimport { createRoute, useNavigation } from '@granite-js/react-native';\n\nexport const Route = createRoute('/page-a', {\n  validateParams: (params) => params,\n  component: PageA,\n});\n\nfunction PageA() {\n  const navigation = useNavigation();\n\n  const handlePress = () => {\n    navigation.navigate('/page-b');\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#3182f6' }]}>\n      <Text style={styles.text}>Page A</Text>\n      <Pressable onPress={handlePress}>\n        <Text style={styles.buttonLabel}>Go to Page B</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n:::\n\n::: details `page-b.tsx` Source Code\n\n```tsx\n// page-b.tsx\nimport { createRoute, useNavigation } from '@granite-js/react-native';\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\n\nexport const Route = createRoute('/page-b', {\n  validateParams: (params) => params,\n  component: PageB,\n});\n\nfunction PageB() {\n  const navigation = useNavigation();\n\n  // Function to go back to the previous screen.\n  const handlePressBackButton = () => {\n    if (navigation.canGoBack()) {\n      navigation.goBack();\n    } else {\n      console.warn('Cannot go back to the previous screen.');\n    }\n  };\n\n  const handlePressNextButton = () => {\n    navigation.navigate('/page-c', {\n      message: 'Hello!',\n      date: new Date().getTime(),\n    });\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#fe9800' }]}>\n      <Text style={styles.text}>Page B</Text>\n      <Pressable onPress={handlePressBackButton}>\n        <Text style={styles.buttonLabel}>Go Back</Text>\n      </Pressable>\n      <Pressable onPress={handlePressNextButton}>\n        <Text style={styles.buttonLabel}>Go to Page C</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n:::\n\n::: details `page-c.tsx` Source Code\n\n```tsx\n// page-c.tsx\nimport { createRoute, useNavigation } from '@granite-js/react-native';\nimport { CommonActions } from '@granite-js/react-native/native/@react-navigation/native';\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\n\nexport const Route = createRoute('/page-c', {\n  validateParams: (params) => params as { message: string; date: number },\n  component: PageC,\n});\n\nfunction PageC() {\n  const navigation = useNavigation();\n  const params = Route.useParams();\n\n  const handlePressHomeButton = () => {\n    navigation.dispatch((state) => {\n      return CommonActions.reset({\n        ...state,\n        index: 0,\n        routes: state.routes.filter((route) => route.name === '/page-a'),\n      });\n    });\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#f04452' }]}>\n      <Text style={styles.text}>{params.message}</Text>\n      <Text style={styles.text}>{params.date}</Text>\n      <View style={styles.line} />\n      <Text style={styles.text}>Page C</Text>\n      <Pressable onPress={handlePressHomeButton}>\n        <Text style={styles.buttonLabel}>Go to Home</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n:::\n\n## Page A: Navigating Screens\n\n<UsageSection assetType=\"image\" assetPath=\"/usage/navigation/navigate-1.gif\">\n\n[`useNavigation`](https://reactnavigation.org/docs/use-navigation) is used to handle navigation between screens. With the [`navigate`](https://reactnavigation.org/docs/navigation-actions/#navigate) method, you can pass the path of the screen to navigate to and any necessary data.\n\n```tsx\n// page-a.tsx\nimport { createRoute, useNavigation } from '@granite-js/react-native';\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\n\nexport const Route = createRoute('/page-a', {\n  validateParams: (params) => params,\n  component: PageA,\n});\n\nfunction PageA() {\n  const navigation = useNavigation();\n\n  const handlePress = () => {\n    navigation.navigate('/page-b');\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#3182f6' }]}>\n      <Text style={styles.text}>Page A</Text>\n      <Pressable onPress={handlePress}>\n        <Text style={styles.buttonLabel}>Go to Page B</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n### Key Points\n\n- Get the `navigation` object using the `useNavigation` hook.\n- Calling `navigation.navigate('/page-b')` navigates to 'Page B'.\n\n</UsageSection>\n\n## Page B: Going Back to the Previous Screen\n\n<UsageSection assetType=\"image\" assetPath=\"/usage/navigation/navigate-2.gif\">\n\nYou can use the [`goBack`](https://reactnavigation.org/docs/navigation-actions/#goback) method to return to the previous screen. However, an error may occur if there is no previous screen history, so you should first check with [`canGoBack`](https://reactnavigation.org/docs/navigation-object/#cangoback).\n\n```tsx\n// page-b.tsx\nimport { createRoute, useNavigation } from '@granite-js/react-native';\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\n\nexport const Route = createRoute('/page-b', {\n  validateParams: (params) => params,\n  component: PageB,\n});\n\nfunction PageB() {\n  const navigation = useNavigation();\n\n  // Function to go back to the previous screen.\n  const handlePressBackButton = () => {\n    if (navigation.canGoBack()) {\n      navigation.goBack();\n    } else {\n      console.warn('Cannot go back to the previous screen.');\n    }\n  };\n\n  const handlePressNextButton = () => {\n    navigation.navigate('/page-c', {\n      message: 'Hello!',\n      date: new Date().getTime(),\n    });\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#fe9800' }]}>\n      <Text style={styles.text}>Page B</Text>\n      <Pressable onPress={handlePressBackButton}>\n        <Text style={styles.buttonLabel}>Go Back</Text>\n      </Pressable>\n      <Pressable onPress={handlePressNextButton}>\n        <Text style={styles.buttonLabel}>Go to Page C</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n### Key Points\n\n- Check if there is a previous screen with `canGoBack()`, and if so, call `goBack()`.\n- Navigate to 'Page C' while passing data with `navigate('/page-c', { message: 'Hello!', date: new Date().getTime() })`.\n\n</UsageSection>\n\n## Page C: Using Received Data\n\n<UsageSection assetType=\"image\" assetPath=\"/usage/navigation/navigate-3.png\">\n\nThe `Route.useParams` hook is used to get data passed from other screens.\n\nAt this time, if you set the `createRoute.validateParams` option, you can access the passed data while type-checking it (Type-Safe). This helps prevent errors due to incorrect data formats.\n\n```tsx\n// page-c.tsx\nimport { createRoute, useNavigation } from '@granite-js/react-native';\nimport { CommonActions } from '@granite-js/react-native';\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\n\nexport const Route = createRoute('/page-c', {\n  validateParams: (params) => params as { message: string; date: number },\n  component: PageC,\n});\n\nfunction PageC() {\n  const navigation = useNavigation();\n  const params = Route.useParams();\n\n  const handlePressHomeButton = () => {\n    navigation.dispatch((state) => {\n      return CommonActions.reset({\n        ...state,\n        index: 0,\n        routes: state.routes.filter((route) => route.name === '/page-a'),\n      });\n    });\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#f04452' }]}>\n      <Text style={styles.text}>{params.message}</Text>\n      <Text style={styles.text}>{params.date}</Text>\n      <View style={styles.line} />\n      <Text style={styles.text}>Page C</Text>\n      <Pressable onPress={handlePressHomeButton}>\n        <Text style={styles.buttonLabel}>Go to Home</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n### Key Points\n\n- Use the `Route.useParams` hook to access data (parameters) passed from the URL.\n- Set the `createRoute.validateParams` option to safely use data by type-checking it (Type-Safe).\n\n</UsageSection>\n\n## Defining Screen Parameter Types\n\nDefine a Route component like the one below for each page.\nHere, the `validateParams` option defines the type of parameters that the screen will receive.\n\n```tsx\nexport const Route = createRoute('/page-c', {\n  validateParams: (params) => params as { message: string; date: number },\n  component: PageC,\n});\n```\n\nIn the code above, `validateParams` defines the type of parameters to include two fields: `message` and `date`.\n\nThis allows other code using `useNavigate` or `useParams` to clearly know the required path and the data to be passed through type checking. This improves code safety and readability.\n\n## Resetting Routing State\n\n![navigate-state-1](/usage/navigation/navigate-flow.png)\n\nThe state immediately after navigating in the order of Page A → Page B → Page C can be represented as shown in the figure below.\n\n<div align=\"center\">\n\n![navigate-state-1](/usage/navigation/navigate-state-1.png)\n\n</div>\n\nPage A, Page B, and Page C remain in the `routes` history in order, and the `index` value points to 2, which is the position of the last navigated page, Page C.\n\nYou can use `reset` to initialize the screen navigation history. For example, if you want to go back to 'Page A' after navigating 'Page A → B → C' and delete the B and C history, use [`CommonActions.reset`](https://reactnavigation.org/docs/navigation-actions/#reset).\n\n```tsx\nnavigation.dispatch(\n  CommonActions.reset({\n    index: 0,\n    routes: [{ name: '/page-a' }],\n  })\n);\n```\n\n<div align=\"center\">\n\n![navigate-state-2](/usage/navigation/navigate-state-2.png)\n\n</div>\n\n### Key Points\n\n- Use `CommonActions.reset` to keep only a specific screen in the history and delete the rest of the screen history.\n\n## References\n\n- [React Navigation Official Documentation](https://reactnavigation.org/)\n\nUsing React Navigation in this way makes it easy to handle navigation between screens, and you can implement various UX features through functions for passing data or manipulating history. Also, using it with TypeScript allows you to write safe and robust code.\n"
  },
  {
    "path": "docs/guides/introduction.md",
    "content": "# Granite\n\nGranite is an enterprise-grade React Native framework for microservice apps with brownfield integration, 200KB bundle sizes, and AWS-ready infrastructure.\n\n## Features\n\n- **Add React Native to existing apps** - Easily integrate React Native screens into your current iOS and Android apps.\n- **Tiny bundles** - Create tiny 200KB microservice bundles with bundle splitting and smart optimization.\n- **Fast builds** - Keep your JavaScript bundle build times down to just seconds using ESBuild.\n- **Full AWS setup** - Complete infrastructure configuration with full deployment control.\n- **One-click infrastructure** - Set up CDN and infrastructure with a single CLI command.\n- **Simple defaults** - Pre-configured settings let you focus on building, not setup.\n- **Comprehensive end-to-end testing** - Every feature comes with end-to-end tests included.\n- **Fast native builds** - Keep your native build times quick with prebuilt frameworks. (WIP)\n"
  },
  {
    "path": "docs/guides/miscellaneous/install-native-app.md",
    "content": "# Installing Test App\n\nThe Granite test App is an application for testing deployed bundles. This document guides you through installing and setting up the Granite test App on iOS simulators and Android devices.\n\n## <span style=\"display:inline-flex; align-items:center; gap:5px;\"><img src=\"/icons/apple.svg\" alt=\"Apple iOS\" width=\"24\" height=\"24\" style=\"margin-top:-4px\"> iOS Simulator Installation Guide </span>\n\nTo test React Native apps on iOS, you need a simulator. The simulator comes with `Xcode` when installed on macOS.\n\nFollow the guide below to install the app.\n\n### Prerequisites\n\n- macOS\n- Xcode (Available on the App Store)\n\n### Installation Steps\n\n1. Download the Granite iOS app bundle from GitHub Releases  \n   **[Browse all releases](https://github.com/toss/granite/releases)**\n   - To use a stable version, choose a release without the \"Pre-release\" badge or version names like `alpha`, `beta`, or `rc`.\n   - To try the latest features, you can use a pre-release version.\n   - In the Assets section, download the `granite_ios.zip` file.\n\n2. Extract the downloaded `granite_ios.zip` file.\n\n3. Drag the `.app` file into the `Xcode` iOS simulator window to install.  \n   The app will be copied to the simulator when you drag and drop.\n\n## <span style=\"display:inline-flex; align-items:center; gap:5px;\"><img src=\"/icons/android.svg\" alt=\"Android\" width=\"24\" height=\"24\" style=\"margin-top:-2px\"> Android Installation Guide </span>\n\n### Prerequisites\n\n- Android device or emulator\n- ADB (Android Debug Bridge) installation (Comes with Android Studio)\n\n### Installation Steps\n\n1. Download the Granite Android APK from GitHub Releases  \n   **[Browse all releases](https://github.com/toss/granite/releases)**\n   - To use a stable version, choose a release without the \"Pre-release\" badge or version names like `alpha`, `beta`, or `rc`.\n   - To try the latest features, you can use a pre-release version.\n   - In the Assets section, download the `granite_android.zip` file.\n\n2. Extract the downloaded `granite_android.zip` file.\n\n3. Choose one of the installation methods.\n\n#### Install using ADB command\n\n- Connect your Android device to your computer, then run the following command in the terminal:\n  ```bash\n  adb install granite_android.apk\n  ```\n\n#### Direct installation on device\n\n1. Copy the downloaded APK file to your Android device.\n2. Open the file explorer on your device and tap the APK file to install.  \n   You may need to enable 'Install from Unknown Sources' in security settings.\n\n## Initial Setup\n\nWhen you first run the app, you need to enter the CDN address for loading bundles and the deep link scheme. Granite provides values that you can use for testing.\n\n| Setting Item   | Value                                         | Description                                     |\n| -------------- | --------------------------------------------- | ----------------------------------------------- |\n| **Host**       | `https://d2dzky5bdhec40.cloudfront.net`       | Trial bundle CDN address. Provided for testing. |\n| **URL Scheme** | `granite://showcase` <br> `granite://counter` | Scheme used for handling deep links in the app. |\n\nEnter these values in the Granite test settings and run the app.\n\n| iOS                                                                                                                                                                                                             | Android                                                                                                                                                                                                             |\n| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| <video autoplay loop muted style=\"max-width:400px; width:100%; height:auto; margin-top:1rem;\"> <source src=\"/videos/ios_showcase.mp4\" type=\"video/mp4\" /> Your browser does not support the video tag. </video> | <video autoplay loop muted style=\"max-width:400px; width:100%; height:auto; margin-top:1rem;\"> <source src=\"/videos/android_showcase.mov\" type=\"video/mp4\" /> Your browser does not support the video tag. </video> |\n"
  },
  {
    "path": "docs/guides/quick-start/create-your-app.md",
    "content": "# Getting Started with Granite\n\nBuild your first enterprise-grade React Native microservice app in 10 minutes.\n\n## Prerequisites\n\nBefore you start, make sure you have these tools installed:\n\n- **Node.js LTS** (22.12.0 recommended) - [Download here](https://nodejs.org/)\n- **Xcode** (for testing in iOS) - Available from Mac App Store\n- **Android Studio** (for testing in Android) - [Download here](https://developer.android.com/studio)\n- **Granite test app** - Install on your iOS simulator or Android emulator ([Installation guide](../miscellaneous/install-native-app))\n\n## 1. Create Your Granite Project\n\nOpen your terminal and run the create command:\n\n::: code-group\n\n```sh [npm]\nnpx create-granite-app@latest\n```\n\n```sh [pnpm]\npnpm create granite-app\n```\n\n```sh [yarn]\nyarn create granite-app\n```\n\n:::\n\nThe interactive CLI will guide you through setup:\n\n```sh\n$ npx create-granite-app@latest\n\n┌  Create Granite App Project\n│\n◆  Project Setup\n◇  Project name or path:\n│  my-granite-app\n│\n◇  Select development tools:\n│  ◻ ESLint + Prettier (recommended)\n│  ◻ Biome\n│\n◇  ✅ Created Granite App successfully!\n│\n◇  Next steps ─────────────╮\n│                          │\n│  cd my-granite-app       │\n│  npm install             │\n│  npm run dev             │\n│                          │\n├──────────────────────────╯\n│\n└  🎉 Done! Your Granite app is ready.\n```\n\nThis creates a new directory with your project name and sets up the basic Granite app structure.\n\n## 2. Install Dependencies\n\nNavigate to your project and install dependencies:\n\n```sh\ncd my-granite-app\n```\n\n::: code-group\n\n```sh [npm]\nnpm install\n```\n\n```sh [pnpm]\npnpm install\n```\n\n```sh [yarn]\nyarn install\n```\n\n:::\n\n## 3. Understanding Your Project Structure\n\nYour Granite project has a clean, organized structure:\n\n```\nmy-granite-app/\n├── pages/                  # Screens in your microservices\n│   ├── _404.tsx           # 404 error page\n│   └── index.tsx          # Home screen\n│\n├── src/                   # Source code\n│   ├── _app.tsx          # Microservice entry point\n│   └── router.gen.ts     # Auto-generated type-safe routing\n│\n├── granite.config.ts      # Granite configuration\n├── react-native.config.js # React Native settings\n└── require.context.ts     # Auto-generated routing context\n```\n\n**Key files:**\n\n- **`pages/`** - Each file becomes a screen in your app\n- **`granite.config.ts`** - Configure your Granite app ([Reference](../../reference/react-native/config/defineConfig))\n- **`src/_app.tsx`** - The main entry point where you can add logic that's shared across all screens in your microservice\n\n## 4. Start Development Server\n\nStart your Granite development server:\n\n::: code-group\n\n```sh [npm]\nnpm run dev\n```\n\n```sh [pnpm]\npnpm run dev\n```\n\n```sh [yarn]\nyarn dev\n```\n\n:::\n\nYou'll see the Granite welcome screen:\n\n```\n ██████╗ ██████╗  █████╗ ███╗   ██╗██╗████████╗███████╗\n██╔════╝ ██╔══██╗██╔══██╗████╗  ██║██║╚══██╔══╝██╔════╝\n██║  ███╗██████╔╝███████║██╔██╗ ██║██║   ██║   █████╗\n██║   ██║██╔══██╗██╔══██║██║╚██╗██║██║   ██║   ██╔══╝\n╚██████╔╝██║  ██║██║  ██║██║ ╚████║██║   ██║   ███████╗\n ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝   ╚═╝   ╚══════╝\n\n                  Welcome to Granite\n\nTo reload the app press \"r\"\nTo open developer menu press \"d\"\nTo open debugger press \"j\"\n```\n\n> **✅ Success indicator:** You see the Granite ASCII art and development commands\n\n## 5. Test Your App\n\nNow let's see your app running in the Granite test app:\n\n### 5.1 Install Granite Test App\n\nIf you haven't already, install the Granite test app on your simulator:\n\n- Follow our [installation guide](../miscellaneous/install-native-app)\n\n### 5.2 Run Your App\n\n1. **Open your iOS Simulator** (or Android Emulator)\n2. **Launch the Granite test app** from your simulator\n3. **Connect to your development server:**\n   - Ensure your `granite dev` is still running in the terminal\n   - **For Android users:** Run `adb reverse tcp:8081 tcp:8081` in a separate terminal to enable connection\n   - In the Granite test app, tap **\"Open Dev Server\"**\n   - The app will connect to your local development server and load your React Native screens\n\nYou should see your app's home screen loading in the native app!\n\n> **✅ Success indicator:** Your React Native screen appears in the native Granite test app\n\n## 6. Create Your First Screen\n\nLet's add a new screen to understand how Granite routing works:\n\n### 6.1 Create a Profile Screen\n\nCreate a new file `pages/profile.tsx`:\n\n```tsx\nimport React from 'react';\nimport { View, Text, StyleSheet } from 'react-native';\n\nexport default function ProfileScreen() {\n  return (\n    <View style={styles.container}>\n      <Text style={styles.title}>Profile Screen</Text>\n      <Text style={styles.description}>This is your profile microservice!</Text>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    backgroundColor: '#f5f5f5',\n  },\n  title: {\n    fontSize: 24,\n    fontWeight: 'bold',\n    marginBottom: 16,\n  },\n  description: {\n    fontSize: 16,\n    textAlign: 'center',\n    color: '#666',\n  },\n});\n```\n\n### 6.2 Navigate Between Screens\n\nUpdate your `pages/index.tsx` to add navigation:\n\n```tsx\nimport React from 'react';\nimport { View, Text, TouchableOpacity, StyleSheet } from 'react-native';\nimport { useNavigation } from '@granite-js/react-native';\n\nexport default function HomeScreen() {\n  const navigation = useNavigation();\n\n  return (\n    <View style={styles.container}>\n      <Text style={styles.title}>Welcome to Granite!</Text>\n\n      <TouchableOpacity style={styles.button} onPress={() => navigation.navigate('/profile')}>\n        <Text style={styles.buttonText}>Go to Profile</Text>\n      </TouchableOpacity>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    backgroundColor: '#fff',\n  },\n  title: {\n    fontSize: 24,\n    fontWeight: 'bold',\n    marginBottom: 32,\n  },\n  button: {\n    backgroundColor: '#007AFF',\n    paddingHorizontal: 24,\n    paddingVertical: 12,\n    borderRadius: 8,\n  },\n  buttonText: {\n    color: 'white',\n    fontSize: 16,\n    fontWeight: '600',\n  },\n});\n```\n\nSave the files and your app will hot reload automatically! 🔥\n\n> **✅ Success indicator:** You can navigate between Home and Profile screens\n\n## 7. Build Your App\n\nReady to create production bundles? Let's build your app:\n\n::: code-group\n\n```sh [npm]\nnpm run build\n```\n\n```sh [pnpm]\npnpm run build\n```\n\n```sh [yarn]\nyarn build\n```\n\n:::\n\nGranite will create optimized microservice bundles, and your optimized bundles are now in the `dist/` directory:\n\n<img src=\"../../public/getting-started/bundle-size.png\" style=\"margin: 0 auto; max-width: 500px; width: 100%;\" />\n\n> **✅ Success indicator:** You see built bundles, with sizes under 300KB each\n\n## 🎉 Congratulations!\n\nYou've successfully created your first Granite app! Here's what you accomplished:\n\n- ✅ Created a new Granite project\n- ✅ Set up the development environment\n- ✅ Built your first microservice screens\n- ✅ Added navigation between screens\n- ✅ Generated production-ready bundles\n\n## What's Next?\n\nNow that you have a working Granite app, you can:\n\n1. **[Set up AWS Infrastructure](./setup-aws)** - Configure CDN infrastructure for your bundles\n2. **[Deploy to Production](./deploy-your-app)** - Learn how to deploy your bundles to AWS CDN\n3. **[Advanced Routing](../granite-router/routing)** - Learn about type-safe routing and navigation\n\n## Need Help?\n\n- 📖 [Documentation](../../index) - Complete Granite guide\n- 🐛 [GitHub Issues](https://github.com/toss/granite/issues) - Report bugs or request features\n"
  },
  {
    "path": "docs/guides/quick-start/deploy-your-app.md",
    "content": "# Deploy & Run Your Granite App\n\nGet your app live on AWS in 5 minutes.\n\n## What Happens When You Deploy\n\n- Upload optimized bundles to your AWS S3 bucket\n- Distribute globally via CloudFront CDN\n- Update apps instantly\n\n> **⏱️ Estimated time:** 5 minutes\n\n> **📱 Result:** Your app running live from AWS CDN\n\n## Prerequisites\n\nMake sure you've completed these guides first:\n\n- **[Getting Started](./create-your-app)** - Your Granite app is built and working\n- **[Setting Up AWS Infrastructure](./setup-aws)** - Your AWS CDN is set up and running\n\n## 1. Build Your Production App\n\nFirst, let's build your [Granite app](./create-your-app) for production. Run this command in your project directory:\n\n::: code-group\n\n```sh [npm]\nnpm run build\n```\n\n```sh [pnpm]\npnpm run build\n```\n\n```sh [yarn]\nyarn build\n```\n\n:::\n\nGranite will create optimized microservice bundles, and your optimized bundles are now in the `dist/` directory:\n\n<img src=\"../../public/getting-started/bundle-size.png\" style=\"margin: 0 auto; max-width: 500px; width: 100%;\" />\n\n> **✅ Success indicator:** You see built bundles, with sizes under 300KB each\n\n## 2. Install Granite Forge CLI\n\nNext, install the Granite Forge CLI - this tool helps you deploy your bundles to AWS:\n\n::: code-group\n\n```sh [npm]\nnpm install @granite-js/forge-cli --save-dev\n```\n\n```sh [pnpm]\npnpm add @granite-js/forge-cli --save-dev\n```\n\n```sh [yarn]\nyarn add @granite-js/forge-cli --dev\n```\n\n:::\n\n## 3. Deploy Your App\n\nWith the S3 bucket set up from the [AWS infrastructure guide](./setup-aws), let's deploy your app.\n\n::: code-group\n\n```sh [npm]\nnpx granite-forge deploy --bucket {Your S3 Bucket Name}\n```\n\n```sh [pnpm]\npnpm granite-forge deploy --bucket {Your S3 Bucket Name}\n```\n\n```sh [yarn]\nyarn granite-forge deploy --bucket {Your S3 Bucket Name}\n```\n\n:::\n\nYou'll see the deployment progress:\n\n```\n$ npx granite-forge deploy --bucket {Your bucket name}\n┌  Start deployment\n│\n◇  Successfully fetched current deployment state\n│\n▲  No deployment state found\n│\n◇  Are you sure you want to deploy test-granite-app?\n│  Yes\n│\n◇  Bundle uploaded\n│\n◇  Bundle list updated\n│\n◇  Deployed successfully! (Deployment ID: **********************)\n│\n└  Done\n```\n\n> **✅ Success indicator:** You see \"Done\"\n\n## 4. Test Your Granite App\n\nNow that your app is deployed, let's test it out using the Granite test app.\n\nOpen the [Granite test app](../miscellaneous/install-native-app) on your simulator and enter the following information:\n\n| Field      | What to Enter                                                                                                                                                                        |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Host       | The CDN URL from your [AWS infrastructure deployment](../quick-start/setup-aws.html#_7-deploy-your-infrastructure) (you can check it in the output of the infrastructure deployment) |\n| URL Scheme | Your app's URL scheme in the format: `{your-scheme}://{your-app-name}` (these values come from your Granite config)                                                                  |\n\n::: details Finding your scheme and app name\n\nThese values are defined in your `granite.config.ts` file. Let's take a look at how to find them:\n\n```ts\nimport { defineConfig } from '@granite-js/react-native/config';\n\nexport default defineConfig({\n  // Example execution scheme: granite://showcase\n  scheme: 'granite',\n  appName: 'showcase',\n  plugins: [\n    // ...\n  ],\n});\n```\n\n:::\n\n<img src=\"../../public/getting-started/input-cdn-url.png\" style=\"max-width: 320px; margin: 0 auto; width: 100%;\" />\n\nClick Submit and watch your app load instantly from your AWS infrastructure! Your app is now being served through a global CDN, ready for users worldwide. 🌍\n\n## Example Videos\n\n| iOS                                                                                                                                                                                                             | Android                                                                                                                                                                                                             |\n| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| <video autoplay loop muted style=\"max-width:400px; width:100%; height:auto; margin-top:1rem;\"> <source src=\"/videos/ios_showcase.mp4\" type=\"video/mp4\" /> Your browser does not support the video tag. </video> | <video autoplay loop muted style=\"max-width:400px; width:100%; height:auto; margin-top:1rem;\"> <source src=\"/videos/android_showcase.mov\" type=\"video/mp4\" /> Your browser does not support the video tag. </video> |\n\n## Understanding Deployment URLs\n\nYour app is deployed to specific URLs based on platform and version:\n\n### URL Structure\n\n```\nhttps://<your-cdn>/[platform]/[appName]/[version]/bundle\n```\n\n### Example URLs\n\n```bash\n# iOS bundles\nhttps://d1234567890123.cloudfront.net/ios/my-granite-app/100/bundle\n\n# Android bundles\nhttps://d1234567890123.cloudfront.net/android/my-granite-app/100/bundle\n```\n\n### Version Numbers (1-1000)\n\nVersion numbers control what percentage of users get your app update, from 0% to 100% of your user base, with 0.1% granularity.\n\n## 🎉 Congratulations!\n\nYour Granite app is now live on AWS! Here's what you can do now:\n\n- **Update instantly** - Deploy new versions by single CLI command\n- **Global performance** - Your app loads worldwide via CDN\n"
  },
  {
    "path": "docs/guides/quick-start/setup-aws.md",
    "content": "# Setting Up AWS Infrastructure for Granite\n\nSet up an on-premise React Native CDN infrastructure on AWS in 15 minutes.\n\n## What You'll Build\n\nBy the end of this guide, you'll have:\n\n- S3 Bucket for storing your app bundles\n- CloudFront CDN for fast global delivery\n- Production-ready infrastructure that scales with your users\n\n## Prerequisites\n\nBefore you start, make sure you have:\n\n- **AWS Account** - [Sign up here](https://aws.amazon.com/)\n\n## 1. Install Pulumi CLI\n\nFirst, install Pulumi - a tool that helps you set up AWS infrastructure using code. Choose your operating system below:\n\n::: code-group\n\n```sh [macOS]\nbrew install pulumi\n```\n\n```sh [Windows]\nwinget install pulumi\n```\n\n```sh [Linux]\ncurl -fsSL https://get.pulumi.com | sh\n```\n\n:::\n\nFor detailed installation steps, check out the [Pulumi installation guide](https://www.pulumi.com/docs/iac/download-install/).\n\n> **✅ Success indicator:** Run `pulumi version` - you should see version info\n\n## 2. Set Up AWS Credentials\n\nYou need to tell Pulumi how to access your AWS account. Choose one method:\n\n### Option A: Using AWS CLI (Recommended)\n\nInstall AWS CLI and configure it:\n\n```bash\n# Install AWS CLI\n# macOS: brew install awscli\n# Windows: winget install Amazon.AWSCLI\n# Linux: apt install awscli\n\n# Configure your credentials\naws configure\n```\n\nEnter your credentials when prompted:\n\n```\nAWS Access Key ID: [Your access key]\nAWS Secret Access Key: [Your secret key]\nDefault region: [Your region]\nDefault output format: json\n```\n\n### Option B: Using Environment Variables\n\nFor temporary setup, set these in your terminal:\n\n```bash\nexport AWS_ACCESS_KEY_ID=\"your-access-key-id\"\nexport AWS_SECRET_ACCESS_KEY=\"your-secret-access-key\"\nexport AWS_REGION=\"your-region\"\n```\n\n::: info Where to get AWS credentials\n\nGo to AWS Console → IAM → Users → Your User → Security Credentials → Create Access Key.\n\n:::\n\n## 3. Create Your Infrastructure Project\n\nCreate a new directory for your AWS infrastructure:\n\n```bash\nmkdir my-granite-infrastructure\ncd my-granite-infrastructure\n```\n\nInitialize a new Pulumi project:\n\n```bash\npulumi new aws-typescript\n```\n\nYou'll see an interactive setup:\n\n```\nThis command will walk you through creating a new Pulumi project.\n\nEnter a value or leave blank to accept the (default), and press <ENTER>.\nPress ^C at any time to quit.\n\nProject name: my-granite-infrastructure\nProject description: Granite app CDN infrastructure\nCreated project 'my-granite-infrastructure'\n\nstack name: dev\nCreated stack 'dev'\n\nThe package manager to use for installing dependencies: {Your package manager}\nThe AWS region to deploy into (aws:region): {Your AWS region}\nSaved config\n```\n\n> **✅ Success indicator:** You see \"Your new project is ready to go!\" message\n\n## 4. Install Granite Infrastructure Package\n\nAdd the Granite infrastructure components:\n\n::: code-group\n\n```sh [npm]\nnpm install @granite-js/pulumi-aws --save-dev\n```\n\n```sh [pnpm]\npnpm add @granite-js/pulumi-aws --save-dev\n```\n\n```sh [yarn]\nyarn add @granite-js/pulumi-aws --dev\n```\n\n:::\n\n## 5. Configure Your Infrastructure\n\nReplace the contents of `index.ts` with:\n\n```typescript\nimport * as pulumi from '@pulumi/pulumi';\nimport { ReactNativeBundleCDN } from '@granite-js/pulumi-aws';\n\nconst config = new pulumi.Config();\n\n// Create your Granite CDN infrastructure\nconst cdn = new ReactNativeBundleCDN('granite-cdn', {\n  bucketName: config.require('bucketName'),\n  region: config.require('region'),\n});\n\nexport const cdnUrl = cdn.cloudfrontDomain;\nexport const bucketName = cdn.bucketName;\n```\n\n## 6. Set Configuration Values\n\nConfigure your bucket name and region:\n\n```bash\n# Set your unique bucket name (must be globally unique)\npulumi config set bucketName {your-bucket-name}\n\n# Set your AWS region\npulumi config set region {your-region}\n```\n\n::: info\n\nBucket names must be globally unique.\n\n:::\n\n## 7. Deploy Your Infrastructure\n\nLet's proceed with creating your AWS infrastructure:\n\n```bash\npulumi up\n```\n\n::: warning When using Yarn Plug'n'Play (PnP)\nYou need to install pnpify and run the pulumi command as follows:\n\n```bash\nyarn add @yarnpkg/pnpify -D\nyarn pnpify pulumi up\n```\n\n:::\n\nPulumi will show you what it's going to create:\n\n```\nPreviewing update (dev)\n\nView Live: https://app.pulumi.com/yourname/my-granite-infrastructure/dev/previews/...\n\n     Type                              Name                              Plan\n +   pulumi:pulumi:Stack               my-granite-infrastructure-dev     create\n +   └─ {The infrastructure to create}\n\nResources:\n    + * to create\n\nDo you want to perform this update? yes\n```\n\nType `yes` and press Enter. Pulumi will create your infrastructure:\n\n```\nUpdating (dev)\n\nView Live: https://app.pulumi.com/yourname/my-granite-infrastructure/dev/updates/1\n\n     Type                              Name                              Status\n +   pulumi:pulumi:Stack               my-granite-infrastructure-dev     created\n +   └─ {The infrastructure to create}\n\nResources:\n    + * created\n\nDuration: {duration}\n```\n\n> **✅ Success indicator:** You see \"Resources: + \\* created\" and your CDN URL\n\n## 🎉 Congratulations!\n\nYou've successfully created your Granite infrastructure in AWS! Here's what you now have:\n\n- On-premise AWS infrastructure\n- Global CDN for fast app loading worldwide\n- Scalable architecture that grows with your users\n- Full control over your deployment pipeline\n\n## Clean Up (Optional)\n\nTo delete the deployed resources when they are no longer needed, run the following command:\n\n```bash\npulumi destroy\n```\n\nPulumi will show you what resources it will delete and ask for confirmation. Enter `yes` to delete all resources.\n\n## What's Next?\n\nNow that your infrastructure is set up:\n\n- [Deploy Your App](./deploy-your-app) - Learn how to deploy your Granite app to your AWS infrastructure\n"
  },
  {
    "path": "docs/index.md",
    "content": "---\n# https://vitepress.dev/reference/default-theme-home-page\nlayout: home\n\nhero:\n  name: 'Granite'\n  text: 'Enterprise-grade React Native Framework'\n  image:\n    src: /granite.png\n    alt: granite\n\n  actions:\n    - theme: brand\n      text: Quick Start\n      link: /guides/quick-start/create-your-app\n    - theme: alt\n      text: Introduction\n      link: /guides/introduction\n\nfeatures:\n  - icon: 🔌\n    title: Brownfield integration\n    details: Easily integrate React Native screens into your current iOS and Android apps.\n  - icon: 📦\n    title: Tiny bundles\n    details: Create tiny 200-300KB microservice bundles with bundle splitting and smart optimization.\n  - icon: 🚀\n    title: Fast JavaScript builds\n    details: Keep your JavaScript bundle build times down to just seconds using ESBuild.\n  - icon: 🌐\n    title: Full AWS setup\n    details: Complete infrastructure configuration with full deployment control.\n  - icon: ✅\n    title: Comprehensive end-to-end testing\n    details: Every feature comes with end-to-end tests included.\n  - icon: ⚡️\n    title: Fast native builds (WIP)\n    details: Keep your native build times quick with prebuilt frameworks.\n---\n"
  },
  {
    "path": "docs/ko/guides/comparison.md",
    "content": "# 기본 RN와의 비교\n\nGranite는 React Native를 기반으로 만들어졌지만, 기본 React Native 개발과 비교했을 때 다음과 같은 장점이 있어요.\n\n|                | Granite                                  | 기본 React Native               |\n| -------------- | ---------------------------------------- | ------------------------------- |\n| 아키텍처       | 마이크로서비스, 독립적으로 빌드하고 배포 | 모놀리식, 전체 앱을 하나로 빌드 |\n| 기존 앱과 통합 | 쉬움                                     | 어려움                          |\n| JS 빌드        | 몇 초 내외                               | 몇 분 이상                      |\n| 번들 크기      | 서비스당 200KB까지 축소 가능             | 1-5MB 이상                      |\n| 번들러         | ESBuild                                  | Metro                           |\n| OTA 업데이트   | 기본 내장                                | 외부 솔루션 필요                |\n| 네이티브 빌드  | 미리 빌드해서 빠름                       | 가장 처음부터 빌드해서 느림     |\n"
  },
  {
    "path": "docs/ko/guides/granite-router/layouts.md",
    "content": "<script setup>\n  import UsageSection from '../../../components/UsageSection.vue'\n</script>\n\n# 레이아웃 사용하기\n\n레이아웃을 사용하면 여러 페이지에서 공통으로 사용되는 UI 요소를 쉽게 관리할 수 있어요. 헤더, 네비게이션 바, 푸터와 같은 공통 컴포넌트를 레이아웃으로 구성하면 코드 중복을 줄이고 일관된 사용자 경험을 제공할 수 있어요.\n\n## 레이아웃 파일 만들기\n\n레이아웃은 `_layout.tsx` 파일을 생성해서 구현할 수 있어요. 이 파일의 위치에 따라 적용되는 범위가 달라져요.\n\n```tsx\nimport { PropsWithChildren } from 'react';\n\nexport default function Layout({ children }: PropsWithChildren) {\n  return <>{children}</>;\n}\n```\n\n## 레이아웃 적용 범위\n\n레이아웃은 파일 위치에 따라 다른 범위에 적용돼요.\n\n- `pages/_layout.tsx`: 모든 페이지에 적용\n- `pages/about/_layout.tsx`: `<scheme>://{서비스명}/about` 하위의 모든 페이지에 적용\n\n<UsageSection assetType=\"image\" assetPath=\"/usage/layout/nested-layout.png\">\n\n레이아웃은 중첩해서 사용할 수 있어요. 페이지에 여러 레이아웃이 적용될 때는 상위 디렉토리부터 순차적으로 적용돼요.\n\n```\npages/\n├── _layout.tsx          // 전역 레이아웃\n├── about/\n│   ├── _layout.tsx     // about 섹션 레이아웃\n│   ├── index.tsx       // about 메인 페이지\n│   └── team.tsx        // 팀 소개 페이지\n└── index.tsx           // 메인 페이지\n```\n\n예를 들어, 위와 같은 구조로 `_layout.tsx`가 구성되어 있을 때, `about/team.tsx` 페이지는 다음 순서로 레이아웃이 적용돼요.\n\n1. `pages/_layout.tsx` (최상위 레이아웃)\n2. `pages/about/_layout.tsx` (about 섹션 레이아웃)\n3. `pages/about/team.tsx` (실제 페이지 컴포넌트)\n\n이렇게 레이아웃을 중첩해서 사용하면 전역적으로 필요한 UI 요소와 특정 섹션에서만 필요한 UI 요소를 효과적으로 구성할 수 있어요.\n\n</UsageSection>\n\n## 레이아웃 예시\n\n### 전역 레이아웃\n\n모든 페이지에 적용되는 레이아웃을 만들어 보세요.\n\n::: code-group\n\n```tsx [pages/_layout.tsx]\nimport { PropsWithChildren } from 'react';\nimport { View } from 'react-native';\nimport { Header } from '../components/Header';\nimport { Footer } from '../components/Footer';\n\nexport default function Layout({ children }: PropsWithChildren) {\n  return (\n    <View style={{ flex: 1 }}>\n      <Header />\n      {children}\n      <Footer />\n    </View>\n  );\n}\n```\n\n```tsx [components/Header.tsx]\nimport { View, Text, StyleSheet } from 'react-native';\n\nexport function Header() {\n  return (\n    <View style={styles.header}>\n      <Text style={styles.title}>My App</Text>\n      <View style={styles.nav}>\n        <Text style={styles.navItem}>홈</Text>\n        <Text style={styles.navItem}>소개</Text>\n        <Text style={styles.navItem}>설정</Text>\n      </View>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  header: {\n    padding: 16,\n    backgroundColor: '#ffffff',\n    borderBottomWidth: 1,\n    borderBottomColor: '#e5e5e5',\n  },\n  title: {\n    fontSize: 24,\n    fontWeight: 'bold',\n    marginBottom: 8,\n  },\n  nav: {\n    flexDirection: 'row',\n    gap: 16,\n  },\n  navItem: {\n    fontSize: 16,\n    color: '#666666',\n  },\n});\n```\n\n```tsx [components/Footer.tsx]\nimport { View, Text, StyleSheet } from 'react-native';\n\nexport function Footer() {\n  return (\n    <View style={styles.footer}>\n      <Text style={styles.copyright}>© 2024 My App. All rights reserved.</Text>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  footer: {\n    padding: 16,\n    backgroundColor: '#f5f5f5',\n    alignItems: 'center',\n  },\n  copyright: {\n    fontSize: 14,\n    color: '#666666',\n  },\n});\n```\n\n:::\n\n### 섹션별 레이아웃\n\n특정 섹션에만 적용되는 레이아웃을 만들어 보세요.\n\n::: code-group\n\n```tsx [pages/about/_layout.tsx]\nimport { PropsWithChildren } from 'react';\nimport { View } from 'react-native';\nimport { AboutSidebar } from '../../components/AboutSidebar';\n\nexport default function AboutLayout({ children }: PropsWithChildren) {\n  return (\n    <View style={{ flexDirection: 'row' }}>\n      <AboutSidebar />\n      <View style={{ flex: 1 }}>{children}</View>\n    </View>\n  );\n}\n```\n\n```tsx [components/AboutSidebar.tsx]\nimport { View, Text, StyleSheet } from 'react-native';\n\nexport function AboutSidebar() {\n  return (\n    <View style={styles.sidebar}>\n      <Text style={styles.title}>About</Text>\n      <View style={styles.menu}>\n        <Text style={styles.menuItem}>회사 소개</Text>\n        <Text style={styles.menuItem}>팀 소개</Text>\n        <Text style={styles.menuItem}>연혁</Text>\n        <Text style={styles.menuItem}>오시는 길</Text>\n      </View>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  sidebar: {\n    width: 200,\n    padding: 16,\n    backgroundColor: '#f8f9fa',\n    borderRightWidth: 1,\n    borderRightColor: '#e5e5e5',\n  },\n  title: {\n    fontSize: 20,\n    fontWeight: 'bold',\n    marginBottom: 16,\n  },\n  menu: {\n    gap: 12,\n  },\n  menuItem: {\n    fontSize: 16,\n    color: '#495057',\n  },\n});\n```\n\n:::\n\n## 레이아웃에서 쿼리 파라미터 받아오기\n\n레이아웃에서 쿼리 파라미터를 받아오려면 `useParams` 훅을 사용할 수 있어요. `useParams`는 현재 화면의 파라미터를 읽어서 객체 형태로 반환해요.\n\n### `useParams` 훅 사용 예시\n\n다음은 `_layout.tsx` 파일에서 `useParams` 훅을 사용하는 예제예요. URL 쿼리 파라미터로 전달된 `title` 값을 기반으로 화면 상단에 제목을 동적으로 표시해요.\n\n::: code-group\n\n```tsx [pages/_layout.tsx]\nimport { useParams } from '@granite-js/react-native';\nimport { PropsWithChildren } from 'react';\nimport { View, Text } from 'react-native';\n\nexport default function Layout({ children }: PropsWithChildren) {\n  // 현재 화면의 파라미터를 가져와요.\n  const params = useParams({ strict: false });\n\n  // 'title' 파라미터를 가져오고 기본값을 설정해요.\n  const title = params?.title ?? '기본 제목';\n\n  return (\n    <View style={{ flex: 1 }}>\n      {/* 동적으로 생성된 헤더 */}\n      <View style={{ padding: 16, backgroundColor: '#f0f0f0' }}>\n        <Text style={{ fontSize: 20, fontWeight: 'bold' }}>{title}</Text>\n      </View>\n      {/* 자식 컴포넌트를 렌더링 */}\n      <View style={{ flex: 1 }}>{children}</View>\n    </View>\n  );\n}\n```\n\n:::\n\n## 레퍼런스\n\n- [화면 이동하기](/ko/guides/granite-router/routing)\n- [쿼리 파라미터 사용하기](/ko/guides/granite-router/params)\n"
  },
  {
    "path": "docs/ko/guides/granite-router/params.md",
    "content": "<script setup>\n  import UsageSection from '../../../components/UsageSection.vue'\n</script>\n\n# 화면 파라미터 정의하기\n\n애플리케이션이 [URL 스킴](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier)으로 실행될 때, 스킴에 포함된 [쿼리 스트링](https://en.wikipedia.org/wiki/Query_string) 값을 참조할 수 있어요. 스킴으로 애플리케이션을 실행할 때, 필요한 데이터를 전달하거나 특정 기능을 활성화할 수 있어요.\n\n## 파라미터로 데이터 전달하기\n\n애플리케이션을 실행할 때, URL에 데이터의 키-값 쌍을 파라미터 형태로 추가할 수 있어요.\n\n예를 들면 다음과 같은 형태에요.\n\n```\ngranite://{서비스 이름}?key1=value1&key2=value2\n```\n\n이 예시에서는 `test-app`이라는 이름의 애플리케이션을 실행하고, `name`과 `age` 데이터를 전달할 수 있어요.\n\n```\ngranite://test-app?name=tom&age=10\n```\n\n## 파라미터 값 가져오기\n\n`useParams` 훅을 사용하면 애플리케이션이 실행될 때 URL의 스트링 값을 쉽게 가져올 수 있어요. 이 훅은 `useParams` 메서드를 통해 특정 키에 해당하는 값을 반환해요.\n\n추가로 `validateParams` 옵션을 활용하면, 화면에서 필요한 파라미터를 정의하고 유효성을 검사할 수 있어요. 아래 예제를 참고하세요.\n\n```tsx\nimport { createRoute } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\n// 루트 경로('/')에 해당하는 화면 정의\nexport const Route = createRoute('/', {\n  component: Index,\n  validateParams: (params) => ({\n    // 'name' 키를 필수로 설정하고 타입을 문자열로 변환해요.\n    name: params.name as string,\n    // 'age' 키를 필수로 설정하고 타입을 숫자로 변환해요.\n    age: params.age as number,\n  }),\n});\n\nfunction Index() {\n  // 'name' 키에 해당하는 스트링 값을 가져옵니다.\n  const { name, age } = Route.useParams();\n\n  // 또는 다음과 같이 특정 경로에서 값을 가져올 수도 있습니다.\n  // const { name, age } = useParams({ from: \"/\" });\n\n  return (\n    <View>\n      <Text>이름: {name}</Text>\n      <Text>나이: {age}</Text>\n    </View>\n  );\n}\n```\n\n## 파라미터 유효성 검증하기\n\n<UsageSection assetType=\"image\" assetPath=\"/usage/query-param/query-param-required.png\">\n\n필수로 포함해야 하는 파라미터는 `validateParams` 옵션을 사용해서 유효성을 검사할 수 있어요.\n\n예를 들어, 아래 예시 코드는 `name` 파라미터가 없으면 에러를 발생시켜요.\n\n그래서 필수 파라미터가 누락되지 않도록 `validateParams` 옵션을 사용해요.\n\n::: code-group\n\n```tsx [vanilla]\nimport { createRoute } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\nexport const Route = createRoute('/', {\n  component: Index,\n  validateParams: (params) => {\n    if (!('name' in params)) {\n      throw Error('name is required');\n    }\n    if (typeof params.name !== 'string') {\n      throw Error('name must be a string');\n    }\n\n    if (!('age' in params)) {\n      throw Error('age is required');\n    }\n    if (typeof params.age !== 'number') {\n      throw Error('age must be a number');\n    }\n\n    return params as {\n      name: string;\n      age: number;\n    };\n  },\n});\n\nfunction Index() {\n  const { name, age } = Route.useParams();\n\n  return (\n    <View>\n      <Text>이름: {name}</Text>\n      <Text>나이: {age}</Text>\n    </View>\n  );\n}\n```\n\n```tsx [valibot]\nimport { createRoute } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\nimport * as v from 'valibot';\n\nexport const Route = createRoute('/', {\n  component: Index,\n  validateParams: v.object({\n    name: v.string(),\n    age: v.number(),\n  }),\n});\n\nfunction Index() {\n  const { name, age } = Route.useParams();\n\n  return (\n    <View>\n      <Text>이름: {name}</Text>\n      <Text>나이: {age}</Text>\n    </View>\n  );\n}\n```\n\n```tsx [zod]\nimport { createRoute } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\nimport { z } from 'zod';\n\nexport const Route = createRoute('/', {\n  component: Index,\n  validateParams: z.object({\n    name: z.string(),\n    age: z.number(),\n  }),\n});\n\nfunction Index() {\n  const { name, age } = Route.useParams();\n\n  return (\n    <View>\n      <Text>이름: {name}</Text>\n      <Text>나이: {age}</Text>\n    </View>\n  );\n}\n```\n\n:::\n\n</UsageSection>\n\n## 고급 검증 기능\n\n검증 라이브러리는 검증 에러를 처리하고 값을 변환하는 강력한 기능을 제공해요.\n\n::: code-group\n\n```tsx [valibot]\nimport { createRoute } from '@granite-js/react-native';\nimport * as v from 'valibot';\n\n// v.fallback()으로 에러 안전성 확보\nexport const Route = createRoute('/profile', {\n  component: Profile,\n  validateParams: v.object({\n    name: v.fallback(v.string(), 'Anonymous'),\n    age: v.fallback(v.number(), 0),\n    isActive: v.fallback(v.boolean(), true),\n  }),\n});\n```\n\n```tsx [valibot - optional]\nimport { createRoute } from '@granite-js/react-native';\nimport * as v from 'valibot';\n\n// v.optional()로 기본값 설정\nexport const Route = createRoute('/settings', {\n  component: Settings,\n  validateParams: v.object({\n    theme: v.optional(v.picklist(['light', 'dark']), 'light'),\n    animation: v.optional(v.boolean(), true),\n    fontSize: v.optional(v.number(), 16),\n  }),\n});\n```\n\n```tsx [valibot - transform]\nimport { createRoute } from '@granite-js/react-native';\nimport * as v from 'valibot';\n\n// v.transform()으로 타입 변환\nexport const Route = createRoute('/user', {\n  component: User,\n  validateParams: v.object({\n    // 문자열을 숫자로 변환\n    id: v.pipe(\n      v.string(),\n      v.transform((v) => parseInt(v))\n    ),\n    // ISO 문자열을 Date 객체로 변환\n    createdAt: v.pipe(\n      v.string(),\n      v.transform((v) => new Date(v))\n    ),\n  }),\n});\n```\n\n```tsx [zod]\nimport { createRoute } from '@granite-js/react-native';\nimport { z } from 'zod';\n\n// .catch()로 에러 안전성 확보\nexport const Route = createRoute('/profile', {\n  component: Profile,\n  validateParams: z.object({\n    name: z.string().catch('Anonymous'),\n    age: z.number().catch(0),\n    isActive: z.boolean().catch(true),\n  }),\n});\n```\n\n```tsx [zod - default]\nimport { createRoute } from '@granite-js/react-native';\nimport { z } from 'zod';\n\n// .default()로 기본값 설정\nexport const Route = createRoute('/settings', {\n  component: Settings,\n  validateParams: z.object({\n    theme: z.enum(['light', 'dark']).default('light'),\n    animation: z.boolean().default(true),\n    fontSize: z.number().default(16),\n  }),\n});\n```\n\n```tsx [zod - transform]\nimport { createRoute } from '@granite-js/react-native';\nimport { z } from 'zod';\n\n// .transform()으로 타입 변환\nexport const Route = createRoute('/user', {\n  component: User,\n  validateParams: z.object({\n    // 문자열을 숫자로 변환\n    id: z.string().transform((v) => parseInt(v)),\n    // ISO 문자열을 Date 객체로 변환\n    createdAt: z.string().transform((v) => new Date(v)),\n  }),\n});\n\nfunction User() {\n  const params = Route.useParams();\n  // params.id는 number 타입 (string이 아님)\n  // params.createdAt은 Date 객체\n}\n```\n\n:::\n\n## 파라미터 값 변환하기\n\n`createRoute.parserParams` 옵션을 사용하면 스트링으로 전달된 `string` 값을 원하는 타입으로 변환할 수 있어요.  \n기본적으로 `useParams`는 숫자, 문자열, 배열, 객체 같은 대부분의 단순 타입은 자동으로 변환하기 때문에 파서를 직접 재정의해야 할 일은 많지 않아요.  \n하지만 복잡한 데이터 구조를 사용해야 할 때나 특정한 params를 지우고 싶을 때는 파서를 직접 정의해서 원하는 타입으로 변환할 수 있어요.\n\n`parserParams` 옵션의 결과가 `validateParams` 옵션에 전달되기 전에 변환됩니다.\n\n### 기본 파서를 사용한 타입 변환\n\n기본 파서를 활용하면 스트링 값이 자동으로 적절한 타입으로 변환돼요. 아래 예제는 파라미터를 타입에 맞게 변환하는 방법을 보여줘요.\n\n```tsx\nimport { createRoute } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\n// URL 예시: granite://test-app?name=tom&age=10&arr=1,2,3&obj={\"name\":\"jane\",\"age\":20}\nexport const Route = createRoute('/', {\n  component: Index,\n  validateParams: (params) => ({\n    // 기본 파서로 인해 파라미터 값을 올바른 타입으로 자동으로 변환\n    name: params.name as string, // 문자열로 변환\n    age: params.age as number, // 숫자로 변환\n    arr: params.arr as string[], // 배열로 변환\n    obj: params.obj as { name: string; age: number }, // 객체로 변환\n  }),\n});\n\nfunction Index() {\n  const { name, age, arr, obj } = Route.useParams();\n\n  return (\n    <View>\n      <Text>\n        이름: {name}, 타입: {typeof name}\n      </Text>\n      <Text>\n        나이: {age}, 타입: {typeof age}\n      </Text>\n      <Text>\n        배열: {JSON.stringify(arr)}, 타입: {typeof arr}\n      </Text>\n      <Text>\n        객체: {JSON.stringify(obj)}, 타입: {typeof obj}\n      </Text>\n    </View>\n  );\n}\n```\n\n### 파서 재정의\n\n`parserParams` 옵션을 사용하면 기본 파서로 처리하기 어려운 query parameter를 변환하는 함수를 직접 정의해서 사용할 수 있어요. 예를 들어, 특정 파라미터(`referer`)를 제거하고 나머지 파라미터를 기본 파서로 처리하는 방법을 아래 코드에서 보여줘요.\n\n```tsx\nimport { createRoute, defaultParserParams } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\n// URL 예시: granite://test-app?name=tom&age=10&referer=https://google.com\nexport const Route = createRoute('/', {\n  component: Index,\n\n  // 특정 파라미터를 제거하고 나머지를 기본 파서로 처리 // [!code highlight:5]\n  parserParams: (params) => {\n    const { referer, ...rest } = params;\n    return defaultParserParams(rest);\n  },\n\n  validateParams: (params) => {\n    // [!code highlight:11]\n    // 여기서 `params`는 parserParams 함수에서 변환된 값이에요.\n    // 즉, `referer`는 이미 제거된 상태로 전달돼요.\n    return {\n      name: params.name,\n      age: params.age,\n    } as {\n      name: string;\n      age: number;\n    };\n  },\n});\n\n// 컴포넌트에서 파라미터 사용\nfunction Index() {\n  const { name, age } = Route.useParams();\n\n  return (\n    <View>\n      <Text>\n        이름: {name}, 타입: {typeof name}\n      </Text>\n      <Text>\n        나이: {age}, 타입: {typeof age}\n      </Text>\n    </View>\n  );\n}\n```\n\n::: warning 중복된 파라미터 주의사항\n만약 같은 이름의 파라미터가 여러 번 사용되면, 해당 값은 배열로 반환돼요. 예를 들어, `age` 파라미터가 두 번 포함되면 다음과 같이 처리돼요.\n\n```js\n// 스킴: `granite://test-app?name=tom&age=10&age=20`\nconst params = useParams({\n  from: \"/\",\n});\n\n// params\n{ name: 'tom', age: [10, 20] }\n```\n\n:::\n\n## 레퍼런스\n\n- [useParams](/ko/reference/react-native/screen-control/useParams)\n"
  },
  {
    "path": "docs/ko/guides/granite-router/plugin-router.md",
    "content": "# 라우터 플러그인\n\nGranite Router는 파일 기반 라우팅을 지원하고, 경로별 타입이 자동으로 지정되는 타입-세이프 라우터예요. `pages/` 디렉토리에 파일을 추가하는 것만으로 화면을 만들 수 있어요.\n\n페이지를 쉽게 생성하고 관리하려면 아래와 같이 플러그인을 설치하세요.\n\n::: code-group\n\n```sh [npm]\n$ npm install @granite-js/plugin-router --save-dev\n```\n\n```sh [pnpm]\n$ pnpm add @granite-js/plugin-router --save-dev\n```\n\n```sh [yarn]\n$ yarn add @granite-js/plugin-router --dev\n```\n\n:::\n\n다음은 router 플러그인을 `granite.config.ts` 설정에 추가하는 예시예요. 이 플러그인은 `pages/` 폴더를 기반으로 경로(route)를 자동으로 만들어줘요.\n\n```ts\nimport { env } from '@granite-js/plugin-env';\nimport { hermes } from '@granite-js/plugin-hermes';\nimport { router } from '@granite-js/plugin-router';\nimport { defineConfig } from '@granite-js/react-native/config';\n\nexport default defineConfig({\n  /**\n   * granite://example\n   */\n  scheme: 'granite',\n  appName: 'example',\n  plugins: [\n    router(), // [!code highlight]\n  ],\n});\n```\n\n## 개발 모드\n\n개발 모드에서는 페이지 파일을 새로 만들면 자동으로 화면 구성 코드와 타입 정의가 생성돼요.\n\n::: code-group\n\n```sh [npm]\n$ npx granite dev\n```\n\n```sh [pnpm]\n$ pnpm granite dev\n```\n\n```sh [yarn]\n$ yarn granite dev\n```\n\n:::\n\n예를 들어, `pages/page-a.tsx` 파일을 추가하면 다음과 같은 화면 컴포넌트와 라우팅 코드가 자동으로 생성돼요.\n\n```tsx\nimport React from 'react';\nimport { Text, View } from 'react-native';\nimport { createRoute } from '@granite-js/react-native';\n\nexport const Route = createRoute('/page-a', {\n  validateParams: (params) => params,\n  component: PageA,\n});\n\nfunction PageA() {\n  return (\n    <View>\n      <Text>Hello PageA</Text>\n    </View>\n  );\n}\n```\n\n이 페이지는 `granite://example/page-a` 경로로 접근할 수 있어요.\n\n## 자동 생성된 타입 정의\n\nGranite는 라우팅 경로에 대해 타입도 자동으로 정의해줘요. 덕분에 라우팅을 할 때 경로와 파라미터가 잘못되면 에러를 발생시켜요.\n\n```tsx\n// src/router.gen.ts\n\n/* eslint-disable */\n// This file is auto-generated by @granite-js/react-native. DO NOT EDIT.\nimport { Route as _PageARoute } from '../pages/page-a';\nimport { Route as _PageBRoute } from '../pages/page-b';\nimport { Route as _PageCRoute } from '../pages/page-c';\n\ndeclare module '@granite-js/react-native' {\n  interface RegisterScreenInput {\n    '/page-a': (typeof _PageARoute)['_inputType'];\n    '/page-b': (typeof _PageBRoute)['_inputType'];\n    '/page-c': (typeof _PageCRoute)['_inputType'];\n  }\n\n  interface RegisterScreen {\n    '/page-a': (typeof _PageARoute)['_outputType'];\n    '/page-b': (typeof _PageBRoute)['_outputType'];\n    '/page-c': (typeof _PageCRoute)['_outputType'];\n  }\n}\n```\n\n이렇게 자동 생성된 타입 정의를 사용하면 라우팅이 안전하고, 실수를 줄일 수 있어요.\n"
  },
  {
    "path": "docs/ko/guides/granite-router/routing.md",
    "content": "<script setup>\n  import UsageSection from '../../../components/UsageSection.vue'\n</script>\n\n# 화면 이동하기\n\nGranite Router는 애플리케이션에서 새로운 화면으로 이동하거나, 화면 히스토리를 제어하는 등의 라우팅 작업을 쉽게 처리할 수 있어요.\n\n아래 예제 코드를 통해 다양한 라우팅 기능을 설명할게요.\n\n::: info\nGranite Route는 [React Navigation](https://reactnavigation.org/)을 기반으로 동작해요\n:::\n\n## 예제 코드\n\n예제 코드는 총 3개의 페이지로 구성되어 있고, 구조는 아래와 같아요.\n\n```\nroot\n├─── pages\n│    ├─── page-a.tsx\n│    ├─── page-b.tsx\n│    └─── page-c.tsx\n└─── src\n     └─── ...\n```\n\n::: details `page-a.tsx` 소스코드\n\n```tsx\n// page-a.tsx\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\nimport { createRoute, useNavigation } from '@granite-js/react-native';\n\nexport const Route = createRoute('/page-a', {\n  validateParams: (params) => params,\n  component: PageA,\n});\n\nfunction PageA() {\n  const navigation = useNavigation();\n\n  const handlePress = () => {\n    navigation.navigate('/page-b');\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#3182f6' }]}>\n      <Text style={styles.text}>Page A</Text>\n      <Pressable onPress={handlePress}>\n        <Text style={styles.buttonLabel}>B 페이지로 이동하기</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n:::\n\n::: details `page-b.tsx` 소스코드\n\n```tsx\n// page-b.tsx\nimport { createRoute, useNavigation } from '@granite-js/react-native';\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\n\nexport const Route = createRoute('/page-b', {\n  validateParams: (params) => params,\n  component: PageB,\n});\n\nfunction PageB() {\n  const navigation = useNavigation();\n\n  // 이전 화면으로 돌아가는 함수예요.\n  const handlePressBackButton = () => {\n    if (navigation.canGoBack()) {\n      navigation.goBack();\n    } else {\n      console.warn('이전 화면으로 이동할 수 없습니다.');\n    }\n  };\n\n  const handlePressNextButton = () => {\n    navigation.navigate('/page-c', {\n      message: '안녕!',\n      date: new Date().getTime(),\n    });\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#fe9800' }]}>\n      <Text style={styles.text}>Page B</Text>\n      <Pressable onPress={handlePressBackButton}>\n        <Text style={styles.buttonLabel}>이전으로 이동하기</Text>\n      </Pressable>\n      <Pressable onPress={handlePressNextButton}>\n        <Text style={styles.buttonLabel}>C 페이지로 이동하기</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n:::\n\n::: details `page-c.tsx` 소스코드\n\n```tsx\n// page-c.tsx\nimport { createRoute, useNavigation } from '@granite-js/react-native';\nimport { CommonActions } from '@granite-js/react-native/native/@react-navigation/native';\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\n\nexport const Route = createRoute('/page-c', {\n  validateParams: (params) => params as { message: string; date: number },\n  component: PageC,\n});\n\nfunction PageC() {\n  const navigation = useNavigation();\n  const params = Route.useParams();\n\n  const handlePressHomeButton = () => {\n    navigation.dispatch((state) => {\n      return CommonActions.reset({\n        ...state,\n        index: 0,\n        routes: state.routes.filter((route) => route.name === '/page-a'),\n      });\n    });\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#f04452' }]}>\n      <Text style={styles.text}>{params.message}</Text>\n      <Text style={styles.text}>{params.date}</Text>\n      <View style={styles.line} />\n      <Text style={styles.text}>Page C</Text>\n      <Pressable onPress={handlePressHomeButton}>\n        <Text style={styles.buttonLabel}>처음으로 이동하기</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n:::\n\n## 페이지 A: 화면 이동하기\n\n<UsageSection assetType=\"image\" assetPath=\"/usage/navigation/navigate-1.gif\">\n\n[`useNavigation`](https://reactnavigation.org/docs/use-navigation)은 화면 간 이동을 처리할 때 사용해요. [`navigate`](https://reactnavigation.org/docs/navigation-actions/#navigate) 메서드로 이동할 화면의 경로와 필요한 데이터를 함께 전달할 수 있어요.\n\n```tsx\n// page-a.tsx\nimport { createRoute, useNavigation } from '@granite-js/react-native';\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\n\nexport const Route = createRoute('/page-a', {\n  validateParams: (params) => params,\n  component: PageA,\n});\n\nfunction PageA() {\n  const navigation = useNavigation();\n\n  const handlePress = () => {\n    navigation.navigate('/page-b');\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#3182f6' }]}>\n      <Text style={styles.text}>Page A</Text>\n      <Pressable onPress={handlePress}>\n        <Text style={styles.buttonLabel}>B 페이지로 이동하기</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n### 주요 포인트\n\n- `useNavigation` 훅을 사용해 `navigation` 객체를 가져와요.\n- `navigation.navigate('/page-b')`를 호출하면 'B' 페이지로 이동해요.\n\n</UsageSection>\n\n## 페이지 B: 이전 화면으로 돌아가기\n\n<UsageSection assetType=\"image\" assetPath=\"/usage/navigation/navigate-2.gif\">\n\n[`goBack`](https://reactnavigation.org/docs/navigation-actions/#goback) 메서드를 사용하면 이전 화면으로 돌아갈 수 있어요. 하지만 이전 화면 기록이 없는 경우에는 에러가 발생할 수 있으니, [`canGoBack`](https://reactnavigation.org/docs/navigation-object/#cangoback)으로 먼저 확인해야 해요.\n\n```tsx\n// page-b.tsx\nimport { createRoute, useNavigation } from '@granite-js/react-native';\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\n\nexport const Route = createRoute('/page-b', {\n  validateParams: (params) => params,\n  component: PageB,\n});\n\nfunction PageB() {\n  const navigation = useNavigation();\n\n  // 이전 화면으로 돌아가는 함수예요.\n  const handlePressBackButton = () => {\n    if (navigation.canGoBack()) {\n      navigation.goBack();\n    } else {\n      console.warn('이전 화면으로 이동할 수 없습니다.');\n    }\n  };\n\n  const handlePressNextButton = () => {\n    navigation.navigate('/page-c', {\n      message: '안녕!',\n      date: new Date().getTime(),\n    });\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#fe9800' }]}>\n      <Text style={styles.text}>Page B</Text>\n      <Pressable onPress={handlePressBackButton}>\n        <Text style={styles.buttonLabel}>이전으로 이동하기</Text>\n      </Pressable>\n      <Pressable onPress={handlePressNextButton}>\n        <Text style={styles.buttonLabel}>C 페이지로 이동하기</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n### 주요 포인트\n\n- `canGoBack()`으로 이전 화면이 있는지 확인하고, 있으면 `goBack()`을 호출해요.\n- `navigate('/page-c', { message: '안녕!', date: new Date().getTime() })`로 데이터를 전달하면서 'C' 페이지로 이동해요.\n\n</UsageSection>\n\n## 페이지 C: 전달받은 데이터 사용하기\n\n<UsageSection assetType=\"image\" assetPath=\"/usage/navigation/navigate-3.png\">\n\n`Route.useParams` 훅은 다른 화면에서 전달된 데이터를 가져올 때 사용해요.\n\n이때, `createRoute.validateParams` 옵션을 설정하면 전달된 데이터를 타입 검증(Type-Safe)하면서 접근할 수 있어요. 이를 통해 잘못된 데이터 형식으로 인한 에러를 방지할 수 있어요.\n\n```tsx\n// page-c.tsx\nimport { createRoute, useNavigation } from '@granite-js/react-native';\nimport { CommonActions } from '@granite-js/react-native';\nimport { StyleSheet, View, Text, Pressable } from 'react-native';\n\nexport const Route = createRoute('/page-c', {\n  validateParams: (params) => params as { message: string; date: number },\n  component: PageC,\n});\n\nfunction PageC() {\n  const navigation = useNavigation();\n  const params = Route.useParams();\n\n  const handlePressHomeButton = () => {\n    navigation.dispatch((state) => {\n      return CommonActions.reset({\n        ...state,\n        index: 0,\n        routes: state.routes.filter((route) => route.name === '/page-a'),\n      });\n    });\n  };\n\n  return (\n    <View style={[styles.container, { backgroundColor: '#f04452' }]}>\n      <Text style={styles.text}>{params.message}</Text>\n      <Text style={styles.text}>{params.date}</Text>\n      <View style={styles.line} />\n      <Text style={styles.text}>Page C</Text>\n      <Pressable onPress={handlePressHomeButton}>\n        <Text style={styles.buttonLabel}>처음으로 이동하기</Text>\n      </Pressable>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    gap: 16,\n    padding: 16,\n  },\n  text: {\n    color: 'white',\n    fontSize: 24,\n  },\n  buttonLabel: {\n    color: 'white',\n  },\n});\n```\n\n### 주요 포인트\n\n- `Route.useParams` 훅을 사용하면 URL에서 전달된 데이터(매개변수)에 접근할 수 있어요.\n- `createRoute.validateParams` 옵션을 설정하면 데이터 타입을 검증하면서(Type-Safe) 안전하게 사용할 수 있어요.\n\n</UsageSection>\n\n## 화면 파라미터 타입 정의하기\n\n페이지마다 아래와 같은 Route 컴포넌트를 정의해요.\n여기서 `validateParams` 옵션은 해당 화면에서 받을 파라미터의 타입을 정의해요.\n\n```tsx\nexport const Route = createRoute('/page-c', {\n  validateParams: (params) => params as { message: string; date: number },\n  component: PageC,\n});\n```\n\n위 코드에서 `validateParams`는 `message`와 `date`라는 두 필드를 포함한 매개변수를 타입으로 정의해요.\n\n이를 통해 다른 코드에서 `useNavigate`나 `useParams`를 사용할 때, 타입 검사를 통해 필요한 경로와 전달해야 할 데이터를 명확히 알 수 있어요. 이렇게 하면 코드의 안전성과 가독성이 높아져요.\n\n## 라우팅 상태 초기화하기\n\n![navigate-state-1](/usage/navigation/navigate-flow.png)\n\n페이지 A → 페이지 B → 페이지 C 순서로 이동한 직후의 상태는 아래와 그림과 같이 같이 나타낼 수 있어요.\n\n<div align=\"center\">\n\n![navigate-state-1](/usage/navigation/navigate-state-1.png)\n\n</div>\n\n페이지 A, 페이지 B, 페이지 C가 순서대로 `routes` 기록에 남아 있고, `index` 값은 마지막으로 이동한 페이지 C의 위치인 2를 가리켜요.\n\n`reset`을 사용하면 화면 이동 기록을 초기화할 수 있어요. 예를 들어, '페이지 A → B → C'로 이동한 후에 '페이지 A'로 돌아가면서 B와 C 기록을 삭제하고 싶다면, [`CommonActions.reset`](https://reactnavigation.org/docs/navigation-actions/#reset)을 사용해요.\n\n```tsx\nnavigation.dispatch(\n  CommonActions.reset({\n    index: 0,\n    routes: [{ name: '/page-a' }],\n  })\n);\n```\n\n<div align=\"center\">\n\n![navigate-state-2](/usage/navigation/navigate-state-2.png)\n\n</div>\n\n### 주요 포인트\n\n- `CommonActions.reset`으로 특정 화면만 기록에 남기고 나머지 화면 기록을 삭제할 수 있어요.\n\n## 레퍼런스\n\n- [React Navigation 공식 문서](https://reactnavigation.org/)\n\n이렇게 React Navigation을 사용하면 화면 간 이동을 쉽게 처리할 수 있고, 데이터를 전달하거나 기록을 조작하는 기능을 통해 다양한 UX를 구현할 수 있어요. 또한 타입스크립트와 함께 사용하면 안전하고 견고한 코드를 작성할 수 있답니다.\n"
  },
  {
    "path": "docs/ko/guides/introduction.md",
    "content": "# Granite\n\nGranite은 기존 iOS/Android 앱과 쉽게 통합할 수 있고, 200KB 내외의 JavaScript 번들 크기, AWS 인프라 지원을 제공하는 엔터프라이즈 레벨 React Native 프레임워크예요.\n\n## 주요 기능\n\n- **기존 앱에 통합** - 네이티브로 만들어진 iOS와 Android 앱에 React Native 화면을 쉽게 통합할 수 있어요.\n- **작은 번들 크기** - 번들을 분할하고 최적화해서 200KB의 작은 마이크로서비스 번들을 생성해요.\n- **빠른 빌드** - ESBuild를 사용하여 JavaScript 번들을 수 초 이내에 빌드할 수 있어요.\n- **AWS 인프라 지원** - 스스로 운영하는 AWS 위에 손쉽게 인프라를 구성하고 배포할 수 있어요.\n- **원클릭 인프라 생성** - CLI 명령어 하나로 CDN과 인프라를 설정할 수 있습니다.\n- **간단한 기본 설정** - React Native에서 좋은 기본값으로만 구성된 설정을 제공하여, 서비스 개발에만 집중할 수 있어요.\n- **종합적인 E2E 테스트** - 모든 기능에 대한 E2E 테스트가 포함되어 있어요.\n- **빠른 네이티브 빌드** - 미리 빌드된 프레임워크로 네이티브 빌드 시간을 단축할 수 있어요. (작업 중)\n"
  },
  {
    "path": "docs/ko/guides/miscellaneous/install-native-app.md",
    "content": "# 테스트 앱 설치하기\n\nGranite 테스트 앱은 배포한 번들을 테스트할 수 있는 앱이에요. 이 문서에서는 iOS 시뮬레이터와 안드로이드 기기에서 Granite 테스트 앱을 설치하고 초기 설정하는 방법을 안내해요.\n\n## <span style=\"display:inline-flex; align-items:center; gap:5px;\"><img src=\"/icons/apple.svg\" alt=\"Apple iOS\" width=\"24\" height=\"24\" style=\"margin-top:-4px\"> iOS 시뮬레이터 설치 가이드 </span>\n\niOS에서 React Native 앱을 테스트하려면 시뮬레이터가 필요해요. 시뮬레이터는 macOS에서 `Xcode`를 설치하면 함께 제공돼요.\n\n아래 가이드를 따라 앱을 설치하세요.\n\n### 준비물\n\n- macOS\n- Xcode (App Store에서 설치 가능해요)\n\n### 설치 방법\n\n1. GitHub 릴리스 페이지에서 Granite iOS 앱 번들을 다운로드해요.  \n   **[모든 릴리스 보기](https://github.com/toss/granite/releases)**\n   - 안정적인 버전을 사용하려면 `Pre-release` 표시나 `alpha`, `beta`, `rc`가 없는 버전을 선택해요.\n   - 최신 기능을 테스트하려면 `Pre-release` 버전을 사용할 수 있어요.\n   - `Assets` 섹션에서 `granite_ios.zip` 파일을 다운로드해요.\n\n2. 다운로드한 `granite_ios.zip` 파일의 압축을 풀어요.\n\n3. `.app` 파일을 `Xcode`의 iOS 시뮬레이터 창으로 드래그해서 설치해요.  \n   드래그앤드롭하면 시뮬레이터에 앱이 복사돼요.\n\n## <span style=\"display:inline-flex; align-items:center; gap:5px;\"><img src=\"/icons/android.svg\" alt=\"Android\" width=\"24\" height=\"24\" style=\"margin-top:-2px\"> 안드로이드 설치 가이드 </span>\n\n### 준비물\n\n- Android 기기 또는 에뮬레이터\n- ADB(Android Debug Bridge) 설치 (Android Studio 설치 시 함께 제공돼요)\n\n### 설치 방법\n\n1. GitHub 릴리스 페이지에서 Granite Android APK를 다운로드해요.  \n   **[모든 릴리스 보기](https://github.com/toss/granite/releases)**\n   - 안정적인 버전을 사용하려면 `Pre-release` 표시나 `alpha`, `beta`, `rc`가 없는 버전을 선택해요.\n   - 최신 기능을 테스트하려면 `Pre-release` 버전을 사용할 수 있어요.\n   - `Assets` 섹션에서 `granite_android.zip` 파일을 다운로드해요.\n\n2. 다운로드한 `granite_android.zip` 파일의 압축을 풀어요.\n\n3. 설치 방법 중 하나를 선택해요.\n\n#### ADB 명령어로 설치\n\n- 컴퓨터에 안드로이드 기기를 연결한 뒤, 터미널에서 아래 명령어를 실행해요.\n  ```bash\n  adb install granite_android.apk\n  ```\n\n#### 기기에서 직접 설치\n\n1. 다운로드한 APK 파일을 안드로이드 기기로 복사해요.\n2. 기기에서 파일 탐색기를 열고 APK 파일을 눌러 설치해요.  \n   보안 설정에서 '알 수 없는 앱 설치 허용'이 필요할 수 있어요.\n\n## 초기 설정\n\n앱을 처음 실행하면 번들을 불러올 CDN 주소와 딥링크 스킴(scheme)을 입력해야 해요. Granite에서는 테스트용으로 사용할 수 있는 값들을 제공해요.\n\n| 설정 항목      | 값                                            | 설명                                             |\n| -------------- | --------------------------------------------- | ------------------------------------------------ |\n| **Host**       | `https://d2dzky5bdhec40.cloudfront.net`       | 체험용 번들 CDN 주소예요. 테스트용으로 제공돼요. |\n| **URL Scheme** | `granite://showcase` <br> `granite://counter` | 앱에서 딥링크를 처리할 때 사용하는 스킴이에요.   |\n\n위 값을 Granite 테스트 설정에 입력해서 앱을 실행해보세요.\n\n| iOS                                                                                                                                                                                                            | Android                                                                                                                                                                                                            |\n| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| <video autoplay loop muted style=\"max-width:400px; width:100%; height:auto; margin-top:1rem;\"> <source src=\"/videos/ios_showcase.mp4\" type=\"video/mp4\" /> 브라우저가 비디오 태그를 지원하지 않습니다. </video> | <video autoplay loop muted style=\"max-width:400px; width:100%; height:auto; margin-top:1rem;\"> <source src=\"/videos/android_showcase.mov\" type=\"video/mp4\" /> 브라우저가 비디오 태그를 지원하지 않습니다. </video> |\n"
  },
  {
    "path": "docs/ko/guides/quick-start/create-your-app.md",
    "content": "# Granite 시작하기\n\n10분 안에 첫 엔터프라이즈급 React Native 마이크로서비스 앱을 만들어보세요.\n\n## 준비물\n\n시작하기 전에 다음 도구들이 설치되어 있는지 확인하세요.\n\n- **Node.js LTS** (22.12.0 권장) - [다운로드](https://nodejs.org/)\n- **Xcode** (iOS 테스트용) - Mac App Store에서 설치 가능\n- **Android Studio** (Android 테스트용) - [다운로드](https://developer.android.com/studio)\n- **Granite 테스트 앱** - iOS 시뮬레이터나 Android 에뮬레이터에 설치 ([설치 가이드](../miscellaneous/install-native-app))\n\n## 1. Granite 프로젝트 생성\n\n터미널을 열고 Granite 프로젝트를 만드는 명령어를 실행하세요.\n\n::: code-group\n\n```sh [npm]\nnpx create-granite-app@latest\n```\n\n```sh [pnpm]\npnpm create granite-app\n```\n\n```sh [yarn]\nyarn create granite-app\n```\n\n:::\n\nCLI의 질문에 답하면 Granite 프로젝트가 생성돼요.\n\n```sh\n$ npx create-granite-app@latest\n\n┌  Create Granite App Project\n│\n◆  Project Setup\n◇  Project name or path:\n│  my-granite-app\n│\n◇  Select development tools:\n│  ◻ ESLint + Prettier (recommended)\n│  ◻ Biome\n│\n◇  ✅ Created Granite App successfully!\n│\n◇  Next steps ─────────────╮\n│                          │\n│  cd my-granite-app       │\n│  npm install             │\n│  npm run dev             │\n│                          │\n├──────────────────────────╯\n│\n└  🎉 Done! Your Granite app is ready.\n```\n\n이렇게 하면 프로젝트 이름으로 새 디렉토리가 생성되고 기본적인 Granite 앱 구조가 생겨요.\n\n## 2. 의존성 설치\n\n새로 생긴 프로젝트 디렉토리로 이동해서 의존성을 설치하세요.\n\n```sh\ncd my-granite-app\n```\n\n::: code-group\n\n```sh [npm]\nnpm install\n```\n\n```sh [pnpm]\npnpm install\n```\n\n```sh [yarn]\nyarn install\n```\n\n:::\n\n## 3. 프로젝트 구조 이해하기\n\nGranite 프로젝트는 다음과 같은 구조를 가지고 있어요.\n\n```\nmy-granite-app/\n├── pages/                  # 마이크로서비스 화면들\n│   ├── _404.tsx            # 404 에러 페이지\n│   └── index.tsx           # 홈 화면\n│\n├── src/                    # 소스 코드\n│   ├── _app.tsx            # 마이크로서비스 진입점\n│   └── router.gen.ts       # 타입 안전한 라우팅을 위해 자동 생성된 코드\n│\n├── granite.config.ts       # Granite 설정\n├── react-native.config.js  # React Native 설정\n└── require.context.ts      # 자동 생성된 라우팅 컨텍스트\n```\n\nGranite 프로젝트의 중요한 디렉토리와 파일은 다음과 같아요.\n\n- **'pages/'** - 각 파일이 앱의 화면이 돼요\n- **'granite.config.ts'** - Granite 앱 설정 ([참고](../../reference/react-native/config/defineConfig))\n- **'src/\\_app.tsx'** - 마이크로서비스의 모든 화면에서 공유하는 로직을 추가할 수 있는 메인 진입점\n\n## 4. 개발 서버 실행\n\n다음 명령어로 Granite 개발 서버를 실행해 보세요.\n\n::: code-group\n\n```sh [npm]\nnpm run dev\n```\n\n```sh [pnpm]\npnpm run dev\n```\n\n```sh [yarn]\nyarn dev\n```\n\n:::\n\n개발 서버가 정상적으로 실행되면, 다음과 같이 Granite 글자가 떠요.\n\n```\n ██████╗ ██████╗  █████╗ ███╗   ██╗██╗████████╗███████╗\n██╔════╝ ██╔══██╗██╔══██╗████╗  ██║██║╚══██╔══╝██╔════╝\n██║  ███╗██████╔╝███████║██╔██╗ ██║██║   ██║   █████╗\n██║   ██║██╔══██╗██╔══██║██║╚██╗██║██║   ██║   ██╔══╝\n╚██████╔╝██║  ██║██║  ██║██║ ╚████║██║   ██║   ███████╗\n ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝   ╚═╝   ╚══════╝\n\n                  Welcome to Granite\n\nTo reload the app press \"r\"\nTo open developer menu press \"d\"\nTo open debugger press \"j\"\n```\n\n> **✅ 성공했다면:** Granite을 표시한 ASCII 문자와 개발 시 사용할 수 있는 명령어가 보여요.\n\n## 5. 개발 서버에서 테스트\n\n이제 Granite 테스트 앱에서 생성된 앱을 실행해보세요.\n\n### 5.1 Granite 테스트 앱 설치\n\n아직 설치하지 않았다면, 시뮬레이터에 Granite 테스트 앱을 설치해 보세요. [설치 가이드](../miscellaneous/install-native-app)를 따라가면 쉽게 설치할 수 있어요.\n\n### 5.2 앱 실행\n\n1. **iOS 시뮬레이터** 또는 **Android 에뮬레이터**를 실행하세요\n2. 시뮬레이터에서 **Granite 테스트 앱**을 실행하세요\n3. **개발 서버에 연결하기:**\n   - 터미널에서 `granite dev`가 계속 실행 중인지 확인하세요\n   - **Android 사용자의 경우:** 별도 터미널에서 `adb reverse tcp:8081 tcp:8081` 명령어를 실행하여 연결을 활성화하세요\n   - Granite 테스트 앱에서 **\"Open Dev Server\"**를 탭하세요\n   - 앱이 로컬 개발 서버에 연결되어 React Native 화면을 로드해요\n\n네이티브 앱에서 Granite 앱이 로딩되는 걸 볼 수 있어요.\n\n> **✅ 성공했다면:** 네이티브 Granite 테스트 앱에서 React Native 화면이 보여요\n\n## 6. 첫 화면 만들기\n\nGranite에서 라우팅이 어떻게 작동하는지 이해하기 위해 새 화면을 생성해 볼게요.\n\n### 6.1 프로필 화면 만들기\n\n다음과 같이 `pages/profile.tsx` 파일을 새로 만드세요.\n\n```tsx\nimport React from 'react';\nimport { View, Text, StyleSheet } from 'react-native';\n\nexport default function ProfileScreen() {\n  return (\n    <View style={styles.container}>\n      <Text style={styles.title}>프로필 화면</Text>\n      <Text style={styles.description}>여기는 프로필 서비스</Text>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    backgroundColor: '#f5f5f5',\n  },\n  title: {\n    fontSize: 24,\n    fontWeight: 'bold',\n    marginBottom: 16,\n  },\n  description: {\n    fontSize: 16,\n    textAlign: 'center',\n    color: '#666',\n  },\n});\n```\n\n### 6.2 화면 간 이동\n\n`pages/index.tsx`를 수정해서 내비게이션을 추가하세요.\n\n```tsx\nimport React from 'react';\nimport { View, Text, TouchableOpacity, StyleSheet } from 'react-native';\nimport { useRouter } from '@granite/router';\n\nexport default function HomeScreen() {\n  const router = useRouter();\n\n  return (\n    <View style={styles.container}>\n      <Text style={styles.title}>Granite</Text>\n\n      <TouchableOpacity style={styles.button} onPress={() => router.push('/profile')}>\n        <Text style={styles.buttonText}>프로필로 가기</Text>\n      </TouchableOpacity>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    backgroundColor: '#fff',\n  },\n  title: {\n    fontSize: 24,\n    fontWeight: 'bold',\n    marginBottom: 32,\n  },\n  button: {\n    backgroundColor: '#007AFF',\n    paddingHorizontal: 24,\n    paddingVertical: 12,\n    borderRadius: 8,\n  },\n  buttonText: {\n    color: 'white',\n    fontSize: 16,\n    fontWeight: '600',\n  },\n});\n```\n\n파일을 저장하면 앱이 자동으로 새로고침돼요.\n\n> **✅ 성공했다면:** 홈 화면과 프로필 화면 사이를 이동할 수 있어요\n\n## 7. 앱 빌드하기\n\n배포를 위한 프로덕션 번들을 만들 차례에요. 다음 명령어를 입력하여 앱을 빌드해 보세요.\n\n::: code-group\n\n```sh [npm]\nnpm run build\n```\n\n```sh [pnpm]\npnpm run build\n```\n\n```sh [yarn]\nyarn build\n```\n\n:::\n\nGranite 프레임워크가 최적화된 JavaScript 번들을 만들어요. 최적화된 번들은 `dist/` 디렉토리에 있어요.\n\n<img src=\"../../../public/getting-started/bundle-size.png\" style=\"margin: 0 auto; max-width: 500px; width: 100%;\" />\n\n> **✅ 성공했다면:** 각각 200KB 미만인 빌드된 번들이 보여요\n\n## 🎉 축하해요!\n\n첫 Granite 앱을 성공적으로 만들었어요! 지금까지 이런 것들을 해냈어요:\n\n- ✅ 새로운 Granite 프로젝트 생성\n- ✅ 개발 환경 설정\n- ✅ 첫 마이크로서비스 화면 제작\n- ✅ 화면 간 이동 추가\n- ✅ 프로덕션용 번들 생성\n\n## 다음 단계\n\n이제 작동하는 Granite 앱이 생겼으니, 다음 단계로 넘어갈 수 있어요:\n\n1. **[AWS 인프라 설정하기](./setup-aws)** - 번들을 위한 CDN 인프라 구성\n2. **[프로덕션 배포하기](./deploy-your-app)** - AWS CDN에 번들을 배포하는 방법 배우기\n3. **[고급 라우팅](../granite-router/routing)** - 타입-세이프 라우팅과 내비게이션에 대해 배우기\n\n## 참고 링크\n\n- 📖 [문서](../../index) - Granite 완벽 가이드\n- 🐛 [GitHub 이슈](https://github.com/toss/granite/issues) - 버그 신고나 기능 요청하기\n"
  },
  {
    "path": "docs/ko/guides/quick-start/deploy-your-app.md",
    "content": "# Granite 앱 배포하고 실행하기\n\n5분 안에 AWS에 Granite 앱을 배포해보세요.\n\n## 배포할 때 일어나는 일\n\n- 최적화된 번들을 AWS S3 버킷에 업로드\n- CloudFront CDN을 통해 전 세계에 배포\n- Granite앱을 즉시 업데이트\n\n> **⏱️ 예상 소요 시간:** 5분\n\n> **📱 결과:** AWS CDN에서 실행되는 앱\n\n## 준비물\n\n다음 가이드를 먼저 완료했는지 확인하세요.\n\n- **[시작하기](./create-your-app)** - Granite 앱이 빌드되고 작동하는 상태\n- **[AWS 인프라 설정하기](./setup-aws)** - AWS CDN이 설정되고 실행 중인 상태\n\n## 1. 프로덕션용 앱 빌드하기\n\n먼저 프로덕션용 [Granite 앱](./create-your-app)을 빌드해보세요. 프로젝트 디렉토리에서 다음 명령어를 실행하세요.\n\n::: code-group\n\n```sh [npm]\nnpm run build\n```\n\n```sh [pnpm]\npnpm run build\n```\n\n```sh [yarn]\nyarn build\n```\n\n:::\n\nGranite가 최적화된 JavaScript 번들을 만들어요. 최적화된 번들은 `dist/` 디렉토리에 있어요.\n\n<img src=\"../../../public/getting-started/bundle-size.png\" style=\"margin: 0 auto; max-width: 500px; width: 100%;\" />\n\n> **✅ 성공했다면:** 각각 300KB 미만인 빌드된 번들이 보여요\n\n## 2. Granite Forge CLI 설치하기\n\n번들을 AWS에 업로드하기 위한 배포 도구인 Forge CLI를 설치하세요.\n\n::: code-group\n\n```sh [npm]\nnpm install @granite-js/forge-cli --save-dev\n```\n\n```sh [pnpm]\npnpm add @granite-js/forge-cli --save-dev\n```\n\n```sh [yarn]\nyarn add @granite-js/forge-cli --dev\n```\n\n:::\n\n## 3. 앱 배포하기\n\n[AWS 인프라 가이드](./setup-aws)에서 설정한 S3 버킷을 사용해 앱을 배포해보세요.\n\n::: code-group\n\n```sh [npm]\nnpx granite-forge deploy --bucket {S3 버킷 이름}\n```\n\n```sh [pnpm]\npnpm granite-forge deploy --bucket {S3 버킷 이름}\n```\n\n```sh [yarn]\nyarn granite-forge deploy --bucket {S3 버킷 이름}\n```\n\n:::\n\n배포 진행 상황이 보여요.\n\n```\n$ npx granite-forge deploy --bucket {버킷 이름}\n┌  Start deployment\n│\n◇  Successfully fetched current deployment state\n│\n▲  No deployment state found\n│\n◇  Are you sure you want to deploy test-granite-app?\n│  Yes\n│\n◇  Bundle uploaded\n│\n◇  Bundle list updated\n│\n◇  Deployed successfully! (Deployment ID: **********************)\n│\n└  Done\n```\n\n> **✅ 성공했다면:** \"Done\" 메시지가 보여요\n\n## 4. Granite 앱 테스트\n\n이제 앱이 배포됐으니 Granite 테스트 앱으로 테스트해보세요.\n\n시뮬레이터에서 [Granite 테스트 앱](../miscellaneous/install-native-app)을 열고 다음 정보를 입력하세요.\n\n| 필드       | 입력할 내용                                                                                                                             |\n| ---------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| Host       | [AWS 인프라 배포](../quick-start/setup-aws.html#_7-인프라-배포하기)에서 얻은 CDN URL (인프라 배포 후 출력에서 확인할 수 있어요) |\n| URL Scheme | `{your-scheme}://{your-app-name}` 형식의 앱 URL 스킴 (이 값들은 Granite 설정에서 가져와요)                                              |\n\n::: details 스킴과 앱 이름 찾기\n\n이 값들은 'granite.config.ts' 파일에 정의되어 있어요. 다음과 같이 찾을 수 있어요.\n\n```ts\nimport { defineConfig } from '@granite-js/react-native/config';\n\nexport default defineConfig({\n  // 예시 실행 스킴: granite://showcase\n  scheme: 'granite',\n  appName: 'showcase',\n  plugins: [\n    // ...\n  ],\n});\n```\n\n:::\n\n<img src=\"../../../public/getting-started/input-cdn-url.png\" style=\"max-width: 320px; margin: 0 auto; width: 100%;\" />\n\n제출을 누르면 AWS 인프라에서 앱이 즉시 로딩돼요! 이제 앱이 전 세계 CDN을 통해 서비스되고 있어요. 🌍\n\n## 예시 영상\n\n| iOS                                                                                                                                                                                                            | Android                                                                                                                                                                                                            |\n| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| <video autoplay loop muted style=\"max-width:400px; width:100%; height:auto; margin-top:1rem;\"> <source src=\"/videos/ios_showcase.mp4\" type=\"video/mp4\" /> 브라우저가 비디오 태그를 지원하지 않습니다. </video> | <video autoplay loop muted style=\"max-width:400px; width:100%; height:auto; margin-top:1rem;\"> <source src=\"/videos/android_showcase.mov\" type=\"video/mp4\" /> 브라우저가 비디오 태그를 지원하지 않습니다. </video> |\n\n## 배포 URL 이해하기\n\n앱은 플랫폼과 버전에 따라 특정 URL에 배포돼요.\n\n### URL 구조\n\n```\nhttps://<your-cdn>/[platform]/[appName]/[version]/bundle\n```\n\n### URL 예시\n\n```bash\n# iOS 번들\nhttps://d1234567890123.cloudfront.net/ios/my-granite-app/100/bundle\n\n# Android 번들\nhttps://d1234567890123.cloudfront.net/android/my-granite-app/100/bundle\n```\n\n### 버전 번호 (1-1000)\n\n버전 번호는 앱 업데이트를 받는 사용자의 비율을 0%에서 100%까지 0.1% 단위로 제어해요.\n\n## 🎉 축하해요!\n\n이제 Granite 앱이 AWS에서 실행되고 있어요! 이제 다음과 같은 것들을 할 수 있어요.\n\n- **즉시 업데이트** - CLI 명령어 하나로 새 버전 배포\n- **전 세계에 배포** - CDN을 통해 전 세계에서 앱 로딩\n"
  },
  {
    "path": "docs/ko/guides/quick-start/setup-aws.md",
    "content": "# Granite AWS 인프라 설정하기\n\n15분 안에 AWS에 Granite 앱을 배포하기 위한 React Native CDN 인프라를 구축해보세요.\n\n## 만들게 될 것들\n\n이 가이드를 마치면 다음과 같은 것들을 만들게 돼요.\n\n- Granite 앱 번들을 저장할 S3 버킷\n- 전 세계에 빠르게 전송하기 위한 CloudFront CDN\n- 사용자가 늘어나도 확장 가능한 프로덕션급 인프라\n\n## 준비물\n\n시작하기 전에 다음이 필요해요.\n\n- **AWS 계정** - [가입하기](https://aws.amazon.com/)\n\n## 1. Pulumi CLI 설치\n\n먼저 AWS 인프라를 코드로 설정할 수 있게 도와주는 Pulumi를 설치해야 해요. 운영 체제에 맞는 명령어를 선택하세요.\n\n::: code-group\n\n```sh [macOS]\nbrew install pulumi\n```\n\n```sh [Windows]\nwinget install pulumi\n```\n\n```sh [Linux]\ncurl -fsSL https://get.pulumi.com | sh\n```\n\n:::\n\n자세한 설치 방법은 [Pulumi 설치 가이드](https://www.pulumi.com/docs/iac/download-install/)를 참고하세요.\n\n> **✅ 성공했다면:** 'pulumi version' 명령어를 실행했을 때 버전 정보가 보여요\n\n## 2. AWS 자격 증명 설정\n\nPulumi가 AWS 계정에 접근할 수 있도록 설정해야 해요. 두 가지 방법 중 하나를 선택하세요.\n\n### 방법 A: AWS CLI 사용하기 (권장)\n\nAWS CLI를 설치하고 다음 명령어를 입력하여 AWS 인증 정보를 저장하세요.\n\n```bash\n# AWS CLI 설치하기\n# macOS: brew install awscli\n# Windows: winget install Amazon.AWSCLI\n# Linux: apt install awscli\n\n# 자격 증명 설정하기\naws configure\n```\n\n명령어를 입력하면 AWS 인증 정보를 묻는 프롬프트가 나타나요. 프롬프트에 인증 정보를 입력하세요.\n\n```\nAWS Access Key ID: {액세스 키 ID}\nAWS Secret Access Key: {시크릿 키}\nDefault region: {리전}\nDefault output format: json\n```\n\n### 방법 B: 환경 변수 사용하기\n\nAWS CLI 대신 터미널에서 다음과 같이 환경 변수를 설정할 수도 있어요. 터미널을 껐다 켜면 인증 정보가 사라진다는 점에 주의하세요.\n\n```bash\nexport AWS_ACCESS_KEY_ID=\"{액세스 키 ID}\"\nexport AWS_SECRET_ACCESS_KEY=\"{시크릿 키}\"\nexport AWS_REGION=\"{리전}\"\n```\n\n::: info AWS 인증 정보 얻는 방법\n\nAWS 콘솔 → IAM → 사용자 → 사용자 선택 → 보안 자격 증명 → 액세스 키 만들기로 이동하면 AWS 인증 정보를 얻을 수 있어요.\n\n:::\n\n## 3. 인프라 생성 프로젝트\n\nAWS 인프라 코드가 위치할 새 디렉토리를 만드세요.\n\n```bash\nmkdir my-granite-infrastructure\ncd my-granite-infrastructure\n```\n\n새로운 Pulumi 프로젝트를 초기화하세요.\n\n```bash\npulumi new aws-typescript\n```\n\nCLI에서 Pulumi 프로젝트를 생성하기 위한 정보를 물어보면 입력하세요.\n\n```\nThis command will walk you through creating a new Pulumi project.\n\nEnter a value or leave blank to accept the (default), and press <ENTER>.\nPress ^C at any time to quit.\n\nProject name: my-granite-infrastructure\nProject description: Granite app CDN infrastructure\nCreated project 'my-granite-infrastructure'\n\nstack name: dev\nCreated stack 'dev'\n\nThe package manager to use for installing dependencies: {패키지 매니저}\nThe AWS region to deploy into (aws:region): {AWS 리전}\nSaved config\n```\n\n> **✅ 성공했다면:** \"Your new project is ready to go!\" 메시지가 보여요\n\n## 4. Granite 인프라 패키지 설치\n\nGranite 배포 인프라를 생성하는 Pulumi 코드 패키지를 설치하세요.\n\n::: code-group\n\n```sh [npm]\nnpm install @granite-js/pulumi-aws --save-dev\n```\n\n```sh [pnpm]\npnpm add @granite-js/pulumi-aws --save-dev\n```\n\n```sh [yarn]\nyarn add @granite-js/pulumi-aws --dev\n```\n\n:::\n\n## 5. 인프라 설정\n\nGranite CDN 인프라를 생성하기 위해 `index.ts` 파일의 내용을 다음과 같이 입력하세요.\n\n```typescript\nimport * as pulumi from '@pulumi/pulumi';\nimport { ReactNativeBundleCDN } from '@granite-js/pulumi-aws';\n\nconst config = new pulumi.Config();\n\n// Granite CDN 인프라 생성하기\nconst cdn = new ReactNativeBundleCDN('granite-cdn', {\n  bucketName: config.require('bucketName'),\n  region: config.require('region'),\n});\n\nexport const cdnUrl = cdn.cloudfrontDomain;\nexport const bucketName = cdn.bucketName;\n```\n\n## 6. 설정값 지정\n\nGranite AWS 인프라에서 사용할 S3 버킷 이름과 리전을 설정하세요.\n\n```bash\n# 고유한 버킷 이름을 설정하세요 (전체 AWS에서 유일해야 해요)\npulumi config set bucketName {버킷 이름}\n\n# AWS 리전을 설정하세요\npulumi config set region {리전}\n```\n\n::: info\n\n버킷 이름은 전체 AWS에서 유일해야 해요. 다른 사람과 겹치지 않는 이름을 사용하세요.\n\n:::\n\n## 7. 인프라 배포하기\n\n이제 Granite 앱을 서빙할 AWS 인프라를 만들어볼게요.\n\n```bash\npulumi up\n```\n\n::: warning Yarn Plug'n'Play (PnP) 를 사용한다면\npnpify를 설치하고, 다음과 같이 pulumi 명령어를 실행해야 해요.\n\n```bash\nyarn add @yarnpkg/pnpify -D\nyarn pnpify pulumi up\n```\n\n:::\n\n`pulumi up` 명령어로 인프라를 배포하면 Pulumi가 생성할 리소스를 보여줘요.\n\n```\nPreviewing update (dev)\n\nView Live: https://app.pulumi.com/yourname/my-granite-infrastructure/dev/previews/...\n\n     Type                              Name                              Plan\n +   pulumi:pulumi:Stack               my-granite-infrastructure-dev     create\n +   └─ {생성될 인프라}\n\nResources:\n    + * to create\n\nDo you want to perform this update? yes\n```\n\n`yes`를 입력하고 Enter를 누르세요. Pulumi가 지정된 AWS 계정에 인프라를 생성해요.\n\n```\nUpdating (dev)\n\nView Live: https://app.pulumi.com/yourname/my-granite-infrastructure/dev/updates/1\n\n     Type                              Name                              Status\n +   pulumi:pulumi:Stack               my-granite-infrastructure-dev     created\n +   └─ {생성된 인프라}\n\nResources:\n    + * created\n\nDuration: {소요 시간}\n```\n\n> **✅ 성공했다면:** \"Resources: + \\* created\"와 CDN URL이 보여요\n\n## 🎉 축하해요!\n\nAWS에 Granite 인프라를 성공적으로 만들었어요. 이제 다음과 같은 것들이 준비됐어요.\n\n- 스스로의 AWS 계정에서 직접 운영하는 React Native 인프라\n- 전 세계에서 빠르게 React Native 번들을 로딩할 수 있는 CDN\n- 사용자가 늘어나도 확장 가능한 아키텍처\n- 배포 인프라에 대한 완전한 제어\n\n## 불필요한 리소스 지우기\n\n더 이상 필요하지 않은 리소스를 삭제하려면 다음 명령어를 실행하세요.\n\n```bash\npulumi destroy\n```\n\nPulumi가 삭제할 리소스를 보여주고 확인을 요청해요. `yes`를 입력하면 모든 리소스가 삭제돼요.\n\n## 다음 단계\n\n이제 인프라가 준비됐으니 다음 단계로 넘어가세요.\n\n- [앱 배포하기](./deploy-your-app) - Granite 앱을 AWS 인프라에 배포하는 방법 배우기\n"
  },
  {
    "path": "docs/ko/index.md",
    "content": "---\n# https://vitepress.dev/reference/default-theme-home-page\nlayout: home\n\nhero:\n  name: 'Granite'\n  text: '엔터프라이즈 React Native 프레임워크'\n  image:\n    src: /granite.png\n    alt: granite\n\n  actions:\n    - theme: brand\n      text: 빠른 시작\n      link: ./guides/quick-start/create-your-app\n    - theme: alt\n      text: 소개\n      link: ./guides/introduction\n\nfeatures:\n  - icon: 🔌\n    title: 기존 앱에 통합\n    details: 네이티브로 만들어진 iOS와 Android 앱에 React Native 화면을 쉽게 통합할 수 있어요.\n  - icon: 📦\n    title: 작은 번들 크기\n    details: 번들을 분할하고 최적화해서 200-300KB의 작은 마이크로서비스 번들을 생성해요.\n  - icon: 🚀\n    title: 빠른 JavaScript 빌드\n    details: ESBuild를 사용하여 JavaScript 번들 빌드를 수 초 이내에 할 수 있어요.\n  - icon: 🌐\n    title: AWS 인프라 지원\n    details: 직접 운영하는 AWS 위에 배포 인프라를 구성할 수 있어요.\n  - icon: ✅\n    title: E2E 테스트 100%\n    details: 모든 기능에 대한 E2E 테스트를 포함하고 있어요.\n  - icon: ⚡️\n    title: 빠른 네이티브 빌드 (작업 중)\n    details: 미리 네이티브 프레임워크를 빌드해서 앱 빌드 시간을 단축해요.\n---\n"
  },
  {
    "path": "docs/ko/reference/image/ui/Image.md",
    "content": "---\nsourcePath: packages/image/src/Image.tsx\n---\n\n# Image\n\n`Image` 컴포넌트를 사용해서 비트맵 이미지(png, jpg 등)나 벡터 이미지(svg)를 로드하고 화면에 렌더링할 수 있어요. 이미지 형식에 맞게 자동으로 적절한 방식으로 렌더링돼요.\n\n## 시그니처\n\n```typescript\ndeclare function Image(props: ImageProps): import('react/jsx-runtime').JSX.Element;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트에 전달되는 <code>props</code> 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">object</span>\n        <br />\n        <p class=\"post-parameters--description\">이미지 컴포넌트의 스타일을 설정하는 객체예요. <code>width</code>, <code>height</code> 등 레이아웃 관련 속성을 포함할 수 있어요.</p>\n      </li>\n      <ul class=\"post-parameters-ul\">\n        <li class=\"post-parameters-li\">\n          <span class=\"post-parameters--name\">props.source</span><span class=\"post-parameters--type\">object</span>\n          <br />\n          <p class=\"post-parameters--description\">로드할 이미지 리소스에 대한 정보를 담고 있는 객체예요.</p>\n          <ul class=\"post-parameters-ul\">\n            <li class=\"post-parameters-li\">\n              <span class=\"post-parameters--name\">props.source.uri</span><span class=\"post-parameters--type\">string</span>\n              <br />\n              <p class=\"post-parameters--description\">로드할 이미지 리소스를 나타내는 URI 주소예요.</p>\n            </li>\n            <li class=\"post-parameters-li\">\n              <span class=\"post-parameters--name\">props.source.cache</span><span class=\"post-parameters--type\">&#39;immutable&#39; | &#39;web&#39; | &#39;cacheOnly&#39;</span> · <span class=\"post-parameters--default\">&#39;immutable&#39;</span>\n              <br />\n              <p class=\"post-parameters--description\">이미지 캐시 전략을 설정할 수 있는 옵션이에요. 이 옵션은 비트맵 이미지에만 적용돼요. 기본값은 <code>immutable</code>이예요.</p>\n            </li>\n          </ul>\n        </li>\n      </ul>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.onLoadStart</span><span class=\"post-parameters--type\">() =&gt; void</span>\n        <br />\n        <p class=\"post-parameters--description\">이미지 로딩이 시작될 때 호출되는 콜백 함수예요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.onLoadEnd</span><span class=\"post-parameters--type\">() =&gt; void</span>\n        <br />\n        <p class=\"post-parameters--description\">이미지 로딩이 완료되었을 때 호출되는 콜백 함수예요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.onError</span><span class=\"post-parameters--type\">() =&gt; void</span>\n        <br />\n        <p class=\"post-parameters--description\">이미지 로드 중 에러가 발생했을 때 호출되는 콜백 함수예요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## 예제\n\n### 이미지 로드 및 렌더링 예시\n\n다음 예시는 비트맵 및 벡터 이미지 리소스를 로드하고, 에러가 발생했을 때 `console.log`로 에러 메시지를 출력하는 방법을 보여줘요.\n\n```tsx\nimport { Image } from '@granite-js/react-native';\nimport { View } from 'react-native';\n\nexport function ImageExample() {\n  return (\n    <View>\n      <Image\n        source={{ uri: 'my-image-link' }}\n        style={{\n          width: 300,\n          height: 300,\n          borderWidth: 1,\n        }}\n        onError={() => {\n          console.log('Failed to load image');\n        }}\n      />\n\n      <Image\n        source={{ uri: 'my-svg-link' }}\n        style={{\n          width: 300,\n          height: 300,\n          borderWidth: 1,\n        }}\n        onError={() => {\n          console.log('Failed to load image');\n        }}\n      />\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/manifest.json",
    "content": "{\n  \"title\": \"manifest for vitepress sidebar items\",\n  \"description\": \"file list\",\n  \"version\": \"1.0.0\",\n  \"documents\": {\n    \"image\": {\n      \"name\": \"image\",\n      \"itemCount\": 1,\n      \"firstItemPath\": \"/reference/image/ui/Image\",\n      \"items\": [\n        {\n          \"text\": \"image\",\n          \"collapsed\": true,\n          \"items\": [\n            {\n              \"text\": \"UI\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"Image\",\n                  \"link\": \"/reference/image/ui/Image\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    },\n    \"react-native\": {\n      \"name\": \"react-native\",\n      \"itemCount\": 32,\n      \"firstItemPath\": \"/reference/react-native/ui/ColorPreference\",\n      \"items\": [\n        {\n          \"text\": \"react-native\",\n          \"collapsed\": true,\n          \"items\": [\n            {\n              \"text\": \"설정\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"defineConfig\",\n                  \"link\": \"/reference/react-native/config/defineConfig\"\n                }\n              ]\n            },\n            {\n              \"text\": \"코어\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"Granite\",\n                  \"link\": \"/reference/react-native/core/Granite\"\n                },\n                {\n                  \"text\": \"InitialProps\",\n                  \"link\": \"/reference/react-native/core/InitialProps\"\n                },\n                {\n                  \"text\": \"useInitialProps\",\n                  \"link\": \"/reference/react-native/core/useInitialProps\"\n                },\n                {\n                  \"text\": \"useIsInitialScreen\",\n                  \"link\": \"/reference/react-native/core/useIsInitialScreen\"\n                }\n              ]\n            },\n            {\n              \"text\": \"화면 제어\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"IOFlatList\",\n                  \"link\": \"/reference/react-native/screen-control/IOFlatList\"\n                },\n                {\n                  \"text\": \"IOScrollView\",\n                  \"link\": \"/reference/react-native/screen-control/IOScrollView\"\n                },\n                {\n                  \"text\": \"ImpressionArea\",\n                  \"link\": \"/reference/react-native/screen-control/ImpressionArea\"\n                },\n                {\n                  \"text\": \"InView\",\n                  \"link\": \"/reference/react-native/screen-control/InView\"\n                },\n                {\n                  \"text\": \"closeView\",\n                  \"link\": \"/reference/react-native/screen-control/closeView\"\n                },\n                {\n                  \"text\": \"useBackEvent\",\n                  \"link\": \"/reference/react-native/screen-control/useBackEvent\"\n                },\n                {\n                  \"text\": \"useParams\",\n                  \"link\": \"/reference/react-native/screen-control/useParams\"\n                },\n                {\n                  \"text\": \"useVisibility\",\n                  \"link\": \"/reference/react-native/screen-control/useVisibility\"\n                },\n                {\n                  \"text\": \"useVisibilityChange\",\n                  \"link\": \"/reference/react-native/screen-control/useVisibilityChange\"\n                },\n                {\n                  \"text\": \"useRouterBackHandler\",\n                  \"link\": \"/reference/react-native/screen-control/useRouterBackHandler\"\n                }\n              ]\n            },\n            {\n              \"text\": \"화면 이동\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"openURL\",\n                  \"link\": \"/reference/react-native/screen-navigation/openURL\"\n                }\n              ]\n            },\n            {\n              \"text\": \"UI\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"BlurView\",\n                  \"link\": \"/reference/react-native/ui/BlurView\"\n                },\n                {\n                  \"text\": \"ColorPreference\",\n                  \"link\": \"/reference/react-native/ui/ColorPreference\"\n                },\n                {\n                  \"text\": \"KeyboardAboveView\",\n                  \"link\": \"/reference/react-native/ui/KeyboardAboveView\"\n                },\n                {\n                  \"text\": \"OnAudioFocusChanged\",\n                  \"link\": \"/reference/react-native/ui/OnAudioFocusChanged\"\n                },\n                {\n                  \"text\": \"ScrollViewInertialBackground\",\n                  \"link\": \"/reference/react-native/ui/ScrollViewInertialBackground\"\n                },\n                {\n                  \"text\": \"Video\",\n                  \"link\": \"/reference/react-native/ui/Video\"\n                },\n                {\n                  \"text\": \"BackButton\",\n                  \"link\": \"/reference/react-native/ui/BackButton\"\n                }\n              ]\n            },\n\n            {\n              \"text\": \"환경 확인\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"getSchemeUri\",\n                  \"link\": \"/reference/react-native/environment-check/getSchemeUri\"\n                },\n                {\n                  \"text\": \"useInitialSearchParams\",\n                  \"link\": \"/reference/react-native/environment-check/useInitialSearchParams\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    },\n    \"style-utils\": {\n      \"name\": \"style-utils\",\n      \"itemCount\": 10,\n      \"firstItemPath\": \"/reference/style-utils/ui/Flex\",\n      \"items\": [\n        {\n          \"text\": \"style-utils\",\n          \"collapsed\": true,\n          \"items\": [\n            {\n              \"text\": \"UI\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"Flex\",\n                  \"link\": \"/reference/style-utils/ui/Flex\"\n                },\n                {\n                  \"text\": \"FlexCenter\",\n                  \"link\": \"/reference/style-utils/ui/FlexCenter\"\n                },\n                {\n                  \"text\": \"FlexCenterHorizontal\",\n                  \"link\": \"/reference/style-utils/ui/FlexCenterHorizontal\"\n                },\n                {\n                  \"text\": \"FlexCenterVertical\",\n                  \"link\": \"/reference/style-utils/ui/FlexCenterVertical\"\n                },\n                {\n                  \"text\": \"Spacing\",\n                  \"link\": \"/reference/style-utils/ui/Spacing\"\n                },\n                {\n                  \"text\": \"Stack\",\n                  \"link\": \"/reference/style-utils/ui/Stack\"\n                },\n                {\n                  \"text\": \"StackHorizontal\",\n                  \"link\": \"/reference/style-utils/ui/StackHorizontal\"\n                },\n                {\n                  \"text\": \"StackVertical\",\n                  \"link\": \"/reference/style-utils/ui/StackVertical\"\n                },\n                {\n                  \"text\": \"margin\",\n                  \"link\": \"/reference/style-utils/ui/margin\"\n                },\n                {\n                  \"text\": \"padding\",\n                  \"link\": \"/reference/style-utils/ui/padding\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": "docs/ko/reference/react-native/config/defineConfig.md",
    "content": "---\nsourcePath: packages/cli/src/config/defineConfig.ts\n---\n\n# defineConfig\n\nGranite 애플리케이션의 주요 설정을 정의해요. `granite.config.ts`에서 사용돼요.\n\n다음 값들을 설정할 수 있어요.\n\n- 사용자가 앱에 접근할 URL 스킴 (예: `granite://`)\n- URL에 표시될 앱의 고유 이름 (예: `granite://my-service`)\n- ESBuild와 Metro 같은 번들러 설정\n- Babel을 통한 코드 변환 설정\n- Granite 플러그인을 통한 추가 기능\n\n## 시그니처\n\n```typescript\nfunction defineConfig({\n  appName,\n  host,\n  scheme,\n  plugins,\n  outdir,\n  entryFile,\n  cwd,\n  mpack,\n  babel,\n  esbuild,\n  metro,\n}: GraniteConfigInput): Promise<GraniteConfigResponse>;\n```\n\n## 매개변수\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">config</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">GraniteConfigInput</span>\n    <br />\n    <p class=\"post-parameters--description\">URL 스킴, 앱 이름, 빌드 설정, 플러그인과 같은 주요 설정을 정의하는 Granite 애플리케이션 설정 옵션이에요.</p>\n  </li>\n</ul>\n\n설정 옵션에는 다음과 같은 것들이 있어요:\n\n- `appName`: URL에 표시될 앱의 고유 식별자예요 (예: `my-service`)\n- `host`: URL 스킴에서 호스트(`host`) 부분을 설정할 수 있어요. 선택 사항이며, 지정하지 않아도 동작해요. 이 값을 설정하면 `appName` 앞에 호스트가 포함된 경로로 구성돼요.  \n  예를 들어, `host`를 `super`로 설정하면 스킴 구조는 `{scheme}://super/{appName}`이 돼요.\n- `scheme`: 앱을 실행하기 위한 URL 스킴이에요 (예: `granite`)\n- `plugins`: 기능을 확장하기 위한 Granite 플러그인이에요\n- `outdir`: 빌드 파일이 출력될 위치예요 (기본값: `dist`)\n- `entryFile`: 앱의 진입점이에요 (기본값: `./src/_app.tsx`)\n- `cwd`: 빌드 프로세스의 작업 디렉토리예요 (기본값: `process.cwd()`)\n- `mpack`: mpack 번들러 동작을 세밀하게 조정할 수 있어요\n- `babel`: Babel 트랜스파일 설정을 커스터마이즈할 수 있어요\n- `esbuild`: ESBuild 번들링을 조정할 수 있어요\n- `metro`: Metro 번들러 설정을 구성할 수 있어요\n\n## 예시\n\n### 기본 설정\n\n다음은 기본적인 Granite 서비스 설정 예시예요.\n\n- `granite://` 스킴을 통해 앱에 접근할 수 있어요\n- 서비스 이름을 \"my-app\"으로 설정해서 `granite://my-app`으로 접근할 수 있어요\n- Hermes 플러그인을 사용해서 JavaScript 번들을 바이트코드로 최적화해요\n\n```typescript\nimport { defineConfig } from '@granite-js/react-native/config';\nimport { hermes } from '@granite-js/plugin-hermes';\n\nexport default defineConfig({\n  // 마이크로서비스의 이름\n  appName: 'my-app',\n  // (선택) URL Host 스킴\n  host: 'super',\n  // 딥링크를 위한 URL 스킴\n  scheme: 'granite',\n  // 진입점 파일 경로\n  entryFile: 'index.ts',\n  // 사용할 플러그인 배열\n  plugins: [hermes()],\n});\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/core/Granite.md",
    "content": "---\nsourcePath: packages/react-native/src/app/Granite.tsx\n---\n\n# Granite\n\n## 시그니처\n\n```typescript\nGranite: {\n    registerApp(AppContainer: ComponentType<PropsWithChildren<InitialProps>>, { appName, context, router }: GraniteProps): (initialProps: InitialProps) => JSX.Element;\n    readonly appName: string;\n}\n```\n\n### 프로퍼티\n\n<ul class=\"post-parameters-ul\">\t\n  <li class=\"post-parameters-li post-parameters-li-root\">\t\n    <span class=\"post-parameters--name\">registerApp</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">RegisterService</span>\t\n    <br />\t\n    <p class=\"post-parameters--description\">이 함수는 서비스의 기본 환경을 설정해주고, 복잡한 설정을 따로 할 필요 없이 서비스 개발을 빠르게 시작할 수 있게 도와줘요. <code>appName</code>만 전달하면 파일 기반 라우팅, 쿼리 파라미터 처리, 뒤로 가기 제어 등 여러 기능을 바로 사용할 수 있어요.</p>\t\n  </li>\t\n</ul>\n\n`Granite.registerApp` 함수가 제공하는 기능은 다음과 같아요.\n\n- 라우팅: 파일 경로에 맞게 URL이 자동으로 매핑돼요. Next.js의 파일 기반 라우팅과 비슷한 방식으로 동작해요. 예를 들어 `/my-service/pages/index.ts` 파일은 `scheme://my-service` 주소로 접근할 수 있고, `/my-service/pages/home.ts` 파일은 `scheme://my-service/home` 주소로 접근할 수 있어요.\n- 쿼리 파라미터: URL 스킴으로 전달 받은 쿼리 파라미터를 쉽게 사용할 수 있어요. 예를 들어, `referrer` 파라미터를 받아서 로그를 남길 수 있어요.\n- 뒤로 가기 제어: 뒤로 가기 이벤트를 제어할 수 있어요. 예를 들어, 사용자가 화면에서 뒤로 가기를 누르면 다이얼로그를 띄우거나 화면을 닫을 수 있어요.\n- 화면 가시성(Visibility): 화면이 사용자에게 보이는지, 가려져 있는지 알 수 있어요. 예를 들어, 사용자가 홈 화면으로 나갔을 때 이 값을 활용해 특정 동작을 처리할 수 있어요.\n\n## 예제\n\n### `Granite` 컴포넌트로 만드는 예제\n\n```tsx\nimport { PropsWithChildren } from 'react';\nimport { Granite, InitialProps } from '@granite-js/react-native';\nimport { context } from '../require.context';\n\nfunction AppContainer({ children }: PropsWithChildren<InitialProps>) {\n  return <>{children}</>;\n}\n\nexport default Granite.registerApp(AppContainer, {\n  appName: 'my-app',\n  context,\n});\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/core/InitialProps.md",
    "content": "---\nsourcePath: packages/react-native/src/initial-props/InitialProps.ts\n---\n\n# InitialProps\n\nReact Native 앱에서 사용자가 특정 화면에 진입할 때,\n네이티브 플랫폼(Android/iOS)이 앱으로 전달하는 초기 데이터 타입을 제공해요.\n초기 데이터는 화면 초기화에 사용되는 중요한 정보를 포함하고 있고, 네이티브 플랫폼별로 필요한 데이터 타입이 달라요.\n\nAndroid에서 제공하는 데이터 타입은 `AndroidInitialProps`이고, iOS에서 제공하는 데이터 타입은 `IOSInitialProps` 이에요.\n\n## 시그니처\n\n```typescript\ntype InitialProps = AndroidInitialProps | IOSInitialProps;\n```\n\n### 프로퍼티\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">platform</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">&#39;ios&#39; | &#39;android&#39;</span>\n    <br />\n    <p class=\"post-parameters--description\">현재 앱이 실행 중인 플랫폼이에요. <code>ios</code> 또는 <code>android</code> 값을 가져요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">initialColorPreference</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ColorPreference</span>\n    <br />\n    <p class=\"post-parameters--description\">초기 컬러 테마예요. 사용자가 설정한 컬러 테마를 나타내요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### `InitialProps`를 사용하는 예제\n\n::: code-group\n\n```tsx [_app.tsx]\nimport { PropsWithChildren } from 'react';\nimport { Granite, InitialProps } from '@granite-js/react-native';\nimport { context } from '../require.context';\n\nconst APP_NAME = 'my-app-name';\n\nfunction AppContainer({ children, ...initialProps }: PropsWithChildren<InitialProps>) {\n  console.log({ initialProps });\n  return <>{children}</>;\n}\n\nexport default Granite.registerApp(AppContainer, {\n  appName: APP_NAME,\n  context,\n});\n```\n\n:::\n"
  },
  {
    "path": "docs/ko/reference/react-native/core/useInitialProps.md",
    "content": "---\nsourcePath: packages/react-native/src/app/context/InitialPropsContext.tsx\n---\n\n# useInitialProps\n\nReact Native 앱에서 특정 화면에 진입할 때 네이티브(Android 또는 iOS)가 전달한 초기 데이터를 객체로 알려줘요. 이 데이터를 사용해 앱 실행 직후 테마나 사용자 설정을 바로 적용할 수 있어요. 예를 들어 네이티브에서 다크 모드를 사용하고 있다는 설정을 받아서 React Native 앱이 실행되면 다크 모드로 바로 사용할 수 있어요.\n\n## 시그니처\n\n```typescript\nfunction useInitialProps<T extends InitialProps>(): T;\n```\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">InitialProps</span>\n    <br />\n    <p class=\"post-parameters--description\">앱의 초기 데이터</p>\n  </li>\n</ul>\n\n## 예제\n\n### 초기 데이터로 다크 모드 여부 확인하기\n\n```tsx\nimport { useInitialProps } from '@granite-js/react-native';\n\nfunction Page() {\n  const initialProps = useInitialProps();\n  // 'light' 또는 'dark'\n  console.log(initialProps.initialColorPreference);\n  return <></>;\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/core/useIsInitialScreen.md",
    "content": "---\nsourcePath: packages/react-native/src/router/hooks/useIsInitialScreen.ts\n---\n\n# useIsInitialScreen\n\n현재 화면이 네비게이션 스택의 첫 번째 화면인지 확인하는 Hook이에요.\n내부적으로 `useNavigationState`를 사용해서 현재 스택의 `index`가 0인지 확인해요.\n예를 들어, 뒤로가기 버튼을 조건부로 표시하거나 첫 화면에서만 특정 안내 메시지를 보여주고 싶을 때 사용해요.\n\n## 시그니처\n\n```typescript\nfunction useIsInitialScreen(): boolean;\n```\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">boolean</span>\n    <br />\n    <p class=\"post-parameters--description\">현재 화면이 네비게이션 스택의 첫 번째 화면이면 <code>true</code>, 아니면 <code>false</code>를 반환해요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### 첫 화면에서만 안내 메시지 표시하기\n\n첫 화면에 진입했을 때만 환영 메시지를 보여주는 예제예요.\n\n```tsx\nimport { useIsInitialScreen } from '@granite-js/react-native';\nimport { Text, View } from 'react-native';\n\nfunction MyScreen() {\n  const isInitialScreen = useIsInitialScreen();\n\n  return (\n    <View>\n      {isInitialScreen && <Text>환영합니다! 첫 화면입니다.</Text>}\n      <Text>화면 내용</Text>\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/environment-check/getSchemeUri.md",
    "content": "---\nsourcePath: packages/react-native/src/native-modules/natives/getSchemeUri.ts\n---\n\n# getSchemeUri\n\n처음에 화면에 진입한 스킴 값이에요. 페이지 이동으로 인한 URI 변경은 반영되지 않아요.\n\n## 시그니처\n\n```typescript\nfunction getSchemeUri(): string;\n```\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">string</span>\n    <br />\n    <p class=\"post-parameters--description\">처음에 화면에 진입한 스킴 값을 반환해요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### 처음 진입한 스킴 값 가져오기\n\n```tsx\nimport { getSchemeUri } from '@granite-js/react-native';\nimport { Text } from 'react-native';\n\nfunction MyPage() {\n  const schemeUri = getSchemeUri();\n\n  return <Text>처음에 화면에 진입한 스킴 값: {schemeUri}</Text>;\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/environment-check/useInitialSearchParams.md",
    "content": "---\nsourcePath: packages/react-native/src/app/context/useInitialSearchParams.tsx\n---\n\n# useInitialSearchParams\n\n앱을 처음 실행할 때 전달된 URL의 쿼리 파라미터를 바로 객체 형태로 반환하는 Hook이에요. 로그인이나 테마 설정 같은 초기 진입 처리를 즉시 적용할 수 있어서 사용자 경험을 빠르게 맞출 수 있어요. 잘못된 URL이 들어오면 안전하게 빈 객체를 반환해요. 네이티브 플랫폼(Android 또는 iOS)에서 앱으로 처음 전달한 URL에 쿼리 파라미터가 포함되어 있다면, 이 Hook을 사용해서 각 파라미터 값을 쉽게 읽을 수 있어요.\n\n## 시그니처\n\n```typescript\nfunction useInitialSearchParams(): {\n  [k: string]: string;\n};\n```\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">Record&lt;string, string&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\">초기 URL에 포함된 쿼리 파라미터를 키-값 쌍으로 담은 객체예요. 쿼리 파라미터가 없거나 URL이 유효하지 않으면 빈 객체를 반환해요.</p>\n  </li>\n</ul>\n\n## 예제\n\n```tsx\nimport { useInitialSearchParams } from '@granite-js/react-native';\n\nfunction Page() {\n  const params = useInitialSearchParams();\n  // 예: 초기 URL이 myapp://home?userId=42&theme=dark 인 경우\n  console.log(params.userId); // \"42\"\n  console.log(params.theme); // \"dark\"\n  return <></>;\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/screen-control/IOFlatList.md",
    "content": "---\nsourcePath: packages/react-native/src/intersection-observer/IOFlatList.ts\n---\n\n# IOFlatList\n\n`IOFlatList`는 스크롤 중 특정 요소가 화면에 보이거나 사라지는지를 감지하기 위해 Intersection Observer 기능을 추가한 `FlatList` 컴포넌트예요. 이 컴포넌트를 사용하면 리스트의 각 항목이 화면에 나타나는지 여부를 쉽게 확인하고 처리할 수 있어요.\n\n`InView`와 함께 사용하면 각 요소의 노출 상태를 확인할 수 있어요. 자식 요소로 포함된 [InView](/ko/reference/react-native/screen-control/InView) 컴포넌트는 `IOFlatList`의 관찰 기능을 통해 요소가 화면에 보이는지 여부를 감지하고, 노출 상태에 따라 이벤트를 발생시켜요.\n\n## 시그니처\n\n```typescript\nIOFlatList: typeof IOFlatListFunction;\n```\n\n## 예제\n\n`IOFlatList`를 사용해 리스트의 각 항목이 화면에 나타나는지 여부를 확인할 수 있어요.\n리스트의 각 항목이 화면에 나타나면 `InView` 컴포넌트가 `visible` 상태로 변경되어요.\n\n```tsx\nimport { ReactNode, useState } from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\nimport { InView, IOFlatList } from '@granite-js/react-native';\n\nconst mockData = Array.from({ length: 30 }, (_, i) => ({ key: String(i) }));\n\nexport default function FlatListPage() {\n  return <IOFlatList data={mockData} renderItem={({ item }) => <InViewItem>{item.key}</InViewItem>} />;\n}\n\nfunction InViewItem({ children }: { children: ReactNode }) {\n  const [visible, setVisible] = useState(false);\n\n  return (\n    <InView onChange={setVisible}>\n      <View style={styles.item}>\n        <Text>{children}</Text>\n        <Text>{visible ? 'visible' : ''}</Text>\n      </View>\n    </InView>\n  );\n}\n\nconst styles = StyleSheet.create({\n  item: {\n    padding: 16,\n    borderBottomWidth: 1,\n    borderBottomColor: '#ddd',\n  },\n});\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/screen-control/IOScrollView.md",
    "content": "---\nsourcePath: packages/react-native/src/intersection-observer/IOScrollView.ts\n---\n\n# IOScrollView\n\n`IOScrollView`는 `Intersection Observer` 기능이 추가된 [ScrollView](https://reactnative.dev/docs/scrollview) 컴포넌트예요. 스크롤 중 특정 요소가 화면에 보이거나 사라지는 상태를 감지할 수 있어요.\n이 기능을 활용해 `InView` 컴포넌트를 자식 요소로 사용하면, 화면에 노출되는지 여부를 쉽게 확인할 수 있어요.\n\n## 시그니처\n\n```typescript\nIOScrollView: ForwardRefExoticComponent<IOScrollViewProps & RefAttributes<IOScrollViewController>>;\n```\n\n## 예제\n\n`IOScrollView`를 사용해 리스트의 각 항목이 화면에 나타나는지 여부를 확인할 수 있어요.\n리스트의 각 항목이 화면에 나타나면 `InView` 컴포넌트가 `visible` 상태로 변경되어요.\n\n```tsx\nimport { ReactNode, useState } from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\nimport { InView, IOScrollView } from '@granite-js/react-native';\n\nconst mockData = Array.from({ length: 30 }, (_, i) => ({ key: String(i) }));\n\nexport default function IOScrollViewPage() {\n  return (\n    <IOScrollView>\n      {mockData.map((data) => (\n        <InViewItem key={data.key}>{data.key}</InViewItem>\n      ))}\n    </IOScrollView>\n  );\n}\n\nfunction InViewItem({ children }: { children: ReactNode }) {\n  const [visible, setVisible] = useState(false);\n\n  return (\n    <InView onChange={setVisible}>\n      <View style={styles.item}>\n        <Text>{children}</Text>\n        <Text>{visible ? 'visible' : ''}</Text>\n      </View>\n    </InView>\n  );\n}\n\nconst styles = StyleSheet.create({\n  item: {\n    padding: 16,\n    borderBottomWidth: 1,\n    borderBottomColor: '#ddd',\n  },\n});\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/screen-control/ImpressionArea.md",
    "content": "---\nsourcePath: packages/react-native/src/impression-area/ImpressionArea.tsx\n---\n\n# ImpressionArea\n\n특정 컴포넌트가 화면에 보이는지 여부를 감지해서 외부에 알려주는 컴포넌트예요. 이 컴포넌트를 사용해서 화면에 특정 컴포넌트가 보이면 로그를 수집하거나 애니메이션을 실행하는 구현을 쉽게 할 수 있어요.\n화면에 보이는지 여부는 `useVisibility`의 반환값과 뷰포트(Viewport) 내에 표시되었는 지 알려주는 `IOScrollView`와 `InView` 컴포넌트로 감지해요. React에서 `ScrollView`를 사용하면 뷰가 화면에 보이지 않더라도, `ImpressionArea`를 사용하면 해당 뷰가 실제로 화면에 보일때만 이벤트를 발생시킬 수 있어요.\n\n::: info 유의하세요\n\n`ImpressionArea`는 반드시 `IOScrollView` 안에서 사용해야 해요. 만약 `IOScrollView` 외부에서 사용해야 한다면, `UNSAFE__impressFallbackOnMount` 속성을 `true`로 설정해서 컴포넌트가 마운트될 때를 기준으로 감지할 수 있어요. 이 속성이 `false`로 설정된 상태에서 `IOScrollView` 외부에서 사용하면 `IOProviderMissingError`가 발생해요.\n\n:::\n\n## 시그니처\n\n```typescript\nfunction ImpressionArea(props: Props): ReactElement;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">onImpressionStart</span><span class=\"post-parameters--type\">() =&gt; void</span>\n    <br />\n    <p class=\"post-parameters--description\">자식 컴포넌트가 화면에 보일 때 실행되는 콜백함수예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">onImpressionEnd</span><span class=\"post-parameters--type\">() =&gt; void</span>\n    <br />\n    <p class=\"post-parameters--description\">자식 컴포넌트가 화면에 가려졌을 때 실행되는 콜백함수예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">enabled</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">true</span>\n    <br />\n    <p class=\"post-parameters--description\">화면에 보여졌다는 조건을 직접 제어하는 값이에요. 기본값은 <code>true</code> 에요. <code>false</code> 로 전달하면 화면에 보여져도 <code>onImpressionStart</code> 콜백 함수가 실행되지 않아요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">areaThreshold</span><span class=\"post-parameters--type\">number</span> · <span class=\"post-parameters--default\">0</span>\n    <br />\n    <p class=\"post-parameters--description\">보여지는 영역의 비율을 설정하는 값이에요. 이 값보다 큰 비율로 컴포넌트가 화면에 나타나면 <code>onImpressionStart</code>를 호출해요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">timeThreshold</span><span class=\"post-parameters--type\">number</span> · <span class=\"post-parameters--default\">0</span>\n    <br />\n    <p class=\"post-parameters--description\">이 컴포넌트가 화면에 보인 후 <code>onImpressionStart</code> 호출될 때까지의 시간을 밀리초 단위로 설정해요.기본값은 <code>0</code>밀리초(0초)에요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">style</span><span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>InView</code> 컴포넌트에 적용할 <code>style</code> 값이에요. 기본값은 <code>undefined</code>이고, <code>style</code>을 지정하고 싶을 때 사용해요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">UNSAFE__impressFallbackOnMount</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">false</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트가 마운트될 때 즉시 화면에 나타난 것으로 간주할지 여부예요. 기본값은 <code>false</code>예요.</p>\n  </li>\n</ul>\n\n값은 0부터 1 사이의 숫자로 설정하며, 0으로 설정하면 컴포넌트의 1px이라도 보일 때 이벤트가 발생해요. 반대로, 1로 설정하면 컴포넌트가 100% 화면에 노출될 때만 이벤트가 호출돼요.`IOScrollView`를 사용하지 않는 상황에서, 컴포넌트가 뷰포트(Viewport) 안에 있는지 판단할 수 없을 떼 유용해요. 예를 들어, `IOScrollView` 밖에 위치한 컴포넌트는 `true`로 설정하면 마운트 시점에 보여졌다고 판단해요.\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">ReactElement</span>\n    <br />\n    <p class=\"post-parameters--description\">화면에 보이는 여부를 감지할 수 있는 컴포넌트가 반환돼요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### 기본 사용 예시\n\n```tsx\nimport { useState } from 'react';\nimport { Button, Dimensions, Text, View } from 'react-native';\nimport { ImpressionArea, IOScrollView } from '@granite-js/react-native';\n\nexport default function ImpressionAreaExample() {\n  const [isImpressionStart, setIsImpressionStart] = useState(false);\n\n  return (\n    <>\n      <Text>{isImpressionStart ? 'Impression Start' : 'Impression End'}</Text>\n      <IOScrollView\n        style={{\n          flex: 1,\n          margin: 16,\n          backgroundColor: 'white',\n        }}\n      >\n        <View\n          style={{\n            height: Dimensions.get('screen').height,\n            borderWidth: 1,\n            borderColor: 'black',\n          }}\n        >\n          <Text>Scroll to here</Text>\n        </View>\n\n        <ImpressionArea\n          onImpressionStart={() => setIsImpressionStart(true)}\n          onImpressionEnd={() => setIsImpressionStart(false)}\n        >\n          <Button title=\"Button\" />\n        </ImpressionArea>\n      </IOScrollView>\n    </>\n  );\n}\n```\n\n### 마운트 시점에 감지하는 예시\n\n`ImpressionArea`가 `IOScrollView`와 같은 컴포넌트 내부에 위치하지 않을 때, `UNSAFE__impressFallbackOnMount`를 `true`로 설정하면 컴포넌트가 마운트될 때 화면에 보여진 것으로 간주해요.\n\n```tsx\nimport { useState } from 'react';\nimport { Button, Dimensions, ScrollView, Text, View } from 'react-native';\nimport { ImpressionArea } from '@granite-js/react-native';\n\nexport default function ImpressionArea2Example() {\n  const [isImpressionStart, setIsImpressionStart] = useState(false);\n\n  return (\n    <>\n      <Text>{isImpressionStart ? 'Impression Start' : 'Impression End'}</Text>\n      <ScrollView\n        style={{\n          flex: 1,\n          margin: 16,\n          backgroundColor: 'white',\n        }}\n      >\n        <View\n          style={{\n            height: Dimensions.get('screen').height,\n            borderWidth: 1,\n            borderColor: 'black',\n          }}\n        >\n          <Text>Scroll to here</Text>\n        </View>\n\n        <ImpressionArea\n          UNSAFE__impressFallbackOnMount={true}\n          onImpressionStart={() => setIsImpressionStart(true)}\n          onImpressionEnd={() => setIsImpressionStart(false)}\n        >\n          <Button title=\"Button\" />\n        </ImpressionArea>\n      </ScrollView>\n    </>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/screen-control/InView.md",
    "content": "---\nsourcePath: packages/react-native/src/intersection-observer/InView.tsx\n---\n\n# InView\n\n`InView` 컴포넌트는 화면에 요소가 보이기 시작하거나 화면에서 사라지는 것을 감지하는 컴포넌트예요.\n요소가 화면에 조금이라도 보이기 시작하면 `onChanged` 핸들러가 호출되고 첫 번째 인자로 `true` 값이 전달돼요. 반대로 요소가 화면에서 사라지면 `false` 값이 전달돼요.\n`onChanged` 핸들러의 두 번째 인자로 요소의 화면 노출 비율이 전달돼요. 노출 비율 값은 `0`에서 `1.0` 사이예요. 예를 들어 `0.2`가 전달되면 컴포넌트가 20%만큼 화면에 노출된 상태라는 의미예요.\n\n::: warning 유의하세요\n\n`InView`는 반드시 `IOContext`가 포함된 [IOScrollView](/ko/reference/react-native/screen-control/IOScrollView) 또는 [IOFlatList](/ko/reference/react-native/screen-control/IOFlatList) 내부에서 사용해야 해요.\n만약 `IOContext` 외부에서 사용하면 `IOProviderMissingError`가 발생해요.\n\n:::\n\n## 시그니처\n\n```typescript\ndeclare class InView<T = ViewProps> extends PureComponent<InViewProps<T>> {\n  static contextType: import('react').Context<IOContextValue>;\n  static defaultProps: Partial<InViewProps>;\n  context: undefined | IOContextValue;\n  mounted: boolean;\n  protected element: Element;\n  protected instance: undefined | ObserverInstance;\n  protected view: any;\n  constructor(props: InViewProps<T>);\n  componentDidMount(): void;\n  componentWillUnmount(): void;\n  protected handleChange: (inView: boolean, areaThreshold: number) => void;\n  protected handleRef: (ref: any) => void;\n  protected handleLayout: (event: LayoutChangeEvent) => void;\n  measure: (...args: any) => void;\n  measureInWindow: (...args: any) => void;\n  measureLayout: (...args: any) => void;\n  setNativeProps: (...args: any) => void;\n  focus: (...args: any) => void;\n  blur: (...args: any) => void;\n  render(): import('react/jsx-runtime').JSX.Element | null;\n}\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">Object</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트에 전달되는 props 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.children</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">React.ReactNode</span>\n        <br />\n        <p class=\"post-parameters--description\">컴포넌트 하위에 렌더링될 자식 컴포넌트들이에요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">prop.as</span><span class=\"post-parameters--type\">React.ComponentType</span> · <span class=\"post-parameters--default\">View</span>\n    <br />\n    <p class=\"post-parameters--description\">실제 렌더링할 컴포넌트를 지정해요. 기본값은 <a href=\"https://reactnative.dev/docs/view\" target=\"_blank\" rel=\"noreferrer\">View</a> 컴포넌트예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">triggerOnce</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">false</span>\n    <br />\n    <p class=\"post-parameters--description\">요소가 화면에 처음 보일 때 한 번만 <code>onChange</code> 콜백을 호출하려면 이 옵션을 사용해요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">onLayout</span><span class=\"post-parameters--type\">(event: LayoutChangeEvent) =&gt; void</span>\n    <br />\n    <p class=\"post-parameters--description\">레이아웃에 변경이 생겼을 때 호출되는 콜백 함수예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">onChange</span><span class=\"post-parameters--type\">(inView: boolean, areaThreshold: number) =&gt; void</span>\n    <br />\n    <p class=\"post-parameters--description\">요소가 화면에 나타나거나 사라질 때 호출되는 콜백 함수예요. 첫 번째 인자로 노출 여부가, 두 번째 인자로 노출 비율이 전달돼요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### `InView`컴포넌트로 요소의 `10%` 지점을 감지하기\n\n```tsx\nimport { LayoutChangeEvent, View, Text, Dimensions } from 'react-native';\nimport { InView, IOScrollView } from '@granite-js/react-native';\n\nexport function InViewExample() {\n  const handleLayout = (event: LayoutChangeEvent) => {\n    console.log('레이아웃 변경됨', event.nativeEvent.layout);\n  };\n\n  const handleChange = (inView: boolean, areaThreshold: number) => {\n    if (inView) {\n      console.log(`${areaThreshold * 100}% 비율만큼 화면에 보이는 상태`);\n    } else {\n      console.log('화면에 보이지 않는 상태');\n    }\n  };\n\n  return (\n    <IOScrollView>\n      <View style={{ height: HEIGHT, width: '100%', backgroundColor: 'blue' }}>\n        <Text style={{ color: 'white' }}>스크롤을 내려주세요</Text>\n      </View>\n      <InView onLayout={handleLayout} onChange={handleChange}>\n        <View style={{ width: 100, height: 300, backgroundColor: 'yellow' }}>\n          <View style={{ position: 'absolute', top: 30, width: 100, height: 1, borderWidth: 1 }}>\n            <Text style={{ position: 'absolute', top: 0 }}>10% 지점</Text>\n          </View>\n        </View>\n      </InView>\n    </IOScrollView>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/screen-control/closeView.md",
    "content": "---\nsourcePath: packages/react-native/src/native-modules/natives/closeView.ts\n---\n\n# closeView\n\n현재 화면을 닫는 함수에요. 예를 들어, \"닫기\" 버튼을 눌러서 서비스를 종료할 때 사용할 수 있어요.\n\n## 시그니처\n\n```typescript\nfunction closeView(): Promise<void>;\n```\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">Promise&lt;void&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\"></p>\n  </li>\n</ul>\n\n## 예제\n\n### 닫기 버튼을 눌러 화면 닫기\n\n```tsx\nimport { Button } from 'react-native';\nimport { closeView } from '@granite-js/react-native';\n\nfunction CloseButton() {\n  return <Button title=\"닫기\" onPress={closeView} />;\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/screen-control/useBackEvent.md",
    "content": "---\nsourcePath: packages/react-native/src/use-back-event/useBackEvent.tsx\n---\n\n# useBackEvent\n\n뒤로 가기 이벤트를 등록하고 제거할 수 있는 컨트롤러 객체를 반환하는 Hook이에요. 이 Hook을 사용하면 특정 컴포넌트가 활성화되었을 때만 뒤로 가기 이벤트를 처리할 수 있어요.\n`addEventListener` 를 쓰면 뒤로 가기 이벤트를 등록할 수 있고, `removeEventListener` 를 쓰면 뒤로 가기 이벤트를 제거할 수 있어요.\n사용자가 화면을 보고 있을 때만 등록된 뒤로 가기 이벤트가 등록돼요. 화면을 보고 있다는 조건은 [useVisibility](/ko/reference/react-native/screen-control/useVisibility) 을 사용해요.\n\n이 Hook을 사용해 특정 컴포넌트에서 뒤로 가기 이벤트를 처리하는 로직을 정의할 수 있어요.\n\n## 시그니처\n\n```typescript\nfunction useBackEvent(): BackEventControls;\n```\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">BackEventControls</span>\n    <br />\n    <p class=\"post-parameters--description\">뒤로 가기 이벤트를 제어할 수 있는 객체예요. 이 객체에는 이벤트를 등록하는 <code>addEventListener</code> 메서드와와 제거하는 <code>removeEventListener</code> 메서드가 포함 되어 있어요.</p>\n  </li>\n</ul>\n\n### 에러\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">Error</span>\n    <br />\n    <p class=\"post-parameters--description\">이 훅이 <code>BackEventProvider</code> 내에서 사용되지 않은 경우 에러를 발생시켜요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### 뒤로 가기 이벤트 등록 및 제거 예제\n\n- **\"Add BackEvent\" 버튼을 누르면 뒤로 가기 이벤트가 등록돼요.** 이후 뒤로 가기 버튼을 누르면 \"back\"이라는 알림이 뜨고, 실제로 뒤로 가지 않아요.\n- **\"Remove BackEvent\" 버튼을 누르면 등록된 이벤트가 제거돼요.** 이후 뒤로 가기 버튼을 누르면 기존 동작대로 정상적으로 뒤로 가요.\n\n```tsx\nimport { useEffect, useState } from 'react';\nimport { Alert, Button, View } from 'react-native';\nimport { useBackEvent } from '@granite-js/react-native';\n\nexport function UseBackEventExample() {\n  const backEvent = useBackEvent();\n\n  const [handler, setHandler] = useState<{ callback: () => void } | undefined>(undefined);\n\n  useEffect(() => {\n    const callback = handler?.callback;\n\n    if (callback != null) {\n      backEvent.addEventListener(callback);\n\n      return () => {\n        backEvent.removeEventListener(callback);\n      };\n    }\n\n    return;\n  }, [backEvent, handler]);\n\n  return (\n    <View>\n      <Button\n        title=\"Add BackEvent\"\n        onPress={() => {\n          setHandler({ callback: () => Alert.alert('back') });\n        }}\n      />\n      <Button\n        title=\"Remove BackEvent\"\n        onPress={() => {\n          setHandler(undefined);\n        }}\n      />\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/screen-control/useParams.md",
    "content": "---\nsourcePath: packages/react-native/src/router/createRoute.ts\n---\n\n# useParams\n\n`useParams`는 지정된 라우트에서 파라미터를 가져오는 훅이에요.\n이 훅을 사용하면 현재 라우트의 파라미터에 쉽게 접근할 수 있어요.\n`validateParams` 옵션을 사용하면 파라미터 구조를 검증하고 타입을 변환할 수 있어서 런타임 에러를 줄이고 안전한 코드를 작성할 수 있어요.\n\n## 시그니처\n\n```typescript\nfunction useParams<TScreen extends keyof RegisterScreen>(options: {\n  from: TScreen;\n  strict?: true;\n}): RegisterScreen[TScreen];\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">options</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">GraniteRouteHooksOptions&lt;TScreen&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\">가져올 라우트의 정보를 담은 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">options.from</span><span class=\"post-parameters--type\">string</span>\n        <br />\n        <p class=\"post-parameters--description\">파라미터를 가져올 라우트 경로예요. 이 값을 지정하지 않으면 현재 라우트에서 파라미터를 가져와요. 엄격 모드(<code>strict</code>)가 <code>true</code>인 경우 반드시 지정해야 해요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">options.strict</span><span class=\"post-parameters--type\">boolean</span>\n        <br />\n        <p class=\"post-parameters--description\">엄격 모드 설정이에요. <code>true</code>로 설정하면 지정된 라우트와 현재 라우트가 일치하지 않으면 에러를 발생시켜요. <code>false</code>로 설정하면 <code>validateParams</code> 검증을 생략하고 현재 화면의 파라미터를 그대로 반환해요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## 예제\n\n### 라우트 파라미터 가져오기\n\n::: code-group\n\n```tsx [pages/examples/use-params.tsx]\nimport React from 'react';\nimport { Text } from 'react-native';\nimport { createRoute, useParams } from '@granite-js/react-native';\n\nexport const Route = createRoute('/examples/use-params', {\n  validateParams: (params) => params as { id: string },\n  component: UseParamsExample,\n});\n\nfunction UseParamsExample() {\n  // 첫 번째 방법: 라우트 객체의 `useParams` 메서드 사용\n  const params = Route.useParams();\n\n  // 두 번째 방법: useParams 훅 직접 사용\n  const params2 = useParams({ from: '/examples/use-params' });\n\n  // 세 번째 방법: strict 모드를 false로 설정하여 사용\n  // strict: false로 설정하면 현재 라우트의 파라미터를 가져오며,\n  // validateParams가 정의되어 있어도 검증을 건너뛰어요.\n  const params3 = useParams({ strict: false }) as { id: string };\n\n  return (\n    <>\n      <Text>{params.id}</Text>\n      <Text>{params2.id}</Text>\n      <Text>{params3.id}</Text>\n    </>\n  );\n}\n```\n\n:::\n"
  },
  {
    "path": "docs/ko/reference/react-native/screen-control/useRouterBackHandler.md",
    "content": "---\nsourcePath: 'packages/react-native/src/router/components/useRouterBackHandler.tsx'\n---\n\n# useRouterBackHandler\n\n네비게이션에서 뒤로가기 동작을 처리할 수 있는 핸들러를 제공하는 훅이에요. 모달이나 독립적인 화면에서 뒤로가기 버튼을 눌렀을 때 네비게이션 스택이 없는 경우 뷰를 직접 닫아야 할 때 사용할 수 있어요. 이 훅은 `@react-navigation/native`에서 제공하는 `NavigationContainerRef`를 사용해서 네비게이션 스택이 남아 있다면 이전 화면으로 이동하고, 스택이 비어 있다면 사용자가 설정한 `onClose` 함수를 실행해요.\n\n## 시그니처\n\n```typescript\nfunction useRouterBackHandler({\n  navigationContainerRef,\n  onClose,\n}: {\n  navigationContainerRef: NavigationContainerRefWithCurrent<never>;\n  onClose?: () => void;\n}): { handler: any };\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">navigationContainerRef</span><span class=\"post-parameters--required\">Required</span> · <span class=\"post-parameters--type\">NavigationContainerRefWithCurrent&lt;any&gt;</span>\n    <br/>\n    <p class=\"post-parameters--description\">현재 네비게이션 상태를 참조할 수 있는 <code>NavigationContainerRef</code>예요. 뒤로가기 동작을 실행할 때 사용돼요.</p>\n  </li>\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">onClose</span> · <span class=\"post-parameters--type\">() =&gt; void</span>\n    <br/>\n    <p class=\"post-parameters--description\">네비게이션 스택이 비어 있을 때 실행할 함수예요. 예를 들어, React Native View 를 닫는 함수를 전달할 수 있어요.</p>\n  </li>\n</ul>\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">{ handler: () =&gt; void }</span>\n    <br/>\n    <p class=\"post-parameters--description\">뒤로가기 버튼 등에서 사용할 수 있는 핸들러 함수예요.\n</p>\n  </li>\n</ul>\n\n## 예제\n\n### 뒤로가기 버튼에 직접 핸들러를 전달하고 뷰를 닫을 수 있는 함수를 설정하는 예제\n\n```tsx\nimport { createNavigationContainerRef, useNavigation } from '@granite-js/native/@react-navigation/native';\nimport { BackButton, useRouterBackHandler } from '@granite-js/react-native';\nimport { useEffect } from 'react';\n\nconst navigationContainerRef = createNavigationContainerRef();\n\nfunction MyBackButton() {\n  const navigation = useNavigation();\n\n  const { handler } = useRouterBackHandler({\n    navigationContainerRef,\n    onClose: () => {\n      // close the view\n    },\n  });\n\n  useEffect(() => {\n    navigation.setOptions({\n      headerLeft: () => <BackButton onPress={handler} />,\n    });\n  }, [handler, navigation]);\n\n  return <></>;\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/screen-control/useVisibility.md",
    "content": "---\nsourcePath: packages/react-native/src/visibility/useVisibility.tsx\n---\n\n# useVisibility\n\n화면이 사용자에게 보이는 상태인지 여부를 반환해요.\n앱의 화면이 현재 사용자에게 보인다면 `true`를 반환하고, 보이지 않는다면 `false`를 반환해요. 단, 시스템 공유하기 모달(share)을 열고 닫을 때는 화면이 보이는 상태가 바뀌지 않아요.\n\n사용 예시는 다음과 같아요.\n\n- 다른 앱으로 전환하거나 홈 버튼을 누르면 `false` 를 반환해요.\n- 다시 토스 앱으로 돌아오거나 화면이 보이면 `true` 를 반환해요.\n- 토스 앱 내 다른 서비스로 이동하면 `false` 를 반환해요.\n\n## 시그니처\n\n```typescript\nfunction useVisibility(): boolean;\n```\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">boolean</span>\n    <br />\n    <p class=\"post-parameters--description\">현재 화면이 사용자에게 보이는지 여부에요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### 화면이 보이는 상태를 확인하는 예제\n\n```tsx\nimport { useEffect } from 'react';\nimport { Text } from 'react-native';\nimport { useVisibility } from '@granite-js/react-native';\n\nexport function UseVisibilityExample() {\n  const visibility = useVisibility();\n\n  useEffect(() => {\n    console.log({ visibility });\n  }, [visibility]);\n\n  return <Text>홈 화면으로 나갔다 들어오면 로그가 남겨져요.</Text>;\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/screen-control/useVisibilityChange.md",
    "content": "---\nsourcePath: packages/react-native/src/visibility/useVisibilityChange.ts\n---\n\n# useVisibilityChange\n\n화면의 보이는 상태가 변경될 때 해당 상태를 전달하는 콜백 함수를 호출해요.\n이 콜백 함수에는 [useVisibility](/ko/reference/react-native/screen-control/useVisibility)의 반환값이 전달돼요. 반환값이 `true`이면 `visible`, `false`이면 `hidden` 문자열이 전달돼요.\n\n## 시그니처\n\n```typescript\nfunction useVisibilityChange(callback: VisibilityCallback): void;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">callback</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">VisibilityCallback</span>\n    <br />\n    <p class=\"post-parameters--description\">화면이 보이는지 여부가 바뀔 때 그 변경을 전달하는 콜백 함수를 호출해요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### 화면의 보이는 상태가 변경될 때 로그를 남기는 예제\n\n```tsx\nimport { useState } from 'react';\nimport { Text, View } from 'react-native';\nimport { useVisibilityChange, VisibilityState } from '@granite-js/react-native';\n\nexport function UseVisibilityChangeExample() {\n  const [visibilityHistory, setVisibilityHistory] = useState<VisibilityState[]>([]);\n\n  useVisibilityChange((visibility) => {\n    setVisibilityHistory((prev) => [...prev, visibility]);\n  });\n\n  return (\n    <View>\n      <Text>홈 화면으로 나갔다 들어오면 로그가 남겨져요.</Text>\n\n      {visibilityHistory.map((visibility, index) => (\n        <Text key={index}>{JSON.stringify(visibility)}</Text>\n      ))}\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/screen-navigation/openURL.md",
    "content": "---\nsourcePath: packages/react-native/src/native-modules/natives/openURL.ts\n---\n\n# openURL\n\n지정된 URL을 기기의 기본 브라우저나 관련 앱에서 열어요.\n이 함수는 `react-native`의 [`Linking.openURL`](https://reactnative.dev/docs/0.72/linking#openurl) 메서드를 사용하여 URL을 열어요.\n\n## 시그니처\n\n```typescript\nfunction openURL(url: string): Promise<any>;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">url</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">string</span>\n    <br />\n    <p class=\"post-parameters--description\">열고자 하는 URL 주소</p>\n  </li>\n</ul>\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">Promise&lt;any&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\">URL이 성공적으로 열렸을 때 해결되는 Promise</p>\n  </li>\n</ul>\n\n## 예제\n\n### 외부 URL 열기\n\n```tsx\nimport { openURL } from '@granite-js/react-native';\nimport { Button } from 'react-native';\n\nfunction Page() {\n  const handlePress = () => {\n    openURL('https://google.com');\n  };\n\n  return <Button title=\"구글 웹사이트 열기\" onPress={handlePress} />;\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/ui/BackButton.md",
    "content": "---\nsourcePath: 'packages/react-native/src/router/components/BackButton.tsx'\n---\n\n# BackButton\n\n뒤로 가기 버튼 컴포넌트예요. 이 컴포넌트는 주로 네비게이션 헤더나 커스텀 화면 상단에서 이전 화면으로 돌아가는 기능을 구현할 때 사용해요. `onPress` 핸들러를 설정하지 않으면 아무 동작도 하지 않아요.\n\n## 시그니처\n\n```typescript\nfunction BackButton({ tintColor, onPress }: BackButtonProps): any;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--required\">Required</span> · <span class=\"post-parameters--type\">Object</span>\n    <br/>\n    <p class=\"post-parameters--description\"></p>\n    <ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li \">\n    <span class=\"post-parameters--name\">tintColor</span> · <span class=\"post-parameters--type\">string</span>\n    <br/>\n    <p class=\"post-parameters--description\">버튼 아이콘의 색상이에요. CSS 색상 문자열을 사용할 수 있어요.</p>\n  </li>\n  <li class=\"post-parameters-li \">\n    <span class=\"post-parameters--name\">onPress</span> · <span class=\"post-parameters--type\">() =&gt; void</span>\n    <br/>\n    <p class=\"post-parameters--description\">버튼을 눌렀을 때 실행할 함수예요. 예를 들어 이전 화면으로 돌아가는 함수를 넣을 수 있어요.</p>\n  </li>\n    </ul>\n  </li>\n</ul>\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">ReactElement</span>\n    <br/>\n    <p class=\"post-parameters--description\">뒤로가기 버튼 컴포넌트를 반환해요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### 뒤로가기 버튼에 직접 핸들러를 전달하고 뷰를 닫을 수 있는 함수를 설정하는 예제\n\n```tsx\nimport { createNavigationContainerRef, useNavigation } from '@granite-js/native/@react-navigation/native';\nimport { BackButton, useRouterBackHandler } from '@granite-js/react-native';\nimport { useEffect } from 'react';\n\nconst navigationContainerRef = createNavigationContainerRef();\n\nfunction MyBackButton() {\n  const navigation = useNavigation();\n\n  const { handler } = useRouterBackHandler({\n    navigationContainerRef,\n    onClose: () => {\n      // close the view\n    },\n  });\n\n  useEffect(() => {\n    navigation.setOptions({\n      headerLeft: () => <BackButton onPress={handler} />,\n    });\n  }, [handler, navigation]);\n\n  return <></>;\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/ui/BlurView.md",
    "content": "---\nsourcePath: packages/react-native/src/blur/BlurView.tsx\n---\n\n# BlurView\n\n`BlurView` 컴포넌트는 iOS에서 배경을 블러 처리하는 UI 효과를 줘요. 이 컴포넌트는 배경을 흐리게 표시해요. iOS에서만 지원되고\nAndroid에서는 기본 [`View`](https://reactnative.dev/docs/0.72/view) 를 렌더링해요.\n\n블러의 강도를 조절할 수 있고, [Vibrancy 효과](https://developer.apple.com/documentation/uikit/uivibrancyeffect?language=objc)를 적용할 수 있어요. 블러가 적용되지 않을 경우에는 [`reducedTransparencyFallbackColor`](https://github.com/Kureev/react-native-blur/tree/v4.3.2?tab=readme-ov-file#blurview)를 사용해 배경색을 설정할 수 있어요.\n\n`isSupported` 속성을 통해 현재 기기에서 블러가 지원되는지 확인할 수 있어요. iOS 5.126.0 이상에서만 블러 효과가 지원되고, Android에서는 지원되지 않아요.\n\n## 시그니처\n\n```typescript\nfunction BlurView({\n  blurType,\n  blurAmount,\n  reducedTransparencyFallbackColor,\n  vibrancyEffect,\n  ...viewProps\n}: BlurViewProps): import('react/jsx-runtime').JSX.Element;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">BlurViewProps</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>BlurView</code>에 전달할 속성들이에요. <code>react-native</code>의 <code>ViewProps</code>를 상속하므로, 기본적인 레이아웃 속성도 함께 사용할 수 있어요. <a href=\"https://github.com/Kureev/react-native-blur/tree/v4.3.2?tab=readme-ov-file#blurview\" target=\"_blank\" rel=\"noreferrer\">@react-native-community/blur</a> 의 속성과 같아요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.blurType</span><span class=\"post-parameters--type\">BlurType</span>\n        <br />\n        <p class=\"post-parameters--description\">블러의 유형을 설정해요. <code>light</code>, <code>dark</code>, <code>extraLight</code> 같은 값을 사용해 블러의 스타일을 정의할 수 있어요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.blurAmount</span><span class=\"post-parameters--type\">number</span> · <span class=\"post-parameters--default\">10</span>\n        <br />\n        <p class=\"post-parameters--description\">블러의 강도를 설정해요. 숫자가 클수록 블러가 더 강하게 적용돼요. 기본값은 <code>10</code>이에요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.vibrancyEffect</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">false</span>\n        <br />\n        <p class=\"post-parameters--description\">Vibrancy Effect를 활성화해요. Vibrancy 효과는 블러된 배경 위의 콘텐츠를 더 생동감 있게 보이도록 해줘요. iOS에서만 지원되며, 기본값은 <code>false</code>예요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.reducedTransparencyFallbackColor</span><span class=\"post-parameters--type\">string</span>\n        <br />\n        <p class=\"post-parameters--description\">투명도가 제한될 경우 사용할 대체 배경색이에요. 블러가 지원되지 않거나 제대로 렌더링되지 않을 때 유용해요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">viewProps</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewProps</span>\n    <br />\n    <p class=\"post-parameters--description\">기본적으로 전달할 수 있는 <code>View</code>의 속성들이에요. 레이아웃이나 스타일링을 위해 추가할 수 있어요.</p>\n  </li>\n</ul>\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">JSX.Element</span>\n    <br />\n    <p class=\"post-parameters--description\">iOS에서는 블러가 적용된 <code>BlurView</code> 또는 <code>VibrancyView</code> 컴포넌트를 반환하고, Android에서는 기본 <code>View</code>를 반환해요.</p>\n  </li>\n</ul>\n\n::: warning 유의할 점\n\n- `BlurView`는 iOS에서만 지원돼요. Android에서는 기본 `View`가 렌더링되며, 블러 효과가 적용되지 않아요.\n  :::\n\n## 예제\n\n```tsx\nimport { BlurView } from '@granite-js/react-native';\nimport { View, Text, StyleSheet } from 'react-native';\n\nexport function BlurViewExample() {\n  return (\n    <View style={styles.container}>\n      <Text style={styles.absolute}>Blurred Text</Text>\n      <BlurView style={styles.absolute} blurType=\"light\" blurAmount={1} />\n      <Text>Non Blurred Text</Text>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    justifyContent: 'center',\n    alignItems: 'center',\n    width: '100%',\n    height: 300,\n  },\n  absolute: {\n    position: 'absolute',\n    top: 0,\n    left: 0,\n    bottom: 0,\n    right: 0,\n  },\n});\n```\n\n## 참고\n\n- [iOS Vibrancy Effect Documentation](https://developer.apple.com/documentation/uikit/uivibrancyeffect)\n- [Zeddios Blog 설명](https://zeddios.tistory.com/1140)\n"
  },
  {
    "path": "docs/ko/reference/react-native/ui/ColorPreference.md",
    "content": "---\nsourcePath: packages/react-native/src/initial-props/InitialProps.ts\n---\n\n# ColorPreference\n\n현재 기기의 색상 모드를 나타내는 타입이에요. 라이트모드, 다크모드를 나타내는 문자열이에요\n\n## 시그니처\n\n```typescript\ntype ColorPreference = 'light' | 'dark';\n```\n\n### 타입 정의\n\n#### `ColorPreference`\n\n_`'light' | 'dark'`_\n"
  },
  {
    "path": "docs/ko/reference/react-native/ui/KeyboardAboveView.md",
    "content": "---\nsourcePath: packages/react-native/src/keyboard/KeyboardAboveView.tsx\n---\n\n# KeyboardAboveView\n\n키보드가 화면에 나타날 때 자식 컴포넌트를 키보드 위로 자동으로 올려주는 컴포넌트예요.\n예를 들어, 텍스트 입력 중 \"전송\" 버튼을 키보드 위에 고정시키고 싶을 때 유용해요.\n\n## 시그니처\n\n```typescript\nfunction KeyboardAboveView({ style, children, ...props }: ComponentProps<typeof View>): ReactElement;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">StyleProp&lt;ViewStyle&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\">추가적인 스타일을 적용할 수 있어요. 예를 들어, 배경색이나 크기 등을 설정할 수 있어요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props.children</span><span class=\"post-parameters--type\">ReactNode</span>\n    <br />\n    <p class=\"post-parameters--description\">키보드가 나타날 때 키보드 위로 표시할 컴포넌트예요. 예를 들어, 버튼, 텍스트 입력창 등을 넣을 수 있어요.</p>\n  </li>\n</ul>\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">ReactElement</span>\n    <br />\n    <p class=\"post-parameters--description\">키보드가 나타났을 때 키보드 위로 조정된 <a href=\"https://reactnative.dev/docs/animated#createanimatedcomponent\" target=\"_blank\" rel=\"noreferrer\">`Animated.View`</a>를 반환해요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### 키보드 위로 요소를 올리기\n\n```tsx\nimport { ScrollView, TextInput, View, Text } from 'react-native';\nimport { KeyboardAboveView } from '@granite-js/react-native';\n\nexport function KeyboardAboveViewExample() {\n  return (\n    <>\n      <ScrollView>\n        <TextInput placeholder=\"placeholder\" />\n      </ScrollView>\n\n      <KeyboardAboveView>\n        <View style={{ width: '100%', height: 50, backgroundColor: 'yellow' }}>\n          <Text>Keyboard 위에 있어요.</Text>\n        </View>\n      </KeyboardAboveView>\n    </>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/ui/OnAudioFocusChanged.md",
    "content": "---\nsourcePath: packages/react-native/src/video/instance.tsx\n---\n\n# OnAudioFocusChanged\n\n오디오 포커스가 변경될 때 호출되는 콜백 함수예요. `muted`가 `false`인 경우에는 반드시 구현해야 해요.\n\n## 시그니처\n\n```typescript\ntype OnAudioFocusChanged = (event: { hasAudioFocus: boolean }) => void;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">event</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">Object</span>\n    <br />\n    <p class=\"post-parameters--description\">오디오 포커스 정보를 담고 있는 이벤트 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">event.hasAudioFocus</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">boolean</span>\n        <br />\n        <p class=\"post-parameters--description\">비디오 컴포넌트가 오디오 포커스를 가지고 있는지 여부를 나타내요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n"
  },
  {
    "path": "docs/ko/reference/react-native/ui/ScrollViewInertialBackground.md",
    "content": "---\nsourcePath: packages/react-native/src/scroll-view-inertial-background/ScrollViewInertialBackground.tsx\n---\n\n# ScrollViewInertialBackground\n\niOS `ScrollView` 콘텐츠의 위, 아래 공간에 배경색을 추가해서, 스크롤 했을 때 자연스러운 시각 효과를 제공해요.\niOS에서는 스크롤이 끝에 도달했을 때 살짝 튕기는 듯한 [Bounce 효과](https://medium.com/@wcandillon/ios-bounce-list-effect-with-react-native-5102e3a83999)가 발생해요. 이때 콘텐츠 위, 아래 공간에 배경색을 설정하면 더 일관된 유저 경험을 제공할 수 있어요.\n\n## 시그니처\n\n```typescript\nfunction ScrollViewInertialBackground({\n  topColor,\n  bottomColor,\n  spacer: _spacer,\n}: ScrollViewInertialBackgroundProps): import('react/jsx-runtime').JSX.Element;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트에 전달되는 <code>props</code> 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.topColor</span><span class=\"post-parameters--type\">string</span>\n        <br />\n        <p class=\"post-parameters--description\">스크롤 위쪽 영역에 적용할 배경색이에요. 기본값은 시스템 테마에 맞춰 자동으로 적용되는 <code>adaptive.background</code>에요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.bottomColor</span><span class=\"post-parameters--type\">string</span>\n        <br />\n        <p class=\"post-parameters--description\">스크롤 아래쪽 영역에 적용할 배경색이에요. 기본값은 시스템 테마에 맞춰 자동으로 적용되는 <code>adaptive.background</code>에요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.spacer</span><span class=\"post-parameters--type\">number</span>\n        <br />\n        <p class=\"post-parameters--description\">배경색이 적용될 콘텐츠 위, 아래 공간 사이의 공간 크기를 지정해요. 기본값은 <a href=\"https://reactnative.dev/docs/next/usewindowdimensions\" target=\"_blank\" rel=\"noreferrer\">`useWindowDimensions`</a>로 가져온 화면 높이를 사용해요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## 예제\n\n### 스크롤 뷰 위, 아래에 배경색을 추가하기\n\n스크롤 뷰 위에 빨간색, 아래에 파란색 배경색을 추가해요. 스크롤을 벗어난 영역에 배경색이 적용돼요.\n\n```tsx\nimport { ScrollView, View, Text } from 'react-native';\nimport { ScrollViewInertialBackground } from '@granite-js/react-native';\n\nconst dummies = Array.from({ length: 20 }, (_, i) => i);\n\nexport function InertialBackgroundExample() {\n  return (\n    <ScrollView>\n      <ScrollViewInertialBackground topColor=\"red\" bottomColor=\"blue\" />\n      {dummies.map((i) => (\n        <View\n          key={`dummy-${i}`}\n          style={{ width: '100%', height: 100, borderBottomColor: 'black', borderBottomWidth: 1 }}\n        >\n          <Text>스크롤을 해보세요.</Text>\n        </View>\n      ))}\n    </ScrollView>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/react-native/ui/Video.md",
    "content": "---\nsourcePath: packages/react-native/src/video/Video.tsx\n---\n\n# Video\n\nVideo 컴포넌트는 다른 앱에서 음악을 재생 중일 때, 앱에서 그 음악을 중지시키지 않도록 오디오 포커스를 제어하는 로직이 구현된 컴포넌트에요. 앱의 상태에 따라 자동으로 재생하거나 일시정지해요. 예를 들어, 앱이 백그라운드로 전환되면 비디오가 자동으로 일시정지돼요.\n\n::: warning\nVideo 컴포넌트는 [`react-native-video` 버전(6.0.0-alpha.6)](https://github.com/TheWidlarzGroup/react-native-video/tree/v6.0.0-alpha.6) 을 사용하고 있어요. 따라서 일부 타입이나 기능이 최신 버전과 호환되지 않을 수 있어요.\n:::\n\n## 시그니처\n\n```typescript\nVideo: import('react').ForwardRefExoticComponent<\n  Omit<import('react-native-video').VideoProperties, 'onAudioFocusChanged'> & {\n    onAudioFocusChanged?: (event: { hasAudioFocus: boolean }) => void;\n  } & import('react').RefAttributes<VideoRef>\n>;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">VideoProperties</span>\n    <br />\n    <p class=\"post-parameters--description\"><a href=\"https://github.com/TheWidlarzGroup/react-native-video/tree/v6.0.0-alpha.6\" target=\"_blank\" rel=\"noreferrer\">`react-native-video`</a>에서 제공하는 속성들이에요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.muted</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">false</span>\n        <br />\n        <p class=\"post-parameters--description\">비디오의 음소거 상태를 제어해요. <code>true</code>면 비디오의 오디오가 음소거되고, <code>false</code>면 오디오가 재생돼요. 기본값은 <code>false</code>에요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.paused</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">false</span>\n        <br />\n        <p class=\"post-parameters--description\">비디오 재생을 제어하는 속성이에요. <code>true</code>이면 비디오가 일시 정지되고, <code>false</code>이면 비디오가 재생돼요. 기본값은 <code>false</code>이고, 자동 재생돼요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.onAudioFocusChanged</span><span class=\"post-parameters--type\">callback</span>\n        <br />\n        <p class=\"post-parameters--description\">오디오 포커스가 변경될 때 호출되는 콜백 함수에요. <code>muted</code> 가 <code>false</code> 인 경우에 필수로 구현해야해요. 자세한 내용은 <a href=\"/ko/reference/react-native/ui/OnAudioFocusChanged\" target=\"_blank\" rel=\"noreferrer\">OnAudioFocusChanged</a>를 참고해주세요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props.source.uri</span><span class=\"post-parameters--type\">string</span>\n    <br />\n    <p class=\"post-parameters--description\">재생할 비디오의 소스에요. 파일 경로나 URL을 설정할 수 있어요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">ref</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">Ref&lt;VideoRef&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\">비디오 인스턴스에 접근하기 위한 ref 객체에요. 이 ref를 통해 비디오 인스턴스의 여러 메서드에 접근할 수 있어요.</p>\n  </li>\n</ul>\n\n### 프로퍼티\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">isAvailable</span><span class=\"post-parameters--type\">boolean</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>Video</code> 컴포넌트를 사용할 수 있는지 확인하는 값이에요. 이 값을 확인해서 사용자가 비디오를 렌더링할 수 있는지 혹은 환경적 제약(예: 네트워크 연결 문제, 지원되지 않는 디바이스 등)으로 인해 비디오 기능을 사용할 수 없는지를 먼저 확인할 수 있어요. 이 값이 <code>false</code>라면, 비디오를 렌더링하지 않거나 대체 콘텐츠를 제공하는 등의 처리를 해야 해요.</p>\n  </li>\n</ul>\n\n### 반환 값\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">JSX.Element</span>\n    <br />\n    <p class=\"post-parameters--description\">비디오를 렌더링하는 JSX 엘리먼트를 반환해요. <code>Animated</code>를 사용해 부드러운 애니메이션 효과를 포함한 비디오 재생을 제공해요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### 동영상 자동 재생 예제\n\n```tsx\nimport { useRef } from 'react';\nimport { View } from 'react-native';\nimport { Video } from '@granite-js/react-native';\n\nexport function VideoExample() {\n  const videoRef = useRef(null);\n\n  return (\n    <View>\n      <Video\n        ref={videoRef}\n        source={{ uri: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' }}\n        muted={true}\n        paused={false}\n        resizeMode=\"cover\"\n        style={{ width: 300, height: 200, borderWidth: 1 }}\n      />\n    </View>\n  );\n}\n```\n\n## 참고\n\n- react-native-video https://github.com/react-native-video/react-native-video\n  비디오 컴포넌트 프로퍼티에 대한 자세한 내용은 공식 문서를 참고하세요.\n- react-native-video-6.0.0 https://github.com/TheWidlarzGroup/react-native-video/releases/tag/v6.0.0\n  샌드박스 앱에 설치된 버전의 소스코드\n"
  },
  {
    "path": "docs/ko/reference/style-utils/ui/Flex.md",
    "content": "---\nsourcePath: packages/style-utils/src/flex.tsx\n---\n\n# Flex\n\n`Flex`는 자식 요소들을 [**Flexbox 레이아웃**](https://reactnative.dev/docs/0.72/flexbox)을 기준으로 배치하는 컴포넌트예요. Flexbox를 사용하면, 가로 및 세로 방향으로 요소들을 쉽게 정렬하고, 중앙 정렬을 간편하게 설정할 수 있어요.\n자식 요소를 정 중앙에 배치할 때에는 `Flex.Center`, 세로 중앙에 배치할 때에는 `Flex.CenterVertical`, 가로 중앙에 배치할 때에는 `Flex.CenterHorizontal`을 사용해요.\n\n## 시그니처\n\n```typescript\nFlex: FlexType;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트에 전달되는 <code>props</code> 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span> · <span class=\"post-parameters--default\">&#39;stretch&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">중심축 기준(Flex 방향)으로 자식 요소를 정렬하는 설정 값이에요. <code>&#39;column&#39;</code> 방향을 예로 들면 <code>&#39;center&#39;</code>는 수평 중앙에 배치하고, <code>&#39;stretch&#39;</code>는 요소의 폭이 <code>&#39;auto&#39;</code>인 경우 부모의 폭에 맞게 늘려요. 이 값은 <a href=\"https://reactnative.dev/docs/0.72/layout-props#alignitems\" target=\"_blank\" rel=\"noreferrer\">`alignItems`</a>에 적용되며, 기본값은 <code>&#39;stretch&#39;</code>예요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span> · <span class=\"post-parameters--default\">&#39;flex-start&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">교차축(Flex 방향의 교차 방향) 기준으로 자식 요소를 정렬하는 설정 값이에요. <code>&#39;column&#39;</code> 방향을 예로 들어, <code>flex-start</code>는 요소를 부모의 위쪽에 배치하고, <code>&#39;center&#39;</code>는 부모의 수직 중앙에 배치해요. 이 값은 <a href=\"https://reactnative.dev/docs/0.72/layout-props#justifycontent\" target=\"_blank\" rel=\"noreferrer\">`justifyContent`</a>에 적용되며, 기본값은 <code>&#39;flex-start&#39;</code>예요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;column&#39; | &#39;row&#39;</span> · <span class=\"post-parameters--default\">&#39;column&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소들이 배치될 방향을 설정하는 값이에요. <a href=\"https://reactnative.dev/docs/0.72/layout-props#flexdirection\" target=\"_blank\" rel=\"noreferrer\">`flexDirection`</a>에 적용되며, 기본값은 <code>&#39;column&#39;</code>이에요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">ViewProps[&#39;style&#39;]</span>\n        <br />\n        <p class=\"post-parameters--description\"><code>Flex</code> 컴포넌트에 적용할 <code>style</code> 객체예요. Flexbox 레이아웃 외에 컴포넌트의 배경색, 테두리, 여백 등 다른 스타일을 지정할 때 사용해요. 기본값은 <code>undefined</code>에요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n### 프로퍼티\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">Center</span><span class=\"post-parameters--type\">FlexCenter</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>Flex.Center</code>는 자식 요소들을 <strong>Flex Layout</strong> 기준으로 가로와 세로 모두 정 중앙에 배치하는 컴포넌트예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">CenterVertical</span><span class=\"post-parameters--type\">FlexCenterVertical</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>Flex.CenterVertical</code>는 자식 요소들을 Flex Layout 기준으로 <strong>세로 방향으로 중앙에 정렬</strong>하기 위한 컴포넌트예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">CenterHorizontal</span><span class=\"post-parameters--type\">FlexCenterHorizontal</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>Flex.CenterHorizontal</code>는 자식 요소들을 Flex Layout 기준으로 <strong>가로 방향으로 중앙에 정렬</strong>하기 위한 컴포넌트예요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### 가로, 세로 방향으로 요소들을 배치하는 예제예요.\n\n```tsx\nimport { Flex } from '@granite-js/react-native';\nimport { Text } from 'react-native';\n\nfunction FlexExample() {\n  return (\n    <>\n      <Flex direction=\"column\">\n        <Text>세로로 배치해요</Text>\n        <Text>1</Text>\n        <Text>2</Text>\n        <Text>3</Text>\n      </Flex>\n      <Flex direction=\"row\">\n        <Text>가로로 배치해요</Text>\n        <Text>1</Text>\n        <Text>2</Text>\n        <Text>3</Text>\n      </Flex>\n    </>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/style-utils/ui/FlexCenter.md",
    "content": "---\nsourcePath: packages/style-utils/src/flex.tsx\n---\n\n# FlexCenter\n\n`Flex.Center`는 자식 요소들을 [**Flexbox 레이아웃**](https://reactnative.dev/docs/0.72/flexbox) 기준으로 가로와 세로 모두 정 중앙에 배치하는 컴포넌트예요.\n`alignItems`와 `justifyContent` 속성 모두 `'center'`로 설정되어, 자식 요소들이 부모 컴포넌트의 중앙에 배치돼요.\n`Flexbox`를 사용해 중앙 정렬을 간편하게 할 수 있어요.\n\n## 시그니처\n\n```typescript\nFlexCenter: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<View>>;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트에 전달되는 props 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span> · <span class=\"post-parameters--default\">&#39;center&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">중심축 기준(Flex 방향)으로 자식 요소를 정렬하는 설정 값이에요. <code>&#39;column&#39;</code> 방향을 예로 들어, <code>&#39;center&#39;</code>는 수평 중앙에 배치하고, <code>&#39;stretch&#39;</code>는 요소의 폭이 <code>&#39;auto&#39;</code>일 때 부모의 폭에 맞게 늘려요. 이 값은 <a href=\"https://reactnative.dev/docs/0.72/layout-props#alignitems\" target=\"_blank\" rel=\"noreferrer\">`alignItems`</a>에 적용되며, 기본값은 <code>&#39;center&#39;</code>예요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span> · <span class=\"post-parameters--default\">&#39;center&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">교차축(Flex 방향의 교차 방향) 기준으로 자식 요소를 정렬하는 설정 값이에요. <code>&#39;column&#39;</code> 방향을 예로 들어, <code>flex-start</code>는 요소를 부모의 위쪽에 배치하고, <code>&#39;center&#39;</code>는 부모의 수직 중앙에 배치해요. 이 값은 <a href=\"https://reactnative.dev/docs/0.72/layout-props#justifycontent\" target=\"_blank\" rel=\"noreferrer\">`justifyContent`</a>에 적용되며, 기본값은 <code>&#39;center&#39;</code>예요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;column&#39; | &#39;row&#39;</span> · <span class=\"post-parameters--default\">&#39;column&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소들이 배치될 방향을 설정하는 값이에요. 기본값은 <code>&#39;column&#39;</code>으로, 세로 방향으로 배치돼요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">ViewProps[&#39;style&#39;]</span>\n        <br />\n        <p class=\"post-parameters--description\"><code>Flex.Center</code> 컴포넌트에 적용할 <code>style</code> 객체예요. Flexbox 레이아웃 외에 컴포넌트의 배경색, 테두리, 여백 등 다른 스타일을 지정할 때 사용해요. 기본값은 <code>undefined</code>에요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## 예제\n\n### 요소를 정 중앙에 배치하는 예제예요.\n\n```tsx\nimport { Flex } from '@granite-js/react-native';\nimport { Text } from 'react-native';\n\nfunction FlexCenterExample() {\n  return (\n    <Flex.Center style={{ width: '100%', height: 100, borderWidth: 1 }}>\n      <Text>정 중앙에 배치해요</Text>\n    </Flex.Center>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/style-utils/ui/FlexCenterHorizontal.md",
    "content": "---\nsourcePath: packages/style-utils/src/flex.tsx\n---\n\n# FlexCenterHorizontal\n\n`Flex.CenterHorizontal`는 자식 요소들을 [**Flexbox 레이아웃**](https://reactnative.dev/docs/0.72/flexbox) 기준으로 **가로 방향으로 중앙에 정렬**하기 위한 컴포넌트예요.\n`alignItems` 속성이 `'center'`로 설정되어, 자식 요소들이 부모 컴포넌트의 가로 중앙에 배치돼요.\n\n## 시그니처\n\n```typescript\nFlexCenterHorizontal: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<View>>;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트에 전달되는 props 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span> · <span class=\"post-parameters--default\">&#39;center&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">중심축 기준(Flex 방향)으로 자식 요소를 정렬하는 설정 값이에요. <code>&#39;column&#39;</code> 방향을 예로 들어, <code>&#39;center&#39;</code>는 수평 중앙에 배치하고, <code>&#39;stretch&#39;</code>는 요소의 폭이 <code>&#39;auto&#39;</code>인 경우 부모의 폭에 맞게 늘려요. 이 값은 <a href=\"https://reactnative.dev/docs/0.72/layout-props#alignitems\" target=\"_blank\" rel=\"noreferrer\">`alignItems`</a>에 적용되며, 기본값은 <code>&#39;center&#39;</code>예요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span> · <span class=\"post-parameters--default\">&#39;flex-start&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">교차축(Flex 방향의 교차 방향) 기준으로 자식 요소를 정렬하는 설정 값이에요. <code>&#39;column&#39;</code> 방향을 예로 들어, <code>flex-start</code>는 요소를 부모의 위쪽에 배치하고, <code>&#39;center&#39;</code>는 부모의 수직 중앙에 배치해요. 이 값은 <a href=\"https://reactnative.dev/docs/0.72/layout-props#justifycontent\" target=\"_blank\" rel=\"noreferrer\">`justifyContent`</a>에 적용되며, 기본값은 <code>&#39;flex-start&#39;</code>예요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;column&#39; | &#39;row&#39;</span> · <span class=\"post-parameters--default\">&#39;column&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소들이 배치될 방향을 설정하는 값이에요. 기본값은 <code>&#39;column&#39;</code>으로 세로 방향으로 배치돼요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">ViewProps[&#39;style&#39;]</span>\n        <br />\n        <p class=\"post-parameters--description\"><code>Flex.CenterHorizontal</code> 컴포넌트에 적용할 <code>style</code> 객체예요. Flexbox 레이아웃 외에 컴포넌트의 배경색, 테두리, 여백 등 다른 스타일을 지정할 때 사용해요. 기본값은 <code>undefined</code>에요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## 예제\n\n### 가로 방향으로 요소들을 중앙 정렬하는 예제예요.\n\n```tsx\nimport { Flex } from '@granite-js/react-native';\nimport { Text } from 'react-native';\n\nfunction FlexCenterHorizontalExample() {\n  return (\n    <Flex.CenterHorizontal style={{ width: '100%', height: 100, borderWidth: 1 }}>\n      <Text>가로 중앙에 배치해요</Text>\n    </Flex.CenterHorizontal>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/style-utils/ui/FlexCenterVertical.md",
    "content": "---\nsourcePath: packages/style-utils/src/flex.tsx\n---\n\n# FlexCenterVertical\n\n`Flex.CenterVertical`는 자식 요소들을 [**Flexbox 레이아웃**](https://reactnative.dev/docs/0.72/flexbox) 기준으로 **세로 방향으로 중앙에 정렬**하기 위한 컴포넌트예요.\n`justifyContent` 속성이 `'center'`로 설정되어, 자식 요소들이 부모 컴포넌트의 세로 중앙에 배치돼요.\n\n## 시그니처\n\n```typescript\nFlexCenterVertical: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<View>>;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트에 전달되는 props 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span> · <span class=\"post-parameters--default\">&#39;center&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">중심축 기준(Flex 방향)으로 자식 요소를 정렬하는 설정 값이에요. <code>&#39;column&#39;</code> 방향을 예로 들어, <code>&#39;center&#39;</code>는 수평 중앙에 배치하고, <code>&#39;stretch&#39;</code>는 요소의 폭이 <code>&#39;auto&#39;</code>인 경우 부모의 폭에 맞게 늘려요. 이 값은 <a href=\"https://reactnative.dev/docs/0.72/layout-props#alignitems\" target=\"_blank\" rel=\"noreferrer\">`alignItems`</a>에 적용되며, 기본값은 <code>&#39;stretch&#39;</code>예요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span> · <span class=\"post-parameters--default\">&#39;center&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">교차축(Flex 방향의 교차 방향) 기준으로 자식 요소를 정렬하는 설정 값이에요. <code>&#39;column&#39;</code> 방향을 예로 들어, <code>flex-start</code>는 요소를 부모의 위쪽에 배치하고, <code>&#39;center&#39;</code>는 부모의 수직 중앙에 배치해요. 이 값은 <a href=\"https://reactnative.dev/docs/0.72/layout-props#justifycontent\" target=\"_blank\" rel=\"noreferrer\">`justifyContent`</a>에 적용되며, 기본값은 <code>&#39;center&#39;</code>예요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;column&#39; | &#39;row&#39;</span> · <span class=\"post-parameters--default\">&#39;column&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소들이 배치될 방향을 설정하는 값이에요. 기본값은 <code>&#39;column&#39;</code>으로, 세로 방향으로 배치돼요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">ViewProps[&#39;style&#39;]</span>\n        <br />\n        <p class=\"post-parameters--description\"><code>Flex.CenterVertical</code> 컴포넌트에 적용할 <code>style</code> 객체예요. Flexbox 레이아웃 외에 컴포넌트의 배경색, 테두리, 여백 등 다른 스타일을 지정할 때 사용해요. 기본값은 <code>undefined</code>에요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## 예제\n\n### 세로 방향으로 요소들을 중앙 정렬하는 예제예요.\n\n```tsx\nimport { Flex } from '@granite-js/react-native';\nimport { Text } from 'react-native';\n\nfunction FlexCenterVerticalExample() {\n  return (\n    <Flex.CenterVertical style={{ width: '100%', height: 100, borderWidth: 1 }}>\n      <Text>세로 중앙에 배치해요</Text>\n    </Flex.CenterVertical>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/style-utils/ui/Spacing.md",
    "content": "---\nsourcePath: packages/style-utils/src/spacing.tsx\n---\n\n# Spacing\n\n`Spacing`은 빈 공간을 차지해서 여백을 추가하는 컴포넌트예요. 가로 혹은 세로 방향으로 여백의 크기를 지정할 수 있어요.\n\n## 시그니처\n\n```typescript\nSpacing: import('react').NamedExoticComponent<Props>;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트에 전달되는 <code>props</code> 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.size</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">number</span>\n        <br />\n        <p class=\"post-parameters--description\">여백의 크기를 설정하는 숫자 값이에요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;vertical&#39; | &#39;horizontal&#39;</span> · <span class=\"post-parameters--default\">&#39;vertical&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">여백을 차지할 방향을 설정해요. 기본값은 <code>&#39;vertical&#39;</code>이에요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">StyleProp&lt;ViewStyle&gt;</span>\n        <br />\n        <p class=\"post-parameters--description\"><code>Spacing</code> 컴포넌트에 적용할 <code>style</code> 값이에요. 기본값은 <code>undefined</code>이고, 추가 스타일을 적용할 때 사용돼요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## 예제\n\n### 가로, 세로 방향에 크기가 `16`인 여백을 추가하여 빈 공간을 만들어 낸 예제\n\n```tsx\nimport { View, Text } from 'react-native';\nimport { Spacing } from '@granite-js/react-native';\n\nexport function SpacingExample() {\n  return (\n    <View>\n      <Text>Top</Text>\n      <Spacing size={16} direction=\"vertical\" style={{ backgroundColor: 'red', width: 5 }} />\n      <Text>Bottom, 세로 여백만큼 아래에 위치해 있어요</Text>\n\n      <View style={{ flexDirection: 'row' }}>\n        <Text>Left</Text>\n        <Spacing size={16} direction=\"horizontal\" style={{ backgroundColor: 'red', height: 5 }} />\n        <Text>Right, 가로 여백만큼 옆에 위치해 있어요</Text>\n      </View>\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/style-utils/ui/Stack.md",
    "content": "---\nsourcePath: packages/style-utils/src/stack.tsx\n---\n\n# Stack\n\n`Stack`은 자식 요소들을 Stack 방식으로 가로 혹은 세로로 배치하고, 자식 요소 사이에 간격을 설정할 수 있는 컴포넌트예요.\n`direction` 속성으로 가로(`horizontal`) 또는 세로(`vertical`) 방향을 지정할 수 있고, 자식 요소들 사이의 간격을 `gutter` 속성으로 조절할 수 있어요.\n가로로 배치할 때는 `Stack.Horizontal`, 세로로 배치할 때는 `Stack.Vertical` 컴포넌트를 사용할 수 있어요.\n\n## 시그니처\n\n```typescript\nStack: StackType;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트에 전달되는 props 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">중심축 기준(Flex 방향)으로 자식 요소를 정렬하는 설정 값이에요. <code>&#39;column&#39;</code> 방향을 예로 들면 <code>&#39;center&#39;</code>는 수평 중앙에 배치하고, <code>&#39;stretch&#39;</code>는 요소의 폭이 <code>&#39;auto&#39;</code>인 경우 부모의 폭에 맞게 늘려요. 이 값은 <a href=\"https://reactnative.dev/docs/0.72/layout-props#alignitems\" target=\"_blank\" rel=\"noreferrer\">`alignItems`</a>에 적용돼요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">교차축(Flex 방향의 교차 방향) 기준으로 자식 요소를 정렬하는 설정 값이에요. <code>&#39;column&#39;</code> 방향을 예로 들어, <code>flex-start</code>는 요소를 부모의 위쪽에 배치하고, <code>&#39;center&#39;</code>는 부모의 수직 중앙에 배치해요. 이 값은 <a href=\"https://reactnative.dev/docs/0.72/layout-props#justifycontent\" target=\"_blank\" rel=\"noreferrer\">`justifyContent`</a>에 적용돼요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;vertical&#39; | &#39;horizontal&#39;</span> · <span class=\"post-parameters--default\">&#39;vertical&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소를 배치할 방향을 설정하는 값이에요. 기본값은 <code>&#39;vertical&#39;</code>이에요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.gutter</span><span class=\"post-parameters--type\">number | ReactElement</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소 간의 간격을 설정하는 값이에요. 숫자를 입력하면 픽셀 단위로 여백을 설정하고, <code>ReactElement</code>를 전달하면 해당 컴포넌트가 간격으로 사용돼요. 숫자를 사용하면 간격을 정확하게 제어할 수 있고, <code>ReactElement</code>를 사용하면 더 복잡한 커스텀 간격을 구현할 수 있어요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n### 프로퍼티\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">Horizontal</span><span class=\"post-parameters--type\">StackHorizontal</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>Stack.Horizontal</code>은 자식 요소들을 <strong>가로 방향</strong>으로 정렬하여 쌓는 컴포넌트예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">Vertical</span><span class=\"post-parameters--type\">StackVertical</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>Stack.Vertical</code>은 자식 요소들을 <strong>세로 방향</strong>으로 정렬하여 쌓는 컴포넌트예요.</p>\n  </li>\n</ul>\n\n## 예제\n\n### 가로, 세로 방향으로 요소들을 배치하고 간격을 16으로 설정한 예제예요.\n\n```tsx\nimport { Text } from 'react-native';\nimport { Stack } from '@granite-js/react-native';\n\nexport function StackExample() {\n  return (\n    <>\n      <Stack gutter={16} direction=\"horizontal\">\n        <Text>16간격을 두고 가로 방향으로 배치해요</Text>\n        <Text>1</Text>\n        <Text>2</Text>\n        <Text>3</Text>\n      </Stack>\n      <Stack gutter={16} direction=\"vertical\">\n        <Text>16간격을 두고 세로 방향으로 배치해요</Text>\n        <Text>1</Text>\n        <Text>2</Text>\n        <Text>3</Text>\n      </Stack>\n    </>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/style-utils/ui/StackHorizontal.md",
    "content": "---\nsourcePath: packages/style-utils/src/stack.tsx\n---\n\n# StackHorizontal\n\n`Stack.Horizontal`은 자식 요소를 가로로 쌓아 배치하는 컴포넌트에요. 이 컴포넌트를 사용하면, 자식 요소 간의 간격을 `gutter` 속성으로 쉽게 조절할 수 있어, 가로 방향으로 일관된 레이아웃을 유지할 수 있어요.\n\n## 시그니처\n\n```typescript\nStackHorizontal: import('react').ForwardRefExoticComponent<\n  StackWithoutDirectionProps & import('react').RefAttributes<View>\n>;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트에 전달되는 props 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span> · <span class=\"post-parameters--default\">&#39;stretch&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소의 가로 정렬을 설정하는 값이에요. Flexbox의 <code>align-items</code> 속성과 동일하게 동작하며, 기본값은 <code>&#39;stretch&#39;</code>로 자식 요소의 폭이 <code>&#39;auto&#39;</code>인 경우 부모의 너비에 맞춰 늘어나요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span> · <span class=\"post-parameters--default\">&#39;flex-start&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소의 가로 정렬을 설정하는 값이에요. Flexbox의 <code>justify-content</code> 속성과 동일하게 동작하며, 기본값은 <code>&#39;flex-start&#39;</code>로 자식 요소들이 위쪽에 정렬돼요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.gutter</span><span class=\"post-parameters--type\">number | ReactElement</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소 간의 간격을 설정하는 값이에요. 숫자를 입력하면 픽셀 단위로 여백을 설정하고, <code>ReactElement</code>를 전달하면 해당 컴포넌트가 간격으로 사용돼요. 숫자를 사용하면 간격을 정확하게 제어할 수 있고, <code>ReactElement</code>를 사용하면 더 복잡한 커스텀 간격을 구현할 수 있어요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## 예제\n\n### 가로 방향으로 요소들을 배치하고, 간격을 16으로 설정한 예제예요.\n\n```tsx\nimport { Stack } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\nfunction StackHorizontalExample() {\n  return (\n    <Stack.Horizontal gutter={16}>\n      <Text>16간격을 두고 가로 방향으로 배치해요</Text>\n      <Text>1</Text>\n      <Text>2</Text>\n      <Text>3</Text>\n    </Stack.Horizontal>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/style-utils/ui/StackVertical.md",
    "content": "---\nsourcePath: packages/style-utils/src/stack.tsx\n---\n\n# StackVertical\n\n`Stack.Vertical`은 자식 요소를 세로로 쌓아 배치하는 컴포넌트에요. 이 컴포넌트를 사용하면 자식 요소 간의 간격을 `gutter` 속성으로 쉽게 조절할 수 있어, 세로 방향으로 일관된 레이아웃을 유지할 수 있어요.\n\n## 시그니처\n\n```typescript\nStackVertical: import('react').ForwardRefExoticComponent<\n  StackWithoutDirectionProps & import('react').RefAttributes<View>\n>;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트에 전달되는 props 객체예요.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">string</span> · <span class=\"post-parameters--default\">&#39;stretch&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소의 세로 정렬을 설정하는 값이에요. Flexbox의 <code>align-items</code> 속성과 동일하게 동작하며, 기본값은 <code>&#39;stretch&#39;</code>로 자식 요소의 높이가 <code>&#39;auto&#39;</code>인 경우 부모의 높이에 맞춰 늘어나요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">string</span> · <span class=\"post-parameters--default\">&#39;flex-start&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소의 가로 정렬을 설정하는 값이에요. Flexbox의 <code>justify-content</code> 속성과 동일하게 동작하며, 기본값은 <code>&#39;flex-start&#39;</code>로 자식 요소들이 왼쪽에 정렬돼요.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.gutter</span><span class=\"post-parameters--type\">number | ReactElement</span>\n        <br />\n        <p class=\"post-parameters--description\">자식 요소 간의 간격을 설정하는 값이에요. 숫자를 입력하면 픽셀 단위로 여백을 설정하고, <code>ReactElement</code>를 전달하면 해당 컴포넌트가 간격으로 사용돼요. 숫자를 사용하면 간격을 정확하게 제어할 수 있고, <code>ReactElement</code>를 사용하면 더 복잡한 커스텀 간격을 구현할 수 있어요.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## 예제\n\n### 가로 방향으로 요소들을 배치하고 간격으로 16만큼 설정한 예제예요.\n\n````tsx\nimport { Stack } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\n```tsx\nimport { Stack } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\nfunction StackVerticalExample() {\n  return (\n       <Stack.Vertical gutter={16}>\n        <Text>16간격을 두고 세로 방향으로 배치해요</Text>\n        <Text>1</Text>\n        <Text>2</Text>\n        <Text>3</Text>\n      </Stack.Vertical>\n  );\n}\n````\n"
  },
  {
    "path": "docs/ko/reference/style-utils/ui/margin.md",
    "content": "---\nsourcePath: packages/style-utils/src/box-spacing.tsx\n---\n\n# margin\n\n`margin` 함수는 컴포넌트의 외부 간격을 설정해서, 컴포넌트들 간의 적절한 간격을 확보해요. 가로(x), 세로(y), 그리고 각 방향(top, right, bottom, left)별로 외부 여백을 숫자로 지정할 수 있어요.\n숫자를 입력하면 모든 방향에 동일한 값을 적용하거나, 각 방향별로 개별 설정이 가능해요. 또한 자주 쓰는 값에 대한 프리셋이 있어 쉽게 적용할 수 있어요.\n\n## 시그니처\n\n```typescript\nmargin: BoxSpacing;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">option</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">BoxSpacingOption</span>\n    <br />\n    <p class=\"post-parameters--description\">바깥쪽 여백을 지정하는 옵션 값이예요. 숫자를 넣으면 모든 방향에 동일한 값을 적용하고,</p>\n  </li>\n</ul>\n\n각 방향에 대해 개별 값을 설정할 수도 있어요.\n\n### 프로퍼티\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 가로 방향(왼쪽과 오른쪽)에 입력한 숫자만큼의 바깥쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 4px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 8px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 12px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 16px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 24px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 32px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 세로 방향(위쪽과 아래쪽)에 입력한 숫자만큼의 바깥쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 4px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 8px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 12px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 16px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 24px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 32px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 위쪽 방향에 입력한 숫자만큼의 바깥쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 4px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 8px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 12px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 16px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 24px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 32px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 오른쪽 방향에 입력한 숫자만큼의 바깥쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 4px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 8px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 12px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 16px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 24px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 32px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 아래쪽 방향에 입력한 숫자만큼의 바깥쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 4px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 8px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 12px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 16px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 24px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 32px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 왼쪽 방향에 입력한 숫자만큼의 바깥쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 4px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 8px의 바깥쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 12px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 16px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 24px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 32px의 바깥쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n\n### 예제\n\n## 가로, 세로 방향에 8px의 바깥쪽 여백을 적용하고, 아래 방향에 임의의 여백(100px)을 적용하는 예제예요.\n\n```tsx\nimport { margin } from '@granite-js/react-native';\nimport { View } from 'react-native';\n\nfunction Component() {\n  return (\n    <View>\n      <View style={margin.x8}>\n        <Text>가로 여백이 있어요</Text>\n      </View>\n      <View style={margin.y8}>\n        <Text>세로 여백이 있어요</Text>\n      </View>\n      <View style={margin.bottom(100)}>\n        <Text>아래에 100만큼의 여백이 있어요</Text>\n      </View>\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/ko/reference/style-utils/ui/padding.md",
    "content": "---\nsourcePath: packages/style-utils/src/box-spacing.tsx\n---\n\n# padding\n\n`padding` 함수는 컴포넌트의 안쪽 여백을 설정함으로써 콘텐츠와 경계 사이에 적절한 간격을 확보해요. 가로(x), 세로(y), 그리고 각 방향(top, right, bottom, left)별로 외부 여백을 숫자로 지정할 수 있어요.\n숫자를 입력하면 모든 방향에 동일한 값을 적용하거나, 각 방향별로 개별 설정이 가능해요. 또한 자주 쓰는 값에 대한 프리셋이 있어 쉽게 적용할 수 있어요.\n\n## 시그니처\n\n```typescript\npadding: BoxSpacing;\n```\n\n### 파라미터\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">option</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">BoxSpacingOption</span>\n    <br />\n    <p class=\"post-parameters--description\">안쪽 여백을 지정하는 옵션 값이예요. 숫자를 넣으면 모든 방향에 동일한 값을 적용하고,</p>\n  </li>\n</ul>\n\n각 방향에 대해 개별 값을 설정할 수도 있어요.\n\n### 프로퍼티\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 가로 방향(왼쪽과 오른쪽)에 입력한 숫자만큼의 안쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 4px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 8px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 12px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 16px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 24px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">가로 방향에 32px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 세로 방향(위쪽과 아래쪽)에 입력한 숫자만큼의 안쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 4px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 8px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 12px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 16px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 24px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">세로 방향에 32px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 위쪽 방향에 입력한 숫자만큼의 안쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 4px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 8px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 12px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 16px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 24px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">위에 32px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 오른쪽 방향에 입력한 숫자만큼의 안쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 4px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 8px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 12px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 16px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 24px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">오른쪽에 32px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 아래쪽 방향에 입력한 숫자만큼의 안쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 4px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 8px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 12px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 16px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 24px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">아래에 32px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">컴포넌트의 왼쪽 방향에 입력한 숫자만큼의 안쪽 여백을 설정하는 스타일 객체를 반환해요. 반환된 객체는 컴포넌트의 <code>style</code> 속성에 전달되어 여백이 적용돼요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left4</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 4px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left8</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 8px의 안쪽 여백을 적용하는 스타일 객체예요</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left12</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 12px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left16</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 16px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left24</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 24px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left32</span><span class=\"post-parameters--required\">필수</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">왼쪽에 32px의 안쪽 여백을 적용하는 스타일 객체예요.</p>\n  </li>\n</ul>\n\n## 예제\n\n## 가로, 세로 방향에 8px의 안쪽 여백을 적용하고, 아래 방향에 임의의 여백(100px)을 적용하는 예제예요.\n\n```tsx\nimport { padding } from '@granite-js/react-native';\nimport { View } from 'react-native';\n\nfunction Component() {\n  return (\n    <View>\n      <View style={padding.x8}>\n        <Text>가로 여백이 있어요</Text>\n      </View>\n      <View style={padding.y8}>\n        <Text>세로 여백이 있어요</Text>\n      </View>\n      <View style={padding.bottom(100)}>\n        <Text>아래에 100만큼의 여백이 있어요</Text>\n      </View>\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/package.json",
    "content": "{\n  \"name\": \"granite-docs\",\n  \"private\": true,\n  \"devDependencies\": {\n    \"@algolia/client-search\": \"^4.24.0\",\n    \"@types/node\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\",\n    \"vitepress\": \"^1.4.1\",\n    \"vue\": \"^3.4.31\"\n  },\n  \"scripts\": {\n    \"docs:dev\": \"yarn vitepress dev\",\n    \"docs:build\": \"yarn vitepress build\",\n    \"docs:preview\": \"yarn vitepress preview\",\n    \"preview\": \"npx serve ./.vitepress/dist\"\n  }\n}\n"
  },
  {
    "path": "docs/reference/image/ui/Image.md",
    "content": "---\nsourcePath: packages/image/src/Image.tsx\n---\n\n# Image\n\nYou can use the `Image` component to load and render bitmap images (such as PNG, JPG) or vector images (SVG). It automatically renders with the appropriate method depending on the image format.\n\n## Signature\n\n```typescript\ndeclare function Image(props: ImageProps): import('react/jsx-runtime').JSX.Element;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">The <code>props</code> object passed to the component.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">object</span>\n        <br />\n        <p class=\"post-parameters--description\">An object that defines the style for the image component. It can include layout-related properties like <code>width</code> and <code>height</code>.</p>\n      </li>\n      <ul class=\"post-parameters-ul\">\n        <li class=\"post-parameters-li\">\n          <span class=\"post-parameters--name\">props.source</span><span class=\"post-parameters--type\">object</span>\n          <br />\n          <p class=\"post-parameters--description\">An object containing information about the image resource to load.</p>\n          <ul class=\"post-parameters-ul\">\n            <li class=\"post-parameters-li\">\n              <span class=\"post-parameters--name\">props.source.uri</span><span class=\"post-parameters--type\">string</span>\n              <br />\n              <p class=\"post-parameters--description\">The URI address representing the image resource to load.</p>\n            </li>\n            <li class=\"post-parameters-li\">\n              <span class=\"post-parameters--name\">props.source.cache</span><span class=\"post-parameters--type\">&#39;immutable&#39; | &#39;web&#39; | &#39;cacheOnly&#39;</span> · <span class=\"post-parameters--default\">&#39;immutable&#39;</span>\n              <br />\n              <p class=\"post-parameters--description\">An option to set the image caching strategy. This applies only to bitmap images. The default value is <code>immutable</code>.</p>\n            </li>\n          </ul>\n        </li>\n      </ul>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.onLoadStart</span><span class=\"post-parameters--type\">() =&gt; void</span>\n        <br />\n        <p class=\"post-parameters--description\">A callback function that is called when image loading starts.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.onLoadEnd</span><span class=\"post-parameters--type\">() =&gt; void</span>\n        <br />\n        <p class=\"post-parameters--description\">A callback function that is called when image loading finishes.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.onError</span><span class=\"post-parameters--type\">() =&gt; void</span>\n        <br />\n        <p class=\"post-parameters--description\">A callback function that is called when an error occurs during image loading.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## Example\n\n### Example: Loading and rendering an image\n\nThe following example shows how to load bitmap and vector image resources, and how to print an error message to `console.log` if an error occurs.\n\n```tsx\nimport { Image } from '@granite-js/react-native';\nimport { View } from 'react-native';\n\nexport function ImageExample() {\n  return (\n    <View>\n      <Image\n        source={{ uri: 'my-image-link' }}\n        style={{\n          width: 300,\n          height: 300,\n          borderWidth: 1,\n        }}\n        onError={() => {\n          console.log('Failed to load image');\n        }}\n      />\n\n      <Image\n        source={{ uri: 'my-svg-link' }}\n        style={{\n          width: 300,\n          height: 300,\n          borderWidth: 1,\n        }}\n        onError={() => {\n          console.log('Failed to load image');\n        }}\n      />\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/manifest.json",
    "content": "{\n  \"title\": \"manifest for vitepress sidebar items\",\n  \"description\": \"file list\",\n  \"version\": \"1.0.0\",\n  \"documents\": {\n    \"image\": {\n      \"name\": \"image\",\n      \"itemCount\": 1,\n      \"firstItemPath\": \"/reference/image/ui/Image\",\n      \"items\": [\n        {\n          \"text\": \"image\",\n          \"collapsed\": true,\n          \"items\": [\n            {\n              \"text\": \"UI\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"Image\",\n                  \"link\": \"/reference/image/ui/Image\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    },\n    \"react-native\": {\n      \"name\": \"react-native\",\n      \"itemCount\": 19,\n      \"firstItemPath\": \"/reference/react-native/core/Granite\",\n      \"items\": [\n        {\n          \"text\": \"react-native\",\n          \"collapsed\": true,\n          \"items\": [\n            {\n              \"text\": \"Config\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"defineConfig\",\n                  \"link\": \"/reference/react-native/config/defineConfig\"\n                }\n              ]\n            },\n\n            {\n              \"text\": \"Core\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"Granite\",\n                  \"link\": \"/reference/react-native/core/Granite\"\n                },\n                {\n                  \"text\": \"InitialProps\",\n                  \"link\": \"/reference/react-native/core/InitialProps\"\n                },\n                {\n                  \"text\": \"useInitialProps\",\n                  \"link\": \"/reference/react-native/core/useInitialProps\"\n                },\n                {\n                  \"text\": \"useIsInitialScreen\",\n                  \"link\": \"/reference/react-native/core/useIsInitialScreen\"\n                }\n              ]\n            },\n\n            {\n              \"text\": \"Screen Control\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"IOFlatList\",\n                  \"link\": \"/reference/react-native/screen-control/IOFlatList\"\n                },\n                {\n                  \"text\": \"IOScrollView\",\n                  \"link\": \"/reference/react-native/screen-control/IOScrollView\"\n                },\n                {\n                  \"text\": \"ImpressionArea\",\n                  \"link\": \"/reference/react-native/screen-control/ImpressionArea\"\n                },\n                {\n                  \"text\": \"InView\",\n                  \"link\": \"/reference/react-native/screen-control/InView\"\n                },\n                {\n                  \"text\": \"closeView\",\n                  \"link\": \"/reference/react-native/screen-control/closeView\"\n                },\n                {\n                  \"text\": \"useBackEvent\",\n                  \"link\": \"/reference/react-native/screen-control/useBackEvent\"\n                },\n                {\n                  \"text\": \"useParams\",\n                  \"link\": \"/reference/react-native/screen-control/useParams\"\n                },\n                {\n                  \"text\": \"useVisibility\",\n                  \"link\": \"/reference/react-native/screen-control/useVisibility\"\n                },\n                {\n                  \"text\": \"useVisibilityChange\",\n                  \"link\": \"/reference/react-native/screen-control/useVisibilityChange\"\n                },\n                {\n                  \"text\": \"useRouterBackHandler\",\n                  \"link\": \"/reference/react-native/screen-control/useRouterBackHandler\"\n                }\n              ]\n            },\n            {\n              \"text\": \"Screen Navigation\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"openURL\",\n                  \"link\": \"/reference/react-native/screen-navigation/openURL\"\n                }\n              ]\n            },\n            {\n              \"text\": \"UI\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"BlurView\",\n                  \"link\": \"/reference/react-native/ui/BlurView\"\n                },\n                {\n                  \"text\": \"ColorPreference\",\n                  \"link\": \"/reference/react-native/ui/ColorPreference\"\n                },\n                {\n                  \"text\": \"KeyboardAboveView\",\n                  \"link\": \"/reference/react-native/ui/KeyboardAboveView\"\n                },\n                {\n                  \"text\": \"OnAudioFocusChanged\",\n                  \"link\": \"/reference/react-native/ui/OnAudioFocusChanged\"\n                },\n                {\n                  \"text\": \"ScrollViewInertialBackground\",\n                  \"link\": \"/reference/react-native/ui/ScrollViewInertialBackground\"\n                },\n                {\n                  \"text\": \"Video\",\n                  \"link\": \"/reference/react-native/ui/Video\"\n                },\n                {\n                  \"text\": \"BackButton\",\n                  \"link\": \"/reference/react-native/ui/BackButton\"\n                }\n              ]\n            },\n            {\n              \"text\": \"Environment Check\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"getSchemeUri\",\n                  \"link\": \"/reference/react-native/environment-check/getSchemeUri\"\n                },\n                {\n                  \"text\": \"useInitialSearchParams\",\n                  \"link\": \"/reference/react-native/environment-check/useInitialSearchParams\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    },\n    \"style-utils\": {\n      \"name\": \"style-utils\",\n      \"itemCount\": 10,\n      \"firstItemPath\": \"/reference/style-utils/ui/Flex\",\n      \"items\": [\n        {\n          \"text\": \"style-utils\",\n          \"collapsed\": true,\n          \"items\": [\n            {\n              \"text\": \"UI\",\n              \"collapsed\": true,\n              \"items\": [\n                {\n                  \"text\": \"Flex\",\n                  \"link\": \"/reference/style-utils/ui/Flex\"\n                },\n                {\n                  \"text\": \"FlexCenter\",\n                  \"link\": \"/reference/style-utils/ui/FlexCenter\"\n                },\n                {\n                  \"text\": \"FlexCenterHorizontal\",\n                  \"link\": \"/reference/style-utils/ui/FlexCenterHorizontal\"\n                },\n                {\n                  \"text\": \"FlexCenterVertical\",\n                  \"link\": \"/reference/style-utils/ui/FlexCenterVertical\"\n                },\n                {\n                  \"text\": \"Spacing\",\n                  \"link\": \"/reference/style-utils/ui/Spacing\"\n                },\n                {\n                  \"text\": \"Stack\",\n                  \"link\": \"/reference/style-utils/ui/Stack\"\n                },\n                {\n                  \"text\": \"StackHorizontal\",\n                  \"link\": \"/reference/style-utils/ui/StackHorizontal\"\n                },\n                {\n                  \"text\": \"StackVertical\",\n                  \"link\": \"/reference/style-utils/ui/StackVertical\"\n                },\n                {\n                  \"text\": \"margin\",\n                  \"link\": \"/reference/style-utils/ui/margin\"\n                },\n                {\n                  \"text\": \"padding\",\n                  \"link\": \"/reference/style-utils/ui/padding\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": "docs/reference/react-native/config/defineConfig.md",
    "content": "---\nsourcePath: packages/cli/src/config/defineConfig.ts\n---\n\n# defineConfig\n\nConfigures your Granite application by defining key settings in `granite.config.ts`.\n\nThe configuration lets you specify:\n\n- How users will access your app through a URL scheme (e.g. `granite://`)\n- Your app's unique name that appears in the URL (e.g. `granite://my-service`)\n- Build settings for bundlers like ESBuild and Metro\n- Code transformation settings through Babel\n- Additional functionality through Granite plugins\n\n## Signature\n\n```typescript\nfunction defineConfig({\n  appName,\n  host,\n  scheme,\n  plugins,\n  outdir,\n  entryFile,\n  cwd,\n  mpack,\n  babel,\n  esbuild,\n  metro,\n}: GraniteConfigInput): Promise<GraniteConfigResponse>;\n```\n\n## Parameters\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">config</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">GraniteConfigInput</span>\n    <br />\n    <p class=\"post-parameters--description\">Configuration options for your Granite application that define key settings like URL scheme, app name, build settings, and plugins.</p>\n  </li>\n</ul>\n\nThe configuration options include:\n\n- `appName`: Your app's unique identifier that appears in URLs (e.g., 'my-service')\n- `host`: You can configure the `host` part of the URL scheme. This is optional, and the system works even if you don’t set it. If specified, the host is added before the `appName` in the path.  \n  For example, if you set the `host` to `super`, the scheme will be structured as `{scheme}://super/{appName}`.\n- `scheme`: URL scheme for launching your app (e.g., 'granite')\n- `plugins`: Granite plugins to enhance functionality\n- `outdir`: Where to output build files (defaults to 'dist')\n- `entryFile`: Your app's entry point (defaults to './src/\\_app.tsx')\n- `cwd`: Working directory for build process (defaults to process.cwd())\n- `mpack`: Fine-tune mpack bundler behavior\n- `babel`: Customize Babel transpilation\n- `esbuild`: Adjust ESBuild bundling\n- `metro`: Configure Metro bundler settings\n\n## Example\n\n### Basic Configuration\n\nHere's a basic configuration that:\n\n- Makes your app accessible via the `granite://` scheme\n- Names your service \"my-app\" so it's reachable at `granite://my-app`\n- Uses the Hermes plugin to optimize JavaScript bundles into bytecode\n\n```typescript\nimport { defineConfig } from '@granite-js/react-native/config';\nimport { hermes } from '@granite-js/plugin-hermes';\n\nexport default defineConfig({\n  // The name of your microservice\n  appName: 'my-app',\n  // (Optional) The host name for your app (e.g. 'scheme://host/app-name')\n  host: 'super',\n  // The URL scheme for deep linking\n  scheme: 'granite',\n  // Entry file path\n  entryFile: 'index.ts',\n  // Array of plugins to use\n  plugins: [hermes()],\n});\n```\n"
  },
  {
    "path": "docs/reference/react-native/core/Granite.md",
    "content": "---\nsourcePath: packages/react-native/src/app/Granite.tsx\n---\n\n# Granite\n\n## Signature\n\n```typescript\nGranite: {\n    registerApp(AppContainer: ComponentType<PropsWithChildren<InitialProps>>, { appName, context, router }: GraniteProps): (initialProps: InitialProps) => JSX.Element;\n    readonly appName: string;\n}\n```\n\n### Property\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">registerApp</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">RegisterService</span>\n    <br />\n    <p class=\"post-parameters--description\">This function sets up the basic environment for your service and helps you start service development quickly without needing complex configuration. By just passing <code>appName</code>, you can immediately use various features such as file-based routing, query parameter handling, and back navigation control.</p>\n  </li>\n</ul>\n\nThe features provided by the `Granite.registerApp` function are as follows:\n\n- Routing: URLs are automatically mapped according to file paths. It works similarly to Next.js's file-based routing. For example, the `/my-service/pages/index.ts` file can be accessed at `scheme://my-service`, and the `/my-service/pages/home.ts` file can be accessed at `scheme://my-service/home`.\n- Query Parameters: You can easily use query parameters received through URL schemes. For example, you can receive a `referrer` parameter and log it.\n- Back Navigation Control: You can control back navigation events. For example, when a user presses back on a screen, you can show a dialog or close the screen.\n- Screen Visibility: You can determine whether a screen is visible or hidden from the user. For example, you can use this value to handle specific actions when a user leaves for the home screen.\n\n## Example\n\n### Example of creating with the `Granite` component\n\n```tsx\nimport { PropsWithChildren } from 'react';\nimport { Granite, InitialProps } from '@granite-js/react-native';\nimport { context } from '../require.context';\n\nfunction AppContainer({ children }: PropsWithChildren<InitialProps>) {\n  return <>{children}</>;\n}\n\nexport default Granite.registerApp(AppContainer, {\n  appName: 'my-app',\n  context,\n});\n```\n"
  },
  {
    "path": "docs/reference/react-native/core/InitialProps.md",
    "content": "---\nsourcePath: packages/react-native/src/initial-props/InitialProps.ts\n---\n\n# InitialProps\n\nProvides the initial data type that native platforms (Android/iOS) pass to the app when a user enters a specific screen in a React Native app.\nThe initial data contains important information used for screen initialization, and the required data types differ by native platform.\n\nThe data type provided by Android is `AndroidInitialProps`, and the data type provided by iOS is `IOSInitialProps`.\n\n## Signature\n\n```typescript\ntype InitialProps = AndroidInitialProps | IOSInitialProps;\n```\n\n### Property\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">platform</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">&#39;ios&#39; | &#39;android&#39;</span>\n    <br />\n    <p class=\"post-parameters--description\">The platform on which the app is currently running. Has a value of either <code>ios</code> or <code>android</code>.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">initialColorPreference</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ColorPreference</span>\n    <br />\n    <p class=\"post-parameters--description\">The initial color theme. Represents the color theme set by the user.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">scheme</span><span class=\"post-parameters--type\">string</span>\n    <br />\n    <p class=\"post-parameters--description\">The URL scheme used to enter the current screen.</p>\n  </li>\n</ul>\n\n## Example\n\n### Example using `InitialProps`\n\n::: code-group\n\n```tsx [_app.tsx]\nimport { PropsWithChildren } from 'react';\nimport { Granite, InitialProps } from '@granite-js/react-native';\nimport { context } from '../require.context';\n\nconst APP_NAME = 'my-app-name';\n\nfunction AppContainer({ children, ...initialProps }: PropsWithChildren<InitialProps>) {\n  console.log({ initialProps });\n  return <>{children}</>;\n}\n\nexport default Granite.registerApp(AppContainer, {\n  appName: APP_NAME,\n  context,\n});\n```\n\n:::\n"
  },
  {
    "path": "docs/reference/react-native/core/useInitialProps.md",
    "content": "---\nsourcePath: packages/react-native/src/app/context/InitialPropsContext.tsx\n---\n\n# useInitialProps\n\nProvides initial data passed from the native platform (Android or iOS) when entering a specific screen in React Native apps. This data can be used to immediately apply themes or user settings right after app launch. For example, you can receive dark mode settings from the native platform and apply dark mode immediately when the React Native app starts.\n\n## Signature\n\n```typescript\nfunction useInitialProps<T extends InitialProps>(): T;\n```\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">InitialProps</span>\n    <br />\n    <p class=\"post-parameters--description\">Initial data for the app</p>\n  </li>\n</ul>\n\n## Example\n\n### Checking dark mode status with initial data\n\n```tsx\nimport { useInitialProps } from '@granite-js/react-native';\n\nfunction Page() {\n  const initialProps = useInitialProps();\n  // 'light' or 'dark'\n  console.log(initialProps.initialColorPreference);\n  return <></>;\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/core/useIsInitialScreen.md",
    "content": "---\nsourcePath: packages/react-native/src/router/hooks/useIsInitialScreen.ts\n---\n\n# useIsInitialScreen\n\nA hook that checks whether the current screen is the first screen in the navigation stack.\nInternally, it uses `useNavigationState` to check if the current stack's `index` is 0.\nUse this when you want to conditionally display a back button or show specific guidance messages only on the initial screen.\n\n## Signature\n\n```typescript\nfunction useIsInitialScreen(): boolean;\n```\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">boolean</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns <code>true</code> if the current screen is the first screen in the navigation stack, otherwise returns <code>false</code>.</p>\n  </li>\n</ul>\n\n## Examples\n\n### Display a Welcome Message Only on the Initial Screen\n\nAn example that shows a welcome message only when entering the first screen.\n\n```tsx\nimport { useIsInitialScreen } from '@granite-js/react-native';\nimport { Text, View } from 'react-native';\n\nfunction MyScreen() {\n  const isInitialScreen = useIsInitialScreen();\n\n  return (\n    <View>\n      {isInitialScreen && <Text>Welcome! This is the initial screen.</Text>}\n      <Text>Screen content</Text>\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/environment-check/getSchemeUri.md",
    "content": "---\nsourcePath: packages/react-native/src/native-modules/natives/getSchemeUri.ts\n---\n\n# getSchemeUri\n\nReturns the scheme value when first entering the screen. URI changes due to page navigation are not reflected.\n\n## Signature\n\n```typescript\nfunction getSchemeUri(): string;\n```\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">string</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns the scheme value when first entering the screen.</p>\n  </li>\n</ul>\n\n## Example\n\n### Get initial scheme value\n\n```tsx\nimport { getSchemeUri } from '@granite-js/react-native';\nimport { Text } from 'react-native';\n\nfunction MyPage() {\n  const schemeUri = getSchemeUri();\n\n  return <Text>Initial scheme value: {schemeUri}</Text>;\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/environment-check/useInitialSearchParams.md",
    "content": "---\nsourcePath: packages/react-native/src/app/context/useInitialSearchParams.tsx\n---\n\n# useInitialSearchParams\n\nA hook that returns the query parameters from the URL passed when the app is first launched, directly as an object. This allows immediate application of initial entry handling like login or theme settings, enabling quick customization of user experience. If an invalid URL is provided, it safely returns an empty object. When the native platform (Android or iOS) passes a URL with query parameters to the app on first launch, you can easily read each parameter value using this hook.\n\n## Signature\n\n```typescript\nfunction useInitialSearchParams(): {\n  [k: string]: string;\n};\n```\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">Record&lt;string, string&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\">An object containing key-value pairs of query parameters from the initial URL. Returns an empty object if there are no query parameters or if the URL is invalid.</p>\n  </li>\n</ul>\n\n## Example\n\n```tsx\nimport { useInitialSearchParams } from '@granite-js/react-native';\n\nfunction Page() {\n  const params = useInitialSearchParams();\n  // Example: if initial URL is myapp://home?userId=42&theme=dark\n  console.log(params.userId); // \"42\"\n  console.log(params.theme); // \"dark\"\n  return <></>;\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/screen-control/IOFlatList.md",
    "content": "---\nsourcePath: packages/react-native/src/intersection-observer/IOFlatList.ts\n---\n\n# IOFlatList\n\n`IOFlatList` is a `FlatList` component with added Intersection Observer functionality to detect when specific elements become visible or disappear from the screen during scrolling. Using this component, you can easily check and handle whether each item in the list is visible on the screen.\n\nWhen used with `InView`, you can check the exposure status of each element. The [InView](./InView) component included as a child element detects whether the element is visible on the screen through the observation functionality of `IOFlatList` and triggers events based on the exposure status.\n\n## Signature\n\n```typescript\nIOFlatList: typeof IOFlatListFunction;\n```\n\n## Example\n\nYou can check whether each item in the list appears on the screen using `IOFlatList`.\nWhen each item in the list appears on the screen, the `InView` component changes to the `visible` state.\n\n```tsx\nimport { ReactNode, useState } from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\nimport { InView, IOFlatList } from '@granite-js/react-native';\n\nconst mockData = Array.from({ length: 30 }, (_, i) => ({ key: String(i) }));\n\nexport default function FlatListPage() {\n  return <IOFlatList data={mockData} renderItem={({ item }) => <InViewItem>{item.key}</InViewItem>} />;\n}\n\nfunction InViewItem({ children }: { children: ReactNode }) {\n  const [visible, setVisible] = useState(false);\n\n  return (\n    <InView onChange={setVisible}>\n      <View style={styles.item}>\n        <Text>{children}</Text>\n        <Text>{visible ? 'visible' : ''}</Text>\n      </View>\n    </InView>\n  );\n}\n\nconst styles = StyleSheet.create({\n  item: {\n    padding: 16,\n    borderBottomWidth: 1,\n    borderBottomColor: '#ddd',\n  },\n});\n```\n"
  },
  {
    "path": "docs/reference/react-native/screen-control/IOScrollView.md",
    "content": "---\nsourcePath: packages/react-native/src/intersection-observer/IOScrollView.ts\n---\n\n# IOScrollView\n\n`IOScrollView` is a [ScrollView](https://reactnative.dev/docs/scrollview) component with added `Intersection Observer` functionality. It can detect when specific elements become visible or disappear from the screen during scrolling.\nBy utilizing this functionality with the `InView` component as a child element, you can easily check whether elements are exposed on the screen.\n\n## Signature\n\n```typescript\nIOScrollView: ForwardRefExoticComponent<IOScrollViewProps & RefAttributes<IOScrollViewController>>;\n```\n\n## Example\n\nYou can check whether each item in the list appears on the screen using `IOScrollView`.\nWhen each item in the list appears on the screen, the `InView` component changes to the `visible` state.\n\n```tsx\nimport { ReactNode, useState } from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\nimport { InView, IOScrollView } from '@granite-js/react-native';\n\nconst mockData = Array.from({ length: 30 }, (_, i) => ({ key: String(i) }));\n\nexport default function IOScrollViewPage() {\n  return (\n    <IOScrollView>\n      {mockData.map((data) => (\n        <InViewItem key={data.key}>{data.key}</InViewItem>\n      ))}\n    </IOScrollView>\n  );\n}\n\nfunction InViewItem({ children }: { children: ReactNode }) {\n  const [visible, setVisible] = useState(false);\n\n  return (\n    <InView onChange={setVisible}>\n      <View style={styles.item}>\n        <Text>{children}</Text>\n        <Text>{visible ? 'visible' : ''}</Text>\n      </View>\n    </InView>\n  );\n}\n\nconst styles = StyleSheet.create({\n  item: {\n    padding: 16,\n    borderBottomWidth: 1,\n    borderBottomColor: '#ddd',\n  },\n});\n```\n"
  },
  {
    "path": "docs/reference/react-native/screen-control/ImpressionArea.md",
    "content": "---\nsourcePath: packages/react-native/src/impression-area/ImpressionArea.tsx\n---\n\n# ImpressionArea\n\nA component that detects whether a specific component is visible on the screen and notifies the outside. Using this component, you can easily implement features like collecting logs or running animations when a specific component becomes visible on the screen.\nThe visibility is detected using the return value of `useVisibility` and the `IOScrollView` and `InView` components that indicate whether the component is displayed within the viewport. When using `ScrollView` in React, even if a view is not visible on the screen, using `ImpressionArea` allows you to trigger events only when the view is actually visible on the screen.\n\n::: info Note\n\n`ImpressionArea` must be used inside `IOScrollView`. If you need to use it outside of `IOScrollView`, you can set the `UNSAFE__impressFallbackOnMount` property to `true` to detect based on when the component is mounted. If this property is set to `false` and used outside of `IOScrollView`, an `IOProviderMissingError` will occur.\n\n:::\n\n## Signature\n\n```typescript\nfunction ImpressionArea(props: Props): ReactElement;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">onImpressionStart</span><span class=\"post-parameters--type\">() =&gt; void</span>\n    <br />\n    <p class=\"post-parameters--description\">Callback function that is executed when the child component becomes visible on the screen.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">onImpressionEnd</span><span class=\"post-parameters--type\">() =&gt; void</span>\n    <br />\n    <p class=\"post-parameters--description\">Callback function that is executed when the child component is hidden from the screen.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">enabled</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">true</span>\n    <br />\n    <p class=\"post-parameters--description\">Value that directly controls the condition for visibility. Default value is <code>true</code>. If passed as <code>false</code>, the <code>onImpressionStart</code> callback function will not be executed even if the component is visible.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">areaThreshold</span><span class=\"post-parameters--type\">number</span> · <span class=\"post-parameters--default\">0</span>\n    <br />\n    <p class=\"post-parameters--description\">Value that sets the ratio of the visible area. If the component appears on the screen with a ratio greater than this value, <code>onImpressionStart</code> is called.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">timeThreshold</span><span class=\"post-parameters--type\">number</span> · <span class=\"post-parameters--default\">0</span>\n    <br />\n    <p class=\"post-parameters--description\">Sets the time in milliseconds before <code>onImpressionStart</code> is called after this component becomes visible on the screen. Default value is <code>0</code> milliseconds (0 seconds).</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">style</span><span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>style</code> value to be applied to the <code>InView</code> component. Default value is <code>undefined</code>, used when you want to specify a style.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">UNSAFE__impressFallbackOnMount</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">false</span>\n    <br />\n    <p class=\"post-parameters--description\">Whether to consider the component as visible immediately when mounted. Default value is <code>false</code>.</p>\n  </li>\n</ul>\n\nThe value should be set between 0 and 1. Setting it to 0 triggers the event when even 1px of the component is visible. Conversely, setting it to 1 only triggers the event when the component is 100% visible on the screen.Useful when you cannot determine if the component is in the viewport without using `IOScrollView`. For example, a component located outside of `IOScrollView` will be considered visible at mount time if set to `true`.\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">ReactElement</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a component that can detect visibility on the screen.</p>\n  </li>\n</ul>\n\n## Example\n\n### Basic Usage Example\n\n```tsx\nimport { useState } from 'react';\nimport { Button, Dimensions, Text, View } from 'react-native';\nimport { ImpressionArea, IOScrollView } from '@granite-js/react-native';\n\nexport default function ImpressionAreaExample() {\n  const [isImpressionStart, setIsImpressionStart] = useState(false);\n\n  return (\n    <>\n      <Text>{isImpressionStart ? 'Impression Start' : 'Impression End'}</Text>\n      <IOScrollView\n        style={{\n          flex: 1,\n          margin: 16,\n          backgroundColor: 'white',\n        }}\n      >\n        <View\n          style={{\n            height: Dimensions.get('screen').height,\n            borderWidth: 1,\n            borderColor: 'black',\n          }}\n        >\n          <Text>Scroll to here</Text>\n        </View>\n\n        <ImpressionArea\n          onImpressionStart={() => setIsImpressionStart(true)}\n          onImpressionEnd={() => setIsImpressionStart(false)}\n        >\n          <Button title=\"Button\" />\n        </ImpressionArea>\n      </IOScrollView>\n    </>\n  );\n}\n```\n\n### Example of Detection at Mount Time\n\nWhen `ImpressionArea` is not located inside a component like `IOScrollView`, setting `UNSAFE__impressFallbackOnMount` to `true` will consider the component as visible when it is mounted.\n\n```tsx\nimport { useState } from 'react';\nimport { Button, Dimensions, ScrollView, Text, View } from 'react-native';\nimport { ImpressionArea } from '@granite-js/react-native';\n\nexport default function ImpressionArea2Example() {\n  const [isImpressionStart, setIsImpressionStart] = useState(false);\n\n  return (\n    <>\n      <Text>{isImpressionStart ? 'Impression Start' : 'Impression End'}</Text>\n      <ScrollView\n        style={{\n          flex: 1,\n          margin: 16,\n          backgroundColor: 'white',\n        }}\n      >\n        <View\n          style={{\n            height: Dimensions.get('screen').height,\n            borderWidth: 1,\n            borderColor: 'black',\n          }}\n        >\n          <Text>Scroll to here</Text>\n        </View>\n\n        <ImpressionArea\n          UNSAFE__impressFallbackOnMount={true}\n          onImpressionStart={() => setIsImpressionStart(true)}\n          onImpressionEnd={() => setIsImpressionStart(false)}\n        >\n          <Button title=\"Button\" />\n        </ImpressionArea>\n      </ScrollView>\n    </>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/screen-control/InView.md",
    "content": "---\nsourcePath: packages/react-native/src/intersection-observer/InView.tsx\n---\n\n# InView\n\nThe `InView` component detects when an element starts to become visible on the screen or disappears from the screen.\nWhen an element starts to become visible on the screen, the `onChanged` handler is called with `true` as the first argument. Conversely, when the element disappears from the screen, `false` is passed.\nThe second argument of the `onChanged` handler receives the exposure ratio of the element on the screen. The exposure ratio value ranges from `0` to `1.0`. For example, if `0.2` is passed, it means the component is 20% exposed on the screen.\n\n::: warning Note\n\n`InView` must be used inside [IOScrollView](./IOScrollView) or [IOFlatList](./IOFlatList) that includes `IOContext`.\nIf used outside of `IOContext`, an `IOProviderMissingError` will occur.\n\n:::\n\n## Signature\n\n```typescript\ndeclare class InView<T = ViewProps> extends PureComponent<InViewProps<T>> {\n  static contextType: import('react').Context<IOContextValue>;\n  static defaultProps: Partial<InViewProps>;\n  context: undefined | IOContextValue;\n  mounted: boolean;\n  protected element: Element;\n  protected instance: undefined | ObserverInstance;\n  protected view: any;\n  constructor(props: InViewProps<T>);\n  componentDidMount(): void;\n  componentWillUnmount(): void;\n  protected handleChange: (inView: boolean, areaThreshold: number) => void;\n  protected handleRef: (ref: any) => void;\n  protected handleLayout: (event: LayoutChangeEvent) => void;\n  measure: (...args: any) => void;\n  measureInWindow: (...args: any) => void;\n  measureLayout: (...args: any) => void;\n  setNativeProps: (...args: any) => void;\n  focus: (...args: any) => void;\n  blur: (...args: any) => void;\n  render(): import('react/jsx-runtime').JSX.Element | null;\n}\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">Object</span>\n    <br />\n    <p class=\"post-parameters--description\">Props object passed to the component.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.children</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">React.ReactNode</span>\n        <br />\n        <p class=\"post-parameters--description\">Child components to be rendered under the component.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">prop.as</span><span class=\"post-parameters--type\">React.ComponentType</span> · <span class=\"post-parameters--default\">View</span>\n    <br />\n    <p class=\"post-parameters--description\">Specifies the component to actually render. Default is the <a href=\"https://reactnative.dev/docs/view\" target=\"_blank\" rel=\"noreferrer\">View</a> component.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">triggerOnce</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">false</span>\n    <br />\n    <p class=\"post-parameters--description\">Use this option if you want to call the <code>onChange</code> callback only once when the element first becomes visible.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">onLayout</span><span class=\"post-parameters--type\">(event: LayoutChangeEvent) =&gt; void</span>\n    <br />\n    <p class=\"post-parameters--description\">Callback function called when there is a change in the layout.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">onChange</span><span class=\"post-parameters--type\">(inView: boolean, areaThreshold: number) =&gt; void</span>\n    <br />\n    <p class=\"post-parameters--description\">Callback function called when an element appears or disappears from the screen. The first argument receives the visibility status, and the second argument receives the exposure ratio.</p>\n  </li>\n</ul>\n\n## Example\n\n### Detecting the `10%` point of an element using the `InView` component\n\n```tsx\nimport { LayoutChangeEvent, View, Text, Dimensions } from 'react-native';\nimport { InView, IOScrollView } from '@granite-js/react-native';\n\nexport function InViewExample() {\n  const handleLayout = (event: LayoutChangeEvent) => {\n    console.log('Layout changed', event.nativeEvent.layout);\n  };\n\n  const handleChange = (inView: boolean, areaThreshold: number) => {\n    if (inView) {\n      console.log(`Element is visible at ${areaThreshold * 100}% ratio`);\n    } else {\n      console.log('Element is not visible');\n    }\n  };\n\n  return (\n    <IOScrollView>\n      <View style={{ height: HEIGHT, width: '100%', backgroundColor: 'blue' }}>\n        <Text style={{ color: 'white' }}>Please scroll down</Text>\n      </View>\n      <InView onLayout={handleLayout} onChange={handleChange}>\n        <View style={{ width: 100, height: 300, backgroundColor: 'yellow' }}>\n          <View style={{ position: 'absolute', top: 30, width: 100, height: 1, borderWidth: 1 }}>\n            <Text style={{ position: 'absolute', top: 0 }}>10% point</Text>\n          </View>\n        </View>\n      </InView>\n    </IOScrollView>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/screen-control/closeView.md",
    "content": "---\nsourcePath: packages/react-native/src/native-modules/natives/closeView.ts\n---\n\n# closeView\n\nFunction that closes the current screen. It can be used when you want to exit a service by pressing a \"Close\" button.\n\n## Signature\n\n```typescript\nfunction closeView(): Promise<void>;\n```\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">Promise&lt;void&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\"></p>\n  </li>\n</ul>\n\n## Example\n\n### Close screen with close button\n\n```tsx\nimport { Button } from 'react-native';\nimport { closeView } from '@granite-js/react-native';\n\nfunction CloseButton() {\n  return <Button title=\"Close\" onPress={closeView} />;\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/screen-control/useBackEvent.md",
    "content": "---\nsourcePath: packages/react-native/src/use-back-event/useBackEvent.tsx\n---\n\n# useBackEvent\n\nA Hook that returns a controller object for registering and removing back events. Using this Hook, you can handle back events only when a specific component is active.\nUse `addEventListener` to register back events and `removeEventListener` to remove them.\nRegistered back events are only active when the user is viewing the screen. The condition for viewing the screen is determined using [useVisibility](./useVisibility).\n\nUsing this Hook, you can define logic to handle back events in specific components.\n\n## Signature\n\n```typescript\nfunction useBackEvent(): BackEventControls;\n```\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">BackEventControls</span>\n    <br />\n    <p class=\"post-parameters--description\">An object that can control back events. This object includes the <code>addEventListener</code> method for registering events and the <code>removeEventListener</code> method for removing them.</p>\n  </li>\n</ul>\n\n### Error\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">Error</span>\n    <br />\n    <p class=\"post-parameters--description\">Throws an error if this hook is not used within a <code>BackEventProvider</code>.</p>\n  </li>\n</ul>\n\n## Example\n\n### Example of Registering and Removing Back Events\n\n- **When the \"Add BackEvent\" button is pressed, a back event is registered.** After that, pressing the back button shows an alert with \"back\" and prevents actual navigation.\n- **When the \"Remove BackEvent\" button is pressed, the registered event is removed.** After that, pressing the back button navigates back normally as per default behavior.\n\n```tsx\nimport { useEffect, useState } from 'react';\nimport { Alert, Button, View } from 'react-native';\nimport { useBackEvent } from '@granite-js/react-native';\n\nexport function UseBackEventExample() {\n  const backEvent = useBackEvent();\n\n  const [handler, setHandler] = useState<{ callback: () => void } | undefined>(undefined);\n\n  useEffect(() => {\n    const callback = handler?.callback;\n\n    if (callback != null) {\n      backEvent.addEventListener(callback);\n\n      return () => {\n        backEvent.removeEventListener(callback);\n      };\n    }\n\n    return;\n  }, [backEvent, handler]);\n\n  return (\n    <View>\n      <Button\n        title=\"Add BackEvent\"\n        onPress={() => {\n          setHandler({ callback: () => Alert.alert('back') });\n        }}\n      />\n      <Button\n        title=\"Remove BackEvent\"\n        onPress={() => {\n          setHandler(undefined);\n        }}\n      />\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/screen-control/useParams.md",
    "content": "---\nsourcePath: packages/react-native/src/router/createRoute.ts\n---\n\n# useParams\n\n`useParams` is a hook that retrieves parameters from a specified route.\nUsing this hook, you can easily access parameters of the current route.\nWith the `validateParams` option, you can validate parameter structure and transform types,\nreducing runtime errors and writing safer code.\n\n## Signature\n\n```typescript\nfunction useParams<TScreen extends keyof RegisterScreen>(options: {\n  from: TScreen;\n  strict?: true;\n}): RegisterScreen[TScreen];\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">options</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">RouteHooksOptions&lt;TScreen&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\">Object containing information about the route to retrieve.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">options.from</span><span class=\"post-parameters--type\">string</span>\n        <br />\n        <p class=\"post-parameters--description\">Route path to retrieve parameters from. If not specified, retrieves parameters from the current route. Must be specified when strict mode is true.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">options.strict</span><span class=\"post-parameters--type\">boolean</span>\n        <br />\n        <p class=\"post-parameters--description\">Strict mode setting. When set to true, throws an error if the specified route doesn&#39;t match the current route. When set to false, skips validateParams validation and returns parameters of the current screen as is.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## Example\n\n### Retrieving Route Parameters\n\n::: code-group\n\n```tsx [pages/examples/use-params.tsx]\nimport React from 'react';\nimport { Text } from 'react-native';\nimport { createRoute, useParams } from '@granite-js/react-native';\n\nexport const Route = createRoute('/examples/use-params', {\n  validateParams: (params) => params as { id: string },\n  component: UseParamsExample,\n});\n\nfunction UseParamsExample() {\n  // First method: Using the useParams method of the route object\n  const params = Route.useParams();\n\n  // Second method: Using the useParams hook directly\n  const params2 = useParams({ from: '/examples/use-params' });\n\n  // Third method: Using with strict mode set to false\n  // When strict is false, retrieves parameters from the current route\n  // and skips validation even if validateParams is defined\n  const params3 = useParams({ strict: false }) as { id: string };\n\n  return (\n    <>\n      <Text>{params.id}</Text>\n      <Text>{params2.id}</Text>\n      <Text>{params3.id}</Text>\n    </>\n  );\n}\n```\n\n:::\n"
  },
  {
    "path": "docs/reference/react-native/screen-control/useRouterBackHandler.md",
    "content": "---\nsourcePath: 'packages/react-native/src/router/components/useRouterBackHandler.tsx'\n---\n\n# useRouterBackHandler\n\nA hook that provides a handler for handling back navigation actions. This can be used when you need to close a view directly when the back button is pressed in modals or independent screens where there's no navigation stack. This hook uses `NavigationContainerRef` from `@react-navigation/native` to navigate to the previous screen if there's a remaining navigation stack, or executes the user-defined `onClose` function if the stack is empty.\n\n## Signature\n\n```typescript\nfunction useRouterBackHandler({\n  navigationContainerRef,\n  onClose,\n}: {\n  navigationContainerRef: NavigationContainerRefWithCurrent<never>;\n  onClose?: () => void;\n}): { handler: any };\n```\n\n### Parameters\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">navigationContainerRef</span><span class=\"post-parameters--required\">Required</span> · <span class=\"post-parameters--type\">NavigationContainerRefWithCurrent&lt;any&gt;</span>\n    <br/>\n    <p class=\"post-parameters--description\">A <code>NavigationContainerRef</code> that can reference the current navigation state. Used when executing back navigation actions.</p>\n  </li>\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">onClose</span> · <span class=\"post-parameters--type\">() =&gt; void</span>\n    <br/>\n    <p class=\"post-parameters--description\">A function to execute when the navigation stack is empty. For example, you can pass a function that closes a React Native View.</p>\n  </li>\n</ul>\n\n### Returns\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">{ handler: () =&gt; void }</span>\n    <br/>\n    <p class=\"post-parameters--description\">A handler function that can be used in back buttons or similar components.\n</p>\n  </li>\n</ul>\n\n## Examples\n\n### Example of directly passing a handler to a back button and setting a function to close the view\n\n```tsx\nimport { createNavigationContainerRef, useNavigation } from '@granite-js/native/@react-navigation/native';\nimport { BackButton, useRouterBackHandler } from '@granite-js/react-native';\nimport { useEffect } from 'react';\n\nconst navigationContainerRef = createNavigationContainerRef();\n\nfunction MyBackButton() {\n  const navigation = useNavigation();\n\n  const { handler } = useRouterBackHandler({\n    navigationContainerRef,\n    onClose: () => {\n      // close the view\n    },\n  });\n\n  useEffect(() => {\n    navigation.setOptions({\n      headerLeft: () => <BackButton onPress={handler} />,\n    });\n  }, [handler, navigation]);\n\n  return <></>;\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/screen-control/useVisibility.md",
    "content": "---\nsourcePath: packages/react-native/src/visibility/useVisibility.tsx\n---\n\n# useVisibility\n\nReturns whether the screen is visible to the user.\nReturns `true` if the app's screen is currently visible to the user, and `false` if it's not. However, the screen visibility state does not change when opening and closing the system share modal (share).\n\nUsage examples:\n\n- Returns `false` when switching to another app or pressing the home button.\n- Returns `true` when returning to the granite app or when the screen becomes visible.\n- Returns `false` when navigating to another service within the granite app.\n\n## Signature\n\n```typescript\nfunction useVisibility(): boolean;\n```\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">boolean</span>\n    <br />\n    <p class=\"post-parameters--description\">Whether the current screen is visible to the user.</p>\n  </li>\n</ul>\n\n## Example\n\n### Example of checking screen visibility\n\n```tsx\nimport { useEffect } from 'react';\nimport { Text } from 'react-native';\nimport { useVisibility } from '@granite-js/react-native';\n\nexport function UseVisibilityExample() {\n  const visibility = useVisibility();\n\n  useEffect(() => {\n    console.log({ visibility });\n  }, [visibility]);\n\n  return <Text>Logs are created when leaving and returning to the home screen.</Text>;\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/screen-control/useVisibilityChange.md",
    "content": "---\nsourcePath: packages/react-native/src/visibility/useVisibilityChange.ts\n---\n\n# useVisibilityChange\n\nCalls a callback function with the visibility state when the screen's visibility changes.\nThe callback function receives the return value from [useVisibility](./useVisibility). If the return value is `true`, it passes 'visible', and if `false`, it passes 'hidden'.\n\n## Signature\n\n```typescript\nfunction useVisibilityChange(callback: VisibilityCallback): void;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">callback</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">VisibilityCallback</span>\n    <br />\n    <p class=\"post-parameters--description\">Calls a callback function that receives visibility changes when the screen&#39;s visibility changes.</p>\n  </li>\n</ul>\n\n## Example\n\n### Example of logging when screen visibility changes\n\n```tsx\nimport { useState } from 'react';\nimport { Text, View } from 'react-native';\nimport { useVisibilityChange, VisibilityState } from '@granite-js/react-native';\n\nexport function UseVisibilityChangeExample() {\n  const [visibilityHistory, setVisibilityHistory] = useState<VisibilityState[]>([]);\n\n  useVisibilityChange((visibility) => {\n    setVisibilityHistory((prev) => [...prev, visibility]);\n  });\n\n  return (\n    <View>\n      <Text>Logs are created when leaving and returning to the home screen.</Text>\n\n      {visibilityHistory.map((visibility, index) => (\n        <Text key={index}>{JSON.stringify(visibility)}</Text>\n      ))}\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/screen-navigation/openURL.md",
    "content": "---\nsourcePath: packages/react-native/src/native-modules/natives/openURL.ts\n---\n\n# openURL\n\nOpens the specified URL in the device's default browser or related app.\nThis function uses the [`Linking.openURL`](https://reactnative.dev/docs/0.72/linking#openurl) method from `react-native` to open the URL.\n\n## Signature\n\n```typescript\nfunction openURL(url: string): Promise<any>;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">url</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">string</span>\n    <br />\n    <p class=\"post-parameters--description\">URL address to open</p>\n  </li>\n</ul>\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">Promise&lt;any&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\">Promise that resolves when the URL is successfully opened</p>\n  </li>\n</ul>\n\n## Example\n\n### Open external URL\n\n```tsx\nimport { openURL } from '@granite-js/react-native';\nimport { Button } from 'react-native';\n\nfunction Page() {\n  const handlePress = () => {\n    openURL('https://google.com');\n  };\n\n  return <Button title=\"Open Google Website\" onPress={handlePress} />;\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/ui/BackButton.md",
    "content": "---\nsourcePath: 'packages/react-native/src/router/components/BackButton.tsx'\n---\n\n# BackButton\n\nA back button component. This component is primarily used to implement functionality for returning to the previous screen in navigation headers or custom screen tops. If no `onPress` handler is set, it won't perform any action.\n\n## Signature\n\n```typescript\nfunction BackButton({ tintColor, onPress }: BackButtonProps): any;\n```\n\n### Parameters\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--required\">Required</span> · <span class=\"post-parameters--type\">Object</span>\n    <br/>\n    <p class=\"post-parameters--description\"></p>\n    <ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li \">\n    <span class=\"post-parameters--name\">tintColor</span> · <span class=\"post-parameters--type\">string</span>\n    <br/>\n    <p class=\"post-parameters--description\">The color of the button icon. You can use CSS color strings.</p>\n  </li>\n  <li class=\"post-parameters-li \">\n    <span class=\"post-parameters--name\">onPress</span> · <span class=\"post-parameters--type\">() =&gt; void</span>\n    <br/>\n    <p class=\"post-parameters--description\">A function to execute when the button is pressed. For example, you can add a function to return to the previous screen.</p>\n  </li>\n    </ul>\n  </li>\n</ul>\n\n### Returns\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">ReactElement</span>\n    <br/>\n    <p class=\"post-parameters--description\">Returns a back button component.</p>\n  </li>\n</ul>\n\n## Examples\n\n### Example of directly passing a handler to a back button and setting a function to close the view\n\n```tsx\nimport { createNavigationContainerRef, useNavigation } from '@granite-js/native/@react-navigation/native';\nimport { BackButton, useRouterBackHandler } from '@granite-js/react-native';\nimport { useEffect } from 'react';\n\nconst navigationContainerRef = createNavigationContainerRef();\n\nfunction MyBackButton() {\n  const navigation = useNavigation();\n\n  const { handler } = useRouterBackHandler({\n    navigationContainerRef,\n    onClose: () => {\n      // close the view\n    },\n  });\n\n  useEffect(() => {\n    navigation.setOptions({\n      headerLeft: () => <BackButton onPress={handler} />,\n    });\n  }, [handler, navigation]);\n\n  return <></>;\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/ui/BlurView.md",
    "content": "---\nsourcePath: packages/react-native/src/blur/BlurView.tsx\n---\n\n# BlurView\n\n`BlurView` adds a blurred background effect, primarily on iOS. It creates a visual blur on the background view.\n\nThis component is supported only on iOS. On Android, it simply renders a regular [`View`](https://reactnative.dev/docs/0.72/view) without any blur effect.\n\nYou can control the blur intensity and optionally enable the [vibrancy effect](https://developer.apple.com/documentation/uikit/uivibrancyeffect?language=objc), which enhances the visual impact of content displayed over a blurred background.\n\nIf blur is not supported or doesn't render properly, you can use the `reducedTransparencyFallbackColor` prop to set a fallback background color.\n\nUse the `isSupported` property to check whether the current device supports blur. Blur is available on iOS from version 5.126.0 and not supported on Android.\n\n## Signature\n\n```typescript\nfunction BlurView({\n  blurType,\n  blurAmount,\n  reducedTransparencyFallbackColor,\n  vibrancyEffect,\n  ...viewProps\n}: BlurViewProps): import('react/jsx-runtime').JSX.Element;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">BlurViewProps</span>\n    <br />\n    <p class=\"post-parameters--description\">The props you can pass to <code>BlurView</code>. It extends <code>react-native</code>&#39;s <code>ViewProps</code>, so you can use layout and style properties. The props align with those of <a href=\"https://github.com/Kureev/react-native-blur/tree/v4.3.2?tab=readme-ov-file#blurview\" target=\"_blank\" rel=\"noreferrer\">`@react-native-community/blur`</a>.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.blurType</span><span class=\"post-parameters--type\">BlurType</span>\n        <br />\n        <p class=\"post-parameters--description\">Type of blur to apply, such as <code>light</code>, <code>dark</code>, or <code>extraDark</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.blurAmount</span><span class=\"post-parameters--type\">number</span> · <span class=\"post-parameters--default\">10</span>\n        <br />\n        <p class=\"post-parameters--description\">Intensity of the blur effect. Higher values make the blur stronger. Accepts values from <code>0</code> to <code>100</code>. Default is <code>10</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.vibrancyEffect</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">false</span>\n        <br />\n        <p class=\"post-parameters--description\">Enables the vibrancy effect. This effect enhances content displayed on top of the blur. Only supported on iOS. Default is <code>false</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.reducedTransparencyFallbackColor</span><span class=\"post-parameters--type\">string</span>\n        <br />\n        <p class=\"post-parameters--description\">Fallback background color used when blur cannot be applied due to system settings or device limitations.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">JSX.Element</span>\n    <br />\n    <p class=\"post-parameters--description\">On iOS, returns a blurred <code>BlurView</code> or <code>VibrancyView</code> component. On Android, returns a regular <code>View</code> without blur.</p>\n  </li>\n</ul>\n\n::: warning Note\n`BlurView` is only supported on iOS. On Android, it renders a regular `View` without any blur effect.\n:::\n\n## Example\n\n### Blurring background behind a text\n\n```tsx\nimport { BlurView } from '@granite-js/react-native';\nimport { View, Text, StyleSheet } from 'react-native';\n\nexport function BlurViewExample() {\n  return (\n    <View style={styles.container}>\n      <Text style={styles.absolute}>Blurred Text</Text>\n      <BlurView style={styles.absolute} blurType=\"light\" blurAmount={1} />\n      <Text>Non Blurred Text</Text>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    justifyContent: 'center',\n    alignItems: 'center',\n    width: '100%',\n    height: 300,\n  },\n  absolute: {\n    position: 'absolute',\n    top: 0,\n    left: 0,\n    bottom: 0,\n    right: 0,\n  },\n});\n```\n\n## References\n\n- [iOS Vibrancy Effect Documentation](https://developer.apple.com/documentation/uikit/uivibrancyeffect)\n- [Zeddios Blog Explanation](https://zeddios.tistory.com/1140)\n"
  },
  {
    "path": "docs/reference/react-native/ui/ColorPreference.md",
    "content": "---\nsourcePath: packages/react-native/src/initial-props/InitialProps.ts\n---\n\n# ColorPreference\n\nType representing the color mode of the current device. It is a string representing light mode and dark mode.\n\n## Signature\n\n```typescript\ntype ColorPreference = 'light' | 'dark';\n```\n\n### Type Definition\n\n#### `ColorPreference`\n\n_`'light' | 'dark'`_\n"
  },
  {
    "path": "docs/reference/react-native/ui/KeyboardAboveView.md",
    "content": "---\nsourcePath: packages/react-native/src/keyboard/KeyboardAboveView.tsx\n---\n\n# KeyboardAboveView\n\nA component that automatically lifts child components above the keyboard when it appears on the screen.\nIt's useful when you want to keep elements like a \"Send\" button fixed above the keyboard during text input.\n\n## Signature\n\n```typescript\nfunction KeyboardAboveView({ style, children, ...props }: ComponentProps<typeof View>): ReactElement;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">StyleProp&lt;ViewStyle&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\">Additional styles can be applied. For example, you can set background color or size.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props.children</span><span class=\"post-parameters--type\">ReactNode</span>\n    <br />\n    <p class=\"post-parameters--description\">Components to be displayed above the keyboard when it appears. For example, you can include buttons, text input fields, etc.</p>\n  </li>\n</ul>\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">ReactElement</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns an <a href=\"https://reactnative.dev/docs/animated#createanimatedcomponent\" target=\"_blank\" rel=\"noreferrer\">`Animated.View`</a> that is adjusted above the keyboard when it appears.</p>\n  </li>\n</ul>\n\n## Example\n\n### Lifting elements above the keyboard\n\n```tsx\nimport { ScrollView, TextInput, View, Text } from 'react-native';\nimport { KeyboardAboveView } from '@granite-js/react-native';\n\nexport function KeyboardAboveViewExample() {\n  return (\n    <>\n      <ScrollView>\n        <TextInput placeholder=\"placeholder\" />\n      </ScrollView>\n\n      <KeyboardAboveView>\n        <View style={{ width: '100%', height: 50, backgroundColor: 'yellow' }}>\n          <Text>Above the keyboard</Text>\n        </View>\n      </KeyboardAboveView>\n    </>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/ui/OnAudioFocusChanged.md",
    "content": "---\nsourcePath: packages/react-native/src/video/instance.tsx\n---\n\n# OnAudioFocusChanged\n\nThis is a callback function triggered when the audio focus changes. It must be implemented when `muted` is set to `false`.\n\n## Signature\n\n```typescript\ntype OnAudioFocusChanged = (event: { hasAudioFocus: boolean }) => void;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">event</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">Object</span>\n    <br />\n    <p class=\"post-parameters--description\">An event object that contains audio focus information.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">event.hasAudioFocus</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">boolean</span>\n        <br />\n        <p class=\"post-parameters--description\">Indicates whether the video component currently has audio focus.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n"
  },
  {
    "path": "docs/reference/react-native/ui/ScrollViewInertialBackground.md",
    "content": "---\nsourcePath: packages/react-native/src/scroll-view-inertial-background/ScrollViewInertialBackground.tsx\n---\n\n# ScrollViewInertialBackground\n\nAdds background colors to the top and bottom spaces of iOS `ScrollView` content to provide a natural visual effect when scrolling.\nIn iOS, when scrolling reaches the end, a slight bouncing effect occurs, known as the [Bounce effect](https://medium.com/@wcandillon/ios-bounce-list-effect-with-react-native-5102e3a83999). Setting background colors in the spaces above and below the content can provide a more consistent user experience.\n\n## Signature\n\n```typescript\nfunction ScrollViewInertialBackground({\n  topColor,\n  bottomColor,\n  spacer: _spacer,\n}: ScrollViewInertialBackgroundProps): import('react/jsx-runtime').JSX.Element;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>props</code> object passed to the component.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.topColor</span><span class=\"post-parameters--type\">string</span>\n        <br />\n        <p class=\"post-parameters--description\">Background color to apply to the top area of the scroll. Default is <code>adaptive.background</code> which is automatically applied based on the system theme.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.bottomColor</span><span class=\"post-parameters--type\">string</span>\n        <br />\n        <p class=\"post-parameters--description\">Background color to apply to the bottom area of the scroll. Default is <code>adaptive.background</code> which is automatically applied based on the system theme.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.spacer</span><span class=\"post-parameters--type\">number</span>\n        <br />\n        <p class=\"post-parameters--description\">Specifies the size of the space between the top and bottom areas where the background color is applied. Default uses the screen height obtained from <a href=\"https://reactnative.dev/docs/next/usewindowdimensions\" target=\"_blank\" rel=\"noreferrer\">`useWindowDimensions`</a>.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## Example\n\n### Adding background colors to the top and bottom of a scroll view\n\nAdds red background color to the top and blue to the bottom of the scroll view. The background color is applied to areas outside the scroll.\n\n```tsx\nimport { ScrollView, View, Text } from 'react-native';\nimport { ScrollViewInertialBackground } from '@granite-js/react-native';\n\nconst dummies = Array.from({ length: 20 }, (_, i) => i);\n\nexport function InertialBackgroundExample() {\n  return (\n    <ScrollView>\n      <ScrollViewInertialBackground topColor=\"red\" bottomColor=\"blue\" />\n      {dummies.map((i) => (\n        <View\n          key={`dummy-${i}`}\n          style={{ width: '100%', height: 100, borderBottomColor: 'black', borderBottomWidth: 1 }}\n        >\n          <Text>Try scrolling.</Text>\n        </View>\n      ))}\n    </ScrollView>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/react-native/ui/Video.md",
    "content": "---\nsourcePath: packages/react-native/src/video/Video.tsx\n---\n\n# Video\n\nThe Video component implements audio focus control logic to prevent the app from stopping music playing in other apps. It automatically plays or pauses based on the app's state. For example, when the app transitions to the background, the video automatically pauses.\n\n::: warning\nThe Video component uses [react-native-video version (6.0.0-alpha.6)](https://github.com/TheWidlarzGroup/react-native-video/tree/v6.0.0-alpha.6). Therefore, some types or features may not be compatible with the latest version.\n:::\n\n## Signature\n\n```typescript\nVideo: import('react').ForwardRefExoticComponent<\n  Omit<import('react-native-video').VideoProperties, 'onAudioFocusChanged'> & {\n    onAudioFocusChanged?: (event: { hasAudioFocus: boolean }) => void;\n  } & import('react').RefAttributes<VideoRef>\n>;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">VideoProperties</span>\n    <br />\n    <p class=\"post-parameters--description\">Properties provided by <a href=\"https://github.com/TheWidlarzGroup/react-native-video/tree/v6.0.0-alpha.6\" target=\"_blank\" rel=\"noreferrer\">`react-native-video`</a>.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.muted</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">false</span>\n        <br />\n        <p class=\"post-parameters--description\">Controls the mute state of the video. If <code>true</code>, the video&#39;s audio is muted; if <code>false</code>, the audio plays. Default is <code>false</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.paused</span><span class=\"post-parameters--type\">boolean</span> · <span class=\"post-parameters--default\">false</span>\n        <br />\n        <p class=\"post-parameters--description\">Property to control video playback. If <code>true</code>, the video is paused; if <code>false</code>, the video plays. Default is <code>false</code>, and it autoplays.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.onAudioFocusChanged</span><span class=\"post-parameters--type\">OnAudioFocusChanged</span>\n        <br />\n        <p class=\"post-parameters--description\">Callback function called when audio focus changes. Must be implemented when <code>muted</code> is <code>false</code>. For more details, see <a href=\"/reference/react-native/ui/OnAudioFocusChanged\" target=\"_blank\" rel=\"noreferrer\">OnAudioFocusChanged</a>.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props.source.uri</span><span class=\"post-parameters--type\">string</span>\n    <br />\n    <p class=\"post-parameters--description\">Source of the video to play. Can be set to a file path or URL.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">ref</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">Ref&lt;VideoRef&gt;</span>\n    <br />\n    <p class=\"post-parameters--description\">Reference object to access the video instance. Through this ref, you can access various methods of the video instance.</p>\n  </li>\n</ul>\n\n### Property\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">isAvailable</span><span class=\"post-parameters--type\">boolean</span>\n    <br />\n    <p class=\"post-parameters--description\">Value to check if the <code>Video</code> component can be used. You can check this value to determine if the user can render the video or if video functionality is unavailable due to environmental constraints (e.g., network connection issues, unsupported devices). If this value is <code>false</code>, you should handle it by not rendering the video or providing alternative content.</p>\n  </li>\n</ul>\n\n### Return Value\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--type\">JSX.Element</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a JSX element that renders the video. Uses <code>Animated</code> to provide smooth animation effects during video playback.</p>\n  </li>\n</ul>\n\n## Example\n\n### Video Autoplay Example\n\n```tsx\nimport { useRef } from 'react';\nimport { View } from 'react-native';\nimport { Video } from '@granite-js/react-native';\n\nexport function VideoExample() {\n  const videoRef = useRef(null);\n\n  return (\n    <View>\n      <Video\n        ref={videoRef}\n        source={{ uri: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' }}\n        muted={true}\n        paused={false}\n        resizeMode=\"cover\"\n        style={{ width: 300, height: 200, borderWidth: 1 }}\n      />\n    </View>\n  );\n}\n```\n\n## References\n\n- react-native-video https://github.com/react-native-video/react-native-video\n  For detailed properties of the video component, please refer to the official documentation.\n- react-native-video-6.0.0 https://github.com/TheWidlarzGroup/react-native-video/releases/tag/v6.0.0\n  This is the source code of the version currently installed in the sandbox app.\n"
  },
  {
    "path": "docs/reference/style-utils/ui/Flex.md",
    "content": "---\nsourcePath: packages/style-utils/src/flex.tsx\n---\n\n# Flex\n\n`Flex` is a component that arranges child elements based on [**Flexbox Layout**](https://reactnative.dev/docs/0.72/flexbox). Using Flexbox, you can easily align elements horizontally and vertically, and set center alignment with ease.\nUse `Flex.Center` to place child elements in the center, `Flex.CenterVertical` for vertical center alignment, and `Flex.CenterHorizontal` for horizontal center alignment.\n\n## Signature\n\n```typescript\nFlex: FlexType;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">The <code>props</code> object passed to the component.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span> · <span class=\"post-parameters--default\">&#39;stretch&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The alignment value for child elements along the main axis (Flex direction). For example, in <code>&#39;column&#39;</code> direction, <code>&#39;center&#39;</code> places elements at the horizontal center, and <code>&#39;stretch&#39;</code> expands elements to match the parent&#39;s width when their width is <code>&#39;auto&#39;</code>. This value is applied to <a href=\"https://reactnative.dev/docs/0.72/layout-props#alignitems\" target=\"_blank\" rel=\"noreferrer\">`alignItems`</a>, with a default value of <code>&#39;stretch&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span> · <span class=\"post-parameters--default\">&#39;flex-start&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The alignment value for child elements along the cross axis (perpendicular to Flex direction). For example, in <code>&#39;column&#39;</code> direction, <code>flex-start</code> places elements at the top of the parent, and <code>&#39;center&#39;</code> places them at the vertical center. This value is applied to <a href=\"https://reactnative.dev/docs/0.72/layout-props#justifycontent\" target=\"_blank\" rel=\"noreferrer\">`justifyContent`</a>, with a default value of <code>&#39;flex-start&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;column&#39; | &#39;row&#39;</span> · <span class=\"post-parameters--default\">&#39;column&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the direction in which child elements are arranged. This is applied to <a href=\"https://reactnative.dev/docs/0.72/layout-props#flexdirection\" target=\"_blank\" rel=\"noreferrer\">`flexDirection`</a>, with a default value of <code>&#39;column&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">ViewProps[&#39;style&#39;]</span>\n        <br />\n        <p class=\"post-parameters--description\">The <code>style</code> object to be applied to the <code>Flex</code> component. Used to specify styles other than Flexbox layout, such as background color, border, and margin. Default value is <code>undefined</code>.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n### Property\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">Center</span><span class=\"post-parameters--type\">FlexCenter</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>Flex.Center</code> is a component that places child elements at the exact center both horizontally and vertically based on <strong>Flex Layout</strong>.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">CenterVertical</span><span class=\"post-parameters--type\">FlexCenterVertical</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>Flex.CenterVertical</code> is a component for <strong>vertically centering</strong> child elements based on Flex Layout.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">CenterHorizontal</span><span class=\"post-parameters--type\">FlexCenterHorizontal</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>Flex.CenterHorizontal</code> is a component for <strong>horizontally centering</strong> child elements based on Flex Layout.</p>\n  </li>\n</ul>\n\n## Example\n\n### Example of arranging elements horizontally and vertically\n\n```tsx\nimport { Flex } from '@granite-js/react-native';\nimport { Text } from 'react-native';\n\nfunction FlexExample() {\n  return (\n    <>\n      <Flex direction=\"column\">\n        <Text>Arrange vertically</Text>\n        <Text>1</Text>\n        <Text>2</Text>\n        <Text>3</Text>\n      </Flex>\n      <Flex direction=\"row\">\n        <Text>Arrange horizontally</Text>\n        <Text>1</Text>\n        <Text>2</Text>\n        <Text>3</Text>\n      </Flex>\n    </>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/style-utils/ui/FlexCenter.md",
    "content": "---\nsourcePath: packages/style-utils/src/flex.tsx\n---\n\n# FlexCenter\n\n`Flex.Center` is a component that places child elements at the exact center both horizontally and vertically based on [**Flexbox Layout**](https://reactnative.dev/docs/0.72/flexbox).\nBoth `alignItems` and `justifyContent` properties are set to `'center'`, placing child elements at the center of the parent component.\nYou can easily center-align elements using `Flexbox`.\n\n## Signature\n\n```typescript\nFlexCenter: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<View>>;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">The props object passed to the component.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span> · <span class=\"post-parameters--default\">&#39;center&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The alignment value for child elements along the main axis (Flex direction). For example, in <code>&#39;column&#39;</code> direction, <code>&#39;center&#39;</code> places elements at the horizontal center, and <code>&#39;stretch&#39;</code> expands elements to match the parent&#39;s width when their width is <code>&#39;auto&#39;</code>. This value is applied to <a href=\"https://reactnative.dev/docs/0.72/layout-props#alignitems\" target=\"_blank\" rel=\"noreferrer\">`alignItems`</a>, with a default value of <code>&#39;center&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span> · <span class=\"post-parameters--default\">&#39;center&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The alignment value for child elements along the cross axis (perpendicular to Flex direction). For example, in <code>&#39;column&#39;</code> direction, <code>flex-start</code> places elements at the top of the parent, and <code>&#39;center&#39;</code> places them at the vertical center. This value is applied to <a href=\"https://reactnative.dev/docs/0.72/layout-props#justifycontent\" target=\"_blank\" rel=\"noreferrer\">`justifyContent`</a>, with a default value of <code>&#39;center&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;column&#39; | &#39;row&#39;</span> · <span class=\"post-parameters--default\">&#39;column&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the direction in which child elements are arranged. Default value is <code>&#39;column&#39;</code>, arranging elements vertically.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">ViewProps[&#39;style&#39;]</span>\n        <br />\n        <p class=\"post-parameters--description\">The <code>style</code> object to be applied to the <code>Flex.Center</code> component. Used to specify styles other than Flexbox layout, such as background color, border, and margin. Default value is <code>undefined</code>.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## Example\n\n### Example of placing elements at the exact center\n\n```tsx\nimport { Flex } from '@granite-js/react-native';\nimport { Text } from 'react-native';\n\nfunction FlexCenterExample() {\n  return (\n    <Flex.Center style={{ width: '100%', height: 100, borderWidth: 1 }}>\n      <Text>Place at the exact center</Text>\n    </Flex.Center>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/style-utils/ui/FlexCenterHorizontal.md",
    "content": "---\nsourcePath: packages/style-utils/src/flex.tsx\n---\n\n# FlexCenterHorizontal\n\n`Flex.CenterHorizontal` is a component for **horizontally centering** child elements based on [**Flexbox Layout**](https://reactnative.dev/docs/0.72/flexbox).\nThe `alignItems` property is set to `'center'`, placing child elements at the horizontal center of the parent component.\n\n## Signature\n\n```typescript\nFlexCenterHorizontal: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<View>>;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">The props object passed to the component.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span> · <span class=\"post-parameters--default\">&#39;center&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The alignment value for child elements along the main axis (Flex direction). For example, in <code>&#39;column&#39;</code> direction, <code>&#39;center&#39;</code> places elements at the horizontal center, and <code>&#39;stretch&#39;</code> expands elements to match the parent&#39;s width when their width is <code>&#39;auto&#39;</code>. This value is applied to <a href=\"https://reactnative.dev/docs/0.72/layout-props#alignitems\" target=\"_blank\" rel=\"noreferrer\">`alignItems`</a>, with a default value of <code>&#39;center&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span> · <span class=\"post-parameters--default\">&#39;flex-start&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The alignment value for child elements along the cross axis (perpendicular to Flex direction). For example, in <code>&#39;column&#39;</code> direction, <code>flex-start</code> places elements at the top of the parent, and <code>&#39;center&#39;</code> places them at the vertical center. This value is applied to <a href=\"https://reactnative.dev/docs/0.72/layout-props#justifycontent\" target=\"_blank\" rel=\"noreferrer\">`justifyContent`</a>, with a default value of <code>&#39;flex-start&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;column&#39; | &#39;row&#39;</span> · <span class=\"post-parameters--default\">&#39;column&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the direction in which child elements are arranged. Default value is <code>&#39;column&#39;</code>, arranging elements vertically.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">ViewProps[&#39;style&#39;]</span>\n        <br />\n        <p class=\"post-parameters--description\">The <code>style</code> object to be applied to the <code>Flex.CenterHorizontal</code> component. Used to specify styles other than Flexbox layout, such as background color, border, and margin. Default value is <code>undefined</code>.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## Example\n\n### Example of horizontally centering elements\n\n```tsx\nimport { Flex } from '@granite-js/react-native';\nimport { Text } from 'react-native';\n\nfunction FlexCenterHorizontalExample() {\n  return (\n    <Flex.CenterHorizontal style={{ width: '100%', height: 100, borderWidth: 1 }}>\n      <Text>Place at the horizontal center</Text>\n    </Flex.CenterHorizontal>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/style-utils/ui/FlexCenterVertical.md",
    "content": "---\nsourcePath: packages/style-utils/src/flex.tsx\n---\n\n# FlexCenterVertical\n\n`Flex.CenterVertical` is a component for **vertically centering** child elements based on [**Flexbox Layout**](https://reactnative.dev/docs/0.72/flexbox).\nThe `justifyContent` property is set to `'center'`, placing child elements at the vertical center of the parent component.\n\n## Signature\n\n```typescript\nFlexCenterVertical: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<View>>;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">The props object passed to the component.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span> · <span class=\"post-parameters--default\">&#39;center&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The alignment value for child elements along the main axis (Flex direction). For example, in <code>&#39;column&#39;</code> direction, <code>&#39;center&#39;</code> places elements at the horizontal center, and <code>&#39;stretch&#39;</code> expands elements to match the parent&#39;s width when their width is <code>&#39;auto&#39;</code>. This value is applied to <a href=\"https://reactnative.dev/docs/0.72/layout-props#alignitems\" target=\"_blank\" rel=\"noreferrer\">`alignItems`</a>, with a default value of <code>&#39;stretch&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span> · <span class=\"post-parameters--default\">&#39;center&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The alignment value for child elements along the cross axis (perpendicular to Flex direction). For example, in <code>&#39;column&#39;</code> direction, <code>flex-start</code> places elements at the top of the parent, and <code>&#39;center&#39;</code> places them at the vertical center. This value is applied to <a href=\"https://reactnative.dev/docs/0.72/layout-props#justifycontent\" target=\"_blank\" rel=\"noreferrer\">`justifyContent`</a>, with a default value of <code>&#39;center&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;column&#39; | &#39;row&#39;</span> · <span class=\"post-parameters--default\">&#39;column&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the direction in which child elements are arranged. Default value is <code>&#39;column&#39;</code>, arranging elements vertically.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">ViewProps[&#39;style&#39;]</span>\n        <br />\n        <p class=\"post-parameters--description\">The <code>style</code> object to be applied to the <code>Flex.CenterVertical</code> component. Used to specify styles other than Flexbox layout, such as background color, border, and margin. Default value is <code>undefined</code>.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## Example\n\n### Example of vertically centering elements\n\n```tsx\nimport { Flex } from '@granite-js/react-native';\nimport { Text } from 'react-native';\n\nfunction FlexCenterVerticalExample() {\n  return (\n    <Flex.CenterVertical style={{ width: '100%', height: 100, borderWidth: 1 }}>\n      <Text>Place at the vertical center</Text>\n    </Flex.CenterVertical>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/style-utils/ui/Spacing.md",
    "content": "---\nsourcePath: packages/style-utils/src/spacing.tsx\n---\n\n# Spacing\n\n`Spacing` is a component that adds margin by occupying empty space. You can specify the size of the margin in either horizontal or vertical direction.\n\n## Signature\n\n```typescript\nSpacing: import('react').NamedExoticComponent<Props>;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">The <code>props</code> object passed to the component.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.size</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">number</span>\n        <br />\n        <p class=\"post-parameters--description\">A numeric value that sets the size of the margin.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;vertical&#39; | &#39;horizontal&#39;</span> · <span class=\"post-parameters--default\">&#39;vertical&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">Sets the direction in which the margin will occupy space. Default value is <code>&#39;vertical&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.style</span><span class=\"post-parameters--type\">StyleProp&lt;ViewStyle&gt;</span>\n        <br />\n        <p class=\"post-parameters--description\">The <code>style</code> value to be applied to the <code>Spacing</code> component. Default value is <code>undefined</code>, used when applying additional styles.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## Example\n\n### Example of creating empty space by adding margins of size `16` in both horizontal and vertical directions\n\n```tsx\nimport { View, Text } from 'react-native';\nimport { Spacing } from '@granite-js/react-native';\n\nexport function SpacingExample() {\n  return (\n    <View>\n      <Text>Top</Text>\n      <Spacing size={16} direction=\"vertical\" style={{ backgroundColor: 'red', width: 5 }} />\n      <Text>Bottom, positioned below by the vertical margin</Text>\n\n      <View style={{ flexDirection: 'row' }}>\n        <Text>Left</Text>\n        <Spacing size={16} direction=\"horizontal\" style={{ backgroundColor: 'red', height: 5 }} />\n        <Text>Right, positioned to the side by the horizontal margin</Text>\n      </View>\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/style-utils/ui/Stack.md",
    "content": "---\nsourcePath: packages/style-utils/src/stack.tsx\n---\n\n# Stack\n\n`Stack` is a component that arranges child elements in a stack layout either horizontally or vertically, and allows you to set spacing between child elements.\nYou can specify the direction as horizontal or vertical using the `direction` property, and control the spacing between child elements using the `gutter` property.\nYou can use `Stack.Horizontal` for horizontal arrangement and `Stack.Vertical` for vertical arrangement.\n\n## Signature\n\n```typescript\nStack: StackType;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">The props object passed to the component.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The alignment value for child elements along the main axis (Flex direction). For example, in <code>&#39;column&#39;</code> direction, <code>&#39;center&#39;</code> places elements at the horizontal center, and <code>&#39;stretch&#39;</code> expands elements to match the parent&#39;s width when their width is <code>&#39;auto&#39;</code>. This value is applied to <a href=\"https://reactnative.dev/docs/0.72/layout-props#alignitems\" target=\"_blank\" rel=\"noreferrer\">`alignItems`</a>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The alignment value for child elements along the cross axis (perpendicular to Flex direction). For example, in <code>&#39;column&#39;</code> direction, <code>flex-start</code> places elements at the top of the parent, and <code>&#39;center&#39;</code> places them at the vertical center. This value is applied to <a href=\"https://reactnative.dev/docs/0.72/layout-props#justifycontent\" target=\"_blank\" rel=\"noreferrer\">`justifyContent`</a>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.direction</span><span class=\"post-parameters--type\">&#39;vertical&#39; | &#39;horizontal&#39;</span> · <span class=\"post-parameters--default\">&#39;vertical&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the direction in which child elements are arranged. Default value is <code>&#39;vertical&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.gutter</span><span class=\"post-parameters--type\">number | ReactElement</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the spacing between child elements. When a number is provided, it sets the margin in pixels, and when a <code>ReactElement</code> is passed, that component is used as the spacing. Using a number allows for precise control of spacing, while using a <code>ReactElement</code> enables more complex custom spacing implementations.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n### Property\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">Horizontal</span><span class=\"post-parameters--type\">StackHorizontal</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>Stack.Horizontal</code> is a component that arranges child elements in a <strong>horizontal</strong> stack.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">Vertical</span><span class=\"post-parameters--type\">StackVertical</span>\n    <br />\n    <p class=\"post-parameters--description\"><code>Stack.Vertical</code> is a component that arranges child elements in a <strong>vertical</strong> stack.</p>\n  </li>\n</ul>\n\n## Example\n\n### Example of arranging elements horizontally and vertically with a spacing of 16\n\n```tsx\nimport { Text } from 'react-native';\nimport { Stack } from '@granite-js/react-native';\n\nexport function StackExample() {\n  return (\n    <>\n      <Stack gutter={16} direction=\"horizontal\">\n        <Text>Arrange horizontally with 16 spacing</Text>\n        <Text>1</Text>\n        <Text>2</Text>\n        <Text>3</Text>\n      </Stack>\n      <Stack gutter={16} direction=\"vertical\">\n        <Text>Arrange vertically with 16 spacing</Text>\n        <Text>1</Text>\n        <Text>2</Text>\n        <Text>3</Text>\n      </Stack>\n    </>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/style-utils/ui/StackHorizontal.md",
    "content": "---\nsourcePath: packages/style-utils/src/stack.tsx\n---\n\n# StackHorizontal\n\n`Stack.Horizontal` is a component that arranges child elements in a horizontal stack. Using this component, you can easily control the spacing between child elements with the `gutter` property, maintaining a consistent layout in the horizontal direction.\n\n## Signature\n\n```typescript\nStackHorizontal: import('react').ForwardRefExoticComponent<\n  StackWithoutDirectionProps & import('react').RefAttributes<View>\n>;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">The props object passed to the component.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;stretch&#39; | &#39;baseline&#39;</span> · <span class=\"post-parameters--default\">&#39;stretch&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the horizontal alignment of child elements. Works the same as Flexbox&#39;s <code>align-items</code> property, with a default value of <code>&#39;stretch&#39;</code> that expands child elements to match the parent&#39;s width when their width is <code>&#39;auto&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">&#39;flex-start&#39; | &#39;flex-end&#39; | &#39;center&#39; | &#39;space-between&#39; | &#39;space-around&#39; | &#39;space-evenly&#39;</span> · <span class=\"post-parameters--default\">&#39;flex-start&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the horizontal alignment of child elements. Works the same as Flexbox&#39;s <code>justify-content</code> property, with a default value of <code>&#39;flex-start&#39;</code> that aligns child elements to the top.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.gutter</span><span class=\"post-parameters--type\">number | ReactElement</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the spacing between child elements. When a number is provided, it sets the margin in pixels, and when a <code>ReactElement</code> is passed, that component is used as the spacing. Using a number allows for precise control of spacing, while using a <code>ReactElement</code> enables more complex custom spacing implementations.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## Example\n\n### Example of arranging elements horizontally with a spacing of 16\n\n```tsx\nimport { Stack } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\nfunction StackHorizontalExample() {\n  return (\n    <Stack.Horizontal gutter={16}>\n      <Text>Arrange horizontally with 16 spacing</Text>\n      <Text>1</Text>\n      <Text>2</Text>\n      <Text>3</Text>\n    </Stack.Horizontal>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/style-utils/ui/StackVertical.md",
    "content": "---\nsourcePath: packages/style-utils/src/stack.tsx\n---\n\n# StackVertical\n\n`Stack.Vertical` is a component that arranges child elements in a vertical stack. Using this component, you can easily control the spacing between child elements with the `gutter` property, maintaining a consistent layout in the vertical direction.\n\n## Signature\n\n```typescript\nStackVertical: import('react').ForwardRefExoticComponent<\n  StackWithoutDirectionProps & import('react').RefAttributes<View>\n>;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">props</span><span class=\"post-parameters--type\">object</span>\n    <br />\n    <p class=\"post-parameters--description\">The props object passed to the component.</p>\n    <ul class=\"post-parameters-ul\">\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.align</span><span class=\"post-parameters--type\">string</span> · <span class=\"post-parameters--default\">&#39;stretch&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the vertical alignment of child elements. Works the same as Flexbox&#39;s <code>align-items</code> property, with a default value of <code>&#39;stretch&#39;</code> that expands child elements to match the parent&#39;s height when their height is <code>&#39;auto&#39;</code>.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.justify</span><span class=\"post-parameters--type\">string</span> · <span class=\"post-parameters--default\">&#39;flex-start&#39;</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the horizontal alignment of child elements. Works the same as Flexbox&#39;s <code>justify-content</code> property, with a default value of <code>&#39;flex-start&#39;</code> that aligns child elements to the left.</p>\n      </li>\n      <li class=\"post-parameters-li\">\n        <span class=\"post-parameters--name\">props.gutter</span><span class=\"post-parameters--type\">number | ReactElement</span>\n        <br />\n        <p class=\"post-parameters--description\">The value that sets the spacing between child elements. When a number is provided, it sets the margin in pixels, and when a <code>ReactElement</code> is passed, that component is used as the spacing. Using a number allows for precise control of spacing, while using a <code>ReactElement</code> enables more complex custom spacing implementations.</p>\n      </li>\n    </ul>\n  </li>\n</ul>\n\n## Example\n\n### Example of arranging elements vertically with a spacing of 16\n\n```tsx\nimport { Stack } from '@granite-js/react-native';\nimport { View, Text } from 'react-native';\n\nfunction StackVerticalExample() {\n  return (\n    <Stack.Vertical gutter={16}>\n      <Text>Arrange vertically with 16 spacing</Text>\n      <Text>1</Text>\n      <Text>2</Text>\n      <Text>3</Text>\n    </Stack.Vertical>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/style-utils/ui/margin.md",
    "content": "---\nsourcePath: packages/style-utils/src/box-spacing.tsx\n---\n\n# margin\n\nThe `margin` function sets the outer spacing of a component to create appropriate spacing between components. You can specify horizontal (x), vertical (y), and individual direction (top, right, bottom, left) spacing using numbers.\nYou can apply the same value to all directions by entering a number, or set individual values for each direction. There are also presets for commonly used values for easy application.\n\n## Signature\n\n```typescript\nmargin: BoxSpacing;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">option</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">BoxSpacingOption</span>\n    <br />\n    <p class=\"post-parameters--description\">The option value to specify outer spacing. If you enter a number, it applies the same value to all directions,</p>\n  </li>\n</ul>\n\nor you can set individual values for each direction.\n\n### Property\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the outer spacing of the component&#39;s horizontal direction (left and right) by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px outer spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px outer spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px outer spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px outer spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px outer spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px outer spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the outer spacing of the component&#39;s vertical direction (top and bottom) by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px outer spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px outer spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px outer spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px outer spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px outer spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px outer spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the outer spacing of the component&#39;s top direction by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px outer spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px outer spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px outer spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px outer spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px outer spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px outer spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the outer spacing of the component&#39;s right direction by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px outer spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px outer spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px outer spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px outer spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px outer spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px outer spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the outer spacing of the component&#39;s bottom direction by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px outer spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px outer spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px outer spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px outer spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px outer spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px outer spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the outer spacing of the component&#39;s left direction by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px outer spacing to the left</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px outer spacing to the left</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px outer spacing to the left</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px outer spacing to the left</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px outer spacing to the left</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px outer spacing to the left</p>\n  </li>\n</ul>\n\n## Example\n\n### Example of applying 8px outer spacing in horizontal and vertical directions, and 100px spacing in the bottom direction\n\n```tsx\nimport { margin } from '@granite-js/react-native';\nimport { View } from 'react-native';\n\nfunction Component() {\n  return (\n    <View>\n      <View style={margin.x8}>\n        <Text>Has horizontal spacing</Text>\n      </View>\n      <View style={margin.y8}>\n        <Text>Has vertical spacing</Text>\n      </View>\n      <View style={margin.bottom(100)}>\n        <Text>Has 100px spacing at the bottom</Text>\n      </View>\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "docs/reference/style-utils/ui/padding.md",
    "content": "---\nsourcePath: packages/style-utils/src/box-spacing.tsx\n---\n\n# padding\n\nThe `padding` function sets the inner spacing of a component to create appropriate spacing between content and boundaries. You can specify horizontal (x), vertical (y), and individual direction (top, right, bottom, left) spacing using numbers.\nYou can apply the same value to all directions by entering a number, or set individual values for each direction. There are also presets for commonly used values for easy application.\n\n## Signature\n\n```typescript\npadding: BoxSpacing;\n```\n\n### Parameter\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">option</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">BoxSpacingOption</span>\n    <br />\n    <p class=\"post-parameters--description\">The option value to specify inner spacing. If you enter a number, it applies the same value to all directions,</p>\n  </li>\n</ul>\n\nor you can set individual values for each direction.\n\n### Property\n\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the inner spacing of the component&#39;s horizontal direction (left and right) by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px inner spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px inner spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px inner spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px inner spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px inner spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">x32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px inner spacing in the horizontal direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the inner spacing of the component&#39;s vertical direction (top and bottom) by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px inner spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px inner spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px inner spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px inner spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px inner spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">y32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px inner spacing in the vertical direction</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the inner spacing of the component&#39;s top direction by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px inner spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px inner spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px inner spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px inner spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px inner spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">top32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px inner spacing to the top</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the inner spacing of the component&#39;s right direction by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px inner spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px inner spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px inner spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px inner spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px inner spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">right32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px inner spacing to the right</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the inner spacing of the component&#39;s bottom direction by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px inner spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px inner spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px inner spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px inner spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px inner spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">bottom32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px inner spacing to the bottom</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">(value: number) =&gt; ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">Returns a style object that sets the inner spacing of the component&#39;s left direction by the input number. The returned object is passed to the component&#39;s <code>style</code> property to apply the spacing.</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left4</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 4px inner spacing to the left</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left8</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 8px inner spacing to the left</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left12</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 12px inner spacing to the left</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left16</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 16px inner spacing to the left</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left24</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 24px inner spacing to the left</p>\n  </li>\n</ul>\n<ul class=\"post-parameters-ul\">\n  <li class=\"post-parameters-li post-parameters-li-root\">\n    <span class=\"post-parameters--name\">left32</span><span class=\"post-parameters--required\">required</span> · <span class=\"post-parameters--type\">ViewStyle</span>\n    <br />\n    <p class=\"post-parameters--description\">A style object that applies 32px inner spacing to the left</p>\n  </li>\n</ul>\n\n## Example\n\n### Example of applying 8px inner spacing in horizontal and vertical directions, and 100px spacing in the bottom direction\n\n```tsx\nimport { padding } from '@granite-js/react-native';\nimport { View } from 'react-native';\n\nfunction Component() {\n  return (\n    <View>\n      <View style={padding.x8}>\n        <Text>Has horizontal spacing</Text>\n      </View>\n      <View style={padding.y8}>\n        <Text>Has vertical spacing</Text>\n      </View>\n      <View style={padding.bottom(100)}>\n        <Text>Has 100px spacing at the bottom</Text>\n      </View>\n    </View>\n  );\n}\n```\n"
  },
  {
    "path": "eslint.config.cjs",
    "content": "/**\n * https://github.com/microsoft/vscode-eslint/issues/1620#issuecomment-2090780605\n */\n\nconst tseslint = require('typescript-eslint');\nconst { fixupPluginRules } = require('@eslint/compat');\nconst eslint = require('@eslint/js');\nconst prettierConfig = require('eslint-config-prettier');\nconst importPlugin = require('eslint-plugin-import');\nconst reactPlugin = require('eslint-plugin-react');\nconst reactHooksPlugin = require('eslint-plugin-react-hooks');\nconst unicorn = require('eslint-plugin-unicorn');\nconst unusedImports = require('eslint-plugin-unused-imports');\n\nfunction getCommonJSPackageRule(packages) {\n  return {\n    ignores: packages.map((name) => `packages/${name}`),\n    plugins: {\n      '@typescript-eslint': tseslint.plugin,\n    },\n    rules: {\n      // CommonJS 환경에서는 `require()` 호출이 가능하도록 규칙 비활성화\n      '@typescript-eslint/no-var-requires': 'off',\n    },\n  };\n}\n\nmodule.exports = tseslint.config(\n  {\n    ignores: [\n      'docs/',\n      'packages/devtools-frontend/src/front_end/',\n      'packages/mpack/src/vendors/metro*',\n      'packages/create-granite-app/templates/*',\n      'packages/create-granite-app/tool-templates/*',\n      '**/fixtures/**/*',\n      '**/dist/',\n      '**/esm/',\n      '**/.next/',\n      '**/.next-local/',\n      '**/bin/*.js',\n      '.pnp.*',\n      '.yarn/',\n      '**/.granite/',\n    ],\n  },\n  eslint.configs.recommended,\n  prettierConfig,\n  {\n    plugins: { unicorn },\n  },\n  {\n    rules: {\n      'no-implicit-coercion': 'error',\n      'no-warning-comments': [\n        'warn',\n        {\n          terms: ['TODO', 'FIXME', 'XXX', 'BUG'],\n          location: 'anywhere',\n        },\n      ],\n      curly: ['error', 'all'],\n      eqeqeq: ['error', 'always', { null: 'ignore' }],\n      // TypeScript에서 이미 잡고 있는 문제이기 때문에 + location, document 등의 global variable도 잡아서\n      'no-undef': 'off',\n      'no-empty': ['error', { allowEmptyCatch: true }],\n    },\n  },\n  {\n    plugins: {\n      'unused-imports': unusedImports,\n    },\n    rules: {\n      'unused-imports/no-unused-imports': 'error',\n      'unused-imports/no-unused-vars': 'off',\n    },\n  },\n  {\n    plugins: {\n      '@typescript-eslint': tseslint.plugin,\n    },\n    extends: [...tseslint.configs.recommended],\n    languageOptions: {\n      parser: tseslint.parser,\n      parserOptions: {\n        ecmaFeatures: { jsx: true },\n      },\n    },\n    rules: {\n      '@typescript-eslint/no-explicit-any': 'off',\n      '@typescript-eslint/explicit-function-return-type': 'off',\n      '@typescript-eslint/no-var-requires': 'warn',\n      '@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',\n      '@typescript-eslint/no-inferrable-types': 'warn',\n      '@typescript-eslint/no-empty-function': 'off',\n      '@typescript-eslint/naming-convention': [\n        'error',\n        { format: ['camelCase', 'UPPER_CASE', 'PascalCase'], selector: 'variable', leadingUnderscore: 'allow' },\n        { format: ['camelCase', 'PascalCase'], selector: 'function' },\n        { format: ['PascalCase'], selector: 'interface' },\n        { format: ['PascalCase'], selector: 'typeAlias' },\n      ],\n      '@typescript-eslint/no-require-imports': 'off',\n      '@typescript-eslint/explicit-module-boundary-types': 'off',\n      '@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],\n      '@typescript-eslint/member-ordering': [\n        'error',\n        {\n          default: [\n            'public-static-field',\n            'private-static-field',\n            'public-instance-field',\n            'private-instance-field',\n            'public-constructor',\n            'private-constructor',\n            'public-instance-method',\n            'private-instance-method',\n          ],\n        },\n      ],\n    },\n  },\n  {\n    plugins: {\n      import: importPlugin,\n    },\n    rules: {\n      'import/no-duplicates': ['error', { 'prefer-inline': true }],\n      'import/order': [\n        2,\n        {\n          groups: ['builtin', 'external', ['parent', 'sibling'], 'index'],\n          alphabetize: {\n            order: 'asc',\n            caseInsensitive: false,\n          },\n          'newlines-between': 'never',\n        },\n      ],\n    },\n  },\n  {\n    languageOptions: {\n      parserOptions: {\n        ecmaFeatures: {\n          jsx: true,\n        },\n      },\n    },\n    plugins: {\n      react: reactPlugin,\n      'react-hooks': fixupPluginRules(reactHooksPlugin),\n    },\n    rules: {\n      ...reactHooksPlugin.configs.recommended.rules,\n    },\n  },\n  getCommonJSPackageRule(['mpack'])\n);\n"
  },
  {
    "path": "infra/deployment-manager/CHANGELOG.md",
    "content": "# @granite-js/deployment-manager\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n## 1.0.18\n\n## 1.0.17\n\n## 1.0.16\n\n## 1.0.15\n\n## 1.0.14\n\n## 1.0.13\n\n## 1.0.12\n\n## 1.0.11\n\n## 1.0.10\n\n## 1.0.9\n\n## 1.0.8\n\n## 1.0.7\n\n## 1.0.6\n\n## 1.0.5\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n### Patch Changes\n\n- ee26531: fix: align exports map\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "infra/deployment-manager/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/deployment-manager\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@aws-sdk/client-cloudfront**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/aws/aws-sdk-js-v3.git\n\t\n2. **@aws-sdk/client-s3**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/aws/aws-sdk-js-v3.git\n\t\n3. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n4. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n5. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n6. **aws-lambda**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/awspilot/cli-lambda-deploy\n\t\n7. **aws-sdk-client-mock**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/m-radzikowski/aws-sdk-client-mock.git\n\t\n8. **es-toolkit**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/toss/es-toolkit.git\n\t\n9. **tsup**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/egoist/tsup.git\n\t\n10. **valibot**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/open-circle/valibot\n\t\n11. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "infra/deployment-manager/package.json",
    "content": "{\n  \"name\": \"@granite-js/deployment-manager\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"main\": \"./dist/index.cjs\",\n  \"types\": \"./dist/index.d.ts\",\n  \"module\": \"./dist/index.js\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"infra/deployment-manager\"\n  },\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    }\n  },\n  \"files\": [\n    \"dist\",\n    \"bin\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"test\": \"vitest --run --coverage\",\n    \"build\": \"tsup\"\n  },\n  \"devDependencies\": {\n    \"@aws-sdk/client-cloudfront\": \"^3.812.0\",\n    \"@aws-sdk/client-s3\": \"^3.812.0\",\n    \"@types/node\": \"catalog:tools\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"aws-lambda\": \"^1.0.7\",\n    \"aws-sdk-client-mock\": \"^4.1.0\",\n    \"es-toolkit\": \"^1.39.8\",\n    \"tsup\": \"^8.5.0\",\n    \"typescript\": \"catalog:tools\",\n    \"valibot\": \"^1.1.0\",\n    \"vitest\": \"^4.0.12\"\n  }\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/DeployManager.spec.ts",
    "content": "import { randomUUID } from 'crypto';\nimport { S3Client as BaseS3Client, GetObjectCommand, NoSuchKey } from '@aws-sdk/client-s3';\nimport { mockClient } from 'aws-sdk-client-mock';\nimport { range, shuffle } from 'es-toolkit';\nimport { safeParse } from 'valibot';\nimport { afterEach, beforeAll, beforeEach, describe, expect, it } from 'vitest';\nimport { DeployManager } from './DeployManager';\nimport { MAX_GROUP_ID } from './constants';\nimport { InternalServerError } from './errors/InternalServerError';\nimport { InvalidRequest } from './errors/InvalidRequest';\nimport { NotFoundError } from './errors/NotFoundError';\nimport { S3Client } from './s3/client';\nimport {\n  deploymentState,\n  type CanaryDeploymentState,\n  type DeploymentState,\n  type PendingDeploymentState,\n  type StableDeploymentState,\n} from './types';\n\ndescribe('DeployManager', () => {\n  const TEST_BUCKET = 'test';\n  const TEST_APP_NAME = 'my-app';\n\n  const PENDING_STATE: PendingDeploymentState = {\n    type: 'PENDING',\n  };\n\n  const STABLE_STATE: StableDeploymentState = {\n    type: 'STABLE',\n    deploymentId: generateRandomDeploymentId(),\n  };\n\n  const CANARY_DEPLOY_PROGRESS_THRESHOLD = 50;\n  const CANARY_STATE: CanaryDeploymentState = {\n    type: 'CANARY',\n    groupIdsCandidate: shuffle(range(1, 1001)).map(String),\n    deploymentId: {\n      old: generateRandomDeploymentId(),\n      target: generateRandomDeploymentId(),\n    },\n    progress: {\n      previous: 0,\n      current: CANARY_DEPLOY_PROGRESS_THRESHOLD,\n    },\n  };\n\n  const s3Mock = mockClient(BaseS3Client);\n  const s3Client = new S3Client({ bucket: TEST_BUCKET });\n\n  function generateRandomDeploymentId() {\n    return randomUUID();\n  }\n\n  function generateNumericGroupId() {\n    return Math.floor(Math.random() * 1000 + 1).toString();\n  }\n\n  function mockS3ReadableStream(mockedData: string) {\n    const stream = new ReadableStream({\n      start(controller) {\n        controller.enqueue(new TextEncoder().encode(mockedData));\n        controller.close();\n      },\n    });\n\n    return Object.assign(stream, {\n      transformToString: () => mockedData,\n    });\n  }\n\n  afterEach(() => {\n    s3Mock.reset();\n  });\n\n  describe('readDeploymentState', () => {\n    describe('when the valid deployment state is existing', () => {\n      const VALID_DEPLOYMENT_STATES: DeploymentState[] = [PENDING_STATE, STABLE_STATE, CANARY_STATE];\n\n      beforeAll(() => {\n        const pickedDeploymentStateIndex = Math.floor(Math.random() * VALID_DEPLOYMENT_STATES.length);\n        s3Mock\n          .on(GetObjectCommand, {\n            Bucket: TEST_BUCKET,\n            Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n          })\n          .resolves({\n            Body: mockS3ReadableStream(JSON.stringify(VALID_DEPLOYMENT_STATES[pickedDeploymentStateIndex])),\n          });\n      });\n\n      it('should returns parsed deployment state', async () => {\n        const result = await DeployManager.readDeploymentState(TEST_APP_NAME, {\n          s3Client,\n        });\n\n        expect(safeParse(deploymentState, result)).toBeDefined();\n      });\n    });\n\n    describe('when the deployment state is not valid', () => {\n      beforeAll(() => {\n        s3Mock\n          .on(GetObjectCommand, {\n            Bucket: TEST_BUCKET,\n            Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n          })\n          .resolves({\n            Body: mockS3ReadableStream(\n              JSON.stringify({\n                type: 'UNKNOWN_TYPE',\n                deploymentId: generateRandomDeploymentId(),\n              })\n            ),\n          });\n      });\n\n      it('should throws `InternalServerError`', async () => {\n        await expect(async () => await DeployManager.readDeploymentState(TEST_APP_NAME, { s3Client })).rejects.toThrow(\n          InternalServerError\n        );\n      });\n    });\n  });\n\n  describe('readCluster', () => {\n    const CLUSTER_ID = `cluster-${Date.now()}`;\n\n    describe('when the valid deployment info is existing', () => {\n      beforeAll(() => {\n        s3Mock\n          .on(GetObjectCommand, {\n            Bucket: TEST_BUCKET,\n            Key: `deployments/${TEST_APP_NAME}/clusters/${CLUSTER_ID}.deploymentInfo`,\n          })\n          .resolves({\n            Body: mockS3ReadableStream(\n              JSON.stringify({\n                deploymentId: generateRandomDeploymentId(),\n              })\n            ),\n          });\n      });\n\n      it('should returns parsed deployment state', async () => {\n        const result = await DeployManager.readCluster(\n          {\n            appName: TEST_APP_NAME,\n            clusterId: CLUSTER_ID,\n          },\n          { s3Client }\n        );\n\n        expect(typeof result).toBe('string');\n      });\n    });\n\n    describe('when the deployment state is not existing', () => {\n      beforeAll(() => {\n        s3Mock\n          .on(GetObjectCommand, {\n            Bucket: TEST_BUCKET,\n            Key: `deployments/${TEST_APP_NAME}/clusters/${CLUSTER_ID}.deploymentInfo`,\n          })\n          .rejects(new NoSuchKey({ message: 'NoSuchKey', $metadata: {} }));\n      });\n\n      it('should returns null', async () => {\n        const result = await DeployManager.readCluster(\n          {\n            appName: TEST_APP_NAME,\n            clusterId: CLUSTER_ID,\n          },\n          { s3Client }\n        );\n\n        expect(result).toBeNull();\n      });\n    });\n\n    describe('when the deployment state is not valid', () => {\n      beforeAll(() => {\n        s3Mock\n          .on(GetObjectCommand, {\n            Bucket: TEST_BUCKET,\n            Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n          })\n          .resolves({\n            Body: mockS3ReadableStream(JSON.stringify({ wrongId: generateRandomDeploymentId() })),\n          });\n      });\n\n      it('should returns null', async () => {\n        const result = await DeployManager.readCluster(\n          {\n            appName: TEST_APP_NAME,\n            clusterId: CLUSTER_ID,\n          },\n          { s3Client }\n        );\n\n        expect(result).toBeNull();\n      });\n    });\n  });\n\n  describe('resolveDeploymentId', () => {\n    describe('when provide numeric group id (1~1000)', () => {\n      const GROUP_ID = generateNumericGroupId();\n\n      describe('when the deployment state is `PENDING`', () => {\n        beforeAll(() => {\n          s3Mock\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify(PENDING_STATE)),\n            });\n        });\n\n        it('should throws `NotFoundError`', async () => {\n          await expect(\n            async () =>\n              await DeployManager.resolveDeploymentId(\n                {\n                  appName: TEST_APP_NAME,\n                  groupId: GROUP_ID,\n                  allowAccessCluster: true,\n                },\n                { s3Client }\n              )\n          ).rejects.toThrow(NotFoundError);\n        });\n      });\n\n      describe('when the deployment state is `STABLE`', () => {\n        beforeAll(() => {\n          s3Mock\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify(STABLE_STATE)),\n            });\n        });\n\n        it('should returns the deployment id', async () => {\n          const result = await DeployManager.resolveDeploymentId(\n            {\n              appName: TEST_APP_NAME,\n              groupId: GROUP_ID,\n              allowAccessCluster: true,\n            },\n            { s3Client }\n          );\n\n          expect(result).toBe(STABLE_STATE.deploymentId);\n        });\n      });\n\n      describe('when the deployment state is `CANARY`', () => {\n        beforeEach(() => {\n          s3Mock\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify(CANARY_STATE)),\n            });\n        });\n\n        it('should returns the deployment id (target)', async () => {\n          const result = await DeployManager.resolveDeploymentId(\n            {\n              appName: TEST_APP_NAME,\n              groupId: CANARY_STATE.groupIdsCandidate[0]!,\n              allowAccessCluster: true,\n            },\n            { s3Client }\n          );\n\n          expect(result).toBe(CANARY_STATE.deploymentId.target);\n        });\n\n        it('should returns the deployment id (old)', async () => {\n          const oldBundleGroupIndex = Math.floor(\n            CANARY_STATE.groupIdsCandidate.length * (CANARY_DEPLOY_PROGRESS_THRESHOLD / 100) + 1\n          );\n\n          const result = await DeployManager.resolveDeploymentId(\n            {\n              appName: TEST_APP_NAME,\n              groupId: CANARY_STATE.groupIdsCandidate[oldBundleGroupIndex]!,\n              allowAccessCluster: true,\n            },\n            {\n              s3Client,\n            }\n          );\n\n          expect(result).toBe(CANARY_STATE.deploymentId.old);\n        });\n      });\n    });\n\n    describe('when provide numeric group id (out of range)', () => {\n      const GROUP_ID = (MAX_GROUP_ID + 1).toString();\n\n      describe('when the deployment state is `PENDING`', () => {\n        beforeAll(() => {\n          s3Mock\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify(PENDING_STATE)),\n            });\n        });\n\n        it('should throws `InvalidRequest`', async () => {\n          await expect(\n            async () =>\n              await DeployManager.resolveDeploymentId(\n                {\n                  appName: TEST_APP_NAME,\n                  groupId: GROUP_ID,\n                  allowAccessCluster: true,\n                },\n                { s3Client }\n              )\n          ).rejects.toThrow(InvalidRequest);\n        });\n      });\n\n      describe('when the deployment state is `STABLE`', () => {\n        beforeAll(() => {\n          s3Mock\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify(STABLE_STATE)),\n            });\n        });\n\n        it('should throws `InvalidRequest`', async () => {\n          await expect(\n            async () =>\n              await DeployManager.resolveDeploymentId(\n                {\n                  appName: TEST_APP_NAME,\n                  groupId: GROUP_ID,\n                  allowAccessCluster: true,\n                },\n                { s3Client }\n              )\n          ).rejects.toThrow(InvalidRequest);\n        });\n      });\n\n      describe('when the deployment state is `CANARY`', () => {\n        beforeAll(() => {\n          s3Mock\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify(CANARY_STATE)),\n            });\n        });\n\n        it('should throws `InvalidRequest`', async () => {\n          await expect(\n            async () =>\n              await DeployManager.resolveDeploymentId(\n                {\n                  appName: TEST_APP_NAME,\n                  groupId: GROUP_ID,\n                  allowAccessCluster: true,\n                },\n                { s3Client }\n              )\n          ).rejects.toThrow(InvalidRequest);\n        });\n      });\n    });\n\n    describe('when provide non-numeric group id', () => {\n      const CLUSTER_ID = `cluster-${Date.now()}`;\n      const CLUSTER_DEPLOYMENT_ID = generateRandomDeploymentId();\n\n      describe('when the deployment state is `PENDING`', () => {\n        beforeAll(() => {\n          s3Mock\n            // Deployment state\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify(PENDING_STATE)),\n            })\n            // Cluster's deployment info\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/clusters/${CLUSTER_ID}.deploymentInfo`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify({ deploymentId: CLUSTER_DEPLOYMENT_ID })),\n            });\n        });\n\n        it('should returns the cluster deployment id', async () => {\n          const result = await DeployManager.resolveDeploymentId(\n            {\n              appName: TEST_APP_NAME,\n              groupId: CLUSTER_ID,\n              allowAccessCluster: true,\n            },\n            { s3Client }\n          );\n\n          expect(result).toBe(CLUSTER_DEPLOYMENT_ID);\n        });\n      });\n\n      describe('when the deployment state is `STABLE`', () => {\n        beforeAll(() => {\n          s3Mock\n            // Deployment state\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify(STABLE_STATE)),\n            })\n            // Cluster's deployment info\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/clusters/${CLUSTER_ID}.deploymentInfo`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify({ deploymentId: CLUSTER_DEPLOYMENT_ID })),\n            });\n        });\n\n        it('should returns the cluster deployment id', async () => {\n          const result = await DeployManager.resolveDeploymentId(\n            {\n              appName: TEST_APP_NAME,\n              groupId: CLUSTER_ID,\n              allowAccessCluster: true,\n            },\n            { s3Client }\n          );\n\n          expect(result).toBe(CLUSTER_DEPLOYMENT_ID);\n        });\n      });\n\n      describe('when the deployment state is `CANARY`', () => {\n        beforeAll(() => {\n          s3Mock\n            // Deployment state\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/deployment_state`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify(CANARY_STATE)),\n            })\n            // Cluster's deployment info\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/clusters/${CLUSTER_ID}.deploymentInfo`,\n            })\n            .resolves({\n              Body: mockS3ReadableStream(JSON.stringify({ deploymentId: CLUSTER_DEPLOYMENT_ID })),\n            });\n        });\n\n        it('should returns the cluster deployment id', async () => {\n          const result = await DeployManager.resolveDeploymentId(\n            {\n              appName: TEST_APP_NAME,\n              groupId: CLUSTER_ID,\n              allowAccessCluster: true,\n            },\n            { s3Client }\n          );\n\n          expect(result).toBe(CLUSTER_DEPLOYMENT_ID);\n        });\n      });\n\n      describe('when the cluster deployment info is not existing', () => {\n        beforeAll(() => {\n          s3Mock\n            // Cluster's deployment info\n            .on(GetObjectCommand, {\n              Bucket: TEST_BUCKET,\n              Key: `deployments/${TEST_APP_NAME}/clusters/${CLUSTER_ID}.deploymentInfo`,\n            })\n            .rejects(new NoSuchKey({ message: 'NoSuchKey', $metadata: {} }));\n        });\n\n        it('should throws `NotFoundError`', async () => {\n          await expect(\n            async () =>\n              await DeployManager.resolveDeploymentId(\n                {\n                  appName: TEST_APP_NAME,\n                  groupId: CLUSTER_ID,\n                  allowAccessCluster: true,\n                },\n                { s3Client }\n              )\n          ).rejects.toThrow(NotFoundError);\n        });\n      });\n\n      describe('when `allowAccessCluster` option is disabled', () => {\n        it('should throws `InvalidRequest`', async () => {\n          await expect(\n            async () =>\n              await DeployManager.resolveDeploymentId(\n                {\n                  appName: TEST_APP_NAME,\n                  groupId: CLUSTER_ID,\n                  allowAccessCluster: false,\n                },\n                {\n                  s3Client,\n                }\n              )\n          ).rejects.toThrow(InvalidRequest);\n        });\n      });\n    });\n  });\n\n  describe('resolveBundle', () => {\n    const APP_NAME = 'my-app';\n\n    it('should returns gzipped hbc path for Android', () => {\n      const deploymentId = generateRandomDeploymentId();\n      expect(\n        DeployManager.resolveBundle({\n          appName: APP_NAME,\n          platform: 'android',\n          deploymentId,\n        })\n      ).toBe(`bundles/${APP_NAME}/${deploymentId}/bundle.android.hbc.gz`);\n    });\n\n    it('should returns gzipped hbc path for iOS', () => {\n      const deploymentId = generateRandomDeploymentId();\n      expect(\n        DeployManager.resolveBundle({\n          appName: APP_NAME,\n          platform: 'ios',\n          deploymentId,\n        })\n      ).toBe(`bundles/${APP_NAME}/${deploymentId}/bundle.ios.hbc.gz`);\n    });\n\n    it('should returns gzipped hbc path for Android (tagged)', () => {\n      const deploymentId = generateRandomDeploymentId();\n      expect(\n        DeployManager.resolveBundle({\n          appName: APP_NAME,\n          platform: 'android',\n          deploymentId,\n          tag: '0_72_6-reav3',\n        })\n      ).toBe(`bundles/${APP_NAME}/${deploymentId}/bundle.android.0_72_6-reav3.hbc.gz`);\n    });\n\n    it('should returns gzipped hbc path for iOS (tagged)', () => {\n      const deploymentId = generateRandomDeploymentId();\n      expect(\n        DeployManager.resolveBundle({\n          appName: APP_NAME,\n          platform: 'ios',\n          deploymentId,\n          tag: '0_72_6-reav3',\n        })\n      ).toBe(`bundles/${APP_NAME}/${deploymentId}/bundle.ios.0_72_6-reav3.hbc.gz`);\n    });\n  });\n});\n"
  },
  {
    "path": "infra/deployment-manager/src/DeployManager.ts",
    "content": "import { planRollout } from './planRollout';\nimport { readBundleList } from './readBundleList';\nimport { readCluster } from './readCluster';\nimport { readDeploymentState } from './readDeploymentState';\nimport { resolveBundle } from './resolveBundle';\nimport { resolveDeploymentId } from './resolveDeploymentId';\nimport { rollout } from './rollout';\nimport { rolloutCluster } from './rolloutCluster';\nimport { updateBundleList } from './updateBundleList';\nimport { uploadBundle } from './uploadBundle';\n\nexport const DeployManager = {\n  planRollout,\n  rollout,\n  rolloutCluster,\n  readBundleList,\n  readDeploymentState,\n  readCluster,\n  resolveDeploymentId,\n  resolveBundle,\n  updateBundleList,\n  uploadBundle,\n};\n"
  },
  {
    "path": "infra/deployment-manager/src/constants.ts",
    "content": "export const MAX_GROUP_ID = 1000;\nexport const BUNDLE_BASE_NAME = 'bundle';\nexport const MAX_HISTORY_COUNT = 50;\n"
  },
  {
    "path": "infra/deployment-manager/src/errors/InternalServerError.ts",
    "content": "export class InternalServerError<E = unknown> extends Error {\n  constructor(message: string, originError: E) {\n    super();\n    this.name = 'InternalServerError';\n    this.message =\n      originError instanceof Error ? `${message} (origin: ${originError.name}, ${originError.message})` : message;\n  }\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/errors/InvalidRequest.ts",
    "content": "export class InvalidRequest extends Error {\n  constructor(message: string) {\n    super();\n    this.name = 'InvalidRequest';\n    this.message = message;\n  }\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/errors/NotFoundError.ts",
    "content": "export class NotFoundError extends Error {\n  constructor(message: string) {\n    super();\n    this.name = 'NotFoundError';\n    this.message = message;\n  }\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/errors/index.ts",
    "content": "export * from './InternalServerError';\nexport * from './InvalidRequest';\nexport * from './NotFoundError';\n"
  },
  {
    "path": "infra/deployment-manager/src/index.ts",
    "content": "import { S3Client, paths } from './s3';\n\nexport { DeployManager } from './DeployManager';\nexport { InternalServerError, InvalidRequest, NotFoundError } from './errors';\n\nexport * from '@aws-sdk/client-s3';\nexport * from './types';\nexport { S3Client, paths };\n"
  },
  {
    "path": "infra/deployment-manager/src/planCanaryRollout.ts",
    "content": "import { shuffle, range } from 'es-toolkit';\nimport { MAX_GROUP_ID } from './constants';\nimport type { CanaryDeploymentState, DeploymentId } from './types';\n\nexport interface PlanCanaryRolloutConfig {\n  previous: {\n    deploymentId: DeploymentId;\n    progress: number;\n    groupIdsCandidate: null | string[];\n  };\n  next: {\n    deploymentId: DeploymentId;\n    progress: number;\n  };\n}\n\nexport function planCanaryRollout(config: PlanCanaryRolloutConfig): CanaryDeploymentState {\n  const { previous, next } = config;\n\n  return {\n    type: 'CANARY',\n    deploymentId: {\n      old: previous.deploymentId,\n      target: next.deploymentId,\n    },\n    progress: {\n      previous: previous.progress,\n      current: next.progress,\n    },\n    // 점진적 배포를 처음 시작할 때 배포 대상 그룹 ID를 섞고 점진적 배포가 완료될 때까지 재사용합니다.\n    // 매번 동일한 유저들이 실험 대상이 되지 않도록 하는 것입니다.\n    groupIdsCandidate: previous.groupIdsCandidate ?? generateGroupIdCandidate(),\n  };\n}\n\n/**\n * 1 ~ MAX_GROUP_ID 까지의 랜덤 숫자가 섞여진 배열을 반환합니다.\n */\nfunction generateGroupIdCandidate() {\n  return shuffle(range(1, MAX_GROUP_ID + 1).map(String));\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/planRollout.ts",
    "content": "import { planCanaryRollout } from './planCanaryRollout';\nimport { planStableRollout } from './planStableRollout';\nimport type { DeploymentState, DeploymentId, StableDeploymentState, CanaryDeploymentState } from './types';\n\nexport interface PlanConfig {\n  targetDeploymentId: DeploymentId;\n  progress: number;\n}\n\n/**\n * 배포를 위한 DeploymentState를 생성합니다. 실제로 S3 저장된 값을 변경하진 않습니다.\n * DeployManager.rollout을 통해 생성된 새로운 DeploymentState S3에 반영해야 배포가 완료됩니다.\n */\nexport async function planRollout(currentState: DeploymentState, config: PlanConfig): Promise<DeploymentState> {\n  switch (currentState.type) {\n    case 'PENDING':\n      return planFromPendingState(config);\n    case 'STABLE':\n      return planFromStableState(currentState, config);\n    case 'CANARY':\n      return planFromCanaryState(currentState, config);\n  }\n}\n\nfunction planFromPendingState(config: PlanConfig) {\n  if (isFullyRollout(config) !== true) {\n    throw new Error('PENDING 상태에서는 STABLE 배포만 가능합니다.');\n  }\n  return planStableRollout({ deploymentId: config.targetDeploymentId });\n}\n\nfunction planFromStableState(currentState: StableDeploymentState, config: PlanConfig) {\n  if (isRollback(config)) {\n    throw new Error('STABLE 상태에서는 롤백이 불가능합니다.');\n  }\n\n  if (config.targetDeploymentId === currentState.deploymentId) {\n    throw new Error(`이미 ${config.targetDeploymentId}로 100% 배포되어 있습니다.`);\n  }\n\n  return isFullyRollout(config)\n    ? planStableRollout({ deploymentId: config.targetDeploymentId })\n    : planCanaryRollout({\n        previous: {\n          deploymentId: currentState.deploymentId,\n          progress: 0,\n          groupIdsCandidate: null,\n        },\n        next: {\n          deploymentId: config.targetDeploymentId,\n          progress: config.progress,\n        },\n      });\n}\n\nfunction planFromCanaryState(currentState: CanaryDeploymentState, config: PlanConfig) {\n  if (config.targetDeploymentId !== currentState.deploymentId.target) {\n    throw new Error(\n      `${config.targetDeploymentId}로 배포를 시도했습니다. 현재 ${currentState.deploymentId.old} -> ${currentState.deploymentId.target} 로의 점진적 배포가 진행 중입니다. 모든 트래픽을 ${currentState.deploymentId.old} 혹은 ${currentState.deploymentId.target}로 변경 후 재시도해주세요.`\n    );\n  }\n\n  return isFullyRollout(config)\n    ? planStableRollout({ deploymentId: config.targetDeploymentId })\n    : planCanaryRollout({\n        previous: {\n          deploymentId: currentState.deploymentId.old,\n          progress: currentState.progress.current,\n          groupIdsCandidate: currentState.groupIdsCandidate,\n        },\n        next: {\n          deploymentId: config.targetDeploymentId,\n          progress: config.progress,\n        },\n      });\n}\n\nfunction isRollback(config: PlanConfig) {\n  return config.progress === 0;\n}\n\nfunction isFullyRollout(config: PlanConfig) {\n  return config.progress === 100;\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/planStableRollout.ts",
    "content": "import type { StableDeploymentState, DeploymentId } from './types';\n\nexport interface PlanStableRolloutConfig {\n  deploymentId: DeploymentId;\n}\n\nexport function planStableRollout(config: PlanStableRolloutConfig): StableDeploymentState {\n  return {\n    type: 'STABLE',\n    deploymentId: config.deploymentId,\n  };\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/readBundleList.ts",
    "content": "import { paths, type S3Client } from './s3';\nimport type { DeploymentInfo } from './types';\n\nexport async function readBundleList(appName: string, context: { s3Client: S3Client }): Promise<DeploymentInfo[]> {\n  const { s3Client } = context;\n  const data = await s3Client.getObject(paths.bundleList(appName));\n\n  return JSON.parse(data);\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/readCluster.ts",
    "content": "import { parse } from 'valibot';\nimport { S3Client } from './s3/client';\nimport { paths } from './s3/paths';\nimport { clusterDeploymentInfo } from './types';\n\nexport interface ReadClusterConfig {\n  appName: string;\n  clusterId: string;\n}\n\nexport async function readCluster({ appName, clusterId }: ReadClusterConfig, context: { s3Client: S3Client }) {\n  const { s3Client } = context;\n\n  try {\n    const deploymentInfoPath = paths.clusterDeploymentInfoPath(appName, clusterId);\n    const rawData = await s3Client.getObject(deploymentInfoPath);\n    const { deploymentId } = parse(clusterDeploymentInfo, JSON.parse(rawData));\n\n    return deploymentId;\n  } catch {\n    return null;\n  }\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/readDeploymentState.ts",
    "content": "import { parse, ValiError } from 'valibot';\nimport { InternalServerError } from './errors/InternalServerError';\nimport { S3Client } from './s3/client';\nimport { paths } from './s3/paths';\nimport { deploymentState, type DeploymentState } from './types';\n\nexport async function readDeploymentState(appName: string, context: { s3Client: S3Client }): Promise<DeploymentState> {\n  const { s3Client } = context;\n\n  const deploymentStatePath = paths.deploymentState(appName);\n  try {\n    const rawData = await s3Client.getObject(deploymentStatePath);\n    const state = parse(deploymentState, JSON.parse(rawData));\n    return state;\n  } catch (error) {\n    if (error instanceof ValiError) {\n      throw new InternalServerError('Invalid deployment state format', error);\n    }\n    throw error;\n  }\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/resolveBundle.ts",
    "content": "import { BUNDLE_BASE_NAME } from './constants';\nimport { paths } from './s3/paths';\n\nexport interface ResolveBundleOptions {\n  appName: string;\n  platform: 'android' | 'ios';\n  deploymentId: string;\n  tag?: string;\n}\n\n/**\n * Returns a bucket path that matches the bundle name specification.\n *\n * - `bundle.<platform>.hbc.gz`\n *\n * if `tag` is provided, it will be appended to the bundle name.\n *\n * - `bundle.<platform>.<tag>.hbc.gz`\n */\nexport function resolveBundle({ appName, platform, deploymentId, tag }: ResolveBundleOptions) {\n  const bundleUrlPrefix = paths.bundlePathPrefix(appName, deploymentId);\n  const extension = 'hbc.gz';\n  const name = [BUNDLE_BASE_NAME, platform, tag, extension].filter(Boolean).join('.');\n\n  return `${bundleUrlPrefix}/${name}` as const;\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/resolveDeploymentId.ts",
    "content": "import { NoSuchBucket, NoSuchKey } from '@aws-sdk/client-s3';\nimport { parse } from 'valibot';\nimport { MAX_GROUP_ID } from './constants';\nimport { InternalServerError } from './errors/InternalServerError';\nimport { InvalidRequest } from './errors/InvalidRequest';\nimport { NotFoundError } from './errors/NotFoundError';\nimport { readDeploymentState } from './readDeploymentState';\nimport { S3Client } from './s3/client';\nimport { paths } from './s3/paths';\nimport { clusterDeploymentInfo } from './types';\n\ninterface ResolveDeploymentIdConfig {\n  appName: string;\n  groupId: string;\n  allowAccessCluster: boolean;\n}\n\nexport function resolveDeploymentId(\n  { appName, groupId, allowAccessCluster }: ResolveDeploymentIdConfig,\n  context: { s3Client: S3Client }\n) {\n  const numericGroupId = Number(groupId);\n\n  if (isNaN(numericGroupId) && allowAccessCluster) {\n    return resolveDeploymentIdByCluster(appName, groupId, context);\n  } else if (numericGroupId >= 1 && numericGroupId <= MAX_GROUP_ID) {\n    return resolveDeploymentIdByGroupId(appName, numericGroupId, context);\n  }\n\n  throw new InvalidRequest(`invalid groupId: ${groupId}`);\n}\n\nasync function resolveDeploymentIdByGroupId(appName: string, numericGroupId: number, context: { s3Client: S3Client }) {\n  const currentDeploymentState = await readDeploymentState(appName, context);\n\n  switch (currentDeploymentState.type) {\n    case 'PENDING': {\n      throw new NotFoundError('Available deployment id not found');\n    }\n    case 'STABLE': {\n      return currentDeploymentState.deploymentId;\n    }\n    case 'CANARY': {\n      const { groupIdsCandidate, deploymentId, progress } = currentDeploymentState;\n      const { old: oldDeploymentId, target: targetDeploymentId } = deploymentId;\n      const canaryGroupIndex = Math.floor((progress.current / 100) * MAX_GROUP_ID);\n      const targetGroupIds = groupIdsCandidate.slice(0, canaryGroupIndex);\n\n      const isCanaryDeploymentTarget = targetGroupIds.includes(numericGroupId.toString());\n\n      // 카나리 배포 대상에 포함된 경우, 새 번들을 제공\n      return isCanaryDeploymentTarget ? targetDeploymentId : oldDeploymentId;\n    }\n  }\n}\n\nasync function resolveDeploymentIdByCluster(appName: string, clusterId: string, context: { s3Client: S3Client }) {\n  const { s3Client } = context;\n\n  try {\n    const clusterDeploymentInfoPath = paths.clusterDeploymentInfoPath(appName, clusterId);\n    const rawData = await s3Client.getObject(clusterDeploymentInfoPath);\n    const deploymentInfo = parse(clusterDeploymentInfo, JSON.parse(rawData));\n\n    return deploymentInfo.deploymentId;\n  } catch (error) {\n    if (error instanceof NoSuchKey || error instanceof NoSuchBucket) {\n      throw new NotFoundError(`cluster deployment info not found: ${clusterId}`);\n    }\n    throw new InternalServerError('resolveDeploymentIdByCluster', error);\n  }\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/rollout.ts",
    "content": "import { paths, type S3Client } from './s3';\nimport type { DeploymentState } from './types';\n\nexport async function rollout(\n  { state, appName }: { state: DeploymentState; appName: string },\n  context: { s3Client: S3Client }\n): Promise<DeploymentState> {\n  const { s3Client } = context;\n\n  await s3Client.putObject(paths.deploymentState(appName), {\n    Body: JSON.stringify(state),\n    ContentType: 'application/json',\n  });\n\n  return state;\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/rolloutCluster.ts",
    "content": "import { paths, type S3Client } from './s3';\nimport type { DeploymentId } from './types';\n\ninterface ClusterRolloutConfig {\n  appName: string;\n  deploymentId: DeploymentId;\n  clusterId: string;\n}\n\nexport async function rolloutCluster(\n  { appName, deploymentId, clusterId }: ClusterRolloutConfig,\n  context: { s3Client: S3Client }\n) {\n  const { s3Client } = context;\n\n  await s3Client.putObject(paths.clusterDeploymentState(appName, clusterId), {\n    Body: JSON.stringify({ deploymentId }),\n    ContentType: 'application/json',\n  });\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/s3/client.ts",
    "content": "import {\n  S3Client as S3ClientBase,\n  GetObjectCommand,\n  PutObjectCommand,\n  HeadObjectCommand,\n  type PutObjectCommandInput,\n  type S3ClientConfig as S3ClientConfigBase,\n} from '@aws-sdk/client-s3';\n\ninterface S3ClientConfig extends S3ClientConfigBase {\n  bucket: string;\n}\n\nexport class S3Client {\n  private readonly s3Client: S3ClientBase;\n  private readonly bucket: string;\n\n  constructor({ bucket, ...baseConfig }: S3ClientConfig) {\n    this.s3Client = new S3ClientBase(baseConfig);\n    this.bucket = bucket;\n  }\n\n  async getObject(key: string) {\n    const command = new GetObjectCommand({\n      Bucket: this.bucket,\n      Key: key,\n    });\n\n    const response = await this.s3Client.send(command);\n    if (!response.Body) {\n      throw new Error('response.Body is empty');\n    }\n\n    return response.Body.transformToString('utf-8');\n  }\n\n  async putObject(key: string, input: Omit<PutObjectCommandInput, 'Bucket' | 'Key'>) {\n    const command = new PutObjectCommand({\n      Bucket: this.bucket,\n      Key: key,\n      ...input,\n    });\n\n    const response = await this.s3Client.send(command);\n\n    return response;\n  }\n\n  async headObject(key: string) {\n    const command = new HeadObjectCommand({\n      Bucket: this.bucket,\n      Key: key,\n    });\n\n    const response = await this.s3Client.send(command);\n\n    return response;\n  }\n\n  destroy() {\n    this.s3Client.destroy();\n  }\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/s3/index.ts",
    "content": "import { S3Client } from './client';\n\nexport { paths } from './paths';\nexport { S3Client };\n"
  },
  {
    "path": "infra/deployment-manager/src/s3/paths.ts",
    "content": "export const paths = {\n  bundlePathPrefix: (appName: string, deploymentId: string) => `bundles/${appName}/${deploymentId}` as const,\n  bundleList: (appName: string) => `deployments/${appName}/DEPLOYMENTS` as const,\n  deploymentState: (appName: string) => `deployments/${appName}/deployment_state` as const,\n  clusterDeploymentState: (appName: string, clusterId: string) =>\n    `deployments/${appName}/clusters/${clusterId}` as const,\n  clusterDeploymentInfoPath: (appName: string, clusterId: string) =>\n    `deployments/${appName}/clusters/${clusterId}.deploymentInfo` as const,\n} as const;\n"
  },
  {
    "path": "infra/deployment-manager/src/s3/utils.ts",
    "content": "export function isNoSuchKeyError<E extends Error>(error: E) {\n  return error.name === 'NoSuchKey';\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/types.ts",
    "content": "import { string, object, literal, array, number, union, InferOutput } from 'valibot';\n\nconst deploymentIdSchema = string();\nexport type DeploymentId = InferOutput<typeof deploymentIdSchema>; // @example 'bc176aa16a35cd2f4e34e9fcfc8797b1c97a1bc3'\n\nconst pendingDeploymentState = object({\n  type: literal('PENDING'),\n});\nexport type PendingDeploymentState = InferOutput<typeof pendingDeploymentState>;\n\nconst stableDeploymentState = object({\n  type: literal('STABLE'),\n  deploymentId: deploymentIdSchema,\n});\nexport type StableDeploymentState = InferOutput<typeof stableDeploymentState>;\n\nconst canaryDeploymentState = object({\n  type: literal('CANARY'),\n  /**\n   * Array of values in range 1 ~ 1000\n   *\n   * Creates a shuffled array at the first canary deployment and maintains the initially generated groupId\n   * to ensure the same user stays in the same canary group.\n   * (This ensures that existing groups are maintained even when the canary deployment rate changes)\n   *\n   * @example ['1', '589', '79', ..., '105']\n   */\n  groupIdsCandidate: array(string()),\n  deploymentId: object({\n    /**\n     * deploymentId of the version deployed before canary deployment\n     */\n    old: deploymentIdSchema,\n    /**\n     * deploymentId of the version currently being canary deployed\n     */\n    target: deploymentIdSchema,\n  }),\n  progress: object({\n    /**\n     * Previous canary deployment rate\n     */\n    previous: number(),\n    /**\n     * Current canary deployment rate\n     */\n    current: number(),\n  }),\n});\nexport type CanaryDeploymentState = InferOutput<typeof canaryDeploymentState>;\n\nexport const clusterDeploymentInfo = object({\n  deploymentId: deploymentIdSchema,\n});\nexport type ClusterDeploymentInfo = InferOutput<typeof clusterDeploymentInfo>;\n\nexport const deploymentState = union([pendingDeploymentState, stableDeploymentState, canaryDeploymentState]);\nexport type DeploymentState = InferOutput<typeof deploymentState>;\n\nexport interface DeploymentInfo {\n  deploymentId: DeploymentId;\n  deployedAt: number;\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/updateBundleList.ts",
    "content": "import { NoSuchKey } from '@aws-sdk/client-s3';\nimport { readBundleList } from './readBundleList';\nimport { S3Client } from './s3';\nimport type { DeploymentInfo } from './types';\nimport { writeBundleList } from './writeBundleList';\n\ninterface UpdateBundleListConfig {\n  appName: string;\n  newDeploymentInfo: DeploymentInfo;\n}\n\nexport async function updateBundleList(\n  { appName, newDeploymentInfo }: UpdateBundleListConfig,\n  context: { s3Client: S3Client }\n) {\n  const previousDeployments = await readBundleList(appName, context).catch((error) => {\n    if (error instanceof NoSuchKey) {\n      return [];\n    }\n    throw error;\n  });\n\n  await writeBundleList(appName, [newDeploymentInfo, ...previousDeployments], context);\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/uploadBundle.ts",
    "content": "import * as fs from 'fs';\nimport { resolveBundle } from './resolveBundle';\nimport type { S3Client } from './s3';\nimport type { DeploymentId, DeploymentInfo } from './types';\nimport { toDeployedAtString } from './utils/toDeployedAtString';\n\ninterface UploadBundleConfig {\n  bundlePath: string;\n  platform: 'android' | 'ios';\n  tag?: string;\n  appName: string;\n  deploymentId: DeploymentId;\n  deployedAt: Date;\n}\n\nexport async function uploadBundle(\n  { bundlePath, appName, deploymentId, deployedAt, platform, tag }: UploadBundleConfig,\n  context: { s3Client: S3Client }\n) {\n  const { s3Client } = context;\n  const bundlePathKey = resolveBundle({ appName, platform, deploymentId, tag });\n  await s3Client.putObject(bundlePathKey, {\n    Body: fs.createReadStream(bundlePath),\n    Metadata: {\n      'X-Deployment-Id': deploymentId,\n      'X-Deployment-Deployed-At': toDeployedAtString(deployedAt),\n    },\n    CacheControl: 's-maxage=31536000, max-age=0',\n    ...(bundlePath.endsWith('.gz') ? { ContentEncoding: 'gzip' } : {}),\n  });\n\n  const deploymentInfo: DeploymentInfo = {\n    deployedAt: deployedAt.getTime(),\n    deploymentId,\n  };\n\n  return { bundlePathKey, deploymentInfo };\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/utils/toDeployedAtString.ts",
    "content": "export function toDeployedAtString(date: Date) {\n  return [\n    date.getFullYear(),\n    (date.getMonth() + 1).toString().padStart(2, '0'),\n    date.getDate().toString().padStart(2, '0'),\n    date.getHours().toString().padStart(2, '0'),\n    date.getMinutes().toString().padStart(2, '0'),\n  ].join('');\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/utils/toRuntimeString.ts",
    "content": "export function toRuntimeString(runtime: string) {\n  return runtime.replace(/\\D+/g, '_');\n}\n"
  },
  {
    "path": "infra/deployment-manager/src/writeBundleList.ts",
    "content": "import { MAX_HISTORY_COUNT } from './constants';\nimport { paths, type S3Client } from './s3';\nimport type { DeploymentInfo } from './types';\n\nexport async function writeBundleList(\n  appName: string,\n  deploymentInfo: DeploymentInfo[],\n  context: { s3Client: S3Client }\n) {\n  const { s3Client } = context;\n\n  await s3Client.putObject(paths.bundleList(appName), {\n    Body: JSON.stringify(deploymentInfo.slice(0, MAX_HISTORY_COUNT)),\n    ContentType: 'application/json',\n  });\n}\n"
  },
  {
    "path": "infra/deployment-manager/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "infra/deployment-manager/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig([\n  {\n    entry: './src/index.ts',\n    format: ['esm', 'cjs'],\n    outDir: 'dist',\n    dts: true,\n    shims: true,\n    fixedExtension: false,\n  },\n]);\n"
  },
  {
    "path": "infra/deployment-manager/tsup.config.ts",
    "content": "import { defineConfig } from 'tsup';\n\nexport default defineConfig([\n  {\n    entry: ['./src/index.ts'],\n    format: ['esm', 'cjs'],\n    outDir: 'dist',\n    dts: true,\n    shims: true,\n  },\n]);\n"
  },
  {
    "path": "infra/forge-cli/CHANGELOG.md",
    "content": "# @granite-js/forge-cli\n\n## 1.0.23\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.23\n- @granite-js/plugin-core@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.22\n- @granite-js/plugin-core@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.21\n- @granite-js/plugin-core@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.20\n- @granite-js/plugin-core@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.19\n- @granite-js/plugin-core@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.18\n- @granite-js/plugin-core@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.17\n- @granite-js/plugin-core@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.16\n- @granite-js/plugin-core@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.15\n- @granite-js/plugin-core@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.14\n- @granite-js/plugin-core@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.13\n- @granite-js/plugin-core@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.12\n- @granite-js/plugin-core@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.11\n- @granite-js/plugin-core@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.10\n- @granite-js/plugin-core@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.9\n- @granite-js/plugin-core@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.8\n- @granite-js/plugin-core@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.7\n- @granite-js/plugin-core@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.6\n- @granite-js/plugin-core@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.5\n- @granite-js/plugin-core@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- @granite-js/deployment-manager@1.0.4\n- @granite-js/plugin-core@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/deployment-manager@1.0.3\n  - @granite-js/plugin-core@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [d4beb3b]\n- Updated dependencies [b325495]\n  - @granite-js/plugin-core@1.0.2\n  - @granite-js/deployment-manager@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- Updated dependencies [ee26531]\n  - @granite-js/deployment-manager@1.0.1\n  - @granite-js/plugin-core@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/deployment-manager@1.0.0\n  - @granite-js/plugin-core@1.0.0\n"
  },
  {
    "path": "infra/forge-cli/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/forge-cli\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@aws-sdk/credential-providers**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/aws/aws-sdk-js-v3.git\n\t\n2. **@aws-sdk/shared-ini-file-loader**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/aws/aws-sdk-js-v3.git\n\t\n3. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n4. **@clack/prompts**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/bombshell-dev/clack.git\n\t\n5. **@commander-js/extra-typings**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/commander-js/extra-typings.git\n\t\n6. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n7. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n8. **commander**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/tj/commander.js.git\n\t\n9. **tsdown**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/rolldown/tsdown.git\n\t\n10. **uuid**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/uuidjs/uuid.git\n\t\n11. **valibot**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/open-circle/valibot\n\t\n12. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "infra/forge-cli/README.md",
    "content": "# @granite-js/forge\n\nA CLI tool for managing Granite applications\n"
  },
  {
    "path": "infra/forge-cli/bin/index.js",
    "content": "#!/usr/bin/env node\n\nimport '../dist/index.js';\n"
  },
  {
    "path": "infra/forge-cli/package.json",
    "content": "{\n  \"name\": \"@granite-js/forge-cli\",\n  \"description\": \"A CLI tool for managing Granite applications\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"bin\": {\n    \"granite-forge\": \"./bin/index.js\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"infra/forge-cli\"\n  },\n  \"files\": [\n    \"dist\",\n    \"bin\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"test\": \"vitest --run --coverage --passWithNoTests\",\n    \"build\": \"tsdown\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"catalog:tools\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"tsdown\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\"\n  },\n  \"dependencies\": {\n    \"@aws-sdk/credential-providers\": \"^3.817.0\",\n    \"@aws-sdk/shared-ini-file-loader\": \"^3.374.0\",\n    \"@clack/prompts\": \"^0.10.1\",\n    \"@commander-js/extra-typings\": \"^14.0.0\",\n    \"@granite-js/deployment-manager\": \"workspace:*\",\n    \"@granite-js/plugin-core\": \"workspace:*\",\n    \"commander\": \"^14.0.0\",\n    \"uuid\": \"^11.1.0\",\n    \"valibot\": \"^1.1.0\"\n  }\n}\n"
  },
  {
    "path": "infra/forge-cli/src/commands/deploy.ts",
    "content": "import path from 'path';\nimport { fromNodeProviderChain } from '@aws-sdk/credential-providers';\nimport { loadSharedConfigFiles } from '@aws-sdk/shared-ini-file-loader';\nimport * as p from '@clack/prompts';\nimport { Command } from '@commander-js/extra-typings';\nimport { S3Client } from '@granite-js/deployment-manager';\nimport { loadConfig } from '@granite-js/plugin-core';\nimport * as v from 'valibot';\nimport { deploy as deployOperation } from '../operations/deploy';\n\nconst envSchema = v.object({\n  AWS_REGION: v.string(),\n  AWS_ACCESS_KEY_ID: v.string(),\n  AWS_SECRET_ACCESS_KEY: v.string(),\n  AWS_SESSION_TOKEN: v.optional(v.string()),\n});\n\nconst awsCredentialsProvider = fromNodeProviderChain();\n\nexport function deploy() {\n  return new Command('deploy')\n    .description('Deploy a Granite application')\n    .requiredOption('--bucket <BUCKET>', 'AWS bucket')\n    .action(async (options) => {\n      const [config, awsCredentials, region] = await Promise.all([loadConfig(), awsCredentialsProvider(), getRegion()]);\n\n      const envResult = v.safeParse(envSchema, {\n        AWS_REGION: region,\n        AWS_ACCESS_KEY_ID: awsCredentials.accessKeyId,\n        AWS_SECRET_ACCESS_KEY: awsCredentials.secretAccessKey,\n        AWS_SESSION_TOKEN: awsCredentials.sessionToken,\n      });\n\n      if (!envResult.success) {\n        const missingVars = envResult.issues.map((issue) => {\n          const path = issue.path?.[0];\n          return path ? `process.env.${path.key}` : 'unknown variable';\n        });\n\n        p.log.error(`Required environment variables are not set:`);\n        for (const missingVar of missingVars) {\n          p.log.error(`${missingVar}`);\n        }\n        process.exit(1);\n      }\n\n      await deployOperation(\n        {\n          appName: config.appName,\n          iosBundle: path.join(config.outdir, `bundle.ios.hbc`),\n          androidBundle: path.join(config.outdir, `bundle.android.hbc`),\n        },\n        {\n          s3Client: new S3Client({\n            region,\n            bucket: options.bucket,\n            credentials: {\n              accessKeyId: envResult.output.AWS_ACCESS_KEY_ID,\n              secretAccessKey: envResult.output.AWS_SECRET_ACCESS_KEY,\n              sessionToken: envResult.output.AWS_SESSION_TOKEN,\n            },\n          }),\n        }\n      );\n    });\n}\n\nasync function getRegion() {\n  const { configFile } = await loadSharedConfigFiles();\n\n  const envRegion = process.env.AWS_REGION;\n\n  if (envRegion != null) {\n    return envRegion;\n  }\n\n  const currentProfile = process.env.AWS_PROFILE;\n\n  if (currentProfile != null) {\n    const region = configFile?.[currentProfile]?.region;\n\n    if (region != null) {\n      return region;\n    }\n  }\n\n  const defaultRegion = configFile.default?.region;\n\n  return defaultRegion;\n}\n"
  },
  {
    "path": "infra/forge-cli/src/commands/deployList.ts",
    "content": "import { Command } from '@commander-js/extra-typings';\nimport { S3Client } from '@granite-js/deployment-manager';\nimport { withS3Client } from '../helpers/command';\nimport { deployList as deployListOperation } from '../operations/deployList';\n\nexport function deployList() {\n  return withS3Client(new Command('deploy-list'))\n    .description('Show the deployment list of a Granite application')\n    .requiredOption('-n, --app-name <APP_NAME>', 'Granite application name')\n    .action(async (options) => {\n      await deployListOperation(options, {\n        s3Client: new S3Client({\n          region: options.region,\n          bucket: options.bucket,\n          credentials: {\n            accessKeyId: options.accessKeyId,\n            secretAccessKey: options.secretAccessKey,\n            sessionToken: options.sessionToken,\n          },\n        }),\n      });\n    });\n}\n"
  },
  {
    "path": "infra/forge-cli/src/helpers/command.ts",
    "content": "import { Command } from '@commander-js/extra-typings';\n\nexport function withS3Client<C extends Command>(command: C) {\n  return command\n    .requiredOption('--region <REGION>', 'AWS region')\n    .requiredOption('--bucket <BUCKET>', 'AWS bucket')\n    .requiredOption('--access-key-id <ACCESS_KEY_ID>', 'AWS access key ID')\n    .requiredOption('--secret-access-key <SECRET_ACCESS_KEY>', 'AWS secret access key')\n    .option('--session-token <SESSION_TOKEN>', 'AWS session token');\n}\n"
  },
  {
    "path": "infra/forge-cli/src/index.ts",
    "content": "import { Command } from '@commander-js/extra-typings';\nimport { deploy } from './commands/deploy';\nimport { deployList } from './commands/deployList';\n\nconst program = new Command('granite-forge');\n\nprogram.description('A CLI tool for managing Granite applications');\nprogram.addCommand(deploy());\nprogram.addCommand(deployList());\nprogram.parse();\n"
  },
  {
    "path": "infra/forge-cli/src/operations/deploy.ts",
    "content": "import * as p from '@clack/prompts';\nimport { DeployManager, DeploymentState, NoSuchKey, type S3Client } from '@granite-js/deployment-manager';\nimport { generateDeploymentId } from '../utils/generateDeploymentId';\nimport { gzipFile } from '../utils/gzip';\nimport { handlePrompts } from '../utils/handlePrompts';\n\ninterface DeployConfig {\n  androidBundle: string;\n  iosBundle: string;\n  appName: string;\n  tag?: string;\n  groupId?: string;\n}\n\nexport const deploy = handlePrompts<\n  ({ androidBundle, iosBundle, appName, tag }: DeployConfig, context: { s3Client: S3Client }) => void\n>('Start deployment', deployImpl);\n\nasync function deployImpl({ androidBundle, iosBundle, appName, tag }: DeployConfig, context: { s3Client: S3Client }) {\n  const { s3Client } = context;\n\n  const gzippedAndroidBundle = `${androidBundle}.gz`;\n  const gzippedIosBundle = `${iosBundle}.gz`;\n\n  await Promise.all([\n    gzipFile({ inputFile: androidBundle, outputFile: gzippedAndroidBundle }),\n    gzipFile({ inputFile: iosBundle, outputFile: gzippedIosBundle }),\n  ]);\n\n  const deploymentId = generateDeploymentId();\n  const deployedAt = new Date();\n  let spinner = p.spinner();\n\n  spinner.start('Fetching current deployment state...');\n  const currentDeploymentState = await DeployManager.readDeploymentState(appName, { s3Client }).catch(\n    handleReadDeploymentStateError\n  );\n  spinner.stop('Successfully fetched current deployment state');\n\n  let newDeploymentState: DeploymentState;\n  if (currentDeploymentState != null) {\n    p.log.info('Planning rollout...');\n    newDeploymentState = await DeployManager.planRollout(currentDeploymentState, {\n      progress: 100, // TODO\n      targetDeploymentId: deploymentId,\n    });\n\n    switch (newDeploymentState.type) {\n      case 'STABLE':\n        p.log.info(`Stable deployment planned (target: ${newDeploymentState.deploymentId})`);\n        break;\n\n      case 'CANARY':\n      case 'PENDING':\n        console.error('unimplemented yet');\n        process.exit(1);\n    }\n  } else {\n    p.log.warn('No deployment state found');\n    newDeploymentState = { type: 'STABLE', deploymentId };\n  }\n\n  if (process.stdin.isTTY) {\n    const confirmed = await p.confirm({\n      message: `Are you sure you want to deploy ${appName}?`,\n    });\n\n    if (!confirmed || p.isCancel(confirmed)) {\n      p.outro('Deployment cancelled');\n      process.exit(0);\n    }\n  }\n\n  await p.tasks(\n    [\n      { bundlePath: gzippedAndroidBundle, platform: 'android' as const },\n      { bundlePath: gzippedIosBundle, platform: 'ios' as const },\n    ].map(({ bundlePath, platform }) => ({\n      title: `Uploading bundle... (${platform})`,\n      task: async () => {\n        DeployManager.uploadBundle(\n          {\n            bundlePath,\n            appName,\n            platform,\n            tag,\n            deploymentId,\n            deployedAt,\n          },\n          { s3Client }\n        );\n\n        return 'Bundle uploaded';\n      },\n    }))\n  );\n\n  spinner = p.spinner();\n  spinner.start('Updating bundle list...');\n  await DeployManager.updateBundleList(\n    {\n      appName: appName,\n      newDeploymentInfo: {\n        deployedAt: deployedAt.getTime(),\n        deploymentId,\n      },\n    },\n    { s3Client }\n  );\n  spinner.stop('Bundle list updated');\n\n  spinner = p.spinner();\n  spinner.start(`Deploying ${appName}@${deploymentId}...`);\n  await DeployManager.rollout({ state: newDeploymentState, appName }, { s3Client });\n  spinner.stop(`Deployed successfully! (Deployment ID: ${deploymentId})`);\n\n  p.outro('Done');\n}\n\nfunction handleReadDeploymentStateError(error: unknown) {\n  if (error instanceof NoSuchKey) {\n    return null;\n  }\n  throw error;\n}\n"
  },
  {
    "path": "infra/forge-cli/src/operations/deployList.ts",
    "content": "import * as p from '@clack/prompts';\nimport { DeployManager, type S3Client, NoSuchKey } from '@granite-js/deployment-manager';\nimport { handlePrompts } from '../utils/handlePrompts';\n\ninterface DeployListOptions {\n  appName: string;\n}\n\nexport const deployList = handlePrompts('Deployment list', deployListImpl);\n\nasync function deployListImpl({ appName }: DeployListOptions, context: { s3Client: S3Client }) {\n  const { s3Client } = context;\n  const spinner = p.spinner();\n\n  spinner.start('Fetching deployment list...');\n  const deployments = await DeployManager.readBundleList(appName, { s3Client }).catch(handleReadBundleListError);\n  spinner.stop('Successfully fetched deployment list');\n\n  deployments.slice(0, 20).forEach((deployment, index) => {\n    p.log.info(\n      `${index + 1}. ${deployment.deploymentId} (Deployed at: ${new Date(deployment.deployedAt).toLocaleString()})`\n    );\n  });\n\n  p.outro(deployments.length ? `${deployments.length} deployment(s) found` : 'No deployments found');\n}\n\nfunction handleReadBundleListError(error: unknown) {\n  if (error instanceof NoSuchKey) {\n    return [];\n  }\n\n  throw error;\n}\n"
  },
  {
    "path": "infra/forge-cli/src/utils/generateDeploymentId.ts",
    "content": "import { v7 as uuidv7 } from 'uuid';\n\nexport function generateDeploymentId() {\n  return uuidv7();\n}\n"
  },
  {
    "path": "infra/forge-cli/src/utils/gzip.ts",
    "content": "// gzipUtil.ts\nimport { createReadStream, createWriteStream } from 'fs';\nimport { pipeline } from 'stream/promises';\nimport { createGzip } from 'zlib';\n\n/**\n * Compresses inputFile using gzip and saves it to outputFile.\n *\n * @param {string} inputFile  - Path to the source file to compress\n * @param {string} outputFile - Path to save the gzipped file (recommended to use .gz extension)\n * @throws Throws an error if compression fails\n */\nexport async function gzipFile({ inputFile, outputFile }: { inputFile: string; outputFile: string }): Promise<void> {\n  await pipeline(createReadStream(inputFile), createGzip(), createWriteStream(outputFile));\n}\n"
  },
  {
    "path": "infra/forge-cli/src/utils/handlePrompts.ts",
    "content": "import * as p from '@clack/prompts';\n\nexport function handlePrompts<T extends (...args: any[]) => any>(title: string, task: T) {\n  return (...args: Parameters<T>) => {\n    p.intro(title);\n\n    try {\n      const result = task.call(null, ...args);\n\n      if (result instanceof Promise) {\n        result.catch(promptErrorHandler);\n      }\n    } catch (error) {\n      promptErrorHandler(error);\n    }\n  };\n}\n\nfunction promptErrorHandler(error: unknown) {\n  p.log.error(error instanceof Error ? error.message : String(error));\n  process.exit(1);\n}\n"
  },
  {
    "path": "infra/forge-cli/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "infra/forge-cli/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  entry: './src/index.ts',\n  format: 'esm',\n  outDir: 'dist',\n  fixedExtension: false,\n});\n"
  },
  {
    "path": "infra/pulumi-aws/CHANGELOG.md",
    "content": "# @granite-js/pulumi-aws\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n## 1.0.18\n\n## 1.0.17\n\n## 1.0.16\n\n## 1.0.15\n\n## 1.0.14\n\n## 1.0.13\n\n## 1.0.12\n\n## 1.0.11\n\n## 1.0.10\n\n## 1.0.9\n\n## 1.0.8\n\n## 1.0.7\n\n## 1.0.6\n\n## 1.0.5\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "infra/pulumi-aws/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/pulumi-aws\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@aws-sdk/client-cloudfront**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/aws/aws-sdk-js-v3.git\n\t\n2. **@pulumi/aws**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/pulumi/pulumi-aws\n\t\n3. **@pulumi/pulumi**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/pulumi/pulumi.git\n\t\n4. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n5. **@types/aws-lambda**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n6. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n7. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n8. **aws-lambda**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/awspilot/cli-lambda-deploy\n\t\n9. **aws-sdk-client-mock**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/m-radzikowski/aws-sdk-client-mock.git\n\t\n10. **es-toolkit**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/toss/es-toolkit.git\n\t\n11. **oxc-transform**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/oxc-project/oxc.git\n\t\n12. **tsup**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/egoist/tsup.git\n\t\n13. **uuid**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/uuidjs/uuid.git\n\t\n14. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "infra/pulumi-aws/README.md",
    "content": "# @granite-js/pulumi-aws\n\nA Pulumi package for managing React Native CDN infrastructure on AWS.\n\n## Installation\n\nFollow the official Pulumi installation guide to install the Pulumi CLI:\n\n- [Pulumi Installation Guide](https://www.pulumi.com/docs/iac/download-install/)\n\n## Pulumi Configuration\n\n```bash\npulumi new aws-typescript\n```\n\nThen, install the `@granite-js/pulumi-aws` package and dependencies:\n\n```bash\nnpm install @granite-js/pulumi-aws\n# or\nyarn add @granite-js/pulumi-aws\n# or\npnpm add @granite-js/pulumi-aws\n```\n\n## Usage\n\nTo use the `ReactNativeBundleCDN` component, import it into your Pulumi program and instantiate it with the required arguments:\n\n```typescript\nimport * as pulumi from '@pulumi/pulumi';\nimport * as aws from '@pulumi/aws';\nimport { ReactNativeBundleCDN } from '@granite-js/pulumi-aws';\n\nconst config = new pulumi.Config();\n\nconst reactNativeCdn = new ReactNativeBundleCDN('myReactNativeBundleCDN', {\n  bucketName: config.require('bucketName'),\n  region: config.require('region'),\n});\n\n// Print to CLi\nexport const url = cdn.cloudfrontDomain;\n```\n\nEnsure your configuration variables (`bucketName` and `region`) are set in the Pulumi configuration:\n\n```bash\npulumi config set bucketName your-bucket-name\npulumi config set region us-west-2\n```\n\n## AWS Credentials Setup\n\nConfigure your AWS credentials for Pulumi by exporting your AWS credentials as environment variables:\n\n```bash\nexport AWS_ACCESS_KEY_ID=\"your-access-key-id\"\nexport AWS_SECRET_ACCESS_KEY=\"your-secret-access-key\"\nexport AWS_REGION=\"your-region\"\n```\n\nAlternatively, configure your AWS credentials using the AWS CLI:\n\n```bash\naws configure\n```\n\n## Deploying with Pulumi\n\nTo deploy your infrastructure, run:\n\n```bash\npulumi up\n```\n\nReview the changes that Pulumi proposes, then confirm deployment. Pulumi will provision your React Native CDN infrastructure on AWS.\n\n## Cleaning up\n\nTo remove the deployed resources, use:\n\n```bash\npulumi destroy\n```\n\nReview and confirm the destruction to remove all resources managed by your Pulumi stack.\n"
  },
  {
    "path": "infra/pulumi-aws/lambda/auto-cache-removal.d.ts",
    "content": "export * from '../dist/lambda/auto-cache-removal';\n"
  },
  {
    "path": "infra/pulumi-aws/lambda/origin-request.d.ts",
    "content": "export * from '../dist/lambda/origin-request';\n"
  },
  {
    "path": "infra/pulumi-aws/lambda/origin-response.d.ts",
    "content": "export * from '../dist/lambda/origin-response';\n"
  },
  {
    "path": "infra/pulumi-aws/package.json",
    "content": "{\n  \"name\": \"@granite-js/pulumi-aws\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"main\": \"./dist/index.cjs\",\n  \"types\": \"./dist/index.d.ts\",\n  \"module\": \"./dist/index.js\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"infra/pulumi-aws\"\n  },\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./lambda/origin-request\": {\n      \"import\": {\n        \"types\": \"./dist/lambda/origin-request.d.ts\",\n        \"default\": \"./dist/lambda/origin-request.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/lambda/origin-request.d.cts\",\n        \"default\": \"./dist/lambda/origin-request.cjs\"\n      }\n    },\n    \"./lambda/origin-response\": {\n      \"import\": {\n        \"types\": \"./dist/lambda/origin-response.d.ts\",\n        \"default\": \"./dist/lambda/origin-response.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/lambda/origin-response.d.cts\",\n        \"default\": \"./dist/lambda/origin-response.cjs\"\n      }\n    },\n    \"./lambda/auto-cache-removal\": {\n      \"import\": {\n        \"types\": \"./dist/lambda/auto-cache-removal.d.ts\",\n        \"default\": \"./dist/lambda/auto-cache-removal.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/lambda/auto-cache-removal.d.cts\",\n        \"default\": \"./dist/lambda/auto-cache-removal.cjs\"\n      }\n    }\n  },\n  \"files\": [\n    \"dist\",\n    \"lambda\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"test\": \"vitest --run --coverage\",\n    \"build\": \"rm -rf dist && tsup\"\n  },\n  \"devDependencies\": {\n    \"@aws-sdk/client-cloudfront\": \"^3.812.0\",\n    \"@granite-js/deployment-manager\": \"workspace:*\",\n    \"@granite-js/utils\": \"workspace:*\",\n    \"@pulumi/aws\": \"^6.80.0\",\n    \"@pulumi/pulumi\": \"^3.170.0\",\n    \"@types/aws-lambda\": \"^8.10.149\",\n    \"@types/node\": \"catalog:tools\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"aws-lambda\": \"^1.0.7\",\n    \"aws-sdk-client-mock\": \"^4.1.0\",\n    \"es-toolkit\": \"^1.39.8\",\n    \"tsup\": \"^8.5.0\",\n    \"typescript\": \"catalog:tools\",\n    \"uuid\": \"^11.1.0\",\n    \"vitest\": \"^4.0.12\"\n  },\n  \"peerDependencies\": {\n    \"@pulumi/aws\": \"*\",\n    \"@pulumi/pulumi\": \"*\"\n  },\n  \"dependencies\": {\n    \"oxc-transform\": \"^0.71.0\"\n  }\n}\n"
  },
  {
    "path": "infra/pulumi-aws/pulumi/index.ts",
    "content": "import * as aws from '@pulumi/aws';\nimport * as pulumi from '@pulumi/pulumi';\n\n/**\n * Interface defining arguments required for React Native CDN configuration\n * @interface ReactNativeCdnArgs\n */\nexport interface ReactNativeCdnArgs {\n  /**\n   * Name of the project\n   * @example \"granite\"\n   * @type {string}\n   */\n  projectName: string;\n\n  /**\n   * Environment to deploy to\n   * @example \"prod\", \"alpha\", \"beta\", \"dev\"\n   * @type {string}\n   */\n  environment: string;\n\n  /**\n   * AWS region to deploy to\n   * @example \"us-east-1\", \"us-east-2\", \"us-west-1\"\n   * @type {aws.Region}\n   */\n  awsRegion: aws.Region;\n}\n\nexport class ReactNativeBundleCDN extends pulumi.ComponentResource {\n  public readonly cloudfrontDistributionId: pulumi.Output<string>;\n  public readonly cloudfrontOriginAccessIdentityArn: pulumi.Output<string>;\n  public readonly bucketName: pulumi.Output<string>;\n  public readonly bucketEndpoint: pulumi.Output<string>;\n  public readonly cloudfrontDomain: pulumi.Output<string>;\n\n  constructor(name: string, args: ReactNativeCdnArgs, opts?: pulumi.ComponentResourceOptions) {\n    super('custom:aws:ReactNativeBundleCDN', name, {}, opts);\n\n    // Extract args with defaults\n    const { projectName, environment, awsRegion } = args;\n\n    // Create resource name\n    const resourceName = `${environment}_${projectName}`;\n\n    // Log bucket name - generated internally based on project name\n    const logBucketName = `${resourceName}-logs.s3.amazonaws.com`;\n\n    // Main AWS provider\n    const awsProvider = new aws.Provider(\n      'awsProvider',\n      {\n        region: awsRegion,\n      },\n      { parent: this }\n    );\n\n    // US-East-1 provider for CloudFront and Lambda@Edge\n    const usEast1Provider = new aws.Provider(\n      'usEast1Provider',\n      {\n        region: 'us-east-1',\n      },\n      { parent: this }\n    );\n\n    // S3 Bucket\n    const bucket = new aws.s3.Bucket(\n      'bucket',\n      {\n        bucket: resourceName,\n        acl: 'private',\n        versioning: {\n          enabled: true,\n        },\n        website: {\n          indexDocument: 'index.html',\n          errorDocument: 'error.html',\n        },\n        corsRules: [\n          {\n            allowedHeaders: ['*'],\n            allowedMethods: ['GET'],\n            allowedOrigins: ['*'],\n            maxAgeSeconds: 3000,\n          },\n        ],\n      },\n      { provider: awsProvider, parent: this }\n    );\n\n    // CloudFront Origin Access Identity\n    const originAccessIdentity = new aws.cloudfront.OriginAccessIdentity(\n      'originAccessIdentity',\n      {\n        comment: resourceName,\n      },\n      { provider: usEast1Provider, parent: this }\n    );\n\n    // IAM setup for Lambda@Edge\n    const lambdaAtEdgeAssumeRolePolicy = aws.iam.getPolicyDocumentOutput({\n      statements: [\n        {\n          effect: 'Allow',\n          principals: [\n            {\n              type: 'Service',\n              identifiers: ['lambda.amazonaws.com', 'edgelambda.amazonaws.com'],\n            },\n          ],\n          actions: ['sts:AssumeRole'],\n        },\n      ],\n    });\n\n    const lambdaAtEdgeRole = new aws.iam.Role(\n      'lambdaAtEdgeRole',\n      {\n        name: `${resourceName}_lambda_role`,\n        assumeRolePolicy: lambdaAtEdgeAssumeRolePolicy.json,\n      },\n      { provider: usEast1Provider, parent: this }\n    );\n\n    const lambdaAtEdgePolicy = aws.iam.getPolicyDocumentOutput({\n      statements: [\n        {\n          effect: 'Allow',\n          actions: [\n            'iam:CreateServiceLinkedRole',\n            'lambda:GetFunction',\n            'lambda:EnableReplication',\n            'cloudfront:UpdateDistribution',\n            's3:GetObject',\n            's3:ListBucket',\n            'logs:CreateLogGroup',\n            'logs:CreateLogStream',\n            'logs:PutLogEvents',\n            'logs:DescribeLogStreams',\n          ],\n          resources: ['*'],\n        },\n      ],\n    });\n\n    const lambdaAtEdgeRolePolicy = new aws.iam.RolePolicy(\n      'lambdaAtEdgeRolePolicy',\n      {\n        name: `${resourceName}_lambda_role_policy`,\n        role: lambdaAtEdgeRole.id,\n        policy: lambdaAtEdgePolicy.json,\n      },\n      { provider: usEast1Provider, parent: this }\n    );\n\n    // Helper function to create Lambda code archives\n    // Simplified for this example - in real implementation,\n    // you'd bundle the Lambda code with the package\n    const createLambdaCode = (handlerName: string) => {\n      const code = `\nexports.handler = async (event) => {\n    const request = event.Records[0].cf.request;\n    const response = event.Records[0].cf.response;\n    \n    // Example ${handlerName} logic\n    console.log('Processing ${handlerName}');\n    \n    return ${handlerName === 'origin-request' ? 'request' : 'response'};\n};`;\n\n      return new pulumi.asset.AssetArchive({\n        'index.js': new pulumi.asset.StringAsset(code),\n      });\n    };\n\n    // Lambda@Edge functions\n    const originRequestHandler = new aws.lambda.Function(\n      'originRequestHandler',\n      {\n        publish: true,\n        code: createLambdaCode('origin-request'),\n        description: 'Lambda@Edge function for serving React Native bundles from S3',\n        name: `fe_edge_origin_request_${resourceName}`,\n        handler: 'index.handler',\n        role: lambdaAtEdgeRole.arn,\n        runtime: 'nodejs22.x',\n        timeout: 5,\n      },\n      {\n        provider: usEast1Provider,\n        parent: this,\n        dependsOn: [lambdaAtEdgeRolePolicy],\n      }\n    );\n\n    const originResponseHandler = new aws.lambda.Function(\n      'originResponseHandler',\n      {\n        publish: true,\n        code: createLambdaCode('origin-response'),\n        description: 'Lambda@Edge function for serving React Native bundles from S3',\n        name: `fe_edge_origin_response_${resourceName}`,\n        handler: 'index.handler',\n        role: lambdaAtEdgeRole.arn,\n        runtime: 'nodejs22.x',\n        timeout: 5,\n      },\n      {\n        provider: usEast1Provider,\n        parent: this,\n        dependsOn: [lambdaAtEdgeRolePolicy],\n      }\n    );\n\n    // CloudFront Distribution\n    const cloudfrontDistribution = new aws.cloudfront.Distribution(\n      'cloudfrontDistribution',\n      {\n        comment: resourceName,\n        enabled: true,\n        httpVersion: 'http2and3',\n        origins: [\n          {\n            domainName: bucket.bucketRegionalDomainName,\n            originId: bucket.id,\n            s3OriginConfig: {\n              originAccessIdentity: originAccessIdentity.cloudfrontAccessIdentityPath,\n            },\n          },\n        ],\n        restrictions: {\n          geoRestriction: {\n            restrictionType: 'none',\n          },\n        },\n        defaultCacheBehavior: {\n          allowedMethods: ['GET', 'HEAD', 'OPTIONS'],\n          cachedMethods: ['GET', 'HEAD'],\n          compress: true,\n          defaultTtl: 0,\n          maxTtl: 31536000,\n          minTtl: 0,\n          targetOriginId: bucket.id,\n          viewerProtocolPolicy: 'allow-all',\n          forwardedValues: {\n            queryString: true,\n            headers: ['Accept-Encoding'],\n            cookies: {\n              forward: 'none',\n            },\n          },\n          lambdaFunctionAssociations: [\n            {\n              eventType: 'origin-request',\n              lambdaArn: originRequestHandler.qualifiedArn,\n            },\n            {\n              eventType: 'origin-response',\n              lambdaArn: originResponseHandler.qualifiedArn,\n            },\n          ],\n        },\n        viewerCertificate: {\n          cloudfrontDefaultCertificate: true,\n        },\n        loggingConfig: {\n          bucket: logBucketName,\n          includeCookies: false,\n          prefix: `${resourceName}/`,\n        },\n      },\n      { provider: usEast1Provider, parent: this }\n    );\n\n    // Set outputs\n    this.cloudfrontDistributionId = cloudfrontDistribution.id;\n    this.cloudfrontOriginAccessIdentityArn = originAccessIdentity.iamArn;\n    this.bucketName = bucket.bucket;\n    this.bucketEndpoint = bucket.websiteEndpoint;\n    this.cloudfrontDomain = cloudfrontDistribution.domainName;\n\n    this.registerOutputs({\n      cloudfrontDistributionId: this.cloudfrontDistributionId,\n      cloudfrontOriginAccessIdentityArn: this.cloudfrontOriginAccessIdentityArn,\n      bucketName: this.bucketName,\n      bucketEndpoint: this.bucketEndpoint,\n      cloudfrontDomain: this.cloudfrontDomain,\n    });\n  }\n}\n"
  },
  {
    "path": "infra/pulumi-aws/src/index.ts",
    "content": "export * from './react-native-cdn';\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/auto-cache-removal.ts",
    "content": "import { S3Event, S3EventRecord, Context, Callback } from 'aws-lambda';\nimport { getPathsToInvalidate, createInvalidation } from './utils/invalidation';\n\n// Get CloudFront distribution ID from environment variables\nconst DISTRIBUTION_ID = process.env.CLOUDFRONT_DISTRIBUTION_ID;\n\n/**\n * Lambda handler function that processes S3 events and creates CloudFront invalidations\n */\nexport const handler = async (event: S3Event, _: Context, callback: Callback) => {\n  try {\n    // Validate environment variables\n    if (!DISTRIBUTION_ID) {\n      throw new Error('CLOUDFRONT_DISTRIBUTION_ID environment variable is not set');\n    }\n\n    console.log('Event received:', JSON.stringify(event, null, 2));\n\n    const invalidationResults = await Promise.all(\n      event.Records.map(async (record: S3EventRecord) => {\n        return await processRecord(record, DISTRIBUTION_ID);\n      })\n    );\n\n    callback(null, {\n      message: 'Successfully processed all records',\n      results: invalidationResults,\n    });\n  } catch (error) {\n    console.error('Error processing S3 event:', error);\n    callback(error as Error);\n  }\n};\n\n/**\n * Process individual S3 event record\n */\nexport async function processRecord(\n  record: S3EventRecord,\n  distributionId: string\n): Promise<{ key: string; invalidated: boolean; paths?: string[]; invalidationId?: string }> {\n  // Extract bucket name and object key\n  const bucket = record.s3.bucket.name;\n  const key = decodeURIComponent(record.s3.object.key.replace(/\\+/g, ' '));\n\n  console.log(`Processing file: s3://${bucket}/${key}`);\n\n  // Determine paths to invalidate based on file path\n  const pathsToInvalidate = getPathsToInvalidate(key);\n\n  if (pathsToInvalidate.length > 0) {\n    console.log(`Paths to invalidate: ${pathsToInvalidate.join(', ')}`);\n\n    // Create CloudFront invalidation\n    const invalidationId = await createInvalidation(pathsToInvalidate, distributionId);\n\n    return {\n      key,\n      invalidated: true,\n      paths: pathsToInvalidate,\n      invalidationId,\n    };\n  } else {\n    console.log('No paths to invalidate for this file');\n\n    return {\n      key,\n      invalidated: false,\n    };\n  }\n}\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/constants.ts",
    "content": "export const SHARED_APP_NAME = 'shared';\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/context.ts",
    "content": "interface BaseContext {\n  bucketName: string;\n  region: string;\n}\n\nexport interface RequestHandlerContext extends BaseContext {\n  allowAccessCluster: boolean;\n}\n\nexport type ResponseHandlerContext = BaseContext;\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/origin-request.ts",
    "content": "import { DeployManager, S3Client, InvalidRequest, NotFoundError } from '@granite-js/deployment-manager';\nimport { CloudFrontRequestEvent, CloudFrontRequestResult } from 'aws-lambda';\nimport { RequestHandlerContext } from './context';\nimport { parseAppName } from './utils/parseAppName';\nimport { parseGroupId } from './utils/parseGroupId';\nimport { parsePlatform } from './utils/parsePlatform';\nimport { parseSuffix } from './utils/parseSuffix';\n\n// https://cdn.example.com/<ios|android>/<appName>/<groupId>/0_72_6 -> s3://<bucketName>/bundles/<appName>/<deploymentId>/bundle.<ios|android>.0_72_6.hbc.gz\nexport function createOriginRequestHandler(context: RequestHandlerContext) {\n  const s3Client = new S3Client({\n    bucket: context.bucketName,\n    region: context.region,\n  });\n\n  return async function handler(event: CloudFrontRequestEvent): Promise<CloudFrontRequestResult> {\n    try {\n      const request = event.Records[0]?.cf?.request;\n      if (request == null) {\n        throw new InvalidRequest('request is null');\n      }\n\n      const appName = parseAppName(request.uri);\n      const platform = parsePlatform(request.uri);\n      const groupId = parseGroupId(request.uri);\n      const suffix = parseSuffix(request.uri);\n\n      if (appName == null || platform == null || groupId == null) {\n        throw new InvalidRequest('invalid request');\n      }\n\n      const deploymentId = await DeployManager.resolveDeploymentId(\n        {\n          appName,\n          groupId,\n          allowAccessCluster: context.allowAccessCluster,\n        },\n        {\n          s3Client,\n        }\n      );\n\n      const bundlePath = DeployManager.resolveBundle({\n        appName,\n        platform,\n        deploymentId,\n        tag: suffix !== 'bundle' ? suffix : undefined,\n      });\n\n      const absolutePath = `/${bundlePath}`;\n      request.uri = absolutePath;\n      request.headers['x-bundle'] = [\n        {\n          key: 'X-Bundle',\n          value: absolutePath,\n        },\n      ];\n      return request;\n    } catch (error) {\n      if (error instanceof NotFoundError) {\n        return { status: '404', statusDescription: error.message };\n      }\n\n      if (error instanceof InvalidRequest) {\n        return { status: '400', statusDescription: error.message };\n      }\n\n      throw error;\n    }\n  };\n}\n\ndeclare const _BUCKET_NAME: string;\ndeclare const _BUCKET_REGION: string;\n\nconst handler = createOriginRequestHandler({\n  allowAccessCluster: false,\n  bucketName: _BUCKET_NAME,\n  region: _BUCKET_REGION,\n});\n\nexport { handler };\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/origin-response.ts",
    "content": "import { InvalidRequest } from '@granite-js/deployment-manager';\nimport { CloudFrontResponseEvent, CloudFrontResponseResult } from 'aws-lambda';\n\nexport function createOriginRequestHandler() {\n  return async function handler(event: CloudFrontResponseEvent): Promise<CloudFrontResponseResult> {\n    const request = event.Records[0]?.cf?.request;\n    const response = event.Records[0]?.cf?.response;\n    if (request == null || response == null) {\n      throw new InvalidRequest('invalid request');\n    }\n\n    const bundleUrl = request.headers['x-bundle']?.[0]?.value;\n    if (bundleUrl == null) {\n      return response;\n    }\n\n    const deploymentId = response.headers['x-amz-meta-x-deployment-id']?.[0]?.value;\n    if (deploymentId != null) {\n      response.headers['x-deployment-id'] = [\n        {\n          key: 'X-Deployment-Id',\n          value: deploymentId,\n        },\n      ];\n    }\n\n    const deployedAt = response.headers['x-amz-meta-x-deployment-deployed-at']?.[0]?.value;\n    if (deployedAt != null) {\n      response.headers['x-deployed-at'] = [\n        {\n          key: 'X-Deployed-At',\n          value: deployedAt,\n        },\n      ];\n    }\n\n    return response;\n  };\n}\n\nconst handler = createOriginRequestHandler();\n\nexport { handler };\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/getBundleKey.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getBundleKey } from './getBundleKey';\n\ndescribe('getBundleKey', () => {\n  it('should correctly generate iOS bundle URL', () => {\n    const key = getBundleKey({\n      appName: 'my-point',\n      platform: 'ios',\n      deploymentId: 'abc123',\n    });\n\n    expect(key).toBe('bundles/my-point/abc123');\n  });\n\n  it('should correctly generate Android bundle URL', () => {\n    const key = getBundleKey({\n      appName: 'my-point',\n      platform: 'android',\n      deploymentId: 'def456',\n    });\n\n    expect(key).toBe('bundles/my-point/def456');\n  });\n\n  it('should correctly generate URL with different suffix', () => {\n    const key = getBundleKey({\n      appName: 'my-point',\n      platform: 'ios',\n      deploymentId: 'abc123',\n    });\n\n    expect(key).toBe('bundles/my-point/abc123');\n  });\n});\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/getBundleKey.ts",
    "content": "export function getBundleKey({\n  appName,\n  platform,\n  deploymentId,\n}: {\n  appName: string;\n  platform: 'ios' | 'android';\n  deploymentId: string;\n}) {\n  const bundleUrlPrefix = `bundles/${appName}/${deploymentId}`;\n\n  switch (platform) {\n    case 'ios': {\n      return `${bundleUrlPrefix}`;\n    }\n    case 'android': {\n      return `${bundleUrlPrefix}`;\n    }\n  }\n}\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/invalidation.spec.ts",
    "content": "import { CloudFrontClient, CreateInvalidationCommand } from '@aws-sdk/client-cloudfront';\nimport { noop } from 'es-toolkit';\nimport { describe, it, expect, vi } from 'vitest';\nimport { getPathsToInvalidate } from './invalidation';\n\nconst classes = {\n  CloudFrontClient,\n  CreateInvalidationCommand,\n};\n\nvi.spyOn(classes, 'CloudFrontClient').mockImplementation(() => ({\n  send: vi.fn(),\n}));\n\nvi.spyOn(classes, 'CreateInvalidationCommand').mockImplementation(noop);\n\ndescribe('invalidation', () => {\n  describe('getPathsToInvalidate', () => {\n    it('returns invalidation paths for deployment_state file', () => {\n      const paths = getPathsToInvalidate('deployments/my-app/deployment_state');\n      expect(paths).toEqual(['/ios/my-app/*', '/android/my-app/*']);\n    });\n\n    it('returns invalidation paths for CURRENT file', () => {\n      const paths = getPathsToInvalidate('deployments/my-app/CURRENT');\n      expect(paths).toEqual(['/ios/my-app/*', '/android/my-app/*']);\n    });\n\n    it('returns invalidation paths for cluster deploymentInfo file', () => {\n      const paths = getPathsToInvalidate('deployments/my-app/clusters/cluster-123.deploymentInfo');\n      expect(paths).toEqual(['/ios/my-app/cluster-123/*', '/android/my-app/cluster-123/*']);\n    });\n\n    it('returns empty array for invalid paths', () => {\n      expect(getPathsToInvalidate('wrong-path')).toEqual([]);\n      expect(getPathsToInvalidate('deployments/my-app/wrong-file')).toEqual([]);\n    });\n  });\n});\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/invalidation.ts",
    "content": "import { CloudFrontClient, CreateInvalidationCommand } from '@aws-sdk/client-cloudfront';\nimport { extractAppName, extractClusterId, isCurrentFile, isClusterDeploymentInfoFile } from './pathParser';\n\n// Initialize CloudFront client\nconst cloudFrontClient = new CloudFrontClient({});\n\n/**\n * Determine CloudFront paths to invalidate based on S3 object key\n */\nexport function getPathsToInvalidate(key: string): string[] {\n  const appName = extractAppName(key);\n\n  if (!appName) {\n    return [];\n  }\n\n  // Rule 1: deployments/<appName>/CURRENT file\n  if (isCurrentFile(key)) {\n    return [`/ios/${appName}/*`, `/android/${appName}/*`];\n  }\n\n  // Rule 2: deployments/<appName>/clusters/<cluster-id>.deploymentInfo file\n  if (isClusterDeploymentInfoFile(key)) {\n    const clusterId = extractClusterId(key);\n\n    if (clusterId) {\n      return [`/ios/${appName}/${clusterId}/*`, `/android/${appName}/${clusterId}/*`];\n    }\n  }\n\n  // No matching rules\n  return [];\n}\n\n/**\n * Create CloudFront invalidation for specified paths\n */\nexport async function createInvalidation(paths: string[], distributionId: string): Promise<string> {\n  const timestamp = new Date().getTime();\n  const callerReference = `s3-triggered-invalidation-${timestamp}`;\n\n  const params = {\n    DistributionId: distributionId,\n    InvalidationBatch: {\n      CallerReference: callerReference,\n      Paths: {\n        Quantity: paths.length,\n        Items: paths,\n      },\n    },\n  };\n\n  try {\n    const command = new CreateInvalidationCommand(params);\n    const response = await cloudFrontClient.send(command);\n\n    return response?.Invalidation?.Id || callerReference;\n  } catch (error) {\n    console.error('Error creating CloudFront invalidation:', error);\n    throw error;\n  }\n}\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/parseAppName.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { parseAppName } from './parseAppName';\n\ndescribe('parseAppName', () => {\n  it('parses /ios/foo to foo', () => {\n    expect(parseAppName('/ios/foo')).toBe('foo');\n  });\n\n  it('parses /android/foo to foo', () => {\n    expect(parseAppName('/android/foo')).toBe('foo');\n  });\n\n  it('parses /ios/my-point/1 to my-point', () => {\n    expect(parseAppName('/ios/my-point/1')).toBe('my-point');\n  });\n\n  it('parses /ios/my-point/1/hbc to my-point', () => {\n    expect(parseAppName('/ios/my-point/1/hbc')).toBe('my-point');\n  });\n});\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/parseAppName.ts",
    "content": "export function parseAppName(uri: string) {\n  const [, , appName] = uri.split('/');\n\n  return appName;\n}\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/parseGroupId.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { parseGroupId } from './parseGroupId';\n\ndescribe('parseGroupId', () => {\n  it('parses groupId correctly from various URIs', () => {\n    expect(parseGroupId('/ios')).toBeUndefined();\n    expect(parseGroupId('/android')).toBeUndefined();\n    expect(parseGroupId('/ios/my-point')).toBeUndefined();\n    expect(parseGroupId('/ios/my-point.hbc')).toBeUndefined();\n    expect(parseGroupId('/android/my-point')).toBeUndefined();\n    expect(parseGroupId('/ios/my-point/foo')).toBe('foo');\n    expect(parseGroupId('/android/my-point/bar')).toBe('bar');\n    expect(parseGroupId('/ios/my-point/foo/hbc')).toBe('foo');\n    expect(parseGroupId('/android/my-point/bar/hbc')).toBe('bar');\n    expect(parseGroupId('/android/my-point/e07617afd7a8dcae18340bf7e602cc135b7a5c0c/hbc')).toBe(\n      'e07617afd7a8dcae18340bf7e602cc135b7a5c0c'\n    );\n  });\n});\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/parseGroupId.ts",
    "content": "/** Extracts groupId from uri.\n *\n * @example\n * '/ios/<appName>/groupId1/hbc' => 'groupId1'\n * '/ios/<appName>/groupId1' => 'groupId1'\n */\nexport function parseGroupId(uri: string): string | undefined {\n  const [, , , groupId] = uri.split('/');\n\n  return groupId;\n}\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/parsePlatform.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { parsePlatform } from './parsePlatform';\n\ndescribe('parsePlatform', () => {\n  it('parses /ios to ios', () => {\n    expect(parsePlatform('/ios')).toBe('ios');\n  });\n\n  it('parses /android to android', () => {\n    expect(parsePlatform('/android')).toBe('android');\n  });\n\n  it('parses /ios/foo to ios', () => {\n    expect(parsePlatform('/ios/foo')).toBe('ios');\n  });\n\n  it('parses /android/foo to android', () => {\n    expect(parsePlatform('/android/foo')).toBe('android');\n  });\n\n  it('throws error when url does not match pattern', () => {\n    expect(() => parsePlatform('/hello/world')).toThrow('URI must start with /ios or /android');\n  });\n});\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/parsePlatform.ts",
    "content": "import { InvalidRequest } from '@granite-js/deployment-manager';\n\nexport function parsePlatform(uri: string) {\n  if (uri.startsWith('/ios')) {\n    return 'ios';\n  }\n  if (uri.startsWith('/android')) {\n    return 'android';\n  }\n\n  throw new InvalidRequest(`URI must start with /ios or /android. uri: ${uri}`);\n}\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/parseSuffix.spec.ts",
    "content": "import { InvalidRequest } from '@granite-js/deployment-manager';\nimport { describe, expect, it } from 'vitest';\nimport { parseSuffix } from './parseSuffix';\n\ndescribe('parseSuffix', () => {\n  it('parses suffix correctly from various URIs', () => {\n    expect(parseSuffix('/ios/granite/0/0_72_6')).toBe('0_72_6');\n    expect(parseSuffix('/android/granite/0/0_72_6')).toBe('0_72_6');\n\n    expect(parseSuffix('/ios/granite/0/0_72_6-reav3')).toBe('0_72_6-reav3');\n    expect(parseSuffix('/android/granite/0/0_72_6-reav3')).toBe('0_72_6-reav3');\n  });\n\n  it('throws error when token is not the 4th one', () => {\n    expect(() => parseSuffix('/ios/granite/0')).toThrowError(InvalidRequest);\n    expect(() => parseSuffix('/ios/granite/0/')).toThrowError(InvalidRequest);\n    expect(() => parseSuffix('/ios/0_72_6.gz')).toThrowError(InvalidRequest);\n    expect(() => parseSuffix('/granite/0_72_6.gz')).toThrowError(InvalidRequest);\n  });\n});\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/parseSuffix.ts",
    "content": "import { InvalidRequest } from '@granite-js/deployment-manager';\n\n/** Extracts suffix from uri.\n *\n * @example\n *\n * '/ios/appName/0/0_72_6' => '0_72_6'\n * '/android/appName/0/0_72_6-reav3' => '0_72_6-reav3'\n */\nexport function parseSuffix(uri: string) {\n  const [, , , , tag] = uri.split('/');\n\n  if (tag == null || tag?.length === 0) {\n    throw new InvalidRequest(`unable to parse suffix: ${uri}`);\n  }\n\n  return tag;\n}\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/pathParser.spec.ts",
    "content": "import { describe, it, expect } from 'vitest';\nimport { extractAppName, extractClusterId, isCurrentFile, isClusterDeploymentInfoFile } from './pathParser';\n\ndescribe('pathParser', () => {\n  describe('extractAppName', () => {\n    it('extracts app name from valid path', () => {\n      expect(extractAppName('deployments/my-app/CURRENT')).toBe('my-app');\n      expect(extractAppName('deployments/my-app/clusters/cluster-123.deploymentInfo')).toBe('my-app');\n    });\n\n    it('returns null for invalid paths', () => {\n      expect(extractAppName('wrong/my-app/CURRENT')).toBeNull();\n      expect(extractAppName('my-app/CURRENT')).toBeNull();\n    });\n  });\n\n  describe('extractClusterId', () => {\n    it('extracts cluster ID from valid path', () => {\n      expect(extractClusterId('deployments/my-app/clusters/cluster-123.deploymentInfo')).toBe('cluster-123');\n    });\n\n    it('returns null for invalid paths', () => {\n      expect(extractClusterId('deployments/my-app/CURRENT')).toBeNull();\n      expect(extractClusterId('deployments/my-app/clusters/file.txt')).toBeNull();\n    });\n  });\n\n  describe('isCurrentFile', () => {\n    it('correctly identifies CURRENT file path', () => {\n      expect(isCurrentFile('deployments/my-app/CURRENT')).toBe(true);\n    });\n\n    it('returns false for non-CURRENT file paths', () => {\n      expect(isCurrentFile('deployments/my-app/clusters/cluster-123.deploymentInfo')).toBe(false);\n      expect(isCurrentFile('deployments/my-app/OTHER')).toBe(false);\n    });\n  });\n\n  describe('isClusterDeploymentInfoFile', () => {\n    it('correctly identifies cluster deploymentInfo file path', () => {\n      expect(isClusterDeploymentInfoFile('deployments/my-app/clusters/cluster-123.deploymentInfo')).toBe(true);\n    });\n\n    it('returns false for non-cluster deploymentInfo file paths', () => {\n      expect(isClusterDeploymentInfoFile('deployments/my-app/CURRENT')).toBe(false);\n      expect(isClusterDeploymentInfoFile('deployments/my-app/clusters/file.txt')).toBe(false);\n    });\n  });\n});\n"
  },
  {
    "path": "infra/pulumi-aws/src/lambda/utils/pathParser.ts",
    "content": "/**\n * Utility functions for parsing S3 paths\n */\n\n/**\n * Extracts the app name from an S3 object key\n */\nexport function extractAppName(key: string): string | null {\n  const pathParts = key.split('/');\n\n  if (pathParts.length < 2 || pathParts[0] !== 'deployments') {\n    return null;\n  }\n\n  return pathParts[1] ?? null;\n}\n\n/**\n * Extracts the cluster ID from an S3 object key\n */\nexport function extractClusterId(key: string): string | null {\n  const pathParts = key.split('/');\n\n  if (\n    pathParts.length < 4 ||\n    pathParts[0] !== 'deployments' ||\n    pathParts[2] !== 'clusters' ||\n    !pathParts[3]?.endsWith('.deploymentInfo')\n  ) {\n    return null;\n  }\n\n  return pathParts[3]?.replace('.deploymentInfo', '') ?? null;\n}\n\n/**\n * Checks if the S3 object key is a CURRENT file\n */\nexport function isCurrentFile(key: string): boolean {\n  const pathParts = key.split('/');\n\n  return (\n    pathParts.length === 3 &&\n    pathParts[0] === 'deployments' &&\n    ['CURRENT', 'deployment_state'].includes(pathParts[2] ?? '')\n  );\n}\n\n/**\n * Checks if the S3 object key is a cluster deploymentInfo file\n */\nexport function isClusterDeploymentInfoFile(key: string): boolean {\n  const pathParts = key.split('/');\n\n  return Boolean(\n    pathParts.length === 4 &&\n      pathParts[0] === 'deployments' &&\n      pathParts[2] === 'clusters' &&\n      pathParts[3]?.endsWith('.deploymentInfo')\n  );\n}\n"
  },
  {
    "path": "infra/pulumi-aws/src/react-native-cdn.ts",
    "content": "import fs from 'fs';\nimport path from 'path';\nimport { getPackageRoot, prepareLocalDirectory } from '@granite-js/utils';\nimport * as aws from '@pulumi/aws';\nimport * as pulumi from '@pulumi/pulumi';\nimport { transform } from 'oxc-transform';\nimport { v7 as uuidv7 } from 'uuid';\nimport { getTimestampByUUIDv7, toDeployedAtString } from './utils/getTimestampByUUIDv7';\n\n/**\n * Arguments for creating a React Native CDN infrastructure\n * @interface ReactNativeCdnArgs\n * @property {string} bucketName - Name of the S3 bucket (e.g. 'my-app')\n * @property {aws.Region} region - AWS region (e.g. 'ap-northeast-2')\n */\nexport interface ReactNativeCdnArgs {\n  /** Name of the S3 bucket (e.g. 'my-app') */\n  bucketName: string;\n  /** AWS region (e.g. 'ap-northeast-2') */\n  region: aws.Region;\n}\n\nconst createLambdaCode = (\n  path: string,\n  {\n    bucketName,\n    region,\n  }: {\n    bucketName: string;\n    region: string;\n  }\n) => {\n  const code = fs.readFileSync(path, 'utf8');\n  const { code: transformedCode } = transform(path, code, {\n    define: {\n      _BUCKET_NAME: JSON.stringify(bucketName),\n      _BUCKET_REGION: JSON.stringify(region),\n    },\n  });\n  return new pulumi.asset.AssetArchive({\n    'index.js': new pulumi.asset.StringAsset(transformedCode),\n  });\n};\n\nexport class ReactNativeBundleCDN extends pulumi.ComponentResource {\n  public readonly cloudfrontDistributionId: pulumi.Output<string>;\n  public readonly cloudfrontOriginAccessIdentityArn: pulumi.Output<string>;\n  public readonly bucketName: pulumi.Output<string>;\n  public readonly bucketEndpoint: pulumi.Output<string>;\n  public readonly cloudfrontDomain: pulumi.Output<string>;\n  public readonly monitoringSubscriptionId: pulumi.Output<string>;\n  public readonly sharedDeploymentId: pulumi.Output<string>;\n\n  constructor(name: string, args: ReactNativeCdnArgs, opts?: pulumi.ComponentResourceOptions) {\n    super('granite:aws:ReactNativeBundleCDN', name, {}, opts);\n\n    // Extract args with defaults\n    const { bucketName, region } = args;\n\n    // Create resource name\n    const resourceName = bucketName;\n\n    // Main AWS provider\n    const awsProvider = new aws.Provider(\n      'awsProvider',\n      {\n        region,\n      },\n      { parent: this }\n    );\n\n    // US-East-1 provider for CloudFront and Lambda@Edge\n    const usEast1Provider = new aws.Provider(\n      'usEast1Provider',\n      {\n        region: 'us-east-1',\n      },\n      { parent: this }\n    );\n\n    // S3 Bucket\n    const bucket = new aws.s3.Bucket(\n      'bucket',\n      {\n        bucket: resourceName,\n        acl: 'private',\n        versioning: {\n          enabled: true,\n        },\n        website: {\n          indexDocument: 'index.html',\n          errorDocument: 'error.html',\n        },\n        corsRules: [\n          {\n            allowedHeaders: ['*'],\n            allowedMethods: ['GET'],\n            allowedOrigins: ['*'],\n            maxAgeSeconds: 3000,\n          },\n        ],\n      },\n      { provider: awsProvider, parent: this }\n    );\n\n    const deploymentId = uuidv7();\n    const deployedAt = getTimestampByUUIDv7(deploymentId);\n\n    const bundlePath = path.join(__dirname, 'prebuilt-shared');\n    const packageRoot = getPackageRoot();\n    const granitePath = prepareLocalDirectory(packageRoot);\n    const prebuiltSharedPath = path.join(granitePath, 'prebuilt-shared');\n    fs.mkdirSync(prebuiltSharedPath, { recursive: true });\n\n    const files = fs.readdirSync(bundlePath);\n    for (const file of files) {\n      const sourcePath = path.join(bundlePath, file);\n      const destPath = path.join(prebuiltSharedPath, file);\n      fs.copyFileSync(sourcePath, destPath);\n    }\n\n    const bundleIos = new aws.s3.BucketObjectv2('bundle.ios.hbc.gz', {\n      bucket: bucket.id,\n      key: `bundles/shared/${deploymentId}/bundle.ios.hbc.gz`,\n      source: new pulumi.asset.FileAsset(path.join(prebuiltSharedPath, 'bundle.ios.hbc.gz')),\n      contentType: 'application/gzip',\n      cacheControl: 's-maxage=31536000, max-age=0',\n      contentEncoding: 'gzip',\n      metadata: {\n        'x-deployment-id': deploymentId,\n        'x-deployment-deployed-at': toDeployedAtString(new Date(deployedAt)),\n      },\n    });\n    const bundleAndroid = new aws.s3.BucketObjectv2('bundle.android.hbc.gz', {\n      bucket: bucket.id,\n      key: `bundles/shared/${deploymentId}/bundle.android.hbc.gz`,\n      source: new pulumi.asset.FileAsset(path.join(prebuiltSharedPath, 'bundle.android.hbc.gz')),\n      contentType: 'application/gzip',\n      cacheControl: 's-maxage=31536000, max-age=0',\n      contentEncoding: 'gzip',\n      metadata: {\n        'x-deployment-id': deploymentId,\n        'x-deployment-deployed-at': toDeployedAtString(new Date(deployedAt)),\n      },\n    });\n    const deploymentState = new aws.s3.BucketObjectv2('deployment_state', {\n      bucket: bucket.id,\n      key: 'deployments/shared/deployment_state',\n      contentType: 'application/json',\n      source: new pulumi.asset.StringAsset(\n        JSON.stringify({\n          type: 'STABLE',\n          deploymentId,\n        })\n      ),\n    });\n    const deployments = new aws.s3.BucketObjectv2('DEPLOYMENTS', {\n      bucket: bucket.id,\n      key: 'deployments/shared/DEPLOYMENTS',\n      contentType: 'application/json',\n      source: new pulumi.asset.StringAsset(\n        JSON.stringify([\n          {\n            deploymentId,\n            deployedAt,\n          },\n        ])\n      ),\n    });\n\n    // Cache invalidation lambda IAM role\n    const cacheInvalidationRole = new aws.iam.Role(\n      'cacheInvalidationRole',\n      {\n        name: `${resourceName}_cache_invalidation_role`,\n        assumeRolePolicy: aws.iam.assumeRolePolicyForPrincipal({\n          Service: 'lambda.amazonaws.com',\n        }),\n      },\n      { provider: awsProvider, parent: this }\n    );\n\n    // Attach policy to allow CloudFront invalidation and logging\n    const cacheInvalidationPolicy = new aws.iam.RolePolicy(\n      'cacheInvalidationPolicy',\n      {\n        name: `${resourceName}_cache_invalidation_policy`,\n        role: cacheInvalidationRole.id,\n        policy: JSON.stringify({\n          Version: '2012-10-17',\n          Statement: [\n            {\n              Effect: 'Allow',\n              Action: [\n                'cloudfront:CreateInvalidation',\n                's3:GetObject',\n                's3:ListBucket',\n                'logs:CreateLogGroup',\n                'logs:CreateLogStream',\n                'logs:PutLogEvents',\n              ],\n              Resource: '*',\n            },\n          ],\n        }),\n      },\n      { provider: awsProvider, parent: this }\n    );\n\n    // CloudFront Origin Access Identity\n    const originAccessIdentity = new aws.cloudfront.OriginAccessIdentity(\n      'originAccessIdentity',\n      {\n        comment: resourceName,\n      },\n      { provider: usEast1Provider, parent: this }\n    );\n\n    new aws.s3.BucketPolicy(\n      'bucketPolicy',\n      {\n        bucket: bucket.id,\n        policy: pulumi.all([bucket.arn, originAccessIdentity.iamArn]).apply(([bucketArn, oaiArn]) =>\n          JSON.stringify({\n            Version: '2012-10-17',\n            Statement: [\n              {\n                Sid: 'AllowCloudFrontOAI',\n                Effect: 'Allow',\n                Principal: {\n                  AWS: oaiArn,\n                },\n                Action: 's3:GetObject',\n                Resource: `${bucketArn}/*`,\n              },\n              {\n                Sid: 'AllowCloudFrontListBucket',\n                Effect: 'Allow',\n                Principal: {\n                  AWS: oaiArn,\n                },\n                Action: 's3:ListBucket',\n                Resource: bucketArn,\n              },\n            ],\n          })\n        ),\n      },\n      { provider: awsProvider, parent: this }\n    );\n\n    // IAM setup for Lambda@Edge\n    const lambdaAtEdgeAssumeRolePolicy = aws.iam.getPolicyDocumentOutput({\n      statements: [\n        {\n          effect: 'Allow',\n          principals: [\n            {\n              type: 'Service',\n              identifiers: ['lambda.amazonaws.com', 'edgelambda.amazonaws.com'],\n            },\n          ],\n          actions: ['sts:AssumeRole'],\n        },\n      ],\n    });\n\n    const lambdaAtEdgeRole = new aws.iam.Role(\n      'lambdaAtEdgeRole',\n      {\n        name: `${resourceName}_lambda_role`,\n        assumeRolePolicy: lambdaAtEdgeAssumeRolePolicy.json,\n      },\n      { provider: usEast1Provider, parent: this }\n    );\n\n    const lambdaAtEdgePolicy = aws.iam.getPolicyDocumentOutput({\n      statements: [\n        {\n          effect: 'Allow',\n          actions: [\n            'iam:CreateServiceLinkedRole',\n            'lambda:GetFunction',\n            'lambda:EnableReplication',\n            'cloudfront:UpdateDistribution',\n            's3:GetObject',\n            's3:ListBucket',\n            'logs:CreateLogGroup',\n            'logs:CreateLogStream',\n            'logs:PutLogEvents',\n            'logs:DescribeLogStreams',\n          ],\n          resources: ['*'],\n        },\n      ],\n    });\n\n    const lambdaAtEdgeRolePolicy = new aws.iam.RolePolicy(\n      'lambdaAtEdgeRolePolicy',\n      {\n        name: `${resourceName}_lambda_role_policy`,\n        role: lambdaAtEdgeRole.id,\n        policy: lambdaAtEdgePolicy.json,\n      },\n      { provider: usEast1Provider, parent: this }\n    );\n\n    // Helper function to create Lambda code archives\n    // Simplified for this example - in real implementation,\n    // you'd bundle the Lambda code with the package\n    const originRequestPath = require.resolve('@granite-js/pulumi-aws/lambda/origin-request');\n    const originResponsePath = require.resolve('@granite-js/pulumi-aws/lambda/origin-response');\n    const autoCacheRemovalPath = require.resolve('@granite-js/pulumi-aws/lambda/auto-cache-removal');\n\n    // Lambda@Edge functions\n    const originRequestHandler = new aws.lambda.Function(\n      'originRequestHandler',\n      {\n        publish: true,\n        code: createLambdaCode(originRequestPath, {\n          bucketName,\n          region,\n        }),\n        description: 'Lambda@Edge function for serving React Native bundles from S3',\n        name: `fe_edge_origin_request_${resourceName}`,\n        handler: 'index.handler',\n        role: lambdaAtEdgeRole.arn,\n        runtime: 'nodejs22.x',\n        timeout: 5,\n      },\n      {\n        provider: usEast1Provider,\n        parent: this,\n        dependsOn: [lambdaAtEdgeRolePolicy],\n      }\n    );\n\n    const originResponseHandler = new aws.lambda.Function(\n      'originResponseHandler',\n      {\n        publish: true,\n        code: createLambdaCode(originResponsePath, {\n          bucketName,\n          region,\n        }),\n        description: 'Lambda@Edge function for serving React Native bundles from S3',\n        name: `fe_edge_origin_response_${resourceName}`,\n        handler: 'index.handler',\n        role: lambdaAtEdgeRole.arn,\n        runtime: 'nodejs22.x',\n        timeout: 5,\n      },\n      {\n        provider: usEast1Provider,\n        parent: this,\n        dependsOn: [lambdaAtEdgeRolePolicy],\n      }\n    );\n\n    // CloudFront Distribution\n    const cloudfrontDistribution = new aws.cloudfront.Distribution(\n      'cloudfrontDistribution',\n      {\n        comment: resourceName,\n        enabled: true,\n        httpVersion: 'http2and3',\n        origins: [\n          {\n            domainName: bucket.bucketRegionalDomainName,\n            originId: bucket.id,\n            s3OriginConfig: {\n              originAccessIdentity: originAccessIdentity.cloudfrontAccessIdentityPath,\n            },\n          },\n        ],\n        restrictions: {\n          geoRestriction: {\n            restrictionType: 'none',\n          },\n        },\n        defaultCacheBehavior: {\n          allowedMethods: ['GET', 'HEAD', 'OPTIONS'],\n          cachedMethods: ['GET', 'HEAD'],\n          compress: true,\n          defaultTtl: 0,\n          maxTtl: 31536000,\n          minTtl: 0,\n          targetOriginId: bucket.id,\n          viewerProtocolPolicy: 'allow-all',\n          forwardedValues: {\n            queryString: true,\n            headers: ['Accept-Encoding'],\n            cookies: {\n              forward: 'none',\n            },\n          },\n          lambdaFunctionAssociations: [\n            {\n              eventType: 'origin-request',\n              lambdaArn: originRequestHandler.qualifiedArn,\n            },\n            {\n              eventType: 'origin-response',\n              lambdaArn: originResponseHandler.qualifiedArn,\n            },\n          ],\n        },\n        viewerCertificate: {\n          cloudfrontDefaultCertificate: true,\n        },\n      },\n      { provider: usEast1Provider, parent: this }\n    );\n\n    // CloudFront Monitoring Subscription\n    const monitoringSubscription = new aws.cloudfront.MonitoringSubscription(\n      'monitoringSubscription',\n      {\n        distributionId: cloudfrontDistribution.id,\n        monitoringSubscription: {\n          realtimeMetricsSubscriptionConfig: {\n            realtimeMetricsSubscriptionStatus: 'Enabled',\n          },\n        },\n      },\n      { provider: usEast1Provider, parent: this }\n    );\n\n    // Create cache invalidation Lambda\n    const cacheInvalidationLambda = new aws.lambda.Function(\n      'cacheInvalidationLambda',\n      {\n        name: `${resourceName}_cache_invalidation`,\n        code: createLambdaCode(autoCacheRemovalPath, {\n          bucketName,\n          region,\n        }),\n        description: 'Lambda function that invalidates CloudFront cache based on S3 events',\n        handler: 'index.handler',\n        role: cacheInvalidationRole.arn,\n        runtime: 'nodejs22.x',\n        timeout: 30,\n        environment: {\n          variables: {\n            // CloudFront distribution ID is needed for the lambda to know which distribution to invalidate\n            // We will use a dependency to ensure this is available\n            CLOUDFRONT_DISTRIBUTION_ID: pulumi.interpolate`${cloudfrontDistribution.id}`,\n          },\n        },\n      },\n      {\n        provider: awsProvider,\n        parent: this,\n        dependsOn: [cacheInvalidationPolicy],\n      }\n    );\n\n    // Add permission for S3 to invoke the Lambda function\n    const lambdaPermission = new aws.lambda.Permission(\n      'lambdaPermission',\n      {\n        action: 'lambda:InvokeFunction',\n        function: cacheInvalidationLambda.name,\n        principal: 's3.amazonaws.com',\n        sourceArn: bucket.arn,\n      },\n      { provider: awsProvider, parent: this }\n    );\n\n    // Configure S3 event notification to trigger Lambda\n    new aws.s3.BucketNotification(\n      'bucketNotification',\n      {\n        bucket: bucket.id,\n        lambdaFunctions: [\n          {\n            lambdaFunctionArn: cacheInvalidationLambda.arn,\n            events: ['s3:ObjectCreated:*', 's3:ObjectRemoved:*'],\n            filterPrefix: 'deployments/', // Only trigger for objects in deployments/ folder\n          },\n        ],\n      },\n      {\n        provider: awsProvider,\n        parent: this,\n        dependsOn: [lambdaPermission, cacheInvalidationLambda],\n      }\n    );\n\n    pulumi.all([bundleIos.id, bundleAndroid.id, deploymentState.id, deployments.id]).apply(() => {\n      fs.rmSync(granitePath, { recursive: true, force: true });\n      return null;\n    });\n\n    // Set outputs\n    this.cloudfrontDistributionId = cloudfrontDistribution.id;\n    this.cloudfrontOriginAccessIdentityArn = originAccessIdentity.iamArn;\n    this.bucketName = bucket.bucket;\n    this.bucketEndpoint = bucket.websiteEndpoint;\n    this.cloudfrontDomain = cloudfrontDistribution.domainName;\n    this.monitoringSubscriptionId = monitoringSubscription.id;\n    this.sharedDeploymentId = pulumi.output(deploymentId);\n    // Register all outputs\n    this.registerOutputs({\n      sharedDeploymentId: this.sharedDeploymentId,\n      cloudfrontDistributionId: this.cloudfrontDistributionId,\n      cloudfrontOriginAccessIdentityArn: this.cloudfrontOriginAccessIdentityArn,\n      bucketName: this.bucketName,\n      bucketEndpoint: this.bucketEndpoint,\n      cloudfrontDomain: this.cloudfrontDomain,\n      monitoringSubscriptionId: this.monitoringSubscriptionId,\n    });\n  }\n}\n"
  },
  {
    "path": "infra/pulumi-aws/src/utils/getTimestampByUUIDv7.ts",
    "content": "export function getTimestampByUUIDv7(uuid: string) {\n  const timestampHex = uuid.split('-').join('').slice(0, 12);\n\n  const timestamp = Number.parseInt(timestampHex, 16);\n\n  return timestamp;\n}\n\nexport function toDeployedAtString(date: Date) {\n  return [\n    date.getFullYear(),\n    (date.getMonth() + 1).toString().padStart(2, '0'),\n    date.getDate().toString().padStart(2, '0'),\n    date.getHours().toString().padStart(2, '0'),\n    date.getMinutes().toString().padStart(2, '0'),\n  ].join('');\n}\n"
  },
  {
    "path": "infra/pulumi-aws/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "infra/pulumi-aws/tsup.config.ts",
    "content": "import { defineConfig } from 'tsup';\n\nexport default defineConfig([\n  {\n    entry: {\n      index: './src/index.ts',\n    },\n    format: ['esm', 'cjs'],\n    outDir: 'dist',\n    dts: true,\n    shims: true,\n    external: ['@granite-js/pulumi-aws'],\n    publicDir: './public',\n  },\n  {\n    entry: {\n      'lambda/origin-request': './src/lambda/origin-request.ts',\n      'lambda/origin-response': './src/lambda/origin-response.ts',\n      'lambda/auto-cache-removal': './src/lambda/auto-cache-removal.ts',\n    },\n    format: ['esm', 'cjs'],\n    outDir: 'dist',\n    dts: true,\n  },\n]);\n"
  },
  {
    "path": "knip.json",
    "content": "{\n  \"ignore\": [\".yarn\", \"lib\"],\n  \"ignoreDependencies\": [\n    \"typescript\",\n    \"@babel/core\",\n    \"@swc/core\",\n    \"react\",\n    \"react-dom\",\n    \"@types/react-dom\",\n    \"jest-environment-jsdom\",\n    \"enhanced-resolve\"\n  ],\n  \"ignoreBinaries\": [\"tsc\"],\n  \"workspaces\": {\n    \"packages/*\": {\n      \"entry\": [\n        \"{index,main,cli}.{js,cjs,mjs,jsx,ts,cts,mts,tsx}\",\n        \"src/{index,main,cli}.{js,cjs,mjs,jsx,ts,cts,mts,tsx}\",\n        \"bin/{index,main,cli}.{js,cjs,mjs,ts,cts,mts}\"\n      ],\n      \"project\": [\"**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}\"]\n    }\n  },\n  \"exclude\": [\"nsExports\", \"nsTypes\", \"classMembers\", \"enumMembers\"]\n}\n"
  },
  {
    "path": "mise.toml",
    "content": "[tools]\nnode = \"24\"\n"
  },
  {
    "path": "nx.json",
    "content": "{\n  \"$schema\": \"https://raw.githubusercontent.com/nrwl/nx/refs/heads/master/packages/nx/schemas/project-schema.json\",\n  \"targetDefaults\": {\n    \"typecheck\": {\n      \"dependsOn\": [\"^build\"],\n      \"cache\": false\n    },\n    \"test\": {\n      \"dependsOn\": [\"^build\"],\n      \"cache\": false\n    },\n    \"test:no-parallel\": {\n      \"dependsOn\": [\"^build\"],\n      \"cache\": false\n    },\n    \"build\": {\n      \"dependsOn\": [\"^build\"],\n      \"outputs\": [\"{projectRoot}/dist\"],\n      \"cache\": true\n    },\n    \"test:gradle-plugin\": {\n      \"cache\": true,\n      \"inputs\": [\n        \"{projectRoot}/gradle-plugin/src/**\",\n        \"{projectRoot}/gradle-plugin/build.gradle.kts\"\n      ],\n      \"dependsOn\": [\n        \"build\"\n      ]\n    }\n  },\n  \"defaultBase\": \"main\",\n  \"neverConnectToCloud\": true\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"granite-monorepo\",\n  \"private\": true,\n  \"packageManager\": \"yarn@4.12.0\",\n  \"workspaces\": [\n    \"packages/*\",\n    \"services/*\",\n    \"infra/*\",\n    \"tools\",\n    \"docs\"\n  ],\n  \"scripts\": {\n    \"prune\": \"knip\",\n    \"lint\": \"eslint .\",\n    \"prepare\": \"husky\",\n    \"changeset\": \"changeset\",\n    \"typecheck:all\": \"nx run-many -t typecheck\",\n    \"test:all\": \"yarn test:parallel && yarn test:no-parallel\",\n    \"test:parallel\": \"nx run-many -t test --nxBail\",\n    \"test:no-parallel\": \"nx run-many -t test:no-parallel --parallel=false --nxBail\",\n    \"check-licenses\": \"node .scripts/licenses.mjs check\",\n    \"check-exports\": \"tsx --import ./.scripts/check-exports.mts\",\n    \"generate-licenses\": \"node .scripts/licenses.mjs generate\",\n    \"consistency-check-licenses\": \"node .scripts/licenses.mjs consistency-check\",\n    \"build:all\": \"nx run-many --targets=build\",\n    \"build:shared\": \"tsdown --config shared/tsdown.config.ts\",\n    \"attw:all\": \"yarn tools attw\",\n    \"clear\": \"rimraf --glob \\\"**/*/dist\\\" .nx\",\n    \"tools\": \"./bin/tools\",\n    \"publish:dev\": \"sh .scripts/publish-dev.sh\"\n  },\n  \"resolutions\": {\n    \"typescript\": \"5.8.3\",\n    \"@babel/core\": \"7.28.5\"\n  },\n  \"dependenciesMeta\": {\n    \"hermes-compiler\": {\n      \"unplugged\": true\n    }\n  },\n  \"devDependencies\": {\n    \"@arethetypeswrong/cli\": \"^0.18.2\",\n    \"@changesets/cli\": \"^2.29.3\",\n    \"@clack/prompts\": \"^0.9.0\",\n    \"@eslint/compat\": \"^1.1.1\",\n    \"@eslint/js\": \"^9.7.0\",\n    \"@nx/devkit\": \"^21.0.3\",\n    \"@nx/js\": \"^21.0.3\",\n    \"@types/eslint__js\": \"^8.42.3\",\n    \"@types/jest\": \"^29.5.12\",\n    \"@types/node\": \"catalog:tools\",\n    \"@types/react\": \"catalog:react-native\",\n    \"@yarnpkg/types\": \"^4.0.0\",\n    \"chalk\": \"^5.3.0\",\n    \"eslint\": \"^9.10.0\",\n    \"eslint-config-prettier\": \"^9.1.0\",\n    \"eslint-plugin-import\": \"^2.29.1\",\n    \"eslint-plugin-prettier\": \"^5.1.3\",\n    \"eslint-plugin-react\": \"^7.35.0\",\n    \"eslint-plugin-react-hooks\": \"^5.2.0\",\n    \"eslint-plugin-unicorn\": \"^54.0.0\",\n    \"eslint-plugin-unused-imports\": \"^4.1.4\",\n    \"execa\": \"^9.5.2\",\n    \"husky\": \"^9.1.3\",\n    \"hygen\": \"6.2.11\",\n    \"knip\": \"^1\",\n    \"nx\": \"^21.0.3\",\n    \"prettier\": \"^3.3.3\",\n    \"rimraf\": \"^6.0.1\",\n    \"ts-node\": \"^10.9.2\",\n    \"tsdown\": \"catalog:tools\",\n    \"tsx\": \"^4.19.3\",\n    \"typescript\": \"catalog:tools\",\n    \"typescript-eslint\": \"^8.31.0\",\n    \"yargs\": \"^17.7.2\"\n  }\n}\n"
  },
  {
    "path": "packages/babel-preset-granite/CHANGELOG.md",
    "content": "# babel-preset-granite\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n## 1.0.18\n\n## 1.0.17\n\n## 1.0.16\n\n## 1.0.15\n\n## 1.0.14\n\n## 1.0.13\n\n## 1.0.12\n\n## 1.0.11\n\n## 1.0.10\n\n## 1.0.9\n\n## 1.0.8\n\n## 1.0.7\n\n## 1.0.6\n\n## 1.0.5\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "packages/babel-preset-granite/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: babel-preset-granite\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@babel/core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n2. **@babel/plugin-transform-export-namespace-from**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n3. **@react-native/babel-preset**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+ssh://git@github.com/facebook/react-native.git\n\t\n4. **@types/babel__core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n5. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n6. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n7. **tsdown**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/rolldown/tsdown.git\n\t\n8. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n9. **babel-preset-granite**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: git+https://github.com/toss/granite.git\n\t\n10. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/babel-preset-granite/package.json",
    "content": "{\n  \"name\": \"babel-preset-granite\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"license\": \"Apache-2.0\",\n  \"description\": \"Babel preset for Granite\",\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"build\": \"tsdown\",\n    \"test\": \"vitest run\",\n    \"test:watch\": \"vitest\"\n  },\n  \"main\": \"./dist/index.cjs\",\n  \"types\": \"./dist/index.d.cts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/babel-preset-granite\"\n  },\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.cts\",\n      \"default\": \"./dist/index.cjs\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"dependencies\": {\n    \"@babel/core\": \"7.28.5\",\n    \"@babel/plugin-transform-export-namespace-from\": \"7.27.1\",\n    \"@react-native/babel-preset\": \"catalog:react-native\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"sideEffects\": false,\n  \"devDependencies\": {\n    \"@types/babel__core\": \"^7.20.5\",\n    \"@types/node\": \"catalog:tools\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"tsdown\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\"\n  }\n}\n"
  },
  {
    "path": "packages/babel-preset-granite/src/__tests__/preset.spec.ts",
    "content": "import { transformSync } from '@babel/core';\nimport { describe, it, expect } from 'vitest';\nimport preset from '../index.js';\n\ndescribe('babel-preset-granite', () => {\n  const transformCode = (code: string) => {\n    return transformSync(code, {\n      presets: [preset],\n      filename: 'test.tsx',\n    })?.code;\n  };\n\n  describe('plugin ordering', () => {\n    it('should apply flow-strip-types plugin first', () => {\n      const input = `\n        // Flow\n        class FlatList extends React.PureComponent<Props, State> {\n          props: Props; \n          state: State; \n          constructor(props) {\n            super(props);\n            this._checkProps(this.props);\n          }\n          _checkProps(props) {\n            const { getItem } = props;\n          }\n        }\n      `;\n\n      const result = transformCode(input);\n      expect(result).toMatchInlineSnapshot(`\"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");var _classCallCheck2=_interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));var _createClass2=_interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));var _possibleConstructorReturn2=_interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));var _getPrototypeOf2=_interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));var _inherits2=_interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));function _callSuper(t,o,e){return o=(0,_getPrototypeOf2.default)(o),(0,_possibleConstructorReturn2.default)(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2.default)(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function(){return!!t;})();}var FlatList=function(_React$PureComponent){function FlatList(props){var _this;(0,_classCallCheck2.default)(this,FlatList);_this=_callSuper(this,FlatList,[props]);_this._checkProps(_this.props);return _this;}(0,_inherits2.default)(FlatList,_React$PureComponent);return(0,_createClass2.default)(FlatList,[{key:\"_checkProps\",value:function _checkProps(props){var getItem=props.getItem;}}]);}(React.PureComponent);\"`);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/babel-preset-granite/src/index.ts",
    "content": "export default function () {\n  const baseConfig = {\n    presets: [[require.resolve('@react-native/babel-preset')]],\n    plugins: [require.resolve('@babel/plugin-transform-export-namespace-from')],\n  };\n\n  return baseConfig;\n}\n"
  },
  {
    "path": "packages/babel-preset-granite/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"],\n  \"compilerOptions\": {\n    \"moduleResolution\": \"node\",\n    \"module\": \"CommonJS\",\n    \"types\": [\"node\"]\n  }\n}\n"
  },
  {
    "path": "packages/babel-preset-granite/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  entry: ['src/index.ts'],\n  format: ['cjs'],\n  dts: true,\n  fixedExtension: false,\n});\n"
  },
  {
    "path": "packages/babel-preset-granite/vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  cacheDir: '.vitest',\n\n  test: {\n    include: ['src/**/*.spec.ts', 'src/**/__tests__/**/*.ts'],\n    testTimeout: 10_000,\n    hookTimeout: 10_000,\n  },\n});\n"
  },
  {
    "path": "packages/blur-view/CHANGELOG.md",
    "content": "# @granite-js/blur-view\n\n## 1.0.23\n\n### Patch Changes\n\n- Updated dependencies [d4d3993]\n  - @granite-js/native@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/native@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/native@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- Updated dependencies [324827a]\n  - @granite-js/native@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/native@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/native@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/native@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/native@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/native@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/native@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/native@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/native@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/native@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/native@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/native@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/native@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/native@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/native@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/native@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- Updated dependencies [cc75aa4]\n  - @granite-js/native@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/native@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [b325495]\n  - @granite-js/native@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- @granite-js/native@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/native@1.0.0\n"
  },
  {
    "path": "packages/blur-view/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/blur-view\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@types/react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n2. **react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/react.git\n\t\n3. **react-native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/react-native.git\n\t\n4. **react-native-builder-bob**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/callstack/react-native-builder-bob.git\n\t\n5. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/blur-view/package.json",
    "content": "{\n  \"name\": \"@granite-js/blur-view\",\n  \"version\": \"1.0.23\",\n  \"type\": \"module\",\n  \"main\": \"./dist/module/index.js\",\n  \"types\": \"./dist/typescript/index.d.ts\",\n  \"react-native\": \"./src/index.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/typescript/index.d.ts\",\n      \"react-native\": \"./src/index.ts\",\n      \"default\": \"./dist/module/index.js\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"eslint .\",\n    \"build\": \"bob build && tsc --project tsconfig.build.json\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/blur-view\"\n  },\n  \"files\": [\n    \"src\",\n    \"dist\"\n  ],\n  \"devDependencies\": {\n    \"@granite-js/native\": \"workspace:*\",\n    \"@types/react\": \"catalog:react-native\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"react-native-builder-bob\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\"\n  },\n  \"peerDependencies\": {\n    \"@granite-js/native\": \"workspace:*\",\n    \"@types/react\": \"*\",\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"sideEffects\": false,\n  \"react-native-builder-bob\": {\n    \"source\": \"src\",\n    \"output\": \"dist\",\n    \"targets\": [\n      [\n        \"module\",\n        {\n          \"esm\": true\n        }\n      ]\n    ]\n  }\n}\n"
  },
  {
    "path": "packages/blur-view/src/BlurView.tsx",
    "content": "import type { BlurViewProps as InternalBlurViewProps } from '@granite-js/native/@react-native-community/blur';\nimport { View, ViewProps } from 'react-native';\nimport { ReactNativeBlurModule } from './ReactNativeBlurModule';\nimport { isBlurNativeModuleSupported } from './constants';\n\nexport type BlurType = InternalBlurViewProps['blurType'];\n\nexport interface BlurViewProps extends ViewProps {\n  blurType?: BlurType;\n  blurAmount?: number;\n  vibrancyEffect?: boolean;\n  reducedTransparencyFallbackColor?: string;\n}\n\n/**\n * @public\n * @category UI\n * @name BlurView\n * @description\n * `BlurView` adds a blurred background effect, primarily on iOS. It creates a visual blur on the background view.\n *\n * This component is supported only on iOS. On Android, it simply renders a regular [`View`](https://reactnative.dev/docs/0.72/view) without any blur effect.\n *\n * You can control the blur intensity and optionally enable the [vibrancy effect](https://developer.apple.com/documentation/uikit/uivibrancyeffect?language=objc), which enhances the visual impact of content displayed over a blurred background.\n *\n * If blur is not supported or doesn't render properly, you can use the `reducedTransparencyFallbackColor` prop to set a fallback background color.\n *\n * Use the `isSupported` property to check whether the current device supports blur. Blur is available on iOS from version 5.126.0 and not supported on Android.\n *\n * @param {BlurViewProps} [props] The props you can pass to `BlurView`. It extends `react-native`'s `ViewProps`, so you can use layout and style properties. The props align with those of [`@react-native-community/blur`](https://github.com/Kureev/react-native-blur/tree/v4.3.2?tab=readme-ov-file#blurview).\n * @param {BlurType} [props.blurType] Type of blur to apply, such as `light`, `dark`, or `extraDark`.\n * @param {number} [props.blurAmount=10] Intensity of the blur effect. Higher values make the blur stronger. Accepts values from `0` to `100`. Default is `10`.\n * @param {boolean} [props.vibrancyEffect=false] Enables the vibrancy effect. This effect enhances content displayed on top of the blur. Only supported on iOS. Default is `false`.\n * @param {string} [props.reducedTransparencyFallbackColor] Fallback background color used when blur cannot be applied due to system settings or device limitations.\n *\n * @returns {JSX.Element} On iOS, returns a blurred `BlurView` or `VibrancyView` component. On Android, returns a regular `View` without blur.\n *\n * ::: warning Note\n * `BlurView` is only supported on iOS. On Android, it renders a regular `View` without any blur effect.\n * :::\n *\n * @example\n *\n * ### Blurring background behind a text\n *\n * ```tsx\n * import { BlurView } from '@granite-js/react-native';\n * import { View, Text, StyleSheet } from 'react-native';\n *\n * export function BlurViewExample() {\n *   return (\n *     <View style={styles.container}>\n *       <Text style={styles.absolute}>Blurred Text</Text>\n *       <BlurView style={styles.absolute} blurType=\"light\" blurAmount={1} />\n *       <Text>Non Blurred Text</Text>\n *     </View>\n *   );\n * }\n *\n * const styles = StyleSheet.create({\n *   container: {\n *     justifyContent: 'center',\n *     alignItems: 'center',\n *     width: '100%',\n *     height: 300,\n *   },\n *   absolute: {\n *     position: 'absolute',\n *     top: 0,\n *     left: 0,\n *     bottom: 0,\n *     right: 0,\n *   },\n * });\n * ```\n *\n * @see [iOS Vibrancy Effect Documentation](https://developer.apple.com/documentation/uikit/uivibrancyeffect)\n * @see [Zeddios Blog Explanation](https://zeddios.tistory.com/1140)\n */\nexport function BlurView({\n  blurType,\n  blurAmount = 10,\n  reducedTransparencyFallbackColor,\n  vibrancyEffect = false,\n  ...viewProps\n}: BlurViewProps) {\n  if (!isBlurNativeModuleSupported || ReactNativeBlurModule == null) {\n    return <View {...viewProps} />;\n  }\n\n  const Component = vibrancyEffect ? ReactNativeBlurModule.VibrancyView : ReactNativeBlurModule.BlurView;\n\n  return (\n    <Component\n      blurAmount={blurAmount}\n      blurType={blurType}\n      reducedTransparencyFallbackColor={reducedTransparencyFallbackColor}\n      {...viewProps}\n    />\n  );\n}\n\nBlurView.isSupported = isBlurNativeModuleSupported;\n"
  },
  {
    "path": "packages/blur-view/src/ReactNativeBlurModule.ts",
    "content": "import type { BlurView, VibrancyView } from '@granite-js/native/@react-native-community/blur';\nimport { isBlurNativeModuleSupported } from './constants';\n\nconst ReactNativeBlurModule = (() => {\n  if (!isBlurNativeModuleSupported) {\n    return undefined;\n  }\n\n  try {\n    return require('@granite-js/native/@react-native-community/blur') as {\n      BlurView: typeof BlurView;\n      VibrancyView: typeof VibrancyView;\n    };\n  } catch {\n    return undefined;\n  }\n})();\n\nexport { ReactNativeBlurModule };\n"
  },
  {
    "path": "packages/blur-view/src/constants.ts",
    "content": "import { Platform } from 'react-native';\n\nexport const isBlurNativeModuleSupported = Platform.OS === 'ios';\n"
  },
  {
    "path": "packages/blur-view/src/index.ts",
    "content": "export * from './BlurView';\n"
  },
  {
    "path": "packages/blur-view/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"declarationDir\": \"dist/typescript\",\n    \"emitDeclarationOnly\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/blur-view/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/brownfield-module/CHANGELOG.md",
    "content": "# @granite-js/brownfield-module\n\n## 1.0.23\n\n### Patch Changes\n\n- d4d3993: feat(brownfield): sep brownfield module\n"
  },
  {
    "path": "packages/brownfield-module/GraniteBrownfield.podspec",
    "content": "require \"json\"\n\npackage = JSON.parse(File.read(File.join(__dir__, \"package.json\")))\n\nPod::Spec.new do |s|\n  s.name         = \"GraniteBrownfield\"\n  s.version      = package[\"version\"]\n  s.summary      = package[\"description\"]\n  s.homepage     = package[\"homepage\"]\n  s.license      = package[\"license\"]\n  s.authors      = package[\"author\"]\n\n  s.platforms    = { :ios => '13.0' }\n  s.source       = { :path => \".\" }\n\n  s.source_files  = \"ios/**/*.{h,m,mm,swift}\"\n  s.swift_version = \"5.0\"\n\n  s.dependency \"BrickModule\"\n  s.dependency \"React-Core\"\nend\n"
  },
  {
    "path": "packages/brownfield-module/android/src/main/kotlin/run/granite/brownfield/typegen/GraniteBrownfieldModuleSpec.kt",
    "content": "// This file is automatically generated by brick-codegen\n// Do not edit manually - regenerate using: brick-codegen\n\npackage run.granite.brownfield\n\nimport com.brickmodule.BrickModuleBase\n\n/**\n * Generated interface for GraniteBrownfieldModule module\n * Implement this interface to create a type-safe GraniteBrownfieldModule module\n */\ninterface GraniteBrownfieldModuleSpec : BrickModuleBase {\n    companion object {\n        const val MODULE_NAME = \"GraniteBrownfieldModule\"\n    }\n\n\n    // MARK: - Module Constants\n\n    val schemeUri: String\n\n\n    // MARK: - Module Methods\n\n    suspend fun closeView(): Unit\n\n\n    // Override getConstants to provide module constants\n    override fun getConstants(): Map<String, Any> = mapOf(\n        \"schemeUri\" to schemeUri\n    )\n}\n\n\n// Typed Event Emit Helpers for GraniteBrownfieldModule\n/**\n * Emit visibilityChanged event to JavaScript\n * @param payload Event payload data\n */\nfun GraniteBrownfieldModuleSpec.emitOnVisibilityChanged(payload: Map<String, Any>) {\n    if (this is com.brickmodule.BrickModuleSpec) {\n        this.emitEvent(\"onVisibilityChanged\", payload)\n    }\n}\n"
  },
  {
    "path": "packages/brownfield-module/android/src/main/kotlin/run/granite/brownfield/typegen/GraniteBrownfieldModuleTypes.kt",
    "content": "// This file is automatically generated by brick-codegen\n// Do not edit manually - regenerate using: brick-codegen\n\npackage run.granite.brownfield\n\nimport com.google.gson.annotations.SerializedName\n\n/**\n * GraniteBrownfieldModule module types for Brick framework\n * Provides type-safe data classes with automatic serialization\n */\n\n\n"
  },
  {
    "path": "packages/brownfield-module/ios/typegen/GraniteBrownfieldModuleSpec.swift",
    "content": "// This file is automatically generated by brick-codegen\n// Do not edit manually - regenerate using: brick-codegen\n\nimport Foundation\nimport BrickModule\n\n/**\n * Generated protocol for GraniteBrownfieldModule module\n * Implement this protocol to create a type-safe GraniteBrownfieldModule module\n */\npublic protocol GraniteBrownfieldModuleSpec {\n    // MARK: - Module Constants\n    \n    /// schemeUri constant\n    var schemeUri: String { get }\n\n\n    // MARK: - Module Methods\n\n    /// closeView method\n    func closeView() async throws\n}\n\n// Typed Event Emit Helpers for GraniteBrownfieldModule\nextension GraniteBrownfieldModuleSpec where Self: BrickModuleBase {\n    public func emitOnVisibilityChanged(payload: [String: Any]) {\n        emit(\"onVisibilityChanged\", payload: payload)\n    }\n}\n"
  },
  {
    "path": "packages/brownfield-module/ios/typegen/GraniteBrownfieldModuleTypes.swift",
    "content": "// This file is automatically generated by brick-codegen\n// Do not edit manually - regenerate using: brick-codegen\n\nimport Foundation\n/// GraniteBrownfieldModule module types for Brick framework\n\n\n"
  },
  {
    "path": "packages/brownfield-module/package.json",
    "content": "{\n  \"name\": \"@granite-js/brownfield-module\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Brownfield bridge module for Granite React Native\",\n  \"main\": \"./dist/module/index.js\",\n  \"types\": \"./dist/typescript/index.d.ts\",\n  \"react-native\": \"./src/index.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/typescript/index.d.ts\",\n      \"react-native\": \"./src/index.ts\",\n      \"default\": \"./dist/module/index.js\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\",\n    \"ios\",\n    \"android\",\n    \"package.json\",\n    \"*.podspec\",\n    \"!ios/build\",\n    \"!android/build\",\n    \"!android/gradle\",\n    \"!android/gradlew\",\n    \"!android/gradlew.bat\",\n    \"!android/local.properties\",\n    \"!**/__tests__\",\n    \"!**/__fixtures__\",\n    \"!**/__mocks__\",\n    \"!**/.*\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"eslint .\",\n    \"build\": \"brick-codegen && bob build && tsc --project tsconfig.build.json\"\n  },\n  \"keywords\": [\n    \"react-native\",\n    \"brick\",\n    \"brick-module\",\n    \"brownfield\",\n    \"native-module\"\n  ],\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Toss <opensource@toss.im>\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/brownfield-module\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/toss/granite/issues\"\n  },\n  \"homepage\": \"https://github.com/toss/granite#readme\",\n  \"brickModule\": {\n    \"specSrc\": \"./src/spec\",\n    \"ios\": {\n      \"moduleName\": \"GraniteBrownfield\",\n      \"className\": \"GraniteBrownfieldModule\"\n    },\n    \"android\": {\n      \"package\": \"run.granite.brownfield\",\n      \"projectName\": \"brownfield\",\n      \"moduleName\": \"GraniteBrownfieldModule\"\n    }\n  },\n  \"peerDependencies\": {\n    \"brick-module\": \"*\",\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"devDependencies\": {\n    \"brick-module\": \"catalog:brick-module\",\n    \"eslint\": \"^9.7.0\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"react-native-builder-bob\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\"\n  },\n  \"sideEffects\": false,\n  \"react-native-builder-bob\": {\n    \"source\": \"src\",\n    \"output\": \"dist\",\n    \"targets\": [\n      [\n        \"module\",\n        {\n          \"esm\": true\n        }\n      ]\n    ]\n  }\n}\n"
  },
  {
    "path": "packages/brownfield-module/src/index.ts",
    "content": "export { GraniteBrownfieldModule } from './spec/GraniteBrownfieldModule.brick';\nexport type { GraniteBrownfieldModuleSpec } from './spec/GraniteBrownfieldModule.brick';\n"
  },
  {
    "path": "packages/brownfield-module/src/spec/GraniteBrownfieldModule.brick.ts",
    "content": "import { BrickModule, type BrickModuleSpec } from 'brick-module';\nimport type { CodegenTypes } from 'react-native';\n\nexport interface GraniteBrownfieldModuleSpec extends BrickModuleSpec {\n  readonly moduleName: 'GraniteBrownfieldModule';\n  readonly onVisibilityChanged: CodegenTypes.EventEmitter<{ visible: boolean }>;\n\n  getConstants(): {\n    schemeUri: string;\n  };\n\n  closeView(): Promise<void>;\n}\n\nexport const GraniteBrownfieldModule = BrickModule.get<GraniteBrownfieldModuleSpec>('GraniteBrownfieldModule');\n"
  },
  {
    "path": "packages/brownfield-module/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"declarationDir\": \"dist/typescript\",\n    \"emitDeclarationOnly\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/brownfield-module/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/cli/.ts-prunerc.json",
    "content": "{\n  \"error\": true,\n  \"ignore\": \"(^src/index.ts|^src/vendors|^src/testing)\"\n}\n"
  },
  {
    "path": "packages/cli/CHANGELOG.md",
    "content": "# @granite-js/cli\n\n## 1.0.23\n\n### Patch Changes\n\n- Updated dependencies [63217da]\n  - @granite-js/mpack@1.0.23\n  - @granite-js/plugin-core@1.0.23\n  - @granite-js/utils@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.22\n- @granite-js/plugin-core@1.0.22\n- @granite-js/utils@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.21\n- @granite-js/plugin-core@1.0.21\n- @granite-js/utils@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.20\n- @granite-js/plugin-core@1.0.20\n- @granite-js/utils@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.19\n- @granite-js/plugin-core@1.0.19\n- @granite-js/utils@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.18\n- @granite-js/plugin-core@1.0.18\n- @granite-js/utils@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.17\n- @granite-js/plugin-core@1.0.17\n- @granite-js/utils@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.16\n- @granite-js/plugin-core@1.0.16\n- @granite-js/utils@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.15\n- @granite-js/plugin-core@1.0.15\n- @granite-js/utils@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.14\n- @granite-js/plugin-core@1.0.14\n- @granite-js/utils@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.13\n- @granite-js/plugin-core@1.0.13\n- @granite-js/utils@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.12\n- @granite-js/plugin-core@1.0.12\n- @granite-js/utils@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.11\n- @granite-js/plugin-core@1.0.11\n- @granite-js/utils@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.10\n- @granite-js/plugin-core@1.0.10\n- @granite-js/utils@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.9\n- @granite-js/plugin-core@1.0.9\n- @granite-js/utils@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.8\n- @granite-js/plugin-core@1.0.8\n- @granite-js/utils@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.7\n- @granite-js/plugin-core@1.0.7\n- @granite-js/utils@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.6\n- @granite-js/plugin-core@1.0.6\n- @granite-js/utils@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.5\n- @granite-js/plugin-core@1.0.5\n- @granite-js/utils@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.4\n- @granite-js/plugin-core@1.0.4\n- @granite-js/utils@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/mpack@1.0.3\n  - @granite-js/plugin-core@1.0.3\n  - @granite-js/utils@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [d4beb3b]\n- Updated dependencies [b325495]\n  - @granite-js/plugin-core@1.0.2\n  - @granite-js/mpack@1.0.2\n  - @granite-js/utils@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- @granite-js/mpack@1.0.1\n- @granite-js/plugin-core@1.0.1\n- @granite-js/utils@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/plugin-core@1.0.0\n  - @granite-js/mpack@1.0.0\n  - @granite-js/utils@1.0.0\n"
  },
  {
    "path": "packages/cli/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/cli/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/cli\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@babel/core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n2. **@babel/preset-env**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n3. **@babel/preset-typescript**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n4. **@inquirer/prompts**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/SBoudrias/Inquirer.js.git\n\t\n5. **@shopify/semaphore**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/Shopify/quilt.git\n\t\n6. **@types/babel__core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n7. **@types/babel__preset-env**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n8. **@types/connect**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n9. **@types/debug**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n10. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n11. **@types/serve-static**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n12. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n13. **chalk**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/chalk/chalk.git\n\t\n14. **clipanion**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/arcanis/clipanion\n\t\n15. **connect**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/senchalabs/connect.git\n\t\n16. **debug**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/debug-js/debug.git\n\t\n17. **enquirer**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/enquirer/enquirer.git\n\t\n18. **es-toolkit**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/toss/es-toolkit.git\n\t\n19. **esbuild**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/evanw/esbuild.git\n\t\n20. **eslint**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/eslint/eslint.git\n\t\n21. **execa**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/sindresorhus/execa.git\n\t\n22. **ora**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/sindresorhus/ora.git\n\t\n23. **ts-prune**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:nadeesha/ts-prune.git\n\t\n24. **tsup**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/egoist/tsup.git\n\t\n25. **typanion**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/arcanis/typanion\n\t\n26. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n27. **zod**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/colinhacks/zod.git\n\t\n28. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/cli/README.md",
    "content": "# @granite-js/cli\n\nThe Granite CLI\n\n## Development\n\n```bash\nyarn build\nyarn run bin\n```\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/cli/babel.config.js",
    "content": "module.exports = {\n  presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],\n};\n"
  },
  {
    "path": "packages/cli/cli.code-workspace",
    "content": "{\n  \"folders\": [\n    {\n      \"path\": \".\",\n    },\n  ],\n  \"settings\": {\n    \"eslint.nodePath\": \"../../.yarn/sdks\",\n    \"typescript.enablePromptUseWorkspaceTsdk\": true,\n    \"typescript.tsdk\": \"../../.yarn/sdks/typescript/lib\",\n    \"prettier.prettierPath\": \"../../.yarn/sdks/prettier/index.cjs\",\n    \"prettier.configPath\": \"../../.prettierrc\",\n    \"jest.enable\": true,\n    \"jest.rootPath\": \".\",\n    \"jest.jestCommandLine\": \"yarn jest\",\n  },\n}\n"
  },
  {
    "path": "packages/cli/package.json",
    "content": "{\n  \"name\": \"@granite-js/cli\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"description\": \"The Granite CLI\",\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/cli\"\n  },\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"scripts\": {\n    \"bin\": \"node scripts/run.js\",\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"eslint .\",\n    \"find-deadcode\": \"ts-prune\",\n    \"build\": \"tsup\"\n  },\n  \"files\": [\n    \"dist\",\n    \"package.json\"\n  ],\n  \"devDependencies\": {\n    \"@babel/core\": \"7.28.5\",\n    \"@babel/preset-env\": \"7.28.5\",\n    \"@babel/preset-typescript\": \"7.28.5\",\n    \"@types/babel__core\": \"^7\",\n    \"@types/babel__preset-env\": \"^7\",\n    \"@types/connect\": \"^3\",\n    \"@types/debug\": \"^4\",\n    \"@types/node\": \"catalog:tools\",\n    \"@types/serve-static\": \"^1\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"esbuild\": \"0.25.8\",\n    \"eslint\": \"^9.7.0\",\n    \"ts-prune\": \"^0.10.3\",\n    \"tsup\": \"^8.5.0\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\"\n  },\n  \"dependencies\": {\n    \"@granite-js/mpack\": \"workspace:*\",\n    \"@granite-js/plugin-core\": \"workspace:*\",\n    \"@granite-js/utils\": \"workspace:*\",\n    \"@inquirer/prompts\": \"^7.2.3\",\n    \"@shopify/semaphore\": \"^3.1.0\",\n    \"chalk\": \"^4\",\n    \"clipanion\": \"^4.0.0-rc.4\",\n    \"connect\": \"^3.7.0\",\n    \"debug\": \"^4.3.7\",\n    \"enquirer\": \"^2.4.1\",\n    \"es-toolkit\": \"^1.39.8\",\n    \"execa\": \"^5\",\n    \"ora\": \"^5\",\n    \"typanion\": \"^3.14.0\",\n    \"zod\": \"3.24.4\"\n  }\n}\n"
  },
  {
    "path": "packages/cli/scripts/run.js",
    "content": "require('../dist').initialize().catch(console.error);\n"
  },
  {
    "path": "packages/cli/src/commands/BuildCommand/BuildCommand.ts",
    "content": "import { BuildUtils } from '@granite-js/mpack';\nimport { statusPlugin } from '@granite-js/mpack/plugins';\nimport { loadConfig } from '@granite-js/plugin-core';\nimport { Command, Option } from 'clipanion';\nimport { ExitCode } from '../../constants';\nimport { errorHandler } from '../../utils/command';\n\nexport class BuildCommand extends Command {\n  static paths = [[`build`]];\n\n  static usage = Command.Usage({\n    category: 'Build',\n    description: 'Build Granite App',\n    examples: [['Build Granite App', 'granite build']],\n  });\n\n  configFile = Option.String('--config', {\n    description: 'Path to config file',\n  });\n\n  dev = Option.Boolean('--dev', {\n    description: 'Build in development mode',\n  });\n\n  metafile = Option.Boolean('--metafile', {\n    description: 'Generate metafile',\n  });\n\n  cache = Option.Boolean('--cache', {\n    description: 'Enable cache',\n  });\n\n  async execute() {\n    try {\n      const { configFile, cache = true, metafile = false, dev = false } = this;\n      const config = await loadConfig({ configFile });\n      const options = (['android', 'ios'] as const).map((platform) => ({\n        dev,\n        cache,\n        metafile,\n        platform,\n        outfile: `bundle.${platform}.js`,\n      }));\n\n      await BuildUtils.buildAll(options, { config, plugins: [statusPlugin] });\n\n      return ExitCode.SUCCESS;\n    } catch (error: unknown) {\n      return errorHandler(error);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/cli/src/commands/BuildCommand/index.ts",
    "content": "export * from './BuildCommand';\n"
  },
  {
    "path": "packages/cli/src/commands/DevCommand/DevCommand.ts",
    "content": "import { runServer, EXPERIMENTAL__server } from '@granite-js/mpack';\nimport { loadConfig } from '@granite-js/plugin-core';\nimport { Command, Option } from 'clipanion';\nimport Debug from 'debug';\nimport { ExitCode } from '../../constants';\nimport { errorHandler } from '../../utils/command';\n\nconst debug = Debug('cli');\n\nexport class DevCommand extends Command {\n  static paths = [[`dev`]];\n\n  static usage = Command.Usage({\n    category: 'Development',\n    description: 'Run Granite development server',\n    examples: [['Run Granite development server', 'granite dev']],\n  });\n\n  configFile = Option.String('--config', {\n    description: 'Path to config file',\n  });\n\n  host = Option.String('--host');\n  port = Option.String('--port');\n\n  disableEmbeddedReactDevTools = Option.Boolean('--disable-embedded-react-devtools', false);\n\n  // mpack dev-server\n  experimentalMode = Option.Boolean('--experimental-mode');\n\n  async execute() {\n    try {\n      process.env.MPACK_DEV_SERVER = 'true';\n\n      const config = await loadConfig({ configFile: this.configFile });\n      const serverOptions = {\n        host: this.host,\n        port: this.port ? parseInt(this.port, 10) : undefined,\n      };\n\n      debug('StartCommand', {\n        ...serverOptions,\n        disableEmbeddedReactDevTools: this.disableEmbeddedReactDevTools,\n        experimentalMode: this.experimentalMode,\n      });\n\n      if (this.experimentalMode) {\n        /**\n         * @TODO Invoke pre and post handlers of devServer plugin hooks in experimental mode\n         */\n        await EXPERIMENTAL__server({ config, ...serverOptions });\n      } else {\n        await runServer({\n          config,\n          ...serverOptions,\n        });\n      }\n\n      return ExitCode.SUCCESS;\n    } catch (error: unknown) {\n      return errorHandler(error);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/cli/src/commands/DevCommand/index.ts",
    "content": "export * from './DevCommand';\n"
  },
  {
    "path": "packages/cli/src/commands/HermesCommand/HermesCommand.ts",
    "content": "import path from 'path';\nimport chalk from 'chalk';\nimport { Command, Option } from 'clipanion';\nimport { ExitCode } from '../../constants';\nimport { errorHandler } from '../../utils/command';\nimport { compileHbc } from '../../utils/compileHbc';\n\nexport class HermesCommand extends Command {\n  static paths = [[`hermes`]];\n\n  static usage = Command.Usage({\n    category: 'Hermes',\n    description: '지정한 번들을 Hermes 바이트 코드로 컴파일 합니다',\n    examples: [['컴파일하기', 'granite hermes --jsbundle dist/bundle.js']],\n  });\n\n  jsBundleFile = Option.String('--jsbundle', {\n    required: true,\n    description: 'Hermes 바이트 코드로 컴파일 할 Javascript 파일 경로 입니다',\n  });\n\n  sourcemap = Option.Boolean('--sourcemap', true, {\n    description: '소스맵 파일을 생성합니다',\n  });\n\n  async execute() {\n    try {\n      const rootDir = process.cwd();\n      const filePath = path.resolve(rootDir, this.jsBundleFile);\n\n      const { outfile, sourcemapOutfile } = await compileHbc({ rootDir, filePath, sourcemap: this.sourcemap });\n\n      console.log(`✅ Compiled successfully: ${chalk.gray(outfile)}`);\n\n      if (sourcemapOutfile) {\n        console.log(`✅ Source map generated successfully: ${chalk.gray(sourcemapOutfile)}`);\n      }\n\n      return ExitCode.SUCCESS;\n    } catch (error: unknown) {\n      return errorHandler(error);\n    }\n  }\n}\n"
  },
  {
    "path": "packages/cli/src/commands/HermesCommand/index.ts",
    "content": "export * from './HermesCommand';\n"
  },
  {
    "path": "packages/cli/src/commands/index.ts",
    "content": "export * from './BuildCommand';\nexport * from './HermesCommand';\nexport * from './DevCommand';\n"
  },
  {
    "path": "packages/cli/src/constants.ts",
    "content": "export enum ExitCode {\n  SUCCESS = 0,\n  ERROR = 1,\n}\n"
  },
  {
    "path": "packages/cli/src/errors.ts",
    "content": "export enum ErrorCode {\n  CANNOT_USE_FILE_NAME,\n  DIRECTORY_IS_NOT_EMPTY,\n  USER_CANCELED,\n  WORKSPACE_REQUIRED,\n  INVALID_CWD_PATH,\n}\n\nexport const ERROR_MESSAGES = {\n  [ErrorCode.CANNOT_USE_FILE_NAME]: '파일 경로는 사용할 수 없어요.',\n  [ErrorCode.DIRECTORY_IS_NOT_EMPTY]: '비어 있지 않은 디렉터리예요.',\n  [ErrorCode.USER_CANCELED]: '작업이 취소되었어요',\n  [ErrorCode.WORKSPACE_REQUIRED]: [\n    '이미 package.json 파일이 존재하지만, 유효한 워크스페이스 환경이 아니예요.',\n    '올바른 워크스페이스 경로에서 다시 시도하거나 워크스페이스 환경이 아닌 곳에서 시도해주세요.',\n  ].join('\\n'),\n  [ErrorCode.INVALID_CWD_PATH]: '유효하지 않은 작업 디렉터리예요.',\n} as const;\n\nexport const FALLBACK_MESSAGE = '예기치 못한 에러가 발생했어요';\n"
  },
  {
    "path": "packages/cli/src/index.ts",
    "content": "import { Builtins, Cli } from 'clipanion';\nimport { BuildCommand, HermesCommand, DevCommand } from './commands';\n\nconst cli = new Cli({\n  binaryLabel: 'granite',\n  binaryName: 'granite',\n  enableCapture: true,\n});\n\nexport async function initialize() {\n  cli.register(BuildCommand);\n  cli.register(HermesCommand);\n  cli.register(DevCommand);\n  cli.register(Builtins.HelpCommand);\n\n  cli.runExit(process.argv.slice(2));\n}\n"
  },
  {
    "path": "packages/cli/src/utils/command.ts",
    "content": "import chalk from 'chalk';\nimport { ExitCode } from '../constants';\n\nexport function errorHandler(error: unknown) {\n  const label = chalk.red('Error');\n\n  if (error instanceof Error) {\n    console.error(label, error.message);\n  } else {\n    console.error(label, 'Unknown error', (error ?? '')?.toString());\n  }\n\n  return ExitCode.ERROR;\n}\n"
  },
  {
    "path": "packages/cli/src/utils/compileHbc.ts",
    "content": "import assert from 'assert';\nimport os from 'os';\nimport path from 'path';\nimport { isNotNil } from 'es-toolkit';\nimport execa from 'execa';\n\ninterface CompileHbcOptions {\n  rootDir: string;\n  filePath: string;\n  sourcemap?: boolean;\n}\n\nconst binary = {\n  Darwin: 'react-native/sdks/hermesc/osx-bin/hermesc',\n  Linux: 'react-native/sdks/hermesc/linux64-bin/hermesc',\n  Windows_NT: 'react-native/sdks/hermesc/win64-bin/hermesc.exe',\n} as const;\n\nexport async function compileHbc({ rootDir, filePath, sourcemap }: CompileHbcOptions) {\n  const binary = getHermesc(rootDir);\n  const outfile = path.resolve(rootDir, filePath.replace(new RegExp(`${path.extname(filePath)}$`), '.hbc'));\n\n  await execa(\n    binary,\n    [\n      // Disable warnings\n      '-w',\n      // Expensive optimizations\n      '-O',\n      // Emit binary\n      '-emit-binary',\n      // Emit source map\n      sourcemap ? '-output-source-map' : null,\n      // Output path\n      '-out',\n      outfile,\n      filePath,\n    ].filter(isNotNil)\n  );\n\n  return { outfile, sourcemapOutfile: sourcemap ? `${outfile}.map` : null };\n}\n\nfunction getHermesc(rootDir: string) {\n  const os = getOs();\n  const binarySource = binary[os];\n\n  assert(binarySource, `지원하지 않는 OS 입니다: ${os}`);\n\n  return resolveFromRoot(rootDir, binarySource);\n}\n\nfunction getOs() {\n  return os.type() as 'Darwin' | 'Linux' | 'Windows_NT';\n}\n\nfunction resolveFromRoot(rootDir: string, request: string) {\n  return require.resolve(request, { paths: [rootDir] });\n}\n"
  },
  {
    "path": "packages/cli/src/utils/compressToGzip.ts",
    "content": "import fs from 'fs';\nimport path from 'path';\nimport stream from 'stream';\nimport util from 'util';\nimport zlib from 'zlib';\n\ninterface CompressToGzipOptions {\n  rootDir: string;\n  filePath: string;\n}\n\nconst pipelinePromisify = util.promisify(stream.pipeline);\n\nexport async function compressToGzip(options: CompressToGzipOptions) {\n  const { rootDir, filePath } = options;\n  const inputPath = path.resolve(rootDir, filePath);\n  const outfile = `${inputPath}.gz`;\n\n  await pipelinePromisify(fs.createReadStream(inputPath), zlib.createGzip({ level: 9 }), fs.createWriteStream(outfile));\n\n  return { outfile };\n}\n"
  },
  {
    "path": "packages/cli/src/utils/isExist.ts",
    "content": "import fs from 'fs/promises';\n\nexport function isExist(path: string) {\n  return fs\n    .access(path)\n    .then(() => true)\n    .catch((error) => {\n      if (error.code === 'ENOENT') {\n        return false;\n      }\n\n      throw error;\n    });\n}\n"
  },
  {
    "path": "packages/cli/src/utils/parseError.ts",
    "content": "import { ErrorCode, ERROR_MESSAGES, FALLBACK_MESSAGE } from '../errors';\n\nexport function parseError(error: unknown) {\n  if (error instanceof Error) {\n    return parseInquirerError(error) ?? parseExecaError(error) ?? `${FALLBACK_MESSAGE}\\n\\n${error.message}`;\n  }\n\n  return getErrorMessageByCode(error as ErrorCode);\n}\n\n/**\n * @see source {@link https://github.com/SBoudrias/Inquirer.js/blob/inquirer%4010.2.2/packages/core/src/lib/errors.mts}\n */\nfunction parseInquirerError(error: Error) {\n  switch (error.name) {\n    case 'ExitPromptError':\n      return getErrorMessageByCode(ErrorCode.USER_CANCELED);\n\n    case 'AbortPromptError':\n    case 'CancelPromptError':\n    case 'ValidationError':\n    case 'HookError':\n      return error.message;\n\n    default:\n      return;\n  }\n}\n\nfunction parseExecaError(error: Error) {\n  if ('stderr' in error && error.stderr) {\n    return `커맨드 실행 중 에러가 발생했어요\\n${error.stderr}`;\n  }\n\n  return;\n}\n\nfunction getErrorMessageByCode(code: ErrorCode) {\n  return ERROR_MESSAGES[code as ErrorCode] ?? FALLBACK_MESSAGE;\n}\n"
  },
  {
    "path": "packages/cli/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"emitDeclarationOnly\": true,\n    \"rootDir\": \"./src\",\n    \"outDir\": \"./dist\"\n  },\n  \"exclude\": [\"**/dist/*\", \"**/esm/*\", \"**/*.test.*\", \"**/*.spec.*\", \"**/*.e2e.*\", \"**/__fixtures__/*\"],\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/cli/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/cli/tsup.config.ts",
    "content": "import { defineConfig } from 'tsup';\n\nexport default defineConfig({\n  entry: ['src/index.ts'],\n  format: ['esm', 'cjs'],\n  dts: true,\n  shims: true,\n  banner: ({ format }) => {\n    if (format === 'esm') {\n      return {\n        js: `import { createRequire } from 'module'; const require = createRequire(import.meta.url);`,\n      };\n    }\n    return undefined;\n  },\n});\n"
  },
  {
    "path": "packages/cookies/.gitignore",
    "content": "# Dependencies\nnode_modules/\n\n# Build outputs\ndist/\n\n# IDE\n.idea/\n*.xcworkspace\n*.xcuserdata\n\n# OS files\n.DS_Store\n\n# Debug\n*.log\n"
  },
  {
    "path": "packages/cookies/CHANGELOG.md",
    "content": "# @granite-js/cookies\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n## 1.0.18\n\n## 1.0.17\n\n## 1.0.16\n\n## 1.0.15\n\n## 1.0.14\n\n## 1.0.13\n\n## 1.0.12\n\n## 1.0.11\n\n## 1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- c65bf00: fix: upgrade granite cookies compile sdk to 34\n\n## 1.0.8\n\n## 1.0.7\n\n## 1.0.6\n\n## 1.0.5\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n### Patch Changes\n\n- ee26531: fix: align exports map\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "packages/cookies/GraniteCookies.podspec",
    "content": "require \"json\"\n\npackage = JSON.parse(File.read(File.join(__dir__, \"package.json\")))\n\nPod::Spec.new do |s|\n  s.name         = \"GraniteCookies\"\n  s.version      = package[\"version\"]\n  s.summary      = package[\"description\"]\n  s.homepage     = package[\"homepage\"]\n  s.license      = package[\"license\"]\n  s.authors      = package[\"author\"]\n\n  s.platforms    = { :ios => '13.0' }\n  s.source       = { :path => \"ios\" }\n\n  s.source_files  = \"ios/**/*.{h,m,mm,swift}\"\n  s.swift_version = \"5.0\"\n\n  s.dependency \"BrickModule\"\n  s.dependency \"React-Core\"\nend\n"
  },
  {
    "path": "packages/cookies/LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to the Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n"
  },
  {
    "path": "packages/cookies/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/cookies\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@granite-js/cookies**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/toss/brick.git\n\t\n2. **brick-module**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/toss/brick.git\n\t\n3. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n4. **react-native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/react-native.git\n\t\n5. **tsdown**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/rolldown/tsdown.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/cookies/android/build.gradle",
    "content": "apply plugin: 'com.android.library'\napply plugin: 'kotlin-android'\n\nandroid {\n    namespace \"run.granite.cookies\"\n    compileSdkVersion 34\n\n    sourceSets {\n        main {\n            manifest.srcFile 'src/main/AndroidManifest.xml'\n        }\n    }\n\n    defaultConfig {\n        minSdkVersion 21\n        targetSdkVersion 34\n        versionCode 1\n        versionName \"1.0\"\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_17\n        targetCompatibility JavaVersion.VERSION_17\n    }\n\n    kotlinOptions {\n        jvmTarget = '17'\n    }\n}\n\ndependencies {\n    implementation \"org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22\"\n    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'\n    implementation 'com.google.code.gson:gson:2.8.9'\n    implementation 'androidx.annotation:annotation:1.5.0'\n    implementation project(':brick-module')\n    api 'com.facebook.react:react-native:+'\n}"
  },
  {
    "path": "packages/cookies/android/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"run.granite.cookies\">\n</manifest>"
  },
  {
    "path": "packages/cookies/android/src/main/kotlin/run/granite/cookies/CookiesModule.kt",
    "content": "/**\n * Cookies module implementation for Android Implements the CookiesSpec interface generated by\n * brick-codegen\n *\n * Uses Android's CookieManager for cookie management\n */\npackage run.granite.cookies\n\nimport android.os.Build\nimport android.webkit.CookieManager\nimport android.webkit.CookieSyncManager\nimport android.webkit.ValueCallback\nimport com.brickmodule.*\nimport com.facebook.react.bridge.ReactContext\nimport com.facebook.react.bridge.WritableMap\nimport com.facebook.react.bridge.WritableNativeMap\nimport java.net.HttpCookie\nimport java.net.URI\nimport java.text.SimpleDateFormat\nimport java.util.*\nimport kotlin.coroutines.resume\nimport kotlinx.coroutines.suspendCancellableCoroutine\n\nclass CookiesModule(reactContext: ReactContext) : BrickModuleSpec(reactContext), CookiesSpec {\n\n    override val moduleName: String = \"Cookies\"\n\n    private val cookieManager: CookieManager by lazy {\n        CookieManager.getInstance().apply { setAcceptCookie(true) }\n    }\n\n    override suspend fun set(url: String, cookie: Cookie, useWebKit: Boolean): Boolean {\n        val uri = validateUrl(url)\n        validateCookieDomain(uri, cookie.domain)\n        val cookieString = buildCookieString(cookie)\n\n        return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n            suspendCancellableCoroutine { continuation ->\n                cookieManager.setCookie(\n                        url,\n                        cookieString,\n                        ValueCallback { success -> continuation.resume(success ?: false) }\n                )\n            }\n        } else {\n            @Suppress(\"DEPRECATION\") cookieManager.setCookie(url, cookieString)\n            syncCookiesLegacy()\n            true\n        }\n    }\n\n    override suspend fun get(url: String, useWebKit: Boolean): WritableMap {\n        val cookieString = cookieManager.getCookie(url) ?: return WritableNativeMap()\n        return parseCookieString(cookieString, url)\n    }\n\n    override suspend fun getAll(useWebKit: Boolean): WritableMap {\n        // Android's CookieManager doesn't provide a way to get all cookies\n        // This is a platform limitation - return empty map\n        return WritableNativeMap()\n    }\n\n    override suspend fun clearAll(useWebKit: Boolean): Boolean {\n        return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n            suspendCancellableCoroutine { continuation ->\n                cookieManager.removeAllCookies(\n                        ValueCallback { success -> continuation.resume(success ?: false) }\n                )\n            }\n        } else {\n            @Suppress(\"DEPRECATION\") cookieManager.removeAllCookie()\n            syncCookiesLegacy()\n            true\n        }\n    }\n\n    override suspend fun clearByName(url: String, name: String, useWebKit: Boolean): Boolean {\n        // Android doesn't provide a direct way to delete individual cookies\n        // We need to set an expired cookie with the same name\n        val expiredCookie =\n                Cookie(\n                        name = name,\n                        value = \"\",\n                        path = \"/\",\n                        domain = null,\n                        version = null,\n                        expires = \"Thu, 01 Jan 1970 00:00:00 GMT\",\n                        secure = null,\n                        httpOnly = null\n                )\n\n        return set(url, expiredCookie, useWebKit)\n    }\n\n    override suspend fun setFromResponse(url: String, cookie: String): Boolean {\n        return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n            suspendCancellableCoroutine { continuation ->\n                cookieManager.setCookie(\n                        url,\n                        cookie,\n                        ValueCallback { success -> continuation.resume(success ?: false) }\n                )\n            }\n        } else {\n            @Suppress(\"DEPRECATION\") cookieManager.setCookie(url, cookie)\n            syncCookiesLegacy()\n            true\n        }\n    }\n\n    override suspend fun getFromResponse(url: String): WritableMap {\n        return get(url, false)\n    }\n\n    // MARK: - Flush\n\n    override suspend fun flush(): Boolean {\n        return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n            cookieManager.flush()\n            true\n        } else {\n            syncCookiesLegacy()\n            true\n        }\n    }\n\n    // MARK: - Remove Session Cookies\n\n    override suspend fun removeSessionCookies(): Boolean {\n        return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n            suspendCancellableCoroutine { continuation ->\n                cookieManager.removeSessionCookies(\n                        ValueCallback { success -> continuation.resume(success ?: false) }\n                )\n            }\n        } else {\n            @Suppress(\"DEPRECATION\") cookieManager.removeSessionCookie()\n            syncCookiesLegacy()\n            true\n        }\n    }\n\n    private fun buildCookieString(cookie: Cookie): String {\n        val builder = StringBuilder()\n        builder.append(\"${cookie.name}=${cookie.value}\")\n\n        cookie.path?.let { builder.append(\"; path=$it\") }\n        cookie.domain?.let { domain ->\n            // Strip leading dot as Android handles subdomains by default\n            val cleanDomain = domain.trimStart('.')\n            builder.append(\"; domain=$cleanDomain\")\n        }\n        cookie.expires?.let { expires ->\n            parseExpiresDate(expires)?.let { date ->\n                builder.append(\"; expires=${formatDateRfc1123(date)}\")\n            }\n        }\n        cookie.secure?.let { if (it) builder.append(\"; secure\") }\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n            cookie.httpOnly?.let { if (it) builder.append(\"; httponly\") }\n        }\n\n        return builder.toString()\n    }\n\n    private fun parseCookieString(cookieString: String, url: String): WritableMap {\n        val result = WritableNativeMap()\n\n        // Cookie string format: \"name1=value1; name2=value2\"\n        cookieString.split(\";\").forEach { singleCookie ->\n            val cookies = HttpCookie.parse(singleCookie.trim())\n            for (cookie in cookies) {\n                if (!cookie.name.isNullOrEmpty() && !cookie.value.isNullOrEmpty()) {\n                    val cookieMap = createCookieData(cookie)\n                    result.putMap(cookie.name, cookieMap)\n                }\n            }\n        }\n\n        return result\n    }\n\n    private fun createCookieData(cookie: HttpCookie): WritableNativeMap {\n        val cookieMap = WritableNativeMap()\n        cookieMap.putString(\"name\", cookie.name)\n        cookieMap.putString(\"value\", cookie.value)\n        cookieMap.putString(\"domain\", cookie.domain)\n        cookieMap.putString(\"path\", cookie.path)\n        cookieMap.putBoolean(\"secure\", cookie.secure)\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n            cookieMap.putBoolean(\"httpOnly\", cookie.isHttpOnly)\n        } else {\n            cookieMap.putBoolean(\"httpOnly\", false)\n        }\n\n        val expires = cookie.maxAge\n        if (expires > 0) {\n            val expiry = formatDateIso8601(Date(expires))\n            if (!expiry.isNullOrEmpty()) {\n                cookieMap.putString(\"expires\", expiry)\n            }\n        }\n\n        return cookieMap\n    }\n\n    private fun formatDateIso8601(date: Date): String? {\n        return try {\n            val formatter = SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ\", Locale.US)\n            formatter.timeZone = TimeZone.getTimeZone(\"GMT\")\n            formatter.format(date)\n        } catch (e: Exception) {\n            null\n        }\n    }\n\n    @Suppress(\"DEPRECATION\")\n    private fun syncCookiesLegacy() {\n        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {\n            CookieSyncManager.getInstance().sync()\n        }\n    }\n\n    private fun validateUrl(url: String): URI {\n        return try {\n            val uri = URI(url)\n            if (uri.host.isNullOrEmpty()) {\n                throw IllegalArgumentException(String.format(INVALID_URL_ERROR, url))\n            }\n            uri\n        } catch (e: Exception) {\n            throw IllegalArgumentException(String.format(INVALID_URL_ERROR, url))\n        }\n    }\n\n    private fun validateCookieDomain(uri: URI, domain: String?) {\n        if (domain.isNullOrEmpty()) return\n\n        val host = uri.host ?: return\n        val cleanDomain = domain.trimStart('.')\n\n        if (!host.endsWith(cleanDomain) && host != cleanDomain) {\n            throw IllegalArgumentException(String.format(INVALID_DOMAINS, host, domain))\n        }\n    }\n\n    private fun parseExpiresDate(expires: String): Date? {\n        // Try ISO 8601 format\n        try {\n            val isoFormatter = SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ\", Locale.US)\n            isoFormatter.timeZone = TimeZone.getTimeZone(\"GMT\")\n            return isoFormatter.parse(expires)\n        } catch (_: Exception) {}\n\n        // Try RFC 1123 format\n        try {\n            val rfc1123Formatter = SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss zzz\", Locale.US)\n            rfc1123Formatter.timeZone = TimeZone.getTimeZone(\"GMT\")\n            return rfc1123Formatter.parse(expires)\n        } catch (_: Exception) {}\n\n        // Try as timestamp\n        try {\n            val timestamp = expires.toDouble()\n            return Date((timestamp).toLong())\n        } catch (_: Exception) {}\n\n        return null\n    }\n\n    private fun formatDateRfc1123(date: Date): String {\n        val formatter = SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss zzz\", Locale.US)\n        formatter.timeZone = TimeZone.getTimeZone(\"GMT\")\n        return formatter.format(date)\n    }\n\n    companion object {\n        private const val INVALID_URL_ERROR = \"Invalid URL: %s\"\n        private const val INVALID_COOKIE_VALUES = \"Failed to create cookie from provided data\"\n        private const val INVALID_DOMAINS = \"Cookie URL host %s and domain %s mismatched\"\n    }\n}\n"
  },
  {
    "path": "packages/cookies/android/src/main/kotlin/run/granite/cookies/typegen/CookiesSpec.kt",
    "content": "// This file is automatically generated by brick-codegen\n// Do not edit manually - regenerate using: brick-codegen\n\npackage run.granite.cookies\n\nimport com.brickmodule.BrickModuleBase\nimport com.facebook.react.bridge.ReadableMap\nimport com.facebook.react.bridge.WritableMap\n\n/**\n * Generated interface for Cookies module\n * Implement this interface to create a type-safe Cookies module\n */\ninterface CookiesSpec : BrickModuleBase {\n    companion object {\n        const val MODULE_NAME = \"Cookies\"\n    }\n\n\n    // MARK: - Module Methods\n\n    /**\n     * Set a cookie for a given URL\n     * @param url - The URL to associate the cookie with\n     * @param cookie - The cookie object to set\n     * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n     * @returns Promise resolving to true on success\n     */\n    suspend fun set(url: String, cookie: Cookie, useWebKit: Boolean): Boolean\n    /**\n     * Get cookies for a given URL\n     * @param url - The URL to get cookies for\n     * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n     * @returns Promise resolving to a dictionary of cookies\n     */\n    suspend fun get(url: String, useWebKit: Boolean): WritableMap\n    /**\n     * Get all cookies (iOS only, Android returns empty object)\n     * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n     * @returns Promise resolving to a dictionary of all cookies\n     */\n    suspend fun getAll(useWebKit: Boolean): WritableMap\n    /**\n     * Clear all cookies\n     * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n     * @returns Promise resolving to true on success\n     */\n    suspend fun clearAll(useWebKit: Boolean): Boolean\n    /**\n     * Clear a specific cookie by name (iOS only)\n     * @param url - The URL domain to clear the cookie from\n     * @param name - The name of the cookie to clear\n     * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n     * @returns Promise resolving to true on success\n     */\n    suspend fun clearByName(url: String, name: String, useWebKit: Boolean): Boolean\n    /**\n     * Set cookies from a Set-Cookie response header\n     * @param url - The URL the response came from\n     * @param cookie - The Set-Cookie header string\n     * @returns Promise resolving to true on success\n     */\n    suspend fun setFromResponse(url: String, cookie: String): Boolean\n    /**\n     * Get cookies that would be sent with a request to the URL\n     * Returns them in Set-Cookie header format\n     * @param url - The URL to get cookies for\n     * @returns Promise resolving to the cookies as a header string\n     */\n    suspend fun getFromResponse(url: String): WritableMap\n    /**\n     * Flush cookies to persistent storage (Android only)\n     * On iOS, this is a no-op that resolves immediately\n     * @returns Promise resolving when flush is complete\n     */\n    suspend fun flush(): Boolean\n    /**\n     * Remove session cookies (Android only)\n     * On iOS, this is a no-op that resolves immediately\n     * @returns Promise resolving to true on success\n     */\n    suspend fun removeSessionCookies(): Boolean\n\n}\n"
  },
  {
    "path": "packages/cookies/android/src/main/kotlin/run/granite/cookies/typegen/CookiesTypes.kt",
    "content": "// This file is automatically generated by brick-codegen\n// Do not edit manually - regenerate using: brick-codegen\n\npackage run.granite.cookies\n\nimport com.google.gson.annotations.SerializedName\n\n/**\n * Cookies module types for Brick framework\n * Provides type-safe data classes with automatic serialization\n */\n\n/**\n * Cookie object representing a single HTTP cookie\n */\ndata class Cookie(\n    /**\n     * Cookie name (required)\n     */\n    @SerializedName(\"name\")\n    val name: String,\n    /**\n     * Cookie value (required)\n     */\n    @SerializedName(\"value\")\n    val value: String,\n    /**\n     * Cookie path (optional, defaults to \"/\")\n     */\n    @SerializedName(\"path\")\n    val path: String?,\n    /**\n     * Cookie domain (optional)\n     */\n    @SerializedName(\"domain\")\n    val domain: String?,\n    /**\n     * Cookie version (optional)\n     */\n    @SerializedName(\"version\")\n    val version: String?,\n    /**\n     * Expiration date as ISO string or timestamp (optional)\n     */\n    @SerializedName(\"expires\")\n    val expires: String?,\n    /**\n     * Whether cookie requires HTTPS (optional)\n     */\n    @SerializedName(\"secure\")\n    val secure: Boolean?,\n    /**\n     * Whether cookie is HTTP-only (optional)\n     */\n    @SerializedName(\"httpOnly\")\n    val httpOnly: Boolean?\n)\n"
  },
  {
    "path": "packages/cookies/ios/CookiesModule.swift",
    "content": "/**\n * Cookies module implementation for iOS\n * Implements the CookiesSpec protocol generated by brick-codegen\n *\n * Supports both NSHTTPCookieStorage (for native HTTP requests)\n * and WKHTTPCookieStore (for WKWebView)\n *\n * Swift 6 compatible with strict concurrency checking\n */\n\nimport Foundation\nimport WebKit\nimport BrickModule\n\npublic final class CookiesModule: BrickModuleBase, CookiesSpec, @unchecked Sendable {\n    public init() {\n        super.init(moduleName: \"Cookies\")\n    }\n\n    // MARK: - Set Cookie\n\n    public func set(url: String, cookie: CookiesCookie, useWebKit: Bool) async throws -> Bool {\n        guard let urlObj = URL(string: url) else {\n            throw BrickModuleError.executionError(\"Invalid URL: \\(url)\")\n        }\n\n        guard let httpCookie = makeHTTPCookie(from: cookie, url: urlObj) else {\n            throw BrickModuleError.executionError(\"Failed to create cookie from provided data\")\n        }\n\n        if useWebKit {\n            return await setWebKitCookie(httpCookie)\n        } else {\n            HTTPCookieStorage.shared.setCookie(httpCookie)\n            return true\n        }\n    }\n\n    @MainActor\n    private func setWebKitCookie(_ cookie: HTTPCookie) async -> Bool {\n        let cookieStore = WKWebsiteDataStore.default().httpCookieStore\n        await cookieStore.setCookie(cookie)\n        return true\n    }\n\n    // MARK: - Get Cookies\n\n    public func get(url: String, useWebKit: Bool) async throws -> [String: Any] {\n        guard let urlObj = URL(string: url) else {\n            throw BrickModuleError.executionError(\"Invalid URL: \\(url)\")\n        }\n\n        if useWebKit {\n            let allCookies = await getWebKitCookies()\n            let filteredCookies = allCookies.filter { cookie in\n                Self.cookieMatchesURL(cookie: cookie, url: urlObj)\n            }\n            return Self.cookiesToDictionary(filteredCookies)\n        } else {\n            let cookies = HTTPCookieStorage.shared.cookies(for: urlObj) ?? []\n            return Self.cookiesToDictionary(cookies)\n        }\n    }\n\n    @MainActor\n    private func getWebKitCookies() async -> [HTTPCookie] {\n        let cookieStore = WKWebsiteDataStore.default().httpCookieStore\n        return await cookieStore.allCookies()\n    }\n\n    // MARK: - Get All Cookies\n\n    public func getAll(useWebKit: Bool) async throws -> [String: Any] {\n        if useWebKit {\n            let allCookies = await getWebKitCookies()\n            return Self.cookiesToDictionary(allCookies)\n        } else {\n            let cookies = HTTPCookieStorage.shared.cookies ?? []\n            return Self.cookiesToDictionary(cookies)\n        }\n    }\n\n    // MARK: - Clear All Cookies\n\n    public func clearAll(useWebKit: Bool) async throws -> Bool {\n        if useWebKit {\n            return await clearAllWebKitCookies()\n        } else {\n            let storage = HTTPCookieStorage.shared\n            if let cookies = storage.cookies {\n                for cookie in cookies {\n                    storage.deleteCookie(cookie)\n                }\n            }\n            return true\n        }\n    }\n\n    @MainActor\n    private func clearAllWebKitCookies() async -> Bool {\n        let dataStore = WKWebsiteDataStore.default()\n        let types: Set<String> = [WKWebsiteDataTypeCookies]\n        let records = await dataStore.dataRecords(ofTypes: types)\n        await dataStore.removeData(ofTypes: types, for: records)\n        return true\n    }\n\n    // MARK: - Clear By Name\n\n    public func clearByName(url: String, name: String, useWebKit: Bool) async throws -> Bool {\n        guard let urlObj = URL(string: url) else {\n            throw BrickModuleError.executionError(\"Invalid URL: \\(url)\")\n        }\n\n        if useWebKit {\n            return await clearWebKitCookieByName(name: name, url: urlObj)\n        } else {\n            let storage = HTTPCookieStorage.shared\n            let cookies = storage.cookies(for: urlObj) ?? []\n            var deleted = false\n\n            for cookie in cookies {\n                if cookie.name == name {\n                    storage.deleteCookie(cookie)\n                    deleted = true\n                }\n            }\n\n            return deleted\n        }\n    }\n\n    @MainActor\n    private func clearWebKitCookieByName(name: String, url: URL) async -> Bool {\n        let cookieStore = WKWebsiteDataStore.default().httpCookieStore\n        let allCookies = await cookieStore.allCookies()\n        var deleted = false\n\n        for cookie in allCookies {\n            if cookie.name == name && Self.cookieMatchesURL(cookie: cookie, url: url) {\n                await cookieStore.deleteCookie(cookie)\n                deleted = true\n            }\n        }\n\n        return deleted\n    }\n\n    // MARK: - Set From Response\n\n    public func setFromResponse(url: String, cookie: String) async throws -> Bool {\n        guard let urlObj = URL(string: url) else {\n            throw BrickModuleError.executionError(\"Invalid URL: \\(url)\")\n        }\n\n        let headerFields = [\"Set-Cookie\": cookie]\n        let cookies = HTTPCookie.cookies(withResponseHeaderFields: headerFields, for: urlObj)\n\n        let storage = HTTPCookieStorage.shared\n        for httpCookie in cookies {\n            storage.setCookie(httpCookie)\n        }\n\n        return true\n    }\n\n    // MARK: - Get From Response\n\n    public func getFromResponse(url: String) async throws -> [String: Any] {\n        guard let urlObj = URL(string: url) else {\n            throw BrickModuleError.executionError(\"Invalid URL: \\(url)\")\n        }\n\n        let cookies = HTTPCookieStorage.shared.cookies(for: urlObj) ?? []\n        return Self.cookiesToDictionary(cookies)\n    }\n\n    // MARK: - Flush (No-op on iOS)\n\n    public func flush() async throws -> Bool {\n        // On iOS, cookies are automatically persisted\n        return true\n    }\n\n    // MARK: - Remove Session Cookies\n\n    public func removeSessionCookies() async throws -> Bool {\n        let storage = HTTPCookieStorage.shared\n        if let cookies = storage.cookies {\n            for cookie in cookies where cookie.isSessionOnly {\n                storage.deleteCookie(cookie)\n            }\n        }\n        return true\n    }\n\n    // MARK: - Helper Methods\n\n    private func makeHTTPCookie(from cookie: CookiesCookie, url: URL) -> HTTPCookie? {\n        var properties: [HTTPCookiePropertyKey: Any] = [\n            .name: cookie.name,\n            .value: cookie.value,\n            .path: cookie.path ?? \"/\",\n        ]\n\n        // Domain handling\n        if let domain = cookie.domain {\n            properties[.domain] = domain\n        } else if let host = url.host {\n            properties[.domain] = host\n        } else {\n            return nil\n        }\n\n        // Expiration handling\n        if let expires = cookie.expires {\n            if let expiresDate = Self.parseExpiresDate(expires) {\n                properties[.expires] = expiresDate\n            }\n        }\n\n        // Secure flag\n        if let secure = cookie.secure, secure {\n            properties[.secure] = \"TRUE\"\n        }\n\n        // Version\n        if let version = cookie.version {\n            properties[.version] = version\n        }\n\n        return HTTPCookie(properties: properties)\n    }\n\n    private static func parseExpiresDate(_ expires: String) -> Date? {\n        // Try ISO 8601 format first\n        let isoFormatter = ISO8601DateFormatter()\n        if let date = isoFormatter.date(from: expires) {\n            return date\n        }\n\n        // Try RFC 1123 format\n        let rfc1123Formatter = DateFormatter()\n        rfc1123Formatter.dateFormat = \"EEE, dd MMM yyyy HH:mm:ss zzz\"\n        rfc1123Formatter.locale = Locale(identifier: \"en_US_POSIX\")\n        if let date = rfc1123Formatter.date(from: expires) {\n            return date\n        }\n\n        // Try as timestamp\n        if let timestamp = Double(expires) {\n            return Date(timeIntervalSince1970: timestamp / 1000)\n        }\n\n        return nil\n    }\n\n    private static func cookieMatchesURL(cookie: HTTPCookie, url: URL) -> Bool {\n        guard let host = url.host else { return false }\n\n        let domain = cookie.domain\n\n        // Exact match\n        if domain == host {\n            return true\n        }\n\n        // Domain with leading dot matches subdomains\n        if domain.hasPrefix(\".\") {\n            let domainWithoutDot = String(domain.dropFirst())\n            return host == domainWithoutDot || host.hasSuffix(domain)\n        }\n\n        // Check if host ends with domain\n        return host.hasSuffix(\".\\(domain)\")\n    }\n\n    private static func cookiesToDictionary(_ cookies: [HTTPCookie]) -> [String: Any] {\n        var result: [String: [String: Any]] = [:]\n\n        for cookie in cookies {\n            var cookieDict: [String: Any] = [\n                \"name\": cookie.name,\n                \"value\": cookie.value,\n                \"path\": cookie.path,\n                \"domain\": cookie.domain,\n                \"version\": String(cookie.version)\n            ]\n\n            if let expires = cookie.expiresDate?.iso8601String {\n                cookieDict[\"expires\"] = expires\n            }\n            cookieDict[\"secure\"] = cookie.isSecure\n            cookieDict[\"httpOnly\"] = cookie.isHTTPOnly\n\n            result[cookie.name] = cookieDict\n        }\n\n        return result\n    }\n}\n\n// MARK: - Date Extension\n\nprivate extension Date {\n    var iso8601String: String {\n        let formatter = ISO8601DateFormatter()\n        return formatter.string(from: self)\n    }\n}\n"
  },
  {
    "path": "packages/cookies/ios/typegen/CookiesSpec.swift",
    "content": "// This file is automatically generated by brick-codegen\n// Do not edit manually - regenerate using: brick-codegen\n\nimport Foundation\nimport BrickModule\n\n/**\n * Generated protocol for Cookies module\n * Implement this protocol to create a type-safe Cookies module\n */\npublic protocol CookiesSpec {\n\n    // MARK: - Module Methods\n\n    /**\n     * Set a cookie for a given URL\n     * @param url - The URL to associate the cookie with\n     * @param cookie - The cookie object to set\n     * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n     * @returns Promise resolving to true on success\n     */\n    /// set method\n    func set(url: String, cookie: CookiesCookie, useWebKit: Bool) async throws -> Bool\n\n    /**\n     * Get cookies for a given URL\n     * @param url - The URL to get cookies for\n     * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n     * @returns Promise resolving to a dictionary of cookies\n     */\n    /// get method\n    func get(url: String, useWebKit: Bool) async throws -> [String: Any]\n\n    /**\n     * Get all cookies (iOS only, Android returns empty object)\n     * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n     * @returns Promise resolving to a dictionary of all cookies\n     */\n    /// getAll method\n    func getAll(useWebKit: Bool) async throws -> [String: Any]\n\n    /**\n     * Clear all cookies\n     * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n     * @returns Promise resolving to true on success\n     */\n    /// clearAll method\n    func clearAll(useWebKit: Bool) async throws -> Bool\n\n    /**\n     * Clear a specific cookie by name (iOS only)\n     * @param url - The URL domain to clear the cookie from\n     * @param name - The name of the cookie to clear\n     * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n     * @returns Promise resolving to true on success\n     */\n    /// clearByName method\n    func clearByName(url: String, name: String, useWebKit: Bool) async throws -> Bool\n\n    /**\n     * Set cookies from a Set-Cookie response header\n     * @param url - The URL the response came from\n     * @param cookie - The Set-Cookie header string\n     * @returns Promise resolving to true on success\n     */\n    /// setFromResponse method\n    func setFromResponse(url: String, cookie: String) async throws -> Bool\n\n    /**\n     * Get cookies that would be sent with a request to the URL\n     * Returns them in Set-Cookie header format\n     * @param url - The URL to get cookies for\n     * @returns Promise resolving to the cookies as a header string\n     */\n    /// getFromResponse method\n    func getFromResponse(url: String) async throws -> [String: Any]\n\n    /**\n     * Flush cookies to persistent storage (Android only)\n     * On iOS, this is a no-op that resolves immediately\n     * @returns Promise resolving when flush is complete\n     */\n    /// flush method\n    func flush() async throws -> Bool\n\n    /**\n     * Remove session cookies (Android only)\n     * On iOS, this is a no-op that resolves immediately\n     * @returns Promise resolving to true on success\n     */\n    /// removeSessionCookies method\n    func removeSessionCookies() async throws -> Bool\n}\n"
  },
  {
    "path": "packages/cookies/ios/typegen/CookiesTypes.swift",
    "content": "// This file is automatically generated by brick-codegen\n// Do not edit manually - regenerate using: brick-codegen\n\nimport Foundation\n/// Cookies module types for Brick framework\n\npublic struct CookiesCookie: Codable {\n    /// Cookie name (required)\n    public let name: String\n    /// Cookie value (required)\n    public let value: String\n    /// Cookie path (optional, defaults to \"/\")\n    public let path: String?\n    /// Cookie domain (optional)\n    public let domain: String?\n    /// Cookie version (optional)\n    public let version: String?\n    /// Expiration date as ISO string or timestamp (optional)\n    public let expires: String?\n    /// Whether cookie requires HTTPS (optional)\n    public let secure: Bool?\n    /// Whether cookie is HTTP-only (optional)\n    public let httpOnly: Bool?\n\n    public init(name: String, value: String, path: String?, domain: String?, version: String?, expires: String?, secure: Bool?, httpOnly: Bool?) {\n        self.name = name\n        self.value = value\n        self.path = path\n        self.domain = domain\n        self.version = version\n        self.expires = expires\n        self.secure = secure\n        self.httpOnly = httpOnly\n    }\n}\n"
  },
  {
    "path": "packages/cookies/package.json",
    "content": "{\n  \"name\": \"@granite-js/cookies\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Cookie manager module for Brick framework\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.js\",\n  \"types\": \"dist/index.d.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.ts\",\n      \"default\": \"./dist/index.js\",\n      \"react-native\": \"./src/index.ts\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src/\",\n    \"ios/\",\n    \"android/\",\n    \"package.json\",\n    \"GraniteCookies.podspec\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"build\": \"brick-codegen && tsdown\"\n  },\n  \"keywords\": [\n    \"react-native\",\n    \"brick\",\n    \"brick-module\",\n    \"cookies\",\n    \"cookie-manager\",\n    \"native-module\"\n  ],\n  \"license\": \"Apache-2.0\",\n  \"author\": \"Toss <opensource@toss.im>\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/cookies\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/toss/granite/issues\"\n  },\n  \"homepage\": \"https://github.com/toss/granite#readme\",\n  \"brickModule\": {\n    \"specSrc\": \"./src/spec\",\n    \"ios\": {\n      \"moduleName\": \"GraniteCookies\",\n      \"className\": \"CookiesModule\"\n    },\n    \"android\": {\n      \"package\": \"run.granite.cookies\",\n      \"projectName\": \"cookies\",\n      \"moduleName\": \"CookiesModule\"\n    }\n  },\n  \"peerDependencies\": {\n    \"brick-module\": \"*\",\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"devDependencies\": {\n    \"brick-module\": \"catalog:brick-module\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"tsdown\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\"\n  }\n}\n"
  },
  {
    "path": "packages/cookies/src/index.ts",
    "content": "import { type Cookie, CookiesNativeModule } from './spec/cookies.brick';\n\n/**\n * Type-safe cookie dictionary\n */\nexport type Cookies = { [name: string]: Cookie };\n\n/**\n * Cookie Manager API\n * Provides a convenient wrapper around the native Cookies module\n */\nexport const CookieManager = {\n  /**\n   * Set a cookie for a given URL\n   * @param url - The URL to associate the cookie with\n   * @param cookie - The cookie object to set\n   * @param useWebKit - Whether to use WebKit cookie store (iOS only, default: false)\n   */\n  set(url: string, cookie: Cookie, useWebKit = false): Promise<boolean> {\n    return CookiesNativeModule.set(url, cookie, useWebKit);\n  },\n\n  /**\n   * Get cookies for a given URL\n   * @param url - The URL to get cookies for\n   * @param useWebKit - Whether to use WebKit cookie store (iOS only, default: false)\n   */\n  get(url: string, useWebKit = false): Promise<Cookies> {\n    return CookiesNativeModule.get(url, useWebKit) as Promise<Cookies>;\n  },\n\n  /**\n   * Get all cookies (iOS only, Android returns empty object)\n   * @param useWebKit - Whether to use WebKit cookie store (iOS only, default: false)\n   */\n  getAll(useWebKit = false): Promise<Cookies> {\n    return CookiesNativeModule.getAll(useWebKit) as Promise<Cookies>;\n  },\n\n  /**\n   * Clear all cookies\n   * @param useWebKit - Whether to use WebKit cookie store (iOS only, default: false)\n   */\n  clearAll(useWebKit = false): Promise<boolean> {\n    return CookiesNativeModule.clearAll(useWebKit);\n  },\n\n  /**\n   * Clear a specific cookie by name (iOS only)\n   * @param url - The URL domain to clear the cookie from\n   * @param name - The name of the cookie to clear\n   * @param useWebKit - Whether to use WebKit cookie store (iOS only, default: false)\n   */\n  clearByName(url: string, name: string, useWebKit = false): Promise<boolean> {\n    return CookiesNativeModule.clearByName(url, name, useWebKit);\n  },\n\n  /**\n   * Set cookies from a Set-Cookie response header\n   * @param url - The URL the response came from\n   * @param cookie - The Set-Cookie header string\n   */\n  setFromResponse(url: string, cookie: string): Promise<boolean> {\n    return CookiesNativeModule.setFromResponse(url, cookie);\n  },\n\n  /**\n   * Get cookies that would be sent with a request to the URL\n   * @param url - The URL to get cookies for\n   */\n  getFromResponse(url: string): Promise<Cookies> {\n    return CookiesNativeModule.getFromResponse(url) as Promise<Cookies>;\n  },\n\n  /**\n   * Flush cookies to persistent storage (Android only)\n   * On iOS, this is a no-op that resolves immediately\n   */\n  flush(): Promise<boolean> {\n    return CookiesNativeModule.flush();\n  },\n\n  /**\n   * Remove session cookies (Android only)\n   * On iOS, this is a no-op that resolves immediately\n   */\n  removeSessionCookies(): Promise<boolean> {\n    return CookiesNativeModule.removeSessionCookies();\n  },\n};\n\nexport default CookieManager;\n"
  },
  {
    "path": "packages/cookies/src/spec/cookies.brick.ts",
    "content": "/**\n * Cookies module for Brick framework\n * Provides type-safe cookie management with automatic bridge generation\n *\n * Based on @react-native-cookies/cookies API\n * Supports both NSHTTPCookieStorage and WKHTTPCookieStore on iOS\n * Uses CookieManager on Android\n */\n\nimport { type AnyObject, BrickModule, type BrickModuleSpec } from 'brick-module';\n\n/**\n * Cookie object representing a single HTTP cookie\n */\nexport interface Cookie {\n  /** Cookie name (required) */\n  name: string;\n  /** Cookie value (required) */\n  value: string;\n  /** Cookie path (optional, defaults to \"/\") */\n  path?: string;\n  /** Cookie domain (optional) */\n  domain?: string;\n  /** Cookie version (optional) */\n  version?: string;\n  /** Expiration date as ISO string or timestamp (optional) */\n  expires?: string;\n  /** Whether cookie requires HTTPS (optional) */\n  secure?: boolean;\n  /** Whether cookie is HTTP-only (optional) */\n  httpOnly?: boolean;\n}\n\n/**\n * Dictionary of cookies keyed by cookie name\n * Uses AnyObject since TypeScript index signatures map to native dictionaries\n */\nexport type Cookies = AnyObject;\n\n/**\n * Cookies module specification\n * Manages HTTP cookies for both iOS and Android platforms\n */\nexport interface CookiesModuleSpec extends BrickModuleSpec {\n  readonly moduleName: 'Cookies';\n\n  /**\n   * Set a cookie for a given URL\n   * @param url - The URL to associate the cookie with\n   * @param cookie - The cookie object to set\n   * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n   * @returns Promise resolving to true on success\n   */\n  set(url: string, cookie: Cookie, useWebKit: boolean): Promise<boolean>;\n\n  /**\n   * Get cookies for a given URL\n   * @param url - The URL to get cookies for\n   * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n   * @returns Promise resolving to a dictionary of cookies\n   */\n  get(url: string, useWebKit: boolean): Promise<AnyObject>;\n\n  /**\n   * Get all cookies (iOS only, Android returns empty object)\n   * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n   * @returns Promise resolving to a dictionary of all cookies\n   */\n  getAll(useWebKit: boolean): Promise<AnyObject>;\n\n  /**\n   * Clear all cookies\n   * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n   * @returns Promise resolving to true on success\n   */\n  clearAll(useWebKit: boolean): Promise<boolean>;\n\n  /**\n   * Clear a specific cookie by name (iOS only)\n   * @param url - The URL domain to clear the cookie from\n   * @param name - The name of the cookie to clear\n   * @param useWebKit - Whether to use WebKit cookie store (iOS only)\n   * @returns Promise resolving to true on success\n   */\n  clearByName(url: string, name: string, useWebKit: boolean): Promise<boolean>;\n\n  /**\n   * Set cookies from a Set-Cookie response header\n   * @param url - The URL the response came from\n   * @param cookie - The Set-Cookie header string\n   * @returns Promise resolving to true on success\n   */\n  setFromResponse(url: string, cookie: string): Promise<boolean>;\n\n  /**\n   * Get cookies that would be sent with a request to the URL\n   * Returns them in Set-Cookie header format\n   * @param url - The URL to get cookies for\n   * @returns Promise resolving to the cookies as a header string\n   */\n  getFromResponse(url: string): Promise<AnyObject>;\n\n  /**\n   * Flush cookies to persistent storage (Android only)\n   * On iOS, this is a no-op that resolves immediately\n   * @returns Promise resolving when flush is complete\n   */\n  flush(): Promise<boolean>;\n\n  /**\n   * Remove session cookies (Android only)\n   * On iOS, this is a no-op that resolves immediately\n   * @returns Promise resolving to true on success\n   */\n  removeSessionCookies(): Promise<boolean>;\n}\n\nexport const CookiesNativeModule = BrickModule.get<CookiesModuleSpec>('Cookies');\n"
  },
  {
    "path": "packages/cookies/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"outDir\": \"dist\",\n    \"target\": \"ESNext\",\n    \"lib\": [\"esnext\"],\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"isolatedModules\": true,\n    \"strict\": true,\n    \"declaration\": true,\n    \"noEmit\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true,\n    \"pretty\": true,\n    \"verbatimModuleSyntax\": true\n  },\n  \"include\": [\"src/**/*\"],\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "packages/cookies/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  entry: ['src/index.ts'],\n  format: ['esm'],\n  dts: true,\n  clean: true,\n  unbundle: true,\n  fixedExtension: false,\n});\n"
  },
  {
    "path": "packages/create-granite-app/CHANGELOG.md",
    "content": "# create-granite-app\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n## 1.0.18\n\n## 1.0.17\n\n## 1.0.16\n\n## 1.0.15\n\n## 1.0.14\n\n## 1.0.13\n\n## 1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- c5f1a07: fix: @granite-js/lottie LottieView duration doesn't work\n\n## 1.0.10\n\n### Patch Changes\n\n- 43876b9: fix: react navigation core for test\n\n## 1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- 097e062: feat(template): upgrade testing dependencies for RN 0.84\n\n## 1.0.7\n\n## 1.0.6\n\n## 1.0.5\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "packages/create-granite-app/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/create-granite-app/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: create-granite-app\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@clack/prompts**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/natemoo-re/clack\n\t\n2. **@types/kill-port**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n3. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n4. **@types/yargs**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n5. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n6. **es-toolkit**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/toss/es-toolkit.git\n\t\n7. **execa**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/sindresorhus/execa.git\n\t\n8. **kill-port**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/tiaanduplessis/kill-port.git\n\t\n9. **tsup**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/egoist/tsup.git\n\t\n10. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n11. **wait-port**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/dwmkerr/wait-port.git\n\t\n12. **workspace-tools**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/microsoft/workspace-tools\n\t\n13. **yargs**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/yargs/yargs.git\n\t\n14. **create-granite-app**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: git+https://github.com/toss/granite.git\n\t\n15. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/create-granite-app/README.md",
    "content": "# create-granite-app\n\nCreate Granite App\n"
  },
  {
    "path": "packages/create-granite-app/bin.js",
    "content": "#!/usr/bin/env node\nimport './dist/index.js';\n"
  },
  {
    "path": "packages/create-granite-app/package.json",
    "content": "{\n  \"name\": \"create-granite-app\",\n  \"version\": \"1.0.23\",\n  \"type\": \"module\",\n  \"bin\": {\n    \"cba\": \"./bin.js\",\n    \"create-granite-app\": \"./bin.js\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/create-granite-app\"\n  },\n  \"files\": [\n    \"templates\",\n    \"tool-templates\",\n    \"dist\",\n    \"bin.js\",\n    \"package.json\"\n  ],\n  \"license\": \"Apache-2.0\",\n  \"description\": \"Create Granite App\",\n  \"scripts\": {\n    \"prepack\": \"yarn build && node scripts/prepack.js\",\n    \"postpack\": \"node scripts/postpack.js\",\n    \"build\": \"tsup src/index.ts --format esm\",\n    \"dev\": \"tsup src/index.ts --format esm --watch\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"test:no-parallel\": \"vitest --no-watch --coverage\"\n  },\n  \"devDependencies\": {\n    \"@types/kill-port\": \"2.0.1\",\n    \"@types/node\": \"catalog:tools\",\n    \"@types/yargs\": \"^17.0.33\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"es-toolkit\": \"^1.39.8\",\n    \"execa\": \"^9.5.2\",\n    \"kill-port\": \"2.0.1\",\n    \"tsup\": \"^8.5.0\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\",\n    \"wait-port\": \"^1.1.0\",\n    \"workspace-tools\": \"^0.38.1\",\n    \"yargs\": \"^17.7.2\"\n  },\n  \"dependencies\": {\n    \"@clack/prompts\": \"^0.8.2\"\n  }\n}\n"
  },
  {
    "path": "packages/create-granite-app/scripts/postpack.js",
    "content": "import { updateWorkspaceProtocol } from './utils/updateWorkspaceProtocol.js';\n\nconst TEMPLATE_PATHS = ['templates/*', 'tool-templates/*'];\n\nawait updateWorkspaceProtocol(TEMPLATE_PATHS, 'workspace:*');\n"
  },
  {
    "path": "packages/create-granite-app/scripts/prepack.js",
    "content": "import { updateWorkspaceProtocol } from './utils/updateWorkspaceProtocol.js';\n\nconst TEMPLATE_PATHS = ['templates/*', 'tool-templates/*'];\n\nawait updateWorkspaceProtocol(TEMPLATE_PATHS, 'auto');\n"
  },
  {
    "path": "packages/create-granite-app/scripts/utils/updateWorkspaceProtocol.js",
    "content": "import fs from 'fs';\nimport path from 'path';\nimport { getYarnWorkspaces } from 'workspace-tools';\n\n/**\n * @param {string[]} target\n * @param {'workspace:*' | 'auto'} updateVersion\n */\nexport async function updateWorkspaceProtocol(target, updateVersion = 'auto') {\n  const workspaces = await getYarnWorkspaces(process.cwd());\n\n  const workspaceVersionMap = new Map();\n  const workspaceNames = workspaces.map((workspace) => {\n    workspaceVersionMap.set(workspace.name, workspace.packageJson.version);\n    return workspace.name;\n  });\n\n  const templateDirs = target.reduce((acc, pattern) => {\n    return [...acc, ...fs.globSync(pattern)];\n  }, []);\n\n  for (const dir of templateDirs) {\n    const pkgPath = path.join(dir, 'package.json');\n\n    const pkgContent = await fs.promises.readFile(pkgPath, 'utf8');\n    const pkg = JSON.parse(pkgContent);\n\n    if (pkg.dependencies) {\n      for (const name of Object.keys(pkg.dependencies)) {\n        if (workspaceNames.includes(name)) {\n          pkg.dependencies[name] = updateVersion === 'auto' ? workspaceVersionMap.get(name) : updateVersion;\n        }\n      }\n    }\n\n    if (pkg.devDependencies) {\n      for (const name of Object.keys(pkg.devDependencies)) {\n        if (workspaceNames.includes(name)) {\n          pkg.devDependencies[name] = updateVersion === 'auto' ? workspaceVersionMap.get(name) : updateVersion;\n        }\n      }\n    }\n\n    await fs.promises.writeFile(pkgPath, JSON.stringify(pkg, null, 2) + '\\n');\n    console.log(`✅ Updated ${pkgPath}`);\n  }\n}\n"
  },
  {
    "path": "packages/create-granite-app/src/__test__/cli.spec.ts",
    "content": "import fs from 'fs/promises';\nimport path from 'path';\nimport killPort from 'kill-port';\nimport { afterAll, beforeAll, describe, expect, it } from 'vitest';\nimport waitPort from 'wait-port';\nimport { getYarnWorkspaces, findWorkspacePath } from 'workspace-tools';\nimport { createTmpDir, TmpDirManager } from './createTmpDir';\n\nconst noop = () => {};\n\nconst YARN_VERSION = '4.9.1';\nconst YARN_CONFIGS: Record<string, string | string[]> = {\n  enableImmutableInstalls: JSON.stringify(false),\n  packageExtensions: [\n    '--json',\n    JSON.stringify({\n      '@typescript-eslint/type-utils@^8': {\n        dependencies: {\n          '@typescript-eslint/types': '^8',\n        },\n      },\n      'react-native-svg@*': {\n        dependencies: {\n          buffer: '^6',\n        },\n      },\n    }),\n  ],\n};\n\ntype ToolType = 'biome' | 'eslint-prettier';\n\nconst runTemplateTest = (toolType: ToolType, toolSpecificFiles: string[], options: { port: number }) => {\n  let manager: TmpDirManager;\n\n  const appName = `test-app-with-${toolType}`;\n\n  const workspaceInfo = getYarnWorkspaces(process.cwd());\n  const [\n    createGraniteAppPath,\n    graniteReactNativePath,\n    graniteNativePath,\n    granitePluginRouterPath,\n    granitePluginHermesPath,\n    babelPresetGranitePath,\n  ] = [\n    findWorkspacePath(workspaceInfo, 'create-granite-app'),\n    findWorkspacePath(workspaceInfo, '@granite-js/react-native'),\n    findWorkspacePath(workspaceInfo, '@granite-js/native'),\n    findWorkspacePath(workspaceInfo, '@granite-js/plugin-router'),\n    findWorkspacePath(workspaceInfo, '@granite-js/plugin-hermes'),\n    findWorkspacePath(workspaceInfo, 'babel-preset-granite'),\n  ];\n\n  if (\n    !(\n      createGraniteAppPath &&\n      graniteReactNativePath &&\n      graniteNativePath &&\n      granitePluginRouterPath &&\n      granitePluginHermesPath &&\n      babelPresetGranitePath\n    )\n  ) {\n    throw new Error('Unable to find workspace packages');\n  }\n\n  beforeAll(async () => {\n    manager = await createTmpDir();\n    killPort(options.port).catch(noop);\n  });\n\n  afterAll(async () => {\n    manager.cleanup();\n    killPort(options.port).catch(noop);\n  });\n\n  it.sequential('create files', async () => {\n    const packagePath = path.join(createGraniteAppPath, 'package.tgz');\n    const cga = await manager.$('npx', ['--package', packagePath, 'create-granite-app', appName, '--tools', toolType]);\n    expect(cga.stdout).toContain('Done');\n\n    // Update package.json\n    const packageJsonPath = path.join(manager.dir, appName, 'package.json');\n    const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf8'));\n    packageJson.dependencies['@granite-js/react-native'] = path.join(graniteReactNativePath, 'package.tgz');\n    packageJson.dependencies['@granite-js/native'] = path.join(graniteNativePath, 'package.tgz');\n    packageJson.devDependencies['babel-preset-granite'] = path.join(babelPresetGranitePath, 'package.tgz');\n    packageJson.devDependencies['@granite-js/plugin-router'] = path.join(granitePluginRouterPath, 'package.tgz');\n    packageJson.devDependencies['@granite-js/plugin-hermes'] = path.join(granitePluginHermesPath, 'package.tgz');\n    await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));\n\n    const files = await fs.readdir(path.join(manager.dir, appName));\n    const commonFiles = [\n      'granite.config.ts',\n      'README.md',\n      'babel.config.js',\n      'index.ts',\n      'jest.config.js',\n      '.gitignore',\n      'jest.setup.ts',\n      'package.json',\n      'pages',\n      'react-native.config.js',\n      'require.context.ts',\n      'src',\n      'tsconfig.json',\n    ];\n\n    expect(files).toEqual(expect.arrayContaining([...commonFiles, ...toolSpecificFiles]));\n    console.log('✅ created files', files);\n  });\n\n  it.sequential('checked package.json', async () => {\n    const packageJsonPath = path.join(manager.dir, appName, 'package.json');\n    const packageJson = await fs.readFile(packageJsonPath, 'utf8');\n\n    console.log('✅ checked package.json', packageJson);\n  });\n\n  it.sequential('yarn install', async () => {\n    await fs.writeFile(path.join(manager.dir, appName, 'yarn.lock'), '');\n\n    await manager.$('yarn', ['set', 'version', YARN_VERSION], { cwd: appName });\n    await Object.entries(YARN_CONFIGS).reduce(async (prev, [name, value]) => {\n      await prev;\n      await manager.$('yarn', ['config', 'set', name, ...(typeof value === 'string' ? [value] : value)], {\n        cwd: appName,\n      });\n    }, Promise.resolve());\n\n    await manager.$('yarn', ['install', '--no-immutable'], { cwd: appName });\n\n    console.log('✅ yarn install');\n  });\n\n  it.sequential('yarn typecheck', async () => {\n    await manager.$('yarn', ['typecheck'], { cwd: appName });\n    console.log('✅ yarn typecheck');\n  });\n\n  it.sequential('yarn lint', async () => {\n    await manager.$('yarn', ['lint'], { cwd: appName });\n    console.log('✅ yarn lint');\n  });\n\n  it.sequential('yarn build', async () => {\n    await manager.$('yarn', ['build'], { cwd: appName });\n\n    const distFolder = path.join(manager.dir, appName, 'dist');\n    const distFiles = await fs.readdir(distFolder);\n    expect(distFiles).toEqual(\n      expect.arrayContaining(['bundle.android.hbc', 'bundle.android.hbc.map', 'bundle.ios.hbc', 'bundle.ios.hbc.map'])\n    );\n    console.log('✅ yarn build');\n  });\n\n  it.sequential('yarn dev', async () => {\n    manager\n      .$('yarn', ['dev', '--port', options.port.toString()], {\n        cwd: appName,\n      })\n      .catch(noop);\n\n    await waitPort({ host: 'localhost', port: options.port });\n    console.log('✅ yarn dev');\n    const platforms = ['android', 'ios'];\n\n    for (const platform of platforms) {\n      const response = await fetch(\n        `http://localhost:${options.port}/index.bundle?platform=${platform}&dev=true&minify=false`\n      );\n      const text = await response.text();\n      expect(text).toContain('__BUNDLE_START_TIME__');\n    }\n    console.log('✅ fetch bundle');\n  });\n};\n\nconst toolSpecificFilesMap: Record<ToolType, string[]> = {\n  biome: ['biome.json'],\n  'eslint-prettier': ['.prettierrc', 'eslint.config.mjs'],\n};\n\ndescribe('create a \"granite-app\" template with \"biome\"', () => {\n  runTemplateTest('biome', toolSpecificFilesMap['biome'], { port: 8180 });\n});\n\ndescribe('create a \"granite-app\" template with \"eslint-prettier\"', () => {\n  runTemplateTest('eslint-prettier', toolSpecificFilesMap['eslint-prettier'], { port: 8181 });\n});\n"
  },
  {
    "path": "packages/create-granite-app/src/__test__/createTmpDir.ts",
    "content": "import { mkdir, rm } from 'fs/promises';\nimport os from 'os';\nimport path from 'path';\nimport { execa } from 'execa';\n\nexport type TmpDirManager = Awaited<ReturnType<typeof createTmpDir>>;\n\nexport async function createTmpDir() {\n  const tmpDir = os.tmpdir();\n  const randomString = Math.random().toString(36).substring(2, 15);\n  const dir = path.join(tmpDir, randomString);\n  console.log('Creating tmp dir', dir);\n  await mkdir(dir, { recursive: true });\n\n  const $ = (command: string, args: string[] = [], options: { cwd?: string } = {}) => {\n    return execa(command, args, {\n      cwd: options.cwd ? path.join(dir, options.cwd) : dir,\n    });\n  };\n  return {\n    dir,\n    $,\n    cleanup: async () => {\n      await rm(dir, {\n        recursive: true,\n      });\n    },\n  };\n}\n"
  },
  {
    "path": "packages/create-granite-app/src/copyTemplate.ts",
    "content": "import fs from 'fs/promises';\nimport path from 'path';\nimport { __dirname } from './cwd';\nimport { transformTemplate } from './transformTemplate';\n\nexport const TEMPLATE_LIST = ['granite-app'] as const;\n\nexport type TemplateName = (typeof TEMPLATE_LIST)[number];\n\nexport async function copyTemplate(\n  templateName: TemplateName,\n  templateOptions: { appPath: string; appName: string; needYarnrc?: boolean }\n) {\n  if (!TEMPLATE_LIST.includes(templateName)) {\n    throw new Error(`Template ${templateName} not found`);\n  }\n\n  const templatePath = path.resolve(__dirname, '..', 'templates', templateName);\n  const _appPath = path.join(process.cwd(), templateOptions.appPath);\n\n  await fs.cp(templatePath, _appPath, { recursive: true });\n\n  const files = await fs.readdir(_appPath, { recursive: true });\n  const filePromises = files.map(async (file) => {\n    // When publishing to npm, .gitignore is automatically converted to .npmignore and ignored\n    // So we rename .gitignore to _gitignore for distribution\n    if (file === '_gitignore') {\n      await fs.rename(path.join(_appPath, file), path.join(_appPath, '.gitignore'));\n      return;\n    }\n\n    const filePath = path.join(_appPath, file.toString());\n    const stat = await fs.stat(filePath);\n\n    if (stat.isFile()) {\n      const content = await fs.readFile(filePath, 'utf-8');\n      const newContent = transformTemplate(content, {\n        appName: templateOptions.appName,\n      });\n      await fs.writeFile(filePath, newContent);\n    }\n  });\n\n  await Promise.all(filePromises);\n\n  if (templateOptions.needYarnrc) {\n    await fs.writeFile(path.join(_appPath, '.yarnrc.yml'), 'enableGlobalCache: false');\n  }\n}\n"
  },
  {
    "path": "packages/create-granite-app/src/copyToolTemplate.ts",
    "content": "import fs from 'fs/promises';\nimport path from 'path';\nimport { merge } from 'es-toolkit';\nimport { __dirname } from './cwd';\n\nexport const TOOL_TEMPLATE_LIST = ['biome', 'eslint-prettier'] as const;\n\nexport type ToolTemplateName = (typeof TOOL_TEMPLATE_LIST)[number];\n\nexport async function copyToolTemplate(toolTemplateName: ToolTemplateName, templateOptions: { appPath: string }) {\n  if (!TOOL_TEMPLATE_LIST.includes(toolTemplateName)) {\n    throw new Error(`Template ${toolTemplateName} not found`);\n  }\n\n  const toolTemplatePath = path.resolve(__dirname, '..', 'tool-templates', toolTemplateName);\n  const _appPath = path.join(process.cwd(), templateOptions.appPath);\n\n  // package.json 파일 경로\n  const toolTemplatePackageJsonPath = path.join(toolTemplatePath, 'package.json');\n  const appPackageJsonPath = path.join(_appPath, 'package.json');\n\n  const toolTemplatePackageJson = JSON.parse(await fs.readFile(toolTemplatePackageJsonPath, 'utf-8'));\n  const appPackageJson = JSON.parse(await fs.readFile(appPackageJsonPath, 'utf-8'));\n\n  const mergedPackageJson = merge(appPackageJson, toolTemplatePackageJson);\n  await fs.writeFile(appPackageJsonPath, JSON.stringify(mergedPackageJson, null, 2));\n\n  const files = await fs.readdir(toolTemplatePath);\n  await Promise.all(\n    files\n      .filter((file) => file !== 'package.json')\n      .map((file) => {\n        const srcPath = path.join(toolTemplatePath, file);\n        const destPath = path.join(_appPath, file);\n        return fs.cp(srcPath, destPath, { recursive: true });\n      })\n  );\n}\n"
  },
  {
    "path": "packages/create-granite-app/src/cwd.ts",
    "content": "import path from 'path';\nimport { fileURLToPath } from 'url';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const __filename = fileURLToPath(import.meta.url);\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const __dirname = path.dirname(__filename);\n"
  },
  {
    "path": "packages/create-granite-app/src/getPackageManager.ts",
    "content": "export function getPackageManager(): {\n  packageManager: string;\n  version: string | null;\n} {\n  const userAgent = process.env.npm_config_user_agent;\n\n  if (!userAgent) {\n    return {\n      packageManager: 'npm',\n      version: '0.0.0',\n    };\n  }\n  const [packageManagerInfo] = userAgent.match(/(\\w+)\\/(\\d+\\.\\d+\\.\\d+)/) || [];\n  const [packageManager, version] = packageManagerInfo?.split('/') ?? ['npm', null];\n\n  if (!packageManager) {\n    return {\n      packageManager: 'npm',\n      version: '0.0.0',\n    };\n  }\n\n  return {\n    packageManager,\n    version: version ?? '0.0.0',\n  };\n}\n"
  },
  {
    "path": "packages/create-granite-app/src/index.ts",
    "content": "import { isCancel, intro, text, tasks, cancel, note, outro, multiselect } from '@clack/prompts';\nimport { kebabCase } from 'es-toolkit/string';\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport { copyTemplate } from './copyTemplate';\nimport { copyToolTemplate, TOOL_TEMPLATE_LIST } from './copyToolTemplate';\nimport { getPackageManager } from './getPackageManager';\nimport { resolveFallback } from './resolveFallback';\n\nfunction getAppName(appPath: string) {\n  return appPath.split('/').pop() || '';\n}\n\nfunction assertValidAppName(input: string) {\n  const appName = getAppName(input);\n  const kebabCaseAppName = kebabCase(appName);\n\n  if (appName === '') {\n    return;\n  }\n\n  if (kebabCaseAppName !== appName) {\n    throw new Error(`Project name must be in kebab-case (e.g. ${kebabCaseAppName})`);\n  }\n\n  if (!appName.match(/^(?:(?:@(?:[a-z0-9-*~][a-z0-9-*._~]*)?\\/[a-z0-9-._~])|[a-z0-9-~])[a-z0-9-._~]*$/)) {\n    throw new Error('Invalid project name. Only lowercase letters, numbers, and hyphens (-) are allowed.');\n  }\n}\n\nasync function run() {\n  const pkgInfo = getPackageManager();\n\n  const cli = await yargs(hideBin(process.argv))\n    .options({\n      tools: {\n        type: 'array',\n        description: 'Select development tools to include in the project',\n        default: [],\n        choices: TOOL_TEMPLATE_LIST,\n      },\n    })\n    .help().argv;\n\n  intro('Create Granite App Project');\n\n  const argProjectPath = typeof cli._[0] === 'string' ? cli._[0] : null;\n\n  const appPath = await resolveFallback(argProjectPath, () =>\n    text({\n      message: 'Project name or path:',\n      placeholder: 'my-granite-app',\n      defaultValue: 'my-granite-app',\n      validate: (value: string) => {\n        try {\n          assertValidAppName(value);\n          return;\n        } catch (e) {\n          if (e instanceof Error) {\n            return e.message;\n          }\n          return 'Invalid project name';\n        }\n      },\n    })\n  );\n\n  if (isCancel(appPath)) {\n    cancel('Operation cancelled.');\n    process.exit(0);\n  }\n\n  assertValidAppName(appPath);\n\n  const toolTemplate = await resolveFallback(cli.tools.length > 0 ? cli.tools : null, async () =>\n    multiselect({\n      message: 'Select tools',\n      options: [\n        { value: 'eslint-prettier', label: 'ESLint + Prettier' },\n        { value: 'biome', label: 'Biome' },\n      ],\n      required: true,\n    })\n  );\n\n  if (isCancel(toolTemplate)) {\n    cancel('Operation cancelled.');\n    process.exit(0);\n  }\n\n  await tasks([\n    {\n      title: `Creating Granite App`,\n      task: async () => {\n        try {\n          await copyTemplate('granite-app', {\n            appPath,\n            appName: getAppName(appPath),\n            needYarnrc: Boolean(pkgInfo.packageManager === 'yarn' && pkgInfo.version && pkgInfo?.version >= '2.0.0'),\n          });\n          await Promise.all(toolTemplate.map((tool) => copyToolTemplate(tool, { appPath })));\n        } catch (e) {\n          console.error(e);\n          throw e;\n        }\n        return `Created Granite App`;\n      },\n    },\n  ]);\n\n  const nextSteps = [`cd ${appPath}`, `${pkgInfo.packageManager} install`, `${pkgInfo.packageManager} run dev`];\n\n  note(nextSteps.join('\\n'), 'Next steps');\n  outro('Done');\n}\n\nrun();\n"
  },
  {
    "path": "packages/create-granite-app/src/resolveFallback.spec.ts",
    "content": "import { describe, it, expect } from 'vitest';\nimport { resolveFallback } from './resolveFallback';\n\ndescribe('resolveFallback', () => {\n  it('should return first valid value', async () => {\n    const result = await resolveFallback('first', 'second');\n    expect(result).toBe('first');\n  });\n\n  it('should skip null values and return first valid value', async () => {\n    const result = await resolveFallback(null, 'valid', 'second');\n    expect(result).toBe('valid');\n  });\n\n  it('should resolve async function and return valid value', async () => {\n    const result = await resolveFallback(null, async () => 'valid');\n    expect(result).toBe('valid');\n  });\n\n  it('should execute function and return its result', async () => {\n    const result = await resolveFallback(() => 'function result');\n    expect(result).toBe('function result');\n  });\n\n  it('should execute async function and return its result', async () => {\n    const result = await resolveFallback(async () => 'async result');\n    expect(result).toBe('async result');\n  });\n\n  it('should throw error when no valid value exists', async () => {\n    await expect(resolveFallback(null, null)).rejects.toThrow('No valid value found');\n  });\n});\n"
  },
  {
    "path": "packages/create-granite-app/src/resolveFallback.ts",
    "content": "type Argument<T> = T | (() => T | Promise<T>) | null;\n\nexport async function resolveFallback<T>(...args: Argument<T>[]): Promise<T> {\n  for (const arg of args) {\n    if (arg === null) {\n      continue;\n    }\n    if (typeof arg !== 'function') {\n      return arg;\n    }\n\n    const result = await (arg as () => T | Promise<T>)();\n    return result;\n  }\n  throw new Error('No valid value found');\n}\n"
  },
  {
    "path": "packages/create-granite-app/src/transformTemplate.spec.ts",
    "content": "import { expect, it, describe } from 'vitest';\nimport { transformTemplate } from './transformTemplate';\n\ndescribe('transformTemplate', () => {\n  it('단일 플레이스홀더를 올바르게 대체해야 합니다', () => {\n    const result = transformTemplate('안녕하세요 %%name%%님', { name: '홍길동' });\n    expect(result).toBe('안녕하세요 홍길동님');\n  });\n\n  it('여러 플레이스홀더를 올바르게 대체해야 합니다', () => {\n    const result = transformTemplate('안녕하세요 %%name%%님, 당신의 나이는 %%age%%살 입니다.', {\n      name: '홍길동',\n      age: '20',\n    });\n    expect(result).toBe('안녕하세요 홍길동님, 당신의 나이는 20살 입니다.');\n  });\n\n  it('동일한 플레이스홀더가 여러번 나타나는 경우 모두 대체해야 합니다', () => {\n    const result = transformTemplate('%%name%%님 안녕하세요, %%name%%님을 다시 만나뵙게 되어 기쁩니다.', {\n      name: '홍길동',\n    });\n    expect(result).toBe('홍길동님 안녕하세요, 홍길동님을 다시 만나뵙게 되어 기쁩니다.');\n  });\n\n  it('플레이스홀더가 없는 문자열은 그대로 반환해야 합니다', () => {\n    const result = transformTemplate('안녕하세요', {} as any);\n    expect(result).toBe('안녕하세요');\n  });\n});\n"
  },
  {
    "path": "packages/create-granite-app/src/transformTemplate.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype ExtractPlaceholders<T extends string> = T extends `${infer _Start}%%${infer Key}%%${infer Rest}`\n  ? Key | ExtractPlaceholders<Rest>\n  : never;\n\ntype TransformTemplateArgs<T extends string> = {\n  [Key in ExtractPlaceholders<T>]: string;\n};\n\n/**\n * 템플릿 문자열에서 %%key%% 형식의 플레이스홀더를 values 객체의 값으로 대체합니다.\n * 제네릭 타입 T를 통해 템플릿 문자열의 플레이스홀더 키를 자동으로 추론하여 타입 안정성을 보장합니다.\n *\n * @example\n * const str = \"안녕하세요 %%name%%님, 당신의 나이는 %%age%%살 입니다.\"\n * const result = transformTemplate(str, { name: \"홍길동\", age: \"20\" })\n * // 결과: \"안녕하세요 홍길동님, 당신의 나이는 20살 입니다.\"\n */\nexport function transformTemplate<T extends string>(templateString: T, values: TransformTemplateArgs<T>): string {\n  let result: string = templateString;\n  for (const key in values) {\n    const placeholder = `%%${key}%%`;\n    result = result.replace(new RegExp(placeholder, 'g'), (values as any)[key]);\n  }\n  return result;\n}\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/README.md",
    "content": "# Granite App\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/_gitignore",
    "content": "node_modules/\ndist/\nnpm-debug.log\n\n.yarn/*\n.pnp.*\nyarn-error.log\n!.yarn/patches\n!.yarn/plugins\n!.yarn/releases\n!.yarn/sdks\n!.yarn/versions\n\n.env\n.granite\n.swc\n.DS_Store\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/babel.config.js",
    "content": "module.exports = {\n  presets: ['babel-preset-granite'],\n};\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/granite.config.ts",
    "content": "import { router } from '@granite-js/plugin-router';\nimport { hermes } from '@granite-js/plugin-hermes';\nimport { defineConfig } from '@granite-js/react-native/config';\n\nexport default defineConfig({\n  appName: '%%appName%%',\n  scheme: 'granite',\n  plugins: [router(), hermes()],\n});\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/index.ts",
    "content": "import { register } from '@granite-js/react-native';\nimport App from './src/_app';\n\nregister(App);\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/jest.config.js",
    "content": "// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst path = require('path');\n\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst config = require('@granite-js/react-native/jest').config({\n  rootDir: __dirname,\n  moduleNameMapper: {\n    '@babel/runtime(.*)': `${path.dirname(require.resolve('@babel/runtime/package.json'))}$1`,\n  },\n});\n\nmodule.exports = config;\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/jest.setup.ts",
    "content": "import { setup } from '@granite-js/react-native/jest';\n\nsetup({ rootDir: __filename });\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/package.json",
    "content": "{\n  \"name\": \"%%appName%%\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"granite dev\",\n    \"build\": \"granite build\",\n    \"test\": \"jest --passWithNoTests\",\n    \"typecheck\": \"tsc --noEmit\"\n  },\n  \"dependencies\": {\n    \"@granite-js/react-native\": \"workspace:*\",\n    \"@granite-js/native\": \"workspace:*\",\n    \"brick-module\": \"0.5.1\",\n    \"react\": \"19.2.3\",\n    \"react-native\": \"0.84.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"7.28.5\",\n    \"@babel/runtime\": \"7.28.4\",\n    \"@testing-library/react-native\": \"13.3.3\",\n    \"@types/babel__core\": \"^7.20.5\",\n    \"@types/jest\": \"^29.5.14\",\n    \"@types/node\": \"^22.10.2\",\n    \"@types/react\": \"19.2.0\",\n    \"@types/react-test-renderer\": \"19.1.0\",\n    \"@granite-js/plugin-router\": \"workspace:*\",\n    \"@granite-js/plugin-hermes\": \"workspace:*\",\n    \"babel-preset-granite\": \"workspace:*\",\n    \"react-test-renderer\": \"19.2.3\",\n    \"jest\": \"^29.7.0\",\n    \"typescript\": \"^5.8.3\"\n  },\n  \"dependenciesMeta\": {\n    \"hermes-compiler\": {\n      \"unplugged\": true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/pages/_404.tsx",
    "content": "import React from 'react';\nimport { Text, View } from 'react-native';\n\nexport default function NotFoundPage() {\n  return (\n    <View\n      style={{\n        flex: 1,\n        alignItems: 'center',\n        justifyContent: 'center',\n      }}\n    >\n      <Text>404 Not Found</Text>\n    </View>\n  );\n}\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/pages/about.tsx",
    "content": "export { Route } from 'pages/about';\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/pages/index.tsx",
    "content": "export { Route } from 'pages/index';\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/react-native.config.js",
    "content": "/* eslint-disable @typescript-eslint/no-require-imports */\n/* eslint-disable @typescript-eslint/no-var-requires */\nmodule.exports = {\n  reactNativePath: require('path').dirname(require.resolve('react-native/package.json')),\n};\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/require.context.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const context = require.context('./pages');\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/src/_app.tsx",
    "content": "import React, { type PropsWithChildren } from 'react';\nimport { Granite, type InitialProps } from '@granite-js/react-native';\nimport { context } from '../require.context';\n\nfunction AppContainer({ children }: PropsWithChildren<InitialProps>) {\n  return <>{children}</>;\n}\n\nexport default Granite.registerApp(AppContainer, {\n  appName: '%%appName%%',\n  context,\n});\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/src/pages/about.tsx",
    "content": "import { createRoute } from '@granite-js/react-native';\nimport React from 'react';\nimport { StyleSheet, View, Text, TouchableOpacity } from 'react-native';\n\nexport const Route = createRoute('/about', {\n  component: Page,\n});\n\nfunction Page() {\n  const navigation = Route.useNavigation();\n\n  const handleGoBack = () => {\n    navigation.goBack();\n  };\n\n  return (\n    <View style={styles.container}>\n      <Text style={styles.title}>About Granite</Text>\n      <Text style={styles.description}>Granite is a powerful and flexible React Native Framework 🚀</Text>\n      <TouchableOpacity style={styles.button} onPress={handleGoBack}>\n        <Text style={styles.buttonText}>Go Back</Text>\n      </TouchableOpacity>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    padding: 24,\n    backgroundColor: '#F7FAFC',\n    alignItems: 'center',\n    justifyContent: 'center',\n  },\n  title: {\n    fontSize: 28,\n    fontWeight: 'bold',\n    color: '#1A202C',\n    marginBottom: 16,\n    textAlign: 'center',\n  },\n  description: {\n    fontSize: 18,\n    color: '#4A5568',\n    textAlign: 'center',\n    marginBottom: 12,\n    lineHeight: 26,\n  },\n  button: {\n    marginTop: 24,\n    backgroundColor: '#0064FF',\n    paddingVertical: 12,\n    paddingHorizontal: 32,\n    borderRadius: 8,\n    shadowColor: '#000',\n    shadowOffset: {\n      width: 0,\n      height: 2,\n    },\n    shadowOpacity: 0.25,\n    shadowRadius: 3.84,\n    elevation: 5,\n  },\n  buttonText: {\n    color: 'white',\n    fontSize: 16,\n    fontWeight: 'bold',\n    textAlign: 'center',\n  },\n});\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/src/pages/index.tsx",
    "content": "import { createRoute } from '@granite-js/react-native';\nimport React from 'react';\nimport { StyleSheet, View, Text, TouchableOpacity } from 'react-native';\n\nexport const Route = createRoute('/', {\n  component: Page,\n});\n\nfunction Page() {\n  const navigation = Route.useNavigation();\n\n  const goToAboutPage = () => {\n    navigation.navigate('/about');\n  };\n\n  return (\n    <Container>\n      <Text style={styles.title}>🎉 Welcome! 🎉</Text>\n      <Text style={styles.subtitle}>\n        This is a demo page for the <Text style={styles.brandText}>Granite</Text> Framework.\n      </Text>\n      <Text style={styles.description}>This page was created to showcase the features of the Granite.</Text>\n      <TouchableOpacity style={styles.button} onPress={goToAboutPage}>\n        <Text style={styles.buttonText}>Go to About Page</Text>\n      </TouchableOpacity>\n    </Container>\n  );\n}\n\nfunction Container({ children }: { children: React.ReactNode }) {\n  return <View style={styles.container}>{children}</View>;\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    padding: 16,\n    backgroundColor: 'white',\n    justifyContent: 'center',\n    alignItems: 'center',\n  },\n  brandText: {\n    color: '#0064FF',\n    fontWeight: 'bold',\n  },\n  text: {\n    fontSize: 24,\n    color: '#202632',\n    textAlign: 'center',\n    marginBottom: 10,\n  },\n  title: {\n    fontSize: 32,\n    fontWeight: 'bold',\n    color: '#1A202C',\n    textAlign: 'center',\n    marginBottom: 16,\n  },\n  subtitle: {\n    fontSize: 18,\n    color: '#4A5568',\n    textAlign: 'center',\n    marginBottom: 24,\n  },\n  description: {\n    fontSize: 16,\n    color: '#718096',\n    textAlign: 'center',\n    marginBottom: 32,\n    lineHeight: 24,\n  },\n  button: {\n    backgroundColor: '#0064FF',\n    paddingVertical: 12,\n    paddingHorizontal: 32,\n    borderRadius: 8,\n    shadowColor: '#000',\n    shadowOffset: {\n      width: 0,\n      height: 2,\n    },\n    shadowOpacity: 0.25,\n    shadowRadius: 3.84,\n    elevation: 5,\n  },\n  buttonText: {\n    color: 'white',\n    fontSize: 16,\n    fontWeight: 'bold',\n    textAlign: 'center',\n  },\n  codeContainer: {\n    padding: 8,\n    backgroundColor: '#333',\n    borderRadius: 4,\n    width: '100%',\n  },\n  code: {\n    color: 'white',\n    fontFamily: 'monospace',\n    letterSpacing: 0.5,\n    fontSize: 14,\n  },\n});\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/src/router.gen.ts",
    "content": "/* eslint-disable */\n// This file is auto-generated by @granite-js/react-native. DO NOT EDIT.\nimport { Route as _AboutRoute } from '../pages/about';\nimport { Route as _IndexRoute } from '../pages/';\n\ndeclare module '@granite-js/react-native' {\n  interface RegisterScreenInput {\n    '/about': (typeof _AboutRoute)['_inputType'];\n    '/': (typeof _IndexRoute)['_inputType'];\n  }\n\n  interface RegisterScreen {\n    '/about': (typeof _AboutRoute)['_outputType'];\n    '/': (typeof _IndexRoute)['_outputType'];\n  }\n}\n"
  },
  {
    "path": "packages/create-granite-app/templates/granite-app/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"rootDir\": \".\",\n    \"baseUrl\": \"src\",\n    \"target\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"lib\": [\"ESNext\"],\n    \"types\": [\"react-native\"],\n    \"jsx\": \"react-native\",\n    \"resolveJsonModule\": true,\n    \"esModuleInterop\": true,\n    \"isolatedModules\": true,\n    \"strict\": true,\n    \"allowJs\": true,\n    \"skipLibCheck\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noImplicitReturns\": true,\n    \"noUncheckedIndexedAccess\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true\n  },\n  \"include\": [\"**/*.ts\", \"**/*.tsx\"]\n}\n"
  },
  {
    "path": "packages/create-granite-app/tool-templates/biome/biome.json",
    "content": "{\n  \"$schema\": \"https://biomejs.dev/schemas/1.9.4/schema.json\",\n  \"organizeImports\": {\n    \"enabled\": true\n  },\n  \"vcs\": {\n    \"enabled\": true,\n    \"clientKind\": \"git\",\n    \"useIgnoreFile\": true\n  },\n  \"formatter\": {\n    \"indentStyle\": \"space\"\n  },\n  \"javascript\": {\n    \"formatter\": {\n      \"quoteStyle\": \"single\"\n    }\n  },\n  \"css\": {\n    \"parser\": {\n      \"cssModules\": true\n    }\n  },\n  \"linter\": {\n    \"enabled\": true,\n    \"rules\": {\n      \"recommended\": true\n    }\n  },\n  \"files\": {\n    \"include\": [\"src/**/*\", \"pages/**/*\"]\n  }\n}\n"
  },
  {
    "path": "packages/create-granite-app/tool-templates/biome/package.json",
    "content": "{\n  \"scripts\": {\n    \"lint\": \"biome check --write\"\n  },\n  \"devDependencies\": {\n    \"@biomejs/biome\": \"^1.9.4\"\n  }\n}\n"
  },
  {
    "path": "packages/create-granite-app/tool-templates/eslint-prettier/.prettierrc",
    "content": "{\n  \"printWidth\": 120,\n  \"singleQuote\": true,\n  \"trailingComma\": \"es5\"\n}\n"
  },
  {
    "path": "packages/create-granite-app/tool-templates/eslint-prettier/eslint.config.mjs",
    "content": "import pluginJs from '@eslint/js';\nimport tseslint from 'typescript-eslint';\nimport pluginReact from 'eslint-plugin-react';\n\n/** @type {import('eslint').Linter.Config[]} */\nexport default [\n  { ignores: ['**/node_modules/**', '**/dist/**', '*.{cjs,js}'] },\n  { files: ['pages/**/*.{ts,jsx,tsx}', 'src/**/*.{ts,jsx,tsx}'] },\n  pluginJs.configs.recommended,\n  ...tseslint.configs.recommended,\n  {\n    settings: {\n      react: {\n        version: 'detect',\n      },\n    },\n  },\n  pluginReact.configs.flat.recommended,\n];\n"
  },
  {
    "path": "packages/create-granite-app/tool-templates/eslint-prettier/package.json",
    "content": "{\n  \"scripts\": {\n    \"lint\": \"eslint .\"\n  },\n  \"devDependencies\": {\n    \"eslint\": \"^9.17.0\",\n    \"eslint-plugin-react\": \"^7.37.2\",\n    \"typescript-eslint\": \"^8.31.0\",\n    \"prettier\": \"3.4.2\",\n    \"@eslint/js\": \"^9.17.0\"\n  }\n}\n"
  },
  {
    "path": "packages/create-granite-app/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/create-granite-app/vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  cacheDir: '.vitest',\n  test: {\n    bail: 1,\n    globalSetup: './vitest.global-setup.mts',\n    include: ['src/**/*.spec.ts'],\n    testTimeout: 600_000,\n    hookTimeout: 600_000,\n  },\n});\n"
  },
  {
    "path": "packages/create-granite-app/vitest.global-setup.mts",
    "content": "import path from 'node:path';\nimport { $ } from 'execa';\n\nconst TARGET_PACKAGE_NAMES = [\n  'create-granite-app',\n  '@granite-js/react-native',\n  '@granite-js/native',\n  '@granite-js/plugin-router',\n  '@granite-js/plugin-hermes',\n  'babel-preset-granite',\n];\n\nconst rootDir = path.resolve(import.meta.dirname, '..', '..');\n\nexport default async () => {\n  console.log('\\n\\n👉 Packing...');\n\n  for (const packageName of TARGET_PACKAGE_NAMES) {\n    await $`../../bin/tools linked-pack ${packageName}`;\n  }\n\n  await $({ cwd: rootDir, shell: true })`git checkout -- packages/*/package.json`;\n\n  console.log('✅ Global setup completed successfully');\n};\n"
  },
  {
    "path": "packages/granite-screen/CHANGELOG.md",
    "content": "# @granite-js/screen\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n## 1.0.18\n\n## 1.0.17\n\n## 1.0.16\n\n## 1.0.15\n\n## 1.0.14\n\n## 1.0.13\n\n## 1.0.12\n\n## 1.0.11\n\n## 1.0.10\n\n## 1.0.9\n\n## 1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- 1cc53b9: fix(android): 16KB Page Size Support\n- 5445e88: feat(android): add file-path based bundle evaluation to reduce memory usage\n- 2b253fa: feat(android): Support additionalConfigurationSuffixes in GraniteRootExtension to extend React Native dependency substitution\n\n## 1.0.6\n\n## 1.0.5\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n### Patch Changes\n\n- ee26531: fix: align exports map\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "packages/granite-screen/GraniteScreen.podspec",
    "content": "Pod::Spec.new do |s|\n  s.name         = \"GraniteScreen\"\n  s.version      = \"1.0.0\"\n  s.summary      = \"Screen management module for Granite framework\"\n  s.description  = \"Provides GraniteViewController and related components for React Native integration\"\n  s.homepage     = \"https://github.com/toss/brick\"\n  s.license      = { :type => \"Apache-2.0\", :file => \"LICENSE\" }\n  s.author       = { \"Toss\" => \"opensource@toss.im\" }\n\n  s.platforms    = { :ios => '13.0' }\n  s.source       = { :path => \".\" }\n\n  s.source_files = \"ios/**/*.{h,m,mm,swift}\"\n  s.public_header_files = \"ios/**/*.h\"\n  s.private_header_files = \"ios/**/*+*.h\"\n\n  s.pod_target_xcconfig = {\n    'DEFINES_MODULE' => 'YES',\n    'OTHER_SWIFT_FLAGS' => \"-enable-experimental-feature AccessLevelOnImport\"\n  }\n\n  s.dependency \"ReactAppDependencyProvider\"\n  add_dependency(s, \"React-RCTAppDelegate\")\n  install_modules_dependencies(s)\nend\n"
  },
  {
    "path": "packages/granite-screen/LICENSE",
    "content": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n   \"License\" shall mean the terms and conditions for use, reproduction,\n   and distribution as defined by Sections 1 through 9 of this document.\n\n   \"Licensor\" shall mean the copyright owner or entity authorized by\n   the copyright owner that is granting the License.\n\n   \"Legal Entity\" shall mean the union of the acting entity and all\n   other entities that control, are controlled by, or are under common\n   control with that entity. For the purposes of this definition,\n   \"control\" means (i) the power, direct or indirect, to cause the\n   direction or management of such entity, whether by contract or\n   otherwise, or (ii) ownership of fifty percent (50%) or more of the\n   outstanding shares, or (iii) beneficial ownership of such entity.\n\n   \"You\" (or \"Your\") shall mean an individual or Legal Entity\n   exercising permissions granted by this License.\n\n   \"Source\" form shall mean the preferred form for making modifications,\n   including but not limited to software source code, documentation\n   source, and configuration files.\n\n   \"Object\" form shall mean any form resulting from mechanical\n   transformation or translation of a Source form, including but not\n   limited to compiled object code, generated documentation, and\n   conversions to other media types.\n\n   \"Work\" shall mean the work of authorship, whether in Source or\n   Object form, made available under the License, as indicated by a\n   copyright notice that is included in or attached to the work\n   (an example is provided in the Appendix below).\n\n   \"Derivative Works\" shall mean any work, whether in Source or Object\n   form, that is based on (or derived from) the Work and for which the\n   editorial revisions, annotations, elaborations, or other modifications\n   represent, as a whole, an original work of authorship. For the\n   purposes of this License, Derivative Works shall not include works\n   that remain separable from, or merely link (or bind by name) to the\n   interfaces of, the Work and Derivative Works thereof.\n\n   \"Contribution\" shall mean any work of authorship, including\n   the original version of the Work and any modifications or additions\n   to that Work or Derivative Works thereof, that is intentionally\n   submitted to Licensor for inclusion in the Work by the copyright owner\n   or by an individual or Legal Entity authorized to submit on behalf of\n   the copyright owner. For the purposes of this definition, \"submitted\"\n   means any form of electronic, verbal, or written communication sent\n   to the Licensor or its representatives, including but not limited to\n   communication on electronic mailing lists, source code control systems,\n   and issue tracking systems that are managed by, or on behalf of, the\n   Licensor for the purpose of discussing and improving the Work, but\n   excluding communication that is conspicuously marked or otherwise\n   designated in writing by the copyright owner as \"Not a Contribution.\"\n\n   \"Contributor\" shall mean Licensor and any individual or Legal Entity\n   on behalf of whom a Contribution has been received by Licensor and\n   subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   copyright license to reproduce, prepare Derivative Works of,\n   publicly display, publicly perform, sublicense, and distribute the\n   Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   (except as stated in this section) patent license to make, have made,\n   use, offer to sell, sell, import, and otherwise transfer the Work,\n   where such license applies only to those patent claims licensable\n   by such Contributor that are necessarily infringed by their\n   Contribution(s) alone or by combination of their Contribution(s)\n   with the Work to which such Contribution(s) was submitted. If You\n   institute patent litigation against any entity (including a\n   cross-claim or counterclaim in a lawsuit) alleging that the Work\n   or a Contribution incorporated within the Work constitutes direct\n   or contributory patent infringement, then any patent licenses\n   granted to You under this License for that Work shall terminate\n   as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n   Work or Derivative Works thereof in any medium, with or without\n   modifications, and in Source or Object form, provided that You\n   meet the following conditions:\n\n   (a) You must give any other recipients of the Work or\n       Derivative Works a copy of this License; and\n\n   (b) You must cause any modified files to carry prominent notices\n       stating that You changed the files; and\n\n   (c) You must retain, in the Source form of any Derivative Works\n       that You distribute, all copyright, patent, trademark, and\n       attribution notices from the Source form of the Work,\n       excluding those notices that do not pertain to any part of\n       the Derivative Works; and\n\n   (d) If the Work includes a \"NOTICE\" text file as part of its\n       distribution, then any Derivative Works that You distribute must\n       include a readable copy of the attribution notices contained\n       within such NOTICE file, excluding those notices that do not\n       pertain to any part of the Derivative Works, in at least one\n       of the following places: within a NOTICE text file distributed\n       as part of the Derivative Works; within the Source form or\n       documentation, if provided along with the Derivative Works; or,\n       within a display generated by the Derivative Works, if and\n       wherever such third-party notices normally appear. The contents\n       of the NOTICE file are for informational purposes only and\n       do not modify the License. You may add Your own attribution\n       notices within Derivative Works that You distribute, alongside\n       or as an addendum to the NOTICE text from the Work, provided\n       that such additional attribution notices cannot be construed\n       as modifying the License.\n\n   You may add Your own copyright statement to Your modifications and\n   may provide additional or different license terms and conditions\n   for use, reproduction, or distribution of Your modifications, or\n   for any such Derivative Works as a whole, provided Your use,\n   reproduction, and distribution of the Work otherwise complies with\n   the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n   any Contribution intentionally submitted for inclusion in the Work\n   by You to the Licensor shall be under the terms and conditions of\n   this License, without any additional terms or conditions.\n   Notwithstanding the above, nothing herein shall supersede or modify\n   the terms of any separate license agreement you may have executed\n   with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n   names, trademarks, service marks, or product names of the Licensor,\n   except as required for reasonable and customary use in describing the\n   origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n   agreed to in writing, Licensor provides the Work (and each\n   Contributor provides its Contributions) on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n   implied, including, without limitation, any warranties or conditions\n   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n   PARTICULAR PURPOSE. You are solely responsible for determining the\n   appropriateness of using or redistributing the Work and assume any\n   risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n   whether in tort (including negligence), contract, or otherwise,\n   unless required by applicable law (such as deliberate and grossly\n   negligent acts) or agreed to in writing, shall any Contributor be\n   liable to You for damages, including any direct, indirect, special,\n   incidental, or consequential damages of any character arising as a\n   result of this License or out of the use or inability to use the\n   Work (including but not limited to damages for loss of goodwill,\n   work stoppage, computer failure or malfunction, or any and all\n   other commercial damages or losses), even if such Contributor\n   has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n   the Work or Derivative Works thereof, You may choose to offer,\n   and charge a fee for, acceptance of support, warranty, indemnity,\n   or other liability obligations and/or rights consistent with this\n   License. However, in accepting such obligations, You may act only\n   on Your own behalf and on Your sole responsibility, not on behalf\n   of any other Contributor, and only if You agree to indemnify,\n   defend, and hold each Contributor harmless for any liability\n   incurred by, or claims asserted against, such Contributor by reason\n   of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n   To apply the Apache License to your work, attach the following\n   boilerplate notice, with the fields enclosed by brackets \"[]\"\n   replaced with your own identifying information. (Don't include\n   the brackets!)  The text should be enclosed in the appropriate\n   comment syntax for the file format. We also recommend that a\n   file or class name and description of purpose be included on the\n   same \"printed page\" as the copyright notice for easier\n   identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n"
  },
  {
    "path": "packages/granite-screen/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/screen\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@granite-js/screen**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/granite-screen/android/CMakeLists.txt",
    "content": "project(granite-screen)\ncmake_minimum_required(VERSION 3.9.0)\n\nset(PACKAGE_NAME \"granite-screen\")\nset(BUILD_DIR ${CMAKE_SOURCE_DIR}/build)\nset(CMAKE_VERBOSE_MAKEFILE ON)\nset(CMAKE_CXX_STANDARD 17)\n\nadd_library(\n        ${PACKAGE_NAME}\n        SHARED\n        src/main/cpp/onLoad.cpp\n        src/main/cpp/BundleEvaluator.cpp\n        src/main/cpp/FileReader.cpp\n)\n\n# Configure C++ 17\nset_target_properties(\n        ${PACKAGE_NAME}\n        PROPERTIES\n        CXX_STANDARD 17\n        CXX_EXTENSIONS OFF\n        POSITION_INDEPENDENT_CODE ON\n        LINKER_LANGUAGE CXX\n)\n\n\nfind_package(fbjni REQUIRED CONFIG)\nfind_package(ReactAndroid REQUIRED CONFIG)\n\ntarget_include_directories(\n        ${PACKAGE_NAME}\n        PRIVATE\n        \"src/main/cpp\"\n        \"${REACT_NATIVE_DIR}/ReactCommon\"\n        \"${REACT_NATIVE_DIR}/ReactCommon/callinvoker\"\n        \"${REACT_NATIVE_DIR}/ReactAndroid/src/main/jni/react/turbomodule\"\n)\n# REACT_NATIVE_MERGED_SO is not set properly\n# use version check instead\nif(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)\n        target_link_libraries(\n                ${PACKAGE_NAME}\n                ReactAndroid::reactnative\n        )\nelse()\n        target_link_libraries(\n                ${PACKAGE_NAME}\n                ReactAndroid::reactnativejni\n        )\nendif()\n\ntarget_link_libraries(\n        ${PACKAGE_NAME}\n        android\n        fbjni::fbjni\n        ReactAndroid::jsi\n)\n\n# Enable Android 16kb native library alignment\nif(CMAKE_ANDROID_NDK_VERSION VERSION_LESS \"27\")\n        target_link_options(${PACKAGE_NAME} PRIVATE \"-Wl,-z,max-page-size=16384\")\nendif()\n"
  },
  {
    "path": "packages/granite-screen/android/build.gradle",
    "content": "apply plugin: 'com.android.library'\napply plugin: 'kotlin-android'\n\nandroid {\n    namespace \"run.granite\"\n    compileSdkVersion 35\n\n    sourceSets {\n        main {\n            manifest.srcFile 'src/main/AndroidManifest.xml'\n        }\n    }\n\n    defaultConfig {\n        minSdkVersion 24\n        targetSdkVersion 35\n        versionCode 1\n        versionName \"1.0\"\n\n        externalNativeBuild {\n            cmake {\n                arguments \"-DANDROID_STL=c++_shared\"\n            }\n        }\n    }\n\n    buildFeatures {\n        buildConfig true\n        prefab true\n    }\n\n    externalNativeBuild {\n        cmake {\n            path \"CMakeLists.txt\"\n        }\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_17\n        targetCompatibility JavaVersion.VERSION_17\n    }\n\n    kotlinOptions {\n        jvmTarget = '17'\n    }\n}\n\ndependencies {\n    api 'com.facebook.react:react-android:+'\n    implementation 'com.facebook.fbjni:fbjni:+'\n    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22'\n    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'\n    implementation 'com.google.code.gson:gson:2.8.9'\n    implementation 'androidx.annotation:annotation:1.5.0'\n    implementation project(':brick-module')\n}"
  },
  {
    "path": "packages/granite-screen/android/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n</manifest>"
  },
  {
    "path": "packages/granite-screen/android/src/main/cpp/BundleEvaluator.cpp",
    "content": "#include \"BundleEvaluator.h\"\n#include \"FileReader.h\"\n#include <fbjni/fbjni.h>\n\nvoid BundleEvaluator::registerNatives() {\n  registerHybrid({\n      makeNativeMethod(\"evaluateJavascriptSync\", BundleEvaluator::evaluateJavascriptSync),\n      makeNativeMethod(\"evaluateFileSync\", BundleEvaluator::evaluateFileSync)\n  });\n}\n\nvoid BundleEvaluator::evaluateJavascriptSync(\n    jni::alias_ref<jhybridobject> jThis,\n    jlong jsRuntime,\n    jni::alias_ref<JArrayByte> code,\n    jni::alias_ref<JString> url) {\n  auto pinnedCode = code->pin();\n  jbyte *sourcePtr = pinnedCode.get();\n  size_t sourceSize = pinnedCode.size();\n\n  // Use initializer list for source and sourceUrl\n  std::string source{reinterpret_cast<const char *>(sourcePtr), sourceSize};\n  std::string sourceUrl = url->toString();\n\n  if (jsRuntime == 0) {\n    return;\n  }\n  auto rt = reinterpret_cast<jsi::Runtime *>(jsRuntime);\n  rt->evaluateJavaScript(std::make_unique<jsi::StringBuffer>(std::move(source)), std::move(sourceUrl));\n};\n\nvoid BundleEvaluator::evaluateFileSync(\n    jni::alias_ref<jhybridobject> jThis,\n    jlong jsRuntime,\n    jni::alias_ref<JString> filePath,\n    jni::alias_ref<JString> url) {\n\n  if (jsRuntime == 0) {\n    jni::throwNewJavaException(\n        \"java/lang/IllegalStateException\",\n        \"JS runtime is not available\");\n    return;\n  }\n\n  std::string path = filePath->toStdString();\n  std::string sourceUrl = url->toStdString();\n\n  std::string source;\n  try {\n    source = granite::io::ReadFileToString(path);\n  } catch (const granite::io::FileReaderError& e) {\n    switch (e.kind()) {\n      case granite::io::ErrorKind::kNotFound:\n        jni::throwNewJavaException(\n            \"java/io/FileNotFoundException\", \"%s\", e.what());\n        break;\n      case granite::io::ErrorKind::kStatFailed:\n      case granite::io::ErrorKind::kReadFailed:\n        jni::throwNewJavaException(\n            \"java/io/IOException\", \"%s\", e.what());\n        break;\n      case granite::io::ErrorKind::kAllocationFailed:\n        jni::throwNewJavaException(\n            \"java/lang/OutOfMemoryError\", \"%s\", e.what());\n        break;\n    }\n    return;\n  }\n\n  if (source.empty()) {\n    jni::throwNewJavaException(\n        \"java/io/IOException\",\n        \"Bundle file is empty: %s\", path.c_str());\n    return;\n  }\n\n  auto rt = reinterpret_cast<jsi::Runtime *>(jsRuntime);\n  rt->evaluateJavaScript(\n      std::make_unique<jsi::StringBuffer>(std::move(source)),\n      std::move(sourceUrl));\n}\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/cpp/BundleEvaluator.h",
    "content": "#include <fbjni/fbjni.h>\n#include <jsi/jsi.h>\n\nusing namespace facebook;\nusing namespace facebook::jni;\n\n/**\n * BundleEvaluator - JNI bridge for evaluating JavaScript bundles on the JSI runtime.\n *\n * Provides two evaluation methods:\n * - evaluateJavascriptSync: Accepts a Java byte array (from Kotlin ByteArray).\n *   Peak memory: 2N (Java array + native std::string copy).\n * - evaluateFileSync: Accepts a file path string, reads file via POSIX read() (not mmap).\n *   Peak memory: N (native std::string only, no Java heap allocation for bundle data).\n *\n * WARNING: Thread Safety\n * Both methods execute JavaScript synchronously on the calling thread via a raw\n * jsi::Runtime pointer. The caller must ensure they are on the JS thread.\n * Unlike iOS (which uses callInvoker->invokeAsync), Android performs no automatic\n * thread dispatch.\n *\n * Note: This class is for custom bundle evaluation outside the standard\n * BundleLoader -> ReactHostFactory -> JSBundleLoader path.\n */\nstruct BundleEvaluator : public jni::HybridClass<BundleEvaluator> {\n  static constexpr auto kJavaDescriptor = \"Lrun/granite/BundleEvaluator;\";\n\n  static void registerNatives();\n\n  /** Evaluates JavaScript from a Java byte array. Pins the array, copies to std::string, then evaluates. */\n  static void evaluateJavascriptSync(\n      jni::alias_ref<jhybridobject> jThis,\n      jlong jsRuntime,\n      jni::alias_ref<JArrayByte> code,\n      jni::alias_ref<JString> url);\n\n  /** Evaluates JavaScript from a file path. Reads file via POSIX open()/read() into native memory. */\n  static void evaluateFileSync(\n      jni::alias_ref<jhybridobject> jThis,\n      jlong jsRuntime,\n      jni::alias_ref<JString> filePath,\n      jni::alias_ref<JString> url);\n};\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/cpp/FileReader.cpp",
    "content": "#include \"FileReader.h\"\n\n#include <cerrno>\n#include <cstring>\n#include <fcntl.h>\n#include <sys/stat.h>\n#include <unistd.h>\n\nnamespace granite {\nnamespace io {\n\nFdGuard::~FdGuard() {\n  if (fd >= 0) close(fd);\n}\n\nFileReaderError::FileReaderError(ErrorKind kind, const std::string& message,\n                                 int errno_value)\n    : std::runtime_error(message), kind_(kind), errno_value_(errno_value) {}\n\nstd::string ReadFileToString(const std::string& path) {\n  int fd = open(path.c_str(), O_RDONLY);\n  if (fd < 0) {\n    int saved_errno = errno;\n    throw FileReaderError(\n        ErrorKind::kNotFound,\n        \"Cannot open file: \" + path + \" (errno: \" +\n            std::to_string(saved_errno) + \", \" + strerror(saved_errno) + \")\",\n        saved_errno);\n  }\n  FdGuard guard{fd};\n\n  struct stat st;\n  if (fstat(fd, &st) < 0) {\n    int saved_errno = errno;\n    throw FileReaderError(\n        ErrorKind::kStatFailed,\n        \"Cannot stat file: \" + path + \" (errno: \" +\n            std::to_string(saved_errno) + \", \" + strerror(saved_errno) + \")\",\n        saved_errno);\n  }\n\n  size_t file_size = static_cast<size_t>(st.st_size);\n  if (file_size == 0) {\n    return std::string();\n  }\n\n  std::string source;\n  try {\n    source.resize(file_size);\n  } catch (const std::bad_alloc&) {\n    throw FileReaderError(\n        ErrorKind::kAllocationFailed,\n        \"Cannot allocate \" + std::to_string(file_size) +\n            \" bytes for file: \" + path);\n  }\n\n  size_t total_read = 0;\n  while (total_read < file_size) {\n    ssize_t bytes_read =\n        read(fd, &source[total_read], file_size - total_read);\n    if (bytes_read < 0) {\n      if (errno == EINTR) continue;\n      int saved_errno = errno;\n      throw FileReaderError(\n          ErrorKind::kReadFailed,\n          \"Error reading file: \" + path + \" at offset \" +\n              std::to_string(total_read) + \" (errno: \" +\n              std::to_string(saved_errno) + \", \" +\n              strerror(saved_errno) + \")\",\n          saved_errno);\n    }\n    if (bytes_read == 0) break;\n    total_read += static_cast<size_t>(bytes_read);\n  }\n\n  if (total_read < file_size) {\n    source.resize(total_read);\n  }\n\n  return source;\n}\n\n}  // namespace io\n}  // namespace granite\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/cpp/FileReader.h",
    "content": "#ifndef GRANITE_IO_FILE_READER_H_\n#define GRANITE_IO_FILE_READER_H_\n\n#include <string>\n#include <stdexcept>\n\nnamespace granite {\nnamespace io {\n\n// RAII guard for POSIX file descriptors.\n// Closes the fd on destruction. Non-copyable, non-movable (stack-local usage only).\nstruct FdGuard {\n  int fd;\n  explicit FdGuard(int f) : fd(f) {}\n  ~FdGuard();\n  FdGuard(const FdGuard&) = delete;\n  FdGuard& operator=(const FdGuard&) = delete;\n};\n\n// Classification of file-reading errors.\nenum class ErrorKind {\n  kNotFound,          // open() failed (ENOENT, EACCES, etc.)\n  kStatFailed,        // fstat() failed\n  kAllocationFailed,  // std::bad_alloc during buffer allocation\n  kReadFailed         // read() failed\n};\n\n// Error thrown by readFileToString() with a machine-readable ErrorKind\n// and the originating errno value.\nclass FileReaderError : public std::runtime_error {\n public:\n  FileReaderError(ErrorKind kind, const std::string& message,\n                  int errno_value = 0);\n\n  ErrorKind kind() const { return kind_; }\n  int errno_value() const { return errno_value_; }\n\n private:\n  ErrorKind kind_;\n  int errno_value_;\n};\n\n// Reads the entire contents of |path| into a std::string.\n//\n// Returns an empty string for zero-byte files (callers decide whether\n// that is an error — e.g., BundleEvaluator treats it as IOException).\n//\n// Throws FileReaderError on failure:\n//   kNotFound          — open() failed\n//   kStatFailed        — fstat() failed\n//   kAllocationFailed  — could not allocate buffer\n//   kReadFailed        — read() failed (after EINTR retries)\nstd::string ReadFileToString(const std::string& path);\n\n}  // namespace io\n}  // namespace granite\n\n#endif  // GRANITE_IO_FILE_READER_H_\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/cpp/onLoad.cpp",
    "content": "#include <fbjni/fbjni.h>\n#include \"BundleEvaluator.h\"\n\nJNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {\n  return facebook::jni::initialize(vm, [] { BundleEvaluator::registerNatives(); });\n}\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/kotlin/run/granite/BundleEvaluator.kt",
    "content": "package run.granite\n\nimport com.facebook.react.bridge.ReactContext\nimport com.facebook.react.common.annotations.FrameworkAPI\nimport java.io.File\nimport java.io.FileNotFoundException\nimport java.io.IOException\n\n/**\n * Evaluates JavaScript bundles directly on the JSI runtime, outside the standard\n * BundleLoader -> ReactHostFactory -> JSBundleLoader path.\n *\n * Two evaluation modes are provided:\n * - [evaluate]: Accepts an in-memory [ByteArray]. Peak memory: 2N (Java heap + native heap copy).\n * - [evaluateFile]: Accepts a file-system path. Peak memory: N (native heap only, no Java heap\n *   allocation for bundle data; file is read via POSIX read(), not mmap).\n *\n * **WARNING: Thread Safety**\n * Both methods execute JavaScript synchronously on the calling thread via a raw JSI runtime\n * pointer. The caller must ensure they are on the JS thread before invoking either method.\n * Unlike iOS (which uses `callInvoker->invokeAsync`), Android performs no automatic thread\n * dispatch.\n */\n@OptIn(FrameworkAPI::class)\nclass BundleEvaluator(\n    private val reactContext: ReactContext,\n) {\n    private external fun evaluateJavascriptSync(\n        jsRuntime: Long,\n        code: ByteArray,\n        url: String,\n    )\n\n    private external fun evaluateFileSync(\n        jsRuntime: Long,\n        filePath: String,\n        url: String,\n    )\n\n    /**\n     * Evaluates JavaScript from an in-memory byte array.\n     *\n     * Peak memory usage: 2N — the Java [ByteArray] is pinned on the Java heap while a copy is\n     * made into a native `std::string`, resulting in two full-size allocations during evaluation.\n     *\n     * @param script The JavaScript source code as a byte array.\n     * @param url The source URL used for stack traces and error reporting.\n     */\n    fun evaluate(\n        script: ByteArray,\n        url: String,\n    ) {\n        val jsRuntime =\n            reactContext.javaScriptContextHolder?.get()\n                ?: throw IllegalStateException(\"javaScriptContextHolder is null.\")\n\n        evaluateJavascriptSync(jsRuntime, script, url)\n    }\n\n    /**\n     * Evaluates JavaScript from a file on the file system.\n     *\n     * Peak memory usage: N — the file is read directly into native memory via POSIX `read()`\n     * (not `mmap`), so no Java heap allocation is needed for the bundle data itself.\n     *\n     * @param filePath Absolute path to the JavaScript bundle file.\n     * @param url The source URL used for stack traces and error reporting.\n     * @throws FileNotFoundException if the file does not exist at [filePath].\n     * @throws IOException if the file exists but cannot be read (e.g., permission denied).\n     */\n    @Throws(FileNotFoundException::class, IOException::class)\n    fun evaluateFile(filePath: String, url: String) {\n        val file = File(filePath)\n        if (!file.exists()) {\n            throw FileNotFoundException(\"Bundle file not found: $filePath\")\n        }\n        if (!file.canRead()) {\n            throw IOException(\"Bundle file not readable (permission denied): $filePath\")\n        }\n        val jsRuntime =\n            reactContext.javaScriptContextHolder?.get()\n                ?: throw IllegalStateException(\"javaScriptContextHolder is null.\")\n        evaluateFileSync(jsRuntime, filePath, url)\n    }\n\n    companion object {\n        init {\n            // Loads the native granite-screen library containing the JNI evaluateJavascriptSync method.\n            // WARNING: This will throw UnsatisfiedLinkError if the native library is not available\n            // (e.g., in unit tests without native dependencies). Use Robolectric or mock this class\n            // in unit test environments.\n            System.loadLibrary(\"granite-screen\")\n        }\n\n        /**\n         * Convenience method to evaluate JavaScript from an in-memory byte array.\n         *\n         * Peak memory usage: 2N (Java heap + native heap copy). See [BundleEvaluator.evaluate].\n         *\n         * @param scriptData The JavaScript source code as a byte array.\n         * @param url The source URL used for stack traces and error reporting.\n         * @param reactContext The React context containing the JSI runtime.\n         */\n        fun evaluate(\n            scriptData: ByteArray,\n            url: String,\n            reactContext: ReactContext,\n        ) {\n            BundleEvaluator(reactContext).evaluate(scriptData, url)\n        }\n\n        /**\n         * Convenience method to evaluate JavaScript from a file on the file system.\n         *\n         * Peak memory usage: N (native heap only). See [BundleEvaluator.evaluateFile].\n         *\n         * @param filePath Absolute path to the JavaScript bundle file.\n         * @param url The source URL used for stack traces and error reporting.\n         * @param reactContext The React context containing the JSI runtime.\n         */\n        fun evaluateFile(\n            filePath: String,\n            url: String,\n            reactContext: ReactContext,\n        ) {\n            BundleEvaluator(reactContext).evaluateFile(filePath, url)\n        }\n    }\n}\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/kotlin/run/granite/BundleLoader.kt",
    "content": "package run.granite\n\n/**\n * Interface for loading React Native bundles from various sources Implementations can provide\n * different loading strategies (CDN, local, etc.)\n */\ninterface BundleLoader {\n    /** Load a bundle and return the source information. */\n    suspend fun loadBundle(): BundleSource\n}\n\n/** Represents the source of a React Native bundle */\nsealed class BundleSource {\n    /** The React component name registered via AppRegistry.registerComponent(). */\n    abstract val componentName: String?\n\n    /** Development mode: Bundle served from Metro bundler */\n    data class DevServer(\n        val host: String = \"localhost\",\n        val port: Int = 8081,\n        override val componentName: String? = null,\n    ) : BundleSource()\n\n    /** Production mode: Bundle from CDN or APK */\n    data class Production(\n        val location: ProductionLocation,\n        override val componentName: String? = null,\n    ) : BundleSource()\n}\n\n/** Represents the location of a production bundle */\nsealed class ProductionLocation {\n    /** @param path Local file path after download */\n    data class FileSystemBundle(\n        val filePath: String,\n    ) : ProductionLocation()\n\n    /** Bundle embedded in APK assets */\n    data object EmbeddedBundle : ProductionLocation()\n}\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/kotlin/run/granite/DefaultBundleLoader.kt",
    "content": "package run.granite\n\n/**\n * Default BundleLoader implementation matching the iOS example.\n * - DEBUG: loads from Metro dev server (localhost:8081)\n * - RELEASE: uses embedded APK asset bundle\n */\nclass DefaultBundleLoader(\n    private val moduleName: String,\n) : BundleLoader {\n    override suspend fun loadBundle(): BundleSource =\n        if (BuildConfig.DEBUG) {\n            BundleSource.DevServer(host = \"localhost\", port = 8081, componentName = moduleName)\n        } else {\n            BundleSource.Production(\n                location = ProductionLocation.EmbeddedBundle,\n                componentName = moduleName,\n            )\n        }\n}\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/kotlin/run/granite/DefaultErrorView.kt",
    "content": "package run.granite\n\nimport android.content.Context\nimport android.graphics.Color\nimport android.view.Gravity\nimport android.widget.FrameLayout\nimport android.widget.ScrollView\nimport android.widget.TextView\n\n/**\n * Default error view displayed when React Native bundle loading fails Shows the error message in a\n * scrollable view\n */\nclass DefaultErrorView(\n    context: Context,\n    error: Throwable,\n) : FrameLayout(context) {\n    init {\n        // Set white background\n        setBackgroundColor(Color.WHITE)\n\n        // Create scroll view for long error messages\n        val scrollView = ScrollView(context)\n\n        // Create error text view\n        val errorTextView =\n            TextView(context).apply {\n                text =\n                    buildString {\n                        appendLine(\"Failed to load React Native bundle\")\n                        appendLine()\n                        appendLine(\"Error: ${error.message ?: error.javaClass.simpleName}\")\n\n                        // Add stack trace in debug builds\n                        if (BuildConfig.DEBUG) {\n                            appendLine()\n                            appendLine(\"Stack trace:\")\n                            error.stackTraceToString().lines().take(10).forEach { line ->\n                                appendLine(line)\n                            }\n                        }\n                    }\n                textSize = 14f\n                setTextColor(Color.rgb(220, 38, 38)) // Red color\n                setPadding(32, 32, 32, 32)\n            }\n\n        scrollView.addView(errorTextView)\n\n        val params =\n            LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT).apply {\n                gravity = Gravity.CENTER\n                setMargins(16, 16, 16, 16)\n            }\n\n        addView(scrollView, params)\n    }\n}\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/kotlin/run/granite/DefaultLoadingView.kt",
    "content": "package run.granite\n\nimport android.content.Context\nimport android.graphics.Color\nimport android.view.Gravity\nimport android.widget.FrameLayout\nimport android.widget.ProgressBar\nimport android.widget.TextView\n\n/**\n * Default loading view displayed while React Native bundle is loading Shows a progress indicator\n * and loading message\n */\nclass DefaultLoadingView(\n    context: Context,\n) : FrameLayout(context) {\n    init {\n        // Set white background\n        setBackgroundColor(Color.WHITE)\n\n        // Create and add progress indicator\n        val progressBar = ProgressBar(context).apply { isIndeterminate = true }\n\n        val progressParams =\n            LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT).apply {\n                gravity = Gravity.CENTER\n            }\n\n        addView(progressBar, progressParams)\n\n        // Create and add loading text\n        val loadingText =\n            TextView(context).apply {\n                text = DEFAULT_LOADING_TEXT\n                textSize = 16f\n                setTextColor(Color.GRAY)\n            }\n\n        val textParams =\n            LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT).apply {\n                gravity = Gravity.CENTER\n                topMargin = 120 // Place below progress bar\n            }\n\n        addView(loadingText, textParams)\n    }\n\n    companion object {\n        private const val DEFAULT_LOADING_TEXT = \"Loading...\"\n    }\n}\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/kotlin/run/granite/GraniteReactDelegate.kt",
    "content": "package run.granite\n\nimport android.os.Bundle\nimport android.view.View\nimport androidx.appcompat.app.AppCompatActivity\nimport com.facebook.react.ReactHost\nimport com.facebook.react.ReactPackage\nimport com.facebook.react.runtime.ReactSurfaceView\n\n/**\n * Delegate interface for Granite functionality. This allows integration with existing BaseActivity\n * implementations.\n */\ninterface GraniteReactDelegate {\n    // Lifecycle methods\n    fun onCreate(\n        activity: AppCompatActivity,\n        savedInstanceState: Bundle?,\n        initialProps: Bundle,\n    )\n\n    fun onResume(activity: AppCompatActivity)\n\n    fun onPause(activity: AppCompatActivity)\n\n    fun onDestroy(activity: AppCompatActivity)\n\n    // Configuration methods - these should be provided by the activity\n    fun setReactPackagesProvider(provider: () -> List<ReactPackage>)\n\n    fun setBundleLoaderProvider(provider: () -> BundleLoader)\n\n    // View creation methods - optional customization\n    fun setLoadingViewProvider(provider: (AppCompatActivity) -> View)\n\n    fun setErrorViewProvider(provider: (AppCompatActivity, Throwable) -> View)\n\n    fun setReactContainerProvider(provider: (AppCompatActivity) -> android.view.ViewGroup?)\n\n    // Consumer methods - for advanced view control\n\n    /**\n     * Set a consumer that will be called when loading starts.\n     * If not set, default loading view behavior is used.\n     */\n    fun setLoadingViewConsumer(consumer: () -> Unit)\n\n    /**\n     * Set a consumer that will receive the ReactSurface view when ready.\n     * Activity is responsible for adding this view to its layout.\n     * If not set, delegate will call setContentView() directly (fallback).\n     */\n    fun setSurfaceViewConsumer(consumer: (ReactSurfaceView) -> Unit)\n\n    /**\n     * Set a consumer that will be called when bundle loading fails.\n     * If not set, default error view behavior is used.\n     */\n    fun setErrorViewConsumer(consumer: (Throwable) -> Unit)\n\n    /**\n     * Start the ReactSurface. Call this after setting up the surface view in your layout.\n     * This triggers surface.start() and applies pending lifecycle states.\n     */\n    fun startReactSurface()\n\n    // Access methods\n    fun getReactHost(): ReactHost?\n\n    fun getBundleLoader(): BundleLoader?\n\n    fun isReady(): Boolean\n\n    // Surface management\n    fun getContentView(): View?\n}\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/kotlin/run/granite/GraniteReactDelegateImpl.kt",
    "content": "package run.granite\n\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.View\nimport android.widget.FrameLayout\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.core.view.ViewCompat\nimport androidx.core.view.WindowInsetsCompat\nimport androidx.lifecycle.lifecycleScope\nimport com.facebook.react.ReactHost\nimport com.facebook.react.ReactInstanceEventListener\nimport com.facebook.react.ReactPackage\nimport com.facebook.react.bridge.ReactContext\nimport com.facebook.react.common.annotations.UnstableReactNativeAPI\nimport com.facebook.react.fabric.ComponentFactory\nimport com.facebook.react.interfaces.fabric.ReactSurface\nimport com.facebook.react.modules.core.DefaultHardwareBackBtnHandler\nimport com.facebook.react.runtime.ReactSurfaceView\nimport kotlinx.coroutines.launch\nimport java.lang.ref.WeakReference\n\n/** Default implementation of GraniteReactDelegate. Manages ReactHost, ReactSurface */\n@OptIn(UnstableReactNativeAPI::class)\nclass GraniteReactDelegateImpl : GraniteReactDelegate {\n    // Lifecycle state enum to track pending state when ReactHost is null\n    private enum class LifecycleState {\n        BEFORE_CREATE,\n        CREATED,\n        RESUMED,\n        PAUSED,\n        DESTROYED,\n    }\n\n    private var reactHost: ReactHost? = null\n    private var reactSurface: ReactSurface? = null\n    private var currentBundleSource: BundleSource? = null\n    private var currentBundleLoader: BundleLoader? = null\n    private var contentView: View? = null\n    private var componentFactory: ComponentFactory? = null\n    private var reactInstanceEventListener: ReactInstanceEventListener? = null\n\n    // Track pending lifecycle state for when ReactHost is created asynchronously\n    private var pendingLifecycleState: LifecycleState = LifecycleState.BEFORE_CREATE\n\n    // Use WeakReference to prevent Activity memory leak\n    private var pendingActivityRef: WeakReference<AppCompatActivity>? = null\n    private val pendingActivity: AppCompatActivity?\n        get() = pendingActivityRef?.get()\n\n    // Provider functions - to be set by the activity\n    private var reactPackagesProvider: (() -> List<ReactPackage>)? = null\n    private var bundleLoaderProvider: (() -> BundleLoader)? = null\n    private var loadingViewProvider: ((AppCompatActivity) -> View)? = null\n    private var errorViewProvider: ((AppCompatActivity, Throwable) -> View)? = null\n    private var reactContainerProvider: ((AppCompatActivity) -> android.view.ViewGroup?)? = null\n\n    // Consumer functions - for advanced view control\n    private var loadingViewConsumer: (() -> Unit)? = null\n    private var surfaceViewConsumer: ((ReactSurfaceView) -> Unit)? = null\n    private var errorViewConsumer: ((Throwable) -> Unit)? = null\n\n    override fun onCreate(\n        activity: AppCompatActivity,\n        savedInstanceState: Bundle?,\n        initialProps: Bundle,\n    ) {\n        // Track lifecycle state\n        pendingLifecycleState = LifecycleState.CREATED\n        pendingActivityRef = WeakReference(activity)\n\n        // Get packages\n        val packages = reactPackagesProvider?.invoke() ?: emptyList()\n\n        Log.d(TAG, \"Using ${packages.size} React packages\")\n        packages.forEach { pkg ->\n            Log.d(TAG, \"- ${pkg.javaClass.simpleName}\")\n        }\n\n        if (BuildConfig.DEBUG) {\n            Log.d(TAG, \"Running in debug mode\")\n        }\n\n        // Require BundleLoader\n        val bundleLoader =\n            bundleLoaderProvider?.invoke()\n                ?: throw IllegalStateException(\"BundleLoader provider not set\")\n        currentBundleLoader = bundleLoader\n\n        // Show loading view and start bundle loading\n        // Use consumer if set, otherwise use provider/default\n        loadingViewConsumer?.invoke()\n            ?: run {\n                val loadingView =\n                    loadingViewProvider?.invoke(activity) ?: DefaultLoadingView(activity)\n                contentView = loadingView\n                activity.setContentView(loadingView)\n            }\n\n        loadBundleWithLoader(activity, bundleLoader, initialProps)\n    }\n\n    override fun onResume(activity: AppCompatActivity) {\n        // Track pending lifecycle state\n        pendingLifecycleState = LifecycleState.RESUMED\n        pendingActivityRef = WeakReference(activity)\n\n        // Call onHostResume if ReactHost is ready, otherwise it will be called in setupReactHost\n        val backBtnHandler = activity as? DefaultHardwareBackBtnHandler\n            ?: throw IllegalStateException(\n                \"Activity ${activity.javaClass.simpleName} must implement DefaultHardwareBackBtnHandler\",\n            )\n        reactHost?.onHostResume(activity, backBtnHandler)\n            ?: Log.w(\n                TAG,\n                \"ReactHost not ready yet, will call onHostResume after creation\",\n            )\n    }\n\n    override fun onPause(activity: AppCompatActivity) {\n        // Track pending lifecycle state\n        pendingLifecycleState = LifecycleState.PAUSED\n        pendingActivityRef = WeakReference(activity)\n\n        // Call onHostPause only if ReactHost exists\n        reactHost?.onHostPause(activity)\n            ?: Log.w(TAG, \"ReactHost not ready, skipping onHostPause\")\n    }\n\n    override fun onDestroy(activity: AppCompatActivity) {\n        // Track pending lifecycle state\n        pendingLifecycleState = LifecycleState.DESTROYED\n        pendingActivityRef = null\n\n        // Clean up ReactSurface\n        // stop() is async (TaskInterface<Void>), but clear() and detach() can be called concurrently:\n        // - clear() removes view children via UiThreadUtil.runOnUiThread (thread-safe)\n        // - detach() releases host reference via AtomicReference.set(null) (thread-safe)\n        reactSurface?.let { surface ->\n            surface.stop()\n            surface.clear()\n            surface.detach()\n        }\n        reactSurface = null\n\n        // Remove ReactInstanceEventListener\n        reactInstanceEventListener?.let { listener ->\n            reactHost?.removeReactInstanceEventListener(listener)\n        }\n        reactInstanceEventListener = null\n\n        // Clean up ReactHost\n        // invalidate() internally runs destroy() asynchronously on bgExecutor.\n        // ReactHostImpl instance is kept alive by its own internal threading,\n        // so nulling the delegate's reactHost field won't interrupt the async destroy.\n        reactHost?.let { host ->\n            host.onHostDestroy(activity)\n            host.invalidate()\n        }\n            ?: Log.w(TAG, \"ReactHost not ready, skipping onHostDestroy\")\n        reactHost = null\n\n        // Clean up internal references\n        contentView = null\n        currentBundleSource = null\n        currentBundleLoader = null\n        componentFactory = null\n\n        // Clean up Provider/Consumer lambdas (may capture Activity via closure)\n        reactPackagesProvider = null\n        bundleLoaderProvider = null\n        loadingViewProvider = null\n        errorViewProvider = null\n        reactContainerProvider = null\n        loadingViewConsumer = null\n        surfaceViewConsumer = null\n        errorViewConsumer = null\n    }\n\n    override fun setReactPackagesProvider(provider: () -> List<ReactPackage>) {\n        this.reactPackagesProvider = provider\n    }\n\n    override fun setBundleLoaderProvider(provider: () -> BundleLoader) {\n        this.bundleLoaderProvider = provider\n    }\n\n    override fun setLoadingViewProvider(provider: (AppCompatActivity) -> View) {\n        this.loadingViewProvider = provider\n    }\n\n    override fun setErrorViewProvider(provider: (AppCompatActivity, Throwable) -> View) {\n        this.errorViewProvider = provider\n    }\n\n    override fun setReactContainerProvider(provider: (AppCompatActivity) -> android.view.ViewGroup?) {\n        this.reactContainerProvider = provider\n    }\n\n    override fun setLoadingViewConsumer(consumer: () -> Unit) {\n        this.loadingViewConsumer = consumer\n    }\n\n    override fun setSurfaceViewConsumer(consumer: (ReactSurfaceView) -> Unit) {\n        this.surfaceViewConsumer = consumer\n    }\n\n    override fun setErrorViewConsumer(consumer: (Throwable) -> Unit) {\n        this.errorViewConsumer = consumer\n    }\n\n    override fun getReactHost(): ReactHost? = reactHost\n\n    override fun getBundleLoader(): BundleLoader? = currentBundleLoader\n\n    override fun isReady(): Boolean = reactHost != null && reactSurface != null\n\n    override fun getContentView(): View? = contentView\n\n    private fun getMainComponentName(): String =\n        currentBundleSource?.componentName\n            ?: throw IllegalStateException(\n                \"mainComponentName is missing. Use a BundleLoader that provides componentName.\",\n            )\n\n    // Default (no-loader) ReactHost creation removed; BundleLoader is mandatory.\n\n    private fun setupReactHost(\n        activity: AppCompatActivity,\n        initialProps: Bundle,\n    ) {\n        reactHost?.let { host ->\n            // Get component name using the method\n            val componentName = getMainComponentName()\n\n            Log.d(TAG, \"Using component name: $componentName\")\n\n            // Create surface\n            val surface = host.createSurface(activity, componentName, initialProps)\n            reactSurface = surface\n            contentView = surface.view\n\n            (surface.view as? ReactSurfaceView)?.let { surfaceView ->\n                surfaceViewConsumer?.invoke(surfaceView)\n                    ?: run {\n                        // Fallback: Use default behavior if consumer not set\n                        surfaceView.id = View.NO_ID\n                        activity.setContentView(surfaceView)\n                        setupWindowInsets(surfaceView)\n\n                        // Start surface immediately if consumer not used\n                        startReactSurface()\n                    }\n            }\n        }\n    }\n\n    private fun setupWindowInsets(surfaceView: View) {\n        val insetsType: Int =\n            WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout()\n\n        val windowInsetsListener = { view: View, windowInsets: WindowInsetsCompat ->\n            val insets = windowInsets.getInsets(insetsType)\n\n            (view.layoutParams as? FrameLayout.LayoutParams)?.apply {\n                setMargins(insets.left, insets.top, insets.right, insets.bottom)\n            }\n\n            WindowInsetsCompat.CONSUMED\n        }\n        ViewCompat.setOnApplyWindowInsetsListener(surfaceView, windowInsetsListener)\n    }\n\n    override fun startReactSurface() {\n        reactHost?.let { host ->\n            reactSurface?.let { surface ->\n                Log.d(TAG, \"Starting ReactSurface\")\n\n                // Add ReactInstanceEventListener\n                val listener = object : ReactInstanceEventListener {\n                    override fun onReactContextInitialized(context: ReactContext) {\n                        Log.d(TAG, \"Granite onReactContextInitialized called\")\n                        Log.d(\n                            TAG,\n                            \"Granite onReactContextInitialized on currentActivity = ${context.currentActivity}\",\n                        )\n                        // Call the host's onReactContextInitialized method\n                        pendingActivity?.let { activity ->\n                            if (activity is GraniteReactHost) {\n                                Log.d(\n                                    TAG,\n                                    \"Granite activity.onReactContextInitialized called\",\n                                )\n                                activity.onReactContextInitialized(context)\n                            }\n                        }\n                    }\n                }\n                reactInstanceEventListener = listener\n                host.addReactInstanceEventListener(listener)\n\n                // Start the surface\n                Log.d(TAG, \"About to call surface.start()\")\n                Log.d(TAG, \"surface = $surface\")\n                Log.d(\n                    TAG,\n                    \"If AppRegistry.registerComponent was not called, this will fail!\",\n                )\n                surface.start()\n                Log.d(TAG, \"surface.start() completed\")\n\n                // Apply pending lifecycle state\n                Log.d(\n                    TAG,\n                    \"Applying pending lifecycle state: $pendingLifecycleState\",\n                )\n                when (pendingLifecycleState) {\n                    LifecycleState.RESUMED -> {\n                        // Activity is resumed, call onHostResume\n                        pendingActivity?.let { act ->\n                            val handler = act as? DefaultHardwareBackBtnHandler\n                                ?: throw IllegalStateException(\n                                    \"Activity ${act.javaClass.simpleName} must implement DefaultHardwareBackBtnHandler\",\n                                )\n                            host.onHostResume(act, handler)\n                            Log.d(\n                                TAG,\n                                \"Called onHostResume with activity: $act\",\n                            )\n                        }\n                    }\n                    LifecycleState.PAUSED -> {\n                        // Activity is paused, call onHostPause\n                        pendingActivity?.let { act ->\n                            host.onHostPause(act)\n                            Log.d(\n                                TAG,\n                                \"Called onHostPause with activity: $act\",\n                            )\n                        }\n                    }\n                    LifecycleState.DESTROYED -> {\n                        // Activity is being destroyed, clean up immediately\n                        surface.stop()\n                        pendingActivity?.let { act -> host.onHostDestroy(act) }\n                        host.invalidate()\n                        Log.d(TAG, \"Activity destroyed, cleaned up ReactHost\")\n                    }\n                    else -> {\n                        Log.d(TAG, \"No lifecycle state to apply\")\n                    }\n                }\n            }\n                ?: Log.w(TAG, \"ReactSurface is null, cannot start\")\n        }\n            ?: Log.w(TAG, \"ReactHost is null, cannot start\")\n    }\n\n    private fun loadBundleWithLoader(\n        activity: AppCompatActivity,\n        bundleLoader: BundleLoader,\n        initialProps: Bundle,\n    ) {\n        activity.lifecycleScope.launch {\n            try {\n                Log.d(TAG, \"loadBundleWithLoader started\")\n                Log.d(\n                    TAG,\n                    \"bundleLoader type = ${bundleLoader.javaClass.simpleName}\",\n                )\n\n                // Load bundle (suspend, may run on IO dispatcher)\n                val bundleSource = bundleLoader.loadBundle()\n\n                Log.d(TAG, \"bundleSource loaded = $bundleSource\")\n                when (bundleSource) {\n                    is BundleSource.Production -> {\n                        Log.d(\n                            TAG,\n                            \"bundleSource.location = ${bundleSource.location}\",\n                        )\n                        Log.d(\n                            TAG,\n                            \"bundleSource.componentName = ${bundleSource.componentName}\",\n                        )\n                        if (bundleSource.location is ProductionLocation.FileSystemBundle) {\n                            Log.d(\n                                TAG,\n                                \"ACTUAL FILE PATH = ${(bundleSource.location as ProductionLocation.FileSystemBundle).filePath}\",\n                            )\n                        }\n                    }\n                    is BundleSource.DevServer -> {\n                        Log.d(\n                            TAG,\n                            \"DevServer mode - ${bundleSource.host}:${bundleSource.port}\",\n                        )\n                    }\n                }\n\n                // Create ReactHost with the loaded bundle (safe off main thread)\n                val factoryResult = createReactHostWithBundle(activity, bundleSource)\n\n                // Assign shared state and setup on UI thread to serialize with onDestroy\n                activity.runOnUiThread {\n                    if (pendingLifecycleState != LifecycleState.DESTROYED) {\n                        currentBundleSource = bundleSource\n                        reactHost = factoryResult.reactHost\n                        componentFactory = factoryResult.componentFactory\n                        setupReactHost(activity, initialProps)\n                    } else {\n                        // Activity already destroyed; clean up the host we just created\n                        factoryResult.reactHost.invalidate()\n                    }\n                }\n            } catch (e: Exception) {\n                // Show error view on UI thread\n                activity.runOnUiThread {\n                    if (pendingLifecycleState != LifecycleState.DESTROYED) {\n                        errorViewConsumer?.invoke(e)\n                            ?: run {\n                                // Fallback: Use default behavior if consumer not set\n                                val errorView =\n                                    errorViewProvider?.invoke(activity, e)\n                                        ?: DefaultErrorView(activity, e)\n                                contentView = errorView\n                                activity.setContentView(errorView)\n                            }\n                        Log.e(TAG, \"Failed to load bundle\", e)\n                    }\n                }\n            }\n        }\n    }\n\n    private fun createReactHostWithBundle(\n        activity: AppCompatActivity,\n        bundleSource: BundleSource,\n    ): ReactHostFactory.Result {\n        val packages = reactPackagesProvider?.invoke() ?: emptyList()\n        return ReactHostFactory.create(activity.applicationContext, bundleSource, packages)\n    }\n\n    companion object {\n        // Note: BuildConfig.DEBUG reflects this library's build variant, not the consuming app's.\n        private const val TAG = \"GraniteReactDelegate\"\n    }\n}\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/kotlin/run/granite/GraniteReactHost.kt",
    "content": "package run.granite\n\nimport android.os.Bundle\nimport android.view.View\nimport androidx.appcompat.app.AppCompatActivity\nimport com.facebook.react.ReactHost\nimport com.facebook.react.ReactPackage\nimport com.facebook.react.bridge.ReactContext\n\n/**\n * Host interface for integrating React Native into activities. This interface allows you to \"host\"\n * React Native components in any Activity, regardless of your existing inheritance hierarchy.\n *\n * The GraniteReactHost pattern provides maximum flexibility for integrating React Native into\n * existing Android applications with their own BaseActivity implementations.\n *\n * Usage example:\n * ```kotlin\n * class MyActivity : CompanyBaseActivity(), GraniteReactHost {\n *     override val graniteDelegate = GraniteActivityDelegateImpl()\n *\n *     override fun onCreate(savedInstanceState: Bundle?) {\n *         super.onCreate(savedInstanceState)\n *         setupHost(savedInstanceState)  // Automatically manages all lifecycle events\n *     }\n *\n *     override fun getReactPackages() = PackageList(this).packages\n *     override fun getGraniteModules(context: ReactContext) = listOf(MyModule())\n * }\n * ```\n */\ninterface GraniteReactHost {\n    /** The delegate that handles all GraniteModule logic */\n    val graniteDelegate: GraniteReactDelegate\n\n    /** Initialize the React Native host. Call this in your activity's onCreate() method. */\n    fun AppCompatActivity.setupHost(\n        savedInstanceState: Bundle?,\n        initialProps: Bundle,\n    ) {\n        // Configure delegate with providers\n        graniteDelegate.setReactPackagesProvider { getReactPackages() }\n        graniteDelegate.setBundleLoaderProvider { createBundleLoader() }\n        graniteDelegate.setLoadingViewProvider { activity -> createLoadingView() }\n        graniteDelegate.setErrorViewProvider { activity, error -> createErrorView(error) }\n\n        // Initialize\n        graniteDelegate.onCreate(this, savedInstanceState, initialProps)\n    }\n\n    /** Resume the React Native host. Call this in your activity's onResume() method. */\n    fun AppCompatActivity.resumeHost() {\n        graniteDelegate.onResume(this)\n    }\n\n    /** Pause the React Native host. Call this in your activity's onPause() method. */\n    fun AppCompatActivity.pauseHost() {\n        graniteDelegate.onPause(this)\n    }\n\n    /** Destroy the React Native host. Call this in your activity's onDestroy() method. */\n    fun AppCompatActivity.destroyHost() {\n        graniteDelegate.onDestroy(this)\n    }\n\n    // Abstract methods to be implemented by the activity\n\n    /**\n     * Get React packages including core packages and custom modules. Typically returns\n     * PackageList(this).packages\n     */\n    fun getReactPackages(): List<ReactPackage>\n\n    /**\n     * Provide a BundleLoader implementation. This is now required and must return a valid loader\n     * that supplies the component (module) name via BundleSource.\n     */\n    fun createBundleLoader(): BundleLoader\n\n    /**\n     * Create a custom loading view displayed while bundle is loading. Optional - defaults to\n     * DefaultLoadingView.\n     */\n    fun createLoadingView(): View = DefaultLoadingView(this as AppCompatActivity)\n\n    /**\n     * Create a custom error view displayed when bundle loading fails. Optional - defaults to\n     * DefaultErrorView.\n     */\n    fun createErrorView(error: Throwable): View = DefaultErrorView(this as AppCompatActivity, error)\n\n    /**\n     * Called when ReactContext is initialized and ready. Override this method to perform actions\n     * that require ReactContext, such as registering Brick modules.\n     *\n     * @param context The initialized ReactContext\n     */\n    fun onReactContextInitialized(context: ReactContext) {\n        // Default implementation does nothing\n        // Override in your activity to register modules or perform other initialization\n    }\n\n    // Convenience accessors\n\n    /** Get the current bundle loader if any. */\n    fun getBundleLoader(): BundleLoader? = graniteDelegate.getBundleLoader()\n\n    /** Get the ReactHost for advanced use cases. */\n    fun getReactHost(): ReactHost? = graniteDelegate.getReactHost()\n\n    /** Check if the React Native host is ready (ReactHost and surface initialized). */\n    fun isHostReady(): Boolean = graniteDelegate.isReady()\n}\n"
  },
  {
    "path": "packages/granite-screen/android/src/main/kotlin/run/granite/ReactHostFactory.kt",
    "content": "package run.granite\n\nimport android.content.Context\nimport android.util.Log\nimport com.facebook.react.ReactHost\nimport com.facebook.react.ReactPackage\nimport com.facebook.react.bridge.JSBundleLoader\nimport com.facebook.react.common.annotations.UnstableReactNativeAPI\nimport com.facebook.react.defaults.DefaultComponentsRegistry\nimport com.facebook.react.defaults.DefaultReactHostDelegate\nimport com.facebook.react.defaults.DefaultTurboModuleManagerDelegate\nimport com.facebook.react.fabric.ComponentFactory\nimport com.facebook.react.runtime.ReactHostImpl\nimport com.facebook.react.runtime.hermes.HermesInstance\n\n/**\n * Factory for creating independent ReactHost instances configured with a BundleSource.\n * Internal to the granite-screen module.\n */\n@OptIn(UnstableReactNativeAPI::class)\ninternal object ReactHostFactory {\n\n    private const val TAG = \"ReactHostFactory\"\n    private const val DEFAULT_ASSET_BUNDLE = \"assets://index.android.bundle\"\n    private const val DEFAULT_JS_MAIN_MODULE = \"index\"\n\n    data class Result(\n        val reactHost: ReactHost,\n        val componentFactory: ComponentFactory,\n    )\n\n    fun create(\n        applicationContext: Context,\n        bundleSource: BundleSource,\n        packages: List<ReactPackage>,\n    ): Result {\n        Log.d(TAG, \"Creating ReactHost with bundle source: $bundleSource\")\n\n        val (jsBundleLoader, useDevSupport) = createBundleLoaderConfig(applicationContext, bundleSource)\n\n        Log.d(TAG, \"JSBundleLoader created, useDevSupport=$useDevSupport\")\n\n        val tmmDelegateBuilder = DefaultTurboModuleManagerDelegate.Builder()\n\n        val reactHostDelegate =\n            DefaultReactHostDelegate(\n                jsMainModulePath = DEFAULT_JS_MAIN_MODULE,\n                jsBundleLoader = jsBundleLoader,\n                reactPackages = packages,\n                jsRuntimeFactory = HermesInstance(),\n                bindingsInstaller = null,\n                turboModuleManagerDelegateBuilder = tmmDelegateBuilder,\n                exceptionHandler = { ex ->\n                    Log.e(TAG, \"ReactHost exception\", ex)\n                },\n            )\n\n        val newComponentFactory = ComponentFactory()\n        DefaultComponentsRegistry.register(newComponentFactory)\n\n        Log.d(TAG, \"ComponentFactory created and registered\")\n\n        val reactHostImpl =\n            ReactHostImpl(\n                applicationContext,\n                reactHostDelegate,\n                newComponentFactory,\n                useDevSupport,\n                useDevSupport,\n            )\n\n        Log.d(TAG, \"ReactHostImpl created (useDevSupport=$useDevSupport)\")\n\n        return Result(reactHostImpl, newComponentFactory)\n    }\n\n    private fun createBundleLoaderConfig(\n        context: Context,\n        bundleSource: BundleSource,\n    ): Pair<JSBundleLoader, Boolean> =\n        when (bundleSource) {\n            is BundleSource.DevServer -> {\n                JSBundleLoader.createAssetLoader(\n                    context,\n                    DEFAULT_ASSET_BUNDLE,\n                    true,\n                ) to true\n            }\n            is BundleSource.Production ->\n                when (bundleSource.location) {\n                    is ProductionLocation.FileSystemBundle -> {\n                        val filePath = bundleSource.location.filePath\n                        Log.d(TAG, \"Creating file loader with path: $filePath\")\n                        JSBundleLoader.createFileLoader(filePath) to false\n                    }\n                    is ProductionLocation.EmbeddedBundle -> {\n                        Log.d(TAG, \"Creating asset loader for embedded bundle\")\n                        JSBundleLoader.createAssetLoader(\n                            context,\n                            DEFAULT_ASSET_BUNDLE,\n                            true,\n                        ) to false\n                    }\n                }\n        }\n}\n"
  },
  {
    "path": "packages/granite-screen/android/src/test/cpp/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.14)\nproject(granite-screen-tests LANGUAGES CXX)\n\nset(CMAKE_CXX_STANDARD 17)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)\nset(CMAKE_CXX_EXTENSIONS OFF)\n\ninclude(FetchContent)\nFetchContent_Declare(\n    googletest\n    GIT_REPOSITORY https://github.com/google/googletest.git\n    GIT_TAG v1.14.0\n)\nFetchContent_MakeAvailable(googletest)\n\nenable_testing()\n\nset(MAIN_CPP_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/../../main/cpp\")\n\nadd_executable(\n    FileReaderTest\n    FileReaderTest.cpp\n    ${MAIN_CPP_DIR}/FileReader.cpp\n)\n\ntarget_include_directories(\n    FileReaderTest\n    PRIVATE\n    \"${CMAKE_CURRENT_SOURCE_DIR}/../../main/cpp\"\n)\n\ntarget_link_libraries(\n    FileReaderTest\n    GTest::gtest_main\n)\n\ninclude(GoogleTest)\ngtest_discover_tests(FileReaderTest)\n"
  },
  {
    "path": "packages/granite-screen/android/src/test/cpp/FileReaderTest.cpp",
    "content": "#include <gtest/gtest.h>\n#include \"FileReader.h\"\n\n#include <fstream>\n#include <filesystem>\n#include <fcntl.h>\n#include <sys/stat.h>\n#include <unistd.h>\n\nnamespace fs = std::filesystem;\nusing namespace granite::io;\n\n// Hermes Bytecode magic header: c6 1f bc 03\nstatic const char kHermesMagic[] = {'\\xc6', '\\x1f', '\\xbc', '\\x03'};\n\nclass FileReaderTest : public ::testing::Test {\n protected:\n  fs::path temp_dir_;\n\n  void SetUp() override {\n    temp_dir_ = fs::temp_directory_path() / \"granite_file_reader_test\";\n    fs::create_directories(temp_dir_);\n  }\n\n  void TearDown() override {\n    fs::remove_all(temp_dir_);\n  }\n\n  fs::path CreateTempFile(const std::string& name,\n                          const std::string& content) {\n    auto path = temp_dir_ / name;\n    std::ofstream ofs(path, std::ios::binary);\n    ofs.write(content.data(), content.size());\n    ofs.close();\n    return path;\n  }\n\n  // Create a fake HBC file with magic header + payload.\n  fs::path CreateFakeHbcFile(const std::string& name,\n                             size_t payload_size = 64) {\n    std::string content(kHermesMagic, sizeof(kHermesMagic));\n    for (size_t i = 0; i < payload_size; ++i) {\n      content.push_back(static_cast<char>(i & 0xFF));\n    }\n    return CreateTempFile(name, content);\n  }\n};\n\n// 1. Happy path: read HBC bundle with magic header.\nTEST_F(FileReaderTest, ReadsHbcBundleCorrectly) {\n  auto path = CreateFakeHbcFile(\"bundle.hbc\", 128);\n\n  std::string result = ReadFileToString(path.string());\n  EXPECT_EQ(result.size(), sizeof(kHermesMagic) + 128);\n  // Verify Hermes magic header is preserved.\n  EXPECT_EQ(result[0], '\\xc6');\n  EXPECT_EQ(result[1], '\\x1f');\n  EXPECT_EQ(result[2], '\\xbc');\n  EXPECT_EQ(result[3], '\\x03');\n}\n\n// 2. FdGuard RAII: fd is closed after destruction.\nTEST_F(FileReaderTest, FdGuardClosesFileDescriptor) {\n  auto path = CreateFakeHbcFile(\"guard_test.hbc\");\n  int fd = open(path.c_str(), O_RDONLY);\n  ASSERT_GE(fd, 0);\n\n  {\n    FdGuard guard{fd};\n    struct stat st;\n    EXPECT_EQ(fstat(fd, &st), 0);\n  }\n  // fd should be closed after FdGuard destruction.\n  struct stat st;\n  EXPECT_EQ(fstat(fd, &st), -1);\n  EXPECT_EQ(errno, EBADF);\n}\n\n// 3. Bundle file not found.\nTEST_F(FileReaderTest, ThrowsNotFoundForMissingBundle) {\n  std::string missing_path = (temp_dir_ / \"nonexistent.hbc\").string();\n\n  try {\n    ReadFileToString(missing_path);\n    FAIL() << \"Expected FileReaderError\";\n  } catch (const FileReaderError& e) {\n    EXPECT_EQ(e.kind(), ErrorKind::kNotFound);\n    EXPECT_EQ(e.errno_value(), ENOENT);\n    EXPECT_NE(std::string(e.what()).find(missing_path), std::string::npos)\n        << \"Error message should contain file path\";\n  }\n}\n\n// 4. Bundle file permission denied.\nTEST_F(FileReaderTest, ThrowsNotFoundForPermissionDenied) {\n  if (getuid() == 0) {\n    GTEST_SKIP() << \"Skipping permission test when running as root\";\n  }\n\n  auto path = CreateFakeHbcFile(\"no_access.hbc\");\n  chmod(path.c_str(), 0000);\n\n  try {\n    ReadFileToString(path.string());\n    FAIL() << \"Expected FileReaderError\";\n  } catch (const FileReaderError& e) {\n    EXPECT_EQ(e.kind(), ErrorKind::kNotFound);\n    EXPECT_EQ(e.errno_value(), EACCES);\n  }\n\n  // Restore permissions for cleanup.\n  chmod(path.c_str(), 0644);\n}\n\n// 5. Empty bundle returns empty string (domain policy handled by caller).\nTEST_F(FileReaderTest, ReturnsEmptyStringForEmptyBundle) {\n  auto path = CreateTempFile(\"empty.hbc\", \"\");\n\n  std::string result = ReadFileToString(path.string());\n  EXPECT_TRUE(result.empty());\n}\n\n// 6. Large HBC bundle (> 4KB, multi-read territory).\nTEST_F(FileReaderTest, ReadsLargeHbcBundleCorrectly) {\n  // Simulate a realistic HBC bundle: magic header + 8KB bytecode payload.\n  std::string content(kHermesMagic, sizeof(kHermesMagic));\n  for (size_t i = 0; i < 8192; ++i) {\n    content.push_back(static_cast<char>(i & 0xFF));\n  }\n  auto path = CreateTempFile(\"large_bundle.hbc\", content);\n\n  std::string result = ReadFileToString(path.string());\n  EXPECT_EQ(result.size(), content.size());\n  EXPECT_EQ(result, content);\n  // Verify magic header survived the read.\n  EXPECT_EQ(result.substr(0, 4),\n            std::string(kHermesMagic, sizeof(kHermesMagic)));\n}\n\n// 7. Binary content with null bytes (common in HBC bytecode).\nTEST_F(FileReaderTest, ReadsBinaryBytecodeWithNullBytes) {\n  std::string bytecode(kHermesMagic, sizeof(kHermesMagic));\n  bytecode += std::string(\"\\x00\\x00\\x00\\x00\", 4);  // null-filled section\n  bytecode += std::string(\"\\x01\\x02\\x00\\x04\", 4);  // mixed with nulls\n  bytecode += std::string(32, '\\0');                 // zero-padding block\n  auto path = CreateTempFile(\"nullbytes.hbc\", bytecode);\n\n  std::string result = ReadFileToString(path.string());\n  EXPECT_EQ(result.size(), bytecode.size());\n  EXPECT_EQ(result, bytecode);\n}\n\n// 8. Error message contains bundle file path for diagnostics.\nTEST_F(FileReaderTest, ErrorMessageContainsBundlePath) {\n  std::string missing_path = (temp_dir_ / \"missing_bundle.hbc\").string();\n\n  try {\n    ReadFileToString(missing_path);\n    FAIL() << \"Expected FileReaderError\";\n  } catch (const FileReaderError& e) {\n    std::string msg = e.what();\n    EXPECT_NE(msg.find(\"missing_bundle.hbc\"), std::string::npos)\n        << \"Error message should contain the bundle file name. Got: \" << msg;\n    EXPECT_NE(msg.find(\"errno\"), std::string::npos)\n        << \"Error message should contain errno info. Got: \" << msg;\n  }\n}\n\n// 9. FdGuard with invalid fd does not crash.\nTEST_F(FileReaderTest, FdGuardHandlesInvalidFd) {\n  { FdGuard guard{-1}; }\n  // Should not crash or throw — just a no-op close.\n  SUCCEED();\n}\n"
  },
  {
    "path": "packages/granite-screen/android/test-cpp.sh",
    "content": "#!/bin/bash\n# Build and run host-side C++ unit tests for granite-screen FileReader.\n#\n# Prerequisites:\n#   - CMake >= 3.14\n#   - C++17 compiler (clang or gcc)\n#   - Internet access (gtest is fetched via CMake FetchContent on first build)\n#\n# Usage:\n#   ./packages/granite-screen/android/test-cpp.sh\n#\n# The test binary is built in /tmp/granite-screen-test-build.\n# Re-running the script will rebuild only changed files.\n\nset -euo pipefail\n\nSCRIPT_DIR=\"$(cd \"$(dirname \"$0\")\" && pwd)\"\nSRC_DIR=\"${SCRIPT_DIR}/src/test/cpp\"\nBUILD_DIR=\"/tmp/granite-screen-test-build\"\n\necho \"==> Configuring (${SRC_DIR})\"\ncmake -S \"${SRC_DIR}\" -B \"${BUILD_DIR}\" -DCMAKE_BUILD_TYPE=Release 2>&1\n\necho \"\"\necho \"==> Building\"\ncmake --build \"${BUILD_DIR}\" --parallel 2>&1\n\necho \"\"\necho \"==> Running tests\"\nctest --test-dir \"${BUILD_DIR}\" --output-on-failure -V 2>&1\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/.gitignore",
    "content": "# Gradle build output\nbuild/\n# Allow pre-compiled JAR for npm distribution\n!build/libs/\n\n# Kotlin\n.kotlin/\n\n# Gradle cache\n.gradle/\n\n# Explicitly allow Gradle wrapper JAR\n!gradle/wrapper/gradle-wrapper.jar\n\n# IDE\n.idea/\n*.iml\n\n# OS\n.DS_Store\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/README.md",
    "content": "# Granite Gradle Plugin\n\n**Granite** is a Gradle plugin that enables full React Native features in Android Library modules (AAR). The official `com.facebook.react` plugin only provides complete functionality for Application modules—Granite solves this limitation.\n\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n[![Gradle Plugin Portal](https://img.shields.io/badge/Gradle-Plugin-brightgreen)](https://plugins.gradle.org/plugin/run.granite.library)\n\n---\n\n## Overview\n\nGranite Gradle Plugin brings React Native to Android Library modules with full support for:\n- **TurboModules & Fabric** (New Architecture required)\n- **Autolinking** for native module discovery\n- **JavaScript bundling** with Hermes bytecode compilation\n- **AAR packaging** with bundled assets and native libraries\n- **Multiple ReactHost instances** for modular architectures\n\n**Key Use Cases:**\n- Package React Native features as reusable AAR libraries\n- Multi-module architecture with isolated React Native screens\n- Share React Native components across multiple Android apps\n\n---\n\n## Feature Comparison\n\n| Feature | com.facebook.react | run.granite.library |\n|---------|-------------------|---------------------|\n| Application module support | ✅ Yes | ❌ No (library only) |\n| Library module support | ❌ No | ✅ Yes |\n| TurboModules codegen | ✅ Yes | ✅ Yes |\n| Fabric component codegen | ✅ Yes | ✅ Yes |\n| Autolinking | ✅ Yes | ✅ Yes |\n| Hermes | ✅ Yes | ✅ Yes (required) |\n| JSC (JavaScriptCore) | ✅ Yes | ❌ No |\n| JS bundling | ✅ Yes | ✅ Yes |\n| AAR packaging | ❌ No | ✅ Yes |\n| Multiple ReactHost | ❌ No | ✅ Yes |\n| Old Architecture | ✅ Yes | ❌ No |\n| New Architecture | ✅ Yes | ✅ Yes (required) |\n\n**Summary:** Granite is specialized for library modules and requires New Architecture + Hermes.\n\n---\n\n## Installation\n\n### Quick Start\n\n**Step 1: Apply the plugin**\n\n**Kotlin DSL** (`build.gradle.kts`):\n```kotlin\nplugins {\n    id(\"com.android.library\")\n    id(\"run.granite.library\") version \"1.0.0\"\n}\n\ngranite {\n    entryFile.set(\"src/main/js/index.js\")\n}\n```\n\n**Groovy DSL** (`build.gradle`):\n```groovy\nplugins {\n    id 'com.android.library'\n    id 'run.granite.library' version '1.0.0'\n}\n\ngranite {\n    entryFile = \"src/main/js/index.js\"\n}\n```\n\n**Step 2: Root project plugin** (optional, for monorepo compatibility)\n\n```kotlin\n// root build.gradle.kts\nplugins {\n    id(\"run.granite.rootproject\") version \"1.0.0\"\n}\n```\n\n**Step 3: Build**\n\n```bash\n./gradlew :your-library:assembleDebug\n```\n\n### Using with npm (includeBuild)\n\nFor standard npm/node_modules setups, use `includeBuild` to resolve the plugin:\n\n```kotlin\n// settings.gradle.kts\npluginManagement {\n    includeBuild(\"../node_modules/@granite-js/screen/gradle-plugin\")\n}\n```\n\n### Yarn PnP Users\n\nIf your project uses Yarn PnP (`nodeLinker: pnp`), you must unplug the screen package\nbefore Gradle can resolve the plugin:\n\n```bash\nyarn unplug @granite-js/screen\n```\n\nThen reference the unplugged path:\n\n```kotlin\n// settings.gradle.kts\npluginManagement {\n    includeBuild(\".yarn/unplugged/@granite-js-screen-npm-VERSION-HASH/node_modules/@granite-js/screen/gradle-plugin\")\n}\n```\n\n---\n\n## Native Module Autolinking (Critical)\n\nGranite lacks a Settings Plugin, so native module projects must be registered in `settings.gradle.kts`. **Without this, autolinking will fail** and native modules won't be linked.\n\n### Option 1: Use Official React Native Settings Plugin (Recommended)\n\n```kotlin\n// settings.gradle.kts\npluginManagement {\n    repositories {\n        mavenCentral()\n        google()\n    }\n}\n\nplugins {\n    id(\"com.facebook.react.settings\") version \"0.84.0\"\n}\n\nconfigure<com.facebook.react.ReactSettingsExtension> {\n    autolinkLibrariesFromCommand()\n}\n```\n\n**Why this works:** The official settings plugin registers all native module subprojects by executing `npx react-native config`, making them discoverable by Granite's autolinking task.\n\n### Option 2: Manual Registration\n\n```kotlin\n// settings.gradle.kts\ninclude(\":react-native-gesture-handler\")\nproject(\":react-native-gesture-handler\").projectDir =\n    file(\"node_modules/react-native-gesture-handler/android\")\n\ninclude(\":react-native-reanimated\")\nproject(\":react-native-reanimated\").projectDir =\n    file(\"node_modules/react-native-reanimated/android\")\n```\n\n**What happens without registration:**\n\nWhen `graniteAutolinking` runs, it calls `project.findProject(projectPath)` for each native module. If the subproject isn't registered in `settings.gradle.kts`, this returns `null` and the module is skipped with a warning:\n\n```\n[WARN] Native module ':react-native-gesture-handler' not found in project. Skipping autolinking.\n```\n\n---\n\n## PrivateReactExtension Compatibility\n\nIn monorepo environments where both Granite and the official React Native Gradle Plugin coexist, Granite ensures compatibility through reflection-based handling of `PrivateReactExtension`:\n\n**How it works:**\n\n1. **Pre-creation:** Granite uses `Class.forName(\"com.facebook.react.internal.PrivateReactExtension\")` to create the extension early\n2. **Path configuration:** Sets correct root paths for React Native and node_modules\n3. **Graceful coexistence:** If the extension already exists (created by official plugin), Granite only configures the root property\n4. **Safe degradation:** If `ClassNotFoundException` occurs, logs a warning and continues\n\n**Important:** `PrivateReactExtension` is a React Native internal API and may change between major versions. Verify compatibility when upgrading React Native.\n\n```kotlin\n// Internal implementation (informational only)\ntry {\n    val extensionClass = Class.forName(\"com.facebook.react.internal.PrivateReactExtension\")\n    // Configure root paths...\n} catch (e: ClassNotFoundException) {\n    logger.warn(\"PrivateReactExtension not found. Monorepo compatibility disabled.\")\n}\n```\n\n---\n\n## Configuration Reference\n\n### Library Module Plugin (`granite { }`)\n\nConfigure the plugin using the `granite` DSL block:\n\n```kotlin\ngranite {\n    // JavaScript entry point\n    entryFile.set(\"src/main/js/index.js\")\n\n    // Bundle output name\n    bundleAssetName.set(\"index.android.bundle\")\n\n    // Enable/disable bundle compression\n    bundleCompressionEnabled.set(true)\n\n    // Target ABIs (production: arm64-v8a, armeabi-v7a only)\n    nativeArchitectures.set(listOf(\"arm64-v8a\", \"armeabi-v7a\"))\n\n    // React Native directory (auto-detected)\n    reactNativeDir.set(rootProject.file(\"node_modules/react-native\"))\n\n    // Node modules directory (auto-detected)\n    nodeModulesDir.set(rootProject.file(\"node_modules\"))\n\n    // Dev server configuration (optional)\n    devServerHost.set(\"localhost\")\n    devServerPort.set(8081)\n}\n```\n\n### DSL Property Reference\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `entryFile` | `Property<String>` | `\"src/main/js/index.js\"` | JavaScript entry file path |\n| `bundleAssetName` | `Property<String>` | `\"index.android.bundle\"` | Bundle file name in AAR |\n| `reactNativeDir` | `Property<File>` | `rootProject.file(\"node_modules/react-native\")` | React Native installation directory |\n| `nodeModulesDir` | `Property<File>` | `rootProject.file(\"node_modules\")` | Node modules directory |\n| `bundleCompressionEnabled` | `Property<Boolean>` | `true` | Enable bundle compression |\n| `nativeArchitectures` | `ListProperty<String>` | `[\"armeabi-v7a\", \"arm64-v8a\", \"x86\", \"x86_64\"]` | Android ABIs to build |\n| `reactNativeVersion` | `Property<String>` | Auto-detected from `node_modules` | React Native version |\n| `devServerHost` | `Property<String>` | `null` | Metro dev server host (development only) |\n| `devServerPort` | `Property<Int>` | `null` | Metro dev server port (development only) |\n\n**Production-optimized configuration:**\n\n```kotlin\ngranite {\n    entryFile.set(\"src/main/js/index.js\")\n    bundleCompressionEnabled.set(true)\n    // Only include 64-bit and 32-bit ARM (most devices)\n    nativeArchitectures.set(listOf(\"arm64-v8a\", \"armeabi-v7a\"))\n}\n```\n\n### Root Project Plugin (`graniteRoot { }`)\n\nApply to the root project for monorepo dependency management:\n\n```kotlin\n// root build.gradle.kts\nplugins {\n    id(\"run.granite.rootproject\") version \"1.0.0\"\n}\n```\n\n**What it does:**\n- Configures dependency substitution for React Native libraries\n- Sets up `PrivateReactExtension` for path resolution\n- Ensures consistent React Native versions across modules\n\n---\n\n## Gradle Tasks\n\nGranite provides 5 main task groups:\n\n### 1. Autolinking Tasks\n\n**`graniteAutolinking`**\n- Discovers native modules in `node_modules/`\n- Generates `PackageList.java` (Java native module registry)\n- Generates `autolinking.cpp/h` (C++ JNI registration)\n- Generates `Android-autolinking.cmake` (CMake build configuration)\n- **Output:** `build/generated/autolinking/`\n- **Runs:** Before `preBuild`\n\n### 2. Codegen Tasks\n\n**`graniteCodegenSchema`**\n- Scans JavaScript specs for TurboModule/Fabric definitions\n- Generates unified schema JSON\n- **Output:** `build/generated/codegen/schema.json`\n\n**`graniteCodegenArtifacts`**\n- Generates Java interfaces and C++ implementations\n- Creates TurboModule and Fabric component bindings\n- **Output:** `build/generated/codegen/java/` and `jni/`\n- **Runs:** Before Kotlin/Java compilation\n\n### 3. Bundling Tasks\n\n**`graniteBundleDebug`** / **`graniteBundleRelease`**\n- Runs Metro bundler to create JavaScript bundle\n- Compiles to Hermes bytecode (`.hbc`)\n- Applies minification and optimization (Release only)\n- **Output:** `build/generated/assets/{variant}/index.android.bundle`\n\n### 4. Packaging Tasks\n\n**`granitePackageAssetsDebug`** / **`granitePackageAssetsRelease`**\n- Copies bundle to AAR asset directory\n- Packages images and drawable resources\n- **Output:** `src/{variant}/assets/`\n\n### 5. Task Execution Flow\n\n```\nnpm install\n    ↓\ngraniteAutolinking → preBuild → compileKotlin\n    ↓                               ↓\ngraniteCodegenSchema         externalNativeBuild (CMake)\n    ↓                               ↓\ngraniteCodegenArtifacts ────────────┘\n                                    ↓\n                              AAR Creation\n                                    ↑\ngraniteBundleRelease → granitePackageAssets\n```\n\n**Manual bundle workflow:**\n\n```bash\n# Generate JavaScript bundle with Hermes compilation\n./gradlew graniteBundleRelease\n\n# Package assets into AAR\n./gradlew granitePackageAssetsRelease\n\n# Build final AAR\n./gradlew bundleReleaseAar\n```\n\n**One-liner for CI/CD:**\n\n```bash\n./gradlew graniteBundleRelease granitePackageAssetsRelease bundleReleaseAar\n```\n\n---\n\n## Version Compatibility\n\n| Component | Minimum Version | Tested Version |\n|-----------|----------------|----------------|\n| React Native | 0.84.0 | 0.84.0+ |\n| Android Gradle Plugin | 8.1.0 | 8.6.1 |\n| Gradle | 8.0 | 8.9 |\n| JDK | 17 | 17 |\n| Kotlin | 1.9.0 | 2.1.21 |\n| SoLoader | 0.12.1 | 0.12.1 |\n| Hermes | (bundled with RN) | v96 |\n\n**Required settings:**\n\n```properties\n# gradle.properties\nnewArchEnabled=true\n```\n\n---\n\n## Architecture\n\n### Generated Code Structure\n\n```\nbuild/\n├── generated/\n│   ├── autolinking/\n│   │   └── src/main/\n│   │       ├── java/com/facebook/react/\n│   │       │   └── PackageList.java          # Java TurboModule registry\n│   │       └── jni/\n│   │           ├── autolinking.cpp           # C++ JNI registration\n│   │           ├── autolinking.h\n│   │           └── Android-autolinking.cmake # CMake configuration\n│   ├── codegen/\n│   │   ├── schema.json                       # Unified TurboModule/Fabric schema\n│   │   ├── java/                             # Generated Java interfaces\n│   │   └── jni/                              # Generated C++ implementations\n│   └── assets/\n│       ├── debug/index.android.bundle        # Debug JS bundle\n│       └── release/index.android.bundle.hbc  # Hermes bytecode\n└── outputs/\n    └── aar/\n        └── your-library-release.aar          # Final AAR with bundled assets\n```\n\n### AAR Contents\n\n```\nyour-library.aar\n├── jni/                          # Native libraries\n│   ├── arm64-v8a/\n│   │   └── libreactnative.so     # React Native runtime (64-bit ARM)\n│   └── armeabi-v7a/\n│       └── libreactnative.so     # React Native runtime (32-bit ARM)\n├── assets/\n│   └── index.android.bundle      # Hermes bytecode bundle\n├── res/\n│   └── drawable/                 # Image assets from JS bundle\n└── classes.jar                   # Compiled Kotlin/Java code\n```\n\n---\n\n## Troubleshooting\n\n### Common Issues\n\n**Issue: Native module not linked**\n\n```\n[WARN] Native module ':react-native-gesture-handler' not found in project. Skipping autolinking.\n```\n\n**Solution:** Register native modules in `settings.gradle.kts` (see [Native Module Autolinking](#native-module-autolinking-critical))\n\n---\n\n**Issue: `Unresolved reference: PackageList`**\n\n```\ne: Unresolved reference: PackageList\n```\n\n**Solution:** Run autolinking manually:\n```bash\n./gradlew graniteAutolinking\nls -la build/generated/autolinking/src/main/java/\n```\n\n---\n\n**Issue: JavaScript entry file not found**\n\n```\nJavaScript entry file not found: /path/to/index.js\n```\n\n**Solution:** Ensure `entryFile` points to an existing file:\n```kotlin\ngranite {\n    entryFile.set(\"src/main/js/index.js\")  // Must exist!\n}\n```\n\n---\n\n**Issue: React Native not found**\n\n```\nReact Native directory not found: /path/to/node_modules/react-native\n```\n\n**Solution:** Install dependencies:\n```bash\nnpm install  # or yarn install\n```\n\n---\n\n**Issue: Hermes compilation fails**\n\n```\nFailed to compile bundle to Hermes bytecode\n```\n\n**Solution:** Verify Hermes is enabled and check JavaScript syntax:\n```bash\n# Test Metro bundler directly\nnpx react-native start --reset-cache\n```\n\n---\n\n### Debug Commands\n\n```bash\n# View full stack traces\n./gradlew build --stacktrace\n\n# Verbose logging\n./gradlew build --info\n\n# Debug logging\n./gradlew build --debug\n\n# Dependency tree\n./gradlew :your-library:dependencies\n\n# Task execution order\n./gradlew :your-library:assembleDebug --dry-run\n```\n\n---\n\n## FAQ\n\n**Q: Why is New Architecture required?**\n\nA: Granite is optimized for multi-module architectures and multiple ReactHost scenarios. New Architecture's TurboModules and Fabric provide module isolation and type safety necessary for safe library module usage. Old Architecture lacks these guarantees.\n\n---\n\n**Q: Can I use JSC instead of Hermes?**\n\nA: No. Granite only supports Hermes. Hermes is optimized for React Native with faster startup, smaller bundle size, and lower memory usage. Hermes bytecode also provides source code protection.\n\n---\n\n**Q: Can I use Granite in multiple library modules?**\n\nA: Yes! Each library module must have a unique Android namespace. Each module gets its own ReactHost and codegen artifacts.\n\n```kotlin\n// module-a/build.gradle.kts\nandroid { namespace = \"com.example.module.a\" }\n\n// module-b/build.gradle.kts\nandroid { namespace = \"com.example.module.b\" }\n```\n\n---\n\n**Q: Can I use Granite in application modules?**\n\nA: No. Granite is library-module only. For application modules, use the official `com.facebook.react` plugin.\n\n---\n\n**Q: Should I commit generated code to Git?**\n\nA: No. All files in `build/` are auto-generated during build. Add `build/` to `.gitignore`.\n\n---\n\n**Q: What's the recommended production configuration?**\n\nA:\n```kotlin\ngranite {\n    entryFile.set(\"src/main/js/index.js\")\n    bundleCompressionEnabled.set(true)\n    nativeArchitectures.set(listOf(\"arm64-v8a\", \"armeabi-v7a\"))\n}\n```\n\nExclude x86/x86_64 to reduce AAR size. Enable compression. Hermes is always enabled.\n\n---\n\n## License\n\nApache License 2.0\n\n---\n\n## Contributing\n\nContributions are welcome!\n\n- **Issues:** [GitHub Issues](https://github.com/toss/granite/issues)\n- **Discussions:** [GitHub Discussions](https://github.com/toss/granite/discussions)\n\n---\n\n**Repository:** [https://github.com/toss/granite](https://github.com/toss/granite)\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/build.gradle.kts",
    "content": "plugins {\n  `kotlin-dsl`\n  `java-gradle-plugin`\n  alias(libs.plugins.spotless)\n}\n\njava {\n  sourceCompatibility = JavaVersion.VERSION_17\n  targetCompatibility = JavaVersion.VERSION_17\n}\n\nkotlin {\n  jvmToolchain(17)\n}\n\nrepositories {\n  google()\n  mavenCentral()\n  gradlePluginPortal()\n}\n\nspotless {\n  kotlin {\n    target(\"**/*.kt\")\n    targetExclude(\"**/build/**/*.kt\")\n    ktlint()\n      .editorConfigOverride(\n        mapOf(\n          \"indent_size\" to \"2\",\n          \"continuation_indent_size\" to \"2\",\n          \"ktlint_standard_function-naming\" to \"disabled\",\n          \"ktlint_standard_no-wildcard-imports\" to \"disabled\",\n        ),\n      )\n    trimTrailingWhitespace()\n    endWithNewline()\n  }\n  kotlinGradle {\n    target(\"**/*.gradle.kts\")\n    targetExclude(\"**/build/**/*.gradle.kts\")\n    ktlint()\n      .editorConfigOverride(\n        mapOf(\n          \"indent_size\" to \"2\",\n          \"continuation_indent_size\" to \"2\",\n          \"ktlint_standard_function-naming\" to \"disabled\",\n          \"ktlint_standard_no-wildcard-imports\" to \"disabled\",\n        ),\n      )\n    trimTrailingWhitespace()\n    endWithNewline()\n  }\n}\n\ndependencies {\n  // Gradle Plugin API\n  implementation(gradleApi())\n\n  // Kotlin standard library\n  implementation(kotlin(\"stdlib\"))\n\n  // Android Gradle Plugin (for library module configuration)\n  compileOnly(libs.android.gradle.plugin)\n\n  // JSON parsing for package.json and configuration files\n  implementation(libs.gson)\n\n  // Testing\n  testImplementation(libs.junit.jupiter)\n  testImplementation(kotlin(\"test\"))\n  testImplementation(gradleTestKit())\n  testImplementation(libs.android.gradle.plugin)\n  testImplementation(libs.assertj)\n  testImplementation(libs.junit.jupiter.api)\n  testImplementation(libs.junit.jupiter.params)\n}\n\ngradlePlugin {\n  plugins {\n    create(\"granitePlugin\") {\n      id = \"run.granite.library\"\n      implementationClass = \"run.granite.gradle.GranitePlugin\"\n      displayName = \"Granite Gradle Plugin\"\n      description = \"Gradle plugin for packaging React Native functionality in Android library modules\"\n    }\n    create(\"graniteRootPlugin\") {\n      id = \"run.granite.rootproject\"\n      implementationClass = \"run.granite.gradle.GraniteRootProjectPlugin\"\n      displayName = \"Granite Root Project Plugin\"\n      description = \"Gradle plugin for configuring React Native dependency substitution at the root project level\"\n    }\n  }\n}\n\ntasks.test {\n  useJUnitPlatform()\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/gradle/libs.versions.toml",
    "content": "[versions]\nagp = \"8.13.2\"\ngson = \"2.13.2\"\njunit = \"5.8.2\"\nassertj = \"3.24.2\"\nspotless = \"8.1.0\"\n\n[libraries]\nandroid-gradle-plugin = { module = \"com.android.tools.build:gradle\", version.ref = \"agp\" }\ngson = { module = \"com.google.code.gson:gson\", version.ref = \"gson\" }\njunit-jupiter = { module = \"org.junit.jupiter:junit-jupiter\", version.ref = \"junit\" }\njunit-jupiter-api = { module = \"org.junit.jupiter:junit-jupiter-api\", version.ref = \"junit\" }\njunit-jupiter-params = { module = \"org.junit.jupiter:junit-jupiter-params\", version.ref = \"junit\" }\nassertj = { module = \"org.assertj:assertj-core\", version.ref = \"assertj\" }\n\n[plugins]\nspotless = { id = \"com.diffplug.spotless\", version.ref = \"spotless\" }\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.14.3-bin.zip\nnetworkTimeout=10000\nvalidateDistributionUrl=false\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/gradle.properties",
    "content": "# Gradle Plugin Properties\norg.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8\norg.gradle.parallel=true\norg.gradle.caching=true\norg.gradle.configuration-cache=true\n\n# Kotlin\nkotlin.code.style=official\n\n# Plugin Version\nversion=0.1.34\ngroup=run.granite"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\n# This is normally unused\n# shellcheck disable=SC2034\nAPP_BASE_NAME=${0##*/}\n# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)\nAPP_HOME=$( cd -P \"${APP_HOME:-./}\" > /dev/null && printf '%s\\n' \"$PWD\" ) || exit\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    if ! command -v java >/dev/null 2>&1\n    then\n        die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Collect all arguments for the java command:\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,\n#     and any embedded shellness will be escaped.\n#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be\n#     treated as '${Hostname}' itself on the command line.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -jar \"$APP_HOME/gradle/wrapper/gradle-wrapper.jar\" \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/gradlew.bat",
    "content": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\r\n@rem you may not use this file except in compliance with the License.\r\n@rem You may obtain a copy of the License at\r\n@rem\r\n@rem      https://www.apache.org/licenses/LICENSE-2.0\r\n@rem\r\n@rem Unless required by applicable law or agreed to in writing, software\r\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\r\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n@rem See the License for the specific language governing permissions and\r\n@rem limitations under the License.\r\n@rem\r\n@rem SPDX-License-Identifier: Apache-2.0\r\n@rem\r\n\r\n@if \"%DEBUG%\"==\"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\r\n@rem This is normally unused\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\r\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif %ERRORLEVEL% equ 0 goto execute\r\n\r\necho. 1>&2\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2\r\necho. 1>&2\r\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\r\necho location of your Java installation. 1>&2\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto execute\r\n\r\necho. 1>&2\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2\r\necho. 1>&2\r\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\r\necho location of your Java installation. 1>&2\r\n\r\ngoto fail\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\n\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -jar \"%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\" %*\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif %ERRORLEVEL% equ 0 goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nset EXIT_CODE=%ERRORLEVEL%\r\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\r\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\r\nexit /b %EXIT_CODE%\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/settings.gradle.kts",
    "content": "rootProject.name = \"granite-gradle-plugin\"\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/GraniteExtension.kt",
    "content": "package run.granite.gradle\n\nimport org.gradle.api.Project\nimport org.gradle.api.provider.ListProperty\nimport org.gradle.api.provider.Property\nimport java.io.File\n\n/**\n * DSL configuration extension for Granite plugin.\n *\n * Configure the plugin in your build.gradle.kts:\n * ```\n * granite {\n *     entryFile.set(\"src/main/js/index.js\")\n *     bundleAssetName.set(\"index.android.bundle\")\n *     reactNativeDir.set(file(\"node_modules/react-native\"))\n * }\n * ```\n */\nabstract class GraniteExtension(private val project: Project) {\n\n  /**\n   * JavaScript entry file path (relative to project root).\n   * Default: \"src/main/js/index.js\"\n   */\n  abstract val entryFile: Property<String>\n\n  /**\n   * Bundle asset name for the JavaScript bundle.\n   * Default: \"index.android.bundle\"\n   */\n  abstract val bundleAssetName: Property<String>\n\n  /**\n   * React Native root directory.\n   * Default: project.rootProject.file(\"node_modules/react-native\")\n   */\n  abstract val reactNativeDir: Property<File>\n\n  /**\n   * Node modules directory for dependency resolution.\n   * Default: project.rootProject.file(\"node_modules\")\n   */\n  abstract val nodeModulesDir: Property<File>\n\n  /**\n   * Enable bundle compression for release builds.\n   * Default: true\n   */\n  abstract val bundleCompressionEnabled: Property<Boolean>\n\n  /**\n   * Android ABI architectures to build.\n   * Default: [\"armeabi-v7a\", \"arm64-v8a\", \"x86\", \"x86_64\"]\n   */\n  abstract val nativeArchitectures: ListProperty<String>\n\n  /**\n   * React Native version (detected automatically from package.json).\n   * Can be overridden manually if needed.\n   * Default: Auto-detected from node_modules/react-native/package.json\n   */\n  abstract val reactNativeVersion: Property<String>\n\n  /**\n   * Development server host for Metro bundler.\n   * Default: null (not configured, will use React Native defaults)\n   *\n   * Common values:\n   * - \"localhost\" for development on same machine\n   * - \"10.0.2.2\" for Android emulator\n   * - \"192.168.x.x\" for physical devices on local network\n   */\n  abstract val devServerHost: Property<String>\n\n  /**\n   * Development server port for Metro bundler.\n   * Default: null (not configured, will use React Native default of 8081)\n   */\n  abstract val devServerPort: Property<Int>\n\n  init {\n    // Set defaults\n    entryFile.convention(\"src/main/js/index.js\")\n    bundleAssetName.convention(\"index.android.bundle\")\n    reactNativeDir.convention(project.rootProject.file(\"node_modules/react-native\"))\n    nodeModulesDir.convention(project.rootProject.file(\"node_modules\"))\n    bundleCompressionEnabled.convention(true)\n    nativeArchitectures.convention(listOf(\"armeabi-v7a\", \"arm64-v8a\", \"x86\", \"x86_64\"))\n    reactNativeVersion.convention(detectReactNativeVersion())\n    // devServerHost and devServerPort are intentionally left without conventions\n    // They remain null unless explicitly configured by the user\n  }\n\n  /**\n   * Validates the extension configuration.\n   * Called during project evaluation to catch configuration errors early.\n   *\n   * Note: entryFile validation is deferred to BundleTask execution time,\n   * allowing projects where JS files are in separate repositories.\n   */\n  internal fun validate() {\n    // Note: entryFile validation moved to BundleTask.execute()\n    // This allows flexibility for projects with JS in separate repos\n\n    // Validate React Native directory\n    val reactNativeDirResolved = getReactNativeDirResolved()\n    if (!reactNativeDirResolved.exists() || !reactNativeDirResolved.isDirectory) {\n      error(\n        \"\"\"\n                |React Native directory not found: ${reactNativeDirResolved.absolutePath}\n                |\n                |Configured React Native directory: ${reactNativeDir.get().absolutePath}\n                |\n                |Solutions:\n                |  1. Run 'npm install' or 'yarn install' to install React Native\n                |  2. Verify React Native is listed in your package.json dependencies\n                |  3. Configure the React Native directory in build.gradle.kts:\n                |     granite {\n                |         reactNativeDir.set(file(\"node_modules/react-native\"))\n                |     }\n                |\n                |Project: ${project.path}\n        \"\"\".trimMargin(),\n      )\n    }\n\n    // Validate package.json exists in React Native directory\n    val packageJsonFile = reactNativeDirResolved.resolve(\"package.json\")\n    if (!packageJsonFile.exists()) {\n      error(\n        \"\"\"\n                |React Native package.json not found: ${packageJsonFile.absolutePath}\n                |\n                |The React Native directory appears to be invalid or incomplete.\n                |\n                |Solution: Run 'npm install' or 'yarn install' to reinstall React Native\n                |\n                |Project: ${project.path}\n        \"\"\".trimMargin(),\n      )\n    }\n\n    // Note: Hermes is always enabled. JSC is not supported.\n\n    // Validate native architectures\n    val validAbis = setOf(\"armeabi-v7a\", \"arm64-v8a\", \"x86\", \"x86_64\")\n    val configuredAbis = nativeArchitectures.get()\n\n    for (abi in configuredAbis) {\n      if (abi !in validAbis) {\n        error(\n          \"\"\"\n                    |Invalid Android ABI architecture: $abi\n                    |\n                    |Valid ABIs: ${validAbis.joinToString(\", \")}\n                    |Configured ABIs: ${configuredAbis.joinToString(\", \")}\n                    |\n                    |Solution: Update nativeArchitectures in build.gradle.kts:\n                    |  granite {\n                    |      nativeArchitectures.set(listOf(\"arm64-v8a\", \"armeabi-v7a\"))\n                    |  }\n                    |\n                    |Project: ${project.path}\n          \"\"\".trimMargin(),\n        )\n      }\n    }\n\n    // Validate node_modules directory exists\n    val nodeModulesDirResolved = getNodeModulesDirResolved()\n    if (!nodeModulesDirResolved.exists() || !nodeModulesDirResolved.isDirectory) {\n      error(\n        \"\"\"\n                |Node modules directory not found: ${nodeModulesDirResolved.absolutePath}\n                |\n                |Solutions:\n                |  1. Run 'npm install' or 'yarn install' to install dependencies\n                |  2. Configure the node_modules directory in build.gradle.kts:\n                |     granite {\n                |         nodeModulesDir.set(file(\"../node_modules\"))\n                |     }\n                |\n                |Project: ${project.path}\n        \"\"\".trimMargin(),\n      )\n    }\n\n    project.logger.lifecycle(\"Granite extension configuration validated successfully\")\n  }\n\n  /**\n   * Gets the resolved entry file.\n   */\n  internal fun getEntryFileResolved(): File = project.file(entryFile.get())\n\n  /**\n   * Gets the resolved React Native directory.\n   */\n  internal fun getReactNativeDirResolved(): File = reactNativeDir.get()\n\n  /**\n   * Gets the resolved node modules directory.\n   */\n  internal fun getNodeModulesDirResolved(): File = nodeModulesDir.get()\n\n  /**\n   * Detects the React Native version from package.json.\n   * Returns \"0.0.0\" if detection fails (will be validated later).\n   */\n  private fun detectReactNativeVersion(): String = try {\n    val packageJsonFile = project.rootProject.file(\"node_modules/react-native/package.json\")\n    if (!packageJsonFile.exists()) {\n      \"0.0.0\" // Will be validated in validate()\n    } else {\n      // Simple regex-based extraction to avoid dependency on Gson during convention setup\n      val content = packageJsonFile.readText()\n      val versionRegex = \"\"\"\"version\"\\s*:\\s*\"([^\"]+)\"\"\"\".toRegex()\n      versionRegex.find(content)?.groupValues?.get(1) ?: \"0.0.0\"\n    }\n  } catch (e: Exception) {\n    project.logger.debug(\"Failed to detect React Native version: ${e.message}\")\n    \"0.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/GranitePlugin.kt",
    "content": "package run.granite.gradle\n\nimport com.android.build.api.variant.LibraryAndroidComponentsExtension\nimport com.android.build.gradle.LibraryExtension\nimport org.gradle.api.Action\nimport org.gradle.api.JavaVersion\nimport org.gradle.api.Plugin\nimport org.gradle.api.Project\nimport org.gradle.api.tasks.TaskProvider\nimport run.granite.gradle.config.BuildConfigConfigurator\nimport run.granite.gradle.config.DependencyConfigurator\nimport run.granite.gradle.config.DevServerResourceConfigurator\nimport run.granite.gradle.config.JniPackagingConfigurator\nimport run.granite.gradle.config.NdkConfigurator\nimport run.granite.gradle.config.RepositoryConfigurator\nimport run.granite.gradle.config.ResourceConfigurator\nimport run.granite.gradle.tasks.AssetPackagingTask\nimport run.granite.gradle.tasks.AutolinkingTask\nimport run.granite.gradle.tasks.BundleTask\nimport run.granite.gradle.tasks.CodegenArtifactsTask\nimport run.granite.gradle.tasks.CodegenSchemaTask\nimport run.granite.gradle.utils.AutolinkingParser\nimport run.granite.gradle.utils.ConflictDetector\nimport run.granite.gradle.utils.JdkValidator\nimport run.granite.gradle.utils.NodeExecutableFinder\nimport java.io.ByteArrayOutputStream\nimport java.io.File\n\n/**\n * Granite Gradle Plugin\n *\n * Enables packaging React Native functionality within Android library modules (AAR files).\n *\n * This plugin automates:\n * - Codegen for TurboModules and Fabric components\n * - Autolinking for native module discovery\n * - Native compilation (CMake/NDK) with Prefab packaging\n * - JavaScript bundling and Hermes bytecode compilation\n *\n * The plugin only applies to Android library modules (not application modules) and\n * enforces that only one library module per dependency tree can use the plugin.\n *\n * Requirements:\n * - JDK 17+\n * - Gradle 8.x+\n * - Android Gradle Plugin 7.x+\n * - React Native 0.81.x+\n * - Hermes JavaScript engine (always enabled, JSC not supported)\n *\n * @see GraniteExtension for configuration options\n */\nclass GranitePlugin : Plugin<Project> {\n\n  companion object {\n    const val PLUGIN_ID = \"run.granite.library\"\n    const val EXTENSION_NAME = \"granite\"\n    const val PLUGIN_GROUP = \"granite\"\n  }\n\n  override fun apply(project: Project) {\n    // Validate JDK version\n    JdkValidator.validate(project)\n\n    // Detect plugin conflicts\n    ConflictDetector.validateNoConflicts(project)\n\n    // Validate this is a library module\n    validateLibraryModule(project)\n\n    // Create the granite {} extension\n    val extension = project.extensions.create(\n      EXTENSION_NAME,\n      GraniteExtension::class.java,\n      project,\n    )\n\n    // Apply Android Library plugin if not already applied\n    project.pluginManager.apply(\"com.android.library\")\n\n    // Get Android extension for early configuration\n    val androidExtension = project.extensions.getByType(LibraryExtension::class.java)\n\n    // Configure JDK toolchain (Java 17)\n    configureJdkToolchain(project, androidExtension)\n\n    // Configure Java 17 for node_modules projects early (before AGP finalization)\n    // Ensure autolinked modules are compiled with Java 17\n    configureNodeModulesJavaVersion(project)\n\n    // Configure NDK/CMake settings early\n    // This must be done before afterEvaluate to avoid \"too late to set path\" error\n    val ndkConfigurator = NdkConfigurator(project, extension, androidExtension)\n    ndkConfigurator.configure()\n\n    // Configure resource packaging early\n    // This must be done before afterEvaluate to avoid \"too late to modify excludes\" error\n    val resourceConfigurator = ResourceConfigurator(project, extension)\n    resourceConfigurator.configure(androidExtension)\n\n    // Get Android Components Extension for variant-aware configuration\n    val androidComponents = project.extensions.getByType(LibraryAndroidComponentsExtension::class.java)\n\n    // Configure JNI packaging options early (CRITICAL for Hermes)\n    // This must be done before variant processing to avoid duplicate .so file conflicts\n    val jniPackagingConfigurator = JniPackagingConfigurator(project, extension)\n    jniPackagingConfigurator.configure(androidComponents)\n\n    // CRITICAL: Register generated sources at DSL and variant level BEFORE afterEvaluate\n    // This must happen early so finalizeDsl and onVariants callbacks can be registered\n    // before the variant processing phase begins\n    registerGeneratedSourcesInDsl(project, androidComponents)\n    registerGeneratedSourcesInVariants(project, androidComponents)\n\n    // Register variant-aware tasks BEFORE afterEvaluate\n    // This must be done early to avoid \"too late to add actions\" error\n    registerBundleAndAssetTasksEarly(project, extension, androidComponents)\n\n    // Configure after Android plugin is evaluated\n    project.afterEvaluate {\n      configurePlugin(project, extension, androidComponents)\n    }\n  }\n\n  private fun validateLibraryModule(project: Project) {\n    project.pluginManager.withPlugin(\"com.android.application\") {\n      error(\n        \"\"\"\n                |Granite plugin can only be applied to Android library modules, not application modules.\n                |\n                |The plugin was applied to '${project.path}', which is an Android application module.\n                |\n                |Solution: Remove the 'run.granite.library' plugin from application modules.\n                |Library modules using React Native should apply this plugin, and app modules\n                |should simply add the library as a dependency.\n                |\n                |Example (library module build.gradle):\n                |  plugins {\n                |      id(\"com.android.library\")\n                |      id(\"run.granite.library\")\n                |  }\n                |\n                |Example (app module build.gradle):\n                |  dependencies {\n                |      implementation(project(\":your-library-module\"))\n                |  }\n        \"\"\".trimMargin(),\n      )\n    }\n  }\n\n  /**\n   * Configures Java/Kotlin toolchain to Java 17.\n   *\n   * Equivalent to @react-native/gradle-plugin's JdkConfiguratorUtils.configureJavaToolChains().\n   */\n  private fun configureJdkToolchain(project: Project, androidExtension: LibraryExtension) {\n    // Configure Java 17 source/target compatibility\n    androidExtension.compileOptions {\n      sourceCompatibility = JavaVersion.VERSION_17\n      targetCompatibility = JavaVersion.VERSION_17\n    }\n\n    // Configure Kotlin JVM target\n    // Kotlin tasks typically follow Java targetCompatibility automatically,\n    // but we explicitly set kotlinOptions.jvmTarget = \"17\"\n    project.tasks.withType(org.gradle.api.tasks.compile.JavaCompile::class.java).configureEach {\n      targetCompatibility = \"17\"\n    }\n\n    project.logger.debug(\"Configured JDK 17 toolchain for ${project.name}\")\n  }\n\n  /**\n   * Ensures autolinked modules are compiled with Java 17.\n   *\n   * Uses rootProject.allprojects to apply to already-configured projects.\n   * Registers callbacks independent of plugin application timing via pluginManager.withPlugin.\n   *\n   * Pattern from React Native Gradle Plugin's JdkConfiguratorUtils.kt\n   */\n  private fun configureNodeModulesJavaVersion(project: Project) {\n    // Apply to all projects using rootProject.allprojects (including already-configured projects)\n    project.rootProject.allprojects.forEach { targetProject ->\n      // Only target node_modules projects\n      if (!targetProject.projectDir.absolutePath.contains(\"/node_modules/\")) return@forEach\n\n      // Configure Java 17 when Android Library plugin is applied\n      targetProject.pluginManager.withPlugin(\"com.android.library\") {\n        val componentsExtension = targetProject.extensions\n          .getByType(LibraryAndroidComponentsExtension::class.java)\n        componentsExtension.finalizeDsl { libraryExtension ->\n          libraryExtension.compileOptions.apply {\n            sourceCompatibility = JavaVersion.VERSION_17\n            targetCompatibility = JavaVersion.VERSION_17\n          }\n        }\n        targetProject.logger.debug(\"Granite: Configured Java 17 for node_modules project: ${targetProject.name}\")\n      }\n\n      // Configure jvmToolchain when Kotlin Android plugin is applied (using reflection)\n      targetProject.pluginManager.withPlugin(\"org.jetbrains.kotlin.android\") {\n        try {\n          // Use reflection since KotlinAndroidProjectExtension has no compile-time dependency\n          val kotlinExtension = targetProject.extensions.findByName(\"kotlin\")\n          if (kotlinExtension != null) {\n            val jvmToolchainMethod = kotlinExtension.javaClass.getMethod(\"jvmToolchain\", Int::class.javaPrimitiveType)\n            jvmToolchainMethod.invoke(kotlinExtension, 17)\n            targetProject.logger.debug(\"Granite: Configured Kotlin jvmToolchain(17) for: ${targetProject.name}\")\n          }\n        } catch (e: Exception) {\n          // Fallback: jvmToolchain may not exist in some Kotlin versions\n          targetProject.logger.debug(\"Granite: Could not set jvmToolchain for ${targetProject.name}: ${e.message}\")\n        }\n      }\n    }\n\n    project.logger.debug(\"Granite: Registered Java 17 configuration for all node_modules projects\")\n  }\n\n  private fun configurePlugin(\n    project: Project,\n    extension: GraniteExtension,\n    androidComponents: LibraryAndroidComponentsExtension,\n  ) {\n    // Get Android extension\n    val androidExtension = project.extensions.getByType(LibraryExtension::class.java)\n\n    // Validate extension configuration\n    extension.validate()\n\n    // Configure Maven repositories\n    val repositoryConfigurator = RepositoryConfigurator(project, extension)\n    repositoryConfigurator.configure()\n\n    // Configure React Native dependencies\n    val dependencyConfigurator = DependencyConfigurator(project, extension)\n    dependencyConfigurator.configure()\n\n    // Run react-native config and autolink native module dependencies\n    try {\n      val autolinkingConfig = runReactNativeConfig(project, extension)\n      autolinkLibrariesWithApp(project, autolinkingConfig)\n    } catch (e: Exception) {\n      project.logger.warn(\"Failed to autolink native module dependencies: ${e.message}\")\n      project.logger.debug(\"Autolinking failure details:\", e)\n    }\n\n    // NDK/CMake settings already configured in apply() method before afterEvaluate\n    // Resource packaging already configured in apply() method before afterEvaluate\n\n    // Configure BuildConfig fields\n    val buildConfigConfigurator = BuildConfigConfigurator(project, extension)\n    buildConfigConfigurator.configure(androidExtension)\n\n    // Generate dev server resources for debug builds\n    val devServerResourceConfigurator = DevServerResourceConfigurator(project, extension)\n    devServerResourceConfigurator.configure()\n\n    // Register autolinking task\n    val autolinkingTask = registerAutolinkingTask(project, extension, androidExtension)\n\n    // Wire autolinking into compilation\n    wireAutolinkingIntoCompilation(project, androidExtension, autolinkingTask)\n\n    // Register codegen tasks\n    val (codegenSchemaTask, codegenArtifactsTask) = registerCodegenTasks(project, extension, androidExtension)\n\n    // Wire codegen tasks into compilation\n    wireCodegenIntoCompilation(project, androidExtension, autolinkingTask, codegenSchemaTask, codegenArtifactsTask)\n\n    // Note: Generated sources are registered early in apply() method before afterEvaluate\n    // to avoid \"too late to add actions\" errors with finalizeDsl and onVariants\n\n    // Bundle and asset packaging tasks were registered early (before afterEvaluate)\n    // Now configure task dependencies\n    configureBundleTaskDependencies(project, codegenArtifactsTask)\n\n    project.logger.lifecycle(\"Granite plugin configured for library module: ${project.name}\")\n  }\n\n  /**\n   * Registers the AutolinkingTask.\n   *\n   * @return TaskProvider for the autolinking task\n   */\n  private fun registerAutolinkingTask(\n    project: Project,\n    extension: GraniteExtension,\n    androidExtension: LibraryExtension,\n  ): TaskProvider<AutolinkingTask> {\n    val taskProvider = project.tasks.register(\"graniteAutolinking\", AutolinkingTask::class.java)\n\n    taskProvider.configure {\n      reactNativeDir.set(extension.reactNativeDir.get())\n      nodeModulesDir.set(extension.nodeModulesDir.get())\n      projectDir.set(project.layout.projectDirectory)\n      outputDir.set(project.layout.buildDirectory.dir(\"generated/autolinking\"))\n\n      // PackageList must be in com.facebook.react package to match React Native convention\n      // This is the expected package that React Native code imports\n      packageName.set(\"com.facebook.react\")\n      packageListFile.set(\n        project.layout.buildDirectory.file(\"generated/autolinking/src/main/java/com/facebook/react/PackageList.java\"),\n      )\n\n      // JNI autolinking output\n      jniOutputDir.set(project.layout.buildDirectory.dir(\"generated/autolinking/src/main/jni\"))\n      autolinkingHeaderFile.set(\n        project.layout.buildDirectory.file(\"generated/autolinking/src/main/jni/autolinking.h\"),\n      )\n      autolinkingCppFile.set(\n        project.layout.buildDirectory.file(\"generated/autolinking/src/main/jni/autolinking.cpp\"),\n      )\n    }\n\n    return taskProvider\n  }\n\n  /**\n   * Wires the autolinking task into the compilation process.\n   *\n   * Ensures that PackageList.kt is generated before compilation starts.\n   * Uses standard preBuild task dependency instead of pattern matching.\n   *\n   * Note: Source registration is handled by registerGeneratedSourcesInDsl/InVariants methods.\n   */\n  private fun wireAutolinkingIntoCompilation(\n    project: Project,\n    androidExtension: LibraryExtension,\n    autolinkingTask: TaskProvider<AutolinkingTask>,\n  ) {\n    // Use standard preBuild dependency - more robust than pattern matching\n    project.tasks.named(\"preBuild\").configure {\n      dependsOn(autolinkingTask)\n    }\n\n    // Make CMake tasks depend on autolinking (for JNI files)\n    project.tasks.configureEach {\n      if (name.startsWith(\"configureCMake\")) {\n        dependsOn(autolinkingTask)\n      }\n      if (name.startsWith(\"buildCMake\")) {\n        dependsOn(autolinkingTask)\n      }\n    }\n\n    project.logger.debug(\"Autolinking task wired into preBuild and CMake\")\n  }\n\n  /**\n   * Registers the Codegen tasks (schema and artifacts).\n   *\n   * @return Pair of TaskProvider for (schema task, artifacts task)\n   */\n  private fun registerCodegenTasks(\n    project: Project,\n    extension: GraniteExtension,\n    androidExtension: LibraryExtension,\n  ): Pair<TaskProvider<CodegenSchemaTask>, TaskProvider<CodegenArtifactsTask>> {\n    // Register CodegenSchemaTask\n    val schemaTask = project.tasks.register(\"graniteCodegenSchema\", CodegenSchemaTask::class.java)\n\n    schemaTask.configure {\n      // Determine JavaScript source directories\n      val jsSources = mutableListOf<File>()\n      val mainJsDir = project.file(\"src/main/js\")\n      if (mainJsDir.exists()) {\n        jsSources.add(mainJsDir)\n      }\n\n      jsSourceDirs.set(jsSources)\n      reactNativeDir.set(extension.reactNativeDir.get())\n      nodeModulesDir.set(extension.nodeModulesDir.get())\n      outputDir.set(project.layout.buildDirectory.dir(\"generated/codegen/schema\"))\n      schemaFile.set(\n        project.layout.buildDirectory.file(\"generated/codegen/schema/schema.json\"),\n      )\n    }\n\n    // Register CodegenArtifactsTask\n    val artifactsTask = project.tasks.register(\"graniteCodegenArtifacts\", CodegenArtifactsTask::class.java)\n\n    artifactsTask.configure {\n      schemaFile.set(schemaTask.flatMap { task -> task.schemaFile })\n      reactNativeDir.set(extension.reactNativeDir.get())\n      nodeModulesDir.set(extension.nodeModulesDir.get())\n\n      val namespace = androidExtension.namespace\n        ?: project.group.toString().ifEmpty { \"com.example.granite\" }\n      packageName.set(namespace)\n      libraryName.set(project.name)\n\n      javaOutputDir.set(project.layout.buildDirectory.dir(\"generated/codegen/java\"))\n      jniOutputDir.set(project.layout.buildDirectory.dir(\"generated/codegen/jni\"))\n\n      // Artifacts task depends on schema task\n      dependsOn(schemaTask)\n    }\n\n    return Pair(schemaTask, artifactsTask)\n  }\n\n  /**\n   * Wires the codegen tasks into the compilation process.\n   *\n   * Ensures that:\n   * - Codegen runs after autolinking\n   * - Codegen completes before compilation starts\n   *\n   * Uses standard preBuild task dependency instead of pattern matching.\n   *\n   * Note: Source registration is handled by registerGeneratedSourcesInDsl/InVariants methods.\n   * Note: C++ sources are handled by CMake configuration, not source sets.\n   */\n  private fun wireCodegenIntoCompilation(\n    project: Project,\n    androidExtension: LibraryExtension,\n    autolinkingTask: TaskProvider<AutolinkingTask>,\n    codegenSchemaTask: TaskProvider<CodegenSchemaTask>,\n    codegenArtifactsTask: TaskProvider<CodegenArtifactsTask>,\n  ) {\n    // Codegen schema should run after autolinking\n    codegenSchemaTask.configure {\n      mustRunAfter(autolinkingTask)\n    }\n\n    // Use standard preBuild dependency - more robust than pattern matching\n    project.tasks.named(\"preBuild\").configure {\n      dependsOn(codegenArtifactsTask)\n    }\n\n    project.logger.debug(\"Codegen tasks wired into preBuild\")\n  }\n\n  /**\n   * Registers bundle and asset packaging tasks for each build variant.\n   *\n   * Creates per-variant tasks for:\n   * - JavaScript bundling with Metro (graniteBundleXxx)\n   * - Hermes bytecode compilation\n   * - Asset packaging (granitePackageAssetsXxx)\n   *\n   * IMPORTANT: These tasks are NOT automatically executed during AAR builds.\n   * Users must manually run them when bundle generation is needed.\n   *\n   * Example usage:\n   *   # Generate bundle only\n   *   ./gradlew graniteBundleRelease\n   *\n   *   # Generate bundle and package assets\n   *   ./gradlew graniteBundleRelease granitePackageAssetsRelease\n   *\n   *   # Build AAR with bundled assets\n   *   ./gradlew graniteBundleRelease granitePackageAssetsRelease bundleReleaseAar\n   *\n   * Must be called BEFORE afterEvaluate to avoid \"too late to add actions\" error.\n   */\n  private fun registerBundleAndAssetTasksEarly(\n    project: Project,\n    extension: GraniteExtension,\n    componentsExtension: LibraryAndroidComponentsExtension,\n  ) {\n    componentsExtension.onVariants { variant ->\n      val variantName = variant.name\n      val capitalizedVariantName = variantName.replaceFirstChar { if (it.isLowerCase()) it.titlecase() else it.toString() }\n\n      // Determine if this is a debug/dev variant\n      val isDev = variantName.contains(\"debug\", ignoreCase = true)\n\n      // Register bundle task for this variant\n      val bundleTaskProvider = project.tasks.register(\n        \"graniteBundle$capitalizedVariantName\",\n        BundleTask::class.java,\n      )\n\n      bundleTaskProvider.configure {\n        entryFile.set(extension.getEntryFileResolved())\n        reactNativeDir.set(extension.reactNativeDir.get())\n        nodeModulesDir.set(extension.nodeModulesDir.get())\n        projectDir.set(project.layout.projectDirectory)\n\n        // Output bundle file (always Hermes bytecode .hbc)\n        val bundleName = extension.bundleAssetName.get()\n        bundleFile.set(\n          project.layout.buildDirectory.file(\n            \"generated/assets/$variantName/$bundleName.hbc\",\n          ),\n        )\n\n        // Source map file\n        sourceMapFile.set(\n          project.layout.buildDirectory.file(\n            \"generated/assets/$variantName/$bundleName.map\",\n          ),\n        )\n\n        bundleAssetName.set(extension.bundleAssetName.get())\n        this.devMode.set(isDev)\n        this.variantName.set(variantName)\n\n        // Bundle task should run after codegen (will be configured in afterEvaluate)\n        // mustRunAfter will be set up later when codegen task is registered\n      }\n\n      // Register asset packaging task for this variant\n      val assetPackagingTaskProvider = project.tasks.register(\n        \"granitePackageAssets$capitalizedVariantName\",\n        AssetPackagingTask::class.java,\n      )\n\n      assetPackagingTaskProvider.configure {\n        bundleFile.set(bundleTaskProvider.flatMap { it.bundleFile })\n\n        // Assets directory (Metro generates this during bundling)\n        assetsDir.set(\n          project.layout.buildDirectory.dir(\"generated/assets/$variantName\"),\n        )\n\n        // Output to variant-specific Android assets directory\n        outputAssetsDir.set(\n          project.layout.projectDirectory.dir(\"src/$variantName/assets\"),\n        )\n\n        outputResDir.set(\n          project.layout.projectDirectory.dir(\"src/$variantName/res\"),\n        )\n\n        bundleAssetName.set(extension.bundleAssetName.get())\n        compressionEnabled.set(extension.bundleCompressionEnabled.get())\n        this.variantName.set(variantName)\n\n        // NOTE: No automatic dependency on bundleTaskProvider\n        // Users must manually run bundle tasks when needed:\n        //   ./gradlew graniteBundle$capitalizedVariantName granitePackageAssets$capitalizedVariantName\n      }\n\n      // NOTE: Bundle and asset packaging tasks are decoupled from AAR build\n      // This allows:\n      //   1. Fast AAR builds without bundling (development)\n      //   2. Manual bundle generation when needed (production)\n      //   3. Flexibility for projects with JS in separate repositories\n      //\n      // To include bundles in AAR, manually run:\n      //   ./gradlew graniteBundle$capitalizedVariantName granitePackageAssets$capitalizedVariantName bundle${capitalizedVariantName}Aar\n\n      project.logger.debug(\"Registered bundle and asset tasks for variant: $variantName\")\n    }\n  }\n\n  /**\n   * Configures bundle task dependencies after all tasks are registered.\n   * Called from afterEvaluate to set up dependency relationships.\n   */\n  private fun configureBundleTaskDependencies(\n    project: Project,\n    codegenArtifactsTask: TaskProvider<CodegenArtifactsTask>,\n  ) {\n    // Find all bundle tasks and configure them to run after codegen\n    project.tasks.withType(BundleTask::class.java).configureEach {\n      mustRunAfter(codegenArtifactsTask)\n    }\n\n    project.logger.debug(\"Configured bundle task dependencies\")\n  }\n\n  /**\n   * Registers generated source directories at the DSL level using finalizeDsl.\n   *\n   * This ensures DSL-level source registration completes before variant processing,\n   * making generated sources visible in IDE and local builds.\n   *\n   * Pattern from React Native Gradle Plugin reference implementation.\n   */\n  private fun registerGeneratedSourcesInDsl(\n    project: Project,\n    androidComponents: LibraryAndroidComponentsExtension,\n  ) {\n    androidComponents.finalizeDsl { extension ->\n      // Register autolinking output\n      val autolinkingDir = project.layout.buildDirectory.dir(\"generated/autolinking/src/main/java\")\n      extension.sourceSets.getByName(\"main\").java.srcDir(autolinkingDir)\n\n      // Register codegen output\n      val codegenDir = project.layout.buildDirectory.dir(\"generated/codegen/java\")\n      extension.sourceSets.getByName(\"main\").java.srcDir(codegenDir)\n\n      project.logger.debug(\"Registered generated sources in DSL via finalizeDsl\")\n    }\n  }\n\n  /**\n   * Registers generated source directories at the variant level using onVariants.\n   *\n   * This is CRITICAL for dependent module visibility. Dependent modules read\n   * variant-level source configurations, not DSL-level.\n   *\n   * Uses addStaticSourceDirectory to register sources with each build variant,\n   * ensuring they are visible to:\n   * - Dependent modules during their configuration phase\n   * - AAR metadata for library publication\n   * - Android Studio IDE\n   *\n   * Pattern from React Native Gradle Plugin reference implementation.\n   */\n  private fun registerGeneratedSourcesInVariants(\n    project: Project,\n    androidComponents: LibraryAndroidComponentsExtension,\n  ) {\n    androidComponents.onVariants(androidComponents.selector().all()) { variant ->\n      // Register autolinking sources at variant level\n      val autolinkingDir = project.layout.buildDirectory\n        .dir(\"generated/autolinking/src/main/java\")\n        .get()\n        .asFile\n        .absolutePath\n      variant.sources.java?.addStaticSourceDirectory(autolinkingDir)\n\n      // Register codegen sources at variant level\n      val codegenDir = project.layout.buildDirectory\n        .dir(\"generated/codegen/java\")\n        .get()\n        .asFile\n        .absolutePath\n      variant.sources.java?.addStaticSourceDirectory(codegenDir)\n\n      project.logger.debug(\"Registered generated sources for variant ${variant.name} via onVariants\")\n    }\n  }\n\n  /**\n   * Runs react-native config command and parses the output.\n   *\n   * @param project The Gradle project\n   * @param extension The Granite extension with configuration\n   * @return Parsed autolinking configuration\n   */\n  private fun runReactNativeConfig(\n    project: Project,\n    extension: GraniteExtension,\n  ): run.granite.gradle.models.AutolinkingConfig {\n    val reactNativeDir: File = extension.reactNativeDir.get()\n    val cliPath = File(reactNativeDir, \"cli.js\")\n\n    if (!cliPath.exists()) {\n      error(\n        \"\"\"\n                |React Native CLI not found: ${cliPath.absolutePath}\n                |\n                |Solution: Run 'npm install' or 'yarn install' to install React Native\n        \"\"\".trimMargin(),\n      )\n    }\n\n    // Find node executable\n    val nodeExecutable = NodeExecutableFinder.findNodeExecutable()\n\n    // Execute: node path/to/react-native/cli.js config\n    val command = listOf(\n      nodeExecutable.absolutePath,\n      cliPath.absolutePath,\n      \"config\",\n    )\n\n    val stdout = ByteArrayOutputStream()\n    val stderr = ByteArrayOutputStream()\n\n    val result = project.exec {\n      workingDir = project.projectDir\n      commandLine = command\n      standardOutput = stdout\n      errorOutput = stderr\n      isIgnoreExitValue = true\n    }\n\n    if (result.exitValue != 0) {\n      error(\n        \"\"\"\n                |Failed to execute react-native config command.\n                |\n                |Command: ${command.joinToString(\" \")}\n                |Exit code: ${result.exitValue}\n                |Error output:\n                |$stderr\n        \"\"\".trimMargin(),\n      )\n    }\n\n    val configJson = stdout.toString()\n\n    // Parse configuration\n    return try {\n      AutolinkingParser.parse(configJson)\n    } catch (e: IllegalArgumentException) {\n      throw IllegalArgumentException(\n        \"react-native config: Failed to parse output. ${e.message}\",\n        e,\n      )\n    }\n  }\n\n  /**\n   * Extracts Gradle dependency configuration pairs from autolinking config.\n   *\n   * @param config Autolinking configuration from react-native config\n   * @return List of (configuration, projectPath) pairs\n   */\n  private fun getGradleDependenciesToApply(\n    config: run.granite.gradle.models.AutolinkingConfig,\n  ): List<Pair<String, String>> {\n    val result = mutableListOf<Pair<String, String>>()\n\n    config.androidDependencies()\n      .filter { !it.isPureCxxDependency }\n      .forEach { module ->\n        // Remove @ prefix and replace / with _ to match settings.gradle project names\n        // e.g., \"@react-native-async-storage/async-storage\" -> \"react-native-async-storage_async-storage\"\n        val nameCleansed = module.name.removePrefix(\"@\").replace(\"/\", \"_\")\n        val dependencyConfiguration = module.dependencyConfiguration ?: \"api\"\n        val buildTypes = module.buildTypes\n\n        if (buildTypes.isEmpty()) {\n          // No build types specified - use base configuration\n          result.add(dependencyConfiguration to \":$nameCleansed\")\n        } else {\n          // Build type-specific dependencies\n          buildTypes.forEach { buildType ->\n            val config = \"${buildType}${dependencyConfiguration.replaceFirstChar { it.uppercase() }}\"\n            result.add(config to \":$nameCleansed\")\n          }\n        }\n      }\n\n    return result\n  }\n\n  /**\n   * Programmatically adds Gradle project() dependencies for all autolinked native modules.\n   *\n   * Must be called in afterEvaluate block to ensure all subprojects are created.\n   *\n   * @param project The Gradle project where dependencies should be added\n   * @param config Autolinking configuration from react-native config\n   */\n  private fun autolinkLibrariesWithApp(\n    project: Project,\n    config: run.granite.gradle.models.AutolinkingConfig,\n  ) {\n    val dependencies = getGradleDependenciesToApply(config)\n\n    if (dependencies.isEmpty()) {\n      project.logger.lifecycle(\"No autolinked dependencies to add\")\n      return\n    }\n\n    project.logger.lifecycle(\"Autolinking ${dependencies.size} native module dependencies...\")\n\n    var successCount = 0\n    var failureCount = 0\n\n    dependencies.forEach { (configuration, projectPath) ->\n      // Validate project exists before adding dependency\n      val foundProject = project.rootProject.findProject(projectPath)\n      if (foundProject != null) {\n        try {\n          project.dependencies.add(\n            configuration,\n            project.dependencies.project(mapOf(\"path\" to projectPath)),\n          )\n          project.logger.lifecycle(\"✓ Added dependency: $configuration '$projectPath'\")\n          successCount++\n        } catch (e: Exception) {\n          project.logger.error(\"✗ Failed to add dependency $configuration '$projectPath': ${e.message}\")\n          failureCount++\n        }\n      } else {\n        project.logger.error(\"✗ Skipping autolink for $projectPath - project not found in settings.gradle\")\n        project.logger.debug(\"   Available projects: ${project.rootProject.subprojects.map { it.path }}\")\n        failureCount++\n      }\n    }\n\n    project.logger.lifecycle(\"Autolinking complete. Added $successCount dependencies successfully${if (failureCount > 0) \", $failureCount failed\" else \"\"}.\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/GraniteRootExtension.kt",
    "content": "package run.granite.gradle\n\nimport org.gradle.api.Project\nimport org.gradle.api.provider.Property\nimport org.gradle.api.provider.SetProperty\nimport run.granite.gradle.config.DependencyCoordinates\nimport run.granite.gradle.utils.ReactNativeVersionReader\nimport java.io.File\n\n/**\n * DSL configuration extension for Granite Root Project plugin.\n *\n * Configure the plugin in your root build.gradle.kts:\n * ```\n * graniteRoot {\n *     // Optional: Explicit version override (auto-detected from node_modules if not set)\n *     // reactNativeVersion.set(\"0.84.0\")\n *     // hermesVersion.set(\"250829098.0.6\")\n *\n *     // Optional: Override Maven group (for custom Maven repositories)\n *     // reactGroup.set(\"com.facebook.react\")\n *     // hermesGroup.set(\"com.facebook.hermes\")\n *\n *     // Optional: Apply dependency substitution to additional configuration suffixes\n *     // additionalConfigurationSuffixes.add(\"DexGuardConsumerRuleBuildDependencies\")\n * }\n * ```\n */\nabstract class GraniteRootExtension(private val project: Project) {\n\n  /**\n   * React Native version (auto-detected from node_modules if not set)\n   */\n  abstract val reactNativeVersion: Property<String>\n\n  /**\n   * Hermes version (auto-detected from node_modules if not set)\n   */\n  abstract val hermesVersion: Property<String>\n\n  /**\n   * React Native Maven group.\n   * Default: com.facebook.react\n   */\n  abstract val reactGroup: Property<String>\n\n  /**\n   * Hermes Maven group.\n   * Default: com.facebook.hermes\n   */\n  abstract val hermesGroup: Property<String>\n\n  /**\n   * Location of the node_modules directory.\n   * Default: rootProject.file(\"node_modules\")\n   */\n  abstract val nodeModulesDir: Property<File>\n\n  /**\n   * Additional configuration name suffixes for dependency substitution.\n   * Default: empty set (only CompileClasspath and RuntimeClasspath are matched)\n   */\n  abstract val additionalConfigurationSuffixes: SetProperty<String>\n\n  init {\n    // Set default conventions\n    reactGroup.convention(DependencyCoordinates.DEFAULT_REACT_GROUP)\n    hermesGroup.convention(DependencyCoordinates.DEFAULT_HERMES_GROUP)\n    nodeModulesDir.convention(project.file(\"node_modules\"))\n    additionalConfigurationSuffixes.convention(emptySet())\n    // reactNativeVersion and hermesVersion are intentionally left without conventions\n    // They will be auto-detected if not explicitly set\n  }\n\n  /**\n   * Gets the resolved DependencyCoordinates.\n   *\n   * If versions are explicitly set, uses those values.\n   * Otherwise, auto-detects from node_modules/react-native.\n   *\n   * @return DependencyCoordinates for dependency substitution\n   * @throws IllegalStateException if auto-detection fails and no explicit versions set\n   */\n  internal fun getCoordinates(): DependencyCoordinates {\n    val reactNativeDir = nodeModulesDir.get().resolve(\"react-native\")\n\n    // Auto-detect base coordinates if needed\n    val baseCoordinates = if (!reactNativeVersion.isPresent || !hermesVersion.isPresent) {\n      if (!reactNativeDir.exists()) {\n        error(\n          \"\"\"\n                    |React Native directory not found: ${reactNativeDir.absolutePath}\n                    |\n                    |Either set versions explicitly in graniteRoot { } or ensure node_modules/react-native exists.\n                    |\n                    |Example:\n                    |  graniteRoot {\n                    |      reactNativeVersion.set(\"0.84.0\")\n                    |      hermesVersion.set(\"250829098.0.6\")\n                    |  }\n          \"\"\".trimMargin(),\n        )\n      }\n      ReactNativeVersionReader.readCoordinates(reactNativeDir)\n    } else {\n      null\n    }\n\n    // Build final coordinates: explicit > auto-detected\n    return DependencyCoordinates(\n      reactVersion = reactNativeVersion.orNull ?: baseCoordinates!!.reactVersion,\n      hermesVersion = baseCoordinates?.hermesVersion ?: \"\",\n      hermesV1Version = hermesVersion.orNull ?: baseCoordinates!!.hermesV1Version,\n      reactGroup = reactGroup.get(),\n      hermesGroup = hermesGroup.get(),\n    )\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/GraniteRootProjectPlugin.kt",
    "content": "package run.granite.gradle\n\nimport com.android.build.api.variant.ApplicationAndroidComponentsExtension\nimport com.android.build.api.variant.LibraryAndroidComponentsExtension\nimport org.gradle.api.JavaVersion\nimport org.gradle.api.Plugin\nimport org.gradle.api.Project\nimport org.gradle.api.UnknownDomainObjectException\nimport org.gradle.api.artifacts.Configuration\nimport run.granite.gradle.config.DependencyConfigurator\n\n/**\n * Granite Root Project Plugin\n *\n * Plugin applied to the root project to automatically configure\n * React Native dependency substitution.\n *\n * This plugin performs the following roles:\n * - react-native → react-android dependency substitution\n * - hermes-engine → hermes-android dependency substitution\n * - com.facebook.react:hermes-android → com.facebook.hermes:hermes-android substitution (RN 0.84+)\n * - Version forcing (force)\n *\n * Usage:\n * ```\n * // root build.gradle.kts\n * plugins {\n *     id(\"run.granite.rootproject\")\n * }\n *\n * graniteRoot {\n *     // Optional: Explicit version override\n *     // reactNativeVersion.set(\"0.84.0\")\n *     // hermesVersion.set(\"250829098.0.6\")\n * }\n * ```\n *\n * @see GraniteRootExtension for configuration options\n */\nclass GraniteRootProjectPlugin : Plugin<Project> {\n\n  companion object {\n    /** Plugin identifier used in build.gradle.kts: `id(\"run.granite.rootproject\")`. */\n    const val PLUGIN_ID = \"run.granite.rootproject\"\n\n    /** Name of the DSL extension block: `graniteRoot { ... }`. */\n    const val EXTENSION_NAME = \"graniteRoot\"\n\n    // Uses Granite-specific properties (operates independently from react.internal.*)\n    private const val INTERNAL_DISABLE_JAVA_VERSION_ALIGNMENT =\n      \"granite.internal.disableJavaVersionAlignment\"\n  }\n\n  override fun apply(project: Project) {\n    // 1. Root project validation\n    validateRootProject(project)\n\n    // 2. Create extension\n    val extension = project.extensions.create(\n      EXTENSION_NAME,\n      GraniteRootExtension::class.java,\n      project,\n    )\n\n    // 3. Configure PrivateReactExtension for React Native Gradle Plugin compatibility\n    configurePrivateReactExtension(project)\n\n    // 4. Configure Java toolchains IMMEDIATELY (before afterEvaluate)\n    // This must run before afterEvaluate for finalizeDsl to work\n    configureJavaToolChains(project)\n\n    // 5. Configure dependency substitution after evaluation\n    project.afterEvaluate {\n      configureDependencySubstitution(project, extension)\n    }\n\n    project.logger.lifecycle(\"Granite Root Project plugin applied to ${project.name}\")\n  }\n\n  private fun validateRootProject(project: Project) {\n    if (project != project.rootProject) {\n      error(\n        \"\"\"\n                |Granite Root Project plugin can only be applied to the root project.\n                |\n                |Current project: ${project.path}\n                |Root project: ${project.rootProject.path}\n                |\n                |Solution: Move the plugin application to your root build.gradle.kts:\n                |  plugins {\n                |      id(\"run.granite.rootproject\")\n                |  }\n        \"\"\".trimMargin(),\n      )\n    }\n  }\n\n  private fun configureDependencySubstitution(project: Project, extension: GraniteRootExtension) {\n    val coordinates = extension.getCoordinates()\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(coordinates)\n    val hermesVersion = coordinates.getEffectiveHermesVersion()\n    val additionalSuffixes = extension.additionalConfigurationSuffixes.get()\n\n    project.logger.lifecycle(\n      \"Granite: Configuring dependency substitution \" +\n        \"(react: ${coordinates.reactVersion}, hermes: $hermesVersion)\",\n    )\n\n    if (additionalSuffixes.isNotEmpty()) {\n      project.logger.lifecycle(\n        \"Granite: Additional configuration suffixes registered: $additionalSuffixes\"\n      )\n    }\n    project.allprojects {\n      val targetProject = this\n\n      targetProject.configurations.all configBlock@{\n        // Filter: only Classpath configurations\n        val matchesDefault = name.endsWith(\"CompileClasspath\") || name.endsWith(\"RuntimeClasspath\")\n        val matchesAdditional = additionalSuffixes.any { suffix -> name.endsWith(suffix) }\n        if (!matchesDefault && !matchesAdditional) {\n          return@configBlock\n        }\n        // Filter: skip AGP internal metadata configurations\n        if (name.contains(\"Metadata\", ignoreCase = true)) {\n          return@configBlock\n        }\n        // Skip already resolved or non-resolvable configurations\n        if (!isCanBeResolved || state == Configuration.State.RESOLVED) {\n          return@configBlock\n        }\n\n        // Apply dependency substitution rules\n        resolutionStrategy.dependencySubstitution {\n          for ((oldCoordinate, newCoordinate, reason) in substitutions) {\n            substitute(module(oldCoordinate))\n              .using(module(newCoordinate))\n              .because(reason)\n          }\n        }\n\n        // Force versions for consistency\n        resolutionStrategy.force(\n          \"${coordinates.reactGroup}:react-android:${coordinates.reactVersion}\",\n          \"${coordinates.hermesGroup}:hermes-android:$hermesVersion\",\n        )\n      }\n    }\n\n    project.logger.lifecycle(\n      \"Granite: Dependency substitution configured for all projects \" +\n        \"(${substitutions.size} rules applied)\",\n    )\n  }\n\n  /**\n   * Configures Java 17 toolchain for all projects.\n   *\n   * Uses finalizeDsl in the same way as React Native's JdkConfiguratorUtils.kt.\n   * finalizeDsl runs after the android { } block evaluation but before AGP internal finalization.\n   *\n   * - Sets Java 17 for projects with com.android.application / com.android.library plugins\n   * - Sets jvmToolchain(17) for org.jetbrains.kotlin.android / org.jetbrains.kotlin.jvm plugins\n   *\n   * Disable: Set granite.internal.disableJavaVersionAlignment=true in gradle.properties\n   *\n   * @param project Root project\n   */\n  private fun configureJavaToolChains(project: Project) {\n    // Check if disabled at root project level\n    if (project.hasProperty(INTERNAL_DISABLE_JAVA_VERSION_ALIGNMENT)) {\n      project.logger.lifecycle(\"Granite: Java version alignment disabled via property\")\n      return\n    }\n\n    project.allprojects {\n      val targetProject = this\n\n      // Can also be disabled at project level\n      if (targetProject.hasProperty(INTERNAL_DISABLE_JAVA_VERSION_ALIGNMENT)) {\n        return@allprojects\n      }\n\n      // Android Application plugin - set compileOptions via finalizeDsl\n      targetProject.pluginManager.withPlugin(\"com.android.application\") {\n        targetProject.extensions\n          .getByType(ApplicationAndroidComponentsExtension::class.java)\n          .finalizeDsl { ext ->\n            ext.compileOptions.sourceCompatibility = JavaVersion.VERSION_17\n            ext.compileOptions.targetCompatibility = JavaVersion.VERSION_17\n          }\n      }\n\n      // Android Library plugin - set compileOptions via finalizeDsl\n      targetProject.pluginManager.withPlugin(\"com.android.library\") {\n        targetProject.extensions\n          .getByType(LibraryAndroidComponentsExtension::class.java)\n          .finalizeDsl { ext ->\n            ext.compileOptions.sourceCompatibility = JavaVersion.VERSION_17\n            ext.compileOptions.targetCompatibility = JavaVersion.VERSION_17\n          }\n      }\n\n      // Kotlin Android plugin (uses reflection to avoid compile-time dependency)\n      targetProject.pluginManager.withPlugin(\"org.jetbrains.kotlin.android\") {\n        try {\n          val kotlinExtension = targetProject.extensions.findByName(\"kotlin\")\n          if (kotlinExtension != null) {\n            val jvmToolchainMethod = kotlinExtension.javaClass\n              .getMethod(\"jvmToolchain\", Int::class.javaPrimitiveType)\n            jvmToolchainMethod.invoke(kotlinExtension, 17)\n          }\n        } catch (e: Exception) {\n          targetProject.logger.debug(\n            \"Granite: Could not set jvmToolchain for ${targetProject.name}: ${e.message}\",\n          )\n        }\n      }\n\n      // Kotlin JVM plugin configuration\n      targetProject.pluginManager.withPlugin(\"org.jetbrains.kotlin.jvm\") {\n        try {\n          val kotlinExtension = targetProject.extensions.findByName(\"kotlin\")\n          if (kotlinExtension != null) {\n            val jvmToolchainMethod = kotlinExtension.javaClass\n              .getMethod(\"jvmToolchain\", Int::class.javaPrimitiveType)\n            jvmToolchainMethod.invoke(kotlinExtension, 17)\n          }\n        } catch (e: Exception) {\n          targetProject.logger.debug(\n            \"Granite: Could not set jvmToolchain for ${targetProject.name}: ${e.message}\",\n          )\n        }\n      }\n    }\n\n    project.logger.lifecycle(\"Granite: Configured Java 17 toolchain for all projects\")\n  }\n\n  /**\n   * Pre-emptively creates and configures PrivateReactExtension from the React Native Gradle Plugin.\n   *\n   * Background:\n   * - PrivateReactExtension is created on the rootProject to share configuration between app and library modules\n   * - The default convention assumes rootProject.dir/../ (standard RN app's android/ directory structure)\n   * - In monorepo setups where rootProject.dir IS the package.json location, ../ points to the wrong path\n   * - When the application module does not apply com.facebook.react, root.set() is never called\n   *\n   * Solution:\n   * - This plugin creates the extension first and sets root to rootProject.dir\n   * - ReactPlugin uses findByType to reuse an existing extension, so there is no conflict\n   */\n  private fun configurePrivateReactExtension(project: Project) {\n    try {\n      val privateReactExtensionClass = Class.forName(\n        \"com.facebook.react.internal.PrivateReactExtension\",\n      )\n\n      val existing = project.extensions.findByType(privateReactExtensionClass)\n      if (existing != null) {\n        // If already exists, only configure root\n        setRootProperty(existing, project)\n        project.logger.lifecycle(\n          \"Granite: Configured existing PrivateReactExtension root to ${project.projectDir}\",\n        )\n        return\n      }\n\n      // Create new instance\n      val extension = project.extensions.create(\n        \"privateReact\",\n        privateReactExtensionClass,\n        project,\n      )\n      setRootProperty(extension, project)\n      project.logger.lifecycle(\n        \"Granite: Created PrivateReactExtension with root=${project.projectDir}\",\n      )\n    } catch (e: Exception) {\n      project.logger.warn(\n        \"Granite: Could not configure PrivateReactExtension: ${e.message}. \" +\n          \"React Native Gradle Plugin may not be available on the classpath.\",\n      )\n    }\n  }\n\n  private fun setRootProperty(extension: Any, project: Project) {\n    try {\n      val rootProperty = extension.javaClass.getMethod(\"getRoot\").invoke(extension)\n      if (rootProperty is org.gradle.api.file.DirectoryProperty) {\n        rootProperty.set(project.layout.projectDirectory)\n      }\n    } catch (e: Exception) {\n      project.logger.warn(\n        \"Granite: Could not set PrivateReactExtension root: ${e.message}\",\n      )\n    }\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/config/BuildConfigConfigurator.kt",
    "content": "package run.granite.gradle.config\n\nimport com.android.build.gradle.LibraryExtension\nimport org.gradle.api.Project\nimport run.granite.gradle.GraniteExtension\n\n/**\n * Configurator for Android BuildConfig field generation.\n *\n * Generates BuildConfig fields to expose:\n * - Feature flags (New Architecture, Hermes always enabled)\n * - Development server configuration\n * - React Native version information\n *\n * These constants are available at runtime and compile-time for conditional logic.\n */\nclass BuildConfigConfigurator(\n  private val project: Project,\n  private val extension: GraniteExtension,\n) {\n\n  /**\n   * Configures BuildConfig fields for the Android library.\n   *\n   * Adds fields that are available in generated BuildConfig class:\n   * - IS_HERMES_ENABLED: Boolean flag for Hermes JavaScript engine (always true)\n   * - IS_NEW_ARCHITECTURE_ENABLED: Boolean flag for TurboModules/Fabric (always true)\n   * - REACT_NATIVE_VERSION: String with React Native version\n   */\n  fun configure(androidExtension: LibraryExtension) {\n    androidExtension.apply {\n      // Enable BuildConfig generation for library module\n      buildFeatures.buildConfig = true\n\n      // Add common BuildConfig fields\n      defaultConfig {\n        // Hermes JavaScript engine flag (always enabled)\n        buildConfigField(\n          \"boolean\",\n          \"IS_HERMES_ENABLED\",\n          \"true\",\n        )\n\n        // New Architecture (TurboModules + Fabric) flag (always enabled)\n        buildConfigField(\n          \"boolean\",\n          \"IS_NEW_ARCHITECTURE_ENABLED\",\n          \"true\",\n        )\n\n        // React Native version\n        buildConfigField(\n          \"String\",\n          \"REACT_NATIVE_VERSION\",\n          \"\\\"${extension.reactNativeVersion.get()}\\\"\",\n        )\n\n        // Bundle asset name\n        buildConfigField(\n          \"String\",\n          \"BUNDLE_ASSET_NAME\",\n          \"\\\"${extension.bundleAssetName.get()}\\\"\",\n        )\n      }\n    }\n\n    project.logger.lifecycle(\"BuildConfig fields configured for ${project.name}\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/config/DependencyConfigurator.kt",
    "content": "package run.granite.gradle.config\n\nimport com.android.build.gradle.LibraryExtension\nimport org.gradle.api.JavaVersion\nimport org.gradle.api.Project\nimport run.granite.gradle.GraniteExtension\nimport run.granite.gradle.utils.ReactNativeVersionReader\n\n/**\n * Configures React Native and related dependencies for the library module.\n *\n * This configurator automatically adds required dependencies:\n * - react-native (implementation)\n * - hermes-android (implementation)\n * - soloader (implementation)\n *\n * Versions are resolved from the React Native installation to ensure compatibility.\n */\nclass DependencyConfigurator(\n  private val project: Project,\n  private val extension: GraniteExtension,\n) {\n\n  companion object {\n    // Default Maven group (official React Native Maven group)\n    const val DEFAULT_GROUP = \"com.facebook.react\"\n\n    // Dependency coordinates\n    private const val REACT_NATIVE_ARTIFACT = \"react-android\"\n    private const val HERMES_ARTIFACT = \"hermes-android\"\n\n    private const val SOLOADER_GROUP = \"com.facebook.soloader\"\n    private const val SOLOADER_ARTIFACT = \"soloader\"\n    private const val SOLOADER_VERSION = \"0.12.1\" // Compatible with RN 0.84+\n\n    // Deprecated coordinates for substitution\n    private const val DEPRECATED_REACT_NATIVE = \"com.facebook.react:react-native\"\n    private const val DEPRECATED_HERMES_ENGINE = \"com.facebook.react:hermes-engine\"\n\n    // Hermes group (RN 0.84+)\n    private const val HERMES_GROUP = \"com.facebook.hermes\"\n\n    // Additional deprecated coordinate\n    private const val DEPRECATED_HERMES_ANDROID = \"com.facebook.react:hermes-android\"\n\n    /**\n     * Creates dependency substitution rules.\n     *\n     * @param version React Native version\n     * @param group React Native Maven group (default: com.facebook.react)\n     * @return List of triples (original coordinate, replacement coordinate, reason)\n     */\n    fun getDependencySubstitutions(\n      version: String,\n      group: String,\n    ): List<Triple<String, String, String>> {\n      val substitutions = mutableListOf<Triple<String, String, String>>()\n\n      // Base substitution rules: deprecated coordinates → new coordinates\n      substitutions.add(\n        Triple(\n          DEPRECATED_REACT_NATIVE,\n          \"$group:$REACT_NATIVE_ARTIFACT:$version\",\n          \"The react-native artifact was deprecated in favor of react-android\",\n        ),\n      )\n      substitutions.add(\n        Triple(\n          DEPRECATED_HERMES_ENGINE,\n          \"$group:$HERMES_ARTIFACT:$version\",\n          \"The hermes-engine artifact was deprecated in favor of hermes-android\",\n        ),\n      )\n\n      // Cross-group substitution: when using custom Maven group\n      if (group != DEFAULT_GROUP) {\n        substitutions.add(\n          Triple(\n            \"$DEFAULT_GROUP:$REACT_NATIVE_ARTIFACT\",\n            \"$group:$REACT_NATIVE_ARTIFACT:$version\",\n            \"Modified to use correct Maven group\",\n          ),\n        )\n        substitutions.add(\n          Triple(\n            \"$DEFAULT_GROUP:$HERMES_ARTIFACT\",\n            \"$group:$HERMES_ARTIFACT:$version\",\n            \"Modified to use correct Maven group\",\n          ),\n        )\n      }\n\n      return substitutions\n    }\n\n    /**\n     * Creates dependency substitution rules (DependencyCoordinates version).\n     *\n     * Supports the new Hermes group structure in React Native 0.84+:\n     * - com.facebook.react:react-native → {reactGroup}:react-android:{reactVersion}\n     * - com.facebook.react:hermes-engine → {hermesGroup}:hermes-android:{hermesVersion}\n     * - com.facebook.react:hermes-android → {hermesGroup}:hermes-android:{hermesVersion}\n     *\n     * @param coordinates Dependency coordinate information\n     * @return List of triples (original coordinate, replacement coordinate, reason)\n     */\n    fun getDependencySubstitutions(coordinates: DependencyCoordinates): List<Triple<String, String, String>> {\n      val substitutions = mutableListOf<Triple<String, String, String>>()\n      val hermesVersion = coordinates.getEffectiveHermesVersion()\n      val hermesCoordinate = \"${coordinates.hermesGroup}:$HERMES_ARTIFACT:$hermesVersion\"\n\n      // 1. react-native -> react-android\n      substitutions.add(\n        Triple(\n          DEPRECATED_REACT_NATIVE,\n          \"${coordinates.reactGroup}:$REACT_NATIVE_ARTIFACT:${coordinates.reactVersion}\",\n          \"The react-native artifact was deprecated in favor of react-android\",\n        ),\n      )\n\n      // 2. hermes-engine -> hermes-android (new group)\n      substitutions.add(\n        Triple(\n          DEPRECATED_HERMES_ENGINE,\n          hermesCoordinate,\n          \"The hermes-engine artifact was deprecated in favor of hermes-android\",\n        ),\n      )\n\n      // 3. com.facebook.react:hermes-android → com.facebook.hermes:hermes-android (NEW!)\n      substitutions.add(\n        Triple(\n          DEPRECATED_HERMES_ANDROID,\n          hermesCoordinate,\n          \"The hermes-android artifact was moved to com.facebook.hermes publishing group\",\n        ),\n      )\n\n      // 4. Custom React group substitution\n      if (coordinates.reactGroup != DEFAULT_GROUP) {\n        substitutions.add(\n          Triple(\n            \"$DEFAULT_GROUP:$REACT_NATIVE_ARTIFACT\",\n            \"${coordinates.reactGroup}:$REACT_NATIVE_ARTIFACT:${coordinates.reactVersion}\",\n            \"Modified to use correct Maven group\",\n          ),\n        )\n      }\n\n      // 5. Custom Hermes group substitution\n      if (coordinates.hermesGroup != HERMES_GROUP) {\n        substitutions.add(\n          Triple(\n            \"$HERMES_GROUP:$HERMES_ARTIFACT\",\n            hermesCoordinate,\n            \"Modified to use correct Maven group\",\n          ),\n        )\n      }\n\n      return substitutions\n    }\n  }\n\n  /**\n   * Configures all required React Native dependencies.\n   *\n   * Called during project evaluation (afterEvaluate) to ensure configuration is complete.\n   */\n  fun configure() {\n    val reactNativeDir = extension.getReactNativeDirResolved()\n\n    // Read all coordinates (React + Hermes)\n    val coordinates = ReactNativeVersionReader.readCoordinates(reactNativeDir)\n    ReactNativeVersionReader.validateVersion(coordinates.reactVersion)\n\n    project.logger.lifecycle(\n      \"Configuring React Native dependencies (version: ${coordinates.reactVersion}, \" +\n        \"hermes: ${coordinates.getEffectiveHermesVersion()}, \" +\n        \"hermesGroup: ${coordinates.hermesGroup})\",\n    )\n\n    // Note: Dependency substitution is now handled by run.granite.rootproject plugin.\n    // See GraniteRootProjectPlugin for the centralized substitution logic.\n\n    // Add React Native core dependencies\n    addReactNativeDependencies(coordinates.reactVersion, coordinates.reactGroup)\n\n    // Add Hermes engine\n    addHermesDependency(coordinates)\n\n    // Add SoLoader (required for native library loading)\n    addSoLoaderDependency()\n  }\n\n  /**\n   * Adds React Native core dependencies.\n   */\n  private fun addReactNativeDependencies(version: String, group: String) {\n    project.dependencies.add(\n      \"implementation\",\n      \"$group:$REACT_NATIVE_ARTIFACT:$version\",\n    )\n\n    project.logger.debug(\"Added dependency: $group:$REACT_NATIVE_ARTIFACT:$version\")\n  }\n\n  /**\n   * Adds Hermes JavaScript engine dependency (DependencyCoordinates version).\n   */\n  private fun addHermesDependency(coordinates: DependencyCoordinates) {\n    val hermesVersion = coordinates.getEffectiveHermesVersion()\n    project.dependencies.add(\n      \"implementation\",\n      \"${coordinates.hermesGroup}:$HERMES_ARTIFACT:$hermesVersion\",\n    )\n\n    project.logger.debug(\"Added dependency: ${coordinates.hermesGroup}:$HERMES_ARTIFACT:$hermesVersion\")\n  }\n\n  /**\n   * Adds SoLoader dependency for native library loading.\n   */\n  private fun addSoLoaderDependency() {\n    project.dependencies.add(\n      \"implementation\",\n      \"$SOLOADER_GROUP:$SOLOADER_ARTIFACT:$SOLOADER_VERSION\",\n    )\n\n    project.logger.debug(\"Added dependency: $SOLOADER_GROUP:$SOLOADER_ARTIFACT:$SOLOADER_VERSION\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/config/DependencyCoordinates.kt",
    "content": "package run.granite.gradle.config\n\n/**\n * Dependency coordinate information for React Native and Hermes.\n *\n * @property reactVersion React Native version (e.g., \"0.84.0-rc.4\")\n * @property hermesVersion Hermes Classic version (e.g., \"0.15.0\")\n * @property hermesV1Version Hermes V1 version (e.g., \"250829098.0.6\")\n * @property reactGroup React Native Maven group (default: com.facebook.react)\n * @property hermesGroup Hermes Maven group (default: com.facebook.hermes)\n */\ndata class DependencyCoordinates(\n  val reactVersion: String,\n  val hermesVersion: String,\n  val hermesV1Version: String,\n  val reactGroup: String = DEFAULT_REACT_GROUP,\n  val hermesGroup: String = DEFAULT_HERMES_GROUP,\n) {\n  companion object {\n    const val DEFAULT_REACT_GROUP = \"com.facebook.react\"\n    const val DEFAULT_HERMES_GROUP = \"com.facebook.hermes\"\n  }\n\n  /**\n   * Returns the Hermes version to use.\n   * Granite always uses Hermes V1.\n   */\n  fun getEffectiveHermesVersion(): String = if (hermesV1Version.isNotBlank()) hermesV1Version else hermesVersion\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/config/DevServerResourceConfigurator.kt",
    "content": "package run.granite.gradle.config\n\nimport org.gradle.api.Project\nimport run.granite.gradle.GraniteExtension\nimport java.io.File\n\n/**\n * Configurator for development server resource generation.\n *\n * Generates Android resources for React Native development server configuration:\n * - res/values/strings.xml: Dev server host\n * - res/values/integers.xml: Dev server port\n *\n * These resources are used by React Native's DevSupportManager for connecting\n * to the Metro bundler during development.\n */\nclass DevServerResourceConfigurator(\n  private val project: Project,\n  private val extension: GraniteExtension,\n) {\n\n  /**\n   * Generates dev server configuration resources for debug builds.\n   *\n   * Creates:\n   * - src/debug/res/values/strings.xml with react_native_dev_server_host\n   * - src/debug/res/values/integers.xml with react_native_dev_server_port\n   *\n   * Only generates resources if devServerHost and devServerPort are configured.\n   */\n  fun configure() {\n    val devServerHost = extension.devServerHost.orNull\n    val devServerPort = extension.devServerPort.orNull\n\n    if (devServerHost == null && devServerPort == null) {\n      project.logger.debug(\"Dev server configuration not set, skipping resource generation\")\n      return\n    }\n\n    // Generate debug variant resources\n    val debugResDir = project.file(\"src/debug/res/values\")\n    debugResDir.mkdirs()\n\n    if (devServerHost != null) {\n      generateStringsXml(debugResDir, devServerHost)\n    }\n\n    if (devServerPort != null) {\n      generateIntegersXml(debugResDir, devServerPort)\n    }\n\n    project.logger.lifecycle(\n      \"Dev server resources generated: host=${devServerHost ?: \"default\"}, port=${devServerPort ?: \"default\"}\",\n    )\n  }\n\n  /**\n   * Generates strings.xml with dev server host configuration.\n   */\n  private fun generateStringsXml(resDir: File, host: String) {\n    val stringsFile = File(resDir, \"strings.xml\")\n\n    val content = \"\"\"\n            <?xml version=\"1.0\" encoding=\"utf-8\"?>\n            <resources>\n                <!-- React Native Metro bundler development server host -->\n                <string name=\"react_native_dev_server_host\" translatable=\"false\">${escapeXml(host)}</string>\n            </resources>\n    \"\"\".trimIndent()\n\n    stringsFile.writeText(content)\n    project.logger.debug(\"Generated ${stringsFile.absolutePath}\")\n  }\n\n  /**\n   * Escapes special XML characters to prevent injection vulnerabilities.\n   */\n  private fun escapeXml(value: String): String = value.replace(\"&\", \"&amp;\")\n    .replace(\"<\", \"&lt;\")\n    .replace(\">\", \"&gt;\")\n    .replace(\"\\\"\", \"&quot;\")\n    .replace(\"'\", \"&apos;\")\n\n  /**\n   * Generates integers.xml with dev server port configuration.\n   */\n  private fun generateIntegersXml(resDir: File, port: Int) {\n    val integersFile = File(resDir, \"integers.xml\")\n\n    val content = \"\"\"\n            <?xml version=\"1.0\" encoding=\"utf-8\"?>\n            <resources>\n                <!-- React Native Metro bundler development server port -->\n                <integer name=\"react_native_dev_server_port\">$port</integer>\n            </resources>\n    \"\"\".trimIndent()\n\n    integersFile.writeText(content)\n    project.logger.debug(\"Generated ${integersFile.absolutePath}\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/config/JniPackagingConfigurator.kt",
    "content": "package run.granite.gradle.config\n\nimport com.android.build.api.variant.LibraryAndroidComponentsExtension\nimport com.android.build.api.variant.Variant\nimport org.gradle.api.Project\nimport run.granite.gradle.GraniteExtension\n\n/**\n * Configures JNI library packaging options for React Native native modules.\n *\n * This configurator sets up pickFirst rules to handle duplicate .so files\n * from various React Native dependencies. Based on React Native Gradle Plugin's\n * NdkConfiguratorUtils.configureJsEnginePackagingOptions and configureNewArchPackagingOptions.\n *\n * Key responsibilities:\n * - Configure Hermes .so file packaging (libhermes.so, libhermestooling.so)\n * - Configure fbjni and c++_shared library packaging\n * - Configure React Native core library packaging (libreactnative.so, libjsi.so)\n * - Exclude JSC libraries when Hermes is enabled\n *\n * Without proper packaging configuration, duplicate .so files from multiple AARs\n * will cause build failures or runtime crashes.\n */\nclass JniPackagingConfigurator(\n  private val project: Project,\n  private val extension: GraniteExtension,\n) {\n\n  /**\n   * Configures JNI packaging options for all build variants.\n   *\n   * Must be called during plugin configuration (typically in apply() or afterEvaluate).\n   */\n  fun configure(androidComponents: LibraryAndroidComponentsExtension) {\n    project.logger.lifecycle(\"Configuring JNI packaging options for React Native\")\n\n    // Configure packaging for each variant\n    androidComponents.onVariants { variant ->\n      val hermesEnabled = true // Hermes is always enabled\n      val newArchEnabled = true // New Architecture is mandatory\n\n      project.logger.debug(\n        \"Configuring packaging for variant ${variant.name}: \" +\n          \"hermesEnabled=$hermesEnabled (mandatory), newArchEnabled=$newArchEnabled (mandatory)\",\n      )\n\n      // Configure JS engine packaging (Hermes only)\n      configureJsEnginePackaging(variant, hermesEnabled)\n\n      // Configure New Architecture packaging\n      configureNewArchPackaging(variant, newArchEnabled)\n\n      project.logger.debug(\"Packaging configuration complete for variant ${variant.name}\")\n    }\n  }\n\n  /**\n   * Configures JavaScript engine .so file packaging.\n   *\n   * Based on NdkConfiguratorUtils.configureJsEnginePackagingOptions.\n   *\n   * When Hermes is enabled:\n   * - Exclude JSC libraries (libjsc.so, libjsctooling.so)\n   * - Include Hermes libraries (libhermes.so, libhermestooling.so) as pickFirst\n   *\n   * When JSC is enabled:\n   * - Exclude Hermes libraries\n   * - Include JSC libraries as pickFirst\n   *\n   * @param variant The build variant being configured\n   * @param hermesEnabled Whether Hermes is enabled for this build\n   */\n  private fun configureJsEnginePackaging(\n    variant: com.android.build.api.variant.Variant,\n    hermesEnabled: Boolean,\n  ) {\n    if (hermesEnabled) {\n      // Hermes enabled: exclude JSC, include Hermes\n      variant.packaging.jniLibs.excludes.addAll(\n        listOf(\n          \"**/libjsc.so\",\n          \"**/libjsctooling.so\",\n        ),\n      )\n      variant.packaging.jniLibs.pickFirsts.addAll(\n        listOf(\n          \"**/libhermes.so\",\n          \"**/libhermestooling.so\",\n        ),\n      )\n\n      project.logger.debug(\"Configured Hermes packaging: excluding JSC, including Hermes\")\n    } else {\n      // JSC enabled (not supported by Granite, but keep for compatibility)\n      variant.packaging.jniLibs.excludes.addAll(\n        listOf(\n          \"**/libhermes.so\",\n          \"**/libhermestooling.so\",\n        ),\n      )\n      variant.packaging.jniLibs.pickFirsts.addAll(\n        listOf(\n          \"**/libjsc.so\",\n          \"**/libjsctooling.so\",\n        ),\n      )\n\n      project.logger.warn(\n        \"JSC packaging configured, but Granite plugin only supports Hermes. \" +\n          \"This configuration may cause runtime errors.\",\n      )\n    }\n  }\n\n  /**\n   * Configures New Architecture .so file packaging.\n   *\n   * Based on NdkConfiguratorUtils.configureNewArchPackagingOptions.\n   *\n   * For Old Architecture:\n   * - pickFirst for fbjni and c++_shared (commonly duplicated)\n   *\n   * For New Architecture:\n   * - pickFirst for fbjni, c++_shared, libreactnative.so, libjsi.so\n   *\n   * @param variant The build variant being configured\n   * @param newArchEnabled Whether New Architecture is enabled\n   */\n  private fun configureNewArchPackaging(\n    variant: com.android.build.api.variant.Variant,\n    newArchEnabled: Boolean,\n  ) {\n    if (!newArchEnabled) {\n      // Old Architecture: basic pickFirst for common duplicates\n      variant.packaging.jniLibs.pickFirsts.addAll(\n        listOf(\n          \"**/libfbjni.so\",\n          \"**/libc++_shared.so\",\n        ),\n      )\n\n      project.logger.debug(\"Configured Old Architecture packaging: basic pickFirsts\")\n    } else {\n      // New Architecture: additional React Native core libraries\n      variant.packaging.jniLibs.pickFirsts.addAll(\n        listOf(\n          // FBJNI provided via prefab\n          \"**/libfbjni.so\",\n          // React Native prefab libraries\n          \"**/libreactnative.so\",\n          \"**/libjsi.so\",\n          // C++ standard library\n          \"**/libc++_shared.so\",\n        ),\n      )\n\n      project.logger.debug(\"Configured New Architecture packaging: extended pickFirsts\")\n    }\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/config/NdkConfigurator.kt",
    "content": "package run.granite.gradle.config\n\nimport com.android.build.gradle.LibraryExtension\nimport org.gradle.api.Project\nimport run.granite.gradle.GraniteExtension\nimport java.io.File\n\n/**\n * Configures Android NDK and CMake build settings for React Native native modules.\n *\n * This configurator:\n * - Enables Prefab for consuming native library dependencies\n * - Configures externalNativeBuild with CMake\n * - Configures Android ABIs\n * - Sets up CMake arguments for React Native\n *\n * Native libraries (.so files) are built by CMake and packaged in the AAR.\n * App modules can consume these libraries via Prefab without additional configuration.\n */\nclass NdkConfigurator(\n  private val project: Project,\n  private val extension: GraniteExtension,\n  private val androidExtension: LibraryExtension,\n) {\n\n  /**\n   * Configures all NDK and CMake settings.\n   */\n  fun configure() {\n    project.logger.lifecycle(\"Configuring NDK and CMake for React Native native modules\")\n\n    // Enable Prefab\n    configurePrefab()\n\n    // Configure externalNativeBuild with CMake\n    configureCMake()\n\n    // Configure ABIs\n    configureAbis()\n\n    project.logger.lifecycle(\"NDK configuration complete\")\n  }\n\n  /**\n   * Enables Prefab for packaging native libraries.\n   *\n   * Prefab allows the AAR to export native libraries (.so files) that can be\n   * consumed by app modules without manual configuration.\n   *\n   * Implementation details.\n   */\n  private fun configurePrefab() {\n    androidExtension.buildFeatures.prefab = true\n\n    project.logger.debug(\"Prefab enabled for native library packaging\")\n  }\n\n  /**\n   * Configures externalNativeBuild with CMake.\n   *\n   * Sets up CMake configuration for building React Native and custom native modules.\n   *\n   * Implementation details.\n   */\n  private fun configureCMake() {\n    val cmakeListsFile = project.file(\"CMakeLists.txt\")\n\n    if (!cmakeListsFile.exists()) {\n      project.logger.warn(\n        \"\"\"\n                |CMakeLists.txt not found: ${cmakeListsFile.absolutePath}\n                |\n                |Native module builds will be skipped. If your library has C++ native modules,\n                |create a CMakeLists.txt file at the project root.\n        \"\"\".trimMargin(),\n      )\n      return\n    }\n\n    androidExtension.externalNativeBuild.cmake {\n      path = cmakeListsFile\n\n      // CMake version (compatible with React Native 0.81+)\n      version = \"3.22.1\"\n    }\n\n    androidExtension.defaultConfig.externalNativeBuild.cmake {\n      // Add CMake arguments for React Native\n      val codegenJniDir = project.layout.buildDirectory\n        .dir(\"generated/codegen/jni\")\n        .get().asFile.absolutePath\n\n      val reactNativeDir = extension.getReactNativeDirResolved().absolutePath\n      val nodeModulesDir = extension.getNodeModulesDirResolved().absolutePath\n      // For RN 0.71-0.75, use ReactAndroid; for RN 0.76+, use android\n      val reactAndroidDir = \"$reactNativeDir/ReactAndroid\"\n      val projectBuildDir = project.layout.buildDirectory.get().asFile.absolutePath\n      val projectRootDir = project.rootDir.absolutePath\n\n      arguments(\n        \"-DREACT_NATIVE_DIR=$reactNativeDir\",\n        \"-DREACT_ANDROID_DIR=$reactAndroidDir\",\n        \"-DNODE_MODULES_DIR=$nodeModulesDir\",\n        \"-DCODEGEN_JNI_DIR=$codegenJniDir\",\n        \"-DPROJECT_BUILD_DIR=$projectBuildDir\",\n        \"-DPROJECT_ROOT_DIR=$projectRootDir\",\n        \"-DANDROID_STL=c++_shared\",\n        \"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON\"\n      )\n\n      project.logger.debug(\"CMake configured with React Native arguments\")\n    }\n  }\n\n  /**\n   * Configures Android ABIs (architectures) to build.\n   *\n   * By default, builds for all ABIs. Users can customize via GraniteExtension.\n   *\n   * Implementation details.\n   */\n  private fun configureAbis() {\n    val abis = extension.nativeArchitectures.get()\n\n    if (abis.isEmpty()) {\n      project.logger.warn(\"No ABIs configured - using default (all ABIs)\")\n      return\n    }\n\n    androidExtension.defaultConfig.ndk {\n      abiFilters.addAll(abis)\n    }\n\n    project.logger.lifecycle(\"Configured ABIs: ${abis.joinToString(\", \")}\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/config/RepositoryConfigurator.kt",
    "content": "package run.granite.gradle.config\n\nimport org.gradle.api.Project\nimport run.granite.gradle.GraniteExtension\nimport java.io.File\n\n/**\n * Configures Maven repositories for React Native dependencies.\n *\n * This configurator automatically adds required repositories:\n * - Maven Central (for React Native, Hermes, SoLoader)\n * - Google Maven (for Android dependencies)\n * - React Native Maven repository (node_modules/react-native/android)\n * - JSC/Hermes Maven repository (for JavaScript engines)\n * - Project-specific repositories (if configured)\n */\nclass RepositoryConfigurator(\n  private val project: Project,\n  private val extension: GraniteExtension,\n) {\n\n  /**\n   * Configures all required Maven repositories.\n   *\n   * Called during plugin application to ensure repositories are available\n   * before dependency resolution.\n   *\n   * Adds repositories to all projects (including root) so that third-party modules\n   * can resolve react-native dependencies.\n   */\n  fun configure() {\n    project.logger.lifecycle(\"Configuring Maven repositories for React Native\")\n\n    val reactNativeDir = extension.getReactNativeDirResolved()\n    val nodeModulesDir = extension.getNodeModulesDirResolved()\n\n    // Add repositories to all projects (official RN plugin approach)\n    project.rootProject.allprojects.forEach { eachProject ->\n      // Add standard repositories\n      addStandardRepositories(eachProject)\n\n      // Add React Native Maven repository\n      addReactNativeMavenRepository(eachProject, reactNativeDir)\n\n      // Add Android Maven repository from node_modules\n      addAndroidMavenRepository(eachProject, nodeModulesDir)\n\n      // Add JSC Maven repository (even though we use Hermes, some RN components may reference it)\n      addJscMavenRepository(eachProject, nodeModulesDir)\n    }\n  }\n\n  /**\n   * Adds standard Maven repositories (Google, Maven Central).\n   */\n  private fun addStandardRepositories(targetProject: Project) {\n    targetProject.repositories.apply {\n      // Google Maven for Android dependencies\n      if (findByName(\"Google\") == null) {\n        google()\n        project.logger.debug(\"[${targetProject.name}] Added repository: Google Maven\")\n      }\n\n      // Maven Central for React Native and Hermes\n      if (findByName(\"MavenRepo\") == null) {\n        mavenCentral()\n        project.logger.debug(\"[${targetProject.name}] Added repository: Maven Central\")\n      }\n    }\n  }\n\n  /**\n   * Adds React Native Maven repository from node_modules.\n   *\n   * This repository contains React Native Android artifacts.\n   */\n  private fun addReactNativeMavenRepository(targetProject: Project, reactNativeDir: File) {\n    val reactNativeAndroidDir = reactNativeDir.resolve(\"ReactAndroid\")\n\n    if (!reactNativeAndroidDir.exists()) {\n      project.logger.warn(\n        \"React Native Android directory not found: ${reactNativeAndroidDir.absolutePath}\",\n      )\n      return\n    }\n\n    // Prevent duplicate additions\n    if (targetProject.repositories.findByName(\"ReactNative\") != null) {\n      return\n    }\n\n    targetProject.repositories.maven {\n      name = \"ReactNative\"\n      setUrl(reactNativeAndroidDir)\n    }\n\n    project.logger.debug(\"[${targetProject.name}] Added repository: React Native Maven (${reactNativeAndroidDir.absolutePath})\")\n  }\n\n  /**\n   * Adds Android Maven repository from node_modules.\n   *\n   * This repository contains prebuilt React Native Android artifacts.\n   */\n  private fun addAndroidMavenRepository(targetProject: Project, nodeModulesDir: File) {\n    val androidMavenDir = nodeModulesDir.resolve(\"react-native/android\")\n\n    if (androidMavenDir.exists()) {\n      // Prevent duplicate additions\n      if (targetProject.repositories.findByName(\"ReactNativeAndroid\") != null) {\n        return\n      }\n\n      targetProject.repositories.maven {\n        name = \"ReactNativeAndroid\"\n        setUrl(androidMavenDir)\n      }\n\n      project.logger.debug(\"[${targetProject.name}] Added repository: React Native Android Maven (${androidMavenDir.absolutePath})\")\n    }\n  }\n\n  /**\n   * Adds JSC Maven repository from node_modules.\n   *\n   * Even though Hermes is required, some React Native components may reference JSC.\n   */\n  private fun addJscMavenRepository(targetProject: Project, nodeModulesDir: File) {\n    val jscAndroidDir = nodeModulesDir.resolve(\"jsc-android/dist\")\n\n    if (jscAndroidDir.exists()) {\n      // Prevent duplicate additions\n      if (targetProject.repositories.findByName(\"JSC\") != null) {\n        return\n      }\n\n      targetProject.repositories.maven {\n        name = \"JSC\"\n        setUrl(jscAndroidDir)\n      }\n\n      project.logger.debug(\"[${targetProject.name}] Added repository: JSC Maven (${jscAndroidDir.absolutePath})\")\n    } else {\n      // JSC may not be installed if using Hermes exclusively\n      project.logger.debug(\"[${targetProject.name}] JSC Maven repository not found (not required for Hermes builds)\")\n    }\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/config/ResourceConfigurator.kt",
    "content": "package run.granite.gradle.config\n\nimport com.android.build.gradle.LibraryExtension\nimport org.gradle.api.Project\nimport run.granite.gradle.GraniteExtension\n\n/**\n * Configurator for Android resource packaging options.\n *\n * Configures:\n * - Bundle compression settings (aaptOptions.noCompress)\n * - Resource merging behavior\n * - Asset packaging optimizations\n */\nclass ResourceConfigurator(\n  private val project: Project,\n  private val extension: GraniteExtension,\n) {\n\n  /**\n   * Configures Android resource packaging options.\n   *\n   * Sets up:\n   * 1. Bundle compression control based on extension settings\n   * 2. No-compress patterns for JavaScript bundles\n   */\n  fun configure(androidExtension: LibraryExtension) {\n    configureAaptOptions(androidExtension)\n    project.logger.debug(\"Resource packaging configured\")\n  }\n\n  /**\n   * Configures AAPT options for bundle compression.\n   *\n   * If bundle compression is disabled, adds bundle file patterns to noCompress list\n   * to prevent APK/AAR packaging from compressing already-compressed Hermes bytecode.\n   */\n  private fun configureAaptOptions(androidExtension: LibraryExtension) {\n    androidExtension.packaging {\n      resources {\n        // Don't compress JavaScript bundles if they're already gzip compressed\n        if (!extension.bundleCompressionEnabled.get()) {\n          excludes.add(\"**/*.bundle\")\n          excludes.add(\"**/*.hbc\")\n        }\n\n        // Always exclude .map files from compression\n        excludes.add(\"**/*.map\")\n      }\n    }\n\n    project.logger.lifecycle(\n      \"Bundle compression: ${if (extension.bundleCompressionEnabled.get()) \"enabled\" else \"disabled\"}\",\n    )\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/generators/CMakeGenerator.kt",
    "content": "package run.granite.gradle.generators\n\nimport run.granite.gradle.models.NativeModule\nimport java.io.File\nimport java.util.logging.Logger\n\n/**\n * Generates Android-autolinking.cmake configuration file for React Native native modules.\n *\n * This generator creates a CMake configuration file that:\n * - Adds subdirectories for each native module\n * - Sets REACTNATIVE_MERGED_SO=true for React Native 0.76+\n * - Sanitizes paths (escape spaces, remove CMakeLists.txt)\n * - Creates unique build directory names ({libraryName}_autolinked_build)\n * - Handles both standard and cxxModule CMakeLists.txt\n * - Generates AUTOLINKED_LIBRARIES list with react_codegen_* prefixes\n */\nobject CMakeGenerator {\n  private val logger = Logger.getLogger(CMakeGenerator::class.java.name)\n\n  /**\n   * Generates Android-autolinking.cmake file content.\n   *\n   * @param modules List of all native modules\n   * @param projectRoot Root directory of the project for path resolution\n   * @return Generated CMake code as string\n   */\n  fun generate(modules: List<NativeModule>, projectRoot: File): String {\n    // Filter out brick-module as it uses a special codegen pattern\n    val cmakeModules = modules.filter { it.hasCMakeConfiguration }\n\n    if (cmakeModules.isEmpty()) {\n      // Skip CMake generation if no modules with native code\n      return generateEmptyFile()\n    }\n\n    // Collect all CMake entries from modules\n    val allEntries = cmakeModules.flatMap { it.cmakeEntries() }\n\n    // Filter entries to only include directories that actually exist\n    val existingEntries = allEntries.filter { entry ->\n      val sanitizedPath = entry.sanitizedPath(projectRoot)\n      File(sanitizedPath).exists().also { exists ->\n        if (!exists) {\n          logger.warning(\"Skipping non-existent CMake directory: $sanitizedPath\")\n        }\n      }\n    }\n\n    val allLibraryTargets = existingEntries.flatMap { it.libraryTargets }\n\n    return buildString {\n      appendLine(\"# Generated by Granite Gradle Plugin - DO NOT EDIT\")\n      appendLine(\"# This file is automatically generated during the build process\")\n      appendLine()\n\n      // Set REACTNATIVE_MERGED_SO=true for React Native 0.76+\n      appendLine(\"# Enable merged shared object model for React Native 0.76+\")\n      appendLine(\"set(REACTNATIVE_MERGED_SO true)\")\n      appendLine()\n\n      if (existingEntries.isNotEmpty()) {\n        appendLine(\"# Add native module directories\")\n        existingEntries.forEach { entry ->\n          appendLine(entry.toCMakeCommand(projectRoot))\n        }\n        appendLine()\n      }\n\n      // Initialize empty AUTOLINKED_LIBRARIES and conditionally append targets\n      // This ensures clean works even when codegen directories don't exist\n      appendLine(\"# Autolinked library targets (conditionally added based on existence)\")\n      appendLine(\"set(AUTOLINKED_LIBRARIES \\\"\\\")\")\n      existingEntries.forEach { entry ->\n        entry.libraryTargets.forEach { target ->\n          appendLine(\"if(TARGET $target)\")\n          appendLine(\"  list(APPEND AUTOLINKED_LIBRARIES $target)\")\n          appendLine(\"endif()\")\n        }\n      }\n    }\n  }\n\n  /**\n   * Generates an empty CMake file with explanatory comment.\n   */\n  private fun generateEmptyFile(): String = buildString {\n    appendLine(\"# Generated by Granite Gradle Plugin - DO NOT EDIT\")\n    appendLine(\"# This file is automatically generated during the build process\")\n    appendLine()\n    appendLine(\"# No native modules with CMake configuration found\")\n    appendLine(\"set(REACTNATIVE_MERGED_SO true)\")\n    appendLine(\"set(AUTOLINKED_LIBRARIES)\")\n  }\n\n  /**\n   * Writes Android-autolinking.cmake to the specified output directory.\n   */\n  fun generateToFile(modules: List<NativeModule>, projectRoot: File, outputDir: File) {\n    val content = generate(modules, projectRoot)\n    val outputFile = File(outputDir, \"Android-autolinking.cmake\")\n    outputFile.parentFile.mkdirs()\n    outputFile.writeText(content)\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/generators/CppAutolinkingGenerator.kt",
    "content": "package run.granite.gradle.generators\n\nimport run.granite.gradle.models.NativeModule\nimport java.io.File\n\n/**\n * Generates autolinking.cpp with concrete implementations of autolinking functions.\n *\n * This generator creates C++ code that:\n * - Implements autolinking_ModuleProvider for Java TurboModules\n * - Implements autolinking_cxxModuleProvider for C++ TurboModules\n * - Includes proper headers for C++ TurboModules\n * - Returns nullptr when no match is found (early-return pattern)\n * - Sanitizes C++ identifiers\n */\nobject CppAutolinkingGenerator {\n  /**\n   * Generates autolinking.cpp file content.\n   *\n   * @param modules List of all native modules\n   * @return Generated C++ code as string\n   */\n  fun generate(modules: List<NativeModule>): String {\n    val cxxModules = modules.filter { it.hasCxxImplementation }\n    val javaModules = modules.filter { it.hasJavaImplementation }\n    val fabricLibraries =\n      modules\n        .filter { it.hasFabricComponents }\n        .mapNotNull { module ->\n          val libraryName = module.libraryName ?: return@mapNotNull null\n          libraryName to module.componentDescriptors\n        }\n        .groupBy({ it.first }, { it.second })\n        .mapValues { (_, descriptorLists) -> descriptorLists.flatten().distinct() }\n        .toSortedMap()\n\n    return buildString {\n      appendLine(\"// Generated by Granite Gradle Plugin - DO NOT EDIT\")\n      appendLine(\"// This file is automatically generated during the build process\")\n      appendLine()\n      appendLine(\"#include <autolinking.h>\")\n      appendLine()\n\n      // C++ TurboModule headers\n      if (cxxModules.isNotEmpty()) {\n        appendLine(\"// C++ TurboModule headers\")\n        cxxModules.forEach { module ->\n          module.cxxModuleHeaderName?.let { headerName ->\n            appendLine(\"#include <$headerName.h>\")\n          }\n        }\n        appendLine()\n      }\n\n      // Fabric component descriptor headers\n      if (fabricLibraries.isNotEmpty()) {\n        appendLine(\"// Fabric component descriptor headers\")\n        fabricLibraries.forEach { (libraryName, componentDescriptors) ->\n          appendLine(\"#if defined(__has_include) && __has_include(<react/renderer/components/$libraryName/ComponentDescriptors.h>)\")\n          appendLine(\"#include <react/renderer/components/$libraryName/ComponentDescriptors.h>\")\n          appendLine(\"#endif\")\n          componentDescriptors.forEach { descriptor ->\n            appendLine(\"#if defined(__has_include) && __has_include(<react/renderer/components/$libraryName/$descriptor.h>)\")\n            appendLine(\"#include <react/renderer/components/$libraryName/$descriptor.h>\")\n            appendLine(\"#endif\")\n          }\n        }\n        appendLine()\n      }\n\n      appendLine(\"namespace facebook::react {\")\n      appendLine()\n\n      // autolinking_registerProviders function\n      appendLine(\"void autolinking_registerProviders(\")\n      appendLine(\"    std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {\")\n      if (fabricLibraries.isNotEmpty()) {\n        appendLine(\"  // Register Fabric component descriptors from autolinked libraries\")\n        fabricLibraries.forEach { (libraryName, componentDescriptors) ->\n          appendLine(\"#if defined(__has_include) && __has_include(<react/renderer/components/$libraryName/ComponentDescriptors.h>)\")\n          appendLine(\"  ${libraryName}_registerComponentDescriptorsFromCodegen(registry);\")\n          appendLine(\"#endif\")\n          componentDescriptors.forEach { descriptor ->\n            appendLine(\"#if defined(__has_include) && __has_include(<react/renderer/components/$libraryName/$descriptor.h>)\")\n            appendLine(\"  registry->add(concreteComponentDescriptorProvider<$descriptor>());\")\n            appendLine(\"#endif\")\n          }\n        }\n      } else {\n        appendLine(\"  // No autolinked Fabric components found\")\n      }\n      appendLine(\"}\")\n      appendLine()\n\n      // autolinking_cxxModuleProvider function\n      appendLine(\"std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(\")\n      appendLine(\"    const std::string& moduleName,\")\n      appendLine(\"    const std::shared_ptr<CallInvoker>& jsInvoker) {\")\n      if (cxxModules.isNotEmpty()) {\n        appendLine(\"  // Check C++ TurboModules (early-return pattern)\")\n        cxxModules.forEach { module ->\n          module.cxxModuleHeaderName?.let { headerName ->\n            appendLine(\"  if (moduleName == $headerName::kModuleName) {\")\n            appendLine(\"    return std::make_shared<$headerName>(jsInvoker);\")\n            appendLine(\"  }\")\n          }\n        }\n      } else {\n        appendLine(\"  // No autolinked C++ TurboModules found\")\n      }\n      appendLine()\n      appendLine(\"  return nullptr;\")\n      appendLine(\"}\")\n      appendLine()\n\n      // autolinking_ModuleProvider function\n      appendLine(\"std::shared_ptr<TurboModule> autolinking_ModuleProvider(\")\n      appendLine(\"    const std::string& moduleName,\")\n      appendLine(\"    const JavaTurboModule::InitParams& params) {\")\n      if (javaModules.isNotEmpty()) {\n        appendLine(\"  // Delegate to Java TurboModule providers (early-return pattern)\")\n        javaModules.forEach { module ->\n          module.libraryName?.let { libraryName ->\n            val sanitized = module.sanitizedName()\n            appendLine(\"  auto module_$sanitized = ${libraryName}_ModuleProvider(moduleName, params);\")\n            appendLine(\"  if (module_$sanitized != nullptr) {\")\n            appendLine(\"    return module_$sanitized;\")\n            appendLine(\"  }\")\n          }\n        }\n      } else {\n        appendLine(\"  // No autolinked Java TurboModules found\")\n      }\n      appendLine()\n      appendLine(\"  return nullptr;\")\n      appendLine(\"}\")\n      appendLine()\n\n      appendLine(\"} // namespace facebook::react\")\n    }\n  }\n\n  /**\n   * Writes autolinking.cpp to the specified output directory.\n   */\n  fun generateToFile(modules: List<NativeModule>, outputDir: File) {\n    val content = generate(modules)\n    val outputFile = File(outputDir, \"autolinking.cpp\")\n    outputFile.parentFile.mkdirs()\n    outputFile.writeText(content)\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/generators/EntryPointGenerator.kt",
    "content": "package run.granite.gradle.generators\n\nimport java.io.File\n\n/**\n * Generates ReactNativeApplicationEntryPoint.java for SoLoader initialization\n * and New Architecture loading.\n *\n * This generator creates Java code that:\n * - Provides ReactNativeApplicationEntryPoint class with static loadReactNative method\n * - Initializes SoLoader with OpenSourceMergedSoMapping\n * - Conditionally loads New Architecture components\n * - Conditionally enables edge-to-edge UI\n * - Places generated code in com.facebook.react package\n * - Throws RuntimeException on SoLoader failure\n */\nobject EntryPointGenerator {\n  /**\n   * Generates ReactNativeApplicationEntryPoint.java file content.\n   *\n   * @param packageName The Android package name from project configuration\n   * @return Generated Java code as string\n   * @throws IllegalStateException if packageName is null\n   */\n  fun generate(packageName: String?): String {\n    // Validate package name is present\n    requireNotNull(packageName) {\n      \"Android package name not found in react-native config. \" +\n        \"Ensure project has valid android configuration.\"\n    }\n\n    return buildString {\n      appendLine(\"// Generated by Granite Gradle Plugin - DO NOT EDIT\")\n      appendLine(\"// This file is automatically generated during the build process\")\n      appendLine()\n      appendLine(\"package com.facebook.react;\")\n      appendLine()\n      appendLine(\"import android.content.Context;\")\n      appendLine(\"import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;\")\n      appendLine(\"import com.facebook.react.soloader.OpenSourceMergedSoMapping;\")\n      appendLine(\"import com.facebook.react.views.view.WindowUtilKt;\")\n      appendLine(\"import com.facebook.soloader.SoLoader;\")\n      appendLine()\n      appendLine(\"/**\")\n      appendLine(\" * ReactNativeApplicationEntryPoint provides static initialization for React Native runtime.\")\n      appendLine(\" * This class handles SoLoader initialization and New Architecture component loading.\")\n      appendLine(\" */\")\n      appendLine(\"public class ReactNativeApplicationEntryPoint {\")\n      appendLine()\n      appendLine(\"  /**\")\n      appendLine(\"   * Loads the React Native runtime with proper SoLoader and New Architecture initialization.\")\n      appendLine(\"   *\")\n      appendLine(\"   * @param context Application context for SoLoader initialization\")\n      appendLine(\"   * @throws RuntimeException if SoLoader initialization fails\")\n      appendLine(\"   */\")\n      appendLine(\"  public static void loadReactNative(Context context) {\")\n      appendLine(\"    // Initialize SoLoader with merged shared object mapping\")\n      appendLine(\"    try {\")\n      appendLine(\"      SoLoader.init(context, OpenSourceMergedSoMapping.INSTANCE);\")\n      appendLine(\"    } catch (Exception e) {\")\n      appendLine(\"      throw new RuntimeException(\\\"Failed to initialize SoLoader\\\", e);\")\n      appendLine(\"    }\")\n      appendLine()\n      appendLine(\"    // Load New Architecture components if enabled\")\n      appendLine(\"    // if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {\")\n      appendLine(\"    DefaultNewArchitectureEntryPoint.load();\")\n      appendLine(\"    WindowUtilKt.setEdgeToEdgeFeatureFlagOn();\")\n      appendLine(\"    // }\")\n      appendLine()\n      appendLine(\"    // Enable edge-to-edge UI if configured\")\n      appendLine(\"    // if (BuildConfig.IS_EDGE_TO_EDGE_ENABLED) {\")\n      appendLine(\"      // Edge-to-edge feature flag is set in BuildConfig\")\n      appendLine(\"    // }\")\n      appendLine(\"  }\")\n      appendLine()\n      appendLine(\"  private ReactNativeApplicationEntryPoint() {\")\n      appendLine(\"    // Utility class - prevent instantiation\")\n      appendLine(\"  }\")\n      appendLine(\"}\")\n    }\n  }\n\n  /**\n   * Writes ReactNativeApplicationEntryPoint.java to the specified output directory.\n   *\n   * @param packageName Android package name from project configuration\n   * @param outputDir Output directory for Java source files\n   * @throws IllegalStateException if packageName is null\n   */\n  fun generateToFile(packageName: String?, outputDir: File) {\n    val content = generate(packageName)\n\n    // Create package directory structure: com/facebook/react/\n    val packageDir = File(outputDir, \"src/main/java/com/facebook/react\")\n    packageDir.mkdirs()\n\n    val outputFile = File(packageDir, \"ReactNativeApplicationEntryPoint.java\")\n    outputFile.writeText(content)\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/models/AndroidDependencyConfig.kt",
    "content": "package run.granite.gradle.models\n\n/**\n * Complete Android-specific configuration for a native module.\n * Maps directly to the \"platforms.android\" JSON structure from react-native config.\n *\n * All fields are nullable as they may be absent in the JSON configuration.\n * Missing fields are treated identically to null fields.\n */\ndata class AndroidDependencyConfig(\n  val sourceDir: String?,\n  val packageImportPath: String?,\n  val packageInstance: String?,\n  val dependencyConfiguration: String?,\n  val buildTypes: List<String>?,\n  val libraryName: String?,\n  val componentDescriptors: List<String>?,\n  val cmakeListsPath: String?,\n  val cxxModuleCMakeListsPath: String?,\n  val cxxModuleCMakeListsModuleName: String?,\n  val cxxModuleHeaderName: String?,\n  val isPureCxxDependency: Boolean?,\n)\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/models/AutolinkingConfig.kt",
    "content": "package run.granite.gradle.models\n\n/**\n * Root configuration object parsed from `react-native config` JSON output.\n *\n * Provides filtered views of dependencies for different code generation purposes:\n * - androidDependencies(): All modules with Android native code\n * - javaModules(): Modules with Java TurboModule implementations\n * - cxxModules(): Modules with C++ TurboModule implementations\n * - fabricModules(): Modules with Fabric components\n * - cmakeModules(): Modules with CMake configuration\n */\ndata class AutolinkingConfig(\n  val project: ProjectInfo,\n  val dependencies: Map<String, DependencyConfig>,\n) {\n  /**\n   * Filters dependencies to only those with Android native code.\n   * Excludes JavaScript-only packages.\n   * Reads each module's package.json to check for includesGeneratedCode flag.\n   */\n  fun androidDependencies(): List<NativeModule> = dependencies.mapNotNull { (name, config) ->\n    config.platforms?.android?.let { androidConfig ->\n      NativeModule.from(name, androidConfig, config.root)\n    }\n  }\n\n  /**\n   * Returns modules that have Java TurboModule implementations.\n   * Identified by non-null packageImportPath and packageInstance.\n   */\n  fun javaModules(): List<NativeModule> = androidDependencies().filter { it.hasJavaImplementation }\n\n  /**\n   * Returns modules that have C++ TurboModule implementations.\n   * Identified by non-null cxxModuleHeaderName.\n   */\n  fun cxxModules(): List<NativeModule> = androidDependencies().filter { it.hasCxxImplementation }\n\n  /**\n   * Returns modules that have Fabric components.\n   * Identified by non-empty componentDescriptors array.\n   */\n  fun fabricModules(): List<NativeModule> = androidDependencies().filter { it.hasFabricComponents }\n\n  /**\n   * Returns modules that have CMake configuration.\n   * Identified by non-null cmakeListsPath or cxxModuleCMakeListsPath.\n   */\n  fun cmakeModules(): List<NativeModule> = androidDependencies().filter { it.hasCMakeConfiguration }\n}\n\n/**\n * Metadata about the React Native project itself.\n * Used for entry point generation.\n */\ndata class ProjectInfo(\n  val name: String?,\n  val version: String?,\n  val ios: Map<String, Any>?,\n  val android: AndroidProjectConfig?,\n)\n\n/**\n * Android project configuration extracted from react-native config.\n * packageName is required for entry point generation.\n */\ndata class AndroidProjectConfig(\n  val sourceDir: String?,\n  val manifestPath: String?,\n  val packageName: String?,\n)\n\n/**\n * Top-level configuration for a single dependency.\n */\ndata class DependencyConfig(\n  val name: String,\n  val root: String,\n  val platforms: PlatformConfig?,\n)\n\n/**\n * Platform-specific configuration container.\n */\ndata class PlatformConfig(\n  val ios: Map<String, Any>?,\n  val android: AndroidDependencyConfig?,\n)\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/models/CMakeEntry.kt",
    "content": "package run.granite.gradle.models\n\nimport java.io.File\n\n/**\n * Represents a single add_subdirectory entry in Android-autolinking.cmake.\n *\n * Each CMake entry includes:\n * - sourcePath: Path to the directory containing CMakeLists.txt\n * - buildDirName: Unique build directory name for this module\n * - libraryTargets: List of CMake library targets to be linked\n */\ndata class CMakeEntry(\n  val sourcePath: String,\n  val buildDirName: String,\n  val libraryTargets: List<String>,\n) {\n  /**\n   * Sanitizes the source path for CMake.\n   * - Removes trailing /CMakeLists.txt or \\CMakeLists.txt\n   * - Converts to absolute path if relative\n   * - Replaces backslashes with forward slashes\n   */\n  fun sanitizedPath(moduleRoot: File): String {\n    var path = sourcePath.removeSuffix(\"/CMakeLists.txt\")\n      .removeSuffix(\"\\\\CMakeLists.txt\")\n\n    val file = File(path)\n    if (!file.isAbsolute) {\n      path = File(moduleRoot, path).canonicalPath\n    }\n\n    return path.replace('\\\\', '/')\n  }\n\n  /**\n   * Generates the add_subdirectory command line with existence check.\n   * Wraps with if(EXISTS ...) to prevent CMake errors during clean\n   * when codegen directories don't exist yet.\n   */\n  fun toCMakeCommand(moduleRoot: File): String {\n    val sanitized = sanitizedPath(moduleRoot)\n    return \"\"\"if(EXISTS \"$sanitized\")\n  add_subdirectory(\"$sanitized\" $buildDirName)\nendif()\"\"\"\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/models/NativeModule.kt",
    "content": "package run.granite.gradle.models\n\n/**\n * Enriched model representing a React Native native module with computed properties.\n * This is the primary model used by code generators.\n *\n * Constructed from AndroidDependencyConfig with validation:\n * - packageImportPath and packageInstance must both be present or both be null\n */\ndata class NativeModule(\n  val name: String,\n  val packageImportPath: String?,\n  val packageInstance: String?,\n  val dependencyConfiguration: String?,\n  val buildTypes: List<String>,\n  val libraryName: String?,\n  val componentDescriptors: List<String>,\n  val cmakeListsPath: String?,\n  val cxxModuleCMakeListsPath: String?,\n  val cxxModuleCMakeListsModuleName: String?,\n  val cxxModuleHeaderName: String?,\n  val isPureCxxDependency: Boolean,\n  /**\n   * True if the module's package.json has codegenConfig.includesGeneratedCode: true.\n   * Modules with this flag use their own codegen system (e.g., brick-codegen)\n   * and should be excluded from react-native-codegen based autolinking.\n   */\n  val includesGeneratedCode: Boolean = false,\n) {\n  init {\n    // Validate packageImportPath and packageInstance pairing\n    val hasImportPath = packageImportPath != null\n    val hasInstance = packageInstance != null\n    require(hasImportPath == hasInstance) {\n      \"Module '$name': Failed to validate config - packageImportPath and packageInstance \" +\n        \"must both be present or both be null. Check module's react-native.config.js.\"\n    }\n  }\n\n  /**\n   * True if module has Java TurboModule implementation.\n   * Identified by non-null packageImportPath and packageInstance.\n   */\n  val hasJavaImplementation: Boolean\n    get() = packageImportPath != null && packageInstance != null\n\n  /**\n   * True if module has C++ TurboModule implementation.\n   * Identified by non-null cxxModuleHeaderName.\n   */\n  val hasCxxImplementation: Boolean\n    get() = cxxModuleHeaderName != null\n\n  /**\n   * True if module has any Fabric components.\n   * Identified by non-empty componentDescriptors array.\n   */\n  val hasFabricComponents: Boolean\n    get() = componentDescriptors.isNotEmpty()\n\n  /**\n   * True if module has CMake configuration.\n   * Identified by non-null cmakeListsPath or cxxModuleCMakeListsPath.\n   */\n  val hasCMakeConfiguration: Boolean\n    get() = cmakeListsPath != null || cxxModuleCMakeListsPath != null\n\n  /**\n   * True if module needs to be included in C++ autolinking.\n   * Required for C++ TurboModules or Fabric components.\n   */\n  val needsCppAutolinking: Boolean\n    get() = hasCxxImplementation || hasFabricComponents\n\n  /**\n   * Returns C++ identifier-safe name by sanitizing module name.\n   * Replaces invalid characters (spaces, hyphens, special chars) with underscores.\n   */\n  fun sanitizedName(): String = name.replace(Regex(\"[^a-zA-Z0-9_]\"), \"_\")\n\n  /**\n   * Returns list of CMake entries for this module.\n   * Handles both standard CMakeLists.txt and separate cxxModule CMakeLists.txt.\n   */\n  fun cmakeEntries(): List<CMakeEntry> {\n    val entries = mutableListOf<CMakeEntry>()\n\n    // Add standard CMakeLists.txt entry\n    cmakeListsPath?.let { path ->\n      entries.add(\n        CMakeEntry(\n          sourcePath = path,\n          buildDirName = \"${libraryName}_autolinked_build\",\n          libraryTargets = listOfNotNull(\n            libraryName?.let { \"react_codegen_$it\" },\n          ),\n        ),\n      )\n    }\n\n    // Add C++ TurboModule CMakeLists.txt entry\n    cxxModuleCMakeListsPath?.let { path ->\n      entries.add(\n        CMakeEntry(\n          sourcePath = path,\n          buildDirName = \"${libraryName}_cxx_autolinked_build\",\n          libraryTargets = listOfNotNull(cxxModuleCMakeListsModuleName),\n        ),\n      )\n    }\n\n    return entries\n  }\n\n  companion object {\n    /**\n     * Constructs NativeModule from AndroidDependencyConfig with validation.\n     * Treats null and missing optional fields identically.\n     *\n     * @param name Module name\n     * @param config Android dependency configuration\n     * @param moduleRootPath Root path of the module (for reading package.json)\n     */\n    fun from(\n      name: String,\n      config: AndroidDependencyConfig,\n      moduleRootPath: String? = null,\n    ): NativeModule {\n      val includesGeneratedCode = moduleRootPath?.let {\n        readIncludesGeneratedCodeFlag(it)\n      } ?: false\n\n      return NativeModule(\n        name = name,\n        packageImportPath = config.packageImportPath,\n        packageInstance = config.packageInstance,\n        dependencyConfiguration = config.dependencyConfiguration,\n        buildTypes = config.buildTypes.orEmpty(),\n        libraryName = config.libraryName,\n        componentDescriptors = config.componentDescriptors.orEmpty(),\n        cmakeListsPath = config.cmakeListsPath,\n        cxxModuleCMakeListsPath = config.cxxModuleCMakeListsPath,\n        cxxModuleCMakeListsModuleName = config.cxxModuleCMakeListsModuleName,\n        cxxModuleHeaderName = config.cxxModuleHeaderName,\n        isPureCxxDependency = config.isPureCxxDependency ?: false,\n        includesGeneratedCode = includesGeneratedCode,\n      )\n    }\n\n    /**\n     * Reads codegenConfig.includesGeneratedCode from module's package.json.\n     * Returns false if the file doesn't exist or the flag is not set.\n     */\n    private fun readIncludesGeneratedCodeFlag(moduleRootPath: String): Boolean {\n      return try {\n        val packageJsonFile = java.io.File(moduleRootPath, \"package.json\")\n        if (!packageJsonFile.exists()) return false\n\n        val content = packageJsonFile.readText()\n        val gson = com.google.gson.Gson()\n\n        @Suppress(\"UNCHECKED_CAST\")\n        val json = gson.fromJson(content, Map::class.java) as? Map<String, Any>\n          ?: return false\n\n        @Suppress(\"UNCHECKED_CAST\")\n        val codegenConfig = json[\"codegenConfig\"] as? Map<String, Any>\n          ?: return false\n\n        codegenConfig[\"includesGeneratedCode\"] as? Boolean ?: false\n      } catch (e: Exception) {\n        // Fail gracefully - treat as false if we can't read the file\n        false\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/tasks/AssetPackagingTask.kt",
    "content": "package run.granite.gradle.tasks\n\nimport org.gradle.api.DefaultTask\nimport org.gradle.api.file.DirectoryProperty\nimport org.gradle.api.file.RegularFileProperty\nimport org.gradle.api.provider.Property\nimport org.gradle.api.tasks.*\nimport java.io.File\nimport java.util.zip.GZIPOutputStream\n\n/**\n * Gradle task for packaging React Native assets and bundles.\n *\n * This task:\n * 1. Copies the JavaScript bundle to Android assets directory\n * 2. Compresses the bundle with gzip (if enabled)\n * 3. Copies React Native drawable assets\n * 4. Organizes assets per build variant\n *\n * The packaged assets are included in the final AAR file.\n *\n * Inputs:\n * - JavaScript bundle file\n * - React Native assets directory\n * - Compression settings\n *\n * Outputs:\n * - Assets in src/{variant}/assets/\n * - Drawable resources in src/{variant}/res/\n */\n@CacheableTask\nabstract class AssetPackagingTask : DefaultTask() {\n\n  /**\n   * JavaScript bundle file to package.\n   */\n  @get:InputFile\n  @get:PathSensitive(PathSensitivity.RELATIVE)\n  abstract val bundleFile: RegularFileProperty\n\n  /**\n   * Directory containing React Native drawable assets.\n   */\n  @get:InputDirectory\n  @get:PathSensitive(PathSensitivity.RELATIVE)\n  @get:Optional\n  abstract val assetsDir: DirectoryProperty\n\n  /**\n   * Output assets directory (src/{variant}/assets/).\n   */\n  @get:OutputDirectory\n  abstract val outputAssetsDir: DirectoryProperty\n\n  /**\n   * Output resources directory (src/{variant}/res/).\n   */\n  @get:OutputDirectory\n  @get:Optional\n  abstract val outputResDir: DirectoryProperty\n\n  /**\n   * Bundle asset name (e.g., \"index.android.bundle\").\n   */\n  @get:Input\n  abstract val bundleAssetName: Property<String>\n\n  /**\n   * Whether to compress the bundle with gzip.\n   */\n  @get:Input\n  abstract val compressionEnabled: Property<Boolean>\n\n  /**\n   * Variant name for logging.\n   */\n  @get:Input\n  abstract val variantName: Property<String>\n\n  init {\n    group = \"granite\"\n    description = \"Packages React Native assets and bundles\"\n  }\n\n  @TaskAction\n  fun execute() {\n    val variant = variantName.get()\n    logger.lifecycle(\"Packaging assets for variant: $variant\")\n\n    // Package JavaScript bundle\n    packageBundle()\n\n    // Package drawable assets\n    packageDrawableAssets()\n\n    logger.lifecycle(\"Asset packaging complete for variant: $variant\")\n  }\n\n  /**\n   * Packages the JavaScript bundle into the assets directory.\n   *\n   * If compression is enabled, creates a gzipped bundle file.\n   */\n  private fun packageBundle() {\n    val bundleSource = bundleFile.get().asFile\n    val bundleName = bundleAssetName.get()\n\n    if (!bundleSource.exists()) {\n      error(\n        \"\"\"\n                |Bundle file not found: ${bundleSource.absolutePath}\n                |\n                |Solution: Ensure the bundle task completed successfully before packaging.\n        \"\"\".trimMargin(),\n      )\n    }\n\n    val outputDir = outputAssetsDir.get().asFile\n    outputDir.mkdirs()\n\n    if (compressionEnabled.get()) {\n      // Create gzipped bundle\n      val compressedBundle = File(outputDir, \"$bundleName.gz\")\n      logger.lifecycle(\"Compressing bundle: ${compressedBundle.name}\")\n\n      bundleSource.inputStream().use { input ->\n        GZIPOutputStream(compressedBundle.outputStream()).use { gzipOut ->\n          input.copyTo(gzipOut)\n        }\n      }\n\n      logger.lifecycle(\"Created compressed bundle: ${compressedBundle.absolutePath}\")\n    } else {\n      // Copy bundle without compression\n      val outputBundle = File(outputDir, bundleName)\n      bundleSource.copyTo(outputBundle, overwrite = true)\n      logger.lifecycle(\"Copied bundle: ${outputBundle.absolutePath}\")\n    }\n  }\n\n  /**\n   * Packages React Native drawable assets into the res directory.\n   *\n   * Copies drawable-* directories from the assets directory to the Android\n   * resources directory for inclusion in the AAR.\n   */\n  private fun packageDrawableAssets() {\n    if (!assetsDir.isPresent) {\n      logger.debug(\"No assets directory specified, skipping drawable packaging\")\n      return\n    }\n\n    val assetsSource = assetsDir.get().asFile\n    if (!assetsSource.exists()) {\n      logger.debug(\"Assets directory does not exist: ${assetsSource.absolutePath}\")\n      return\n    }\n\n    if (!outputResDir.isPresent) {\n      logger.debug(\"No output res directory specified, skipping drawable packaging\")\n      return\n    }\n\n    val outputRes = outputResDir.get().asFile\n    outputRes.mkdirs()\n\n    // Find all drawable-* directories\n    val drawableDirs = assetsSource.listFiles { file ->\n      file.isDirectory && file.name.startsWith(\"drawable-\")\n    } ?: emptyArray()\n\n    if (drawableDirs.isEmpty()) {\n      logger.debug(\"No drawable directories found in assets\")\n      return\n    }\n\n    // Copy each drawable directory\n    for (drawableDir in drawableDirs) {\n      val targetDir = File(outputRes, drawableDir.name)\n      targetDir.mkdirs()\n\n      drawableDir.walk()\n        .filter { it.isFile }\n        .forEach { sourceFile ->\n          val relativePath = sourceFile.relativeTo(drawableDir).path\n          val targetFile = File(targetDir, relativePath)\n          targetFile.parentFile.mkdirs()\n          sourceFile.copyTo(targetFile, overwrite = true)\n        }\n\n      logger.lifecycle(\"Copied drawable assets: ${drawableDir.name}\")\n    }\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/tasks/AutolinkingTask.kt",
    "content": "package run.granite.gradle.tasks\n\nimport com.google.gson.Gson\nimport com.google.gson.JsonObject\nimport org.gradle.api.DefaultTask\nimport org.gradle.api.file.DirectoryProperty\nimport org.gradle.api.file.RegularFileProperty\nimport org.gradle.api.provider.Property\nimport org.gradle.api.tasks.*\nimport org.gradle.process.ExecOperations\nimport run.granite.gradle.generators.CMakeGenerator\nimport run.granite.gradle.generators.CppAutolinkingGenerator\nimport run.granite.gradle.generators.EntryPointGenerator\nimport run.granite.gradle.models.AutolinkingConfig\nimport run.granite.gradle.models.NativeModule\nimport run.granite.gradle.utils.AutolinkingParser\nimport run.granite.gradle.utils.NodeExecutableFinder\nimport java.io.ByteArrayOutputStream\nimport java.io.File\nimport javax.inject.Inject\n\n/**\n * Gradle task for React Native autolinking.\n *\n * This task:\n * 1. Executes `react-native config` command to discover native modules\n * 2. Parses the autolinking configuration JSON\n * 3. Generates PackageList.kt file with all discovered React Native packages\n *\n * The generated PackageList.kt is used by the React Native initialization code\n * to automatically register all native modules without manual configuration.\n *\n * Inputs:\n * - React Native CLI path\n * - Node modules directory\n * - Project root directory\n *\n * Outputs:\n * - PackageList.kt file in build/generated/autolinking/\n */\n@CacheableTask\nabstract class AutolinkingTask @Inject constructor(\n  private val execOperations: ExecOperations,\n) : DefaultTask() {\n\n  /**\n   * React Native directory containing the CLI.\n   * Marked as Internal to avoid task output overlaps with other modules.\n   */\n  @get:Internal\n  abstract val reactNativeDir: DirectoryProperty\n\n  /**\n   * Node modules directory for dependency resolution.\n   * Marked as Internal to avoid task output overlaps with other modules.\n   */\n  @get:Internal\n  abstract val nodeModulesDir: DirectoryProperty\n\n  /**\n   * Project root directory.\n   * Marked as Internal to avoid task output overlaps with other modules.\n   */\n  @get:Internal\n  abstract val projectDir: DirectoryProperty\n\n  /**\n   * Output directory for generated PackageList.kt.\n   */\n  @get:OutputDirectory\n  abstract val outputDir: DirectoryProperty\n\n  /**\n   * Generated PackageList.kt file.\n   */\n  @get:OutputFile\n  abstract val packageListFile: RegularFileProperty\n\n  /**\n   * Package name for the generated PackageList class.\n   */\n  @get:Input\n  abstract val packageName: Property<String>\n\n  /**\n   * Output directory for generated JNI autolinking files.\n   */\n  @get:OutputDirectory\n  abstract val jniOutputDir: DirectoryProperty\n\n  /**\n   * Generated autolinking.h header file.\n   */\n  @get:OutputFile\n  abstract val autolinkingHeaderFile: RegularFileProperty\n\n  /**\n   * Generated autolinking.cpp implementation file.\n   */\n  @get:OutputFile\n  abstract val autolinkingCppFile: RegularFileProperty\n\n  init {\n    group = \"granite\"\n    description = \"Executes React Native autolinking and generates PackageList.kt\"\n  }\n\n  @TaskAction\n  fun execute() {\n    logger.lifecycle(\"Running React Native autolinking...\")\n\n    // Execute react-native config once and reuse results\n    val configJson = executeReactNativeConfig()\n\n    // Parse configuration using AutolinkingParser\n    val autolinkingConfig = try {\n      AutolinkingParser.parse(configJson)\n    } catch (e: IllegalArgumentException) {\n      // Fail-fast with descriptive error message\n      throw IllegalArgumentException(\n        \"react-native config: Failed to parse output. ${e.message}\",\n        e,\n      )\n    }\n\n    val modules = autolinkingConfig.androidDependencies()\n    val javaModules = autolinkingConfig.javaModules()\n\n    // Generate all autolinking files in a single task execution\n    generatePackageList(javaModules)\n    generateJniAutolinking(modules, autolinkingConfig)\n\n    logger.lifecycle(\"Autolinking complete. Found ${modules.size} native modules (${javaModules.size} Java, ${autolinkingConfig.cxxModules().size} C++, ${autolinkingConfig.fabricModules().size} Fabric).\")\n  }\n\n  /**\n   * Executes `react-native config` command and returns the JSON output.\n   *\n   * Implementation details in corresponding task.\n   */\n  private fun executeReactNativeConfig(): String {\n    val cliPath = reactNativeDir.get().file(\"cli.js\").asFile\n    val nodeExecutable = NodeExecutableFinder.findNodeExecutable()\n\n    if (!cliPath.exists()) {\n      error(\n        \"\"\"\n                |React Native CLI not found: ${cliPath.absolutePath}\n                |\n                |Solution: Run 'npm install' or 'yarn install' to install React Native\n        \"\"\".trimMargin(),\n      )\n    }\n\n    // Execute: node path/to/react-native/cli.js config\n    val command = listOf(\n      nodeExecutable.absolutePath,\n      cliPath.absolutePath,\n      \"config\",\n    )\n\n    val stdout = ByteArrayOutputStream()\n    val stderr = ByteArrayOutputStream()\n\n    val result = execOperations.exec {\n      workingDir = projectDir.get().asFile\n      commandLine = command\n      standardOutput = stdout\n      errorOutput = stderr\n      isIgnoreExitValue = true\n    }\n\n    if (result.exitValue != 0) {\n      error(\n        \"\"\"\n                |Failed to execute react-native config command.\n                |\n                |Command: ${command.joinToString(\" \")}\n                |Exit code: ${result.exitValue}\n                |Error output:\n                |$stderr\n        \"\"\".trimMargin(),\n      )\n    }\n\n    return stdout.toString()\n  }\n\n  /**\n   * Interpolates dynamic values (BuildConfig, R) in package instances.\n   * Replaces non-FQDN references with fully qualified package names.\n   */\n  private fun interpolateDynamicValues(input: String, pkgName: String): String = input.replace(Regex(\"([^.\\\\w])(BuildConfig|R)(\\\\W)\")) { match ->\n    val (prefix, className, suffix) = match.destructured\n    \"${prefix}$pkgName.${className}$suffix\"\n  }\n\n  /**\n   * Composes package import statements from native modules.\n   * Filters out pure C++ dependencies.\n   */\n  private fun composePackageImports(modules: List<run.granite.gradle.models.NativeModule>): String = modules\n    .filter { !it.isPureCxxDependency }\n    .mapNotNull { module ->\n      module.packageImportPath?.let { importPath ->\n        val cleanImportPath = importPath\n          .removePrefix(\"import \")\n          .removeSuffix(\";\")\n          .trim()\n        interpolateDynamicValues(\"import $cleanImportPath;\", packageName.get())\n      }\n    }\n    .joinToString(\"\\n\")\n\n  /**\n   * Composes package instance code for getPackages() method.\n   * Filters out pure C++ dependencies.\n   */\n  private fun composePackageInstance(modules: List<run.granite.gradle.models.NativeModule>): String = modules\n    .filter { !it.isPureCxxDependency }\n    .mapIndexed { index, module ->\n      val instanceCode = interpolateDynamicValues(\n        module.packageInstance ?: \"new UnknownPackage()\",\n        packageName.get(),\n      )\n      if (index == 0) \",\\n      $instanceCode\" else \",\\n      $instanceCode\"\n    }\n    .joinToString(\"\")\n\n  /**\n   * Generates PackageList.java file from discovered Java packages.\n   */\n  private fun generatePackageList(modules: List<run.granite.gradle.models.NativeModule>) {\n    val outputFile = packageListFile.get().asFile\n    outputFile.parentFile.mkdirs()\n\n    val packageImports = composePackageImports(modules)\n    val packageInstances = composePackageInstance(modules)\n\n    val packageListContent = \"\"\"\n// Generated by Granite Gradle Plugin - DO NOT EDIT\n// This file is automatically generated during the build process\npackage com.facebook.react;\n\nimport android.app.Application;\nimport android.content.Context;\nimport android.content.res.Resources;\n\nimport com.facebook.react.ReactPackage;\nimport com.facebook.react.ReactNativeHost;\nimport com.facebook.react.shell.MainPackageConfig;\nimport com.facebook.react.shell.MainReactPackage;\nimport java.util.Arrays;\nimport java.util.ArrayList;\n\n$packageImports\n\n@SuppressWarnings(\"deprecation\")\npublic class PackageList {\n  private Application application;\n  private ReactNativeHost reactNativeHost;\n  private MainPackageConfig mConfig;\n\n  public PackageList(ReactNativeHost reactNativeHost) {\n    this(reactNativeHost, null);\n  }\n\n  public PackageList(Application application) {\n    this(application, null);\n  }\n\n  public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {\n    this.reactNativeHost = reactNativeHost;\n    mConfig = config;\n  }\n\n  public PackageList(Application application, MainPackageConfig config) {\n    this.reactNativeHost = null;\n    this.application = application;\n    mConfig = config;\n  }\n\n  private ReactNativeHost getReactNativeHost() {\n    return this.reactNativeHost;\n  }\n\n  private Resources getResources() {\n    return this.getApplication().getResources();\n  }\n\n  private Application getApplication() {\n    if (this.reactNativeHost == null) return this.application;\n    return this.reactNativeHost.getApplication();\n  }\n\n  private Context getApplicationContext() {\n    return this.getApplication().getApplicationContext();\n  }\n\n  public ArrayList<ReactPackage> getPackages() {\n    return new ArrayList<>(Arrays.<ReactPackage>asList(\n      new MainReactPackage(mConfig)$packageInstances\n    ));\n  }\n}\n    \"\"\".trimIndent()\n\n    outputFile.writeText(packageListContent)\n    logger.lifecycle(\"Generated PackageList.java: ${outputFile.absolutePath}\")\n  }\n\n  /**\n   * Generates JNI autolinking files (autolinking.h, autolinking.cpp, Android-autolinking.cmake)\n   * and Entry Point (ReactNativeApplicationEntryPoint.java).\n   */\n  private fun generateJniAutolinking(\n    modules: List<NativeModule>,\n    config: AutolinkingConfig,\n  ) {\n    val jniDir = jniOutputDir.get().asFile\n    val javaOutputDir = outputDir.get().asFile\n    val projectRoot = projectDir.get().asFile\n\n    // Generate autolinking.h (header with forward declarations)\n    generateAutolinkingHeader(modules)\n\n    // Generate autolinking.cpp using CppAutolinkingGenerator\n    CppAutolinkingGenerator.generateToFile(modules, jniDir)\n    logger.lifecycle(\"Generated autolinking.cpp with ${modules.filter { it.needsCppAutolinking }.size} modules\")\n\n    // Generate Android-autolinking.cmake using CMakeGenerator\n    val cmakeModules = modules.filter { it.hasCMakeConfiguration }\n    if (cmakeModules.isNotEmpty()) {\n      CMakeGenerator.generateToFile(modules, projectRoot, jniDir)\n      logger.lifecycle(\"Generated Android-autolinking.cmake with ${cmakeModules.size} CMake modules\")\n    } else {\n      logger.lifecycle(\"Skipped Android-autolinking.cmake generation - no CMake modules found\")\n    }\n\n    // Generate ReactNativeApplicationEntryPoint.java using EntryPointGenerator\n    val packageName = config.project.android?.packageName\n    try {\n      EntryPointGenerator.generateToFile(packageName, javaOutputDir)\n      logger.lifecycle(\"Generated ReactNativeApplicationEntryPoint.java\")\n    } catch (e: IllegalStateException) {\n      // Package name validation error\n      logger.warn(\"Skipped entry point generation: ${e.message}\")\n    }\n\n    logger.lifecycle(\"Generated all autolinking files in: ${jniDir.absolutePath}\")\n  }\n\n  /**\n   * Generates autolinking.h header file with forward declarations.\n   */\n  private fun generateAutolinkingHeader(modules: List<run.granite.gradle.models.NativeModule>) {\n    val headerFile = autolinkingHeaderFile.get().asFile\n    headerFile.parentFile.mkdirs()\n\n    val cxxModules = modules.filter { it.hasCxxImplementation }\n    val javaModules = modules.filter { it.hasJavaImplementation }\n\n    val headerContent = buildString {\n      appendLine(\"// Generated by Granite Gradle Plugin - DO NOT EDIT\")\n      appendLine(\"// This file is automatically generated during the build process\")\n      appendLine()\n      appendLine(\"#pragma once\")\n      appendLine()\n      appendLine(\"#include <memory>\")\n      appendLine(\"#include <string>\")\n      appendLine()\n      appendLine(\"#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>\")\n      appendLine(\"#include <react/bridging/Bridging.h>\")\n      appendLine(\"#include <ReactCommon/CallInvokerHolder.h>\")\n      appendLine(\"#include <ReactCommon/TurboModule.h>\")\n      appendLine(\"#include <ReactCommon/JavaTurboModule.h>\")\n      appendLine()\n      appendLine(\"namespace facebook::react {\")\n      appendLine()\n\n      // Forward declarations for C++ TurboModule providers\n      if (cxxModules.isNotEmpty()) {\n        appendLine(\"// Forward declarations for C++ TurboModule providers\")\n        cxxModules.forEach { module ->\n          module.cxxModuleHeaderName?.let { headerName ->\n            appendLine(\"class $headerName;\")\n          }\n        }\n        appendLine()\n      }\n\n      // Forward declarations for Java TurboModule providers\n      if (javaModules.isNotEmpty()) {\n        appendLine(\"// Forward declarations for Java TurboModule providers\")\n        javaModules.forEach { module ->\n          module.libraryName?.let { libraryName ->\n            appendLine(\"std::shared_ptr<TurboModule> ${libraryName}_ModuleProvider(\")\n            appendLine(\"    const std::string& moduleName,\")\n            appendLine(\"    const JavaTurboModule::InitParams& params);\")\n            appendLine()\n          }\n        }\n      }\n\n      appendLine(\"/**\")\n      appendLine(\" * Registers Fabric component providers from autolinked libraries.\")\n      appendLine(\" */\")\n      appendLine(\"void autolinking_registerProviders(\")\n      appendLine(\"    std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);\")\n      appendLine()\n      appendLine(\"/**\")\n      appendLine(\" * Provides C++ TurboModule from autolinked libraries.\")\n      appendLine(\" */\")\n      appendLine(\"std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(\")\n      appendLine(\"    const std::string& name,\")\n      appendLine(\"    const std::shared_ptr<CallInvoker>& jsInvoker);\")\n      appendLine()\n      appendLine(\"/**\")\n      appendLine(\" * Provides Java TurboModule from autolinked libraries.\")\n      appendLine(\" */\")\n      appendLine(\"std::shared_ptr<TurboModule> autolinking_ModuleProvider(\")\n      appendLine(\"    const std::string& name,\")\n      appendLine(\"    const JavaTurboModule::InitParams& params);\")\n      appendLine()\n      appendLine(\"} // namespace facebook::react\")\n    }\n\n    headerFile.writeText(headerContent)\n    logger.debug(\"Generated autolinking.h: ${headerFile.absolutePath}\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/tasks/BundleTask.kt",
    "content": "package run.granite.gradle.tasks\n\nimport org.gradle.api.DefaultTask\nimport org.gradle.api.file.DirectoryProperty\nimport org.gradle.api.file.RegularFileProperty\nimport org.gradle.api.provider.Property\nimport org.gradle.api.tasks.*\nimport org.gradle.process.ExecOperations\nimport run.granite.gradle.utils.NodeExecutableFinder\nimport java.io.ByteArrayOutputStream\nimport java.io.File\nimport javax.inject.Inject\n\n/**\n * Gradle task for generating React Native JavaScript bundles.\n *\n * This task:\n * 1. Executes Metro bundler to bundle JavaScript code\n * 2. Compiles the bundle to Hermes bytecode (always enabled)\n * 3. Handles dev vs release build configurations\n * 4. Generates source maps for debugging\n */\n@CacheableTask\nabstract class BundleTask @Inject constructor(\n  private val execOperations: ExecOperations,\n) : DefaultTask() {\n\n  @get:InputFile\n  @get:PathSensitive(PathSensitivity.RELATIVE)\n  abstract val entryFile: RegularFileProperty\n\n  /**\n   * React Native directory.\n   * Marked as Internal to avoid task output overlaps with other modules.\n   */\n  @get:Internal\n  abstract val reactNativeDir: DirectoryProperty\n\n  /**\n   * Node modules directory.\n   * Marked as Internal to avoid task output overlaps with other modules.\n   */\n  @get:Internal\n  abstract val nodeModulesDir: DirectoryProperty\n\n  /**\n   * Project root directory.\n   * Marked as Internal to avoid task output overlaps with other modules.\n   */\n  @get:Internal\n  abstract val projectDir: DirectoryProperty\n\n  @get:OutputFile\n  abstract val bundleFile: RegularFileProperty\n\n  @get:OutputFile\n  abstract val sourceMapFile: RegularFileProperty\n\n  @get:Input\n  abstract val bundleAssetName: Property<String>\n\n  @get:Input\n  abstract val devMode: Property<Boolean>\n\n  @get:Input\n  abstract val variantName: Property<String>\n\n  init {\n    group = \"granite\"\n    description = \"Generates React Native JavaScript bundle\"\n  }\n\n  @TaskAction\n  fun execute() {\n    val variant = variantName.get()\n    logger.lifecycle(\"Bundling JavaScript for variant: $variant\")\n\n    // Validate entry file exists at execution time\n    // This allows flexibility for projects with JS in separate repos during development\n    val entryFileResolved = entryFile.get().asFile\n    if (!entryFileResolved.exists()) {\n      error(\n        \"\"\"\n                |JavaScript entry file not found: ${entryFileResolved.absolutePath}\n                |\n                |The entry file is required for bundle generation but was not found.\n                |This typically occurs when:\n                |  1. JavaScript source files are in a separate repository\n                |  2. The entry file path is incorrectly configured\n                |  3. Build is running before JS files are available\n                |\n                |Solutions:\n                |  1. Ensure JavaScript files are available before running release builds\n                |  2. Configure the correct entry file path in build.gradle.kts:\n                |     granite {\n                |         entryFile.set(\"path/to/index.js\")\n                |     }\n                |  3. For development, use Metro dev server instead of bundling\n                |\n                |Variant: $variant\n        \"\"\".trimMargin(),\n      )\n    }\n\n    val jsBundleFile = generateJavaScriptBundle()\n\n    // Always compile to Hermes bytecode (JSC not supported)\n    compileToHermes(jsBundleFile)\n\n    logger.lifecycle(\"Bundle generation complete for variant: $variant\")\n  }\n\n  private fun generateJavaScriptBundle(): File {\n    logger.lifecycle(\"Running Metro bundler...\")\n\n    val cliPath = reactNativeDir.get().file(\"cli.js\").asFile\n    val nodeExecutable = NodeExecutableFinder.findNodeExecutable()\n\n    if (!cliPath.exists()) {\n      error(\"React Native CLI not found: ${cliPath.absolutePath}\")\n    }\n\n    val tempJsBundle = File(bundleFile.get().asFile.parentFile, \"temp_${bundleAssetName.get()}\")\n    tempJsBundle.parentFile.mkdirs()\n\n    val command = buildList {\n      add(nodeExecutable.absolutePath)\n      add(cliPath.absolutePath)\n      add(\"bundle\")\n      add(\"--platform\")\n      add(\"android\")\n      add(\"--entry-file\")\n      add(entryFile.get().asFile.absolutePath)\n      add(\"--bundle-output\")\n      add(tempJsBundle.absolutePath)\n      add(\"--sourcemap-output\")\n      add(sourceMapFile.get().asFile.absolutePath)\n      add(\"--assets-dest\")\n      add(bundleFile.get().asFile.parentFile.absolutePath)\n\n      if (devMode.get()) {\n        add(\"--dev\")\n        add(\"true\")\n      } else {\n        add(\"--dev\")\n        add(\"false\")\n        add(\"--minify\")\n        add(\"true\")\n      }\n    }\n\n    val stdout = ByteArrayOutputStream()\n    val stderr = ByteArrayOutputStream()\n\n    val result = execOperations.exec {\n      workingDir = projectDir.get().asFile\n      commandLine = command\n      standardOutput = stdout\n      errorOutput = stderr\n      isIgnoreExitValue = true\n    }\n\n    if (result.exitValue != 0) {\n      error(\"Failed to bundle JavaScript. Exit code: ${result.exitValue}\\n$stderr\")\n    }\n\n    logger.lifecycle(\"Metro bundling complete: ${tempJsBundle.absolutePath}\")\n    return tempJsBundle\n  }\n\n  private fun compileToHermes(jsBundleFile: File) {\n    logger.lifecycle(\"Compiling to Hermes bytecode...\")\n\n    val hermesExecutable = findHermesCompiler()\n\n    val command = listOf(\n      hermesExecutable.absolutePath,\n      \"-emit-binary\",\n      \"-out\",\n      bundleFile.get().asFile.absolutePath,\n      jsBundleFile.absolutePath,\n    )\n\n    val stdout = ByteArrayOutputStream()\n    val stderr = ByteArrayOutputStream()\n\n    val result = execOperations.exec {\n      commandLine = command\n      standardOutput = stdout\n      errorOutput = stderr\n      isIgnoreExitValue = true\n    }\n\n    if (result.exitValue != 0) {\n      error(\"Failed to compile to Hermes bytecode. Exit code: ${result.exitValue}\\n$stderr\")\n    }\n\n    jsBundleFile.delete()\n\n    logger.lifecycle(\"Hermes compilation complete: ${bundleFile.get().asFile.absolutePath}\")\n  }\n\n  private fun findHermesCompiler(): File {\n    // Determine OS-specific binary directory\n    val osBinDir = when {\n      System.getProperty(\"os.name\").startsWith(\"Windows\") -> \"win64-bin\"\n      System.getProperty(\"os.name\").startsWith(\"Mac\") -> \"osx-bin\"\n      else -> \"linux64-bin\"\n    }\n    val hermescName = if (osBinDir == \"win64-bin\") \"hermesc.exe\" else \"hermesc\"\n\n    val nodeModules = nodeModulesDir.get().asFile\n\n    // 1. Check known paths in hermes-engine package\n    val hermesEnginePaths = listOf(\n      File(nodeModules, \"hermes-engine/$osBinDir/$hermescName\"),\n      File(nodeModules, \"hermes-engine/bin/$hermescName\"),\n    )\n\n    for (path in hermesEnginePaths) {\n      if (path.exists() && path.canExecute()) {\n        return path\n      }\n    }\n\n    // 2. Check known paths in react-native SDKs\n    val reactNativeSdkPaths = listOf(\n      File(nodeModules, \"react-native/sdks/hermesc/$osBinDir/$hermescName\"),\n      File(nodeModules, \"react-native/sdks/hermes/$osBinDir/$hermescName\"),\n    )\n\n    for (path in reactNativeSdkPaths) {\n      if (path.exists() && path.canExecute()) {\n        return path\n      }\n    }\n\n    // 3. Check react-native/android Maven cache (original location)\n    val reactNativeAndroid = File(reactNativeDir.get().asFile, \"android\")\n    val hermesEngine = File(reactNativeAndroid, \"com/facebook/react/hermes-engine\")\n\n    if (hermesEngine.exists()) {\n      val hermescExecutables = hermesEngine.walk()\n        .filter { it.name == hermescName }\n        .filter { it.canExecute() }\n        .toList()\n\n      if (hermescExecutables.isNotEmpty()) {\n        return hermescExecutables.first()\n      }\n    }\n\n    // 4. Fallback: targeted search in specific subdirectories only\n    val targetedDirs = listOf(\n      File(nodeModules, \"hermes-engine\"),\n      File(nodeModules, \"react-native/sdks\"),\n    )\n\n    for (dir in targetedDirs) {\n      if (dir.exists()) {\n        val found = dir.walk()\n          .maxDepth(5) // Limit depth to prevent excessive traversal\n          .filter { it.name == hermescName }\n          .filter { it.canExecute() }\n          .firstOrNull()\n\n        if (found != null) {\n          return found\n        }\n      }\n    }\n\n    error(\"Hermes compiler (hermesc) not found. Searched paths: ${hermesEnginePaths + reactNativeSdkPaths}\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/tasks/CodegenArtifactsTask.kt",
    "content": "package run.granite.gradle.tasks\n\nimport org.gradle.api.DefaultTask\nimport org.gradle.api.file.DirectoryProperty\nimport org.gradle.api.file.RegularFileProperty\nimport org.gradle.api.provider.Property\nimport org.gradle.api.tasks.*\nimport org.gradle.process.ExecOperations\nimport run.granite.gradle.utils.NodeExecutableFinder\nimport java.io.ByteArrayOutputStream\nimport java.io.File\nimport javax.inject.Inject\n\n/**\n * Gradle task for React Native Codegen artifact generation.\n *\n * This task:\n * 1. Reads the schema.json generated by CodegenSchemaTask\n * 2. Executes React Native codegen to generate native code\n * 3. Outputs Java/Kotlin and C++ source files for TurboModules and Fabric components\n *\n * Generated artifacts include:\n * - Java/Kotlin interfaces for TurboModules\n * - JNI C++ bindings\n * - Fabric component descriptors\n *\n * Inputs:\n * - schema.json file\n * - React Native directory (for codegen binary)\n * - Package name for generated Java code\n *\n * Outputs:\n * - Java sources in build/generated/codegen/java/\n * - C++ sources in build/generated/codegen/jni/\n */\n@CacheableTask\nabstract class CodegenArtifactsTask @Inject constructor(\n  private val execOperations: ExecOperations,\n) : DefaultTask() {\n\n  /**\n   * Schema file generated by CodegenSchemaTask.\n   */\n  @get:InputFile\n  @get:PathSensitive(PathSensitivity.RELATIVE)\n  abstract val schemaFile: RegularFileProperty\n\n  /**\n   * React Native directory containing codegen tools.\n   * Marked as Internal to avoid task output overlaps with other modules.\n   */\n  @get:Internal\n  abstract val reactNativeDir: DirectoryProperty\n\n  /**\n   * Node modules directory.\n   * Marked as Internal to avoid task output overlaps with other modules.\n   */\n  @get:Internal\n  abstract val nodeModulesDir: DirectoryProperty\n\n  /**\n   * Package name for generated Java code.\n   */\n  @get:Input\n  abstract val packageName: Property<String>\n\n  /**\n   * Library name for generated code.\n   */\n  @get:Input\n  abstract val libraryName: Property<String>\n\n  /**\n   * Output directory for generated Java sources.\n   */\n  @get:OutputDirectory\n  abstract val javaOutputDir: DirectoryProperty\n\n  /**\n   * Output directory for generated C++ JNI sources.\n   */\n  @get:OutputDirectory\n  abstract val jniOutputDir: DirectoryProperty\n\n  init {\n    group = \"granite\"\n    description = \"Generates React Native Codegen artifacts (Java and C++)\"\n  }\n\n  @TaskAction\n  fun execute() {\n    logger.lifecycle(\"Generating React Native Codegen artifacts...\")\n\n    val schemaFileResolved = schemaFile.get().asFile\n\n    if (!schemaFileResolved.exists()) {\n      error(\n        \"\"\"\n                |Schema file not found: ${schemaFileResolved.absolutePath}\n                |\n                |The schema should be generated by CodegenSchemaTask.\n                |Ensure CodegenSchemaTask runs before CodegenArtifactsTask.\n        \"\"\".trimMargin(),\n      )\n    }\n\n    // Execute codegen binary\n    executeCodegen()\n\n    logger.lifecycle(\"Codegen artifacts generated successfully\")\n  }\n\n  /**\n   * Executes the React Native codegen binary.\n   *\n   * Implementation details in corresponding task.\n   */\n  private fun executeCodegen() {\n    val codegenBinary = findCodegenBinary()\n    val nodeExecutable = NodeExecutableFinder.findNodeExecutable()\n\n    if (!codegenBinary.exists()) {\n      logger.warn(\n        \"\"\"\n                |React Native codegen binary not found: ${codegenBinary.absolutePath}\n                |\n                |Skipping codegen generation. This is expected if your library has no TurboModules or Fabric components.\n        \"\"\".trimMargin(),\n      )\n      // Create empty output directories\n      javaOutputDir.get().asFile.mkdirs()\n      jniOutputDir.get().asFile.mkdirs()\n      return\n    }\n\n    // Prepare output directories\n    val javaOutputDirFile = javaOutputDir.get().asFile\n    val jniOutputDirFile = jniOutputDir.get().asFile\n\n    javaOutputDirFile.mkdirs()\n    jniOutputDirFile.mkdirs()\n\n    // Execute codegen\n    // Command: node path/to/codegen/lib/cli/combine/combine-js-to-schema-cli.js schema-file output-dir\n    val command = listOf(\n      nodeExecutable.absolutePath,\n      codegenBinary.absolutePath,\n      \"--schema\", schemaFile.get().asFile.absolutePath,\n      \"--javaPackageName\", packageName.get(),\n      \"--libraryName\", libraryName.get(),\n      \"--outputDir\", javaOutputDirFile.absolutePath,\n      \"--jniOutputDir\", jniOutputDirFile.absolutePath,\n    )\n\n    logger.debug(\"Executing codegen: ${command.joinToString(\" \")}\")\n\n    val stdout = ByteArrayOutputStream()\n    val stderr = ByteArrayOutputStream()\n\n    val result = execOperations.exec {\n      commandLine = command\n      standardOutput = stdout\n      errorOutput = stderr\n      isIgnoreExitValue = true\n    }\n\n    if (result.exitValue != 0) {\n      logger.warn(\n        \"\"\"\n                |Codegen execution completed with warnings (exit code: ${result.exitValue})\n                |\n                |This is expected if your library has no TurboModules or Fabric components.\n                |\n                |Error output:\n                |$stderr\n        \"\"\".trimMargin(),\n      )\n    } else {\n      logger.debug(\"Codegen output: $stdout\")\n    }\n\n    // Verify output was generated\n    if (javaOutputDirFile.listFiles()?.isEmpty() != false &&\n      jniOutputDirFile.listFiles()?.isEmpty() != false\n    ) {\n      logger.lifecycle(\"No codegen artifacts generated (no TurboModules/Fabric components found)\")\n    } else {\n      logger.lifecycle(\"Generated Java sources: ${javaOutputDirFile.absolutePath}\")\n      logger.lifecycle(\"Generated C++ sources: ${jniOutputDirFile.absolutePath}\")\n    }\n  }\n\n  /**\n   * Finds the React Native codegen binary.\n   */\n  private fun findCodegenBinary(): File {\n    // Try multiple possible locations\n    val possiblePaths = listOf(\n      \"react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js\",\n      \"@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js\",\n      \"react-native/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js\",\n    )\n\n    val nodeModules = nodeModulesDir.get().asFile\n\n    for (path in possiblePaths) {\n      val codegenFile = nodeModules.resolve(path)\n      if (codegenFile.exists()) {\n        logger.debug(\"Found codegen binary: ${codegenFile.absolutePath}\")\n        return codegenFile\n      }\n    }\n\n    // Return a placeholder file (will be checked for existence later)\n    return nodeModules.resolve(possiblePaths.first())\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/tasks/CodegenSchemaTask.kt",
    "content": "package run.granite.gradle.tasks\n\nimport com.google.gson.Gson\nimport com.google.gson.JsonArray\nimport com.google.gson.JsonObject\nimport org.gradle.api.DefaultTask\nimport org.gradle.api.file.DirectoryProperty\nimport org.gradle.api.file.RegularFileProperty\nimport org.gradle.api.provider.ListProperty\nimport org.gradle.api.tasks.*\nimport java.io.File\n\n/**\n * Gradle task for React Native Codegen schema generation.\n *\n * This task:\n * 1. Scans JavaScript source files for TurboModule and Fabric component specifications\n * 2. Extracts TypeScript/Flow type definitions\n * 3. Generates a unified JSON schema file for codegen\n *\n * The schema is used by CodegenArtifactsTask to generate native code (Java/C++).\n *\n * Inputs:\n * - JavaScript source directories\n * - React Native directory (for codegen tools)\n *\n * Outputs:\n * - schema.json file in build/generated/codegen/schema/\n */\n@CacheableTask\nabstract class CodegenSchemaTask : DefaultTask() {\n\n  /**\n   * JavaScript source directories to scan for specs.\n   */\n  @get:InputFiles\n  @get:PathSensitive(PathSensitivity.RELATIVE)\n  abstract val jsSourceDirs: ListProperty<File>\n\n  /**\n   * React Native directory containing codegen tools.\n   * Marked as Internal to avoid task output overlaps with other modules.\n   */\n  @get:Internal\n  abstract val reactNativeDir: DirectoryProperty\n\n  /**\n   * Node modules directory.\n   * Marked as Internal to avoid task output overlaps with other modules.\n   */\n  @get:Internal\n  abstract val nodeModulesDir: DirectoryProperty\n\n  /**\n   * Output directory for schema file.\n   */\n  @get:OutputDirectory\n  abstract val outputDir: DirectoryProperty\n\n  /**\n   * Generated schema.json file.\n   */\n  @get:OutputFile\n  abstract val schemaFile: RegularFileProperty\n\n  init {\n    group = \"granite\"\n    description = \"Scans JavaScript sources and generates React Native Codegen schema\"\n  }\n\n  @TaskAction\n  fun execute() {\n    logger.lifecycle(\"Generating React Native Codegen schema...\")\n\n    // Scan JavaScript files for specs\n    val specFiles = scanForSpecFiles()\n\n    if (specFiles.isEmpty()) {\n      logger.warn(\"No React Native spec files found in source directories\")\n      // Generate empty schema\n      generateEmptySchema()\n      return\n    }\n\n    logger.lifecycle(\"Found ${specFiles.size} spec files\")\n\n    // Generate schema from specs\n    generateSchema(specFiles)\n\n    logger.lifecycle(\"Codegen schema generated successfully\")\n  }\n\n  /**\n   * Scans JavaScript source directories for spec files.\n   *\n   * Spec files are identified by patterns:\n   * - Native*.js, Native*.ts, Native*.jsx, Native*.tsx (TurboModules)\n   * - *NativeComponent.js, *NativeComponent.ts, etc. (Fabric components)\n   *\n   * Implementation details in corresponding task.\n   */\n  private fun scanForSpecFiles(): List<File> {\n    val specFiles = mutableListOf<File>()\n\n    for (sourceDir in jsSourceDirs.get()) {\n      if (!sourceDir.exists() || !sourceDir.isDirectory) {\n        logger.warn(\"JavaScript source directory not found: ${sourceDir.absolutePath}\")\n        continue\n      }\n\n      sourceDir.walk()\n        .filter { it.isFile }\n        .filter { file ->\n          val name = file.name\n          // TurboModule specs\n          (\n            name.startsWith(\"Native\") && (\n              name.endsWith(\".js\") || name.endsWith(\".ts\") ||\n                name.endsWith(\".jsx\") || name.endsWith(\".tsx\")\n              )\n            ) ||\n            // Fabric component specs\n            (\n              name.contains(\"NativeComponent\") && (\n                name.endsWith(\".js\") || name.endsWith(\".ts\") ||\n                  name.endsWith(\".jsx\") || name.endsWith(\".tsx\")\n                )\n              )\n        }\n        .forEach { specFiles.add(it) }\n    }\n\n    return specFiles\n  }\n\n  /**\n   * Generates JSON schema from spec files.\n   *\n   * Uses React Native's codegen tools to parse TypeScript/Flow specs.\n   */\n  private fun generateSchema(specFiles: List<File>) {\n    val outputFile = schemaFile.get().asFile\n    outputFile.parentFile.mkdirs()\n\n    // For a basic implementation, we'll generate a schema structure\n    // In production, this should invoke React Native's codegen parser\n    val schema = JsonObject()\n    schema.addProperty(\"version\", \"0.81.0\")\n\n    val modules = JsonObject()\n\n    for (specFile in specFiles) {\n      val moduleName = specFile.nameWithoutExtension\n      val moduleSpec = JsonObject()\n      moduleSpec.addProperty(\"type\", \"NativeModule\")\n      moduleSpec.addProperty(\"spec\", specFile.absolutePath)\n\n      modules.add(moduleName, moduleSpec)\n\n      logger.debug(\"Added module to schema: $moduleName\")\n    }\n\n    schema.add(\"modules\", modules)\n\n    // Write schema to file\n    outputFile.writeText(Gson().toJson(schema))\n\n    logger.lifecycle(\"Schema written to: ${outputFile.absolutePath}\")\n  }\n\n  /**\n   * Generates an empty schema when no spec files are found.\n   */\n  private fun generateEmptySchema() {\n    val outputFile = schemaFile.get().asFile\n    outputFile.parentFile.mkdirs()\n\n    val emptySchema = JsonObject()\n    emptySchema.addProperty(\"version\", \"0.81.0\")\n    emptySchema.add(\"modules\", JsonObject())\n\n    outputFile.writeText(Gson().toJson(emptySchema))\n\n    logger.debug(\"Empty schema written to: ${outputFile.absolutePath}\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/utils/AutolinkingParser.kt",
    "content": "package run.granite.gradle.utils\n\nimport com.google.gson.Gson\nimport com.google.gson.JsonSyntaxException\nimport run.granite.gradle.models.*\n\n/**\n * Parses react-native config JSON output into typed AutolinkingConfig models.\n *\n * Implements fail-fast error handling:\n * - Throws IllegalArgumentException for malformed JSON with descriptive messages\n * - Follows error format: \"[Context] Failed: [Reason]. [Remediation]\"\n */\nobject AutolinkingParser {\n  private val gson = Gson()\n\n  /**\n   * Parses react-native config JSON string into AutolinkingConfig.\n   *\n   * @param json JSON string from react-native config command output\n   * @return Parsed AutolinkingConfig with validated models\n   * @throws IllegalArgumentException if JSON is malformed or missing required fields\n   */\n  fun parse(json: String): AutolinkingConfig {\n    try {\n      // Parse JSON into intermediate map structure\n      @Suppress(\"UNCHECKED_CAST\")\n      val root = gson.fromJson(json, Map::class.java) as Map<String, Any>\n\n      // Extract project info\n      val projectMap = root[\"project\"] as? Map<String, Any>\n        ?: throw IllegalArgumentException(\n          \"react-native config: Failed to parse JSON - missing 'project' field. \" +\n            \"Ensure react-native CLI is properly configured.\",\n        )\n\n      val project = parseProjectInfo(projectMap)\n\n      // Extract dependencies\n      @Suppress(\"UNCHECKED_CAST\")\n      val dependenciesMap = root[\"dependencies\"] as? Map<String, Any> ?: emptyMap()\n      val dependencies = parseDependencies(dependenciesMap as Map<String, Map<String, Any>>)\n\n      return AutolinkingConfig(\n        project = project,\n        dependencies = dependencies,\n      )\n    } catch (e: JsonSyntaxException) {\n      throw IllegalArgumentException(\n        \"react-native config: Failed to parse JSON - syntax error. \" +\n          \"Verify command output is valid JSON. Error: ${e.message}\",\n        e,\n      )\n    } catch (e: ClassCastException) {\n      throw IllegalArgumentException(\n        \"react-native config: Failed to parse JSON - unexpected structure. \" +\n          \"Ensure react-native CLI version is compatible. Error: ${e.message}\",\n        e,\n      )\n    }\n  }\n\n  private fun parseProjectInfo(map: Map<String, Any>): ProjectInfo {\n    @Suppress(\"UNCHECKED_CAST\")\n    val androidMap = map[\"android\"] as? Map<String, Any>\n\n    return ProjectInfo(\n      name = map[\"name\"] as? String,\n      version = map[\"version\"] as? String,\n      ios = map[\"ios\"] as? Map<String, Any>,\n      android = androidMap?.let { parseAndroidProjectConfig(it) },\n    )\n  }\n\n  private fun parseAndroidProjectConfig(map: Map<String, Any>): AndroidProjectConfig = AndroidProjectConfig(\n    sourceDir = map[\"sourceDir\"] as? String,\n    manifestPath = map[\"manifestPath\"] as? String,\n    packageName = map[\"packageName\"] as? String,\n  )\n\n  private fun parseDependencies(map: Map<String, Map<String, Any>>): Map<String, DependencyConfig> = map.mapValues { (name, depMap) ->\n    parseDependencyConfig(name, depMap)\n  }\n\n  private fun parseDependencyConfig(name: String, map: Map<String, Any>): DependencyConfig {\n    @Suppress(\"UNCHECKED_CAST\")\n    val platformsMap = map[\"platforms\"] as? Map<String, Any>\n\n    return DependencyConfig(\n      name = name,\n      root = map[\"root\"] as? String ?: \"\",\n      platforms = platformsMap?.let { parsePlatformConfig(it) },\n    )\n  }\n\n  private fun parsePlatformConfig(map: Map<String, Any>): PlatformConfig {\n    @Suppress(\"UNCHECKED_CAST\")\n    val androidMap = map[\"android\"] as? Map<String, Any>\n\n    return PlatformConfig(\n      ios = map[\"ios\"] as? Map<String, Any>,\n      android = androidMap?.let { parseAndroidDependencyConfig(it) },\n    )\n  }\n\n  private fun parseAndroidDependencyConfig(map: Map<String, Any>): AndroidDependencyConfig {\n    @Suppress(\"UNCHECKED_CAST\")\n    val componentDescriptorsList = map[\"componentDescriptors\"] as? List<String>\n\n    @Suppress(\"UNCHECKED_CAST\")\n    val buildTypesList = map[\"buildTypes\"] as? List<String>\n\n    return AndroidDependencyConfig(\n      sourceDir = map[\"sourceDir\"] as? String,\n      packageImportPath = map[\"packageImportPath\"] as? String,\n      packageInstance = map[\"packageInstance\"] as? String,\n      dependencyConfiguration = map[\"dependencyConfiguration\"] as? String,\n      buildTypes = buildTypesList,\n      libraryName = map[\"libraryName\"] as? String,\n      componentDescriptors = componentDescriptorsList,\n      cmakeListsPath = map[\"cmakeListsPath\"] as? String,\n      cxxModuleCMakeListsPath = map[\"cxxModuleCMakeListsPath\"] as? String,\n      cxxModuleCMakeListsModuleName = map[\"cxxModuleCMakeListsModuleName\"] as? String,\n      cxxModuleHeaderName = map[\"cxxModuleHeaderName\"] as? String,\n      isPureCxxDependency = map[\"isPureCxxDependency\"] as? Boolean,\n    )\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/utils/ConflictDetector.kt",
    "content": "package run.granite.gradle.utils\n\nimport org.gradle.api.Project\n\n/**\n * Detects conflicts with the standard React Native Gradle Plugin.\n *\n * The Granite plugin cannot coexist with the unpatched React Native Gradle Plugin\n * because both configure React Native build processes (codegen, autolinking, bundling).\n * Only one library module per dependency tree should use the Granite plugin.\n */\nobject ConflictDetector {\n\n  private const val REACT_NATIVE_PLUGIN_ID = \"com.facebook.react\"\n  private const val REACT_NATIVE_APP_PLUGIN_ID = \"com.facebook.react.application\"\n  private const val REACT_NATIVE_LIBRARY_PLUGIN_ID = \"com.facebook.react.library\"\n\n  /**\n   * Validates that the React Native Gradle Plugin is not applied to the same project.\n   *\n   * @param project The Gradle project\n   * @throws IllegalStateException if conflicting plugin is detected\n   */\n  fun validateNoConflicts(project: Project) {\n    // Check if React Native plugin is applied\n    val hasReactPlugin = project.pluginManager.hasPlugin(REACT_NATIVE_PLUGIN_ID)\n    val hasReactAppPlugin = project.pluginManager.hasPlugin(REACT_NATIVE_APP_PLUGIN_ID)\n    val hasReactLibraryPlugin = project.pluginManager.hasPlugin(REACT_NATIVE_LIBRARY_PLUGIN_ID)\n\n    if (hasReactPlugin || hasReactAppPlugin || hasReactLibraryPlugin) {\n      val detectedPlugin = when {\n        hasReactPlugin -> REACT_NATIVE_PLUGIN_ID\n        hasReactAppPlugin -> REACT_NATIVE_APP_PLUGIN_ID\n        else -> REACT_NATIVE_LIBRARY_PLUGIN_ID\n      }\n\n      error(\n        \"\"\"\n                |Granite plugin cannot coexist with the React Native Gradle Plugin.\n                |\n                |Detected conflicting plugin: $detectedPlugin\n                |Project: ${project.path}\n                |\n                |The Granite plugin provides its own implementation of React Native build tasks\n                |(codegen, autolinking, bundling) and cannot work alongside the standard plugin.\n                |\n                |Solutions:\n                |  1. Remove the React Native plugin from your library module:\n                |     Remove: id(\"$detectedPlugin\")\n                |     Keep: id(\"run.granite.library\")\n                |\n                |  2. If you need both plugins in your project:\n                |     - Use Granite plugin ONLY in the library module that packages React Native\n                |     - Application modules should NOT use either plugin\n                |     - Only ONE library module per dependency tree can use Granite plugin\n                |\n                |Example (library module build.gradle.kts):\n                |  plugins {\n                |      id(\"com.android.library\")\n                |      id(\"run.granite.library\")  // Use Granite, not React Native plugin\n                |  }\n                |\n                |Example (app module build.gradle.kts):\n                |  dependencies {\n                |      implementation(project(\":your-library-module\"))\n                |      // No React Native plugin needed - library provides everything\n                |  }\n        \"\"\".trimMargin(),\n      )\n    }\n\n    // Warn if multiple library modules might be using Granite plugin\n    // (This is detected by checking if dependencies include other Granite-enabled modules)\n    detectMultipleGraniteModules(project)\n\n    project.logger.lifecycle(\"Granite plugin: Conflict detection passed\")\n  }\n\n  /**\n   * Detects if multiple library modules in the dependency tree are using Granite plugin.\n   *\n   * This is a warning, not an error, because it may be intentional in some cases.\n   */\n  private fun detectMultipleGraniteModules(project: Project) {\n    // Check if any dependencies also apply the Granite plugin\n    val graniteModuleCount = project.rootProject.subprojects.count { subproject ->\n      subproject.pluginManager.hasPlugin(\"run.granite.library\")\n    }\n\n    if (graniteModuleCount > 1) {\n      project.logger.warn(\n        \"\"\"\n                |\n                |⚠️ WARNING: Multiple modules in this project are using the Granite plugin.\n                |\n                |Detected $graniteModuleCount modules with 'run.granite.library' plugin applied.\n                |\n                |Best practice: Only ONE library module per dependency tree should use Granite plugin.\n                |Multiple Granite modules can cause:\n                |  - Duplicate React Native initialization\n                |  - Conflicting native module registration\n                |  - Increased AAR size\n                |  - Build performance issues\n                |\n                |If this is intentional, ensure the modules are not in the same dependency tree.\n                |\n        \"\"\".trimMargin(),\n      )\n    }\n  }\n\n  /**\n   * Checks if a project has the React Native plugin applied.\n   *\n   * @param project The Gradle project to check\n   * @return true if React Native plugin is applied, false otherwise\n   */\n  fun hasReactNativePlugin(project: Project): Boolean = project.pluginManager.hasPlugin(REACT_NATIVE_PLUGIN_ID) ||\n    project.pluginManager.hasPlugin(REACT_NATIVE_APP_PLUGIN_ID) ||\n    project.pluginManager.hasPlugin(REACT_NATIVE_LIBRARY_PLUGIN_ID)\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/utils/JdkValidator.kt",
    "content": "package run.granite.gradle.utils\n\nimport org.gradle.api.JavaVersion\nimport org.gradle.api.Project\n\n/**\n * Validates JDK version requirements for Granite plugin.\n *\n * The plugin requires JDK 17 or higher due to:\n * - Modern Gradle features requiring Java 17\n * - React Native Gradle plugin compatibility\n * - Android Gradle Plugin 8.x requirements\n */\nobject JdkValidator {\n\n  private val MINIMUM_JDK_VERSION = JavaVersion.VERSION_17\n\n  /**\n   * Validates that the current JDK meets minimum version requirements.\n   *\n   * @param project The Gradle project\n   * @throws IllegalStateException if JDK version is below minimum\n   */\n  fun validate(project: Project) {\n    val currentJavaVersion = JavaVersion.current()\n\n    if (currentJavaVersion < MINIMUM_JDK_VERSION) {\n      error(\n        \"\"\"\n                |Granite plugin requires JDK 17 or higher.\n                |\n                |Current JDK version: $currentJavaVersion\n                |Required JDK version: $MINIMUM_JDK_VERSION or higher\n                |\n                |Solutions:\n                |  1. Update your JDK installation to version 17 or higher\n                |  2. Configure Gradle to use JDK 17+:\n                |     - Set JAVA_HOME environment variable to JDK 17+ path\n                |     - Or configure in gradle.properties:\n                |       org.gradle.java.home=/path/to/jdk-17\n                |  3. Use Gradle toolchain to automatically download JDK 17:\n                |     Add to build.gradle.kts:\n                |       java {\n                |           toolchain {\n                |               languageVersion.set(JavaLanguageVersion.of(17))\n                |           }\n                |       }\n                |\n                |Project: ${project.path}\n        \"\"\".trimMargin(),\n      )\n    }\n\n    project.logger.lifecycle(\"Granite plugin: JDK validation passed (using JDK $currentJavaVersion)\")\n  }\n\n  /**\n   * Gets the current JDK version.\n   */\n  fun getCurrentVersion(): JavaVersion = JavaVersion.current()\n\n  /**\n   * Gets the minimum required JDK version.\n   */\n  fun getMinimumVersion(): JavaVersion = MINIMUM_JDK_VERSION\n\n  /**\n   * Checks if the current JDK meets minimum requirements without throwing an error.\n   *\n   * @return true if current JDK >= minimum version, false otherwise\n   */\n  fun isCompatible(): Boolean = JavaVersion.current() >= MINIMUM_JDK_VERSION\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/utils/NodeExecutableFinder.kt",
    "content": "package run.granite.gradle.utils\n\nimport java.io.File\n\n/**\n * Utility for locating the Node.js executable.\n *\n * Searches the PATH environment variable to find the Node.js executable.\n * Looks for node.exe on Windows and node on other platforms.\n */\nobject NodeExecutableFinder {\n\n  /**\n   * Finds and returns the Node.js executable.\n   *\n   * Search order:\n   * 1. Scan directories listed in the PATH environment variable for the node executable\n   * 2. If not found in PATH, return just the node name so the system can resolve it (fallback)\n   *\n   * @return a [File] pointing to the Node.js executable\n   */\n  fun findNodeExecutable(): File {\n    val nodeName = if (System.getProperty(\"os.name\").startsWith(\"Windows\")) {\n      \"node.exe\"\n    } else {\n      \"node\"\n    }\n\n    // Search for the node executable in PATH directories\n    val pathEnv = System.getenv(\"PATH\") ?: \"\"\n    val pathDirs = pathEnv.split(File.pathSeparator)\n\n    for (dir in pathDirs) {\n      val nodeFile = File(dir, nodeName)\n      if (nodeFile.exists() && nodeFile.canExecute()) {\n        return nodeFile\n      }\n    }\n\n    // Fallback: return just the node name and let the system resolve it\n    return File(nodeName)\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/utils/ReactNativeVersionReader.kt",
    "content": "package run.granite.gradle.utils\n\nimport com.google.gson.Gson\nimport com.google.gson.JsonObject\nimport org.gradle.api.Project\nimport run.granite.gradle.config.DependencyCoordinates\nimport java.io.File\nimport java.util.Properties\n\n/**\n * Reads and resolves React Native version information.\n *\n * This utility reads version information from:\n * - node_modules/react-native/package.json\n * - User-specified reactNativeDir in GraniteExtension\n *\n * Version resolution is used to:\n * - Configure compatible dependency versions (hermes-android, soloader, etc.)\n * - Locate React Native codegen and bundler tools\n * - Validate minimum version requirements\n */\nobject ReactNativeVersionReader {\n\n  private const val MINIMUM_RN_VERSION = \"0.81.0\"\n  private const val INTERNAL_VERSION_NAME = \"VERSION_NAME\"\n  private const val INTERNAL_PUBLISHING_GROUP = \"react.internal.publishingGroup\"\n  private const val DEFAULT_INTERNAL_PUBLISHING_GROUP = \"com.facebook.react\"\n\n  // Hermes version property keys\n  private const val INTERNAL_HERMES_VERSION_NAME = \"HERMES_VERSION_NAME\"\n  private const val INTERNAL_HERMES_V1_VERSION_NAME = \"HERMES_V1_VERSION_NAME\"\n  private const val INTERNAL_HERMES_PUBLISHING_GROUP = \"react.internal.hermesPublishingGroup\"\n  private const val DEFAULT_HERMES_PUBLISHING_GROUP = \"com.facebook.hermes\"\n\n  /**\n   * Reads React Native version from the specified directory.\n   *\n   * @param reactNativeDir The React Native installation directory\n   * @return The version string (e.g., \"0.81.6\")\n   * @throws IllegalStateException if version cannot be read\n   */\n  fun readVersion(reactNativeDir: File): String {\n    val packageJsonFile = reactNativeDir.resolve(\"package.json\")\n\n    if (!packageJsonFile.exists()) {\n      error(\n        \"\"\"\n                |React Native package.json not found.\n                |\n                |Expected location: ${packageJsonFile.absolutePath}\n                |React Native directory: ${reactNativeDir.absolutePath}\n                |\n                |Solutions:\n                |  1. Run 'npm install' or 'yarn install' to install React Native\n                |  2. Verify React Native is listed in your package.json dependencies\n                |  3. Configure the React Native directory in your build.gradle.kts:\n                |     granite {\n                |         reactNativeDir.set(file(\"path/to/node_modules/react-native\"))\n                |     }\n        \"\"\".trimMargin(),\n      )\n    }\n\n    return try {\n      val packageJson = Gson().fromJson(packageJsonFile.readText(), JsonObject::class.java)\n      val version = packageJson.get(\"version\")?.asString\n        ?: error(\"No 'version' field found in ${packageJsonFile.absolutePath}\")\n\n      version\n    } catch (e: Exception) {\n      error(\n        \"\"\"\n                |Failed to read React Native version from package.json.\n                |\n                |File: ${packageJsonFile.absolutePath}\n                |Error: ${e.message}\n                |\n                |Verify that the file is valid JSON and contains a 'version' field.\n        \"\"\".trimMargin(),\n      )\n    }\n  }\n\n  /**\n   * Reads React Native version from the project's node_modules.\n   *\n   * @param project The Gradle project\n   * @return The version string\n   */\n  fun readVersion(project: Project): String {\n    val reactNativeDir = project.rootProject.file(\"node_modules/react-native\")\n    return readVersion(reactNativeDir)\n  }\n\n  /**\n   * Reads React Native version and Maven group ID.\n   *\n   * Reads gradle.properties first, falls back to package.json if not found.\n   * Nightly builds automatically have the -SNAPSHOT suffix added.\n   *\n   * @param reactNativeDir React Native installation directory\n   * @return Pair<version, groupId> (e.g., \"0.81.6\" to \"com.facebook.react\")\n   * @throws IllegalStateException if version cannot be read\n   */\n  fun readVersionAndGroup(reactNativeDir: File): Pair<String, String> {\n    val gradlePropertiesFile = reactNativeDir.resolve(\"ReactAndroid/gradle.properties\")\n\n    // Read gradle.properties first if it exists\n    if (gradlePropertiesFile.exists()) {\n      try {\n        val properties = Properties().apply {\n          gradlePropertiesFile.inputStream().use { load(it) }\n        }\n\n        val versionStringFromFile = (properties[INTERNAL_VERSION_NAME] as? String).orEmpty()\n\n        // Add -SNAPSHOT suffix for nightly builds\n        val versionString = if (versionStringFromFile.startsWith(\"0.0.0\") ||\n          \"-nightly-\" in versionStringFromFile\n        ) {\n          \"$versionStringFromFile-SNAPSHOT\"\n        } else {\n          versionStringFromFile\n        }\n\n        val groupString = properties[INTERNAL_PUBLISHING_GROUP] as? String\n          ?: DEFAULT_INTERNAL_PUBLISHING_GROUP\n\n        if (versionString.isEmpty()) {\n          // Error if VERSION_NAME is empty and no package.json exists\n          val packageJsonFile = reactNativeDir.resolve(\"package.json\")\n          if (!packageJsonFile.exists()) {\n            error(\n              \"\"\"\n                            |React Native gradle.properties does not contain VERSION_NAME.\n                            |\n                            |File: ${gradlePropertiesFile.absolutePath}\n                            |\n                            |This might indicate a corrupted React Native installation.\n              \"\"\".trimMargin(),\n            )\n          }\n          // Fallback to package.json if it exists\n          val version = readVersion(reactNativeDir)\n          return version to DEFAULT_INTERNAL_PUBLISHING_GROUP\n        }\n\n        return versionString to groupString\n      } catch (e: IllegalStateException) {\n        // Re-throw explicitly thrown errors\n        throw e\n      } catch (e: Exception) {\n        // Fallback to package.json if gradle.properties read fails\n        val version = readVersion(reactNativeDir)\n        return version to DEFAULT_INTERNAL_PUBLISHING_GROUP\n      }\n    }\n\n    // Use package.json if gradle.properties doesn't exist (legacy approach)\n    val version = readVersion(reactNativeDir)\n    return version to DEFAULT_INTERNAL_PUBLISHING_GROUP\n  }\n\n  /**\n   * Reads complete coordinate information for React Native and Hermes.\n   *\n   * - ReactAndroid/gradle.properties: RN version, React/Hermes groups\n   * - sdks/hermes-engine/version.properties: Hermes version, Hermes V1 version\n   *\n   * @param reactNativeDir React Native installation directory\n   * @return DependencyCoordinates object\n   * @throws IllegalStateException if version cannot be read\n   */\n  fun readCoordinates(reactNativeDir: File): DependencyCoordinates {\n    val gradlePropertiesFile = reactNativeDir.resolve(\"ReactAndroid/gradle.properties\")\n    val hermesVersionFile = reactNativeDir.resolve(\"sdks/hermes-engine/version.properties\")\n\n    // Read React Native version and groups\n    val (reactVersion, reactGroup, hermesGroup) = readReactProperties(gradlePropertiesFile, reactNativeDir)\n\n    // Read Hermes versions\n    val (hermesVersion, hermesV1Version) = readHermesProperties(hermesVersionFile, reactVersion)\n\n    return DependencyCoordinates(\n      reactVersion = reactVersion,\n      hermesVersion = hermesVersion,\n      hermesV1Version = hermesV1Version,\n      reactGroup = reactGroup,\n      hermesGroup = hermesGroup,\n    )\n  }\n\n  private fun readReactProperties(gradlePropertiesFile: File, reactNativeDir: File): Triple<String, String, String> {\n    if (!gradlePropertiesFile.exists()) {\n      // Fallback to package.json if gradle.properties doesn't exist\n      val version = readVersion(reactNativeDir)\n      return Triple(version, DEFAULT_INTERNAL_PUBLISHING_GROUP, DEFAULT_HERMES_PUBLISHING_GROUP)\n    }\n\n    val properties = Properties().apply {\n      gradlePropertiesFile.inputStream().use { load(it) }\n    }\n\n    val versionStringFromFile = (properties[INTERNAL_VERSION_NAME] as? String).orEmpty()\n    val versionString = if (versionStringFromFile.startsWith(\"0.0.0\") ||\n      \"-nightly-\" in versionStringFromFile\n    ) {\n      \"$versionStringFromFile-SNAPSHOT\"\n    } else {\n      versionStringFromFile\n    }\n\n    if (versionString.isEmpty()) {\n      error(\"React Native gradle.properties does not contain VERSION_NAME.\")\n    }\n\n    val reactGroup = properties[INTERNAL_PUBLISHING_GROUP] as? String\n      ?: DEFAULT_INTERNAL_PUBLISHING_GROUP\n    val hermesGroup = properties[INTERNAL_HERMES_PUBLISHING_GROUP] as? String\n      ?: DEFAULT_HERMES_PUBLISHING_GROUP\n\n    return Triple(versionString, reactGroup, hermesGroup)\n  }\n\n  private fun readHermesProperties(hermesVersionFile: File, fallbackVersion: String): Pair<String, String> {\n    if (!hermesVersionFile.exists()) {\n      // Fallback to RN version if Hermes version file doesn't exist (RN 0.83 or lower compatibility)\n      return fallbackVersion to fallbackVersion\n    }\n\n    val properties = Properties().apply {\n      hermesVersionFile.inputStream().use { load(it) }\n    }\n\n    val hermesVersionFromFile = (properties[INTERNAL_HERMES_VERSION_NAME] as? String).orEmpty()\n    val hermesVersion = if (hermesVersionFromFile.startsWith(\"0.0.0\") ||\n      \"-commitly-\" in hermesVersionFromFile\n    ) {\n      \"$hermesVersionFromFile-SNAPSHOT\"\n    } else {\n      hermesVersionFromFile\n    }\n\n    val hermesV1Version = (properties[INTERNAL_HERMES_V1_VERSION_NAME] as? String).orEmpty()\n\n    // Fallback if both are empty\n    return if (hermesVersion.isEmpty() && hermesV1Version.isEmpty()) {\n      fallbackVersion to fallbackVersion\n    } else {\n      hermesVersion to hermesV1Version\n    }\n  }\n\n  /**\n   * Validates that the React Native version meets minimum requirements.\n   *\n   * @param version The React Native version string\n   * @throws IllegalStateException if version is below minimum\n   */\n  fun validateVersion(version: String) {\n    if (!isVersionCompatible(version, MINIMUM_RN_VERSION)) {\n      error(\n        \"\"\"\n                |React Native version $version is not supported.\n                |\n                |Current version: $version\n                |Minimum required version: $MINIMUM_RN_VERSION\n                |\n                |Solution: Update React Native to version $MINIMUM_RN_VERSION or higher:\n                |  npm install react-native@^$MINIMUM_RN_VERSION\n                |  # or\n                |  yarn add react-native@^$MINIMUM_RN_VERSION\n        \"\"\".trimMargin(),\n      )\n    }\n  }\n\n  /**\n   * Compares two semantic version strings.\n   *\n   * @param current The current version\n   * @param minimum The minimum required version\n   * @return true if current >= minimum, false otherwise\n   */\n  private fun isVersionCompatible(current: String, minimum: String): Boolean {\n    // Parse semantic versions (major.minor.patch)\n    val currentParts = parseVersion(current)\n    val minimumParts = parseVersion(minimum)\n\n    // Compare major.minor.patch\n    for (i in 0 until 3) {\n      val currentPart = currentParts.getOrNull(i) ?: 0\n      val minimumPart = minimumParts.getOrNull(i) ?: 0\n\n      when {\n        currentPart > minimumPart -> return true\n        currentPart < minimumPart -> return false\n        // Equal, continue to next part\n      }\n    }\n\n    return true // Versions are equal\n  }\n\n  /**\n   * Parses a semantic version string into major, minor, patch components.\n   *\n   * Supports version formats:\n   * - X.Y.Z (stable)\n   * - X.Y.Z-rc.N (release candidate)\n   * - X.Y.Z-SNAPSHOT (snapshot)\n   * - X.Y.Z-nightly-YYYYMMDD (nightly)\n   *\n   * @param version The version string (e.g., \"0.81.6\" or \"0.81.6-rc.0\")\n   * @return List of [major, minor, patch] as integers\n   */\n  private fun parseVersion(version: String): List<Int> {\n    // Remove pre-release suffix (e.g., \"-rc.0\", \"-SNAPSHOT\", \"-nightly-20240101\")\n    val versionCore = version.split(\"-\")[0]\n\n    return versionCore.split(\".\")\n      .mapNotNull { it.toIntOrNull() }\n  }\n\n  /**\n   * Gets the minimum supported React Native version.\n   */\n  fun getMinimumVersion(): String = MINIMUM_RN_VERSION\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/main/kotlin/run/granite/gradle/utils/TaskDependencyValidator.kt",
    "content": "package run.granite.gradle.utils\n\nimport org.gradle.api.Project\nimport org.gradle.api.Task\n\n/**\n * Validates task dependency structure for Granite plugin.\n *\n * Ensures that:\n * - Codegen tasks complete before compilation tasks\n * - Autolinking completes before codegen\n * - Bundle tasks complete before per-variant packaging tasks\n * - All tasks have proper input/output relationships\n *\n * This validator prevents build failures caused by incorrect task ordering.\n */\nobject TaskDependencyValidator {\n\n  /**\n   * Validates that autolinking completes before codegen.\n   *\n   * @param project The Gradle project\n   * @param autolinkingTask The autolinking task\n   * @param codegenTask The codegen task\n   */\n  fun validateAutolinkingBeforeCodegen(\n    project: Project,\n    autolinkingTask: Task,\n    codegenTask: Task,\n  ) {\n    if (!codegenTask.dependsOn.contains(autolinkingTask) &&\n      !codegenTask.mustRunAfter.getDependencies(codegenTask).contains(autolinkingTask)\n    ) {\n      project.logger.warn(\n        \"\"\"\n                |⚠️ Task dependency warning: Codegen task '${codegenTask.name}' should depend on\n                |autolinking task '${autolinkingTask.name}'.\n                |\n                |This may cause build failures if codegen runs before autolinking completes.\n        \"\"\".trimMargin(),\n      )\n    }\n  }\n\n  /**\n   * Validates that codegen completes before compilation.\n   *\n   * @param project The Gradle project\n   * @param codegenTask The codegen task\n   * @param compileTask The compilation task\n   */\n  fun validateCodegenBeforeCompilation(\n    project: Project,\n    codegenTask: Task,\n    compileTask: Task,\n  ) {\n    if (!compileTask.dependsOn.contains(codegenTask) &&\n      !compileTask.mustRunAfter.getDependencies(compileTask).contains(codegenTask)\n    ) {\n      project.logger.warn(\n        \"\"\"\n                |⚠️ Task dependency warning: Compilation task '${compileTask.name}' should depend on\n                |codegen task '${codegenTask.name}'.\n                |\n                |This may cause compilation errors if codegen outputs are not available.\n        \"\"\".trimMargin(),\n      )\n    }\n  }\n\n  /**\n   * Validates that bundle tasks complete before packaging tasks.\n   *\n   * @param project The Gradle project\n   * @param bundleTask The bundle task\n   * @param packageTask The packaging task\n   */\n  fun validateBundleBeforePackaging(\n    project: Project,\n    bundleTask: Task,\n    packageTask: Task,\n  ) {\n    if (!packageTask.dependsOn.contains(bundleTask) &&\n      !packageTask.mustRunAfter.getDependencies(packageTask).contains(bundleTask)\n    ) {\n      project.logger.warn(\n        \"\"\"\n                |⚠️ Task dependency warning: Packaging task '${packageTask.name}' should depend on\n                |bundle task '${bundleTask.name}'.\n                |\n                |This may cause missing bundle assets in the final AAR.\n        \"\"\".trimMargin(),\n      )\n    }\n  }\n\n  /**\n   * Validates task input/output relationships.\n   *\n   * Ensures that task outputs are properly declared and consumed by dependent tasks.\n   *\n   * @param project The Gradle project\n   * @param task The task to validate\n   */\n  fun validateTaskInputsOutputs(project: Project, task: Task) {\n    val hasInputs = task.inputs.hasInputs\n    val hasOutputs = task.outputs.files.isEmpty.not()\n\n    if (!hasInputs && !hasOutputs) {\n      project.logger.warn(\n        \"\"\"\n                |⚠️ Task configuration warning: Task '${task.name}' has no declared inputs or outputs.\n                |\n                |This prevents Gradle's up-to-date checking and caching from working correctly.\n                |Consider declaring task inputs and outputs for better build performance.\n        \"\"\".trimMargin(),\n      )\n    }\n  }\n\n  /**\n   * Validates that all required tasks are registered.\n   *\n   * @param project The Gradle project\n   * @param requiredTaskNames List of task names that must be registered\n   * @return List of missing task names\n   */\n  fun validateRequiredTasks(project: Project, requiredTaskNames: List<String>): List<String> {\n    val missingTasks = mutableListOf<String>()\n\n    for (taskName in requiredTaskNames) {\n      if (project.tasks.findByName(taskName) == null) {\n        missingTasks.add(taskName)\n      }\n    }\n\n    if (missingTasks.isNotEmpty()) {\n      project.logger.warn(\n        \"\"\"\n                |⚠️ Task registration warning: Required tasks are missing:\n                |${missingTasks.joinToString(\"\\n\") { \"  - $it\" }}\n                |\n                |This may indicate incomplete plugin configuration.\n        \"\"\".trimMargin(),\n      )\n    }\n\n    return missingTasks\n  }\n\n  /**\n   * Validates that per-variant tasks only run after shared infrastructure tasks.\n   *\n   * Ensures codegen and autolinking (shared) complete before variant-specific bundling.\n   *\n   * @param project The Gradle project\n   * @param infrastructureTask Shared infrastructure task (codegen, autolinking)\n   * @param variantTask Per-variant task (bundle, package)\n   */\n  fun validateInfrastructureBeforeVariant(\n    project: Project,\n    infrastructureTask: Task,\n    variantTask: Task,\n  ) {\n    if (!variantTask.dependsOn.contains(infrastructureTask) &&\n      !variantTask.mustRunAfter.getDependencies(variantTask).contains(infrastructureTask)\n    ) {\n      project.logger.debug(\n        \"\"\"\n                |Task dependency info: Variant task '${variantTask.name}' should typically depend on\n                |infrastructure task '${infrastructureTask.name}'.\n        \"\"\".trimMargin(),\n      )\n    }\n  }\n\n  /**\n   * Logs task dependency graph for debugging.\n   *\n   * @param project The Gradle project\n   * @param task The task to log dependencies for\n   */\n  fun logTaskDependencies(project: Project, task: Task) {\n    if (project.logger.isDebugEnabled) {\n      val dependencies = task.dependsOn.joinToString(\", \") { it.toString() }\n      val mustRunAfter = task.mustRunAfter.getDependencies(task)\n        .joinToString(\", \") { it.name }\n\n      project.logger.debug(\n        \"\"\"\n                |Task: ${task.name}\n                |  Dependencies: $dependencies\n                |  Must run after: $mustRunAfter\n        \"\"\".trimMargin(),\n      )\n    }\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/GraniteExtensionTest.kt",
    "content": "package run.granite.gradle\n\nimport org.gradle.testfixtures.ProjectBuilder\nimport org.junit.jupiter.api.BeforeEach\nimport org.junit.jupiter.api.Test\nimport org.junit.jupiter.api.assertThrows\nimport org.junit.jupiter.api.io.TempDir\nimport java.io.File\nimport kotlin.test.assertEquals\nimport kotlin.test.assertTrue\n\n/**\n * Unit tests for GraniteExtension.\n */\nclass GraniteExtensionTest {\n\n  @TempDir\n  lateinit var testProjectDir: File\n\n  private lateinit var project: org.gradle.api.Project\n  private lateinit var extension: GraniteExtension\n\n  @BeforeEach\n  fun setup() {\n    project = ProjectBuilder.builder()\n      .withProjectDir(testProjectDir)\n      .build()\n\n    // Apply plugins to create extension\n    project.pluginManager.apply(\"com.android.library\")\n    project.pluginManager.apply(GranitePlugin::class.java)\n\n    extension = project.extensions.getByType(GraniteExtension::class.java)\n  }\n\n  @Test\n  fun `extension has correct default values`() {\n    // Then\n    assertEquals(\"src/main/js/index.js\", extension.entryFile.get())\n    assertEquals(\"index.android.bundle\", extension.bundleAssetName.get())\n    assertTrue(extension.bundleCompressionEnabled.get())\n    assertEquals(4, extension.nativeArchitectures.get().size)\n    assertTrue(extension.nativeArchitectures.get().contains(\"arm64-v8a\"))\n    assertTrue(extension.nativeArchitectures.get().contains(\"armeabi-v7a\"))\n  }\n\n  @Test\n  fun `extension allows customization of properties`() {\n    // When\n    extension.entryFile.set(\"custom/entry.js\")\n    extension.bundleAssetName.set(\"custom.bundle\")\n    extension.bundleCompressionEnabled.set(false)\n    extension.nativeArchitectures.set(listOf(\"arm64-v8a\"))\n\n    // Then\n    assertEquals(\"custom/entry.js\", extension.entryFile.get())\n    assertEquals(\"custom.bundle\", extension.bundleAssetName.get())\n    assertEquals(false, extension.bundleCompressionEnabled.get())\n    assertEquals(1, extension.nativeArchitectures.get().size)\n  }\n\n  // Test removed: entryFile validation moved to BundleTask execution time\n\n  @Test\n  fun `validate succeeds when all required files exist`() {\n    // Given\n    setupValidProject()\n\n    // When/Then - Should not throw\n    extension.validate()\n  }\n\n  @Test\n  fun `validate succeeds even without entry file`() {\n    // Given - Only React Native directory setup, no entry file\n    val nodeModules = File(testProjectDir, \"node_modules\")\n    val reactNativeDir = File(nodeModules, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.81.6\"}\"\"\")\n\n    extension.reactNativeDir.set(reactNativeDir)\n    extension.nodeModulesDir.set(nodeModules)\n\n    // When/Then - Should not throw (entryFile validation deferred to BundleTask)\n    extension.validate()\n  }\n\n  @Test\n  fun `validate fails when React Native directory does not exist`() {\n    // Given - React Native dir not created\n\n    // When/Then\n    assertThrows<IllegalStateException> {\n      extension.validate()\n    }\n  }\n\n  // Test removed: Hermes is now always enabled, cannot be disabled\n\n  @Test\n  fun `validate fails with invalid ABI`() {\n    // Given\n    setupValidProject()\n    extension.nativeArchitectures.set(listOf(\"invalid-abi\"))\n\n    // When/Then\n    val exception = assertThrows<IllegalStateException> {\n      extension.validate()\n    }\n\n    assertTrue(exception.message?.contains(\"Invalid\") == true)\n    assertTrue(exception.message?.contains(\"ABI\") == true)\n  }\n\n  @Test\n  fun `validate accepts all valid ABIs`() {\n    // Given\n    setupValidProject()\n    val validAbis = listOf(\"armeabi-v7a\", \"arm64-v8a\", \"x86\", \"x86_64\")\n    extension.nativeArchitectures.set(validAbis)\n\n    // When/Then - Should not throw\n    extension.validate()\n  }\n\n  @Test\n  fun `getEntryFileResolved returns correct file`() {\n    // Given\n    extension.entryFile.set(\"custom/entry.js\")\n\n    // When\n    val resolved = extension.getEntryFileResolved()\n\n    // Then - Use canonical paths to handle symlinks (e.g., /var vs /private/var on macOS)\n    assertEquals(\n      File(testProjectDir, \"custom/entry.js\").canonicalPath,\n      resolved.canonicalPath,\n    )\n  }\n\n  @Test\n  fun `getReactNativeDirResolved returns correct directory`() {\n    // Given\n    val customRnDir = File(testProjectDir, \"custom/react-native\")\n    extension.reactNativeDir.set(customRnDir)\n\n    // When\n    val resolved = extension.getReactNativeDirResolved()\n\n    // Then - Use canonical paths to handle symlinks\n    assertEquals(customRnDir.canonicalPath, resolved.canonicalPath)\n  }\n\n  @Test\n  fun `getNodeModulesDirResolved returns correct directory`() {\n    // Given\n    val customNodeModules = File(testProjectDir, \"custom/node_modules\")\n    extension.nodeModulesDir.set(customNodeModules)\n\n    // When\n    val resolved = extension.getNodeModulesDirResolved()\n\n    // Then - Use canonical paths to handle symlinks\n    assertEquals(customNodeModules.canonicalPath, resolved.canonicalPath)\n  }\n\n  /**\n   * Sets up a valid project structure for testing.\n   */\n  private fun setupValidProject() {\n    // Create entry file\n    val entryFile = File(testProjectDir, \"src/main/js/index.js\")\n    entryFile.parentFile.mkdirs()\n    entryFile.writeText(\"// Entry file\")\n\n    // Create React Native directory structure\n    val nodeModules = File(testProjectDir, \"node_modules\")\n    val reactNativeDir = File(nodeModules, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    // Create package.json\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.81.6\"}\"\"\")\n\n    // Update extension to point to test directories\n    extension.reactNativeDir.set(reactNativeDir)\n    extension.nodeModulesDir.set(nodeModules)\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/GranitePluginTest.kt",
    "content": "package run.granite.gradle\n\nimport org.gradle.testfixtures.ProjectBuilder\nimport org.junit.jupiter.api.BeforeEach\nimport org.junit.jupiter.api.Test\nimport org.junit.jupiter.api.assertThrows\nimport org.junit.jupiter.api.io.TempDir\nimport java.io.File\nimport kotlin.test.assertEquals\nimport kotlin.test.assertNotNull\nimport kotlin.test.assertTrue\n\n/**\n * Unit tests for GranitePlugin.\n */\nclass GranitePluginTest {\n\n  @TempDir\n  lateinit var testProjectDir: File\n\n  private lateinit var buildFile: File\n  private lateinit var settingsFile: File\n\n  @BeforeEach\n  fun setup() {\n    buildFile = File(testProjectDir, \"build.gradle.kts\")\n    settingsFile = File(testProjectDir, \"settings.gradle.kts\")\n  }\n\n  @Test\n  fun `plugin applies successfully to library project`() {\n    // Given\n    val project = ProjectBuilder.builder()\n      .withProjectDir(testProjectDir)\n      .build()\n\n    // When\n    project.pluginManager.apply(\"com.android.library\")\n    project.pluginManager.apply(GranitePlugin::class.java)\n\n    // Then\n    assertTrue(project.plugins.hasPlugin(GranitePlugin::class.java))\n    assertNotNull(project.extensions.findByName(\"granite\"))\n  }\n\n  @Test\n  fun `plugin creates granite extension with correct type`() {\n    // Given\n    val project = ProjectBuilder.builder()\n      .withProjectDir(testProjectDir)\n      .build()\n\n    // When\n    project.pluginManager.apply(\"com.android.library\")\n    project.pluginManager.apply(GranitePlugin::class.java)\n\n    // Then\n    val extension = project.extensions.findByName(\"granite\")\n    assertNotNull(extension)\n    assertTrue(extension is GraniteExtension)\n  }\n\n  @Test\n  fun `plugin registers autolinking task`() {\n    // Given\n    val project = ProjectBuilder.builder()\n      .withProjectDir(testProjectDir)\n      .build()\n\n    setupMinimalProject(project)\n\n    // When\n    project.pluginManager.apply(\"com.android.library\")\n    project.pluginManager.apply(GranitePlugin::class.java)\n\n    // Force evaluation of afterEvaluate blocks by accessing the task container\n    // Note: This is a simplified test. Full task registration should be tested with GradleRunner.\n    // For now, we just verify the plugin applies without errors\n    assertTrue(project.plugins.hasPlugin(GranitePlugin::class.java))\n  }\n\n  @Test\n  fun `plugin registers codegen tasks`() {\n    // Given\n    val project = ProjectBuilder.builder()\n      .withProjectDir(testProjectDir)\n      .build()\n\n    setupMinimalProject(project)\n\n    // When\n    project.pluginManager.apply(\"com.android.library\")\n    project.pluginManager.apply(GranitePlugin::class.java)\n\n    // Note: Task registration happens in afterEvaluate, which doesn't execute with ProjectBuilder.\n    // Full task registration should be tested with GradleRunner integration tests.\n    // For now, we verify the plugin and extension are configured correctly\n    val extension = project.extensions.findByName(\"granite\")\n    assertNotNull(extension)\n    assertTrue(extension is GraniteExtension)\n  }\n\n  @Test\n  fun `plugin fails when applied to application project`() {\n    // Given\n    val project = ProjectBuilder.builder()\n      .withProjectDir(testProjectDir)\n      .build()\n\n    // When/Then\n    project.pluginManager.apply(\"com.android.application\")\n\n    // Gradle wraps exceptions in PluginApplicationException\n    val exception = assertThrows<org.gradle.api.internal.plugins.PluginApplicationException> {\n      project.pluginManager.apply(GranitePlugin::class.java)\n    }\n\n    // Verify the cause is our expected IllegalStateException\n    assertTrue(exception.cause is IllegalStateException)\n  }\n\n  @Test\n  fun `plugin constants are correct`() {\n    assertEquals(\"run.granite.library\", GranitePlugin.PLUGIN_ID)\n    assertEquals(\"granite\", GranitePlugin.EXTENSION_NAME)\n    assertEquals(\"granite\", GranitePlugin.PLUGIN_GROUP)\n  }\n\n  /**\n   * Sets up minimal project structure for testing.\n   */\n  private fun setupMinimalProject(project: org.gradle.api.Project) {\n    // Create minimal required directories\n    File(testProjectDir, \"src/main/js\").mkdirs()\n    File(testProjectDir, \"src/main/java\").mkdirs()\n\n    // Create minimal entry file\n    val entryFile = File(testProjectDir, \"src/main/js/index.js\")\n    entryFile.parentFile.mkdirs()\n    entryFile.writeText(\"// Empty entry file\")\n\n    // Create fake node_modules structure\n    val nodeModules = File(testProjectDir, \"node_modules\")\n    val reactNativeDir = File(nodeModules, \"react-native\")\n    val androidDir = File(reactNativeDir, \"android\")\n    androidDir.mkdirs()\n\n    // Create package.json\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.81.6\"}\"\"\")\n\n    // Create cli.js\n    val cliJs = File(reactNativeDir, \"cli.js\")\n    cliJs.writeText(\"// Mock CLI\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/GraniteRootProjectPluginTest.kt",
    "content": "package run.granite.gradle\n\nimport org.gradle.testfixtures.ProjectBuilder\nimport org.junit.jupiter.api.Test\nimport org.junit.jupiter.api.assertThrows\nimport kotlin.test.assertEquals\nimport kotlin.test.assertNotNull\nimport kotlin.test.assertTrue\n\n/**\n * Unit tests for GraniteRootProjectPlugin.\n */\nclass GraniteRootProjectPluginTest {\n\n  @Test\n  fun `plugin constants are correct`() {\n    assertEquals(\"run.granite.rootproject\", GraniteRootProjectPlugin.PLUGIN_ID)\n    assertEquals(\"graniteRoot\", GraniteRootProjectPlugin.EXTENSION_NAME)\n  }\n\n  @Test\n  fun `plugin applies successfully to root project`() {\n    // Given\n    val project = ProjectBuilder.builder().build()\n\n    // When\n    project.pluginManager.apply(GraniteRootProjectPlugin::class.java)\n\n    // Then\n    assertTrue(project.plugins.hasPlugin(GraniteRootProjectPlugin::class.java))\n  }\n\n  @Test\n  fun `plugin creates graniteRoot extension`() {\n    // Given\n    val project = ProjectBuilder.builder().build()\n\n    // When\n    project.pluginManager.apply(GraniteRootProjectPlugin::class.java)\n\n    // Then\n    val extension = project.extensions.findByName(\"graniteRoot\")\n    assertNotNull(extension)\n    assertTrue(extension is GraniteRootExtension)\n  }\n\n  @Test\n  fun `extension has correct default values`() {\n    // Given\n    val project = ProjectBuilder.builder().build()\n    project.pluginManager.apply(GraniteRootProjectPlugin::class.java)\n\n    // When\n    val extension = project.extensions.getByType(GraniteRootExtension::class.java)\n\n    // Then\n    assertEquals(\"com.facebook.react\", extension.reactGroup.get())\n    assertEquals(\"com.facebook.hermes\", extension.hermesGroup.get())\n    assertEquals(project.file(\"node_modules\"), extension.nodeModulesDir.get())\n    // reactNativeVersion and hermesVersion should not have conventions (are not present)\n    assertTrue(!extension.reactNativeVersion.isPresent)\n    assertTrue(!extension.hermesVersion.isPresent)\n  }\n\n  @Test\n  fun `additionalConfigurationSuffixes defaults to empty set`() {\n    // Given\n    val project = ProjectBuilder.builder().build()\n    project.pluginManager.apply(GraniteRootProjectPlugin::class.java)\n\n    // When\n    val extension = project.extensions.getByType(GraniteRootExtension::class.java)\n\n    // Then\n    assertTrue(extension.additionalConfigurationSuffixes.get().isEmpty())\n  }\n\n  @Test\n  fun `additionalConfigurationSuffixes can be configured`() {\n    // Given\n    val project = ProjectBuilder.builder().build()\n    project.pluginManager.apply(GraniteRootProjectPlugin::class.java)\n    val extension = project.extensions.getByType(GraniteRootExtension::class.java)\n\n    // When\n    extension.additionalConfigurationSuffixes.add(\"DexGuardConsumerRuleBuildDependencies\")\n\n    // Then\n    assertEquals(\n      setOf(\"DexGuardConsumerRuleBuildDependencies\"),\n      extension.additionalConfigurationSuffixes.get()\n    )\n  }\n\n  @Test\n  fun `plugin fails when applied to non-root project`() {\n    // Given\n    val rootProject = ProjectBuilder.builder()\n      .withName(\"root\")\n      .build()\n    val subProject = ProjectBuilder.builder()\n      .withName(\"sub\")\n      .withParent(rootProject)\n      .build()\n\n    // When/Then\n    // Gradle wraps exceptions in PluginApplicationException\n    val exception = assertThrows<org.gradle.api.internal.plugins.PluginApplicationException> {\n      subProject.pluginManager.apply(GraniteRootProjectPlugin::class.java)\n    }\n\n    // Verify the cause is our expected IllegalStateException\n    assertTrue(exception.cause is IllegalStateException)\n    assertTrue(exception.cause!!.message!!.contains(\"can only be applied to the root project\"))\n    assertTrue(exception.cause!!.message!!.contains(\"Current project: :sub\"))\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/config/BuildConfigConfiguratorTest.kt",
    "content": "package run.granite.gradle.config\n\nimport com.android.build.gradle.LibraryExtension\nimport org.gradle.api.Project\nimport org.gradle.testfixtures.ProjectBuilder\nimport org.junit.jupiter.api.BeforeEach\nimport org.junit.jupiter.api.Test\nimport run.granite.gradle.GraniteExtension\nimport kotlin.test.assertNotNull\nimport kotlin.test.assertTrue\n\n/**\n * Unit tests for BuildConfigConfigurator.\n *\n * Tests the configuration of Android BuildConfig field generation for\n * feature flags and React Native configuration.\n */\nclass BuildConfigConfiguratorTest {\n\n  private lateinit var project: Project\n  private lateinit var extension: GraniteExtension\n  private lateinit var androidExtension: LibraryExtension\n  private lateinit var configurator: BuildConfigConfigurator\n\n  @BeforeEach\n  fun setup() {\n    project = ProjectBuilder.builder().build()\n    project.pluginManager.apply(\"com.android.library\")\n\n    extension = project.extensions.create(\"granite\", GraniteExtension::class.java, project)\n    androidExtension = project.extensions.getByType(LibraryExtension::class.java)\n\n    configurator = BuildConfigConfigurator(project, extension)\n  }\n\n  @Test\n  fun `configurator is created successfully`() {\n    assertNotNull(configurator, \"BuildConfigConfigurator should be created\")\n  }\n\n  @Test\n  fun `configure method executes without errors`() {\n    // Hermes is always enabled\n    extension.reactNativeVersion.set(\"0.81.0\")\n    extension.bundleAssetName.set(\"index.android\")\n\n    // Should not throw\n    configurator.configure(androidExtension)\n  }\n\n  @Test\n  fun `buildConfig feature is enabled`() {\n    // Hermes is always enabled\n    extension.reactNativeVersion.set(\"0.81.0\")\n    extension.bundleAssetName.set(\"index.android\")\n\n    configurator.configure(androidExtension)\n\n    // Verify BuildConfig is enabled\n    assertTrue(\n      androidExtension.buildFeatures.buildConfig == true,\n      \"BuildConfig feature should be enabled\",\n    )\n  }\n\n  @Test\n  fun `configure works with default extension values`() {\n    // Should not throw with default values\n    configurator.configure(androidExtension)\n\n    assertTrue(\n      androidExtension.buildFeatures.buildConfig == true,\n      \"BuildConfig feature should be enabled even with defaults\",\n    )\n  }\n\n  // Test removed: Hermes is now always enabled, cannot be disabled\n\n  @Test\n  fun `configure works with new architecture enabled`() {\n    // Both Hermes and New Architecture are always enabled\n    extension.reactNativeVersion.set(\"0.81.0\")\n    extension.bundleAssetName.set(\"index.android\")\n\n    // Should not throw\n    configurator.configure(androidExtension)\n  }\n\n  @Test\n  fun `configure can be called multiple times`() {\n    // Hermes is always enabled\n    extension.reactNativeVersion.set(\"0.81.0\")\n    extension.bundleAssetName.set(\"index.android\")\n\n    // Should not throw when called multiple times\n    configurator.configure(androidExtension)\n    configurator.configure(androidExtension)\n  }\n\n  @Test\n  fun `configure with different react native versions`() {\n    extension.reactNativeVersion.set(\"0.82.0\")\n\n    // Should not throw\n    configurator.configure(androidExtension)\n  }\n\n  @Test\n  fun `configure with custom bundle asset name`() {\n    extension.bundleAssetName.set(\"custom.bundle\")\n\n    // Should not throw\n    configurator.configure(androidExtension)\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/config/DependencyConfiguratorTest.kt",
    "content": "package run.granite.gradle.config\n\nimport org.junit.jupiter.api.Test\nimport org.junit.jupiter.api.io.TempDir\nimport java.io.File\nimport kotlin.test.assertEquals\nimport kotlin.test.assertFalse\nimport kotlin.test.assertNotNull\nimport kotlin.test.assertTrue\n\n/**\n * Unit tests for DependencyConfigurator.\n *\n * Tests the dependency substitution logic that replaces deprecated React Native artifacts\n * with new ones and enforces version consistency across the project.\n *\n * Note: Custom Maven group tests are excluded (no real use case, official RN always uses com.facebook.react)\n */\nclass DependencyConfiguratorTest {\n\n  @TempDir\n  lateinit var tempDir: File\n\n  @Test\n  fun `getDependencySubstitutions returns base substitutions for default group`() {\n    // Given\n    val version = \"0.81.1\"\n    val group = \"com.facebook.react\"\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(version, group)\n\n    // Then\n    // When using default group, only react-native and hermes-engine substitutions are needed\n    assertEquals(2, substitutions.size)\n\n    // react-native -> react-android substitution\n    val reactSubstitution = substitutions.find { it.first == \"com.facebook.react:react-native\" }\n    assertEquals(\"com.facebook.react:react-android:0.81.1\", reactSubstitution?.second)\n    assertTrue(reactSubstitution?.third?.contains(\"deprecated\") == true)\n\n    // hermes-engine -> hermes-android substitution\n    val hermesSubstitution = substitutions.find { it.first == \"com.facebook.react:hermes-engine\" }\n    assertEquals(\"com.facebook.react:hermes-android:0.81.1\", hermesSubstitution?.second)\n    assertTrue(hermesSubstitution?.third?.contains(\"deprecated\") == true)\n  }\n\n  @Test\n  fun `getDependencySubstitutions handles SNAPSHOT versions`() {\n    // Given\n    val version = \"0.0.0-20250123-1234-abc123-SNAPSHOT\"\n    val group = \"com.facebook.react\"\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(version, group)\n\n    // Then\n    assertEquals(2, substitutions.size)\n\n    val reactSubstitution = substitutions.find { it.first == \"com.facebook.react:react-native\" }\n    assertEquals(\"com.facebook.react:react-android:0.0.0-20250123-1234-abc123-SNAPSHOT\", reactSubstitution?.second)\n\n    val hermesSubstitution = substitutions.find { it.first == \"com.facebook.react:hermes-engine\" }\n    assertEquals(\"com.facebook.react:hermes-android:0.0.0-20250123-1234-abc123-SNAPSHOT\", hermesSubstitution?.second)\n  }\n\n  @Test\n  fun `getDependencySubstitutions includes reason for each substitution`() {\n    // Given\n    val version = \"0.81.1\"\n    val group = \"com.facebook.react\"\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(version, group)\n\n    // Then\n    // All substitution rules should include a reason (third = reason)\n    assertTrue(substitutions.all { it.third.isNotBlank() })\n  }\n\n  @Test\n  fun `getDependencySubstitutions handles stable release versions`() {\n    // Given\n    val version = \"0.81.6\"\n    val group = \"com.facebook.react\"\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(version, group)\n\n    // Then\n    assertEquals(2, substitutions.size)\n\n    val reactSubstitution = substitutions.find { it.first == \"com.facebook.react:react-native\" }\n    assertEquals(\"com.facebook.react:react-android:0.81.6\", reactSubstitution?.second)\n  }\n\n  @Test\n  fun `getDependencySubstitutions handles rc versions`() {\n    // Given\n    val version = \"0.82.0-rc.0\"\n    val group = \"com.facebook.react\"\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(version, group)\n\n    // Then\n    assertEquals(2, substitutions.size)\n\n    val reactSubstitution = substitutions.find { it.first == \"com.facebook.react:react-native\" }\n    assertEquals(\"com.facebook.react:react-android:0.82.0-rc.0\", reactSubstitution?.second)\n  }\n\n  // === DependencyCoordinates-based tests ===\n\n  @Test\n  fun `getDependencySubstitutions with coordinates includes hermes-android to new group substitution`() {\n    // Given - RN 0.84 scenario\n    val coordinates = DependencyCoordinates(\n      reactVersion = \"0.84.0\",\n      hermesVersion = \"0.15.0\",\n      hermesV1Version = \"250829098.0.6\",\n    )\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(coordinates)\n\n    // Then\n    // Verify new substitution rules\n    val hermesAndroidSubstitution = substitutions.find {\n      it.first == \"com.facebook.react:hermes-android\"\n    }\n    assertNotNull(hermesAndroidSubstitution)\n    assertEquals(\"com.facebook.hermes:hermes-android:250829098.0.6\", hermesAndroidSubstitution.second)\n    assertTrue(hermesAndroidSubstitution.third.contains(\"moved\"))\n  }\n\n  @Test\n  fun `getDependencySubstitutions with coordinates uses V1 hermes version`() {\n    // Given\n    val coordinates = DependencyCoordinates(\n      reactVersion = \"0.84.0\",\n      hermesVersion = \"0.15.0\",\n      hermesV1Version = \"250829098.0.6\",\n    )\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(coordinates)\n\n    // Then\n    val hermesEngineSubstitution = substitutions.find {\n      it.first == \"com.facebook.react:hermes-engine\"\n    }\n    // V1 version should be used\n    assertEquals(\"com.facebook.hermes:hermes-android:250829098.0.6\", hermesEngineSubstitution?.second)\n  }\n\n  @Test\n  fun `getDependencySubstitutions with coordinates falls back to classic hermes when V1 empty`() {\n    // Given\n    val coordinates = DependencyCoordinates(\n      reactVersion = \"0.84.0\",\n      hermesVersion = \"0.15.0\",\n      hermesV1Version = \"\", // No V1\n    )\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(coordinates)\n\n    // Then\n    val hermesEngineSubstitution = substitutions.find {\n      it.first == \"com.facebook.react:hermes-engine\"\n    }\n    assertEquals(\"com.facebook.hermes:hermes-android:0.15.0\", hermesEngineSubstitution?.second)\n  }\n\n  @Test\n  fun `getDependencySubstitutions with coordinates returns 3 base substitutions for default groups`() {\n    // Given\n    val coordinates = DependencyCoordinates(\n      reactVersion = \"0.84.0\",\n      hermesVersion = \"0.15.0\",\n      hermesV1Version = \"250829098.0.6\",\n    )\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(coordinates)\n\n    // Then\n    assertEquals(3, substitutions.size) // react-native, hermes-engine, hermes-android\n  }\n\n  @Test\n  fun `getDependencySubstitutions with custom react group adds react-android substitution`() {\n    // Given\n    val coordinates = DependencyCoordinates(\n      reactVersion = \"0.84.0\",\n      hermesVersion = \"0.15.0\",\n      hermesV1Version = \"250829098.0.6\",\n      reactGroup = \"io.github.custom\",\n    )\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(coordinates)\n\n    // Then\n    assertEquals(4, substitutions.size)\n    val reactAndroidSubstitution = substitutions.find {\n      it.first == \"com.facebook.react:react-android\"\n    }\n    assertEquals(\"io.github.custom:react-android:0.84.0\", reactAndroidSubstitution?.second)\n  }\n\n  @Test\n  fun `getDependencySubstitutions with custom hermes group adds hermes-android substitution`() {\n    // Given\n    val coordinates = DependencyCoordinates(\n      reactVersion = \"0.84.0\",\n      hermesVersion = \"0.15.0\",\n      hermesV1Version = \"250829098.0.6\",\n      hermesGroup = \"io.github.custom.hermes\",\n    )\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(coordinates)\n\n    // Then\n    assertEquals(4, substitutions.size) // base 3 + custom hermes group\n    val hermesSubstitution = substitutions.find {\n      it.first == \"com.facebook.hermes:hermes-android\"\n    }\n    assertEquals(\"io.github.custom.hermes:hermes-android:250829098.0.6\", hermesSubstitution?.second)\n  }\n\n  @Test\n  fun `getDependencySubstitutions with both custom groups adds all substitutions`() {\n    // Given\n    val coordinates = DependencyCoordinates(\n      reactVersion = \"0.84.0\",\n      hermesVersion = \"0.15.0\",\n      hermesV1Version = \"250829098.0.6\",\n      reactGroup = \"io.github.custom\",\n      hermesGroup = \"io.github.custom.hermes\",\n    )\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(coordinates)\n\n    // Then\n    assertEquals(5, substitutions.size) // base 3 + custom react + custom hermes\n  }\n\n  @Test\n  fun `getDependencySubstitutions handles Hermes V1 version format correctly`() {\n    // Given - Hermes V1 build number format\n    val coordinates = DependencyCoordinates(\n      reactVersion = \"0.84.0\",\n      hermesVersion = \"0.15.0\",\n      hermesV1Version = \"250829098.0.6\", // Build number-based\n    )\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(coordinates)\n\n    // Then\n    val allHermesSubstitutions = substitutions.filter {\n      it.second.contains(\"hermes-android\")\n    }\n    assertTrue(allHermesSubstitutions.all { it.second.contains(\"250829098.0.6\") })\n  }\n\n  // === Tests for existing deprecated API (additional) ===\n\n  @Test\n  fun `getDependencySubstitutions with custom group returns 4 substitutions`() {\n    // Given\n    val version = \"0.81.1\"\n    val group = \"io.github.custom\"\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(version, group)\n\n    // Then\n    assertEquals(4, substitutions.size) // base 2 + custom group 2\n  }\n\n  // === Dynamic version substitution tests ===\n\n  @Test\n  fun `substitution rules use version-less module selectors for dynamic version matching`() {\n    // Given\n    val coordinates = DependencyCoordinates(\n      reactVersion = \"0.84.0\",\n      hermesVersion = \"0.15.0\",\n      hermesV1Version = \"250829098.0.6\",\n    )\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(coordinates)\n\n    // Then - All source coordinates should be version-less for dynamic version matching\n    val reactNativeSubstitution = substitutions.find {\n      it.first == \"com.facebook.react:react-native\"\n    }\n    assertNotNull(reactNativeSubstitution)\n    // Source has no version (group:artifact format without version)\n    assertFalse(reactNativeSubstitution.first.contains(\":0.\"))\n    assertFalse(reactNativeSubstitution.first.contains(\":+\"))\n    // Target has version\n    assertTrue(reactNativeSubstitution.second.contains(\":0.84.0\"))\n  }\n\n  @Test\n  fun `substitution rules match all versions including dynamic versions`() {\n    // Given - Scenario where dynamic versions are used\n    // When com.facebook.react:react-native:+ is declared\n    val coordinates = DependencyCoordinates(\n      reactVersion = \"0.84.0\",\n      hermesVersion = \"0.15.0\",\n      hermesV1Version = \"250829098.0.6\",\n    )\n\n    // When\n    val substitutions = DependencyConfigurator.getDependencySubstitutions(coordinates)\n\n    // Then - Substitution source should be declared without version\n    // Gradle's substitute(module(\"group:artifact\")) matches all versions\n    // (+, latest.release, 1.+, 0.84.0, etc.)\n    for ((source, target, _) in substitutions) {\n      // Source is \"group:artifact\" format (no version)\n      val parts = source.split(\":\")\n      assertEquals(2, parts.size, \"Source '$source' should be version-less (group:artifact)\")\n\n      // Target is \"group:artifact:version\" format (with version)\n      val targetParts = target.split(\":\")\n      assertEquals(3, targetParts.size, \"Target '$target' should have version (group:artifact:version)\")\n    }\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/config/DevServerResourceConfiguratorTest.kt",
    "content": "package run.granite.gradle.config\n\nimport org.gradle.api.Project\nimport org.gradle.testfixtures.ProjectBuilder\nimport org.junit.jupiter.api.AfterEach\nimport org.junit.jupiter.api.BeforeEach\nimport org.junit.jupiter.api.Test\nimport run.granite.gradle.GraniteExtension\nimport java.io.File\nimport kotlin.test.assertFalse\nimport kotlin.test.assertNotNull\nimport kotlin.test.assertTrue\n\n/**\n * Unit tests for DevServerResourceConfigurator.\n *\n * Tests the generation of Android resources for React Native development server configuration.\n */\nclass DevServerResourceConfiguratorTest {\n\n  private lateinit var project: Project\n  private lateinit var extension: GraniteExtension\n  private lateinit var configurator: DevServerResourceConfigurator\n  private lateinit var testResDir: File\n\n  @BeforeEach\n  fun setup() {\n    project = ProjectBuilder.builder().build()\n    project.pluginManager.apply(\"com.android.library\")\n\n    extension = project.extensions.create(\"granite\", GraniteExtension::class.java, project)\n    configurator = DevServerResourceConfigurator(project, extension)\n\n    testResDir = File(project.projectDir, \"src/debug/res/values\")\n  }\n\n  @AfterEach\n  fun cleanup() {\n    // Clean up generated test files\n    val debugSrcDir = File(project.projectDir, \"src/debug\")\n    if (debugSrcDir.exists()) {\n      debugSrcDir.deleteRecursively()\n    }\n  }\n\n  @Test\n  fun `configurator is created successfully`() {\n    assertNotNull(configurator, \"DevServerResourceConfigurator should be created\")\n  }\n\n  @Test\n  fun `configure does not generate files when dev server not configured`() {\n    // Don't set devServerHost or devServerPort\n    configurator.configure()\n\n    // Verify no resources were generated\n    assertFalse(\n      testResDir.exists(),\n      \"Resource directory should not be created when dev server is not configured\",\n    )\n  }\n\n  @Test\n  fun `configure generates strings xml when host is set`() {\n    extension.devServerHost.set(\"localhost\")\n\n    configurator.configure()\n\n    val stringsFile = File(testResDir, \"strings.xml\")\n    assertTrue(stringsFile.exists(), \"strings.xml should be generated\")\n    assertTrue(\n      stringsFile.readText().contains(\"react_native_dev_server_host\"),\n      \"strings.xml should contain dev server host\",\n    )\n    assertTrue(\n      stringsFile.readText().contains(\"localhost\"),\n      \"strings.xml should contain the configured host\",\n    )\n  }\n\n  @Test\n  fun `configure generates integers xml when port is set`() {\n    extension.devServerPort.set(8081)\n\n    configurator.configure()\n\n    val integersFile = File(testResDir, \"integers.xml\")\n    assertTrue(integersFile.exists(), \"integers.xml should be generated\")\n    assertTrue(\n      integersFile.readText().contains(\"react_native_dev_server_port\"),\n      \"integers.xml should contain dev server port\",\n    )\n    assertTrue(\n      integersFile.readText().contains(\"8081\"),\n      \"integers.xml should contain the configured port\",\n    )\n  }\n\n  @Test\n  fun `configure generates both strings and integers when both are set`() {\n    extension.devServerHost.set(\"10.0.2.2\")\n    extension.devServerPort.set(8082)\n\n    configurator.configure()\n\n    val stringsFile = File(testResDir, \"strings.xml\")\n    val integersFile = File(testResDir, \"integers.xml\")\n\n    assertTrue(stringsFile.exists(), \"strings.xml should be generated\")\n    assertTrue(integersFile.exists(), \"integers.xml should be generated\")\n\n    assertTrue(\n      stringsFile.readText().contains(\"10.0.2.2\"),\n      \"strings.xml should contain the configured host\",\n    )\n    assertTrue(\n      integersFile.readText().contains(\"8082\"),\n      \"integers.xml should contain the configured port\",\n    )\n  }\n\n  @Test\n  fun `configure generates valid xml format for strings`() {\n    extension.devServerHost.set(\"192.168.1.100\")\n\n    configurator.configure()\n\n    val stringsFile = File(testResDir, \"strings.xml\")\n    val content = stringsFile.readText()\n\n    assertTrue(content.contains(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\"), \"Should have XML declaration\")\n    assertTrue(content.contains(\"<resources>\"), \"Should have resources tag\")\n    assertTrue(content.contains(\"</resources>\"), \"Should close resources tag\")\n    assertTrue(content.contains(\"translatable=\\\"false\\\"\"), \"Should mark as non-translatable\")\n  }\n\n  @Test\n  fun `configure generates valid xml format for integers`() {\n    extension.devServerPort.set(9999)\n\n    configurator.configure()\n\n    val integersFile = File(testResDir, \"integers.xml\")\n    val content = integersFile.readText()\n\n    assertTrue(content.contains(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\"), \"Should have XML declaration\")\n    assertTrue(content.contains(\"<resources>\"), \"Should have resources tag\")\n    assertTrue(content.contains(\"</resources>\"), \"Should close resources tag\")\n    assertTrue(content.contains(\"<integer name=\\\"react_native_dev_server_port\\\">\"), \"Should have integer tag\")\n  }\n\n  @Test\n  fun `configure can be called multiple times`() {\n    extension.devServerHost.set(\"localhost\")\n    extension.devServerPort.set(8081)\n\n    // Should not throw when called multiple times\n    configurator.configure()\n    configurator.configure()\n\n    // Files should still exist\n    assertTrue(File(testResDir, \"strings.xml\").exists())\n    assertTrue(File(testResDir, \"integers.xml\").exists())\n  }\n\n  @Test\n  fun `configure handles emulator android host`() {\n    extension.devServerHost.set(\"10.0.2.2\") // Standard Android emulator host\n\n    configurator.configure()\n\n    val stringsFile = File(testResDir, \"strings.xml\")\n    assertTrue(\n      stringsFile.readText().contains(\"10.0.2.2\"),\n      \"Should handle Android emulator host address\",\n    )\n  }\n\n  @Test\n  fun `configure handles custom ports`() {\n    extension.devServerPort.set(19000) // Custom Expo port\n\n    configurator.configure()\n\n    val integersFile = File(testResDir, \"integers.xml\")\n    assertTrue(\n      integersFile.readText().contains(\"19000\"),\n      \"Should handle custom port numbers\",\n    )\n  }\n\n  @Test\n  fun `configure creates directory structure if not exists`() {\n    // Ensure directory doesn't exist\n    val debugSrcDir = File(project.projectDir, \"src/debug\")\n    if (debugSrcDir.exists()) {\n      debugSrcDir.deleteRecursively()\n    }\n\n    extension.devServerHost.set(\"localhost\")\n    configurator.configure()\n\n    assertTrue(testResDir.exists(), \"Should create directory structure\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/config/ResourceConfiguratorTest.kt",
    "content": "package run.granite.gradle.config\n\nimport com.android.build.gradle.LibraryExtension\nimport org.gradle.api.Project\nimport org.gradle.testfixtures.ProjectBuilder\nimport org.junit.jupiter.api.BeforeEach\nimport org.junit.jupiter.api.Test\nimport run.granite.gradle.GraniteExtension\nimport kotlin.test.assertNotNull\nimport kotlin.test.assertTrue\n\n/**\n * Unit tests for ResourceConfigurator.\n *\n * Tests the configuration of Android resource packaging options,\n * particularly bundle compression settings.\n */\nclass ResourceConfiguratorTest {\n\n  private lateinit var project: Project\n  private lateinit var extension: GraniteExtension\n  private lateinit var androidExtension: LibraryExtension\n  private lateinit var configurator: ResourceConfigurator\n\n  @BeforeEach\n  fun setup() {\n    project = ProjectBuilder.builder().build()\n    project.pluginManager.apply(\"com.android.library\")\n\n    extension = project.extensions.create(\"granite\", GraniteExtension::class.java, project)\n    androidExtension = project.extensions.getByType(LibraryExtension::class.java)\n\n    configurator = ResourceConfigurator(project, extension)\n  }\n\n  @Test\n  fun `configurator is created successfully`() {\n    assertNotNull(configurator, \"ResourceConfigurator should be created\")\n  }\n\n  @Test\n  fun `configure method executes without errors when compression is enabled`() {\n    extension.bundleCompressionEnabled.set(true)\n\n    // Should not throw\n    configurator.configure(androidExtension)\n  }\n\n  @Test\n  fun `configure method executes without errors when compression is disabled`() {\n    extension.bundleCompressionEnabled.set(false)\n\n    // Should not throw\n    configurator.configure(androidExtension)\n  }\n\n  @Test\n  fun `packaging configuration is applied to android extension`() {\n    extension.bundleCompressionEnabled.set(false)\n\n    configurator.configure(androidExtension)\n\n    // Verify packaging configuration exists\n    assertNotNull(androidExtension.packaging, \"Packaging should be configured\")\n  }\n\n  @Test\n  fun `map files are always excluded from compression`() {\n    extension.bundleCompressionEnabled.set(true)\n\n    configurator.configure(androidExtension)\n\n    // Verify packaging resources exist\n    assertNotNull(androidExtension.packaging.resources, \"Packaging resources should be configured\")\n  }\n\n  @Test\n  fun `bundle compression disabled excludes bundle and hbc files`() {\n    extension.bundleCompressionEnabled.set(false)\n\n    configurator.configure(androidExtension)\n\n    val excludes = androidExtension.packaging.resources.excludes\n\n    // When compression is disabled, bundle files should be excluded from APK compression\n    assertTrue(\n      excludes.any { it.contains(\".bundle\") },\n      \"Bundle files should be excluded when compression is disabled\",\n    )\n    assertTrue(\n      excludes.any { it.contains(\".hbc\") },\n      \"Hermes bytecode files should be excluded when compression is disabled\",\n    )\n    assertTrue(\n      excludes.any { it.contains(\".map\") },\n      \"Map files should always be excluded\",\n    )\n  }\n\n  @Test\n  fun `bundle compression enabled only excludes map files`() {\n    extension.bundleCompressionEnabled.set(true)\n\n    configurator.configure(androidExtension)\n\n    val excludes = androidExtension.packaging.resources.excludes\n\n    // When compression is enabled, only map files should be excluded\n    assertTrue(\n      excludes.any { it.contains(\".map\") },\n      \"Map files should always be excluded\",\n    )\n  }\n\n  @Test\n  fun `configurator can be called multiple times`() {\n    extension.bundleCompressionEnabled.set(false)\n\n    // Should not throw when called multiple times\n    configurator.configure(androidExtension)\n    configurator.configure(androidExtension)\n  }\n\n  @Test\n  fun `configurator works with default extension values`() {\n    // Don't set any values explicitly, use defaults\n\n    // Should not throw with default values\n    configurator.configure(androidExtension)\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/fixtures/NativeModuleFixtures.kt",
    "content": "package run.granite.gradle.fixtures\n\nimport run.granite.gradle.models.NativeModule\n\n/**\n * Test fixtures for NativeModule instances.\n * Used for testing autolinking generation with various module configurations.\n */\nobject NativeModuleFixtures {\n\n  /**\n   * Creates a module with includesGeneratedCode: true.\n   *\n   * This represents the brick-module package with:\n   * - libraryName: \"BrickModuleSpec\" (from package.json codegenConfig)\n   * - Java TurboModule implementation\n   * - No C++ implementation (Java only)\n   * - PackageList integration\n   * - includesGeneratedCode: true (uses brick-codegen instead of react-native-codegen)\n   */\n  fun createModuleWithCustomCodegen(): NativeModule = NativeModule(\n    name = \"custom-codegen-module\",\n    packageImportPath = \"com.example.CustomCodegenPackage\",\n    packageInstance = \"new CustomCodegenPackage()\",\n    dependencyConfiguration = null,\n    buildTypes = emptyList(),\n    libraryName = \"CustomCodegenSpec\",\n    componentDescriptors = emptyList(),\n    cmakeListsPath = \"node_modules/custom-codegen-module/android/build/generated/source/codegen/jni/CMakeLists.txt\",\n    cxxModuleCMakeListsPath = null,\n    cxxModuleCMakeListsModuleName = null,\n    cxxModuleHeaderName = null,\n    isPureCxxDependency = false,\n    includesGeneratedCode = true, // brick-module uses brick-codegen\n  )\n\n  /**\n   * Creates a standard module that uses react-native-codegen.\n   *\n   * This represents a typical React Native module that should be included in autolinking.\n   */\n  fun createStandardModule(): NativeModule = NativeModule(\n    name = \"react-native-example\",\n    packageImportPath = \"com.example.ExamplePackage\",\n    packageInstance = \"new ExamplePackage()\",\n    dependencyConfiguration = null,\n    buildTypes = emptyList(),\n    libraryName = \"ExampleSpec\",\n    componentDescriptors = emptyList(),\n    cmakeListsPath = \"node_modules/react-native-example/android/build/generated/source/codegen/jni/CMakeLists.txt\",\n    cxxModuleCMakeListsPath = null,\n    cxxModuleCMakeListsModuleName = null,\n    cxxModuleHeaderName = null,\n    isPureCxxDependency = false,\n    includesGeneratedCode = false,\n  )\n\n  /**\n   * Creates a list with both standard and custom codegen modules.\n   *\n   * Useful for testing filtering behavior.\n   */\n  fun createMixedModules(): List<NativeModule> = listOf(\n    createModuleWithCustomCodegen(),\n    createStandardModule(),\n  )\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/generators/CMakeGeneratorTest.kt",
    "content": "package run.granite.gradle.generators\n\nimport org.assertj.core.api.Assertions.assertThat\nimport org.junit.jupiter.api.Test\nimport org.junit.jupiter.api.io.TempDir\nimport run.granite.gradle.models.NativeModule\nimport java.io.File\n\nclass CMakeGeneratorTest {\n\n  @TempDir\n  lateinit var tempDir: File\n\n  @Test\n  fun `generate with CMake modules creates REACTNATIVE_MERGED_SO and add_subdirectory commands`() {\n    // Create actual directory for the test\n    val androidDir = File(tempDir, \"android\")\n    androidDir.mkdirs()\n\n    val module = createModuleWithCMake(\"test-module\", \"TestLib\", \"android/CMakeLists.txt\")\n\n    val generated = CMakeGenerator.generate(listOf(module), tempDir)\n\n    assertThat(generated).contains(\"set(REACTNATIVE_MERGED_SO true)\")\n    assertThat(generated).contains(\"add_subdirectory(\")\n    assertThat(generated).contains(\"TestLib_autolinked_build\")\n    assertThat(generated).contains(\"set(AUTOLINKED_LIBRARIES\")\n    assertThat(generated).contains(\"react_codegen_TestLib\")\n  }\n\n  @Test\n  fun `generate with no CMake modules creates empty file`() {\n    val module = createJavaOnlyModule()\n\n    val generated = CMakeGenerator.generate(listOf(module), tempDir)\n\n    assertThat(generated).contains(\"# No native modules with CMake configuration found\")\n    assertThat(generated).contains(\"set(REACTNATIVE_MERGED_SO true)\")\n    assertThat(generated).contains(\"set(AUTOLINKED_LIBRARIES)\")\n  }\n\n  private fun createModuleWithCMake(name: String, libraryName: String, cmakePath: String): NativeModule = NativeModule(\n    name = name,\n    packageImportPath = null,\n    packageInstance = null,\n    dependencyConfiguration = null,\n    buildTypes = emptyList(),\n    libraryName = libraryName,\n    componentDescriptors = emptyList(),\n    cmakeListsPath = cmakePath,\n    cxxModuleCMakeListsPath = null,\n    cxxModuleCMakeListsModuleName = null,\n    cxxModuleHeaderName = null,\n    isPureCxxDependency = false,\n  )\n\n  private fun createJavaOnlyModule(): NativeModule = NativeModule(\n    name = \"java-module\",\n    packageImportPath = \"com.example.Package\",\n    packageInstance = \"new Package()\",\n    dependencyConfiguration = null,\n    buildTypes = emptyList(),\n    libraryName = \"JavaLib\",\n    componentDescriptors = emptyList(),\n    cmakeListsPath = null,\n    cxxModuleCMakeListsPath = null,\n    cxxModuleCMakeListsModuleName = null,\n    cxxModuleHeaderName = null,\n    isPureCxxDependency = false,\n  )\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/generators/CppAutolinkingGeneratorTest.kt",
    "content": "package run.granite.gradle.generators\n\nimport org.assertj.core.api.Assertions.assertThat\nimport org.junit.jupiter.api.Test\nimport run.granite.gradle.fixtures.NativeModuleFixtures\nimport run.granite.gradle.models.NativeModule\n\n/**\n * Unit tests for CppAutolinkingGenerator core generation logic.\n * Tests C++ code generation with various module configurations.\n */\nclass CppAutolinkingGeneratorTest {\n\n  @Test\n  fun `generate with no modules creates empty implementations`() {\n    val modules = emptyList<NativeModule>()\n\n    val generated = CppAutolinkingGenerator.generate(modules)\n\n    // Should contain auto-generated comment\n    assertThat(generated).contains(\"Generated by Granite Gradle Plugin - DO NOT EDIT\")\n\n    // Should include autolinking.h\n    assertThat(generated).contains(\"#include <autolinking.h>\")\n\n    // Should have namespace\n    assertThat(generated).contains(\"namespace facebook::react {\")\n\n    // Should have registerProviders with \"no Fabric components\" comment\n    assertThat(generated).contains(\"void autolinking_registerProviders(\")\n    assertThat(generated).contains(\"// No autolinked Fabric components found\")\n\n    // Should have cxxModuleProvider returning nullptr\n    assertThat(generated).contains(\"std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(\")\n    assertThat(generated).contains(\"// No autolinked C++ TurboModules found\")\n    assertThat(generated).contains(\"return nullptr;\")\n\n    // Should have ModuleProvider returning nullptr\n    assertThat(generated).contains(\"std::shared_ptr<TurboModule> autolinking_ModuleProvider(\")\n    assertThat(generated).contains(\"// No autolinked Java TurboModules found\")\n  }\n\n  @Test\n  fun `generate with Java-only module includes module provider call`() {\n    val modules = listOf(\n      NativeModule(\n        name = \"react-native-webview\",\n        packageImportPath = \"com.example.Package\",\n        packageInstance = \"new Package()\",\n        dependencyConfiguration = null,\n        buildTypes = emptyList(),\n        libraryName = \"RNCWebView\",\n        componentDescriptors = emptyList(),\n        cmakeListsPath = null,\n        cxxModuleCMakeListsPath = null,\n        cxxModuleCMakeListsModuleName = null,\n        cxxModuleHeaderName = null,\n        isPureCxxDependency = false,\n      ),\n    )\n\n    val generated = CppAutolinkingGenerator.generate(modules)\n\n    // Should have Java module provider call\n    assertThat(generated).contains(\"auto module_react_native_webview = RNCWebView_ModuleProvider(moduleName, params);\")\n    assertThat(generated).contains(\"if (module_react_native_webview != nullptr) {\")\n    assertThat(generated).contains(\"return module_react_native_webview;\")\n\n    // Should not have C++ module headers or checks\n    assertThat(generated).doesNotContain(\"// C++ TurboModule headers\")\n    assertThat(generated).contains(\"// No autolinked C++ TurboModules found\")\n\n    // Should have \"no Fabric components\" comment\n    assertThat(generated).contains(\"// No autolinked Fabric components found\")\n  }\n\n  @Test\n  fun `generate with C++ module includes header and provider check`() {\n    val modules = listOf(\n      NativeModule(\n        name = \"cxx-module\",\n        packageImportPath = null,\n        packageInstance = null,\n        dependencyConfiguration = null,\n        buildTypes = emptyList(),\n        libraryName = \"CxxModule\",\n        componentDescriptors = emptyList(),\n        cmakeListsPath = null,\n        cxxModuleCMakeListsPath = null,\n        cxxModuleCMakeListsModuleName = null,\n        cxxModuleHeaderName = \"CxxModule\",\n        isPureCxxDependency = true,\n      ),\n    )\n\n    val generated = CppAutolinkingGenerator.generate(modules)\n\n    // Should include C++ module header\n    assertThat(generated).contains(\"// C++ TurboModule headers\")\n    assertThat(generated).contains(\"#include <CxxModule.h>\")\n\n    // Should have C++ module provider check\n    assertThat(generated).contains(\"// Check C++ TurboModules (early-return pattern)\")\n    assertThat(generated).contains(\"if (moduleName == CxxModule::kModuleName) {\")\n    assertThat(generated).contains(\"return std::make_shared<CxxModule>(jsInvoker);\")\n\n    // Should not have Java module provider\n    assertThat(generated).contains(\"// No autolinked Java TurboModules found\")\n  }\n\n  @Test\n  fun `generate with Fabric module includes component descriptor header and registration`() {\n    val modules = listOf(\n      NativeModule(\n        name = \"fabric-module\",\n        packageImportPath = null,\n        packageInstance = null,\n        dependencyConfiguration = null,\n        buildTypes = emptyList(),\n        libraryName = \"FabricModule\",\n        componentDescriptors = listOf(\"MyComponentDescriptor\", \"AnotherComponentDescriptor\"),\n        cmakeListsPath = null,\n        cxxModuleCMakeListsPath = null,\n        cxxModuleCMakeListsModuleName = null,\n        cxxModuleHeaderName = null,\n        isPureCxxDependency = false,\n      ),\n    )\n\n    val generated = CppAutolinkingGenerator.generate(modules)\n\n    // Should include Fabric headers\n    assertThat(generated).contains(\"// Fabric component descriptor headers\")\n    assertThat(generated).contains(\"<react/renderer/components/FabricModule/ComponentDescriptors.h>\")\n    assertThat(generated).contains(\"<react/renderer/components/FabricModule/MyComponentDescriptor.h>\")\n\n    // Should register codegen components + custom component descriptors\n    assertThat(generated).contains(\"FabricModule_registerComponentDescriptorsFromCodegen(registry);\")\n    assertThat(generated).contains(\"registry->add(concreteComponentDescriptorProvider<MyComponentDescriptor>());\")\n    assertThat(generated).contains(\"registry->add(concreteComponentDescriptorProvider<AnotherComponentDescriptor>());\")\n  }\n\n  @Test\n  fun `generate with mixed modules includes TurboModule providers and Fabric registration`() {\n    // Handle modules with both Java and C++ implementations\n    val modules = listOf(\n      createJavaModule(\"java-module\", \"JavaLib\"),\n      createCxxModule(\"cxx-module\", \"CxxLib\", \"CxxModule\"),\n      createFabricModule(\"fabric-module\", \"FabricLib\", listOf(\"FabricComponent\")),\n      createMixedModule(\"mixed-module\", \"MixedLib\", \"MixedModule\", listOf(\"MixedComponent\")),\n    )\n\n    val generated = CppAutolinkingGenerator.generate(modules)\n\n    // Should have C++ TurboModule headers\n    assertThat(generated).contains(\"// C++ TurboModule headers\")\n\n    // Should have Fabric component headers or registration\n    assertThat(generated).contains(\"// Fabric component descriptor headers\")\n    assertThat(generated).contains(\"registry->add(concreteComponentDescriptorProvider<FabricComponent>());\")\n    assertThat(generated).contains(\"registry->add(concreteComponentDescriptorProvider<MixedComponent>());\")\n\n    // Should have C++ provider checks\n    assertThat(generated).contains(\"if (moduleName == CxxModule::kModuleName) {\")\n    assertThat(generated).contains(\"if (moduleName == MixedModule::kModuleName) {\")\n\n    // Should have Java provider calls\n    assertThat(generated).contains(\"auto module_java_module = JavaLib_ModuleProvider(moduleName, params);\")\n    assertThat(generated).contains(\"auto module_mixed_module = MixedLib_ModuleProvider(moduleName, params);\")\n    assertThat(generated).contains(\"FabricLib_registerComponentDescriptorsFromCodegen(registry);\")\n    assertThat(generated).contains(\"MixedLib_registerComponentDescriptorsFromCodegen(registry);\")\n  }\n\n  @Test\n  fun `generate uses sanitized names for variables`() {\n    // C++ identifier sanitization\n    val modules = listOf(\n      NativeModule(\n        name = \"module-with-hyphens\",\n        packageImportPath = \"com.example.Package\",\n        packageInstance = \"new Package()\",\n        dependencyConfiguration = null,\n        buildTypes = emptyList(),\n        libraryName = \"ModuleLib\",\n        componentDescriptors = emptyList(),\n        cmakeListsPath = null,\n        cxxModuleCMakeListsPath = null,\n        cxxModuleCMakeListsModuleName = null,\n        cxxModuleHeaderName = null,\n        isPureCxxDependency = false,\n      ),\n    )\n\n    val generated = CppAutolinkingGenerator.generate(modules)\n\n    // Should use sanitized name (hyphens -> underscores)\n    assertThat(generated).contains(\"auto module_module_with_hyphens = ModuleLib_ModuleProvider(moduleName, params);\")\n    assertThat(generated).contains(\"if (module_module_with_hyphens != nullptr) {\")\n  }\n\n  @Test\n  fun `generate follows early-return pattern for multiple Java modules`() {\n    // Early-return pattern\n    val modules = listOf(\n      createJavaModule(\"module1\", \"Lib1\"),\n      createJavaModule(\"module2\", \"Lib2\"),\n      createJavaModule(\"module3\", \"Lib3\"),\n    )\n\n    val generated = CppAutolinkingGenerator.generate(modules)\n\n    // Should check each module and return early if found\n    assertThat(generated).contains(\"auto module_module1 = Lib1_ModuleProvider(moduleName, params);\")\n    assertThat(generated).contains(\"if (module_module1 != nullptr) {\")\n    assertThat(generated).contains(\"return module_module1;\")\n\n    assertThat(generated).contains(\"auto module_module2 = Lib2_ModuleProvider(moduleName, params);\")\n    assertThat(generated).contains(\"if (module_module2 != nullptr) {\")\n    assertThat(generated).contains(\"return module_module2;\")\n\n    assertThat(generated).contains(\"auto module_module3 = Lib3_ModuleProvider(moduleName, params);\")\n\n    // Should return nullptr at the end\n    val lines = generated.lines()\n    val returnNullptrIndex = lines.indexOfLast { it.contains(\"return nullptr;\") }\n    assertThat(returnNullptrIndex).isGreaterThan(-1)\n  }\n\n  @Test\n  fun `generate follows early-return pattern for multiple C++ modules`() {\n    // Early-return pattern\n    val modules = listOf(\n      createCxxModule(\"module1\", \"Lib1\", \"Module1\"),\n      createCxxModule(\"module2\", \"Lib2\", \"Module2\"),\n    )\n\n    val generated = CppAutolinkingGenerator.generate(modules)\n\n    // Should check each module and return early if found\n    assertThat(generated).contains(\"if (moduleName == Module1::kModuleName) {\")\n    assertThat(generated).contains(\"return std::make_shared<Module1>(jsInvoker);\")\n\n    assertThat(generated).contains(\"if (moduleName == Module2::kModuleName) {\")\n    assertThat(generated).contains(\"return std::make_shared<Module2>(jsInvoker);\")\n\n    // Should return nullptr at the end\n    assertThat(generated).contains(\"return nullptr;\")\n  }\n\n  @Test\n  fun `generate closes namespace correctly`() {\n    val modules = emptyList<NativeModule>()\n\n    val generated = CppAutolinkingGenerator.generate(modules)\n\n    assertThat(generated).contains(\"} // namespace facebook::react\")\n  }\n\n  @Test\n  fun `generate includes modules with includesGeneratedCode flag`() {\n    // includesGeneratedCode indicates the library ships generated files; it should still be autolinked.\n    val modules = listOf(NativeModuleFixtures.createModuleWithCustomCodegen())\n\n    val generated = CppAutolinkingGenerator.generate(modules)\n\n    // Should call *_ModuleProvider for the module\n    assertThat(generated).contains(\"CustomCodegenSpec_ModuleProvider\")\n  }\n\n  @Test\n  fun `generate includes standard modules and includesGeneratedCode modules`() {\n    // Mixed list: one standard module, one that ships generated code\n    val modules = NativeModuleFixtures.createMixedModules()\n\n    val generated = CppAutolinkingGenerator.generate(modules)\n\n    // Standard module should be included\n    assertThat(generated).contains(\"ExampleSpec_ModuleProvider\")\n\n    // includesGeneratedCode module should also be included\n    assertThat(generated).contains(\"CustomCodegenSpec_ModuleProvider\")\n  }\n\n  // Helper methods for creating test modules\n  private fun createJavaModule(name: String, libraryName: String): NativeModule = NativeModule(\n    name = name,\n    packageImportPath = \"com.example.$name.Package\",\n    packageInstance = \"new Package()\",\n    dependencyConfiguration = null,\n    buildTypes = emptyList(),\n    libraryName = libraryName,\n    componentDescriptors = emptyList(),\n    cmakeListsPath = null,\n    cxxModuleCMakeListsPath = null,\n    cxxModuleCMakeListsModuleName = null,\n    cxxModuleHeaderName = null,\n    isPureCxxDependency = false,\n  )\n\n  private fun createCxxModule(name: String, libraryName: String, headerName: String): NativeModule = NativeModule(\n    name = name,\n    packageImportPath = null,\n    packageInstance = null,\n    dependencyConfiguration = null,\n    buildTypes = emptyList(),\n    libraryName = libraryName,\n    componentDescriptors = emptyList(),\n    cmakeListsPath = null,\n    cxxModuleCMakeListsPath = null,\n    cxxModuleCMakeListsModuleName = null,\n    cxxModuleHeaderName = headerName,\n    isPureCxxDependency = true,\n  )\n\n  private fun createFabricModule(name: String, libraryName: String, descriptors: List<String>): NativeModule = NativeModule(\n    name = name,\n    packageImportPath = null,\n    packageInstance = null,\n    dependencyConfiguration = null,\n    buildTypes = emptyList(),\n    libraryName = libraryName,\n    componentDescriptors = descriptors,\n    cmakeListsPath = null,\n    cxxModuleCMakeListsPath = null,\n    cxxModuleCMakeListsModuleName = null,\n    cxxModuleHeaderName = null,\n    isPureCxxDependency = false,\n  )\n\n  private fun createMixedModule(name: String, libraryName: String, headerName: String, descriptors: List<String>): NativeModule = NativeModule(\n    name = name,\n    packageImportPath = \"com.example.$name.Package\",\n    packageInstance = \"new Package()\",\n    dependencyConfiguration = null,\n    buildTypes = emptyList(),\n    libraryName = libraryName,\n    componentDescriptors = descriptors,\n    cmakeListsPath = null,\n    cxxModuleCMakeListsPath = null,\n    cxxModuleCMakeListsModuleName = null,\n    cxxModuleHeaderName = headerName,\n    isPureCxxDependency = false,\n  )\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/generators/EntryPointGeneratorTest.kt",
    "content": "package run.granite.gradle.generators\n\nimport org.assertj.core.api.Assertions.assertThat\nimport org.assertj.core.api.Assertions.assertThatThrownBy\nimport org.junit.jupiter.api.Test\n\nclass EntryPointGeneratorTest {\n\n  @Test\n  fun `generate creates ReactNativeApplicationEntryPoint class with loadReactNative method`() {\n    val generated = EntryPointGenerator.generate(\"com.example.test\")\n\n    assertThat(generated).contains(\"package com.facebook.react\")\n    assertThat(generated).contains(\"public class ReactNativeApplicationEntryPoint\")\n    assertThat(generated).contains(\"public static void loadReactNative(Context context)\")\n    assertThat(generated).contains(\"SoLoader.init(context, OpenSourceMergedSoMapping.INSTANCE)\")\n    assertThat(generated).contains(\"if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED)\")\n    assertThat(generated).contains(\"DefaultNewArchitectureEntryPoint.load()\")\n  }\n\n  @Test\n  fun `generate throws IllegalArgumentException when packageName is null`() {\n    assertThatThrownBy {\n      EntryPointGenerator.generate(null)\n    }\n      .isInstanceOf(IllegalArgumentException::class.java)\n      .hasMessageContaining(\"Android package name not found\")\n      .hasMessageContaining(\"Ensure project has valid android configuration\")\n  }\n\n  @Test\n  fun `generate includes RuntimeException handling for SoLoader failure`() {\n    val generated = EntryPointGenerator.generate(\"com.example.test\")\n\n    assertThat(generated).contains(\"try {\")\n    assertThat(generated).contains(\"SoLoader.init\")\n    assertThat(generated).contains(\"} catch (Exception e) {\")\n    assertThat(generated).contains(\"throw new RuntimeException(\\\"Failed to initialize SoLoader\\\", e)\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/models/AutolinkingConfigTest.kt",
    "content": "package run.granite.gradle.models\n\nimport org.assertj.core.api.Assertions.assertThat\nimport org.junit.jupiter.api.Test\n\n/**\n * Unit tests for AutolinkingConfig filtering logic.\n * Tests androidDependencies, javaModules, cxxModules, fabricModules, cmakeModules filtering.\n */\nclass AutolinkingConfigTest {\n\n  @Test\n  fun `androidDependencies filters only modules with Android platform config`() {\n    val config = AutolinkingConfig(\n      project = ProjectInfo(\n        name = \"test-project\",\n        version = \"1.0.0\",\n        ios = null,\n        android = AndroidProjectConfig(\n          sourceDir = \"android\",\n          manifestPath = \"android/AndroidManifest.xml\",\n          packageName = \"com.example.test\",\n        ),\n      ),\n      dependencies = mapOf(\n        \"module1\" to DependencyConfig(\n          name = \"module1\",\n          root = \"/path/to/module1\",\n          platforms = PlatformConfig(\n            ios = null,\n            android = AndroidDependencyConfig(\n              sourceDir = \"android\",\n              packageImportPath = \"com.module1.Package\",\n              packageInstance = \"new Package()\",\n              dependencyConfiguration = null,\n              buildTypes = null,\n              libraryName = \"module1\",\n              componentDescriptors = null,\n              cmakeListsPath = null,\n              cxxModuleCMakeListsPath = null,\n              cxxModuleCMakeListsModuleName = null,\n              cxxModuleHeaderName = null,\n              isPureCxxDependency = null,\n            ),\n          ),\n        ),\n        \"module2\" to DependencyConfig(\n          name = \"module2\",\n          root = \"/path/to/module2\",\n          platforms = null, // No platforms - should be excluded\n        ),\n        \"module3\" to DependencyConfig(\n          name = \"module3\",\n          root = \"/path/to/module3\",\n          platforms = PlatformConfig(\n            ios = emptyMap(),\n            android = null, // No Android config - should be excluded\n          ),\n        ),\n      ),\n    )\n\n    val androidModules = config.androidDependencies()\n\n    // Only module1 should be included\n    assertThat(androidModules).hasSize(1)\n    assertThat(androidModules[0].name).isEqualTo(\"module1\")\n  }\n\n  @Test\n  fun `javaModules filters only modules with Java implementation`() {\n    val config = AutolinkingConfig(\n      project = ProjectInfo(\"test\", null, null, null),\n      dependencies = mapOf(\n        \"java-module\" to DependencyConfig(\n          name = \"java-module\",\n          root = \"/path\",\n          platforms = PlatformConfig(\n            ios = null,\n            android = AndroidDependencyConfig(\n              sourceDir = \"android\",\n              packageImportPath = \"com.example.Package\",\n              packageInstance = \"new Package()\",\n              dependencyConfiguration = null,\n              buildTypes = null,\n              libraryName = \"javamodule\",\n              componentDescriptors = null,\n              cmakeListsPath = null,\n              cxxModuleCMakeListsPath = null,\n              cxxModuleCMakeListsModuleName = null,\n              cxxModuleHeaderName = null,\n              isPureCxxDependency = null,\n            ),\n          ),\n        ),\n        \"cxx-only-module\" to DependencyConfig(\n          name = \"cxx-only-module\",\n          root = \"/path\",\n          platforms = PlatformConfig(\n            ios = null,\n            android = AndroidDependencyConfig(\n              sourceDir = \"android\",\n              packageImportPath = null, // No Java\n              packageInstance = null,\n              dependencyConfiguration = null,\n              buildTypes = null,\n              libraryName = \"cxxmodule\",\n              componentDescriptors = null,\n              cmakeListsPath = null,\n              cxxModuleCMakeListsPath = null,\n              cxxModuleCMakeListsModuleName = null,\n              cxxModuleHeaderName = \"CxxModule\",\n              isPureCxxDependency = true,\n            ),\n          ),\n        ),\n      ),\n    )\n\n    val javaModules = config.javaModules()\n\n    // Only java-module should be included\n    assertThat(javaModules).hasSize(1)\n    assertThat(javaModules[0].name).isEqualTo(\"java-module\")\n    assertThat(javaModules[0].hasJavaImplementation).isTrue\n  }\n\n  @Test\n  fun `cxxModules filters only modules with C++ implementation`() {\n    val config = AutolinkingConfig(\n      project = ProjectInfo(\"test\", null, null, null),\n      dependencies = mapOf(\n        \"java-only-module\" to DependencyConfig(\n          name = \"java-only-module\",\n          root = \"/path\",\n          platforms = PlatformConfig(\n            ios = null,\n            android = AndroidDependencyConfig(\n              sourceDir = \"android\",\n              packageImportPath = \"com.example.Package\",\n              packageInstance = \"new Package()\",\n              dependencyConfiguration = null,\n              buildTypes = null,\n              libraryName = \"javamodule\",\n              componentDescriptors = null,\n              cmakeListsPath = null,\n              cxxModuleCMakeListsPath = null,\n              cxxModuleCMakeListsModuleName = null,\n              cxxModuleHeaderName = null, // No C++\n              isPureCxxDependency = null,\n            ),\n          ),\n        ),\n        \"cxx-module\" to DependencyConfig(\n          name = \"cxx-module\",\n          root = \"/path\",\n          platforms = PlatformConfig(\n            ios = null,\n            android = AndroidDependencyConfig(\n              sourceDir = \"android\",\n              packageImportPath = null,\n              packageInstance = null,\n              dependencyConfiguration = null,\n              buildTypes = null,\n              libraryName = \"cxxmodule\",\n              componentDescriptors = null,\n              cmakeListsPath = null,\n              cxxModuleCMakeListsPath = null,\n              cxxModuleCMakeListsModuleName = null,\n              cxxModuleHeaderName = \"CxxModule\", // Has C++\n              isPureCxxDependency = true,\n            ),\n          ),\n        ),\n      ),\n    )\n\n    val cxxModules = config.cxxModules()\n\n    // Only cxx-module should be included\n    assertThat(cxxModules).hasSize(1)\n    assertThat(cxxModules[0].name).isEqualTo(\"cxx-module\")\n    assertThat(cxxModules[0].hasCxxImplementation).isTrue\n  }\n\n  @Test\n  fun `fabricModules filters only modules with Fabric components`() {\n    val config = AutolinkingConfig(\n      project = ProjectInfo(\"test\", null, null, null),\n      dependencies = mapOf(\n        \"no-fabric-module\" to DependencyConfig(\n          name = \"no-fabric-module\",\n          root = \"/path\",\n          platforms = PlatformConfig(\n            ios = null,\n            android = AndroidDependencyConfig(\n              sourceDir = \"android\",\n              packageImportPath = \"com.example.Package\",\n              packageInstance = \"new Package()\",\n              dependencyConfiguration = null,\n              buildTypes = null,\n              libraryName = \"nofabric\",\n              componentDescriptors = null, // No Fabric\n              cmakeListsPath = null,\n              cxxModuleCMakeListsPath = null,\n              cxxModuleCMakeListsModuleName = null,\n              cxxModuleHeaderName = null,\n              isPureCxxDependency = null,\n            ),\n          ),\n        ),\n        \"fabric-module\" to DependencyConfig(\n          name = \"fabric-module\",\n          root = \"/path\",\n          platforms = PlatformConfig(\n            ios = null,\n            android = AndroidDependencyConfig(\n              sourceDir = \"android\",\n              packageImportPath = null,\n              packageInstance = null,\n              dependencyConfiguration = null,\n              buildTypes = null,\n              libraryName = \"fabricmodule\",\n              componentDescriptors = listOf(\"MyComponent\", \"AnotherComponent\"), // Has Fabric\n              cmakeListsPath = null,\n              cxxModuleCMakeListsPath = null,\n              cxxModuleCMakeListsModuleName = null,\n              cxxModuleHeaderName = null,\n              isPureCxxDependency = null,\n            ),\n          ),\n        ),\n      ),\n    )\n\n    val fabricModules = config.fabricModules()\n\n    // Only fabric-module should be included\n    assertThat(fabricModules).hasSize(1)\n    assertThat(fabricModules[0].name).isEqualTo(\"fabric-module\")\n    assertThat(fabricModules[0].hasFabricComponents).isTrue\n    assertThat(fabricModules[0].componentDescriptors).hasSize(2)\n  }\n\n  @Test\n  fun `cmakeModules filters only modules with CMake configuration`() {\n    val config = AutolinkingConfig(\n      project = ProjectInfo(\"test\", null, null, null),\n      dependencies = mapOf(\n        \"no-cmake-module\" to DependencyConfig(\n          name = \"no-cmake-module\",\n          root = \"/path\",\n          platforms = PlatformConfig(\n            ios = null,\n            android = AndroidDependencyConfig(\n              sourceDir = \"android\",\n              packageImportPath = \"com.example.Package\",\n              packageInstance = \"new Package()\",\n              dependencyConfiguration = null,\n              buildTypes = null,\n              libraryName = \"nocmake\",\n              componentDescriptors = null,\n              cmakeListsPath = null, // No CMake\n              cxxModuleCMakeListsPath = null,\n              cxxModuleCMakeListsModuleName = null,\n              cxxModuleHeaderName = null,\n              isPureCxxDependency = null,\n            ),\n          ),\n        ),\n        \"cmake-module\" to DependencyConfig(\n          name = \"cmake-module\",\n          root = \"/path\",\n          platforms = PlatformConfig(\n            ios = null,\n            android = AndroidDependencyConfig(\n              sourceDir = \"android\",\n              packageImportPath = null,\n              packageInstance = null,\n              dependencyConfiguration = null,\n              buildTypes = null,\n              libraryName = \"cmakemodule\",\n              componentDescriptors = null,\n              cmakeListsPath = \"android/CMakeLists.txt\", // Has CMake\n              cxxModuleCMakeListsPath = null,\n              cxxModuleCMakeListsModuleName = null,\n              cxxModuleHeaderName = null,\n              isPureCxxDependency = null,\n            ),\n          ),\n        ),\n      ),\n    )\n\n    val cmakeModules = config.cmakeModules()\n\n    // Only cmake-module should be included\n    assertThat(cmakeModules).hasSize(1)\n    assertThat(cmakeModules[0].name).isEqualTo(\"cmake-module\")\n    assertThat(cmakeModules[0].hasCMakeConfiguration).isTrue\n  }\n\n  @Test\n  fun `filtering methods work correctly with mixed modules`() {\n    val config = AutolinkingConfig(\n      project = ProjectInfo(\"test\", null, null, null),\n      dependencies = mapOf(\n        \"java-only\" to createDependency(\"java-only\", hasJava = true),\n        \"cxx-only\" to createDependency(\"cxx-only\", hasCxx = true),\n        \"fabric-only\" to createDependency(\"fabric-only\", hasFabric = true),\n        \"cmake-only\" to createDependency(\"cmake-only\", hasCMake = true),\n        \"mixed\" to createDependency(\"mixed\", hasJava = true, hasCxx = true, hasFabric = true, hasCMake = true),\n      ),\n    )\n\n    assertThat(config.androidDependencies()).hasSize(5)\n    assertThat(config.javaModules()).hasSize(2) // java-only, mixed\n    assertThat(config.cxxModules()).hasSize(2) // cxx-only, mixed\n    assertThat(config.fabricModules()).hasSize(2) // fabric-only, mixed\n    assertThat(config.cmakeModules()).hasSize(2) // cmake-only, mixed\n  }\n\n  private fun createDependency(\n    name: String,\n    hasJava: Boolean = false,\n    hasCxx: Boolean = false,\n    hasFabric: Boolean = false,\n    hasCMake: Boolean = false,\n  ): DependencyConfig = DependencyConfig(\n    name = name,\n    root = \"/path/to/$name\",\n    platforms = PlatformConfig(\n      ios = null,\n      android = AndroidDependencyConfig(\n        sourceDir = \"android\",\n        packageImportPath = if (hasJava) \"com.example.$name.Package\" else null,\n        packageInstance = if (hasJava) \"new Package()\" else null,\n        dependencyConfiguration = null,\n        buildTypes = null,\n        libraryName = name,\n        componentDescriptors = if (hasFabric) listOf(\"${name}Component\") else null,\n        cmakeListsPath = if (hasCMake) \"android/CMakeLists.txt\" else null,\n        cxxModuleCMakeListsPath = null,\n        cxxModuleCMakeListsModuleName = null,\n        cxxModuleHeaderName = if (hasCxx) \"${name}Module\" else null,\n        isPureCxxDependency = hasCxx,\n      ),\n    ),\n  )\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/models/CMakeEntryTest.kt",
    "content": "package run.granite.gradle.models\n\nimport org.assertj.core.api.Assertions.assertThat\nimport org.junit.jupiter.api.Test\nimport org.junit.jupiter.api.io.TempDir\nimport java.io.File\n\n/**\n * Unit tests for CMakeEntry core logic.\n * Tests path sanitization and CMake command generation.\n */\nclass CMakeEntryTest {\n\n  @TempDir\n  lateinit var tempDir: File\n\n  @Test\n  fun `sanitizedPath removes trailing CMakeLists txt`() {\n    val entry = CMakeEntry(\n      sourcePath = \"android/CMakeLists.txt\",\n      buildDirName = \"mylib_build\",\n      libraryTargets = listOf(\"react_codegen_mylib\"),\n    )\n\n    val moduleRoot = File(tempDir, \"mymodule\")\n    moduleRoot.mkdirs()\n    File(moduleRoot, \"android\").mkdirs()\n\n    val sanitized = entry.sanitizedPath(moduleRoot)\n\n    // Should remove /CMakeLists.txt suffix\n    assertThat(sanitized).endsWith(\"android\")\n    assertThat(sanitized).doesNotContain(\"CMakeLists.txt\")\n  }\n\n  @Test\n  fun `sanitizedPath removes trailing backslash CMakeLists txt`() {\n    val entry = CMakeEntry(\n      sourcePath = \"android\\\\CMakeLists.txt\",\n      buildDirName = \"mylib_build\",\n      libraryTargets = listOf(\"react_codegen_mylib\"),\n    )\n\n    val moduleRoot = File(tempDir, \"mymodule\")\n    moduleRoot.mkdirs()\n\n    val sanitized = entry.sanitizedPath(moduleRoot)\n\n    // Should remove \\CMakeLists.txt suffix\n    assertThat(sanitized).doesNotContain(\"CMakeLists.txt\")\n  }\n\n  @Test\n  fun `sanitizedPath converts backslashes to forward slashes`() {\n    val entry = CMakeEntry(\n      sourcePath = \"android\\\\src\\\\main\",\n      buildDirName = \"mylib_build\",\n      libraryTargets = listOf(\"react_codegen_mylib\"),\n    )\n\n    val moduleRoot = File(tempDir, \"mymodule\")\n    moduleRoot.mkdirs()\n\n    val sanitized = entry.sanitizedPath(moduleRoot)\n\n    // Should replace backslashes with forward slashes\n    assertThat(sanitized).doesNotContain(\"\\\\\")\n    assertThat(sanitized).contains(\"/\")\n  }\n\n  @Test\n  fun `sanitizedPath converts relative to absolute path`() {\n    val entry = CMakeEntry(\n      sourcePath = \"android\",\n      buildDirName = \"mylib_build\",\n      libraryTargets = listOf(\"react_codegen_mylib\"),\n    )\n\n    val moduleRoot = File(tempDir, \"mymodule\")\n    moduleRoot.mkdirs()\n    File(moduleRoot, \"android\").mkdirs()\n\n    val sanitized = entry.sanitizedPath(moduleRoot)\n\n    // Should be absolute path (canonicalPath resolves symlinks and may differ from absolutePath)\n    assertThat(File(sanitized).isAbsolute).isTrue()\n    assertThat(sanitized).contains(\"android\")\n  }\n\n  @Test\n  fun `sanitizedPath handles already absolute path`() {\n    val absolutePath = File(tempDir, \"absolute/path\").absolutePath\n    val entry = CMakeEntry(\n      sourcePath = absolutePath,\n      buildDirName = \"mylib_build\",\n      libraryTargets = listOf(\"react_codegen_mylib\"),\n    )\n\n    val moduleRoot = File(tempDir, \"mymodule\")\n    val sanitized = entry.sanitizedPath(moduleRoot)\n\n    // Should preserve absolute path (but canonicalize it)\n    assertThat(File(sanitized).isAbsolute).isTrue\n  }\n\n  @Test\n  fun `toCMakeCommand generates correct add_subdirectory command with existence check`() {\n    val entry = CMakeEntry(\n      sourcePath = \"android\",\n      buildDirName = \"mylib_autolinked_build\",\n      libraryTargets = listOf(\"react_codegen_mylib\"),\n    )\n\n    val moduleRoot = File(tempDir, \"mymodule\")\n    moduleRoot.mkdirs()\n    File(moduleRoot, \"android\").mkdirs()\n\n    val command = entry.toCMakeCommand(moduleRoot)\n\n    // Should wrap with if(EXISTS ...) to handle clean scenarios\n    assertThat(command).startsWith(\"if(EXISTS \\\"\")\n    assertThat(command).contains(\"add_subdirectory(\\\"\")\n    assertThat(command).contains(\"mylib_autolinked_build\")\n    assertThat(command).endsWith(\"endif()\")\n  }\n\n  @Test\n  fun `toCMakeCommand uses unique build directory name`() {\n    val entry1 = CMakeEntry(\n      sourcePath = \"android\",\n      buildDirName = \"lib1_autolinked_build\",\n      libraryTargets = listOf(\"react_codegen_lib1\"),\n    )\n\n    val entry2 = CMakeEntry(\n      sourcePath = \"android\",\n      buildDirName = \"lib2_autolinked_build\",\n      libraryTargets = listOf(\"react_codegen_lib2\"),\n    )\n\n    val moduleRoot = File(tempDir, \"mymodule\")\n    moduleRoot.mkdirs()\n    File(moduleRoot, \"android\").mkdirs()\n\n    val command1 = entry1.toCMakeCommand(moduleRoot)\n    val command2 = entry2.toCMakeCommand(moduleRoot)\n\n    // Build directory names should be unique\n    assertThat(command1).contains(\"lib1_autolinked_build\")\n    assertThat(command2).contains(\"lib2_autolinked_build\")\n    assertThat(command1).isNotEqualTo(command2)\n  }\n\n  @Test\n  fun `toCMakeCommand quotes path correctly`() {\n    val entry = CMakeEntry(\n      sourcePath = \"android/path with spaces\",\n      buildDirName = \"mylib_build\",\n      libraryTargets = listOf(\"react_codegen_mylib\"),\n    )\n\n    val moduleRoot = File(tempDir, \"mymodule\")\n    moduleRoot.mkdirs()\n    File(moduleRoot, \"android\").mkdirs()\n\n    val command = entry.toCMakeCommand(moduleRoot)\n\n    // Path should be quoted in both if(EXISTS) and add_subdirectory\n    assertThat(command).contains(\"if(EXISTS \\\"\")\n    assertThat(command).contains(\"add_subdirectory(\\\"\")\n  }\n\n  @Test\n  fun `libraryTargets can contain multiple targets`() {\n    val entry = CMakeEntry(\n      sourcePath = \"android\",\n      buildDirName = \"mylib_build\",\n      libraryTargets = listOf(\"react_codegen_mylib\", \"mylib_cxx\", \"mylib_fabric\"),\n    )\n\n    // Should store all targets\n    assertThat(entry.libraryTargets).hasSize(3)\n    assertThat(entry.libraryTargets).containsExactly(\n      \"react_codegen_mylib\",\n      \"mylib_cxx\",\n      \"mylib_fabric\",\n    )\n  }\n\n  @Test\n  fun `libraryTargets can be empty`() {\n    val entry = CMakeEntry(\n      sourcePath = \"android\",\n      buildDirName = \"mylib_build\",\n      libraryTargets = emptyList(),\n    )\n\n    assertThat(entry.libraryTargets).isEmpty()\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/models/NativeModuleTest.kt",
    "content": "package run.granite.gradle.models\n\nimport org.assertj.core.api.Assertions.assertThat\nimport org.assertj.core.api.Assertions.assertThatThrownBy\nimport org.junit.jupiter.api.Test\n\n/**\n * Unit tests for NativeModule core logic.\n * Tests validation, computed properties, and CMake entry generation.\n */\nclass NativeModuleTest {\n\n  @Test\n  fun `validates packageImportPath and packageInstance must both be present`() {\n    // Both present - should succeed\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = \"com.example.TestPackage\",\n      packageInstance = \"new TestPackage()\",\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.packageImportPath).isEqualTo(\"com.example.TestPackage\")\n    assertThat(module.packageInstance).isEqualTo(\"new TestPackage()\")\n  }\n\n  @Test\n  fun `validates packageImportPath and packageInstance must both be null`() {\n    // Both null - should succeed\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.packageImportPath).isNull()\n    assertThat(module.packageInstance).isNull()\n  }\n\n  @Test\n  fun `throws IllegalArgumentException when packageImportPath present but packageInstance null`() {\n    // Violation - should fail\n    assertThatThrownBy {\n      NativeModule(\n        name = \"test-module\",\n        packageImportPath = \"com.example.TestPackage\",\n        packageInstance = null,\n        dependencyConfiguration = null,\n        buildTypes = emptyList(),\n        libraryName = \"testlib\",\n        componentDescriptors = emptyList(),\n        cmakeListsPath = null,\n        cxxModuleCMakeListsPath = null,\n        cxxModuleCMakeListsModuleName = null,\n        cxxModuleHeaderName = null,\n        isPureCxxDependency = false,\n      )\n    }\n      .isInstanceOf(IllegalArgumentException::class.java)\n      .hasMessageContaining(\"test-module\")\n      .hasMessageContaining(\"packageImportPath and packageInstance\")\n      .hasMessageContaining(\"both be present or both be null\")\n  }\n\n  @Test\n  fun `throws IllegalArgumentException when packageInstance present but packageImportPath null`() {\n    // Violation - should fail\n    assertThatThrownBy {\n      NativeModule(\n        name = \"test-module\",\n        packageImportPath = null,\n        packageInstance = \"new TestPackage()\",\n        dependencyConfiguration = null,\n        buildTypes = emptyList(),\n        libraryName = \"testlib\",\n        componentDescriptors = emptyList(),\n        cmakeListsPath = null,\n        cxxModuleCMakeListsPath = null,\n        cxxModuleCMakeListsModuleName = null,\n        cxxModuleHeaderName = null,\n        isPureCxxDependency = false,\n      )\n    }\n      .isInstanceOf(IllegalArgumentException::class.java)\n      .hasMessageContaining(\"test-module\")\n  }\n\n  @Test\n  fun `hasJavaImplementation returns true when both packageImportPath and packageInstance present`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = \"com.example.TestPackage\",\n      packageInstance = \"new TestPackage()\",\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.hasJavaImplementation).isTrue\n  }\n\n  @Test\n  fun `hasJavaImplementation returns false when both are null`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.hasJavaImplementation).isFalse\n  }\n\n  @Test\n  fun `hasCxxImplementation returns true when cxxModuleHeaderName present`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = \"TestModule\",\n      isPureCxxDependency = true,\n    )\n\n    assertThat(module.hasCxxImplementation).isTrue\n  }\n\n  @Test\n  fun `hasCxxImplementation returns false when cxxModuleHeaderName null`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.hasCxxImplementation).isFalse\n  }\n\n  @Test\n  fun `hasFabricComponents returns true when componentDescriptors not empty`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = listOf(\"MyComponent\", \"AnotherComponent\"),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.hasFabricComponents).isTrue\n  }\n\n  @Test\n  fun `hasFabricComponents returns false when componentDescriptors empty`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.hasFabricComponents).isFalse\n  }\n\n  @Test\n  fun `hasCMakeConfiguration returns true when cmakeListsPath present`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = \"android/CMakeLists.txt\",\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.hasCMakeConfiguration).isTrue\n  }\n\n  @Test\n  fun `hasCMakeConfiguration returns true when cxxModuleCMakeListsPath present`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = \"android/cxx/CMakeLists.txt\",\n      cxxModuleCMakeListsModuleName = \"testmodule_cxx\",\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.hasCMakeConfiguration).isTrue\n  }\n\n  @Test\n  fun `hasCMakeConfiguration returns false when both paths null`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.hasCMakeConfiguration).isFalse\n  }\n\n  @Test\n  fun `needsCppAutolinking returns true when hasCxxImplementation`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = \"TestModule\",\n      isPureCxxDependency = true,\n    )\n\n    assertThat(module.needsCppAutolinking).isTrue\n  }\n\n  @Test\n  fun `needsCppAutolinking returns true when hasFabricComponents`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = listOf(\"MyComponent\"),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.needsCppAutolinking).isTrue\n  }\n\n  @Test\n  fun `needsCppAutolinking returns false when neither C++ nor Fabric`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = \"com.example.TestPackage\",\n      packageInstance = \"new TestPackage()\",\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.needsCppAutolinking).isFalse\n  }\n\n  @Test\n  fun `sanitizedName replaces spaces with underscores`() {\n    // / C++ identifier sanitization\n    val module = NativeModule(\n      name = \"my test module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.sanitizedName()).isEqualTo(\"my_test_module\")\n  }\n\n  @Test\n  fun `sanitizedName replaces hyphens with underscores`() {\n    // C++ identifier sanitization\n    val module = NativeModule(\n      name = \"react-native-webview\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.sanitizedName()).isEqualTo(\"react_native_webview\")\n  }\n\n  @Test\n  fun `sanitizedName replaces special characters with underscores`() {\n    // C++ identifier sanitization\n    val module = NativeModule(\n      name = \"module@2.0-beta!\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    assertThat(module.sanitizedName()).isEqualTo(\"module_2_0_beta_\")\n  }\n\n  @Test\n  fun `cmakeEntries returns empty list when no CMake configuration`() {\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    val entries = module.cmakeEntries()\n\n    assertThat(entries).isEmpty()\n  }\n\n  @Test\n  fun `cmakeEntries returns one entry when only standard CMakeLists txt`() {\n    // Handle standard CMakeLists.txt\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = \"android/CMakeLists.txt\",\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    val entries = module.cmakeEntries()\n\n    assertThat(entries).hasSize(1)\n    assertThat(entries[0].sourcePath).isEqualTo(\"android/CMakeLists.txt\")\n    assertThat(entries[0].buildDirName).isEqualTo(\"testlib_autolinked_build\")\n    assertThat(entries[0].libraryTargets).containsExactly(\"react_codegen_testlib\")\n  }\n\n  @Test\n  fun `cmakeEntries returns one entry when only cxxModule CMakeLists txt`() {\n    // Handle cxxModule CMakeLists.txt\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = \"android/cxx/CMakeLists.txt\",\n      cxxModuleCMakeListsModuleName = \"testmodule_cxx\",\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    val entries = module.cmakeEntries()\n\n    assertThat(entries).hasSize(1)\n    assertThat(entries[0].sourcePath).isEqualTo(\"android/cxx/CMakeLists.txt\")\n    assertThat(entries[0].buildDirName).isEqualTo(\"testlib_cxx_autolinked_build\")\n    assertThat(entries[0].libraryTargets).containsExactly(\"testmodule_cxx\")\n  }\n\n  @Test\n  fun `cmakeEntries returns two entries when both CMakeLists txt present`() {\n    // Handle both standard and cxxModule CMakeLists.txt\n    val module = NativeModule(\n      name = \"test-module\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = emptyList(),\n      libraryName = \"testlib\",\n      componentDescriptors = emptyList(),\n      cmakeListsPath = \"android/CMakeLists.txt\",\n      cxxModuleCMakeListsPath = \"android/cxx/CMakeLists.txt\",\n      cxxModuleCMakeListsModuleName = \"testmodule_cxx\",\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    val entries = module.cmakeEntries()\n\n    assertThat(entries).hasSize(2)\n    // First entry: standard CMakeLists.txt\n    assertThat(entries[0].sourcePath).isEqualTo(\"android/CMakeLists.txt\")\n    assertThat(entries[0].buildDirName).isEqualTo(\"testlib_autolinked_build\")\n    // Second entry: cxxModule CMakeLists.txt\n    assertThat(entries[1].sourcePath).isEqualTo(\"android/cxx/CMakeLists.txt\")\n    assertThat(entries[1].buildDirName).isEqualTo(\"testlib_cxx_autolinked_build\")\n  }\n\n  @Test\n  fun `from factory method creates module from AndroidDependencyConfig`() {\n    // Treat null and missing fields identically\n    val config = AndroidDependencyConfig(\n      sourceDir = \"android\",\n      packageImportPath = \"com.example.TestPackage\",\n      packageInstance = \"new TestPackage()\",\n      dependencyConfiguration = null,\n      buildTypes = listOf(\"debug\", \"release\"),\n      libraryName = \"testlib\",\n      componentDescriptors = listOf(\"MyComponent\"),\n      cmakeListsPath = \"android/CMakeLists.txt\",\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = null, // null treated as false\n    )\n\n    val module = NativeModule.from(\"test-module\", config)\n\n    assertThat(module.name).isEqualTo(\"test-module\")\n    assertThat(module.packageImportPath).isEqualTo(\"com.example.TestPackage\")\n    assertThat(module.packageInstance).isEqualTo(\"new TestPackage()\")\n    assertThat(module.libraryName).isEqualTo(\"testlib\")\n    assertThat(module.componentDescriptors).containsExactly(\"MyComponent\")\n    assertThat(module.cmakeListsPath).isEqualTo(\"android/CMakeLists.txt\")\n    assertThat(module.isPureCxxDependency).isFalse // null becomes false\n  }\n\n  @Test\n  fun `from factory method treats null componentDescriptors as empty list`() {\n    // Null treated as absent\n    val config = AndroidDependencyConfig(\n      sourceDir = \"android\",\n      packageImportPath = null,\n      packageInstance = null,\n      dependencyConfiguration = null,\n      buildTypes = null,\n      libraryName = \"testlib\",\n      componentDescriptors = null, // null\n      cmakeListsPath = null,\n      cxxModuleCMakeListsPath = null,\n      cxxModuleCMakeListsModuleName = null,\n      cxxModuleHeaderName = null,\n      isPureCxxDependency = false,\n    )\n\n    val module = NativeModule.from(\"test-module\", config)\n\n    assertThat(module.componentDescriptors).isEmpty()\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/tasks/AssetPackagingTaskTest.kt",
    "content": "package run.granite.gradle.tasks\n\nimport org.assertj.core.api.Assertions.assertThat\nimport org.junit.jupiter.api.Test\nimport org.junit.jupiter.api.io.TempDir\nimport run.granite.gradle.utils.createTestFile\nimport run.granite.gradle.utils.createTestTask\nimport run.granite.gradle.utils.readFileContent\nimport java.io.File\nimport java.util.zip.GZIPInputStream\n\n/**\n * Unit tests for AssetPackagingTask.\n *\n * Tests asset packaging and compression logic by executing the actual task.\n */\nclass AssetPackagingTaskTest {\n\n  @TempDir\n  lateinit var tempDir: File\n\n  @Test\n  fun `task is cacheable`() {\n    val annotations = AssetPackagingTask::class.annotations\n    assertThat(annotations)\n      .anyMatch { it.annotationClass.simpleName == \"CacheableTask\" }\n  }\n\n  @Test\n  fun `task has correct group and description`() {\n    val task = createTestTask<AssetPackagingTask>()\n\n    assertThat(task.group).isEqualTo(\"granite\")\n    assertThat(task.description).isEqualTo(\"Packages React Native assets and bundles\")\n  }\n\n  @Test\n  fun `packageBundle copies uncompressed bundle when compression disabled`() {\n    // Create test bundle file\n    val bundleContent = \"// React Native bundle\\nvar __BUNDLE_START_TIME__=Date.now();\"\n    val bundleFile = createTestFile(tempDir, \"index.android.bundle\", bundleContent)\n\n    val outputDir = File(tempDir, \"output/assets\")\n    val outputFile = File(outputDir, \"index.android.bundle\")\n\n    val task = createTestTask<AssetPackagingTask> {\n      it.bundleFile.set(bundleFile)\n      it.outputAssetsDir.set(outputDir)\n      it.bundleAssetName.set(\"index.android.bundle\")\n      it.compressionEnabled.set(false)\n      it.variantName.set(\"release\")\n    }\n\n    task.execute()\n\n    // Verify uncompressed bundle was copied\n    assertThat(outputFile).exists()\n    assertThat(readFileContent(outputFile)).isEqualTo(bundleContent)\n\n    // Verify no gzipped file was created\n    assertThat(File(outputDir, \"index.android.bundle.gz\")).doesNotExist()\n  }\n\n  @Test\n  fun `packageBundle creates gzipped bundle when compression enabled`() {\n    // Create test bundle file\n    val bundleContent = \"// React Native bundle\\nvar __BUNDLE_START_TIME__=Date.now();\"\n    val bundleFile = createTestFile(tempDir, \"index.android.hbc\", bundleContent)\n\n    val outputDir = File(tempDir, \"output/assets\")\n    val compressedFile = File(outputDir, \"index.android.hbc.gz\")\n\n    val task = createTestTask<AssetPackagingTask> {\n      it.bundleFile.set(bundleFile)\n      it.outputAssetsDir.set(outputDir)\n      it.bundleAssetName.set(\"index.android.hbc\")\n      it.compressionEnabled.set(true)\n      it.variantName.set(\"release\")\n    }\n\n    task.execute()\n\n    // Verify gzipped bundle was created\n    assertThat(compressedFile).exists()\n\n    // Verify content can be decompressed\n    val decompressed = GZIPInputStream(compressedFile.inputStream()).use {\n      it.readBytes().toString(Charsets.UTF_8)\n    }\n    assertThat(decompressed).isEqualTo(bundleContent)\n  }\n\n  @Test\n  fun `packageBundle handles Hermes bytecode files`() {\n    // Create test Hermes bytecode file (simulated)\n    val hbcContent = ByteArray(100) { it.toByte() } // Fake bytecode\n    val bundleFile = File(tempDir, \"index.android.hbc\")\n    bundleFile.writeBytes(hbcContent)\n\n    val outputDir = File(tempDir, \"output/assets\")\n    val outputFile = File(outputDir, \"index.android.hbc\")\n\n    val task = createTestTask<AssetPackagingTask> {\n      it.bundleFile.set(bundleFile)\n      it.outputAssetsDir.set(outputDir)\n      it.bundleAssetName.set(\"index.android.hbc\")\n      it.compressionEnabled.set(false)\n      it.variantName.set(\"release\")\n    }\n\n    task.execute()\n\n    assertThat(outputFile).exists()\n    assertThat(outputFile.readBytes()).isEqualTo(hbcContent)\n  }\n\n  @Test\n  fun `packageDrawableAssets copies single drawable directory`() {\n    // Create drawable assets\n    val assetsDir = File(tempDir, \"assets\")\n    val drawableMdpi = File(assetsDir, \"drawable-mdpi\")\n    createTestFile(drawableMdpi, \"icon.png\", \"fake png content\")\n\n    val outputResDir = File(tempDir, \"output/res\")\n    val bundleFile = createTestFile(tempDir, \"bundle.js\", \"fake\")\n\n    val task = createTestTask<AssetPackagingTask> {\n      it.bundleFile.set(bundleFile)\n      it.assetsDir.set(assetsDir)\n      it.outputAssetsDir.set(File(tempDir, \"output/assets\"))\n      it.outputResDir.set(outputResDir)\n      it.bundleAssetName.set(\"index.android.bundle\")\n      it.compressionEnabled.set(false)\n      it.variantName.set(\"release\")\n    }\n\n    task.execute()\n\n    // Verify drawable was copied\n    val copiedDrawable = File(outputResDir, \"drawable-mdpi/icon.png\")\n    assertThat(copiedDrawable).exists()\n    assertThat(readFileContent(copiedDrawable)).isEqualTo(\"fake png content\")\n  }\n\n  @Test\n  fun `packageDrawableAssets copies multiple drawable densities`() {\n    // Create multiple drawable density directories\n    val assetsDir = File(tempDir, \"assets\")\n    val densities = listOf(\"mdpi\", \"hdpi\", \"xhdpi\", \"xxhdpi\", \"xxxhdpi\")\n\n    for (density in densities) {\n      val drawableDir = File(assetsDir, \"drawable-$density\")\n      createTestFile(drawableDir, \"icon.png\", \"icon for $density\")\n      createTestFile(drawableDir, \"logo.png\", \"logo for $density\")\n    }\n\n    val outputResDir = File(tempDir, \"output/res\")\n    val bundleFile = createTestFile(tempDir, \"bundle.js\", \"fake\")\n\n    val task = createTestTask<AssetPackagingTask> {\n      it.bundleFile.set(bundleFile)\n      it.assetsDir.set(assetsDir)\n      it.outputAssetsDir.set(File(tempDir, \"output/assets\"))\n      it.outputResDir.set(outputResDir)\n      it.bundleAssetName.set(\"index.android.bundle\")\n      it.compressionEnabled.set(false)\n      it.variantName.set(\"release\")\n    }\n\n    task.execute()\n\n    // Verify all densities were copied\n    for (density in densities) {\n      val iconFile = File(outputResDir, \"drawable-$density/icon.png\")\n      val logoFile = File(outputResDir, \"drawable-$density/logo.png\")\n\n      assertThat(iconFile).exists()\n      assertThat(logoFile).exists()\n      assertThat(readFileContent(iconFile)).isEqualTo(\"icon for $density\")\n      assertThat(readFileContent(logoFile)).isEqualTo(\"logo for $density\")\n    }\n  }\n\n  @Test\n  fun `packageDrawableAssets handles nested subdirectories`() {\n    // Create drawable with nested structure\n    val assetsDir = File(tempDir, \"assets\")\n    val drawableXhdpi = File(assetsDir, \"drawable-xhdpi\")\n    createTestFile(File(drawableXhdpi, \"icons\"), \"app_icon.png\", \"nested icon\")\n\n    val outputResDir = File(tempDir, \"output/res\")\n    val bundleFile = createTestFile(tempDir, \"bundle.js\", \"fake\")\n\n    val task = createTestTask<AssetPackagingTask> {\n      it.bundleFile.set(bundleFile)\n      it.assetsDir.set(assetsDir)\n      it.outputAssetsDir.set(File(tempDir, \"output/assets\"))\n      it.outputResDir.set(outputResDir)\n      it.bundleAssetName.set(\"index.android.bundle\")\n      it.compressionEnabled.set(false)\n      it.variantName.set(\"release\")\n    }\n\n    task.execute()\n\n    // Verify nested file was copied with same structure\n    val copiedNestedFile = File(outputResDir, \"drawable-xhdpi/icons/app_icon.png\")\n    assertThat(copiedNestedFile).exists()\n    assertThat(readFileContent(copiedNestedFile)).isEqualTo(\"nested icon\")\n  }\n\n  @Test\n  fun `packageDrawableAssets handles no assets directory`() {\n    // Don't set assetsDir (optional)\n    val outputAssetsDir = File(tempDir, \"output/assets\")\n    val bundleFile = createTestFile(tempDir, \"bundle.js\", \"fake\")\n\n    val task = createTestTask<AssetPackagingTask> {\n      it.bundleFile.set(bundleFile)\n      // assetsDir not set\n      it.outputAssetsDir.set(outputAssetsDir)\n      // outputResDir not set\n      it.bundleAssetName.set(\"index.android.bundle\")\n      it.compressionEnabled.set(false)\n      it.variantName.set(\"release\")\n    }\n\n    // Should not throw\n    task.execute()\n\n    // Only bundle should be packaged\n    assertThat(File(outputAssetsDir, \"index.android.bundle\")).exists()\n  }\n\n  @Test\n  fun `packageDrawableAssets handles empty assets directory`() {\n    // Create empty assets directory\n    val assetsDir = File(tempDir, \"assets\")\n    assetsDir.mkdirs()\n\n    val outputResDir = File(tempDir, \"output/res\")\n    val bundleFile = createTestFile(tempDir, \"bundle.js\", \"fake\")\n\n    val task = createTestTask<AssetPackagingTask> {\n      it.bundleFile.set(bundleFile)\n      it.assetsDir.set(assetsDir)\n      it.outputAssetsDir.set(File(tempDir, \"output/assets\"))\n      it.outputResDir.set(outputResDir)\n      it.bundleAssetName.set(\"index.android.bundle\")\n      it.compressionEnabled.set(false)\n      it.variantName.set(\"release\")\n    }\n\n    // Should not throw\n    task.execute()\n\n    // res directory may be created but empty\n    if (outputResDir.exists()) {\n      assertThat(outputResDir.listFiles()).isEmpty()\n    }\n  }\n\n  @Test\n  fun `task packages both bundle and drawables together`() {\n    // Create bundle and drawables\n    val bundleContent = \"// React Native bundle\"\n    val bundleFile = createTestFile(tempDir, \"index.android.bundle\", bundleContent)\n\n    val assetsDir = File(tempDir, \"assets\")\n    createTestFile(File(assetsDir, \"drawable-mdpi\"), \"icon.png\", \"mdpi icon\")\n    createTestFile(File(assetsDir, \"drawable-hdpi\"), \"icon.png\", \"hdpi icon\")\n\n    val outputAssetsDir = File(tempDir, \"output/assets\")\n    val outputResDir = File(tempDir, \"output/res\")\n\n    val task = createTestTask<AssetPackagingTask> {\n      it.bundleFile.set(bundleFile)\n      it.assetsDir.set(assetsDir)\n      it.outputAssetsDir.set(outputAssetsDir)\n      it.outputResDir.set(outputResDir)\n      it.bundleAssetName.set(\"index.android.bundle\")\n      it.compressionEnabled.set(false)\n      it.variantName.set(\"release\")\n    }\n\n    task.execute()\n\n    // Verify both bundle and drawables were packaged\n    assertThat(File(outputAssetsDir, \"index.android.bundle\")).exists()\n    assertThat(File(outputResDir, \"drawable-mdpi/icon.png\")).exists()\n    assertThat(File(outputResDir, \"drawable-hdpi/icon.png\")).exists()\n  }\n\n  @Test\n  fun `gzip compression actually reduces file size for text bundles`() {\n    // Create large repetitive text bundle (compresses well)\n    val bundleContent = \"var x = 'test';\\n\".repeat(1000)\n    val bundleFile = createTestFile(tempDir, \"large.bundle\", bundleContent)\n\n    val outputDir = File(tempDir, \"output/assets\")\n\n    val task = createTestTask<AssetPackagingTask> {\n      it.bundleFile.set(bundleFile)\n      it.outputAssetsDir.set(outputDir)\n      it.bundleAssetName.set(\"large.bundle\")\n      it.compressionEnabled.set(true)\n      it.variantName.set(\"release\")\n    }\n\n    task.execute()\n\n    val compressedFile = File(outputDir, \"large.bundle.gz\")\n    assertThat(compressedFile).exists()\n\n    // Compressed file should be smaller than original\n    assertThat(compressedFile.length()).isLessThan(bundleFile.length())\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/tasks/AutolinkingTaskTest.kt",
    "content": "package run.granite.gradle.tasks\n\nimport org.assertj.core.api.Assertions.assertThat\nimport org.junit.jupiter.api.Test\nimport run.granite.gradle.fixtures.NativeModuleFixtures\nimport run.granite.gradle.generators.CppAutolinkingGenerator\n\n/**\n * Unit tests for AutolinkingTask.\n *\n * Tests PackageList.kt generation logic and configuration.\n *\n * Note: Full integration testing (actual CLI execution) requires Node.js and\n * React Native CLI, so is done separately. These tests focus on task structure validation.\n */\nclass AutolinkingTaskTest {\n\n  @Test\n  fun `task is cacheable`() {\n    val annotations = AutolinkingTask::class.annotations\n    assertThat(annotations)\n      .anyMatch { it.annotationClass.simpleName == \"CacheableTask\" }\n  }\n\n  @Test\n  fun `task has all required properties`() {\n    val propertyNames = AutolinkingTask::class.members\n      .filter {\n        it.name.endsWith(\"File\") || it.name.endsWith(\"Dir\") ||\n          it.name == \"packageName\"\n      }\n      .map { it.name }\n      .toSet()\n\n    assertThat(propertyNames).contains(\"reactNativeDir\")\n    assertThat(propertyNames).contains(\"nodeModulesDir\")\n    assertThat(propertyNames).contains(\"projectDir\")\n    assertThat(propertyNames).contains(\"outputDir\")\n    assertThat(propertyNames).contains(\"packageListFile\")\n    assertThat(propertyNames).contains(\"packageName\")\n  }\n\n  @Test\n  fun `task has execute method`() {\n    val executeMethods = AutolinkingTask::class.members\n      .filter { it.name == \"execute\" }\n\n    assertThat(executeMethods).isNotEmpty\n  }\n\n  @Test\n  fun `task class is abstract`() {\n    assertThat(AutolinkingTask::class.isAbstract).isTrue\n  }\n\n  @Test\n  fun `autolinking filters modules by includesGeneratedCode flag`() {\n    // Create mixed modules: one standard, one with custom codegen\n    val modules = NativeModuleFixtures.createMixedModules()\n\n    // Simulate the filtering logic from AutolinkingTask\n    val filteredModules = modules.filter { !it.includesGeneratedCode }\n\n    // Standard module should be included\n    assertThat(filteredModules).anyMatch { it.name == \"react-native-example\" }\n\n    // Custom codegen module should be excluded\n    assertThat(filteredModules).noneMatch { it.name == \"custom-codegen-module\" }\n\n    assertThat(filteredModules).hasSize(1)\n  }\n\n  @Test\n  fun `generated autolinking excludes modules with includesGeneratedCode flag`() {\n    // Filtering by includesGeneratedCode is the caller's responsibility (AutolinkingTask),\n    // not the generator's. Test that pre-filtered input produces correct output.\n    val allModules = NativeModuleFixtures.createMixedModules()\n    val filteredModules = allModules.filter { !it.includesGeneratedCode }\n\n    val generatedCpp = CppAutolinkingGenerator.generate(filteredModules)\n\n    // Custom codegen module should be excluded after filtering\n    assertThat(generatedCpp).doesNotContain(\"CustomCodegenSpec_ModuleProvider\")\n    assertThat(generatedCpp).doesNotContain(\"custom_codegen_module\")\n\n    // Standard module should still be included\n    assertThat(generatedCpp).contains(\"ExampleSpec_ModuleProvider\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/tasks/BundleTaskTest.kt",
    "content": "package run.granite.gradle.tasks\n\nimport org.assertj.core.api.Assertions.assertThat\nimport org.junit.jupiter.api.Test\n\n/**\n * Unit tests for BundleTask.\n *\n * Tests JavaScript bundling and Hermes compilation logic structure.\n *\n * Note: Full integration testing (actual Metro/Hermes execution) requires\n * Node.js, React Native CLI, and Hermes compiler, so is done separately.\n * These tests focus on task structure validation.\n */\nclass BundleTaskTest {\n\n  @Test\n  fun `task is cacheable`() {\n    val annotations = BundleTask::class.annotations\n    assertThat(annotations)\n      .anyMatch { it.annotationClass.simpleName == \"CacheableTask\" }\n  }\n\n  @Test\n  fun `task has all required properties`() {\n    val propertyNames = BundleTask::class.members\n      .filter {\n        it.name.endsWith(\"File\") || it.name.endsWith(\"Dir\") ||\n          it.name == \"devMode\" ||\n          it.name == \"bundleAssetName\" || it.name == \"variantName\"\n      }\n      .map { it.name }\n      .toSet()\n\n    assertThat(propertyNames).contains(\"entryFile\")\n    assertThat(propertyNames).contains(\"reactNativeDir\")\n    assertThat(propertyNames).contains(\"nodeModulesDir\")\n    assertThat(propertyNames).contains(\"projectDir\")\n    assertThat(propertyNames).contains(\"bundleFile\")\n    assertThat(propertyNames).contains(\"sourceMapFile\")\n    assertThat(propertyNames).contains(\"bundleAssetName\")\n    assertThat(propertyNames).contains(\"devMode\")\n    assertThat(propertyNames).contains(\"variantName\")\n  }\n\n  @Test\n  fun `task has execute method`() {\n    val executeMethods = BundleTask::class.members\n      .filter { it.name == \"execute\" }\n\n    assertThat(executeMethods).isNotEmpty\n  }\n\n  @Test\n  fun `task class is abstract`() {\n    assertThat(BundleTask::class.isAbstract).isTrue\n  }\n\n  @Test\n  fun `task has private helper methods`() {\n    val privateMembers = BundleTask::class.members\n      .map { it.name }\n      .toSet()\n\n    // Execute method orchestrates the bundling process\n    assertThat(privateMembers).contains(\"execute\")\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/tasks/CodegenTasksTest.kt",
    "content": "package run.granite.gradle.tasks\n\nimport com.google.gson.Gson\nimport com.google.gson.JsonObject\nimport org.assertj.core.api.Assertions.assertThat\nimport org.junit.jupiter.api.Test\nimport org.junit.jupiter.api.io.TempDir\nimport run.granite.gradle.utils.createTestFile\nimport run.granite.gradle.utils.createTestTask\nimport run.granite.gradle.utils.readFileContent\nimport java.io.File\n\n/**\n * Unit tests for Codegen tasks (Schema and Artifacts).\n *\n * Tests schema generation and artifact generation for TurboModules and Fabric components.\n */\nclass CodegenTasksTest {\n\n  @TempDir\n  lateinit var tempDir: File\n\n  // ========== CodegenSchemaTask Tests ==========\n\n  @Test\n  fun `CodegenSchemaTask is cacheable`() {\n    val annotations = CodegenSchemaTask::class.annotations\n    assertThat(annotations)\n      .anyMatch { it.annotationClass.simpleName == \"CacheableTask\" }\n  }\n\n  @Test\n  fun `CodegenSchemaTask has correct group and description`() {\n    val task = createTestTask<CodegenSchemaTask>()\n\n    assertThat(task.group).isEqualTo(\"granite\")\n    assertThat(task.description).isEqualTo(\"Scans JavaScript sources and generates React Native Codegen schema\")\n  }\n\n  @Test\n  fun `scanForSpecFiles finds TurboModule specs with Native prefix`() {\n    // Create TurboModule spec files\n    val jsSourceDir = File(tempDir, \"src\")\n    createTestFile(jsSourceDir, \"NativeSampleModule.js\", \"// TurboModule spec\")\n    createTestFile(jsSourceDir, \"NativeTestModule.ts\", \"// TurboModule spec\")\n    createTestFile(jsSourceDir, \"NativeExample.tsx\", \"// TurboModule spec\")\n\n    // Create non-spec files (should be ignored)\n    createTestFile(jsSourceDir, \"Component.js\", \"// Regular component\")\n    createTestFile(jsSourceDir, \"utils.ts\", \"// Utility file\")\n\n    val outputDir = File(tempDir, \"output\")\n    val schemaFile = File(outputDir, \"schema.json\")\n    val reactNativeDir = File(tempDir, \"react-native\").apply { mkdirs() }\n    val nodeModulesDir = File(tempDir, \"node_modules\").apply { mkdirs() }\n\n    val task = createTestTask<CodegenSchemaTask> {\n      it.jsSourceDirs.set(listOf(jsSourceDir))\n      it.reactNativeDir.set(reactNativeDir)\n      it.nodeModulesDir.set(nodeModulesDir)\n      it.outputDir.set(outputDir)\n      it.schemaFile.set(schemaFile)\n    }\n\n    task.execute()\n\n    // Verify schema was generated\n    assertThat(schemaFile).exists()\n\n    val schema = Gson().fromJson(readFileContent(schemaFile), JsonObject::class.java)\n    val modules = schema.getAsJsonObject(\"modules\")\n\n    // Should find 3 TurboModule specs\n    assertThat(modules.has(\"NativeSampleModule\")).isTrue\n    assertThat(modules.has(\"NativeTestModule\")).isTrue\n    assertThat(modules.has(\"NativeExample\")).isTrue\n\n    // Should NOT find non-spec files\n    assertThat(modules.has(\"Component\")).isFalse\n    assertThat(modules.has(\"utils\")).isFalse\n  }\n\n  @Test\n  fun `scanForSpecFiles finds Fabric component specs with NativeComponent suffix`() {\n    // Create Fabric component spec files\n    val jsSourceDir = File(tempDir, \"src\")\n    createTestFile(jsSourceDir, \"MyViewNativeComponent.js\", \"// Fabric component\")\n    createTestFile(jsSourceDir, \"CustomButtonNativeComponent.ts\", \"// Fabric component\")\n\n    val outputDir = File(tempDir, \"output\")\n    val schemaFile = File(outputDir, \"schema.json\")\n    val reactNativeDir = File(tempDir, \"react-native\").apply { mkdirs() }\n    val nodeModulesDir = File(tempDir, \"node_modules\").apply { mkdirs() }\n\n    val task = createTestTask<CodegenSchemaTask> {\n      it.jsSourceDirs.set(listOf(jsSourceDir))\n      it.reactNativeDir.set(reactNativeDir)\n      it.nodeModulesDir.set(nodeModulesDir)\n      it.outputDir.set(outputDir)\n      it.schemaFile.set(schemaFile)\n    }\n\n    task.execute()\n\n    val schema = Gson().fromJson(readFileContent(schemaFile), JsonObject::class.java)\n    val modules = schema.getAsJsonObject(\"modules\")\n\n    assertThat(modules.has(\"MyViewNativeComponent\")).isTrue\n    assertThat(modules.has(\"CustomButtonNativeComponent\")).isTrue\n  }\n\n  @Test\n  fun `scanForSpecFiles handles nested directory structure`() {\n    // Create nested directory structure\n    val jsSourceDir = File(tempDir, \"src\")\n    createTestFile(File(jsSourceDir, \"modules/auth\"), \"NativeAuthModule.ts\", \"// Auth module\")\n    createTestFile(File(jsSourceDir, \"components/views\"), \"ImageViewNativeComponent.js\", \"// Image view\")\n    createTestFile(File(jsSourceDir, \"deep/nested/path\"), \"NativeUtilsModule.tsx\", \"// Utils\")\n\n    val outputDir = File(tempDir, \"output\")\n    val schemaFile = File(outputDir, \"schema.json\")\n    val reactNativeDir = File(tempDir, \"react-native\").apply { mkdirs() }\n    val nodeModulesDir = File(tempDir, \"node_modules\").apply { mkdirs() }\n\n    val task = createTestTask<CodegenSchemaTask> {\n      it.jsSourceDirs.set(listOf(jsSourceDir))\n      it.reactNativeDir.set(reactNativeDir)\n      it.nodeModulesDir.set(nodeModulesDir)\n      it.outputDir.set(outputDir)\n      it.schemaFile.set(schemaFile)\n    }\n\n    task.execute()\n\n    val schema = Gson().fromJson(readFileContent(schemaFile), JsonObject::class.java)\n    val modules = schema.getAsJsonObject(\"modules\")\n\n    // Should find all nested spec files\n    assertThat(modules.has(\"NativeAuthModule\")).isTrue\n    assertThat(modules.has(\"ImageViewNativeComponent\")).isTrue\n    assertThat(modules.has(\"NativeUtilsModule\")).isTrue\n  }\n\n  @Test\n  fun `scanForSpecFiles handles multiple source directories`() {\n    // Create multiple source directories\n    val srcDir1 = File(tempDir, \"src1\")\n    val srcDir2 = File(tempDir, \"src2\")\n    val srcDir3 = File(tempDir, \"src3\")\n\n    createTestFile(srcDir1, \"NativeModule1.js\", \"// Module 1\")\n    createTestFile(srcDir2, \"NativeModule2.ts\", \"// Module 2\")\n    createTestFile(srcDir3, \"NativeModule3.tsx\", \"// Module 3\")\n\n    val outputDir = File(tempDir, \"output\")\n    val schemaFile = File(outputDir, \"schema.json\")\n    val reactNativeDir = File(tempDir, \"react-native\").apply { mkdirs() }\n    val nodeModulesDir = File(tempDir, \"node_modules\").apply { mkdirs() }\n\n    val task = createTestTask<CodegenSchemaTask> {\n      it.jsSourceDirs.set(listOf(srcDir1, srcDir2, srcDir3))\n      it.reactNativeDir.set(reactNativeDir)\n      it.nodeModulesDir.set(nodeModulesDir)\n      it.outputDir.set(outputDir)\n      it.schemaFile.set(schemaFile)\n    }\n\n    task.execute()\n\n    val schema = Gson().fromJson(readFileContent(schemaFile), JsonObject::class.java)\n    val modules = schema.getAsJsonObject(\"modules\")\n\n    // Should find modules from all source directories\n    assertThat(modules.size()).isEqualTo(3)\n    assertThat(modules.has(\"NativeModule1\")).isTrue\n    assertThat(modules.has(\"NativeModule2\")).isTrue\n    assertThat(modules.has(\"NativeModule3\")).isTrue\n  }\n\n  @Test\n  fun `generateSchema creates empty schema when no spec files found`() {\n    // Create empty source directory\n    val jsSourceDir = File(tempDir, \"src\").apply { mkdirs() }\n    createTestFile(jsSourceDir, \"Component.js\", \"// Regular component\")\n    createTestFile(jsSourceDir, \"utils.ts\", \"// Utils\")\n\n    val outputDir = File(tempDir, \"output\")\n    val schemaFile = File(outputDir, \"schema.json\")\n    val reactNativeDir = File(tempDir, \"react-native\").apply { mkdirs() }\n    val nodeModulesDir = File(tempDir, \"node_modules\").apply { mkdirs() }\n\n    val task = createTestTask<CodegenSchemaTask> {\n      it.jsSourceDirs.set(listOf(jsSourceDir))\n      it.reactNativeDir.set(reactNativeDir)\n      it.nodeModulesDir.set(nodeModulesDir)\n      it.outputDir.set(outputDir)\n      it.schemaFile.set(schemaFile)\n    }\n\n    task.execute()\n\n    // Should create empty schema\n    assertThat(schemaFile).exists()\n\n    val schema = Gson().fromJson(readFileContent(schemaFile), JsonObject::class.java)\n    assertThat(schema.has(\"version\")).isTrue\n    assertThat(schema.has(\"modules\")).isTrue\n\n    val modules = schema.getAsJsonObject(\"modules\")\n    assertThat(modules.size()).isEqualTo(0)\n  }\n\n  @Test\n  fun `generateSchema includes version and module metadata`() {\n    val jsSourceDir = File(tempDir, \"src\")\n    createTestFile(jsSourceDir, \"NativeSampleModule.ts\", \"// TurboModule\")\n\n    val outputDir = File(tempDir, \"output\")\n    val schemaFile = File(outputDir, \"schema.json\")\n    val reactNativeDir = File(tempDir, \"react-native\").apply { mkdirs() }\n    val nodeModulesDir = File(tempDir, \"node_modules\").apply { mkdirs() }\n\n    val task = createTestTask<CodegenSchemaTask> {\n      it.jsSourceDirs.set(listOf(jsSourceDir))\n      it.reactNativeDir.set(reactNativeDir)\n      it.nodeModulesDir.set(nodeModulesDir)\n      it.outputDir.set(outputDir)\n      it.schemaFile.set(schemaFile)\n    }\n\n    task.execute()\n\n    val schema = Gson().fromJson(readFileContent(schemaFile), JsonObject::class.java)\n\n    // Verify version\n    assertThat(schema.has(\"version\")).isTrue\n    assertThat(schema.get(\"version\").asString).isEqualTo(\"0.81.0\")\n\n    // Verify module structure\n    val modules = schema.getAsJsonObject(\"modules\")\n    val sampleModule = modules.getAsJsonObject(\"NativeSampleModule\")\n\n    assertThat(sampleModule.get(\"type\").asString).isEqualTo(\"NativeModule\")\n    assertThat(sampleModule.has(\"spec\")).isTrue\n  }\n\n  @Test\n  fun `generateSchema supports all JavaScript file extensions`() {\n    val jsSourceDir = File(tempDir, \"src\")\n    createTestFile(jsSourceDir, \"NativeModule1.js\", \"// .js\")\n    createTestFile(jsSourceDir, \"NativeModule2.ts\", \"// .ts\")\n    createTestFile(jsSourceDir, \"NativeModule3.jsx\", \"// .jsx\")\n    createTestFile(jsSourceDir, \"NativeModule4.tsx\", \"// .tsx\")\n\n    val outputDir = File(tempDir, \"output\")\n    val schemaFile = File(outputDir, \"schema.json\")\n    val reactNativeDir = File(tempDir, \"react-native\").apply { mkdirs() }\n    val nodeModulesDir = File(tempDir, \"node_modules\").apply { mkdirs() }\n\n    val task = createTestTask<CodegenSchemaTask> {\n      it.jsSourceDirs.set(listOf(jsSourceDir))\n      it.reactNativeDir.set(reactNativeDir)\n      it.nodeModulesDir.set(nodeModulesDir)\n      it.outputDir.set(outputDir)\n      it.schemaFile.set(schemaFile)\n    }\n\n    task.execute()\n\n    val schema = Gson().fromJson(readFileContent(schemaFile), JsonObject::class.java)\n    val modules = schema.getAsJsonObject(\"modules\")\n\n    // All file extensions should be supported\n    assertThat(modules.size()).isEqualTo(4)\n    assertThat(modules.has(\"NativeModule1\")).isTrue\n    assertThat(modules.has(\"NativeModule2\")).isTrue\n    assertThat(modules.has(\"NativeModule3\")).isTrue\n    assertThat(modules.has(\"NativeModule4\")).isTrue\n  }\n\n  @Test\n  fun `schema file is valid JSON`() {\n    val jsSourceDir = File(tempDir, \"src\")\n    createTestFile(jsSourceDir, \"NativeTestModule.ts\", \"// Test\")\n\n    val outputDir = File(tempDir, \"output\")\n    val schemaFile = File(outputDir, \"schema.json\")\n    val reactNativeDir = File(tempDir, \"react-native\").apply { mkdirs() }\n    val nodeModulesDir = File(tempDir, \"node_modules\").apply { mkdirs() }\n\n    val task = createTestTask<CodegenSchemaTask> {\n      it.jsSourceDirs.set(listOf(jsSourceDir))\n      it.reactNativeDir.set(reactNativeDir)\n      it.nodeModulesDir.set(nodeModulesDir)\n      it.outputDir.set(outputDir)\n      it.schemaFile.set(schemaFile)\n    }\n\n    task.execute()\n\n    // Should be parseable as JSON\n    val content = readFileContent(schemaFile)\n    val schema = Gson().fromJson(content, JsonObject::class.java)\n\n    assertThat(schema).isNotNull\n    assertThat(schema.isJsonObject).isTrue\n  }\n\n  // ========== CodegenArtifactsTask Tests ==========\n\n  @Test\n  fun `CodegenArtifactsTask is cacheable`() {\n    val annotations = CodegenArtifactsTask::class.annotations\n    assertThat(annotations)\n      .anyMatch { it.annotationClass.simpleName == \"CacheableTask\" }\n  }\n\n  @Test\n  fun `CodegenArtifactsTask has correct group and description`() {\n    val task = createTestTask<CodegenArtifactsTask>()\n\n    assertThat(task.group).isEqualTo(\"granite\")\n    assertThat(task.description).isEqualTo(\"Generates React Native Codegen artifacts (Java and C++)\")\n  }\n\n  @Test\n  fun `CodegenArtifactsTask creates output directories when codegen binary not found`() {\n    // Create empty schema\n    val schemaContent = \"\"\"{\"version\":\"0.81.0\",\"modules\":{}}\"\"\"\n    val schemaFile = createTestFile(tempDir, \"schema.json\", schemaContent)\n\n    val reactNativeDir = File(tempDir, \"react-native\").apply { mkdirs() }\n    val nodeModulesDir = File(tempDir, \"node_modules\").apply { mkdirs() }\n    val javaOutputDir = File(tempDir, \"output/java\")\n    val jniOutputDir = File(tempDir, \"output/jni\")\n\n    val task = createTestTask<CodegenArtifactsTask> {\n      it.schemaFile.set(schemaFile)\n      it.reactNativeDir.set(reactNativeDir)\n      it.nodeModulesDir.set(nodeModulesDir)\n      it.packageName.set(\"com.example.test\")\n      it.libraryName.set(\"TestLibrary\")\n      it.javaOutputDir.set(javaOutputDir)\n      it.jniOutputDir.set(jniOutputDir)\n    }\n\n    // Execute (will not find codegen binary but should not fail)\n    task.execute()\n\n    // Output directories should be created even when codegen binary is not found\n    assertThat(javaOutputDir).exists()\n    assertThat(jniOutputDir).exists()\n  }\n\n  @Test\n  fun `CodegenArtifactsTask uses package name property`() {\n    val task = createTestTask<CodegenArtifactsTask> {\n      it.packageName.set(\"com.custom.package\")\n    }\n\n    assertThat(task.packageName.get()).isEqualTo(\"com.custom.package\")\n  }\n\n  @Test\n  fun `CodegenArtifactsTask uses library name property`() {\n    val task = createTestTask<CodegenArtifactsTask> {\n      it.libraryName.set(\"MyNativeLibrary\")\n    }\n\n    assertThat(task.libraryName.get()).isEqualTo(\"MyNativeLibrary\")\n  }\n\n  @Test\n  fun `CodegenArtifactsTask handles valid schema file`() {\n    // Create a schema with modules\n    val schemaContent = \"\"\"\n        {\n          \"version\": \"0.81.0\",\n          \"modules\": {\n            \"NativeTestModule\": {\n              \"type\": \"NativeModule\",\n              \"spec\": \"/path/to/spec\"\n            }\n          }\n        }\n    \"\"\".trimIndent()\n\n    val schemaFile = createTestFile(tempDir, \"schema.json\", schemaContent)\n    val reactNativeDir = File(tempDir, \"react-native\").apply { mkdirs() }\n    val nodeModulesDir = File(tempDir, \"node_modules\").apply { mkdirs() }\n    val javaOutputDir = File(tempDir, \"output/java\")\n    val jniOutputDir = File(tempDir, \"output/jni\")\n\n    val task = createTestTask<CodegenArtifactsTask> {\n      it.schemaFile.set(schemaFile)\n      it.reactNativeDir.set(reactNativeDir)\n      it.nodeModulesDir.set(nodeModulesDir)\n      it.packageName.set(\"com.example.test\")\n      it.libraryName.set(\"TestLibrary\")\n      it.javaOutputDir.set(javaOutputDir)\n      it.jniOutputDir.set(jniOutputDir)\n    }\n\n    // Should not throw (will warn about missing codegen binary but continue)\n    task.execute()\n\n    assertThat(javaOutputDir).exists()\n    assertThat(jniOutputDir).exists()\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/utils/AutolinkingParserTest.kt",
    "content": "package run.granite.gradle.utils\n\nimport org.assertj.core.api.Assertions.assertThat\nimport org.assertj.core.api.Assertions.assertThatThrownBy\nimport org.junit.jupiter.api.Test\n\n/**\n * Unit tests for AutolinkingParser core parsing logic.\n * Tests JSON parsing and error handling.\n */\nclass AutolinkingParserTest {\n\n  @Test\n  fun `parse valid JSON with complete configuration`() {\n    val json = \"\"\"\n            {\n              \"project\": {\n                \"name\": \"test-project\",\n                \"version\": \"1.0.0\",\n                \"android\": {\n                  \"sourceDir\": \"android\",\n                  \"manifestPath\": \"android/AndroidManifest.xml\",\n                  \"packageName\": \"com.example.test\"\n                }\n              },\n              \"dependencies\": {\n                \"react-native-webview\": {\n                  \"name\": \"react-native-webview\",\n                  \"root\": \"/path/to/module\",\n                  \"platforms\": {\n                    \"android\": {\n                      \"sourceDir\": \"android\",\n                      \"packageImportPath\": \"com.example.Package\",\n                      \"packageInstance\": \"new Package()\",\n                      \"libraryName\": \"RNCWebView\",\n                      \"componentDescriptors\": [\"Component1\"],\n                      \"cmakeListsPath\": \"android/CMakeLists.txt\"\n                    }\n                  }\n                }\n              }\n            }\n    \"\"\".trimIndent()\n\n    val config = AutolinkingParser.parse(json)\n\n    // Verify project info\n    assertThat(config.project.name).isEqualTo(\"test-project\")\n    assertThat(config.project.version).isEqualTo(\"1.0.0\")\n    assertThat(config.project.android).isNotNull\n    assertThat(config.project.android?.packageName).isEqualTo(\"com.example.test\")\n\n    // Verify dependencies\n    assertThat(config.dependencies).hasSize(1)\n    assertThat(config.dependencies).containsKey(\"react-native-webview\")\n\n    // Verify Android dependency config\n    val androidModules = config.androidDependencies()\n    assertThat(androidModules).hasSize(1)\n    assertThat(androidModules[0].name).isEqualTo(\"react-native-webview\")\n    assertThat(androidModules[0].packageImportPath).isEqualTo(\"com.example.Package\")\n    assertThat(androidModules[0].libraryName).isEqualTo(\"RNCWebView\")\n  }\n\n  @Test\n  fun `parse JSON with null fields treats them as absent`() {\n    // Null and missing fields treated identically\n    val json = \"\"\"\n            {\n              \"project\": {\n                \"name\": \"test-project\",\n                \"version\": null,\n                \"android\": {\n                  \"sourceDir\": \"android\",\n                  \"manifestPath\": null,\n                  \"packageName\": \"com.example.test\"\n                }\n              },\n              \"dependencies\": {\n                \"test-module\": {\n                  \"name\": \"test-module\",\n                  \"root\": \"/path\",\n                  \"platforms\": {\n                    \"android\": {\n                      \"sourceDir\": \"android\",\n                      \"packageImportPath\": null,\n                      \"packageInstance\": null,\n                      \"libraryName\": \"testlib\",\n                      \"componentDescriptors\": null\n                    }\n                  }\n                }\n              }\n            }\n    \"\"\".trimIndent()\n\n    val config = AutolinkingParser.parse(json)\n\n    assertThat(config.project.version).isNull()\n    assertThat(config.project.android?.manifestPath).isNull()\n\n    val modules = config.androidDependencies()\n    assertThat(modules[0].packageImportPath).isNull()\n    assertThat(modules[0].packageInstance).isNull()\n    assertThat(modules[0].componentDescriptors).isEmpty()\n  }\n\n  @Test\n  fun `parse JSON with missing dependencies field returns empty dependencies`() {\n    val json = \"\"\"\n            {\n              \"project\": {\n                \"name\": \"test-project\"\n              },\n              \"dependencies\": {}\n            }\n    \"\"\".trimIndent()\n\n    val config = AutolinkingParser.parse(json)\n\n    assertThat(config.dependencies).isEmpty()\n    assertThat(config.androidDependencies()).isEmpty()\n  }\n\n  @Test\n  fun `parse JSON with JavaScript-only modules excludes them from androidDependencies`() {\n    val json = \"\"\"\n            {\n              \"project\": {\n                \"name\": \"test-project\"\n              },\n              \"dependencies\": {\n                \"js-only-module\": {\n                  \"name\": \"js-only-module\",\n                  \"root\": \"/path\",\n                  \"platforms\": {}\n                },\n                \"ios-only-module\": {\n                  \"name\": \"ios-only-module\",\n                  \"root\": \"/path\",\n                  \"platforms\": {\n                    \"ios\": {\n                      \"sourceDir\": \"ios\"\n                    }\n                  }\n                }\n              }\n            }\n    \"\"\".trimIndent()\n\n    val config = AutolinkingParser.parse(json)\n\n    assertThat(config.dependencies).hasSize(2)\n    assertThat(config.androidDependencies()).isEmpty() // No Android modules\n  }\n\n  @Test\n  fun `throws IllegalArgumentException when JSON is malformed`() {\n    // Fail-fast with descriptive error\n    val malformedJson = \"{ invalid json \"\n\n    assertThatThrownBy {\n      AutolinkingParser.parse(malformedJson)\n    }\n      .isInstanceOf(IllegalArgumentException::class.java)\n      .hasMessageContaining(\"react-native config\")\n      .hasMessageContaining(\"Failed to parse JSON\")\n      .hasMessageContaining(\"syntax error\")\n  }\n\n  @Test\n  fun `throws IllegalArgumentException when project field missing`() {\n    // Fail-fast with descriptive error\n    val json = \"\"\"\n            {\n              \"dependencies\": {}\n            }\n    \"\"\".trimIndent()\n\n    assertThatThrownBy {\n      AutolinkingParser.parse(json)\n    }\n      .isInstanceOf(IllegalArgumentException::class.java)\n      .hasMessageContaining(\"react-native config\")\n      .hasMessageContaining(\"missing 'project' field\")\n      .hasMessageContaining(\"Ensure react-native CLI is properly configured\")\n  }\n\n  @Test\n  fun `throws IllegalArgumentException when JSON has unexpected structure`() {\n    // Fail-fast with descriptive error\n    val json = \"\"\"\n            {\n              \"project\": \"invalid-should-be-object\",\n              \"dependencies\": {}\n            }\n    \"\"\".trimIndent()\n\n    assertThatThrownBy {\n      AutolinkingParser.parse(json)\n    }\n      .isInstanceOf(IllegalArgumentException::class.java)\n      .hasMessageContaining(\"react-native config\")\n    // ClassCastException wrapped in IllegalArgumentException\n  }\n\n  @Test\n  fun `parse handles empty project android field`() {\n    val json = \"\"\"\n            {\n              \"project\": {\n                \"name\": \"test-project\",\n                \"android\": null\n              },\n              \"dependencies\": {}\n            }\n    \"\"\".trimIndent()\n\n    val config = AutolinkingParser.parse(json)\n\n    assertThat(config.project.android).isNull()\n  }\n\n  @Test\n  fun `parse handles all AndroidDependencyConfig fields`() {\n    val json = \"\"\"\n            {\n              \"project\": {\n                \"name\": \"test-project\"\n              },\n              \"dependencies\": {\n                \"complex-module\": {\n                  \"name\": \"complex-module\",\n                  \"root\": \"/path\",\n                  \"platforms\": {\n                    \"android\": {\n                      \"sourceDir\": \"android\",\n                      \"packageImportPath\": \"com.example.Package\",\n                      \"packageInstance\": \"new Package()\",\n                      \"buildTypes\": [\"debug\", \"release\"],\n                      \"libraryName\": \"ComplexModule\",\n                      \"componentDescriptors\": [\"Comp1\", \"Comp2\"],\n                      \"cmakeListsPath\": \"android/CMakeLists.txt\",\n                      \"cxxModuleCMakeListsPath\": \"android/cxx/CMakeLists.txt\",\n                      \"cxxModuleCMakeListsModuleName\": \"complex_cxx\",\n                      \"cxxModuleHeaderName\": \"ComplexModule\",\n                      \"isPureCxxDependency\": false\n                    }\n                  }\n                }\n              }\n            }\n    \"\"\".trimIndent()\n\n    val config = AutolinkingParser.parse(json)\n    val modules = config.androidDependencies()\n\n    assertThat(modules).hasSize(1)\n    val module = modules[0]\n\n    assertThat(module.packageImportPath).isEqualTo(\"com.example.Package\")\n    assertThat(module.packageInstance).isEqualTo(\"new Package()\")\n    assertThat(module.libraryName).isEqualTo(\"ComplexModule\")\n    assertThat(module.componentDescriptors).containsExactly(\"Comp1\", \"Comp2\")\n    assertThat(module.cmakeListsPath).isEqualTo(\"android/CMakeLists.txt\")\n    assertThat(module.cxxModuleCMakeListsPath).isEqualTo(\"android/cxx/CMakeLists.txt\")\n    assertThat(module.cxxModuleHeaderName).isEqualTo(\"ComplexModule\")\n    assertThat(module.isPureCxxDependency).isFalse\n  }\n\n  @Test\n  fun `parse handles module with multiple dependencies`() {\n    val json = \"\"\"\n            {\n              \"project\": {\n                \"name\": \"test-project\"\n              },\n              \"dependencies\": {\n                \"module1\": {\n                  \"name\": \"module1\",\n                  \"root\": \"/path1\",\n                  \"platforms\": {\n                    \"android\": {\n                      \"sourceDir\": \"android\",\n                      \"libraryName\": \"Module1\"\n                    }\n                  }\n                },\n                \"module2\": {\n                  \"name\": \"module2\",\n                  \"root\": \"/path2\",\n                  \"platforms\": {\n                    \"android\": {\n                      \"sourceDir\": \"android\",\n                      \"libraryName\": \"Module2\"\n                    }\n                  }\n                },\n                \"module3\": {\n                  \"name\": \"module3\",\n                  \"root\": \"/path3\",\n                  \"platforms\": {\n                    \"android\": {\n                      \"sourceDir\": \"android\",\n                      \"libraryName\": \"Module3\"\n                    }\n                  }\n                }\n              }\n            }\n    \"\"\".trimIndent()\n\n    val config = AutolinkingParser.parse(json)\n\n    assertThat(config.dependencies).hasSize(3)\n    assertThat(config.androidDependencies()).hasSize(3)\n    assertThat(config.androidDependencies().map { it.name })\n      .containsExactlyInAnyOrder(\"module1\", \"module2\", \"module3\")\n  }\n\n  @Test\n  fun `parse loads fixture JSON file successfully`() {\n    val fixtureJson = javaClass.classLoader\n      .getResourceAsStream(\"fixtures/sample-rn-config.json\")!!\n      .bufferedReader()\n      .use { it.readText() }\n\n    val config = AutolinkingParser.parse(fixtureJson)\n\n    assertThat(config.project.name).isEqualTo(\"test-project\")\n    assertThat(config.project.android?.packageName).isEqualTo(\"com.example.testproject\")\n    assertThat(config.dependencies).hasSize(3)\n    assertThat(config.androidDependencies()).hasSize(2) // pure-js-module excluded\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/utils/ConflictDetectorTest.kt",
    "content": "package run.granite.gradle.utils\n\nimport org.gradle.testfixtures.ProjectBuilder\nimport org.junit.jupiter.api.Test\nimport org.junit.jupiter.api.assertThrows\nimport kotlin.test.assertFalse\nimport kotlin.test.assertTrue\n\n/**\n * Unit tests for ConflictDetector.\n */\nclass ConflictDetectorTest {\n\n  @Test\n  fun `validateNoConflicts succeeds when no React Native plugin is applied`() {\n    // Given\n    val project = ProjectBuilder.builder().build()\n    project.pluginManager.apply(\"com.android.library\")\n\n    // When/Then - Should not throw\n    ConflictDetector.validateNoConflicts(project)\n  }\n\n  @Test\n  fun `validateNoConflicts fails when React Native plugin is applied`() {\n    // Given\n    val project = ProjectBuilder.builder().build()\n\n    // Apply a mock plugin ID (can't apply actual React Native plugin in unit tests)\n    // This test verifies the logic structure\n\n    // When/Then\n    // Note: In real scenario with actual React Native plugin, this would throw\n    // For unit test, we just verify the method exists and is callable\n    ConflictDetector.validateNoConflicts(project)\n  }\n\n  @Test\n  fun `hasReactNativePlugin returns false when no RN plugin applied`() {\n    // Given\n    val project = ProjectBuilder.builder().build()\n    project.pluginManager.apply(\"com.android.library\")\n\n    // When\n    val hasPlugin = ConflictDetector.hasReactNativePlugin(project)\n\n    // Then\n    assertFalse(hasPlugin)\n  }\n\n  @Test\n  fun `detectMultipleGraniteModules warns when multiple modules use plugin`() {\n    // Given - Create root project with subprojects\n    val rootProject = ProjectBuilder.builder()\n      .withName(\"root\")\n      .build()\n\n    val subproject1 = ProjectBuilder.builder()\n      .withName(\"lib1\")\n      .withParent(rootProject)\n      .build()\n\n    val subproject2 = ProjectBuilder.builder()\n      .withName(\"lib2\")\n      .withParent(rootProject)\n      .build()\n\n    // Apply Granite plugin to both (simulated)\n    // Note: Full multi-module detection requires actual plugin application\n    // which is tested in integration tests\n\n    // When/Then - Should log warning but not fail\n    ConflictDetector.validateNoConflicts(subproject1)\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/utils/JdkValidatorTest.kt",
    "content": "package run.granite.gradle.utils\n\nimport org.gradle.api.JavaVersion\nimport org.gradle.testfixtures.ProjectBuilder\nimport org.junit.jupiter.api.Test\nimport org.junit.jupiter.api.assertThrows\nimport kotlin.test.assertEquals\nimport kotlin.test.assertTrue\n\n/**\n * Unit tests for JdkValidator.\n */\nclass JdkValidatorTest {\n\n  @Test\n  fun `getCurrentVersion returns current Java version`() {\n    // When\n    val version = JdkValidator.getCurrentVersion()\n\n    // Then\n    assertEquals(JavaVersion.current(), version)\n  }\n\n  @Test\n  fun `getMinimumVersion returns Java 17`() {\n    // When\n    val version = JdkValidator.getMinimumVersion()\n\n    // Then\n    assertEquals(JavaVersion.VERSION_17, version)\n  }\n\n  @Test\n  fun `isCompatible returns true for JDK 17 and above`() {\n    // Given - Current JDK is being used\n    val currentJdk = JavaVersion.current()\n\n    // When\n    val isCompatible = JdkValidator.isCompatible()\n\n    // Then\n    if (currentJdk >= JavaVersion.VERSION_17) {\n      assertTrue(isCompatible)\n    }\n  }\n\n  @Test\n  fun `validate succeeds when JDK is 17 or higher`() {\n    // Given\n    val project = ProjectBuilder.builder().build()\n    val currentJdk = JavaVersion.current()\n\n    // When/Then - Should not throw if current JDK >= 17\n    if (currentJdk >= JavaVersion.VERSION_17) {\n      // Should succeed\n      JdkValidator.validate(project)\n    } else {\n      // Should fail\n      assertThrows<IllegalStateException> {\n        JdkValidator.validate(project)\n      }\n    }\n  }\n\n  @Test\n  fun `validate provides helpful error message for incompatible JDK`() {\n    // Given\n    val currentJdk = JavaVersion.current()\n\n    // Skip test if running on JDK 17+\n    if (currentJdk >= JavaVersion.VERSION_17) {\n      return\n    }\n\n    // Given\n    val project = ProjectBuilder.builder().build()\n\n    // When/Then\n    val exception = assertThrows<IllegalStateException> {\n      JdkValidator.validate(project)\n    }\n\n    // Verify error message contains helpful information\n    val message = exception.message ?: \"\"\n    assertTrue(message.contains(\"JDK 17\"))\n    assertTrue(message.contains(\"JAVA_HOME\") || message.contains(\"gradle.properties\"))\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/utils/ReactNativeVersionReaderTest.kt",
    "content": "package run.granite.gradle.utils\n\nimport org.junit.jupiter.api.Test\nimport org.junit.jupiter.api.assertThrows\nimport org.junit.jupiter.api.io.TempDir\nimport run.granite.gradle.config.DependencyCoordinates\nimport java.io.File\nimport kotlin.test.assertEquals\nimport kotlin.test.assertTrue\n\n/**\n * Unit tests for ReactNativeVersionReader.\n */\nclass ReactNativeVersionReaderTest {\n\n  @TempDir\n  lateinit var tempDir: File\n\n  @Test\n  fun `readVersion reads version from package json`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.81.6\"}\"\"\")\n\n    // When\n    val version = ReactNativeVersionReader.readVersion(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.81.6\", version)\n  }\n\n  @Test\n  fun `readVersion handles version with pre-release suffix`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.82.0-rc.0\"}\"\"\")\n\n    // When\n    val version = ReactNativeVersionReader.readVersion(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.82.0-rc.0\", version)\n  }\n\n  @Test\n  fun `readVersion throws error when package json not found`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"nonexistent\")\n\n    // When/Then\n    val exception = assertThrows<IllegalStateException> {\n      ReactNativeVersionReader.readVersion(reactNativeDir)\n    }\n\n    assertTrue(exception.message?.contains(\"package.json not found\") == true)\n  }\n\n  @Test\n  fun `readVersion throws error when version field missing`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"name\":\"react-native\"}\"\"\")\n\n    // When/Then\n    val exception = assertThrows<IllegalStateException> {\n      ReactNativeVersionReader.readVersion(reactNativeDir)\n    }\n\n    assertTrue(exception.message?.contains(\"version\") == true)\n  }\n\n  @Test\n  fun `validateVersion succeeds for supported versions`() {\n    // Given\n    val supportedVersions = listOf(\"0.81.0\", \"0.81.6\", \"0.82.0\", \"1.0.0\")\n\n    // When/Then - Should not throw\n    for (version in supportedVersions) {\n      ReactNativeVersionReader.validateVersion(version)\n    }\n  }\n\n  @Test\n  fun `validateVersion fails for unsupported versions`() {\n    // Given\n    val unsupportedVersions = listOf(\"0.80.9\", \"0.70.0\", \"0.60.0\")\n\n    // When/Then\n    for (version in unsupportedVersions) {\n      val exception = assertThrows<IllegalStateException> {\n        ReactNativeVersionReader.validateVersion(version)\n      }\n\n      assertTrue(exception.message?.contains(\"not supported\") == true)\n      assertTrue(exception.message?.contains(\"0.81.0\") == true)\n    }\n  }\n\n  @Test\n  fun `getMinimumVersion returns correct minimum`() {\n    // When\n    val minVersion = ReactNativeVersionReader.getMinimumVersion()\n\n    // Then\n    assertEquals(\"0.81.0\", minVersion)\n  }\n\n  @Test\n  fun `version comparison handles major version correctly`() {\n    // Test that 1.0.0 > 0.81.0\n    ReactNativeVersionReader.validateVersion(\"1.0.0\")\n  }\n\n  @Test\n  fun `version comparison handles minor version correctly`() {\n    // Test that 0.82.0 > 0.81.0\n    ReactNativeVersionReader.validateVersion(\"0.82.0\")\n  }\n\n  @Test\n  fun `version comparison handles patch version correctly`() {\n    // Test that 0.81.1 > 0.81.0\n    ReactNativeVersionReader.validateVersion(\"0.81.1\")\n  }\n\n  @Test\n  fun `version comparison handles exact minimum version`() {\n    // Test that 0.81.0 == 0.81.0\n    ReactNativeVersionReader.validateVersion(\"0.81.0\")\n  }\n\n  @Test\n  fun `readVersion handles malformed JSON gracefully`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"not valid json\"\"\")\n\n    // When/Then\n    assertThrows<IllegalStateException> {\n      ReactNativeVersionReader.readVersion(reactNativeDir)\n    }\n  }\n\n  @Test\n  fun `readVersionAndGroup reads from gradle properties`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val reactAndroidDir = File(reactNativeDir, \"ReactAndroid\")\n    reactAndroidDir.mkdirs()\n\n    val gradleProperties = File(reactAndroidDir, \"gradle.properties\")\n    gradleProperties.writeText(\n      \"\"\"\n            VERSION_NAME=0.81.1\n            react.internal.publishingGroup=com.facebook.react\n      \"\"\".trimIndent(),\n    )\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.81.1\"}\"\"\")\n\n    // When\n    val (version, group) = ReactNativeVersionReader.readVersionAndGroup(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.81.1\", version)\n    assertEquals(\"com.facebook.react\", group)\n  }\n\n  @Test\n  fun `readVersionAndGroup returns default group when publishingGroup is missing`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val reactAndroidDir = File(reactNativeDir, \"ReactAndroid\")\n    reactAndroidDir.mkdirs()\n\n    val gradleProperties = File(reactAndroidDir, \"gradle.properties\")\n    gradleProperties.writeText(\n      \"\"\"\n            VERSION_NAME=0.81.1\n      \"\"\".trimIndent(),\n    )\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.81.1\"}\"\"\")\n\n    // When\n    val (version, group) = ReactNativeVersionReader.readVersionAndGroup(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.81.1\", version)\n    assertEquals(\"com.facebook.react\", group)\n  }\n\n  @Test\n  fun `readVersionAndGroup handles custom publishingGroup`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val reactAndroidDir = File(reactNativeDir, \"ReactAndroid\")\n    reactAndroidDir.mkdirs()\n\n    val gradleProperties = File(reactAndroidDir, \"gradle.properties\")\n    gradleProperties.writeText(\n      \"\"\"\n            VERSION_NAME=0.81.1-nightly-20250123\n            react.internal.publishingGroup=com.custom.react\n      \"\"\".trimIndent(),\n    )\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.81.1-nightly-20250123\"}\"\"\")\n\n    // When\n    val (version, group) = ReactNativeVersionReader.readVersionAndGroup(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.81.1-nightly-20250123-SNAPSHOT\", version)\n    assertEquals(\"com.custom.react\", group)\n  }\n\n  @Test\n  fun `readVersionAndGroup adds SNAPSHOT suffix for nightly versions starting with 0_0_0`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val reactAndroidDir = File(reactNativeDir, \"ReactAndroid\")\n    reactAndroidDir.mkdirs()\n\n    val gradleProperties = File(reactAndroidDir, \"gradle.properties\")\n    gradleProperties.writeText(\n      \"\"\"\n            VERSION_NAME=0.0.0-20250123-1234-abc123\n            react.internal.publishingGroup=com.facebook.react\n      \"\"\".trimIndent(),\n    )\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.0.0-20250123-1234-abc123\"}\"\"\")\n\n    // When\n    val (version, _) = ReactNativeVersionReader.readVersionAndGroup(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.0.0-20250123-1234-abc123-SNAPSHOT\", version)\n  }\n\n  @Test\n  fun `readVersionAndGroup adds SNAPSHOT suffix for nightly versions containing nightly`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val reactAndroidDir = File(reactNativeDir, \"ReactAndroid\")\n    reactAndroidDir.mkdirs()\n\n    val gradleProperties = File(reactAndroidDir, \"gradle.properties\")\n    gradleProperties.writeText(\n      \"\"\"\n            VERSION_NAME=0.81.0-nightly-20250123-abc123\n            react.internal.publishingGroup=com.facebook.react\n      \"\"\".trimIndent(),\n    )\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.81.0-nightly-20250123-abc123\"}\"\"\")\n\n    // When\n    val (version, _) = ReactNativeVersionReader.readVersionAndGroup(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.81.0-nightly-20250123-abc123-SNAPSHOT\", version)\n  }\n\n  @Test\n  fun `readVersionAndGroup does NOT add SNAPSHOT for stable releases`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val reactAndroidDir = File(reactNativeDir, \"ReactAndroid\")\n    reactAndroidDir.mkdirs()\n\n    val gradleProperties = File(reactAndroidDir, \"gradle.properties\")\n    gradleProperties.writeText(\n      \"\"\"\n            VERSION_NAME=0.81.6\n            react.internal.publishingGroup=com.facebook.react\n      \"\"\".trimIndent(),\n    )\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.81.6\"}\"\"\")\n\n    // When\n    val (version, _) = ReactNativeVersionReader.readVersionAndGroup(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.81.6\", version)\n  }\n\n  @Test\n  fun `readVersionAndGroup does NOT add SNAPSHOT for rc versions`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val reactAndroidDir = File(reactNativeDir, \"ReactAndroid\")\n    reactAndroidDir.mkdirs()\n\n    val gradleProperties = File(reactAndroidDir, \"gradle.properties\")\n    gradleProperties.writeText(\n      \"\"\"\n            VERSION_NAME=0.82.0-rc.0\n            react.internal.publishingGroup=com.facebook.react\n      \"\"\".trimIndent(),\n    )\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.82.0-rc.0\"}\"\"\")\n\n    // When\n    val (version, _) = ReactNativeVersionReader.readVersionAndGroup(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.82.0-rc.0\", version)\n  }\n\n  @Test\n  fun `readVersionAndGroup falls back to package json when gradle properties missing`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n    // No ReactAndroid/gradle.properties - fallback to package.json\n\n    val packageJson = File(reactNativeDir, \"package.json\")\n    packageJson.writeText(\"\"\"{\"version\":\"0.81.6\"}\"\"\")\n\n    // When\n    val (version, group) = ReactNativeVersionReader.readVersionAndGroup(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.81.6\", version)\n    assertEquals(\"com.facebook.react\", group)\n  }\n\n  @Test\n  fun `readVersionAndGroup throws error when VERSION_NAME empty and no package json`() {\n    // Given\n    val reactNativeDir = File(tempDir, \"react-native\")\n    reactNativeDir.mkdirs()\n\n    val reactAndroidDir = File(reactNativeDir, \"ReactAndroid\")\n    reactAndroidDir.mkdirs()\n\n    val gradleProperties = File(reactAndroidDir, \"gradle.properties\")\n    gradleProperties.writeText(\n      \"\"\"\n            react.internal.publishingGroup=com.custom.react\n      \"\"\".trimIndent(),\n    )\n    // No VERSION_NAME - error expected\n\n    // When/Then\n    val exception = assertThrows<IllegalStateException> {\n      ReactNativeVersionReader.readVersionAndGroup(reactNativeDir)\n    }\n\n    assertTrue(exception.message?.contains(\"VERSION_NAME\") == true)\n  }\n\n  // === readCoordinates tests ===\n\n  @Test\n  fun `readCoordinates reads all version info from both files`() {\n    // Given\n    val reactNativeDir = setupReactNativeDirForCoordinates(\n      gradleProperties = \"\"\"\n                VERSION_NAME=0.84.0-rc.4\n                react.internal.publishingGroup=com.facebook.react\n                react.internal.hermesPublishingGroup=com.facebook.hermes\n      \"\"\".trimIndent(),\n      hermesVersionProperties = \"\"\"\n                HERMES_VERSION_NAME=0.15.0\n                HERMES_V1_VERSION_NAME=250829098.0.6\n      \"\"\".trimIndent(),\n    )\n\n    // When\n    val coordinates = ReactNativeVersionReader.readCoordinates(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.84.0-rc.4\", coordinates.reactVersion)\n    assertEquals(\"0.15.0\", coordinates.hermesVersion)\n    assertEquals(\"250829098.0.6\", coordinates.hermesV1Version)\n    assertEquals(\"com.facebook.react\", coordinates.reactGroup)\n    assertEquals(\"com.facebook.hermes\", coordinates.hermesGroup)\n  }\n\n  @Test\n  fun `readCoordinates uses default hermes group when not specified`() {\n    // Given\n    val reactNativeDir = setupReactNativeDirForCoordinates(\n      gradleProperties = \"\"\"\n                VERSION_NAME=0.84.0\n                react.internal.publishingGroup=com.facebook.react\n      \"\"\".trimIndent(),\n      hermesVersionProperties = \"\"\"\n                HERMES_VERSION_NAME=0.15.0\n                HERMES_V1_VERSION_NAME=250829098.0.6\n      \"\"\".trimIndent(),\n    )\n\n    // When\n    val coordinates = ReactNativeVersionReader.readCoordinates(reactNativeDir)\n\n    // Then\n    assertEquals(\"com.facebook.hermes\", coordinates.hermesGroup)\n  }\n\n  @Test\n  fun `readCoordinates falls back to RN version when hermes version file missing`() {\n    // Given - RN 0.83 or lower scenario\n    val reactNativeDir = setupReactNativeDirForCoordinates(\n      gradleProperties = \"\"\"\n                VERSION_NAME=0.83.0\n                react.internal.publishingGroup=com.facebook.react\n      \"\"\".trimIndent(),\n      hermesVersionProperties = null, // File doesn't exist\n    )\n\n    // When\n    val coordinates = ReactNativeVersionReader.readCoordinates(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.83.0\", coordinates.reactVersion)\n    assertEquals(\"0.83.0\", coordinates.hermesVersion)\n    assertEquals(\"0.83.0\", coordinates.hermesV1Version)\n  }\n\n  @Test\n  fun `readCoordinates handles nightly hermes version with SNAPSHOT suffix`() {\n    // Given\n    val reactNativeDir = setupReactNativeDirForCoordinates(\n      gradleProperties = \"\"\"\n                VERSION_NAME=0.84.0\n      \"\"\".trimIndent(),\n      hermesVersionProperties = \"\"\"\n                HERMES_VERSION_NAME=0.0.0-commitly-20250123-abc123\n                HERMES_V1_VERSION_NAME=250829098.0.0\n      \"\"\".trimIndent(),\n    )\n\n    // When\n    val coordinates = ReactNativeVersionReader.readCoordinates(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.0.0-commitly-20250123-abc123-SNAPSHOT\", coordinates.hermesVersion)\n  }\n\n  @Test\n  fun `readCoordinates returns V1 version from getEffectiveHermesVersion`() {\n    // Given\n    val reactNativeDir = setupReactNativeDirForCoordinates(\n      gradleProperties = \"\"\"\n                VERSION_NAME=0.84.0\n      \"\"\".trimIndent(),\n      hermesVersionProperties = \"\"\"\n                HERMES_VERSION_NAME=0.15.0\n                HERMES_V1_VERSION_NAME=250829098.0.6\n      \"\"\".trimIndent(),\n    )\n\n    // When\n    val coordinates = ReactNativeVersionReader.readCoordinates(reactNativeDir)\n\n    // Then\n    assertEquals(\"250829098.0.6\", coordinates.getEffectiveHermesVersion())\n  }\n\n  @Test\n  fun `readCoordinates returns classic version when V1 empty`() {\n    // Given\n    val reactNativeDir = setupReactNativeDirForCoordinates(\n      gradleProperties = \"\"\"\n                VERSION_NAME=0.84.0\n      \"\"\".trimIndent(),\n      hermesVersionProperties = \"\"\"\n                HERMES_VERSION_NAME=0.15.0\n                HERMES_V1_VERSION_NAME=\n      \"\"\".trimIndent(),\n    )\n\n    // When\n    val coordinates = ReactNativeVersionReader.readCoordinates(reactNativeDir)\n\n    // Then\n    assertEquals(\"0.15.0\", coordinates.getEffectiveHermesVersion())\n  }\n\n  @Test\n  fun `readCoordinates handles empty hermes version file gracefully`() {\n    // Given - Hermes version file exists but is empty\n    val reactNativeDir = setupReactNativeDirForCoordinates(\n      gradleProperties = \"\"\"\n                VERSION_NAME=0.84.0\n      \"\"\".trimIndent(),\n      hermesVersionProperties = \"\", // Empty file\n    )\n\n    // When\n    val coordinates = ReactNativeVersionReader.readCoordinates(reactNativeDir)\n\n    // Then - Fallback to RN version\n    assertEquals(\"0.84.0\", coordinates.hermesVersion)\n    assertEquals(\"0.84.0\", coordinates.hermesV1Version)\n  }\n\n  @Test\n  fun `readCoordinates handles malformed hermes version file gracefully`() {\n    // Given - Hermes version file has invalid format\n    val reactNativeDir = setupReactNativeDirForCoordinates(\n      gradleProperties = \"\"\"\n                VERSION_NAME=0.84.0\n      \"\"\".trimIndent(),\n      hermesVersionProperties = \"\"\"\n                INVALID_KEY=some_value\n                ANOTHER_INVALID=123\n      \"\"\".trimIndent(),\n    )\n\n    // When\n    val coordinates = ReactNativeVersionReader.readCoordinates(reactNativeDir)\n\n    // Then - Fallback to RN version\n    assertEquals(\"0.84.0\", coordinates.hermesVersion)\n    assertEquals(\"0.84.0\", coordinates.hermesV1Version)\n  }\n\n  // === Helper for readCoordinates tests ===\n\n  private fun setupReactNativeDirForCoordinates(\n    gradleProperties: String,\n    hermesVersionProperties: String?,\n    packageJsonVersion: String = \"0.84.0\",\n  ): File {\n    val reactNativeDir = File(tempDir, \"rn-coords-${System.nanoTime()}\")\n    reactNativeDir.mkdirs()\n\n    // package.json (for fallback)\n    File(reactNativeDir, \"package.json\").writeText(\"\"\"{\"version\":\"$packageJsonVersion\"}\"\"\")\n\n    // ReactAndroid/gradle.properties\n    val reactAndroidDir = File(reactNativeDir, \"ReactAndroid\")\n    reactAndroidDir.mkdirs()\n    File(reactAndroidDir, \"gradle.properties\").writeText(gradleProperties)\n\n    // sdks/hermes-engine/version.properties\n    if (hermesVersionProperties != null) {\n      val hermesDir = File(reactNativeDir, \"sdks/hermes-engine\")\n      hermesDir.mkdirs()\n      File(hermesDir, \"version.properties\").writeText(hermesVersionProperties)\n    }\n\n    return reactNativeDir\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/utils/TaskDependencyValidatorTest.kt",
    "content": "package run.granite.gradle.utils\n\nimport org.gradle.api.DefaultTask\nimport org.gradle.testfixtures.ProjectBuilder\nimport org.junit.jupiter.api.BeforeEach\nimport org.junit.jupiter.api.Test\nimport kotlin.test.assertEquals\nimport kotlin.test.assertTrue\n\n/**\n * Unit tests for TaskDependencyValidator.\n */\nclass TaskDependencyValidatorTest {\n\n  private lateinit var project: org.gradle.api.Project\n\n  @BeforeEach\n  fun setup() {\n    project = ProjectBuilder.builder().build()\n  }\n\n  @Test\n  fun `validateRequiredTasks returns empty list when all tasks exist`() {\n    // Given\n    project.tasks.register(\"task1\", DefaultTask::class.java)\n    project.tasks.register(\"task2\", DefaultTask::class.java)\n\n    val requiredTasks = listOf(\"task1\", \"task2\")\n\n    // When\n    val missingTasks = TaskDependencyValidator.validateRequiredTasks(project, requiredTasks)\n\n    // Then\n    assertTrue(missingTasks.isEmpty())\n  }\n\n  @Test\n  fun `validateRequiredTasks returns missing task names`() {\n    // Given\n    project.tasks.register(\"task1\", DefaultTask::class.java)\n    // task2 not registered\n\n    val requiredTasks = listOf(\"task1\", \"task2\", \"task3\")\n\n    // When\n    val missingTasks = TaskDependencyValidator.validateRequiredTasks(project, requiredTasks)\n\n    // Then\n    assertEquals(2, missingTasks.size)\n    assertTrue(missingTasks.contains(\"task2\"))\n    assertTrue(missingTasks.contains(\"task3\"))\n  }\n\n  @Test\n  fun `validateRequiredTasks handles empty required tasks list`() {\n    // Given\n    val requiredTasks = emptyList<String>()\n\n    // When\n    val missingTasks = TaskDependencyValidator.validateRequiredTasks(project, requiredTasks)\n\n    // Then\n    assertTrue(missingTasks.isEmpty())\n  }\n\n  @Test\n  fun `validateTaskInputsOutputs warns for tasks without inputs or outputs`() {\n    // Given\n    val task = project.tasks.register(\"testTask\", DefaultTask::class.java).get()\n\n    // When/Then - Should not throw, just log warning\n    TaskDependencyValidator.validateTaskInputsOutputs(project, task)\n  }\n\n  @Test\n  fun `validateAutolinkingBeforeCodegen validates task dependency`() {\n    // Given\n    val autolinkingTask = project.tasks.register(\"autolinking\", DefaultTask::class.java).get()\n    val codegenTask = project.tasks.register(\"codegen\", DefaultTask::class.java).get()\n\n    // When/Then - Should not throw\n    TaskDependencyValidator.validateAutolinkingBeforeCodegen(project, autolinkingTask, codegenTask)\n  }\n\n  @Test\n  fun `validateCodegenBeforeCompilation validates task dependency`() {\n    // Given\n    val codegenTask = project.tasks.register(\"codegen\", DefaultTask::class.java).get()\n    val compileTask = project.tasks.register(\"compile\", DefaultTask::class.java).get()\n\n    // When/Then - Should not throw\n    TaskDependencyValidator.validateCodegenBeforeCompilation(project, codegenTask, compileTask)\n  }\n\n  @Test\n  fun `validateBundleBeforePackaging validates task dependency`() {\n    // Given\n    val bundleTask = project.tasks.register(\"bundle\", DefaultTask::class.java).get()\n    val packageTask = project.tasks.register(\"package\", DefaultTask::class.java).get()\n\n    // When/Then - Should not throw\n    TaskDependencyValidator.validateBundleBeforePackaging(project, bundleTask, packageTask)\n  }\n\n  @Test\n  fun `validateInfrastructureBeforeVariant validates task dependency`() {\n    // Given\n    val infrastructureTask = project.tasks.register(\"infrastructure\", DefaultTask::class.java).get()\n    val variantTask = project.tasks.register(\"variant\", DefaultTask::class.java).get()\n\n    // When/Then - Should not throw\n    TaskDependencyValidator.validateInfrastructureBeforeVariant(project, infrastructureTask, variantTask)\n  }\n\n  @Test\n  fun `logTaskDependencies logs task information`() {\n    // Given\n    val task = project.tasks.register(\"testTask\", DefaultTask::class.java).get()\n\n    // When/Then - Should not throw\n    TaskDependencyValidator.logTaskDependencies(project, task)\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/kotlin/run/granite/gradle/utils/TaskTestUtils.kt",
    "content": "package run.granite.gradle.utils\n\nimport org.gradle.api.Project\nimport org.gradle.api.Task\nimport org.gradle.testfixtures.ProjectBuilder\nimport java.io.File\n\n/**\n * Test utilities for creating and configuring Gradle tasks in tests.\n */\n\n/**\n * Creates a test project with Android Library plugin applied.\n *\n * @param projectDir Optional project directory (uses temp dir if not specified)\n * @return Configured Gradle project\n */\ninternal fun createProject(projectDir: File? = null): Project {\n  val project = ProjectBuilder.builder()\n    .apply {\n      if (projectDir != null) {\n        withProjectDir(projectDir)\n      }\n    }\n    .build()\n\n  // Apply Android Library plugin for testing\n  project.plugins.apply(\"com.android.library\")\n\n  return project\n}\n\n/**\n * Creates and registers a test task of the specified type.\n *\n * This helper allows testing of abstract Gradle tasks by using Gradle's\n * task registration mechanism which handles property injection.\n *\n * @param T Task type to create\n * @param project Project to register the task in (defaults to new test project)\n * @param taskName Name for the task (defaults to class simple name)\n * @param block Configuration block to setup task properties\n * @return Configured task instance\n */\ninternal inline fun <reified T : Task> createTestTask(\n  project: Project = createProject(),\n  taskName: String = T::class.java.simpleName,\n  noinline block: (T) -> Unit = {},\n): T = project.tasks.register(taskName, T::class.java, block).get()\n\n/**\n * Creates a test file with specified content.\n *\n * @param parent Parent directory\n * @param name File name\n * @param content File content\n * @return Created file\n */\ninternal fun createTestFile(parent: File, name: String, content: String): File {\n  val file = File(parent, name)\n  file.parentFile.mkdirs()\n  file.writeText(content)\n  return file\n}\n\n/**\n * Creates a test directory structure.\n *\n * @param parent Parent directory\n * @param path Directory path (can be nested with /)\n * @return Created directory\n */\ninternal fun createTestDirectory(parent: File, path: String): File {\n  val dir = File(parent, path)\n  dir.mkdirs()\n  return dir\n}\n\n/**\n * Reads a file and returns its content.\n *\n * @param file File to read\n * @return File content as string\n */\ninternal fun readFileContent(file: File): String {\n  require(file.exists()) { \"File does not exist: ${file.absolutePath}\" }\n  return file.readText()\n}\n"
  },
  {
    "path": "packages/granite-screen/gradle-plugin/src/test/resources/fixtures/sample-rn-config.json",
    "content": "{\n  \"project\": {\n    \"name\": \"test-project\",\n    \"version\": \"1.0.0\",\n    \"android\": {\n      \"sourceDir\": \"android\",\n      \"manifestPath\": \"android/AndroidManifest.xml\",\n      \"packageName\": \"com.example.testproject\"\n    }\n  },\n  \"dependencies\": {\n    \"react-native-webview\": {\n      \"name\": \"react-native-webview\",\n      \"root\": \"/path/to/node_modules/react-native-webview\",\n      \"platforms\": {\n        \"android\": {\n          \"sourceDir\": \"android\",\n          \"packageImportPath\": \"com.reactnativecommunity.webview.RNCWebViewPackage\",\n          \"packageInstance\": \"new RNCWebViewPackage()\",\n          \"libraryName\": \"RNCWebView\",\n          \"componentDescriptors\": [\"RNCWebViewComponentDescriptor\"],\n          \"cmakeListsPath\": \"android/CMakeLists.txt\"\n        }\n      }\n    },\n    \"react-native-camera\": {\n      \"name\": \"react-native-camera\",\n      \"root\": \"/path/to/node_modules/react-native-camera\",\n      \"platforms\": {\n        \"android\": {\n          \"sourceDir\": \"android\",\n          \"packageImportPath\": \"org.reactnative.camera.RNCameraPackage\",\n          \"packageInstance\": \"new RNCameraPackage()\",\n          \"libraryName\": \"RNCamera\",\n          \"componentDescriptors\": null\n        }\n      }\n    },\n    \"pure-js-module\": {\n      \"name\": \"pure-js-module\",\n      \"root\": \"/path/to/node_modules/pure-js-module\",\n      \"platforms\": {}\n    }\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/ios/BundleLoader/BundleEvaluator.h",
    "content": "//\n//  BundleEvaluator.h\n//  Pods\n//\n//  Created by 오 진성B on 10/8/25.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface BundleEvaluator : NSObject\n\n+ (void)evaluate:(NSData *)scriptData\n                   url:(NSString *)url\n           bridgeProxy:(id)bridgeProxy\n            completion:(void (^)(NSError *))completion;\n@end\n"
  },
  {
    "path": "packages/granite-screen/ios/BundleLoader/BundleEvaluator.mm",
    "content": "//\n//  BundleEvaluator.mm\n//  Pods\n//\n//  Created by 오 진성B on 10/8/25.\n//\n\n#import \"BundleEvaluator.h\"\n#import <React/RCTBridgeProxy.h>\n#import <React-callinvoker/ReactCommon/CallInvoker.h>\n#import <jsi/jsi.h>\n\n@interface RCTBridgeProxy (JSIRuntime)\n- (void *)runtime;\n@end\n\n@interface RCTBridgeProxy (RCTTurboModule)\n- (std::shared_ptr<facebook::react::CallInvoker>)jsCallInvoker;\n@end\n\n@implementation BundleEvaluator\n\n+ (void)evaluate:(NSData *)scriptData\n                   url:(NSString *)url\n                bridgeProxy:(id)bridgeProxy\n            completion:(void (^)(NSError *))completion {\n\n    // Cast to RCTBridgeProxy\n    RCTBridgeProxy *bridgeProxyObj = (RCTBridgeProxy *)bridgeProxy;\n\n    // Get CallInvoker\n    std::shared_ptr<facebook::react::CallInvoker> callInvoker = bridgeProxyObj.jsCallInvoker;\n    if (!callInvoker) {\n        NSError *error = [NSError errorWithDomain:@\"TossBundleLoader\"\n                                             code:500\n                                         userInfo:@{NSLocalizedDescriptionKey: @\"CallInvoker unavailable\"}];\n        completion(error);\n        return;\n    }\n\n    // Get runtime pointer\n    facebook::jsi::Runtime *runtime = (facebook::jsi::Runtime *)bridgeProxyObj.runtime;\n    if (!runtime) {\n        NSError *error = [NSError errorWithDomain:@\"TossBundleLoader\"\n                                             code:500\n                                         userInfo:@{NSLocalizedDescriptionKey: @\"Runtime unavailable\"}];\n        completion(error);\n        return;\n    }\n\n    // Prepare source\n    std::string source{static_cast<const char *>([scriptData bytes]), [scriptData length]};\n    std::string sourceUrl{[url UTF8String]};\n\n    // Execute on JS thread\n    callInvoker->invokeAsync([source = std::move(source),\n                             sourceUrl = std::move(sourceUrl),\n                             runtime,\n                             completion]() {\n        try {\n            runtime->evaluateJavaScript(\n                std::make_unique<facebook::jsi::StringBuffer>(std::move(source)),\n                sourceUrl\n            );\n            completion(nil);\n        } catch (const std::exception &e) {\n            NSString *errorString = [NSString stringWithUTF8String:e.what()];\n            NSError *error = [NSError errorWithDomain:@\"TossBundleLoader\"\n                                                 code:500\n                                             userInfo:@{NSLocalizedDescriptionKey: errorString}];\n            completion(error);\n        }\n    });\n}\n\n@end\n"
  },
  {
    "path": "packages/granite-screen/ios/BundleLoader/BundleLoadable.swift",
    "content": "//\n//  BundleLoader.swift\n//  GraniteScreen\n//\n//  Protocol for abstracting bundle loading strategies\n//\n\nimport Foundation\n\n// MARK: - BundleLoader Protocol\n\n/// Protocol that abstracts bundle loading strategies\n/// Matches Android's BundleLoader interface for cross-platform consistency\npublic protocol BundleLoadable {\n    /// Loads a bundle and returns its source configuration\n    func loadBundle() async throws -> BundleSource\n    static func evaluate(scriptData: Data,\n                                url: String,\n                                bridgeProxy: Any) async throws\n}\n\n// MARK: - BundleSource\n\n/// Represents the source of a JavaScript bundle\n/// Matches Android's sealed class BundleSource\npublic enum BundleSource {\n    /// Development server bundle\n    case devServer(host: String = \"localhost\", port: Int = 8081, moduleName: String, forBundleRoot: String)\n\n    /// Production bundle from various locations\n    case production(location: ProductionLocation, moduleName: String)\n\n    case customPath(URL, moduleName: String)\n}\n\n\n/// Represents the location of a production bundle\npublic enum ProductionLocation {\n    /// Bundle from file system\n    case fileSystemBundle(filePath: URL)\n\n    /// Bundle from app's main bundle\n    case embeddedBundle\n}\n\n// MARK: - Bundle Loading Error\n\n/// Errors that can occur during bundle loading\npublic enum BundleLoadError: LocalizedError {\n    case networkError(Error)\n    case fileNotFound(String)\n    case invalidURL(String)\n    case downloadFailed(String)\n    case metroServerUnavailable\n    case bundleNotReady\n\n    public var errorDescription: String? {\n        switch self {\n        case .networkError(let error):\n            return \"Network error: \\(error.localizedDescription)\"\n        case .fileNotFound(let path):\n            return \"Bundle file not found at: \\(path)\"\n        case .invalidURL(let url):\n            return \"Invalid bundle URL: \\(url)\"\n        case .downloadFailed(let reason):\n            return \"Bundle download failed: \\(reason)\"\n        case .metroServerUnavailable:\n            return \"Metro server is not available\"\n        case .bundleNotReady:\n            return \"Bundle is not ready for loading\"\n        }\n    }\n}\n\npublic extension BundleLoadable {\n    public static func evaluate(scriptData: Data,\n                                url: String,\n                                bridgeProxy: Any) async throws {\n        try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, Error>) in\n            BundleEvaluator.evaluate(scriptData,\n                                     url: url,\n                                     bridgeProxy: bridgeProxy) { nsError in\n                if let error = nsError {\n                    continuation.resume(throwing: error)\n                } else {\n                    continuation.resume()\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "packages/granite-screen/ios/GraniteBundleLoaderTypes.swift",
    "content": "// This file is automatically generated by brick-codegen\n// Do not edit manually - regenerate using: brick-codegen\n\nimport Foundation\n\n/// GraniteBundleLoader module types for Brick framework\n\n"
  },
  {
    "path": "packages/granite-screen/ios/GraniteScreen.h",
    "content": "//\n//  GraniteScreen.h\n//  GraniteScreen\n//\n//  Umbrella header for GraniteScreen framework\n//\n\n#import <Foundation/Foundation.h>\n\n// Version information\nFOUNDATION_EXPORT double GraniteScreenVersionNumber;\nFOUNDATION_EXPORT const unsigned char GraniteScreenVersionString[];"
  },
  {
    "path": "packages/granite-screen/ios/ReactNativeHosting/DefaultViews.swift",
    "content": "//\n//  DefaultViews.swift\n//  GraniteScreen\n//\n//  Default loading and error views for React Native hosting\n//\n\nimport UIKit\n\n/// Default loading view shown while React Native is loading\npublic class DefaultLoadingView: UIView {\n    private let activityIndicator = UIActivityIndicatorView(style: .large)\n    private let label = UILabel()\n    \n    public override init(frame: CGRect) {\n        super.init(frame: frame)\n        setupViews()\n    }\n    \n    public convenience init() {\n        self.init(frame: .zero)\n    }\n    \n    required init?(coder: NSCoder) {\n        super.init(coder: coder)\n        setupViews()\n    }\n    \n    private func setupViews() {\n        backgroundColor = .systemBackground\n        \n        // Setup activity indicator\n        activityIndicator.translatesAutoresizingMaskIntoConstraints = false\n        activityIndicator.startAnimating()\n        addSubview(activityIndicator)\n        \n        // Setup label\n        label.text = \"Loading React Native...\"\n        label.textColor = .label\n        label.textAlignment = .center\n        label.translatesAutoresizingMaskIntoConstraints = false\n        addSubview(label)\n        \n        // Layout constraints\n        NSLayoutConstraint.activate([\n            activityIndicator.centerXAnchor.constraint(equalTo: centerXAnchor),\n            activityIndicator.centerYAnchor.constraint(equalTo: centerYAnchor, constant: -20),\n            \n            label.topAnchor.constraint(equalTo: activityIndicator.bottomAnchor, constant: 16),\n            label.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 20),\n            label.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -20)\n        ])\n    }\n}\n\n/// Default error view shown when React Native fails to load\npublic class DefaultErrorView: UIView {\n    private let errorImageView = UIImageView()\n    private let titleLabel = UILabel()\n    private let messageLabel = UILabel()\n    private let retryButton = UIButton(type: .system)\n    \n    private let error: Error\n    public var onRetry: (() -> Void)?\n    \n    public init(error: Error) {\n        self.error = error\n        super.init(frame: .zero)\n        setupViews()\n    }\n    \n    required init?(coder: NSCoder) {\n        fatalError(\"init(coder:) has not been implemented\")\n    }\n    \n    private func setupViews() {\n        backgroundColor = .systemBackground\n        \n        // Setup error icon\n        errorImageView.image = UIImage(systemName: \"exclamationmark.triangle.fill\")\n        errorImageView.tintColor = .systemRed\n        errorImageView.contentMode = .scaleAspectFit\n        errorImageView.translatesAutoresizingMaskIntoConstraints = false\n        addSubview(errorImageView)\n        \n        // Setup title\n        titleLabel.text = \"Failed to Load\"\n        titleLabel.font = .systemFont(ofSize: 20, weight: .semibold)\n        titleLabel.textColor = .label\n        titleLabel.textAlignment = .center\n        titleLabel.translatesAutoresizingMaskIntoConstraints = false\n        addSubview(titleLabel)\n        \n        // Setup message\n        messageLabel.text = error.localizedDescription\n        messageLabel.font = .systemFont(ofSize: 16)\n        messageLabel.textColor = .secondaryLabel\n        messageLabel.textAlignment = .center\n        messageLabel.numberOfLines = 0\n        messageLabel.translatesAutoresizingMaskIntoConstraints = false\n        addSubview(messageLabel)\n        \n        // Setup retry button\n        retryButton.setTitle(\"Retry\", for: .normal)\n        retryButton.titleLabel?.font = .systemFont(ofSize: 17, weight: .medium)\n        retryButton.backgroundColor = .systemBlue\n        retryButton.setTitleColor(.white, for: .normal)\n        retryButton.layer.cornerRadius = 8\n        retryButton.translatesAutoresizingMaskIntoConstraints = false\n        retryButton.addTarget(self, action: #selector(retryTapped), for: .touchUpInside)\n        addSubview(retryButton)\n        \n        // Layout constraints\n        NSLayoutConstraint.activate([\n            errorImageView.centerXAnchor.constraint(equalTo: centerXAnchor),\n            errorImageView.centerYAnchor.constraint(equalTo: centerYAnchor, constant: -80),\n            errorImageView.widthAnchor.constraint(equalToConstant: 60),\n            errorImageView.heightAnchor.constraint(equalToConstant: 60),\n            \n            titleLabel.topAnchor.constraint(equalTo: errorImageView.bottomAnchor, constant: 20),\n            titleLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 20),\n            titleLabel.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -20),\n            \n            messageLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 12),\n            messageLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 40),\n            messageLabel.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -40),\n            \n            retryButton.topAnchor.constraint(equalTo: messageLabel.bottomAnchor, constant: 32),\n            retryButton.centerXAnchor.constraint(equalTo: centerXAnchor),\n            retryButton.widthAnchor.constraint(equalToConstant: 120),\n            retryButton.heightAnchor.constraint(equalToConstant: 44)\n        ])\n    }\n    \n    @objc private func retryTapped() {\n        onRetry?()\n    }\n}"
  },
  {
    "path": "packages/granite-screen/ios/ReactNativeHosting/GraniteDefaultModuleProvider.h",
    "content": "//  GraniteDefaultModuleProvider.h\n//  GraniteScreen\n//\n//  Exposes default module provisioning to Swift\n//\n\n#import <Foundation/Foundation.h>\n#if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)\n#import <React-RCTAppDelegate/RCTDependencyProvider.h>\n#else\n#import <React_RCTAppDelegate/RCTDependencyProvider.h>\n#endif\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface GraniteDefaultModuleProvider : NSObject\n\n+ (nullable id)defaultModuleInstanceForClass:(Class)moduleClass\n                          dependencyProvider:(nullable id<RCTDependencyProvider>)dependencyProvider\n    NS_SWIFT_NAME(defaultModuleInstance(for:dependencyProvider:));\n\n@end\n\nNS_ASSUME_NONNULL_END\n"
  },
  {
    "path": "packages/granite-screen/ios/ReactNativeHosting/GraniteDefaultModuleProvider.mm",
    "content": "#import \"GraniteDefaultModuleProvider.h\"\n\n// Declared in React-RCTAppDelegate but only exposed in ObjC++ headers.\n#ifdef __cplusplus\nextern \"C\" id RCTAppSetupDefaultModuleFromClass(\n    Class moduleClass,\n    id<RCTDependencyProvider> dependencyProvider);\n#else\nextern id RCTAppSetupDefaultModuleFromClass(\n    Class moduleClass,\n    id<RCTDependencyProvider> dependencyProvider);\n#endif\n\n@implementation GraniteDefaultModuleProvider\n\n+ (id)defaultModuleInstanceForClass:(Class)moduleClass\n                 dependencyProvider:(id<RCTDependencyProvider>)dependencyProvider\n{\n  return RCTAppSetupDefaultModuleFromClass(moduleClass, dependencyProvider);\n}\n\n@end\n"
  },
  {
    "path": "packages/granite-screen/ios/ReactNativeHosting/GraniteHostingHelper.swift",
    "content": "//\n//  GraniteHostingHelper.swift\n//  GraniteScreen\n//\n//  Helper extension for setting up React Native hosting with GraniteNativeFactory\n//\n\nimport React\nimport ReactAppDependencyProvider\nimport UIKit\n\nstruct GraniteHostItem {\n    var hostURL: URL\n    var moduleName: String\n}\n\npublic enum GraniteReactHostError: Error {\n    case bundleLoadError\n    case graniteItemConvertError\n    case rnHostViewFactoryError\n    case bundleURLParsingError\n}\n\nprivate var ReactNativeHostAssociatedKey: UInt8 = 0\nprivate var ReactNativeDelegateAssociatedKey: UInt8 = 0\n// MARK: - Setup Extension for GraniteReactHost\n/// Extension for classes implementing GraniteReactHost\n/// Provides one-line setup matching Android's pattern\npublic extension GraniteReactHost where Self: UIViewController {\n\n /// Setup React Native host with automatic lifecycle management\n    /// Call this in viewDidLoad() for one-line initialization like Android\n    @MainActor\n    func setupHost(bundleLoader: BundleLoadable,\n                   initialProperties: [AnyHashable: Any],\n                   launchOptions: [AnyHashable: Any]) async {\n        graniteSetupDidStart()\n        do {\n            let bundle = try await bundleLoader.loadBundle()\n            do {\n                let item = try await convertToGraniteItem(bundleSource: bundle)\n                let delegate = ReactNativeFactoryDelegate(url: item.hostURL)\n                delegate.dependencyProvider = RCTAppDependencyProvider()\n                // Use GraniteNativeFactoryWrapper to enable module customization\n                let factory = GraniteNativeFactoryImpl(delegate: delegate)\n                factory.reactHost = self  // self is GraniteReactHost\n                let rnHostView = factory.view(withModuleName: item.moduleName,\n                                              initialProperties: initialProperties,\n                                              launchOptions: launchOptions)\n                // 진성님 돌아오고나면 의견나눠보기 objC 기반으로 메모리 등록해서 사용하는방법\n                objc_setAssociatedObject(self, &ReactNativeHostAssociatedKey, factory, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)\n                objc_setAssociatedObject(self, &ReactNativeDelegateAssociatedKey, delegate, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)\n                if let rnHostView {\n                    setGraniteBaseView(graniteBaseView: rnHostView)\n                    graniteSetupDidFinish()\n                } else {\n                    graniteSetupDidError(didFailWith: GraniteReactHostError.rnHostViewFactoryError)\n                }\n            } catch {\n                graniteSetupDidError(didFailWith: GraniteReactHostError.graniteItemConvertError)\n            }\n        } catch {\n            graniteSetupDidError(didFailWith: GraniteReactHostError.bundleLoadError)\n        }\n    }\n\n    private func setGraniteBaseView(graniteBaseView: UIView) {\n        self.graniteBaseView = graniteBaseView\n        view.addSubview(graniteBaseView)\n        graniteBaseView.translatesAutoresizingMaskIntoConstraints = false\n        NSLayoutConstraint.activate([\n            graniteBaseView.topAnchor.constraint(equalTo: view.topAnchor),\n            graniteBaseView.leadingAnchor.constraint(equalTo: view.leadingAnchor),\n            graniteBaseView.trailingAnchor.constraint(equalTo: view.trailingAnchor),\n            graniteBaseView.bottomAnchor.constraint(equalTo: view.bottomAnchor)\n        ])\n    }\n\n    private func convertToGraniteItem(bundleSource: BundleSource) async throws -> GraniteHostItem {\n        switch bundleSource {\n        case .devServer(let host, let port, let moduleName, let forBundleRoot):\n            if let url = URL(string: \"http://\\(host):\\(port)/\\(forBundleRoot).bundle?platform=ios&dev=true&minify=false\") {\n                return .init(hostURL: url, moduleName: moduleName)\n            } else {\n                let url = URL(string: \"http://\\(host):\\(port)/\\(forBundleRoot).bundle?platform=ios&dev=true&minify=false\")\n                return .init(hostURL: url!, moduleName: moduleName)\n            }\n        case .production(let location, let moduleName):\n            switch location {\n            case .fileSystemBundle(let filePath):\n                return .init(hostURL: filePath, moduleName: moduleName)\n            case .embeddedBundle:\n                if let url = Bundle.main.url(forResource: \"main\", withExtension: \"jsbundle\") {\n                    return .init(hostURL: url, moduleName: moduleName)\n                } else {\n                    throw GraniteReactHostError.bundleURLParsingError\n                }\n            }\n        case .customPath(let url, let moduleName):\n            return .init(hostURL: url, moduleName: moduleName)\n        }\n    }\n}\n"
  },
  {
    "path": "packages/granite-screen/ios/ReactNativeHosting/GraniteNativeFactory.swift",
    "content": "//\n//  GraniteNativeFactory.swift\n//  GraniteScreen\n//\n//  Swift implementation of GraniteNativeFactory\n//\n\nimport Foundation\nimport ObjectiveC\nimport React_RCTAppDelegate\nimport UIKit\n\n@objcMembers\nopen class GraniteNativeFactory: RCTReactNativeFactory {\n\n    open func view(\n        withModuleName moduleName: String,\n        initialProperties initProps: [AnyHashable: Any]?,\n        launchOptions: [AnyHashable: Any]?\n    ) -> UIView? {\n        return self.rootViewFactory.view(\n            withModuleName: moduleName,\n            initialProperties: initProps,\n            launchOptions: launchOptions\n        )\n    }\n\n    @objc(getModuleInstanceFromClass:)\n    open func getModuleInstance(from moduleClass: AnyClass) -> Any? {\n        return GraniteDefaultModuleProvider.defaultModuleInstance(\n            for: moduleClass,\n            dependencyProvider: delegate?.dependencyProvider\n        )\n    }\n}\n"
  },
  {
    "path": "packages/granite-screen/ios/ReactNativeHosting/GraniteNativeFactoryDelegateImpl.swift",
    "content": "//\n//  GraniteNativeFactoryDelegateImpl.swift\n//  GraniteScreen\n//\n//  Swift implementation of GraniteNativeFactoryDelegate for custom bundle loading\n//\nimport Foundation\nimport React\nimport React_RCTAppDelegate\n\npublic class ReactNativeFactoryDelegate: RCTDefaultReactNativeFactoryDelegate {\n    private let url: URL\n\n    public init(url: URL) {\n        self.url = url\n        super.init()\n    }\n\n    @objc public override func bundleURL() -> URL? {\n        return url\n    }\n\n    public override func sourceURL(for bridge: RCTBridge) -> URL? {\n        return bundleURL()\n    }\n\n    public override func bridgelessEnabled() -> Bool {\n        return true\n    }\n}\n"
  },
  {
    "path": "packages/granite-screen/ios/ReactNativeHosting/GraniteNativeFactoryImpl.swift",
    "content": "//\n//  GraniteNativeFactoryImpl.swift\n//  GraniteScreen\n//\n//  Wrapper for GraniteNativeFactory to enable module customization\n//\n\nimport Foundation\nimport React_RCTAppDelegate\n\n/// Internal wrapper class that bridges GraniteReactHost with GraniteNativeFactory\n@objcMembers\npublic class GraniteNativeFactoryImpl: GraniteNativeFactory {\n    weak var reactHost: GraniteReactHost?\n\n    @objc(getModuleInstanceFromClass:)\n    public override func getModuleInstance(from moduleClass: AnyClass) -> Any? {\n        if let customInstance = reactHost?.getModuleInstance(from: moduleClass) {\n            return customInstance\n        }\n\n        return super.getModuleInstance(from: moduleClass)\n    }\n}\n"
  },
  {
    "path": "packages/granite-screen/ios/ReactNativeHosting/GraniteReactHost.swift",
    "content": "//\n//  GraniteReactHost.swift\n//  GraniteScreen\n//\n//  Protocol for hosting React Native views - matches Android's GraniteReactHost\n//\n\nimport React\nimport ReactAppDependencyProvider\nimport UIKit\n\n/// Protocol for hosting React Native components in iOS ViewControllers\n/// This matches Android's GraniteReactHost interface with Swift-style naming conventions\npublic protocol GraniteReactHost: AnyObject {\n    var graniteBaseView: UIView? { get set }\n    /// Bundle loader - property as it represents a configuration value\n    /// Return nil to use the default bundle from app\n    var bundleLoader: BundleLoadable { get }\n    func graniteSetupDidStart()\n    func graniteSetupDidFinish()\n    func graniteSetupDidError(didFailWith error: Error)\n    /// Module instance creation (same as Objective-C)\n    /// Returns nil by default, override to customize module creation\n    func getModuleInstance(from moduleClass: AnyClass) -> Any?\n    /// Module instance creation with a default instance from React Native\n    /// Return a custom instance or nil to use the default\n    func getModuleInstance(from moduleClass: AnyClass, defaultInstance: Any?) -> Any?\n}\n\n// Default implementation - returns nil\nextension GraniteReactHost {\n    public func getModuleInstance(from moduleClass: AnyClass) -> Any? {\n        return nil  // Default returns nil\n    }\n\n    public func getModuleInstance(from moduleClass: AnyClass, defaultInstance: Any?) -> Any? {\n        return getModuleInstance(from: moduleClass) ?? defaultInstance\n    }\n}\n"
  },
  {
    "path": "packages/granite-screen/ios/ReactNativeHosting/GraniteScreen-Bridging-Header.h",
    "content": "//\n//  GraniteScreen-Bridging-Header.h\n//  GraniteScreen\n//\n//  Bridging header to expose Objective-C classes to Swift\n//\n\n#import <React/RCTBridgeModule.h>\n#import <React/RCTBridge.h>\n#import <React/RCTRootView.h>\n#import <React/RCTBridgeDelegate.h>\n#import \"GraniteDefaultModuleProvider.h\"\n"
  },
  {
    "path": "packages/granite-screen/package.json",
    "content": "{\n  \"name\": \"@granite-js/screen\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Brownfield Screen for React Native\",\n  \"files\": [\n    \"dist\",\n    \"src\",\n    \"ios\",\n    \"android\",\n    \"gradle-plugin\",\n    \"react-native.config.js\",\n    \"!ios/build\",\n    \"!android/build\",\n    \"!android/gradle\",\n    \"!android/gradlew\",\n    \"!android/gradlew.bat\",\n    \"!android/local.properties\",\n    \"!**/__tests__\",\n    \"!**/__fixtures__\",\n    \"!**/__mocks__\",\n    \"!**/.*\",\n    \"GraniteScreen.podspec\",\n    \"package.json\"\n  ],\n  \"scripts\": {\n    \"build\": \"cd gradle-plugin && ./gradlew jar\",\n    \"test:gradle-plugin\": \"cd gradle-plugin && ./gradlew test\",\n    \"prepack\": \"cd gradle-plugin && ./gradlew jar\"\n  },\n  \"nx\": {\n    \"targets\": {\n      \"build\": {\n        \"inputs\": [\n          \"{projectRoot}/gradle-plugin/src/**\",\n          \"{projectRoot}/gradle-plugin/build.gradle.kts\",\n          \"{projectRoot}/gradle-plugin/settings.gradle.kts\",\n          \"{projectRoot}/gradle-plugin/gradle.properties\",\n          \"{projectRoot}/gradle-plugin/gradle/libs.versions.toml\"\n        ],\n        \"outputs\": [\n          \"{projectRoot}/gradle-plugin/build/libs\"\n        ]\n      }\n    }\n  },\n  \"license\": \"Apache-2.0\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/granite-screen\"\n  }\n}\n"
  },
  {
    "path": "packages/granite-screen/react-native.config.js",
    "content": "module.exports = {\n  dependency: {\n    platforms: {\n      android: null, // Android autolinking 비활성화\n      ios: null, // iOS autolinking 비활성화\n    },\n  },\n};\n"
  },
  {
    "path": "packages/image/CHANGELOG.md",
    "content": "# @granite-js/image\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n## 1.0.18\n\n## 1.0.17\n\n## 1.0.16\n\n## 1.0.15\n\n## 1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- e26b4ea: refactor(android): improve GraniteImage code quality - fix bugs, reduce complexity, introduce DI\n- eddab4b: feat(android): implement clearMemoryCache/clearDiskCache for GraniteImage Android\n\n## 1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- 1ad07a5: Granite Image Props 개선\n\n## 1.0.10\n\n## 1.0.9\n\n## 1.0.8\n\n## 1.0.7\n\n## 1.0.6\n\n## 1.0.5\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "packages/image/GraniteImage.podspec",
    "content": "require \"json\"\n\npackage = JSON.parse(File.read(File.join(__dir__, \"package.json\")))\n\n# ============================================================\n# GraniteImage Default Provider Configuration\n# ============================================================\n# Priority: GRANITE_IMAGE_DEFAULT_PROVIDER > GRANITE_DEFAULT_PROVIDER_ALL > true (default)\n#\n# Examples:\n#   Include default provider (default):\n#     pod install\n#\n#   Exclude default provider for image only:\n#     GRANITE_IMAGE_DEFAULT_PROVIDER=false pod install\n#\n#   Exclude default providers for all Granite packages:\n#     GRANITE_DEFAULT_PROVIDER_ALL=false pod install\n#\n#   Exclude all but override image to include:\n#     GRANITE_DEFAULT_PROVIDER_ALL=false GRANITE_IMAGE_DEFAULT_PROVIDER=true pod install\n# ============================================================\nresolve_default_provider = lambda do |specific_key, fallback_key, default_value|\n  if ENV.key?(specific_key)\n    ENV[specific_key] == 'true'\n  elsif ENV.key?(fallback_key)\n    ENV[fallback_key] == 'true'\n  else\n    default_value\n  end\nend\n\nuse_default_provider = resolve_default_provider.call(\n  'GRANITE_IMAGE_DEFAULT_PROVIDER',\n  'GRANITE_DEFAULT_PROVIDER_ALL',\n  true\n)\n\nexclude_patterns = []\nexclude_patterns << \"ios/Providers/SDWebImageProvider.swift\" unless use_default_provider\n\nPod::Spec.new do |s|\n  s.name         = \"GraniteImage\"\n  s.version      = package[\"version\"]\n  s.summary      = package[\"description\"]\n  s.homepage     = package[\"homepage\"]\n  s.license      = package[\"license\"]\n  s.authors      = package[\"author\"]\n\n  s.platforms    = { :ios => min_ios_version_supported }\n  s.source       = { :git => \"https://github.com/toss/granite.git\", :tag => \"#{s.version}\" }\n\n  s.source_files = \"ios/**/*.{h,m,mm,swift,cpp}\"\n  s.exclude_files = exclude_patterns if exclude_patterns.any?\n\n  # Set preprocessor macros\n  swift_flags = []\n  swift_flags << 'GRANITE_IMAGE_DEFAULT_PROVIDER' if use_default_provider\n\n  s.pod_target_xcconfig = {\n    'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => swift_flags.join(' '),\n    'CLANG_ENABLE_MODULES' => 'YES',\n    'SWIFT_OBJC_INTERFACE_HEADER_NAME' => 'GraniteImage-Swift.h'\n  }\n\n  install_modules_dependencies(s)\n\n  # Include SDWebImage dependency only when using default provider\n  if use_default_provider\n    s.dependency \"SDWebImage\", \"~> 5.18\"\n  end\nend\n"
  },
  {
    "path": "packages/image/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/image/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/image\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@granite-js/image**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/toss/granite.git\n\t\n2. **@types/react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n3. **del-cli**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/sindresorhus/del-cli.git\n\t\n4. **eslint**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/eslint/eslint.git\n\t\n5. **react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/react.git\n\t\n6. **react-native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/react-native.git\n\t\n7. **react-native-builder-bob**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/callstack/react-native-builder-bob.git\n\t\n8. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/image/README.md",
    "content": "# @granite-js/image\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/image/android/build.gradle",
    "content": "buildscript {\n  ext.safeExtGet = {prop, fallback ->\n    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback\n  }\n  ext.getExtOrDefault = {name ->\n    return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['GraniteImage_' + name]\n  }\n\n  repositories {\n    google()\n    mavenCentral()\n  }\n\n  dependencies {\n    classpath \"com.android.tools.build:gradle:8.7.2\"\n    // noinspection DifferentKotlinGradleVersion\n    classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}\"\n  }\n}\n\n\napply plugin: \"com.android.library\"\napply plugin: \"kotlin-android\"\n\napply plugin: \"com.facebook.react\"\n\n// ============================================================\n// GraniteImage Default Provider Configuration\n// ============================================================\n// Priority: Environment Variable > gradle.properties > default (true)\n//\n// Environment Variables:\n//   GRANITE_IMAGE_DEFAULT_PROVIDER - Image specific override\n//   GRANITE_DEFAULT_PROVIDER_ALL - Global default for all Granite packages\n//\n// gradle.properties (alternative):\n//   GRANITE_IMAGE_DEFAULT_PROVIDER=false\n//   GRANITE_DEFAULT_PROVIDER_ALL=false\n//\n// Examples:\n//   Include default provider (default):\n//     ./gradlew assembleDebug\n//\n//   Exclude default provider for image only (env var):\n//     GRANITE_IMAGE_DEFAULT_PROVIDER=false ./gradlew assembleDebug\n//\n//   Exclude default provider via gradle.properties:\n//     # In gradle.properties:\n//     GRANITE_IMAGE_DEFAULT_PROVIDER=false\n//\n//   Exclude all but override image to include:\n//     GRANITE_DEFAULT_PROVIDER_ALL=false GRANITE_IMAGE_DEFAULT_PROVIDER=true ./gradlew assembleDebug\n//\n// Provider Selection (when default provider is enabled):\n//   GRANITE_PROVIDER=okhttp   - OkHttp (default, minimal dependencies)\n//   GRANITE_PROVIDER=glide    - Glide library\n//   GRANITE_PROVIDER=coil     - Coil library\n//\n// Example: ./gradlew assembleDebug -PGRANITE_PROVIDER=glide\n// ============================================================\ndef resolveDefaultProvider(String specificKey, String fallbackKey, boolean defaultValue) {\n    // Priority: Environment Variable > gradle.properties > default\n\n    // Check specific key\n    def specificEnvValue = System.getenv(specificKey)\n    if (specificEnvValue != null) {\n        return specificEnvValue == 'true'\n    }\n    def specificPropValue = project.findProperty(specificKey)\n    if (specificPropValue != null) {\n        return specificPropValue.toString() == 'true'\n    }\n\n    // Check fallback key\n    def fallbackEnvValue = System.getenv(fallbackKey)\n    if (fallbackEnvValue != null) {\n        return fallbackEnvValue == 'true'\n    }\n    def fallbackPropValue = project.findProperty(fallbackKey)\n    if (fallbackPropValue != null) {\n        return fallbackPropValue.toString() == 'true'\n    }\n\n    return defaultValue\n}\n\ndef includeDefaultProvider = resolveDefaultProvider(\n    'GRANITE_IMAGE_DEFAULT_PROVIDER',\n    'GRANITE_DEFAULT_PROVIDER_ALL',\n    true\n)\n\ndef graniteProvider = project.hasProperty('GRANITE_PROVIDER') ? project.property('GRANITE_PROVIDER') : 'okhttp'\nprintln \"GraniteImage: includeDefaultProvider=${includeDefaultProvider}, provider=${graniteProvider}\"\n\ndef getExtOrIntegerDefault(name) {\n  return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties[\"GraniteImage_\" + name]).toInteger()\n}\n\nandroid {\n  namespace \"run.granite.image\"\n\n  compileSdkVersion getExtOrIntegerDefault(\"compileSdkVersion\")\n\n  defaultConfig {\n    minSdkVersion getExtOrIntegerDefault(\"minSdkVersion\")\n    targetSdkVersion getExtOrIntegerDefault(\"targetSdkVersion\")\n\n    buildConfigField \"boolean\", \"INCLUDE_DEFAULT_PROVIDER\", \"${includeDefaultProvider}\"\n    buildConfigField \"String\", \"GRANITE_PROVIDER\", \"\\\"${graniteProvider}\\\"\"\n  }\n\n  buildFeatures {\n    buildConfig true\n  }\n\n  buildTypes {\n    release {\n      minifyEnabled false\n    }\n  }\n\n  lintOptions {\n    disable \"GradleCompatible\"\n  }\n\n  compileOptions {\n    sourceCompatibility JavaVersion.VERSION_17\n    targetCompatibility JavaVersion.VERSION_17\n  }\n\n  kotlinOptions {\n    jvmTarget = '17'\n  }\n\n  sourceSets {\n    main {\n      if (includeDefaultProvider) {\n        java.srcDirs += [\n          \"generated/java\",\n          \"generated/jni\",\n          \"src/${graniteProvider}/java\"\n        ]\n      } else {\n        java.srcDirs += [\n          \"generated/java\",\n          \"generated/jni\"\n        ]\n      }\n    }\n  }\n}\n\nrepositories {\n  mavenCentral()\n  google()\n}\n\ndef kotlin_version = getExtOrDefault(\"kotlinVersion\")\n\ndependencies {\n  implementation \"com.facebook.react:react-android\"\n  implementation \"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version\"\n\n  // Provider-specific dependencies (only included when default provider is enabled)\n  if (includeDefaultProvider) {\n    if (graniteProvider == 'okhttp') {\n      implementation \"com.squareup.okhttp3:okhttp:4.12.0\"\n    }\n    if (graniteProvider == 'glide') {\n      implementation \"com.github.bumptech.glide:glide:4.16.0\"\n      annotationProcessor \"com.github.bumptech.glide:compiler:4.16.0\"\n    }\n    if (graniteProvider == 'coil') {\n      implementation \"io.coil-kt:coil:2.5.0\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/image/android/gradle.properties",
    "content": "GraniteImage_kotlinVersion=2.0.21\nGraniteImage_minSdkVersion=24\nGraniteImage_targetSdkVersion=34\nGraniteImage_compileSdkVersion=35\nGraniteImage_ndkVersion=27.1.12297006\n"
  },
  {
    "path": "packages/image/android/src/coil/java/run/granite/image/providers/CoilImageProvider.kt",
    "content": "package run.granite.image.providers\n\nimport android.content.Context\nimport android.graphics.Bitmap\nimport android.graphics.PorterDuff\nimport android.graphics.PorterDuffColorFilter\nimport android.graphics.drawable.BitmapDrawable\nimport android.net.Uri\nimport android.util.Log\nimport android.view.View\nimport android.widget.ImageView\nimport run.granite.image.GraniteImageProvider\nimport run.granite.image.GraniteImagePriority\nimport run.granite.image.GraniteImageCachePolicy\nimport run.granite.image.GraniteImageProgressCallback\nimport run.granite.image.GraniteImageCompletionCallback\nimport coil.Coil\nimport coil.load\nimport coil.request.CachePolicy\nimport coil.request.ErrorResult\nimport coil.request.ImageRequest\nimport coil.request.SuccessResult\n\n/**\n * GraniteImageProvider implementation using Coil.\n */\nclass CoilImageProvider : GraniteImageProvider {\n    override fun loadImage(url: String, into: View, scaleType: ImageView.ScaleType) {\n        loadImage(url, into, scaleType, null, GraniteImagePriority.NORMAL, GraniteImageCachePolicy.DISK, null, null, null)\n    }\n\n    private fun isValidImageUrl(url: String): Boolean {\n        return try {\n            val uri = Uri.parse(url)\n            val scheme = uri.scheme?.lowercase()\n            scheme == \"http\" || scheme == \"https\" || scheme == \"file\" || scheme == \"content\"\n        } catch (e: Exception) {\n            false\n        }\n    }\n\n    override fun loadImage(\n        url: String,\n        into: View?,\n        scaleType: ImageView.ScaleType,\n        headers: Map<String, String>?,\n        priority: GraniteImagePriority,\n        cachePolicy: GraniteImageCachePolicy,\n        defaultSource: String?,\n        progressCallback: GraniteImageProgressCallback?,\n        completionCallback: GraniteImageCompletionCallback?\n    ) {\n        val imageView = validateImageView(into, scaleType, completionCallback) ?: return\n\n        if (!isValidImageUrl(url)) {\n            Log.e(TAG, \"Invalid URL: $url\")\n            completionCallback?.invoke(null, Exception(\"Invalid URL: $url\"), 0, 0)\n            return\n        }\n\n        imageView.load(url) {\n            headers?.forEach { (key, value) -> addHeader(key, value) }\n            applyCachePolicy(cachePolicy)\n            applyPlaceholder(imageView.context, defaultSource)\n            listener(\n                onStart = { Log.d(TAG, \"Loading started: $url\") },\n                onSuccess = { _, result -> handleSuccess(result, url, completionCallback) },\n                onError = { _, result -> handleError(result, completionCallback) }\n            )\n        }\n    }\n\n    private fun validateImageView(\n        into: View?,\n        scaleType: ImageView.ScaleType,\n        completionCallback: GraniteImageCompletionCallback?\n    ): ImageView? {\n        if (into == null) {\n            completionCallback?.invoke(null, Exception(\"No view provided\"), 0, 0)\n            return null\n        }\n        if (into !is ImageView) {\n            Log.e(TAG, \"View is not an ImageView\")\n            completionCallback?.invoke(null, Exception(\"View is not an ImageView\"), 0, 0)\n            return null\n        }\n        into.scaleType = scaleType\n        return into\n    }\n\n    private fun ImageRequest.Builder.applyCachePolicy(cachePolicy: GraniteImageCachePolicy) {\n        when (cachePolicy) {\n            GraniteImageCachePolicy.NONE -> {\n                memoryCachePolicy(CachePolicy.DISABLED)\n                diskCachePolicy(CachePolicy.DISABLED)\n            }\n            GraniteImageCachePolicy.MEMORY -> {\n                memoryCachePolicy(CachePolicy.ENABLED)\n                diskCachePolicy(CachePolicy.DISABLED)\n            }\n            GraniteImageCachePolicy.DISK -> {\n                memoryCachePolicy(CachePolicy.ENABLED)\n                diskCachePolicy(CachePolicy.ENABLED)\n            }\n        }\n    }\n\n    private fun ImageRequest.Builder.applyPlaceholder(context: Context, defaultSource: String?) {\n        if (!defaultSource.isNullOrEmpty()) {\n            val resourceId = context.resources.getIdentifier(defaultSource, \"drawable\", context.packageName)\n            if (resourceId != 0) placeholder(resourceId)\n        }\n    }\n\n    private fun handleSuccess(\n        result: SuccessResult,\n        url: String,\n        completionCallback: GraniteImageCompletionCallback?\n    ) {\n        val bitmap = (result.drawable as? BitmapDrawable)?.bitmap\n        Log.d(TAG, \"Loaded with Coil: $url\")\n        completionCallback?.invoke(bitmap, null, bitmap?.width ?: 0, bitmap?.height ?: 0)\n    }\n\n    private fun handleError(result: ErrorResult, completionCallback: GraniteImageCompletionCallback?) {\n        Log.e(TAG, \"Error loading image: ${result.throwable.message}\")\n        completionCallback?.invoke(null, result.throwable as? Exception, 0, 0)\n    }\n\n    override fun cancelLoad(view: View) {\n        if (view is ImageView) {\n            view.load(null as String?)\n        }\n    }\n\n    override fun applyTintColor(color: Int, view: View) {\n        if (view is ImageView) {\n            view.colorFilter = PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN)\n        }\n    }\n\n    override fun loadImage(\n        url: String,\n        imageView: Nothing?,\n        contentMode: String,\n        headers: Map<String, String>?,\n        priority: GraniteImagePriority,\n        cachePolicy: GraniteImageCachePolicy,\n        onProgress: GraniteImageProgressCallback?,\n        onCompletion: ((success: Boolean, width: Int, height: Int, error: String?) -> Unit)?\n    ) {\n        // Coil preload is not directly supported without a context\n        onCompletion?.invoke(false, 0, 0, \"Preload not supported without context\")\n    }\n\n    override fun clearMemoryCache(context: Context) {\n        Coil.imageLoader(context).memoryCache?.clear()\n        Log.d(TAG, \"Memory cache cleared (Coil 2.x)\")\n    }\n\n    override fun clearDiskCache(context: Context) {\n        // Coil 2.x: no public API for diskCache — no-op\n        Log.d(TAG, \"Disk cache clear not supported (Coil 2.x)\")\n    }\n\n    companion object {\n        private const val TAG = \"CoilImageProvider\"\n    }\n}\n"
  },
  {
    "path": "packages/image/android/src/glide/java/run/granite/image/providers/GlideImageProvider.kt",
    "content": "package run.granite.image.providers\n\nimport android.content.Context\nimport android.graphics.Bitmap\nimport android.graphics.PorterDuff\nimport android.graphics.PorterDuffColorFilter\nimport android.os.Handler\nimport android.os.Looper\nimport android.util.Log\nimport android.view.View\nimport android.widget.ImageView\nimport com.bumptech.glide.Glide\nimport com.bumptech.glide.load.DataSource\nimport com.bumptech.glide.load.engine.DiskCacheStrategy\nimport com.bumptech.glide.load.engine.GlideException\nimport com.bumptech.glide.load.model.GlideUrl\nimport com.bumptech.glide.load.model.LazyHeaders\nimport com.bumptech.glide.request.RequestListener\nimport com.bumptech.glide.request.target.Target\nimport com.bumptech.glide.Priority as GlidePriority\nimport run.granite.image.GraniteImageProvider\nimport run.granite.image.GraniteImagePriority\nimport run.granite.image.GraniteImageCachePolicy\nimport run.granite.image.GraniteImageProgressCallback\nimport run.granite.image.GraniteImageCompletionCallback\nimport java.util.concurrent.Executors\n\n/**\n * GraniteImageProvider implementation using Glide.\n */\nclass GlideImageProvider : GraniteImageProvider {\n    override fun loadImage(url: String, into: View, scaleType: ImageView.ScaleType) {\n        loadImage(url, into, scaleType, null, GraniteImagePriority.NORMAL, GraniteImageCachePolicy.DISK, null, null, null)\n    }\n\n    override fun loadImage(\n        url: String,\n        into: View?,\n        scaleType: ImageView.ScaleType,\n        headers: Map<String, String>?,\n        priority: GraniteImagePriority,\n        cachePolicy: GraniteImageCachePolicy,\n        defaultSource: String?,\n        progressCallback: GraniteImageProgressCallback?,\n        completionCallback: GraniteImageCompletionCallback?\n    ) {\n        val imageView = validateImageView(into, scaleType, completionCallback) ?: return\n        val context = imageView.context ?: run {\n            completionCallback?.invoke(null, Exception(\"Glide requires a view context for image loading\"), 0, 0)\n            return\n        }\n\n        val glideUrl = buildGlideUrl(url, headers)\n        val requestBuilder = configureRequest(context, glideUrl, priority, cachePolicy, defaultSource)\n            .listener(createRequestListener(url, completionCallback))\n\n        requestBuilder.into(imageView)\n    }\n\n    private fun validateImageView(\n        into: View?,\n        scaleType: ImageView.ScaleType,\n        completionCallback: GraniteImageCompletionCallback?\n    ): ImageView? {\n        if (into == null) return null\n        if (into !is ImageView) {\n            Log.e(TAG, \"View is not an ImageView\")\n            completionCallback?.invoke(null, Exception(\"View is not an ImageView\"), 0, 0)\n            return null\n        }\n        into.scaleType = scaleType\n        return into\n    }\n\n    private fun buildGlideUrl(url: String, headers: Map<String, String>?): GlideUrl {\n        if (headers.isNullOrEmpty()) return GlideUrl(url)\n        val headersBuilder = LazyHeaders.Builder()\n        headers.forEach { (key, value) -> headersBuilder.addHeader(key, value) }\n        return GlideUrl(url, headersBuilder.build())\n    }\n\n    private fun configureRequest(\n        context: Context,\n        glideUrl: GlideUrl,\n        priority: GraniteImagePriority,\n        cachePolicy: GraniteImageCachePolicy,\n        defaultSource: String?\n    ): com.bumptech.glide.RequestBuilder<Bitmap> {\n        var builder = Glide.with(context).asBitmap().load(glideUrl)\n\n        builder = when (priority) {\n            GraniteImagePriority.LOW -> builder.priority(GlidePriority.LOW)\n            GraniteImagePriority.NORMAL -> builder.priority(GlidePriority.NORMAL)\n            GraniteImagePriority.HIGH -> builder.priority(GlidePriority.HIGH)\n        }\n\n        builder = when (cachePolicy) {\n            GraniteImageCachePolicy.NONE -> builder.diskCacheStrategy(DiskCacheStrategy.NONE).skipMemoryCache(true)\n            GraniteImageCachePolicy.MEMORY -> builder.diskCacheStrategy(DiskCacheStrategy.NONE)\n            GraniteImageCachePolicy.DISK -> builder.diskCacheStrategy(DiskCacheStrategy.ALL)\n        }\n\n        if (!defaultSource.isNullOrEmpty()) {\n            val resourceId = context.resources.getIdentifier(defaultSource, \"drawable\", context.packageName)\n            if (resourceId != 0) builder = builder.placeholder(resourceId)\n        }\n\n        return builder\n    }\n\n    private fun createRequestListener(\n        url: String,\n        completionCallback: GraniteImageCompletionCallback?\n    ): RequestListener<Bitmap> = object : RequestListener<Bitmap> {\n        override fun onLoadFailed(\n            e: GlideException?, model: Any?, target: Target<Bitmap>, isFirstResource: Boolean\n        ): Boolean {\n            Log.e(TAG, \"Error loading image: ${e?.message}\")\n            completionCallback?.invoke(null, e, 0, 0)\n            return false\n        }\n\n        override fun onResourceReady(\n            resource: Bitmap, model: Any, target: Target<Bitmap>?, dataSource: DataSource, isFirstResource: Boolean\n        ): Boolean {\n            val cacheType = when (dataSource) {\n                DataSource.MEMORY_CACHE -> \"Memory\"\n                DataSource.DATA_DISK_CACHE, DataSource.RESOURCE_DISK_CACHE -> \"Disk\"\n                else -> \"Network\"\n            }\n            Log.d(TAG, \"Loaded with Glide ($cacheType): $url\")\n            completionCallback?.invoke(resource, null, resource.width, resource.height)\n            return false\n        }\n    }\n\n    override fun cancelLoad(view: View) {\n        if (view is ImageView) {\n            Glide.with(view.context).clear(view)\n        }\n    }\n\n    override fun applyTintColor(color: Int, view: View) {\n        if (view is ImageView) {\n            view.colorFilter = PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN)\n        }\n    }\n\n    override fun loadImage(\n        url: String,\n        imageView: Nothing?,\n        contentMode: String,\n        headers: Map<String, String>?,\n        priority: GraniteImagePriority,\n        cachePolicy: GraniteImageCachePolicy,\n        onProgress: GraniteImageProgressCallback?,\n        onCompletion: ((success: Boolean, width: Int, height: Int, error: String?) -> Unit)?\n    ) {\n        // Glide preload is not directly supported without a context\n        // This would need an Application context passed during initialization\n        onCompletion?.invoke(false, 0, 0, \"Preload not supported without context\")\n    }\n\n    override fun clearMemoryCache(context: Context) {\n        // Glide: clearMemory() must be called on the main thread\n        if (Looper.myLooper() == Looper.getMainLooper()) {\n            Glide.get(context).clearMemory()\n        } else {\n            Handler(Looper.getMainLooper()).post {\n                Glide.get(context).clearMemory()\n            }\n        }\n        Log.d(TAG, \"Memory cache cleared (Glide)\")\n    }\n\n    override fun clearDiskCache(context: Context) {\n        // Glide: clearDiskCache() must be called on a background thread\n        if (Looper.myLooper() != Looper.getMainLooper()) {\n            Glide.get(context).clearDiskCache()\n        } else {\n            Executors.newSingleThreadExecutor().execute {\n                Glide.get(context).clearDiskCache()\n            }\n        }\n        Log.d(TAG, \"Disk cache cleared (Glide)\")\n    }\n\n    companion object {\n        private const val TAG = \"GlideImageProvider\"\n    }\n}\n"
  },
  {
    "path": "packages/image/android/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n</manifest>\n"
  },
  {
    "path": "packages/image/android/src/main/java/run/granite/image/GraniteImage.kt",
    "content": "package run.granite.image\n\nimport android.content.Context\nimport android.graphics.Bitmap\nimport android.graphics.Color\nimport android.graphics.PorterDuff\nimport android.graphics.PorterDuffColorFilter\nimport android.util.Log\nimport android.view.Gravity\nimport android.view.View\nimport android.widget.FrameLayout\nimport android.widget.ImageView\nimport android.widget.TextView\nimport com.facebook.react.bridge.ReactContext\nimport com.facebook.react.uimanager.UIManagerHelper\nimport com.facebook.react.uimanager.events.Event\nimport org.json.JSONObject\n\n/**\n * Custom FrameLayout that serves as a container for the GraniteImage Fabric Component.\n * It delegates actual image loading to the registered GraniteImageProvider.\n */\nclass GraniteImage(context: Context) : FrameLayout(context) {\n    internal var providerResolver: () -> GraniteImageProvider? = { GraniteImageRegistry.provider }\n\n    private var containerView: View? = null\n    private var currentUri: String? = null\n    private var currentScaleType: ImageView.ScaleType = ImageView.ScaleType.CENTER_CROP\n\n    // New properties\n    private var currentHeaders: Map<String, String>? = null\n    private var currentPriority: GraniteImagePriority = GraniteImagePriority.NORMAL\n    private var currentCachePolicy: GraniteImageCachePolicy = GraniteImageCachePolicy.DISK\n    private var currentTintColor: Int? = null\n    private var currentDefaultSource: String? = null\n    private var currentFallbackSource: String? = null\n\n    init {\n        Log.d(TAG, \"GraniteImage initialized\")\n    }\n\n    private fun dispatchEvent(event: Event<*>) {\n        val reactContext = context as? ReactContext ?: return\n        UIManagerHelper.getEventDispatcherForReactTag(reactContext, id)?.dispatchEvent(event)\n    }\n\n    private fun emitLoadStart() =\n        dispatchEvent(GraniteImageLoadStartEvent(UIManagerHelper.getSurfaceId(this), id))\n\n    private fun emitProgress(loaded: Int, total: Int) =\n        dispatchEvent(GraniteImageProgressEvent(UIManagerHelper.getSurfaceId(this), id, loaded, total))\n\n    private fun emitLoad(width: Int, height: Int) =\n        dispatchEvent(GraniteImageLoadEvent(UIManagerHelper.getSurfaceId(this), id, width, height))\n\n    private fun emitError(error: String) =\n        dispatchEvent(GraniteImageErrorEvent(UIManagerHelper.getSurfaceId(this), id, error))\n\n    private fun emitLoadEnd() =\n        dispatchEvent(GraniteImageLoadEndEvent(UIManagerHelper.getSurfaceId(this), id))\n\n    fun setUri(uri: String?) {\n        if (uri != currentUri) {\n            currentUri = uri\n            loadImageIfReady()\n        }\n    }\n\n    fun setHeaders(headersJson: String?) {\n        currentHeaders = headersJson?.let {\n            try {\n                val json = JSONObject(it)\n                val map = mutableMapOf<String, String>()\n                json.keys().forEach { key ->\n                    map[key] = json.getString(key)\n                }\n                map\n            } catch (e: Exception) {\n                Log.e(TAG, \"Failed to parse headers JSON: $e\")\n                null\n            }\n        }\n    }\n\n    fun setContentMode(contentMode: String?) {\n        val newScaleType = when (contentMode) {\n            \"cover\" -> ImageView.ScaleType.CENTER_CROP\n            \"contain\" -> ImageView.ScaleType.FIT_CENTER\n            \"stretch\" -> ImageView.ScaleType.FIT_XY\n            \"center\" -> ImageView.ScaleType.CENTER\n            else -> ImageView.ScaleType.CENTER_CROP\n        }\n\n        if (newScaleType != currentScaleType) {\n            currentScaleType = newScaleType\n            // Update scaleType in-place without reloading image\n            (containerView as? ImageView)?.scaleType = newScaleType\n        }\n    }\n\n    fun setPriority(priority: String?) {\n        currentPriority = GraniteImagePriority.fromString(priority)\n    }\n\n    fun setCachePolicy(cachePolicy: String?) {\n        // View-side API uses canonical names: \"memory\", \"none\", \"disk\" (default)\n        currentCachePolicy = when (cachePolicy) {\n            \"memory\" -> GraniteImageCachePolicy.MEMORY\n            \"none\" -> GraniteImageCachePolicy.NONE\n            else -> GraniteImageCachePolicy.DISK\n        }\n    }\n\n    fun setTintColor(color: Int?) {\n        currentTintColor = color\n        // Apply tint to existing image view if available\n        if (color != null) {\n            (containerView as? ImageView)?.let { imageView ->\n                imageView.colorFilter = PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN)\n            }\n        }\n    }\n\n    fun setDefaultSource(source: String?) {\n        currentDefaultSource = source\n    }\n\n    fun setFallbackSource(source: String?) {\n        currentFallbackSource = source\n    }\n\n    private fun loadImageIfReady() {\n        // Remove existing container view\n        containerView?.let {\n            removeView(it)\n            containerView = null\n        }\n\n        val provider = providerResolver()\n\n        if (provider == null) {\n            showErrorView(\"No GraniteImageProvider registered\")\n            emitError(\"No GraniteImageProvider registered\")\n            return\n        }\n\n        val uri = currentUri\n        if (uri.isNullOrEmpty()) {\n            showErrorView(\"No URI provided\")\n            emitError(\"No URI provided\")\n            return\n        }\n\n        // Emit load start event\n        emitLoadStart()\n\n        // Create new image view from provider\n        val imageView = provider.createImageView(context)\n        imageView.layoutParams = LayoutParams(\n            LayoutParams.MATCH_PARENT,\n            LayoutParams.MATCH_PARENT\n        )\n        addView(imageView)\n        containerView = imageView\n\n        // Load image using provider with full options\n        provider.loadImage(\n            url = uri,\n            into = imageView,\n            scaleType = currentScaleType,\n            headers = currentHeaders,\n            priority = currentPriority,\n            cachePolicy = currentCachePolicy,\n            defaultSource = currentDefaultSource,\n            progressCallback = { loaded, total ->\n                post {\n                    emitProgress(loaded.toInt(), total.toInt())\n                }\n            },\n            completionCallback = { bitmap, error, width, height ->\n                post {\n                    handleLoadCompletion(bitmap, error, width, height, imageView, provider)\n                }\n            }\n        )\n    }\n\n    private fun handleLoadCompletion(\n        bitmap: Bitmap?,\n        error: Exception?,\n        width: Int,\n        height: Int,\n        imageView: View,\n        provider: GraniteImageProvider\n    ) {\n        if (error != null) {\n            emitError(error.message ?: \"Unknown error\")\n\n            // Load fallback image if available\n            currentFallbackSource?.let { fallback ->\n                provider.loadImage(\n                    url = fallback,\n                    into = imageView,\n                    scaleType = currentScaleType,\n                    headers = null,\n                    priority = GraniteImagePriority.HIGH,\n                    cachePolicy = GraniteImageCachePolicy.DISK,\n                    defaultSource = null,\n                    progressCallback = null,\n                    completionCallback = null\n                )\n            }\n        } else {\n            emitLoad(width, height)\n\n            // Apply tint color if set\n            currentTintColor?.let { color ->\n                provider.applyTintColor(color, imageView)\n            }\n        }\n        emitLoadEnd()\n    }\n\n    private fun showErrorView(message: String) {\n        Log.e(TAG, message)\n\n        val errorView = FrameLayout(context).apply {\n            layoutParams = LayoutParams(\n                LayoutParams.MATCH_PARENT,\n                LayoutParams.MATCH_PARENT\n            )\n            setBackgroundColor(Color.RED)\n        }\n\n        val label = TextView(context).apply {\n            text = message\n            setTextColor(Color.WHITE)\n            textSize = 12f\n            gravity = Gravity.CENTER\n            layoutParams = LayoutParams(\n                LayoutParams.WRAP_CONTENT,\n                LayoutParams.WRAP_CONTENT,\n                Gravity.CENTER\n            )\n        }\n\n        errorView.addView(label)\n        addView(errorView)\n        containerView = errorView\n    }\n\n    fun cleanup() {\n        val provider = providerResolver()\n        containerView?.let {\n            provider?.cancelLoad(it)\n            removeView(it)\n        }\n        containerView = null\n        currentUri = null\n    }\n\n    companion object {\n        private const val TAG = \"GraniteImage\"\n    }\n}\n"
  },
  {
    "path": "packages/image/android/src/main/java/run/granite/image/GraniteImageEvents.kt",
    "content": "package run.granite.image\n\nimport com.facebook.react.bridge.Arguments\nimport com.facebook.react.bridge.WritableMap\nimport com.facebook.react.uimanager.events.Event\n\n/**\n * Event emitted when image loading starts\n */\nclass GraniteImageLoadStartEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteImageLoadStartEvent>(surfaceId, viewId) {\n\n    override fun getEventName(): String = \"onGraniteLoadStart\"\n\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n\n/**\n * Event emitted during image loading progress\n */\nclass GraniteImageProgressEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val loaded: Int,\n    private val total: Int\n) : Event<GraniteImageProgressEvent>(surfaceId, viewId) {\n\n    override fun getEventName(): String = \"onGraniteProgress\"\n\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putInt(\"loaded\", loaded)\n        putInt(\"total\", total)\n    }\n}\n\n/**\n * Event emitted when image loading completes successfully\n */\nclass GraniteImageLoadEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val width: Int,\n    private val height: Int\n) : Event<GraniteImageLoadEvent>(surfaceId, viewId) {\n\n    override fun getEventName(): String = \"onGraniteLoad\"\n\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putInt(\"width\", width)\n        putInt(\"height\", height)\n    }\n}\n\n/**\n * Event emitted when image loading fails\n */\nclass GraniteImageErrorEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val error: String\n) : Event<GraniteImageErrorEvent>(surfaceId, viewId) {\n\n    override fun getEventName(): String = \"onGraniteError\"\n\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putString(\"error\", error)\n    }\n}\n\n/**\n * Event emitted when image loading ends (success or failure)\n */\nclass GraniteImageLoadEndEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteImageLoadEndEvent>(surfaceId, viewId) {\n\n    override fun getEventName(): String = \"onGraniteLoadEnd\"\n\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n"
  },
  {
    "path": "packages/image/android/src/main/java/run/granite/image/GraniteImageManager.kt",
    "content": "package run.granite.image\n\nimport android.util.Log\nimport com.facebook.react.common.MapBuilder\nimport com.facebook.react.module.annotations.ReactModule\nimport com.facebook.react.uimanager.SimpleViewManager\nimport com.facebook.react.uimanager.ThemedReactContext\nimport com.facebook.react.uimanager.ViewManagerDelegate\nimport com.facebook.react.uimanager.annotations.ReactProp\nimport com.facebook.react.viewmanagers.GraniteImageManagerDelegate\nimport com.facebook.react.viewmanagers.GraniteImageManagerInterface\n\n/**\n * ViewManager for the GraniteImage Fabric Component.\n * This class bridges React Native's view system with our native GraniteImage.\n */\n@ReactModule(name = GraniteImageManager.NAME)\nclass GraniteImageManager : SimpleViewManager<GraniteImage>(), GraniteImageManagerInterface<GraniteImage> {\n    private val delegate: ViewManagerDelegate<GraniteImage> = GraniteImageManagerDelegate(this)\n\n    override fun getName(): String = NAME\n\n    override fun getDelegate(): ViewManagerDelegate<GraniteImage> = delegate\n\n    override fun createViewInstance(reactContext: ThemedReactContext): GraniteImage {\n        Log.d(TAG, \"createViewInstance called\")\n        return GraniteImage(reactContext)\n    }\n\n    @ReactProp(name = \"uri\")\n    override fun setUri(view: GraniteImage, uri: String?) {\n        Log.d(TAG, \"setUri: $uri\")\n        view.setUri(uri)\n    }\n\n    @ReactProp(name = \"headers\")\n    override fun setHeaders(view: GraniteImage, headers: String?) {\n        Log.d(TAG, \"setHeaders: $headers\")\n        view.setHeaders(headers)\n    }\n\n    @ReactProp(name = \"contentMode\")\n    override fun setContentMode(view: GraniteImage, contentMode: String?) {\n        Log.d(TAG, \"setContentMode: $contentMode\")\n        view.setContentMode(contentMode)\n    }\n\n    @ReactProp(name = \"priority\")\n    override fun setPriority(view: GraniteImage, priority: String?) {\n        Log.d(TAG, \"setPriority: $priority\")\n        view.setPriority(priority)\n    }\n\n    @ReactProp(name = \"cachePolicy\")\n    override fun setCachePolicy(view: GraniteImage, cachePolicy: String?) {\n        Log.d(TAG, \"setCachePolicy: $cachePolicy\")\n        view.setCachePolicy(cachePolicy)\n    }\n\n    @ReactProp(name = \"tintColor\", customType = \"Color\")\n    override fun setTintColor(view: GraniteImage, tintColor: Int?) {\n        Log.d(TAG, \"setTintColor: $tintColor\")\n        view.setTintColor(tintColor)\n    }\n\n    @ReactProp(name = \"defaultSource\")\n    override fun setDefaultSource(view: GraniteImage, defaultSource: String?) {\n        Log.d(TAG, \"setDefaultSource: $defaultSource\")\n        view.setDefaultSource(defaultSource)\n    }\n\n    @ReactProp(name = \"fallbackSource\")\n    override fun setFallbackSource(view: GraniteImage, fallbackSource: String?) {\n        Log.d(TAG, \"setFallbackSource: $fallbackSource\")\n        view.setFallbackSource(fallbackSource)\n    }\n\n    override fun onDropViewInstance(view: GraniteImage) {\n        Log.d(TAG, \"onDropViewInstance called\")\n        view.cleanup()\n        super.onDropViewInstance(view)\n    }\n\n    override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any>? {\n        return MapBuilder.builder<String, Any>()\n            .put(\"onGraniteLoadStart\", MapBuilder.of(\"registrationName\", \"onGraniteLoadStart\"))\n            .put(\"onGraniteProgress\", MapBuilder.of(\"registrationName\", \"onGraniteProgress\"))\n            .put(\"onGraniteLoad\", MapBuilder.of(\"registrationName\", \"onGraniteLoad\"))\n            .put(\"onGraniteError\", MapBuilder.of(\"registrationName\", \"onGraniteError\"))\n            .put(\"onGraniteLoadEnd\", MapBuilder.of(\"registrationName\", \"onGraniteLoadEnd\"))\n            .build()\n    }\n\n    companion object {\n        const val NAME = \"GraniteImage\"\n        private const val TAG = \"GraniteImageManager\"\n    }\n}\n"
  },
  {
    "path": "packages/image/android/src/main/java/run/granite/image/GraniteImageModule.kt",
    "content": "package run.granite.image\n\nimport android.util.Log\nimport com.facebook.react.bridge.Promise\nimport com.facebook.react.bridge.ReactApplicationContext\nimport com.facebook.react.bridge.ReactContextBaseJavaModule\nimport com.facebook.react.bridge.ReactMethod\nimport com.facebook.react.module.annotations.ReactModule\nimport org.json.JSONArray\nimport org.json.JSONObject\nimport java.util.concurrent.ExecutorService\nimport java.util.concurrent.Executors\nimport java.util.concurrent.atomic.AtomicInteger\n\n@ReactModule(name = GraniteImageModule.NAME)\nclass GraniteImageModule(\n    reactContext: ReactApplicationContext,\n    private val providerResolver: () -> GraniteImageProvider? = { GraniteImageRegistry.provider },\n    private val executor: ExecutorService = Executors.newFixedThreadPool(4)\n) : ReactContextBaseJavaModule(reactContext) {\n\n    private data class PreloadSource(\n        val uri: String,\n        val headers: Map<String, String>?,\n        val priority: GraniteImagePriority,\n        val cachePolicy: GraniteImageCachePolicy\n    )\n\n    override fun getName(): String = NAME\n\n    @ReactMethod\n    fun preload(sourcesJson: String, promise: Promise) {\n        Log.d(TAG, \"preload called with: $sourcesJson\")\n\n        val provider = providerResolver()\n        if (provider == null) {\n            Log.w(TAG, \"No provider registered, cannot preload\")\n            promise.reject(\"NO_PROVIDER\", \"No provider registered, cannot preload\")\n            return\n        }\n\n        executor.execute {\n            try {\n                val sources = JSONArray(sourcesJson)\n                val totalCount = sources.length()\n\n                if (totalCount == 0) {\n                    promise.resolve(null)\n                    return@execute\n                }\n\n                val completedCount = AtomicInteger(0)\n                val successCount = AtomicInteger(0)\n                val failCount = AtomicInteger(0)\n\n                for (i in 0 until totalCount) {\n                    val preloadSource = parsePreloadSource(sources.getJSONObject(i))\n                    preloadSingle(provider, preloadSource, completedCount, successCount, failCount, totalCount, promise)\n                }\n            } catch (e: Exception) {\n                Log.e(TAG, \"Failed to parse sources JSON: ${e.message}\")\n                promise.reject(\"PARSE_ERROR\", \"Failed to parse sources JSON: ${e.message}\")\n            }\n        }\n    }\n\n    private fun preloadSingle(\n        provider: GraniteImageProvider,\n        source: PreloadSource,\n        completedCount: AtomicInteger,\n        successCount: AtomicInteger,\n        failCount: AtomicInteger,\n        totalCount: Int,\n        promise: Promise\n    ) {\n        if (source.uri.isEmpty()) {\n            checkPreloadCompletion(completedCount, successCount, failCount, totalCount, promise)\n            return\n        }\n\n        Log.d(TAG, \"Preloading: ${source.uri}\")\n        provider.loadImage(\n            url = source.uri,\n            imageView = null,\n            contentMode = \"cover\",\n            headers = source.headers,\n            priority = source.priority,\n            cachePolicy = source.cachePolicy,\n            onProgress = null,\n            onCompletion = { success, width, height, error ->\n                if (success) {\n                    Log.d(TAG, \"Preloaded successfully: ${source.uri} (${width}x${height})\")\n                    successCount.incrementAndGet()\n                } else {\n                    Log.d(TAG, \"Preload failed for ${source.uri}: $error\")\n                    failCount.incrementAndGet()\n                }\n                checkPreloadCompletion(completedCount, successCount, failCount, totalCount, promise)\n            }\n        )\n    }\n\n    private fun checkPreloadCompletion(\n        completedCount: AtomicInteger,\n        successCount: AtomicInteger,\n        failCount: AtomicInteger,\n        totalCount: Int,\n        promise: Promise\n    ) {\n        if (completedCount.incrementAndGet() == totalCount) {\n            Log.d(TAG, \"Preload completed: ${successCount.get()} succeeded, ${failCount.get()} failed\")\n            promise.resolve(null)\n        }\n    }\n\n    private fun parsePreloadSource(source: JSONObject): PreloadSource {\n        val uri = source.optString(\"uri\", \"\")\n\n        val headersObj = source.optJSONObject(\"headers\")\n        val headers = mutableMapOf<String, String>()\n        headersObj?.let {\n            val keys = it.keys()\n            while (keys.hasNext()) {\n                val key = keys.next()\n                headers[key] = it.getString(key)\n            }\n        }\n\n        val priorityStr = source.optString(\"priority\", \"normal\")\n        val priority = GraniteImagePriority.fromString(priorityStr)\n\n        // Module-side API uses FastImage-compatible names: \"cacheOnly\", \"web\"\n        // (intentionally different from View-side API which uses \"memory\", \"none\")\n        val cacheStr = source.optString(\"cache\", \"\")\n        val cachePolicy = when (cacheStr) {\n            \"cacheOnly\" -> GraniteImageCachePolicy.DISK\n            \"web\" -> GraniteImageCachePolicy.NONE\n            else -> GraniteImageCachePolicy.DISK\n        }\n\n        return PreloadSource(\n            uri = uri,\n            headers = headers.ifEmpty { null },\n            priority = priority,\n            cachePolicy = cachePolicy\n        )\n    }\n\n    @ReactMethod\n    fun clearMemoryCache(promise: Promise) {\n        Log.d(TAG, \"clearMemoryCache called\")\n        val provider = providerResolver()\n        val context = reactApplicationContext\n        if (provider != null) {\n            provider.clearMemoryCache(context)\n        }\n        promise.resolve(null)\n    }\n\n    @ReactMethod\n    fun clearDiskCache(promise: Promise) {\n        Log.d(TAG, \"clearDiskCache called\")\n        val provider = providerResolver()\n        val context = reactApplicationContext\n        if (provider != null) {\n            provider.clearDiskCache(context)\n        }\n        promise.resolve(null)\n    }\n\n    companion object {\n        const val NAME = \"GraniteImageModule\"\n        private const val TAG = \"GraniteImageModule\"\n    }\n}\n"
  },
  {
    "path": "packages/image/android/src/main/java/run/granite/image/GraniteImagePackage.kt",
    "content": "package run.granite.image\n\nimport android.util.Log\nimport com.facebook.react.ReactPackage\nimport com.facebook.react.bridge.NativeModule\nimport com.facebook.react.bridge.ReactApplicationContext\nimport com.facebook.react.uimanager.ViewManager\n\n/**\n * React Native Package that registers the GraniteImage component and GraniteImageModule.\n */\nclass GraniteImagePackage : ReactPackage {\n    override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {\n        ensureProviderRegistered()\n        return listOf(GraniteImageModule(reactContext))\n    }\n\n    override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {\n        ensureProviderRegistered()\n        return listOf(GraniteImageManager())\n    }\n\n    companion object {\n        private const val TAG = \"GraniteImagePackage\"\n        private var providerRegistered = false\n\n        internal fun ensureProviderRegistered() {\n            if (providerRegistered) return\n\n            // Try to auto-register a provider based on available implementations\n            val providerClasses = listOf(\n                \"run.granite.image.providers.OkHttpImageProvider\",\n                \"run.granite.image.providers.GlideImageProvider\",\n                \"run.granite.image.providers.CoilImageProvider\"\n            )\n\n            for (className in providerClasses) {\n                try {\n                    val clazz = Class.forName(className)\n                    val provider = clazz.getDeclaredConstructor().newInstance() as GraniteImageProvider\n                    GraniteImageRegistry.registerProvider(provider)\n                    Log.d(TAG, \"Auto-registered provider: $className\")\n                    providerRegistered = true\n                    break\n                } catch (e: ClassNotFoundException) {\n                    // Provider not available, try next\n                } catch (e: Exception) {\n                    Log.e(TAG, \"Failed to instantiate provider $className: ${e.message}\")\n                }\n            }\n\n            if (!providerRegistered) {\n                Log.w(TAG, \"No image provider found. Make sure to include one of: okhttp, glide, or coil flavor.\")\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "packages/image/android/src/main/java/run/granite/image/GraniteImageProvider.kt",
    "content": "package run.granite.image\n\nimport android.content.Context\nimport android.graphics.Bitmap\nimport android.graphics.Color\nimport android.view.View\nimport android.widget.ImageView\n\n/**\n * Priority levels for image loading\n */\nenum class GraniteImagePriority {\n    LOW, NORMAL, HIGH;\n\n    companion object {\n        fun fromString(value: String?): GraniteImagePriority = when (value) {\n            \"low\" -> LOW\n            \"high\" -> HIGH\n            else -> NORMAL\n        }\n    }\n}\n\n\n/**\n * Cache policy for image loading\n */\nenum class GraniteImageCachePolicy {\n    MEMORY, DISK, NONE\n}\n\n/**\n * Progress callback\n */\ntypealias GraniteImageProgressCallback = (loaded: Long, total: Long) -> Unit\n\n/**\n * Completion callback with image dimensions\n */\ntypealias GraniteImageCompletionCallback = (bitmap: Bitmap?, error: Exception?, width: Int, height: Int) -> Unit\n\n/**\n * Interface that defines the contract for image loading providers.\n * Implementations can use any image loading library (OkHttp, Glide, Coil, etc.)\n */\ninterface GraniteImageProvider {\n    /**\n     * Creates and returns a new View that will be used to display the image.\n     * The returned view should be capable of displaying images (typically ImageView).\n     * Default implementation creates an ImageView with a light gray background.\n     */\n    fun createImageView(context: Context): View {\n        return ImageView(context).apply {\n            setBackgroundColor(Color.LTGRAY)\n        }\n    }\n\n    /**\n     * Loads an image from the given URL into the provided view.\n     * @param url The URL string of the image to load\n     * @param view The view returned from createImageView where the image should be displayed\n     * @param scaleType The scale type to use when displaying the image\n     */\n    fun loadImage(url: String, into: View, scaleType: ImageView.ScaleType)\n\n    /**\n     * Cancels any ongoing image load for the given view.\n     * @param view The view whose image load should be cancelled\n     */\n    fun cancelLoad(view: View)\n\n    /**\n     * Loads an image with full options support including headers, priority, cache policy, and callbacks.\n     * Default implementation delegates to simple loadImage.\n     */\n    fun loadImage(\n        url: String,\n        into: View?,\n        scaleType: ImageView.ScaleType,\n        headers: Map<String, String>?,\n        priority: GraniteImagePriority,\n        cachePolicy: GraniteImageCachePolicy,\n        defaultSource: String?,\n        progressCallback: GraniteImageProgressCallback?,\n        completionCallback: GraniteImageCompletionCallback?\n    ) {\n        if (into != null) {\n            // Default implementation - just use simple load\n            loadImage(url, into, scaleType)\n        }\n        // Notify completion with unknown dimensions\n        completionCallback?.invoke(null, null, 0, 0)\n    }\n\n    /**\n     * Preloads an image without displaying it.\n     * Uses the extended loadImage with null view.\n     */\n    fun loadImage(\n        url: String,\n        imageView: Nothing?,\n        contentMode: String,\n        headers: Map<String, String>?,\n        priority: GraniteImagePriority,\n        cachePolicy: GraniteImageCachePolicy,\n        onProgress: GraniteImageProgressCallback?,\n        onCompletion: ((success: Boolean, width: Int, height: Int, error: String?) -> Unit)?\n    ) {\n        // Default implementation does nothing for preload\n        onCompletion?.invoke(false, 0, 0, \"Provider does not support preloading\")\n    }\n\n    /**\n     * Applies a tint color to the image view.\n     * Default implementation does nothing.\n     */\n    fun applyTintColor(color: Int, view: View) {\n        // Default implementation - do nothing\n    }\n\n    /**\n     * Clears the memory cache.\n     * Default implementation is no-op. Override in provider implementations to clear actual cache.\n     */\n    fun clearMemoryCache(context: Context) {\n        // default: no-op\n    }\n\n    /**\n     * Clears the disk cache.\n     * Default implementation is no-op. Override in provider implementations to clear actual cache.\n     */\n    fun clearDiskCache(context: Context) {\n        // default: no-op\n    }\n}\n"
  },
  {
    "path": "packages/image/android/src/main/java/run/granite/image/GraniteImageRegistry.kt",
    "content": "package run.granite.image\n\n/**\n * Singleton registry for managing the current GraniteImageProvider.\n * Applications should register their provider implementation at app startup.\n */\nobject GraniteImageRegistry {\n    /**\n     * The currently registered image provider.\n     * If null, GraniteImage will display an error state.\n     */\n    var provider: GraniteImageProvider? = null\n        private set\n\n    /**\n     * Registers an image provider to be used by all GraniteImage instances.\n     * @param provider The provider implementation to register\n     */\n    fun registerProvider(provider: GraniteImageProvider) {\n        this.provider = provider\n    }\n\n    /**\n     * Clears the currently registered provider.\n     */\n    fun clearProvider() {\n        this.provider = null\n    }\n}\n"
  },
  {
    "path": "packages/image/android/src/okhttp/java/run/granite/image/providers/OkHttpImageProvider.kt",
    "content": "package run.granite.image.providers\n\nimport android.graphics.Bitmap\nimport android.graphics.BitmapFactory\nimport android.graphics.PorterDuff\nimport android.graphics.PorterDuffColorFilter\nimport android.os.Handler\nimport android.os.Looper\nimport android.util.Log\nimport android.view.View\nimport android.widget.ImageView\nimport run.granite.image.GraniteImageProvider\nimport run.granite.image.GraniteImagePriority\nimport run.granite.image.GraniteImageCachePolicy\nimport run.granite.image.GraniteImageProgressCallback\nimport run.granite.image.GraniteImageCompletionCallback\nimport okhttp3.Call\nimport okhttp3.Callback\nimport okhttp3.CacheControl\nimport okhttp3.OkHttpClient\nimport okhttp3.Request\nimport okhttp3.Response\nimport java.io.ByteArrayOutputStream\nimport java.io.IOException\nimport java.util.concurrent.ConcurrentHashMap\nimport java.util.concurrent.TimeUnit\n\n/**\n * GraniteImageProvider implementation using OkHttp.\n * This is analogous to iOS's URLSessionImageProvider.\n */\nclass OkHttpImageProvider : GraniteImageProvider {\n    private val client = OkHttpClient.Builder()\n        .connectTimeout(30, TimeUnit.SECONDS)\n        .readTimeout(30, TimeUnit.SECONDS)\n        .build()\n    private val activeCalls = ConcurrentHashMap<View, Call>()\n    private val mainHandler = Handler(Looper.getMainLooper())\n\n    override fun loadImage(url: String, into: View, scaleType: ImageView.ScaleType) {\n        loadImage(url, into, scaleType, null, GraniteImagePriority.NORMAL, GraniteImageCachePolicy.DISK, null, null, null)\n    }\n\n    override fun loadImage(\n        url: String,\n        into: View?,\n        scaleType: ImageView.ScaleType,\n        headers: Map<String, String>?,\n        priority: GraniteImagePriority,\n        cachePolicy: GraniteImageCachePolicy,\n        defaultSource: String?,\n        progressCallback: GraniteImageProgressCallback?,\n        completionCallback: GraniteImageCompletionCallback?\n    ) {\n        // Allow null view for preloading\n        val imageView: ImageView? = if (into != null) {\n            if (into !is ImageView) {\n                Log.e(TAG, \"View is not an ImageView\")\n                completionCallback?.invoke(null, Exception(\"View is not an ImageView\"), 0, 0)\n                return\n            }\n            into.scaleType = scaleType\n            // Cancel any existing request for this view\n            cancelLoad(into)\n            into\n        } else {\n            null\n        }\n\n        // Apply default source (placeholder) before loading\n        if (imageView != null && !defaultSource.isNullOrEmpty()) {\n            val resourceId = imageView.context.resources.getIdentifier(defaultSource, \"drawable\", imageView.context.packageName)\n            if (resourceId != 0) {\n                imageView.setImageResource(resourceId)\n            }\n        }\n\n        val request = buildRequest(url, headers, cachePolicy)\n        val call = client.newCall(request)\n        if (into != null) {\n            activeCalls[into] = call\n        }\n\n        call.enqueue(object : Callback {\n            override fun onFailure(call: Call, e: IOException) {\n                Log.e(TAG, \"Error loading image: ${e.message}\")\n                if (into != null) {\n                    activeCalls.remove(into)\n                }\n                mainHandler.post {\n                    completionCallback?.invoke(null, e, 0, 0)\n                }\n            }\n\n            override fun onResponse(call: Call, response: Response) {\n                response.use {\n                    if (into != null) {\n                        activeCalls.remove(into)\n                    }\n                    handleResponse(response, imageView, url, progressCallback, completionCallback)\n                }\n            }\n        })\n    }\n\n    private fun buildRequest(\n        url: String,\n        headers: Map<String, String>?,\n        cachePolicy: GraniteImageCachePolicy\n    ): Request {\n        val requestBuilder = Request.Builder().url(url)\n\n        // Add headers\n        headers?.forEach { (key, value) ->\n            requestBuilder.addHeader(key, value)\n        }\n\n        // Apply cache policy\n        when (cachePolicy) {\n            GraniteImageCachePolicy.NONE -> {\n                requestBuilder.cacheControl(CacheControl.FORCE_NETWORK)\n            }\n            GraniteImageCachePolicy.MEMORY, GraniteImageCachePolicy.DISK -> {\n                // Use default caching\n            }\n        }\n\n        return requestBuilder.build()\n    }\n\n    private fun handleResponse(\n        response: Response,\n        imageView: ImageView?,\n        url: String,\n        progressCallback: GraniteImageProgressCallback?,\n        completionCallback: GraniteImageCompletionCallback?\n    ) {\n        if (!response.isSuccessful) {\n            postError(Exception(\"HTTP error: ${response.code}\"), completionCallback)\n            return\n        }\n\n        val body = response.body\n        if (body == null) {\n            postError(Exception(\"No data received\"), completionCallback)\n            return\n        }\n\n        try {\n            val imageBytes = readResponseBytes(body, progressCallback)\n            val bitmap = decodeBitmap(imageBytes)\n            if (bitmap == null) {\n                postError(Exception(\"Failed to decode image data\"), completionCallback)\n                return\n            }\n            mainHandler.post {\n                imageView?.setImageBitmap(bitmap)\n                Log.d(TAG, \"Loaded with OkHttp: $url\")\n                completionCallback?.invoke(bitmap, null, bitmap.width, bitmap.height)\n            }\n        } catch (e: Exception) {\n            Log.e(TAG, \"Error reading image data: ${e.message}\")\n            mainHandler.post { completionCallback?.invoke(null, e, 0, 0) }\n        }\n    }\n\n    private fun readResponseBytes(\n        body: okhttp3.ResponseBody,\n        progressCallback: GraniteImageProgressCallback?\n    ): ByteArray {\n        val contentLength = body.contentLength()\n        val inputStream = body.byteStream()\n        val outputStream = ByteArrayOutputStream()\n        val buffer = ByteArray(8192)\n        var totalBytesRead = 0L\n        var bytesRead: Int\n        while (inputStream.read(buffer).also { bytesRead = it } != -1) {\n            outputStream.write(buffer, 0, bytesRead)\n            totalBytesRead += bytesRead\n            if (contentLength > 0) progressCallback?.invoke(totalBytesRead, contentLength)\n        }\n        return outputStream.toByteArray()\n    }\n\n    private fun decodeBitmap(imageBytes: ByteArray): Bitmap? {\n        return BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.size)\n    }\n\n    private fun postError(error: Exception, completionCallback: GraniteImageCompletionCallback?) {\n        Log.e(TAG, error.message ?: \"Unknown error\")\n        mainHandler.post { completionCallback?.invoke(null, error, 0, 0) }\n    }\n\n    override fun cancelLoad(view: View) {\n        activeCalls[view]?.cancel()\n        activeCalls.remove(view)\n    }\n\n    override fun applyTintColor(color: Int, view: View) {\n        if (view is ImageView) {\n            view.colorFilter = PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN)\n        }\n    }\n\n    override fun loadImage(\n        url: String,\n        imageView: Nothing?,\n        contentMode: String,\n        headers: Map<String, String>?,\n        priority: GraniteImagePriority,\n        cachePolicy: GraniteImageCachePolicy,\n        onProgress: GraniteImageProgressCallback?,\n        onCompletion: ((success: Boolean, width: Int, height: Int, error: String?) -> Unit)?\n    ) {\n        // Preload implementation - load without displaying\n        loadImage(\n            url = url,\n            into = null,\n            scaleType = ImageView.ScaleType.CENTER_CROP,\n            headers = headers,\n            priority = priority,\n            cachePolicy = cachePolicy,\n            defaultSource = null,\n            progressCallback = onProgress,\n            completionCallback = { bitmap, error, width, height ->\n                onCompletion?.invoke(bitmap != null, width, height, error?.message)\n            }\n        )\n    }\n\n    override fun clearMemoryCache(context: Context) {\n        // OkHttp: no built-in memory cache — no-op\n        Log.d(TAG, \"Memory cache clear not supported (OkHttp)\")\n    }\n\n    override fun clearDiskCache(context: Context) {\n        // OkHttp: evict all if client.cache is configured\n        try {\n            client.cache?.evictAll()\n            Log.d(TAG, \"Disk cache cleared (OkHttp)\")\n        } catch (e: Exception) {\n            Log.e(TAG, \"Failed to clear disk cache: ${e.message}\")\n        }\n    }\n\n    companion object {\n        private const val TAG = \"OkHttpImageProvider\"\n    }\n}\n"
  },
  {
    "path": "packages/image/example/.bundle/config",
    "content": "BUNDLE_PATH: \"vendor/bundle\"\nBUNDLE_FORCE_RUBY_PLATFORM: 1\n"
  },
  {
    "path": "packages/image/example/.detoxrc.js",
    "content": "/** @type {Detox.DetoxConfig} */\nmodule.exports = {\n  testRunner: {\n    args: {\n      $0: 'jest',\n      config: 'e2e/jest.config.js',\n    },\n    jest: {\n      setupTimeout: 120000,\n    },\n  },\n  apps: {\n    'ios.debug': {\n      type: 'ios.app',\n      binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/GraniteImageExample.app',\n      build:\n        'xcodebuild -workspace ios/GraniteImageExample.xcworkspace -scheme GraniteImageExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build',\n    },\n    'ios.release': {\n      type: 'ios.app',\n      binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/GraniteImageExample.app',\n      build:\n        'xcodebuild -workspace ios/GraniteImageExample.xcworkspace -scheme GraniteImageExample -configuration Release -sdk iphonesimulator -derivedDataPath ios/build',\n    },\n    'android.debug': {\n      type: 'android.apk',\n      binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',\n      build: 'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug',\n      reversePorts: [8081],\n    },\n    'android.release': {\n      type: 'android.apk',\n      binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',\n      build: 'cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release',\n    },\n  },\n  devices: {\n    simulator: {\n      type: 'ios.simulator',\n      device: {\n        type: 'iPhone 16 Pro',\n      },\n    },\n    attached: {\n      type: 'android.attached',\n      device: {\n        adbName: '.*',\n      },\n    },\n    emulator: {\n      type: 'android.emulator',\n      device: {\n        avdName: 'Pixel_8_Pro',\n      },\n    },\n  },\n  configurations: {\n    'ios.sim.debug': {\n      device: 'simulator',\n      app: 'ios.debug',\n    },\n    'ios.sim.release': {\n      device: 'simulator',\n      app: 'ios.release',\n    },\n    'android.att.debug': {\n      device: 'attached',\n      app: 'android.debug',\n    },\n    'android.att.release': {\n      device: 'attached',\n      app: 'android.release',\n    },\n    'android.emu.debug': {\n      device: 'emulator',\n      app: 'android.debug',\n    },\n    'android.emu.release': {\n      device: 'emulator',\n      app: 'android.release',\n    },\n  },\n};\n"
  },
  {
    "path": "packages/image/example/.watchmanconfig",
    "content": "{}\n"
  },
  {
    "path": "packages/image/example/Gemfile",
    "content": "source 'https://rubygems.org'\n\n# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version\nruby \">= 2.6.10\"\n\n# Exclude problematic versions of cocoapods and activesupport that causes build failures.\ngem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'\ngem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'\ngem 'xcodeproj', '< 1.26.0'\ngem 'concurrent-ruby', '< 1.3.4'\n\n# Ruby 3.4.0 has removed some libraries from the standard library.\ngem 'bigdecimal'\ngem 'logger'\ngem 'benchmark'\ngem 'mutex_m'\n"
  },
  {
    "path": "packages/image/example/README.md",
    "content": "This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).\n\n# Getting Started\n\n> **Note**: Make sure you have completed the [Set Up Your Environment](https://reactnative.dev/docs/set-up-your-environment) guide before proceeding.\n\n## Step 1: Start Metro\n\nFirst, you will need to run **Metro**, the JavaScript build tool for React Native.\n\nTo start the Metro dev server, run the following command from the root of your React Native project:\n\n```sh\n# Using npm\nnpm start\n\n# OR using Yarn\nyarn start\n```\n\n## Step 2: Build and run your app\n\nWith Metro running, open a new terminal window/pane from the root of your React Native project, and use one of the following commands to build and run your Android or iOS app:\n\n### Android\n\n```sh\n# Using npm\nnpm run android\n\n# OR using Yarn\nyarn android\n```\n\n### iOS\n\nFor iOS, remember to install CocoaPods dependencies (this only needs to be run on first clone or after updating native deps).\n\nThe first time you create a new project, run the Ruby bundler to install CocoaPods itself:\n\n```sh\nbundle install\n```\n\nThen, and every time you update your native dependencies, run:\n\n```sh\nbundle exec pod install\n```\n\nFor more information, please visit [CocoaPods Getting Started guide](https://guides.cocoapods.org/using/getting-started.html).\n\n```sh\n# Using npm\nnpm run ios\n\n# OR using Yarn\nyarn ios\n```\n\nIf everything is set up correctly, you should see your new app running in the Android Emulator, iOS Simulator, or your connected device.\n\nThis is one way to run your app — you can also build it directly from Android Studio or Xcode.\n\n## Step 3: Modify your app\n\nNow that you have successfully run the app, let's make changes!\n\nOpen `App.tsx` in your text editor of choice and make some changes. When you save, your app will automatically update and reflect these changes — this is powered by [Fast Refresh](https://reactnative.dev/docs/fast-refresh).\n\nWhen you want to forcefully reload, for example to reset the state of your app, you can perform a full reload:\n\n- **Android**: Press the <kbd>R</kbd> key twice or select **\"Reload\"** from the **Dev Menu**, accessed via <kbd>Ctrl</kbd> + <kbd>M</kbd> (Windows/Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (macOS).\n- **iOS**: Press <kbd>R</kbd> in iOS Simulator.\n\n## Congratulations! :tada:\n\nYou've successfully run and modified your React Native App. :partying_face:\n\n### Now what?\n\n- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).\n- If you're curious to learn more about React Native, check out the [docs](https://reactnative.dev/docs/getting-started).\n\n# Troubleshooting\n\nIf you're having issues getting the above steps to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.\n\n# Learn More\n\nTo learn more about React Native, take a look at the following resources:\n\n- [React Native Website](https://reactnative.dev) - learn more about React Native.\n- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.\n- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.\n- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.\n- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.\n"
  },
  {
    "path": "packages/image/example/android/app/build.gradle",
    "content": "apply plugin: \"com.android.application\"\napply plugin: \"org.jetbrains.kotlin.android\"\napply plugin: \"com.facebook.react\"\n\n/**\n * This is the configuration block to customize your React Native Android app.\n * By default you don't need to apply any configuration, just uncomment the lines you need.\n */\nreact {\n    /* Folders */\n    //   The root of your project, i.e. where \"package.json\" lives. Default is '../..'\n    // root = file(\"../../\")\n    //   The folder where the react-native NPM package is. Default is ../../node_modules/react-native\n    // reactNativeDir = file(\"../../node_modules/react-native\")\n    //   The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen\n    // codegenDir = file(\"../../node_modules/@react-native/codegen\")\n    //   The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js\n    // cliFile = file(\"../../node_modules/react-native/cli.js\")\n\n    /* Variants */\n    //   The list of variants to that are debuggable. For those we're going to\n    //   skip the bundling of the JS bundle and the assets. By default is just 'debug'.\n    //   If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.\n    // debuggableVariants = [\"liteDebug\", \"prodDebug\"]\n\n    /* Bundling */\n    //   A list containing the node command and its flags. Default is just 'node'.\n    // nodeExecutableAndArgs = [\"node\"]\n    //\n    //   The command to run when bundling. By default is 'bundle'\n    // bundleCommand = \"ram-bundle\"\n    //\n    //   The path to the CLI configuration file. Default is empty.\n    // bundleConfig = file(../rn-cli.config.js)\n    //\n    //   The name of the generated asset file containing your JS bundle\n    // bundleAssetName = \"MyApplication.android.bundle\"\n    //\n    //   The entry file for bundle generation. Default is 'index.android.js' or 'index.js'\n    // entryFile = file(\"../js/MyApplication.android.js\")\n    //\n    //   A list of extra flags to pass to the 'bundle' commands.\n    //   See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle\n    // extraPackagerArgs = []\n\n    /* Hermes Commands */\n    //   The hermes compiler command to run. By default it is 'hermesc'\n    // hermesCommand = \"$rootDir/my-custom-hermesc/bin/hermesc\"\n    //\n    //   The list of flags to pass to the Hermes compiler. By default is \"-O\", \"-output-source-map\"\n    // hermesFlags = [\"-O\", \"-output-source-map\"]\n\n    /* Autolinking */\n    autolinkLibrariesWithApp()\n}\n\n/**\n * Set this to true to Run Proguard on Release builds to minify the Java bytecode.\n */\ndef enableProguardInReleaseBuilds = false\n\n/**\n * The preferred build flavor of JavaScriptCore (JSC)\n *\n * For example, to use the international variant, you can use:\n * `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`\n *\n * The international variant includes ICU i18n library and necessary data\n * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that\n * give correct results when using with locales other than en-US. Note that\n * this variant is about 6MiB larger per architecture than default.\n */\ndef jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'\n\n// Detox configuration\ndef detoxTestBuildType = System.getProperty(\"testBuildType\", \"debug\")\n\nandroid {\n    ndkVersion rootProject.ext.ndkVersion\n    buildToolsVersion rootProject.ext.buildToolsVersion\n    compileSdk rootProject.ext.compileSdkVersion\n\n    namespace \"run.granite.image.example\"\n    defaultConfig {\n        applicationId \"run.granite.image.example\"\n        minSdkVersion rootProject.ext.minSdkVersion\n        targetSdkVersion rootProject.ext.targetSdkVersion\n        versionCode 1\n        versionName \"1.0\"\n\n        // Detox instrumentation runner\n        testBuildType detoxTestBuildType\n        testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n    }\n    signingConfigs {\n        debug {\n            storeFile file('debug.keystore')\n            storePassword 'android'\n            keyAlias 'androiddebugkey'\n            keyPassword 'android'\n        }\n    }\n    buildTypes {\n        debug {\n            signingConfig signingConfigs.debug\n        }\n        release {\n            // Caution! In production, you need to generate your own keystore file.\n            // see https://reactnative.dev/docs/signed-apk-android.\n            signingConfig signingConfigs.debug\n            minifyEnabled enableProguardInReleaseBuilds\n            proguardFiles getDefaultProguardFile(\"proguard-android.txt\"), \"proguard-rules.pro\"\n        }\n    }\n}\n\ndependencies {\n    // The version of react-native is set by the React Native Gradle Plugin\n    implementation(\"com.facebook.react:react-android\")\n\n    if (hermesEnabled.toBoolean()) {\n        implementation(\"com.facebook.react:hermes-android\")\n    } else {\n        implementation jscFlavor\n    }\n\n    // Detox dependencies\n    androidTestImplementation('com.wix:detox:+')\n    androidTestImplementation 'junit:junit:4.13.2'\n}\n"
  },
  {
    "path": "packages/image/example/android/app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n"
  },
  {
    "path": "packages/image/example/android/app/src/androidTest/java/run/granite/image/example/DetoxTest.java",
    "content": "package run.granite.image.example;\n\nimport com.wix.detox.Detox;\nimport com.wix.detox.config.DetoxConfig;\n\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport androidx.test.ext.junit.runners.AndroidJUnit4;\nimport androidx.test.filters.LargeTest;\nimport androidx.test.rule.ActivityTestRule;\n\n@RunWith(AndroidJUnit4.class)\n@LargeTest\npublic class DetoxTest {\n\n    @Rule\n    public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);\n\n    @Test\n    public void runDetoxTests() {\n        DetoxConfig detoxConfig = new DetoxConfig();\n        detoxConfig.idlePolicyConfig.masterTimeoutSec = 90;\n        detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60;\n        detoxConfig.rnContextLoadTimeoutSec = (BuildConfig.DEBUG ? 180 : 60);\n\n        Detox.runTests(mActivityRule, detoxConfig);\n    }\n}\n"
  },
  {
    "path": "packages/image/example/android/app/src/debug/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    <application\n        android:usesCleartextTraffic=\"true\"\n        tools:targetApi=\"28\"\n        tools:ignore=\"GoogleAppIndexingWarning\"/>\n</manifest>\n"
  },
  {
    "path": "packages/image/example/android/app/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n\n    <application\n      android:name=\".MainApplication\"\n      android:label=\"@string/app_name\"\n      android:icon=\"@mipmap/ic_launcher\"\n      android:roundIcon=\"@mipmap/ic_launcher_round\"\n      android:allowBackup=\"false\"\n      android:theme=\"@style/AppTheme\"\n      android:supportsRtl=\"true\">\n      <activity\n        android:name=\".MainActivity\"\n        android:label=\"@string/app_name\"\n        android:configChanges=\"keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode\"\n        android:launchMode=\"singleTask\"\n        android:windowSoftInputMode=\"adjustResize\"\n        android:exported=\"true\">\n        <intent-filter>\n            <action android:name=\"android.intent.action.MAIN\" />\n            <category android:name=\"android.intent.category.LAUNCHER\" />\n        </intent-filter>\n      </activity>\n    </application>\n</manifest>\n"
  },
  {
    "path": "packages/image/example/android/app/src/main/java/run/granite/image/example/MainActivity.kt",
    "content": "package run.granite.image.example\n\nimport com.facebook.react.ReactActivity\nimport com.facebook.react.ReactActivityDelegate\nimport com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled\nimport com.facebook.react.defaults.DefaultReactActivityDelegate\n\nclass MainActivity : ReactActivity() {\n\n  /**\n   * Returns the name of the main component registered from JavaScript. This is used to schedule\n   * rendering of the component.\n   */\n  override fun getMainComponentName(): String = \"GraniteImageExample\"\n\n  /**\n   * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]\n   * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]\n   */\n  override fun createReactActivityDelegate(): ReactActivityDelegate =\n      DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)\n}\n"
  },
  {
    "path": "packages/image/example/android/app/src/main/java/run/granite/image/example/MainApplication.kt",
    "content": "package run.granite.image.example\n\nimport android.app.Application\nimport com.facebook.react.PackageList\nimport com.facebook.react.ReactApplication\nimport com.facebook.react.ReactHost\nimport com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative\nimport com.facebook.react.ReactNativeHost\nimport com.facebook.react.ReactPackage\nimport com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost\nimport com.facebook.react.defaults.DefaultReactNativeHost\n\nclass MainApplication : Application(), ReactApplication {\n\n  override val reactNativeHost: ReactNativeHost =\n      object : DefaultReactNativeHost(this) {\n        override fun getPackages(): List<ReactPackage> =\n            PackageList(this).packages.apply {\n              // Packages that cannot be autolinked yet can be added manually here, for example:\n              // add(MyReactNativePackage())\n            }\n\n        override fun getJSMainModuleName(): String = \"index\"\n\n        override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG\n\n        override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED\n        override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED\n      }\n\n  override val reactHost: ReactHost\n    get() = getDefaultReactHost(applicationContext, reactNativeHost)\n\n  override fun onCreate() {\n    super.onCreate()\n    loadReactNative(this)\n  }\n}\n"
  },
  {
    "path": "packages/image/example/android/app/src/main/res/drawable/rn_edit_text_material.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2014 The Android Open Source Project\n\n     Licensed under the Apache License, Version 2.0 (the \"License\");\n     you may not use this file except in compliance with the License.\n     You may obtain a copy of the License at\n\n          http://www.apache.org/licenses/LICENSE-2.0\n\n     Unless required by applicable law or agreed to in writing, software\n     distributed under the License is distributed on an \"AS IS\" BASIS,\n     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n     See the License for the specific language governing permissions and\n     limitations under the License.\n-->\n<inset xmlns:android=\"http://schemas.android.com/apk/res/android\"\n       android:insetLeft=\"@dimen/abc_edit_text_inset_horizontal_material\"\n       android:insetRight=\"@dimen/abc_edit_text_inset_horizontal_material\"\n       android:insetTop=\"@dimen/abc_edit_text_inset_top_material\"\n       android:insetBottom=\"@dimen/abc_edit_text_inset_bottom_material\"\n       >\n\n    <selector>\n        <!--\n          This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).\n          The item below with state_pressed=\"false\" and state_focused=\"false\" causes a NullPointerException.\n          NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'\n\n          <item android:state_pressed=\"false\" android:state_focused=\"false\" android:drawable=\"@drawable/abc_textfield_default_mtrl_alpha\"/>\n\n          For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.\n        -->\n        <item android:state_enabled=\"false\" android:drawable=\"@drawable/abc_textfield_default_mtrl_alpha\"/>\n        <item android:drawable=\"@drawable/abc_textfield_activated_mtrl_alpha\"/>\n    </selector>\n\n</inset>\n"
  },
  {
    "path": "packages/image/example/android/app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">GraniteImageExample</string>\n</resources>\n"
  },
  {
    "path": "packages/image/example/android/app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.DayNight.NoActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"android:editTextBackground\">@drawable/rn_edit_text_material</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "packages/image/example/android/build.gradle",
    "content": "buildscript {\n    ext {\n        buildToolsVersion = \"36.0.0\"\n        minSdkVersion = 24\n        compileSdkVersion = 36\n        targetSdkVersion = 36\n        ndkVersion = \"27.1.12297006\"\n        kotlinVersion = \"2.1.20\"\n    }\n    repositories {\n        google()\n        mavenCentral()\n    }\n    dependencies {\n        classpath(\"com.android.tools.build:gradle\")\n        classpath(\"com.facebook.react:react-native-gradle-plugin\")\n        classpath(\"org.jetbrains.kotlin:kotlin-gradle-plugin\")\n    }\n}\n\nallprojects {\n    repositories {\n        maven {\n            // Detox maven repository\n            url(\"$rootDir/../node_modules/detox/Detox-android\")\n        }\n    }\n}\n\napply plugin: \"com.facebook.react.rootproject\"\n"
  },
  {
    "path": "packages/image/example/android/gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.14.3-bin.zip\nnetworkTimeout=10000\nvalidateDistributionUrl=true\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "packages/image/example/android/gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\n# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m\norg.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app's APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n\n# Use this property to specify which architecture you want to build.\n# You can also override it from the CLI using\n# ./gradlew <task> -PreactNativeArchitectures=x86_64\nreactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64\n\n# Use this property to enable support to the new architecture.\n# This will allow you to use TurboModules and the Fabric render in\n# your application. You should enable this flag either if you want\n# to write custom TurboModules/Fabric components OR use libraries that\n# are providing them.\nnewArchEnabled=true\n\n# Use this property to enable or disable the Hermes JS engine.\n# If set to false, you will be using JSC instead.\nhermesEnabled=true\n\n# Use this property to enable edge-to-edge display support.\n# This allows your app to draw behind system bars for an immersive UI.\n# Note: Only works with ReactActivity and should not be used with custom Activity.\nedgeToEdgeEnabled=false\n"
  },
  {
    "path": "packages/image/example/android/gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\n# This is normally unused\n# shellcheck disable=SC2034\nAPP_BASE_NAME=${0##*/}\n# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)\nAPP_HOME=$( cd -P \"${APP_HOME:-./}\" > /dev/null && printf '%s\\n' \"$PWD\" ) || exit\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=\"\\\\\\\"\\\\\\\"\"\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    if ! command -v java >/dev/null 2>&1\n    then\n        die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Collect all arguments for the java command:\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,\n#     and any embedded shellness will be escaped.\n#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be\n#     treated as '${Hostname}' itself on the command line.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        -jar \"$APP_HOME/gradle/wrapper/gradle-wrapper.jar\" \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "packages/image/example/android/gradlew.bat",
    "content": "@REM Copyright (c) Meta Platforms, Inc. and affiliates.\n@REM\n@REM This source code is licensed under the MIT license found in the\n@REM LICENSE file in the root directory of this source tree.\n\n@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\n@rem you may not use this file except in compliance with the License.\n@rem You may obtain a copy of the License at\n@rem\n@rem      https://www.apache.org/licenses/LICENSE-2.0\n@rem\n@rem Unless required by applicable law or agreed to in writing, software\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n@rem See the License for the specific language governing permissions and\n@rem limitations under the License.\n@rem\n@rem SPDX-License-Identifier: Apache-2.0\n@rem\n\n@if \"%DEBUG%\"==\"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\n@rem This is normally unused\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif %ERRORLEVEL% equ 0 goto execute\n\necho. 1>&2\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2\necho. 1>&2\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\necho location of your Java installation. 1>&2\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto execute\n\necho. 1>&2\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2\necho. 1>&2\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\necho location of your Java installation. 1>&2\n\ngoto fail\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=\n\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" -jar \"%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\" %*\n\n:end\n@rem End local scope for the variables with windows NT shell\nif %ERRORLEVEL% equ 0 goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nset EXIT_CODE=%ERRORLEVEL%\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\nexit /b %EXIT_CODE%\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "packages/image/example/android/settings.gradle",
    "content": "pluginManagement { includeBuild(\"../node_modules/@react-native/gradle-plugin\") }\nplugins { id(\"com.facebook.react.settings\") }\nextensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }\nrootProject.name = 'run.granite.image.example'\ninclude ':app'\nincludeBuild('../node_modules/@react-native/gradle-plugin')\n"
  },
  {
    "path": "packages/image/example/app.json",
    "content": "{\n  \"name\": \"GraniteImageExample\",\n  \"displayName\": \"GraniteImageExample\"\n}\n"
  },
  {
    "path": "packages/image/example/babel.config.js",
    "content": "const path = require('path');\nconst { getConfig } = require('react-native-builder-bob/babel-config');\nconst pkg = require('../package.json');\n\nconst root = path.resolve(__dirname, '..');\n\nmodule.exports = getConfig(\n  {\n    presets: ['module:@react-native/babel-preset'],\n  },\n  { root, pkg }\n);\n"
  },
  {
    "path": "packages/image/example/e2e/GraniteImage.e2e.ts",
    "content": "import { by, device, element, expect, waitFor } from 'detox';\n\ndescribe('GraniteImage E2E Tests', () => {\n  beforeAll(async () => {\n    await device.launchApp();\n  });\n\n  beforeEach(async () => {\n    await device.reloadReactNative();\n    await waitFor(element(by.id('app-title')))\n      .toBeVisible()\n      .withTimeout(10000);\n  });\n\n  // Helper function to scroll to element with retry\n  const scrollToElement = async (testID: string) => {\n    // First check if already visible\n    try {\n      await expect(element(by.id(testID))).toBeVisible();\n      return;\n    } catch {\n      // Not visible, need to scroll\n    }\n\n    // Scroll down in increments until element is visible\n    // Use explicit start position in middle of screen (0.5 normalized)\n    const maxScrollAttempts = 40;\n    for (let i = 0; i < maxScrollAttempts; i++) {\n      try {\n        // Use swipe instead of scroll for more reliable behavior\n        await element(by.id('main-scroll')).swipe('up', 'slow', 0.3, 0.5, 0.3);\n        await expect(element(by.id(testID))).toBeVisible();\n        return;\n      } catch {\n        // Continue scrolling\n      }\n    }\n    // Final attempt - let it throw if still not visible\n    await expect(element(by.id(testID))).toBeVisible();\n  };\n\n  // Helper function to scroll to text with retry\n  const scrollToText = async (text: string) => {\n    // First check if already visible\n    try {\n      await expect(element(by.text(text))).toBeVisible();\n      return;\n    } catch {\n      // Not visible, need to scroll\n    }\n\n    // Scroll down in increments until element is visible\n    const maxScrollAttempts = 40;\n    for (let i = 0; i < maxScrollAttempts; i++) {\n      try {\n        await element(by.id('main-scroll')).swipe('up', 'slow', 0.3, 0.5, 0.3);\n        await expect(element(by.text(text))).toBeVisible();\n        return;\n      } catch {\n        // Continue scrolling\n      }\n    }\n    // Final attempt - let it throw if still not visible\n    await expect(element(by.text(text))).toBeVisible();\n  };\n\n  describe('Basic Rendering', () => {\n    it('should display the app title', async () => {\n      await expect(element(by.id('app-title'))).toBeVisible();\n      await expect(element(by.text('GraniteImage Example'))).toBeVisible();\n    });\n\n    it('should display basic image', async () => {\n      await expect(element(by.id('basic-image'))).toBeVisible();\n    });\n  });\n\n  describe('Source Prop', () => {\n    it('should load image from URI string', async () => {\n      await expect(element(by.id('basic-image'))).toBeVisible();\n    });\n\n    it('should load image from source object with URI', async () => {\n      await scrollToElement('priority-image');\n      await expect(element(by.id('priority-image'))).toBeVisible();\n    });\n  });\n\n  describe('ResizeMode Prop', () => {\n    it('should display all resize mode buttons', async () => {\n      await scrollToElement('resize-cover');\n      await expect(element(by.id('resize-cover'))).toBeVisible();\n      await expect(element(by.id('resize-contain'))).toBeVisible();\n      await expect(element(by.id('resize-stretch'))).toBeVisible();\n      await expect(element(by.id('resize-center'))).toBeVisible();\n    });\n\n    it('should change to contain mode on tap', async () => {\n      await scrollToElement('resize-contain');\n      await element(by.id('resize-contain')).tap();\n      await expect(element(by.text('2. ResizeMode: contain'))).toBeVisible();\n    });\n\n    it('should change to stretch mode on tap', async () => {\n      await scrollToElement('resize-stretch');\n      await element(by.id('resize-stretch')).tap();\n      await expect(element(by.text('2. ResizeMode: stretch'))).toBeVisible();\n    });\n\n    it('should change to center mode on tap', async () => {\n      await scrollToElement('resize-center');\n      await element(by.id('resize-center')).tap();\n      await expect(element(by.text('2. ResizeMode: center'))).toBeVisible();\n    });\n\n    it('should display resize image after mode change', async () => {\n      await scrollToElement('resize-image');\n      await element(by.id('resize-contain')).tap();\n      await expect(element(by.id('resize-image'))).toBeVisible();\n    });\n  });\n\n  describe('Priority Prop', () => {\n    it('should display all priority buttons', async () => {\n      await scrollToElement('priority-low');\n      await expect(element(by.id('priority-low'))).toBeVisible();\n      await expect(element(by.id('priority-normal'))).toBeVisible();\n      await expect(element(by.id('priority-high'))).toBeVisible();\n    });\n\n    it('should change to low priority on tap', async () => {\n      await scrollToElement('priority-low');\n      await element(by.id('priority-low')).tap();\n      await expect(element(by.text('3. Priority: low'))).toBeVisible();\n    });\n\n    it('should change to high priority on tap', async () => {\n      await scrollToElement('priority-high');\n      await element(by.id('priority-high')).tap();\n      await expect(element(by.text('3. Priority: high'))).toBeVisible();\n    });\n\n    it('should display priority image', async () => {\n      await scrollToElement('priority-image');\n      await expect(element(by.id('priority-image'))).toBeVisible();\n    });\n  });\n\n  describe('CachePolicy Prop', () => {\n    it('should display all cache policy buttons', async () => {\n      await scrollToElement('cache-memory');\n      await expect(element(by.id('cache-memory'))).toBeVisible();\n      await expect(element(by.id('cache-disk'))).toBeVisible();\n      await expect(element(by.id('cache-none'))).toBeVisible();\n    });\n\n    it('should change to memory policy on tap', async () => {\n      await scrollToElement('cache-memory');\n      await element(by.id('cache-memory')).tap();\n      // Verify cache-image is visible after tap (indicates successful interaction)\n      await scrollToElement('cache-image');\n      await expect(element(by.id('cache-image'))).toBeVisible();\n    });\n\n    it('should change to none policy on tap', async () => {\n      await scrollToElement('cache-none');\n      await element(by.id('cache-none')).tap();\n      // Verify cache-image is visible after tap (indicates successful interaction)\n      await scrollToElement('cache-image');\n      await expect(element(by.id('cache-image'))).toBeVisible();\n    });\n\n    it('should display cache image', async () => {\n      await scrollToElement('cache-image');\n      await expect(element(by.id('cache-image'))).toBeVisible();\n    });\n  });\n\n  describe('TintColor Prop', () => {\n    it('should display tint toggle button with OFF state', async () => {\n      await scrollToElement('tint-toggle');\n      await expect(element(by.id('tint-toggle'))).toBeVisible();\n      await expect(element(by.text('Tint OFF'))).toBeVisible();\n    });\n\n    it('should toggle tint ON on tap', async () => {\n      await scrollToElement('tint-toggle');\n      await element(by.id('tint-toggle')).tap();\n      // Verify tint-image is visible after toggle (indicates successful interaction)\n      await scrollToElement('tint-image');\n      await expect(element(by.id('tint-image'))).toBeVisible();\n    });\n\n    it('should toggle tint OFF on second tap', async () => {\n      await scrollToElement('tint-toggle');\n      await element(by.id('tint-toggle')).tap(); // ON\n      await element(by.id('tint-toggle')).tap(); // OFF\n      // Verify tint-image is visible after toggle (indicates successful interaction)\n      await scrollToElement('tint-image');\n      await expect(element(by.id('tint-image'))).toBeVisible();\n    });\n\n    it('should display tint image', async () => {\n      await scrollToElement('tint-image');\n      await expect(element(by.id('tint-image'))).toBeVisible();\n    });\n  });\n\n  describe('Headers Prop', () => {\n    it('should display image loaded with custom headers', async () => {\n      await scrollToElement('headers-image');\n      await expect(element(by.id('headers-image'))).toBeVisible();\n    });\n  });\n\n  describe('DefaultSource Prop', () => {\n    it('should display defaultSource section', async () => {\n      await scrollToText('7. DefaultSource (Placeholder)');\n      await expect(element(by.text('7. DefaultSource (Placeholder)'))).toBeVisible();\n    });\n\n    it('should display defaultSource image', async () => {\n      await scrollToElement('default-source-image');\n      await expect(element(by.id('default-source-image'))).toBeVisible();\n    });\n\n    it('should have reload button for placeholder testing', async () => {\n      await scrollToElement('reload-placeholder-button');\n      await expect(element(by.id('reload-placeholder-button'))).toExist();\n    });\n  });\n\n  describe('FallbackSource Prop', () => {\n    it('should display error handling section', async () => {\n      await scrollToText('8. Error Handling with Fallback');\n      await expect(element(by.text('8. Error Handling with Fallback'))).toBeVisible();\n    });\n\n    it('should display error image (fallback loaded)', async () => {\n      await scrollToElement('error-image');\n      await expect(element(by.id('error-image'))).toBeVisible();\n    });\n  });\n\n  describe('Callback Events', () => {\n    it('should trigger onLoadStart and log it', async () => {\n      // Scroll to callbacks section and trigger new image load\n      await scrollToElement('callbacks-image');\n      await scrollToElement('load-new-image-button');\n      await element(by.id('load-new-image-button')).tap();\n\n      // Wait for log to appear\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      // Scroll to log container and check\n      await scrollToElement('log-container');\n      await expect(element(by.id('log-0'))).toBeVisible();\n    });\n\n    it('should trigger onLoad with dimensions', async () => {\n      await scrollToElement('callbacks-image');\n      await scrollToElement('load-new-image-button');\n      await element(by.id('load-new-image-button')).tap();\n\n      // Wait for image to load\n      await new Promise((resolve) => setTimeout(resolve, 3000));\n\n      await scrollToElement('log-container');\n      // Verify log entries exist (onLoad logs dimensions like \"onLoad: 400x300\")\n      await expect(element(by.id('log-container'))).toBeVisible();\n    });\n\n    it('should trigger onLoadEnd', async () => {\n      await scrollToElement('callbacks-image');\n      await scrollToElement('load-new-image-button');\n      await element(by.id('load-new-image-button')).tap();\n\n      // Wait for image to load completely\n      await new Promise((resolve) => setTimeout(resolve, 3000));\n\n      await scrollToElement('log-container');\n      await expect(element(by.id('log-container'))).toBeVisible();\n    });\n\n    it('should trigger onError for invalid URL', async () => {\n      // The error-image section uses an invalid URL\n      await scrollToElement('error-image');\n\n      // Wait for error to be logged\n      await new Promise((resolve) => setTimeout(resolve, 2000));\n\n      await scrollToElement('log-container');\n      await expect(element(by.id('log-container'))).toBeVisible();\n    });\n  });\n\n  describe('Static Methods', () => {\n    describe('preload', () => {\n      it('should display preload button', async () => {\n        await scrollToElement('preload-button');\n        // Button may be partially visible due to scroll position, verify it exists\n        await expect(element(by.id('preload-button'))).toExist();\n      });\n\n      it('should trigger preload on tap and log start', async () => {\n        await scrollToElement('preload-button');\n        await element(by.id('preload-button')).tap();\n\n        // Wait a moment for log to appear\n        await new Promise((resolve) => setTimeout(resolve, 500));\n\n        await scrollToElement('log-container');\n        await expect(element(by.id('log-container'))).toBeVisible();\n      });\n\n      it('should log preload completion', async () => {\n        await scrollToElement('preload-button');\n        await element(by.id('preload-button')).tap();\n\n        // Wait for preload to complete\n        await new Promise((resolve) => setTimeout(resolve, 3000));\n\n        await scrollToElement('log-container');\n        await expect(element(by.id('log-container'))).toBeVisible();\n      });\n    });\n\n    describe('clearMemoryCache', () => {\n      it('should display clear memory cache button', async () => {\n        await scrollToElement('clear-memory-cache-button');\n        await expect(element(by.id('clear-memory-cache-button'))).toBeVisible();\n      });\n\n      it('should trigger clear memory cache on tap', async () => {\n        await scrollToElement('clear-memory-cache-button');\n        await element(by.id('clear-memory-cache-button')).tap();\n\n        // Wait for action to complete\n        await new Promise((resolve) => setTimeout(resolve, 500));\n\n        await scrollToElement('log-container');\n        await expect(element(by.id('log-container'))).toBeVisible();\n      });\n    });\n\n    describe('clearDiskCache', () => {\n      it('should display clear disk cache button', async () => {\n        await scrollToElement('clear-disk-cache-button');\n        await expect(element(by.id('clear-disk-cache-button'))).toBeVisible();\n      });\n\n      it('should trigger clear disk cache on tap', async () => {\n        await scrollToElement('clear-disk-cache-button');\n        await element(by.id('clear-disk-cache-button')).tap();\n\n        // Wait for action to complete\n        await new Promise((resolve) => setTimeout(resolve, 500));\n\n        await scrollToElement('log-container');\n        await expect(element(by.id('log-container'))).toBeVisible();\n      });\n    });\n  });\n\n  describe('GIF Support', () => {\n    it('should display GIF image', async () => {\n      await scrollToElement('gif-image');\n      await expect(element(by.id('gif-image'))).toBeVisible();\n    });\n  });\n\n  describe('App Stability', () => {\n    it('should remain stable after multiple resize mode changes', async () => {\n      await scrollToElement('resize-cover');\n\n      await element(by.id('resize-cover')).tap();\n      await element(by.id('resize-contain')).tap();\n      await element(by.id('resize-stretch')).tap();\n      await element(by.id('resize-center')).tap();\n      await element(by.id('resize-cover')).tap();\n\n      await expect(element(by.id('resize-image'))).toBeVisible();\n    });\n\n    it('should remain stable after multiple priority changes', async () => {\n      await scrollToElement('priority-low');\n\n      await element(by.id('priority-low')).tap();\n      await element(by.id('priority-normal')).tap();\n      await element(by.id('priority-high')).tap();\n      await element(by.id('priority-low')).tap();\n\n      await scrollToElement('priority-image');\n      await expect(element(by.id('priority-image'))).toBeVisible();\n    });\n\n    it('should remain stable after multiple cache policy changes', async () => {\n      await scrollToElement('cache-memory');\n\n      await element(by.id('cache-memory')).tap();\n      await element(by.id('cache-disk')).tap();\n      await element(by.id('cache-none')).tap();\n      await element(by.id('cache-disk')).tap();\n\n      await scrollToElement('cache-image');\n      await expect(element(by.id('cache-image'))).toBeVisible();\n    });\n\n    it('should remain stable after reload all images', async () => {\n      await scrollToElement('reload-all-button');\n      await element(by.id('reload-all-button')).tap();\n\n      // Wait for reload\n      await new Promise((resolve) => setTimeout(resolve, 2000));\n\n      // Scroll back to top and verify basic image still works\n      await device.reloadReactNative();\n      await waitFor(element(by.id('app-title')))\n        .toBeVisible()\n        .withTimeout(10000);\n      await expect(element(by.id('basic-image'))).toBeVisible();\n    });\n\n    it('should remain stable after all static method calls', async () => {\n      await scrollToElement('preload-button');\n      await element(by.id('preload-button')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 500));\n\n      await scrollToElement('clear-memory-cache-button');\n      await element(by.id('clear-memory-cache-button')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 500));\n\n      await scrollToElement('clear-disk-cache-button');\n      await element(by.id('clear-disk-cache-button')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 500));\n\n      await scrollToElement('reload-all-button');\n      await element(by.id('reload-all-button')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      // Verify app is still responsive\n      await scrollToElement('log-container');\n      await expect(element(by.id('log-container'))).toBeVisible();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/image/example/e2e/jest.config.js",
    "content": "/** @type {import('@jest/types').Config.InitialOptions} */\nmodule.exports = {\n  rootDir: '..',\n  testMatch: ['<rootDir>/e2e/**/*.e2e.ts'],\n  testTimeout: 120000,\n  maxWorkers: 1,\n  globalSetup: 'detox/runners/jest/globalSetup',\n  globalTeardown: 'detox/runners/jest/globalTeardown',\n  reporters: ['detox/runners/jest/reporter'],\n  testEnvironment: 'detox/runners/jest/testEnvironment',\n  verbose: true,\n  transform: {\n    '^.+\\\\.(ts|tsx)$': [\n      'ts-jest',\n      {\n        tsconfig: {\n          module: 'CommonJS',\n          moduleResolution: 'node',\n          esModuleInterop: true,\n          verbatimModuleSyntax: false,\n        },\n      },\n    ],\n  },\n};\n"
  },
  {
    "path": "packages/image/example/index.js",
    "content": "import { AppRegistry } from 'react-native';\nimport { name as appName } from './app.json';\nimport App from './src/App';\n\nAppRegistry.registerComponent(appName, () => App);\n"
  },
  {
    "path": "packages/image/example/ios/.xcode.env",
    "content": "# This `.xcode.env` file is versioned and is used to source the environment\n# used when running script phases inside Xcode.\n# To customize your local environment, you can create an `.xcode.env.local`\n# file that is not versioned.\n\n# NODE_BINARY variable contains the PATH to the node executable.\n#\n# Customize the NODE_BINARY variable here.\n# For example, to use nvm with brew, add the following line\n# . \"$(brew --prefix nvm)/nvm.sh\" --no-use\nexport NODE_BINARY=$(command -v node)\n"
  },
  {
    "path": "packages/image/example/ios/GraniteImageExample/AppDelegate.swift",
    "content": "import UIKit\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\n\n@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n  var window: UIWindow?\n\n  var reactNativeDelegate: ReactNativeDelegate?\n  var reactNativeFactory: RCTReactNativeFactory?\n\n  func application(\n    _ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n  ) -> Bool {\n    let delegate = ReactNativeDelegate()\n    let factory = RCTReactNativeFactory(delegate: delegate)\n    delegate.dependencyProvider = RCTAppDependencyProvider()\n\n    reactNativeDelegate = delegate\n    reactNativeFactory = factory\n\n    window = UIWindow(frame: UIScreen.main.bounds)\n\n    factory.startReactNative(\n      withModuleName: \"GraniteImageExample\",\n      in: window,\n      launchOptions: launchOptions\n    )\n\n    return true\n  }\n}\n\nclass ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {\n  override func sourceURL(for bridge: RCTBridge) -> URL? {\n    self.bundleURL()\n  }\n\n  override func bundleURL() -> URL? {\n#if DEBUG\n    RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: \"index\")\n#else\n    Bundle.main.url(forResource: \"main\", withExtension: \"jsbundle\")\n#endif\n  }\n}\n"
  },
  {
    "path": "packages/image/example/ios/GraniteImageExample/Images.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\": [\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"2x\",\n      \"size\": \"20x20\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"3x\",\n      \"size\": \"20x20\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"2x\",\n      \"size\": \"29x29\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"3x\",\n      \"size\": \"29x29\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"2x\",\n      \"size\": \"40x40\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"3x\",\n      \"size\": \"40x40\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"2x\",\n      \"size\": \"60x60\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"3x\",\n      \"size\": \"60x60\"\n    },\n    {\n      \"idiom\": \"ios-marketing\",\n      \"scale\": \"1x\",\n      \"size\": \"1024x1024\"\n    }\n  ],\n  \"info\": {\n    \"author\": \"xcode\",\n    \"version\": 1\n  }\n}\n"
  },
  {
    "path": "packages/image/example/ios/GraniteImageExample/Images.xcassets/Contents.json",
    "content": "{\n  \"info\": {\n    \"version\": 1,\n    \"author\": \"xcode\"\n  }\n}\n"
  },
  {
    "path": "packages/image/example/ios/GraniteImageExample/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>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>GraniteImageExample</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</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>$(MARKETING_VERSION)</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>NSAppTransportSecurity</key>\n\t<dict>\n\t\t<key>NSAllowsArbitraryLoads</key>\n\t\t<false/>\n\t\t<key>NSAllowsLocalNetworking</key>\n\t\t<true/>\n\t</dict>\n\t<key>NSLocationWhenInUseUsageDescription</key>\n\t<string></string>\n\t<key>RCTNewArchEnabled</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>arm64</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UIViewControllerBasedStatusBarAppearance</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "packages/image/example/ios/GraniteImageExample/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"15702\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <device id=\"retina4_7\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"15704\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"GraniteImageExample\" textAlignment=\"center\" lineBreakMode=\"middleTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"18\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GJd-Yh-RWb\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"202\" width=\"375\" height=\"43\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"36\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Powered by React Native\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"MN2-I3-ftu\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"626\" width=\"375\" height=\"21\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                        </subviews>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\" cocoaTouchSystemColor=\"whiteColor\"/>\n                        <constraints>\n                            <constraint firstItem=\"Bcu-3y-fUS\" firstAttribute=\"bottom\" secondItem=\"MN2-I3-ftu\" secondAttribute=\"bottom\" constant=\"20\" id=\"OZV-Vh-mqD\"/>\n                            <constraint firstItem=\"Bcu-3y-fUS\" firstAttribute=\"centerX\" secondItem=\"GJd-Yh-RWb\" secondAttribute=\"centerX\" id=\"Q3B-4B-g5h\"/>\n                            <constraint firstItem=\"MN2-I3-ftu\" firstAttribute=\"centerX\" secondItem=\"Bcu-3y-fUS\" secondAttribute=\"centerX\" id=\"akx-eg-2ui\"/>\n                            <constraint firstItem=\"MN2-I3-ftu\" firstAttribute=\"leading\" secondItem=\"Bcu-3y-fUS\" secondAttribute=\"leading\" id=\"i1E-0Y-4RG\"/>\n                            <constraint firstItem=\"GJd-Yh-RWb\" firstAttribute=\"centerY\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"bottom\" multiplier=\"1/3\" constant=\"1\" id=\"moa-c2-u7t\"/>\n                            <constraint firstItem=\"GJd-Yh-RWb\" firstAttribute=\"leading\" secondItem=\"Bcu-3y-fUS\" secondAttribute=\"leading\" symbolic=\"YES\" id=\"x7j-FC-K8j\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"Bcu-3y-fUS\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"52.173913043478265\" y=\"375\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "packages/image/example/ios/GraniteImageExample/PrivacyInfo.xcprivacy",
    "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>NSPrivacyAccessedAPITypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>NSPrivacyAccessedAPIType</key>\n\t\t\t<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>\n\t\t\t<key>NSPrivacyAccessedAPITypeReasons</key>\n\t\t\t<array>\n\t\t\t\t<string>C617.1</string>\n\t\t\t</array>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>NSPrivacyAccessedAPIType</key>\n\t\t\t<string>NSPrivacyAccessedAPICategoryUserDefaults</string>\n\t\t\t<key>NSPrivacyAccessedAPITypeReasons</key>\n\t\t\t<array>\n\t\t\t\t<string>CA92.1</string>\n\t\t\t</array>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>NSPrivacyAccessedAPIType</key>\n\t\t\t<string>NSPrivacyAccessedAPICategorySystemBootTime</string>\n\t\t\t<key>NSPrivacyAccessedAPITypeReasons</key>\n\t\t\t<array>\n\t\t\t\t<string>35F9.1</string>\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>NSPrivacyCollectedDataTypes</key>\n\t<array/>\n\t<key>NSPrivacyTracking</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "packages/image/example/ios/GraniteImageExample.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 54;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t0C80B921A6F3F58F76C31292 /* libPods-GraniteImageExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-GraniteImageExample.a */; };\n\t\t13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };\n\t\t761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };\n\t\t81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };\n\t\tA9F772FFF3C4B359CA7FCF89 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t13B07F961A680F5B00A75B9A /* GraniteImageExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GraniteImageExample.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = GraniteImageExample/Images.xcassets; sourceTree = \"<group>\"; };\n\t\t13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = GraniteImageExample/Info.plist; sourceTree = \"<group>\"; };\n\t\t13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = GraniteImageExample/PrivacyInfo.xcprivacy; sourceTree = \"<group>\"; };\n\t\t3B4392A12AC88292D35C810B /* Pods-GraniteImageExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-GraniteImageExample.debug.xcconfig\"; path = \"Target Support Files/Pods-GraniteImageExample/Pods-GraniteImageExample.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t5709B34CF0A7D63546082F79 /* Pods-GraniteImageExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-GraniteImageExample.release.xcconfig\"; path = \"Target Support Files/Pods-GraniteImageExample/Pods-GraniteImageExample.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t5DCACB8F33CDC322A6C60F78 /* libPods-GraniteImageExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"libPods-GraniteImageExample.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = GraniteImageExample/AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = GraniteImageExample/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\tED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t13B07F8C1A680F5B00A75B9A /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0C80B921A6F3F58F76C31292 /* libPods-GraniteImageExample.a 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\t13B07FAE1A68108700A75B9A /* GraniteImageExample */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07FB51A68108700A75B9A /* Images.xcassets */,\n\t\t\t\t761780EC2CA45674006654EE /* AppDelegate.swift */,\n\t\t\t\t13B07FB61A68108700A75B9A /* Info.plist */,\n\t\t\t\t81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,\n\t\t\t\t13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,\n\t\t\t);\n\t\t\tname = GraniteImageExample;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t2D16E6871FA4F8E400B85C8A /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tED297162215061F000B7C4FE /* JavaScriptCore.framework */,\n\t\t\t\t5DCACB8F33CDC322A6C60F78 /* libPods-GraniteImageExample.a */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t832341AE1AAA6A7D00B99B32 /* Libraries */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tname = Libraries;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t83CBB9F61A601CBA00E9B192 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07FAE1A68108700A75B9A /* GraniteImageExample */,\n\t\t\t\t832341AE1AAA6A7D00B99B32 /* Libraries */,\n\t\t\t\t83CBBA001A601CBA00E9B192 /* Products */,\n\t\t\t\t2D16E6871FA4F8E400B85C8A /* Frameworks */,\n\t\t\t\tBBD78D7AC51CEA395F1C20DB /* Pods */,\n\t\t\t);\n\t\t\tindentWidth = 2;\n\t\t\tsourceTree = \"<group>\";\n\t\t\ttabWidth = 2;\n\t\t\tusesTabs = 0;\n\t\t};\n\t\t83CBBA001A601CBA00E9B192 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07F961A680F5B00A75B9A /* GraniteImageExample.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tBBD78D7AC51CEA395F1C20DB /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3B4392A12AC88292D35C810B /* Pods-GraniteImageExample.debug.xcconfig */,\n\t\t\t\t5709B34CF0A7D63546082F79 /* Pods-GraniteImageExample.release.xcconfig */,\n\t\t\t);\n\t\t\tpath = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t13B07F861A680F5B00A75B9A /* GraniteImageExample */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget \"GraniteImageExample\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tC38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t13B07F871A680F5B00A75B9A /* Sources */,\n\t\t\t\t13B07F8C1A680F5B00A75B9A /* Frameworks */,\n\t\t\t\t13B07F8E1A680F5B00A75B9A /* Resources */,\n\t\t\t\t00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,\n\t\t\t\t00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,\n\t\t\t\tE235C05ADACE081382539298 /* [CP] Copy Pods Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = GraniteImageExample;\n\t\t\tproductName = GraniteImageExample;\n\t\t\tproductReference = 13B07F961A680F5B00A75B9A /* GraniteImageExample.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t83CBB9F71A601CBA00E9B192 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 1210;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t13B07F861A680F5B00A75B9A = {\n\t\t\t\t\t\tLastSwiftMigration = 1120;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject \"GraniteImageExample\" */;\n\t\t\tcompatibilityVersion = \"Xcode 12.0\";\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 = 83CBB9F61A601CBA00E9B192;\n\t\t\tproductRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t13B07F861A680F5B00A75B9A /* GraniteImageExample */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t13B07F8E1A680F5B00A75B9A /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,\n\t\t\t\tA9F772FFF3C4B359CA7FCF89 /* PrivacyInfo.xcprivacy 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\t00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"$(SRCROOT)/.xcode.env.local\",\n\t\t\t\t\"$(SRCROOT)/.xcode.env\",\n\t\t\t);\n\t\t\tname = \"Bundle React Native code and images\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"set -e\\n\\nWITH_ENVIRONMENT=\\\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\\\"\\nREACT_NATIVE_XCODE=\\\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\\\"\\n\\n/bin/sh -c \\\"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\\\"\\n\";\n\t\t};\n\t\t00EEFC60759A1932668264C0 /* [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-GraniteImageExample/Pods-GraniteImageExample-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-GraniteImageExample/Pods-GraniteImageExample-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-GraniteImageExample/Pods-GraniteImageExample-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tC38B50BA6285516D6DCD4F65 /* [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-GraniteImageExample-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\tE235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {\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-GraniteImageExample/Pods-GraniteImageExample-resources-${CONFIGURATION}-input-files.xcfilelist\",\n\t\t\t);\n\t\t\tname = \"[CP] Copy Pods Resources\";\n\t\t\toutputFileListPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-GraniteImageExample/Pods-GraniteImageExample-resources-${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-GraniteImageExample/Pods-GraniteImageExample-resources.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t13B07F871A680F5B00A75B9A /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t761780ED2CA45674006654EE /* AppDelegate.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t13B07F941A680F5B00A75B9A /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-GraniteImageExample.debug.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\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tINFOPLIST_FILE = GraniteImageExample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\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\tMARKETING_VERSION = 1.0;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"-ObjC\",\n\t\t\t\t\t\"-lc++\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = graniteimage.example;\n\t\t\t\tPRODUCT_NAME = GraniteImageExample;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t13B07F951A680F5B00A75B9A /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-GraniteImageExample.release.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\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tINFOPLIST_FILE = GraniteImageExample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\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\tMARKETING_VERSION = 1.0;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"-ObjC\",\n\t\t\t\t\t\"-lc++\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = graniteimage.example;\n\t\t\t\tPRODUCT_NAME = GraniteImageExample;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t83CBBA201A601CBA00E9B192 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++20\";\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_COMMA = 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_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_IMPLICIT_RETAIN_SELF = 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\t\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = \"\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\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_SYMBOLS_PRIVATE_EXTERN = NO;\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_UNDECLARED_SELECTOR = YES;\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\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t/usr/lib/swift,\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tLIBRARY_SEARCH_PATHS = (\n\t\t\t\t\t\"\\\"$(SDKROOT)/usr/lib/swift\\\"\",\n\t\t\t\t\t\"\\\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\\\"\",\n\t\t\t\t\t\"\\\"$(inherited)\\\"\",\n\t\t\t\t);\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_CPLUSPLUSFLAGS = (\n\t\t\t\t\t\"$(OTHER_CFLAGS)\",\n\t\t\t\t\t\"-DFOLLY_NO_CONFIG\",\n\t\t\t\t\t\"-DFOLLY_MOBILE=1\",\n\t\t\t\t\t\"-DFOLLY_USE_LIBCPP=1\",\n\t\t\t\t\t\"-DFOLLY_CFG_NO_COROUTINES=1\",\n\t\t\t\t\t\"-DFOLLY_HAVE_CLOCK_GETTIME=1\",\n\t\t\t\t);\n\t\t\t\tREACT_NATIVE_PATH = \"${PODS_ROOT}/../../node_modules/react-native\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) DEBUG\";\n\t\t\t\tUSE_HERMES = true;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t83CBBA211A601CBA00E9B192 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++20\";\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_COMMA = 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_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_IMPLICIT_RETAIN_SELF = 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\t\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = \"\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\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_UNDECLARED_SELECTOR = YES;\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\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t/usr/lib/swift,\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tLIBRARY_SEARCH_PATHS = (\n\t\t\t\t\t\"\\\"$(SDKROOT)/usr/lib/swift\\\"\",\n\t\t\t\t\t\"\\\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\\\"\",\n\t\t\t\t\t\"\\\"$(inherited)\\\"\",\n\t\t\t\t);\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tOTHER_CPLUSPLUSFLAGS = (\n\t\t\t\t\t\"$(OTHER_CFLAGS)\",\n\t\t\t\t\t\"-DFOLLY_NO_CONFIG\",\n\t\t\t\t\t\"-DFOLLY_MOBILE=1\",\n\t\t\t\t\t\"-DFOLLY_USE_LIBCPP=1\",\n\t\t\t\t\t\"-DFOLLY_CFG_NO_COROUTINES=1\",\n\t\t\t\t\t\"-DFOLLY_HAVE_CLOCK_GETTIME=1\",\n\t\t\t\t);\n\t\t\t\tREACT_NATIVE_PATH = \"${PODS_ROOT}/../../node_modules/react-native\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tUSE_HERMES = true;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget \"GraniteImageExample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t13B07F941A680F5B00A75B9A /* Debug */,\n\t\t\t\t13B07F951A680F5B00A75B9A /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject \"GraniteImageExample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t83CBBA201A601CBA00E9B192 /* Debug */,\n\t\t\t\t83CBBA211A601CBA00E9B192 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;\n}\n"
  },
  {
    "path": "packages/image/example/ios/GraniteImageExample.xcodeproj/xcshareddata/xcschemes/GraniteImageExample.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1210\"\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 = \"13B07F861A680F5B00A75B9A\"\n               BuildableName = \"GraniteImageExample.app\"\n               BlueprintName = \"GraniteImageExample\"\n               ReferencedContainer = \"container:GraniteImageExample.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      <Testables>\n         <TestableReference\n            skipped = \"NO\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"00E356ED1AD99517003FC87E\"\n               BuildableName = \"GraniteImageExampleTests.xctest\"\n               BlueprintName = \"GraniteImageExampleTests\"\n               ReferencedContainer = \"container:GraniteImageExample.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      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"13B07F861A680F5B00A75B9A\"\n            BuildableName = \"GraniteImageExample.app\"\n            BlueprintName = \"GraniteImageExample\"\n            ReferencedContainer = \"container:GraniteImageExample.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"13B07F861A680F5B00A75B9A\"\n            BuildableName = \"GraniteImageExample.app\"\n            BlueprintName = \"GraniteImageExample\"\n            ReferencedContainer = \"container:GraniteImageExample.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": "packages/image/example/ios/GraniteImageExample.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:GraniteImageExample.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "packages/image/example/ios/Podfile",
    "content": "ENV['RCT_NEW_ARCH_ENABLED'] = '1'\n\n# Resolve react_native_pods.rb with node to allow for hoisting\nrequire Pod::Executable.execute_command('node', ['-p',\n  'require.resolve(\n    \"react-native/scripts/react_native_pods.rb\",\n    {paths: [process.argv[1]]},\n  )', __dir__]).strip\n\nplatform :ios, min_ios_version_supported\nprepare_react_native_project!\n\nlinkage = ENV['USE_FRAMEWORKS']\nif linkage != nil\n  Pod::UI.puts \"Configuring Pod with #{linkage}ally linked Frameworks\".green\n  use_frameworks! :linkage => linkage.to_sym\nend\n\ntarget 'GraniteImageExample' do\n  config = use_native_modules!\n\n  use_react_native!(\n    :path => config[:reactNativePath],\n    # An absolute path to your application root.\n    :app_path => \"#{Pod::Config.instance.installation_root}/..\"\n  )\n\n  post_install do |installer|\n    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202\n    react_native_post_install(\n      installer,\n      config[:reactNativePath],\n      :mac_catalyst_enabled => false,\n      # :ccache_enabled => true\n    )\n  end\nend\n"
  },
  {
    "path": "packages/image/example/jest.config.js",
    "content": "module.exports = {\n  preset: 'react-native',\n};\n"
  },
  {
    "path": "packages/image/example/metro.config.js",
    "content": "const path = require('path');\nconst { getDefaultConfig } = require('@react-native/metro-config');\nconst { withMetroConfig } = require('react-native-monorepo-config');\n\nconst root = path.resolve(__dirname, '..');\n\n/**\n * Metro configuration\n * https://facebook.github.io/metro/docs/configuration\n *\n * @type {import('metro-config').MetroConfig}\n */\nmodule.exports = withMetroConfig(getDefaultConfig(__dirname), {\n  root,\n  dirname: __dirname,\n});\n"
  },
  {
    "path": "packages/image/example/package.json",
    "content": "{\n  \"name\": \"@granite-js/image-example\",\n  \"version\": \"0.0.1\",\n  \"private\": true,\n  \"scripts\": {\n    \"android\": \"react-native run-android\",\n    \"ios\": \"react-native run-ios\",\n    \"start\": \"react-native start\",\n    \"build:android\": \"react-native build-android --extra-params \\\"--no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a\\\"\",\n    \"build:ios\": \"react-native build-ios --mode Debug\"\n  },\n  \"dependencies\": {\n    \"@granite-js/image\": \"workspace:*\",\n    \"react\": \"19.1.0\",\n    \"react-native\": \"0.81.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.25.2\",\n    \"@babel/preset-env\": \"^7.25.3\",\n    \"@babel/runtime\": \"^7.25.0\",\n    \"@react-native-community/cli\": \"20.0.0\",\n    \"@react-native-community/cli-platform-android\": \"20.0.0\",\n    \"@react-native-community/cli-platform-ios\": \"20.0.0\",\n    \"@react-native/babel-preset\": \"0.81.0\",\n    \"@react-native/metro-config\": \"0.81.0\",\n    \"@react-native/typescript-config\": \"0.81.0\",\n    \"@testing-library/react-native\": \"^13.3.3\",\n    \"@types/jest\": \"^30.0.0\",\n    \"@types/react\": \"^19.1.0\",\n    \"@types/react-test-renderer\": \"^19.1.0\",\n    \"detox\": \"^20.46.0\",\n    \"jest\": \"^30.2.0\",\n    \"jest-circus\": \"^30.2.0\",\n    \"react-native-builder-bob\": \"^0.40.17\",\n    \"react-native-monorepo-config\": \"^0.1.9\",\n    \"react-test-renderer\": \"^19.2.1\",\n    \"ts-jest\": \"^29.4.6\",\n    \"typescript\": \"^5.9.3\"\n  },\n  \"engines\": {\n    \"node\": \">=18\"\n  }\n}\n"
  },
  {
    "path": "packages/image/example/react-native.config.js",
    "content": "const path = require('path');\nconst pkg = require('../package.json');\n\nmodule.exports = {\n  project: {\n    ios: {\n      automaticPodsInstallation: true,\n    },\n  },\n  dependencies: {\n    [pkg.name]: {\n      root: path.join(__dirname, '..'),\n      platforms: {\n        // Codegen script incorrectly fails without this\n        // So we explicitly specify the platforms with empty object\n        ios: {},\n        android: {},\n      },\n    },\n  },\n};\n"
  },
  {
    "path": "packages/image/example/src/App.tsx",
    "content": "import { GraniteImage, type OnLoadEventData, type OnProgressEventData } from 'granite-image';\nimport React, { useState, useCallback } from 'react';\nimport { StyleSheet, ScrollView, Text, View, Button, TouchableOpacity } from 'react-native';\n\n// Test image URLs\nconst TEST_IMAGES = {\n  basic: 'https://picsum.photos/400/300',\n  large: 'https://picsum.photos/800/600',\n  error: 'https://invalid-url-that-does-not-exist.com/image.jpg',\n  gif: 'https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExcDd4Y2o2Y2JjNmFvbGNhN2FqaWF3MWMzOXY4ZHl5NmZ6Y3B4NnR0YyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3oEjI6SIIHBdRxXI40/giphy.gif',\n  withHeaders: 'https://httpbin.org/image/jpeg',\n};\n\ntype ResizeMode = 'cover' | 'contain' | 'stretch' | 'center';\ntype Priority = 'low' | 'normal' | 'high';\ntype CachePolicy = 'memory' | 'disk' | 'none';\n\nexport default function App() {\n  const [logs, setLogs] = useState<string[]>([]);\n  const [selectedResizeMode, setSelectedResizeMode] = useState<ResizeMode>('cover');\n  const [selectedPriority, setSelectedPriority] = useState<Priority>('normal');\n  const [selectedCache, setSelectedCache] = useState<CachePolicy>('disk');\n  const [showTint, setShowTint] = useState(false);\n  const [imageKey, setImageKey] = useState(0);\n\n  const addLog = useCallback((message: string) => {\n    const timestamp = new Date().toLocaleTimeString();\n    setLogs((prev) => [`[${timestamp}] ${message}`, ...prev.slice(0, 19)]);\n  }, []);\n\n  const handleLoadStart = useCallback(() => {\n    addLog('onLoadStart');\n  }, [addLog]);\n\n  const handleProgress = useCallback(\n    (event: OnProgressEventData) => {\n      const percent = event.total > 0 ? Math.round((event.loaded / event.total) * 100) : 0;\n      addLog(`onProgress: ${event.loaded}/${event.total} (${percent}%)`);\n    },\n    [addLog]\n  );\n\n  const handleLoad = useCallback(\n    (event: OnLoadEventData) => {\n      addLog(`onLoad: ${event.width}x${event.height}`);\n    },\n    [addLog]\n  );\n\n  const handleError = useCallback(\n    (error: { nativeEvent: { error: string } }) => {\n      addLog(`onError: ${error.nativeEvent.error}`);\n    },\n    [addLog]\n  );\n\n  const handleLoadEnd = useCallback(() => {\n    addLog('onLoadEnd');\n  }, [addLog]);\n\n  const handlePreload = useCallback(async () => {\n    addLog('Preloading images...');\n    try {\n      await GraniteImage.preload([\n        { uri: 'https://picsum.photos/500/500' },\n        { uri: 'https://picsum.photos/600/400', priority: 'high' },\n        {\n          uri: 'https://picsum.photos/700/700',\n          headers: { 'X-Custom-Header': 'test' },\n        },\n      ]);\n      addLog('Preload completed!');\n    } catch (e) {\n      addLog(`Preload error: ${e}`);\n    }\n  }, [addLog]);\n\n  const handleClearMemoryCache = useCallback(async () => {\n    try {\n      await GraniteImage.clearMemoryCache();\n      addLog('Memory cache cleared');\n    } catch (e) {\n      addLog(`Clear memory cache error: ${e}`);\n    }\n  }, [addLog]);\n\n  const handleClearDiskCache = useCallback(async () => {\n    try {\n      await GraniteImage.clearDiskCache();\n      addLog('Disk cache cleared');\n    } catch (e) {\n      addLog(`Clear disk cache error: ${e}`);\n    }\n  }, [addLog]);\n\n  const reloadImages = useCallback(() => {\n    setImageKey((prev) => prev + 1);\n    addLog('Reloading images...');\n  }, [addLog]);\n\n  return (\n    <ScrollView style={styles.container} testID=\"main-scroll\">\n      <Text style={styles.title} testID=\"app-title\">\n        GraniteImage Example\n      </Text>\n\n      {/* Section 1: Basic Image Loading */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>1. Basic Image Loading</Text>\n        <GraniteImage\n          key={`basic-${imageKey}`}\n          source={{ uri: TEST_IMAGES.basic }}\n          style={styles.image}\n          resizeMode=\"cover\"\n          testID=\"basic-image\"\n          onLoadStart={handleLoadStart}\n          onProgress={handleProgress}\n          onLoad={handleLoad}\n          onLoadEnd={handleLoadEnd}\n        />\n      </View>\n\n      {/* Section 2: ResizeMode Options */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>2. ResizeMode: {selectedResizeMode}</Text>\n        <View style={styles.buttonRow}>\n          {(['cover', 'contain', 'stretch', 'center'] as ResizeMode[]).map((mode) => (\n            <TouchableOpacity\n              key={mode}\n              style={[styles.optionButton, selectedResizeMode === mode && styles.optionButtonActive]}\n              onPress={() => setSelectedResizeMode(mode)}\n              testID={`resize-${mode}`}\n            >\n              <Text style={[styles.optionText, selectedResizeMode === mode && styles.optionTextActive]}>{mode}</Text>\n            </TouchableOpacity>\n          ))}\n        </View>\n        <GraniteImage\n          key={`resize-${selectedResizeMode}-${imageKey}`}\n          source={{ uri: 'https://picsum.photos/600/300' }}\n          style={styles.wideImage}\n          resizeMode={selectedResizeMode}\n          testID=\"resize-image\"\n        />\n      </View>\n\n      {/* Section 3: Priority Options */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>3. Priority: {selectedPriority}</Text>\n        <View style={styles.buttonRow}>\n          {(['low', 'normal', 'high'] as Priority[]).map((priority) => (\n            <TouchableOpacity\n              key={priority}\n              style={[styles.optionButton, selectedPriority === priority && styles.optionButtonActive]}\n              onPress={() => setSelectedPriority(priority)}\n              testID={`priority-${priority}`}\n            >\n              <Text style={[styles.optionText, selectedPriority === priority && styles.optionTextActive]}>\n                {priority}\n              </Text>\n            </TouchableOpacity>\n          ))}\n        </View>\n        <GraniteImage\n          key={`priority-${selectedPriority}-${imageKey}`}\n          source={{ uri: 'https://picsum.photos/400/400', priority: selectedPriority }}\n          style={styles.image}\n          testID=\"priority-image\"\n        />\n      </View>\n\n      {/* Section 4: Cache Policy Options */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>4. Cache Policy: {selectedCache}</Text>\n        <View style={styles.buttonRow}>\n          {(['memory', 'disk', 'none'] as CachePolicy[]).map((cache) => (\n            <TouchableOpacity\n              key={cache}\n              style={[styles.optionButton, selectedCache === cache && styles.optionButtonActive]}\n              onPress={() => setSelectedCache(cache)}\n              testID={`cache-${cache}`}\n            >\n              <Text style={[styles.optionText, selectedCache === cache && styles.optionTextActive]}>{cache}</Text>\n            </TouchableOpacity>\n          ))}\n        </View>\n        <GraniteImage\n          key={`cache-${selectedCache}-${imageKey}`}\n          source={{ uri: 'https://picsum.photos/450/300' }}\n          style={styles.image}\n          cachePolicy={selectedCache}\n          testID=\"cache-image\"\n        />\n      </View>\n\n      {/* Section 5: TintColor */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>5. TintColor</Text>\n        <TouchableOpacity\n          style={[styles.optionButton, showTint && styles.optionButtonActive]}\n          onPress={() => setShowTint(!showTint)}\n          testID=\"tint-toggle\"\n        >\n          <Text style={[styles.optionText, showTint && styles.optionTextActive]}>\n            {showTint ? 'Tint ON (Blue)' : 'Tint OFF'}\n          </Text>\n        </TouchableOpacity>\n        <GraniteImage\n          key={`tint-${showTint}-${imageKey}`}\n          source={{ uri: 'https://picsum.photos/400/250' }}\n          style={styles.image}\n          tintColor={showTint ? '#0066CC' : undefined}\n          testID=\"tint-image\"\n        />\n      </View>\n\n      {/* Section 6: Headers */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>6. Custom Headers</Text>\n        <GraniteImage\n          key={`headers-${imageKey}`}\n          source={{\n            uri: TEST_IMAGES.withHeaders,\n            headers: {\n              'X-Custom-Header': 'GraniteImage-Test',\n              Accept: 'image/*',\n            },\n          }}\n          style={styles.image}\n          testID=\"headers-image\"\n          onLoad={handleLoad}\n          onError={handleError}\n        />\n      </View>\n\n      {/* Section 7: DefaultSource (Placeholder) */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>7. DefaultSource (Placeholder)</Text>\n        <Text style={styles.hint}>Shows placeholder while loading large image</Text>\n        <GraniteImage\n          key={`default-source-${imageKey}`}\n          source={{ uri: 'https://picsum.photos/1200/800' }}\n          defaultSource=\"placeholder\"\n          style={styles.image}\n          testID=\"default-source-image\"\n          onLoadStart={handleLoadStart}\n          onLoad={handleLoad}\n          onLoadEnd={handleLoadEnd}\n        />\n        <Button\n          title=\"Reload to See Placeholder\"\n          testID=\"reload-placeholder-button\"\n          onPress={() => {\n            addLog('Reloading defaultSource image...');\n            setImageKey((prev) => prev + 1);\n          }}\n        />\n      </View>\n\n      {/* Section 8: Error Handling with Fallback */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>8. Error Handling with Fallback</Text>\n        <GraniteImage\n          key={`error-${imageKey}`}\n          source={{ uri: TEST_IMAGES.error }}\n          fallbackSource=\"https://picsum.photos/400/200\"\n          style={styles.image}\n          testID=\"error-image\"\n          onError={handleError}\n          onLoadEnd={handleLoadEnd}\n        />\n        <Text style={styles.hint}>Error triggers fallback image (should display image)</Text>\n      </View>\n\n      {/* Section 9: GIF Support */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>9. GIF Support</Text>\n        <GraniteImage\n          key={`gif-${imageKey}`}\n          source={{ uri: TEST_IMAGES.gif }}\n          style={styles.image}\n          testID=\"gif-image\"\n          onLoad={handleLoad}\n        />\n      </View>\n\n      {/* Section 10: Static Methods */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>10. Static Methods</Text>\n        <View style={styles.buttonColumn}>\n          <TouchableOpacity style={styles.actionButton} onPress={handlePreload} testID=\"preload-button\">\n            <Text style={styles.actionButtonText}>Preload Images</Text>\n          </TouchableOpacity>\n          <View style={styles.buttonSpacer} />\n          <TouchableOpacity\n            style={styles.actionButton}\n            onPress={handleClearMemoryCache}\n            testID=\"clear-memory-cache-button\"\n          >\n            <Text style={styles.actionButtonText}>Clear Memory Cache</Text>\n          </TouchableOpacity>\n          <View style={styles.buttonSpacer} />\n          <TouchableOpacity style={styles.actionButton} onPress={handleClearDiskCache} testID=\"clear-disk-cache-button\">\n            <Text style={styles.actionButtonText}>Clear Disk Cache</Text>\n          </TouchableOpacity>\n          <View style={styles.buttonSpacer} />\n          <TouchableOpacity style={styles.actionButton} onPress={reloadImages} testID=\"reload-all-button\">\n            <Text style={styles.actionButtonText}>Reload All Images</Text>\n          </TouchableOpacity>\n        </View>\n      </View>\n\n      {/* Section 11: All Callbacks */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>11. All Callbacks Test</Text>\n        <GraniteImage\n          key={`callbacks-${imageKey}`}\n          source={{ uri: `https://picsum.photos/400/300?random=${imageKey}` }}\n          style={styles.image}\n          testID=\"callbacks-image\"\n          onLoadStart={handleLoadStart}\n          onProgress={handleProgress}\n          onLoad={handleLoad}\n          onError={handleError}\n          onLoadEnd={handleLoadEnd}\n        />\n        <Button title=\"Load New Image\" testID=\"load-new-image-button\" onPress={() => setImageKey((prev) => prev + 1)} />\n      </View>\n\n      {/* Logs Section */}\n      <View style={styles.section}>\n        <Text style={styles.sectionTitle}>Event Logs</Text>\n        <View style={styles.logContainer} testID=\"log-container\">\n          {logs.length === 0 ? (\n            <Text style={styles.logEmpty}>No events yet</Text>\n          ) : (\n            logs.map((log, index) => (\n              <Text key={index} style={styles.logText} testID={`log-${index}`}>\n                {log}\n              </Text>\n            ))\n          )}\n        </View>\n        <Button title=\"Clear Logs\" onPress={() => setLogs([])} />\n      </View>\n\n      <View style={styles.footer} />\n    </ScrollView>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    backgroundColor: '#f5f5f5',\n  },\n  title: {\n    fontSize: 28,\n    fontWeight: 'bold',\n    textAlign: 'center',\n    marginTop: 60,\n    marginBottom: 20,\n    color: '#333',\n  },\n  section: {\n    backgroundColor: '#fff',\n    marginHorizontal: 16,\n    marginBottom: 16,\n    padding: 16,\n    borderRadius: 12,\n    shadowColor: '#000',\n    shadowOffset: { width: 0, height: 2 },\n    shadowOpacity: 0.1,\n    shadowRadius: 4,\n    elevation: 3,\n  },\n  sectionTitle: {\n    fontSize: 18,\n    fontWeight: '600',\n    marginBottom: 12,\n    color: '#333',\n  },\n  image: {\n    width: '100%',\n    height: 200,\n    backgroundColor: '#e0e0e0',\n    borderRadius: 8,\n  },\n  wideImage: {\n    width: '100%',\n    height: 150,\n    backgroundColor: '#e0e0e0',\n    borderRadius: 8,\n  },\n  buttonRow: {\n    flexDirection: 'row',\n    flexWrap: 'wrap',\n    marginBottom: 12,\n    gap: 8,\n  },\n  buttonColumn: {\n    flexDirection: 'column',\n  },\n  buttonSpacer: {\n    height: 8,\n  },\n  optionButton: {\n    paddingHorizontal: 16,\n    paddingVertical: 8,\n    borderRadius: 20,\n    backgroundColor: '#e0e0e0',\n  },\n  optionButtonActive: {\n    backgroundColor: '#007AFF',\n  },\n  optionText: {\n    fontSize: 14,\n    color: '#333',\n  },\n  optionTextActive: {\n    color: '#fff',\n    fontWeight: '600',\n  },\n  hint: {\n    marginTop: 8,\n    marginBottom: 8,\n    fontSize: 12,\n    color: '#888',\n    fontStyle: 'italic',\n  },\n  actionButton: {\n    backgroundColor: '#007AFF',\n    paddingHorizontal: 16,\n    paddingVertical: 12,\n    borderRadius: 8,\n    alignItems: 'center',\n  },\n  actionButtonText: {\n    color: '#fff',\n    fontSize: 16,\n    fontWeight: '600',\n  },\n  logContainer: {\n    backgroundColor: '#1a1a1a',\n    borderRadius: 8,\n    padding: 12,\n    marginBottom: 12,\n    maxHeight: 200,\n  },\n  logEmpty: {\n    color: '#666',\n    fontStyle: 'italic',\n  },\n  logText: {\n    color: '#00ff00',\n    fontFamily: 'monospace',\n    fontSize: 11,\n    marginBottom: 4,\n  },\n  footer: {\n    height: 50,\n  },\n});\n"
  },
  {
    "path": "packages/image/image.code-workspace",
    "content": "{\n  \"folders\": [\n    {\n      \"path\": \".\",\n    },\n  ],\n  \"settings\": {\n    \"eslint.useFlatConfig\": true,\n    \"eslint.nodePath\": \"../../.yarn/sdks\",\n    \"typescript.enablePromptUseWorkspaceTsdk\": true,\n    \"typescript.tsdk\": \"../../.yarn/sdks/typescript/lib\",\n    \"prettier.prettierPath\": \"../../.yarn/sdks/prettier/index.cjs\",\n    \"prettier.configPath\": \"../../.prettierrc\",\n    \"jest.rootPath\": \".\",\n    \"jest.jestCommandLine\": \"yarn jest\",\n    \"jest.enable\": false,\n  },\n}\n"
  },
  {
    "path": "packages/image/ios/GraniteImageComponentView.h",
    "content": "//\n//  GraniteImageComponentView.h\n//  GraniteImagePOC\n//\n\n#import <UIKit/UIKit.h>\n\nNS_ASSUME_NONNULL_BEGIN\n\n// Forward declare to avoid pulling in C++ headers\n@interface GraniteImageComponentView : UIView\n@end\n\nNS_ASSUME_NONNULL_END\n"
  },
  {
    "path": "packages/image/ios/GraniteImageComponentView.mm",
    "content": "#import <UIKit/UIKit.h>\n#import <os/log.h>\n\n#import <React/RCTViewComponentView.h>\n#import <React/RCTConversions.h>\n#import <react/renderer/components/GraniteImageSpec/ComponentDescriptors.h>\n#import <react/renderer/components/GraniteImageSpec/EventEmitters.h>\n#import <react/renderer/components/GraniteImageSpec/Props.h>\n#import <react/renderer/components/GraniteImageSpec/RCTComponentViewHelpers.h>\n\n// Import Swift module - the header is generated during build\n// For CocoaPods: GraniteImage-Swift.h (based on pod name)\n// For frameworks: <GraniteImage/GraniteImage-Swift.h>\n#if __has_include(<GraniteImage/GraniteImage-Swift.h>)\n#import <GraniteImage/GraniteImage-Swift.h>\n#elif __has_include(<react_native_granite_image/react_native_granite_image-Swift.h>)\n#import <react_native_granite_image/react_native_granite_image-Swift.h>\n#else\n// This will be found in the build directory - CocoaPods generates it there\n#import \"GraniteImage-Swift.h\"\n#endif\n\nusing namespace facebook::react;\n\nstatic os_log_t graniteimage_log() {\n    static os_log_t log = os_log_create(\"com.graniteimage\", \"GraniteImage\");\n    return log;\n}\n\n@interface GraniteImageComponentView : RCTViewComponentView <RCTGraniteImageViewProtocol>\n@end\n\n// Constructor to verify the code is being loaded\n__attribute__((constructor)) static void _graniteimage_constructor(void) {\n    os_log_error(graniteimage_log(), \"Constructor called - class is being loaded\");\n}\n\n// Force the linker to include this class\n__attribute__((used)) static void _forceIncludeGraniteImageComponentView(void) {\n    [GraniteImageComponentView class];\n}\n\n@implementation GraniteImageComponentView {\n    UIView *_containerView;\n    NSString *_currentUri;\n    UIViewContentMode _currentContentMode;\n    BOOL _needsInitialLoad;\n\n    // New props\n    NSDictionary<NSString *, NSString *> *_currentHeaders;\n    GraniteProviderPriority _currentPriority;\n    GraniteProviderCachePolicy _currentCachePolicy;\n    UIColor *_currentTintColor;\n    NSString *_currentDefaultSource;\n    NSString *_currentFallbackSource;\n}\n\n+ (void)load\n{\n    NSLog(@\"[GraniteImage] +load called - registering component\");\n}\n\n+ (ComponentDescriptorProvider)componentDescriptorProvider\n{\n    return concreteComponentDescriptorProvider<GraniteImageComponentDescriptor>();\n}\n\n- (instancetype)initWithFrame:(CGRect)frame\n{\n    if (self = [super initWithFrame:frame]) {\n        static const auto defaultProps = std::make_shared<const GraniteImageProps>();\n        _props = defaultProps;\n        self.clipsToBounds = YES;\n        _currentContentMode = UIViewContentModeScaleAspectFill;\n        _currentPriority = GraniteProviderPriorityNormal;\n        _currentCachePolicy = GraniteProviderCachePolicyDisk;\n        _needsInitialLoad = YES;\n    }\n    return self;\n}\n\n- (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &)oldProps\n{\n    const auto &newViewProps = *std::static_pointer_cast<const GraniteImageProps>(props);\n\n    // Handle uri changes\n    NSString *newUri = [NSString stringWithUTF8String:newViewProps.uri.c_str()];\n\n    // Handle headers (JSON string)\n    NSDictionary<NSString *, NSString *> *newHeaders = nil;\n    if (!newViewProps.headers.empty()) {\n        NSString *headersJson = [NSString stringWithUTF8String:newViewProps.headers.c_str()];\n        NSData *data = [headersJson dataUsingEncoding:NSUTF8StringEncoding];\n        if (data) {\n            newHeaders = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];\n        }\n    }\n\n    // Handle contentMode changes\n    UIViewContentMode newContentMode = UIViewContentModeScaleAspectFill;\n    switch (newViewProps.contentMode) {\n        case GraniteImageContentMode::Cover:\n            newContentMode = UIViewContentModeScaleAspectFill;\n            break;\n        case GraniteImageContentMode::Contain:\n            newContentMode = UIViewContentModeScaleAspectFit;\n            break;\n        case GraniteImageContentMode::Stretch:\n            newContentMode = UIViewContentModeScaleToFill;\n            break;\n        case GraniteImageContentMode::Center:\n            newContentMode = UIViewContentModeCenter;\n            break;\n    }\n\n    // Handle priority\n    GraniteProviderPriority newPriority = GraniteProviderPriorityNormal;\n    switch (newViewProps.priority) {\n        case GraniteImagePriority::Low:\n            newPriority = GraniteProviderPriorityLow;\n            break;\n        case GraniteImagePriority::Normal:\n            newPriority = GraniteProviderPriorityNormal;\n            break;\n        case GraniteImagePriority::High:\n            newPriority = GraniteProviderPriorityHigh;\n            break;\n    }\n\n    // Handle cache policy\n    GraniteProviderCachePolicy newCachePolicy = GraniteProviderCachePolicyDisk;\n    switch (newViewProps.cachePolicy) {\n        case GraniteImageCachePolicy::Memory:\n            newCachePolicy = GraniteProviderCachePolicyMemory;\n            break;\n        case GraniteImageCachePolicy::Disk:\n            newCachePolicy = GraniteProviderCachePolicyDisk;\n            break;\n        case GraniteImageCachePolicy::None:\n            newCachePolicy = GraniteProviderCachePolicyNone;\n            break;\n    }\n\n    // Handle tintColor\n    UIColor *newTintColor = nil;\n    if (newViewProps.tintColor) {\n        newTintColor = RCTUIColorFromSharedColor(newViewProps.tintColor);\n    }\n\n    // Handle defaultSource\n    NSString *newDefaultSource = nil;\n    if (!newViewProps.defaultSource.empty()) {\n        newDefaultSource = [NSString stringWithUTF8String:newViewProps.defaultSource.c_str()];\n    }\n\n    // Handle fallbackSource\n    NSString *newFallbackSource = nil;\n    if (!newViewProps.fallbackSource.empty()) {\n        newFallbackSource = [NSString stringWithUTF8String:newViewProps.fallbackSource.c_str()];\n    }\n\n    BOOL shouldReload = _needsInitialLoad;\n    _needsInitialLoad = NO;\n\n    // Only URI change triggers image reload\n    if (![newUri isEqualToString:_currentUri ?: @\"\"]) {\n        _currentUri = newUri;\n        shouldReload = YES;\n    }\n\n    // ContentMode: update in-place without reloading\n    if (newContentMode != _currentContentMode) {\n        _currentContentMode = newContentMode;\n        if (_containerView && [_containerView isKindOfClass:[UIImageView class]]) {\n            ((UIImageView *)_containerView).contentMode = newContentMode;\n        }\n    }\n\n    // TintColor: update in-place without reloading\n    BOOL tintColorChanged = (newTintColor != _currentTintColor) &&\n                            (newTintColor == nil || ![newTintColor isEqual:_currentTintColor]);\n    if (tintColorChanged) {\n        _currentTintColor = newTintColor;\n        if (_containerView) {\n            id<GraniteImageProvidable> provider = [[GraniteImageRegistry shared] provider];\n            if (provider && [(NSObject *)provider respondsToSelector:@selector(applyTintColor:to:)]) {\n                [provider applyTintColor:newTintColor to:_containerView];\n            }\n        }\n    }\n\n    // Update stored values (these don't require reload, they affect next load)\n    _currentHeaders = newHeaders;\n    _currentPriority = newPriority;\n    _currentCachePolicy = newCachePolicy;\n    _currentDefaultSource = newDefaultSource;\n    _currentFallbackSource = newFallbackSource;\n\n    if (shouldReload) {\n        if (_currentUri.length > 0) {\n            // 다음 runloop으로 지연하여 _eventEmitter 세팅 후 실행\n            __weak GraniteImageComponentView *weakSelf = self;\n            dispatch_async(dispatch_get_main_queue(), ^{\n                [weakSelf loadImageWithProvider];\n            });\n        } else {\n            // URI가 비어있거나 nil인 경우 에러 발생\n            [self showErrorViewWithMessage:@\"No URI provided\"];\n            [self emitOnError:@\"No URI provided\"];\n            [self emitOnLoadEnd];\n        }\n    }\n\n    [super updateProps:props oldProps:oldProps];\n}\n\n- (void)emitOnLoadStart\n{\n    if (_eventEmitter) {\n        std::dynamic_pointer_cast<const GraniteImageEventEmitter>(_eventEmitter)->onGraniteLoadStart({});\n    }\n}\n\n- (void)emitOnProgress:(int64_t)loaded total:(int64_t)total\n{\n    if (_eventEmitter) {\n        GraniteImageEventEmitter::OnGraniteProgress event;\n        event.loaded = (int)loaded;\n        event.total = (int)total;\n        std::dynamic_pointer_cast<const GraniteImageEventEmitter>(_eventEmitter)->onGraniteProgress(event);\n    }\n}\n\n- (void)emitOnLoad:(CGSize)imageSize\n{\n    if (_eventEmitter) {\n        GraniteImageEventEmitter::OnGraniteLoad event;\n        event.width = (int)imageSize.width;\n        event.height = (int)imageSize.height;\n        std::dynamic_pointer_cast<const GraniteImageEventEmitter>(_eventEmitter)->onGraniteLoad(event);\n    }\n}\n\n- (void)emitOnError:(NSString *)errorMessage\n{\n    if (_eventEmitter) {\n        GraniteImageEventEmitter::OnGraniteError event;\n        event.error = std::string([errorMessage UTF8String]);\n        std::dynamic_pointer_cast<const GraniteImageEventEmitter>(_eventEmitter)->onGraniteError(event);\n    }\n}\n\n- (void)emitOnLoadEnd\n{\n    if (_eventEmitter) {\n        std::dynamic_pointer_cast<const GraniteImageEventEmitter>(_eventEmitter)->onGraniteLoadEnd({});\n    }\n}\n\n- (void)loadImageWithProvider\n{\n    // Remove existing container view\n    [_containerView removeFromSuperview];\n    _containerView = nil;\n\n    id<GraniteImageProvidable> provider = [[GraniteImageRegistry shared] provider];\n\n    if (!provider) {\n        [self showErrorViewWithMessage:@\"No GraniteImageProvidable registered\"];\n        [self emitOnError:@\"No GraniteImageProvidable registered\"];\n        [self emitOnLoadEnd];\n        return;\n    }\n\n    if (!_currentUri || _currentUri.length == 0) {\n        [self showErrorViewWithMessage:@\"No URI provided\"];\n        [self emitOnError:@\"No URI provided\"];\n        [self emitOnLoadEnd];\n        return;\n    }\n\n    // Emit load start event\n    [self emitOnLoadStart];\n\n    // Create new image view from provider\n    UIView *imageView = [provider createImageView];\n    imageView.frame = self.bounds;\n    imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;\n    [self addSubview:imageView];\n    _containerView = imageView;\n\n    // Check if provider supports extended loading with callbacks\n    __weak GraniteImageComponentView *weakSelf = self;\n    if ([(NSObject *)provider respondsToSelector:@selector(loadImageWithURL:into:contentMode:headers:priority:cachePolicy:defaultSource:progress:completion:)]) {\n        [provider loadImageWithURL:_currentUri\n                              into:imageView\n                       contentMode:_currentContentMode\n                           headers:_currentHeaders\n                          priority:_currentPriority\n                       cachePolicy:_currentCachePolicy\n                     defaultSource:_currentDefaultSource\n                          progress:^(int64_t loaded, int64_t total) {\n            dispatch_async(dispatch_get_main_queue(), ^{\n                [weakSelf emitOnProgress:loaded total:total];\n            });\n        }\n                        completion:^(UIImage *image, NSError *error, CGSize imageSize) {\n            dispatch_async(dispatch_get_main_queue(), ^{\n                GraniteImageComponentView *strongSelf = weakSelf;\n                if (!strongSelf) return;\n\n                if (error) {\n                    [strongSelf emitOnError:error.localizedDescription];\n\n                    // Load fallback image if available\n                    if (strongSelf->_currentFallbackSource.length > 0) {\n                        [provider loadImageWithURL:strongSelf->_currentFallbackSource\n                                              into:imageView\n                                       contentMode:strongSelf->_currentContentMode\n                                           headers:nil\n                                          priority:GraniteProviderPriorityHigh\n                                       cachePolicy:GraniteProviderCachePolicyDisk\n                                     defaultSource:nil\n                                          progress:nil\n                                        completion:nil];\n                    }\n                } else {\n                    [strongSelf emitOnLoad:imageSize];\n                }\n                [strongSelf emitOnLoadEnd];\n\n                // Apply tint color if set\n                if (strongSelf->_currentTintColor && [(NSObject *)provider respondsToSelector:@selector(applyTintColor:to:)]) {\n                    [provider applyTintColor:strongSelf->_currentTintColor to:imageView];\n                }\n            });\n        }];\n    } else {\n        // Fall back to simple loading\n        [provider loadImageWithURL:_currentUri into:imageView contentMode:_currentContentMode];\n\n        // For simple providers, emit load success after a short delay (since we don't know when it finishes)\n        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{\n            GraniteImageComponentView *strongSelf = weakSelf;\n            if (strongSelf) {\n                // We don't have real image size, so use view bounds\n                [strongSelf emitOnLoad:strongSelf.bounds.size];\n                [strongSelf emitOnLoadEnd];\n            }\n        });\n    }\n}\n\n- (void)showErrorViewWithMessage:(NSString *)message\n{\n    UIView *errorView = [[UIView alloc] initWithFrame:self.bounds];\n    errorView.backgroundColor = [UIColor redColor];\n    errorView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;\n\n    UILabel *label = [[UILabel alloc] init];\n    label.text = message;\n    label.textColor = [UIColor whiteColor];\n    label.textAlignment = NSTextAlignmentCenter;\n    label.font = [UIFont systemFontOfSize:12];\n    label.numberOfLines = 0;\n    label.translatesAutoresizingMaskIntoConstraints = NO;\n\n    [errorView addSubview:label];\n    [NSLayoutConstraint activateConstraints:@[\n        [label.centerXAnchor constraintEqualToAnchor:errorView.centerXAnchor],\n        [label.centerYAnchor constraintEqualToAnchor:errorView.centerYAnchor],\n        [label.leadingAnchor constraintGreaterThanOrEqualToAnchor:errorView.leadingAnchor constant:8],\n        [label.trailingAnchor constraintLessThanOrEqualToAnchor:errorView.trailingAnchor constant:-8]\n    ]];\n\n    [self addSubview:errorView];\n    _containerView = errorView;\n}\n\n- (void)prepareForRecycle\n{\n    [super prepareForRecycle];\n\n    id<GraniteImageProvidable> provider = [[GraniteImageRegistry shared] provider];\n    if (_containerView && provider) {\n        [provider cancelLoadWith:_containerView];\n    }\n\n    [_containerView removeFromSuperview];\n    _containerView = nil;\n    _currentUri = nil;\n}\n\n@end\n"
  },
  {
    "path": "packages/image/ios/GraniteImageModule.swift",
    "content": "import Foundation\nimport React\n\n@objc(GraniteImageModule)\nclass GraniteImageModule: NSObject {\n\n    @objc static func requiresMainQueueSetup() -> Bool {\n        return false\n    }\n\n    @objc func preload(_ sourcesJson: String,\n                       resolve: @escaping RCTPromiseResolveBlock,\n                       reject: @escaping RCTPromiseRejectBlock) {\n        NSLog(\"[GraniteImageModule] preload called with: \\(sourcesJson)\")\n\n        guard let jsonData = sourcesJson.data(using: .utf8),\n              let sources = try? JSONSerialization.jsonObject(with: jsonData) as? [[String: Any]] else {\n            reject(\"PARSE_ERROR\", \"Failed to parse sources JSON\", nil)\n            return\n        }\n\n        guard let provider = GraniteImageRegistry.shared.provider else {\n            reject(\"NO_PROVIDER\", \"No provider registered, cannot preload\", nil)\n            return\n        }\n\n        DispatchQueue.global(qos: .default).async {\n            let group = DispatchGroup()\n            var successCount = 0\n            var failCount = 0\n            let countLock = NSLock()\n\n            for source in sources {\n                guard let uri = source[\"uri\"] as? String else { continue }\n\n                let headers = source[\"headers\"] as? [String: String]\n                let priorityStr = source[\"priority\"] as? String\n                let cacheStr = source[\"cache\"] as? String\n\n                var priority: GraniteProviderPriority = .normal\n                if priorityStr == \"high\" {\n                    priority = .high\n                } else if priorityStr == \"low\" {\n                    priority = .low\n                }\n\n                var cachePolicy: GraniteProviderCachePolicy = .disk\n                if cacheStr == \"cacheOnly\" {\n                    cachePolicy = .disk\n                } else if cacheStr == \"web\" {\n                    cachePolicy = .none\n                }\n\n                NSLog(\"[GraniteImageModule] Preloading: \\(uri)\")\n\n                // Use extended loading if available\n                group.enter()\n                if let loadImageExtended = provider.loadImage(withURL:into:contentMode:headers:priority:cachePolicy:defaultSource:progress:completion:) {\n                    loadImageExtended(\n                        uri,\n                        nil,\n                        .scaleAspectFill,\n                        headers,\n                        priority,\n                        cachePolicy,\n                        nil,\n                        nil,\n                        { image, error, imageSize in\n                            countLock.lock()\n                            if image != nil {\n                                NSLog(\"[GraniteImageModule] Preloaded successfully: \\(uri) (\\(Int(imageSize.width))x\\(Int(imageSize.height)))\")\n                                successCount += 1\n                            } else {\n                                NSLog(\"[GraniteImageModule] Preload failed for \\(uri): \\(error?.localizedDescription ?? \"Unknown error\")\")\n                                failCount += 1\n                            }\n                            countLock.unlock()\n                            group.leave()\n                        }\n                    )\n                } else {\n                    NSLog(\"[GraniteImageModule] Provider does not support preloading without view\")\n                    group.leave()\n                }\n            }\n\n            group.notify(queue: .main) {\n                NSLog(\"[GraniteImageModule] Preload completed: \\(successCount) succeeded, \\(failCount) failed\")\n                resolve(nil)\n            }\n        }\n    }\n\n    @objc func clearMemoryCache(_ resolve: @escaping RCTPromiseResolveBlock,\n                                 reject: @escaping RCTPromiseRejectBlock) {\n        NSLog(\"[GraniteImageModule] clearMemoryCache called\")\n        if let provider = GraniteImageRegistry.shared.provider,\n           let clearMemory = provider.clearMemoryCache {\n            clearMemory()\n        } else {\n            URLCache.shared.removeAllCachedResponses()\n        }\n        resolve(nil)\n    }\n\n    @objc func clearDiskCache(_ resolve: @escaping RCTPromiseResolveBlock,\n                               reject: @escaping RCTPromiseRejectBlock) {\n        NSLog(\"[GraniteImageModule] clearDiskCache called\")\n        if let provider = GraniteImageRegistry.shared.provider,\n           let clearDisk = provider.clearDiskCache {\n            clearDisk()\n        } else {\n            URLCache.shared.removeAllCachedResponses()\n        }\n        resolve(nil)\n    }\n}\n"
  },
  {
    "path": "packages/image/ios/GraniteImageModuleBridge.m",
    "content": "#import <React/RCTBridgeModule.h>\n\n@interface RCT_EXTERN_MODULE(GraniteImageModule, NSObject)\n\nRCT_EXTERN_METHOD(preload:(NSString *)sourcesJson\n                  resolve:(RCTPromiseResolveBlock)resolve\n                  reject:(RCTPromiseRejectBlock)reject)\n\nRCT_EXTERN_METHOD(clearMemoryCache:(RCTPromiseResolveBlock)resolve\n                  reject:(RCTPromiseRejectBlock)reject)\n\nRCT_EXTERN_METHOD(clearDiskCache:(RCTPromiseResolveBlock)resolve\n                  reject:(RCTPromiseRejectBlock)reject)\n\n@end\n"
  },
  {
    "path": "packages/image/ios/GraniteImageProvider.swift",
    "content": "import UIKit\n\n/// Priority levels for image loading\n@objc public enum GraniteProviderPriority: Int {\n    case low = 0\n    case normal = 1\n    case high = 2\n}\n\n/// Cache policy for image loading\n@objc public enum GraniteProviderCachePolicy: Int {\n    case memory = 0\n    case disk = 1\n    case none = 2\n}\n\n/// Progress callback block\npublic typealias GraniteImageProgressBlock = (_ loaded: Int64, _ total: Int64) -> Void\n\n/// Completion callback block\npublic typealias GraniteImageCompletionBlock = (_ image: UIImage?, _ error: Error?, _ imageSize: CGSize) -> Void\n\n/// Protocol that defines the interface for image loading providers.\n/// Implementations can use any image loading library (URLSession, SDWebImage, Kingfisher, etc.)\n@objc public protocol GraniteImageProvidable: AnyObject {\n\n    /// Creates and returns a new UIView that will be used to display the image.\n    /// The returned view should be capable of displaying images (typically UIImageView).\n    @objc func createImageView() -> UIView\n\n    /// Loads an image from the given URL into the provided view.\n    /// - Parameters:\n    ///   - url: The URL string of the image to load\n    ///   - view: The view returned from createImageView where the image should be displayed\n    ///   - contentMode: The content mode to use when displaying the image\n    @objc func loadImage(withURL url: String, into view: UIView, contentMode: UIView.ContentMode)\n\n    /// Cancels any ongoing image load for the given view.\n    /// - Parameter view: The view whose image load should be cancelled\n    @objc func cancelLoad(with view: UIView)\n\n    /// Loads an image with full options support including headers, priority, cache policy, and callbacks.\n    /// - Parameters:\n    ///   - url: The URL string of the image to load\n    ///   - view: The view returned from createImageView where the image should be displayed (can be nil for preloading)\n    ///   - contentMode: The content mode to use when displaying the image\n    ///   - headers: Optional HTTP headers to include in the request\n    ///   - priority: The loading priority\n    ///   - cachePolicy: The cache policy to use\n    ///   - defaultSource: Optional placeholder image URL or asset name to show while loading\n    ///   - progress: Optional closure called with loading progress\n    ///   - completion: Optional closure called when loading completes\n    @objc optional func loadImage(\n        withURL url: String,\n        into view: UIView?,\n        contentMode: UIView.ContentMode,\n        headers: [String: String]?,\n        priority: GraniteProviderPriority,\n        cachePolicy: GraniteProviderCachePolicy,\n        defaultSource: String?,\n        progress: GraniteImageProgressBlock?,\n        completion: GraniteImageCompletionBlock?\n    )\n\n    /// Applies a tint color to the image view\n    /// - Parameters:\n    ///   - tintColor: The color to apply\n    ///   - view: The view to tint\n    @objc optional func applyTintColor(_ tintColor: UIColor, to view: UIView)\n\n    /// Clears the in-memory image cache\n    @objc optional func clearMemoryCache()\n\n    /// Clears the on-disk image cache\n    @objc optional func clearDiskCache()\n}\n"
  },
  {
    "path": "packages/image/ios/GraniteImageRegistry.swift",
    "content": "import Foundation\n\n/// Singleton registry for managing the current GraniteImageProvidable.\n/// Applications should register their provider implementation at app startup.\n@objc public class GraniteImageRegistry: NSObject {\n\n    /// Shared singleton instance\n    @objc public static let shared = GraniteImageRegistry()\n\n    /// The currently registered image provider.\n    /// If nil, GraniteImage will display an error state.\n    @objc public var provider: GraniteImageProvidable?\n\n    private override init() {\n        super.init()\n    }\n\n    /// Registers an image provider to be used by all GraniteImage instances.\n    /// - Parameter provider: The provider implementation to register\n    @objc public func register(provider: GraniteImageProvidable) {\n        self.provider = provider\n        NSLog(\"[GraniteImageRegistry] Provider registered: \\(type(of: provider))\")\n    }\n\n    /// Clears the currently registered provider.\n    @objc public func clearProvider() {\n        self.provider = nil\n        NSLog(\"[GraniteImageRegistry] Provider cleared\")\n    }\n}\n"
  },
  {
    "path": "packages/image/ios/Providers/SDWebImageProvider.swift",
    "content": "#if GRANITE_IMAGE_DEFAULT_PROVIDER\n\nimport UIKit\nimport SDWebImage\n\n@objc public class SDWebImageProvider: NSObject, GraniteImageProvidable {\n\n    @objc public func createImageView() -> UIView {\n        let imageView = UIImageView()\n        imageView.backgroundColor = .lightGray\n        return imageView\n    }\n\n    @objc public func loadImage(withURL url: String, into view: UIView, contentMode: UIView.ContentMode) {\n        guard let imageView = view as? UIImageView else {\n            NSLog(\"[SDWebImageProvider] View is not UIImageView\")\n            return\n        }\n\n        imageView.contentMode = contentMode\n\n        guard let imageURL = URL(string: url) else {\n            NSLog(\"[SDWebImageProvider] Invalid URL: \\(url)\")\n            return\n        }\n\n        imageView.sd_setImage(\n            with: imageURL,\n            placeholderImage: nil,\n            options: .retryFailed\n        ) { _, error, cacheType, _ in\n            if let error = error {\n                NSLog(\"[SDWebImageProvider] Error loading image: \\(error.localizedDescription)\")\n            } else {\n                let cacheTypeStr: String\n                switch cacheType {\n                case .none: cacheTypeStr = \"Network\"\n                case .disk: cacheTypeStr = \"Disk\"\n                case .memory: cacheTypeStr = \"Memory\"\n                default: cacheTypeStr = \"Unknown\"\n                }\n                NSLog(\"[SDWebImageProvider] Loaded with SDWebImage (\\(cacheTypeStr)): \\(url)\")\n            }\n        }\n    }\n\n    @objc public func cancelLoad(with view: UIView) {\n        guard let imageView = view as? UIImageView else { return }\n        imageView.sd_cancelCurrentImageLoad()\n    }\n\n    @objc public func loadImage(\n        withURL url: String,\n        into view: UIView?,\n        contentMode: UIView.ContentMode,\n        headers: [String: String]?,\n        priority: GraniteProviderPriority,\n        cachePolicy: GraniteProviderCachePolicy,\n        defaultSource: String?,\n        progress progressBlock: GraniteImageProgressBlock?,\n        completion completionBlock: GraniteImageCompletionBlock?\n    ) {\n        // Allow nil view for preloading\n        var imageView: UIImageView? = nil\n        if let view = view {\n            guard let iv = view as? UIImageView else {\n                NSLog(\"[SDWebImageProvider] View is not UIImageView\")\n                completionBlock?(nil, NSError(domain: \"SDWebImageProvider\", code: -1, userInfo: [NSLocalizedDescriptionKey: \"View is not UIImageView\"]), .zero)\n                return\n            }\n            imageView = iv\n            imageView?.contentMode = contentMode\n        }\n\n        guard let imageURL = URL(string: url),\n              let scheme = imageURL.scheme?.lowercased(),\n              scheme == \"http\" || scheme == \"https\" else {\n            NSLog(\"[SDWebImageProvider] Invalid URL: \\(url)\")\n            completionBlock?(nil, NSError(domain: \"SDWebImageProvider\", code: -1, userInfo: [NSLocalizedDescriptionKey: \"Invalid URL\"]), .zero)\n            return\n        }\n\n        // Load placeholder image if provided\n        var placeholderImage: UIImage? = nil\n        if let defaultSource = defaultSource, !defaultSource.isEmpty {\n            placeholderImage = UIImage(named: defaultSource)\n        }\n\n        // Build options\n        var options: SDWebImageOptions = .retryFailed\n        switch priority {\n        case .low:\n            options.insert(.lowPriority)\n        case .high:\n            options.insert(.highPriority)\n        case .normal:\n            break\n        }\n\n        // Build context with headers\n        var context: [SDWebImageContextOption: Any]? = nil\n        if let headers = headers, !headers.isEmpty {\n            let modifier = SDWebImageDownloadRequestModifier { request in\n                var mutableRequest = request\n                for (key, value) in headers {\n                    mutableRequest.setValue(value, forHTTPHeaderField: key)\n                }\n                return mutableRequest\n            }\n            context = [.downloadRequestModifier: modifier]\n        }\n\n        if let imageView = imageView {\n            imageView.sd_setImage(\n                with: imageURL,\n                placeholderImage: placeholderImage,\n                options: options,\n                context: context,\n                progress: { receivedSize, expectedSize, _ in\n                    progressBlock?(Int64(receivedSize), Int64(expectedSize))\n                },\n                completed: { image, error, cacheType, _ in\n                    if let error = error {\n                        NSLog(\"[SDWebImageProvider] Error loading image: \\(error.localizedDescription)\")\n                        completionBlock?(nil, error, .zero)\n                    } else {\n                        let cacheTypeStr: String\n                        switch cacheType {\n                        case .none: cacheTypeStr = \"Network\"\n                        case .disk: cacheTypeStr = \"Disk\"\n                        case .memory: cacheTypeStr = \"Memory\"\n                        default: cacheTypeStr = \"Unknown\"\n                        }\n                        NSLog(\"[SDWebImageProvider] Loaded with SDWebImage (\\(cacheTypeStr)): \\(url)\")\n                        completionBlock?(image, nil, image?.size ?? .zero)\n                    }\n                }\n            )\n        } else {\n            // Preload without view\n            SDWebImageManager.shared.loadImage(\n                with: imageURL,\n                options: options,\n                context: context,\n                progress: { receivedSize, expectedSize, _ in\n                    progressBlock?(Int64(receivedSize), Int64(expectedSize))\n                },\n                completed: { image, _, error, cacheType, _, _ in\n                    if let error = error {\n                        NSLog(\"[SDWebImageProvider] Error preloading image: \\(error.localizedDescription)\")\n                        completionBlock?(nil, error, .zero)\n                    } else {\n                        let cacheTypeStr: String\n                        switch cacheType {\n                        case .none: cacheTypeStr = \"Network\"\n                        case .disk: cacheTypeStr = \"Disk\"\n                        case .memory: cacheTypeStr = \"Memory\"\n                        default: cacheTypeStr = \"Unknown\"\n                        }\n                        NSLog(\"[SDWebImageProvider] Preloaded with SDWebImage (\\(cacheTypeStr)): \\(url)\")\n                        completionBlock?(image, nil, image?.size ?? .zero)\n                    }\n                }\n            )\n        }\n    }\n\n    @objc public func applyTintColor(_ tintColor: UIColor, to view: UIView) {\n        guard let imageView = view as? UIImageView else { return }\n        imageView.image = imageView.image?.withRenderingMode(.alwaysTemplate)\n        imageView.tintColor = tintColor\n    }\n}\n\n#endif\n"
  },
  {
    "path": "packages/image/package.json",
    "content": "{\n  \"name\": \"@granite-js/image\",\n  \"version\": \"1.0.23\",\n  \"description\": \"A pluggable React Native image component that lets you use your existing native image loading infrastructure\",\n  \"type\": \"module\",\n  \"main\": \"./dist/module/index.js\",\n  \"types\": \"./dist/typescript/index.d.ts\",\n  \"react-native\": \"./src/index.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/typescript/index.d.ts\",\n      \"react-native\": \"./src/index.ts\",\n      \"default\": \"./dist/module/index.js\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"src\",\n    \"dist\",\n    \"android\",\n    \"ios\",\n    \"*.podspec\",\n    \"react-native.config.js\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"example\": \"yarn workspace @granite-js/image-example\",\n    \"clean\": \"del-cli android/build example/android/build example/android/app/build example/ios/build lib\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"eslint .\",\n    \"build\": \"bob build && tsc --project tsconfig.build.json\"\n  },\n  \"keywords\": [\n    \"react-native\",\n    \"image\",\n    \"fast-image\",\n    \"ios\",\n    \"android\",\n    \"brownfield\",\n    \"kingfisher\",\n    \"glide\",\n    \"coil\",\n    \"sdwebimage\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/image\"\n  },\n  \"author\": \"Toss <platform@toss.im>\",\n  \"homepage\": \"https://github.com/toss/granite/tree/main/packages/image#readme\",\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@types/react\": \"catalog:react-native\",\n    \"del-cli\": \"^6.0.0\",\n    \"eslint\": \"^9.7.0\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"react-native-builder-bob\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\"\n  },\n  \"peerDependencies\": {\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"codegenConfig\": {\n    \"name\": \"GraniteImageSpec\",\n    \"type\": \"components\",\n    \"jsSrcsDir\": \"src\",\n    \"android\": {\n      \"javaPackageName\": \"com.facebook.react.viewmanagers\"\n    },\n    \"ios\": {\n      \"componentProvider\": {\n        \"GraniteImage\": \"GraniteImageComponentView\"\n      }\n    }\n  },\n  \"sideEffects\": false,\n  \"react-native-builder-bob\": {\n    \"source\": \"src\",\n    \"output\": \"dist\",\n    \"targets\": [\n      [\n        \"module\",\n        {\n          \"esm\": true\n        }\n      ]\n    ]\n  }\n}\n"
  },
  {
    "path": "packages/image/src/GraniteImage.tsx",
    "content": "import React, { useCallback } from 'react';\nimport {\n  type StyleProp,\n  type ViewStyle,\n  type ColorValue,\n  type ImageRequireSource,\n  NativeModules,\n  ViewProps,\n  NativeSyntheticEvent,\n} from 'react-native';\nimport GraniteImageNativeComponent, {\n  type OnLoadStartEvent,\n  type OnProgressEvent,\n  type OnLoadEvent,\n  type OnErrorEvent,\n  type OnLoadEndEvent,\n} from './GraniteImageNativeComponent';\n\nconst { GraniteImageModule } = NativeModules;\n\n// Source types matching GraniteImage\nexport interface GraniteImageSource {\n  uri: string;\n  headers?: Record<string, string>;\n  priority?: 'low' | 'normal' | 'high';\n  cache?: 'immutable' | 'web' | 'cacheOnly';\n}\n\nexport type ResizeMode = 'cover' | 'contain' | 'stretch' | 'center';\nexport type CachePolicy = 'memory' | 'disk' | 'none';\nexport type Priority = 'low' | 'normal' | 'high';\n\nexport interface GraniteImageProps extends ViewProps {\n  // Source - can be string URI or source object\n  source: GraniteImageSource | string;\n\n  // Display\n  resizeMode?: ResizeMode;\n  tintColor?: ColorValue;\n  style?: StyleProp<ViewStyle>;\n\n  // Placeholder\n  defaultSource?: ImageRequireSource | string;\n\n  // Fallback on error\n  fallbackSource?: ImageRequireSource | string;\n\n  // Priority & Cache\n  priority?: Priority;\n  cachePolicy?: CachePolicy;\n\n  // Callbacks\n  onLoadStart?: (event: NativeSyntheticEvent<OnLoadStartEvent>) => void;\n  onProgress?: (event: NativeSyntheticEvent<OnProgressEvent>) => void;\n  onLoad?: (event: NativeSyntheticEvent<OnLoadEvent>) => void;\n  onError?: (error: NativeSyntheticEvent<OnErrorEvent>) => void;\n  onLoadEnd?: (event: NativeSyntheticEvent<OnLoadEndEvent>) => void;\n}\n\n// Map resizeMode to contentMode for native\nconst resizeModeToContentMode = (resizeMode?: ResizeMode): 'cover' | 'contain' | 'stretch' | 'center' => {\n  return resizeMode || 'cover';\n};\n\n// Map GraniteImage cache to native cachePolicy\nconst mapCachePolicy = (cache?: 'immutable' | 'web' | 'cacheOnly'): CachePolicy => {\n  switch (cache) {\n    case 'cacheOnly':\n      return 'disk';\n    case 'web':\n      return 'none';\n    case 'immutable':\n    default:\n      return 'disk';\n  }\n};\n\n// Type declarations for static methods\nexport interface GraniteImageStatic {\n  clearMemoryCache: () => Promise<void>;\n  clearDiskCache: () => Promise<void>;\n  preload: (sources: GraniteImageSource[]) => Promise<void>;\n}\n\ntype GraniteImageComponent = React.FC<GraniteImageProps> & GraniteImageStatic;\n\n// Static methods for cache management\nconst clearMemoryCache = (): Promise<void> => {\n  if (GraniteImageModule?.clearMemoryCache) {\n    return GraniteImageModule.clearMemoryCache();\n  }\n  console.warn('GraniteImage.clearMemoryCache: Native module not available');\n  return Promise.resolve();\n};\n\nconst clearDiskCache = (): Promise<void> => {\n  if (GraniteImageModule?.clearDiskCache) {\n    return GraniteImageModule.clearDiskCache();\n  }\n  console.warn('GraniteImage.clearDiskCache: Native module not available');\n  return Promise.resolve();\n};\n\nconst preload = (sources: GraniteImageSource[]): Promise<void> => {\n  if (GraniteImageModule?.preload) {\n    const sourcesJson = JSON.stringify(sources);\n    return GraniteImageModule.preload(sourcesJson);\n  } else {\n    console.warn('GraniteImage.preload: Native module not available');\n    return Promise.resolve();\n  }\n};\n\nconst GraniteImageBase: React.FC<GraniteImageProps> = ({\n  source,\n  resizeMode = 'cover',\n  tintColor,\n  style,\n  defaultSource,\n  fallbackSource,\n  priority = 'normal',\n  cachePolicy = 'disk',\n  onLoadStart,\n  onProgress,\n  onLoad,\n  onError,\n  onLoadEnd,\n  ...viewProps\n}) => {\n  // Parse source\n  const uri = typeof source === 'string' ? source : ((source && typeof source === 'object' ? source.uri : '') ?? '');\n  const headers = typeof source === 'object' && source.headers ? JSON.stringify(source.headers) : undefined;\n  const sourcePriority = typeof source === 'object' ? source.priority : undefined;\n  const sourceCache = typeof source === 'object' ? source.cache : undefined;\n\n  // Handle defaultSource\n  const defaultSourceUri =\n    typeof defaultSource === 'string'\n      ? defaultSource\n      : typeof defaultSource === 'number'\n        ? undefined // Local require() - need native handling\n        : undefined;\n\n  // Handle fallbackSource\n  const fallbackSourceUri =\n    typeof fallbackSource === 'string'\n      ? fallbackSource\n      : typeof fallbackSource === 'number'\n        ? undefined // Local require() - need native handling\n        : undefined;\n\n  // Event handlers\n  const handleLoadStart = useCallback(\n    (event: NativeSyntheticEvent<OnLoadStartEvent>) => {\n      onLoadStart?.(event);\n    },\n    [onLoadStart]\n  );\n\n  const handleProgress = useCallback(\n    (event: NativeSyntheticEvent<OnProgressEvent>) => {\n      onProgress?.(event);\n    },\n    [onProgress]\n  );\n\n  const handleLoad = useCallback(\n    (event: NativeSyntheticEvent<OnLoadEvent>) => {\n      onLoad?.(event);\n    },\n    [onLoad]\n  );\n\n  const handleError = useCallback(\n    (event: NativeSyntheticEvent<OnErrorEvent>) => {\n      onError?.(event);\n    },\n    [onError]\n  );\n\n  const handleLoadEnd = useCallback(\n    (event: NativeSyntheticEvent<OnLoadEndEvent>) => {\n      onLoadEnd?.(event);\n    },\n    [onLoadEnd]\n  );\n\n  return (\n    <GraniteImageNativeComponent\n      {...viewProps}\n      uri={uri}\n      headers={headers}\n      contentMode={resizeModeToContentMode(resizeMode)}\n      tintColor={tintColor}\n      defaultSource={defaultSourceUri}\n      fallbackSource={fallbackSourceUri}\n      priority={sourcePriority || priority}\n      cachePolicy={sourceCache ? mapCachePolicy(sourceCache) : cachePolicy}\n      style={style}\n      onGraniteLoadStart={onLoadStart ? handleLoadStart : undefined}\n      onGraniteProgress={onProgress ? handleProgress : undefined}\n      onGraniteLoad={onLoad ? handleLoad : undefined}\n      onGraniteError={onError ? handleError : undefined}\n      onGraniteLoadEnd={onLoadEnd ? handleLoadEnd : undefined}\n    />\n  );\n};\n\nexport const GraniteImage: GraniteImageComponent = Object.assign(GraniteImageBase, {\n  clearMemoryCache,\n  clearDiskCache,\n  preload,\n});\n\nexport default GraniteImage;\n"
  },
  {
    "path": "packages/image/src/GraniteImageNativeComponent.ts",
    "content": "import { type ViewProps, type ColorValue, codegenNativeComponent } from 'react-native';\nimport type { WithDefault, Int32, DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';\n\n// Event payload types\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type OnLoadStartEvent = Readonly<{}>;\n\nexport type OnProgressEvent = Readonly<{\n  loaded: Int32;\n  total: Int32;\n}>;\n\nexport type OnLoadEvent = Readonly<{\n  width: Int32;\n  height: Int32;\n}>;\n\nexport type OnErrorEvent = Readonly<{\n  error: string;\n}>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type OnLoadEndEvent = Readonly<{}>;\n\nexport type OnGraniteLoadStartEvent = DirectEventHandler<OnLoadStartEvent>;\nexport type OnGraniteProgressEvent = DirectEventHandler<OnProgressEvent>;\nexport type OnGraniteLoadEvent = DirectEventHandler<OnLoadEvent>;\nexport type OnGraniteErrorEvent = DirectEventHandler<OnErrorEvent>;\nexport type OnGraniteLoadEndEvent = DirectEventHandler<OnLoadEndEvent>;\n\ninterface GraniteImageProps extends ViewProps {\n  // Source\n  uri?: string;\n  headers?: string; // JSON string of headers object\n\n  // Display\n  contentMode?: WithDefault<'cover' | 'contain' | 'stretch' | 'center', 'cover'>;\n  tintColor?: ColorValue;\n\n  // Placeholder\n  defaultSource?: string; // Local asset name or URI\n  fallbackSource?: string; // Fallback image to show on error\n\n  // Priority & Cache\n  priority?: WithDefault<'low' | 'normal' | 'high', 'normal'>;\n  cachePolicy?: WithDefault<'memory' | 'disk' | 'none', 'disk'>;\n\n  // Callbacks\n  onGraniteLoadStart?: DirectEventHandler<OnLoadStartEvent>;\n  onGraniteProgress?: DirectEventHandler<OnProgressEvent>;\n  onGraniteLoad?: DirectEventHandler<OnLoadEvent>;\n  onGraniteError?: DirectEventHandler<OnErrorEvent>;\n  onGraniteLoadEnd?: DirectEventHandler<OnLoadEndEvent>;\n}\n\nexport default codegenNativeComponent<GraniteImageProps>('GraniteImage');\n"
  },
  {
    "path": "packages/image/src/NativeGraniteImageModule.ts",
    "content": "import { type TurboModule, TurboModuleRegistry } from 'react-native';\n\nexport interface ImageSource {\n  uri: string;\n  headers?: { [key: string]: string };\n  priority?: string;\n  cache?: string;\n}\n\nexport interface Spec extends TurboModule {\n  preload(sources: string): Promise<void>; // JSON string of ImageSource[]\n  clearMemoryCache(): Promise<void>;\n  clearDiskCache(): Promise<void>;\n}\n\nexport default TurboModuleRegistry.getEnforcing<Spec>('GraniteImageModule');\n"
  },
  {
    "path": "packages/image/src/index.ts",
    "content": "import GraniteImage from './GraniteImage';\n\nexport {\n  GraniteImage,\n  type GraniteImageProps,\n  type GraniteImageSource,\n  type GraniteImageStatic,\n  type Priority,\n  type ResizeMode,\n  type CachePolicy,\n} from './GraniteImage';\n\nexport {\n  type OnLoadEvent,\n  type OnProgressEvent,\n  type OnLoadEndEvent,\n  type OnErrorEvent,\n  type OnLoadStartEvent,\n} from './GraniteImageNativeComponent';\n\nexport default GraniteImage;\n"
  },
  {
    "path": "packages/image/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"declarationDir\": \"dist/typescript\",\n    \"emitDeclarationOnly\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/image/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/jest/CHANGELOG.md",
    "content": "# @granite-js/jest\n\n## 1.0.23\n\n### Patch Changes\n\n- Updated dependencies [d4d3993]\n  - @granite-js/native@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/native@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/native@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- Updated dependencies [324827a]\n  - @granite-js/native@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/native@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/native@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/native@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/native@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/native@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/native@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/native@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/native@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/native@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/native@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/native@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/native@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/native@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/native@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/native@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- Updated dependencies [cc75aa4]\n  - @granite-js/native@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 23d1a4a: fix: jest brick-module mock\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/native@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [b325495]\n  - @granite-js/native@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- @granite-js/native@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/native@1.0.0\n"
  },
  {
    "path": "packages/jest/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/jest/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/jest\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@types/jest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n2. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n3. **eslint**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/eslint/eslint.git\n\t\n4. **jest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/jestjs/jest.git\n\t\n5. **tsup**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/egoist/tsup.git\n\t\n6. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/jest/README.md",
    "content": "# @granite-js/jest\n\nJest presets for Granite\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/jest/jest-next.code-workspace",
    "content": "{\n  \"folders\": [\n    {\n      \"path\": \".\",\n    },\n  ],\n  \"settings\": {\n    \"eslint.nodePath\": \"../../.yarn/sdks\",\n    \"typescript.enablePromptUseWorkspaceTsdk\": true,\n    \"typescript.tsdk\": \"../../.yarn/sdks/typescript/lib\",\n    \"prettier.prettierPath\": \"../../.yarn/sdks/prettier/index.cjs\",\n    \"prettier.configPath\": \"../../.prettierrc\",\n    \"jest.enable\": true,\n    \"jest.rootPath\": \".\",\n    \"jest.jestCommandLine\": \"yarn jest\",\n  },\n}\n"
  },
  {
    "path": "packages/jest/package.json",
    "content": "{\n  \"name\": \"@granite-js/jest\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Jest presets for Granite\",\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"eslint .\",\n    \"build\": \"tsup\"\n  },\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/jest\"\n  },\n  \"main\": \"./dist/index.js\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.ts\",\n      \"default\": \"./dist/index.js\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"dependencies\": {\n    \"jest\": \"^29.7.0\"\n  },\n  \"devDependencies\": {\n    \"@granite-js/native\": \"workspace:*\",\n    \"@types/jest\": \"^29.5.12\",\n    \"@types/node\": \"catalog:tools\",\n    \"eslint\": \"^9.7.0\",\n    \"tsup\": \"^8.5.0\",\n    \"typescript\": \"catalog:tools\"\n  },\n  \"peerDependencies\": {\n    \"@granite-js/native\": \"workspace:*\",\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/jest/src/index.ts",
    "content": "import type { Config } from 'jest';\nimport originalConfig from './jest.config';\nimport { setup as originalSetup } from './setup';\n\ninterface Export {\n  config: Config;\n  setup: typeof originalSetup;\n}\n\nconst exported: Export = {\n  config: originalConfig,\n  setup: originalSetup,\n};\n\nexport const setup = originalSetup;\nexport const config = originalConfig;\n\nexport default exported;\n"
  },
  {
    "path": "packages/jest/src/jest.config.ts",
    "content": "import fs from 'fs';\nimport path from 'path';\nimport type { Config } from 'jest';\n\nconst defaultSettings = {\n  testEnvironment: 'node',\n  testEnvironmentOptions: {\n    customExportConditions: ['react-native'],\n  },\n  preset: 'react-native',\n  transformIgnorePatterns: [],\n  setupFilesAfterEnv: ['<rootDir>/jest.setup.js', '<rootDir>/jest.setup.ts'],\n  testPathIgnorePatterns: ['/node_modules/', '/dist/', '/esm/'],\n  testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],\n  moduleDirectories: ['node_modules', 'src'],\n  maxWorkers: 1,\n};\n\nfunction settings(extraSettings: Config): Config {\n  const settings = {\n    ...defaultSettings,\n    ...extraSettings,\n    setupFilesAfterEnv: handleSetupFilesAfterEnv(extraSettings),\n    testMatch: handleTestMatch(extraSettings),\n    displayName: handleDisplayName(extraSettings),\n  };\n\n  if (settings.rootDir == null) {\n    console.error(\n      [\n        `jest.config.js에서 rootDir를 __dirname으로 설정해주세요.`,\n        '',\n        '예시 코드:',\n        '// jest.config.js',\n        `module.exports = require('@granite-js/jest').config({`,\n        `  rootDir: __dirname,`,\n        `});`,\n      ].join('\\n')\n    );\n  }\n\n  return settings;\n}\n\nfunction handleDisplayName(extraSettings: Config | undefined): Config['displayName'] | undefined {\n  if (extraSettings?.rootDir != null) {\n    const packageJSONPath = path.resolve(extraSettings.rootDir, 'package.json');\n\n    if (fs.existsSync(packageJSONPath)) {\n      return require(packageJSONPath).name;\n    }\n  }\n\n  return undefined;\n}\n\nfunction handleTestMatch(extraSettings: Config | undefined): Config['testMatch'] {\n  if (extraSettings?.rootDir != null && extraSettings.testMatch == null) {\n    return [\n      path.join(extraSettings.rootDir, '**/*.{spec,test}.{js,jsx,ts,tsx}'),\n      path.join(extraSettings.rootDir, '**/__tests__/**/*.{js,jsx,ts,tsx}'),\n    ];\n  }\n\n  return defaultSettings.testMatch;\n}\n\nfunction handleSetupFilesAfterEnv(extraSettings: Config | undefined): Config['setupFilesAfterEnv'] {\n  const rootDir = extraSettings?.rootDir;\n\n  if (rootDir != null) {\n    const setupFilesAfterEnv = extraSettings?.setupFilesAfterEnv ?? defaultSettings.setupFilesAfterEnv;\n\n    return setupFilesAfterEnv\n      .map((file) => path.resolve(rootDir, file.replace('<rootDir>/', '')))\n      .filter((filepath) => fs.existsSync(filepath));\n  }\n\n  return defaultSettings.setupFilesAfterEnv;\n}\n\nexport default Object.assign(settings, defaultSettings);\n"
  },
  {
    "path": "packages/jest/src/setup/index.ts",
    "content": "import { setupReactNative } from './reactNative';\n\nexport const setup = setupReactNative;\n"
  },
  {
    "path": "packages/jest/src/setup/reactNative.ts",
    "content": "import { requireFromRoot } from '../utils/requireFromRoot';\n\ninterface ReactNativeSetupOptions {\n  rootDir: string;\n}\n\nexport function setupReactNative({ rootDir }: ReactNativeSetupOptions) {\n  setupGestureHandler({ rootDir });\n  setupAppState();\n  setupBridgeModule();\n  setupWebView();\n}\n\nfunction setupGestureHandler({ rootDir }: ReactNativeSetupOptions) {\n  requireFromRoot('@granite-js/native/react-native-gesture-handler/jestSetup', rootDir);\n\n  /**\n   * react-native-gesture-handler uses setImmediate.\n   * setImmediate uses jest.now() through react-native's jest setup.\n   * Therefore, jest.useFakeTimers must be configured.\n   */\n  jest.useFakeTimers();\n}\n\nfunction setupAppState() {\n  const ReactNative = require('react-native');\n  ReactNative.AppState.currentState = 'active';\n}\n\nfunction setupBridgeModule() {\n  const ReactNative = require('react-native');\n  ReactNative.NativeModules.GraniteModule = {\n    addListener: jest.fn(),\n    removeListeners: jest.fn(),\n  };\n  ReactNative.NativeModules.GraniteCoreModule = {};\n  ReactNative.NativeModules.BrickModule = {\n    getConstants: jest.fn(() => ({})),\n    getRegisteredModules: jest.fn(() => []),\n  };\n}\n\nfunction setupWebView() {\n  /**\n   * Since WebView cannot be mocked, it is provided as a View.\n   */\n  jest.mock('@granite-js/native/react-native-webview', () => ({ WebView: require('react-native').View }));\n}\n"
  },
  {
    "path": "packages/jest/src/utils/requireFromRoot.ts",
    "content": "export function requireFromRoot(id: string, rootDir: string) {\n  const resolvedPath = require.resolve(id, { paths: [rootDir] });\n\n  return require(resolvedPath);\n}\n"
  },
  {
    "path": "packages/jest/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"emitDeclarationOnly\": true,\n    \"rootDir\": \"./src\",\n    \"outDir\": \"./dist\"\n  },\n  \"exclude\": [\"**/dist/*\", \"**/esm/*\", \"**/*.test.*\", \"**/*.spec.*\", \"**/*.e2e.*\", \"**/__fixtures__/*\"],\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/jest/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\", \"jest\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/jest/tsup.config.ts",
    "content": "import { defineConfig } from 'tsup';\n\nexport default defineConfig({\n  entry: ['src/index.ts'],\n  format: 'cjs',\n  dts: true,\n});\n"
  },
  {
    "path": "packages/jest.config.js",
    "content": "/**\n * @type {import('@jest/types').Config.InitialOptions}\n */\nmodule.exports = {\n  transform: {\n    '^.+\\\\.(ts|tsx)$': 'babel-jest',\n    '^.+\\\\.js$': 'babel-jest',\n    '^.+\\\\.mjs$': 'babel-jest',\n  },\n  moduleFileExtensions: ['ts', 'tsx', 'js'],\n  testMatch: ['**/?(*.)+(spec|test).ts?(x)'],\n  testEnvironment: 'node',\n  extensionsToTreatAsEsm: ['.ts'],\n  testTimeout: 3 * 60_000,\n  maxConcurrency: 1,\n  maxWorkers: 1,\n  passWithNoTests: true,\n  detectOpenHandles: true,\n  forceExit: true,\n};\n"
  },
  {
    "path": "packages/lottie/CHANGELOG.md",
    "content": "# @granite-js/lottie\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- 6803c3e: fix: lottie props\n\n## 1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- 98f8db8: Add duration prop support for Android native view\n\n## 1.0.16\n\n## 1.0.15\n\n## 1.0.14\n\n## 1.0.13\n\n## 1.0.12\n\n## 1.0.11\n\n## 1.0.10\n\n## 1.0.9\n\n## 1.0.8\n\n## 1.0.7\n\n## 1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- 0b77824: fix(android): add resource dispose logic for LottieProvider\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "packages/lottie/GraniteLottie.podspec",
    "content": "require \"json\"\n\npackage = JSON.parse(File.read(File.join(__dir__, \"package.json\")))\n\n# ============================================================\n# GraniteLottie Default Provider Configuration\n# ============================================================\n# Priority: GRANITE_LOTTIE_DEFAULT_PROVIDER > GRANITE_DEFAULT_PROVIDER_ALL > true (default)\n#\n# Examples:\n#   Include default provider (default):\n#     pod install\n#\n#   Exclude default provider for lottie only:\n#     GRANITE_LOTTIE_DEFAULT_PROVIDER=false pod install\n#\n#   Exclude default providers for all Granite packages:\n#     GRANITE_DEFAULT_PROVIDER_ALL=false pod install\n#\n#   Exclude all but override lottie to include:\n#     GRANITE_DEFAULT_PROVIDER_ALL=false GRANITE_LOTTIE_DEFAULT_PROVIDER=true pod install\n# ============================================================\nresolve_default_provider = lambda do |specific_key, fallback_key, default_value|\n  if ENV.key?(specific_key)\n    ENV[specific_key] == 'true'\n  elsif ENV.key?(fallback_key)\n    ENV[fallback_key] == 'true'\n  else\n    default_value\n  end\nend\n\nuse_default_provider = resolve_default_provider.call(\n  'GRANITE_LOTTIE_DEFAULT_PROVIDER',\n  'GRANITE_DEFAULT_PROVIDER_ALL',\n  true\n)\n\nPod::Spec.new do |s|\n  s.name         = \"GraniteLottie\"\n  s.version      = package[\"version\"]\n  s.summary      = package[\"description\"]\n  s.homepage     = package[\"repository\"][\"url\"]\n  s.license      = package[\"license\"]\n  s.authors      = package[\"author\"]\n\n  s.platforms    = { :ios => min_ios_version_supported }\n  s.source       = { :git => package[\"repository\"][\"url\"], :tag => \"#{s.version}\" }\n\n  # Conditional source files based on environment variable\n  if use_default_provider\n    s.source_files = \"ios/**/*.{h,m,mm,swift,cpp}\"\n  else\n    s.source_files = \"ios/**/*.{h,m,mm,swift,cpp}\"\n    s.exclude_files = \"ios/Providers/**/*\"\n  end\n  s.private_header_files = \"ios/**/*.h\"\n\n  # Swift settings for Pluggable Provider architecture\n  s.pod_target_xcconfig = {\n    'CLANG_ENABLE_MODULES' => 'YES',\n    'SWIFT_OBJC_INTERFACE_HEADER_NAME' => 'GraniteLottie-Swift.h',\n    'DEFINES_MODULE' => 'YES',\n    'GCC_PREPROCESSOR_DEFINITIONS' => use_default_provider ? '$(inherited) GRANITE_LOTTIE_DEFAULT_PROVIDER=1' : '$(inherited) GRANITE_LOTTIE_DEFAULT_PROVIDER=0',\n    'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => use_default_provider ? '$(inherited) GRANITE_LOTTIE_DEFAULT_PROVIDER' : '$(inherited)'\n  }\n\n  # Conditional lottie-ios dependency\n  if use_default_provider\n    s.dependency 'lottie-ios', '~> 4.5.0'\n  end\n\n  install_modules_dependencies(s)\nend\n"
  },
  {
    "path": "packages/lottie/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/lottie/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/lottie\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@granite-js/lottie**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/anthropics/granite.git\n\t\n2. **@react-native/babel-preset**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+ssh://git@github.com/facebook/react-native.git\n\t\n3. **@types/react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n4. **del-cli**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/sindresorhus/del-cli.git\n\t\n5. **eslint**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/eslint/eslint.git\n\t\n6. **react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/react.git\n\t\n7. **react-native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/react-native.git\n\t\n8. **react-native-builder-bob**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/callstack/react-native-builder-bob.git\n\t\n9. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/lottie/README.md",
    "content": "# @granite-js/lottie\n\nLottie component package\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/lottie/android/build.gradle",
    "content": "buildscript {\n  ext.getExtOrDefault = {name ->\n    return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['GraniteLottie_' + name]\n  }\n\n  repositories {\n    google()\n    mavenCentral()\n  }\n\n  dependencies {\n    classpath \"com.android.tools.build:gradle:8.7.2\"\n    // noinspection DifferentKotlinGradleVersion\n    classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}\"\n  }\n}\n\n\napply plugin: \"com.android.library\"\napply plugin: \"kotlin-android\"\n\napply plugin: \"com.facebook.react\"\n\ndef getExtOrIntegerDefault(name) {\n  return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties[\"GraniteLottie_\" + name]).toInteger()\n}\n\n// ============================================================\n// GraniteLottie Default Provider Configuration\n// ============================================================\n// Priority: Environment Variable > gradle.properties > default (true)\n//\n// Environment Variables:\n//   GRANITE_LOTTIE_DEFAULT_PROVIDER - Lottie specific override\n//   GRANITE_DEFAULT_PROVIDER_ALL - Global default for all Granite packages\n//\n// gradle.properties (alternative):\n//   GRANITE_LOTTIE_DEFAULT_PROVIDER=false\n//   GRANITE_DEFAULT_PROVIDER_ALL=false\n//\n// Examples:\n//   Include default provider (default):\n//     ./gradlew assembleDebug\n//\n//   Exclude default provider for lottie only (env var):\n//     GRANITE_LOTTIE_DEFAULT_PROVIDER=false ./gradlew assembleDebug\n//\n//   Exclude default provider via gradle.properties:\n//     # In gradle.properties:\n//     GRANITE_LOTTIE_DEFAULT_PROVIDER=false\n//\n//   Exclude all but override lottie to include:\n//     GRANITE_DEFAULT_PROVIDER_ALL=false GRANITE_LOTTIE_DEFAULT_PROVIDER=true ./gradlew assembleDebug\n// ============================================================\ndef resolveDefaultProvider(String specificKey, String fallbackKey, boolean defaultValue) {\n    // Priority: Environment Variable > gradle.properties > default\n\n    // Check specific key\n    def specificEnvValue = System.getenv(specificKey)\n    if (specificEnvValue != null) {\n        return specificEnvValue == 'true'\n    }\n    def specificPropValue = project.findProperty(specificKey) ?: rootProject.findProperty(specificKey)\n    if (specificPropValue != null) {\n        return specificPropValue.toString() == 'true'\n    }\n\n    // Check fallback key\n    def fallbackEnvValue = System.getenv(fallbackKey)\n    if (fallbackEnvValue != null) {\n        return fallbackEnvValue == 'true'\n    }\n    def fallbackPropValue = project.findProperty(fallbackKey) ?: rootProject.findProperty(fallbackKey)\n    if (fallbackPropValue != null) {\n        return fallbackPropValue.toString() == 'true'\n    }\n\n    return defaultValue\n}\n\ndef includeDefaultProvider = resolveDefaultProvider(\n    'GRANITE_LOTTIE_DEFAULT_PROVIDER',\n    'GRANITE_DEFAULT_PROVIDER_ALL',\n    true\n)\n\nandroid {\n  namespace \"run.granite.lottie\"\n\n  compileSdkVersion getExtOrIntegerDefault(\"compileSdkVersion\")\n\n  defaultConfig {\n    minSdkVersion getExtOrIntegerDefault(\"minSdkVersion\")\n    targetSdkVersion getExtOrIntegerDefault(\"targetSdkVersion\")\n\n    // Pass build config flag for conditional compilation\n    buildConfigField \"boolean\", \"INCLUDE_DEFAULT_PROVIDER\", \"${includeDefaultProvider}\"\n  }\n\n  buildFeatures {\n    buildConfig true\n  }\n\n  buildTypes {\n    release {\n      minifyEnabled false\n    }\n  }\n\n  lintOptions {\n    disable \"GradleCompatible\"\n  }\n\n  compileOptions {\n    sourceCompatibility JavaVersion.VERSION_1_8\n    targetCompatibility JavaVersion.VERSION_1_8\n  }\n\n  kotlinOptions {\n    jvmTarget = \"1.8\"\n  }\n\n  sourceSets {\n    main {\n      java {\n        srcDirs += [\n          \"generated/java\",\n          \"generated/jni\"\n        ]\n        // Conditionally include default provider sources\n        if (includeDefaultProvider) {\n          srcDirs += [\"src/default/java\"]\n        }\n      }\n      // Conditional manifest (includes ContentProvider)\n      if (includeDefaultProvider) {\n        manifest.srcFile \"src/default/AndroidManifest.xml\"\n      }\n    }\n  }\n}\n\nrepositories {\n  mavenCentral()\n  google()\n}\n\ndef kotlin_version = getExtOrDefault(\"kotlinVersion\")\n\ndependencies {\n  implementation \"com.facebook.react:react-android\"\n  implementation \"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version\"\n\n  // Conditional lottie-android dependency\n  if (includeDefaultProvider) {\n    implementation 'com.airbnb.android:lottie:6.6.0'\n  }\n}\n"
  },
  {
    "path": "packages/lottie/android/gradle.properties",
    "content": "GraniteLottie_kotlinVersion=1.9.24\nGraniteLottie_minSdkVersion=24\nGraniteLottie_targetSdkVersion=35\nGraniteLottie_compileSdkVersion=35\n"
  },
  {
    "path": "packages/lottie/android/src/default/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <application>\n        <provider\n            android:name=\"run.granite.lottie.builtin.BuiltInLottieContentProvider\"\n            android:authorities=\"${applicationId}.granite-lottie-builtin-init\"\n            android:exported=\"false\" />\n    </application>\n</manifest>"
  },
  {
    "path": "packages/lottie/android/src/default/java/run/granite/lottie/builtin/BuiltInLottieContentProvider.kt",
    "content": "package run.granite.lottie.builtin\n\nimport android.content.ContentProvider\nimport android.content.ContentValues\nimport android.database.Cursor\nimport android.net.Uri\n\n/**\n * ContentProvider for automatic BuiltInLottieProvider initialization.\n *\n * This provider is automatically instantiated by Android before Application.onCreate(),\n * ensuring BuiltInLottieProvider is registered as the default Lottie provider early in the app lifecycle.\n *\n * No manual registration required - just include this module in your build.\n */\nclass BuiltInLottieContentProvider : ContentProvider() {\n\n    override fun onCreate(): Boolean {\n        BuiltInLottieInitializer.initialize()\n        return true\n    }\n\n    // Required ContentProvider methods - not used for initialization\n    override fun query(uri: Uri, projection: Array<String>?, selection: String?, selectionArgs: Array<String>?, sortOrder: String?): Cursor? = null\n    override fun getType(uri: Uri): String? = null\n    override fun insert(uri: Uri, values: ContentValues?): Uri? = null\n    override fun delete(uri: Uri, selection: String?, selectionArgs: Array<String>?): Int = 0\n    override fun update(uri: Uri, values: ContentValues?, selection: String?, selectionArgs: Array<String>?): Int = 0\n}"
  },
  {
    "path": "packages/lottie/android/src/default/java/run/granite/lottie/builtin/BuiltInLottieInitializer.kt",
    "content": "package run.granite.lottie.builtin\n\nimport run.granite.lottie.GraniteLottieRegistry\n\n/**\n * Initializes BuiltInLottieProvider as the default Lottie provider.\n * Called by BuiltInLottieContentProvider when USE_DEFAULT_PROVIDER is enabled.\n */\nobject BuiltInLottieInitializer {\n    private var initialized = false\n\n    /**\n     * Initialize builtin provider and register it as default.\n     * Safe to call multiple times - only executes once.\n     */\n    fun initialize() {\n        if (initialized) return\n        initialized = true\n\n        GraniteLottieRegistry.registerFactory(\"builtin\") { BuiltInLottieProvider() }\n        GraniteLottieRegistry.setDefaultProvider(\"builtin\")\n    }\n}"
  },
  {
    "path": "packages/lottie/android/src/default/java/run/granite/lottie/builtin/BuiltInLottieProvider.kt",
    "content": "package run.granite.lottie.builtin\n\nimport android.animation.Animator\nimport android.content.Context\nimport android.view.View\nimport android.widget.FrameLayout\nimport android.widget.ImageView\nimport com.airbnb.lottie.LottieAnimationView\nimport com.airbnb.lottie.LottieCompositionFactory\nimport com.airbnb.lottie.LottieDrawable\nimport com.airbnb.lottie.LottieProperty\nimport com.airbnb.lottie.RenderMode\nimport com.airbnb.lottie.TextDelegate\nimport com.airbnb.lottie.model.KeyPath\nimport com.airbnb.lottie.value.LottieValueCallback\nimport run.granite.lottie.*\nimport java.util.WeakHashMap\n\n/**\n * Built-in Lottie provider using Airbnb's lottie-android SDK.\n * This provider renders Lottie animations natively using the official SDK.\n */\nclass BuiltInLottieProvider : GraniteLottieProvider {\n    private val listeners = WeakHashMap<View, GraniteLottieListener>()\n    private val animationViews = WeakHashMap<View, LottieAnimationView>()\n\n    override fun createAnimationView(context: Context): View {\n        val container = FrameLayout(context)\n        val lottieView = LottieAnimationView(context).apply {\n            layoutParams = FrameLayout.LayoutParams(\n                FrameLayout.LayoutParams.MATCH_PARENT,\n                FrameLayout.LayoutParams.MATCH_PARENT\n            )\n        }\n        container.addView(lottieView)\n        animationViews[container] = lottieView\n        return container\n    }\n\n    override fun loadAnimation(assetName: String, view: View, config: GraniteLottieLoadConfig) {\n        val lottieView = animationViews[view] ?: return\n\n        // Cancel any existing animation\n        lottieView.cancelAnimation()\n\n        // Set up animator listener\n        setupAnimatorListener(lottieView, view)\n\n        // Try loading from assets folder\n        val assetPath = if (assetName.endsWith(\".json\")) assetName else \"$assetName.json\"\n        lottieView.setAnimation(assetPath)\n\n        applyConfig(config, lottieView)\n        notifyLoaded(view)\n\n        if (config.autoPlay) {\n            lottieView.playAnimation()\n        }\n    }\n\n    override fun loadAnimationFromJson(json: String, view: View, config: GraniteLottieLoadConfig) {\n        val lottieView = animationViews[view] ?: return\n\n        // Cancel any existing animation\n        lottieView.cancelAnimation()\n\n        // Set up animator listener\n        setupAnimatorListener(lottieView, view)\n\n        val compositionTask = LottieCompositionFactory.fromJsonString(json, null)\n        compositionTask.addListener { composition ->\n            lottieView.setComposition(composition)\n            applyConfig(config, lottieView)\n            notifyLoaded(view)\n\n            if (config.autoPlay) {\n                lottieView.playAnimation()\n            }\n        }\n        compositionTask.addFailureListener { e ->\n            notifyFailure(view, e.message ?: \"Failed to parse JSON\")\n        }\n    }\n\n    override fun loadAnimationFromUrl(url: String, view: View, config: GraniteLottieLoadConfig) {\n        val lottieView = animationViews[view] ?: return\n\n        // Cancel any existing animation\n        lottieView.cancelAnimation()\n\n        // Set up animator listener\n        setupAnimatorListener(lottieView, view)\n\n        val cacheKey = if (config.cacheComposition) url else null\n        val compositionTask = LottieCompositionFactory.fromUrl(view.context, url, cacheKey)\n        compositionTask.addListener { composition ->\n            lottieView.setComposition(composition)\n            applyConfig(config, lottieView)\n            notifyLoaded(view)\n\n            if (config.autoPlay) {\n                lottieView.playAnimation()\n            }\n        }\n        compositionTask.addFailureListener { e ->\n            notifyFailure(view, e.message ?: \"Failed to load from URL: $url\")\n        }\n    }\n\n    override fun loadDotLottie(uri: String, view: View, config: GraniteLottieLoadConfig) {\n        val lottieView = animationViews[view] ?: return\n\n        // Cancel any existing animation\n        lottieView.cancelAnimation()\n\n        // Set up animator listener\n        setupAnimatorListener(lottieView, view)\n\n        // .lottie files are zip archives, lottie-android 6.0+ supports them\n        val cacheKey = if (config.cacheComposition) uri else null\n        val compositionTask = LottieCompositionFactory.fromUrl(view.context, uri, cacheKey)\n        compositionTask.addListener { composition ->\n            lottieView.setComposition(composition)\n            applyConfig(config, lottieView)\n            notifyLoaded(view)\n\n            if (config.autoPlay) {\n                lottieView.playAnimation()\n            }\n        }\n        compositionTask.addFailureListener { e ->\n            notifyFailure(view, e.message ?: \"Failed to load .lottie: $uri\")\n        }\n    }\n\n    override fun setListener(listener: GraniteLottieListener?, view: View) {\n        if (listener != null) {\n            listeners[view] = listener\n        } else {\n            listeners.remove(view)\n        }\n    }\n\n    override fun play(view: View, startFrame: Int, endFrame: Int) {\n        val lottieView = animationViews[view] ?: return\n\n        if (startFrame >= 0 && endFrame > startFrame) {\n            lottieView.setMinAndMaxFrame(startFrame, endFrame)\n            lottieView.playAnimation()\n        } else {\n            // Play from beginning when no specific frames are provided\n            lottieView.progress = 0f\n            lottieView.playAnimation()\n        }\n    }\n\n    override fun pause(view: View) {\n        animationViews[view]?.pauseAnimation()\n    }\n\n    override fun resume(view: View) {\n        animationViews[view]?.resumeAnimation()\n    }\n\n    override fun reset(view: View) {\n        val lottieView = animationViews[view] ?: return\n        lottieView.cancelAnimation()\n        lottieView.progress = 0f\n    }\n\n    override fun setProgress(progress: Float, view: View) {\n        animationViews[view]?.progress = progress\n    }\n\n    override fun setSpeed(speed: Float, view: View) {\n        animationViews[view]?.speed = speed\n    }\n\n    override fun setLoop(loop: Boolean, view: View) {\n        animationViews[view]?.repeatCount = if (loop) LottieDrawable.INFINITE else 0\n    }\n\n    override fun applyColorFilters(filters: List<GraniteLottieColorFilter>, view: View) {\n        val lottieView = animationViews[view] ?: return\n\n        for (filter in filters) {\n            val keyPath = if (filter.keypath == \"*\") {\n                KeyPath(\"**\")\n            } else {\n                KeyPath(filter.keypath)\n            }\n\n            lottieView.addValueCallback(keyPath, LottieProperty.COLOR, LottieValueCallback(filter.color))\n        }\n    }\n\n    override fun applyTextFilters(filters: List<GraniteLottieTextFilter>, view: View) {\n        val lottieView = animationViews[view] ?: return\n\n        val textDelegate = TextDelegate(lottieView)\n        for (filter in filters) {\n            textDelegate.setText(filter.find, filter.replace)\n        }\n        lottieView.setTextDelegate(textDelegate)\n    }\n\n    override fun cancelLoad(view: View) {\n        animationViews[view]?.cancelAnimation()\n    }\n\n    override fun disposeView(view: View) {\n        animationViews[view]?.cancelAnimation()\n        animationViews[view]?.removeAllAnimatorListeners()\n        animationViews.remove(view)\n        listeners.remove(view)\n    }\n\n    // Private helpers\n\n    private fun setupAnimatorListener(lottieView: LottieAnimationView, view: View) {\n        lottieView.removeAllAnimatorListeners()\n        lottieView.addAnimatorListener(object : Animator.AnimatorListener {\n            override fun onAnimationStart(animation: Animator) {}\n\n            override fun onAnimationEnd(animation: Animator) {\n                // Only notify finish when not looping\n                // In loop mode, onAnimationRepeat is called instead\n                if (lottieView.repeatCount != LottieDrawable.INFINITE) {\n                    listeners[view]?.onAnimationFinish(false)\n                }\n            }\n\n            override fun onAnimationCancel(animation: Animator) {\n                listeners[view]?.onAnimationFinish(true)\n            }\n\n            override fun onAnimationRepeat(animation: Animator) {\n                listeners[view]?.onAnimationLoop()\n            }\n        })\n    }\n\n    private fun applyConfig(config: GraniteLottieLoadConfig, lottieView: LottieAnimationView) {\n        lottieView.speed = config.speed\n        lottieView.repeatCount = if (config.loop) LottieDrawable.INFINITE else 0\n        lottieView.progress = config.progress\n\n        // Resize mode\n        lottieView.scaleType = when (config.resizeMode) {\n            GraniteLottieResizeMode.COVER -> ImageView.ScaleType.CENTER_CROP\n            GraniteLottieResizeMode.CENTER -> ImageView.ScaleType.CENTER\n            else -> ImageView.ScaleType.FIT_CENTER\n        }\n\n        // Render mode\n        lottieView.renderMode = when (config.renderMode) {\n            GraniteLottieRenderMode.HARDWARE -> RenderMode.HARDWARE\n            GraniteLottieRenderMode.SOFTWARE -> RenderMode.SOFTWARE\n            else -> RenderMode.AUTOMATIC\n        }\n\n        // Safe mode\n        if (config.enableSafeMode) {\n            lottieView.setSafeMode(true)\n        }\n\n        // Merge paths\n        if (config.enableMergePaths) {\n            lottieView.enableMergePathsForKitKatAndAbove(true)\n        }\n\n        // Image assets folder\n        config.imageAssetsFolder?.let {\n            lottieView.imageAssetsFolder = it\n        }\n    }\n\n    private fun notifyLoaded(view: View) {\n        listeners[view]?.onAnimationLoaded()\n    }\n\n    private fun notifyFailure(view: View, error: String) {\n        listeners[view]?.onAnimationFailure(error)\n    }\n}"
  },
  {
    "path": "packages/lottie/android/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n</manifest>\n"
  },
  {
    "path": "packages/lottie/android/src/main/java/run/granite/lottie/GraniteLottieEvents.kt",
    "content": "package run.granite.lottie\n\nimport com.facebook.react.bridge.Arguments\nimport com.facebook.react.bridge.WritableMap\nimport com.facebook.react.uimanager.events.Event\n\n/**\n * Event emitted when animation is loaded\n */\nclass GraniteLottieLoadedEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteLottieLoadedEvent>(surfaceId, viewId) {\n\n    override fun getEventName(): String = \"onAnimationLoaded\"\n\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n\n/**\n * Event emitted when animation finishes\n */\nclass GraniteLottieFinishEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val isCancelled: Boolean\n) : Event<GraniteLottieFinishEvent>(surfaceId, viewId) {\n\n    override fun getEventName(): String = \"onAnimationFinish\"\n\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putBoolean(\"isCancelled\", isCancelled)\n    }\n}\n\n/**\n * Event emitted when animation fails to load\n */\nclass GraniteLottieFailureEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val error: String\n) : Event<GraniteLottieFailureEvent>(surfaceId, viewId) {\n\n    override fun getEventName(): String = \"onAnimationFailure\"\n\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putString(\"error\", error)\n    }\n}\n\n/**\n * Event emitted when animation loops\n */\nclass GraniteLottieLoopEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteLottieLoopEvent>(surfaceId, viewId) {\n\n    override fun getEventName(): String = \"onAnimationLoop\"\n\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n"
  },
  {
    "path": "packages/lottie/android/src/main/java/run/granite/lottie/GraniteLottieProvider.kt",
    "content": "package run.granite.lottie\n\nimport android.content.Context\nimport android.view.View\n\n/**\n * Priority level for animation loading\n */\nenum class GraniteLottiePriority {\n    LOW,\n    NORMAL,\n    HIGH\n}\n\n/**\n * Cache policy for animations\n */\nenum class GraniteLottieCachePolicy {\n    MEMORY,\n    DISK,\n    NONE\n}\n\n/**\n * Resize mode for animation view\n */\nenum class GraniteLottieResizeMode {\n    COVER,\n    CONTAIN,\n    CENTER;\n\n    companion object {\n        fun fromString(value: String?): GraniteLottieResizeMode {\n            return when (value?.lowercase()) {\n                \"cover\" -> COVER\n                \"center\" -> CENTER\n                else -> CONTAIN\n            }\n        }\n    }\n}\n\n/**\n * Render mode for hardware acceleration\n */\nenum class GraniteLottieRenderMode {\n    AUTOMATIC,\n    HARDWARE,\n    SOFTWARE;\n\n    companion object {\n        fun fromString(value: String?): GraniteLottieRenderMode {\n            return when (value?.uppercase()) {\n                \"HARDWARE\" -> HARDWARE\n                \"SOFTWARE\" -> SOFTWARE\n                else -> AUTOMATIC\n            }\n        }\n    }\n}\n\n/**\n * Color filter configuration\n */\ndata class GraniteLottieColorFilter(\n    val keypath: String,\n    val color: Int\n)\n\n/**\n * Text filter configuration for Android (find-and-replace)\n */\ndata class GraniteLottieTextFilter(\n    val find: String,\n    val replace: String\n)\n\n/**\n * Animation loading configuration\n */\ndata class GraniteLottieLoadConfig(\n    var speed: Float = 1f,\n    var loop: Boolean = true,\n    var autoPlay: Boolean = false,\n    var progress: Float = 0f,\n    var resizeMode: GraniteLottieResizeMode = GraniteLottieResizeMode.CONTAIN,\n    var renderMode: GraniteLottieRenderMode = GraniteLottieRenderMode.AUTOMATIC,\n    var colorFilters: List<GraniteLottieColorFilter> = emptyList(),\n    var textFilters: List<GraniteLottieTextFilter> = emptyList(),\n    var cacheComposition: Boolean = true,\n    var enableMergePaths: Boolean = false,\n    var enableSafeMode: Boolean = false,\n    var hardwareAcceleration: Boolean = false,\n    var imageAssetsFolder: String? = null,\n    var duration: Float? = null\n)\n\n/**\n * Listener for animation events\n */\ninterface GraniteLottieListener {\n    fun onAnimationLoaded() {}\n    fun onAnimationFinish(isCancelled: Boolean) {}\n    fun onAnimationFailure(error: String) {}\n    fun onAnimationLoop() {}\n}\n\n/**\n * Provider interface for Lottie animation implementations.\n * Implement this interface to provide custom animation rendering.\n */\ninterface GraniteLottieProvider {\n    /**\n     * Create a new animation view\n     */\n    fun createAnimationView(context: Context): View\n\n    /**\n     * Load animation from a local asset name\n     */\n    fun loadAnimation(assetName: String, view: View, config: GraniteLottieLoadConfig)\n\n    /**\n     * Load animation from a JSON string\n     */\n    fun loadAnimationFromJson(json: String, view: View, config: GraniteLottieLoadConfig)\n\n    /**\n     * Load animation from a remote URL\n     */\n    fun loadAnimationFromUrl(url: String, view: View, config: GraniteLottieLoadConfig)\n\n    /**\n     * Load .lottie file from URI\n     */\n    fun loadDotLottie(uri: String, view: View, config: GraniteLottieLoadConfig)\n\n    /**\n     * Set the listener for animation events\n     */\n    fun setListener(listener: GraniteLottieListener?, view: View)\n\n    /**\n     * Play animation\n     * @param startFrame -1 means from current position\n     * @param endFrame -1 means to end\n     */\n    fun play(view: View, startFrame: Int, endFrame: Int)\n\n    /**\n     * Pause animation\n     */\n    fun pause(view: View)\n\n    /**\n     * Resume animation\n     */\n    fun resume(view: View)\n\n    /**\n     * Reset animation to initial state\n     */\n    fun reset(view: View)\n\n    /**\n     * Set animation progress (0-1)\n     */\n    fun setProgress(progress: Float, view: View)\n\n    /**\n     * Set animation speed\n     */\n    fun setSpeed(speed: Float, view: View)\n\n    /**\n     * Set loop mode\n     */\n    fun setLoop(loop: Boolean, view: View)\n\n    /**\n     * Apply color filters\n     */\n    fun applyColorFilters(filters: List<GraniteLottieColorFilter>, view: View) {}\n\n    /**\n     * Apply text filters\n     */\n    fun applyTextFilters(filters: List<GraniteLottieTextFilter>, view: View) {}\n\n    /**\n     * Cancel any ongoing load operation\n     */\n    fun cancelLoad(view: View)\n    fun disposeView(view: View)\n}\n"
  },
  {
    "path": "packages/lottie/android/src/main/java/run/granite/lottie/GraniteLottieRegistry.kt",
    "content": "package run.granite.lottie\n\n/**\n * Registry singleton for managing Lottie providers.\n * Supports both legacy single-provider API and new factory-based multi-provider pattern.\n */\nobject GraniteLottieRegistry {\n    private val providers = mutableMapOf<String, () -> GraniteLottieProvider>()\n    private var defaultProviderId: String? = null\n\n    // Legacy support\n    private var legacyProvider: GraniteLottieProvider? = null\n\n    /**\n     * Register a provider factory with an ID.\n     * The factory will be invoked when createProvider(id) is called.\n     */\n    fun registerFactory(id: String, factory: () -> GraniteLottieProvider) {\n        providers[id] = factory\n    }\n\n    /**\n     * Create a provider instance by ID.\n     */\n    fun createProvider(id: String): GraniteLottieProvider? {\n        return providers[id]?.invoke()\n    }\n\n    /**\n     * Create a provider instance using the default selection logic:\n     * 1. Default provider if set\n     * 2. Legacy provider if registered\n     * 3. First available factory\n     */\n    fun createProvider(): GraniteLottieProvider? {\n        // 1. Default provider\n        defaultProviderId?.let { id ->\n            return providers[id]?.invoke()\n        }\n        // 2. Legacy provider\n        legacyProvider?.let { return it }\n        // 3. First available\n        return providers.values.firstOrNull()?.invoke()\n    }\n\n    /**\n     * Set the default provider ID to use when createProvider() is called.\n     */\n    fun setDefaultProvider(id: String) {\n        defaultProviderId = id\n    }\n\n    /**\n     * Check if any provider is available.\n     */\n    fun hasProvider(): Boolean {\n        return providers.isNotEmpty() || legacyProvider != null\n    }\n\n    /**\n     * Get list of registered provider IDs.\n     */\n    fun getAvailableProviders(): List<String> = providers.keys.toList()\n\n    /**\n     * Clear all registered providers. For testing purposes.\n     */\n    @androidx.annotation.VisibleForTesting\n    fun clear() {\n        providers.clear()\n        defaultProviderId = null\n        legacyProvider = null\n    }\n\n    // === Legacy API ===\n\n    /**\n     * Register a single provider instance (legacy API).\n     * Prefer registerFactory() for new implementations.\n     */\n    fun register(provider: GraniteLottieProvider) {\n        legacyProvider = provider\n    }\n\n    /**\n     * Get the legacy registered provider.\n     * Prefer createProvider() for new implementations.\n     */\n    val provider: GraniteLottieProvider?\n        get() = legacyProvider\n\n    /**\n     * Legacy hasProvider property.\n     */\n    val hasProvider: Boolean\n        get() = hasProvider()\n}"
  },
  {
    "path": "packages/lottie/android/src/main/java/run/granite/lottie/GraniteLottieView.kt",
    "content": "package run.granite.lottie\n\nimport android.content.Context\nimport android.graphics.Color\nimport android.util.Log\nimport android.view.View\nimport android.widget.FrameLayout\nimport com.facebook.react.bridge.ReactContext\nimport com.facebook.react.uimanager.UIManagerHelper\n\nclass GraniteLottieView(context: Context) : FrameLayout(context), GraniteLottieListener {\n    private var containerView: View? = null\n    private var provider: GraniteLottieProvider? = null\n    private val config = GraniteLottieLoadConfig()\n\n    // Current source state\n    private var currentSourceName: String? = null\n    private var currentSourceJson: String? = null\n    private var currentSourceURL: String? = null\n    private var currentDotLottieURI: String? = null\n\n    // Animation state\n    private var shouldAutoPlay = false\n    private var isLoaded = false\n\n    init {\n        // ContentProvider auto-registers builtin provider when INCLUDE_DEFAULT_PROVIDER=true\n        val resolvedProvider = GraniteLottieRegistry.createProvider()\n\n        if (resolvedProvider == null) {\n            Log.w(TAG, \"No provider registered. Register a provider using GraniteLottieRegistry.\")\n        }\n\n        provider = resolvedProvider\n\n        // Create container view from provider\n        provider?.let { p ->\n            containerView = p.createAnimationView(context)\n            containerView?.layoutParams = LayoutParams(\n                LayoutParams.MATCH_PARENT,\n                LayoutParams.MATCH_PARENT\n            )\n            containerView?.let { addView(it) }\n\n            // Set listener\n            containerView?.let { p.setListener(this, it) }\n        }\n    }\n\n    companion object {\n        private const val TAG = \"GraniteLottieView\"\n    }\n\n    // Source setters - trigger reload\n    fun setSourceName(name: String?) {\n        if (provider == null) return\n        if (name != null && name.isNotEmpty() && name != currentSourceName) {\n            currentSourceName = name\n            currentSourceJson = null\n            currentSourceURL = null\n            currentDotLottieURI = null\n            loadAnimation()\n        }\n    }\n\n    fun setSourceJson(json: String?) {\n        if (provider == null) return\n        if (json != null && json.isNotEmpty() && json != currentSourceJson) {\n            currentSourceJson = json\n            currentSourceName = null\n            currentSourceURL = null\n            currentDotLottieURI = null\n            loadAnimation()\n        }\n    }\n\n    fun setSourceURL(url: String?) {\n        if (provider == null) return\n        if (url != null && url.isNotEmpty() && url != currentSourceURL) {\n            currentSourceURL = url\n            currentSourceName = null\n            currentSourceJson = null\n            currentDotLottieURI = null\n            loadAnimation()\n        }\n    }\n\n    fun setSourceDotLottieURI(uri: String?) {\n        if (provider == null) return\n        if (uri != null && uri.isNotEmpty() && uri != currentDotLottieURI) {\n            currentDotLottieURI = uri\n            currentSourceName = null\n            currentSourceJson = null\n            currentSourceURL = null\n            loadAnimation()\n        }\n    }\n\n    // Animation control - in-place update\n    fun setSpeed(speed: Double) {\n        config.speed = speed.toFloat()\n        if (isLoaded) {\n            containerView?.let { provider?.setSpeed(speed.toFloat(), it) }\n        }\n    }\n\n    fun setLoop(loop: Boolean) {\n        config.loop = loop\n        if (isLoaded) {\n            containerView?.let { provider?.setLoop(loop, it) }\n        }\n    }\n\n    fun setAutoPlay(autoPlay: Boolean) {\n        shouldAutoPlay = autoPlay\n        config.autoPlay = autoPlay\n        if (autoPlay && isLoaded) {\n            containerView?.let { provider?.play(it, -1, -1) }\n        }\n    }\n\n    fun setProgress(progress: Float) {\n        config.progress = progress\n        if (isLoaded) {\n            containerView?.let { provider?.setProgress(progress, it) }\n        }\n    }\n\n    fun setResizeMode(mode: String?) {\n        config.resizeMode = GraniteLottieResizeMode.fromString(mode)\n    }\n\n    fun setRenderMode(mode: String?) {\n        config.renderMode = GraniteLottieRenderMode.fromString(mode)\n    }\n\n    fun setCacheComposition(cache: Boolean) {\n        config.cacheComposition = cache\n    }\n\n    fun setEnableMergePathsAndroidForKitKatAndAbove(enable: Boolean) {\n        config.enableMergePaths = enable\n    }\n\n    fun setEnableSafeModeAndroid(enable: Boolean) {\n        config.enableSafeMode = enable\n    }\n\n    fun setHardwareAccelerationAndroid(enable: Boolean) {\n        config.hardwareAcceleration = enable\n    }\n\n    fun setImageAssetsFolder(folder: String?) {\n        config.imageAssetsFolder = folder\n    }\n\n    fun setDuration(duration: Double) {\n        config.duration = if (duration > 0) duration.toFloat() else null\n    }\n\n    fun setColorFilters(filters: List<Map<String, Any>>?) {\n        if (filters != null) {\n            config.colorFilters = filters.mapNotNull { filter ->\n                val keypath = filter[\"keypath\"] as? String ?: return@mapNotNull null\n                val colorStr = filter[\"color\"] as? String ?: return@mapNotNull null\n                val color = try {\n                    Color.parseColor(colorStr)\n                } catch (e: Exception) {\n                    return@mapNotNull null\n                }\n                GraniteLottieColorFilter(keypath, color)\n            }\n            if (isLoaded) {\n                containerView?.let { provider?.applyColorFilters(config.colorFilters, it) }\n            }\n        }\n    }\n\n    fun setTextFiltersAndroid(filters: List<Map<String, Any>>?) {\n        if (filters != null) {\n            config.textFilters = filters.mapNotNull { filter ->\n                val find = filter[\"find\"] as? String ?: return@mapNotNull null\n                val replace = filter[\"replace\"] as? String ?: return@mapNotNull null\n                GraniteLottieTextFilter(find, replace)\n            }\n            if (isLoaded) {\n                containerView?.let { provider?.applyTextFilters(config.textFilters, it) }\n            }\n        }\n    }\n\n    // Commands\n    fun play(startFrame: Int, endFrame: Int) {\n        containerView?.let { provider?.play(it, startFrame, endFrame) }\n    }\n\n    fun pause() {\n        containerView?.let { provider?.pause(it) }\n    }\n\n    fun resume() {\n        containerView?.let { provider?.resume(it) }\n    }\n\n    fun reset() {\n        containerView?.let { provider?.reset(it) }\n    }\n\n    fun dispose() {\n        containerView?.let { provider?.disposeView(it) }\n    }\n\n    private fun loadAnimation() {\n        isLoaded = false\n        val p = provider ?: return\n\n        containerView?.let { view ->\n            when {\n                !currentSourceName.isNullOrEmpty() -> {\n                    p.loadAnimation(currentSourceName!!, view, config)\n                }\n                !currentSourceJson.isNullOrEmpty() -> {\n                    p.loadAnimationFromJson(currentSourceJson!!, view, config)\n                }\n                !currentSourceURL.isNullOrEmpty() -> {\n                    p.loadAnimationFromUrl(currentSourceURL!!, view, config)\n                }\n                !currentDotLottieURI.isNullOrEmpty() -> {\n                    p.loadDotLottie(currentDotLottieURI!!, view, config)\n                }\n            }\n        }\n    }\n\n    // GraniteLottieListener implementation\n    override fun onAnimationLoaded() {\n        isLoaded = true\n        emitEvent(GraniteLottieLoadedEvent(surfaceId, id))\n\n        if (shouldAutoPlay) {\n            containerView?.let { provider?.play(it, -1, -1) }\n        }\n    }\n\n    override fun onAnimationFinish(isCancelled: Boolean) {\n        emitEvent(GraniteLottieFinishEvent(surfaceId, id, isCancelled))\n    }\n\n    override fun onAnimationFailure(error: String) {\n        emitEvent(GraniteLottieFailureEvent(surfaceId, id, error))\n    }\n\n    override fun onAnimationLoop() {\n        emitEvent(GraniteLottieLoopEvent(surfaceId, id))\n    }\n\n    private val surfaceId: Int\n        get() = UIManagerHelper.getSurfaceId(this)\n\n    private fun emitEvent(event: com.facebook.react.uimanager.events.Event<*>) {\n        val reactContext = context as? ReactContext ?: return\n        UIManagerHelper.getEventDispatcherForReactTag(reactContext, id)?.dispatchEvent(event)\n    }\n}\n"
  },
  {
    "path": "packages/lottie/android/src/main/java/run/granite/lottie/GraniteLottieViewManager.kt",
    "content": "package run.granite.lottie\n\nimport com.facebook.react.bridge.ReadableArray\nimport com.facebook.react.module.annotations.ReactModule\nimport com.facebook.react.uimanager.SimpleViewManager\nimport com.facebook.react.uimanager.ThemedReactContext\nimport com.facebook.react.uimanager.ViewManagerDelegate\nimport com.facebook.react.uimanager.annotations.ReactProp\nimport com.facebook.react.viewmanagers.GraniteLottieViewManagerInterface\nimport com.facebook.react.viewmanagers.GraniteLottieViewManagerDelegate\n\n@ReactModule(name = GraniteLottieViewManager.NAME)\nclass GraniteLottieViewManager : SimpleViewManager<GraniteLottieView>(),\n    GraniteLottieViewManagerInterface<GraniteLottieView> {\n\n    private val delegate: ViewManagerDelegate<GraniteLottieView> =\n        GraniteLottieViewManagerDelegate(this)\n\n    override fun getDelegate(): ViewManagerDelegate<GraniteLottieView> = delegate\n\n    override fun getName(): String = NAME\n\n    override fun createViewInstance(context: ThemedReactContext): GraniteLottieView {\n        return GraniteLottieView(context)\n    }\n\n    override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any> {\n        return mapOf(\n            \"onAnimationLoaded\" to mapOf(\"registrationName\" to \"onAnimationLoaded\"),\n            \"onAnimationFinish\" to mapOf(\"registrationName\" to \"onAnimationFinish\"),\n            \"onAnimationFailure\" to mapOf(\"registrationName\" to \"onAnimationFailure\"),\n            \"onAnimationLoop\" to mapOf(\"registrationName\" to \"onAnimationLoop\")\n        )\n    }\n\n    // Source props\n    @ReactProp(name = \"sourceName\")\n    override fun setSourceName(view: GraniteLottieView, value: String?) {\n        view.setSourceName(value)\n    }\n\n    @ReactProp(name = \"sourceJson\")\n    override fun setSourceJson(view: GraniteLottieView, value: String?) {\n        view.setSourceJson(value)\n    }\n\n    @ReactProp(name = \"sourceURL\")\n    override fun setSourceURL(view: GraniteLottieView, value: String?) {\n        view.setSourceURL(value)\n    }\n\n    @ReactProp(name = \"sourceDotLottieURI\")\n    override fun setSourceDotLottieURI(view: GraniteLottieView, value: String?) {\n        view.setSourceDotLottieURI(value)\n    }\n\n    // Animation control props\n    @ReactProp(name = \"progress\")\n    override fun setProgress(view: GraniteLottieView, value: Float) {\n        view.setProgress(value)\n    }\n\n    @ReactProp(name = \"speed\")\n    override fun setSpeed(view: GraniteLottieView, value: Double) {\n        view.setSpeed(value)\n    }\n\n    @ReactProp(name = \"loop\", defaultBoolean = true)\n    override fun setLoop(view: GraniteLottieView, value: Boolean) {\n        view.setLoop(value)\n    }\n\n    @ReactProp(name = \"autoPlay\", defaultBoolean = false)\n    override fun setAutoPlay(view: GraniteLottieView, value: Boolean) {\n        view.setAutoPlay(value)\n    }\n\n    // Layout & Rendering props\n    @ReactProp(name = \"resizeMode\")\n    override fun setResizeMode(view: GraniteLottieView, value: String?) {\n        view.setResizeMode(value)\n    }\n\n    @ReactProp(name = \"renderMode\")\n    override fun setRenderMode(view: GraniteLottieView, value: String?) {\n        view.setRenderMode(value)\n    }\n\n    @ReactProp(name = \"imageAssetsFolder\")\n    override fun setImageAssetsFolder(view: GraniteLottieView, value: String?) {\n        view.setImageAssetsFolder(value)\n    }\n\n    // Android-specific props\n    @ReactProp(name = \"enableMergePathsAndroidForKitKatAndAbove\", defaultBoolean = false)\n    override fun setEnableMergePathsAndroidForKitKatAndAbove(view: GraniteLottieView, value: Boolean) {\n        view.setEnableMergePathsAndroidForKitKatAndAbove(value)\n    }\n\n    @ReactProp(name = \"enableSafeModeAndroid\", defaultBoolean = false)\n    override fun setEnableSafeModeAndroid(view: GraniteLottieView, value: Boolean) {\n        view.setEnableSafeModeAndroid(value)\n    }\n\n    @ReactProp(name = \"hardwareAccelerationAndroid\", defaultBoolean = false)\n    override fun setHardwareAccelerationAndroid(view: GraniteLottieView, value: Boolean) {\n        view.setHardwareAccelerationAndroid(value)\n    }\n\n    @ReactProp(name = \"cacheComposition\", defaultBoolean = true)\n    override fun setCacheComposition(view: GraniteLottieView, value: Boolean) {\n        view.setCacheComposition(value)\n    }\n\n    @ReactProp(name = \"duration\")\n    override fun setDuration(view: GraniteLottieView, value: Double) {\n        view.setDuration(value)\n    }\n\n    // Filter props\n    @ReactProp(name = \"colorFilters\")\n    override fun setColorFilters(view: GraniteLottieView, value: ReadableArray?) {\n        val filters = value?.let { array ->\n            (0 until array.size()).mapNotNull { i ->\n                array.getMap(i)?.let { map ->\n                    mapOf(\n                        \"keypath\" to (map.getString(\"keypath\") ?: \"\"),\n                        \"color\" to (map.getString(\"color\") ?: \"\")\n                    )\n                }\n            }\n        }\n        view.setColorFilters(filters)\n    }\n\n    @ReactProp(name = \"textFiltersAndroid\")\n    override fun setTextFiltersAndroid(view: GraniteLottieView, value: ReadableArray?) {\n        val filters = value?.let { array ->\n            (0 until array.size()).mapNotNull { i ->\n                array.getMap(i)?.let { map ->\n                    mapOf(\n                        \"find\" to (map.getString(\"find\") ?: \"\"),\n                        \"replace\" to (map.getString(\"replace\") ?: \"\")\n                    )\n                }\n            }\n        }\n        view.setTextFiltersAndroid(filters)\n    }\n\n    @ReactProp(name = \"textFiltersIOS\")\n    override fun setTextFiltersIOS(view: GraniteLottieView, value: ReadableArray?) {\n        // iOS only - no-op on Android\n    }\n\n    // Commands\n    override fun play(view: GraniteLottieView, startFrame: Int, endFrame: Int) {\n        view.play(startFrame, endFrame)\n    }\n\n    override fun pause(view: GraniteLottieView) {\n        view.pause()\n    }\n\n    override fun resume(view: GraniteLottieView) {\n        view.resume()\n    }\n\n    override fun reset(view: GraniteLottieView) {\n        view.reset()\n    }\n\n    override fun onDropViewInstance(view: GraniteLottieView) {\n        view.dispose()\n        super.onDropViewInstance(view)\n    }\n\n    companion object {\n        const val NAME = \"GraniteLottieView\"\n    }\n}\n"
  },
  {
    "path": "packages/lottie/android/src/main/java/run/granite/lottie/GraniteLottieViewPackage.kt",
    "content": "package run.granite.lottie\n\nimport com.facebook.react.ReactPackage\nimport com.facebook.react.bridge.NativeModule\nimport com.facebook.react.bridge.ReactApplicationContext\nimport com.facebook.react.uimanager.ViewManager\nimport java.util.ArrayList\n\nclass GraniteLottieViewPackage : ReactPackage {\n  override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {\n    val viewManagers: MutableList<ViewManager<*, *>> = ArrayList()\n    viewManagers.add(GraniteLottieViewManager())\n    return viewManagers\n  }\n\n  override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {\n    return emptyList()\n  }\n}\n"
  },
  {
    "path": "packages/lottie/ios/GraniteLottieProvider.swift",
    "content": "import Foundation\nimport UIKit\n\n/// Priority level for animation loading\n@objc public enum GraniteLottiePriority: Int {\n    case low = 0\n    case normal = 1\n    case high = 2\n}\n\n/// Cache policy for animations\n@objc public enum GraniteLottieCachePolicy: Int {\n    case memory = 0\n    case disk = 1\n    case none = 2\n}\n\n/// Resize mode for animation view\n@objc public enum GraniteLottieResizeMode: Int {\n    case cover = 0\n    case contain = 1\n    case center = 2\n\n    public var contentMode: UIView.ContentMode {\n        switch self {\n        case .cover:\n            return .scaleAspectFill\n        case .contain:\n            return .scaleAspectFit\n        case .center:\n            return .center\n        }\n    }\n\n    public static func from(string: String?) -> GraniteLottieResizeMode {\n        switch string?.lowercased() {\n        case \"cover\":\n            return .cover\n        case \"center\":\n            return .center\n        default:\n            return .contain\n        }\n    }\n}\n\n/// Helper class for Objective-C interop with resize mode enum\n@objc public class GraniteLottieResizeModeHelper: NSObject {\n    @objc public static func fromString(_ string: String?) -> GraniteLottieResizeMode {\n        return GraniteLottieResizeMode.from(string: string)\n    }\n}\n\n/// Color filter configuration\n@objc public class GraniteLottieColorFilter: NSObject {\n    @objc public let keypath: String\n    @objc public let color: UIColor\n\n    @objc public init(keypath: String, color: UIColor) {\n        self.keypath = keypath\n        self.color = color\n        super.init()\n    }\n}\n\n/// Text filter configuration for iOS\n@objc public class GraniteLottieTextFilter: NSObject {\n    @objc public let keypath: String\n    @objc public let text: String\n\n    @objc public init(keypath: String, text: String) {\n        self.keypath = keypath\n        self.text = text\n        super.init()\n    }\n}\n\n/// Animation loading configuration\n@objc public class GraniteLottieLoadConfig: NSObject {\n    @objc public var speed: Double = 1.0\n    @objc public var loop: Bool = true\n    @objc public var autoPlay: Bool = false\n    @objc public var progress: Float = 0.0\n    @objc public var resizeMode: GraniteLottieResizeMode = .contain\n    @objc public var colorFilters: [GraniteLottieColorFilter] = []\n    @objc public var textFilters: [GraniteLottieTextFilter] = []\n    @objc public var cacheComposition: Bool = true\n\n    @objc public override init() {\n        super.init()\n    }\n}\n\n/// Delegate for animation events\n@objc public protocol GraniteLottieDelegate: NSObjectProtocol {\n    @objc optional func animationDidLoad()\n    @objc optional func animationDidFinish(isCancelled: Bool)\n    @objc optional func animationDidFail(error: String)\n    @objc optional func animationDidLoop()\n}\n\n/// Provider protocol for Lottie animation implementations\n/// Implement this protocol to provide custom animation rendering\n@objc public protocol GraniteLottieProvidable: NSObjectProtocol {\n    /// Create a new animation view\n    @objc func createAnimationView() -> UIView\n\n    /// Load animation from a local asset name\n    @objc func loadAnimation(named name: String, into view: UIView, config: GraniteLottieLoadConfig)\n\n    /// Load animation from a JSON string\n    @objc func loadAnimation(json: String, into view: UIView, config: GraniteLottieLoadConfig)\n\n    /// Load animation from a remote URL\n    @objc func loadAnimation(url: URL, into view: UIView, config: GraniteLottieLoadConfig)\n\n    /// Load .lottie file from URI\n    @objc func loadDotLottie(uri: String, into view: UIView, config: GraniteLottieLoadConfig)\n\n    /// Set the delegate for animation events\n    @objc func setDelegate(_ delegate: GraniteLottieDelegate?, for view: UIView)\n\n    /// Play animation\n    @objc func play(view: UIView, startFrame: Int, endFrame: Int)\n\n    /// Pause animation\n    @objc func pause(view: UIView)\n\n    /// Resume animation\n    @objc func resume(view: UIView)\n\n    /// Reset animation to initial state\n    @objc func reset(view: UIView)\n\n    /// Set animation progress (0-1)\n    @objc func setProgress(_ progress: Float, for view: UIView)\n\n    /// Set animation speed\n    @objc func setSpeed(_ speed: Double, for view: UIView)\n\n    /// Set loop mode\n    @objc func setLoop(_ loop: Bool, for view: UIView)\n\n    /// Apply color filters\n    @objc optional func applyColorFilters(_ filters: [GraniteLottieColorFilter], to view: UIView)\n\n    /// Apply text filters\n    @objc optional func applyTextFilters(_ filters: [GraniteLottieTextFilter], to view: UIView)\n\n    /// Cancel any ongoing load operation\n    @objc func cancelLoad(view: UIView)\n}\n"
  },
  {
    "path": "packages/lottie/ios/GraniteLottieRegistry.swift",
    "content": "import Foundation\n\n/// Registry singleton for managing the Lottie provider\n@objc public class GraniteLottieRegistry: NSObject {\n    /// Shared singleton instance\n    @objc public static let shared = GraniteLottieRegistry()\n\n    /// The current registered provider\n    @objc public private(set) var provider: GraniteLottieProvidable?\n\n    private override init() {\n        super.init()\n    }\n\n    /// Register a provider implementation\n    /// Call this in your app's initialization (e.g., AppDelegate)\n    /// - Parameter provider: The provider implementation to use\n    @objc public func register(provider: GraniteLottieProvidable) {\n        self.provider = provider\n    }\n\n    /// Check if a provider is registered\n    @objc public var hasProvider: Bool {\n        return provider != nil\n    }\n}\n"
  },
  {
    "path": "packages/lottie/ios/GraniteLottieView.h",
    "content": "#import <UIKit/UIKit.h>\n\n#ifndef GraniteLottieView_h\n#define GraniteLottieView_h\n\nNS_ASSUME_NONNULL_BEGIN\n\n// Forward declaration - actual inheritance from RCTViewComponentView is in .mm file\n// This allows Swift to import this header without C++ dependencies\n@interface GraniteLottieView : UIView\n\n@end\n\nNS_ASSUME_NONNULL_END\n\n#endif /* GraniteLottieView_h */\n"
  },
  {
    "path": "packages/lottie/ios/GraniteLottieView.mm",
    "content": "#import <React/RCTViewComponentView.h>\n#import <React/RCTConversions.h>\n\n#import <react/renderer/components/GraniteLottieViewSpec/ComponentDescriptors.h>\n#import <react/renderer/components/GraniteLottieViewSpec/EventEmitters.h>\n#import <react/renderer/components/GraniteLottieViewSpec/Props.h>\n#import <react/renderer/components/GraniteLottieViewSpec/RCTComponentViewHelpers.h>\n\n#import \"RCTFabricComponentsPlugins.h\"\n\n// Import Swift header\n#if __has_include(<GraniteLottie/GraniteLottie-Swift.h>)\n#import <GraniteLottie/GraniteLottie-Swift.h>\n#elif __has_include(<react_native_granite_lottie/react_native_granite_lottie-Swift.h>)\n#import <react_native_granite_lottie/react_native_granite_lottie-Swift.h>\n#else\n#import \"GraniteLottie-Swift.h\"\n#endif\n\nusing namespace facebook::react;\n\n// Redefine GraniteLottieView to inherit from RCTViewComponentView\n@interface GraniteLottieView : RCTViewComponentView <RCTGraniteLottieViewViewProtocol, GraniteLottieDelegate>\n@end\n\n@implementation GraniteLottieView {\n    UIView *_containerView;\n    id<GraniteLottieProvidable> _provider;\n    GraniteLottieLoadConfig *_config;\n\n    // Current source state\n    NSString *_currentSourceName;\n    NSString *_currentSourceJson;\n    NSString *_currentSourceURL;\n    NSString *_currentDotLottieURI;\n\n    // Current animation state\n    BOOL _shouldAutoPlay;\n    BOOL _isLoaded;\n}\n\n+ (ComponentDescriptorProvider)componentDescriptorProvider\n{\n    return concreteComponentDescriptorProvider<GraniteLottieViewComponentDescriptor>();\n}\n\n- (instancetype)initWithFrame:(CGRect)frame\n{\n    if (self = [super initWithFrame:frame]) {\n        static const auto defaultProps = std::make_shared<const GraniteLottieViewProps>();\n        _props = defaultProps;\n\n        _config = [[GraniteLottieLoadConfig alloc] init];\n        _isLoaded = NO;\n        _shouldAutoPlay = NO;\n\n        // Get provider from registry\n        _provider = [GraniteLottieRegistry shared].provider;\n\n#if GRANITE_LOTTIE_DEFAULT_PROVIDER\n        // Fallback to built-in provider when default provider is enabled\n        if (!_provider) {\n            _provider = [[BuiltInLottieProvider alloc] init];\n        }\n#else\n        // When default provider is disabled, require explicit provider registration\n        if (!_provider) {\n            NSLog(@\"[GraniteLottie] Warning: No provider registered. Register a provider using GraniteLottieRegistry.\");\n            return self;\n        }\n#endif\n\n        // Create container view from provider\n        _containerView = [_provider createAnimationView];\n        _containerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;\n        _containerView.frame = self.bounds;\n\n        // Set delegate\n        [_provider setDelegate:self for:_containerView];\n\n        self.contentView = _containerView;\n    }\n    return self;\n}\n\n- (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &)oldProps\n{\n    const auto &oldViewProps = *std::static_pointer_cast<GraniteLottieViewProps const>(_props);\n    const auto &newViewProps = *std::static_pointer_cast<GraniteLottieViewProps const>(props);\n\n    BOOL shouldReload = NO;\n\n    // Source properties - trigger reload\n    NSString *newSourceName = [[NSString alloc] initWithUTF8String:newViewProps.sourceName.c_str()];\n    NSString *newSourceJson = [[NSString alloc] initWithUTF8String:newViewProps.sourceJson.c_str()];\n    NSString *newSourceURL = [[NSString alloc] initWithUTF8String:newViewProps.sourceURL.c_str()];\n    NSString *newDotLottieURI = [[NSString alloc] initWithUTF8String:newViewProps.sourceDotLottieURI.c_str()];\n\n    if (![newSourceName isEqualToString:_currentSourceName ?: @\"\"] && newSourceName.length > 0) {\n        _currentSourceName = newSourceName;\n        _currentSourceJson = nil;\n        _currentSourceURL = nil;\n        _currentDotLottieURI = nil;\n        shouldReload = YES;\n    }\n\n    if (![newSourceJson isEqualToString:_currentSourceJson ?: @\"\"] && newSourceJson.length > 0) {\n        _currentSourceJson = newSourceJson;\n        _currentSourceName = nil;\n        _currentSourceURL = nil;\n        _currentDotLottieURI = nil;\n        shouldReload = YES;\n    }\n\n    if (![newSourceURL isEqualToString:_currentSourceURL ?: @\"\"] && newSourceURL.length > 0) {\n        _currentSourceURL = newSourceURL;\n        _currentSourceName = nil;\n        _currentSourceJson = nil;\n        _currentDotLottieURI = nil;\n        shouldReload = YES;\n    }\n\n    if (![newDotLottieURI isEqualToString:_currentDotLottieURI ?: @\"\"] && newDotLottieURI.length > 0) {\n        _currentDotLottieURI = newDotLottieURI;\n        _currentSourceName = nil;\n        _currentSourceJson = nil;\n        _currentSourceURL = nil;\n        shouldReload = YES;\n    }\n\n    // Animation control properties - in-place update\n    if (oldViewProps.speed != newViewProps.speed) {\n        _config.speed = newViewProps.speed;\n        if (_isLoaded) {\n            [_provider setSpeed:newViewProps.speed for:_containerView];\n        }\n    }\n\n    if (oldViewProps.loop != newViewProps.loop) {\n        _config.loop = newViewProps.loop;\n        if (_isLoaded) {\n            [_provider setLoop:newViewProps.loop for:_containerView];\n        }\n    }\n\n    _shouldAutoPlay = newViewProps.autoPlay;\n    _config.autoPlay = newViewProps.autoPlay;\n    if (_isLoaded && _shouldAutoPlay && !shouldReload) {\n        [_provider playWithView:_containerView startFrame:-1 endFrame:-1];\n    }\n\n    if (oldViewProps.progress != newViewProps.progress) {\n        _config.progress = newViewProps.progress;\n        if (_isLoaded) {\n            [_provider setProgress:newViewProps.progress for:_containerView];\n        }\n    }\n\n    // Resize mode - in-place update\n    NSString *newResizeMode = [[NSString alloc] initWithUTF8String:newViewProps.resizeMode.c_str()];\n    if (newResizeMode.length > 0) {\n        _config.resizeMode = [GraniteLottieResizeModeHelper fromString:newResizeMode];\n    }\n\n    // Cache composition\n    _config.cacheComposition = newViewProps.cacheComposition;\n\n    // Color filters\n    if (newViewProps.colorFilters.size() > 0) {\n        NSMutableArray<GraniteLottieColorFilter *> *filters = [NSMutableArray array];\n        for (const auto &filter : newViewProps.colorFilters) {\n            NSString *keypath = [[NSString alloc] initWithUTF8String:filter.keypath.c_str()];\n            NSString *colorStr = [[NSString alloc] initWithUTF8String:filter.color.c_str()];\n            UIColor *color = [self colorFromHexString:colorStr];\n            if (color) {\n                [filters addObject:[[GraniteLottieColorFilter alloc] initWithKeypath:keypath color:color]];\n            }\n        }\n        _config.colorFilters = filters;\n\n        if (_isLoaded && [_provider respondsToSelector:@selector(applyColorFilters:to:)]) {\n            [_provider applyColorFilters:filters to:_containerView];\n        }\n    }\n\n    // Text filters (iOS)\n    if (newViewProps.textFiltersIOS.size() > 0) {\n        NSMutableArray<GraniteLottieTextFilter *> *filters = [NSMutableArray array];\n        for (const auto &filter : newViewProps.textFiltersIOS) {\n            NSString *keypath = [[NSString alloc] initWithUTF8String:filter.keypath.c_str()];\n            NSString *text = [[NSString alloc] initWithUTF8String:filter.text.c_str()];\n            [filters addObject:[[GraniteLottieTextFilter alloc] initWithKeypath:keypath text:text]];\n        }\n        _config.textFilters = filters;\n\n        if (_isLoaded && [_provider respondsToSelector:@selector(applyTextFilters:to:)]) {\n            [_provider applyTextFilters:filters to:_containerView];\n        }\n    }\n\n    // Load animation if source changed\n    if (shouldReload) {\n        [self loadAnimation];\n    }\n\n    [super updateProps:props oldProps:oldProps];\n}\n\n- (void)loadAnimation\n{\n    _isLoaded = NO;\n\n    if (_currentSourceName.length > 0) {\n        [_provider loadAnimationWithNamed:_currentSourceName into:_containerView config:_config];\n    } else if (_currentSourceJson.length > 0) {\n        [_provider loadAnimationWithJson:_currentSourceJson into:_containerView config:_config];\n    } else if (_currentSourceURL.length > 0) {\n        NSURL *url = [NSURL URLWithString:_currentSourceURL];\n        if (url) {\n            [_provider loadAnimationWithUrl:url into:_containerView config:_config];\n        }\n    } else if (_currentDotLottieURI.length > 0) {\n        [_provider loadDotLottieWithUri:_currentDotLottieURI into:_containerView config:_config];\n    }\n}\n\n#pragma mark - Commands\n\n- (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args\n{\n    RCTGraniteLottieViewHandleCommand(self, commandName, args);\n}\n\n- (void)play:(NSInteger)startFrame endFrame:(NSInteger)endFrame\n{\n    [_provider playWithView:_containerView startFrame:(int)startFrame endFrame:(int)endFrame];\n}\n\n- (void)pause\n{\n    [_provider pauseWithView:_containerView];\n}\n\n- (void)resume\n{\n    [_provider resumeWithView:_containerView];\n}\n\n- (void)reset\n{\n    [_provider resetWithView:_containerView];\n}\n\n#pragma mark - GraniteLottieDelegate\n\n- (void)animationDidLoad\n{\n    _isLoaded = YES;\n\n    if (_eventEmitter) {\n        std::dynamic_pointer_cast<const GraniteLottieViewEventEmitter>(_eventEmitter)\n            ->onAnimationLoaded(GraniteLottieViewEventEmitter::OnAnimationLoaded{});\n    }\n\n    if (_shouldAutoPlay) {\n        [_provider playWithView:_containerView startFrame:-1 endFrame:-1];\n    }\n}\n\n- (void)animationDidFinishWithIsCancelled:(BOOL)isCancelled\n{\n    if (_eventEmitter) {\n        std::dynamic_pointer_cast<const GraniteLottieViewEventEmitter>(_eventEmitter)\n            ->onAnimationFinish(GraniteLottieViewEventEmitter::OnAnimationFinish{\n                .isCancelled = isCancelled\n            });\n    }\n}\n\n- (void)animationDidFailWithError:(NSString *)error\n{\n    if (_eventEmitter) {\n        std::dynamic_pointer_cast<const GraniteLottieViewEventEmitter>(_eventEmitter)\n            ->onAnimationFailure(GraniteLottieViewEventEmitter::OnAnimationFailure{\n                .error = std::string([error UTF8String])\n            });\n    }\n}\n\n- (void)animationDidLoop\n{\n    if (_eventEmitter) {\n        std::dynamic_pointer_cast<const GraniteLottieViewEventEmitter>(_eventEmitter)\n            ->onAnimationLoop(GraniteLottieViewEventEmitter::OnAnimationLoop{});\n    }\n}\n\n#pragma mark - Helpers\n\n- (UIColor *)colorFromHexString:(NSString *)hexString\n{\n    if (!hexString || hexString.length == 0) return nil;\n\n    NSString *cleanString = [hexString stringByReplacingOccurrencesOfString:@\"#\" withString:@\"\"];\n\n    if (cleanString.length == 6) {\n        unsigned int rgbValue;\n        NSScanner *scanner = [NSScanner scannerWithString:cleanString];\n        [scanner scanHexInt:&rgbValue];\n\n        return [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16) / 255.0\n                               green:((rgbValue & 0x00FF00) >> 8) / 255.0\n                                blue:(rgbValue & 0x0000FF) / 255.0\n                               alpha:1.0];\n    }\n\n    return nil;\n}\n\n@end\n\nClass<RCTComponentViewProtocol> GraniteLottieViewCls(void)\n{\n    return GraniteLottieView.class;\n}\n"
  },
  {
    "path": "packages/lottie/ios/Providers/BuiltInLottieProvider.swift",
    "content": "import Foundation\nimport UIKit\nimport Lottie\n\n/// Built-in Lottie provider using Airbnb's lottie-ios SDK\n/// This provider renders Lottie animations natively using the official SDK\n@objc public class BuiltInLottieProvider: NSObject, GraniteLottieProvidable {\n    private var delegates: NSMapTable<UIView, AnyObject> = NSMapTable.weakToWeakObjects()\n    private var animationViews: NSMapTable<UIView, LottieAnimationView> = NSMapTable.weakToStrongObjects()\n    private var loadingTasks: NSMapTable<UIView, URLSessionDataTask> = NSMapTable.weakToStrongObjects()\n\n    @objc public override init() {\n        super.init()\n    }\n\n    @objc public func createAnimationView() -> UIView {\n        let container = UIView()\n        container.backgroundColor = .clear\n\n        let lottieView = LottieAnimationView()\n        lottieView.translatesAutoresizingMaskIntoConstraints = false\n        lottieView.backgroundBehavior = .pauseAndRestore\n        container.addSubview(lottieView)\n\n        NSLayoutConstraint.activate([\n            lottieView.topAnchor.constraint(equalTo: container.topAnchor),\n            lottieView.leadingAnchor.constraint(equalTo: container.leadingAnchor),\n            lottieView.trailingAnchor.constraint(equalTo: container.trailingAnchor),\n            lottieView.bottomAnchor.constraint(equalTo: container.bottomAnchor),\n        ])\n\n        animationViews.setObject(lottieView, forKey: container)\n        return container\n    }\n\n    @objc public func loadAnimation(named name: String, into view: UIView, config: GraniteLottieLoadConfig) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n\n        // Cancel any existing load\n        cancelLoad(view: view)\n\n        // Try to load from bundle\n        if let animation = LottieAnimation.named(name) {\n            lottieView.animation = animation\n            applyConfig(config, to: lottieView)\n            notifyLoaded(for: view)\n\n            if config.autoPlay {\n                playAnimation(lottieView, view: view)\n            }\n        } else {\n            notifyFailure(for: view, error: \"Asset not found: \\(name)\")\n        }\n    }\n\n    @objc public func loadAnimation(json: String, into view: UIView, config: GraniteLottieLoadConfig) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n\n        // Cancel any existing load\n        cancelLoad(view: view)\n\n        if let data = json.data(using: .utf8) {\n            do {\n                let animation = try LottieAnimation.from(data: data)\n                lottieView.animation = animation\n                applyConfig(config, to: lottieView)\n                notifyLoaded(for: view)\n\n                if config.autoPlay {\n                    playAnimation(lottieView, view: view)\n                }\n            } catch {\n                notifyFailure(for: view, error: error.localizedDescription)\n            }\n        } else {\n            notifyFailure(for: view, error: \"Failed to parse JSON string\")\n        }\n    }\n\n    @objc public func loadAnimation(url: URL, into view: UIView, config: GraniteLottieLoadConfig) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n\n        // Cancel any existing load\n        cancelLoad(view: view)\n\n        let cacheKey = config.cacheComposition ? url.absoluteString : nil\n\n        LottieAnimation.loadedFrom(url: url, closure: { [weak self, weak lottieView, weak view] animation in\n            DispatchQueue.main.async {\n                guard let self = self, let lottieView = lottieView, let view = view else { return }\n\n                if let animation = animation {\n                    lottieView.animation = animation\n                    self.applyConfig(config, to: lottieView)\n                    self.notifyLoaded(for: view)\n\n                    if config.autoPlay {\n                        self.playAnimation(lottieView, view: view)\n                    }\n                } else {\n                    self.notifyFailure(for: view, error: \"Failed to load animation from URL\")\n                }\n            }\n        }, animationCache: cacheKey != nil ? LottieAnimationCache.shared : nil)\n    }\n\n    @objc public func loadDotLottie(uri: String, into view: UIView, config: GraniteLottieLoadConfig) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n\n        // Cancel any existing load\n        cancelLoad(view: view)\n\n        if let url = URL(string: uri) {\n            DotLottieFile.loadedFrom(url: url) { [weak self, weak lottieView, weak view] result in\n                DispatchQueue.main.async {\n                    guard let self = self, let lottieView = lottieView, let view = view else { return }\n\n                    switch result {\n                    case .success(let dotLottie):\n                        lottieView.loadAnimation(from: dotLottie)\n                        self.applyConfig(config, to: lottieView)\n                        self.notifyLoaded(for: view)\n\n                        if config.autoPlay {\n                            self.playAnimation(lottieView, view: view)\n                        }\n                    case .failure(let error):\n                        self.notifyFailure(for: view, error: error.localizedDescription)\n                    }\n                }\n            }\n        } else {\n            notifyFailure(for: view, error: \"Invalid .lottie URI: \\(uri)\")\n        }\n    }\n\n    @objc public func setDelegate(_ delegate: GraniteLottieDelegate?, for view: UIView) {\n        if let delegate = delegate {\n            delegates.setObject(delegate as AnyObject, forKey: view)\n        } else {\n            delegates.removeObject(forKey: view)\n        }\n    }\n\n    @objc public func play(view: UIView, startFrame: Int, endFrame: Int) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n\n        if startFrame >= 0 && endFrame > startFrame {\n            lottieView.play(fromFrame: AnimationFrameTime(startFrame),\n                           toFrame: AnimationFrameTime(endFrame),\n                           loopMode: lottieView.loopMode) { [weak self, weak view] finished in\n                guard let self = self, let view = view else { return }\n                // Only notify finish when not looping or when explicitly cancelled\n                if lottieView.loopMode != .loop || !finished {\n                    if let delegate = self.delegates.object(forKey: view) as? GraniteLottieDelegate {\n                        delegate.animationDidFinish?(isCancelled: !finished)\n                    }\n                }\n            }\n        } else {\n            // Play from beginning when no specific frames are provided\n            lottieView.currentProgress = 0\n            lottieView.play { [weak self, weak view] finished in\n                guard let self = self, let view = view, let lottieView = self.animationViews.object(forKey: view) else { return }\n                // Only notify finish when not looping or when explicitly cancelled\n                if lottieView.loopMode != .loop || !finished {\n                    if let delegate = self.delegates.object(forKey: view) as? GraniteLottieDelegate {\n                        delegate.animationDidFinish?(isCancelled: !finished)\n                    }\n                }\n            }\n        }\n    }\n\n    @objc public func pause(view: UIView) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n        lottieView.pause()\n    }\n\n    @objc public func resume(view: UIView) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n        lottieView.play()\n    }\n\n    @objc public func reset(view: UIView) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n        lottieView.stop()\n        lottieView.currentProgress = 0\n    }\n\n    @objc public func setProgress(_ progress: Float, for view: UIView) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n        lottieView.currentProgress = AnimationProgressTime(progress)\n    }\n\n    @objc public func setSpeed(_ speed: Double, for view: UIView) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n        lottieView.animationSpeed = CGFloat(speed)\n    }\n\n    @objc public func setLoop(_ loop: Bool, for view: UIView) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n        lottieView.loopMode = loop ? .loop : .playOnce\n    }\n\n    @objc public func applyColorFilters(_ filters: [GraniteLottieColorFilter], to view: UIView) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n\n        for filter in filters {\n            let keypath = filter.keypath == \"*\" ? \"**\" : filter.keypath\n            let colorValueProvider = ColorValueProvider(filter.color.lottieColorValue)\n            lottieView.setValueProvider(colorValueProvider, keypath: AnimationKeypath(keypath: \"\\(keypath).Color\"))\n        }\n    }\n\n    @objc public func applyTextFilters(_ filters: [GraniteLottieTextFilter], to view: UIView) {\n        guard let lottieView = animationViews.object(forKey: view) else { return }\n\n        let textProvider = GraniteLottieTextProvider(filters: filters)\n        lottieView.textProvider = textProvider\n    }\n\n    @objc public func cancelLoad(view: UIView) {\n        if let task = loadingTasks.object(forKey: view) {\n            task.cancel()\n            loadingTasks.removeObject(forKey: view)\n        }\n    }\n\n    // MARK: - Private Helpers\n\n    private func applyConfig(_ config: GraniteLottieLoadConfig, to lottieView: LottieAnimationView) {\n        lottieView.animationSpeed = CGFloat(config.speed)\n        lottieView.loopMode = config.loop ? .loop : .playOnce\n        lottieView.currentProgress = AnimationProgressTime(config.progress)\n\n        switch config.resizeMode {\n        case .cover:\n            lottieView.contentMode = .scaleAspectFill\n        case .contain:\n            lottieView.contentMode = .scaleAspectFit\n        case .center:\n            lottieView.contentMode = .center\n        @unknown default:\n            lottieView.contentMode = .scaleAspectFit\n        }\n    }\n\n    private func playAnimation(_ lottieView: LottieAnimationView, view: UIView) {\n        // Play with explicit loopMode to ensure it's respected\n        lottieView.play(fromProgress: 0, toProgress: 1, loopMode: lottieView.loopMode) { [weak self, weak view, weak lottieView] finished in\n            guard let view = view, let lottieView = lottieView else { return }\n            // Only notify finish when not looping or when explicitly cancelled\n            if lottieView.loopMode != .loop || !finished {\n                if let delegate = self?.delegates.object(forKey: view) as? GraniteLottieDelegate {\n                    delegate.animationDidFinish?(isCancelled: !finished)\n                }\n            }\n        }\n    }\n\n    private func notifyLoaded(for view: UIView) {\n        DispatchQueue.main.async { [weak self] in\n            if let delegate = self?.delegates.object(forKey: view) as? GraniteLottieDelegate {\n                delegate.animationDidLoad?()\n            }\n        }\n    }\n\n    private func notifyFailure(for view: UIView, error: String) {\n        DispatchQueue.main.async { [weak self] in\n            if let delegate = self?.delegates.object(forKey: view) as? GraniteLottieDelegate {\n                delegate.animationDidFail?(error: error)\n            }\n        }\n    }\n}\n\n// MARK: - UIColor Extension for Lottie\n\nextension UIColor {\n    var lottieColorValue: LottieColor {\n        var red: CGFloat = 0\n        var green: CGFloat = 0\n        var blue: CGFloat = 0\n        var alpha: CGFloat = 0\n        self.getRed(&red, green: &green, blue: &blue, alpha: &alpha)\n        return LottieColor(r: Double(red), g: Double(green), b: Double(blue), a: Double(alpha))\n    }\n}\n\n// MARK: - Custom Text Provider\n\nprivate class GraniteLottieTextProvider: AnimationKeypathTextProvider {\n    private let filters: [GraniteLottieTextFilter]\n\n    init(filters: [GraniteLottieTextFilter]) {\n        self.filters = filters\n    }\n\n    func text(for keypath: AnimationKeypath, sourceText: String) -> String? {\n        // AnimationKeypath.fullPath is internal, use keys property instead\n        let keypathString = keypath.keys.joined(separator: \".\")\n        for filter in filters {\n            if filter.keypath == \"*\" || keypathString.contains(filter.keypath) {\n                return filter.text\n            }\n        }\n        return nil\n    }\n}\n"
  },
  {
    "path": "packages/lottie/lottie.code-workspace",
    "content": "{\n  \"folders\": [\n    {\n      \"path\": \".\",\n    },\n  ],\n  \"settings\": {\n    \"eslint.useFlatConfig\": true,\n    \"eslint.nodePath\": \"../../.yarn/sdks\",\n    \"typescript.enablePromptUseWorkspaceTsdk\": true,\n    \"typescript.tsdk\": \"../../.yarn/sdks/typescript/lib\",\n    \"prettier.prettierPath\": \"../../.yarn/sdks/prettier/index.cjs\",\n    \"prettier.configPath\": \"../../.prettierrc\",\n    \"jest.rootPath\": \".\",\n    \"jest.jestCommandLine\": \"yarn jest\",\n    \"jest.enable\": false,\n  },\n}\n"
  },
  {
    "path": "packages/lottie/package.json",
    "content": "{\n  \"name\": \"@granite-js/lottie\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Pluggable Lottie animation component for React Native\",\n  \"type\": \"module\",\n  \"main\": \"./dist/module/index.js\",\n  \"types\": \"./dist/typescript/index.d.ts\",\n  \"react-native\": \"./src/index.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/typescript/index.d.ts\",\n      \"react-native\": \"./src/index.ts\",\n      \"default\": \"./dist/module/index.js\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"src\",\n    \"dist\",\n    \"android\",\n    \"ios\",\n    \"*.podspec\",\n    \"react-native.config.js\",\n    \"!ios/build\",\n    \"!android/build\",\n    \"!android/gradle\",\n    \"!android/gradlew\",\n    \"!android/gradlew.bat\",\n    \"!android/local.properties\",\n    \"!**/__tests__\",\n    \"!**/__fixtures__\",\n    \"!**/__mocks__\",\n    \"!**/.*\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"example\": \"yarn workspace @granite-js/lottie-example\",\n    \"clean\": \"del-cli android/build example/android/build example/android/app/build example/ios/build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"eslint .\",\n    \"build\": \"bob build && tsc --project tsconfig.build.json\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/lottie\"\n  },\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@react-native/babel-preset\": \"catalog:react-native\",\n    \"@types/react\": \"catalog:react-native\",\n    \"del-cli\": \"^6.0.0\",\n    \"eslint\": \"^9.7.0\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"react-native-builder-bob\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\"\n  },\n  \"peerDependencies\": {\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"react-native-builder-bob\": {\n    \"source\": \"src\",\n    \"output\": \"dist\",\n    \"targets\": [\n      [\n        \"module\",\n        {\n          \"esm\": true\n        }\n      ]\n    ]\n  },\n  \"codegenConfig\": {\n    \"name\": \"GraniteLottieViewSpec\",\n    \"type\": \"all\",\n    \"jsSrcsDir\": \"src\",\n    \"android\": {\n      \"javaPackageName\": \"run.granite.lottie\"\n    },\n    \"ios\": {\n      \"componentProvider\": {\n        \"GraniteLottieView\": \"GraniteLottieView\"\n      }\n    }\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/lottie/src/GraniteLottieView.tsx",
    "content": "import React, { forwardRef, useRef, useCallback, useMemo } from 'react';\nimport { Image, type NativeSyntheticEvent, Platform } from 'react-native';\nimport NativeGraniteLottieView, {\n  Commands,\n  OnAnimationFailureEvent,\n  OnAnimationFinishEvent,\n  type NativeProps,\n} from './GraniteLottieViewNativeComponent';\nimport type { LottieViewProps, LottieViewRef, AnimationSource, AnimationObject } from './types';\n\ntype NativeLottieViewInstance = React.ElementRef<typeof NativeGraniteLottieView>;\ntype NativeLottieViewHandle = NativeLottieViewInstance & LottieViewRef;\n\nfunction assignRef<T>(ref: React.ForwardedRef<T>, value: T | null) {\n  if (typeof ref === 'function') {\n    ref(value);\n    return;\n  }\n\n  if (ref != null) {\n    ref.current = value;\n  }\n}\n\nfunction attachImperativeMethods(instance: NativeLottieViewInstance): NativeLottieViewHandle {\n  const handle = instance as NativeLottieViewHandle;\n\n  handle.play = (startFrame?: number, endFrame?: number) => {\n    Commands.play(instance, startFrame ?? -1, endFrame ?? -1);\n  };\n  handle.pause = () => {\n    Commands.pause(instance);\n  };\n  handle.resume = () => {\n    Commands.resume(instance);\n  };\n  handle.reset = () => {\n    Commands.reset(instance);\n  };\n\n  return handle;\n}\n\n// Helper to resolve animation source\nfunction resolveSource(source: AnimationSource): {\n  sourceName?: string;\n  sourceJson?: string;\n  sourceURL?: string;\n  sourceDotLottieURI?: string;\n} {\n  if (typeof source === 'number') {\n    // require() result - resolve to local asset\n    const resolved = Image.resolveAssetSource(source);\n    if (resolved?.uri) {\n      if (resolved.uri.endsWith('.lottie')) {\n        return { sourceDotLottieURI: resolved.uri };\n      }\n      return { sourceURL: resolved.uri };\n    }\n    return {};\n  }\n\n  if (typeof source === 'string') {\n    // String path or URL\n    if (source.startsWith('http://') || source.startsWith('https://')) {\n      if (source.endsWith('.lottie')) {\n        return { sourceDotLottieURI: source };\n      }\n      return { sourceURL: source };\n    }\n    // Local asset name\n    return { sourceName: source };\n  }\n\n  if (typeof source === 'object' && source !== null) {\n    if ('uri' in source) {\n      // { uri: string } format\n      const uri = source.uri;\n      if (uri.endsWith('.lottie')) {\n        return { sourceDotLottieURI: uri };\n      }\n      return { sourceURL: uri };\n    }\n    // AnimationObject - serialize to JSON\n    return { sourceJson: JSON.stringify(source as AnimationObject) };\n  }\n\n  return {};\n}\n\n/**\n * LottieView - Pluggable Lottie animation component for React Native\n */\nexport const LottieView = forwardRef<LottieViewRef, LottieViewProps>((props, ref) => {\n  const {\n    source,\n    style,\n    progress,\n    speed = 1,\n    duration,\n    loop = true,\n    autoPlay = false,\n    resizeMode = 'contain',\n    renderMode = 'AUTOMATIC',\n    colorFilters,\n    textFiltersIOS,\n    textFiltersAndroid,\n    enableMergePathsAndroidForKitKatAndAbove,\n    enableSafeModeAndroid,\n    hardwareAccelerationAndroid,\n    cacheComposition = true,\n    imageAssetsFolder,\n    onAnimationFinish,\n    onAnimationFailure,\n    onAnimationLoaded,\n    onAnimationLoop,\n    testID,\n    ...restProps\n  } = props;\n\n  const nativeRef = useRef<NativeLottieViewInstance>(null);\n\n  const handleRef = useCallback(\n    (instance: NativeLottieViewInstance | null) => {\n      nativeRef.current = instance;\n\n      if (instance == null) {\n        assignRef(ref, null);\n        return;\n      }\n\n      assignRef(ref, attachImperativeMethods(instance));\n    },\n    [ref]\n  );\n\n  // Resolve source\n  const resolvedSource = useMemo(() => resolveSource(source), [source]);\n  const resolvedSpeed = useMemo(() => {\n    const { sourceJson } = resolvedSource;\n    if (duration && sourceJson && (source as AnimationObject).fr) {\n      // reference: https://github.com/lottie-react-native/lottie-react-native/blob/a7a99137b6cd947a4b2881e3a8c2214b114015bc/packages/core/src/LottieView/index.tsx#L119-L124\n      return Math.round((((source as AnimationObject).op / (source as AnimationObject).fr) * 1000) / duration);\n    }\n    return speed;\n  }, [duration, resolvedSource, source, speed]);\n\n  // Event handlers\n  const handleAnimationFinish = useCallback(\n    (event: NativeSyntheticEvent<OnAnimationFinishEvent>) => {\n      onAnimationFinish?.(event.nativeEvent.isCancelled);\n    },\n    [onAnimationFinish]\n  );\n\n  const handleAnimationFailure = useCallback(\n    (event: NativeSyntheticEvent<OnAnimationFailureEvent>) => {\n      onAnimationFailure?.(event.nativeEvent.error);\n    },\n    [onAnimationFailure]\n  );\n\n  const handleAnimationLoaded = useCallback(() => {\n    onAnimationLoaded?.();\n  }, [onAnimationLoaded]);\n\n  const handleAnimationLoop = useCallback(() => {\n    onAnimationLoop?.();\n  }, [onAnimationLoop]);\n\n  // Build native props\n  const nativeProps: NativeProps = {\n    ...restProps,\n    style,\n    testID,\n    ...resolvedSource,\n    progress,\n    speed: resolvedSpeed,\n    loop,\n    autoPlay,\n    resizeMode,\n    renderMode,\n    colorFilters,\n    cacheComposition,\n    imageAssetsFolder,\n    onAnimationFinish: onAnimationFinish ? handleAnimationFinish : undefined,\n    onAnimationFailure: onAnimationFailure ? handleAnimationFailure : undefined,\n    onAnimationLoaded: onAnimationLoaded ? handleAnimationLoaded : undefined,\n    onAnimationLoop: onAnimationLoop ? handleAnimationLoop : undefined,\n  };\n\n  // Platform-specific props\n  if (Platform.OS === 'android') {\n    nativeProps.textFiltersAndroid = textFiltersAndroid;\n    nativeProps.enableMergePathsAndroidForKitKatAndAbove = enableMergePathsAndroidForKitKatAndAbove;\n    nativeProps.enableSafeModeAndroid = enableSafeModeAndroid;\n    nativeProps.hardwareAccelerationAndroid = hardwareAccelerationAndroid;\n  } else if (Platform.OS === 'ios') {\n    nativeProps.textFiltersIOS = textFiltersIOS;\n  }\n\n  return <NativeGraniteLottieView ref={handleRef} {...nativeProps} />;\n});\n\nLottieView.displayName = 'LottieView';\n"
  },
  {
    "path": "packages/lottie/src/GraniteLottieViewNativeComponent.ts",
    "content": "import { type ViewProps, type HostComponent, codegenNativeCommands, codegenNativeComponent } from 'react-native';\nimport {\n  type Int32,\n  type Float,\n  type Double,\n  type DirectEventHandler,\n  type WithDefault,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\n// Color filter type for native\ninterface ColorFilterNative {\n  keypath: string;\n  color: string;\n}\n\n// Text filter for iOS\ninterface TextFilterIOSNative {\n  keypath: string;\n  text: string;\n}\n\n// Text filter for Android\ninterface TextFilterAndroidNative {\n  find: string;\n  replace: string;\n}\n\nexport type OnAnimationFinishEvent = Readonly<{\n  isCancelled: boolean;\n}>;\n\nexport type OnAnimationFailureEvent = Readonly<{\n  error: string;\n}>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type OnAnimationLoadedEvent = Readonly<{}>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type OnAnimationLoopEvent = Readonly<{}>;\n\nexport interface NativeProps extends ViewProps {\n  // Animation source\n  sourceName?: string;\n  sourceJson?: string;\n  sourceURL?: string;\n  sourceDotLottieURI?: string;\n\n  // Animation control\n  progress?: Float;\n  speed?: Double;\n  duration?: Double;\n  loop?: WithDefault<boolean, true>;\n  autoPlay?: WithDefault<boolean, false>;\n\n  // Layout & Rendering\n  resizeMode?: WithDefault<string, 'contain'>;\n  renderMode?: WithDefault<string, 'AUTOMATIC'>;\n  imageAssetsFolder?: string;\n\n  // Platform-specific (Android)\n  enableMergePathsAndroidForKitKatAndAbove?: boolean;\n  enableSafeModeAndroid?: boolean;\n  hardwareAccelerationAndroid?: boolean;\n  cacheComposition?: WithDefault<boolean, true>;\n\n  // Filters\n  colorFilters?: ReadonlyArray<ColorFilterNative>;\n  textFiltersIOS?: ReadonlyArray<TextFilterIOSNative>;\n  textFiltersAndroid?: ReadonlyArray<TextFilterAndroidNative>;\n\n  // Events\n  onAnimationFinish?: DirectEventHandler<OnAnimationFinishEvent>;\n  onAnimationFailure?: DirectEventHandler<OnAnimationFailureEvent>;\n  onAnimationLoaded?: DirectEventHandler<OnAnimationLoadedEvent>;\n  onAnimationLoop?: DirectEventHandler<OnAnimationLoopEvent>;\n}\n\nexport interface NativeCommands {\n  play: (viewRef: React.ElementRef<HostComponent<NativeProps>>, startFrame: Int32, endFrame: Int32) => void;\n  pause: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;\n  resume: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;\n  reset: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({\n  supportedCommands: ['play', 'pause', 'resume', 'reset'],\n});\n\nexport default codegenNativeComponent<NativeProps>('GraniteLottieView') as HostComponent<NativeProps>;\n"
  },
  {
    "path": "packages/lottie/src/index.ts",
    "content": "import { LottieView } from './GraniteLottieView';\nexport { LottieView };\nexport default LottieView;\nexport * from './types';\nexport type { OnAnimationFailureEvent, OnAnimationFinishEvent } from './GraniteLottieViewNativeComponent';"
  },
  {
    "path": "packages/lottie/src/types.ts",
    "content": "import type { ViewStyle, StyleProp, ViewProps } from 'react-native';\n\n/**\n * Represents a serialized animation generated from After Effects\n */\nexport interface AnimationObject {\n  v: string;\n  fr: number;\n  ip: number;\n  op: number;\n  w: number;\n  h: number;\n  nm?: string;\n  ddd?: number;\n  assets: unknown[];\n  layers: unknown[];\n  markers?: unknown[];\n}\n\n/**\n * Color filter for changing layer colors\n */\nexport interface ColorFilter {\n  keypath: string;\n  color: string;\n}\n\n/**\n * Text filter for iOS (KeyPath-based)\n */\nexport interface TextFilterIOS {\n  keypath: string;\n  text: string;\n}\n\n/**\n * Text filter for Android (find-and-replace)\n */\nexport interface TextFilterAndroid {\n  find: string;\n  replace: string;\n}\n\n/**\n * Resize modes for the animation view\n */\nexport type ResizeMode = 'cover' | 'contain' | 'center';\n\n/**\n * Render modes for Android hardware acceleration\n */\nexport type RenderMode = 'AUTOMATIC' | 'HARDWARE' | 'SOFTWARE';\n\n/**\n * Animation source - can be a local asset, remote URL, or JSON object\n */\nexport type AnimationSource = string | AnimationObject | { uri: string } | number; // require() returns number\n\n/**\n * Callback when animation finishes\n */\nexport interface AnimationFinishEvent {\n  isCancelled: boolean;\n}\n\n/**\n * Callback when animation fails to load\n */\nexport interface AnimationFailureEvent {\n  error: string;\n}\n\n/**\n * Props for LottieView component\n */\nexport interface LottieViewProps extends ViewProps {\n  /**\n   * Animation source - required\n   * Can be a local asset path, remote URL, JSON object, or require() result\n   */\n  source: AnimationSource;\n\n  /**\n   * Style for the view\n   */\n  style?: StyleProp<ViewStyle>;\n\n  /**\n   * Normalized progress value (0-1)\n   */\n  progress?: number;\n\n  /**\n   * Animation playback speed\n   * @default 1\n   */\n  speed?: number;\n\n  /**\n   * Animation duration in milliseconds (overrides source duration)\n   */\n  duration?: number;\n\n  /**\n   * Whether the animation should loop\n   * @default true\n   */\n  loop?: boolean;\n\n  /**\n   * Whether the animation should auto-play on mount\n   * @default false\n   */\n  autoPlay?: boolean;\n\n  /**\n   * Resize mode for the animation\n   * @default 'contain'\n   */\n  resizeMode?: ResizeMode;\n\n  /**\n   * Render mode for Android hardware acceleration\n   * @default 'AUTOMATIC'\n   * @platform android\n   */\n  renderMode?: RenderMode;\n\n  /**\n   * Array of color filters to apply to animation layers\n   */\n  colorFilters?: ColorFilter[];\n\n  /**\n   * Text filters for iOS (KeyPath-based replacement)\n   * @platform ios\n   */\n  textFiltersIOS?: TextFilterIOS[];\n\n  /**\n   * Text filters for Android (find-and-replace)\n   * @platform android\n   */\n  textFiltersAndroid?: TextFilterAndroid[];\n\n  /**\n   * Enable merge paths for Android (KitKat and above)\n   * @platform android\n   */\n  enableMergePathsAndroidForKitKatAndAbove?: boolean;\n\n  /**\n   * Enable safe mode for Android (catches exceptions)\n   * @platform android\n   */\n  enableSafeModeAndroid?: boolean;\n\n  /**\n   * Enable hardware acceleration on Android\n   * @platform android\n   */\n  hardwareAccelerationAndroid?: boolean;\n\n  /**\n   * Whether to cache the composition\n   * @default true\n   */\n  cacheComposition?: boolean;\n\n  /**\n   * Folder for image assets\n   * @platform android\n   */\n  imageAssetsFolder?: string;\n\n  /**\n   * Callback when animation finishes\n   */\n  onAnimationFinish?: (isCancelled: boolean) => void;\n\n  /**\n   * Callback when animation fails to load\n   */\n  onAnimationFailure?: (error: string) => void;\n\n  /**\n   * Callback when animation is loaded\n   */\n  onAnimationLoaded?: () => void;\n\n  /**\n   * Callback when animation loops\n   */\n  onAnimationLoop?: () => void;\n\n  /**\n   * Test ID for E2E testing\n   */\n  testID?: string;\n}\n\n/**\n * Imperative handle for LottieView\n */\nexport interface LottieViewRef {\n  /**\n   * Play the animation\n   * @param startFrame Optional start frame\n   * @param endFrame Optional end frame\n   */\n  play: (startFrame?: number, endFrame?: number) => void;\n\n  /**\n   * Pause the animation\n   */\n  pause: () => void;\n\n  /**\n   * Resume a paused animation\n   */\n  resume: () => void;\n\n  /**\n   * Reset the animation to initial state\n   */\n  reset: () => void;\n}\n"
  },
  {
    "path": "packages/lottie/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"declarationDir\": \"dist/typescript\",\n    \"emitDeclarationOnly\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/lottie/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/mpack/.scripts/copy-vendors-dts.mjs",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport glob from 'fast-glob';\n\nconst ROOT = path.resolve(import.meta.dirname, '..');\n\nconst files = await glob(`src/vendors/**/*.d.ts`, {\n  cwd: ROOT,\n  ignore: ['**/*.{spec,test,stories}.*', '**/fixtures/**', '**/__snapshots__/**', '**/__storybook__/**'],\n});\n\nconsole.log('👉 Copying vendors `d.ts` files...');\nconsole.log(files);\n\nawait Promise.all(files.map((path) => fs.copyFile(path, path.replace(/^src/, 'dist'))));\n"
  },
  {
    "path": "packages/mpack/.ts-prunerc.json",
    "content": "{\n  \"error\": true,\n  \"ignore\": \"(^src/index.ts|^src/vendors|^src/testing)\"\n}\n"
  },
  {
    "path": "packages/mpack/CHANGELOG.md",
    "content": "# @granite-js/mpack\n\n## 1.0.23\n\n### Patch Changes\n\n- 63217da: fix(mpack): support deep and filter params in require.context(), isolate require context\n  - @granite-js/plugin-core@1.0.23\n  - @granite-js/utils@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.22\n- @granite-js/utils@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.21\n- @granite-js/utils@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.20\n- @granite-js/utils@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.19\n- @granite-js/utils@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.18\n- @granite-js/utils@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.17\n- @granite-js/utils@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.16\n- @granite-js/utils@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.15\n- @granite-js/utils@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.14\n- @granite-js/utils@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.13\n- @granite-js/utils@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.12\n- @granite-js/utils@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.11\n- @granite-js/utils@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.10\n- @granite-js/utils@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.9\n- @granite-js/utils@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.8\n- @granite-js/utils@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.7\n- @granite-js/utils@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.6\n- @granite-js/utils@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.5\n- @granite-js/utils@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.4\n- @granite-js/utils@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/plugin-core@1.0.3\n  - @granite-js/utils@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- d4beb3b: expose context to dynamic config plugin\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [d4beb3b]\n- Updated dependencies [b325495]\n  - @granite-js/plugin-core@1.0.2\n  - @granite-js/utils@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.1\n- @granite-js/utils@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/plugin-core@1.0.0\n  - @granite-js/utils@1.0.0\n"
  },
  {
    "path": "packages/mpack/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/mpack/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/mpack\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@babel/code-frame**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n2. **@babel/core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n3. **@babel/generator**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n4. **@babel/parser**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n5. **@babel/plugin-proposal-class-properties**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n6. **@babel/plugin-proposal-private-methods**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n7. **@babel/plugin-proposal-private-property-in-object**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n8. **@babel/plugin-syntax-typescript**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n9. **@babel/plugin-transform-flow-strip-types**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n10. **@babel/preset-env**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n11. **@babel/preset-react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n12. **@babel/preset-typescript**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n13. **@babel/runtime**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n14. **@babel/template**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n15. **@babel/traverse**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n16. **@babel/types**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n17. **@fastify/middie**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/fastify/middie.git\n\t\n18. **@react-native-community/cli-plugin-metro**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/react-native-community/cli.git\n\t\n19. **@react-native-community/cli-server-api**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/react-native-community/cli.git\n\t\n20. **@react-native-community/cli-tools**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/react-native-community/cli.git\n\t\n21. **@react-native/babel-plugin-codegen**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/react-native.git\n\t\n22. **@react-native/babel-preset**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+ssh://git@github.com/facebook/react-native.git\n\t\n23. **@react-native/dev-middleware**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/react-native.git\n\t\n24. **@shopify/semaphore**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/Shopify/quilt.git\n\t\n25. **@types/accepts**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n26. **@types/async**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n27. **@types/babel__code-frame**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n28. **@types/babel__core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n29. **@types/babel__generator**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n30. **@types/babel__template**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n31. **@types/babel__traverse**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n32. **@types/connect**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n33. **@types/debug**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n34. **@types/denodeify**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n35. **@types/eslint**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n36. **@types/events**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n37. **@types/graceful-fs**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n38. **@types/invariant**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n39. **@types/lodash.throttle**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n40. **@types/mime-types**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n41. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n42. **@types/path-browserify**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n43. **@types/pnpapi**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n44. **@types/prompts**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n45. **@types/temp**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n46. **@types/ws**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n47. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n48. **absolute-path**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/filearts/node-absolute-path\n\t\n49. **accepts**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/jshttp/accepts.git\n\t\n50. **assert**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/browserify/commonjs-assert.git\n\t\n51. **async**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/caolan/async.git\n\t\n52. **babel-plugin-syntax-hermes-parser**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/hermes.git\n\t\n53. **babel-preset-fbjs**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/fbjs.git\n\t\n54. **browserify-zlib**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/devongovett/browserify-zlib.git\n\t\n55. **buffer**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/feross/buffer.git\n\t\n56. **chalk**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/chalk/chalk.git\n\t\n57. **ci-info**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/watson/ci-info.git\n\t\n58. **connect**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/senchalabs/connect.git\n\t\n59. **cosmiconfig**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/davidtheclark/cosmiconfig.git\n\t\n60. **debug**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/debug-js/debug.git\n\t\n61. **denodeify**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/matthew-andrews/denodeify.git\n\t\n62. **enhanced-resolve**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/webpack/enhanced-resolve.git\n\t\n63. **error-stack-parser**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/stacktracejs/error-stack-parser.git\n\t\n64. **es-toolkit**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/toss/es-toolkit.git\n\t\n65. **esbuild**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/evanw/esbuild.git\n\t\n66. **eslint**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/eslint/eslint.git\n\t\n67. **events**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/Gozala/events.git\n\t\n68. **execa**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/sindresorhus/execa.git\n\t\n69. **fast-glob**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/mrmlnc/fast-glob.git\n\t\n70. **fastify**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/fastify/fastify.git\n\t\n71. **fastify-plugin**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/fastify/fastify-plugin.git\n\t\n72. **flow-remove-types**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/flow.git\n\t\n73. **frogress-bar**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/leegeunhyeok/frogress-bar#readme\n\t\n74. **fs-extra**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/jprichardson/node-fs-extra\n\t\n75. **hermes-parser**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/hermes.git\n\t\n76. **https-browserify**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/substack/https-browserify.git\n\t\n77. **image-size**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/image-size/image-size.git\n\t\n78. **invariant**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/zertosh/invariant\n\t\n79. **jest-validate**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/jest.git\n\t\n80. **jest-worker**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/jest.git\n\t\n81. **lodash.throttle**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/lodash/lodash.git\n\t\n82. **metro-babel-transformer**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n83. **metro-cache**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n84. **metro-cache-key**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n85. **metro-file-map**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n86. **metro-hermes-compiler**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n87. **metro-inspector-proxy**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n88. **metro-minify-uglify**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n89. **metro-react-native-babel-preset**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n90. **metro-react-native-babel-transformer**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n91. **metro-resolver**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n92. **metro-runtime**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n93. **metro-source-map**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n94. **metro-symbolicate**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n95. **metro-transform-plugins**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/metro.git\n\t\n96. **mime-types**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/jshttp/mime-types.git\n\t\n97. **node-fetch**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/bitinn/node-fetch.git\n\t\n98. **nullthrows**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/zertosh/nullthrows\n\t\n99. **oxc-transform**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/oxc-project/oxc.git\n\t\n100. **path-browserify**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/browserify/path-browserify.git\n\t\n101. **prettier-2**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/prettier/prettier.git\n\t\n102. **serialize-error**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/sindresorhus/serialize-error.git\n\t\n103. **stream-browserify**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/browserify/stream-browserify.git\n\t\n104. **stream-http**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/jhiesey/stream-http.git\n\t\n105. **strip-ansi**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/chalk/strip-ansi.git\n\t\n106. **sucrase**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/alangpierce/sucrase.git\n\t\n107. **temp**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/bruce/node-temp.git\n\t\n108. **throat**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/ForbesLindesay/throat.git\n\t\n109. **ts-prune**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:nadeesha/ts-prune.git\n\t\n110. **tsup**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/egoist/tsup.git\n\t\n111. **url**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/defunctzombie/node-url.git\n\t\n112. **util**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git://github.com/browserify/node-util\n\t\n113. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n114. **ws**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/websockets/ws.git\n\t\n115. **yargs**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/yargs/yargs.git\n\t\n116. **zod**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/colinhacks/zod.git\n\t\n117. **@swc/core**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: git+https://github.com/swc-project/swc.git\n\t\n118. **@swc/helpers**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: git+https://github.com/swc-project/swc.git\n\t\n119. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n120. **graceful-fs**\n\t\n   - License: ISC\n   - License Text: https://opensource.org/licenses/ISC\n   - Repository: https://github.com/isaacs/node-graceful-fs\n\t\n121. **rimraf**\n\t\n   - License: ISC\n   - License Text: https://opensource.org/licenses/ISC\n   - Repository: git://github.com/isaacs/rimraf.git\n\t\n122. **source-map**\n\t\n   - License: BSD-3-Clause\n   - License Text: https://opensource.org/licenses/BSD-3-Clause\n   - Repository: http://github.com/mozilla/source-map.git\n\t\n123. **metro**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/metro\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/mpack/README.md",
    "content": "# @granite-js/mpack\n\nA bundler for Granite apps\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/mpack/internal.d.ts",
    "content": "export * from './dist/internal';\n"
  },
  {
    "path": "packages/mpack/mpack.code-workspace",
    "content": "{\n  \"folders\": [\n    {\n      \"path\": \".\",\n    },\n  ],\n  \"settings\": {\n    \"eslint.useFlatConfig\": true,\n    \"eslint.nodePath\": \"../../.yarn/sdks\",\n    \"typescript.enablePromptUseWorkspaceTsdk\": true,\n    \"typescript.tsdk\": \"../../.yarn/sdks/typescript/lib\",\n    \"prettier.prettierPath\": \"../../.yarn/sdks/prettier/index.cjs\",\n    \"prettier.configPath\": \"../../.prettierrc\",\n    \"jest.rootPath\": \".\",\n    \"jest.jestCommandLine\": \"yarn jest\",\n    \"jest.enable\": false,\n  },\n}\n"
  },
  {
    "path": "packages/mpack/package.json",
    "content": "{\n  \"name\": \"@granite-js/mpack\",\n  \"version\": \"1.0.23\",\n  \"description\": \"A bundler for Granite apps\",\n  \"main\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/mpack\"\n  },\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.ts\",\n      \"default\": \"./dist/index.js\"\n    },\n    \"./experimental\": {\n      \"types\": \"./dist/experimental/index.d.ts\",\n      \"default\": \"./dist/experimental/index.js\"\n    },\n    \"./plugins\": {\n      \"types\": \"./dist/plugins/index.d.ts\",\n      \"default\": \"./dist/plugins/index.js\"\n    },\n    \"./vendors\": {\n      \"types\": \"./dist/vendors/index.d.ts\",\n      \"default\": \"./dist/vendors/index.js\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\",\n    \"*.d.ts\",\n    \"!**/testing\",\n    \"!**/__tests__\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"build\": \"tsup && tsc -p tsconfig.build.json && node .scripts/copy-vendors-dts.mjs\",\n    \"lint\": \"eslint .\",\n    \"find-deadcode\": \"ts-prune\",\n    \"test:no-parallel\": \"vitest --no-watch --no-file-parallelism --coverage\"\n  },\n  \"devDependencies\": {\n    \"@types/accepts\": \"^1\",\n    \"@types/async\": \"^3\",\n    \"@types/babel__code-frame\": \"^7\",\n    \"@types/babel__core\": \"^7\",\n    \"@types/babel__generator\": \"^7\",\n    \"@types/babel__template\": \"^7\",\n    \"@types/babel__traverse\": \"^7\",\n    \"@types/connect\": \"^3\",\n    \"@types/debug\": \"^4.1.12\",\n    \"@types/denodeify\": \"^1\",\n    \"@types/eslint\": \"^9\",\n    \"@types/events\": \"^3\",\n    \"@types/graceful-fs\": \"^4\",\n    \"@types/invariant\": \"^2\",\n    \"@types/lodash.throttle\": \"^4\",\n    \"@types/mime-types\": \"^2\",\n    \"@types/node\": \"catalog:tools\",\n    \"@types/path-browserify\": \"^1\",\n    \"@types/pnpapi\": \"^0\",\n    \"@types/prompts\": \"^2\",\n    \"@types/temp\": \"^0\",\n    \"@types/ws\": \"^8\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"eslint\": \"9.7.0\",\n    \"execa\": \"^5.0.0\",\n    \"fast-glob\": \"^3.3.2\",\n    \"prettier-2\": \"npm:prettier@^2\",\n    \"ts-prune\": \"^0.10.3\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\"\n  },\n  \"dependencies\": {\n    \"@babel/code-frame\": \"7.27.1\",\n    \"@babel/core\": \"7.28.5\",\n    \"@babel/generator\": \"7.28.5\",\n    \"@babel/parser\": \"7.28.5\",\n    \"@babel/plugin-proposal-class-properties\": \"7.18.6\",\n    \"@babel/plugin-proposal-private-methods\": \"7.18.6\",\n    \"@babel/plugin-proposal-private-property-in-object\": \"7.21.11\",\n    \"@babel/plugin-syntax-typescript\": \"^7.27.1\",\n    \"@babel/plugin-transform-flow-strip-types\": \"catalog:react-native\",\n    \"@babel/preset-env\": \"7.28.5\",\n    \"@babel/preset-react\": \"7.28.5\",\n    \"@babel/preset-typescript\": \"7.28.5\",\n    \"@babel/runtime\": \"7.28.4\",\n    \"@babel/template\": \"7.27.2\",\n    \"@babel/traverse\": \"7.28.5\",\n    \"@babel/types\": \"7.28.5\",\n    \"@fastify/middie\": \"8.3.0\",\n    \"@granite-js/plugin-core\": \"workspace:*\",\n    \"@granite-js/utils\": \"workspace:*\",\n    \"@react-native-community/cli-plugin-metro\": \"11.3.7\",\n    \"@react-native-community/cli-server-api\": \"11.3.7\",\n    \"@react-native-community/cli-tools\": \"11.3.7\",\n    \"@react-native/babel-plugin-codegen\": \"catalog:react-native\",\n    \"@react-native/babel-preset\": \"catalog:react-native\",\n    \"@react-native/dev-middleware\": \"catalog:react-native\",\n    \"@shopify/semaphore\": \"^3.1.0\",\n    \"@swc/core\": \"catalog:swc\",\n    \"@swc/helpers\": \"catalog:swc\",\n    \"absolute-path\": \"^0.0.0\",\n    \"accepts\": \"^1.3.7\",\n    \"assert\": \"2.1.0\",\n    \"async\": \"^3.2.2\",\n    \"babel-plugin-syntax-hermes-parser\": \"^0.31.0\",\n    \"babel-preset-fbjs\": \"^3.4.0\",\n    \"browserify-zlib\": \"0.2.0\",\n    \"buffer\": \"6.0.3\",\n    \"chalk\": \"^4\",\n    \"ci-info\": \"^2.0.0\",\n    \"connect\": \"^3.7.0\",\n    \"cosmiconfig\": \"^7.0.0\",\n    \"debug\": \"^4.3.7\",\n    \"denodeify\": \"^1.2.1\",\n    \"enhanced-resolve\": \"^5.17.1\",\n    \"error-stack-parser\": \"^2.0.6\",\n    \"es-toolkit\": \"^1.39.8\",\n    \"esbuild\": \"0.25.8\",\n    \"events\": \"3.3.0\",\n    \"fastify\": \"4.14.0\",\n    \"fastify-plugin\": \"4.5.1\",\n    \"flow-remove-types\": \"^2.279.0\",\n    \"frogress-bar\": \"^0.1.0\",\n    \"fs-extra\": \"^1.0.0\",\n    \"graceful-fs\": \"^4.2.4\",\n    \"hermes-parser\": \"0.31.2\",\n    \"https-browserify\": \"1.0.0\",\n    \"image-size\": \"^0.6.0\",\n    \"invariant\": \"^2.2.4\",\n    \"jest-validate\": \"^26.5.2\",\n    \"jest-worker\": \"^27.2.0\",\n    \"lodash.throttle\": \"^4.1.1\",\n    \"metro-babel-transformer\": \"0.72.3\",\n    \"metro-cache\": \"0.72.3\",\n    \"metro-cache-key\": \"0.72.3\",\n    \"metro-file-map\": \"0.72.3\",\n    \"metro-hermes-compiler\": \"0.72.3\",\n    \"metro-inspector-proxy\": \"0.72.3\",\n    \"metro-minify-uglify\": \"0.72.3\",\n    \"metro-react-native-babel-preset\": \"0.72.3\",\n    \"metro-react-native-babel-transformer\": \"0.76.8\",\n    \"metro-resolver\": \"0.72.3\",\n    \"metro-runtime\": \"0.72.3\",\n    \"metro-source-map\": \"0.72.3\",\n    \"metro-symbolicate\": \"0.72.3\",\n    \"metro-transform-plugins\": \"0.72.3\",\n    \"mime-types\": \"^2.1.27\",\n    \"node-fetch\": \"^2.2.0\",\n    \"nullthrows\": \"^1.1.1\",\n    \"oxc-transform\": \"^0.82.1\",\n    \"path-browserify\": \"1.0.1\",\n    \"rimraf\": \"^2.5.4\",\n    \"serialize-error\": \"^2.1.0\",\n    \"source-map\": \"^0.7.4\",\n    \"stream-browserify\": \"3.0.0\",\n    \"stream-http\": \"3.2.0\",\n    \"strip-ansi\": \"^6.0.0\",\n    \"sucrase\": \"^3.35.0\",\n    \"temp\": \"0.8.3\",\n    \"throat\": \"^5.0.0\",\n    \"tsup\": \"^8.5.0\",\n    \"url\": \"0.11.0\",\n    \"util\": \"0.12.5\",\n    \"ws\": \"^8.18.0\",\n    \"yargs\": \"^15.3.1\",\n    \"zod\": \"3.24.4\"\n  }\n}\n"
  },
  {
    "path": "packages/mpack/plugins.d.ts",
    "content": "export * from './dist/plugins';\n"
  },
  {
    "path": "packages/mpack/src/bundler/Bundler.ts",
    "content": "import * as path from 'path';\nimport type { BuildResult } from '@granite-js/plugin-core';\nimport { isNotNil } from 'es-toolkit';\nimport * as esbuild from 'esbuild';\nimport { PluginDriver } from './PluginDriver';\nimport { buildStatusPlugin, resolvePlugin, requireContextPlugin, transformPlugin } from './plugins';\nimport {\n  SOURCE_EXTENSIONS,\n  ASSET_EXTENSIONS,\n  RESOLVER_MAIN_FIELDS,\n  RESOLVER_EXPORTS_MAP_CONDITIONS,\n} from '../constants';\nimport { logger } from '../logger';\nimport { BundlerConfig, INTERNAL__Id } from '../types';\nimport { Plugin } from '../types/Plugin';\nimport { getId } from '../utils/getId';\nimport { PromiseHandler } from '../utils/promise';\nimport { combineWithBaseBuildConfig } from './internal/presets';\nimport { cleanup } from '../utils/progressBar';\n\ntype BundlerStatus = 'idle' | 'prepared' | 'building';\n\nexport class Bundler {\n  private id: INTERNAL__Id;\n  private revisionId = 0;\n  private status: BundlerStatus = 'idle';\n  private pluginDriver: PluginDriver;\n  private esbuildContext: esbuild.BuildContext | null = null;\n  private bundleTask: PromiseHandler<BuildResult> | null = null;\n\n  constructor(private config: BundlerConfig) {\n    this.setupUncaughtExceptionHandler();\n\n    const id = getId(config);\n\n    this.id = id;\n    this.pluginDriver = new PluginDriver(id);\n    this.config.buildConfig.entry = path.resolve(this.config.rootDir, this.config.buildConfig.entry);\n    this.config.buildConfig.outfile = path.resolve(this.config.rootDir, this.config.buildConfig.outfile);\n    this.config.buildConfig = combineWithBaseBuildConfig(this.config, {\n      rootDir: this.config.rootDir,\n      dev: this.config.dev,\n    });\n\n    logger.debug('Bundler.constructor', { id, config });\n  }\n\n  async build(options?: { withDispose?: boolean }) {\n    const { withDispose = true } = options ?? {};\n\n    if (this.esbuildContext == null) {\n      this.esbuildContext = await esbuild.context(this.getBaseBuildOptions());\n    }\n\n    if (this.status === 'prepared' || this.status === 'building') {\n      this.bundleTask?.abort();\n    }\n\n    this.bundleTask = new PromiseHandler(this.revisionId++);\n    this.esbuildContext.rebuild();\n    this.status = 'prepared';\n\n    const result = await this.bundleTask.wait();\n    await (withDispose && this.esbuildContext.dispose());\n\n    return result;\n  }\n\n  getId() {\n    return this.id;\n  }\n\n  addPlugin(plugin: Plugin) {\n    this.pluginDriver.addPlugin(plugin);\n    return this;\n  }\n\n  private setupUncaughtExceptionHandler() {\n    if (process.hasUncaughtExceptionCaptureCallback()) {\n      return;\n    }\n\n    process.setUncaughtExceptionCaptureCallback((error) => {\n      cleanup();\n      logger.error(`Uncaught exception occurred\\n\\n${error.stack ?? error.message}`);\n      process.exit(1);\n    });\n  }\n\n  private getBaseBuildOptions(): esbuild.BuildOptions {\n    const { rootDir, metafile, buildConfig } = this.config;\n    const { platform, entry, outfile = 'bundle.js', esbuild = {} } = buildConfig;\n    const { prelude: _, ...esbuildOptions } = esbuild;\n\n    const platforms = [platform, 'native', 'react-native'] as const;\n    const supportedExtensions = [...SOURCE_EXTENSIONS, ...ASSET_EXTENSIONS];\n    const pluginContext = { id: this.id, config: this.config };\n\n    /**\n     * 모듈 resolution 시 아래와 같은 순서로 처리하기 위한 구성 (.ts 기준)\n     *\n     * - (1) .{platform}.ts\n     * - (2) .native.ts\n     * - (3) .react-native.ts\n     * - (4) .ts\n     */\n    const resolveExtensions = [\n      ...platforms.map((platform) => supportedExtensions.map((ext) => `.${platform}${ext}` as const)),\n      ...supportedExtensions,\n    ].flat();\n\n    this.setupEnvironment();\n\n    return {\n      entryPoints: [path.resolve(rootDir, entry)],\n      outfile: path.resolve(rootDir, outfile),\n      sourcemap: true,\n      sourcesContent: true,\n      bundle: true,\n      resolveExtensions,\n      mainFields: RESOLVER_MAIN_FIELDS,\n      conditions: RESOLVER_EXPORTS_MAP_CONDITIONS,\n      target: 'hermes0.11',\n      format: 'iife',\n      loader: {\n        /**\n         * 토스에서는 에셋을 로컬에서 로드하지 않고 Remote 에서\n         * 로드하기 때문에 empty loader 를 사용하여 에셋을 번들링 결과에서 제외\n         *\n         * @see docs {@link https://esbuild.github.io/content-types/#empty-file}\n         */\n        ...Object.fromEntries(ASSET_EXTENSIONS.map((ext) => [ext, 'empty'])),\n      },\n      supported: {\n        'const-and-let': false,\n      },\n      legalComments: 'none',\n      jsx: 'automatic',\n      logLevel: 'silent',\n      ...esbuildOptions,\n      /**\n       * 번들 결과를 파일 시스템에 저장하지 않고 메모리 내에 들고 처리하기 위해 false 로 지정\n       *\n       * - 빌드: 메모리의 있는 번들 직접 File System에 쓰기\n       * - 개발 서버: 메모리에서 번들 로드\n       *\n       * @see {@link https://esbuild.github.io/api/#write}\n       * @see {handleEnd}\n       */\n      write: false,\n      metafile,\n      plugins: [\n        buildStatusPlugin({\n          context: pluginContext,\n          onPrepare: () => this.handlePrepare(),\n          onStart: () => this.handleStart(),\n          onLoad: (moduleCount) => this.handleLoad(moduleCount),\n          onEnd: (buildResult) => this.handleEnd(buildResult),\n        }),\n        resolvePlugin({ context: pluginContext }),\n        requireContextPlugin(),\n        transformPlugin({\n          context: pluginContext,\n          transformSync: buildConfig.transformer?.transformSync,\n          transformAsync: buildConfig.transformer?.transformAsync,\n        }),\n        ...(esbuildOptions?.plugins ?? []),\n      ].filter(isNotNil),\n    };\n  }\n\n  private setupEnvironment() {\n    const envString = (this.config.dev ?? true) ? 'development' : 'production';\n\n    /**\n     * babel 플러그인에서 환경변수 값을 참조하고 있기에 값을 지정해주어야 함\n     * (reanimated 등 env 에 영향을 받는 경우가 있음)\n     *\n     * @see {@link https://github.com/babel/babel/blob/v7.23.0/packages/babel-core/src/config/helpers/environment.ts#L2}\n     */\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    process.env.NODE_ENV = envString;\n    process.env.BABEL_ENV = envString;\n  }\n\n  private handlePrepare() {\n    this.status = 'prepared';\n    this.pluginDriver.hookSync('prepare', [this.config]);\n  }\n\n  private handleStart() {\n    this.status = 'building';\n    this.pluginDriver.hookSync('buildStart', []);\n  }\n\n  private handleLoad({ moduleCount }: { moduleCount: number }) {\n    this.pluginDriver.hookSync('load', [moduleCount]);\n  }\n\n  private handleEnd(buildResult: BuildResult) {\n    this.status = 'idle';\n    this.bundleTask?.done(buildResult);\n    this.pluginDriver.hookSync('buildEnd', [buildResult]);\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/PluginDriver.ts",
    "content": "import type { Hooks, INTERNAL__Id, Plugin, PluginHooks } from '../types';\n\nexport class PluginDriver {\n  private plugins: Plugin[] = [];\n\n  constructor(private id: INTERNAL__Id) {}\n\n  addPlugin(plugin: Plugin) {\n    this.plugins.push(plugin);\n  }\n\n  hookSync<H extends Hooks>(hookName: H, parameters: Parameters<PluginHooks[H]>) {\n    this.runHook(hookName, parameters);\n  }\n\n  private runHook<H extends Hooks>(hookName: H, parameters: Parameters<PluginHooks[H]>) {\n    for (const plugin of this.plugins) {\n      const handler = plugin[hookName];\n\n      if (typeof handler === 'function') {\n        (handler as (...args: Parameters<PluginHooks[H]>) => void).apply({ id: this.id }, parameters);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/__tests__/bundle.spec.ts",
    "content": "import fs from 'fs';\nimport path from 'path';\nimport { parse as swcParse, Statement, VariableDeclaration } from '@swc/core';\nimport { Visitor } from '@swc/core/Visitor';\nimport { describe, expect, it, beforeEach, afterEach } from 'vitest';\nimport { initializeFixture, type FixtureTestContext } from '../../testing/initializeFixture';\n\ndescribe('bundle', () => {\n  let context: FixtureTestContext;\n\n  beforeEach(async () => {\n    context = await initializeFixture();\n  });\n\n  afterEach(async () => {\n    await context.cleanup();\n  });\n\n  it('빌드할 수 있다.', async () => {\n    const outfile = './out.js';\n    const reactNativeVersion = '0.72.6';\n\n    await context.installDependencies('react@18.2.0', `react-native@${reactNativeVersion}`);\n    await context.loadFixtures(__dirname, 'default');\n    await context.buildWithConfig({\n      platform: 'ios',\n      entry: './index.js',\n      outfile,\n    });\n\n    const { stdout } = await context.$(`node`, [outfile]);\n\n    expect(stdout.trim()).toBe(reactNativeVersion);\n  });\n\n  it('의존성을 다른 것으로 설정할 수 있다.', async () => {\n    const outfile = './out.js';\n    const nextReactNativeVersion = '0.76.0';\n\n    await context.installDependencies(\n      'react@18.2.0',\n      'react-native@0.72.6',\n      `other-react-native@npm:react-native@${nextReactNativeVersion}`\n    );\n    await context.loadFixtures(__dirname, 'alias');\n    await context.buildWithConfig({\n      platform: 'ios',\n      entry: './index.js',\n      outfile,\n      resolver: {\n        alias: [{ from: 'react-native', to: 'other-react-native' }],\n      },\n    });\n\n    const { stdout } = await context.$(`node`, [outfile]);\n\n    expect(stdout.trim()).toBe(nextReactNativeVersion);\n  });\n\n  it('banner를 설정할 수 있다.', async () => {\n    const outfile = './out.js';\n    const bannerJsContent = 'console.log(\"banner\");';\n\n    await context.installDependencies('react@18.2.0', 'react-native@0.72.6');\n    await context.loadFixtures(__dirname, 'banner');\n    await context.buildWithConfig({\n      platform: 'ios',\n      entry: './index.js',\n      outfile: outfile,\n      esbuild: {\n        banner: {\n          js: bannerJsContent,\n        },\n      },\n    });\n\n    const fileContent = await fs.promises.readFile(path.resolve(context.dir, outfile));\n\n    expect(fileContent.toString()).toContain(bannerJsContent);\n  });\n\n  it.todo('React Native의 InitializeCore.js 의 경우에도 dependencyAliases에서 지정한 버전으로 지정한다.');\n\n  it('let/const 구문이 변환된다', async () => {\n    const outfile = './out.js';\n\n    await context.installDependencies('react@18.2.0', 'react-native@0.72.6');\n    await context.loadFixtures(__dirname, 'es6');\n    await context.buildWithConfig({\n      platform: 'ios',\n      entry: './index.js',\n      outfile,\n    });\n\n    const content = await context.readFile(outfile);\n    const parsed = await swcParse(content, {\n      syntax: 'ecmascript',\n      script: true,\n      target: 'es2022',\n      isModule: false,\n    });\n\n    function hasLetOrConst(body: Statement[]) {\n      let hasLetOrConst = false;\n\n      class LetOrConstVisitor extends Visitor {\n        visitVariableDeclaration(declaration: VariableDeclaration): VariableDeclaration {\n          if (declaration.kind === 'let' || declaration.kind === 'const') {\n            hasLetOrConst = true;\n          }\n\n          return super.visitVariableDeclaration(declaration);\n        }\n      }\n\n      const visitor = new LetOrConstVisitor();\n\n      visitor.visitStatements(body);\n\n      return hasLetOrConst;\n    }\n\n    await context.writeFile('./result.json', JSON.stringify(parsed.body, null, 2));\n\n    expect(hasLetOrConst(parsed.body)).toBe(false);\n  });\n\n  it('Flow 구문이 모두 제거된다', async () => {\n    const entry = './index.js';\n    const outfile = './out.js';\n\n    await context.installDependencies('react@18.2.0', 'react-native@0.72.6');\n    await context.loadFixtures(__dirname, 'flow');\n    await context.buildWithConfig({\n      platform: 'ios',\n      entry,\n      outfile,\n    });\n\n    const { stdout } = await context.$(`node`, [outfile]);\n\n    expect(stdout.trim()).toMatchInlineSnapshot(`\"mul(10, 5) = 50\"`);\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/bundler/__tests__/fixtures/alias/index.js",
    "content": "const packageJson = require('react-native/package.json');\n\nconsole.log(packageJson.version);\n"
  },
  {
    "path": "packages/mpack/src/bundler/__tests__/fixtures/banner/index.js",
    "content": "console.log('Hello, world!');\n"
  },
  {
    "path": "packages/mpack/src/bundler/__tests__/fixtures/default/index.js",
    "content": "const packageJson = require('react-native/package.json');\n\nconsole.log(packageJson.version);\n"
  },
  {
    "path": "packages/mpack/src/bundler/__tests__/fixtures/es6/index.js",
    "content": "import * as React from 'react';\n\nconst context = React.createContext();\n\nfor (let i = 0; i < 10; i++) {\n  console.log(i);\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/__tests__/fixtures/flow/index.js",
    "content": "// @flow\n\ntype Operation = 'add' | 'sub' | 'mul' | 'div';\n\nfunction add(a: number, b: number): number {\n  return a + b;\n}\n\nfunction sub(a: number, b: number): number {\n  return a - b;\n}\n\nfunction mul(a: number, b: number): number {\n  return a * b;\n}\n\nfunction div(a: number, b: number): number {\n  if (b === 0) {\n    throw new Error('Division by zero');\n  }\n  return a / b;\n}\n\nconst operations: { [key: Operation]: (number, number) => number } = {\n  add,\n  sub,\n  mul,\n  div,\n};\n\nconst op: mixed = 'mul';\nconst typedOp: Operation = (op: any);\n\nfunction safeExecute(fn: ?(number, number) => number, a: number, b: number): number {\n  if (fn == null) {\n    throw new Error('Function not found');\n  }\n  return fn(a, b);\n}\n\nconst a: number = 10;\nconst b: number = 5;\n\nconst result: number = safeExecute(operations[typedOp], a, b);\nconsole.log(`${typedOp}(${a}, ${b}) = ${result}`);\n"
  },
  {
    "path": "packages/mpack/src/bundler/index.ts",
    "content": "export * from './Bundler';\n"
  },
  {
    "path": "packages/mpack/src/bundler/internal/presets.ts",
    "content": "import path from 'path';\nimport { mergeBuildConfigs, type BuildConfig } from '@granite-js/plugin-core';\nimport type { BundlerConfig } from '../../types';\nimport { getDefaultReactNativePath } from '../../utils/getDefaultReactNativePath';\n\nexport function getReactNativeSetupScripts({\n  rootDir,\n  reactNativePath = getDefaultReactNativePath(rootDir),\n  skipReactNativePolyfills = false,\n  skipReactNativeInitializeCore = false,\n}: {\n  rootDir: string;\n  reactNativePath?: string;\n  skipReactNativePolyfills?: boolean;\n  skipReactNativeInitializeCore?: boolean;\n}) {\n  const polyfills = skipReactNativePolyfills\n    ? []\n    : (require(path.join(reactNativePath, 'rn-get-polyfills'))() as string[]);\n  const initializeCore = skipReactNativeInitializeCore\n    ? []\n    : [path.join(reactNativePath, 'Libraries/Core/InitializeCore.js')];\n\n  return [...polyfills, ...initializeCore] as string[];\n}\n\nexport function globalVariables({ dev }: { dev: boolean }) {\n  return [\n    'var __BUNDLE_START_TIME__=this.nativePerformanceNow?nativePerformanceNow():Date.now();',\n    `var __DEV__=${JSON.stringify(dev)};`,\n    `var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined'?global:typeof window!=='undefined'?window:this;`,\n  ].join('\\n');\n}\n\nexport function defineGlobalVariables({ dev }: { dev: boolean }) {\n  return {\n    window: 'global',\n    __DEV__: JSON.stringify(dev),\n    'process.env.NODE_ENV': JSON.stringify(dev ? 'development' : 'production'),\n  };\n}\n\nexport function combineWithBaseBuildConfig(\n  config: BundlerConfig,\n  context: { rootDir: string; dev: boolean }\n): BuildConfig {\n  return mergeBuildConfigs(\n    {\n      entry: config.buildConfig.entry,\n      outfile: config.buildConfig.outfile,\n      platform: config.buildConfig.platform,\n      esbuild: {\n        define: defineGlobalVariables({ dev: context.dev }),\n        prelude: getReactNativeSetupScripts({\n          rootDir: context.rootDir,\n          reactNativePath: config.buildConfig.reactNativePath,\n          skipReactNativePolyfills: config.buildConfig.extra?.skipReactNativePolyfills === true,\n          skipReactNativeInitializeCore: config.buildConfig.extra?.skipReactNativeInitializeCore === true,\n        }),\n        banner: {\n          js: globalVariables({ dev: context.dev }),\n        },\n      },\n      babel: {\n        conditions: [\n          /**\n           * @TODO\n           * We're using a RegExp in Zod that's not supported by Hermes,\n           * so we're switching to Babel for transpilation since there's no compatible SWC config or plugin available.\n           *\n           * @see zod {@link https://github.com/colinhacks/zod/issues/2302}\n           */\n          (_code: string, path: string) => path.includes('node_modules/zod'),\n        ],\n      },\n    },\n    config.buildConfig\n  );\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/buildStatusPlugin/buildStatusPlugin.ts",
    "content": "import type { BuildResult } from '@granite-js/plugin-core';\nimport * as esbuild from 'esbuild';\nimport { logger } from '../../../logger';\nimport { getBundleOutputs } from '../../../utils/getBundleOutputs';\nimport { getSourcemapName } from '../../../utils/getSourcemapName';\nimport type { PluginOptions } from '../types';\n\nexport interface BuildStatusPluginOptions {\n  onPrepare: () => void | Promise<void>;\n  onStart: () => void | Promise<void>;\n  onLoad: (loadData: { moduleCount: number }) => void | Promise<void>;\n  onEnd: (buildResult: BuildResult) => void | Promise<void>;\n}\n\nexport function buildStatusPlugin({ context, ...hooks }: PluginOptions<BuildStatusPluginOptions>): esbuild.Plugin {\n  return {\n    name: 'build-status-plugin',\n    setup(build) {\n      let buildStartedAt = 0;\n      let moduleCount = 0;\n\n      build.onStart(async () => {\n        logger.debug('Preparing build', { id: context.id });\n        await hooks.onPrepare();\n\n        moduleCount = 0;\n        buildStartedAt = performance.now();\n        logger.debug('Build started', { id: context.id, buildStartedAt });\n\n        await hooks.onStart();\n      });\n\n      build.onLoad({ filter: /.*/ }, async () => {\n        await hooks.onLoad({ moduleCount: ++moduleCount });\n        return null;\n      });\n\n      build.onEnd(async (result) => {\n        const endAt = performance.now();\n        const duration = endAt - buildStartedAt;\n        const { buildConfig } = context.config;\n        const { outfile, sourcemapOutfile, platform, extra } = buildConfig;\n        const { source, sourcemap } = getBundleOutputs(outfile, result);\n        const buildResult = extendBuildResult(\n          result,\n          source && sourcemap\n            ? {\n                bundle: { source, sourcemap },\n                outfile,\n                sourcemapOutfile: sourcemapOutfile ?? getSourcemapName(outfile),\n                platform,\n                extra,\n                duration,\n                size: source.contents.byteLength,\n                totalModuleCount: moduleCount,\n              }\n            : { platform, extra, duration }\n        );\n\n        await hooks.onEnd(buildResult);\n      });\n    },\n  };\n}\n\nfunction extendBuildResult(result: esbuild.BuildResult, properties: Record<string, unknown>): BuildResult {\n  /**\n   * Can define properties to the result object before it is fulfilled.\n   *\n   * @see {@link https://esbuild.github.io/plugins/#on-end}\n   */\n  return Object.defineProperties(\n    result,\n    Object.fromEntries(Object.entries(properties).map(([property, value]) => [property, { value, enumerable: true }]))\n  ) as BuildResult;\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/buildStatusPlugin/index.ts",
    "content": "export { buildStatusPlugin } from './buildStatusPlugin';\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/index.ts",
    "content": "export * from './buildStatusPlugin';\nexport * from './resolvePlugin';\nexport * from './requireContextPlugin';\nexport * from './transformPlugin';\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/requireContextPlugin/__fixtures__/preview.require.context.ts",
    "content": "\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst previewContext = require.context('../../', true, /\\.preview\\.tsx$/);\n\nexport const previews: any[] = (previewContext as any)\n  .keys()\n  .filter((key: string) => key.startsWith('./'))\n  .map((key: string) => previewContext(key).default)\n  .filter(Boolean);\n\nexport function findPreview(key: string): any | undefined {\n  return previews.find(p => p.key === key);\n}\n\nexport function normalizeGroup(group: string | string[] | undefined): string[] {\n  if (group == null) {\n    return ['Ungrouped'];\n  }\n  if (typeof group === 'string') {\n    return [group];\n  }\n  return group.length === 0 ? ['Ungrouped'] : group;\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/requireContextPlugin/__tests__/scripts.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { toRequireContextExportScript } from '../scripts';\n\ndescribe('toRequireContextExportScript', () => {\n  describe('유효하지 않은 require context 구문인 경우', () => {\n    it('require.context() 호출부가 없으면 에러가 발생한다', () => {\n      expect(() => toRequireContextExportScript('export const context = require.context')).toThrow();\n      expect(() => toRequireContextExportScript('export const context = 1')).toThrow();\n    });\n\n    it('인자에 source 가 없으면 에러가 발생한다', () => {\n      expect(() => toRequireContextExportScript('export const context = require.context()')).toThrow();\n      expect(() => toRequireContextExportScript('export const context = require.context(\"\")')).toThrow();\n    });\n  });\n\n  describe('유효한 require context 구문인 경우', () => {\n    const source = './module';\n\n    it('named export 가 정상적으로 변환된다', () => {\n      expect(toRequireContextExportScript(`export const context = require.context('${source}')`))\n        .toMatchInlineSnapshot(`\n        \"import __context_0__ from 'require-context:./module';\n\n        export var context = __context_0__\"\n      `);\n    });\n\n    it('default export 가 정상적으로 변환된다', () => {\n      expect(toRequireContextExportScript(`export default require.context('${source}')`)).toMatchInlineSnapshot(`\n        \"import __context_0__ from 'require-context:./module';\n\n        export default __context_0__\"\n      `);\n    });\n\n    it('여러 require.context() 호출이 각각 격리된 변수로 변환된다', () => {\n      expect(\n        toRequireContextExportScript(\n          `export const ctx1 = require.context('./moduleA');\\nexport const ctx2 = require.context('./moduleB');`\n        )\n      ).toMatchInlineSnapshot(`\n        \"import __context_0__ from 'require-context:./moduleA';\n        import __context_1__ from 'require-context:./moduleB';\n\n        export var ctx1 = __context_0__;\n        export var ctx2 = __context_1__;\"\n      `);\n    });\n\n    it('default export 와 named export 혼합 시 각각 격리된다', () => {\n      expect(\n        toRequireContextExportScript(\n          `export const ctx = require.context('./moduleA');\\nexport default require.context('./moduleB');`\n        )\n      ).toMatchInlineSnapshot(`\n        \"import __context_0__ from 'require-context:./moduleA';\n        import __context_1__ from 'require-context:./moduleB';\n\n        export var ctx = __context_0__;\n        export default __context_1__;\"\n      `);\n    });\n\n    it('deep=false 파라미터가 쿼리스트링으로 인코딩된다', () => {\n      expect(\n        toRequireContextExportScript(`export default require.context('./module', false)`)\n      ).toMatchInlineSnapshot(`\n        \"import __context_0__ from 'require-context:./module?deep=false';\n\n        export default __context_0__\"\n      `);\n    });\n\n    it('deep=true 이면 쿼리스트링에 포함되지 않는다', () => {\n      expect(\n        toRequireContextExportScript(`export default require.context('./module', true)`)\n      ).toMatchInlineSnapshot(`\n        \"import __context_0__ from 'require-context:./module';\n\n        export default __context_0__\"\n      `);\n    });\n\n    it('filter 파라미터가 쿼리스트링으로 인코딩된다', () => {\n      expect(\n        toRequireContextExportScript(`export default require.context('../../', true, /\\\\.preview\\\\.tsx$/)`)\n      ).toMatchInlineSnapshot(`\n        \"import __context_0__ from 'require-context:../../?filterSrc=%5C.preview%5C.tsx%24&filterFlags=';\n\n        export default __context_0__\"\n      `);\n    });\n\n    it('deep=false + filter 파라미터가 함께 쿼리스트링으로 인코딩된다', () => {\n      expect(\n        toRequireContextExportScript(`export default require.context('../../', false, /\\\\.preview\\\\.tsx$/)`)\n      ).toMatchInlineSnapshot(`\n        \"import __context_0__ from 'require-context:../../?deep=false&filterSrc=%5C.preview%5C.tsx%24&filterFlags=';\n\n        export default __context_0__\"\n      `);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/requireContextPlugin/index.ts",
    "content": "export { requireContextPlugin } from './requireContextPlugin';\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/requireContextPlugin/requireContextPlugin.ts",
    "content": "import fs from 'fs';\nimport path from 'path';\nimport { Plugin } from 'esbuild';\nimport { toRequireContextExportScript, getRequireContextScript } from './scripts';\nimport { REQUIRE_CONTEXT_PROTOCOL } from '../../../constants';\nimport { normalizePath } from '../../../utils/esbuildUtils';\n\nasync function getFilePaths(rootDir: string, deep = true): Promise<string[]> {\n  const filenames: string[] = [];\n\n  const rootFilenames = await fs.readdirSync(rootDir);\n\n  for await (const filename of rootFilenames) {\n    const filePath = path.join(rootDir, filename);\n\n    if (fs.lstatSync(filePath).isDirectory()) {\n      if (deep) {\n        filenames.push(...(await getFilePaths(filePath, deep)));\n      }\n    } else {\n      filenames.push(filePath);\n    }\n  }\n\n  return filenames;\n}\n\n/**\n * 파일에 require.context('(.*)')라고 하는 글자가 있으면,\n * require('require-context:$1') 로 바꾼다.\n */\nexport function requireContextPlugin(): Plugin {\n  return {\n    name: 'require-context-plugin',\n    setup(build) {\n      /**\n       * require.context.ts|tsx 파일 중 require.context('./path/to/module') 라고 되어있는 텍스트가 있다면\n       * \"require-context:./path/to/module\" 경로를 import & export 하는 코드로 변환합니다.\n       */\n      build.onLoad({ filter: /require\\.context\\.tsx?$/ }, async (args) => {\n        const content = await fs.promises.readFile(args.path, 'utf8');\n\n        return {\n          loader: args.path.endsWith('.tsx') ? 'tsx' : 'ts',\n          contents: toRequireContextExportScript(content),\n        };\n      });\n\n      /**\n       * \"require-context:./path/to/module\" 로 되어있으면 ./path/to/module 로 resolve 합니다.\n       * 쿼리스트링으로 deep / filter 파라미터를 전달받아 pluginData 에 파싱하여 전달합니다.\n       */\n      build.onResolve({ filter: new RegExp(`^${REQUIRE_CONTEXT_PROTOCOL}.*`) }, (args) => {\n        const rawPath = args.path.slice(REQUIRE_CONTEXT_PROTOCOL.length);\n        const qIdx = rawPath.indexOf('?');\n        const contextPath = qIdx === -1 ? rawPath : rawPath.slice(0, qIdx);\n        const params = new URLSearchParams(qIdx === -1 ? '' : rawPath.slice(qIdx + 1));\n\n        const deep = params.get('deep') !== 'false';\n        const filterSrc = params.get('filterSrc');\n        const filterFlags = params.get('filterFlags') ?? '';\n        const filter = filterSrc != null ? new RegExp(filterSrc, filterFlags) : undefined;\n\n        return {\n          namespace: 'require-context',\n          path: contextPath,\n          pluginData: {\n            importer: args.resolveDir,\n            deep,\n            filter,\n          },\n        };\n      });\n\n      /**\n       * Webpack 의 require.context 가 반환하는 값의 인터페이스와 맞춥니다.\n       */\n      build.onLoad({ namespace: 'require-context', filter: /.*/ }, async (args) => {\n        const importer = args.pluginData?.importer;\n\n        if (importer == null) {\n          throw new Error(`importer가 주어져야 합니다.`);\n        }\n\n        const { deep, filter } = args.pluginData as { deep: boolean; filter?: RegExp };\n        const targetDir = path.resolve(importer, args.path);\n        const basePath = path.join(importer, args.path);\n\n        const allPaths = await getFilePaths(targetDir, deep);\n        const filePaths = filter ? allPaths.filter((fp) => filter.test(path.basename(fp))) : allPaths;\n\n        const requireContextModules = filePaths.map((filePath, index) => {\n          const pagePath = path.relative(basePath, filePath);\n          const normalizedPagePath = normalizePath(pagePath);\n          const normalizedFilePath = normalizePath(filePath);\n\n          return {\n            moduleIndex: index,\n            relativePath: normalizedPagePath.startsWith('.') ? normalizedPagePath : `./${normalizedPagePath}`,\n            absolutePath: normalizedFilePath,\n          };\n        });\n\n        return {\n          contents: getRequireContextScript(requireContextModules),\n          resolveDir: importer,\n        };\n      });\n    },\n  };\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/requireContextPlugin/scripts.ts",
    "content": "import { REQUIRE_CONTEXT_PROTOCOL } from '../../../constants';\n\ninterface RequireContextModule {\n  moduleIndex: number;\n  absolutePath: string;\n  relativePath: string;\n}\n\ninterface RequireContextSource {\n  path: string;\n  deep: boolean;\n  filterSrc?: string;\n  filterFlags?: string;\n}\n\n/**\n * require context export 스크립트 반환\n *\n * ```js\n * export const context1 = require.context('../path1'); // A\n * export const context2 = require.context('../path2'); // B\n * export default require.context('../path3');          // C\n * ```\n *\n * 형태의 코드를 아래와 같이 변경 (각 호출마다 고유한 변수로 격리)\n *\n * ```js\n * import __context_0__ from 'require-context:../path1';\n * import __context_1__ from 'require-context:../path2';\n * import __context_2__ from 'require-context:../path3';\n *\n * export var context1 = __context_0__; // A\n * export var context2 = __context_1__; // B\n * export default __context_2__;        // C\n * ```\n */\nexport function toRequireContextExportScript(content: string) {\n  const sources: RequireContextSource[] = [];\n  let idx = 0;\n\n  // const -> var 변환 이유\n  // esbuild config 에서 supported['const-and-let'] 를 false 로 넣어주고 있기 때문에 로드되기 전에 치환\n  const MODULE_BODY = content\n    .replace(\n      /require\\.context\\((['\"])(.*?)\\1(?:\\s*,\\s*(true|false))?(?:\\s*,\\s*(\\/.*?\\/\\w*))?\\)/g,\n      (_, _quote, sourcePath, deep, filterLiteral) => {\n        const filterRegex = filterLiteral ? parseRegExpLiteral(filterLiteral) : undefined;\n        sources.push({\n          path: sourcePath,\n          deep: deep !== 'false',\n          filterSrc: filterRegex?.source,\n          filterFlags: filterRegex?.flags,\n        });\n        return `__context_${idx++}__`;\n      }\n    )\n    .replace(/\\b(const|let)\\b/g, 'var');\n\n  if (sources.length === 0) {\n    throw new Error('유효하지 않은 require context 구문입니다');\n  }\n\n  for (const source of sources) {\n    if (!source.path) {\n      throw new Error('유효하지 않은 require context 구문입니다');\n    }\n  }\n\n  const IMPORT_STATEMENTS = sources\n    .map((source, i) => {\n      const query = buildQueryString(source);\n      const protocolPath = `${REQUIRE_CONTEXT_PROTOCOL}${source.path}${query}`;\n      return `import __context_${i}__ from '${protocolPath}';`;\n    })\n    .join('\\n');\n\n  return `\n${IMPORT_STATEMENTS}\n\n${MODULE_BODY}\n`.trim();\n}\n\n/**\n * require context 스크립트\n *\n * ```js\n * // Sample\n * import * as module0 from \"/path/to/module-0\";\n * import * as module1 from \"/path/to/module-1\";\n * import * as module2 from \"/path/to/module-2\";\n *\n * var requireContext = function(key) {\n *   var _modules = {};\n *\n *   _modules[\"./relative/path/of/module-0\"] = module0;\n *   _modules[\"./relative/path/of/module-1\"] = module1;\n *   _modules[\"./relative/path/of/module-2\"] = module2;\n *\n *   return _modules[key];\n * };\n *\n * requireContext.keys = function() {\n *   return [\n *     \"./relative/path/of/module-0\",\n *     \"./relative/path/of/module-1\",\n *     \"./relative/path/of/module-2\",\n *   ];\n * };\n *\n * export default requireContext;\n * ```\n */\nfunction parseRegExpLiteral(literal: string): RegExp {\n  const match = literal.match(/^\\/(.*)\\/(\\w*)$/);\n  if (!match || match[1] == null) {\n    throw new Error(`유효하지 않은 정규식 리터럴: ${literal}`);\n  }\n  return new RegExp(match[1], match[2] ?? '');\n}\n\nfunction buildQueryString(source: RequireContextSource): string {\n  const params = new URLSearchParams();\n  if (!source.deep) {\n    params.set('deep', 'false')\n  };\n  if (source.filterSrc != null) {\n    params.set('filterSrc', source.filterSrc)\n  };\n  if (source.filterFlags != null) {\n    params.set('filterFlags', source.filterFlags)\n  };\n  \n  const qs = params.toString();\n  return qs.length > 0 ? `?${qs}` : '';\n}\n\nexport function getRequireContextScript(modules: RequireContextModule[]) {\n  const IMPORT_STATEMENTS = modules\n    .map((module) => `import * as module${module.moduleIndex} from ${JSON.stringify(module.absolutePath)};`)\n    .join('\\n');\n\n  const ASSIGN_STATEMENTS = modules\n    .map((module) => `_modules[${JSON.stringify(module.relativePath)}] = module${module.moduleIndex};`)\n    .join('\\n');\n\n  return `\n${IMPORT_STATEMENTS}\n\nvar requireContext = function(key) {\n  var _modules = {};\n  \n  ${ASSIGN_STATEMENTS}\n\n  return _modules[key];\n};\n\nrequireContext.keys = function() {\n  return [${modules.map((module) => JSON.stringify(module.relativePath)).join(',')}];\n};\n\nexport default requireContext;\n`.trim();\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolveHelpers.spec.ts",
    "content": "import type { PluginBuild } from 'esbuild';\nimport { describe, expect, it, vi } from 'vitest';\nimport { createNonRecursiveResolver } from './resolveHelpers';\n\ndescribe('resolveHelpers', () => {\n  function createDummyBuild() {\n    return {\n      resolve: vi.fn().mockImplementation((path: string, options: any) => {\n        return { path: `resolved:${path}`, ...options };\n      }),\n    } as unknown as PluginBuild;\n  }\n\n  describe('createNonRecursiveResolver', () => {\n    it('should create a non-recursive resolver', async () => {\n      const build = createDummyBuild();\n      const resolver = createNonRecursiveResolver(build);\n\n      let result = await resolver(\n        {\n          path: 'foo',\n          importer: 'shims',\n          namespace: 'shims',\n          resolveDir: 'shims',\n          kind: 'import-statement',\n          pluginData: undefined,\n          with: {},\n        },\n        {}\n      );\n\n      expect(typeof result).toBe('object');\n\n      result = await resolver(\n        {\n          path: 'foo',\n          importer: 'shims',\n          namespace: 'shims',\n          resolveDir: 'shims',\n          kind: 'import-statement',\n          with: {},\n          pluginData: result?.pluginData,\n        },\n        {}\n      );\n\n      expect(result).toBe(null);\n      expect(build.resolve).toHaveBeenCalledTimes(1);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolveHelpers.ts",
    "content": "import type { OnResolveArgs, PluginBuild, ResolveOptions } from 'esbuild';\n\nconst RESOLVED_FLAG_KEY = Symbol.for('mpack:REAOLVED_FLAG');\n\nexport function createNonRecursiveResolver(build: PluginBuild) {\n  return (args: OnResolveArgs, options: ResolveOptions) => {\n    if (args.pluginData?.[RESOLVED_FLAG_KEY]) {\n      return null;\n    }\n\n    const pluginDataWithResolvedFlag = {\n      ...options?.pluginData,\n      [RESOLVED_FLAG_KEY]: true,\n    };\n\n    return build.resolve(args.path, { ...options, pluginData: pluginDataWithResolvedFlag });\n  };\n}\n\nexport function isResolved(args: OnResolveArgs) {\n  return args.pluginData?.[RESOLVED_FLAG_KEY];\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolvePlugin/__tests__/fixtures/deps-alias/build.js",
    "content": "const esbuild = require('esbuild');\nconst { plugins } = require('@granite-js/mpack');\n\nesbuild.build({\n  entryPoints: ['./index.js'],\n  outfile: process.env.OUTFILE,\n  bundle: true,\n  plugins: [\n    plugins.resolvePlugin({\n      context: {\n        buildOptions: {\n          rootDir: __dirname,\n        },\n        buildConfig: {\n          resolver: {\n            aliases: [{ from: 'react', to: 'react-v17' }],\n          },\n        },\n      },\n    }),\n  ],\n});\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolvePlugin/__tests__/fixtures/deps-alias/entry.ts",
    "content": "import { foo } from './foo';\n\nconsole.log(foo);\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolvePlugin/__tests__/fixtures/deps-alias/foo-2.ts",
    "content": "export const foo = 'foo 2';\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolvePlugin/__tests__/fixtures/deps-alias/foo.ts",
    "content": "export const foo = 'foo';\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolvePlugin/__tests__/fixtures/deps-alias/index.js",
    "content": "const packageJson = require('react/package.json');\n\nconsole.log(packageJson.version);\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolvePlugin/__tests__/fixtures/protocols/entry.ts",
    "content": "// @ts-expect-error\nimport mod from 'custom-protocol:my-module';\n\nconsole.log(mod);\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolvePlugin/__tests__/resolvePlugin.spec.ts",
    "content": "import path from 'path';\nimport type { BuildConfig } from '@granite-js/plugin-core';\nimport { describe, expect, it } from 'vitest';\nimport { buildWithEsbuild, evaluate } from '../../../../testing';\nimport type { INTERNAL__Id } from '../../../../types';\nimport { resolvePlugin } from '../resolvePlugin';\n\ndescribe('resolvePlugin', () => {\n  describe('alias', () => {\n    describe('static alias', () => {\n      it('should resolve alias 1 (string)', async () => {\n        const buildConfig: BuildConfig = {\n          entry: path.resolve(__dirname, 'fixtures/deps-alias/entry.ts'),\n          outfile: '',\n          platform: 'android',\n          resolver: {\n            alias: [{ from: './foo', to: './foo-2' }],\n          },\n        };\n\n        const code = await buildWithEsbuild(buildConfig, {\n          plugins: [\n            resolvePlugin({\n              context: {\n                id: 'id' as INTERNAL__Id,\n                config: {\n                  cache: false,\n                  dev: false,\n                  metafile: false,\n                  rootDir: __dirname,\n                  buildConfig,\n                },\n              },\n            }),\n          ],\n        });\n\n        expect(await evaluate(code)).toContain('foo 2');\n      });\n\n      it('should resolve alias 2 (object)', async () => {\n        const buildConfig: BuildConfig = {\n          entry: path.resolve(__dirname, 'fixtures/deps-alias/entry.ts'),\n          outfile: '',\n          platform: 'android',\n          resolver: {\n            alias: [\n              {\n                from: './foo',\n                to: {\n                  path: './foo-2',\n                },\n              },\n            ],\n          },\n        };\n\n        const code = await buildWithEsbuild(buildConfig, {\n          plugins: [\n            resolvePlugin({\n              context: {\n                id: 'id' as INTERNAL__Id,\n                config: {\n                  cache: false,\n                  dev: false,\n                  metafile: false,\n                  rootDir: __dirname,\n                  buildConfig,\n                },\n              },\n            }),\n          ],\n        });\n\n        expect(await evaluate(code)).toContain('foo 2');\n      });\n    });\n\n    describe('dynamic alias', () => {\n      it('should resolve alias 1 (string)', async () => {\n        const buildConfig: BuildConfig = {\n          entry: path.resolve(__dirname, 'fixtures/deps-alias/entry.ts'),\n          outfile: '',\n          platform: 'android',\n          resolver: {\n            alias: [\n              {\n                from: './foo',\n                to: async ({ args, resolve }) => {\n                  const result = await resolve(args.path, {\n                    importer: args.importer,\n                    kind: args.kind,\n                    resolveDir: args.resolveDir,\n                  });\n\n                  // Returns `string`\n                  return result.path.replace('foo', 'foo-2');\n                },\n              },\n            ],\n          },\n        };\n\n        const code = await buildWithEsbuild(buildConfig, {\n          plugins: [\n            resolvePlugin({\n              context: {\n                id: 'id' as INTERNAL__Id,\n                config: {\n                  cache: false,\n                  dev: false,\n                  metafile: false,\n                  rootDir: __dirname,\n                  buildConfig,\n                },\n              },\n            }),\n          ],\n        });\n\n        expect(await evaluate(code)).toContain('foo 2');\n      });\n\n      it('should resolve alias 2 (object)', async () => {\n        const buildConfig: BuildConfig = {\n          entry: path.resolve(__dirname, 'fixtures/deps-alias/entry.ts'),\n          outfile: '',\n          platform: 'android',\n          resolver: {\n            alias: [\n              {\n                from: './foo',\n                to: async ({ args, resolve }) => {\n                  // Returns `ResolveResult`\n                  return resolve('./foo-2', {\n                    importer: args.importer,\n                    kind: args.kind,\n                    resolveDir: args.resolveDir,\n                  });\n                },\n              },\n            ],\n          },\n        };\n\n        const code = await buildWithEsbuild(buildConfig, {\n          plugins: [\n            resolvePlugin({\n              context: {\n                id: 'id' as INTERNAL__Id,\n                config: {\n                  cache: false,\n                  dev: false,\n                  metafile: false,\n                  rootDir: __dirname,\n                  buildConfig,\n                },\n              },\n            }),\n          ],\n        });\n\n        expect(await evaluate(code)).toContain('foo 2');\n      });\n    });\n  });\n\n  describe('protocol', () => {\n    it('should resolve custom protocol', async () => {\n      const buildConfig: BuildConfig = {\n        entry: path.resolve(__dirname, 'fixtures/protocols/entry.ts'),\n        outfile: '',\n        platform: 'android',\n        resolver: {\n          protocols: {\n            'custom-protocol': {\n              load: (args) => ({\n                loader: 'ts',\n                contents: [\n                  `const path = ${JSON.stringify(args.path)};`,\n                  'export default [\"Module source is \", path].join(\"\")',\n                ].join('\\n'),\n              }),\n            },\n          },\n        },\n      };\n\n      const code = await buildWithEsbuild(buildConfig, {\n        plugins: [\n          resolvePlugin({\n            context: {\n              id: 'id' as INTERNAL__Id,\n              config: {\n                cache: false,\n                dev: false,\n                metafile: false,\n                rootDir: __dirname,\n                buildConfig,\n              },\n            },\n          }),\n        ],\n      });\n\n      expect(await evaluate(code)).toContain('Module source is my-module');\n    });\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolvePlugin/alias/setupAliasResolver.ts",
    "content": "import path from 'path';\nimport type { AliasConfig, ResolveResult } from '@granite-js/plugin-core';\nimport { assert } from 'es-toolkit';\nimport type { OnResolveArgs, PluginBuild, ResolveOptions } from 'esbuild';\nimport { Performance } from '../../../../performance';\nimport { normalizePath } from '../../../../utils/esbuildUtils';\nimport { replaceModulePath } from '../../../../utils/replaceModulePath';\nimport { createNonRecursiveResolver, isResolved } from '../../resolveHelpers';\nimport { swcHelperOptimizationRules } from '../../shared/swc';\n\nexport function setupAliasResolver(build: PluginBuild, aliasConfig: AliasConfig[]) {\n  const resolver = createNonRecursiveResolver(build);\n\n  [swcHelperOptimizationRules.getAliasConfig(), ...aliasConfig].forEach((aliasConfig) => {\n    const resolveResultCache = new Map<string, { path: string }>();\n    const { filter, resolveAlias } = resolveAliasConfig(build, aliasConfig);\n\n    build.onResolve({ filter }, async (args) => {\n      if (isResolved(args)) {\n        return null;\n      }\n\n      const trace = Performance.trace('alias-resolver', {\n        detail: { pattern: filter, path: args.path },\n      });\n\n      const defaultResolveOptions = {\n        resolveDir: args.resolveDir,\n        importer: args.importer,\n        kind: args.kind,\n        with: args.with,\n      };\n\n      const resolveResult = await resolveAlias(args);\n      const resolvePath = resolveResult.path;\n      const resolveOptions = { ...defaultResolveOptions, ...(resolveResult.options ?? {}) };\n\n      const cacheKey = `${resolveOptions.kind}:${resolveOptions.resolveDir}:${resolvePath}`;\n\n      if (resolveResultCache.has(cacheKey)) {\n        trace.stop({ detail: { cacheHit: true } });\n        return resolveResultCache.get(cacheKey);\n      }\n\n      if (path.isAbsolute(resolvePath)) {\n        trace.stop({ detail: { isAbsolute: true } });\n        const result = { path: resolvePath };\n        resolveResultCache.set(cacheKey, result);\n        return result;\n      }\n\n      const pathOverriddenArgs = { ...args, path: resolvePath };\n      const result = await resolver(pathOverriddenArgs, resolveOptions);\n\n      if (result) {\n        trace.stop({ detail: { cacheHit: false, isAbsolute: false } });\n\n        resolveResultCache.set(cacheKey, result);\n\n        return result;\n      }\n\n      return null;\n    });\n  });\n}\n\nfunction resolveAliasConfig(build: PluginBuild, aliasConfig: AliasConfig) {\n  const { from, to, exact } = aliasConfig;\n  const escapedFrom = escapeRegExpString(from);\n  const filter = new RegExp(exact ? `^${escapedFrom}$` : `^${escapedFrom}(?:$|/)`);\n  const resolver = createNonRecursiveResolver(build);\n\n  const aliasResolver = (boundArgs: OnResolveArgs, path: string, options: ResolveOptions) => {\n    const result = resolver({ ...boundArgs, path }, options);\n    assert(result, 'resolver should return result');\n    return result;\n  };\n\n  const resolveAlias = async (args: OnResolveArgs) => {\n    if (typeof to === 'string') {\n      return normalizeResolveResult(replaceModulePath(args.path, from, to));\n    }\n\n    if (typeof to === 'function') {\n      const result = await to({ resolve: aliasResolver.bind(null, args), args });\n      return normalizeResolveResult(result);\n    }\n\n    return normalizeResolveResult(to);\n  };\n\n  return { filter, resolveAlias };\n}\n\nfunction escapeRegExpString(str: string) {\n  return str.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n}\n\nfunction normalizeResolveResult(result: ResolveResult) {\n  if (typeof result === 'string') {\n    return { path: normalizePath(result), options: undefined };\n  }\n\n  const { path, ...options } = result;\n  return { path, options };\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolvePlugin/index.ts",
    "content": "export { resolvePlugin } from './resolvePlugin';\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolvePlugin/protocol/setupProtocolResolver.ts",
    "content": "import type { ProtocolConfig } from '@granite-js/plugin-core';\nimport type { PluginBuild } from 'esbuild';\nimport { Performance } from '../../../../performance';\n\nexport function setupProtocolResolver(build: PluginBuild, protocolConfig: ProtocolConfig) {\n  const protocols = Object.entries(protocolConfig);\n\n  protocols.forEach(([protocol, { resolve, load }]) => {\n    // Regexp to filter only module paths that start with 'protocol:'\n    const protocolRegExp = new RegExp(`^${protocol}:`);\n\n    build.onResolve({ filter: protocolRegExp }, async (args) => {\n      const trace = Performance.trace('protocol-resolver', {\n        detail: {\n          pattern: protocolRegExp,\n          path: args.path,\n        },\n      });\n      const path = typeof resolve === 'function' ? await resolve(args) : args.path.replace(protocolRegExp, '');\n      trace.stop();\n\n      return {\n        // 'protocol:foo' -> 'foo'\n        path,\n        namespace: getProtocolNamespace(protocol),\n      };\n    });\n\n    build.onLoad({ filter: /.*/, namespace: getProtocolNamespace(protocol) }, (args) => load(args));\n  });\n}\n\nfunction getProtocolNamespace(protocol: string): `protocol-${string}` {\n  return `protocol-${protocol}`;\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/resolvePlugin/resolvePlugin.ts",
    "content": "import type { Plugin } from 'esbuild';\nimport type { PluginOptions } from '../types';\nimport { setupAliasResolver } from './alias/setupAliasResolver';\nimport { setupProtocolResolver } from './protocol/setupProtocolResolver';\n\nexport function resolvePlugin({ context }: PluginOptions): Plugin {\n  return {\n    name: 'resolve-plugin',\n    setup(build) {\n      const { buildConfig } = context.config;\n      const { resolver } = buildConfig;\n\n      const alias = resolver?.alias ?? [];\n      const protocols = resolver?.protocols ?? {};\n\n      setupAliasResolver(build, alias);\n      setupProtocolResolver(build, protocols);\n    },\n  };\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/shared/swc.ts",
    "content": "import path from 'path';\nimport type { AliasConfig } from '@granite-js/plugin-core';\nimport type { JscConfig } from '@swc/core';\n\n/**\n * `@swc/helpers`를 사용하여 번들 크기를 최적화 하기 위한 구성입니다.\n *\n * swc 옵션과 플러그인에서 처리할 로직은 상호 의존적이기 때문에 한 곳에 모아둡니다.\n */\nexport const swcHelperOptimizationRules: {\n  jsc: JscConfig;\n  getAliasConfig: () => AliasConfig;\n} = {\n  jsc: {\n    externalHelpers: true,\n  },\n  getAliasConfig: () => {\n    const swcHelperPath = path.dirname(require.resolve('@swc/helpers/package.json'));\n\n    /**\n     * - Input: `'@swc/helpers/_/_object_spread'`\n     * - Output: `'_object_spread'`\n     */\n    function getHelperName(source: string) {\n      const tokens = source.split('/');\n      return tokens[tokens.length - 1]!;\n    }\n\n    return {\n      from: '@swc/helpers',\n      /**\n       * swc 구성의 externalHelpers 를 활성화 시켜 중복되는 유틸 함수를 `@swc/helpers` 패키지로 대체할 수 있으나,\n       * Yarn PnP 환경에서는 실제 모듈 의존성에 포함되지 않은 `@swc/helpers` 를 resolve 할 수 없기에 preset 기준 경로로 대체하여 resolve 처리합니다.\n       *\n       * ```ts\n       * // AS-IS\n       * import { _ as _foo } from '@swc/helpers/_/_foo';\n       *\n       * // TO-BE\n       * import { _ as _foo } from '/path/to/helpers/esm/_foo';\n       * ```\n       *\n       * @see exports {@link https://github.com/swc-project/swc/blob/main/packages/helpers/package.json#L41}\n       */\n      to: function resolveSwcHelper(context) {\n        return `${swcHelperPath}/esm/${getHelperName(context.args.path)}.js`;\n      },\n    };\n  },\n};\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/__tests__/fixtures/entry.ts",
    "content": "// @ts-expect-error -- test\nif (globalThis.__initialized) {\n  console.log('passed');\n} else {\n  throw new Error('not initialized');\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/__tests__/fixtures/initialize.ts",
    "content": "// @ts-expect-error -- test\nglobalThis.__initialized = true;\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/__tests__/fixtures/prelude/build.js",
    "content": "const esbuild = require('esbuild');\nconst { plugins } = require('@granite-js/mpack');\n\n(async function () {\n  await esbuild.build({\n    entryPoints: ['./index.js'],\n    outfile: process.env.OUTFILE,\n    bundle: true,\n    plugins: [\n      plugins.transformPlugin({\n        context: {\n          id: 'test',\n          buildOptions: {\n            rootDir: __dirname,\n            dev: false,\n            cache: false,\n          },\n          buildConfig: {\n            esbuild: {\n              prelude: ['initialize.js'],\n            },\n          },\n        },\n      }),\n    ],\n  });\n})();\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/__tests__/fixtures/prelude/index.js",
    "content": "if (globalThis.__initialized) {\n  console.log('passed!');\n} else {\n  throw new Error('not initialized');\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/__tests__/fixtures/prelude/initialize.js",
    "content": "globalThis.__initialized = true;\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/__tests__/transformPlugin.spec.ts",
    "content": "import path from 'path';\nimport type { BuildConfig } from '@granite-js/plugin-core';\nimport { describe, expect, it } from 'vitest';\nimport { buildWithEsbuild, evaluate } from '../../../../testing';\nimport type { INTERNAL__Id } from '../../../../types';\nimport { transformPlugin } from '../transformPlugin';\n\ndescribe('transformPlugin', () => {\n  it('prelude 스크립트가 entry 파일 최상단에서 먼저 평가된다', async () => {\n    const buildConfig: BuildConfig = {\n      entry: path.resolve(__dirname, 'fixtures/entry.ts'),\n      outfile: '',\n      platform: 'android',\n      esbuild: {\n        prelude: [path.resolve(__dirname, 'fixtures/initialize.ts')],\n      },\n    };\n\n    const code = await buildWithEsbuild(buildConfig, {\n      plugins: [\n        transformPlugin({\n          context: {\n            id: 'id' as INTERNAL__Id,\n            config: {\n              cache: false,\n              dev: false,\n              metafile: false,\n              rootDir: __dirname,\n              buildConfig,\n            },\n          },\n        }),\n      ],\n    });\n\n    expect(await evaluate(code)).toContain('passed');\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/helpers/preludeScript.ts",
    "content": "import * as path from 'path';\nimport { isNotNil } from 'es-toolkit';\nimport { OnLoadArgs, PluginBuild } from 'esbuild';\nimport { PRELUDE_PROTOCOL } from '../../../../constants';\nimport { normalizePath } from '../../../../utils/esbuildUtils';\nimport { createNonRecursiveResolver } from '../../resolveHelpers';\n\nconst IS_ENTRY_FLAG = Symbol.for('mpack:IS_ENTRY_FLAG');\n\n/**\n * Register `onResolve` callback to mark the module as entry point module\n */\nexport function registerEntryPointMarker(build: PluginBuild) {\n  const resolver = createNonRecursiveResolver(build);\n\n  build.onResolve({ filter: /\\.([mc]js|[tj]sx?)$/ }, async (args) => {\n    if (args.kind !== 'entry-point') {\n      return null;\n    }\n\n    const result = await resolver(args, {\n      importer: args.importer,\n      kind: args.kind,\n      resolveDir: args.resolveDir,\n    });\n\n    return result ? { ...result, pluginData: IS_ENTRY_FLAG } : null;\n  });\n}\n\n/**\n * Register `onResolve` callback to resolve the virtual prelude script path\n *\n * This callback is used to resolve the virtual prelude script path without tree shaking.\n *\n * ```ts\n * import 'prelude:foo';\n * import 'prelude:bar';\n * import 'prelude:baz';\n * ```\n */\nexport function registerPreludeScriptResolver(build: PluginBuild) {\n  build.onResolve({ filter: new RegExp(`^${PRELUDE_PROTOCOL}.*`) }, (args) => {\n    const basePath = args.path.slice(PRELUDE_PROTOCOL.length);\n    const resolvePath = path.resolve(args.resolveDir, basePath);\n\n    return { path: resolvePath, sideEffects: true };\n  });\n}\n\nexport function isEntryPoint(args: OnLoadArgs) {\n  return args.pluginData === IS_ENTRY_FLAG;\n}\n\n/**\n * Returns string that inject prelude script at the top of the code\n *\n * ```ts\n * import 'prelude:foo';\n * import 'prelude:bar';\n * import 'prelude:baz';\n * // ...\n * ```\n */\nexport function injectPreludeScript(\n  code: string,\n  {\n    preludeScriptPaths,\n  }: {\n    preludeScriptPaths: string[];\n  }\n) {\n  return [...preludeScriptPaths.map((path) => `import '${PRELUDE_PROTOCOL}${normalizePath(path)}';`), code]\n    .filter(isNotNil)\n    .join('\\n');\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/index.ts",
    "content": "export { transformPlugin } from './transformPlugin';\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/steps/createCacheSteps.ts",
    "content": "import { Cache } from '../../../../cache';\nimport { Performance } from '../../../../performance';\nimport { AsyncTransformStep } from '../../../../transformer/TransformPipeline';\n\ninterface CacheStepConfig {\n  id: string;\n  enabled: boolean;\n}\n\ninterface TransformCache {\n  /**\n   * 변환을 거친 코드\n   */\n  transformed: string;\n  /**\n   * 파일이 수정된 시간의 Unix timestamp (fs.stat)\n   */\n  mtimeMs: number;\n}\n\nexport function createCacheSteps(config: CacheStepConfig) {\n  const transformCache = new Cache<TransformCache>(`transformed-${config.id}`, {\n    parse: (data) => ({ transformed: data, mtimeMs: 0 }),\n    stringify: (value) => value.transformed,\n  });\n\n  const readCodeFromCache: AsyncTransformStep = async (code, _args, context) => {\n    if (!config.enabled) {\n      return { code };\n    }\n\n    const cache = await Performance.withTrace(() => transformCache.read(context.key), {\n      name: 'read-cache',\n    });\n\n    return cache?.transformed ? { code: cache.transformed, done: true } : { code };\n  };\n\n  const writeCodeToCache: AsyncTransformStep = async (code, _args, context) => {\n    if (config.enabled) {\n      const trace = Performance.trace('write-cache');\n      await transformCache.write(context.key, {\n        mtimeMs: context.mtimeMs,\n        transformed: code,\n      });\n      trace.stop();\n    }\n    return { code };\n  };\n\n  return { beforeTransform: readCodeFromCache, afterTransform: writeCodeToCache };\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/steps/createFlowStripStep.ts",
    "content": "import { generate } from '@babel/generator';\nimport flowRemoveTypes from 'flow-remove-types';\nimport * as HermesParser from 'hermes-parser';\nimport { AsyncTransformStep } from '../../../../transformer/TransformPipeline';\nimport { defineStepName } from '../../../../utils/defineStepName';\n\nexport function createFlowStripStep(): AsyncTransformStep {\n  const flowStripStep: AsyncTransformStep = async function flowStrip(code, args) {\n    const shouldTransform = args.path.endsWith('.js') || args.path.endsWith('.jsx');\n\n    if (!shouldTransform) {\n      return { code };\n    }\n\n    try {\n      const transformedCode = flowRemoveTypes(code, {});\n\n      // @see https://flow.org/en/docs/react/component-syntax/\n      // This is necessary to transform component syntax, etc.\n      const parsedAst = HermesParser.parse(transformedCode.toString(), {\n        flow: 'all',\n        babel: true,\n      });\n\n      const transformedResult = generate(parsedAst as any);\n\n      return { code: transformedResult?.code ?? code };\n    } catch {\n      return { code };\n    }\n  };\n\n  defineStepName(flowStripStep, 'flow-strip');\n\n  return flowStripStep;\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/steps/createFullyTransformStep.ts",
    "content": "import * as path from 'path';\nimport * as babel from '@babel/core';\nimport { AsyncTransformStep } from '../../../../transformer/TransformPipeline';\nimport { defineStepName } from '../../../../utils/defineStepName';\n\ninterface FullyTransformStepConfig {\n  dev: boolean;\n  additionalBabelOptions?: babel.TransformOptions;\n}\n\nexport function createFullyTransformStep({\n  dev,\n  additionalBabelOptions,\n}: FullyTransformStepConfig): AsyncTransformStep {\n  const baseOptions: babel.TransformOptions = {\n    configFile: additionalBabelOptions?.configFile || false,\n    presets: [\n      [\n        /**\n         * React Native Hermes 대응을 위해\n         * 최대한 낮은 버전의 JS 엔진을 지원하도록 IE 11로 설정\n         * 추후 정확한 target으로 설정 필요\n         */\n        require.resolve('@babel/preset-env'),\n        {\n          targets: {\n            ie: 11,\n          },\n          /**\n           * supportsStaticESM 이 true 이면 modules 가 false 로 처리되어야 하는데,\n           * 기본값('auto')이 적용되어 안내 로그가 찍히고 있어 직접 값 지정\n           *\n           * @see source {@link https://github.com/babel/babel/blob/v7.23.10/packages/babel-preset-env/src/index.ts#L398-L403}\n           */\n          modules: false,\n        },\n      ],\n      /**\n       * react-native-reanimated 등 TypeScript를 직접 export하는 라이브러리를 다루기 위해\n       * @babel/preset-typescript 포함 필요\n       */\n      require.resolve('@babel/preset-typescript'),\n      /**\n       * react-native-reanimated 등 .tsx 직접 export하는 라이브러리를 다루기 위해\n       * @babel/preset-react 포함 필요\n       */\n      [require.resolve('@babel/preset-react'), { runtime: 'automatic' }],\n      ...(additionalBabelOptions?.presets ?? []),\n    ],\n    plugins: [\n      /**\n       * react-native에서 직접 export 하는 flow 파일 대응을 위해 strip types 추가 필요\n       */\n      [require.resolve('@babel/plugin-proposal-class-properties'), { loose: true }],\n      [require.resolve('@babel/plugin-proposal-private-property-in-object'), { loose: true }],\n      [require.resolve('@babel/plugin-proposal-private-methods'), { loose: true }],\n      ...(additionalBabelOptions?.plugins ?? []),\n    ],\n  };\n\n  const fullyTransformStep: AsyncTransformStep = async function fullyTransform(code, args) {\n    const babelOptions = babel.loadOptions({\n      minified: false,\n      compact: false,\n      babelrc: false,\n      configFile: false,\n      envName: dev ? 'development' : 'production',\n      ...baseOptions,\n      sourceMaps: 'inline',\n      filename: path.basename(args.path),\n      caller: {\n        name: 'mpack-fully-transform-plugin',\n        supportsStaticESM: true,\n      },\n    }) as babel.TransformOptions | null;\n\n    if (!babelOptions) {\n      return { code };\n    }\n\n    if (babelOptions.sourceMaps) {\n      babelOptions.sourceFileName = path.basename(args.path);\n    }\n\n    const result = await babel.transformAsync(code, babelOptions);\n\n    if (result?.code != null) {\n      return { code: result.code };\n    }\n\n    throw new Error('babel transform result is null');\n  };\n\n  defineStepName(fullyTransformStep, 'fully-transform');\n\n  return fullyTransformStep;\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/steps/createTransformCodegenStep.ts",
    "content": "import { transformAsync } from '@babel/core';\nimport { AsyncTransformStep } from '../../../../transformer/TransformPipeline';\nimport { defineStepName } from '../../../../utils/defineStepName';\n\nexport function createTransformCodegenStep(): AsyncTransformStep {\n  const codegenStep: AsyncTransformStep = async function codegen(code, args) {\n    const transformedResult = await transformAsync(code, {\n      test: /(?:^|[\\\\/])(?:Native\\w+|(\\w+)NativeComponent)\\.[jt]sx?$/,\n      filename: args.path,\n      minified: false,\n      compact: false,\n      babelrc: false,\n      configFile: false,\n      plugins: [\n        require.resolve('babel-plugin-syntax-hermes-parser'),\n        require.resolve('@babel/plugin-transform-flow-strip-types'),\n        [require.resolve('@babel/plugin-syntax-typescript'), false],\n        require.resolve('@react-native/babel-plugin-codegen'),\n      ],\n      overrides: [\n        {\n          test: /\\.ts$/,\n          plugins: [[require.resolve('@babel/plugin-syntax-typescript'), { isTSX: false, allowNamespaces: true }]],\n        },\n        {\n          test: /\\.tsx$/,\n          plugins: [[require.resolve('@babel/plugin-syntax-typescript'), { isTSX: true, allowNamespaces: true }]],\n        },\n      ],\n    });\n    return { code: transformedResult?.code ?? code };\n  };\n\n  defineStepName(codegenStep, 'transform-codegen');\n\n  return codegenStep;\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/steps/createTransformToHermesSyntaxStep.ts",
    "content": "import path from 'path';\nimport type { BuildConfig } from '@granite-js/plugin-core';\nimport * as swc from '@swc/core';\nimport { isNotNil } from 'es-toolkit';\nimport { AsyncTransformStep } from '../../../../transformer/TransformPipeline';\nimport { defineStepName } from '../../../../utils/defineStepName';\nimport { swcHelperOptimizationRules } from '../../shared/swc';\n\nexport interface TransformToHermesSyntaxStepConfig {\n  dev: boolean;\n  additionalSwcOptions?: BuildConfig['swc'];\n}\n\nexport function createTransformToHermesSyntaxStep({\n  dev,\n  additionalSwcOptions = {},\n}: TransformToHermesSyntaxStepConfig): AsyncTransformStep {\n  const plugins = (additionalSwcOptions.plugins ?? []).filter(isNotNil) as NonNullable<\n    swc.JscConfig['experimental']\n  >['plugins'];\n\n  const transformToHermesSyntaxStep: AsyncTransformStep = async function transformToHermesSyntax(code, args) {\n    const options: swc.Options = {\n      minify: false,\n      isModule: true,\n      jsc: {\n        ...swcHelperOptimizationRules.jsc,\n        parser: {\n          syntax: 'typescript',\n          tsx: true,\n          dynamicImport: true,\n        },\n        target: 'es5',\n        keepClassNames: true,\n        transform: {\n          react: {\n            runtime: 'automatic',\n            development: dev,\n          },\n        },\n        experimental: { plugins },\n        loose: false,\n        assumptions: {\n          setPublicClassFields: true,\n          privateFieldsAsProperties: true,\n        },\n      },\n      /**\n       * False error 로그가 찍히고 있어 비활성화\n       */\n      inputSourceMap: false,\n      sourceMaps: 'inline',\n      filename: path.basename(args.path),\n    };\n\n    const result = await swc.transform(code, options);\n    return { code: result.code };\n  };\n\n  defineStepName(transformToHermesSyntaxStep, 'hermes-syntax');\n\n  return transformToHermesSyntaxStep;\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/transformPlugin/transformPlugin.ts",
    "content": "import assert from 'assert';\nimport * as fs from 'fs/promises';\nimport { Plugin } from 'esbuild';\nimport { PluginOptions } from '../types';\nimport * as preludeScript from './helpers/preludeScript';\nimport { createCacheSteps } from './steps/createCacheSteps';\nimport { createFlowStripStep } from './steps/createFlowStripStep';\nimport { createFullyTransformStep } from './steps/createFullyTransformStep';\nimport { createTransformCodegenStep } from './steps/createTransformCodegenStep';\nimport { createTransformToHermesSyntaxStep } from './steps/createTransformToHermesSyntaxStep';\nimport { Performance } from '../../../performance';\nimport { AsyncTransformPipeline } from '../../../transformer';\n\ninterface TransformPluginOptions {\n  transformSync?: (id: string, code: string) => string;\n  transformAsync?: (id: string, code: string) => Promise<string>;\n}\n\nconst sourceRegExp = /\\.([mc]js|[tj]sx?)$/;\n\nexport function transformPlugin({ context, ...options }: PluginOptions<TransformPluginOptions>): Plugin {\n  return {\n    name: 'transform-plugin',\n    setup(build) {\n      const { id, config } = context;\n      const { dev, cache, buildConfig } = config;\n      const { esbuild, swc, babel } = buildConfig;\n\n      assert(id, 'id 값이 존재하지 않습니다');\n      assert(typeof dev === 'boolean', 'dev 값이 존재하지 않습니다');\n      assert(typeof cache === 'boolean', 'cache 값이 존재하지 않습니다');\n\n      const cacheSteps = createCacheSteps({ id, enabled: cache });\n      const transformPipeline = new AsyncTransformPipeline()\n        .beforeStep(cacheSteps.beforeTransform)\n        .addStep(async (code, args) => {\n          if (options.transformSync) {\n            code = options.transformSync(args.path, code);\n          }\n\n          if (options.transformAsync) {\n            code = await options.transformAsync(args.path, code);\n          }\n\n          return { code };\n        })\n        .addStep({\n          if: ({ path, code }) => babel?.conditions?.some((cond) => cond(code, path)) ?? false,\n          then: createFullyTransformStep({ dev, additionalBabelOptions: babel }),\n          stopAfter: true,\n        })\n        .addStep({\n          if: ({ path }) => /(?:^|[\\\\/])(?:Native\\w+|(\\w+)NativeComponent)\\.[jt]sx?$/.test(path),\n          then: createTransformCodegenStep(),\n          else: createFlowStripStep(),\n        })\n        .addStep(createTransformToHermesSyntaxStep({ dev, additionalSwcOptions: swc }))\n        .afterStep(cacheSteps.afterTransform);\n\n      preludeScript.registerEntryPointMarker(build);\n      preludeScript.registerPreludeScriptResolver(build);\n\n      /**\n       * 구성한 transform pipeline 에 원본 코드를 전달하여 변환 처리\n       */\n      build.onLoad({ filter: sourceRegExp }, async (args) => {\n        let code = await fs.readFile(args.path, 'utf-8');\n\n        if (preludeScript.isEntryPoint(args)) {\n          code = preludeScript.injectPreludeScript(code, {\n            preludeScriptPaths: esbuild?.prelude ?? [],\n          });\n        }\n\n        const result = await Performance.withTrace(() => transformPipeline.transform(code, args), {\n          name: 'transform',\n          startOptions: { detail: { file: args.path } },\n        });\n\n        return { contents: result.code, loader: 'js' };\n      });\n    },\n  };\n}\n"
  },
  {
    "path": "packages/mpack/src/bundler/plugins/types.ts",
    "content": "import type { BundlerConfig, INTERNAL__Id } from '../../types';\n\nexport type PluginOptions<T = object> = T & {\n  context: {\n    id: INTERNAL__Id;\n    config: BundlerConfig;\n  };\n};\n"
  },
  {
    "path": "packages/mpack/src/cache/Cache.ts",
    "content": "import * as fs from 'fs';\nimport * as path from 'path';\nimport { MPACK_CACHE_DIR } from '../constants';\n\ninterface CacheConfig<T> {\n  /**\n   * 파일 시스템에 저장되는 데이터는 string 타입이기에, 데이터를 로드한 후 T 타입으로 변환하기 위한 함수가 필요함.\n   */\n  parse: (data: string) => T;\n  /**\n   * 파일 시스템에 저장되는 데이터는 string 타입이기에, stringify 함수가 필요함.\n   */\n  stringify: (value: T) => string;\n}\n\nexport class Cache<T> {\n  static BASE_CACHE_DIR = MPACK_CACHE_DIR;\n  private cache: Record<string, T> = {};\n  private cachePath: string;\n\n  constructor(\n    cacheDirectoryName: string,\n    private config: CacheConfig<T>\n  ) {\n    this.cachePath = path.join(Cache.BASE_CACHE_DIR, cacheDirectoryName);\n    try {\n      fs.accessSync(this.cachePath, fs.constants.R_OK | fs.constants.W_OK);\n    } catch {\n      fs.mkdirSync(this.cachePath, { recursive: true });\n    }\n  }\n\n  getDir() {\n    return this.cachePath;\n  }\n\n  getMemoryCache() {\n    return this.cache;\n  }\n\n  async read(key: string) {\n    const cache = this.cache[key];\n    try {\n      // 메모리 캐시 hit\n      if (cache) {\n        return cache;\n      }\n\n      // 파일 시스템 캐시 hit\n      const fsCache = await this.readFromFileSystem(key);\n      const parsedCache = this.config.parse(fsCache);\n\n      // 파일 캐시만 존재하는 경우에는 메모리 캐시에도 추가합니다\n      this.writeToMemory(key, parsedCache);\n\n      return parsedCache;\n    } catch {\n      // 캐시 없음\n      return null;\n    }\n  }\n\n  async write(key: string, value: T) {\n    this.writeToMemory(key, value);\n    await this.writeToFileSystem(key, value);\n  }\n\n  protected readFromFileSystem(key: string) {\n    return fs.promises.readFile(path.join(this.getDir(), key), 'utf-8');\n  }\n\n  protected writeToMemory(key: string, value: T) {\n    this.cache[key] = value;\n  }\n\n  protected writeToFileSystem(key: string, value: T) {\n    return fs.promises.writeFile(path.join(this.getDir(), key), this.config.stringify(value), 'utf-8');\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/cache/__tests__/Cache.spec.ts",
    "content": "import * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { describe, expect, it, beforeAll } from 'vitest';\nimport { Cache } from '../Cache';\n\ndescribe('Cache', () => {\n  let cache: Cache<{\n    data: string;\n  }>;\n\n  beforeAll(async () => {\n    cache = new Cache('vitest', {\n      parse: (data) => ({ data }),\n      stringify: (value) => value.data,\n    });\n  });\n\n  it('캐시된 데이터가 없는 경우 null 이 반환된다', async () => {\n    const value = await cache.read('index.js');\n\n    expect(value).toBeNull();\n  });\n\n  describe('캐시를 저장하면 ', () => {\n    const key = 'test-key';\n    const content = 'cache value';\n\n    beforeAll(async () => {\n      await cache.write(key, { data: content });\n    });\n\n    it('캐시가 저장된다', async () => {\n      const value = await cache.read(key);\n\n      expect(value).not.toBeNull();\n      expect(value?.data).toEqual(content);\n    });\n\n    it('파일 시스템에 캐시가 저장된다', async () => {\n      const fsData = await fs.readFile(path.join(cache.getDir(), key), 'utf-8');\n\n      expect(fsData).toEqual(content);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/cache/index.ts",
    "content": "export * from './Cache';\n"
  },
  {
    "path": "packages/mpack/src/constants/index.ts",
    "content": "import * as fs from 'fs';\nimport * as os from 'os';\nimport * as path from 'path';\nimport { getBundleName } from '../utils/getBundleName';\n\nconst TEMP_DIR = path.join(os.tmpdir(), 'mpack');\n\nexport const VERSION = JSON.parse(fs.readFileSync(path.join(__dirname, '../../package.json'), 'utf-8')).version;\n\nexport const REQUIRE_CONTEXT_PROTOCOL = 'require-context:';\nexport const PRELUDE_PROTOCOL = 'prelude:';\n\nexport const MPACK_DATA_DIR = path.join(TEMP_DIR, 'data');\nexport const MPACK_CACHE_DIR = path.join(TEMP_DIR, 'cache');\n\n// 번들링시 처리할 파일 확장자\nexport const SOURCE_EXTENSIONS = ['.tsx', '.ts', '.jsx', '.js', '.json'] as const;\nexport const ASSET_EXTENSIONS = ['.png', '.jpg', '.jpeg', '.gif', '.webp', '.svg'] as const;\n\nexport const DEV_SERVER_DEFAULT_HOST = '0.0.0.0';\nexport const DEV_SERVER_DEFAULT_PORT = 8081;\n\n/**\n * 제거 필요: `SHARED_BUNDLE_NAME`, `SERVICE_BUNDLE_NAME` -> `BUNDLE_NAME`\n */\nexport const SHARED_BUNDLE_NAME = getBundleName('index');\nexport const SERVICE_BUNDLE_NAME = getBundleName('service');\n\nexport const BUNDLE_NAME = getBundleName('index');\n\nexport const DEBUGGER_FRONTEND_PATH = '/debugger-frontend';\n\nexport const RESOLVER_MAIN_FIELDS = ['react-native', 'browser', 'main'];\nexport const RESOLVER_EXPORTS_MAP_CONDITIONS = ['react-native'];\n\nexport const INTERNAL_NAMESPACE_IDENTIFIER = '__mpackInternal';\nexport const INTERNAL_LOAD_REMOTE_IDENTIFIER = 'loadRemote';\n"
  },
  {
    "path": "packages/mpack/src/experimental/index.ts",
    "content": "export { EXPERIMENTAL__server } from './operations/serve';\nexport { DevServer } from './server/DevServer';\n"
  },
  {
    "path": "packages/mpack/src/experimental/operations/serve.ts",
    "content": "import {\n  resolveConfig,\n  createPluginHooksDriver,\n  type CompleteGraniteConfig,\n  type PluginConfigContext,\n} from '@granite-js/plugin-core';\nimport { DEV_SERVER_DEFAULT_HOST, DEV_SERVER_DEFAULT_PORT } from '../../constants';\nimport attachKeyHandlers from '../../operations/attachKeyHandlers';\nimport { keyReporter } from '../../operations/keyReporter';\nimport { printLogo } from '../../utils/printLogo';\nimport { printServerUrl } from '../../utils/printServerUrl';\nimport { DevServer } from '../server/DevServer';\nimport type { BroadcastCommand } from '../server/types';\n\ninterface RunServerArgs {\n  config: CompleteGraniteConfig;\n  host?: string;\n  port?: number;\n  onServerReady?: () => Promise<void> | void;\n}\n\nlet keyHandlersAttached = false;\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport async function EXPERIMENTAL__server({\n  config,\n  host = DEV_SERVER_DEFAULT_HOST,\n  port = DEV_SERVER_DEFAULT_PORT,\n  onServerReady,\n}: RunServerArgs) {\n  const driver = createPluginHooksDriver(config);\n  await driver.devServer.pre({ host, port });\n\n  const rootDir = config.cwd;\n  const context: PluginConfigContext = { command: 'serve' };\n  const { metro: _, devServer, ...buildConfig } = (await resolveConfig(config, context)) ?? {};\n  const server = new DevServer({\n    buildConfig: { entry: config.entryFile, ...buildConfig },\n    middlewares: devServer?.middlewares ?? [],\n    host,\n    port,\n    rootDir,\n  });\n\n  printLogo();\n\n  await server.initialize();\n  await server.listen();\n\n  await driver.devServer.post({ host, port });\n  printServerUrl({ host, port });\n  if (!keyHandlersAttached) {\n    keyHandlersAttached = true;\n    const devServerHostname = host === '0.0.0.0' ? 'localhost' : host;\n    const devServerUrl = new URL(`http://${devServerHostname}:${port}`).origin;\n\n    attachKeyHandlers({\n      devServerUrl,\n      messageSocket: {\n        broadcast: (command, params) => server.broadcastCommand(command as BroadcastCommand, params ?? undefined),\n      },\n      reporter: keyReporter,\n    });\n    await onServerReady?.();\n  }\n\n  return {\n    cleanup: async () => {\n      await server.close();\n    },\n  };\n}\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/DevServer.ts",
    "content": "import assert from 'assert';\nimport middie from '@fastify/middie';\nimport type { BundleData } from '@granite-js/plugin-core';\nimport { createDevMiddleware } from '@react-native/dev-middleware';\nimport { createDevServerMiddleware } from '@react-native-community/cli-server-api';\nimport Fastify, {\n  type DoneFuncWithErrOrRes,\n  type FastifyInstance,\n  type FastifyRequest,\n  type FastifyReply,\n} from 'fastify';\nimport type { WebSocketServer } from 'ws';\nimport { DebuggerEventHandler } from './debugger/DebuggerEventHandler';\nimport { createBundlerForDevServer } from './helpers/createBundlerForDevServer';\nimport { mergeBundles } from './helpers/mergeBundles';\nimport { createLiveReloadMiddleware } from './middlewares';\nimport * as serverPlugins from './plugins';\nimport type { BroadcastCommand, DevServerContext, DevServerOptions, Platform } from './types';\nimport { WebSocketServerDelegate, WebSocketServerRouter } from './wss';\nimport { DEV_SERVER_DEFAULT_HOST, DEV_SERVER_DEFAULT_PORT } from '../../constants';\nimport { logger, clientLogger } from '../../logger';\nimport { statusPlugin } from '../../plugins/statusPlugin';\nimport { isDebugMode } from '../../utils/isDebugMode';\nimport { createProgressBar } from '../../utils/progressBar';\n\ntype DevServerMiddleware = {\n  middleware: {\n    use: (middleware: (req: any, res: any, next: (error?: Error) => void) => void) => void;\n    (req: any, res: any, next: (error?: Error) => void): void;\n  };\n  websocketEndpoints: Record<string, WebSocketServer>;\n  messageSocketEndpoint: {\n    broadcast: (method: string, params?: Record<string, unknown> | null) => void;\n  };\n  eventsSocketEndpoint: {\n    reportEvent: (event: any) => void;\n  };\n};\n\ntype FastifyWithUse = FastifyInstance & {\n  use: (middleware: (req: any, res: any, next: (error?: Error) => void) => void) => void;\n};\n\nexport class DevServer {\n  public host: string;\n  public port: number;\n\n  private app: FastifyInstance;\n  private context: DevServerContext | null = null;\n  private inspectorProxy?: unknown;\n  private wssDelegate?: WebSocketServerDelegate;\n  private setupTask: Promise<void>;\n\n  constructor(private devServerOptions: DevServerOptions) {\n    logger.trace('DevServer.constructor');\n\n    this.host = devServerOptions.host ?? DEV_SERVER_DEFAULT_HOST;\n    this.port = devServerOptions.port ?? DEV_SERVER_DEFAULT_PORT;\n\n    // 프리셋에서 참조할 수 있도록 전역 환경 변수로 노출\n    process.env.DEV_SERVER_HOST = String(this.host);\n    process.env.DEV_SERVER_PORT = String(this.port);\n\n    const app = Fastify({\n      logger: {\n        level: isDebugMode('mpack') ? 'trace' : 'silent',\n      },\n    });\n\n    this.app = app;\n    this.setupTask = this.setup(app);\n  }\n\n  async initialize() {\n    logger.trace('DevServer.initialize');\n    await this.setupTask;\n    const { rootDir, buildConfig } = this.devServerOptions;\n    this.context = await this.createDevServerContext(rootDir, buildConfig);\n  }\n\n  async listen() {\n    logger.trace('DevServer.listen');\n    await this.setupTask;\n    return this.app.listen({ host: this.host, port: this.port }).then(() => {\n      logger.info(`개발 서버 실행 중 - ${this.getBaseUrl()}`);\n    });\n  }\n\n  close() {\n    return this.app.close();\n  }\n\n  getInspectorProxy() {\n    return this.inspectorProxy;\n  }\n\n  getBaseUrl() {\n    return `http://${this.host}:${this.port}`;\n  }\n\n  broadcastCommand(command: BroadcastCommand, params?: Record<string, unknown>): void {\n    this.wssDelegate?.broadcastCommand?.(command, params);\n  }\n\n  private getContext() {\n    assert(this.context, '초기화가 완료되지 않았습니다');\n    return this.context;\n  }\n\n  private async setup(app: FastifyInstance) {\n    const devServerHostname = this.host === '0.0.0.0' ? 'localhost' : this.host;\n    const serverBaseUrl = new URL(`http://${devServerHostname}:${this.port}`).origin;\n    await app.register(middie);\n\n    const {\n      middleware: devServerMiddleware,\n      websocketEndpoints: serverWebsocketEndpoints,\n      eventsSocketEndpoint,\n      messageSocketEndpoint,\n    } = createDevServerMiddleware({\n      host: this.host,\n      port: this.port,\n      watchFolders: [this.devServerOptions.rootDir],\n    }) as DevServerMiddleware;\n\n    const devMiddleware = createDevMiddleware({ serverBaseUrl }) as {\n      middleware: (req: any, res: any, next: (error?: Error) => void) => void;\n      websocketEndpoints: Record<string, WebSocketServer>;\n      inspectorProxy?: unknown;\n    };\n    const devtoolsWebsocketEndpoints = devMiddleware.websocketEndpoints ?? {};\n    this.inspectorProxy = devMiddleware.inspectorProxy;\n    devServerMiddleware.use(devMiddleware.middleware);\n    (app as FastifyWithUse).use(devServerMiddleware);\n\n    const debuggerEventHandler = new DebuggerEventHandler(this.devServerOptions.inspectorProxy?.delegate);\n    const deviceSocket = devtoolsWebsocketEndpoints['/inspector/device'];\n    if (deviceSocket) {\n      deviceSocket.on('connection', (socket) => {\n        debuggerEventHandler.setDeviceWebSocketHandler(socket);\n      });\n    }\n    const debuggerSocket = devtoolsWebsocketEndpoints['/inspector/debug'];\n    if (debuggerSocket) {\n      debuggerSocket.on('connection', (socket) => {\n        debuggerEventHandler.setDebuggerWebSocketHandler(socket);\n      });\n    }\n\n    const liveReloadMiddleware = createLiveReloadMiddleware({\n      onClientLog: (event) => {\n        this.wssDelegate?.sendEvent(event);\n\n        if (event.type === 'client_log') {\n          clientLogger(event.level, event.data as any[]);\n        }\n      },\n    });\n\n    const wssDelegate = new WebSocketServerDelegate({\n      eventReporter: (event) => eventsSocketEndpoint.reportEvent(event),\n      messageBroadcaster: (command, params) => messageSocketEndpoint.broadcast(command, params),\n      hmr: {\n        updateStart: () => liveReloadMiddleware.updateStart(),\n        updateDone: () => liveReloadMiddleware.updateDone(),\n        reload: () => liveReloadMiddleware.liveReload(),\n      },\n    });\n\n    app\n      .register(serverPlugins.statusPlugin, { rootDir: this.devServerOptions.rootDir })\n      .register(serverPlugins.serveBundlePlugin, { getBundle: this.getBundle.bind(this) })\n      .register(serverPlugins.symbolicatePlugin, { getBundle: this.getBundle.bind(this) })\n      .register(serverPlugins.indexPagePlugin)\n      .addHook('onSend', this.setCommonHeaders);\n\n    for (const plugin of this.devServerOptions.middlewares ?? []) {\n      app.register(plugin);\n    }\n\n    const webSocketRouter = new WebSocketServerRouter().register('/hot', liveReloadMiddleware.server);\n    const registeredPaths = new Set<string>(['/hot']);\n\n    const registerEndpoints = (endpoints: Record<string, WebSocketServer>) => {\n      for (const [path, endpoint] of Object.entries(endpoints)) {\n        if (registeredPaths.has(path)) {\n          continue;\n        }\n        webSocketRouter.register(path, endpoint);\n        registeredPaths.add(path);\n      }\n    };\n\n    registerEndpoints(serverWebsocketEndpoints ?? {});\n    registerEndpoints(devtoolsWebsocketEndpoints ?? {});\n\n    webSocketRouter.setup(app);\n\n    this.wssDelegate = wssDelegate;\n  }\n\n  private setCommonHeaders(\n    _request: FastifyRequest,\n    reply: FastifyReply,\n    _payload: unknown,\n    next: DoneFuncWithErrOrRes\n  ) {\n    reply.header('Surrogate-Control', 'no-store');\n    reply.header('Cache-Control', 'no-store, no-cache, must-revalidate, proxy-revalidate');\n    reply.header('Pragma', 'no-cache');\n    reply.header('Expires', '0');\n\n    next();\n  }\n\n  private async createDevServerContext(\n    rootDir: string,\n    buildConfig: DevServerOptions['buildConfig']\n  ): Promise<DevServerContext> {\n    const [androidBundler, iosBundler] = await Promise.all([\n      createBundlerForDevServer({ rootDir, platform: 'android', buildConfig }),\n      createBundlerForDevServer({ rootDir, platform: 'ios', buildConfig }),\n    ]);\n\n    // Register common plugins for dev server\n    [androidBundler, iosBundler].forEach((bundler) => {\n      bundler.addPlugin(\n        statusPlugin({\n          onStart: () => {\n            this.wssDelegate?.onHMRUpdateStart();\n          },\n          onEnd: () => {\n            this.wssDelegate?.onHMRUpdateDone();\n            this.wssDelegate?.hotReload();\n          },\n        })\n      );\n    });\n\n    return {\n      rootDir,\n      android: {\n        bundler: androidBundler,\n        progressBar: createProgressBar('android'),\n      },\n      ios: {\n        bundler: iosBundler,\n        progressBar: createProgressBar('ios'),\n      },\n    };\n  }\n\n  private async getBundle(platform: Platform) {\n    const { bundler } = this.getContext()[platform];\n    const buildResult = await bundler.build({ withDispose: false });\n    let targetBundle: BundleData;\n\n    if ('bundle' in buildResult) {\n      if (globalThis.remoteBundles != null) {\n        const hostBundleContent = buildResult.bundle.source.text;\n        const remoteBundleContent = globalThis.remoteBundles[platform];\n        const mergedBundle = await mergeBundles({\n          platform,\n          hostBundleContent,\n          remoteBundleContent,\n        });\n\n        targetBundle = mergedBundle;\n      } else {\n        targetBundle = buildResult.bundle;\n      }\n\n      return targetBundle;\n    } else {\n      throw new Error('Build failed');\n    }\n  }\n}\n\ndeclare global {\n  var remoteBundles: Record<'android' | 'ios', string> | null;\n}\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/constants.ts",
    "content": "export const DEV_SERVER_BUNDLE_NAME = 'index';\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/debugger/DebuggerEventHandler.ts",
    "content": "import type { InspectorProxyConfig } from '@granite-js/plugin-core';\nimport Debug from 'debug';\nimport * as ws from 'ws';\nimport {\n  CustomEvent,\n  DebuggerRequest,\n  GetResponseBodyRequest,\n  NetworkResponseData,\n  LegacyNetworkResponseData,\n} from './types';\n\nexport function parseDomain(method: string) {\n  return method.split('.')[0];\n}\n\nconst debug = Debug('dev-server:debugger');\n\ntype NetworkResponseDataPayload = Pick<NetworkResponseData['params'], 'base64Encoded' | 'data'>;\n\nexport class DebuggerEventHandler {\n  private networkResponseData = new Map<string, NetworkResponseDataPayload>();\n\n  constructor(private delegate?: InspectorProxyConfig['delegate']) {}\n\n  setDeviceWebSocketHandler(socket: ws.WebSocket) {\n    socket.on('message', (message) => this.handleDeviceMessage(socket, message));\n  }\n\n  setDebuggerWebSocketHandler(socket: ws.WebSocket) {\n    socket.on('message', (message) => this.handleDebuggerMessage(socket, message));\n  }\n\n  /**\n   * 네이티브로부터 전달받은 wrappedEvent가 커스텀 이벤트인 경우 파싱하여 반환\n   *\n   * ```js\n   * // message\n   * {\n   *   event: 'wrappedEvent',\n   *   payload: {\n   *     wrappedEvent: '<stringified event string>'\n   *   }\n   * }\n   *\n   * // wrappedEvent\n   * {\n   *   method: '<Namespace>.*',\n   *   params: {}\n   * }\n   * ```\n   */\n  private safetyParseCustomEvent(message: ws.RawData) {\n    try {\n      const parsedMessage = JSON.parse(message.toString());\n\n      if (parsedMessage.event === 'wrappedEvent') {\n        const wrappedEventPayload = JSON.parse(parsedMessage?.payload?.wrappedEvent);\n        const domain = parseDomain(wrappedEventPayload.method);\n\n        if (domain === 'Bedrock' || domain === 'Granite') {\n          return wrappedEventPayload as CustomEvent;\n        }\n      }\n    } catch {\n      // noop\n    }\n\n    return null;\n  }\n\n  /**\n   * Chrome Devtools Frontend 로부터 전달받은 CDP 이벤트 요청 데이터인 경우 파싱하여 반환\n   *\n   * ```js\n   * {\n   *   method: 'CDP Event',\n   *   params: {}\n   * }\n   * ```\n   */\n  private safetyParseDebuggerEvent(message: ws.RawData) {\n    try {\n      return JSON.parse(message.toString()) as DebuggerRequest;\n    } catch {\n      return null;\n    }\n  }\n\n  private handleDeviceMessage(socket: ws.WebSocket, message: ws.RawData) {\n    const customEvent = this.safetyParseCustomEvent(message);\n\n    if (customEvent == null) {\n      return;\n    }\n\n    debug('handleDeviceMessage', customEvent);\n\n    if (this.delegate?.onDeviceMessage?.(customEvent, socket)) {\n      return;\n    }\n\n    switch (customEvent.method) {\n      case 'Bedrock.networkResponseData':\n      case 'Granite.networkResponseData':\n        this.handleNetworkResponseData(customEvent);\n        return;\n    }\n  }\n\n  private handleDebuggerMessage(socket: ws.WebSocket, message: ws.RawData) {\n    let handled: boolean;\n    const debuggerEvent = this.safetyParseDebuggerEvent(message);\n\n    if (debuggerEvent == null) {\n      return;\n    }\n\n    if (this.delegate?.onDebuggerMessage?.(debuggerEvent, socket)) {\n      handled = true;\n    } else {\n      switch (debuggerEvent.method) {\n        case 'Network.getResponseBody':\n          this.handleGetResponseBody(socket, debuggerEvent);\n          handled = true;\n          break;\n\n        default:\n          handled = false;\n      }\n    }\n\n    /**\n     * Chrome Devtools Frontend 에서 넘어오는 CDP 이벤트 중 실제로 처리한 경우에만 로그에 남기도록 처리\n     */\n    if (handled) {\n      debug('handleDebuggerMessage', debuggerEvent);\n    }\n  }\n\n  private handleNetworkResponseData(event: LegacyNetworkResponseData | NetworkResponseData) {\n    const { params } = event;\n\n    if (typeof params.requestId === 'string') {\n      this.networkResponseData.set(params.requestId, {\n        data: params.data,\n        base64Encoded: params.base64Encoded,\n      });\n    }\n  }\n\n  private handleGetResponseBody(socket: ws.WebSocket, event: GetResponseBodyRequest) {\n    const requestId = event.params.requestId.toString();\n    const responseData = this.networkResponseData.get(requestId);\n\n    if (responseData == null) {\n      return;\n    }\n\n    this.networkResponseData.delete(requestId);\n    let base64Encoded = responseData.base64Encoded;\n    let parsedOriginalData: null | object = null;\n\n    try {\n      parsedOriginalData = JSON.parse(responseData.base64Encoded ? atob(responseData.data) : responseData.data);\n      base64Encoded = false;\n    } catch {\n      // noop\n    }\n\n    debug('handleGetResponseBody', responseData);\n\n    socket.send(\n      JSON.stringify({\n        id: event.id,\n        result: {\n          /**\n           * JSON 파싱 시도하여 실제로 JSON 형태의 값인지 확인\n           *\n           * - 파싱 성공: 파싱된 데이터 전송\n           * - 파싱 실패: 기존 데이터 그대로 전송\n           */\n          body: typeof parsedOriginalData === 'object' ? JSON.stringify(parsedOriginalData) : responseData.data,\n          base64Encoded,\n        },\n      })\n    );\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/debugger/types.ts",
    "content": "export type CdpRequestId = number;\n\n/**\n * https://github.com/ChromeDevTools/devtools-protocol/blob/master/types/protocol.d.ts\n */\nexport type SetBreakpointByUrlRequest = {\n  id: CdpRequestId;\n  method: 'Debugger.setBreakpointByUrl';\n  params: {\n    lineNumber: number;\n    url?: string;\n    urlRegex?: string;\n    scriptHash?: string;\n    columnNumber?: number;\n    condition?: string;\n  };\n};\n\nexport type GetScriptSourceRequest = {\n  id: CdpRequestId;\n  method: 'Debugger.getScriptSource';\n  params: {\n    scriptId: string;\n  };\n};\n\nexport type GetResponseBodyRequest = {\n  id: CdpRequestId;\n  method: 'Network.getResponseBody';\n  params: {\n    requestId: CdpRequestId;\n  };\n};\n\n/**\n * @deprecated\n */\nexport interface LegacyNetworkResponseData {\n  method: 'Bedrock.networkResponseData';\n  params: {\n    requestId: string;\n    data: string;\n    base64Encoded: boolean;\n  };\n}\n\n/**\n * Granite custom event\n */\nexport interface NetworkResponseData {\n  method: 'Granite.networkResponseData';\n  params: {\n    requestId: string;\n    data: string;\n    base64Encoded: boolean;\n  };\n}\n\nexport type DebuggerRequest = SetBreakpointByUrlRequest | GetScriptSourceRequest | GetResponseBodyRequest;\n\nexport type CustomEvent = LegacyNetworkResponseData | NetworkResponseData;\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/helpers/createBundlerForDevServer.ts",
    "content": "import type { BuildConfig } from '@granite-js/plugin-core';\nimport { Bundler } from '../../../bundler';\nimport { getBundleName } from '../../../utils/getBundleName';\nimport { DEV_SERVER_BUNDLE_NAME } from '../constants';\nimport { Platform } from '../types';\n\nexport async function createBundlerForDevServer({\n  rootDir,\n  platform,\n  buildConfig,\n}: {\n  rootDir: string;\n  platform: Platform;\n  buildConfig: Omit<BuildConfig, 'outfile' | 'platform'>;\n}) {\n  const bundleName = getBundleName(DEV_SERVER_BUNDLE_NAME);\n\n  return new Bundler({\n    rootDir,\n    dev: true,\n    cache: true,\n    metafile: false,\n    buildConfig: {\n      ...buildConfig,\n      platform,\n      outfile: bundleName,\n    },\n  });\n}\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/helpers/mergeBundles.ts",
    "content": "import type { BundleData } from '@granite-js/plugin-core';\nimport * as esbuild from 'esbuild';\nimport { INTERNAL_LOAD_REMOTE_IDENTIFIER, INTERNAL_NAMESPACE_IDENTIFIER } from '../../../constants';\nimport { getBundleName } from '../../../utils/getBundleName';\nimport { getSourcemapName } from '../../../utils/getSourcemapName';\nimport { DEV_SERVER_BUNDLE_NAME } from '../constants';\nimport { Platform } from '../types';\n\nconst INTERNAL_SOURCE = 'mpack:internal';\nconst IMPORT_SOURCE = 'mpack:remote';\n\nexport async function mergeBundles({\n  platform,\n  hostBundleContent,\n  remoteBundleContent,\n}: {\n  platform: Platform;\n  hostBundleContent: string;\n  remoteBundleContent: string;\n}): Promise<BundleData> {\n  const bundleName = getBundleName(DEV_SERVER_BUNDLE_NAME);\n  const sourcemapName = getSourcemapName(bundleName);\n  const result = await esbuild.build({\n    logLevel: 'silent',\n    stdin: {\n      contents: [`require('${INTERNAL_SOURCE}');`, hostBundleContent].join('\\n'),\n      loader: 'js',\n    },\n    outfile: bundleName,\n    bundle: true,\n    write: false,\n    minify: false,\n    treeShaking: false,\n    sourcemap: 'external',\n    sourcesContent: true,\n    define: {\n      global: 'window',\n    },\n    footer: {\n      /**\n       * 소스맵 옵션을 `external`로 지정하여 번들 코드 하단에 `#sourceMappingURL=path` 을 붙이지 않도록 하고,\n       * `footer` 옵션을 통해 개발 서버의 소스맵 주소(상대경로)로 매핑되도록 직접 추가함.\n       *\n       * - eg. `/index.bundle.map?platform=<platform>&dev=true`\n       *\n       * @see {@link https://esbuild.github.io/api/#sourcemap}\n       * @see {@link https://esbuild.github.io/api/#footer}\n       */\n      js: `//# sourceMappingURL=/${sourcemapName}?${new URLSearchParams({\n        platform,\n        dev: JSON.stringify(true),\n      }).toString()}`,\n    },\n    plugins: [\n      {\n        name: 'remote-bundle-loader',\n        setup(build) {\n          build.onResolve({ filter: new RegExp(`^${INTERNAL_SOURCE}$`) }, () => ({\n            path: 'dev-server-runtime',\n            namespace: 'DEV_SERVER_RUNTIME',\n          }));\n\n          build.onResolve({ filter: new RegExp(`^${IMPORT_SOURCE}$`) }, () => ({\n            path: 'remote-bundle',\n            namespace: 'REMOTE_BUNDLE',\n          }));\n\n          build.onLoad({ filter: /.*/, namespace: 'DEV_SERVER_RUNTIME' }, () => ({\n            contents: `\n            (function(global) {\n              global.${INTERNAL_NAMESPACE_IDENTIFIER} = {};\n              global.${INTERNAL_NAMESPACE_IDENTIFIER}.${INTERNAL_LOAD_REMOTE_IDENTIFIER} = function INTERNAL__loadRemote() {\n                require('${IMPORT_SOURCE}');\n                return Promise.resolve();\n              }\n            })(\n              typeof globalThis !== 'undefined'\n                ? globalThis\n                : typeof global !== 'undefined'\n                  ? global\n                  : typeof window !== 'undefined'\n                    ? window\n                    : this\n            );\n            `,\n            loader: 'js',\n          }));\n\n          build.onLoad({ filter: /.*/, namespace: 'REMOTE_BUNDLE' }, () => ({\n            contents: remoteBundleContent,\n            loader: 'js',\n          }));\n        },\n      },\n    ],\n  });\n\n  const sourceFile = result.outputFiles.find((file) => file.path.endsWith(bundleName));\n  const sourcemapFile = result.outputFiles.find((file) => file.path.endsWith(sourcemapName));\n\n  if (sourceFile && sourcemapFile) {\n    return { source: sourceFile, sourcemap: sourcemapFile };\n  }\n\n  throw new Error('failed to merge bundle');\n}\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/index.ts",
    "content": "export * from './DevServer';\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/middlewares/createLiveReloadMiddleware.ts",
    "content": "import * as ws from 'ws';\nimport { logger } from '../../../logger';\nimport {\n  ClientLogEvent,\n  HmrClientMessage,\n  HmrUpdateDoneMessage,\n  HmrUpdateMessage,\n  HmrUpdateStartMessage,\n} from '../types';\n\n/**\n * DevSettings reload 를 호출하는 스크립트.\n *\n * @see turboModuleProxy {@link https://github.com/facebook/react-native/blob/v0.72.6/packages/react-native/Libraries/TurboModule/TurboModuleRegistry.js#L17}\n * @see nativeModuleProxy {@link https://github.com/facebook/react-native/blob/v0.72.6/packages/react-native/Libraries/BatchedBridge/NativeModules.js#L179}\n *\n * ```ts\n * // 아래와 동일하게 동작함\n * import { DevSettings } from 'react-native';\n *\n * DevSettings.reload();\n * ```\n */\nconst getReloadByDevSettingsProxy = (): string => `(function () {\n  var moduleName = \"DevSettings\";\n  (window.__turboModuleProxy\n    ? window.__turboModuleProxy(moduleName)\n    : window.nativeModuleProxy[moduleName]).reload();\n})();`;\n\nconst getMessage = (data: ws.Data): HmrClientMessage | null => {\n  try {\n    const parsedData = JSON.parse(String(data));\n    return 'type' in parsedData ? (parsedData as HmrClientMessage) : null;\n  } catch {\n    return null;\n  }\n};\n\nexport const createLiveReloadMiddleware = ({ onClientLog }: { onClientLog?: (event: ClientLogEvent) => void }) => {\n  const server = new ws.WebSocketServer({ noServer: true });\n  let connectedSocket: ws.WebSocket | null = null;\n\n  const handleClose = (): void => {\n    connectedSocket = null;\n  };\n\n  const handleMessage = (event: ws.MessageEvent): void => {\n    const message = getMessage(event.data);\n    if (!message) {\n      return;\n    }\n\n    /**\n     * @see {@link https://github.com/facebook/metro/blob/v0.77.0/packages/metro/src/HmrServer.js#L200-L239}\n     */\n    switch (message.type) {\n      case 'log': {\n        onClientLog?.({\n          type: 'client_log',\n          level: message.level,\n          data: message.data,\n          mode: 'BRIDGE',\n        });\n        break;\n      }\n\n      // Not supported\n      case 'register-entrypoints':\n      case 'log-opt-in':\n        break;\n    }\n  };\n\n  const handleError = (error?: Error): void => {\n    if (error) {\n      logger.error('HMR update 메시지를 전송할 수 없습니다', error);\n    }\n  };\n\n  /**\n   * reload 코드를 클라이언트로 전달하여 새로고침\n   *\n   * @see metro {@link https://github.com/facebook/metro/blob/v0.77.0/packages/metro-runtime/src/modules/HMRClient.js#L91-L99}\n   */\n  const liveReload = (): void => {\n    const hmrUpdateMessage: HmrUpdateMessage = {\n      type: 'update',\n      body: {\n        added: [\n          {\n            module: [-1, getReloadByDevSettingsProxy()],\n            sourceMappingURL: null,\n            sourceURL: null,\n          },\n        ],\n        deleted: [],\n        modified: [],\n        isInitialUpdate: false,\n        revisionId: '',\n      },\n    };\n\n    connectedSocket?.send(JSON.stringify(hmrUpdateMessage), handleError);\n  };\n\n  const updateStart = (): void => {\n    const hmrUpdateStartMessage: HmrUpdateStartMessage = {\n      type: 'update-start',\n      body: {\n        isInitialUpdate: false,\n      },\n    };\n    connectedSocket?.send(JSON.stringify(hmrUpdateStartMessage), handleError);\n  };\n\n  const updateDone = (): void => {\n    const hmrUpdateDoneMessage: HmrUpdateDoneMessage = { type: 'update-done' };\n    connectedSocket?.send(JSON.stringify(hmrUpdateDoneMessage), handleError);\n  };\n\n  server.on('connection', (socket) => {\n    connectedSocket = socket;\n    connectedSocket.onerror = handleClose;\n    connectedSocket.onclose = handleClose;\n    connectedSocket.onmessage = handleMessage;\n    logger.debug('HMR 웹소켓 연결됨');\n  });\n\n  server.on('error', (error) => {\n    logger.error('HMR 웹소켓 서버 에러', error);\n  });\n\n  return { server, liveReload, updateStart, updateDone };\n};\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/middlewares/index.ts",
    "content": "export * from './createLiveReloadMiddleware';\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/plugins/index.ts",
    "content": "export * from './indexPagePlugin';\nexport * from './serveBundlePlugin';\nexport * from './statusPlugin';\nexport * from './symbolicatePlugin';\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/plugins/indexPagePlugin.ts",
    "content": "import { FastifyInstance } from 'fastify';\nimport fastifyPlugin from 'fastify-plugin';\nimport { logger } from '../../../logger';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nasync function _indexPagePlugin(app: FastifyInstance) {\n  app.route({\n    method: ['GET'],\n    url: '/',\n    handler: async (_request, reply) => {\n      logger.trace('index-page-plugin');\n\n      reply.status(200).send('index page');\n    },\n  });\n}\n\nexport const indexPagePlugin = fastifyPlugin(_indexPagePlugin, {\n  name: 'index-page-plugin',\n});\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/plugins/reply.ts",
    "content": "import type { FastifyReply } from 'fastify';\nimport { logger } from '../../../logger/Logger';\n\nexport function invalidRequest(reply: FastifyReply, logMessage: string) {\n  logger.warn(`invalid request: ${logMessage}`);\n  return reply.code(400);\n}\n\nexport function notFound(reply: FastifyReply, logMessage: string) {\n  logger.warn(`not found: ${logMessage}`);\n  return reply.code(404);\n}\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/plugins/serveBundlePlugin.ts",
    "content": "import path from 'path';\nimport type { BundleData } from '@granite-js/plugin-core';\nimport type { FastifyInstance } from 'fastify';\nimport fastifyPlugin from 'fastify-plugin';\nimport { invalidRequest, notFound } from './reply';\nimport { logger } from '../../../logger';\nimport { stripExtension } from '../../../utils/stripExtension';\nimport { DEV_SERVER_BUNDLE_NAME } from '../constants';\nimport type { Platform } from '../types';\n\ninterface ServeBundleParams {\n  file: string;\n}\n\ninterface ServeBundleQueryParams {\n  platform: Platform;\n  dev: boolean;\n  minify: boolean;\n  runModule: boolean;\n  inlineSourceMap: boolean;\n  modulesOnly: boolean;\n}\n\nenum BundleResourceType {\n  Bundle = 'bundle',\n  Sourcemap = 'Sourcemap',\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nasync function _serveBundlePlugin(\n  app: FastifyInstance,\n  { getBundle }: { getBundle: (platform: Platform) => Promise<BundleData> }\n) {\n  app.route({\n    method: ['GET'],\n    url: '/:file',\n    schema: {\n      querystring: {\n        type: 'object',\n        properties: {\n          platform: {\n            type: 'string',\n          },\n          app: {\n            type: 'string',\n          },\n          dev: {\n            type: 'boolean',\n          },\n          minify: {\n            type: 'boolean',\n          },\n          runModule: {\n            type: 'boolean',\n          },\n          inlineSourceMap: {\n            type: 'boolean',\n          },\n          modulesOnly: {\n            type: 'boolean',\n          },\n        },\n        required: ['platform'],\n      },\n    },\n    handler: async (request, reply) => {\n      const { file } = request.params as Partial<ServeBundleParams>;\n      const query = request.query as Partial<ServeBundleQueryParams>;\n      const { platform } = query;\n\n      logger.trace('serve-bundle-plugin', query);\n\n      if (file == null) {\n        return invalidRequest(reply, 'file is required');\n      }\n\n      const bundleResourceType = file.endsWith('.bundle')\n        ? BundleResourceType.Bundle\n        : file.endsWith('.map')\n          ? BundleResourceType.Sourcemap\n          : null;\n\n      const isInvalidResourceType = bundleResourceType == null;\n      const isInvalidPlatform = !(platform === 'android' || platform === 'ios');\n\n      if (isInvalidResourceType || isInvalidPlatform) {\n        return invalidRequest(reply, JSON.stringify({ isInvalidResourceType, platform }));\n      }\n\n      if (!(platform === 'android' || platform === 'ios')) {\n        return invalidRequest(reply, 'invalid platform');\n      }\n\n      const { name } = path.parse(file);\n\n      if (stripExtension(name) !== DEV_SERVER_BUNDLE_NAME) {\n        return notFound(reply, `invalid bundle name: ${name}`);\n      }\n\n      const bundle = await getBundle(platform);\n\n      switch (bundleResourceType) {\n        case BundleResourceType.Bundle:\n          return reply\n            .headers({\n              'Content-Type': 'application/javascript; charset=UTF-8',\n              // TODO: Custom header injection\n            })\n            .status(200)\n            .send(Buffer.from(bundle.source.contents).toString('utf-8'));\n\n        case BundleResourceType.Sourcemap:\n          return reply\n            .header('Access-Control-Allow-Origin', 'devtools://devtools')\n            .status(200)\n            .send(Buffer.from(bundle.sourcemap.contents).toString('utf-8'));\n      }\n    },\n  });\n}\n\nexport const serveBundlePlugin = fastifyPlugin(_serveBundlePlugin, {\n  name: 'serve-bundle-plugin',\n});\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/plugins/statusPlugin.ts",
    "content": "import { FastifyInstance } from 'fastify';\nimport fastifyPlugin from 'fastify-plugin';\n\ninterface StatusPluginConfig {\n  rootDir: string;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nasync function _statusPlugin(app: FastifyInstance, config: StatusPluginConfig) {\n  app.route({\n    method: ['GET'],\n    url: '/status',\n    handler: async (_request, reply) => {\n      reply.header('X-React-Native-Project-Root', config.rootDir).status(200).send('packager-status:running');\n    },\n  });\n}\n\nexport const statusPlugin = fastifyPlugin(_statusPlugin, {\n  name: 'status-plugin',\n});\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/plugins/symbolicatePlugin/index.ts",
    "content": "export { symbolicatePlugin } from './symbolicatePlugin';\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/plugins/symbolicatePlugin/parseStackFrame.ts",
    "content": "import * as z from 'zod';\n\nexport type StackFrame = z.TypeOf<typeof stackFrame>;\n\nconst stackFrame = z.object({\n  file: z.string(),\n  lineNumber: z.number(),\n  column: z.number(),\n  methodName: z.string(),\n});\n\nconst stackFrameBody = z.object({\n  stack: z.array(stackFrame),\n});\n\nexport function parseStackFrame(body: unknown) {\n  const parsedBody = stackFrameBody.safeParse(JSON.parse(body as string));\n\n  return parsedBody.success ? parsedBody.data.stack : null;\n}\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/plugins/symbolicatePlugin/symbolicate.ts",
    "content": "import path from 'path';\nimport { codeFrameColumns } from '@babel/code-frame';\nimport sourceMap, { MappedPosition } from 'source-map';\nimport { StackFrame } from './parseStackFrame';\n\ninterface CollapsedMappedPosition extends MappedPosition {\n  /**\n   * 소스맵 추적이 불가하거나, Private 한 코드인 경우 `collapse: true` 추가\n   *\n   * @see {@link https://github.com/facebook/react-native/blob/v0.72.6/packages/react-native/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js#L40}\n   */\n  collapse: true;\n}\n\ninterface CodeFrame {\n  content: string;\n  location: { column: number; row: number };\n  fileName: string;\n}\n\n/**\n * React Native 클라이언트로부터 stack frame 을 전달받아 원본 코드와 매핑한 데이터로 반환\n *\n * @see {@link https://github.com/facebook/react-native/blob/v0.72.6/packages/react-native/Libraries/Core/Devtools/symbolicateStackTrace.js#L32-L47}\n * @see {@link https://github.com/facebook/react-native/blob/v0.72.6/packages/react-native/Libraries/LogBox/Data/LogBoxSymbolication.js#L24-L25}\n */\nexport async function symbolicate(rawSourcemap: Uint8Array, stackFrame: StackFrame[]) {\n  const { stack, codeFrame } = await sourceMap.SourceMapConsumer.with(\n    Buffer.from(rawSourcemap).toString('utf-8'),\n    null,\n    (consumer) => {\n      const originalStackFrame = stackFrame.map((frame) => {\n        const originalPosition = consumer.originalPositionFor({\n          column: frame.column,\n          line: frame.lineNumber,\n        });\n\n        return originalPosition.line == null\n          ? ({\n              collapse: true,\n              column: originalPosition.column ?? frame.column,\n              line: originalPosition.line ?? frame.lineNumber,\n              name: originalPosition.name ?? frame.methodName,\n              source: originalPosition.source ?? frame.file,\n            } as CollapsedMappedPosition)\n          : (originalPosition as MappedPosition);\n      });\n\n      /**\n       * @see {@link https://github.com/facebook/metro/blob/v0.80.8/packages/metro/src/Server.js#L1127-L1166}\n       */\n      const targetFrame = originalStackFrame.find((frame) => !('collapse' in frame));\n      const content = targetFrame?.source && consumer.sourceContentFor(targetFrame?.source);\n      let codeFrame: CodeFrame | null = null;\n\n      if (targetFrame != null && content != null) {\n        codeFrame = {\n          content: codeFrameColumns(content, { start: targetFrame }, { highlightCode: true }),\n          location: { column: targetFrame.column, row: targetFrame.line },\n          fileName: path.basename(targetFrame.source),\n        };\n      }\n\n      return {\n        /**\n         * React Native 와 source-map 라이브러리가 서로 호환되지 않아, React Native 에 맞게 데이터 매핑\n         */\n        stack: originalStackFrame.map(({ column, line, source, name }) => ({\n          column,\n          lineNumber: line,\n          file: source,\n          methodName: name,\n        })),\n        codeFrame,\n      };\n    }\n  );\n\n  return { stack, codeFrame };\n}\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/plugins/symbolicatePlugin/symbolicatePlugin.ts",
    "content": "import * as url from 'url';\nimport type { BundleData } from '@granite-js/plugin-core';\nimport type { FastifyInstance } from 'fastify';\nimport fastifyPlugin from 'fastify-plugin';\nimport { parseStackFrame } from './parseStackFrame';\nimport { symbolicate } from './symbolicate';\nimport { logger } from '../../../../logger';\nimport { stripExtension } from '../../../../utils/stripExtension';\nimport { DEV_SERVER_BUNDLE_NAME } from '../../constants';\nimport type { Platform } from '../../types';\nimport { invalidRequest, notFound } from '../reply';\n\nasync function symbolicatePluginImpl(\n  app: FastifyInstance,\n  { getBundle }: { getBundle: (platform: Platform) => Promise<BundleData> }\n) {\n  app.route({\n    method: ['GET', 'POST'],\n    url: '/symbolicate',\n    handler: async (request, reply) => {\n      logger.debug('symbolicate-plugin', { body: request.body });\n\n      const stackFrame = parseStackFrame(request.body);\n\n      if (stackFrame == null) {\n        return invalidRequest(reply, 'invalid stack frame data');\n      }\n\n      const devBundlePath = stackFrame.find(({ file }) => file.startsWith('http'));\n\n      if (devBundlePath == null) {\n        return notFound(reply, 'no sourcemap found');\n      }\n\n      const {\n        pathname,\n        query: { platform },\n      } = url.parse(devBundlePath.file, true);\n\n      if (stripExtension(pathname ?? '') !== DEV_SERVER_BUNDLE_NAME) {\n        return notFound(reply, `invalid bundle name: ${pathname}`);\n      }\n\n      if (!(platform === 'android' || platform === 'ios')) {\n        return invalidRequest(reply, 'invalid platform');\n      }\n\n      const { sourcemap } = await getBundle(platform);\n\n      return reply.status(200).send(await symbolicate(sourcemap.contents, stackFrame));\n    },\n  });\n}\n\nexport const symbolicatePlugin = fastifyPlugin(symbolicatePluginImpl, {\n  name: 'symbolicate-plugin',\n});\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/types.ts",
    "content": "import type { Middleware, BuildConfig, InspectorProxyConfig } from '@granite-js/plugin-core';\nimport type { Bundler } from '../../bundler';\nimport type { BuildStatusProgressBar } from '../../utils/progressBar';\n\nexport type Platform = 'android' | 'ios';\n\nexport interface DevServerOptions {\n  rootDir: string;\n  host?: string;\n  port?: number;\n  buildConfig: Omit<BuildConfig, 'platform' | 'outfile'>;\n  middlewares?: Middleware[];\n  inspectorProxy?: InspectorProxyConfig;\n}\n\nexport interface DevServerContext {\n  rootDir: string;\n  android: {\n    bundler: Bundler;\n    progressBar: BuildStatusProgressBar;\n  };\n  ios: {\n    bundler: Bundler;\n    progressBar: BuildStatusProgressBar;\n  };\n}\n\ntype ClientLogLevel =\n  | 'trace'\n  | 'info'\n  | 'warn'\n  | 'log'\n  | 'group'\n  | 'groupCollapsed'\n  | 'groupEnd'\n  | 'debug'\n  /**\n   * In React Native, `error` type is not defined in ReportableEvent['level'],\n   * Flipper supports `error` type, so we add it.\n   *\n   * @see {@link https://github.com/facebook/flipper/blob/v0.211.0/desktop/flipper-common/src/server-types.tsx#L76}\n   */\n  | 'error';\n\n/**\n * @see {@link https://github.com/facebook/metro/blob/v0.78.0/packages/metro/src/lib/reporting.js#L36}\n */\nexport interface ClientLogEvent {\n  type: 'client_log';\n  level: ClientLogLevel;\n  data: unknown[];\n  mode: 'BRIDGE' | 'NOBRIDGE';\n}\n\n/**\n * HMR WebSocket message type\n *\n * @see {@link https://github.com/facebook/metro/blob/v0.77.0/packages/metro-runtime/src/modules/types.flow.js#L68}\n */\nexport type HmrClientMessage = RegisterEntryPointsMessage | LogMessage | LogOptInMessage;\n\ninterface RegisterEntryPointsMessage {\n  type: 'register-entrypoints';\n  entryPoints: string[];\n}\n\ninterface LogMessage {\n  type: 'log';\n  level: 'trace' | 'info' | 'warn' | 'log' | 'group' | 'groupCollapsed' | 'groupEnd' | 'debug';\n  data: any[];\n  mode: 'BRIDGE' | 'NOBRIDGE';\n}\n\ninterface LogOptInMessage {\n  type: 'log-opt-in';\n}\n\nexport interface HmrUpdateMessage {\n  type: 'update';\n  body: HmrUpdate;\n}\n\nexport interface HmrUpdateStartMessage {\n  type: 'update-start';\n  body: {\n    isInitialUpdate: boolean;\n  };\n}\n\nexport interface HmrUpdateDoneMessage {\n  type: 'update-done';\n}\n\ninterface HmrUpdate {\n  readonly added: HmrModule[];\n  readonly deleted: number[];\n  readonly modified: HmrModule[];\n  isInitialUpdate: boolean;\n  revisionId: string;\n}\n\ninterface HmrModule {\n  module: [number, string];\n  sourceMappingURL: string | null;\n  sourceURL: string | null;\n}\n\n/**\n * @see {@link https://github.com/react-native-community/cli/blob/v11.3.5/packages/cli-server-api/src/websocket/createEventsSocketEndpoint.ts#L18}\n * @see {@link https://github.com/react-native-community/cli/blob/v11.3.5/packages/cli-server-api/src/websocket/createEventsSocketEndpoint.ts#L179}\n */\nexport type BroadcastCommand = 'reload' | 'devMenu';\n\nexport interface MessageBroadcaster {\n  (command: BroadcastCommand, params?: Record<string, unknown>): void;\n}\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/wss/WebSocketServerDelegate.ts",
    "content": "import { BroadcastCommand, ClientLogEvent, MessageBroadcaster } from '../../server/types';\n\ninterface WebSocketServerDelegateParams {\n  eventReporter: (event: ClientLogEvent) => void;\n  messageBroadcaster: MessageBroadcaster;\n  hmr: {\n    updateStart: () => void;\n    updateDone: () => void;\n    reload: () => void;\n  };\n}\n\nexport class WebSocketServerDelegate {\n  constructor(private delegateParams: WebSocketServerDelegateParams) {}\n\n  sendEvent(event: ClientLogEvent) {\n    this.delegateParams.eventReporter(event);\n  }\n\n  broadcastCommand(command: BroadcastCommand, params?: Record<string, unknown>) {\n    this.delegateParams.messageBroadcaster(command, params);\n  }\n\n  onHMRUpdateStart() {\n    this.delegateParams.hmr.updateStart();\n  }\n\n  onHMRUpdateDone() {\n    this.delegateParams.hmr.updateDone();\n  }\n\n  /**\n   * @TODO: HMR 구현 필요 (대신 실시간 새로고침 제공)\n   */\n  hotReload() {\n    this.delegateParams.hmr.reload();\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/wss/WebSocketServerRouter.ts",
    "content": "import * as http from 'http';\nimport { Duplex } from 'stream';\nimport * as url from 'url';\nimport { FastifyInstance } from 'fastify';\nimport * as ws from 'ws';\n\nexport class WebSocketServerRouter {\n  private webSocketServers = new Map<string, ws.WebSocketServer>();\n\n  register(path: string, wss: ws.WebSocketServer) {\n    this.webSocketServers.set(path, wss);\n    return this;\n  }\n\n  setup(app: FastifyInstance) {\n    app.server.on('upgrade', this.onUpgrade.bind(this));\n  }\n\n  private onUpgrade(request: http.IncomingMessage, socket: Duplex, head: Buffer) {\n    if (!request.url) {\n      return;\n    }\n\n    let upgraded = false;\n    const { pathname } = url.parse(request.url);\n\n    for (const [path, wss] of this.webSocketServers.entries()) {\n      if (path === pathname) {\n        wss.handleUpgrade(request, socket, head, (client) => {\n          wss.emit('connection', client, request);\n        });\n        upgraded = true;\n      }\n    }\n\n    if (!upgraded) {\n      socket.destroy();\n    }\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/experimental/server/wss/index.ts",
    "content": "export * from './WebSocketServerDelegate';\nexport * from './WebSocketServerRouter';\n"
  },
  {
    "path": "packages/mpack/src/index.ts",
    "content": "export { Bundler } from './bundler';\nexport { BuildUtils, runServer } from './operations';\nexport { EXPERIMENTAL__server, DevServer } from './experimental';\nexport { getMetroConfig, MetroBuildUtils } from './metro';\nexport {\n  DEV_SERVER_DEFAULT_HOST,\n  DEV_SERVER_DEFAULT_PORT,\n  SHARED_BUNDLE_NAME,\n  SERVICE_BUNDLE_NAME,\n  BUNDLE_NAME,\n} from './constants';\n\nexport type * from './types';\n"
  },
  {
    "path": "packages/mpack/src/lib.d.ts",
    "content": "// metro@0.77.0 이전 버전에는 타입 정의 파일이 패키지에 포함되어있지 않아 임시로 타입 정의 파일을 추가합니다\n\ndeclare module 'metro-core' {\n  /**\n   * Copyright (c) Meta Platforms, Inc. and affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   *\n   * @format\n   * @oncall react_native\n   */\n\n  import * as net from 'net';\n  import * as stream from 'stream';\n\n  export type UnderlyingStream = net.Socket | stream.Writable;\n\n  export class Terminal {\n    constructor(stream: UnderlyingStream);\n    /**\n     * Shows some text that is meant to be overriden later. Return the previous\n     * status that was shown and is no more. Calling `status()` with no argument\n     * removes the status altogether. The status is never shown in a\n     * non-interactive terminal: for example, if the output is redirected to a\n     * file, then we don't care too much about having a progress bar.\n     */\n    status(format: string, ...args: unknown[]): string;\n    /**\n     * Similar to `console.log`, except it moves the status/progress text out of\n     * the way correctly. In non-interactive terminals this is the same as\n     * `console.log`.\n     */\n    log(format: string, ...args: unknown[]): void;\n    /**\n     * Log the current status and start from scratch. This is useful if the last\n     * status was the last one of a series of updates.\n     */\n    persistStatus(): void;\n    flush(): void;\n  }\n}\n\ndeclare module 'metro-react-native-babel-transformer' {\n  const babelTransformer: {\n    transform: ({\n      filename,\n      options,\n      src,\n      plugins,\n    }: {\n      filename: string;\n      options: any;\n      src: string;\n      plugins: any[];\n    }) => { ast: any; metadata?: ant };\n    getCacheKey: () => string;\n  };\n\n  export default babelTransformer;\n}\n\ndeclare module 'flow-remove-types' {\n  declare const removeTypes: (\n    code: string,\n    options: {\n      all?: boolean;\n      ignoreUninitializedFields?: boolean;\n      pretty?: boolean;\n      removeEmptyImports?: boolean;\n    }\n  ) => {\n    toString(): string;\n    generateMap(): {\n      version: number;\n      sources: string[];\n      names: string[];\n      mappings: string;\n    };\n  };\n  export = removeTypes;\n}\n\ndeclare module 'hermes-parser' {\n  export type ParserOptions = {\n    allowReturnOutsideFunction?: boolean;\n    babel?: boolean;\n    flow?: 'all' | 'detect';\n    enableExperimentalComponentSyntax?: boolean;\n    enableExperimentalFlowMatchSyntax?: boolean;\n    reactRuntimeTarget?: '18' | '19';\n    sourceFilename?: string;\n    sourceType?: 'module' | 'script' | 'unambiguous';\n    tokens?: boolean;\n  };\n\n  export const ParserOptionsKeys: ReadonlySet<keyof ParserOptions>;\n\n  export type HermesPosition = {\n    /** >= 1 */\n    line: number;\n    /** >= 0 */\n    column: number;\n  };\n\n  export type HermesSourceLocation = {\n    start?: HermesPosition;\n    end?: HermesPosition;\n    rangeStart?: number;\n    rangeEnd?: number;\n  };\n\n  export type HermesNode = {\n    type: string;\n    [key: string]: any;\n  };\n\n  export type HermesToken = {\n    type:\n      | 'Boolean'\n      | 'Identifier'\n      | 'Keyword'\n      | 'Null'\n      | 'Numeric'\n      | 'BigInt'\n      | 'Punctuator'\n      | 'String'\n      | 'RegularExpression'\n      | 'Template'\n      | 'JSXText';\n    loc: HermesSourceLocation;\n    value?: string | null;\n  };\n\n  export type HermesComment = {\n    type: 'CommentLine' | 'CommentBlock' | 'InterpreterDirective';\n    loc: HermesSourceLocation;\n    value?: string | null;\n  };\n\n  export type HermesProgram = {\n    type: 'Program';\n    loc: HermesSourceLocation;\n    body: Array<HermesNode | null>;\n    comments: Array<HermesComment>;\n    tokens?: Array<HermesToken>;\n    interpreter?: HermesComment | null;\n  };\n\n  export function parse(code: string, options?: ParserOptions): HermesProgram;\n}\n"
  },
  {
    "path": "packages/mpack/src/logger/Logger.ts",
    "content": "import chalk from 'chalk';\nimport { isNotNil } from 'es-toolkit';\nimport { isDebugMode } from '../utils/isDebugMode';\n\ntype LogLevel = 'trace' | 'debug' | 'info' | 'log' | 'warn' | 'error';\n\ntype SerializableType = string | number | boolean | object | null | undefined;\n\nclass Logger {\n  private static LEVEL_COLOR: Record<LogLevel, chalk.Chalk> = {\n    trace: chalk.gray,\n    debug: chalk.gray,\n    info: chalk.cyan,\n    log: chalk.green,\n    warn: chalk.yellow,\n    error: chalk.red,\n  };\n\n  trace(...messages: SerializableType[]) {\n    if (isDebugMode('mpack')) {\n      this.stdout(this.createLogString('trace', ...messages));\n    }\n  }\n\n  debug(...messages: SerializableType[]) {\n    if (isDebugMode('mpack')) {\n      this.stdout(this.createLogString('debug', ...messages));\n    }\n  }\n\n  info(...messages: SerializableType[]) {\n    this.stdout(this.createLogString('info', ...messages));\n  }\n\n  log(...messages: SerializableType[]) {\n    this.stdout(this.createLogString('log', ...messages));\n  }\n\n  warn(...messages: SerializableType[]) {\n    this.stderr(this.createLogString('warn', ...messages));\n  }\n\n  error(...messages: SerializableType[]) {\n    this.stderr(this.createLogString('error', ...messages));\n  }\n\n  getTimestamp() {\n    const date = new Date();\n\n    const yyyy = date.getFullYear();\n    const MM = (date.getMonth() + 1).toString().padStart(2, '0');\n    const dd = date.getDate().toString().padStart(2, '0');\n\n    const hh = date.getHours().toString().padStart(2, '0');\n    const mm = date.getMinutes().toString().padStart(2, '0');\n    const ss = date.getSeconds().toString().padStart(2, '0');\n    const sss = date.getMilliseconds().toString().padStart(3, '0');\n\n    return `${yyyy}-${MM}-${dd} ${hh}:${mm}:${ss}.${sss}`;\n  }\n\n  private stdout(buffer: string) {\n    process.stdout.write(buffer);\n  }\n\n  private stderr(buffer: string) {\n    process.stderr.write(buffer);\n  }\n\n  private stringify(value: SerializableType) {\n    if (value instanceof Error) {\n      return value.toString();\n    }\n\n    switch (typeof value) {\n      case 'string':\n        return value;\n\n      case 'number':\n      case 'boolean':\n        return value.toString();\n\n      case 'undefined':\n        return 'undefined';\n\n      case 'object':\n        return JSON.stringify(value, null, 2);\n\n      default:\n        return null;\n    }\n  }\n\n  private createLogString(level: LogLevel, ...messages: SerializableType[]) {\n    const timestamp = chalk.gray(this.getTimestamp());\n    const coloredLevel = Logger.LEVEL_COLOR[level](chalk.bold(level));\n    const message = messages.map(this.stringify).filter(isNotNil).join(' ');\n\n    return `${timestamp} ${coloredLevel} ${message}\\n`;\n  }\n}\n\nexport const logger = new Logger();\n"
  },
  {
    "path": "packages/mpack/src/logger/clientLogger.ts",
    "content": "import { logger } from './Logger';\n\ntype ClientLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'log' | 'group' | 'groupCollapsed' | 'groupEnd';\n\nexport const clientLogger = (level: ClientLogLevel, data: any[]) => {\n  switch (level) {\n    case 'trace':\n      logger.trace(...data);\n      break;\n    case 'debug':\n      logger.debug(...data);\n      break;\n\n    case 'info':\n      logger.info(...data);\n      break;\n\n    case 'warn':\n      logger.warn(...data);\n      break;\n\n    case 'error':\n      logger.error(...data);\n      break;\n\n    default:\n      logger.log(...data);\n  }\n};\n"
  },
  {
    "path": "packages/mpack/src/logger/index.ts",
    "content": "import { logger } from './Logger';\nimport { clientLogger } from './clientLogger';\n\nexport { logger, clientLogger };\n"
  },
  {
    "path": "packages/mpack/src/metro/assetRegistry.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/naming-convention\ndeclare const __DEV__: boolean;\n\n/**\n * @see https://github.com/facebook/react-native/blob/v0.72.6/packages/assets/registry.js#L13-L24\n */\ninterface Asset {\n  httpServerLocation: string;\n  hash: string;\n  name: string;\n  type: string;\n}\n\nconst IGNORE_PATH_PATTERN = [/react-native\\/Libraries\\/LogBox\\/UI/, /@react-navigation\\/elements/];\n\nconst assets = new Set();\n\nfunction registerAsset(asset: Asset) {\n  const key = getUniqueKey(asset);\n\n  if (assets.has(key)) {\n    return;\n  }\n\n  assets.add(key);\n  warnUnableToUseLocalResources(asset);\n}\n\nfunction warnUnableToUseLocalResources(asset: Asset) {\n  /**\n   * Metro에서 기본값으로 `GET /assets/<파일>` 경로로 에셋을 서빙하기에, 앞에 붙은 Prefix를 제거하여 실제 경로만 추출함.\n   *\n   * @see https://github.com/facebook/metro/blob/v0.72.3/packages/metro/src/Assets.js#L196-L198\n   * @see https://github.com/facebook/metro/blob/v0.72.3/packages/metro-config/src/defaults/index.js#L122\n   */\n  const localPath = asset.httpServerLocation.replace(/^\\/assets\\//, '');\n  const fileName = `${asset.name}.${asset.type}`;\n  const shouldIgnore = IGNORE_PATH_PATTERN.some((pattern) => pattern.test(localPath));\n\n  if (__DEV__ && !shouldIgnore) {\n    console.warn(\n      [\n        '(DEV) 로컬 리소스는 지원되지 않습니다. URI 방식의 원격 리소스를 사용해주세요.',\n        `Resource: ${localPath}/${fileName}`,\n      ].join('\\n')\n    );\n  }\n}\n\nfunction getUniqueKey(asset: Asset) {\n  return `${asset.name}#${asset.hash}`;\n}\n\nfunction noop() {\n  // noop\n}\n\nexport { registerAsset, noop as getAssetByID };\n"
  },
  {
    "path": "packages/mpack/src/metro/build.ts",
    "content": "import path from 'path';\nimport {\n  createPluginHooksDriver,\n  resolveConfig,\n  type BuildResult,\n  type PluginConfigContext,\n  type CompleteGraniteConfig,\n} from '@granite-js/plugin-core';\nimport { Semaphore } from 'es-toolkit';\nimport { getMetroConfig } from './getMetroConfig';\nimport { getDefaultOutfileName } from '../utils/getDefaultOutfileName';\nimport Metro from '../vendors/metro/src';\n\ninterface CommonMetroBuildOptions {\n  outfile?: string;\n  dev?: boolean;\n  minify?: boolean;\n  platform: 'ios' | 'android';\n}\n\nexport interface MetroBuildOptions extends CommonMetroBuildOptions {\n  config: CompleteGraniteConfig;\n}\n\nexport interface MetroBuildAllOptions {\n  config: CompleteGraniteConfig;\n  concurrency?: number;\n}\n\nexport async function build({ config, ...options }: MetroBuildOptions) {\n  const driver = createPluginHooksDriver(config);\n  await driver.build.pre();\n\n  const buildResult = await buildImpl(config, options);\n\n  await driver.build.post({\n    buildResults: [buildResult],\n  });\n\n  return buildResult;\n}\n\nexport async function buildAll(\n  optionsList: CommonMetroBuildOptions[],\n  { config, concurrency = 2 }: MetroBuildAllOptions\n) {\n  const buildResults: BuildResult[] = [];\n  const semaphore = new Semaphore(Math.min(concurrency, optionsList.length));\n  const driver = createPluginHooksDriver(config);\n  await driver.build.pre();\n\n  await Promise.all(\n    optionsList.map(async (options) => {\n      await semaphore.acquire();\n      try {\n        const buildResult = await buildImpl(config, options);\n        buildResults.push(buildResult);\n      } finally {\n        semaphore.release();\n      }\n    })\n  );\n\n  await driver.build.post({ buildResults });\n\n  return buildResults;\n}\n\nasync function buildImpl(\n  config: CompleteGraniteConfig,\n  { platform, outfile, minify = false, dev = true }: CommonMetroBuildOptions\n) {\n  const context: PluginConfigContext = { command: 'build' };\n  const resolvedConfig = await resolveConfig(config, context);\n  const metroConfig = await getMetroConfig({ rootPath: config.cwd }, resolvedConfig?.metro ?? {});\n  const outfileName = outfile == null ? getDefaultOutfileName(config.entryFile, platform) : outfile;\n  const outfilePath = path.join(config.outdir, outfileName);\n\n  await Metro.runBuild(metroConfig, {\n    platform,\n    entry: config.entryFile,\n    out: outfilePath,\n    minify: minify,\n    dev: dev,\n  });\n\n  return buildResultShim(config, { outfile: outfilePath, platform, minify, dev });\n}\n\nfunction buildResultShim(config: CompleteGraniteConfig, options: Required<CommonMetroBuildOptions>): BuildResult {\n  const unsupportedField = new Proxy({} as any, {\n    get: (_, key) => {\n      throw new Error(`Unsupported field: ${key.toString()}`);\n    },\n  });\n\n  return {\n    platform: options.platform,\n    bundle: unsupportedField,\n    outfile: path.join(config.outdir, options.outfile),\n    outputFiles: [{ path: options.outfile, contents: new Uint8Array(), hash: '', text: '' }],\n    sourcemapOutfile: '',\n    warnings: [],\n    errors: [],\n    extra: unsupportedField,\n    mangleCache: unsupportedField,\n    metafile: unsupportedField,\n    size: 0,\n    duration: 0,\n    totalModuleCount: 0,\n  };\n}\n"
  },
  {
    "path": "packages/mpack/src/metro/enhancedResolver.ts",
    "content": "import Module from 'module';\nimport path from 'path';\nimport type { MetroResolutionContext } from '@granite-js/plugin-core';\nimport enhancedResolve from 'enhanced-resolve';\nimport { RESOLVER_EXPORTS_MAP_CONDITIONS } from '../constants';\n\nconst SINGLETON_MODULES = ['@babel/runtime'];\nconst NATIVE_MODULES = ['react-native', 'react'];\nconst SUPPORTED_BUILTIN_FALLBACKS: Record<string, string> = {\n  http: 'stream-http',\n  https: 'https-browserify',\n  zlib: 'browserify-zlib',\n  url: 'url',\n  util: 'util',\n  path: 'path-browserify',\n  buffer: 'buffer',\n  stream: 'stream-browserify',\n  assert: 'assert',\n  events: 'events',\n};\n\nconst builtinModules = new Set(Module.builtinModules);\nconst resolvers = new Map();\n\ninterface CreateResolverOptions {\n  conditionNames?: string[];\n}\n\nexport function createResolver(rootPath: string, options?: CreateResolverOptions) {\n  function createResolverImpl(context: MetroResolutionContext, platform: string | null, rootPath: string) {\n    const baseExtensions = context.sourceExts.map((extension) => `.${extension}`);\n    let finalExtensions = [...baseExtensions];\n\n    if (context.preferNativePlatform) {\n      finalExtensions = [...baseExtensions.map((extension) => `.native${extension}`), ...finalExtensions];\n    }\n\n    if (platform) {\n      finalExtensions = [...baseExtensions.map((extension) => `.${platform}${extension}`), ...finalExtensions];\n    }\n\n    const resolver = enhancedResolve.create.sync({\n      extensions: finalExtensions,\n      mainFields: context.mainFields,\n      conditionNames: options?.conditionNames ?? [...RESOLVER_EXPORTS_MAP_CONDITIONS, 'require', 'node', 'default'],\n      mainFiles: ['index'],\n      modules: ['node_modules', path.join(rootPath, 'src')],\n    });\n\n    function resolve(context: MetroResolutionContext, request: string) {\n      for (const nativeModule of NATIVE_MODULES) {\n        if (request === nativeModule) {\n          return {\n            type: 'sourceFile',\n            filePath: resolver({}, rootPath, request),\n          };\n        }\n      }\n\n      for (const singletonModule of SINGLETON_MODULES) {\n        if (request.startsWith(singletonModule)) {\n          return {\n            type: 'sourceFile',\n            filePath: resolver({}, rootPath, request),\n          };\n        }\n      }\n\n      if (builtinModules.has(request)) {\n        if (request in SUPPORTED_BUILTIN_FALLBACKS) {\n          const source = SUPPORTED_BUILTIN_FALLBACKS[request]!;\n          return {\n            type: 'sourceFile',\n            filePath: require.resolve(`${source}/`),\n          };\n        }\n\n        request = `${request}/`;\n      }\n\n      try {\n        const resolveResult = resolver({}, path.dirname(context.originModulePath), request);\n\n        return {\n          type: 'sourceFile',\n          filePath: resolveResult,\n        };\n      } catch (error) {\n        const typedError = error as Error;\n\n        // Only catch the error if it was caused by the resolution process\n        if ('code' in typedError && typedError.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED') {\n          typedError.message = `\"${context.originModulePath}\"에서 \"${request}\"를 찾을 수 없었습니다.\\n${typedError.message}`;\n        }\n\n        throw typedError;\n      }\n    }\n\n    return resolve;\n  }\n\n  return function resolve(context: MetroResolutionContext, request: string, platform: string | null) {\n    let resolver = resolvers.get(platform);\n\n    if (resolver == null) {\n      resolver = createResolverImpl(context, platform, rootPath);\n      resolvers.set(platform, resolver);\n    }\n\n    return resolver(context, request, platform);\n  };\n}\n"
  },
  {
    "path": "packages/mpack/src/metro/getMetroConfig.ts",
    "content": "import path from 'path';\nimport type { AdditionalMetroConfig } from '@granite-js/plugin-core';\nimport { getPackageRoot } from '@granite-js/utils';\nimport { createResolver } from './enhancedResolver';\nimport { getMonorepoRoot } from './getMonorepoRoot';\nimport { DEV_SERVER_DEFAULT_PORT, RESOLVER_MAIN_FIELDS, SOURCE_EXTENSIONS } from '../constants';\nimport { getDefaultReactNativePath } from '../utils/getDefaultReactNativePath';\nimport { getDefaultValues } from '../vendors/metro-config/src/defaults';\nimport exclusionList from '../vendors/metro-config/src/defaults/exclusionList';\nimport { mergeConfig } from '../vendors/metro-config/src/loadConfig';\n\nexport interface GetMetroConfig {\n  rootPath: string;\n}\n\nconst INTERNAL_CALLSITES_REGEX = new RegExp(\n  [\n    '/Libraries/Renderer/implementations/.+\\\\.js$',\n    '/Libraries/BatchedBridge/MessageQueue\\\\.js$',\n    '/Libraries/YellowBox/.+\\\\.js$',\n    '/Libraries/LogBox/.+\\\\.js$',\n    '/Libraries/Core/Timers/.+\\\\.js$',\n    '/Libraries/WebSocket/.+\\\\.js$',\n    '/Libraries/vendor/.+\\\\.js$',\n    '/node_modules/react-devtools-core/.+\\\\.js$',\n    '/node_modules/react-refresh/.+\\\\.js$',\n    '/node_modules/scheduler/.+\\\\.js$',\n    '/node_modules/event-target-shim/.+\\\\.js$',\n    '/node_modules/invariant/.+\\\\.js$',\n    '/node_modules/react-native/index.js$',\n    '/metro-runtime/.+\\\\.js$',\n    '^\\\\[native code\\\\]$',\n  ].join('|')\n);\n\nexport async function getMetroConfig({ rootPath }: GetMetroConfig, additionalConfig?: AdditionalMetroConfig) {\n  const defaultConfig = getDefaultValues(rootPath);\n  const reactNativePath = additionalConfig?.reactNativePath ?? getDefaultReactNativePath(rootPath);\n  const resolvedRootPath = await getMonorepoRoot(rootPath);\n  const packageRootPath = await getPackageRoot();\n\n  const resolveRequest =\n    additionalConfig?.resolver?.resolveRequest ??\n    createResolver(rootPath, {\n      conditionNames: additionalConfig?.resolver?.conditionNames,\n    });\n\n  return mergeConfig(defaultConfig, {\n    projectRoot: additionalConfig?.projectRoot || rootPath,\n    watchFolders: [resolvedRootPath, packageRootPath, ...(additionalConfig?.watchFolders || [])],\n    transformerPath: resolveVendors('metro-transform-worker/src'),\n    transformer: {\n      allowOptionalDependencies: true,\n      assetRegistryPath: path.resolve(__dirname, 'assetRegistry.js'),\n      workerPath: resolveVendors('metro/src/DeltaBundler/Worker'),\n      getTransformOptions: async () => ({\n        transform: {\n          experimentalImportSupport: false,\n          inlineRequires: false,\n        },\n      }),\n      babelTransformerPath: require.resolve('metro-react-native-babel-transformer'),\n      asyncRequireModulePath: require.resolve('metro-runtime/src/modules/asyncRequire'),\n      unstable_collectDependenciesPath: resolveVendors('metro/src/ModuleGraph/worker/collectDependencies'),\n      unstable_allowRequireContext: true,\n      /**\n       * @see [WorkerFarm.js](../vendors/metro/src/DeltaBundler/WorkerFarm.js)\n       */\n      INTERNAL__transformSync: additionalConfig?.transformSync,\n      /**\n       * @see [index.js](../vendors/metro-transform-worker/src/index.js)\n       */\n      INTERNAL__babelConfig: additionalConfig?.babelConfig,\n    },\n    resolver: {\n      // metro\n      platforms: ['android', 'ios'],\n      useWatchman: false,\n      resolveRequest,\n      // metro-file-map\n      sourceExts: [...SOURCE_EXTENSIONS.map((extension) => extension.replace(/^\\.?/, '')), 'cjs', 'mjs'],\n      blockList: exclusionList(\n        additionalConfig?.resolver?.blockList ? asArray(additionalConfig.resolver.blockList) : []\n      ),\n      nodeModulesPaths: additionalConfig?.resolver?.nodeModulesPaths || [],\n      extraNodeModules: additionalConfig?.resolver?.extraNodeModules || {},\n      disableHierarchicalLookup: additionalConfig?.resolver?.disableHierarchicalLookup,\n      resolverMainFields: additionalConfig?.resolver?.resolverMainFields ?? RESOLVER_MAIN_FIELDS,\n    },\n    serializer: {\n      getModulesRunBeforeMainModule: () => [\n        require.resolve(path.resolve(reactNativePath, 'Libraries/Core/InitializeCore')),\n      ],\n      getPolyfills: () => [\n        ...require(path.join(reactNativePath, 'rn-get-polyfills'))(),\n        ...(additionalConfig?.serializer?.getPolyfills?.() ?? []),\n      ],\n    },\n    symbolicator: {\n      customizeFrame: (frame: { file: string }) => {\n        const collapse = Boolean(frame.file && INTERNAL_CALLSITES_REGEX.test(frame.file));\n        return { collapse };\n      },\n    },\n    server: {\n      port: DEV_SERVER_DEFAULT_PORT,\n    },\n    reporter: additionalConfig?.reporter,\n    ...(process.env.METRO_RESET_CACHE !== 'false' ? { resetCache: true } : {}),\n  });\n}\n\nfunction resolveVendors(source: string) {\n  const vendorsBase = path.resolve(__dirname, '../vendors');\n  return require.resolve(path.join(vendorsBase, source));\n}\n\nfunction asArray<T>(value: T) {\n  return (Array.isArray(value) ? value : [value]) as T extends any[] ? T : T[];\n}\n"
  },
  {
    "path": "packages/mpack/src/metro/getMonorepoRoot.spec.ts",
    "content": "import path from 'path';\nimport { afterAll, beforeAll, describe, expect, it, MockInstance, vitest } from 'vitest';\nimport { getMonorepoRoot } from './getMonorepoRoot';\n\ndescribe('getMonorepoRoot', () => {\n  describe('워크스페이스 프로젝트가 아닌 경우', () => {\n    beforeAll(() => {\n      vitest.mock('./pnpapi', () => {\n        return {\n          pnpapi: undefined,\n        };\n      });\n    });\n\n    describe('posix', () => {\n      let dirnameSpy: MockInstance;\n\n      beforeAll(() => {\n        dirnameSpy = vitest.spyOn(path, 'dirname');\n        vitest.mock('path', async () => {\n          const path = await vitest.importActual('path');\n\n          return { ...path, default: path.posix };\n        });\n      });\n\n      afterAll(() => {\n        vitest.restoreAllMocks();\n      });\n\n      it('루트 경로까지 탐색한뒤 기존 경로를 반환한다', async () => {\n        const root = await getMonorepoRoot('/foo/bar/baz/my-project');\n        expect(root).toBe('/foo/bar/baz/my-project');\n        expect(dirnameSpy).toBeCalledWith('/foo/bar/baz/my-project');\n        expect(dirnameSpy).toBeCalledWith('/foo/bar/baz');\n        expect(dirnameSpy).toBeCalledWith('/foo/bar');\n        expect(dirnameSpy).toBeCalledWith('/foo');\n        expect(dirnameSpy).toBeCalledWith('/');\n      });\n    });\n\n    describe('windows', () => {\n      let dirnameSpy: MockInstance;\n\n      beforeAll(() => {\n        dirnameSpy = vitest.spyOn(path, 'dirname');\n        vitest.mock('path', async () => {\n          const path = await vitest.importActual('path');\n\n          return { ...path, default: path.win32 };\n        });\n      });\n\n      afterAll(() => {\n        vitest.restoreAllMocks();\n      });\n\n      it('루트 경로까지 탐색한뒤 기존 경로를 반환한다', async () => {\n        const root = await getMonorepoRoot('C:\\\\foo\\\\bar\\\\baz\\\\my-project');\n        expect(root).toBe('C:\\\\foo\\\\bar\\\\baz\\\\my-project');\n        expect(dirnameSpy).toBeCalledWith('C:\\\\foo\\\\bar\\\\baz\\\\my-project');\n        expect(dirnameSpy).toBeCalledWith('C:\\\\foo\\\\bar\\\\baz');\n        expect(dirnameSpy).toBeCalledWith('C:\\\\foo\\\\bar');\n        expect(dirnameSpy).toBeCalledWith('C:\\\\foo');\n        expect(dirnameSpy).toBeCalledWith('C:\\\\');\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/metro/getMonorepoRoot.ts",
    "content": "import fs, { constants } from 'fs/promises';\nimport path from 'path';\nimport { pnpapi } from './pnpapi';\n\n/**\n * 단일 혹은 워크스페이스 기반 프로젝트 환경에서 적절한 루트 경로를 가져오는 유틸입니다\n */\nexport async function getMonorepoRoot(basePath: string) {\n  if (pnpapi) {\n    return pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation ?? null;\n  }\n\n  let curr = basePath;\n  while (curr !== path.dirname(curr)) {\n    if (await isWorkspace(basePath)) {\n      return curr;\n    }\n\n    curr = path.dirname(curr);\n  }\n\n  // 루트 경로까지 탐색해도 workspaces 필드를 가진 `package.json` 파일이 없는 경우,\n  // 워크스페이스 프로젝트가 아닌 단일 프로젝트로 간주하여 기준 경로를 그대로 반환\n  return basePath;\n}\n\nasync function safeReadPackageJson(basePath: string) {\n  try {\n    return JSON.parse(await fs.readFile(path.join(basePath, 'package.json'), 'utf-8'));\n  } catch {\n    /* noop */\n  }\n}\n\nasync function safeAccess(path: string) {\n  try {\n    await fs.access(path, constants.R_OK);\n    return true;\n  } catch {\n    return false;\n  }\n}\n\nasync function isWorkspace(basePath: string) {\n  const packageJson = await safeReadPackageJson(basePath);\n  const hasPackageJson = Boolean(packageJson);\n  const hasWorkspacesField = Array.isArray(packageJson?.workspaces);\n\n  // NPM, Yarn\n  if (hasWorkspacesField) {\n    return true;\n  }\n\n  // pnpm\n  const hasWorkspaceManifest = await safeAccess(path.join(basePath, 'pnpm-workspace.yaml'));\n  if (hasPackageJson && hasWorkspaceManifest) {\n    return true;\n  }\n\n  return false;\n}\n"
  },
  {
    "path": "packages/mpack/src/metro/index.ts",
    "content": "export * from './getMetroConfig';\nexport * as MetroBuildUtils from './build';\n"
  },
  {
    "path": "packages/mpack/src/metro/pnpapi.ts",
    "content": "import type { getPackageInformation, topLevel } from 'pnpapi';\n\nexport interface PnpApi {\n  getPackageInformation: typeof getPackageInformation;\n  topLevel: typeof topLevel;\n}\n\nexport let pnpapi: PnpApi | undefined;\n\ntry {\n  pnpapi = require('pnpapi');\n} catch {\n  /* noop */\n}\n"
  },
  {
    "path": "packages/mpack/src/operations/OpenDebuggerKeyboardHandler.ts",
    "content": "import { styleText } from 'util';\n\ntype Reporter = {\n  update: (event: { type: string; [key: string]: unknown }) => void;\n};\n\ntype PageDescription = Readonly<{\n  id: string;\n  title: string;\n  description: string;\n}>;\n\nexport default class OpenDebuggerKeyboardHandler {\n  #devServerUrl: string;\n  #reporter: Reporter;\n  #targetsShownForSelection: ReadonlyArray<PageDescription> | null = null;\n\n  constructor({ devServerUrl, reporter }: { devServerUrl: string; reporter: Reporter }) {\n    this.#devServerUrl = devServerUrl;\n    this.#reporter = reporter;\n  }\n\n  async #tryOpenDebuggerForTarget(target: PageDescription): Promise<void> {\n    this.#targetsShownForSelection = null;\n    this.#clearTerminalMenu();\n\n    try {\n      const fetchFn = (globalThis as { fetch?: (input: any, init?: any) => Promise<any> }).fetch;\n      if (fetchFn == null) {\n        throw new Error('Global fetch is not available');\n      }\n\n      await fetchFn(new URL(`/open-debugger?target=${encodeURIComponent(target.id)}`, this.#devServerUrl).href, {\n        method: 'POST',\n      });\n    } catch (error) {\n      this.#log('error', 'Failed to open debugger for %s (%s): %s', target.title, target.description, 'Network error');\n      if (error instanceof Error && error.cause != null) {\n        this.#log('error', 'Cause: %s', error.cause);\n      }\n      this.#clearTerminalMenu();\n    }\n  }\n\n  async handleOpenDebugger(): Promise<void> {\n    this.#setTerminalMenu('Fetching available debugging targets...');\n    this.#targetsShownForSelection = null;\n\n    try {\n      const fetchFn = (globalThis as { fetch?: (input: any, init?: any) => Promise<any> }).fetch;\n      if (fetchFn == null) {\n        throw new Error('Global fetch is not available');\n      }\n\n      const response = await fetchFn(new URL('/json/list', this.#devServerUrl).href, { method: 'POST' });\n      if (response.status !== 200) {\n        throw new Error(`Unexpected status code: ${response.status}`);\n      }\n      const targets = (await response.json()) as ReadonlyArray<PageDescription>;\n      if (!Array.isArray(targets)) {\n        throw new Error('Expected array.');\n      }\n\n      if (targets.length === 0) {\n        this.#log('warn', 'No connected targets');\n        this.#clearTerminalMenu();\n      } else if (targets.length === 1) {\n        const target = targets[0];\n        if (target) {\n          void this.#tryOpenDebuggerForTarget(target);\n        } else {\n          this.#clearTerminalMenu();\n        }\n      } else {\n        this.#targetsShownForSelection = targets;\n\n        if (targets.length > 9) {\n          this.#log('warn', '10 or more debug targets available, showing the first 9.');\n        }\n\n        this.#setTerminalMenu(\n          `Multiple debug targets available, please select:\\n  ${targets\n            .slice(0, 9)\n            .map(({ title }, index) => `${styleText(['white', 'inverse'], ` ${index + 1} `)} - \"${title}\"`)\n            .join('\\n  ')}`\n        );\n      }\n    } catch (error) {\n      const message = error instanceof Error ? error.message : String(error);\n      this.#log('error', `Failed to fetch debug targets: ${message}`);\n      this.#clearTerminalMenu();\n    }\n  }\n\n  maybeHandleTargetSelection(keyName: string): boolean {\n    if (keyName >= '1' && keyName <= '9') {\n      const targetIndex = Number(keyName) - 1;\n      if (this.#targetsShownForSelection != null && targetIndex < this.#targetsShownForSelection.length) {\n        const target = this.#targetsShownForSelection[targetIndex];\n        if (target) {\n          void this.#tryOpenDebuggerForTarget(target);\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n\n  dismiss() {\n    this.#clearTerminalMenu();\n    this.#targetsShownForSelection = null;\n  }\n\n  #log(level: 'info' | 'warn' | 'error', ...data: unknown[]): void {\n    this.#reporter.update({\n      type: 'unstable_server_log',\n      level,\n      data,\n    });\n  }\n\n  #setTerminalMenu(message: string) {\n    this.#reporter.update({\n      type: 'unstable_server_menu_updated',\n      message,\n    });\n  }\n\n  #clearTerminalMenu() {\n    this.#reporter.update({\n      type: 'unstable_server_menu_cleared',\n    });\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/operations/attachKeyHandlers.ts",
    "content": "import readline from 'readline';\nimport { ReadStream } from 'tty';\nimport { styleText } from 'util';\nimport OpenDebuggerKeyboardHandler from './OpenDebuggerKeyboardHandler';\n\nconst CTRL_C = '\\u0003';\nconst CTRL_D = '\\u0004';\nconst RELOAD_TIMEOUT = 500;\n\ntype KeyEvent = {\n  sequence?: string;\n  name?: string;\n  ctrl?: boolean;\n  meta?: boolean;\n  shift?: boolean;\n};\n\ntype MessageSocketEndpoint = {\n  broadcast: (type: string, params?: Record<string, unknown> | null) => void;\n};\n\ntype Reporter = {\n  update: (event: { type: string; [key: string]: unknown }) => void;\n};\n\nconst throttle = (callback: () => void, timeout: number) => {\n  let previousCallTimestamp = 0;\n  return () => {\n    const currentCallTimestamp = Date.now();\n    if (currentCallTimestamp - previousCallTimestamp > timeout) {\n      previousCallTimestamp = currentCallTimestamp;\n      callback();\n    }\n  };\n};\n\nexport default function attachKeyHandlers({\n  devServerUrl,\n  messageSocket,\n  reporter,\n}: {\n  devServerUrl: string;\n  messageSocket: MessageSocketEndpoint;\n  reporter: Reporter;\n}) {\n  if (process.stdin.isTTY !== true) {\n    reporter.update({\n      type: 'unstable_server_log',\n      level: 'info',\n      data: 'Interactive mode is not supported in this environment',\n    });\n    return;\n  }\n\n  readline.emitKeypressEvents(process.stdin);\n  setRawMode(true);\n\n  const reload = throttle(() => {\n    reporter.update({\n      type: 'unstable_server_log',\n      level: 'info',\n      data: 'Reloading connected app(s)...',\n    });\n    messageSocket.broadcast('reload', null);\n  }, RELOAD_TIMEOUT);\n\n  const openDebuggerKeyboardHandler = new OpenDebuggerKeyboardHandler({\n    reporter,\n    devServerUrl,\n  });\n\n  process.stdin.on('keypress', (_str: string, key: KeyEvent) => {\n    void _str;\n    const keyName = key?.name;\n    if (keyName && openDebuggerKeyboardHandler.maybeHandleTargetSelection(keyName)) {\n      return;\n    }\n\n    switch (key?.sequence) {\n      case 'r':\n        reload();\n        break;\n      case 'd':\n        reporter.update({\n          type: 'unstable_server_log',\n          level: 'info',\n          data: 'Opening Dev Menu...',\n        });\n        messageSocket.broadcast('devMenu', null);\n        break;\n      case 'j':\n        void openDebuggerKeyboardHandler.handleOpenDebugger();\n        break;\n      case CTRL_C:\n      case CTRL_D:\n        openDebuggerKeyboardHandler.dismiss();\n        reporter.update({\n          type: 'unstable_server_log',\n          level: 'info',\n          data: 'Stopping server',\n        });\n        setRawMode(false);\n        process.stdin.pause();\n        process.emit('SIGINT');\n        process.exit();\n    }\n  });\n\n  reporter.update({\n    type: 'unstable_server_log',\n    level: 'info',\n    data: `Key commands available:\\n\\n  ${styleText(['bold', 'inverse'], ' r ')} - reload app(s)\\n  ${styleText(\n      ['bold', 'inverse'],\n      ' d '\n    )} - open Dev Menu\\n  ${styleText(['bold', 'inverse'], ' j ')} - open DevTools\\n`,\n  });\n}\n\nfunction setRawMode(enable: boolean) {\n  if (!(process.stdin instanceof ReadStream)) {\n    throw new Error('process.stdin must be a readable stream to modify raw mode');\n  }\n  process.stdin.setRawMode(enable);\n}\n"
  },
  {
    "path": "packages/mpack/src/operations/build.ts",
    "content": "import * as fs from 'fs/promises';\nimport * as path from 'path';\nimport {\n  createPluginHooksDriver,\n  resolveConfig,\n  type PluginConfigContext,\n  type BuildConfig,\n  type CompleteGraniteConfig,\n} from '@granite-js/plugin-core';\nimport { Semaphore } from 'es-toolkit';\nimport { Bundler } from '../bundler';\nimport { Performance, printSummary } from '../performance';\nimport type { BundlerConfig, PluginFactory } from '../types';\nimport { isBuildSuccess } from '../utils/buildResult';\nimport { getDefaultOutfileName } from '../utils/getDefaultOutfileName';\nimport { printErrors } from '../utils/printErrors';\nimport { isFulfilled, isRejected } from '../utils/promise';\nimport { writeBundle, writeMetafile } from '../utils/writeBundle';\n\ntype CommonBuildOptions = Omit<BundlerConfig, 'rootDir' | 'buildConfig'> & Pick<BuildConfig, 'platform' | 'outfile'>;\n\nexport interface BuildOptions extends CommonBuildOptions {\n  config: CompleteGraniteConfig;\n  plugins?: PluginFactory[];\n}\n\nexport interface BuildAllOptions {\n  config: CompleteGraniteConfig;\n  concurrency?: number;\n  plugins?: PluginFactory[];\n}\n\nexport async function build({ config, plugins = [], ...options }: BuildOptions) {\n  const driver = createPluginHooksDriver(config);\n  await driver.build.pre();\n\n  const buildResult = await buildImpl(config, plugins, options);\n\n  await driver.build.post({ buildResults: [buildResult] });\n\n  return buildResult;\n}\n\nexport async function buildAll(\n  optionsList: CommonBuildOptions[],\n  { config, plugins = [], concurrency = 2 }: BuildAllOptions\n) {\n  const semaphore = new Semaphore(Math.min(concurrency, optionsList.length));\n  const driver = createPluginHooksDriver(config);\n  await driver.build.pre();\n\n  const taskResults = await Promise.allSettled(\n    optionsList.map(async (options) => {\n      await semaphore.acquire();\n      try {\n        const buildResult = await buildImpl(config, plugins, options);\n        return buildResult;\n      } finally {\n        semaphore.release();\n      }\n    })\n  );\n\n  const errors = taskResults.filter(isRejected);\n  if (errors.length) {\n    printErrors(errors);\n    throw new Error('Build failed');\n  }\n\n  const buildResults = taskResults.filter(isFulfilled).map((result) => result.value);\n\n  await driver.build.post({ buildResults });\n\n  return buildResults;\n}\n\nasync function buildImpl(\n  config: CompleteGraniteConfig,\n  plugins: PluginFactory[],\n  { platform, outfile, cache = true, dev = true, metafile = false }: CommonBuildOptions\n) {\n  const context: PluginConfigContext = { command: 'build' };\n  const { metro: _metroConfig, devServer: _devServerConfig, ...buildConfig } = await resolveConfig(config, context);\n  const outfileName = outfile == null ? getDefaultOutfileName(config.entryFile, platform) : outfile;\n  const outfilePath = path.resolve(config.outdir, outfileName);\n  const bundler = new Bundler({\n    rootDir: config.cwd,\n    cache,\n    dev,\n    metafile,\n    buildConfig: {\n      platform,\n      entry: config.entryFile,\n      outfile: outfilePath,\n      ...buildConfig,\n    },\n  });\n\n  for (const plugin of plugins) {\n    bundler.addPlugin(plugin());\n  }\n\n  const buildResult = await bundler.build();\n\n  if (isBuildSuccess(buildResult)) {\n    await writeBundle(buildResult.outfile, buildResult.bundle);\n\n    if (buildResult.metafile != null) {\n      await writeMetafile(buildResult.outfile, buildResult.metafile);\n    }\n\n    const performanceSummary = Performance.getSummary();\n    if (performanceSummary != null) {\n      printSummary(performanceSummary);\n      await fs.writeFile(path.join(config.cwd, 'perf.json'), JSON.stringify(performanceSummary, null, 2), 'utf-8');\n    }\n\n    return buildResult;\n  } else {\n    throw new Error('Build failed');\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/operations/index.ts",
    "content": "export * as BuildUtils from './build';\nexport * from './serve';\n"
  },
  {
    "path": "packages/mpack/src/operations/keyReporter.ts",
    "content": "export const keyReporter = {\n  update(event: { type: string; [key: string]: unknown }) {\n    switch (event.type) {\n      case 'unstable_server_log': {\n        const level = typeof event.level === 'string' ? event.level : 'info';\n        const data = event.data;\n        const output =\n          typeof data === 'string' ? data : Array.isArray(data) ? data.map(String).join(' ') : String(data);\n\n        if (level === 'error') {\n          console.error(output);\n        } else if (level === 'warn') {\n          console.warn(output);\n        } else {\n          console.log(output);\n        }\n        break;\n      }\n      case 'unstable_server_menu_updated': {\n        const message = event.message;\n        if (typeof message === 'string') {\n          console.log(message);\n        }\n        break;\n      }\n      case 'unstable_server_menu_cleared':\n        break;\n      default:\n        break;\n    }\n  },\n};\n"
  },
  {
    "path": "packages/mpack/src/operations/serve.ts",
    "content": "import {\n  createPluginHooksDriver,\n  resolveConfig,\n  type CompleteGraniteConfig,\n  type PluginConfigContext,\n} from '@granite-js/plugin-core';\nimport { createDevMiddleware } from '@react-native/dev-middleware';\nimport { createDevServerMiddleware } from '@react-native-community/cli-server-api';\nimport Debug from 'debug';\nimport attachKeyHandlers from './attachKeyHandlers';\nimport { DEV_SERVER_DEFAULT_HOST, DEV_SERVER_DEFAULT_PORT } from '../constants';\nimport { keyReporter } from './keyReporter';\nimport { getMetroConfig } from '../metro/getMetroConfig';\nimport { printLogo } from '../utils/printLogo';\nimport { printServerUrl } from '../utils/printServerUrl';\nimport { getModule } from '../vendors';\n\nconst debug = Debug('cli:start');\n\ninterface RunServerConfig {\n  config: CompleteGraniteConfig;\n  host?: string;\n  port?: number;\n  onServerReady?: () => Promise<void> | void;\n}\n\nconst { Metro, TerminalReporter } = getModule('metro');\nconst { Terminal } = getModule('metro-core');\nconst { mergeConfig } = getModule('metro-config');\n\ntype DevServerMiddleware = {\n  middleware: any;\n  websocketEndpoints: Record<string, any>;\n  messageSocketEndpoint: {\n    broadcast: (method: string, params?: Record<string, unknown> | null) => void;\n  };\n  eventsSocketEndpoint: {\n    reportEvent: (event: any) => void;\n  };\n};\n\nexport async function runServer({\n  config,\n  host = DEV_SERVER_DEFAULT_HOST,\n  port = DEV_SERVER_DEFAULT_PORT,\n  onServerReady,\n}: RunServerConfig) {\n  // Since eventsSocketEndpoint.reportEvent cannot be assigned first due to the control flow,\n  // we reference it through an object\n  const devServerHostname = host === '0.0.0.0' ? 'localhost' : host;\n  const devServerUrl = new URL(`http://${devServerHostname}:${port}`).origin;\n  let keyHandlersAttached = false;\n\n  const ref: Partial<{\n    reportEvent: (event: any) => void;\n    enableStdinWatchMode: () => void;\n  }> = {};\n\n  const driver = createPluginHooksDriver(config);\n  const terminal = new Terminal(process.stdout);\n  const terminalReporter = new TerminalReporter(terminal);\n\n  const context: PluginConfigContext = { command: 'serve' };\n  const resolvedConfig = await resolveConfig(config, context);\n  const { middlewares = [], inspectorProxy, ...additionalMetroConfig } = resolvedConfig?.metro ?? {};\n  const baseConfig = await getMetroConfig({ rootPath: config.cwd }, additionalMetroConfig);\n  const metroConfig = mergeConfig(baseConfig, {\n    server: { port },\n  });\n  metroConfig.server.runInspectorProxy = false;\n\n  const {\n    middleware,\n    websocketEndpoints: communityWebsocketEndpoints,\n    eventsSocketEndpoint,\n    messageSocketEndpoint,\n  } = createDevServerMiddleware({\n    host,\n    port,\n    watchFolders: metroConfig.watchFolders,\n  }) as DevServerMiddleware;\n\n  const reporter = {\n    async update(event: any) {\n      debug('Reporter event', event);\n\n      terminalReporter.update(event);\n      ref.reportEvent?.(event);\n\n      if (baseConfig.reporter?.update) {\n        baseConfig.reporter.update(event);\n      }\n\n      switch (event.type) {\n        case 'initialize_started':\n          printLogo();\n          break;\n\n        case 'initialize_done':\n          await driver.devServer.post({ host, port });\n          printServerUrl({ host, port });\n          if (!keyHandlersAttached) {\n            keyHandlersAttached = true;\n            attachKeyHandlers({\n              devServerUrl,\n              messageSocket: messageSocketEndpoint,\n              reporter: keyReporter,\n            });\n          }\n          await onServerReady?.();\n          break;\n\n        default:\n          break;\n      }\n    },\n  };\n\n  metroConfig.reporter = reporter;\n\n  const { middleware: debuggerMiddleware, websocketEndpoints: debuggerWebSocketEndpoints } = createDevMiddleware({\n    serverBaseUrl: devServerUrl,\n  });\n\n  middleware.use(debuggerMiddleware);\n\n  const customEnhanceMiddleware = metroConfig.server.enhanceMiddleware;\n\n  // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n  // @ts-ignore\n  metroConfig.server.enhanceMiddleware = (metroMiddleware: any, server: any) => {\n    if (customEnhanceMiddleware) {\n      metroMiddleware = customEnhanceMiddleware(metroMiddleware, server);\n    }\n\n    for (const item of middlewares) {\n      middleware.use(item);\n    }\n\n    return middleware.use(metroMiddleware);\n  };\n\n  ref.reportEvent = eventsSocketEndpoint.reportEvent;\n\n  await driver.devServer.pre({ host, port });\n\n  const serverInstance = await Metro.runServer(metroConfig, {\n    host,\n    websocketEndpoints: {\n      ...communityWebsocketEndpoints,\n      ...debuggerWebSocketEndpoints,\n    },\n    inspectorProxyDelegate: inspectorProxy?.delegate,\n  });\n\n  // In Node 8, the default keep-alive for an HTTP connection is 5 seconds. In\n  // early versions of Node 8, this was implemented in a buggy way which caused\n  // some HTTP responses (like those containing large JS bundles) to be\n  // terminated early.\n  //\n  // As a workaround, arbitrarily increase the keep-alive from 5 to 30 seconds,\n  // which should be enough to send even the largest of JS bundles.\n  //\n  // For more info: https://github.com/nodejs/node/issues/13391\n  //\n  serverInstance.keepAliveTimeout = 30000;\n}\n"
  },
  {
    "path": "packages/mpack/src/performance/Performance.ts",
    "content": "import { performance, type PerformanceMeasure, type MarkOptions } from 'perf_hooks';\nimport { noop } from 'es-toolkit';\n\nexport interface PerfStatic {\n  trace: (name: string, options?: MarkOptions) => Perf;\n  withTrace: <T>(\n    task: () => T | Promise<T>,\n    config: {\n      name: string;\n      startOptions?: MarkOptions;\n      stopOptions?: (result: Awaited<T>) => MarkOptions;\n    }\n  ) => Promise<T>;\n  getSummary: () => Record<\n    string,\n    {\n      averageDuration: number;\n      records: PerfResult[];\n    }\n  > | null;\n}\n\nexport interface Perf {\n  stop: (options?: MarkOptions) => void;\n}\n\nexport interface PerfResult {\n  sequence: number;\n  startTime: number;\n  duration: number;\n  detail?: PerformanceMeasure['detail'];\n}\n\nenum TracePhase {\n  Start = 'start',\n  End = 'end',\n  Measure = 'measure',\n}\n\n// 동시 다발적으로 trace 가 호출될 경우 각각의 trace를 고유한 상태로 유지하기 위한 시퀀스 값\nconst sequences: Record<string, number> = {};\n\n// 수집한 trace 데이터\nconst records: Record<\n  string,\n  {\n    sequence: number;\n    duration: PerformanceMeasure['duration'];\n    name: PerformanceMeasure['name'];\n    startTime: PerformanceMeasure['startTime'];\n    detail: Record<string, unknown>;\n  }\n> = {};\n\nfunction getName(name: string, phase: TracePhase, sequence: number) {\n  return `${name}.${phase}#${sequence}`;\n}\n\nfunction parseName(name: string) {\n  const [traceName] = name.split('.');\n  return traceName ?? '';\n}\n\nconst PerformanceImpl: PerfStatic = {\n  trace(name: string, options?: MarkOptions) {\n    const sequence = typeof sequences[name] === 'number' ? ++sequences[name] : (sequences[name] = 0);\n    const startName = getName(name, TracePhase.Start, sequence);\n    const endName = getName(name, TracePhase.End, sequence);\n    const measureName = getName(name, TracePhase.Measure, sequence);\n    const startMark = performance.mark(startName, options);\n\n    return {\n      stop: (options?: MarkOptions) => {\n        const endMark = performance.mark(endName, options);\n        const measureResult = performance.measure(measureName, startName, endName);\n\n        records[measureName] = {\n          sequence,\n          duration: measureResult.duration,\n          name: measureResult.name,\n          startTime: measureResult.startTime,\n          detail: {\n            ...(startMark.detail ?? {}),\n            ...(endMark.detail ?? {}),\n          },\n        };\n\n        performance.clearMarks(startName);\n        performance.clearMarks(endName);\n        performance.clearMeasures(measureName);\n      },\n    };\n  },\n  async withTrace(task, config) {\n    const trace = PerformanceImpl.trace(config.name, config.startOptions);\n\n    try {\n      const result = await task();\n      const stopMarkOptions = config.stopOptions?.(result);\n      trace.stop(stopMarkOptions);\n      return result;\n    } catch (error) {\n      trace.stop({ detail: { error } });\n      throw error;\n    }\n  },\n  getSummary() {\n    const results: ReturnType<PerfStatic['getSummary']> = {};\n\n    Object.entries(records).map(([measureName, performanceMeasure]) => {\n      const name = parseName(measureName);\n      const result = {\n        sequence: performanceMeasure.sequence,\n        startTime: performanceMeasure.startTime,\n        duration: performanceMeasure.duration,\n        ...(Object.keys(performanceMeasure.detail).length > 0 ? { detail: performanceMeasure.detail } : null),\n      };\n\n      if (results[name] === undefined) {\n        results[name] = { averageDuration: 0, records: [result] };\n      } else {\n        results[name]!.records.push(result);\n      }\n    });\n\n    Object.values(results).forEach((result) => {\n      result.averageDuration = result.records.reduce((acc, curr) => acc + curr.duration, 0) / result.records.length;\n    });\n\n    return results;\n  },\n};\n\nconst PerformanceShim: PerfStatic = {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  trace(_name: string) {\n    return { stop: noop };\n  },\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  async withTrace(task, _config) {\n    const result = await task();\n    return result;\n  },\n  getSummary() {\n    return null;\n  },\n};\n\n/**\n * Mpack 번들러 성능 측정을 위한 플래그\n *\n * - 빌드 이후 요약 로그가 기록됨\n * - 모든 Trace 정보를 포함하는 `perf.json` 파일이 생성됨\n *\n * ```\n * MPACK_TRACE=1 yarn granite bundle\n * ```\n */\nconst perfTraceEnabled = process.env.MPACK_TRACE === '1';\n\nexport const Performance = perfTraceEnabled ? PerformanceImpl : PerformanceShim;\n"
  },
  {
    "path": "packages/mpack/src/performance/index.ts",
    "content": "export * from './Performance';\nexport { printSummary } from './printSummary';\n"
  },
  {
    "path": "packages/mpack/src/performance/printSummary.ts",
    "content": "import chalk from 'chalk';\nimport { PerfStatic } from './Performance';\n\nexport interface PrintSummaryOptions {\n  limit?: number;\n}\n\nexport function printSummary(\n  summary: NonNullable<ReturnType<PerfStatic['getSummary']>>,\n  options?: PrintSummaryOptions\n) {\n  const { limit = 30 } = options ?? {};\n\n  Object.entries(summary).forEach(([category, result]) => {\n    const records = result.records.sort((a, b) => b.duration - a.duration).slice(0, limit);\n\n    console.log(\n      `╭─ Performance mark: ${chalk.blue.bold(category)} ${chalk.gray(`(Average duration: ${normalizeDuration(result.averageDuration)}ms)`)}`\n    );\n\n    records.forEach(({ sequence, duration, detail }, index) => {\n      console.log(`│ ${chalk.cyan(`Record #${index + 1}`)} (Duration: ${normalizeDuration(duration)}ms)`);\n      Object.entries(detail ?? {}).forEach(([key, value]) => {\n        console.log(`│ ├─ ${chalk.gray(`${key}: ${value}`)}`);\n      });\n      console.log(`│ ╰─ Sequence: ${sequence}`);\n    });\n\n    console.log(`╰─ Total records: ${result.records.length}`);\n  });\n}\n\nfunction normalizeDuration(duration: number) {\n  return duration.toFixed(8);\n}\n"
  },
  {
    "path": "packages/mpack/src/plugins/index.ts",
    "content": "export * from './statusPlugin';\n"
  },
  {
    "path": "packages/mpack/src/plugins/statusPlugin.ts",
    "content": "import { delay, noop } from 'es-toolkit';\nimport { persistentStorage } from '../shared/PersistentStorage';\nimport { Plugin, PluginHandlers } from '../types';\nimport { printSummary } from '../utils/printSummary';\nimport { BuildStatusProgressBar, createProgressBar } from '../utils/progressBar';\n\nexport function statusPlugin(handlers?: PluginHandlers): Plugin {\n  let progressBar: BuildStatusProgressBar;\n  let totalModuleCount: number | undefined;\n\n  return {\n    name: 'dev-server-status-plugin',\n    prepare(config) {\n      if (progressBar != null) {\n        return;\n      }\n\n      progressBar = createProgressBar(config.buildConfig.platform);\n      totalModuleCount = persistentStorage.getData()[this.id]?.totalModuleCount;\n    },\n    buildStart() {\n      // `0 / 0 = NaN` 방지를 위해 total 값을 1로 지정\n      progressBar?.start(0, totalModuleCount ?? 1);\n      handlers?.onStart?.();\n    },\n    buildEnd(result) {\n      if ('bundle' in result) {\n        totalModuleCount = result.totalModuleCount;\n        persistentStorage.setData({ [this.id]: { totalModuleCount: result.totalModuleCount } });\n        persistentStorage.saveData();\n      } else {\n        totalModuleCount = undefined;\n      }\n\n      progressBar.hide();\n      progressBar.remove();\n      handlers?.onEnd?.();\n\n      delay(100)\n        .then(() => printSummary(result))\n        .catch(noop);\n    },\n    load: (moduleCount) => {\n      progressBar.update(moduleCount, totalModuleCount);\n    },\n  };\n}\n"
  },
  {
    "path": "packages/mpack/src/shared/PersistentStorage.ts",
    "content": "import * as fs from 'fs';\nimport * as path from 'path';\nimport { toMerged } from 'es-toolkit';\nimport { MPACK_DATA_DIR } from '../constants';\nimport { INTERNAL__Id } from '../types';\n\ninterface PersistentData {\n  [id: INTERNAL__Id]: {\n    /**\n     * Resolved module count (used for progress bar progress calculation)\n     */\n    totalModuleCount: number;\n  };\n}\n\nclass PersistentStorage {\n  private data: PersistentData = {};\n\n  constructor() {\n    this.loadData();\n  }\n\n  getData() {\n    return this.data;\n  }\n\n  setData(newData: Partial<PersistentData>) {\n    this.data = toMerged(this.data, newData);\n  }\n\n  loadData() {\n    try {\n      fs.accessSync(MPACK_DATA_DIR, fs.constants.R_OK | fs.constants.W_OK);\n    } catch {\n      fs.mkdirSync(MPACK_DATA_DIR, { recursive: true });\n    }\n\n    try {\n      this.data = JSON.parse(fs.readFileSync(path.join(MPACK_DATA_DIR, '.mpack'), 'utf-8')) as PersistentData;\n    } catch {\n      // noop\n    }\n  }\n\n  async saveData() {\n    try {\n      await fs.promises.writeFile(path.join(MPACK_DATA_DIR, '.mpack'), JSON.stringify(this.data, null, 2), 'utf-8');\n    } catch {\n      // noop\n    }\n  }\n}\n\nexport const persistentStorage = new PersistentStorage();\n"
  },
  {
    "path": "packages/mpack/src/testing/buildWithEsbuild.ts",
    "content": "import assert from 'assert';\nimport type { BuildConfig } from '@granite-js/plugin-core';\nimport { omit, toMerged } from 'es-toolkit';\nimport * as esbuild from 'esbuild';\n\nexport async function buildWithEsbuild(buildConfig: BuildConfig, options?: esbuild.BuildOptions) {\n  let esbuildOptions = options;\n\n  if (buildConfig?.esbuild) {\n    esbuildOptions = toMerged(omit(buildConfig.esbuild, ['prelude']), options ?? {});\n  }\n\n  const result = await esbuild.build({\n    ...esbuildOptions,\n    entryPoints: [buildConfig.entry],\n    bundle: true,\n    write: false,\n  });\n\n  const output = result.outputFiles?.[0]?.contents;\n\n  assert(output, 'output contents is empty');\n\n  return Buffer.from(output).toString();\n}\n"
  },
  {
    "path": "packages/mpack/src/testing/evaluate.ts",
    "content": "import execa from 'execa';\n\nexport async function evaluate(code: string) {\n  const result = await execa(`node`, [`-p`, code]);\n\n  return result.stdout.trim();\n}\n"
  },
  {
    "path": "packages/mpack/src/testing/fixtures/build-with-config.js",
    "content": "const fs = require('fs/promises');\nconst mpack = require('@granite-js/mpack');\n\n(async function () {\n  const rootDir = __dirname;\n  const bundler = new mpack.Bundler({\n    rootDir,\n    cache: false,\n    dev: false,\n    metafile: false,\n    buildConfig: $config,\n  });\n\n  const buildResult = await bundler.build();\n\n  await fs.writeFile(buildResult.outfile, buildResult.bundle.source.text);\n})();\n"
  },
  {
    "path": "packages/mpack/src/testing/index.ts",
    "content": "export * from './buildWithEsbuild';\nexport * from './evaluate';\nexport * from './initializeFixture';\n"
  },
  {
    "path": "packages/mpack/src/testing/initializeFixture.ts",
    "content": "import fs from 'fs';\nimport path from 'path';\nimport type { BuildConfig } from '@granite-js/plugin-core';\nimport execa from 'execa';\nimport { createTmpDir } from './tempDir';\nimport { Cache } from '../cache';\n\nconst ROOT = path.resolve(__dirname, '..', '..');\nconst PACKED_PATH = path.resolve(ROOT, 'package.tgz');\n\n// Root 에 위치한 .yarnrc.yml 값과 일치하도록 구성\nconst REPOSITORY_CONFIGS = {\n  enableGlobalCache: [JSON.stringify(false)],\n};\n\nexport type FixtureTestContext = Awaited<ReturnType<typeof initializeFixture>>;\n\nexport async function initializeFixture() {\n  const fixtureDir = await createTmpDir();\n\n  await initializeYarn();\n  await installMpack();\n\n  async function $(command: string, args?: string[], options: execa.Options = {}) {\n    return await execa(command, args, { cwd: fixtureDir, ...options });\n  }\n\n  async function initializeYarn() {\n    await $('yarn', ['set', 'version', '4.9.1']);\n    await $('yarn', ['init', '-y', '-w']);\n    await Object.entries(REPOSITORY_CONFIGS).reduce((prev, [name, value]) => {\n      return prev.then(() => {\n        return $('yarn', ['config', 'set', name, ...value]).then(() => {});\n      });\n    }, Promise.resolve());\n  }\n\n  function resolvePath(p: string) {\n    return path.resolve(fixtureDir, p);\n  }\n\n  function applyPlaceholders(content: string, placeholders?: Record<string, string>) {\n    return Object.entries(placeholders ?? {}).reduce((prev, [key, value]) => {\n      return prev.replaceAll(`$${key}`, value);\n    }, content);\n  }\n\n  async function installMpack() {\n    await $('yarn', ['add', `@granite-js/mpack@${PACKED_PATH}`]);\n  }\n\n  async function installDependencies(...deps: string[]) {\n    await $('yarn', ['add', ...deps]);\n  }\n\n  async function getVirtualPath(request: string) {\n    const virtualPath = await $('node', ['-e', `console.log(require.resolve('${request}'));`]);\n    return virtualPath.stdout.trim();\n  }\n\n  async function buildWithConfig(config: BuildConfig, options?: execa.Options) {\n    const buildScriptPath = path.resolve(fixtureDir, 'build.js');\n    const buildScript = await fs.promises.readFile(path.resolve(__dirname, './fixtures/build-with-config.js'), {\n      encoding: 'utf-8',\n    });\n\n    const VIRTUAL_INITIALIZE_CORE_PROTOCOL = 'virtual-initialize-core';\n    const reactNativePath = path.dirname(await getVirtualPath('react-native'));\n    const initializeCorePath = path.join(reactNativePath, 'Libraries/Core/InitializeCore.js');\n    const replaces = {\n      __load_fn__: `() => ({ loader: 'js', contents: '// noop' })`,\n    };\n\n    /**\n     * In testing environment, we need to replace the `InitializeCore.js` with a virtual protocol\n     * because cannot evaluate React Native specific code in Node.js environment.\n     */\n    config.resolver = {\n      ...config.resolver,\n      alias: [\n        {\n          from: `prelude:${initializeCorePath}`,\n          to: `${VIRTUAL_INITIALIZE_CORE_PROTOCOL}:noop`,\n          exact: false,\n        },\n        ...(config.resolver?.alias ?? []),\n      ],\n      protocols: {\n        ...config.resolver?.protocols,\n        [VIRTUAL_INITIALIZE_CORE_PROTOCOL]: {\n          // @ts-expect-error -- function cannot be serialized\n          load: '__load_fn__',\n        },\n      },\n    };\n\n    const serializedConfig = Object.entries(replaces).reduce(\n      (prev, [key, value]) => prev.replaceAll(`\"${key}\"`, value),\n      JSON.stringify(config, null, 2)\n    );\n\n    await fs.promises.writeFile(buildScriptPath, applyPlaceholders(buildScript, { config: serializedConfig }), 'utf-8');\n\n    await $('node', [buildScriptPath], options);\n  }\n\n  async function readFile(relativePath: string) {\n    return await fs.promises.readFile(path.resolve(fixtureDir, relativePath), 'utf-8');\n  }\n\n  async function writeFile(relativePath: string, content: string) {\n    await fs.promises.writeFile(path.resolve(fixtureDir, relativePath), content, 'utf-8');\n  }\n\n  async function loadFixtures(basePath: string, fixtureName: string, placeholders?: Record<string, string>) {\n    const fixturePath = path.join(basePath, 'fixtures', fixtureName);\n    const files = await fs.promises.readdir(fixturePath, { encoding: 'utf-8' });\n\n    await Promise.all(\n      files.map(async (filename) => {\n        const content = applyPlaceholders(\n          await fs.promises.readFile(path.join(fixturePath, filename), { encoding: 'utf-8' }),\n          placeholders\n        );\n\n        await writeFile(filename, content);\n      })\n    );\n  }\n\n  async function cleanup() {\n    await fs.promises.rm(fixtureDir, { recursive: true, force: true });\n  }\n\n  Cache.BASE_CACHE_DIR = path.join(fixtureDir, '.cache');\n\n  return {\n    dir: fixtureDir,\n    $,\n    installDependencies,\n    readFile,\n    writeFile,\n    loadFixtures,\n    buildWithConfig,\n    resolvePath,\n    cleanup,\n  };\n}\n"
  },
  {
    "path": "packages/mpack/src/testing/tempDir.ts",
    "content": "import * as fs from 'fs/promises';\nimport * as os from 'os';\nimport path from 'path';\n\nconst PREFIX = 'mpack';\nconst tmpdirs = new Set<string>();\n\nexport async function createTmpDir() {\n  const dir = await fs.realpath(os.tmpdir());\n  const tmpdir = path.join(dir, generateTmpName());\n\n  await fs.mkdir(tmpdir);\n\n  tmpdirs.add(tmpdir);\n\n  return tmpdir;\n}\n\nexport async function cleanupTmpDirs() {\n  const tasks: Promise<void>[] = [];\n\n  for (const tmpdir of tmpdirs) {\n    tasks.push(fs.rm(tmpdir, { force: true, recursive: true }));\n  }\n\n  await Promise.all(tasks);\n}\n\nfunction generateTmpName() {\n  const hash = Math.ceil(Math.random() * 0x100000000)\n    .toString(16)\n    .padStart(8, `0`);\n\n  return `${PREFIX}-${hash}`;\n}\n"
  },
  {
    "path": "packages/mpack/src/transformer/AsyncTransformPipeline.ts",
    "content": "import { TransformPipeline, TransformStepArgs, AsyncTransformStep, TransformStepResult } from './TransformPipeline';\nimport { Performance, type Perf } from '../performance';\n\nexport class AsyncTransformPipeline extends TransformPipeline<AsyncTransformStep> {\n  async transform(code: string, args: TransformStepArgs): Promise<TransformStepResult> {\n    const context = await this.getStepContext(args);\n\n    const before: AsyncTransformStep = (code, args, context) => {\n      return this._beforeStep ? this._beforeStep(code, args, context) : Promise.resolve({ code, done: false });\n    };\n\n    const after: AsyncTransformStep = (code, args, context) => {\n      return this._afterStep ? this._afterStep(code, args, context) : Promise.resolve({ code, done: true });\n    };\n\n    let result = await before(code, args, context);\n\n    // Process all steps with if-then-else logic\n    for await (const entry of this.steps) {\n      // Check if pipeline should stop\n      if (result.done) {\n        break;\n      }\n\n      if (entry.type === 'normal' && entry.step) {\n        // Normal function step\n        let trace: Perf | undefined;\n        if (typeof entry.step.name === 'string') {\n          trace = Performance.trace(`step-${entry.step.name}`, { detail: { file: args.path } });\n        }\n        result = await entry.step(result.code, args, context);\n        trace?.stop();\n      } else if (entry.type === 'conditional' && entry.condition) {\n        // Conditional step with if-then-else logic\n        const condition = entry.condition;\n\n        if (condition.if({ path: args.path, code: result.code })) {\n          // Execute 'then' branch\n          let trace: Perf | undefined;\n          if (typeof condition.then.name === 'string') {\n            trace = Performance.trace(`step-${condition.then.name}`, { detail: { file: args.path } });\n          }\n          result = await condition.then(result.code, args, context);\n          trace?.stop();\n\n          // Check stopAfter flag\n          if (condition.stopAfter) {\n            break;\n          }\n        } else if (condition.else) {\n          // Execute 'else' branch if present\n          let trace: Perf | undefined;\n          if (typeof condition.else.name === 'string') {\n            trace = Performance.trace(`step-${condition.else.name}`, { detail: { file: args.path } });\n          }\n          result = await condition.else(result.code, args, context);\n          trace?.stop();\n        }\n        // If no else branch, continue to next step\n      }\n    }\n\n    return after(result.code, args, context);\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/transformer/TransformPipeline.ts",
    "content": "import * as fs from 'fs/promises';\nimport { Performance } from '../performance';\nimport { md5 } from '../utils/md5';\n\nexport interface TransformStepArgs {\n  path: string;\n}\n\nexport interface TransformStepContext {\n  key: string;\n  mtimeMs: number;\n}\n\nexport interface TransformStepResult {\n  code: string;\n  done?: boolean;\n}\n\ninterface TransformStep<TransformResult> {\n  (code: string, args: TransformStepArgs, context: TransformStepContext): TransformResult;\n  name?: string;\n}\n\nexport type AsyncTransformStep = TransformStep<Promise<TransformStepResult>>;\n\n// New conditional step interface\nexport interface ConditionalStep {\n  if: (args: { path: string; code: string }) => boolean;\n  then: AsyncTransformStep;\n  else?: AsyncTransformStep;\n  stopAfter?: boolean;\n}\n\n// Step input can be either a function or a conditional\nexport type StepInput = AsyncTransformStep | ConditionalStep;\n\ninterface StepEntry {\n  type: 'normal' | 'conditional';\n  step?: AsyncTransformStep;\n  condition?: ConditionalStep;\n}\n\nexport abstract class TransformPipeline<Step extends TransformStep<unknown>> {\n  protected _beforeStep?: Step;\n  protected _afterStep?: Step;\n  protected steps: StepEntry[] = [];\n\n  beforeStep(step: Step): this {\n    this._beforeStep = step;\n    return this;\n  }\n\n  afterStep(step: Step): this {\n    this._afterStep = step;\n    return this;\n  }\n\n  addStep(step: StepInput): this {\n    if (typeof step === 'function') {\n      this.steps.push({ type: 'normal', step: step as AsyncTransformStep });\n    } else {\n      this.steps.push({ type: 'conditional', condition: step as ConditionalStep });\n    }\n    return this;\n  }\n\n  async getStepContext(args: TransformStepArgs): Promise<TransformStepContext> {\n    const trace = Performance.trace('get-step-context');\n    const { mtimeMs } = await fs.stat(args.path);\n    const key = md5(args.path, mtimeMs);\n    trace.stop();\n\n    return { key, mtimeMs };\n  }\n\n  abstract transform(code: string, args: TransformStepArgs): ReturnType<Step>;\n}\n"
  },
  {
    "path": "packages/mpack/src/transformer/__tests__/AsyncTransformPipeline.spec.ts",
    "content": "import * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { describe, expect, it, beforeAll } from 'vitest';\nimport { evaluate } from '../../testing';\nimport { AsyncTransformPipeline } from '../AsyncTransformPipeline';\n\ndescribe('AsyncTransformPipeline', () => {\n  let entryCode: string;\n  const entryFile = path.join(__dirname, 'fixtures/index.ts');\n\n  function toPrintState(code: string) {\n    return code + ';console.log(JSON.stringify(state));';\n  }\n\n  function expectState(key: string, value: unknown) {\n    return `\"${key}\":${JSON.stringify(value)}`;\n  }\n\n  beforeAll(async () => {\n    entryCode = await fs.readFile(entryFile, 'utf-8');\n  });\n\n  it('등록한 step 들이 순차적으로 실행된다', async () => {\n    const pipeline = new AsyncTransformPipeline()\n      .addStep(async (code) => ({ code: code + ';state.value++;' })) // 1\n      .addStep(async (code) => ({ code: code + ';state.value++;' })) // 2\n      .addStep(async (code) => ({ code: code + ';state.value++;' })); // 3\n\n    const result = await pipeline.transform(entryCode, { path: entryFile });\n    const code = toPrintState(result.code);\n\n    expect(await evaluate(code)).toContain(expectState('value', 3));\n  });\n\n  describe('step 에서 done: true 를 반환할 경우', () => {\n    it('이후 step 들은 실행되지 않아야 한다', async () => {\n      const pipeline = new AsyncTransformPipeline()\n        .addStep(async (code) => ({ code: code + ';state.value++;' })) // 1\n        .addStep(async (code) => ({ code: code + ';state.value++;', done: true })) // 2\n        .addStep(async (code) => ({ code: code + ';state.value++;' })); // 3\n\n      const result = await pipeline.transform(entryCode, { path: entryFile });\n      const code = toPrintState(result.code);\n\n      expect(await evaluate(code)).toContain(expectState('value', 2));\n    });\n\n    it('afterStep 은 항상 실행된다', async () => {\n      const pipeline = new AsyncTransformPipeline()\n        .addStep(async (code) => ({ code: code + ';state.value++;' })) // 1\n        .addStep(async (code) => ({ code: code + ';state.value++;', done: true })) // 2\n        .addStep(async (code) => ({ code: code + ';state.value++;' })) // 3\n        .afterStep(async (code) => ({ code: code + ';state.after=true;' }));\n\n      const result = await pipeline.transform(entryCode, { path: entryFile });\n      const code = toPrintState(result.code);\n\n      expect(await evaluate(code)).toContain(expectState('value', 2));\n      expect(await evaluate(code)).toContain(expectState('after', true));\n    });\n  });\n\n  describe('step 구성에 조건이 있는 경우', () => {\n    describe('조건이 하나라도 충족된 경우', () => {\n      it('해당 step 이 실행되어야 한다', async () => {\n        const pipeline = new AsyncTransformPipeline()\n          .addStep(async (code) => ({ code: code + ';state.value++;' })) // 1\n          .addStep({\n            if: () => true,\n            then: async (code) => ({ code: code + ';state.value++;' }),\n          });\n\n        const result = await pipeline.transform(entryCode, { path: entryFile });\n        const code = toPrintState(result.code);\n\n        expect(await evaluate(code)).toContain(expectState('value', 2));\n      });\n    });\n\n    describe('조건이 하나라도 충족되지 않은 경우', () => {\n      it('해당 step 이 실행되지 않아야 한다', async () => {\n        const pipeline = new AsyncTransformPipeline()\n          .addStep(async (code) => ({ code: code + ';state.value++;' })) // 1\n          .addStep({\n            if: () => false,\n            then: async (code) => ({ code: code + ';state.value++;' }),\n          });\n\n        const result = await pipeline.transform(entryCode, { path: entryFile });\n        const code = toPrintState(result.code);\n\n        expect(await evaluate(code)).toContain(expectState('value', 1));\n      });\n    });\n  });\n\n  describe('step 구성에 skipOtherSteps 이 활성화 되어있는 경우', () => {\n    it('이후 step 들은 실행되지 않아야 한다', async () => {\n      const pipeline = new AsyncTransformPipeline()\n        .addStep(async (code) => ({ code: code + ';state.value++;' })) // 1\n        .addStep(async (code) => ({ code: code + ';state.value++;' })) // 2\n        .addStep({\n          if: () => false,\n          then: async (code) => ({ code: code + ';state.value++;' }),\n          stopAfter: true,\n        })\n        .addStep(async (code) => ({ code: code + ';state.value++;' })); // 4\n\n      const result = await pipeline.transform(entryCode, { path: entryFile });\n      const code = toPrintState(result.code);\n\n      expect(await evaluate(code)).toContain(expectState('value', 3));\n    });\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/transformer/__tests__/fixtures/index.ts",
    "content": "// @ts-expect-error\nglobalThis.state = { value: 0 };\n"
  },
  {
    "path": "packages/mpack/src/transformer/index.ts",
    "content": "export { AsyncTransformPipeline } from './AsyncTransformPipeline';\n"
  },
  {
    "path": "packages/mpack/src/types/BundlerConfig.ts",
    "content": "import type { BuildConfig } from '@granite-js/plugin-core';\n\nexport interface BundlerConfig {\n  /**\n   * Project root path\n   */\n  rootDir: string;\n  /**\n   * Development mode\n   */\n  dev: boolean;\n  /**\n   * Enable transform caches\n   */\n  cache: boolean;\n  /**\n   * Generate metafile\n   */\n  metafile: boolean;\n  /**\n   * Build configuration\n   */\n  buildConfig: BuildConfig;\n}\n"
  },
  {
    "path": "packages/mpack/src/types/Id.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type INTERNAL__Id = string & { __id: true };\n"
  },
  {
    "path": "packages/mpack/src/types/Plugin.ts",
    "content": "import type { BuildResult } from '@granite-js/plugin-core';\nimport type { INTERNAL__Id } from './Id';\nimport type { BundlerConfig } from '../types/BundlerConfig';\n\nexport interface Plugin extends Partial<BindThis<PluginHooks, PluginContext>> {\n  name?: string;\n}\n\nexport type Hooks = keyof Partial<PluginHooks>;\n\nexport type PluginHooks = {\n  [K in keyof FunctionPluginHooks]: FunctionPluginHooks[K];\n};\n\ninterface FunctionPluginHooks {\n  prepare(config: BundlerConfig): void;\n  buildStart(): void;\n  buildEnd(buildResult: BuildResult): void;\n  load(moduleCount: number): void;\n}\n\ntype BindThis<T, ThisType> = {\n  [K in keyof T]: T[K] extends (...args: infer Args) => infer R ? (this: ThisType, ...args: Args) => R : T[K];\n};\n\ninterface PluginContext {\n  id: INTERNAL__Id;\n}\n\nexport type PluginHandlers = {\n  onStart?: () => void;\n  onEnd?: () => void;\n};\n\nexport type PluginFactory = (handlers?: PluginHandlers) => Plugin;\n"
  },
  {
    "path": "packages/mpack/src/types/index.ts",
    "content": "export * from './BundlerConfig';\nexport * from './Plugin';\nexport * from './Id';\n"
  },
  {
    "path": "packages/mpack/src/utils/__tests__/esbuildUtils.spec.ts",
    "content": "import os from 'os';\nimport { afterAll, afterEach, beforeAll, describe, expect, it, vitest, type MockInstance } from 'vitest';\n\ndescribe('esbuildUtils', () => {\n  describe('normalizePath', () => {\n    let mockedType: MockInstance;\n\n    beforeAll(() => {\n      mockedType = vitest.spyOn(os, 'type');\n    });\n\n    afterEach(() => {\n      vitest.resetModules();\n    });\n\n    afterAll(() => {\n      mockedType.mockRestore();\n    });\n\n    it('Posix 계열의 플랫폼인 경우 값이 그대로 반환된다', async () => {\n      mockedType.mockReturnValueOnce('Darwin');\n      const path = '/path/to/code.js';\n      const { normalizePath } = await import('../esbuildUtils.js');\n\n      expect(normalizePath(path)).toBe(path);\n    });\n\n    it('Win32 계열의 플랫폼인 경우 `\\\\` 구분자가 `/` 치한된 뒤 반환된다', async () => {\n      mockedType.mockReturnValueOnce('Windows_NT');\n      const path = 'C:\\\\path\\\\to\\\\code.js';\n      const expected = 'C:/path/to/code.js';\n      const { normalizePath } = await import('../esbuildUtils.js');\n\n      expect(normalizePath(path)).toBe(expected);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/utils/__tests__/getDefaultOutfileName.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getDefaultOutfileName } from '../getDefaultOutfileName';\n\ndescribe('getDefaultOutfileName', () => {\n  it('should return the default outfile', () => {\n    expect(getDefaultOutfileName('src/index.tsx', 'android')).toBe('index.android.js');\n    expect(getDefaultOutfileName('src/index.tsx', 'ios')).toBe('index.ios.js');\n    expect(getDefaultOutfileName('src/entry.ts', 'android')).toBe('entry.android.js');\n    expect(getDefaultOutfileName('src/entry.ts', 'ios')).toBe('entry.ios.js');\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/utils/__tests__/getId.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport type { BundlerConfig } from '../../types';\nimport { getId } from '../getId';\n\ndescribe('getId', () => {\n  const baseConfig: BundlerConfig = {\n    rootDir: '/root',\n    cache: true,\n    dev: true,\n    metafile: false,\n    buildConfig: {\n      entry: './index.ts',\n      outfile: './dist/index.js',\n      platform: 'android',\n      babel: {\n        plugins: ['plugin-b'],\n      },\n    },\n  };\n  const baseConfigId = getId(baseConfig);\n\n  it('If the build configuration is the same, the same ID is returned', () => {\n    expect(getId(baseConfig)).toEqual(baseConfigId);\n  });\n\n  it('If the build configuration is different, a different ID is returned', () => {\n    expect(getId({ ...baseConfig, buildConfig: { ...baseConfig.buildConfig, platform: 'ios' } })).not.toEqual(\n      baseConfigId\n    );\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/utils/__tests__/md5.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { md5 } from '../md5';\n\ndescribe('md5', () => {\n  it('입력한 값에 대응하는 md5 해시값이 생성된다', () => {\n    expect(md5('hello', 'world', 1, 2, 3)).toMatchInlineSnapshot(`\"cd1b8ecf103743a98958211a11e33b71\"`);\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/utils/__tests__/replaceModulePath.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { replaceModulePath } from '../replaceModulePath';\n\ndescribe('replaceModulePath', () => {\n  const from = 'react-native';\n  const to = 'react-native-0.68.2';\n\n  it('모듈 경로가 지정한 모듈로 치환되어야 한다', () => {\n    const path = 'react-native';\n\n    expect(replaceModulePath(path, from, to)).toEqual('react-native-0.68.2');\n  });\n\n  describe('모듈 경로에 subpath 가 존재하는 경우', () => {\n    const path = 'react-native/Libraries/Core/InitializeCore.js';\n\n    it('subpath 가 포함된 상태로 치환되어야 한다', () => {\n      expect(replaceModulePath(path, from, to)).toEqual('react-native-0.68.2/Libraries/Core/InitializeCore.js');\n    });\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/utils/__tests__/replacePlaceholder.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { replacePlaceholders } from '../replacePlaceholders';\n\ndescribe('replacePlaceholders', () => {\n  it('placeholder 가 값으로 치환되어야 한다', () => {\n    expect(\n      replacePlaceholders('{org} / {project} 테스트 입니다', {\n        org: 'Granite',\n        project: 'mpack',\n      })\n    ).toEqual('Granite / mpack 테스트 입니다');\n  });\n});\n"
  },
  {
    "path": "packages/mpack/src/utils/buildResult.ts",
    "content": "import type { BuildResult, BuildSuccessResult } from '@granite-js/plugin-core';\n\nexport function isBuildSuccess(result: BuildResult): result is BuildSuccessResult {\n  return 'bundle' in result;\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/cleanupOutputDirectory.ts",
    "content": "import * as fs from 'fs/promises';\nimport { logger } from '../logger';\n\nasync function removeDir(dirPath: string) {\n  try {\n    await fs.access(dirPath);\n    await fs.rm(dirPath, { recursive: true, force: true });\n  } catch (error: any) {\n    if (error.code !== 'ENOENT') {\n      throw error;\n    }\n  }\n}\n\nexport function cleanupOutputDirectory(directories: string[]) {\n  logger.info(`🧹 빌드 폴더를 정리합니다...`);\n\n  return Promise.all([directories.map(removeDir)]);\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/defineStepName.ts",
    "content": "import type { AsyncTransformStep } from '../transformer/TransformPipeline';\n\nexport function defineStepName(step: AsyncTransformStep, name: string) {\n  Object.defineProperty(step, 'name', { value: name });\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/esbuildUtils.ts",
    "content": "import os from 'os';\n\ninterface EsbuildUtils {\n  /**\n   * - Posix: 입력받은 경로 그대로 반환\n   * - Windows: `\\\\` 부분을 posix 스타일인 `/` 로 일괄 치환한 뒤 반환\n   *   - esbuild 플러그인을 통해 임의의 코드를 주입할 때, Window style path가 제대로 파싱되지 않는 버그가 있음.\n   *   ```js\n   *   // eg. 임의로 코드를 주입할 때, 경로 파싱 이슈가 생기는 케이스\n   *   build.onLoad(..., () => {\n   *     return {\n   *       contents: [\n   *         // onResolve 훅에서 path 가 잘못 파싱됨\n   *         `import 'C:\\\\foo\\\\bar\\\\bar.js';`,\n   *         originCode\n   *       ].join('\\n'),\n   *     };\n   *   });\n   *   ```\n   */\n  normalizePath: (path: string) => string;\n}\n\nconst win32Impl: EsbuildUtils = {\n  normalizePath: (path: string) => path.replace(/\\\\/g, '/'),\n};\n\nconst posixImpl: EsbuildUtils = {\n  normalizePath: (path: string) => path,\n};\n\nexport const { normalizePath } = os.type() === 'Windows_NT' ? win32Impl : posixImpl;\n"
  },
  {
    "path": "packages/mpack/src/utils/getBundleName.ts",
    "content": "export function getBundleName(name: string): `${string}.bundle` {\n  return `${name}.bundle`;\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/getBundleOutputs.ts",
    "content": "import * as path from 'path';\nimport * as esbuild from 'esbuild';\nimport { getSourcemapName } from './getSourcemapName';\n\nexport function getBundleOutputs(outputFile: string, buildResult: esbuild.BuildResult) {\n  const filename = path.basename(outputFile);\n  const outputFiles = buildResult.outputFiles;\n  const source = findOutputFile(filename, outputFiles);\n  const sourcemap = findOutputFile(getSourcemapName(filename), outputFiles);\n\n  return { source, sourcemap };\n}\n\nfunction findOutputFile(targetFile: string, outputFiles: esbuild.BuildResult['outputFiles']) {\n  return outputFiles?.find((outfile) => outfile.path.endsWith(targetFile));\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/getDefaultOutfileName.ts",
    "content": "import path from 'path';\n\nexport function getDefaultOutfileName(entryFile: string, platform: 'android' | 'ios') {\n  const basename = path.basename(entryFile);\n  const extname = path.extname(basename);\n  const name = basename.replace(extname, '');\n\n  return `${name}.${platform}.js`;\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/getDefaultReactNativePath.ts",
    "content": "import path from 'path';\n\nexport function getDefaultReactNativePath(rootDir: string) {\n  return path.dirname(\n    require.resolve('react-native/package.json', {\n      paths: [rootDir],\n    })\n  );\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/getId.ts",
    "content": "import { md5 } from './md5';\nimport { VERSION } from '../constants';\nimport type { BundlerConfig, INTERNAL__Id } from '../types';\n\nexport function getId(bundleConfig: BundlerConfig) {\n  // Hash the targets that affect code transformation\n  return md5(\n    JSON.stringify([\n      VERSION,\n      bundleConfig.rootDir,\n      bundleConfig.dev,\n      bundleConfig.buildConfig.resolver,\n      bundleConfig.buildConfig.transformer,\n      bundleConfig.buildConfig.platform,\n      bundleConfig.buildConfig.babel,\n      bundleConfig.buildConfig.swc,\n      bundleConfig.buildConfig.esbuild?.loader,\n      bundleConfig.buildConfig.esbuild?.resolveExtensions,\n      bundleConfig.buildConfig.esbuild?.mainFields,\n      bundleConfig.buildConfig.esbuild?.conditions,\n      bundleConfig.buildConfig.extra?.skipReactNativePolyfills,\n      bundleConfig.buildConfig.extra?.skipReactNativeInitializeCore,\n    ])\n  ) as INTERNAL__Id;\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/getSourcemapName.ts",
    "content": "export function getSourcemapName(bundleFile: string) {\n  return `${bundleFile}.map`;\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/isDebugMode.ts",
    "content": "export function isDebugMode(scope: string) {\n  return process.env.DEBUG === '*' || process.env.DEBUG === scope;\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/md5.ts",
    "content": "import * as crypto from 'crypto';\n\nexport function md5(...args: Array<string | number>) {\n  return crypto.createHash('md5').update(args.join('')).digest('hex');\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/printErrors.ts",
    "content": "export function printErrors(errors: PromiseRejectedResult[]) {\n  for (const error of errors) {\n    console.error(error.reason);\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/printLogo.ts",
    "content": "import chalk from 'chalk';\n\nconst LOGO = [\n  ' ██████╗ ██████╗  █████╗ ███╗   ██╗██╗████████╗███████╗',\n  '██╔════╝ ██╔══██╗██╔══██╗████╗  ██║██║╚══██╔══╝██╔════╝',\n  '██║  ███╗██████╔╝███████║██╔██╗ ██║██║   ██║   █████╗  ',\n  '██║   ██║██╔══██╗██╔══██║██║╚██╗██║██║   ██║   ██╔══╝  ',\n  '╚██████╔╝██║  ██║██║  ██║██║ ╚████║██║   ██║   ███████╗',\n  ' ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝   ╚═╝   ╚══════╝',\n];\n\nconst GREETING_MESSAGE = 'Welcome to Granite';\n\nexport function printLogo() {\n  const maxLength = LOGO.reduce((prev, line) => Math.max(line.length, prev), 0);\n  console.log();\n  console.log(LOGO.join('\\n'));\n\n  const padding = new Array(Math.floor(maxLength / 2 - GREETING_MESSAGE.length / 2)).fill(' ').join('');\n  console.log(`\\n${padding}${chalk.blue(GREETING_MESSAGE)}\\n`);\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/printServerUrl.ts",
    "content": "export function printServerUrl({ host, port }: { host: string; port: number }) {\n  console.log(`Development server is running at http://${host}:${port}`);\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/printSummary.ts",
    "content": "import type { BuildResult } from '@granite-js/plugin-core';\nimport chalk from 'chalk';\nimport { isNotNil } from 'es-toolkit';\nimport { formatMessages } from 'esbuild';\nimport { logger } from '../logger';\nimport { isBuildSuccess } from './buildResult';\n\nexport function printSummary(buildResult: BuildResult) {\n  return Promise.all([\n    formatMessages(buildResult.warnings, { kind: 'warning', color: true }),\n    formatMessages(buildResult.errors, { kind: 'error', color: true }),\n  ]).then(([warnings, errors]) => {\n    warnings.forEach((message) => console.warn('\\n\\n', message));\n    errors.forEach((message) => console.error('\\n\\n', message));\n\n    const platform = `[${buildResult.platform}]`;\n    const moduleCountAndDuration = isBuildSuccess(buildResult)\n      ? chalk.underline(`${buildResult.totalModuleCount} Modules (${(buildResult.duration / 1000).toFixed(2)}s)`)\n      : null;\n\n    const summary = [\n      platform,\n      moduleCountAndDuration,\n      `${chalk.red(errors.length)} errors`,\n      `${chalk.yellow(warnings.length)} warnings`,\n    ]\n      .filter(isNotNil)\n      .join(chalk.white(' | '));\n\n    logger.info(chalk.gray(summary));\n  });\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/progressBar.ts",
    "content": "import type { BuildResult } from '@granite-js/plugin-core';\nimport * as Frogress from 'frogress-bar';\n\nexport interface BuildStatusProgressBar {\n  start: (moduleCount: number, totalModuleCount: number) => void;\n  update: (moduleCount: number, totalModuleCount?: number) => void;\n  done: (result: BuildResult) => void;\n  hide: () => void;\n  remove: () => void;\n}\n\nconst PROGRESS_TEMPLATE = '{status} {progress} ({value}/{total}) | {label}';\nconst STATUS_SYMBOLS = {\n  waiting: '…',\n  running: '●',\n  warning: '!',\n  error: '✕',\n  success: '✓',\n} as const;\n\nexport function createProgressBar(label: string): BuildStatusProgressBar {\n  const progressBar = Frogress.create({\n    template: PROGRESS_TEMPLATE,\n    total: 0,\n    placeholder: {\n      label: Frogress.color(label, 'gray'),\n      status: Frogress.color(STATUS_SYMBOLS.waiting, 'gray'),\n    },\n  });\n\n  return {\n    start: (moduleCount, totalModuleCount) => {\n      progressBar.start({\n        value: moduleCount,\n        total: totalModuleCount,\n      });\n    },\n    update: (moduleCount, totalModuleCount) => {\n      progressBar.update({\n        value: moduleCount,\n        total: totalModuleCount ?? moduleCount,\n        placeholder: {\n          status: Frogress.color(STATUS_SYMBOLS.running, 'gray'),\n        },\n      });\n    },\n    done: (result) => {\n      const { value } = progressBar.getState();\n      let status: string;\n\n      switch (true) {\n        case result.errors.length > 0:\n          status = Frogress.color(STATUS_SYMBOLS.error, 'red');\n          break;\n\n        case result.warnings.length > 0:\n          status = Frogress.color(STATUS_SYMBOLS.warning, 'yellow');\n          break;\n\n        default:\n          status = Frogress.color(STATUS_SYMBOLS.success, 'blue');\n      }\n\n      progressBar.update({\n        value,\n        placeholder: { status },\n      });\n    },\n    remove: () => {\n      Frogress.remove(progressBar);\n    },\n    hide: () => {\n      progressBar.stop();\n    },\n  };\n}\n\nexport function cleanup() {\n  Frogress.removeAll();\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/promise.ts",
    "content": "import { noop } from 'es-toolkit';\n\nexport class PromiseHandler<T> {\n  private _isDone = false;\n  private task: Promise<T>;\n  private resolver: (data: T) => void = noop;\n  private rejector: (error?: Error) => void = noop;\n\n  constructor(public revisionId: number) {\n    this.task = new Promise<T>((resolve, reject) => {\n      this.resolver = resolve;\n      this.rejector = reject;\n    });\n  }\n\n  get isDone() {\n    return this._isDone;\n  }\n\n  wait() {\n    return this.task;\n  }\n\n  done(result: T) {\n    this._isDone = true;\n    this.resolver(result);\n  }\n\n  abort(reason?: Error) {\n    this.rejector(reason);\n  }\n}\n\nexport function isFulfilled<T>(task: PromiseSettledResult<T>): task is PromiseFulfilledResult<T> {\n  return task.status === 'fulfilled';\n}\n\nexport function isRejected<T>(task: PromiseSettledResult<T>): task is PromiseRejectedResult {\n  return task.status === 'rejected';\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/replaceModulePath.ts",
    "content": "export function replaceModulePath(path: string, from: string, to: string) {\n  const subpath = path.slice(from.length);\n  return `${to}${subpath}`;\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/replacePlaceholders.ts",
    "content": "export function replacePlaceholders(template: string, values: Record<string, string | number>) {\n  return Object.entries(values).reduce(\n    (prev, [placeholder, value]) => prev.replaceAll(`{${placeholder}}`, value.toString()),\n    template\n  );\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/stripExtension.ts",
    "content": "import path from 'path';\n\nexport function stripExtension(value: string) {\n  return value.replace(new RegExp(`${path.extname(value)}$`), '');\n}\n"
  },
  {
    "path": "packages/mpack/src/utils/writeBundle.ts",
    "content": "import * as fs from 'fs/promises';\nimport * as path from 'path';\nimport type { BundleData } from '@granite-js/plugin-core';\nimport type { Metafile } from 'esbuild';\nimport { getSourcemapName } from './getSourcemapName';\n\nexport async function writeBundle(outputPath: string, { source, sourcemap }: BundleData) {\n  await createDirectories(path.dirname(outputPath));\n\n  const baseDirectory = path.dirname(outputPath);\n  const basename = path.basename(outputPath);\n\n  await Promise.all([\n    fs.writeFile(outputPath, source.contents, 'utf-8'),\n    fs.writeFile(path.join(baseDirectory, getSourcemapName(basename)), sourcemap.contents, 'utf-8'),\n  ]);\n}\n\nexport async function writeMetafile(outputPath: string, metafile: Metafile) {\n  const outputDir = path.dirname(outputPath);\n  const extname = path.extname(outputPath);\n  const destination = path.join(outputDir, `${path.basename(outputPath, extname)}-meta.json`);\n\n  await createDirectories(outputDir);\n  await fs.writeFile(destination, JSON.stringify(metafile, null, 2), 'utf-8');\n}\n\nfunction createDirectories(directoryPath: string) {\n  return fs.mkdir(directoryPath, { recursive: true });\n}\n"
  },
  {
    "path": "packages/mpack/src/vendors/index.ts",
    "content": "// metro\nimport Metro from './metro/src';\nimport TerminalReporter from './metro/src/lib/TerminalReporter';\n// metro-config\nimport { getDefaultValues } from './metro-config/src/defaults';\nimport { loadConfig, mergeConfig } from './metro-config/src/loadConfig';\n// metro-core\nimport Terminal from './metro-core/src/Terminal';\n// metro-inspector-proxy\nimport InspectorProxy from './metro-inspector-proxy/src/InspectorProxy';\n\nconst vendorModules = {\n  metro: {\n    Metro,\n    TerminalReporter,\n  },\n  'metro-config': {\n    getDefaultValues,\n    loadConfig,\n    mergeConfig,\n  },\n  'metro-core': {\n    Terminal,\n  },\n  'metro-inspector-proxy': {\n    InspectorProxy,\n  },\n} as const;\n\nexport function getModule<Source extends keyof typeof vendorModules>(source: Source): (typeof vendorModules)[Source] {\n  return vendorModules[source];\n}\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/Assets.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst { isAssetTypeAnImage } = require('./Bundler/util');\nconst AssetPaths = require('./node-haste/lib/AssetPaths');\nconst crypto = require('crypto');\nconst denodeify = require('denodeify');\nconst fs = require('fs');\nconst imageSize = require('image-size');\nconst path = require('path');\n\nconst readDir = denodeify(fs.readdir);\nconst readFile = denodeify(fs.readFile);\n\nconst hashFiles = denodeify(function hashFilesCb(files, hash, callback) {\n  if (!files.length) {\n    callback(null);\n    return;\n  }\n\n  const file = files.shift();\n\n  fs.readFile(file, (err, data) => {\n    if (err) {\n      callback(err);\n      return;\n    } else {\n      hash.update(data);\n      hashFilesCb(files, hash, callback);\n    }\n  });\n});\n\nfunction buildAssetMap(dir, files, platform) {\n  const platforms = new Set(platform != null ? [platform] : []);\n  const assets = files.map((file) => AssetPaths.tryParse(file, platforms));\n  const map = new Map();\n  assets.forEach(function (asset, i) {\n    if (asset == null) {\n      return;\n    }\n    const file = files[i];\n    const assetKey = getAssetKey(asset.assetName, asset.platform);\n    let record = map.get(assetKey);\n    if (!record) {\n      record = {\n        scales: [],\n        files: [],\n      };\n      map.set(assetKey, record);\n    }\n\n    let insertIndex;\n    const length = record.scales.length;\n\n    for (insertIndex = 0; insertIndex < length; insertIndex++) {\n      if (asset.resolution < record.scales[insertIndex]) {\n        break;\n      }\n    }\n    record.scales.splice(insertIndex, 0, asset.resolution);\n    record.files.splice(insertIndex, 0, path.join(dir, file));\n  });\n\n  return map;\n}\n\nfunction getAssetKey(assetName, platform) {\n  if (platform != null) {\n    return `${assetName} : ${platform}`;\n  } else {\n    return assetName;\n  }\n}\n\nasync function getAbsoluteAssetRecord(assetPath, platform = null) {\n  const filename = path.basename(assetPath);\n  const dir = path.dirname(assetPath);\n  const files = await readDir(dir);\n\n  const assetData = AssetPaths.parse(filename, new Set(platform != null ? [platform] : []));\n\n  const map = buildAssetMap(dir, files, platform);\n\n  let record;\n  if (platform != null) {\n    record = map.get(getAssetKey(assetData.assetName, platform)) || map.get(assetData.assetName);\n  } else {\n    record = map.get(assetData.assetName);\n  }\n\n  if (!record) {\n    throw new Error(`Asset not found: ${assetPath} for platform: ${platform ?? '(unspecified)'}`);\n  }\n\n  return record;\n}\n\nasync function getAbsoluteAssetInfo(assetPath, platform = null) {\n  const nameData = AssetPaths.parse(assetPath, new Set(platform != null ? [platform] : []));\n  const { name, type } = nameData;\n\n  const { scales, files } = await getAbsoluteAssetRecord(assetPath, platform);\n  const hasher = crypto.createHash('md5');\n\n  if (files.length > 0) {\n    await hashFiles(Array.from(files), hasher);\n  }\n\n  return { files, hash: hasher.digest('hex'), name, scales, type };\n}\n\nasync function getAssetData(assetPath, localPath, assetDataPlugins, platform = null, publicPath) {\n  // If the path of the asset is outside of the projectRoot, we don't want to\n  // use `path.join` since this will generate an incorrect URL path. In that\n  // case we just concatenate the publicPath with the relative path.\n  let assetUrlPath = localPath.startsWith('..')\n    ? publicPath.replace(/\\/$/, '') + '/' + path.dirname(localPath)\n    : path.join(publicPath, path.dirname(localPath));\n\n  // On Windows, change backslashes to slashes to get proper URL path from file path.\n  if (path.sep === '\\\\') {\n    assetUrlPath = assetUrlPath.replace(/\\\\/g, '/');\n  }\n\n  const isImage = isAssetTypeAnImage(path.extname(assetPath).slice(1));\n  const assetInfo = await getAbsoluteAssetInfo(assetPath, platform);\n\n  const isImageInput = assetInfo.files[0].includes('.zip/') ? fs.readFileSync(assetInfo.files[0]) : assetInfo.files[0];\n  const dimensions = isImage ? imageSize(isImageInput) : null;\n  const scale = assetInfo.scales[0];\n\n  const assetData = {\n    __packager_asset: true,\n    fileSystemLocation: path.dirname(assetPath),\n    httpServerLocation: assetUrlPath,\n    width: dimensions ? dimensions.width / scale : undefined,\n    height: dimensions ? dimensions.height / scale : undefined,\n    scales: assetInfo.scales,\n    files: assetInfo.files,\n    hash: assetInfo.hash,\n    name: assetInfo.name,\n    type: assetInfo.type,\n  };\n  return await applyAssetDataPlugins(assetDataPlugins, assetData);\n}\n\nasync function applyAssetDataPlugins(assetDataPlugins, assetData) {\n  if (!assetDataPlugins.length) {\n    return assetData;\n  }\n\n  const [currentAssetPlugin, ...remainingAssetPlugins] = assetDataPlugins;\n  // $FlowFixMe: impossible to type a dynamic require.\n  const assetPluginFunction = require(currentAssetPlugin);\n  const resultAssetData = await assetPluginFunction(assetData);\n  return await applyAssetDataPlugins(remainingAssetPlugins, resultAssetData);\n}\n\n/**\n * Returns all the associated files (for different resolutions) of an asset.\n **/\nasync function getAssetFiles(assetPath, platform = null) {\n  const assetData = await getAbsoluteAssetRecord(assetPath, platform);\n\n  return assetData.files;\n}\n\n/**\n * Return a buffer with the actual image given a request for an image by path.\n * The relativePath can contain a resolution postfix, in this case we need to\n * find that image (or the closest one to it's resolution) in one of the\n * project roots:\n *\n * 1. We first parse the directory of the asset\n * 2. We then build a map of all assets and their scales in this directory\n * 3. Then try to pick platform-specific asset records\n * 4. Then pick the closest resolution (rounding up) to the requested one\n */\nasync function getAsset(relativePath, projectRoot, watchFolders, platform = null, assetExts) {\n  const assetData = AssetPaths.parse(relativePath, new Set(platform != null ? [platform] : []));\n\n  const absolutePath = path.resolve(projectRoot, relativePath);\n\n  if (!assetExts.includes(assetData.type)) {\n    throw new Error(`'${relativePath}' cannot be loaded as its extension is not registered in assetExts`);\n  }\n\n  if (!pathBelongsToRoots(absolutePath, [projectRoot, ...watchFolders])) {\n    throw new Error(\n      `'${relativePath}' could not be found, because it cannot be found in the project root or any watch folder`\n    );\n  }\n\n  const record = await getAbsoluteAssetRecord(absolutePath, platform);\n\n  for (let i = 0; i < record.scales.length; i++) {\n    if (record.scales[i] >= assetData.resolution) {\n      return readFile(record.files[i]);\n    }\n  }\n\n  return readFile(record.files[record.files.length - 1]);\n}\n\nfunction pathBelongsToRoots(pathToCheck, roots) {\n  for (const rootFolder of roots) {\n    if (pathToCheck.startsWith(path.resolve(rootFolder))) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nmodule.exports = {\n  getAsset,\n  getAssetData,\n  getAssetFiles,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/Bundler/util.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst babylon = require('@babel/parser');\nconst template = require('@babel/template').default;\nconst babelTypes = require('@babel/types');\nconst nullthrows = require('nullthrows');\n\n// Structure of the object: dir.name.scale = asset\n\n// Structure of the object: platform.dir.name.scale = asset\n\nconst assetPropertyBlockList = new Set(['files', 'fileSystemLocation', 'path']);\n\nfunction generateAssetCodeFileAst(assetRegistryPath, assetDescriptor) {\n  const properDescriptor = filterObject(assetDescriptor, assetPropertyBlockList);\n\n  // {...}\n  const descriptorAst = babylon.parseExpression(JSON.stringify(properDescriptor));\n  const t = babelTypes;\n\n  // require('AssetRegistry').registerAsset({...})\n  const buildRequire = template.statement(`\n    module.exports = require(ASSET_REGISTRY_PATH).registerAsset(DESCRIPTOR_AST)\n  `);\n\n  return t.file(\n    t.program([\n      buildRequire({\n        ASSET_REGISTRY_PATH: t.stringLiteral(assetRegistryPath),\n        DESCRIPTOR_AST: descriptorAst,\n      }),\n    ])\n  );\n}\n\n/**\n * Generates the code involved in requiring an asset, but to be loaded remotely.\n * If the asset cannot be found within the map, then it falls back to the\n * standard asset.\n */\nfunction generateRemoteAssetCodeFileAst(assetUtilsPath, assetDescriptor, remoteServer, remoteFileMap) {\n  const t = babelTypes;\n\n  const file = remoteFileMap[assetDescriptor.fileSystemLocation];\n  const descriptor = file && file[assetDescriptor.name];\n  const data = {};\n\n  if (!descriptor) {\n    return null;\n  }\n\n  for (const scale in descriptor) {\n    data[+scale] = descriptor[+scale].handle;\n  }\n\n  // {2: 'path/to/image@2x', 3: 'path/to/image@3x', ...}\n  const astData = babylon.parseExpression(JSON.stringify(data));\n\n  // URI to remote server\n  const URI = t.stringLiteral(remoteServer);\n\n  // Size numbers.\n  const WIDTH = t.numericLiteral(nullthrows(assetDescriptor.width));\n  const HEIGHT = t.numericLiteral(nullthrows(assetDescriptor.height));\n\n  const buildRequire = template.program(`\n    const {pickScale, getUrlCacheBreaker}= require(ASSET_UTILS_PATH);\n    module.exports = {\n      \"width\": WIDTH,\n      \"height\": HEIGHT,\n      \"uri\": URI + OBJECT_AST[pickScale(SCALE_ARRAY)] + getUrlCacheBreaker()\n    };\n  `);\n\n  return t.file(\n    buildRequire({\n      WIDTH,\n      HEIGHT,\n      URI,\n      OBJECT_AST: astData,\n      ASSET_UTILS_PATH: t.stringLiteral(assetUtilsPath),\n      SCALE_ARRAY: t.arrayExpression(\n        Object.keys(descriptor)\n          .map(Number)\n          .sort((a, b) => a - b)\n          .map((scale) => t.numericLiteral(scale))\n      ),\n    })\n  );\n}\n\n// Test extension against all types supported by image-size module.\n// If it's not one of these, we won't treat it as an image.\nfunction isAssetTypeAnImage(type) {\n  return ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(type) !== -1;\n}\n\nfunction filterObject(object, blockList) {\n  const copied = { ...object };\n  for (const key of blockList) {\n    delete copied[key];\n  }\n  return copied;\n}\n\nfunction createRamBundleGroups(ramGroups, groupableModules, subtree) {\n  // build two maps that allow to lookup module data\n  // by path or (numeric) module id;\n  const byPath = new Map();\n  const byId = new Map();\n  groupableModules.forEach((m) => {\n    byPath.set(m.sourcePath, m);\n    byId.set(m.id, m.sourcePath);\n  });\n\n  // build a map of group root IDs to an array of module IDs in the group\n  const result = new Map(\n    ramGroups.map((modulePath) => {\n      const root = byPath.get(modulePath);\n      if (root == null) {\n        throw Error(`Group root ${modulePath} is not part of the bundle`);\n      }\n      return [\n        root.id,\n        // `subtree` yields the IDs of all transitive dependencies of a module\n        new Set(subtree(root, byPath)),\n      ];\n    })\n  );\n\n  if (ramGroups.length > 1) {\n    // build a map of all grouped module IDs to an array of group root IDs\n    const all = new ArrayMap();\n    for (const [parent, children] of result) {\n      for (const module of children) {\n        all.get(module).push(parent);\n      }\n    }\n\n    // find all module IDs that are part of more than one group\n    const doubles = filter(all, ([, parents]) => parents.length > 1);\n    for (const [moduleId, parents] of doubles) {\n      // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n      const parentNames = parents.map(byId.get, byId);\n      const lastName = parentNames.pop();\n      throw new Error(\n        `Module ${byId.get(moduleId) || moduleId} belongs to groups ${parentNames.join(', ')}, and ${String(\n          lastName\n        )}. Ensure that each module is only part of one group.`\n      );\n    }\n  }\n\n  return result;\n}\n\nfunction* filter(iterator, predicate) {\n  for (const value of iterator) {\n    if (predicate(value)) {\n      yield value;\n    }\n  }\n}\n\nclass ArrayMap extends Map {\n  get(key) {\n    let array = super.get(key);\n    if (!array) {\n      array = [];\n      this.set(key, array);\n    }\n    return array;\n  }\n}\n\nmodule.exports = {\n  createRamBundleGroups,\n  generateAssetCodeFileAst,\n  generateRemoteAssetCodeFileAst,\n  isAssetTypeAnImage,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/Bundler.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst Transformer = require('./DeltaBundler/Transformer');\nconst DependencyGraph = require('./node-haste/DependencyGraph');\n\nclass Bundler {\n  _depGraph;\n  _readyPromise;\n  _transformer;\n\n  constructor(config, options) {\n    this._depGraph = new DependencyGraph(config, options);\n\n    this._readyPromise = this._depGraph\n      .ready()\n      .then(() => {\n        config.reporter.update({ type: 'transformer_load_started' });\n        this._transformer = new Transformer(config, (...args) => this._depGraph.getSha1(...args));\n        config.reporter.update({ type: 'transformer_load_done' });\n      })\n      .catch((error) => {\n        console.error('Failed to construct transformer: ', error);\n        config.reporter.update({\n          type: 'transformer_load_failed',\n          error,\n        });\n      });\n  }\n\n  getWatcher() {\n    return this._depGraph.getWatcher();\n  }\n\n  async end() {\n    await this._depGraph.ready();\n\n    this._transformer.end();\n    this._depGraph.end();\n  }\n\n  async getDependencyGraph() {\n    await this._depGraph.ready();\n    return this._depGraph;\n  }\n\n  async transformFile(\n    filePath,\n    transformOptions,\n    /** Optionally provide the file contents, this can be used to provide virtual contents for a file. */\n    fileBuffer\n  ) {\n    // We need to be sure that the DependencyGraph has been initialized.\n    // TODO: Remove this ugly hack!\n    await this._depGraph.ready();\n\n    return this._transformer.transformFile(filePath, transformOptions, fileBuffer);\n  }\n\n  // Waits for the bundler to become ready.\n  async ready() {\n    await this._readyPromise;\n  }\n}\n\nmodule.exports = Bundler;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/DeltaCalculator.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nimport {\n  createGraph,\n  initialTraverseDependencies,\n  markModifiedContextModules,\n  reorderGraph,\n  traverseDependencies,\n} from './graphOperations';\n\nconst { EventEmitter } = require('events');\n\n/**\n * This class is in charge of calculating the delta of changed modules that\n * happen between calls. To do so, it subscribes to file changes, so it can\n * traverse the files that have been changed between calls and avoid having to\n * traverse the whole dependency tree for trivial small changes.\n */\nclass DeltaCalculator extends EventEmitter {\n  _changeEventSource;\n  _options;\n\n  _currentBuildPromise;\n  _deletedFiles = new Set();\n  _modifiedFiles = new Set();\n  _addedFiles = new Set();\n\n  _graph;\n\n  constructor(entryPoints, changeEventSource, options) {\n    super();\n\n    this._options = options;\n    this._changeEventSource = changeEventSource;\n\n    this._graph = createGraph({\n      entryPoints,\n      transformOptions: this._options.transformOptions,\n    });\n\n    this._changeEventSource.on('change', this._handleMultipleFileChanges);\n  }\n\n  /**\n   * Stops listening for file changes and clears all the caches.\n   */\n  end() {\n    this._changeEventSource.removeListener('change', this._handleMultipleFileChanges);\n\n    this.removeAllListeners();\n\n    // Clean up all the cache data structures to deallocate memory.\n    this._graph = createGraph({\n      entryPoints: this._graph.entryPoints,\n      transformOptions: this._options.transformOptions,\n    });\n    this._modifiedFiles = new Set();\n    this._deletedFiles = new Set();\n    this._addedFiles = new Set();\n  }\n\n  /**\n   * Main method to calculate the delta of modules. It returns a DeltaResult,\n   * which contain the modified/added modules and the removed modules.\n   */\n  async getDelta({ reset, shallow }) {\n    // If there is already a build in progress, wait until it finish to start\n    // processing a new one (delta server doesn't support concurrent builds).\n    if (this._currentBuildPromise) {\n      await this._currentBuildPromise;\n    }\n\n    // We don't want the modified files Set to be modified while building the\n    // bundle, so we isolate them by using the current instance for the bundling\n    // and creating a new instance for the file watcher.\n    const modifiedFiles = this._modifiedFiles;\n    this._modifiedFiles = new Set();\n    const deletedFiles = this._deletedFiles;\n    this._deletedFiles = new Set();\n    const addedFiles = this._addedFiles;\n    this._addedFiles = new Set();\n\n    // Concurrent requests should reuse the same bundling process. To do so,\n    // this method stores the promise as an instance variable, and then it's\n    // removed after it gets resolved.\n    this._currentBuildPromise = this._getChangedDependencies(modifiedFiles, deletedFiles, addedFiles);\n\n    let result;\n\n    const numDependencies = this._graph.dependencies.size;\n\n    try {\n      result = await this._currentBuildPromise;\n    } catch (error) {\n      // In case of error, we don't want to mark the modified files as\n      // processed (since we haven't actually created any delta). If we do not\n      // do so, asking for a delta after an error will produce an empty Delta,\n      // which is not correct.\n      modifiedFiles.forEach((file) => this._modifiedFiles.add(file));\n      deletedFiles.forEach((file) => this._deletedFiles.add(file));\n      addedFiles.forEach((file) => this._addedFiles.add(file));\n\n      // If after an error the number of modules has changed, we could be in\n      // a weird state. As a safe net we clean the dependency modules to force\n      // a clean traversal of the graph next time.\n      if (this._graph.dependencies.size !== numDependencies) {\n        this._graph.dependencies = new Map();\n      }\n\n      throw error;\n    } finally {\n      this._currentBuildPromise = null;\n    }\n\n    // Return all the modules if the client requested a reset delta.\n    if (reset) {\n      reorderGraph(this._graph, { shallow });\n\n      return {\n        added: this._graph.dependencies,\n        modified: new Map(),\n        deleted: new Set(),\n        reset: true,\n      };\n    }\n\n    return result;\n  }\n\n  /**\n   * Returns the graph with all the dependencies. Each module contains the\n   * needed information to do the traversing (dependencies, inverseDependencies)\n   * plus some metadata.\n   */\n  getGraph() {\n    return this._graph;\n  }\n\n  /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n   * LTI update could not be added via codemod */\n  _handleMultipleFileChanges = ({ eventsQueue }) => {\n    eventsQueue.forEach(this._handleFileChange);\n  };\n\n  /**\n   * Handles a single file change. To avoid doing any work before it's needed,\n   * the listener only stores the modified file, which will then be used later\n   * when the delta needs to be calculated.\n   */\n  _handleFileChange = ({ type, filePath }) => {\n    let state;\n    if (this._deletedFiles.has(filePath)) {\n      state = 'deleted';\n    } else if (this._modifiedFiles.has(filePath)) {\n      state = 'modified';\n    } else if (this._addedFiles.has(filePath)) {\n      state = 'added';\n    }\n\n    let nextState;\n    if (type === 'delete') {\n      nextState = 'deleted';\n    } else if (type === 'add') {\n      // A deleted+added file is modified\n      nextState = state === 'deleted' ? 'modified' : 'added';\n    } else {\n      // type === 'change'\n      // An added+modified file is added\n      nextState = state === 'added' ? 'added' : 'modified';\n    }\n\n    switch (nextState) {\n      case 'deleted':\n        this._deletedFiles.add(filePath);\n        this._modifiedFiles.delete(filePath);\n        this._addedFiles.delete(filePath);\n        break;\n      case 'added':\n        this._addedFiles.add(filePath);\n        this._deletedFiles.delete(filePath);\n        this._modifiedFiles.delete(filePath);\n        break;\n      case 'modified':\n        this._modifiedFiles.add(filePath);\n        this._deletedFiles.delete(filePath);\n        this._addedFiles.delete(filePath);\n        break;\n      default:\n        nextState;\n    }\n\n    // Notify users that there is a change in some of the bundle files. This\n    // way the client can choose to refetch the bundle.\n    this.emit('change');\n  };\n\n  async _getChangedDependencies(modifiedFiles, deletedFiles, addedFiles) {\n    if (!this._graph.dependencies.size) {\n      const { added } = await initialTraverseDependencies(this._graph, this._options);\n\n      return {\n        added,\n        modified: new Map(),\n        deleted: new Set(),\n        reset: true,\n      };\n    }\n\n    // If a file has been deleted, we want to invalidate any other file that\n    // depends on it, so we can process it and correctly return an error.\n    deletedFiles.forEach((filePath) => {\n      const module = this._graph.dependencies.get(filePath);\n\n      if (module) {\n        module.inverseDependencies.forEach((path) => {\n          // Only mark the inverse dependency as modified if it's not already\n          // marked as deleted (in that case we can just ignore it).\n          if (!deletedFiles.has(path)) {\n            modifiedFiles.add(path);\n          }\n        });\n      }\n    });\n\n    // NOTE(EvanBacon): This check adds extra complexity so we feature gate it\n    // to enable users to opt out.\n    if (this._options.unstable_allowRequireContext) {\n      // Check if any added or removed files are matched in a context module.\n      // We only need to do this for added files because (1) deleted files will have a context\n      // module as an inverse dependency, (2) modified files don't invalidate the contents\n      // of the context module.\n      addedFiles.forEach((filePath) => {\n        markModifiedContextModules(this._graph, filePath, modifiedFiles);\n      });\n    }\n\n    // We only want to process files that are in the bundle.\n    const modifiedDependencies = Array.from(modifiedFiles).filter((filePath) => this._graph.dependencies.has(filePath));\n\n    // No changes happened. Return empty delta.\n    if (modifiedDependencies.length === 0) {\n      return {\n        added: new Map(),\n        modified: new Map(),\n        deleted: new Set(),\n        reset: false,\n      };\n    }\n\n    const { added, modified, deleted } = await traverseDependencies(modifiedDependencies, this._graph, this._options);\n\n    return {\n      added,\n      modified,\n      deleted,\n      reset: false,\n    };\n  }\n}\n\nmodule.exports = DeltaCalculator;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/baseBytecodeBundle.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst getAppendScripts = require('../../lib/getAppendScripts');\nconst { getJsOutput } = require('./helpers/js');\nconst processBytecodeModules = require('./helpers/processBytecodeModules');\n\nfunction baseBytecodeBundle(entryPoint, preModules, graph, options) {\n  for (const module of graph.dependencies.values()) {\n    options.createModuleId(module.path);\n  }\n\n  const processModulesOptions = {\n    filter: options.processModuleFilter,\n    createModuleId: options.createModuleId,\n    dev: options.dev,\n    projectRoot: options.projectRoot,\n  };\n\n  // Do not prepend polyfills or the require runtime when only modules are requested\n  if (options.modulesOnly) {\n    preModules = [];\n  }\n\n  const modules = [...graph.dependencies.values()].sort(\n    (a, b) => options.createModuleId(a.path) - options.createModuleId(b.path)\n  );\n\n  const { compile } = require('metro-hermes-compiler');\n\n  const post = processBytecodeModules(\n    getAppendScripts(entryPoint, [...preModules, ...modules], graph.importBundleNames, {\n      asyncRequireModulePath: options.asyncRequireModulePath,\n      createModuleId: options.createModuleId,\n      getRunModuleStatement: options.getRunModuleStatement,\n      inlineSourceMap: options.inlineSourceMap,\n      projectRoot: options.projectRoot,\n      runBeforeMainModule: options.runBeforeMainModule,\n      runModule: options.runModule,\n      serverRoot: options.serverRoot,\n      sourceMapUrl: options.sourceMapUrl,\n      sourceUrl: options.sourceUrl,\n    }).map((module) => {\n      return {\n        ...module,\n        output: [\n          ...module.output,\n          {\n            type: 'bytecode/script/virtual',\n            data: {\n              bytecode: compile(getJsOutput(module).data.code, {\n                sourceURL: module.path,\n              }).bytecode,\n            },\n          },\n        ],\n      };\n    }),\n    processModulesOptions\n  ).flatMap(([module, bytecodeBundle]) => bytecodeBundle);\n\n  const processedModules = processBytecodeModules([...graph.dependencies.values()], processModulesOptions).map(\n    ([module, bytecodeBundle]) => [options.createModuleId(module.path), bytecodeBundle]\n  );\n\n  return {\n    pre: processBytecodeModules(preModules, processModulesOptions).flatMap(([_, bytecodeBundle]) => bytecodeBundle),\n    post,\n    modules: processedModules,\n  };\n}\n\nmodule.exports = baseBytecodeBundle;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/baseJSBundle.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst getAppendScripts = require('../../lib/getAppendScripts');\nconst processModules = require('./helpers/processModules');\n\nfunction baseJSBundle(entryPoint, preModules, graph, options) {\n  for (const module of graph.dependencies.values()) {\n    options.createModuleId(module.path);\n  }\n\n  const processModulesOptions = {\n    filter: options.processModuleFilter,\n    createModuleId: options.createModuleId,\n    dev: options.dev,\n    projectRoot: options.projectRoot,\n  };\n\n  // Do not prepend polyfills or the require runtime when only modules are requested\n  if (options.modulesOnly) {\n    preModules = [];\n  }\n\n  const preCode = processModules(preModules, processModulesOptions)\n    .map(([_, code]) => code)\n    .join('\\n');\n\n  const modules = [...graph.dependencies.values()].sort(\n    (a, b) => options.createModuleId(a.path) - options.createModuleId(b.path)\n  );\n\n  const postCode = processModules(\n    getAppendScripts(entryPoint, [...preModules, ...modules], graph.importBundleNames, {\n      asyncRequireModulePath: options.asyncRequireModulePath,\n      createModuleId: options.createModuleId,\n      getRunModuleStatement: options.getRunModuleStatement,\n      inlineSourceMap: options.inlineSourceMap,\n      projectRoot: options.projectRoot,\n      runBeforeMainModule: options.runBeforeMainModule,\n      runModule: options.runModule,\n      serverRoot: options.serverRoot,\n      sourceMapUrl: options.sourceMapUrl,\n      sourceUrl: options.sourceUrl,\n    }),\n    processModulesOptions\n  )\n    .map(([_, code]) => code)\n    .join('\\n');\n\n  return {\n    pre: preCode,\n    post: postCode,\n    modules: processModules([...graph.dependencies.values()], processModulesOptions).map(([module, code]) => [\n      options.createModuleId(module.path),\n      code,\n    ]),\n  };\n}\n\nmodule.exports = baseJSBundle;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/getAllFiles.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst { getAssetFiles } = require('../../Assets');\nconst { getJsOutput, isJsModule } = require('./helpers/js');\n\nasync function getAllFiles(pre, graph, options) {\n  const modules = graph.dependencies;\n  const { processModuleFilter } = options;\n\n  const promises = [];\n\n  for (const module of pre) {\n    if (processModuleFilter(module)) {\n      promises.push([module.path]);\n    }\n  }\n\n  for (const module of modules.values()) {\n    if (!isJsModule(module) || !processModuleFilter(module)) {\n      continue;\n    }\n\n    if (getJsOutput(module).type === 'js/module/asset') {\n      promises.push(getAssetFiles(module.path, options.platform));\n    } else {\n      promises.push([module.path]);\n    }\n  }\n\n  const dependencies = await Promise.all(promises);\n  const output = [];\n\n  for (const dependencyArray of dependencies) {\n    output.push(...dependencyArray);\n  }\n\n  return output;\n}\n\nmodule.exports = getAllFiles;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/getAssets.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst { getAssetData } = require('../../Assets');\nconst { getJsOutput, isJsModule } = require('./helpers/js');\nconst path = require('path');\n\nasync function getAssets(dependencies, options) {\n  const promises = [];\n  const { processModuleFilter } = options;\n\n  for (const module of dependencies.values()) {\n    if (\n      isJsModule(module) &&\n      processModuleFilter(module) &&\n      getJsOutput(module).type === 'js/module/asset' &&\n      path.relative(options.projectRoot, module.path) !== 'package.json'\n    ) {\n      promises.push(\n        getAssetData(\n          module.path,\n          path.relative(options.projectRoot, module.path),\n          options.assetPlugins,\n          options.platform,\n          options.publicPath\n        )\n      );\n    }\n  }\n\n  return await Promise.all(promises);\n}\n\nmodule.exports = getAssets;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/getExplodedSourceMap.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst { getJsOutput, isJsModule } = require('./helpers/js');\n\nfunction getExplodedSourceMap(modules, options) {\n  const modulesToProcess = modules.filter(isJsModule).filter(options.processModuleFilter);\n\n  const result = [];\n  let firstLine1Based = 1;\n\n  for (const module of modulesToProcess) {\n    const { path } = module;\n    const { lineCount, functionMap, map } = getJsOutput(module).data;\n    result.push({ firstLine1Based, functionMap, path, map });\n    firstLine1Based += lineCount;\n  }\n  return result;\n}\n\nmodule.exports = {\n  getExplodedSourceMap,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/getRamBundleInfo.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst { createRamBundleGroups } = require('../../Bundler/util');\nconst getAppendScripts = require('../../lib/getAppendScripts');\nconst getTransitiveDependencies = require('./helpers/getTransitiveDependencies');\nconst { isJsModule, wrapModule } = require('./helpers/js');\nconst { sourceMapObject } = require('./sourceMapObject');\nconst nullthrows = require('nullthrows');\nconst path = require('path');\n\nasync function getRamBundleInfo(entryPoint, pre, graph, options) {\n  let modules = [...pre, ...graph.dependencies.values()];\n  modules = modules.concat(getAppendScripts(entryPoint, modules, graph.importBundleNames, options));\n\n  modules.forEach((module) => options.createModuleId(module.path));\n\n  const ramModules = modules\n    .filter(isJsModule)\n    .filter(options.processModuleFilter)\n    .map((module) => ({\n      id: options.createModuleId(module.path),\n      code: wrapModule(module, options),\n      map: sourceMapObject([module], {\n        excludeSource: options.excludeSource,\n        processModuleFilter: options.processModuleFilter,\n      }),\n      name: path.basename(module.path),\n      sourcePath: module.path,\n      source: module.getSource().toString(),\n      type: nullthrows(module.output.find(({ type }) => type.startsWith('js'))).type,\n    }));\n\n  const { preloadedModules, ramGroups } = await _getRamOptions(\n    entryPoint,\n    {\n      dev: options.dev,\n      platform: options.platform,\n    },\n    (filePath) => getTransitiveDependencies(filePath, graph),\n    options.getTransformOptions\n  );\n\n  const startupModules = [];\n  const lazyModules = [];\n\n  ramModules.forEach((module) => {\n    if (preloadedModules.hasOwnProperty(module.sourcePath)) {\n      startupModules.push(module);\n      return;\n    }\n\n    if (module.type.startsWith('js/script')) {\n      startupModules.push(module);\n      return;\n    }\n\n    if (module.type.startsWith('js/module')) {\n      lazyModules.push(module);\n    }\n  });\n\n  const groups = createRamBundleGroups(ramGroups, lazyModules, (module, dependenciesByPath) => {\n    const deps = getTransitiveDependencies(module.sourcePath, graph);\n    const output = new Set();\n\n    for (const dependency of deps) {\n      const module = dependenciesByPath.get(dependency);\n\n      if (module) {\n        output.add(module.id);\n      }\n    }\n\n    return output;\n  });\n\n  return {\n    getDependencies: (filePath) => getTransitiveDependencies(filePath, graph),\n    groups,\n    lazyModules,\n    startupModules,\n  };\n}\n\n/**\n * Returns the options needed to create a RAM bundle.\n */\nasync function _getRamOptions(\n  entryFile,\n  options,\n\n  getDependencies,\n  getTransformOptions\n) {\n  if (getTransformOptions == null) {\n    return {\n      preloadedModules: {},\n      ramGroups: [],\n    };\n  }\n\n  const { preloadedModules, ramGroups } = await getTransformOptions(\n    [entryFile],\n    { dev: options.dev, hot: true, platform: options.platform },\n    /* $FlowFixMe(>=0.99.0 site=react_native_fb) This comment suppresses an\n     * error found when Flow v0.99 was deployed. To see the error, delete this\n     * comment and run Flow. */\n    async (x) => Array.from(getDependencies)\n  );\n\n  return {\n    preloadedModules: preloadedModules || {},\n    ramGroups: ramGroups || [],\n  };\n}\n\nmodule.exports = getRamBundleInfo;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/helpers/bytecode.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst invariant = require('invariant');\nconst path = require('path');\n\nfunction wrapModule(module, options) {\n  const output = getBytecodeOutput(module);\n\n  if (output.type.startsWith('bytecode/script')) {\n    return [output.data.bytecode];\n  }\n\n  const params = [\n    options.createModuleId(module.path),\n    '[' +\n      Array.from(module.dependencies.values())\n        .map((dependency) => options.createModuleId(dependency.absolutePath))\n        .join(',') +\n      ']',\n  ];\n\n  if (options.dev) {\n    // Add the relative path of the module to make debugging easier.\n    // This is mapped to `module.verboseName` in `require.js`.\n    params.push(JSON.stringify(path.relative(options.projectRoot, module.path)));\n  }\n\n  const { compile } = require('metro-hermes-compiler');\n\n  const headerCode = `globalThis.$$METRO_D=[${params.join(',')}];`;\n  return [\n    compile(headerCode, {\n      sourceURL: module.path + '-virtual.js',\n    }).bytecode,\n    output.data.bytecode,\n  ];\n}\n\nfunction getBytecodeOutput(module) {\n  const output = module.output\n    .filter(({ type }) => type.startsWith('bytecode/'))\n    .map((output) =>\n      output.data.bytecode instanceof Buffer\n        ? output\n        : // Re-create buffers after losing the Buffer instance when sending data over workers.\n          {\n            ...output,\n            data: {\n              ...output.data,\n              bytecode: Buffer.from(output.data.bytecode.data),\n            },\n          }\n    );\n\n  invariant(\n    output.length === 1,\n    `Modules must have exactly one bytecode output, but ${module.path} has ${output.length} bytecode outputs.`\n  );\n\n  return output[0];\n}\n\nfunction isBytecodeModule(module) {\n  return module.output.filter(({ type }) => type.startsWith('bytecode/')).length > 0;\n}\n\nmodule.exports = {\n  getBytecodeOutput,\n  isBytecodeModule,\n  wrapModule,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/helpers/getInlineSourceMappingURL.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nfunction getInlineSourceMappingURL(sourceMap) {\n  const base64 = Buffer.from(sourceMap).toString('base64');\n  return `data:application/json;charset=utf-8;base64,${base64}`;\n}\n\nmodule.exports = getInlineSourceMappingURL;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/helpers/getSourceMapInfo.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst { getJsOutput } = require('./js');\n\nfunction getSourceMapInfo(module, options) {\n  return {\n    ...getJsOutput(module).data,\n    // MARK: - 0.81\n    path: options.getSourceUrl(module) ?? module.path,\n    source: options.excludeSource ? '' : getModuleSource(module),\n  };\n}\n\nfunction getModuleSource(module) {\n  if (getJsOutput(module).type === 'js/module/asset') {\n    return '';\n  }\n\n  return module.getSource().toString();\n}\n\nmodule.exports = getSourceMapInfo;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/helpers/getTransitiveDependencies.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nfunction getTransitiveDependencies(path, graph) {\n  const dependencies = _getDeps(path, graph, new Set());\n\n  // Remove the main entry point, since this method only returns the\n  // dependencies.\n  dependencies.delete(path);\n\n  return dependencies;\n}\n\nfunction _getDeps(path, graph, deps) {\n  if (deps.has(path)) {\n    return deps;\n  }\n\n  const module = graph.dependencies.get(path);\n\n  if (!module) {\n    return deps;\n  }\n\n  deps.add(path);\n\n  for (const dependency of module.dependencies.values()) {\n    _getDeps(dependency.absolutePath, graph, deps);\n  }\n\n  return deps;\n}\n\nmodule.exports = getTransitiveDependencies;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/helpers/js.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst invariant = require('invariant');\nconst { addParamsToDefineCall } = require('metro-transform-plugins');\nconst path = require('path');\n\nfunction wrapModule(module, options) {\n  const output = getJsOutput(module);\n\n  if (output.type.startsWith('js/script')) {\n    return output.data.code;\n  }\n\n  const moduleId = options.createModuleId(module.path);\n  const params = [\n    moduleId,\n    Array.from(module.dependencies.values()).map((dependency) => options.createModuleId(dependency.absolutePath)),\n  ];\n\n  if (options.dev) {\n    // Add the relative path of the module to make debugging easier.\n    // This is mapped to `module.verboseName` in `require.js`.\n    params.push(path.relative(options.projectRoot, module.path));\n  }\n\n  return addParamsToDefineCall(output.data.code, ...params);\n}\n\nfunction getJsOutput(module) {\n  const jsModules = module.output.filter(({ type }) => type.startsWith('js/'));\n\n  invariant(\n    jsModules.length === 1,\n    `Modules must have exactly one JS output, but ${module.path ?? 'unknown module'} has ${\n      jsModules.length\n    } JS outputs.`\n  );\n\n  const jsOutput = jsModules[0];\n\n  invariant(\n    Number.isFinite(jsOutput.data.lineCount),\n    `JS output must populate lineCount, but ${module.path ?? 'unknown module'} has ${\n      jsOutput.type\n    } output with lineCount '${jsOutput.data.lineCount}'`\n  );\n\n  return jsOutput;\n}\n\nfunction isJsModule(module) {\n  return module.output.filter(isJsOutput).length > 0;\n}\n\nfunction isJsOutput(output) {\n  return output.type.startsWith('js/');\n}\n\nmodule.exports = {\n  getJsOutput,\n  isJsModule,\n  wrapModule,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/helpers/processBytecodeModules.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst { isBytecodeModule, wrapModule } = require('./bytecode');\n\nfunction processBytecodeModules(modules, { filter = () => true, createModuleId, dev, projectRoot }) {\n  return [...modules]\n    .filter(isBytecodeModule)\n    .filter(filter)\n    .map((module) => [\n      module,\n      wrapModule(module, {\n        createModuleId,\n        dev,\n        projectRoot,\n      }),\n    ]);\n}\n\nmodule.exports = processBytecodeModules;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/helpers/processModules.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst { isJsModule, wrapModule } = require('./js');\n\nfunction processModules(modules, { filter = () => true, createModuleId, dev, projectRoot }) {\n  return [...modules]\n    .filter(isJsModule)\n    .filter(filter)\n    .map((module) => [\n      module,\n      wrapModule(module, {\n        createModuleId,\n        dev,\n        projectRoot,\n      }),\n    ]);\n}\n\nmodule.exports = processModules;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/hmrJSBundle.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst { isJsModule, wrapModule } = require('./helpers/js');\nconst { addParamsToDefineCall } = require('metro-transform-plugins');\nconst path = require('path');\nconst url = require('url');\n\nfunction generateModules(sourceModules, graph, options) {\n  const modules = [];\n\n  for (const module of sourceModules) {\n    if (isJsModule(module)) {\n      // Construct a bundle URL for this specific module only\n      const getURL = (extension) => {\n        options.clientUrl.pathname = path.relative(\n          options.projectRoot,\n          path.join(path.dirname(module.path), path.basename(module.path, path.extname(module.path)) + '.' + extension)\n        );\n        return url.format(options.clientUrl);\n      };\n\n      const sourceMappingURL = getURL('map');\n      const sourceURL = getURL('bundle');\n      const code =\n        prepareModule(module, graph, options) +\n        `\\n//# sourceMappingURL=${sourceMappingURL}\\n` +\n        `//# sourceURL=${sourceURL}\\n`;\n\n      modules.push({\n        module: [options.createModuleId(module.path), code],\n        sourceMappingURL,\n        sourceURL,\n      });\n    }\n  }\n\n  return modules;\n}\n\nfunction prepareModule(module, graph, options) {\n  const code = wrapModule(module, {\n    ...options,\n    dev: true,\n  });\n\n  const inverseDependencies = getInverseDependencies(module.path, graph);\n  // Transform the inverse dependency paths to ids.\n  const inverseDependenciesById = Object.create(null);\n  Object.keys(inverseDependencies).forEach((path) => {\n    inverseDependenciesById[options.createModuleId(path)] = inverseDependencies[path].map(options.createModuleId);\n  });\n  return addParamsToDefineCall(code, inverseDependenciesById);\n}\n\n/**\n * Instead of adding the whole inverseDependncies object into each changed\n * module (which can be really huge if the dependency graph is big), we only\n * add the needed inverseDependencies for each changed module (we do this by\n * traversing upwards the dependency graph).\n */\nfunction getInverseDependencies(path, graph, inverseDependencies = {}) {\n  // Dependency alredy traversed.\n  if (path in inverseDependencies) {\n    return inverseDependencies;\n  }\n\n  const module = graph.dependencies.get(path);\n  if (!module) {\n    return inverseDependencies;\n  }\n\n  inverseDependencies[path] = [];\n  for (const inverse of module.inverseDependencies) {\n    inverseDependencies[path].push(inverse);\n    getInverseDependencies(inverse, graph, inverseDependencies);\n  }\n\n  return inverseDependencies;\n}\n\nfunction hmrJSBundle(delta, graph, options) {\n  return {\n    added: generateModules(delta.added.values(), graph, options),\n    modified: generateModules(delta.modified.values(), graph, options),\n    deleted: [...delta.deleted].map((path) => options.createModuleId(path)),\n  };\n}\n\nmodule.exports = hmrJSBundle;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/sourceMapGenerator.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst getSourceMapInfo = require('./helpers/getSourceMapInfo');\nconst { isJsModule } = require('./helpers/js');\nconst { fromRawMappings, fromRawMappingsNonBlocking } = require('metro-source-map');\n\nfunction getSourceMapInfosImpl(isBlocking, onDone, modules, options) {\n  const sourceMapInfos = [];\n  const modulesToProcess = modules.filter(isJsModule).filter(options.processModuleFilter);\n\n  function processNextModule() {\n    if (modulesToProcess.length === 0) {\n      return true;\n    }\n\n    const mod = modulesToProcess.shift();\n    const info = getSourceMapInfo(mod, {\n      excludeSource: options.excludeSource,\n      // MARK: - 0.81\n      getSourceUrl: options.getSourceUrl,\n    });\n    sourceMapInfos.push(info);\n    return false;\n  }\n\n  function workLoop() {\n    const time = process.hrtime();\n    while (true) {\n      const isDone = processNextModule();\n      if (isDone) {\n        onDone(sourceMapInfos);\n        break;\n      }\n      if (!isBlocking) {\n        // Keep the loop running but try to avoid blocking\n        // for too long because this is not in a worker yet.\n        const diff = process.hrtime(time);\n        const NS_IN_MS = 1000000;\n        if (diff[1] > 50 * NS_IN_MS) {\n          // We've blocked for more than 50ms.\n          // This code currently runs on the main thread,\n          // so let's give Metro an opportunity to handle requests.\n          setImmediate(workLoop);\n          break;\n        }\n      }\n    }\n  }\n  workLoop();\n}\n\nfunction sourceMapGenerator(modules, options) {\n  let sourceMapInfos;\n  getSourceMapInfosImpl(\n    true,\n    (infos) => {\n      sourceMapInfos = infos;\n    },\n    modules,\n    options\n  );\n  if (sourceMapInfos == null) {\n    throw new Error('Expected getSourceMapInfosImpl() to finish synchronously.');\n  }\n  return fromRawMappings(sourceMapInfos);\n}\n\nasync function sourceMapGeneratorNonBlocking(modules, options) {\n  const sourceMapInfos = await new Promise((resolve) => {\n    getSourceMapInfosImpl(false, resolve, modules, options);\n  });\n  return fromRawMappingsNonBlocking(sourceMapInfos);\n}\n\nmodule.exports = {\n  sourceMapGenerator,\n  sourceMapGeneratorNonBlocking,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/sourceMapObject.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst { sourceMapGenerator, sourceMapGeneratorNonBlocking } = require('./sourceMapGenerator');\n\nfunction sourceMapObject(modules, options) {\n  const generator = sourceMapGenerator(modules, options);\n  return generator.toMap(undefined, {\n    excludeSource: options.excludeSource,\n  });\n}\n\nasync function sourceMapObjectNonBlocking(modules, options) {\n  const generator = await sourceMapGeneratorNonBlocking(modules, options);\n  return generator.toMap(undefined, {\n    excludeSource: options.excludeSource,\n  });\n}\n\nmodule.exports = {\n  sourceMapObject,\n  sourceMapObjectNonBlocking,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Serializers/sourceMapString.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst { sourceMapGenerator } = require('./sourceMapGenerator');\n\nfunction sourceMapString(modules, options) {\n  return sourceMapGenerator(modules, options).toString(undefined, {\n    excludeSource: options.excludeSource,\n  });\n}\n\nmodule.exports = sourceMapString;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Transformer.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nimport crypto from 'crypto';\n\nconst getTransformCacheKey = require('./getTransformCacheKey');\nconst WorkerFarm = require('./WorkerFarm');\nconst assert = require('assert');\nconst fs = require('fs');\nconst { Cache, stableHash } = require('metro-cache');\nconst path = require('path');\n\nclass Transformer {\n  _config;\n  _cache;\n  _baseHash;\n  _getSha1;\n  _workerFarm;\n\n  constructor(config, getSha1Fn) {\n    this._config = config;\n\n    this._config.watchFolders.forEach(verifyRootExists);\n    this._cache = new Cache(config.cacheStores);\n    this._getSha1 = getSha1Fn;\n\n    // Remove the transformer config params that we don't want to pass to the\n    // transformer. We should change the config object and move them away so we\n    // can treat the transformer config params as opaque.\n    const {\n      getTransformOptions: _getTransformOptions,\n      transformVariants: _transformVariants,\n      workerPath: _workerPath,\n      ...transformerConfig\n    } = this._config.transformer;\n\n    const transformerOptions = {\n      transformerPath: this._config.transformerPath,\n      transformerConfig,\n    };\n\n    this._workerFarm = new WorkerFarm(config, transformerOptions);\n\n    const globalCacheKey = this._cache.isDisabled\n      ? ''\n      : getTransformCacheKey({\n          cacheVersion: this._config.cacheVersion,\n          projectRoot: this._config.projectRoot,\n          transformerConfig: transformerOptions,\n        });\n\n    this._baseHash = stableHash([globalCacheKey]).toString('binary');\n  }\n\n  async transformFile(filePath, transformerOptions, fileBuffer) {\n    const cache = this._cache;\n\n    const {\n      customTransformOptions,\n      dev,\n      experimentalImportSupport,\n      hot,\n      inlinePlatform,\n      inlineRequires,\n      minify,\n      nonInlinedRequires,\n      platform,\n      runtimeBytecodeVersion,\n      type,\n      unstable_disableES6Transforms,\n      unstable_transformProfile,\n      ...extra\n    } = transformerOptions;\n\n    for (const key in extra) {\n      // $FlowFixMe[cannot-resolve-name]\n      if (hasOwnProperty.call(extra, key)) {\n        throw new Error('Extra keys detected: ' + Object.keys(extra).join(', '));\n      }\n    }\n\n    const localPath = path.relative(this._config.projectRoot, filePath);\n\n    const partialKey = stableHash([\n      // This is the hash related to the global Bundler config.\n      this._baseHash,\n\n      // Path.\n      localPath,\n\n      customTransformOptions,\n      dev,\n      experimentalImportSupport,\n      hot,\n      inlinePlatform,\n      inlineRequires,\n      minify,\n      nonInlinedRequires,\n      platform,\n      runtimeBytecodeVersion,\n      type,\n      unstable_disableES6Transforms,\n      unstable_transformProfile,\n    ]);\n\n    let sha1;\n    if (fileBuffer) {\n      // Shortcut for virtual modules which provide the contents with the filename.\n      sha1 = crypto.createHash('sha1').update(fileBuffer).digest('hex');\n    } else {\n      sha1 = this._getSha1(filePath);\n    }\n\n    let fullKey = Buffer.concat([partialKey, Buffer.from(sha1, 'hex')]);\n    const result = await cache.get(fullKey);\n\n    // A valid result from the cache is used directly; otherwise we call into\n    // the transformer to computed the corresponding result.\n    const data = result\n      ? { result, sha1 }\n      : await this._workerFarm.transform(localPath, transformerOptions, fileBuffer);\n\n    // Only re-compute the full key if the SHA-1 changed. This is because\n    // references are used by the cache implementation in a weak map to keep\n    // track of the cache that returned the result.\n    if (sha1 !== data.sha1) {\n      fullKey = Buffer.concat([partialKey, Buffer.from(data.sha1, 'hex')]);\n    }\n\n    cache.set(fullKey, data.result);\n\n    return {\n      ...data.result,\n      getSource() {\n        if (fileBuffer) {\n          return fileBuffer;\n        }\n        return fs.readFileSync(filePath);\n      },\n    };\n  }\n\n  end() {\n    this._workerFarm.kill();\n  }\n}\n\nfunction verifyRootExists(root) {\n  // Verify that the root exists.\n  assert(fs.statSync(root).isDirectory(), 'Root has to be a valid directory');\n}\n\nmodule.exports = Transformer;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Worker.flow.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst traverse = require('@babel/traverse').default;\nconst crypto = require('crypto');\nconst fs = require('fs');\nconst path = require('path');\n\n/**\n * When the `Buffer` is sent over the worker thread it gets serialized into a JSON object.\n * This helper method will deserialize it if needed.\n *\n * @returns `Buffer` representation of the JSON object.\n * @returns `null` if the given object is nullish or not a serialized `Buffer` object.\n */\nfunction asDeserializedBuffer(value) {\n  if (Buffer.isBuffer(value)) {\n    return value;\n  }\n  if (value && value.type === 'Buffer') {\n    return Buffer.from(value.data);\n  }\n  return null;\n}\n\nasync function transform(filename, transformOptions, projectRoot, transformerConfig, fileBuffer) {\n  let data;\n\n  const fileBufferObject = asDeserializedBuffer(fileBuffer);\n  if (fileBufferObject) {\n    data = fileBufferObject;\n  } else {\n    data = fs.readFileSync(path.resolve(projectRoot, filename));\n  }\n  return transformFile(filename, data, transformOptions, projectRoot, transformerConfig);\n}\n\nasync function transformFile(filename, data, transformOptions, projectRoot, transformerConfig) {\n  // eslint-disable-next-line no-useless-call\n  const Transformer = require.call(null, transformerConfig.transformerPath);\n\n  const transformFileStartLogEntry = {\n    action_name: 'Transforming file',\n    action_phase: 'start',\n    file_name: filename,\n    log_entry_label: 'Transforming file',\n    start_timestamp: process.hrtime(),\n  };\n\n  const sha1 = crypto.createHash('sha1').update(data).digest('hex');\n\n  const result = await Transformer.transform(\n    transformerConfig.transformerConfig,\n    projectRoot,\n    filename,\n    data,\n    transformOptions\n  );\n\n  // The babel cache caches scopes and pathes for already traversed AST nodes.\n  // Clearing the cache here since the nodes of the transformed file are no longer referenced.\n  // This isn't stritcly necessary since the cache uses a WeakMap. However, WeakMap only permit\n  // that unreferenced keys are collected but the values still hold references to the Scope and NodePaths.\n  // Manually clearing the cache allows the GC to collect the Scope and NodePaths without checking if there\n  // exist any other references to the keys.\n  traverse.cache.clear();\n\n  const transformFileEndLogEntry = getEndLogEntry(transformFileStartLogEntry, filename);\n\n  return {\n    result,\n    sha1,\n    transformFileStartLogEntry,\n    transformFileEndLogEntry,\n  };\n}\n\nfunction getEndLogEntry(startLogEntry, filename) {\n  const timeDelta = process.hrtime(startLogEntry.start_timestamp);\n  const duration_ms = Math.round((timeDelta[0] * 1e9 + timeDelta[1]) / 1e6);\n\n  return {\n    action_name: 'Transforming file',\n    action_phase: 'end',\n    file_name: filename,\n    duration_ms,\n    log_entry_label: 'Transforming file',\n  };\n}\n\nmodule.exports = {\n  transform,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/Worker.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\n/*::\nexport type * from './Worker.flow';\n*/\n\ntry {\n  require('metro-babel-register').unstable_registerForMetroMonorepo();\n} catch {}\n\nmodule.exports = require('./Worker.flow');\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/WorkerFarm.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst { Worker: JestWorker } = require('jest-worker');\n// MARK: - GRANITE\nconst fs = require('fs');\nconst path = require('path');\nconst { Logger } = require('../../../metro-core/src');\n\nclass WorkerFarm {\n  _config;\n  _transformerConfig;\n  _worker;\n\n  constructor(config, transformerConfig) {\n    this._config = config;\n    this._transformerConfig = transformerConfig;\n\n    if (this._config.maxWorkers > 1) {\n      const worker = this._makeFarm(this._config.transformer.workerPath, ['transform'], this._config.maxWorkers);\n\n      worker.getStdout().on('data', (chunk) => {\n        this._config.reporter.update({\n          type: 'worker_stdout_chunk',\n          chunk: chunk.toString('utf8'),\n        });\n      });\n      worker.getStderr().on('data', (chunk) => {\n        this._config.reporter.update({\n          type: 'worker_stderr_chunk',\n          chunk: chunk.toString('utf8'),\n        });\n      });\n\n      this._worker = worker;\n    } else {\n      // eslint-disable-next-line no-useless-call\n      this._worker = require.call(null, this._config.transformer.workerPath);\n    }\n  }\n\n  async kill() {\n    if (this._worker && typeof this._worker.end === 'function') {\n      await this._worker.end();\n    }\n  }\n\n  async transform(filename, options, fileBuffer) {\n    try {\n      // MARK: - GRANITE\n      const { INTERNAL__transformSync } = this._config.transformer;\n      const buffer = asDeserializedBuffer(fileBuffer);\n      if (buffer) {\n        fileBuffer = buffer;\n      } else {\n        fileBuffer = fs.readFileSync(path.resolve(this._config.projectRoot, filename));\n      }\n      if (typeof INTERNAL__transformSync === 'function') {\n        fileBuffer = Buffer.from(INTERNAL__transformSync(filename, fileBuffer.toString('utf-8')));\n      }\n\n      const data = await this._worker.transform(\n        filename,\n        options,\n        this._config.projectRoot,\n        this._transformerConfig,\n        fileBuffer\n      );\n\n      Logger.log(data.transformFileStartLogEntry);\n      Logger.log(data.transformFileEndLogEntry);\n\n      return {\n        result: data.result,\n        sha1: data.sha1,\n      };\n    } catch (err) {\n      if (err.loc) {\n        throw this._formatBabelError(err, filename);\n      } else {\n        throw this._formatGenericError(err, filename);\n      }\n    }\n  }\n\n  _makeFarm(workerPath, exposedMethods, numWorkers) {\n    const env = {\n      ...process.env,\n      // Force color to print syntax highlighted code frames.\n      FORCE_COLOR: 1,\n    };\n\n    return new JestWorker(workerPath, {\n      computeWorkerKey: this._config.stickyWorkers\n        ? // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n          this._computeWorkerKey\n        : undefined,\n      exposedMethods,\n      forkOptions: { env },\n      numWorkers,\n    });\n  }\n\n  _computeWorkerKey(method, filename) {\n    // Only when transforming a file we want to stick to the same worker; and\n    // we'll shard by file path. If not; we return null, which tells the worker\n    // to pick the first available one.\n    if (method === 'transform') {\n      return filename;\n    }\n\n    return null;\n  }\n\n  _formatGenericError(err, filename) {\n    const error = new TransformError(`${filename}: ${err.message}`);\n\n    return Object.assign(error, {\n      stack: (err.stack || '').split('\\n').slice(0, -1).join('\\n'),\n      lineNumber: 0,\n    });\n  }\n\n  _formatBabelError(err, filename) {\n    const error = new TransformError(\n      `${err.type || 'Error'}${err.message.includes(filename) ? '' : ' in ' + filename}: ${err.message}`\n    );\n\n    // $FlowExpectedError: TODO(t67543470): Change this to properly extend the error.\n    return Object.assign(error, {\n      stack: err.stack,\n      snippet: err.codeFrame,\n      lineNumber: err.loc.line,\n      column: err.loc.column,\n      filename,\n    });\n  }\n}\n\nclass TransformError extends SyntaxError {\n  type = 'TransformError';\n\n  constructor(message) {\n    super(message);\n    Error.captureStackTrace && Error.captureStackTrace(this, TransformError);\n  }\n}\n\n// MARK: - GRANITE\nfunction asDeserializedBuffer(value) {\n  if (Buffer.isBuffer(value)) {\n    return value;\n  }\n  if (value && value.type === 'Buffer') {\n    return Buffer.from(value.data);\n  }\n  return null;\n}\n\nmodule.exports = WorkerFarm;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/getTransformCacheKey.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\n// MARK: - GRANITE\nconst VERSION = require('../../../../constants').VERSION;\nconst crypto = require('crypto');\nconst getCacheKey = require('metro-cache-key');\n\nfunction getTransformCacheKey(opts) {\n  const { transformerPath, transformerConfig } = opts.transformerConfig;\n\n  // eslint-disable-next-line no-useless-call\n  const Transformer = require.call(null, transformerPath);\n  const transformerKey = Transformer.getCacheKey ? Transformer.getCacheKey(transformerConfig) : '';\n\n  return crypto\n    .createHash('sha1')\n    .update(\n      [\n        'metro-cache',\n        VERSION,\n        opts.cacheVersion,\n        getCacheKey([require.resolve(transformerPath)]),\n        transformerKey,\n        transformerConfig.globalPrefix,\n      ].join('$')\n    )\n    .digest('hex');\n}\n\nmodule.exports = getTransformCacheKey;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/graphOperations.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n/**\n * Portions of this code are based on the Synchronous Cycle Collection\n * algorithm described in:\n *\n * David F. Bacon and V. T. Rajan. 2001. Concurrent Cycle Collection in\n * Reference Counted Systems. In Proceedings of the 15th European Conference on\n * Object-Oriented Programming (ECOOP '01). Springer-Verlag, Berlin,\n * Heidelberg, 207–235.\n *\n * Notable differences from the algorithm in the paper:\n * 1. Our implementation uses the inverseDependencies set (which we already\n *    have to maintain) instead of a separate refcount variable. A module's\n *    reference count is equal to the size of its inverseDependencies set, plus\n *    1 if it's an entry point of the graph.\n * 2. We keep the \"root buffer\" (possibleCycleRoots) free of duplicates by\n *    making it a Set, instead of storing a \"buffered\" flag on each node.\n * 3. On top of tracking edges between nodes, we also count references between\n *    nodes and entries in the importBundleNames set.\n */\n\n'use strict';\n\nimport CountingSet from '../lib/CountingSet';\nimport { deriveAbsolutePathFromContext, fileMatchesContext } from '../lib/contextModule';\n\nimport * as path from 'path';\nconst invariant = require('invariant');\nconst nullthrows = require('nullthrows');\n\n// TODO: Convert to a Flow enum\n\n// Private state for the graph that persists between operations.\n\nfunction createGraph(options) {\n  return {\n    ...options,\n    dependencies: new Map(),\n    importBundleNames: new Set(),\n    privateState: {\n      resolvedContexts: new Map(),\n      gc: {\n        color: new Map(),\n        possibleCycleRoots: new Set(),\n        importBundleRefs: new Map(),\n      },\n    },\n  };\n}\n\n/**\n * Internal data structure that the traversal logic uses to know which of the\n * files have been modified. This allows to return the added modules before the\n * modified ones (which is useful for things like Hot Module Reloading).\n **/\n\nfunction getInternalOptions({ transform, resolve, onProgress, experimentalImportBundleSupport, shallow }) {\n  let numProcessed = 0;\n  let total = 0;\n\n  return {\n    experimentalImportBundleSupport,\n    transform,\n    resolve,\n    onDependencyAdd: () => onProgress && onProgress(numProcessed, ++total),\n    onDependencyAdded: () => onProgress && onProgress(++numProcessed, total),\n    shallow,\n  };\n}\n\n/**\n * Dependency Traversal logic for the Delta Bundler. This method calculates\n * the modules that should be included in the bundle by traversing the\n * dependency graph.\n * Instead of traversing the whole graph each time, it just calculates the\n * difference between runs by only traversing the added/removed dependencies.\n * To do so, it uses the passed graph dependencies and it mutates it.\n * The paths parameter contains the absolute paths of the root files that the\n * method should traverse. Normally, these paths should be the modified files\n * since the last traversal.\n */\nasync function traverseDependencies(paths, graph, options) {\n  const delta = {\n    added: new Set(),\n    modified: new Set(),\n    deleted: new Set(),\n    earlyInverseDependencies: new Map(),\n  };\n\n  const internalOptions = getInternalOptions(options);\n\n  for (const path of paths) {\n    // Start traversing from modules that are already part of the dependency graph.\n    if (graph.dependencies.get(path)) {\n      delta.modified.add(path);\n\n      await traverseDependenciesForSingleFile(path, graph, delta, internalOptions);\n    }\n  }\n\n  collectCycles(graph, delta);\n\n  const added = new Map();\n  for (const path of delta.added) {\n    added.set(path, nullthrows(graph.dependencies.get(path)));\n  }\n\n  const modified = new Map();\n  for (const path of delta.modified) {\n    // Only report a module as modified if we're not already reporting it as added.\n    if (!delta.added.has(path)) {\n      modified.set(path, nullthrows(graph.dependencies.get(path)));\n    }\n  }\n\n  return {\n    added,\n    modified,\n    deleted: delta.deleted,\n  };\n}\n\nasync function initialTraverseDependencies(graph, options) {\n  const delta = {\n    added: new Set(),\n    modified: new Set(),\n    deleted: new Set(),\n    earlyInverseDependencies: new Map(),\n  };\n\n  const internalOptions = getInternalOptions(options);\n\n  invariant(graph.dependencies.size === 0, 'initialTraverseDependencies called on nonempty graph');\n  invariant(graph.importBundleNames.size === 0, 'initialTraverseDependencies called on nonempty graph');\n\n  graph.privateState.gc.color.clear();\n  graph.privateState.gc.possibleCycleRoots.clear();\n  graph.privateState.gc.importBundleRefs.clear();\n\n  for (const path of graph.entryPoints) {\n    // Each entry point implicitly has a refcount of 1, so mark them all black.\n    graph.privateState.gc.color.set(path, 'black');\n  }\n\n  await Promise.all(\n    [...graph.entryPoints].map((path) => traverseDependenciesForSingleFile(path, graph, delta, internalOptions))\n  );\n\n  reorderGraph(graph, {\n    shallow: options.shallow,\n  });\n\n  return {\n    added: graph.dependencies,\n    modified: new Map(),\n    deleted: new Set(),\n  };\n}\n\nasync function traverseDependenciesForSingleFile(path, graph, delta, options) {\n  options.onDependencyAdd();\n\n  await processModule(path, graph, delta, options);\n\n  options.onDependencyAdded();\n}\n\nasync function processModule(path, graph, delta, options) {\n  const resolvedContext = graph.privateState.resolvedContexts.get(path);\n  // Transform the file via the given option.\n  // TODO: Unbind the transform method from options\n  const result = await options.transform(path, resolvedContext);\n\n  // Get the absolute path of all sub-dependencies (some of them could have been\n  // moved but maintain the same relative path).\n  const currentDependencies = resolveDependencies(graph, path, result.dependencies, options);\n\n  const previousModule = graph.dependencies.get(path) || {\n    inverseDependencies: delta.earlyInverseDependencies.get(path) || new CountingSet(),\n    path,\n  };\n  const previousDependencies = previousModule.dependencies || new Map();\n\n  // Update the module information.\n  const module = {\n    ...previousModule,\n    dependencies: new Map(previousDependencies),\n    getSource: result.getSource,\n    output: result.output,\n  };\n  graph.dependencies.set(module.path, module);\n\n  // Diff dependencies (1/2): remove dependencies that have changed or been removed.\n  for (const [key, prevDependency] of previousDependencies) {\n    const curDependency = currentDependencies.get(key);\n    if (!curDependency || !dependenciesEqual(prevDependency, curDependency, options)) {\n      removeDependency(module, key, prevDependency, graph, delta, options);\n    }\n  }\n\n  // Diff dependencies (2/2): add dependencies that have changed or been added.\n  const promises = [];\n  for (const [key, curDependency] of currentDependencies) {\n    const prevDependency = previousDependencies.get(key);\n    if (!prevDependency || !dependenciesEqual(prevDependency, curDependency, options)) {\n      promises.push(addDependency(module, key, curDependency, graph, delta, options));\n    }\n  }\n\n  await Promise.all(promises);\n\n  // Replace dependencies with the correctly-ordered version. As long as all\n  // the above promises have resolved, this will be the same map but without\n  // the added nondeterminism of promise resolution order. Because this\n  // assignment does not add or remove edges, it does NOT invalidate any of the\n  // garbage collection state.\n\n  // Catch obvious errors with a cheap assertion.\n  invariant(module.dependencies.size === currentDependencies.size, 'Failed to add the correct dependencies');\n\n  module.dependencies = currentDependencies;\n\n  return module;\n}\n\nfunction dependenciesEqual(a, b, options) {\n  return (\n    a === b ||\n    (a.absolutePath === b.absolutePath &&\n      (!options.experimentalImportBundleSupport || a.data.data.asyncType === b.data.data.asyncType) &&\n      contextParamsEqual(a.data.data.contextParams, b.data.data.contextParams))\n  );\n}\n\nfunction contextParamsEqual(a, b) {\n  return (\n    a === b ||\n    (a == null && b == null) ||\n    (a != null &&\n      b != null &&\n      a.recursive === b.recursive &&\n      a.filter.pattern === b.filter.pattern &&\n      a.filter.flags === b.filter.flags &&\n      a.mode === b.mode)\n  );\n}\n\nasync function addDependency(parentModule, key, dependency, graph, delta, options) {\n  const path = dependency.absolutePath;\n\n  // The module may already exist, in which case we just need to update some\n  // bookkeeping instead of adding a new node to the graph.\n  let module = graph.dependencies.get(path);\n\n  if (options.shallow) {\n    // Don't add a node for the module if the graph is shallow (single-module).\n  } else if (options.experimentalImportBundleSupport && dependency.data.data.asyncType != null) {\n    // Don't add a node for the module if we are traversing async dependencies\n    // lazily (and this is an async dependency). Instead, record it in\n    // importBundleNames.\n    incrementImportBundleReference(dependency, graph);\n  } else {\n    if (!module) {\n      // Add a new node to the graph.\n      const earlyInverseDependencies = delta.earlyInverseDependencies.get(path);\n      if (earlyInverseDependencies) {\n        // This module is being transformed at the moment in parallel, so we\n        // should only mark its parent as an inverse dependency.\n        earlyInverseDependencies.add(parentModule.path);\n      } else {\n        if (delta.deleted.has(path)) {\n          // Mark the addition by clearing a prior deletion.\n          delta.deleted.delete(path);\n        } else {\n          // Mark the addition in the added set.\n          delta.added.add(path);\n          delta.modified.delete(path);\n        }\n        delta.earlyInverseDependencies.set(path, new CountingSet());\n\n        options.onDependencyAdd();\n        module = await processModule(path, graph, delta, options);\n        options.onDependencyAdded();\n\n        graph.dependencies.set(module.path, module);\n      }\n    }\n    if (module) {\n      // We either added a new node to the graph, or we're updating an existing one.\n      module.inverseDependencies.add(parentModule.path);\n      markModuleInUse(module, graph);\n    }\n  }\n\n  // Always update the parent's dependency map.\n  // This means the parent's dependencies can get desynced from\n  // inverseDependencies and the other fields in the case of lazy edges.\n  // Not an optimal representation :(\n  parentModule.dependencies.set(key, dependency);\n}\n\nfunction removeDependency(parentModule, key, dependency, graph, delta, options) {\n  parentModule.dependencies.delete(key);\n\n  const { absolutePath } = dependency;\n\n  if (options.experimentalImportBundleSupport && dependency.data.data.asyncType != null) {\n    decrementImportBundleReference(dependency, graph);\n  }\n\n  const module = graph.dependencies.get(absolutePath);\n\n  if (!module) {\n    return;\n  }\n  module.inverseDependencies.delete(parentModule.path);\n  if (module.inverseDependencies.size > 0 || graph.entryPoints.has(absolutePath)) {\n    // The reference count has decreased, but not to zero.\n    // NOTE: Each entry point implicitly has a refcount of 1.\n    markAsPossibleCycleRoot(module, graph);\n  } else {\n    // The reference count has decreased to zero.\n    releaseModule(module, graph, delta, options);\n  }\n}\n\n/**\n * Collect a list of context modules which include a given file.\n */\nfunction markModifiedContextModules(graph, filePath, modifiedPaths) {\n  for (const [absolutePath, context] of graph.privateState.resolvedContexts) {\n    if (!modifiedPaths.has(absolutePath) && fileMatchesContext(filePath, context)) {\n      modifiedPaths.add(absolutePath);\n    }\n  }\n}\n\nfunction resolveDependencies(graph, parentPath, dependencies, options) {\n  const maybeResolvedDeps = new Map();\n  for (const dep of dependencies) {\n    let resolvedDep;\n\n    // `require.context`\n    const { contextParams } = dep.data;\n    if (contextParams) {\n      // Ensure the filepath has uniqueness applied to ensure multiple `require.context`\n      // statements can be used to target the same file with different properties.\n      const from = path.join(parentPath, '..', dep.name);\n      const absolutePath = deriveAbsolutePathFromContext(from, contextParams);\n\n      const resolvedContext = {\n        from,\n        mode: contextParams.mode,\n        recursive: contextParams.recursive,\n        filter: new RegExp(contextParams.filter.pattern, contextParams.filter.flags),\n      };\n\n      graph.privateState.resolvedContexts.set(absolutePath, resolvedContext);\n\n      resolvedDep = {\n        absolutePath,\n        data: dep,\n      };\n    } else {\n      try {\n        resolvedDep = {\n          absolutePath: options.resolve(parentPath, dep.name),\n          data: dep,\n        };\n\n        // This dependency may have existed previously as a require.context -\n        // clean it up.\n        graph.privateState.resolvedContexts.delete(resolvedDep.absolutePath);\n      } catch (error) {\n        // Ignore unavailable optional dependencies. They are guarded\n        // with a try-catch block and will be handled during runtime.\n        if (dep.data.isOptional !== true) {\n          throw error;\n        }\n      }\n    }\n\n    const key = dep.data.key;\n    if (maybeResolvedDeps.has(key)) {\n      throw new Error(`resolveDependencies: Found duplicate dependency key '${key}' in ${parentPath}`);\n    }\n    maybeResolvedDeps.set(key, resolvedDep);\n  }\n\n  const resolvedDeps = new Map();\n  // Return just the dependencies we successfully resolved.\n  // FIXME: This has a bad bug affecting all dependencies *after* an unresolved\n  // optional dependency. We'll need to propagate the nulls all the way to the\n  // serializer and the require() runtime to keep the dependency map from being\n  // desynced from the contents of the module.\n  for (const [key, resolvedDep] of maybeResolvedDeps) {\n    if (resolvedDep) {\n      resolvedDeps.set(key, resolvedDep);\n    }\n  }\n  return resolvedDeps;\n}\n\n/**\n * Re-traverse the dependency graph in DFS order to reorder the modules and\n * guarantee the same order between runs. This method mutates the passed graph.\n */\nfunction reorderGraph(graph, options) {\n  const orderedDependencies = new Map();\n\n  graph.entryPoints.forEach((entryPoint) => {\n    const mainModule = graph.dependencies.get(entryPoint);\n\n    if (!mainModule) {\n      throw new ReferenceError('Module not registered in graph: ' + entryPoint);\n    }\n\n    reorderDependencies(graph, mainModule, orderedDependencies, options);\n  });\n\n  graph.dependencies = orderedDependencies;\n}\n\nfunction reorderDependencies(graph, module, orderedDependencies, options) {\n  if (module.path) {\n    if (orderedDependencies.has(module.path)) {\n      return;\n    }\n\n    orderedDependencies.set(module.path, module);\n  }\n\n  module.dependencies.forEach((dependency) => {\n    const path = dependency.absolutePath;\n    const childModule = graph.dependencies.get(path);\n\n    if (!childModule) {\n      if (dependency.data.data.asyncType != null || options.shallow) {\n        return;\n      } else {\n        throw new ReferenceError('Module not registered in graph: ' + path);\n      }\n    }\n\n    reorderDependencies(graph, childModule, orderedDependencies, options);\n  });\n}\n\n/** Garbage collection functions */\n\n// Add an entry to importBundleNames (or increase the reference count of an existing one)\nfunction incrementImportBundleReference(dependency, graph) {\n  const { absolutePath } = dependency;\n\n  graph.privateState.gc.importBundleRefs.set(\n    absolutePath,\n    (graph.privateState.gc.importBundleRefs.get(absolutePath) ?? 0) + 1\n  );\n  graph.importBundleNames.add(absolutePath);\n}\n\n// Decrease the reference count of an entry in importBundleNames (and delete it if necessary)\nfunction decrementImportBundleReference(dependency, graph) {\n  const { absolutePath } = dependency;\n\n  const prevRefCount = nullthrows(graph.privateState.gc.importBundleRefs.get(absolutePath));\n  invariant(prevRefCount > 0, 'experimentalImportBundleSupport: import bundle refcount not valid');\n  graph.privateState.gc.importBundleRefs.set(absolutePath, prevRefCount - 1);\n  if (prevRefCount === 1) {\n    graph.privateState.gc.importBundleRefs.delete(absolutePath);\n    graph.importBundleNames.delete(absolutePath);\n  }\n}\n\n// Mark a module as in use (ref count >= 1)\nfunction markModuleInUse(module, graph) {\n  graph.privateState.gc.color.set(module.path, 'black');\n}\n\n// Delete an unreachable module from the graph immediately, unless it's queued\n// for later deletion as a potential cycle root. Delete the module's outbound\n// edges.\n// Called when the reference count of a module has reached 0.\nfunction releaseModule(module, graph, delta, options) {\n  for (const [key, dependency] of module.dependencies) {\n    removeDependency(module, key, dependency, graph, delta, options);\n  }\n  graph.privateState.gc.color.set(module.path, 'black');\n  if (!graph.privateState.gc.possibleCycleRoots.has(module.path)) {\n    freeModule(module, graph, delta);\n  }\n}\n\n// Delete an unreachable module from the graph.\nfunction freeModule(module, graph, delta) {\n  if (delta.added.has(module.path)) {\n    // Mark the deletion by clearing a prior addition.\n    delta.added.delete(module.path);\n  } else {\n    // Mark the deletion in the deleted set.\n    delta.deleted.add(module.path);\n    delta.modified.delete(module.path);\n  }\n\n  // This module is not used anywhere else! We can clear it from the bundle.\n  // Clean up all the state associated with this module in order to correctly\n  // re-add it if we encounter it again.\n  graph.dependencies.delete(module.path);\n  delta.earlyInverseDependencies.delete(module.path);\n  graph.privateState.gc.possibleCycleRoots.delete(module.path);\n  graph.privateState.gc.color.delete(module.path);\n  graph.privateState.resolvedContexts.delete(module.path);\n}\n\n// Mark a module as a possible cycle root\nfunction markAsPossibleCycleRoot(module, graph) {\n  if (nullthrows(graph.privateState.gc.color.get(module.path)) !== 'purple') {\n    graph.privateState.gc.color.set(module.path, 'purple');\n    graph.privateState.gc.possibleCycleRoots.add(module.path);\n  }\n}\n\n// Collect any unreachable cycles in the graph.\nfunction collectCycles(graph, delta) {\n  // Mark recursively from roots (trial deletion)\n  for (const path of graph.privateState.gc.possibleCycleRoots) {\n    const module = nullthrows(graph.dependencies.get(path));\n    const color = nullthrows(graph.privateState.gc.color.get(path));\n    if (color === 'purple') {\n      markGray(module, graph);\n    } else {\n      graph.privateState.gc.possibleCycleRoots.delete(path);\n      if (color === 'black' && module.inverseDependencies.size === 0 && !graph.entryPoints.has(path)) {\n        freeModule(module, graph, delta);\n      }\n    }\n  }\n  // Scan recursively from roots (undo unsuccessful trial deletions)\n  for (const path of graph.privateState.gc.possibleCycleRoots) {\n    const module = nullthrows(graph.dependencies.get(path));\n    scan(module, graph);\n  }\n  // Collect recursively from roots (free unreachable cycles)\n  for (const path of graph.privateState.gc.possibleCycleRoots) {\n    graph.privateState.gc.possibleCycleRoots.delete(path);\n    const module = nullthrows(graph.dependencies.get(path));\n    collectWhite(module, graph, delta);\n  }\n}\n\nfunction markGray(module, graph) {\n  const color = nullthrows(graph.privateState.gc.color.get(module.path));\n  if (color !== 'gray') {\n    graph.privateState.gc.color.set(module.path, 'gray');\n    for (const dependency of module.dependencies.values()) {\n      const childModule = nullthrows(graph.dependencies.get(dependency.absolutePath));\n      // The inverse dependency will be restored during the scan phase if this module remains live.\n      childModule.inverseDependencies.delete(module.path);\n      markGray(childModule, graph);\n    }\n  }\n}\n\nfunction scan(module, graph) {\n  const color = nullthrows(graph.privateState.gc.color.get(module.path));\n  if (color === 'gray') {\n    if (module.inverseDependencies.size > 0 || graph.entryPoints.has(module.path)) {\n      scanBlack(module, graph);\n    } else {\n      graph.privateState.gc.color.set(module.path, 'white');\n      for (const dependency of module.dependencies.values()) {\n        const childModule = nullthrows(graph.dependencies.get(dependency.absolutePath));\n        scan(childModule, graph);\n      }\n    }\n  }\n}\n\nfunction scanBlack(module, graph) {\n  graph.privateState.gc.color.set(module.path, 'black');\n  for (const dependency of module.dependencies.values()) {\n    const childModule = nullthrows(graph.dependencies.get(dependency.absolutePath));\n    // The inverse dependency must have been deleted during the mark phase.\n    childModule.inverseDependencies.add(module.path);\n    const childColor = nullthrows(graph.privateState.gc.color.get(childModule.path));\n    if (childColor !== 'black') {\n      scanBlack(childModule, graph);\n    }\n  }\n}\n\nfunction collectWhite(module, graph, delta) {\n  const color = nullthrows(graph.privateState.gc.color.get(module.path));\n  if (color === 'white' && !graph.privateState.gc.possibleCycleRoots.has(module.path)) {\n    graph.privateState.gc.color.set(module.path, 'black');\n    for (const dependency of module.dependencies.values()) {\n      const childModule = graph.dependencies.get(dependency.absolutePath);\n      // The child may already have been collected.\n      if (childModule) {\n        collectWhite(childModule, graph, delta);\n      }\n    }\n    freeModule(module, graph, delta);\n  }\n}\n\n/** End of garbage collection functions */\n\nmodule.exports = {\n  createGraph,\n  initialTraverseDependencies,\n  traverseDependencies,\n  reorderGraph,\n  markModifiedContextModules,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/mergeDeltas.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nfunction mergeDeltas(delta1, delta2) {\n  const added1 = new Map(delta1.added);\n  const modified1 = new Map(delta1.modified);\n  const deleted1 = new Set(delta1.deleted);\n  const added2 = new Map(delta2.added);\n  const modified2 = new Map(delta2.modified);\n  const deleted2 = new Set(delta2.deleted);\n  const added = new Map();\n  const modified = new Map();\n  const deleted = new Set();\n\n  for (const [id, code] of added1) {\n    if (!deleted2.has(id) && !modified2.has(id)) {\n      added.set(id, code);\n    }\n  }\n\n  for (const [id, code] of modified1) {\n    if (!deleted2.has(id) && !modified2.has(id)) {\n      modified.set(id, code);\n    }\n  }\n\n  for (const id of deleted1) {\n    if (!added2.has(id)) {\n      deleted.add(id);\n    }\n  }\n\n  for (const [id, code] of added2) {\n    if (deleted1.has(id)) {\n      modified.set(id, code);\n    } else {\n      added.set(id, code);\n    }\n  }\n\n  for (const [id, code] of modified2) {\n    if (added1.has(id)) {\n      added.set(id, code);\n    } else {\n      modified.set(id, code);\n    }\n  }\n\n  for (const id of deleted2) {\n    if (!added1.has(id)) {\n      deleted.add(id);\n    }\n  }\n\n  return {\n    added: [...added.entries()],\n    modified: [...modified.entries()],\n    deleted: [...deleted],\n  };\n}\n\nmodule.exports = mergeDeltas;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler/types.flow.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nimport CountingSet from '../lib/CountingSet';\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/DeltaBundler.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst DeltaCalculator = require('./DeltaBundler/DeltaCalculator');\n\n/**\n * `DeltaBundler` uses the `DeltaTransformer` to build bundle deltas. This\n * module handles all the transformer instances so it can support multiple\n * concurrent clients requesting their own deltas. This is done through the\n * `clientId` param (which maps a client to a specific delta transformer).\n */\nclass DeltaBundler {\n  _changeEventSource;\n  _deltaCalculators = new Map();\n\n  constructor(changeEventSource) {\n    this._changeEventSource = changeEventSource;\n  }\n\n  end() {\n    this._deltaCalculators.forEach((deltaCalculator) => deltaCalculator.end());\n    this._deltaCalculators = new Map();\n  }\n\n  async getDependencies(entryPoints, options) {\n    const deltaCalculator = new DeltaCalculator(new Set(entryPoints), this._changeEventSource, options);\n\n    await deltaCalculator.getDelta({ reset: true, shallow: options.shallow });\n    const graph = deltaCalculator.getGraph();\n\n    deltaCalculator.end();\n    return graph.dependencies;\n  }\n\n  // Note: the graph returned by this function needs to be ended when finished\n  // so that we don't leak graphs that are not reachable.\n  // To get just the dependencies, use getDependencies which will not leak graphs.\n  async buildGraph(entryPoints, options) {\n    const deltaCalculator = new DeltaCalculator(new Set(entryPoints), this._changeEventSource, options);\n\n    await deltaCalculator.getDelta({ reset: true, shallow: options.shallow });\n    const graph = deltaCalculator.getGraph();\n\n    this._deltaCalculators.set(graph, deltaCalculator);\n    return graph;\n  }\n\n  async getDelta(graph, { reset, shallow }) {\n    const deltaCalculator = this._deltaCalculators.get(graph);\n\n    if (!deltaCalculator) {\n      throw new Error('Graph not found');\n    }\n\n    return await deltaCalculator.getDelta({ reset, shallow });\n  }\n\n  listen(graph, callback) {\n    const deltaCalculator = this._deltaCalculators.get(graph);\n\n    if (!deltaCalculator) {\n      throw new Error('Graph not found');\n    }\n\n    deltaCalculator.on('change', callback);\n\n    return () => {\n      deltaCalculator.removeListener('change', callback);\n    };\n  }\n\n  endGraph(graph) {\n    const deltaCalculator = this._deltaCalculators.get(graph);\n\n    if (!deltaCalculator) {\n      throw new Error('Graph not found');\n    }\n\n    deltaCalculator.end();\n\n    this._deltaCalculators.delete(graph);\n  }\n}\n\nmodule.exports = DeltaBundler;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/HmrServer.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n *\n */\n\n'use strict';\n\nconst hmrJSBundle = require('./DeltaBundler/Serializers/hmrJSBundle');\nconst GraphNotFoundError = require('./IncrementalBundler/GraphNotFoundError');\nconst RevisionNotFoundError = require('./IncrementalBundler/RevisionNotFoundError');\nconst debounceAsyncQueue = require('./lib/debounceAsyncQueue');\nconst formatBundlingError = require('./lib/formatBundlingError');\nconst getGraphId = require('./lib/getGraphId');\nconst parseOptionsFromUrl = require('./lib/parseOptionsFromUrl');\nconst splitBundleOptions = require('./lib/splitBundleOptions');\nconst transformHelpers = require('./lib/transformHelpers');\n// MARK: - GRANITE\nconst {\n  Logger: { createActionStartEntry, createActionEndEntry, log },\n} = require('../../metro-core/src');\nconst nullthrows = require('nullthrows');\nconst url = require('url');\n\nfunction getBytecodeVersion() {\n  return require('metro-hermes-compiler').VERSION;\n}\n\nfunction send(sendFns, message) {\n  const strMessage = JSON.stringify(message);\n  sendFns.forEach((sendFn) => sendFn(strMessage));\n}\n\n/**\n * The HmrServer (Hot Module Reloading) implements a lightweight interface\n * to communicate easily to the logic in the React Native repository (which\n * is the one that handles the Web Socket connections).\n *\n * This interface allows the HmrServer to hook its own logic to WS clients\n * getting connected, disconnected or having errors (through the\n * `onClientConnect`, `onClientDisconnect` and `onClientError` methods).\n */\nclass HmrServer {\n  _config;\n  _bundler;\n  _createModuleId;\n  _clientGroups;\n\n  constructor(bundler, createModuleId, config) {\n    this._config = config;\n    this._bundler = bundler;\n    this._createModuleId = createModuleId;\n    this._clientGroups = new Map();\n  }\n\n  onClientConnect = async (requestUrl, sendFn) => {\n    return {\n      sendFn,\n      revisionIds: [],\n      optedIntoHMR: false,\n    };\n  };\n\n  async _registerEntryPoint(client, requestUrl, sendFn) {\n    requestUrl = this._config.server.rewriteRequestUrl(requestUrl);\n    const clientUrl = nullthrows(url.parse(requestUrl, true));\n    const options = parseOptionsFromUrl(requestUrl, new Set(this._config.resolver.platforms), getBytecodeVersion());\n    const { entryFile, resolverOptions, transformOptions, graphOptions } = splitBundleOptions(options);\n\n    /**\n     * `entryFile` is relative to projectRoot, we need to use resolution function\n     * to find the appropriate file with supported extensions.\n     */\n    const resolutionFn = await transformHelpers.getResolveDependencyFn(\n      this._bundler.getBundler(),\n      transformOptions.platform,\n      resolverOptions\n    );\n    const resolvedEntryFilePath = resolutionFn(\n      (this._config.server.unstable_serverRoot ?? this._config.projectRoot) + '/.',\n      entryFile\n    );\n    const graphId = getGraphId(resolvedEntryFilePath, transformOptions, {\n      resolverOptions,\n      shallow: graphOptions.shallow,\n      experimentalImportBundleSupport: this._config.transformer.experimentalImportBundleSupport,\n      unstable_allowRequireContext: this._config.transformer.unstable_allowRequireContext,\n    });\n    const revPromise = this._bundler.getRevisionByGraphId(graphId);\n    if (!revPromise) {\n      send([sendFn], {\n        type: 'error',\n        body: formatBundlingError(new GraphNotFoundError(graphId)),\n      });\n      return;\n    }\n\n    const { graph, id } = await revPromise;\n    client.revisionIds.push(id);\n\n    let clientGroup = this._clientGroups.get(id);\n    if (clientGroup != null) {\n      clientGroup.clients.add(client);\n    } else {\n      // Prepare the clientUrl to be used as sourceUrl in HMR updates.\n      clientUrl.protocol = 'http';\n      const { dev, minify, runModule, bundleEntry: _bundleEntry, ...query } = clientUrl.query || {};\n      clientUrl.query = {\n        ...query,\n        dev: dev || 'true',\n        minify: minify || 'false',\n        modulesOnly: 'true',\n        runModule: runModule || 'false',\n        shallow: 'true',\n      };\n      clientUrl.search = '';\n\n      clientGroup = {\n        clients: new Set([client]),\n        clientUrl,\n        revisionId: id,\n        unlisten: () => unlisten(),\n      };\n\n      this._clientGroups.set(id, clientGroup);\n\n      const unlisten = this._bundler.getDeltaBundler().listen(\n        graph,\n        debounceAsyncQueue(\n          // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n          this._handleFileChange.bind(this, clientGroup, {\n            isInitialUpdate: false,\n          }),\n          50\n        )\n      );\n    }\n\n    await this._handleFileChange(clientGroup, { isInitialUpdate: true });\n    send([sendFn], { type: 'bundle-registered' });\n  }\n\n  onClientMessage = async (client, message, sendFn) => {\n    let data;\n    try {\n      data = JSON.parse(message);\n    } catch (error) {\n      send([sendFn], {\n        type: 'error',\n        body: formatBundlingError(error),\n      });\n      return Promise.resolve();\n    }\n    if (data && data.type) {\n      switch (data.type) {\n        case 'register-entrypoints':\n          return Promise.all(\n            data.entryPoints.map((entryPoint) => this._registerEntryPoint(client, entryPoint, sendFn))\n          );\n        case 'log':\n          this._config.reporter.update({\n            type: 'client_log',\n            level: data.level,\n            data: data.data,\n            mode: data.mode,\n          });\n          break;\n        case 'log-opt-in':\n          client.optedIntoHMR = true;\n          break;\n        default:\n          break;\n      }\n    }\n    return Promise.resolve();\n  };\n\n  onClientError = (client, e) => {\n    this._config.reporter.update({\n      type: 'hmr_client_error',\n      error: e.error,\n    });\n    this.onClientDisconnect(client);\n  };\n\n  onClientDisconnect = (client) => {\n    client.revisionIds.forEach((revisionId) => {\n      const group = this._clientGroups.get(revisionId);\n      if (group != null) {\n        if (group.clients.size === 1) {\n          this._clientGroups.delete(revisionId);\n          group.unlisten();\n        } else {\n          group.clients.delete(client);\n        }\n      }\n    });\n  };\n\n  async _handleFileChange(group, options) {\n    const optedIntoHMR = [...group.clients].some((client) => client.optedIntoHMR);\n    const processingHmrChange = log(\n      createActionStartEntry({\n        // Even when HMR is disabled on the client, this function still\n        // runs so we can stash updates while it's off and apply them later.\n        // However, this would mess up our internal analytics because we track\n        // HMR as being used even for people who have it disabled.\n        // As a workaround, we use a different event name for clients\n        // that didn't explicitly opt into HMR.\n        action_name: optedIntoHMR ? 'Processing HMR change' : 'Processing HMR change (no client opt-in)',\n      })\n    );\n\n    const sendFns = [...group.clients].map((client) => client.sendFn);\n\n    send(sendFns, {\n      type: 'update-start',\n      body: options,\n    });\n    const message = await this._prepareMessage(group, options);\n    send(sendFns, message);\n    send(sendFns, { type: 'update-done' });\n\n    log({\n      ...createActionEndEntry(processingHmrChange),\n      outdated_modules:\n        message.type === 'update' ? message.body.added.length + message.body.modified.length : undefined,\n    });\n  }\n\n  async _prepareMessage(group, options) {\n    try {\n      const revPromise = this._bundler.getRevision(group.revisionId);\n      if (!revPromise) {\n        return {\n          type: 'error',\n          body: formatBundlingError(new RevisionNotFoundError(group.revisionId)),\n        };\n      }\n\n      const { revision, delta } = await this._bundler.updateGraph(await revPromise, false);\n\n      this._clientGroups.delete(group.revisionId);\n      group.revisionId = revision.id;\n      for (const client of group.clients) {\n        client.revisionIds = client.revisionIds.filter((revisionId) => revisionId !== group.revisionId);\n        client.revisionIds.push(revision.id);\n      }\n      this._clientGroups.set(group.revisionId, group);\n\n      const hmrUpdate = hmrJSBundle(delta, revision.graph, {\n        createModuleId: this._createModuleId,\n        projectRoot: this._config.server.unstable_serverRoot ?? this._config.projectRoot,\n        clientUrl: group.clientUrl,\n      });\n\n      return {\n        type: 'update',\n        body: {\n          revisionId: revision.id,\n          isInitialUpdate: options.isInitialUpdate,\n          ...hmrUpdate,\n        },\n      };\n    } catch (error) {\n      const formattedError = formatBundlingError(error);\n\n      this._config.reporter.update({ type: 'bundling_error', error });\n\n      return { type: 'error', body: formattedError };\n    }\n  }\n}\n\nmodule.exports = HmrServer;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/IncrementalBundler/GraphNotFoundError.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nclass GraphNotFoundError extends Error {\n  graphId;\n\n  constructor(graphId) {\n    super(`The graph \\`${graphId}\\` was not found.`);\n    this.graphId = graphId;\n  }\n}\n\nmodule.exports = GraphNotFoundError;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/IncrementalBundler/ResourceNotFoundError.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nclass ResourceNotFoundError extends Error {\n  resourcePath;\n\n  constructor(resourcePath) {\n    super(`The resource \\`${resourcePath}\\` was not found.`);\n    this.resourcePath = resourcePath;\n  }\n}\n\nmodule.exports = ResourceNotFoundError;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/IncrementalBundler/RevisionNotFoundError.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nclass RevisionNotFoundError extends Error {\n  revisionId;\n\n  constructor(revisionId) {\n    super(`The revision \\`${revisionId}\\` was not found.`);\n    this.revisionId = revisionId;\n  }\n}\n\nmodule.exports = RevisionNotFoundError;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/IncrementalBundler.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst Bundler = require('./Bundler');\nconst DeltaBundler = require('./DeltaBundler');\nconst ResourceNotFoundError = require('./IncrementalBundler/ResourceNotFoundError');\nconst getGraphId = require('./lib/getGraphId');\nconst getPrependedScripts = require('./lib/getPrependedScripts');\nconst transformHelpers = require('./lib/transformHelpers');\nconst crypto = require('crypto');\nconst fs = require('fs');\nconst path = require('path');\n\nfunction createRevisionId() {\n  return crypto.randomBytes(8).toString('hex');\n}\n\nfunction revisionIdFromString(str) {\n  return str;\n}\n\nclass IncrementalBundler {\n  _config;\n  _bundler;\n  _deltaBundler;\n  _revisionsById = new Map();\n  _revisionsByGraphId = new Map();\n\n  static revisionIdFromString = revisionIdFromString;\n\n  constructor(config, options) {\n    this._config = config;\n    this._bundler = new Bundler(config, options);\n    this._deltaBundler = new DeltaBundler(this._bundler.getWatcher());\n  }\n\n  end() {\n    this._deltaBundler.end();\n    this._bundler.end();\n  }\n\n  getBundler() {\n    return this._bundler;\n  }\n\n  getDeltaBundler() {\n    return this._deltaBundler;\n  }\n\n  getRevision(revisionId) {\n    return this._revisionsById.get(revisionId);\n  }\n\n  getRevisionByGraphId(graphId) {\n    return this._revisionsByGraphId.get(graphId);\n  }\n\n  async buildGraphForEntries(\n    entryFiles,\n    transformOptions,\n    resolverOptions,\n    otherOptions = {\n      onProgress: null,\n      shallow: false,\n    }\n  ) {\n    const absoluteEntryFiles = await this._getAbsoluteEntryFiles(entryFiles);\n\n    const graph = await this._deltaBundler.buildGraph(absoluteEntryFiles, {\n      resolve: await transformHelpers.getResolveDependencyFn(this._bundler, transformOptions.platform, resolverOptions),\n      transform: await transformHelpers.getTransformFn(\n        absoluteEntryFiles,\n        this._bundler,\n        this._deltaBundler,\n        this._config,\n        transformOptions,\n        resolverOptions\n      ),\n      transformOptions,\n      onProgress: otherOptions.onProgress,\n      experimentalImportBundleSupport: this._config.transformer.experimentalImportBundleSupport,\n      unstable_allowRequireContext: this._config.transformer.unstable_allowRequireContext,\n      shallow: otherOptions.shallow,\n    });\n\n    this._config.serializer.experimentalSerializerHook(graph, {\n      added: graph.dependencies,\n      modified: new Map(),\n      deleted: new Set(),\n      reset: true,\n    });\n\n    return graph;\n  }\n\n  async getDependencies(\n    entryFiles,\n    transformOptions,\n    resolverOptions,\n    otherOptions = {\n      onProgress: null,\n      shallow: false,\n    }\n  ) {\n    const absoluteEntryFiles = await this._getAbsoluteEntryFiles(entryFiles);\n\n    const dependencies = await this._deltaBundler.getDependencies(absoluteEntryFiles, {\n      resolve: await transformHelpers.getResolveDependencyFn(this._bundler, transformOptions.platform, resolverOptions),\n      transform: await transformHelpers.getTransformFn(\n        absoluteEntryFiles,\n        this._bundler,\n        this._deltaBundler,\n        this._config,\n        transformOptions,\n        resolverOptions\n      ),\n      transformOptions,\n      onProgress: otherOptions.onProgress,\n      experimentalImportBundleSupport: this._config.transformer.experimentalImportBundleSupport,\n      unstable_allowRequireContext: this._config.transformer.unstable_allowRequireContext,\n      shallow: otherOptions.shallow,\n    });\n\n    return dependencies;\n  }\n\n  async buildGraph(\n    entryFile,\n    transformOptions,\n    resolverOptions,\n    otherOptions = {\n      onProgress: null,\n      shallow: false,\n    }\n  ) {\n    const graph = await this.buildGraphForEntries([entryFile], transformOptions, resolverOptions, otherOptions);\n\n    const { type: _, ...transformOptionsWithoutType } = transformOptions;\n\n    const prepend = await getPrependedScripts(\n      this._config,\n      transformOptionsWithoutType,\n      resolverOptions,\n      this._bundler,\n      this._deltaBundler\n    );\n\n    return {\n      prepend,\n      graph,\n    };\n  }\n\n  // TODO T34760750 (alexkirsz) Eventually, I'd like to get to a point where\n  // this class exposes only initializeGraph and updateGraph.\n  async initializeGraph(\n    entryFile,\n    transformOptions,\n    resolverOptions,\n    otherOptions = {\n      onProgress: null,\n      shallow: false,\n    }\n  ) {\n    const graphId = getGraphId(entryFile, transformOptions, {\n      resolverOptions,\n      shallow: otherOptions.shallow,\n      experimentalImportBundleSupport: this._config.transformer.experimentalImportBundleSupport,\n      unstable_allowRequireContext: this._config.transformer.unstable_allowRequireContext,\n    });\n    const revisionId = createRevisionId();\n    const revisionPromise = (async () => {\n      const { graph, prepend } = await this.buildGraph(entryFile, transformOptions, resolverOptions, otherOptions);\n      return {\n        id: revisionId,\n        date: new Date(),\n        graphId,\n        graph,\n        prepend,\n      };\n    })();\n\n    this._revisionsById.set(revisionId, revisionPromise);\n    this._revisionsByGraphId.set(graphId, revisionPromise);\n    try {\n      const revision = await revisionPromise;\n      const delta = {\n        added: revision.graph.dependencies,\n        modified: new Map(),\n        deleted: new Set(),\n        reset: true,\n      };\n      return {\n        revision,\n        delta,\n      };\n    } catch (err) {\n      // Evict a bad revision from the cache since otherwise\n      // we'll keep getting it even after the build is fixed.\n      this._revisionsById.delete(revisionId);\n      this._revisionsByGraphId.delete(graphId);\n      throw err;\n    }\n  }\n\n  async updateGraph(revision, reset) {\n    const delta = await this._deltaBundler.getDelta(revision.graph, {\n      reset,\n      shallow: false,\n    });\n\n    this._config.serializer.experimentalSerializerHook(revision.graph, delta);\n\n    if (delta.added.size > 0 || delta.modified.size > 0 || delta.deleted.size > 0) {\n      this._revisionsById.delete(revision.id);\n      revision = {\n        ...revision,\n        // Generate a new revision id, to be used to verify the next incremental\n        // request.\n        id: crypto.randomBytes(8).toString('hex'),\n        date: new Date(),\n      };\n      const revisionPromise = Promise.resolve(revision);\n      this._revisionsById.set(revision.id, revisionPromise);\n      this._revisionsByGraphId.set(revision.graphId, revisionPromise);\n    }\n\n    return { revision, delta };\n  }\n\n  async endGraph(graphId) {\n    const revPromise = this._revisionsByGraphId.get(graphId);\n    if (!revPromise) {\n      return;\n    }\n    const revision = await revPromise;\n    this._deltaBundler.endGraph(revision.graph);\n    this._revisionsByGraphId.delete(graphId);\n    this._revisionsById.delete(revision.id);\n  }\n\n  async _getAbsoluteEntryFiles(entryFiles) {\n    const absoluteEntryFiles = entryFiles.map((entryFile) =>\n      path.resolve(this._config.server.unstable_serverRoot ?? this._config.projectRoot, entryFile)\n    );\n\n    await Promise.all(\n      absoluteEntryFiles.map(\n        (entryFile) =>\n          new Promise((resolve, reject) => {\n            // This should throw an error if the file doesn't exist.\n            // Using this instead of fs.exists to account for SimLinks.\n            fs.realpath(entryFile, (err) => {\n              if (err) {\n                reject(new ResourceNotFoundError(entryFile));\n              } else {\n                resolve();\n              }\n            });\n          })\n      )\n    );\n\n    return absoluteEntryFiles;\n  }\n\n  // Wait for the bundler to become ready.\n  async ready() {\n    await this._bundler.ready();\n  }\n}\n\nmodule.exports = IncrementalBundler;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/module.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nexports.empty = () => virtual('', '/<generated>/empty.js');\n\n// creates a virtual module (i.e. not corresponding to a file on disk)\n// with the given source code.\nconst virtual = (code, filePath) => ({\n  dependencies: [],\n  file: {\n    code,\n    map: null,\n    functionMap: null,\n    path: filePath,\n    type: 'script',\n    libraryIdx: null,\n  },\n});\n\nexports.virtual = virtual;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/node-haste/HasteFS.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\nconst { dirname, join, parse } = require('path');\n\nmodule.exports = class HasteFS {\n  directories;\n  directoryEntries;\n  files;\n\n  constructor(files) {\n    this.directories = buildDirectorySet(files);\n    this.directoryEntries = buildDirectoryEntries(files.map(parse));\n    this.files = new Set(files);\n  }\n\n  closest(path, fileName) {\n    const parsedPath = parse(path);\n    const root = parsedPath.root;\n    let dir = parsedPath.dir;\n    do {\n      const candidate = join(dir, fileName);\n      if (this.files.has(candidate)) {\n        return candidate;\n      }\n      dir = dirname(dir);\n    } while (dir !== '.' && dir !== root);\n    return null;\n  }\n\n  dirExists(path) {\n    return this.directories.has(path);\n  }\n\n  exists(path) {\n    return this.files.has(path);\n  }\n\n  getAllFiles() {\n    return Array.from(this.files.keys());\n  }\n\n  matchFiles() {\n    throw new Error('HasteFS.matchFiles is not implemented yet.');\n  }\n\n  matches(directory, pattern) {\n    const entries = this.directoryEntries.get(directory);\n\n    // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n    return entries ? entries.filter(pattern.test, pattern) : [];\n  }\n};\n\nfunction buildDirectorySet(files) {\n  const directories = new Set();\n  files.forEach((path) => {\n    const parsedPath = parse(path);\n    const root = parsedPath.root;\n    let dir = parsedPath.dir;\n    while (dir !== '.' && dir !== root && !directories.has(dir)) {\n      directories.add(dir);\n      dir = dirname(dir);\n    }\n  });\n  return directories;\n}\n\nfunction buildDirectoryEntries(files) {\n  const directoryEntries = new Map();\n  files.forEach(({ base, dir }) => {\n    const entries = directoryEntries.get(dir);\n    if (entries) {\n      entries.push(base);\n    } else {\n      directoryEntries.set(dir, [base]);\n    }\n  });\n  return directoryEntries;\n}\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/node-haste/Module.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nmodule.exports = class Module {\n  hasteID;\n  moduleCache;\n  name;\n  path;\n\n  constructor(path, moduleCache, info) {\n    this.hasteID = info.hasteID;\n    this.moduleCache = moduleCache;\n    this.name = this.hasteID || getName(path);\n    this.path = path;\n  }\n\n  getPackage() {\n    return this.moduleCache.getPackageOf(this.path);\n  }\n\n  isHaste() {\n    return Boolean(this.hasteID);\n  }\n};\n\nfunction getName(path) {\n  return path.replace(/^.*[\\/\\\\]node_modules[\\///]/, '');\n}\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/node-haste/ModuleCache.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst Module = require('./Module');\nconst Package = require('./Package');\n\nmodule.exports = class ModuleCache {\n  _getClosestPackage;\n  getTransformedFile;\n  modules;\n  packages;\n\n  constructor(getClosestPackage, getTransformedFile) {\n    this._getClosestPackage = getClosestPackage;\n    this.getTransformedFile = getTransformedFile;\n    this.modules = new Map();\n    this.packages = new Map();\n  }\n\n  getModule(path) {\n    // This is hacky as hell... `ModuleGraph` handles relative paths but which\n    // start with a slash (so we can have `/js/foo.js` or even `/../foo.js`).\n    // This does not play well with `metro-file-map`, which tries to convert\n    // paths to absolute (https://fburl.com/vbwmjsxa) causing an additional\n    // slashed to be prepended in the file path.\n    // TODO: Refactor the way metro-buck handles paths to make them either\n    // relative or absolute.\n    const normalizedPath = path.startsWith('//') ? path.substr(1) : path;\n\n    let m = this.modules.get(normalizedPath);\n    if (!m) {\n      m = new Module(normalizedPath, this, this.getTransformedFile(normalizedPath));\n      this.modules.set(normalizedPath, m);\n    }\n    return m;\n  }\n\n  getPackage(path) {\n    let p = this.packages.get(path);\n    if (!p) {\n      p = new Package(path, this.getPackageData(path));\n      this.packages.set(path, p);\n    }\n    return p;\n  }\n\n  getPackageData(path) {\n    const pkg = this.getTransformedFile(path).package;\n    if (!pkg) {\n      throw new Error(`\"${path}\" does not exist`);\n    }\n    return pkg;\n  }\n\n  getPackageOf(filePath) {\n    const candidate = this._getClosestPackage(filePath);\n    return candidate != null ? this.getPackage(candidate) : null;\n  }\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/node-haste/Package.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst nullthrows = require('nullthrows');\nconst path = require('path');\n\nmodule.exports = class Package {\n  data;\n  path;\n  root;\n  type;\n\n  constructor(packagePath, data) {\n    this.data = data;\n    this.path = packagePath;\n    this.root = path.dirname(packagePath);\n    this.type = 'Package';\n  }\n\n  getMain() {\n    // Copied from node-haste/Package.js\n    const replacements = getReplacements(this.data);\n    if (typeof replacements === 'string') {\n      return path.join(this.root, replacements);\n    }\n\n    let main = getMain(this.data);\n\n    if (replacements && typeof replacements === 'object') {\n      main =\n        replacements[main] ||\n        replacements[main + '.js'] ||\n        replacements[main + '.json'] ||\n        replacements[main.replace(/(\\.js|\\.json)$/, '')] ||\n        main;\n    }\n\n    return path.join(this.root, main);\n  }\n\n  getName() {\n    return nullthrows(this.data.name);\n  }\n\n  isHaste() {\n    return !!this.data.name;\n  }\n\n  redirectRequire(name) {\n    // Copied from node-haste/Package.js\n    const replacements = getReplacements(this.data);\n\n    if (!replacements || typeof replacements !== 'object') {\n      return name;\n    }\n\n    if (!path.isAbsolute(name)) {\n      const replacement = replacements[name];\n      // support exclude with \"someDependency\": false\n      return replacement === false ? false : replacement || name;\n    }\n\n    let relPath = './' + path.relative(this.root, name);\n    if (path.sep !== '/') {\n      relPath = relPath.replace(new RegExp('\\\\' + path.sep, 'g'), '/');\n    }\n\n    let redirect = replacements[relPath];\n\n    // false is a valid value\n    if (redirect == null) {\n      redirect = replacements[relPath + '.js'];\n      if (redirect == null) {\n        redirect = replacements[relPath + '.json'];\n      }\n    }\n\n    // support exclude with \"./someFile\": false\n    if (redirect === false) {\n      return false;\n    }\n\n    if (redirect) {\n      return path.join(this.root, redirect);\n    }\n\n    return name;\n  }\n};\n\nfunction getMain(pkg) {\n  return pkg.main || 'index';\n}\n\n// Copied from node-haste/Package.js\nfunction getReplacements(pkg) {\n  let rn = pkg['react-native'];\n  let browser = pkg.browser;\n  if (rn == null) {\n    return browser;\n  }\n\n  if (browser == null) {\n    return rn;\n  }\n\n  const main = getMain(pkg);\n  if (typeof rn !== 'object') {\n    rn = { [main]: rn };\n  }\n\n  if (typeof browser !== 'object') {\n    browser = { [main]: browser };\n  }\n\n  // merge with \"browser\" as default,\n  // \"react-native\" as override\n  return { ...browser, ...rn };\n}\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/node-haste/node-haste.flow.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\n// eslint-disable-next-line no-unused-vars\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/node-haste/node-haste.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\nimport { ModuleMap } from 'metro-file-map';\n\nconst { ModuleResolver } = require('../../node-haste/DependencyGraph/ModuleResolution');\nconst parsePlatformFilePath = require('../../node-haste/lib/parsePlatformFilePath');\nconst HasteFS = require('./HasteFS');\nconst Module = require('./Module');\nconst ModuleCache = require('./ModuleCache');\n// MARK: - GRANITE\nconst defaults = require('../../../../metro-config/src/defaults/defaults');\nconst path = require('path');\n\nconst NATIVE_PLATFORM = 'native';\nconst GENERIC_PLATFORM = 'g';\nconst PACKAGE_JSON = path.sep + 'package.json';\nconst NULL_MODULE = {\n  path: '/',\n  getPackage() {},\n  isHaste() {\n    throw new Error('not implemented');\n  },\n  getName() {\n    throw new Error('not implemented');\n  },\n};\n\nconst NODE_MODULES = path.sep + 'node_modules' + path.sep;\nconst isNodeModules = (file) => file.includes(NODE_MODULES);\n\n// This function maps the ModuleGraph data structure to metro-file-map's ModuleMap\nconst createModuleMap = ({ files, moduleCache, sourceExts, additionalExts, platforms }) => {\n  const platformSet = new Set((platforms ?? defaults.platforms).concat([NATIVE_PLATFORM]));\n\n  const map = new Map();\n\n  files.forEach((filePath) => {\n    if (isNodeModules(filePath)) {\n      return;\n    }\n    let id;\n    let module;\n    const fileExt = path.extname(filePath).substr(1);\n\n    if (filePath.endsWith(PACKAGE_JSON)) {\n      module = moduleCache.getPackage(filePath);\n      id = module.data.name;\n    } else if (sourceExts.has(fileExt) || additionalExts.has(fileExt)) {\n      module = moduleCache.getModule(filePath);\n      id = module.name;\n    }\n\n    if (!(id && module && module.isHaste())) {\n      return;\n    }\n\n    const mapModule = map.get(id) || Object.create(null);\n\n    const platform = parsePlatformFilePath(filePath, platformSet).platform || GENERIC_PLATFORM;\n\n    const existingModule = mapModule[platform];\n    // 0 = Module, 1 = Package in metro-file-map\n    mapModule[platform] = [filePath, module.type === 'Package' ? 1 : 0];\n\n    if (existingModule && existingModule[0] !== filePath) {\n      throw new Error(\n        [\n          '@providesModule naming collision:',\n          `  Duplicate module name: \\`${id}\\``,\n          `  Paths: \\`${filePath}\\` collides with \\`${existingModule[0]}\\``,\n          '',\n          'This error is caused by a @providesModule declaration ' + 'with the same name across two different files.',\n        ].join('\\n')\n      );\n    }\n\n    map.set(id, mapModule);\n  });\n  return map;\n};\n\nexports.createResolveFn = function (options) {\n  const {\n    assetExts,\n    assetResolutions,\n    extraNodeModules,\n    transformedFiles,\n    sourceExts,\n    additionalExts,\n    platform,\n    platforms,\n  } = options;\n  const files = Object.keys(transformedFiles);\n  function getTransformedFile(path) {\n    const result = transformedFiles[path];\n    if (!result) {\n      throw new Error(`\"${path} does not exist`);\n    }\n    return result;\n  }\n\n  const hasteFS = new HasteFS(files);\n  const moduleCache = new ModuleCache((filePath) => hasteFS.closest(filePath, 'package.json'), getTransformedFile);\n\n  const assetExtensions = new Set(assetExts.map((asset) => '.' + asset));\n  const isAssetFile = (file) => assetExtensions.has(path.extname(file));\n\n  const moduleResolver = new ModuleResolver({\n    dirExists: (filePath) => hasteFS.dirExists(filePath),\n    disableHierarchicalLookup: options.disableHierarchicalLookup,\n    doesFileExist: (filePath) => hasteFS.exists(filePath),\n    emptyModulePath: options.emptyModulePath,\n    extraNodeModules,\n    isAssetFile,\n    mainFields: options.mainFields,\n    moduleCache,\n    moduleMap: new ModuleMap({\n      duplicates: new Map(),\n      map: createModuleMap({\n        files,\n        moduleCache,\n        sourceExts: new Set(sourceExts),\n        additionalExts: new Set(additionalExts),\n        platforms,\n      }),\n      mocks: new Map(),\n      rootDir: '',\n    }),\n    nodeModulesPaths: options.nodeModulesPaths,\n    preferNativePlatform: true,\n    projectRoot: '',\n    resolveAsset: (dirPath, assetName, extension) => {\n      const basePath = dirPath + path.sep + assetName;\n      const assets = [\n        basePath + extension,\n        ...assetResolutions.map((resolution) => basePath + '@' + resolution + 'x' + extension),\n      ].filter((candidate) => hasteFS.exists(candidate));\n      return assets.length ? assets : null;\n    },\n    resolveRequest: options.resolveRequest,\n    sourceExts,\n  });\n\n  return (id, sourcePath) => {\n    const from = sourcePath != null ? new Module(sourcePath, moduleCache, getTransformedFile(sourcePath)) : NULL_MODULE;\n    return moduleResolver.resolveDependency(from, id, true, platform, options.resolverOptions).path;\n  };\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/output/indexed-ram-bundle.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst { createRamBundleGroups } = require('../../Bundler/util');\nconst { buildTableAndContents, createModuleGroups } = require('../../shared/output/RamBundle/as-indexed-file');\nconst buildSourcemapWithMetadata = require('../../shared/output/RamBundle/buildSourcemapWithMetadata.js');\nconst { getModuleCodeAndMap, partition, toModuleTransport } = require('./util');\nconst invariant = require('invariant');\n\nfunction asIndexedRamBundle({\n  dependencyMapReservedName,\n  filename,\n  globalPrefix,\n  idsForPath,\n  modules,\n  preloadedModules,\n  ramGroupHeads,\n  requireCalls,\n}) {\n  const idForPath = (x) => idsForPath(x).moduleId;\n  const [startup, deferred] = partition(modules, preloadedModules);\n  const startupModules = [...startup, ...requireCalls];\n  const deferredModules = deferred.map((m) =>\n    toModuleTransport(m, idsForPath, { dependencyMapReservedName, globalPrefix })\n  );\n  for (const m of deferredModules) {\n    invariant(\n      m.id >= 0,\n      'A script (non-module) cannot be part of the deferred modules of a RAM bundle ' +\n        `(\\`${m.sourcePath}\\`, id=${m.id})`\n    );\n  }\n  const ramGroups = createRamBundleGroups(ramGroupHeads || [], deferredModules, subtree);\n  const moduleGroups = createModuleGroups(ramGroups, deferredModules);\n\n  const tableAndContents = buildTableAndContents(\n    startupModules\n      .map(\n        (m) =>\n          getModuleCodeAndMap(m, idForPath, {\n            dependencyMapReservedName,\n            enableIDInlining: true,\n            globalPrefix,\n          }).moduleCode\n      )\n      .join('\\n'),\n    deferredModules,\n    moduleGroups,\n    'utf8'\n  );\n\n  return {\n    code: Buffer.concat(tableAndContents),\n    map: buildSourcemapWithMetadata({\n      fixWrapperOffset: false,\n      lazyModules: deferredModules,\n      moduleGroups,\n      startupModules: startupModules.map((m) =>\n        toModuleTransport(m, idsForPath, {\n          dependencyMapReservedName,\n          globalPrefix,\n        })\n      ),\n    }),\n  };\n}\n\nfunction* subtree(\n  moduleTransport,\n\n  moduleTransportsByPath,\n\n  seen = new Set()\n) {\n  seen.add(moduleTransport.id);\n  for (const { path } of moduleTransport.dependencies) {\n    const dependency = moduleTransportsByPath.get(path);\n    if (dependency && !seen.has(dependency.id)) {\n      yield dependency.id;\n      yield* subtree(dependency, moduleTransportsByPath, seen);\n    }\n  }\n}\n\nfunction createBuilder(preloadedModules, ramGroupHeads) {\n  return (x) => asIndexedRamBundle({ ...x, preloadedModules, ramGroupHeads });\n}\n\nexports.createBuilder = createBuilder;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/output/multiple-files-ram-bundle.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst buildSourcemapWithMetadata = require('../../shared/output/RamBundle/buildSourcemapWithMetadata.js');\nconst MAGIC_UNBUNDLE_NUMBER = require('../../shared/output/RamBundle/magic-number');\nconst { getModuleCodeAndMap, partition, toModuleTransport } = require('./util');\nconst path = require('path');\n\nconst MAGIC_UNBUNDLE_FILENAME = 'UNBUNDLE';\nconst JS_MODULES = 'js-modules';\n\nfunction asMultipleFilesRamBundle({\n  dependencyMapReservedName,\n  filename,\n  globalPrefix,\n  idsForPath,\n  modules,\n  requireCalls,\n  preloadedModules,\n}) {\n  const idForPath = (x) => idsForPath(x).moduleId;\n  const [startup, deferred] = partition(modules, preloadedModules);\n  const startupModules = [...startup, ...requireCalls];\n  const deferredModules = deferred.map((m) =>\n    toModuleTransport(m, idsForPath, { dependencyMapReservedName, globalPrefix })\n  );\n  const magicFileContents = Buffer.alloc(4);\n\n  // Just concatenate all startup modules, one after the other.\n  const code = startupModules\n    .map(\n      (m) =>\n        getModuleCodeAndMap(m, idForPath, {\n          dependencyMapReservedName,\n          enableIDInlining: true,\n          globalPrefix,\n        }).moduleCode\n    )\n    .join('\\n');\n\n  // Write one file per module, wrapped with __d() call if it proceeds.\n  const extraFiles = new Map();\n  deferredModules.forEach((deferredModule) => {\n    extraFiles.set(path.join(JS_MODULES, deferredModule.id + '.js'), deferredModule.code);\n  });\n\n  // Prepare and write magic number file.\n  magicFileContents.writeUInt32LE(MAGIC_UNBUNDLE_NUMBER, 0);\n  extraFiles.set(path.join(JS_MODULES, MAGIC_UNBUNDLE_FILENAME), magicFileContents);\n\n  // Create the source map (with no module groups, as they are ignored).\n  const map = buildSourcemapWithMetadata({\n    fixWrapperOffset: false,\n    lazyModules: deferredModules,\n    moduleGroups: null,\n    startupModules: startupModules.map((m) =>\n      toModuleTransport(m, idsForPath, {\n        dependencyMapReservedName,\n        globalPrefix,\n      })\n    ),\n  });\n\n  return { code, extraFiles, map };\n}\n\nfunction createBuilder(preloadedModules, ramGroupHeads) {\n  return (x) => asMultipleFilesRamBundle({ ...x, preloadedModules, ramGroupHeads });\n}\n\nexports.createBuilder = createBuilder;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/output/plain-bundle.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst meta = require('../../shared/output/meta');\nconst { concat, getModuleCodeAndMap } = require('./util');\nconst { BundleBuilder } = require('metro-source-map');\n\nfunction asPlainBundle({\n  dependencyMapReservedName,\n  filename,\n  globalPrefix,\n  idsForPath,\n  modules,\n  requireCalls,\n  sourceMapPath,\n  enableIDInlining,\n}) {\n  const builder = new BundleBuilder(filename);\n  const modIdForPath = (x) => idsForPath(x).moduleId;\n\n  for (const module of concat(modules, requireCalls)) {\n    const { moduleCode, moduleMap } = getModuleCodeAndMap(module, modIdForPath, {\n      dependencyMapReservedName,\n      enableIDInlining,\n      globalPrefix,\n    });\n\n    builder.append(moduleCode + '\\n', moduleMap);\n  }\n\n  if (sourceMapPath) {\n    builder.append(`//# sourceMappingURL=${sourceMapPath}`);\n  }\n\n  const code = builder.getCode();\n  const map = builder.getMap();\n  return {\n    code,\n    extraFiles: [[`${filename}.meta`, meta(code)]],\n    map,\n  };\n}\n\nmodule.exports = asPlainBundle;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/output/reverse-dependency-map-references.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nimport invariant from 'invariant';\nimport nullthrows from 'nullthrows';\n\nfunction reverseDependencyMapReferences({ types: t }) {\n  return {\n    visitor: {\n      CallExpression(path, state) {\n        const { node } = path;\n\n        if (node.callee.name === `${state.opts.globalPrefix}__d`) {\n          // $FlowFixMe Flow error uncovered by typing Babel more strictly\n          const lastArg = node.arguments[0].params.slice(-1)[0];\n          const depMapName = lastArg && lastArg.name;\n\n          if (depMapName == null) {\n            return;\n          }\n\n          const body = path.get('arguments.0.body');\n          invariant(!Array.isArray(body), 'meetro: Expected `body` to be a single path.');\n\n          const scope = body.scope;\n          const binding = nullthrows(scope.getBinding(depMapName));\n\n          binding.referencePaths.forEach(({ parentPath }) => {\n            const memberNode = parentPath?.node;\n\n            if (\n              memberNode != null &&\n              memberNode.type === 'MemberExpression' &&\n              memberNode.property.type === 'NumericLiteral'\n            ) {\n              const numericLiteral = t.numericLiteral(state.opts.dependencyIds[memberNode.property.value]);\n              nullthrows(parentPath).replaceWith(numericLiteral);\n            }\n          });\n        }\n      },\n    },\n  };\n}\n\nmodule.exports = reverseDependencyMapReferences;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/output/util.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst virtualModule = require('../module').virtual;\nconst generate = require('../worker/generate');\nconst mergeSourceMaps = require('../worker/mergeSourceMaps');\nconst reverseDependencyMapReferences = require('./reverse-dependency-map-references');\nconst { parseSync, transformFromAstSync } = require('@babel/core');\n// flowlint-next-line untyped-import:off\nconst { passthroughSyntaxPlugins } = require('metro-react-native-babel-preset');\nconst { addParamsToDefineCall } = require('metro-transform-plugins');\nconst nullthrows = require('nullthrows');\n\n// Transformed modules have the form\n//   __d(function(require, module, global, exports, dependencyMap) {\n//       /* code */\n//   });\n//\n// This function adds the numeric module ID, and an array with dependencies of\n// the dependencies of the module before the closing parenthesis.\nfunction addModuleIdsToModuleWrapper(module, idForPath) {\n  const { dependencies, file } = module;\n  const { code } = file;\n\n  // calling `idForPath` on the module itself first gives us a lower module id\n  // for the file itself than for its dependencies. That reflects their order\n  // in the bundle.\n  const fileId = idForPath(file);\n\n  const paramsToAdd = [fileId];\n\n  if (dependencies.length) {\n    paramsToAdd.push(dependencies.map(idForPath));\n  }\n\n  return addParamsToDefineCall(code, ...paramsToAdd);\n}\n\nexports.addModuleIdsToModuleWrapper = addModuleIdsToModuleWrapper;\n\n// TS detection conditions copied from metro-react-native-babel-preset\nfunction isTypeScriptSource(fileName) {\n  return !!fileName && fileName.endsWith('.ts');\n}\n\nfunction isTSXSource(fileName) {\n  return !!fileName && fileName.endsWith('.tsx');\n}\n\nfunction inlineModuleIds(\n  module,\n  idForPath,\n  { dependencyMapReservedName, globalPrefix, ignoreMissingDependencyMapReference = false, hermesParser = false }\n) {\n  const { dependencies, file } = module;\n  const { code, map, path } = file;\n\n  // calling `idForPath` on the module itself first gives us a lower module id\n  // for the file itself than for its dependencies. That reflects their order\n  // in the bundle.\n  const fileId = idForPath(file);\n  const dependencyIds = dependencies.map(idForPath);\n\n  if (!dependencyIds.length) {\n    // Nothing to inline in this module.\n    return { fileId, moduleCode: code, moduleMap: map };\n  }\n\n  if (dependencyMapReservedName != null) {\n    /**\n     * Fast path for inlining module IDs as a cheap string operation, requiring\n     * neither parsing nor any adjustment to the source map.\n     *\n     * Assumptions:\n     * 1. `dependencyMapReservedName` is a globally reserved string; there are\n     *    no false positives.\n     * 2. The longest module ID in the bundle does not exceed a length of\n     *    `dependencyMapReservedName.length + 3`. (We assert this below.)\n     * 3. False negatives (failing to inline occasionally if an assumption\n     *    isn't met) are rare to nonexistent, but safe if they do occur.\n     *\n     * Syntax definitions:\n     * 1. A dependency map reference is a member expression which, if parsed,\n     *    would have the form:\n     *      MemberExpression\n     *      ├──object: Identifier (name = dependencyMapReservedName)\n     *      ├──property: NumericLiteral (value = some integer)\n     *      └──computed: true\n     * 2. The concrete form of a dependency map reference may contain embedded\n     *    tabs or spaces, but no newlines (which would complicate source maps),\n     *    parens (which would complicate detection) or comments (likewise).\n     * 3. The numeric literal in a dependency map reference is a base-10\n     *    integer printed as a simple sequence of digits.\n     */\n    if (!code.includes(dependencyMapReservedName)) {\n      if (ignoreMissingDependencyMapReference) {\n        return { fileId, moduleCode: code, moduleMap: map };\n      }\n\n      // If we're here, the module was probably generated by some code that\n      // doesn't make the dependency map name externally configurable, or a\n      // mock that needs to be updated.\n      throw new Error(\n        `Module has dependencies but does not use the preconfigured dependency map name '${dependencyMapReservedName}': ${file.path}\\n` +\n          'This is an internal error in Metro.'\n      );\n    }\n    const WS = '[\\t ]*';\n    const depMapReferenceRegex = new RegExp(\n      escapeRegex(dependencyMapReservedName) + `${WS}\\\\[${WS}([0-9]+)${WS}\\\\]`,\n      'g'\n    );\n    const inlinedCode = code.replace(depMapReferenceRegex, (match, depIndex) => {\n      const idStr = dependencyIds[Number.parseInt(depIndex, 10)].toString();\n      if (idStr.length > match.length) {\n        // Stop the build rather than silently emit an incorrect source map.\n        throw new Error(\n          `Module ID doesn't fit in available space; add ${\n            idStr.length - match.length\n          } more characters to 'dependencyMapReservedName'.`\n        );\n      }\n      return idStr.padEnd(match.length);\n    });\n    return {\n      fileId,\n      moduleCode: inlinedCode,\n      moduleMap: map,\n    };\n  }\n\n  const babelConfig = {\n    ast: true,\n    babelrc: false,\n    browserslistConfigFile: false,\n    code: false,\n    configFile: false,\n    plugins: [...passthroughSyntaxPlugins, [reverseDependencyMapReferences, { dependencyIds, globalPrefix }]],\n  };\n\n  const sourceAst =\n    isTypeScriptSource(path) || isTSXSource(path) || !hermesParser\n      ? parseSync(code, babelConfig)\n      : require('hermes-parser').parse(code, {\n          babel: true,\n          // $FlowFixMe[prop-missing]\n          sourceType: babelConfig.sourceType,\n        });\n\n  const ast = nullthrows(transformFromAstSync(sourceAst, code, babelConfig).ast);\n\n  const { code: generatedCode, map: generatedMap } = generate(ast, path, '');\n\n  return {\n    fileId,\n    moduleCode: generatedCode,\n    moduleMap: map && generatedMap && mergeSourceMaps(path, map, generatedMap),\n  };\n}\n\nfunction inlineModuleIdsAndAddParamsToDefineCall(module, idForPath, options) {\n  const { fileId, moduleCode, moduleMap } = inlineModuleIds(module, idForPath, options);\n\n  return { moduleCode: addParamsToDefineCall(moduleCode, fileId), moduleMap };\n}\n\nexports.inlineModuleIds = inlineModuleIds;\nexports.inlineModuleIdsAndAddParamsToDefineCall = inlineModuleIdsAndAddParamsToDefineCall;\n\nfunction escapeRegex(str) {\n  // From http://stackoverflow.com/questions/14076210/\n  return str.replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1');\n}\n\n/**\n * 1. Adds the module ids to a file if the file is a module. If it's not (e.g.\n *    a script) it just keeps it as-is.\n * 2. Packs the function map into the file's source map, if one exists.\n */\nfunction getModuleCodeAndMap(module, idForPath, options) {\n  const { file } = module;\n  let moduleCode, moduleMap;\n\n  if (file.type !== 'module') {\n    moduleCode = file.code;\n    moduleMap = file.map;\n  } else if (!options.enableIDInlining) {\n    moduleCode = addModuleIdsToModuleWrapper(module, idForPath);\n    moduleMap = file.map;\n  } else {\n    ({ moduleCode, moduleMap } = inlineModuleIdsAndAddParamsToDefineCall(module, idForPath, {\n      dependencyMapReservedName: options.dependencyMapReservedName,\n      globalPrefix: options.globalPrefix,\n    }));\n  }\n  if (moduleMap && moduleMap.sources) {\n    const x_facebook_sources = [];\n    if (moduleMap.sources.length >= 1) {\n      x_facebook_sources.push([module.file.functionMap]);\n    }\n    moduleMap = { ...moduleMap, x_facebook_sources };\n  }\n  return { moduleCode, moduleMap };\n}\n\nexports.getModuleCodeAndMap = getModuleCodeAndMap;\n\n// Concatenates many iterables, by calling them sequentially.\nexports.concat = function* concat(...iterables) {\n  for (const it of iterables) {\n    yield* it;\n  }\n};\n\n// Creates an idempotent function that returns numeric IDs for objects based\n// on their `path` property.\nexports.createIdForPathFn = () => {\n  const seen = new Map();\n  let next = 0;\n  return ({ path }) => {\n    let id = seen.get(path);\n    if (id == null) {\n      id = next++;\n      seen.set(path, id);\n    }\n    return id;\n  };\n};\n\n// creates a series of virtual modules with require calls to the passed-in\n// modules.\nexports.requireCallsTo = function* (modules, idForPath, getRunModuleStatement) {\n  for (const module of modules) {\n    const id = idForPath(module.file);\n    yield virtualModule(getRunModuleStatement(id), `/<generated>/require-${id}.js`);\n  }\n};\n\n// Divides the modules into two types: the ones that are loaded at startup, and\n// the ones loaded deferredly (lazy loaded).\nexports.partition = (modules, preloadedModules) => {\n  const startup = [];\n  const deferred = [];\n  for (const module of modules) {\n    (preloadedModules.has(module.file.path) ? startup : deferred).push(module);\n  }\n\n  return [startup, deferred];\n};\n\n// Transforms a new Module object into an old one, so that it can be passed\n// around code.\n// NOTE: Used only for RAM bundle serialization.\nfunction toModuleTransport(module, idsForPath, { dependencyMapReservedName, globalPrefix }) {\n  const { dependencies, file } = module;\n  const { moduleCode, moduleMap } = getModuleCodeAndMap(module, (x) => idsForPath(x).moduleId, {\n    dependencyMapReservedName,\n    enableIDInlining: true,\n    globalPrefix,\n  });\n\n  return {\n    code: moduleCode,\n    dependencies,\n    // ID is required but we provide an invalid one for \"script\"s.\n    id: file.type === 'module' ? nullthrows(idsForPath(file).localId) : -1,\n    map: moduleMap,\n    name: file.path,\n    sourcePath: file.path,\n  };\n}\nexports.toModuleTransport = toModuleTransport;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/silent-console.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n *       strict\n */\n\n'use strict';\n\nconst { Console } = require('console');\nconst { Writable } = require('stream');\n\nconst write = (\n  _,\n  __,\n  callback\n  /* $FlowFixMe(>=0.97.0 site=react_native_fb) This comment suppresses an error\n   * found when Flow v0.97 was deployed. To see the error delete this comment and\n   * run Flow. */\n) => callback();\nmodule.exports = new Console(new Writable({ write, writev: write }));\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/types.flow.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\n/**\n * Indempotent function that gets us the IDs corresponding to a particular\n * module identified by path.\n */\n\n// A *virtual* asset file ( = one generated JS module in the bundle)\n// representing one or more asset variants ( = physical input files).\n\n/**\n * Describe a set of JavaScript files and the associated assets. It could be\n * depending on modules from other libraries. To be able to resolve these\n * dependencies, these libraries need to be provided by callsites (ex. Buck).\n */\n\n/**\n * Just like a `Library`, but it also contains module resolutions. For example\n * if there is a `require('foo')` in some JavaScript file, we keep track of the\n * path it resolves to, ex. `beep/glo/foo.js`.\n */\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/worker/JsFileWrapping.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n *\n */\n\n'use strict';\n\nimport template from '@babel/template';\nimport traverse from '@babel/traverse';\nimport * as t from '@babel/types';\nimport invariant from 'invariant';\n\nconst WRAP_NAME = '$$_REQUIRE'; // note: babel will prefix this with _\n\n// Check first the `global` variable as the global object. This way serializers\n// can create a local variable called global to fake it as a global object\n// without having to pollute the window object on web.\nconst IIFE_PARAM = template.expression(\n  \"typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this\"\n);\n\nfunction wrapModule(fileAst, importDefaultName, importAllName, dependencyMapName, globalPrefix) {\n  const params = buildParameters(importDefaultName, importAllName, dependencyMapName);\n  const factory = functionFromProgram(fileAst.program, params);\n  const def = t.callExpression(t.identifier(`${globalPrefix}__d`), [factory]);\n  const ast = t.file(t.program([t.expressionStatement(def)]));\n\n  const requireName = renameRequires(ast);\n\n  return { ast, requireName };\n}\n\nfunction wrapPolyfill(fileAst) {\n  const factory = functionFromProgram(fileAst.program, ['global']);\n\n  const iife = t.callExpression(factory, [IIFE_PARAM()]);\n  return t.file(t.program([t.expressionStatement(iife)]));\n}\n\nfunction jsonToCommonJS(source) {\n  return `module.exports = ${source};`;\n}\n\nfunction wrapJson(source, globalPrefix) {\n  // Unused parameters; remember that's wrapping JSON.\n  const moduleFactoryParameters = buildParameters('_importDefaultUnused', '_importAllUnused', '_dependencyMapUnused');\n\n  return [\n    `${globalPrefix}__d(function(${moduleFactoryParameters.join(', ')}) {`,\n    `  ${jsonToCommonJS(source)}`,\n    '});',\n  ].join('\\n');\n}\n\nfunction functionFromProgram(program, parameters) {\n  return t.functionExpression(\n    undefined,\n    parameters.map(makeIdentifier),\n    t.blockStatement(program.body, program.directives)\n  );\n}\n\nfunction makeIdentifier(name) {\n  return t.identifier(name);\n}\n\nfunction buildParameters(importDefaultName, importAllName, dependencyMapName) {\n  return ['global', 'require', importDefaultName, importAllName, 'module', 'exports', dependencyMapName];\n}\n\n// Renaming requires should ideally only be done when generating for the target\n// that expects the custom require name in the optimize step.\n// This visitor currently renames all `require` references even if the module\n// contains a custom `require` declaration. This should be fixed by only renaming\n// if the `require` symbol hasn't been redeclared.\nfunction renameRequires(ast) {\n  let newRequireName = WRAP_NAME;\n\n  traverse(ast, {\n    Program(path) {\n      const body = path.get('body.0.expression.arguments.0.body');\n\n      invariant(!Array.isArray(body), 'metro: Expected `body` to be a single path.');\n\n      newRequireName = body.scope.generateUid(WRAP_NAME);\n      body.scope.rename('require', newRequireName);\n    },\n  });\n\n  return newRequireName;\n}\n\nmodule.exports = {\n  WRAP_NAME,\n\n  wrapJson,\n  jsonToCommonJS,\n  wrapModule,\n  wrapPolyfill,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/worker/Platforms.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\n/**\n * By knowing all the valid platforms, we're able to say that \"foo.ios.png\" is\n * effectively the asset \"foo\" specific to \"ios\", and not a generic asset\n * \"foo.ios\". This is important so that we can discard asset variants that don't\n * match the platform being built.\n */\nconst VALID_PLATFORMS = new Set(['ios', 'android', 'web']);\n\nmodule.exports = { VALID_PLATFORMS };\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/worker/collectDependencies.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n *\n */\n\n'use strict';\n\nconst crypto = require('crypto');\nconst generate = require('@babel/generator').default;\nconst template = require('@babel/template').default;\nconst traverse = require('@babel/traverse').default;\nconst types = require('@babel/types');\nconst invariant = require('invariant');\nconst nullthrows = require('nullthrows');\n\nconst { isImport } = types;\n\n// TODO: Convert to a Flow enum\n\n// Registry for the dependency of a module.\n// Defines when dependencies should be collapsed.\n// E.g. should a module that's once required optionally and once not\n// be treated as the same or different dependencies.\n\n/**\n * Transform all the calls to `require()` and `import()` in a file into ID-\n * independent code, and return the list of dependencies. For example, a call\n * like `require('Foo')` could be transformed to `require(_depMap[3], 'Foo')`\n * where `_depMap` is provided by the outer scope. As such, we don't need to\n * know the actual module ID.\n *\n * The second argument is only provided for debugging purposes.\n */\nfunction collectDependencies(ast, options) {\n  const visited = new WeakSet();\n\n  const state = {\n    asyncRequireModulePathStringLiteral: null,\n    dependencyCalls: new Set(),\n    dependencyRegistry: options.dependencyRegistry ?? new DefaultModuleDependencyRegistry(),\n    dependencyTransformer: options.dependencyTransformer ?? DefaultDependencyTransformer,\n    dependencyMapIdentifier: null,\n    dynamicRequires: options.dynamicRequires,\n    keepRequireNames: options.keepRequireNames,\n    allowOptionalDependencies: options.allowOptionalDependencies,\n    unstable_allowRequireContext: options.unstable_allowRequireContext,\n  };\n\n  const visitor = {\n    CallExpression(path, state) {\n      if (visited.has(path.node)) {\n        return;\n      }\n\n      const callee = path.node.callee;\n      const name = callee.type === 'Identifier' ? callee.name : null;\n\n      if (isImport(callee)) {\n        processImportCall(path, state, {\n          asyncType: 'async',\n        });\n        return;\n      }\n\n      if (name === '__prefetchImport' && !path.scope.getBinding(name)) {\n        processImportCall(path, state, {\n          asyncType: 'prefetch',\n        });\n        return;\n      }\n\n      if (name === '__jsResource' && !path.scope.getBinding(name)) {\n        processImportCall(path, state, {\n          asyncType: 'async',\n          jsResource: true,\n        });\n        return;\n      }\n\n      if (name === '__conditionallySplitJSResource' && !path.scope.getBinding(name)) {\n        const args = path.get('arguments');\n        invariant(Array.isArray(args), 'Expected arguments to be an array');\n\n        processImportCall(path, state, {\n          asyncType: 'async',\n          jsResource: true,\n          splitCondition: args[1],\n        });\n        return;\n      }\n\n      // Match `require.context`\n      if (\n        // Feature gate, defaults to `false`.\n        state.unstable_allowRequireContext &&\n        callee.type === 'MemberExpression' &&\n        // `require`\n        callee.object.type === 'Identifier' &&\n        callee.object.name === 'require' &&\n        // `context`\n        callee.property.type === 'Identifier' &&\n        callee.property.name === 'context' &&\n        !callee.computed &&\n        // Ensure `require` refers to the global and not something else.\n        !path.scope.getBinding('require')\n      ) {\n        processRequireContextCall(path, state);\n        visited.add(path.node);\n        return;\n      }\n\n      if (name != null && state.dependencyCalls.has(name) && !path.scope.getBinding(name)) {\n        processRequireCall(path, state);\n        visited.add(path.node);\n      }\n    },\n\n    ImportDeclaration: collectImports,\n    ExportNamedDeclaration: collectImports,\n    ExportAllDeclaration: collectImports,\n\n    Program(path, state) {\n      state.asyncRequireModulePathStringLiteral = types.stringLiteral(options.asyncRequireModulePath);\n\n      if (options.dependencyMapName != null) {\n        state.dependencyMapIdentifier = types.identifier(options.dependencyMapName);\n      } else {\n        state.dependencyMapIdentifier = path.scope.generateUidIdentifier('dependencyMap');\n      }\n\n      state.dependencyCalls = new Set(['require', ...options.inlineableCalls]);\n    },\n  };\n\n  traverse(ast, visitor, null, state);\n\n  const collectedDependencies = state.dependencyRegistry.getDependencies();\n  // Compute the list of dependencies.\n  const dependencies = new Array(collectedDependencies.length);\n\n  for (const { index, name, ...dependencyData } of collectedDependencies) {\n    dependencies[index] = {\n      name,\n      data: dependencyData,\n    };\n  }\n\n  return {\n    ast,\n    dependencies,\n    dependencyMapName: nullthrows(state.dependencyMapIdentifier).name,\n  };\n}\n\n/** Extract args passed to the `require.context` method. */\nfunction getRequireContextArgs(path) {\n  const args = path.get('arguments');\n\n  let directory;\n  if (!Array.isArray(args) || args.length < 1) {\n    throw new InvalidRequireCallError(path);\n  } else {\n    const result = args[0].evaluate();\n    if (result.confident && typeof result.value === 'string') {\n      directory = result.value;\n    } else {\n      throw new InvalidRequireCallError(\n        result.deopt ?? args[0],\n        'First argument of `require.context` should be a string denoting the directory to require.'\n      );\n    }\n  }\n\n  // Default to requiring through all directories.\n  let recursive = true;\n  if (args.length > 1) {\n    const result = args[1].evaluate();\n    if (result.confident && typeof result.value === 'boolean') {\n      recursive = result.value;\n    } else if (!(result.confident && typeof result.value === 'undefined')) {\n      throw new InvalidRequireCallError(\n        result.deopt ?? args[1],\n        'Second argument of `require.context` should be an optional boolean indicating if files should be imported recursively or not.'\n      );\n    }\n  }\n\n  // Default to all files.\n  let filter = { pattern: '.*', flags: '' };\n  if (args.length > 2) {\n    // evaluate() to check for undefined (because it's technically a scope lookup)\n    // but check the AST for the regex literal, since evaluate() doesn't do regex.\n    const result = args[2].evaluate();\n    const argNode = args[2].node;\n    if (argNode.type === 'RegExpLiteral') {\n      // TODO: Handle `new RegExp(...)` -- `argNode.type === 'NewExpression'`\n      filter = {\n        pattern: argNode.pattern,\n        flags: argNode.flags || '',\n      };\n    } else if (!(result.confident && typeof result.value === 'undefined')) {\n      throw new InvalidRequireCallError(\n        args[2],\n        `Third argument of \\`require.context\\` should be an optional RegExp pattern matching all of the files to import, instead found node of type: ${argNode.type}.`\n      );\n    }\n  }\n\n  // Default to `sync`.\n  let mode = 'sync';\n  if (args.length > 3) {\n    const result = args[3].evaluate();\n    if (result.confident && typeof result.value === 'string') {\n      mode = getContextMode(args[3], result.value);\n    } else if (!(result.confident && typeof result.value === 'undefined')) {\n      throw new InvalidRequireCallError(\n        result.deopt ?? args[3],\n        'Fourth argument of `require.context` should be an optional string \"mode\" denoting how the modules will be resolved.'\n      );\n    }\n  }\n\n  if (args.length > 4) {\n    throw new InvalidRequireCallError(\n      path,\n      `Too many arguments provided to \\`require.context\\` call. Expected 4, got: ${args.length}`\n    );\n  }\n\n  return [\n    directory,\n    {\n      recursive,\n      filter,\n      mode,\n    },\n  ];\n}\n\nfunction getContextMode(path, mode) {\n  if (mode === 'sync' || mode === 'eager' || mode === 'lazy' || mode === 'lazy-once') {\n    return mode;\n  }\n  throw new InvalidRequireCallError(\n    path,\n    `require.context \"${mode}\" mode is not supported. Expected one of: sync, eager, lazy, lazy-once`\n  );\n}\n\nfunction processRequireContextCall(path, state) {\n  const [directory, contextParams] = getRequireContextArgs(path);\n  const transformer = state.dependencyTransformer;\n  const dep = registerDependency(\n    state,\n    {\n      // We basically want to \"import\" every file in a folder and then filter them out with the given `filter` RegExp.\n      name: directory,\n      // Capture the matching context\n      contextParams,\n      asyncType: null,\n      optional: isOptionalDependency(directory, path, state),\n    },\n    path\n  );\n\n  // require() the generated module representing this context\n  path.get('callee').replaceWith(types.identifier('require'));\n  transformer.transformSyncRequire(path, dep, state);\n}\n\nfunction collectImports(path, state) {\n  if (path.node.source) {\n    registerDependency(\n      state,\n      {\n        name: path.node.source.value,\n        asyncType: null,\n        optional: false,\n      },\n      path\n    );\n  }\n}\n\nfunction processImportCall(path, state, options) {\n  const name = getModuleNameFromCallArgs(path);\n\n  if (name == null) {\n    throw new InvalidRequireCallError(path);\n  }\n\n  const dep = registerDependency(\n    state,\n    {\n      name,\n      asyncType: options.asyncType,\n      splitCondition: options.splitCondition,\n      optional: isOptionalDependency(name, path, state),\n    },\n    path\n  );\n\n  const transformer = state.dependencyTransformer;\n\n  if (options.jsResource) {\n    transformer.transformJSResource(path, dep, state);\n  } else if (options.asyncType === 'async') {\n    transformer.transformImportCall(path, dep, state);\n  } else {\n    transformer.transformPrefetch(path, dep, state);\n  }\n}\n\nfunction processRequireCall(path, state) {\n  const name = getModuleNameFromCallArgs(path);\n\n  const transformer = state.dependencyTransformer;\n\n  if (name == null) {\n    if (state.dynamicRequires === 'reject') {\n      throw new InvalidRequireCallError(path);\n    }\n\n    transformer.transformIllegalDynamicRequire(path, state);\n    return;\n  }\n\n  const dep = registerDependency(\n    state,\n    {\n      name,\n      asyncType: null,\n      optional: isOptionalDependency(name, path, state),\n    },\n    path\n  );\n\n  transformer.transformSyncRequire(path, dep, state);\n}\n\nfunction getNearestLocFromPath(path) {\n  let current = path;\n  while (current && !current.node.loc) {\n    current = current.parentPath;\n  }\n  return current?.node.loc;\n}\n\nfunction registerDependency(state, qualifier, path) {\n  const dependency = state.dependencyRegistry.registerDependency(qualifier);\n  const loc = getNearestLocFromPath(path);\n  if (loc != null) {\n    dependency.locs.push(loc);\n  }\n\n  return dependency;\n}\n\nfunction isOptionalDependency(name, path, state) {\n  const { allowOptionalDependencies } = state;\n\n  // The async require module is a 'built-in'. Resolving should never fail -> treat it as non-optional.\n  if (name === state.asyncRequireModulePathStringLiteral?.value) {\n    return false;\n  }\n\n  const isExcluded = () =>\n    Array.isArray(allowOptionalDependencies.exclude) && allowOptionalDependencies.exclude.includes(name);\n\n  if (!allowOptionalDependencies || isExcluded()) {\n    return false;\n  }\n\n  // Valid statement stack for single-level try-block: expressionStatement -> blockStatement -> tryStatement\n  let sCount = 0;\n  let p = path;\n  while (p && sCount < 3) {\n    if (p.isStatement()) {\n      if (p.node.type === 'BlockStatement') {\n        // A single-level should have the tryStatement immediately followed BlockStatement\n        // with the key 'block' to distinguish from the finally block, which has key = 'finalizer'\n        return p.parentPath != null && p.parentPath.node.type === 'TryStatement' && p.key === 'block';\n      }\n      sCount += 1;\n    }\n    p = p.parentPath;\n  }\n\n  return false;\n}\n\nfunction getModuleNameFromCallArgs(path) {\n  const expectedCount = path.node.callee.name === '__conditionallySplitJSResource' ? 2 : 1;\n  const args = path.get('arguments');\n  if (!Array.isArray(args) || args.length !== expectedCount) {\n    throw new InvalidRequireCallError(path);\n  }\n\n  const result = args[0].evaluate();\n\n  if (result.confident && typeof result.value === 'string') {\n    return result.value;\n  }\n\n  return null;\n}\n\ncollectDependencies.getModuleNameFromCallArgs = getModuleNameFromCallArgs;\n\nclass InvalidRequireCallError extends Error {\n  constructor({ node }, message) {\n    const line = node.loc && node.loc.start && node.loc.start.line;\n\n    super([`Invalid call at line ${line || '<unknown>'}: ${generate(node).code}`, message].filter(Boolean).join('\\n'));\n  }\n}\n\ncollectDependencies.InvalidRequireCallError = InvalidRequireCallError;\n\n/**\n * Produces a Babel template that will throw at runtime when the require call\n * is reached. This makes dynamic require errors catchable by libraries that\n * want to use them.\n */\nconst dynamicRequireErrorTemplate = template.statement(`\n  (function(line) {\n    throw new Error(\n      'Dynamic require defined at line ' + line + '; not supported by Metro',\n    );\n  })(LINE)\n`);\n\n/**\n * Produces a Babel template that transforms an \"import(...)\" call into a\n * \"require(...)\" call to the asyncRequire specified.\n */\nconst makeAsyncRequireTemplate = template.statement(`\n  require(ASYNC_REQUIRE_MODULE_PATH)(MODULE_ID, MODULE_NAME)\n`);\n\nconst makeAsyncPrefetchTemplate = template.statement(`\n  require(ASYNC_REQUIRE_MODULE_PATH).prefetch(MODULE_ID, MODULE_NAME)\n`);\n\nconst makeJSResourceTemplate = template.statement(`\n  require(ASYNC_REQUIRE_MODULE_PATH).resource(MODULE_ID, MODULE_NAME)\n`);\n\nconst DefaultDependencyTransformer = {\n  transformSyncRequire(path, dependency, state) {\n    const moduleIDExpression = createModuleIDExpression(dependency, state);\n    path.node.arguments = [moduleIDExpression];\n    // Always add the debug name argument last\n    if (state.keepRequireNames) {\n      path.node.arguments.push(types.stringLiteral(dependency.name));\n    }\n  },\n\n  transformImportCall(path, dependency, state) {\n    path.replaceWith(\n      makeAsyncRequireTemplate({\n        ASYNC_REQUIRE_MODULE_PATH: nullthrows(state.asyncRequireModulePathStringLiteral),\n        MODULE_ID: createModuleIDExpression(dependency, state),\n        MODULE_NAME: createModuleNameLiteral(dependency),\n      })\n    );\n  },\n\n  transformJSResource(path, dependency, state) {\n    path.replaceWith(\n      makeJSResourceTemplate({\n        ASYNC_REQUIRE_MODULE_PATH: nullthrows(state.asyncRequireModulePathStringLiteral),\n        MODULE_ID: createModuleIDExpression(dependency, state),\n        MODULE_NAME: createModuleNameLiteral(dependency),\n      })\n    );\n  },\n\n  transformPrefetch(path, dependency, state) {\n    path.replaceWith(\n      makeAsyncPrefetchTemplate({\n        ASYNC_REQUIRE_MODULE_PATH: nullthrows(state.asyncRequireModulePathStringLiteral),\n        MODULE_ID: createModuleIDExpression(dependency, state),\n        MODULE_NAME: createModuleNameLiteral(dependency),\n      })\n    );\n  },\n\n  transformIllegalDynamicRequire(path, state) {\n    path.replaceWith(\n      dynamicRequireErrorTemplate({\n        LINE: types.numericLiteral(path.node.loc?.start.line ?? 0),\n      })\n    );\n  },\n};\n\nfunction createModuleIDExpression(dependency, state) {\n  return types.memberExpression(\n    nullthrows(state.dependencyMapIdentifier),\n    types.numericLiteral(dependency.index),\n    true\n  );\n}\n\nfunction createModuleNameLiteral(dependency) {\n  return types.stringLiteral(dependency.name);\n}\n\n/**\n * Given an import qualifier, return a key used to register the dependency.\n * Generally this return the `ImportQualifier.name` property, but more\n * attributes can be appended to distinguish various combinations that would\n * otherwise conflict.\n *\n * For example, the following case would have collision issues if they all utilized the `name` property:\n * ```\n * require('./foo');\n * require.context('./foo');\n * require.context('./foo', true, /something/);\n * require.context('./foo', false, /something/);\n * require.context('./foo', false, /something/, 'lazy');\n * ```\n *\n * This method should be utilized by `registerDependency`.\n */\nfunction getKeyForDependency(qualifier) {\n  let key = qualifier.name;\n\n  const { asyncType } = qualifier;\n  if (asyncType) {\n    key += ['', asyncType].join('\\0');\n  }\n\n  const { contextParams } = qualifier;\n  // Add extra qualifiers when using `require.context` to prevent collisions.\n  if (contextParams) {\n    // NOTE(EvanBacon): Keep this synchronized with `RequireContextParams`, if any other properties are added\n    // then this key algorithm should be updated to account for those properties.\n    // Example: `./directory__true__/foobar/m__lazy`\n    key += [\n      '',\n      'context',\n      String(contextParams.recursive),\n      String(contextParams.filter.pattern),\n      String(contextParams.filter.flags),\n      contextParams.mode,\n      // Join together and append to the name:\n    ].join('\\0');\n  }\n  return key;\n}\n\nclass DefaultModuleDependencyRegistry {\n  _dependencies = new Map();\n\n  registerDependency(qualifier) {\n    const key = getKeyForDependency(qualifier);\n    let dependency = this._dependencies.get(key);\n\n    if (dependency == null) {\n      const newDependency = {\n        name: qualifier.name,\n        asyncType: qualifier.asyncType,\n        locs: [],\n        index: this._dependencies.size,\n        key: crypto.createHash('sha1').update(key).digest('base64'),\n      };\n\n      if (qualifier.optional) {\n        newDependency.isOptional = true;\n      }\n      if (qualifier.contextParams) {\n        newDependency.contextParams = qualifier.contextParams;\n      }\n\n      dependency = newDependency;\n    } else {\n      if (dependency.isOptional && !qualifier.optional) {\n        // A previously optionally required dependency was required non-optionally.\n        // Mark it non optional for the whole module\n        dependency = {\n          ...dependency,\n          isOptional: false,\n        };\n      }\n    }\n\n    this._dependencies.set(key, dependency);\n\n    return dependency;\n  }\n\n  getDependencies() {\n    return Array.from(this._dependencies.values());\n  }\n}\n\nmodule.exports = collectDependencies;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/worker/generate.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n *       strict\n */\n\n'use strict';\n\nconst babelGenerate = require('@babel/generator').default;\n\nfunction generate(ast, filename, sourceCode) {\n  const generated = babelGenerate(\n    ast,\n    {\n      comments: false,\n      compact: true,\n      filename,\n      sourceFileName: filename,\n      sourceMaps: true,\n      sourceMapTarget: filename,\n    },\n    sourceCode\n  );\n\n  if (generated.map) {\n    /* $FlowFixMe(>=0.109.0 site=react_native_fb) This \\\n    comment suppresses an error found when Flow v0.47 was deployed. To see \\\n    the error delete this comment and run Flow. */\n    delete generated.map.sourcesContent;\n  }\n  return generated;\n}\n\nmodule.exports = generate;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/worker/generateImportNames.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n *\n */\n\n'use strict';\n\nconst traverse = require('@babel/traverse').default;\nconst nullthrows = require('nullthrows');\n\n/**\n * Select unused names for \"metroImportDefault\" and \"metroImportAll\", by\n * calling \"generateUid\".\n */\nfunction generateImportNames(ast) {\n  let importDefault;\n  let importAll;\n\n  traverse(ast, {\n    Program(path) {\n      importAll = path.scope.generateUid('$$_IMPORT_ALL');\n      importDefault = path.scope.generateUid('$$_IMPORT_DEFAULT');\n\n      path.stop();\n    },\n  });\n\n  return {\n    importAll: nullthrows(importAll),\n    importDefault: nullthrows(importDefault),\n  };\n}\n\nmodule.exports = generateImportNames;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/ModuleGraph/worker/mergeSourceMaps.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n *       strict-local\n */\n\n'use strict';\n\n// $FlowExpectedError: TODO(t67543266): `source-map` is hard to type.\nconst sourceMap = require('source-map');\n\nfunction mergeSourceMaps(file, originalMap, secondMap) {\n  const merged = new sourceMap.SourceMapGenerator();\n  const inputMap = new sourceMap.SourceMapConsumer(originalMap);\n\n  new sourceMap.SourceMapConsumer(secondMap).eachMapping((mapping) => {\n    if (mapping.originalLine == null) {\n      return;\n    }\n    const original = inputMap.originalPositionFor({\n      line: mapping.originalLine,\n      column: mapping.originalColumn,\n    });\n    if (original.line == null) {\n      return;\n    }\n\n    merged.addMapping({\n      generated: { line: mapping.generatedLine, column: mapping.generatedColumn },\n      original: { line: original.line, column: original.column || 0 },\n      source: file,\n      name: original.name || mapping.name,\n    });\n  });\n\n  return {\n    ...merged.toJSON(),\n    sources: inputMap.sources,\n  };\n}\n\nmodule.exports = mergeSourceMaps;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/Server/MultipartResponse.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\nconst accepts = require('accepts');\n\nconst CRLF = '\\r\\n';\nconst BOUNDARY = '3beqjf3apnqeu3h5jqorms4i';\n\nclass MultipartResponse {\n  static wrapIfSupported(req, res) {\n    if (accepts(req).types().includes('multipart/mixed')) {\n      return new MultipartResponse(res);\n    }\n\n    return res;\n  }\n\n  static serializeHeaders(headers) {\n    return Object.keys(headers)\n      .map((key) => `${key}: ${headers[key]}`)\n      .join(CRLF);\n  }\n\n  res;\n  headers;\n\n  constructor(res) {\n    this.res = res;\n    this.headers = {};\n    res.writeHead(200, {\n      'Content-Type': `multipart/mixed; boundary=\"${BOUNDARY}\"`,\n    });\n    res.write('If you are seeing this, your client does not support multipart response');\n  }\n\n  writeChunk(headers, data, isLast = false) {\n    if (this.res.finished) {\n      return;\n    }\n\n    this.res.write(`${CRLF}--${BOUNDARY}${CRLF}`);\n    if (headers) {\n      this.res.write(MultipartResponse.serializeHeaders(headers) + CRLF + CRLF);\n    }\n\n    if (data != null) {\n      this.res.write(data);\n    }\n\n    if (isLast) {\n      this.res.write(`${CRLF}--${BOUNDARY}--${CRLF}`);\n    }\n  }\n\n  writeHead(status, headers) {\n    // We can't actually change the response HTTP status code\n    // because the headers have already been sent\n    this.setHeader('X-Http-Status', status);\n    if (!headers) {\n      return;\n    }\n    for (const key in headers) {\n      this.setHeader(key, headers[key]);\n    }\n  }\n\n  setHeader(name, value) {\n    this.headers[name] = value;\n  }\n\n  end(data) {\n    this.writeChunk(this.headers, data, true);\n    this.res.end();\n  }\n}\n\nmodule.exports = MultipartResponse;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/Server/symbolicate.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst { greatestLowerBound } = require('metro-source-map/src/Consumer/search');\nconst { SourceMetadataMapConsumer } = require('metro-symbolicate/src/Symbolication');\n\nfunction createFunctionNameGetter(module) {\n  const consumer = new SourceMetadataMapConsumer(\n    {\n      version: 3,\n      mappings: '',\n      sources: ['dummy'],\n      names: [],\n      x_facebook_sources: [[module.functionMap]],\n    },\n    (name) => name /* no normalization needed */\n  );\n  return ({ line1Based, column0Based }) =>\n    consumer.functionNameFor({\n      line: line1Based,\n      column: column0Based,\n      source: 'dummy',\n    });\n}\n\nasync function symbolicate(stack, maps, config) {\n  const mapsByUrl = new Map();\n  for (const [url, map] of maps) {\n    mapsByUrl.set(url, map);\n  }\n  const functionNameGetters = new Map();\n\n  function findModule(frame) {\n    const map = mapsByUrl.get(frame.file);\n    if (!map || frame.lineNumber == null) {\n      return null;\n    }\n    const moduleIndex = greatestLowerBound(\n      map,\n      frame.lineNumber,\n      (target, candidate) => target - candidate.firstLine1Based\n    );\n    if (moduleIndex == null) {\n      return null;\n    }\n    return map[moduleIndex];\n  }\n\n  function findOriginalPos(frame, module) {\n    if (module.map == null || frame.lineNumber == null || frame.column == null) {\n      return null;\n    }\n    const generatedPosInModule = {\n      line1Based: frame.lineNumber - module.firstLine1Based + 1,\n      column0Based: frame.column,\n    };\n    const mappingIndex = greatestLowerBound(module.map, generatedPosInModule, (target, candidate) => {\n      if (target.line1Based === candidate[0]) {\n        return target.column0Based - candidate[1];\n      }\n      return target.line1Based - candidate[0];\n    });\n    if (mappingIndex == null) {\n      return null;\n    }\n    const mapping = module.map[mappingIndex];\n    if (mapping[0] !== generatedPosInModule.line1Based || mapping.length < 4 /* no source line/column info */) {\n      return null;\n    }\n    return {\n      // $FlowFixMe: Length checks do not refine tuple unions.\n      line1Based: mapping[2],\n      // $FlowFixMe: Length checks do not refine tuple unions.\n      column0Based: mapping[3],\n    };\n  }\n\n  function findFunctionName(originalPos, module) {\n    if (module.functionMap) {\n      let getFunctionName = functionNameGetters.get(module);\n      if (!getFunctionName) {\n        getFunctionName = createFunctionNameGetter(module);\n        functionNameGetters.set(module, getFunctionName);\n      }\n      return getFunctionName(originalPos);\n    }\n    return null;\n  }\n\n  function symbolicateFrame(frame) {\n    const module = findModule(frame);\n    if (!module) {\n      return frame;\n    }\n    if (!Array.isArray(module.map)) {\n      throw new Error(`Unexpected module with serialized source map found: ${module.path}`);\n    }\n    const originalPos = findOriginalPos(frame, module);\n    if (!originalPos) {\n      return frame;\n    }\n    const methodName = findFunctionName(originalPos, module) ?? frame.methodName;\n    return {\n      ...frame,\n      methodName,\n      file: module.path,\n      lineNumber: originalPos.line1Based,\n      column: originalPos.column0Based,\n    };\n  }\n\n  async function customizeFrame(frame) {\n    const customizations = (await config.symbolicator.customizeFrame(frame)) || {};\n    return { ...frame, collapse: false, ...customizations };\n  }\n\n  return Promise.all(stack.map(symbolicateFrame).map(customizeFrame));\n}\n\nmodule.exports = symbolicate;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/Server.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst { getAsset } = require('./Assets');\nconst baseBytecodeBundle = require('./DeltaBundler/Serializers/baseBytecodeBundle');\nconst baseJSBundle = require('./DeltaBundler/Serializers/baseJSBundle');\nconst getAllFiles = require('./DeltaBundler/Serializers/getAllFiles');\nconst getAssets = require('./DeltaBundler/Serializers/getAssets');\nconst { getExplodedSourceMap } = require('./DeltaBundler/Serializers/getExplodedSourceMap');\nconst getRamBundleInfo = require('./DeltaBundler/Serializers/getRamBundleInfo');\nconst sourceMapString = require('./DeltaBundler/Serializers/sourceMapString');\nconst IncrementalBundler = require('./IncrementalBundler');\nconst ResourceNotFoundError = require('./IncrementalBundler/ResourceNotFoundError');\nconst bundleToBytecode = require('./lib/bundleToBytecode');\nconst bundleToString = require('./lib/bundleToString');\nconst formatBundlingError = require('./lib/formatBundlingError');\nconst getGraphId = require('./lib/getGraphId');\nconst parseOptionsFromUrl = require('./lib/parseOptionsFromUrl');\nconst splitBundleOptions = require('./lib/splitBundleOptions');\nconst transformHelpers = require('./lib/transformHelpers');\nconst parsePlatformFilePath = require('./node-haste/lib/parsePlatformFilePath');\nconst symbolicate = require('./Server/symbolicate');\nconst { codeFrameColumns } = require('@babel/code-frame');\nconst MultipartResponse = require('./Server/MultipartResponse');\nconst debug = require('debug')('Metro:Server');\nconst fs = require('graceful-fs');\n// MARK: - GRANITE\nconst {\n  Logger,\n  Logger: { createActionStartEntry, createActionEndEntry, log },\n} = require('../../metro-core/src');\n\nconst mime = require('mime-types');\nconst nullthrows = require('nullthrows');\nconst path = require('path');\nconst querystring = require('querystring');\nconst url = require('url');\n\nconst DELTA_ID_HEADER = 'X-Metro-Delta-ID';\nconst FILES_CHANGED_COUNT_HEADER = 'X-Metro-Files-Changed-Count';\n\nfunction getBytecodeVersion() {\n  return require('metro-hermes-compiler').VERSION;\n}\n\nclass Server {\n  _bundler;\n  _config;\n  _createModuleId;\n  _isEnded;\n  _logger;\n  _nextBundleBuildID;\n  _platforms;\n  _reporter;\n  _serverOptions;\n\n  constructor(config, options) {\n    this._config = config;\n    this._serverOptions = options;\n\n    if (this._config.resetCache) {\n      this._config.cacheStores.forEach((store) => store.clear());\n      this._config.reporter.update({ type: 'transform_cache_reset' });\n    }\n\n    this._reporter = config.reporter;\n    this._logger = Logger;\n    this._platforms = new Set(this._config.resolver.platforms);\n    this._allowedSuffixesForSourceRequests = [\n      ...new Set(\n        [\n          ...this._config.resolver.sourceExts,\n          ...this._config.watcher.additionalExts,\n          ...this._config.resolver.assetExts,\n        ].map((ext) => '.' + ext)\n      ),\n    ];\n    this._sourceRequestRoutingMap = [\n      ['/[metro-project]/', path.resolve(this._config.projectRoot)],\n      ...this._config.watchFolders.map((watchFolder, index) => [\n        `/[metro-watchFolders]/${index}/`,\n        path.resolve(watchFolder),\n      ]),\n    ];\n    this._isEnded = false;\n\n    // TODO(T34760917): These two properties should eventually be instantiated\n    // elsewhere and passed as parameters, since they are also needed by\n    // the HmrServer.\n    // The whole bundling/serializing logic should follow as well.\n    this._createModuleId = config.serializer.createModuleIdFactory();\n    this._bundler = new IncrementalBundler(config, {\n      hasReducedPerformance: options && options.hasReducedPerformance,\n      watch: options ? options.watch : undefined,\n    });\n    this._nextBundleBuildID = 1;\n  }\n\n  end() {\n    if (!this._isEnded) {\n      this._bundler.end();\n      this._isEnded = true;\n    }\n  }\n\n  getBundler() {\n    return this._bundler;\n  }\n\n  getCreateModuleId() {\n    return this._createModuleId;\n  }\n\n  async build(options) {\n    const splitOptions = splitBundleOptions(options);\n    if (options.sourcePaths) {\n      splitOptions.serializerOptions.sourcePaths = options.sourcePaths;\n    }\n    const { entryFile, graphOptions, onProgress, resolverOptions, serializerOptions, transformOptions } = splitOptions;\n\n    const { prepend, graph } = await this._bundler.buildGraph(entryFile, transformOptions, resolverOptions, {\n      onProgress,\n      shallow: graphOptions.shallow,\n    });\n\n    const entryPoint = this._getEntryPointAbsolutePath(entryFile);\n\n    const bundleOptions = {\n      asyncRequireModulePath: await this._resolveRelativePath(this._config.transformer.asyncRequireModulePath, {\n        relativeTo: 'project',\n        resolverOptions,\n        transformOptions,\n      }),\n      processModuleFilter: this._config.serializer.processModuleFilter,\n      createModuleId: this._createModuleId,\n      getRunModuleStatement: this._config.serializer.getRunModuleStatement,\n      dev: transformOptions.dev,\n      projectRoot: this._config.projectRoot,\n      modulesOnly: serializerOptions.modulesOnly,\n      runBeforeMainModule: this._config.serializer.getModulesRunBeforeMainModule(\n        path.relative(this._config.projectRoot, entryPoint)\n      ),\n      runModule: serializerOptions.runModule,\n      sourceMapUrl: serializerOptions.sourceMapUrl,\n      sourceUrl: serializerOptions.sourceUrl,\n      inlineSourceMap: serializerOptions.inlineSourceMap,\n      serverRoot: this._config.server.unstable_serverRoot ?? this._config.projectRoot,\n      getSourceUrl: (module) => this._getModuleSourceUrl(module, serializerOptions.sourcePaths),\n    };\n    let bundleCode = null;\n    let bundleMap = null;\n    if (this._config.serializer.customSerializer) {\n      const bundle = await this._config.serializer.customSerializer(entryPoint, prepend, graph, bundleOptions);\n      if (typeof bundle === 'string') {\n        bundleCode = bundle;\n      } else {\n        bundleCode = bundle.code;\n        bundleMap = bundle.map;\n      }\n    } else {\n      bundleCode = bundleToString(baseJSBundle(entryPoint, prepend, graph, bundleOptions)).code;\n    }\n    if (!bundleMap) {\n      bundleMap = sourceMapString([...prepend, ...this._getSortedModules(graph)], {\n        excludeSource: serializerOptions.excludeSource,\n        processModuleFilter: this._config.serializer.processModuleFilter,\n        getSourceUrl: (module) => this._getModuleSourceUrl(module, serializerOptions.sourcePaths),\n      });\n    }\n    return {\n      code: bundleCode,\n      map: bundleMap,\n    };\n  }\n\n  async getRamBundleInfo(options) {\n    const splitOptions = splitBundleOptions(options);\n    if (options.sourcePaths) {\n      splitOptions.serializerOptions.sourcePaths = options.sourcePaths;\n    }\n    const { entryFile, graphOptions, onProgress, resolverOptions, serializerOptions, transformOptions } = splitOptions;\n\n    const { prepend, graph } = await this._bundler.buildGraph(entryFile, transformOptions, resolverOptions, {\n      onProgress,\n      shallow: graphOptions.shallow,\n    });\n\n    const entryPoint = this._getEntryPointAbsolutePath(entryFile);\n\n    return await getRamBundleInfo(entryPoint, prepend, graph, {\n      asyncRequireModulePath: await this._resolveRelativePath(this._config.transformer.asyncRequireModulePath, {\n        relativeTo: 'project',\n        resolverOptions,\n        transformOptions,\n      }),\n      processModuleFilter: this._config.serializer.processModuleFilter,\n      createModuleId: this._createModuleId,\n      dev: transformOptions.dev,\n      excludeSource: serializerOptions.excludeSource,\n      getRunModuleStatement: this._config.serializer.getRunModuleStatement,\n      getTransformOptions: this._config.transformer.getTransformOptions,\n      platform: transformOptions.platform,\n      projectRoot: this._config.projectRoot,\n      modulesOnly: serializerOptions.modulesOnly,\n      runBeforeMainModule: this._config.serializer.getModulesRunBeforeMainModule(\n        path.relative(this._config.projectRoot, entryPoint)\n      ),\n      runModule: serializerOptions.runModule,\n      sourceMapUrl: serializerOptions.sourceMapUrl,\n      sourceUrl: serializerOptions.sourceUrl,\n      inlineSourceMap: serializerOptions.inlineSourceMap,\n      serverRoot: this._config.server.unstable_serverRoot ?? this._config.projectRoot,\n      getSourceUrl: (module) => this._getModuleSourceUrl(module, serializerOptions.sourcePaths),\n    });\n  }\n\n  async getAssets(options) {\n    const { entryFile, onProgress, resolverOptions, transformOptions } = splitBundleOptions(options);\n\n    const dependencies = await this._bundler.getDependencies([entryFile], transformOptions, resolverOptions, {\n      onProgress,\n      shallow: false,\n    });\n\n    return await getAssets(dependencies, {\n      processModuleFilter: this._config.serializer.processModuleFilter,\n      assetPlugins: this._config.transformer.assetPlugins,\n      platform: transformOptions.platform,\n      projectRoot: this._getServerRootDir(),\n      publicPath: this._config.transformer.publicPath,\n    });\n  }\n\n  async getOrderedDependencyPaths(options) {\n    const {\n      entryFile,\n      onProgress,\n      resolverOptions,\n      transformOptions,\n      /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an\n       * error found when Flow v0.122.0 was deployed. To see the error, delete\n       * this comment and run Flow. */\n    } = splitBundleOptions({\n      ...Server.DEFAULT_BUNDLE_OPTIONS,\n      ...options,\n      bundleType: 'bundle',\n    });\n\n    const { prepend, graph } = await this._bundler.buildGraph(entryFile, transformOptions, resolverOptions, {\n      onProgress,\n      shallow: false,\n    });\n\n    const platform = transformOptions.platform || parsePlatformFilePath(entryFile, this._platforms).platform;\n\n    // $FlowFixMe[incompatible-return]\n    return await getAllFiles(prepend, graph, {\n      platform,\n      processModuleFilter: this._config.serializer.processModuleFilter,\n    });\n  }\n\n  _rangeRequestMiddleware(req, res, data, assetPath) {\n    if (req.headers && req.headers.range) {\n      const [rangeStart, rangeEnd] = req.headers.range.replace(/bytes=/, '').split('-');\n      const dataStart = parseInt(rangeStart, 10);\n      const dataEnd = rangeEnd ? parseInt(rangeEnd, 10) : data.length - 1;\n      const chunksize = dataEnd - dataStart + 1;\n\n      res.writeHead(206, {\n        'Accept-Ranges': 'bytes',\n        'Content-Length': chunksize.toString(),\n        'Content-Range': `bytes ${dataStart}-${dataEnd}/${data.length}`,\n        'Content-Type': mime.lookup(path.basename(assetPath)),\n      });\n\n      return data.slice(dataStart, dataEnd + 1);\n    }\n\n    return data;\n  }\n\n  async _processSingleAssetRequest(req, res) {\n    const urlObj = url.parse(decodeURI(req.url), true);\n    let [, assetPath] = (urlObj && urlObj.pathname && urlObj.pathname.match(/^\\/assets\\/(.+)$/)) || [];\n\n    if (!assetPath && urlObj && urlObj.query && urlObj.query.unstable_path) {\n      const [, actualPath, secondaryQuery] = nullthrows(urlObj.query.unstable_path.match(/^([^?]*)\\??(.*)$/));\n      if (secondaryQuery) {\n        Object.assign(urlObj.query, querystring.parse(secondaryQuery));\n      }\n      assetPath = actualPath;\n    }\n\n    if (!assetPath) {\n      throw new Error('Could not extract asset path from URL');\n    }\n\n    const processingAssetRequestLogEntry = log(\n      createActionStartEntry({\n        action_name: 'Processing asset request',\n        asset: assetPath[1],\n      })\n    );\n\n    try {\n      const data = await getAsset(\n        assetPath,\n        this._config.projectRoot,\n        this._config.watchFolders,\n        urlObj.query.platform,\n        this._config.resolver.assetExts\n      );\n      // Tell clients to cache this for 1 year.\n      // This is safe as the asset url contains a hash of the asset.\n      if (process.env.REACT_NATIVE_ENABLE_ASSET_CACHING === true) {\n        res.setHeader('Cache-Control', 'max-age=31536000');\n      }\n      res.end(this._rangeRequestMiddleware(req, res, data, assetPath));\n      process.nextTick(() => {\n        log(createActionEndEntry(processingAssetRequestLogEntry));\n      });\n    } catch (error) {\n      console.error(error.stack);\n      res.writeHead(404);\n      res.end('Asset not found');\n    }\n  }\n\n  processRequest = (req, res, next) => {\n    this._processRequest(req, res, next).catch(next);\n  };\n\n  _parseOptions(url) {\n    const options = parseOptionsFromUrl(url, new Set(this._config.resolver.platforms), getBytecodeVersion());\n    const urlObj = require('url').parse(url, true);\n    if (urlObj.query && urlObj.query.sourcePaths) {\n      options.sourcePaths = urlObj.query.sourcePaths;\n    } else if (\n      options.platform === 'android' ||\n      (urlObj.query && (urlObj.query.platform === 'android' || urlObj.query.p === 'android'))\n    ) {\n      options.sourcePaths = 'url-server';\n    }\n    return options;\n  }\n\n  async _processRequest(req, res, next) {\n    const originalUrl = req.url;\n    req.url = this._config.server.rewriteRequestUrl(req.url);\n\n    const urlObj = url.parse(req.url, true);\n    const { host } = req.headers;\n    debug(\n      `Handling request: ${host ? 'http://' + host : ''}${req.url}` +\n        (originalUrl !== req.url ? ` (rewritten from ${originalUrl})` : '')\n    );\n    const formattedUrl = url.format({\n      ...urlObj,\n      host,\n      protocol: 'http',\n    });\n    const pathname = urlObj.pathname || '';\n    if (pathname.endsWith('.bundle')) {\n      const options = this._parseOptions(formattedUrl);\n      if (options.runtimeBytecodeVersion) {\n        await this._processBytecodeBundleRequest(req, res, options);\n      } else {\n        await this._processBundleRequest(req, res, options);\n      }\n\n      if (this._serverOptions && this._serverOptions.onBundleBuilt) {\n        this._serverOptions.onBundleBuilt(pathname);\n      }\n    } else if (pathname.endsWith('.map')) {\n      // Chrome dev tools may need to access the source maps.\n      res.setHeader('Access-Control-Allow-Origin', 'devtools://devtools');\n      await this._processSourceMapRequest(req, res, this._parseOptions(formattedUrl));\n    } else if (pathname.endsWith('.assets')) {\n      await this._processAssetsRequest(req, res, this._parseOptions(formattedUrl));\n    } else if (pathname.startsWith('/assets/') || pathname === '/assets') {\n      await this._processSingleAssetRequest(req, res);\n    } else if (pathname === '/symbolicate') {\n      await this._symbolicate(req, res);\n    } else {\n      const filePathname = pathname\n        .split('/')\n        .map((segment) => decodeURIComponent(segment))\n        .join('/');\n\n      let handled = false;\n      for (const [pathnamePrefix, normalizedRootDir] of this._sourceRequestRoutingMap) {\n        if (filePathname.startsWith(pathnamePrefix)) {\n          const relativeFilePathname = filePathname.substr(pathnamePrefix.length);\n          await this._processSourceRequest(relativeFilePathname, normalizedRootDir, res);\n          handled = true;\n          break;\n        }\n      }\n      if (!handled) {\n        next();\n      }\n    }\n  }\n\n  async _processSourceRequest(relativeFilePathname, rootDir, res) {\n    if (!this._allowedSuffixesForSourceRequests.some((suffix) => relativeFilePathname.endsWith(suffix))) {\n      res.writeHead(404);\n      res.end();\n      return;\n    }\n    const filePath = path.join(rootDir, relativeFilePathname);\n    try {\n      const stats = fs.statSync(filePath);\n      if (!stats.isFile()) {\n        throw new Error('Not a file');\n      }\n    } catch (e) {\n      res.writeHead(404);\n      res.end();\n      return;\n    }\n\n    const mimeType = mime.lookup(path.basename(relativeFilePathname));\n    res.setHeader('Content-Type', mimeType);\n    const stream = fs.createReadStream(filePath);\n    stream.pipe(res);\n    stream.on('error', (error) => {\n      if (error.code === 'ENOENT') {\n        res.writeHead(404);\n        res.end();\n      } else {\n        res.writeHead(500);\n        res.end();\n      }\n    });\n  }\n\n  _createRequestProcessor({ createStartEntry, createEndEntry, build, delete: deleteFn, finish }) {\n    return async function requestProcessor(req, res, bundleOptions) {\n      const splitOptions = splitBundleOptions(bundleOptions);\n      if (bundleOptions.sourcePaths) {\n        splitOptions.serializerOptions.sourcePaths = bundleOptions.sourcePaths;\n      }\n      const { entryFile, graphOptions, resolverOptions, serializerOptions, transformOptions } = splitOptions;\n\n      /**\n       * `entryFile` is relative to projectRoot, we need to use resolution function\n       * to find the appropriate file with supported extensions.\n       */\n      const resolvedEntryFilePath = await this._resolveRelativePath(entryFile, {\n        relativeTo: 'server',\n        resolverOptions,\n        transformOptions,\n      });\n      const graphId = getGraphId(resolvedEntryFilePath, transformOptions, {\n        experimentalImportBundleSupport: this._config.transformer.experimentalImportBundleSupport,\n        unstable_allowRequireContext: this._config.transformer.unstable_allowRequireContext,\n        resolverOptions,\n        shallow: graphOptions.shallow,\n      });\n\n      // For resources that support deletion, handle the DELETE method.\n      if (deleteFn && req.method === 'DELETE') {\n        const deleteContext = {\n          graphId,\n          req,\n          res,\n        };\n        try {\n          await deleteFn(deleteContext);\n        } catch (error) {\n          const formattedError = formatBundlingError(error);\n\n          const status = error instanceof ResourceNotFoundError ? 404 : 500;\n          res.writeHead(status, {\n            'Content-Type': 'application/json; charset=UTF-8',\n          });\n          res.end(JSON.stringify(formattedError));\n        }\n        return;\n      }\n\n      const mres = MultipartResponse.wrapIfSupported(req, res);\n      const buildID = this.getNewBuildID();\n\n      let onProgress = null;\n      let lastProgress = -1;\n      if (this._config.reporter) {\n        onProgress = (transformedFileCount, totalFileCount) => {\n          const currentProgress = parseInt((transformedFileCount / totalFileCount) * 100, 10);\n\n          // We want to throttle the updates so that we only show meaningful\n          // UI updates slow enough for the client to actually handle them. For\n          // that, we check the percentage, and only send percentages that are\n          // actually different and that have increased from the last one we sent.\n          if (currentProgress > lastProgress || totalFileCount < 10) {\n            if (mres instanceof MultipartResponse) {\n              mres.writeChunk(\n                { 'Content-Type': 'application/json' },\n                JSON.stringify({\n                  done: transformedFileCount,\n                  total: totalFileCount,\n                })\n              );\n            }\n\n            // The `uncork` called internally in Node via `promise.nextTick()` may not fire\n            // until all of the Promises are resolved because the microtask queue we're\n            // in could be starving the event loop. This can cause a bug where the progress\n            // is not actually sent in the response until after bundling is complete. This\n            // would defeat the purpose of sending progress, so we `uncork` the stream now\n            // which will force the response to flush to the client immediately.\n            // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n            if (res.socket != null && res.socket.uncork != null) {\n              res.socket.uncork();\n            }\n\n            lastProgress = currentProgress;\n          }\n\n          this._reporter.update({\n            buildID,\n            type: 'bundle_transform_progressed',\n            transformedFileCount,\n            totalFileCount,\n          });\n        };\n      }\n\n      this._reporter.update({\n        buildID,\n        bundleDetails: {\n          bundleType: bundleOptions.bundleType,\n          dev: transformOptions.dev,\n          entryFile: resolvedEntryFilePath,\n          minify: transformOptions.minify,\n          platform: transformOptions.platform,\n          runtimeBytecodeVersion: transformOptions.runtimeBytecodeVersion,\n        },\n        type: 'bundle_build_started',\n      });\n\n      const startContext = {\n        buildID,\n        bundleOptions,\n        entryFile: resolvedEntryFilePath,\n        graphId,\n        graphOptions,\n        mres,\n        onProgress,\n        req,\n        resolverOptions,\n        serializerOptions,\n        transformOptions,\n      };\n      const logEntry = log(createActionStartEntry(createStartEntry(startContext)));\n\n      let result;\n      try {\n        result = await build(startContext);\n      } catch (error) {\n        const formattedError = formatBundlingError(error);\n\n        const status = error instanceof ResourceNotFoundError ? 404 : 500;\n        mres.writeHead(status, {\n          'Content-Type': 'application/json; charset=UTF-8',\n        });\n        mres.end(JSON.stringify(formattedError));\n\n        this._reporter.update({\n          buildID,\n          type: 'bundle_build_failed',\n          bundleOptions,\n        });\n\n        this._reporter.update({ error, type: 'bundling_error' });\n\n        log({\n          action_name: 'bundling_error',\n          error_type: formattedError.type,\n          log_entry_label: 'bundling_error',\n          bundle_id: graphId,\n          build_id: buildID,\n          stack: formattedError.message,\n        });\n\n        debug('Bundling error', error);\n\n        return;\n      }\n\n      const endContext = {\n        ...startContext,\n        result,\n      };\n      finish(endContext);\n\n      this._reporter.update({\n        buildID,\n        type: 'bundle_build_done',\n      });\n\n      log(\n        /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses\n         * an error found when Flow v0.122.0 was deployed. To see the error,\n         * delete this comment and run Flow. */\n        createActionEndEntry({\n          ...logEntry,\n          ...createEndEntry(endContext),\n        })\n      );\n    };\n  }\n\n  _processBundleRequest = this._createRequestProcessor({\n    createStartEntry(context) {\n      return {\n        action_name: 'Requesting bundle',\n        bundle_url: context.req.url,\n        entry_point: context.entryFile,\n        bundler: 'delta',\n        build_id: context.buildID,\n        bundle_options: context.bundleOptions,\n        bundle_hash: context.graphId,\n      };\n    },\n    createEndEntry(context) {\n      return {\n        outdated_modules: context.result.numModifiedFiles,\n      };\n    },\n    build: async ({\n      entryFile,\n      graphId,\n      graphOptions,\n      onProgress,\n      resolverOptions,\n      serializerOptions,\n      transformOptions,\n    }) => {\n      const revPromise = this._bundler.getRevisionByGraphId(graphId);\n\n      const { delta, revision } = await (revPromise != null\n        ? this._bundler.updateGraph(await revPromise, false)\n        : this._bundler.initializeGraph(entryFile, transformOptions, resolverOptions, {\n            onProgress,\n            shallow: graphOptions.shallow,\n          }));\n\n      const serializer =\n        this._config.serializer.customSerializer || ((...args) => bundleToString(baseJSBundle(...args)).code);\n\n      const bundle = await serializer(entryFile, revision.prepend, revision.graph, {\n        asyncRequireModulePath: await this._resolveRelativePath(this._config.transformer.asyncRequireModulePath, {\n          relativeTo: 'project',\n          resolverOptions,\n          transformOptions,\n        }),\n        processModuleFilter: this._config.serializer.processModuleFilter,\n        createModuleId: this._createModuleId,\n        getRunModuleStatement: this._config.serializer.getRunModuleStatement,\n        dev: transformOptions.dev,\n        projectRoot: this._config.projectRoot,\n        modulesOnly: serializerOptions.modulesOnly,\n        runBeforeMainModule: this._config.serializer.getModulesRunBeforeMainModule(\n          path.relative(this._config.projectRoot, entryFile)\n        ),\n        runModule: serializerOptions.runModule,\n        sourceMapUrl: serializerOptions.sourceMapUrl,\n        sourceUrl: serializerOptions.sourceUrl,\n        inlineSourceMap: serializerOptions.inlineSourceMap,\n        serverRoot: this._config.server.unstable_serverRoot ?? this._config.projectRoot,\n        getSourceUrl: (module) => this._getModuleSourceUrl(module, serializerOptions.sourcePaths),\n      });\n\n      const bundleCode = typeof bundle === 'string' ? bundle : bundle.code;\n\n      return {\n        numModifiedFiles: delta.reset\n          ? delta.added.size + revision.prepend.length\n          : delta.added.size + delta.modified.size + delta.deleted.size,\n        lastModifiedDate: revision.date,\n        nextRevId: revision.id,\n        bundle: bundleCode,\n      };\n    },\n    finish({ req, mres, result }) {\n      if (\n        // We avoid parsing the dates since the client should never send a more\n        // recent date than the one returned by the Delta Bundler (if that's the\n        // case it's fine to return the whole bundle).\n        req.headers['if-modified-since'] === result.lastModifiedDate.toUTCString()\n      ) {\n        debug('Responding with 304');\n        mres.writeHead(304);\n        mres.end();\n      } else {\n        mres.setHeader(FILES_CHANGED_COUNT_HEADER, String(result.numModifiedFiles));\n        mres.setHeader(DELTA_ID_HEADER, String(result.nextRevId));\n        mres.setHeader('Content-Type', 'application/javascript; charset=UTF-8');\n        mres.setHeader('Last-Modified', result.lastModifiedDate.toUTCString());\n        mres.setHeader('Content-Length', String(Buffer.byteLength(result.bundle)));\n        mres.end(result.bundle);\n      }\n    },\n    delete: async ({ graphId, res }) => {\n      await this._bundler.endGraph(graphId);\n      res.statusCode = 204;\n      res.end();\n    },\n  });\n\n  _processBytecodeBundleRequest = this._createRequestProcessor({\n    createStartEntry(context) {\n      return {\n        action_name: 'Requesting bundle',\n        bundle_url: context.req.url,\n        entry_point: context.entryFile,\n        bundler: 'delta',\n        build_id: context.buildID,\n        bundle_options: context.bundleOptions,\n        bundle_hash: context.graphId,\n      };\n    },\n    createEndEntry(context) {\n      return {\n        outdated_modules: context.result.numModifiedFiles,\n      };\n    },\n    build: async ({\n      entryFile,\n      graphId,\n      graphOptions,\n      onProgress,\n      resolverOptions,\n      serializerOptions,\n      transformOptions,\n    }) => {\n      const revPromise = this._bundler.getRevisionByGraphId(graphId);\n\n      const { delta, revision } = await (revPromise != null\n        ? this._bundler.updateGraph(await revPromise, false)\n        : this._bundler.initializeGraph(entryFile, transformOptions, resolverOptions, {\n            onProgress,\n            shallow: graphOptions.shallow,\n          }));\n\n      const bundle = bundleToBytecode(\n        baseBytecodeBundle(entryFile, revision.prepend, revision.graph, {\n          asyncRequireModulePath: await this._resolveRelativePath(this._config.transformer.asyncRequireModulePath, {\n            relativeTo: 'project',\n            resolverOptions,\n            transformOptions,\n          }),\n          processModuleFilter: this._config.serializer.processModuleFilter,\n          createModuleId: this._createModuleId,\n          getRunModuleStatement: this._config.serializer.getRunModuleStatement,\n          dev: transformOptions.dev,\n          projectRoot: this._config.projectRoot,\n          modulesOnly: serializerOptions.modulesOnly,\n          runBeforeMainModule: this._config.serializer.getModulesRunBeforeMainModule(\n            path.relative(this._config.projectRoot, entryFile)\n          ),\n          runModule: serializerOptions.runModule,\n          sourceMapUrl: serializerOptions.sourceMapUrl,\n          sourceUrl: serializerOptions.sourceUrl,\n          inlineSourceMap: serializerOptions.inlineSourceMap,\n          serverRoot: this._config.server.unstable_serverRoot ?? this._config.projectRoot,\n          getSourceUrl: (module) => this._getModuleSourceUrl(module, serializerOptions.sourcePaths),\n        })\n      );\n\n      return {\n        numModifiedFiles: delta.reset\n          ? delta.added.size + revision.prepend.length\n          : delta.added.size + delta.modified.size + delta.deleted.size,\n        lastModifiedDate: revision.date,\n        nextRevId: revision.id,\n        bytecode: bundle.bytecode,\n      };\n    },\n    finish({ req, mres, result }) {\n      if (\n        // We avoid parsing the dates since the client should never send a more\n        // recent date than the one returned by the Delta Bundler (if that's the\n        // case it's fine to return the whole bundle).\n        req.headers['if-modified-since'] === result.lastModifiedDate.toUTCString()\n      ) {\n        debug('Responding with 304');\n        mres.writeHead(304);\n        mres.end();\n      } else {\n        mres.setHeader(FILES_CHANGED_COUNT_HEADER, String(result.numModifiedFiles));\n        mres.setHeader(DELTA_ID_HEADER, String(result.nextRevId));\n        mres.setHeader('Content-Type', 'application/x-metro-bytecode-bundle');\n        mres.setHeader('Last-Modified', result.lastModifiedDate.toUTCString());\n        mres.setHeader('Content-Length', String(Buffer.byteLength(result.bytecode)));\n        mres.end(result.bytecode);\n      }\n    },\n  });\n\n  // This function ensures that modules in source maps are sorted in the same\n  // order as in a plain JS bundle.\n  _getSortedModules(graph) {\n    const modules = [...graph.dependencies.values()];\n    // Assign IDs to modules in a consistent order\n    for (const module of modules) {\n      this._createModuleId(module.path);\n    }\n    // Sort by IDs\n    return modules.sort((a, b) => this._createModuleId(a.path) - this._createModuleId(b.path));\n  }\n\n  _getModuleSourceUrl(module, mode) {\n    if (mode === 'url-server') {\n      for (const [pathnamePrefix, normalizedRootDir] of this._sourceRequestRoutingMap) {\n        if (module.path.startsWith(normalizedRootDir + path.sep)) {\n          const relativePath = module.path.slice(normalizedRootDir.length + 1);\n          const relativePathPosix = relativePath\n            .split(path.sep)\n            .map((segment) => encodeURIComponent(segment))\n            .join('/');\n          return pathnamePrefix + relativePathPosix;\n        }\n      }\n\n      // If the module is inside the project root but somehow not matched by routing map (e.g. symlinks resolved differently),\n      // try to make it relative to project root.\n      const projectRoot = this._config.projectRoot;\n      if (module.path.startsWith(projectRoot + path.sep)) {\n        const relativePath = module.path.slice(projectRoot.length + 1);\n        const relativePathPosix = relativePath\n          .split(path.sep)\n          .map((segment) => encodeURIComponent(segment))\n          .join('/');\n        return '/[metro-project]/' + relativePathPosix;\n      }\n\n      // Fallback: Check if relative path from project root is valid\n      const relativeToRoot = path.relative(projectRoot, module.path);\n      if (!relativeToRoot.startsWith('..') && !path.isAbsolute(relativeToRoot)) {\n        return (\n          '/[metro-project]/' +\n          relativeToRoot\n            .split(path.sep)\n            .map((segment) => encodeURIComponent(segment))\n            .join('/')\n        );\n      }\n\n      const modulePathPosix = module.path\n        .split(path.sep)\n        .map((segment) => encodeURIComponent(segment))\n        .join('/');\n      return modulePathPosix.startsWith('/') ? modulePathPosix : '/' + modulePathPosix;\n    }\n    return module.path;\n  }\n\n  _processSourceMapRequest = this._createRequestProcessor({\n    createStartEntry(context) {\n      return {\n        action_name: 'Requesting sourcemap',\n        bundle_url: context.req.url,\n        entry_point: context.entryFile,\n        bundler: 'delta',\n      };\n    },\n    createEndEntry(context) {\n      return {\n        bundler: 'delta',\n      };\n    },\n    build: async ({\n      entryFile,\n      graphId,\n      graphOptions,\n      onProgress,\n      resolverOptions,\n      serializerOptions,\n      transformOptions,\n    }) => {\n      let revision;\n      const revPromise = this._bundler.getRevisionByGraphId(graphId);\n      if (revPromise == null) {\n        ({ revision } = await this._bundler.initializeGraph(entryFile, transformOptions, resolverOptions, {\n          onProgress,\n          shallow: graphOptions.shallow,\n        }));\n      } else {\n        ({ revision } = await this._bundler.updateGraph(await revPromise, false));\n      }\n\n      let { prepend, graph } = revision;\n      if (serializerOptions.modulesOnly) {\n        prepend = [];\n      }\n\n      return sourceMapString([...prepend, ...this._getSortedModules(graph)], {\n        excludeSource: serializerOptions.excludeSource,\n        processModuleFilter: this._config.serializer.processModuleFilter,\n        getSourceUrl: (module) => this._getModuleSourceUrl(module, serializerOptions.sourcePaths),\n      });\n    },\n    finish({ mres, result }) {\n      mres.setHeader('Content-Type', 'application/json');\n      mres.end(result.toString());\n    },\n  });\n\n  _processAssetsRequest = this._createRequestProcessor({\n    createStartEntry(context) {\n      return {\n        action_name: 'Requesting assets',\n        bundle_url: context.req.url,\n        entry_point: context.entryFile,\n        bundler: 'delta',\n      };\n    },\n    createEndEntry(context) {\n      return {\n        bundler: 'delta',\n      };\n    },\n    build: async ({ entryFile, onProgress, resolverOptions, transformOptions }) => {\n      const dependencies = await this._bundler.getDependencies([entryFile], transformOptions, resolverOptions, {\n        onProgress,\n        shallow: false,\n      });\n\n      return await getAssets(dependencies, {\n        processModuleFilter: this._config.serializer.processModuleFilter,\n        assetPlugins: this._config.transformer.assetPlugins,\n        platform: transformOptions.platform,\n        publicPath: this._config.transformer.publicPath,\n        projectRoot: this._config.projectRoot,\n      });\n    },\n    finish({ mres, result }) {\n      mres.setHeader('Content-Type', 'application/json');\n      mres.end(JSON.stringify(result));\n    },\n  });\n\n  async _symbolicate(req, res) {\n    const getCodeFrame = (urls, symbolicatedStack) => {\n      for (let i = 0; i < symbolicatedStack.length; i++) {\n        const { collapse, column, file, lineNumber } = symbolicatedStack[i];\n        const fileAbsolute = path.resolve(this._config.projectRoot, file ?? '');\n        if (collapse || lineNumber == null || urls.has(fileAbsolute)) {\n          continue;\n        }\n\n        try {\n          return {\n            content: codeFrameColumns(\n              fs.readFileSync(fileAbsolute, 'utf8'),\n              {\n                // Metro returns 0 based columns but codeFrameColumns expects 1-based columns\n                // $FlowFixMe[unsafe-addition]\n                start: { column: column + 1, line: lineNumber },\n              },\n              { forceColor: true }\n            ),\n            location: {\n              row: lineNumber,\n              column,\n            },\n            fileName: file,\n          };\n        } catch (error) {\n          console.error(error);\n        }\n      }\n\n      return null;\n    };\n\n    try {\n      const symbolicatingLogEntry = log(createActionStartEntry('Symbolicating'));\n      debug('Start symbolication');\n      /* $FlowFixMe: where is `rawBody` defined? Is it added by the `connect` framework? */\n      const body = await req.rawBody;\n      const stack = JSON.parse(body).stack.map((frame) => {\n        if (frame.file && frame.file.includes('://')) {\n          return {\n            ...frame,\n            file: this._config.server.rewriteRequestUrl(frame.file),\n          };\n        }\n        return frame;\n      });\n      // In case of multiple bundles / HMR, some stack frames can have different URLs from others\n      const urls = new Set();\n\n      stack.forEach((frame) => {\n        const sourceUrl = frame.file;\n        // Skip `/debuggerWorker.js` which does not need symbolication.\n        if (\n          sourceUrl != null &&\n          !urls.has(sourceUrl) &&\n          !sourceUrl.endsWith('/debuggerWorker.js') &&\n          sourceUrl.startsWith('http')\n        ) {\n          urls.add(sourceUrl);\n        }\n      });\n\n      debug('Getting source maps for symbolication');\n      const sourceMaps = await Promise.all(\n        // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n        Array.from(urls.values()).map(this._explodedSourceMapForURL, this)\n      );\n\n      debug('Performing fast symbolication');\n      const symbolicatedStack = await await symbolicate(stack, zip(urls.values(), sourceMaps), this._config);\n\n      debug('Symbolication done');\n      res.end(\n        JSON.stringify({\n          codeFrame: getCodeFrame(urls, symbolicatedStack),\n          stack: symbolicatedStack,\n        })\n      );\n      process.nextTick(() => {\n        log(createActionEndEntry(symbolicatingLogEntry));\n      });\n    } catch (error) {\n      console.error(error.stack || error);\n      res.statusCode = 500;\n      res.end(JSON.stringify({ error: error.message }));\n    }\n  }\n\n  async _explodedSourceMapForURL(reqUrl) {\n    const options = parseOptionsFromUrl(reqUrl, new Set(this._config.resolver.platforms), getBytecodeVersion());\n\n    const { entryFile, graphOptions, onProgress, resolverOptions, serializerOptions, transformOptions } =\n      splitBundleOptions(options);\n\n    /**\n     * `entryFile` is relative to projectRoot, we need to use resolution function\n     * to find the appropriate file with supported extensions.\n     */\n    const resolvedEntryFilePath = await this._resolveRelativePath(entryFile, {\n      relativeTo: 'server',\n      resolverOptions,\n      transformOptions,\n    });\n\n    const graphId = getGraphId(resolvedEntryFilePath, transformOptions, {\n      experimentalImportBundleSupport: this._config.transformer.experimentalImportBundleSupport,\n      unstable_allowRequireContext: this._config.transformer.unstable_allowRequireContext,\n      resolverOptions,\n      shallow: graphOptions.shallow,\n    });\n    let revision;\n    const revPromise = this._bundler.getRevisionByGraphId(graphId);\n    if (revPromise == null) {\n      ({ revision } = await this._bundler.initializeGraph(resolvedEntryFilePath, transformOptions, resolverOptions, {\n        onProgress,\n        shallow: graphOptions.shallow,\n      }));\n    } else {\n      ({ revision } = await this._bundler.updateGraph(await revPromise, false));\n    }\n\n    let { prepend, graph } = revision;\n    if (serializerOptions.modulesOnly) {\n      prepend = [];\n    }\n\n    return getExplodedSourceMap([...prepend, ...this._getSortedModules(graph)], {\n      processModuleFilter: this._config.serializer.processModuleFilter,\n    });\n  }\n\n  async _resolveRelativePath(filePath, { relativeTo, resolverOptions, transformOptions }) {\n    const resolutionFn = await transformHelpers.getResolveDependencyFn(\n      this._bundler.getBundler(),\n      transformOptions.platform,\n      resolverOptions\n    );\n    const rootDir = relativeTo === 'server' ? this._getServerRootDir() : this._config.projectRoot;\n    return resolutionFn(`${rootDir}/.`, filePath);\n  }\n\n  getNewBuildID() {\n    return (this._nextBundleBuildID++).toString(36);\n  }\n\n  getPlatforms() {\n    return this._config.resolver.platforms;\n  }\n\n  getWatchFolders() {\n    return this._config.watchFolders;\n  }\n\n  static DEFAULT_GRAPH_OPTIONS = {\n    customResolverOptions: Object.create(null),\n    customTransformOptions: Object.create(null),\n    dev: true,\n    hot: false,\n    minify: false,\n    runtimeBytecodeVersion: null,\n    unstable_transformProfile: 'default',\n  };\n\n  static DEFAULT_BUNDLE_OPTIONS = {\n    ...Server.DEFAULT_GRAPH_OPTIONS,\n    excludeSource: false,\n    inlineSourceMap: false,\n    modulesOnly: false,\n    onProgress: null,\n    runModule: true,\n    shallow: false,\n    sourceMapUrl: null,\n    sourceUrl: null,\n  };\n\n  _getServerRootDir() {\n    return this._config.server.unstable_serverRoot ?? this._config.projectRoot;\n  }\n\n  _getEntryPointAbsolutePath(entryFile) {\n    return path.resolve(this._getServerRootDir(), entryFile);\n  }\n\n  // Wait for the server to finish initializing.\n  async ready() {\n    await this._bundler.ready();\n  }\n}\n\nfunction* zip(xs, ys) {\n  //$FlowIssue #9324959\n  const ysIter = ys[Symbol.iterator]();\n  for (const x of xs) {\n    const y = ysIter.next();\n    if (y.done) {\n      return;\n    }\n    yield [x, y.value];\n  }\n}\n\nmodule.exports = Server;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/cli-utils.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst fs = require('fs-extra');\n\nexports.watchFile = async function (filename, callback) {\n  fs.watchFile(filename, () => {\n    callback();\n  });\n\n  await callback();\n};\n\nexports.makeAsyncCommand = (command) => (argv) => {\n  Promise.resolve(command(argv)).catch((error) => {\n    console.error(error.stack);\n    process.exitCode = 1;\n  });\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/cli.js",
    "content": "#!/usr/bin/env node\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\ntry {\n  // $FlowFixMe[untyped-import]\n  require('metro-babel-register').unstable_registerForMetroMonorepo();\n} catch {}\n\nconst { attachMetroCli } = require('./index');\nconst yargs = require('yargs');\n\nattachMetroCli(yargs.demandCommand(1)).argv;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/commands/build.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst { makeAsyncCommand } = require('../cli-utils');\nconst TerminalReporter = require('../lib/TerminalReporter');\n// MARK: - GRANITE\nconst { loadConfig } = require('../../../metro-config/src');\nconst { Terminal } = require('../../../metro-core/src');\n\nconst term = new Terminal(process.stdout);\nconst updateReporter = new TerminalReporter(term);\n\nmodule.exports = () => ({\n  command: 'build <entry>',\n  desc: 'Generates a JavaScript bundle containing the specified entrypoint and its descendants',\n\n  builder: (yargs) => {\n    yargs.option('project-roots', {\n      alias: 'P',\n      type: 'string',\n      array: true,\n    });\n    yargs.option('out', { alias: 'O', type: 'string', demandOption: true });\n\n    yargs.option('platform', { alias: 'p', type: 'string' });\n    yargs.option('output-type', { alias: 't', type: 'string' });\n\n    yargs.option('max-workers', { alias: 'j', type: 'number' });\n\n    yargs.option('minify', { alias: 'z', type: 'boolean' });\n    yargs.option('dev', { alias: 'g', type: 'boolean' });\n\n    yargs.option('source-map', { type: 'boolean' });\n    yargs.option('source-map-url', { type: 'string' });\n\n    yargs.option('legacy-bundler', { type: 'boolean' });\n\n    yargs.option('config', { alias: 'c', type: 'string' });\n\n    // Deprecated\n    yargs.option('reset-cache', { type: 'boolean' });\n  },\n\n  handler: makeAsyncCommand(async (argv) => {\n    const config = await loadConfig(argv);\n    // $FlowExpectedError YargArguments and RunBuildOptions are used interchangeable but their types are not yet compatible\n    const options = argv;\n\n    // Inline require() to avoid circular dependency with ../index\n    const MetroApi = require('../index');\n\n    await MetroApi.runBuild(config, {\n      ...options,\n      onBegin: () => {\n        updateReporter.update({\n          buildID: '$',\n          type: 'bundle_build_started',\n          bundleDetails: {\n            bundleType: 'Bundle',\n            dev: !!options.dev,\n            entryFile: options.entry,\n            minify: !!options.minify,\n            platform: options.platform,\n            // Bytecode bundles in Metro are not meant for production use. Instead,\n            // the Hermes Bytecode Compiler should be invoked on the resulting JS bundle from Metro.\n            runtimeBytecodeVersion: null,\n          },\n        });\n      },\n      onProgress: (transformedFileCount, totalFileCount) => {\n        updateReporter.update({\n          buildID: '$',\n          type: 'bundle_transform_progressed',\n          transformedFileCount,\n          totalFileCount,\n        });\n      },\n      onComplete: () => {\n        updateReporter.update({\n          buildID: '$',\n          type: 'bundle_build_done',\n        });\n      },\n    });\n  }),\n});\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/commands/dependencies.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\n'use strict';\n\nconst { makeAsyncCommand } = require('../cli-utils');\nconst Server = require('../Server');\nconst denodeify = require('denodeify');\nconst fs = require('fs');\n// MARK: - GRANITE\nconst { loadConfig } = require('../../../metro-config/src');\nconst path = require('path');\n\nasync function dependencies(args, config) {\n  const rootModuleAbsolutePath = args.entryFile;\n  if (!fs.existsSync(rootModuleAbsolutePath)) {\n    return Promise.reject(new Error(`File ${rootModuleAbsolutePath} does not exist`));\n  }\n\n  config.cacheStores = [];\n\n  const relativePath = path.relative(config.server.unstable_serverRoot ?? config.projectRoot, rootModuleAbsolutePath);\n\n  const options = {\n    platform: args.platform,\n    entryFile: relativePath,\n    dev: args.dev,\n    minify: false,\n    generateSourceMaps: !args.dev,\n  };\n\n  const writeToFile = args.output;\n  const outStream = writeToFile ? fs.createWriteStream(args.output) : process.stdout;\n\n  const server = new Server(config);\n  const deps = await server.getOrderedDependencyPaths(options);\n  deps.forEach((modulePath) => {\n    // Temporary hack to disable listing dependencies not under this directory.\n    // Long term, we need either\n    // (a) JS code to not depend on anything outside this directory, or\n    // (b) Come up with a way to declare this dependency in Buck.\n    const isInsideProjectRoots = config.watchFolders.filter((root) => modulePath.startsWith(root)).length > 0;\n    if (isInsideProjectRoots) {\n      outStream.write(modulePath + '\\n');\n    }\n  });\n\n  server.end();\n  return writeToFile ? denodeify(outStream.end).bind(outStream)() : Promise.resolve();\n}\n\nmodule.exports = () => ({\n  command: 'get-dependencies',\n  desc: 'List dependencies',\n  builder: (yargs) => {\n    yargs.option('entry-file', {\n      type: 'string',\n      demandOption: true,\n      describe: 'Absolute path to the root JS file',\n    });\n    yargs.option('output', {\n      type: 'string',\n      describe: 'File name where to store the output, ex. /tmp/dependencies.txt',\n    });\n    yargs.option('platform', {\n      type: 'string',\n      describe: 'The platform extension used for selecting modules',\n    });\n    yargs.option('transformer', {\n      type: 'string',\n      describe: 'Specify a custom transformer to be used',\n    });\n    yargs.option('max-workers', {\n      type: 'number',\n      describe:\n        'Specifies the maximum number of workers the worker-pool ' +\n        'will spawn for transforming files. This defaults to the number of the ' +\n        'cores available on your machine.',\n    });\n    yargs.option('dev', {\n      type: 'boolean',\n      default: true,\n      describe: 'If false, skip all dev-only code path',\n    });\n    yargs.option('verbose', {\n      type: 'boolean',\n      default: false,\n      description: 'Enables logging',\n    });\n  },\n  handler: makeAsyncCommand(async (argv) => {\n    const config = await loadConfig(argv);\n    await dependencies(argv, config);\n  }),\n});\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/commands/serve.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst { makeAsyncCommand, watchFile } = require('../cli-utils');\n// MARK: - GRANITE\nconst { loadConfig, resolveConfig } = require('../../../metro-config/src');\nconst { promisify } = require('util');\n\nmodule.exports = () => ({\n  command: 'serve',\n  aliases: ['start'],\n  desc: 'Starts Metro on the given port, building bundles on the fly',\n\n  builder: (yargs) => {\n    yargs.option('project-roots', {\n      alias: 'P',\n      type: 'string',\n      array: true,\n    });\n\n    yargs.option('host', { alias: 'h', type: 'string', default: 'localhost' });\n    yargs.option('port', { alias: 'p', type: 'number', default: 8080 });\n\n    yargs.option('max-workers', { alias: 'j', type: 'number' });\n\n    yargs.option('secure', { type: 'boolean', describe: '(deprecated)' });\n    yargs.option('secure-key', { type: 'string', describe: '(deprecated)' });\n    yargs.option('secure-cert', { type: 'string', describe: '(deprecated)' });\n    yargs.option('secure-server-options', {\n      alias: 's',\n      type: 'string',\n      describe: 'Use dot notation for object path',\n    });\n\n    yargs.option('hmr-enabled', { alias: 'hmr', type: 'boolean' });\n\n    yargs.option('config', { alias: 'c', type: 'string' });\n\n    // Deprecated\n    yargs.option('reset-cache', { type: 'boolean' });\n\n    // Examples\n    yargs.example('secure-server-options', '-s.cert=\"$(cat path/to/cert)\" -s.key=\"$(cat path/to/key\")');\n  },\n\n  handler: makeAsyncCommand(async (argv) => {\n    let server = null;\n    let restarting = false;\n\n    async function restart() {\n      if (restarting) {\n        return;\n      } else {\n        restarting = true;\n      }\n\n      if (server) {\n        // eslint-disable-next-line no-console\n        console.log('Configuration changed. Restarting the server...');\n        // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n        await promisify(server.close).call(server);\n      }\n\n      const config = await loadConfig(argv);\n\n      // Inline require() to avoid circular dependency with ../index\n      const MetroApi = require('../index');\n\n      // $FlowExpectedError YargArguments and RunBuildOptions are used interchangeable but their types are not yet compatible\n      server = await MetroApi.runServer(config, argv);\n\n      restarting = false;\n    }\n\n    const foundConfig = await resolveConfig(argv.config, argv.cwd);\n\n    if (foundConfig) {\n      await watchFile(foundConfig.filepath, restart);\n    } else {\n      await restart();\n    }\n  }),\n});\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/index.d.ts",
    "content": "// MARK: - GRANITE\n\ndeclare const Metro: {\n  runServer(config: any, options: any): Promise<any>;\n  runBuild(config: any, options: any): Promise<any>;\n};\n\nexport default Metro;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/index.flow.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst makeBuildCommand = require('./commands/build');\nconst makeDependenciesCommand = require('./commands/dependencies');\nconst makeServeCommand = require('./commands/serve');\nconst MetroHmrServer = require('./HmrServer');\nconst IncrementalBundler = require('./IncrementalBundler');\nconst createWebsocketServer = require('./lib/createWebsocketServer');\nconst MetroServer = require('./Server');\nconst outputBundle = require('./shared/output/bundle');\nconst chalk = require('chalk');\nconst fs = require('fs');\nconst http = require('http');\nconst https = require('https');\n// MARK: - GRANITE\nconst { getDefaultConfig, loadConfig, mergeConfig } = require('../../metro-config/src');\nconst { InspectorProxy } = require('../../metro-inspector-proxy/src/index');\nconst net = require('net');\nconst { parse } = require('url');\nconst ws = require('ws');\n\nasync function getConfig(config) {\n  const defaultConfig = await getDefaultConfig(config.projectRoot);\n  return mergeConfig(defaultConfig, config);\n}\n\nasync function runMetro(config, options) {\n  const mergedConfig = await getConfig(config);\n  const {\n    reporter,\n    server: { port },\n  } = mergedConfig;\n\n  reporter.update({\n    hasReducedPerformance: options ? Boolean(options.hasReducedPerformance) : false,\n    port,\n    type: 'initialize_started',\n  });\n\n  const { waitForBundler = false, ...serverOptions } = options ?? {};\n  const server = new MetroServer(mergedConfig, serverOptions);\n\n  const readyPromise = server\n    .ready()\n    .then(() => {\n      reporter.update({\n        type: 'initialize_done',\n        port,\n      });\n    })\n    .catch((error) => {\n      reporter.update({\n        type: 'initialize_failed',\n        port,\n        error,\n      });\n    });\n  if (waitForBundler) {\n    await readyPromise;\n  }\n\n  return server;\n}\n\nexports.runMetro = runMetro;\nexports.loadConfig = loadConfig;\n\nconst createConnectMiddleware = async function (config, options) {\n  const metroServer = await runMetro(config, options);\n\n  let enhancedMiddleware = metroServer.processRequest;\n\n  // Enhance the resulting middleware using the config options\n  if (config.server.enhanceMiddleware) {\n    enhancedMiddleware = config.server.enhanceMiddleware(enhancedMiddleware, metroServer);\n  }\n\n  return {\n    attachHmrServer(httpServer) {\n      const wss = createWebsocketServer({\n        websocketServer: new MetroHmrServer(metroServer.getBundler(), metroServer.getCreateModuleId(), config),\n      });\n      httpServer.on('upgrade', (request, socket, head) => {\n        const { pathname } = parse(request.url);\n        if (pathname === '/hot') {\n          wss.handleUpgrade(request, socket, head, (ws) => {\n            wss.emit('connection', ws, request);\n          });\n        } else {\n          socket.destroy();\n        }\n      });\n    },\n    metroServer,\n    middleware: enhancedMiddleware,\n    end() {\n      metroServer.end();\n    },\n  };\n};\nexports.createConnectMiddleware = createConnectMiddleware;\n\nexports.runServer = async (\n  config,\n  {\n    hasReducedPerformance = false,\n    host,\n    onError,\n    onReady,\n    secureServerOptions,\n    secure, //deprecated\n    secureCert, // deprecated\n    secureKey, // deprecated\n    inspectorProxyDelegate, // MARK: - GRANITE\n    waitForBundler = false,\n    websocketEndpoints = {},\n  }\n) => {\n  await earlyPortCheck(host, config.server.port);\n\n  if (secure != null || secureCert != null || secureKey != null) {\n    // eslint-disable-next-line no-console\n    console.warn(\n      chalk.inverse.yellow.bold(' DEPRECATED '),\n      'The `secure`, `secureCert`, and `secureKey` options are now deprecated. ' +\n        'Please use the `secureServerOptions` object instead to pass options to ' +\n        \"Metro's https development server.\"\n    );\n  }\n  // Lazy require\n  const connect = require('connect');\n\n  const serverApp = connect();\n\n  const { middleware, end, metroServer } = await createConnectMiddleware(config, {\n    hasReducedPerformance,\n    waitForBundler,\n  });\n\n  serverApp.use(middleware);\n\n  let inspectorProxy = null;\n  if (config.server.runInspectorProxy) {\n    inspectorProxy = new InspectorProxy(config.projectRoot, inspectorProxyDelegate);\n  }\n\n  let httpServer;\n\n  if (secure || secureServerOptions != null) {\n    let options = secureServerOptions;\n    if (typeof secureKey === 'string' && typeof secureCert === 'string') {\n      options = {\n        key: fs.readFileSync(secureKey),\n        cert: fs.readFileSync(secureCert),\n        ...secureServerOptions,\n      };\n    }\n    httpServer = https.createServer(options, serverApp);\n  } else {\n    httpServer = http.createServer(serverApp);\n  }\n  return new Promise((resolve, reject) => {\n    httpServer.on('error', (error) => {\n      if (onError) {\n        onError(error);\n      }\n      reject(error);\n      end();\n    });\n\n    httpServer.listen(config.server.port, host, () => {\n      if (onReady) {\n        onReady(httpServer);\n      }\n\n      Object.assign(websocketEndpoints, {\n        ...(inspectorProxy ? { ...inspectorProxy.createWebSocketListeners(httpServer) } : {}),\n        '/hot': createWebsocketServer({\n          websocketServer: new MetroHmrServer(metroServer.getBundler(), metroServer.getCreateModuleId(), config),\n        }),\n      });\n\n      httpServer.on('upgrade', (request, socket, head) => {\n        const { pathname } = parse(request.url);\n        if (pathname != null && websocketEndpoints[pathname]) {\n          websocketEndpoints[pathname].handleUpgrade(request, socket, head, (ws) => {\n            websocketEndpoints[pathname].emit('connection', ws, request);\n          });\n        } else {\n          socket.destroy();\n        }\n      });\n\n      if (inspectorProxy) {\n        // TODO(hypuk): Refactor inspectorProxy.processRequest into separate request handlers\n        // so that we could provide routes (/json/list and /json/version) here.\n        // Currently this causes Metro to give warning about T31407894.\n        // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n        serverApp.use(inspectorProxy.processRequest.bind(inspectorProxy));\n      }\n\n      resolve(httpServer);\n    });\n\n    // Disable any kind of automatic timeout behavior for incoming\n    // requests in case it takes the packager more than the default\n    // timeout of 120 seconds to respond to a request.\n    httpServer.timeout = 0;\n\n    httpServer.on('close', () => {\n      end();\n    });\n  });\n};\n\nexports.runBuild = async (\n  config,\n  {\n    dev = false,\n    entry,\n    onBegin,\n    onComplete,\n    onProgress,\n    minify = true,\n    output = outputBundle,\n    out,\n    platform = 'web',\n    sourceMap = false,\n    sourceMapUrl,\n  }\n) => {\n  const metroServer = await runMetro(config, {\n    watch: false,\n  });\n\n  try {\n    const requestOptions = {\n      dev,\n      entryFile: entry,\n      inlineSourceMap: sourceMap && !sourceMapUrl,\n      minify,\n      platform,\n      sourceMapUrl: sourceMap === false ? undefined : sourceMapUrl,\n      createModuleIdFactory: config.serializer.createModuleIdFactory,\n      onProgress,\n    };\n\n    if (onBegin) {\n      onBegin();\n    }\n\n    const metroBundle = await output.build(metroServer, requestOptions);\n\n    if (onComplete) {\n      onComplete();\n    }\n\n    if (out) {\n      const bundleOutput = out.replace(/(\\.js)?$/, '.js');\n      const sourcemapOutput = sourceMap === false ? undefined : out.replace(/(\\.js)?$/, '.map');\n\n      const outputOptions = {\n        bundleOutput,\n        sourcemapOutput,\n        dev,\n        platform,\n      };\n\n      // eslint-disable-next-line no-console\n      await output.save(metroBundle, outputOptions, console.log);\n    }\n\n    return metroBundle;\n  } finally {\n    await metroServer.end();\n  }\n};\n\nexports.buildGraph = async function (\n  config,\n  {\n    customTransformOptions = Object.create(null),\n    dev = false,\n    entries,\n    minify = false,\n    onProgress,\n    platform = 'web',\n    type = 'module',\n  }\n) {\n  const mergedConfig = await getConfig(config);\n\n  const bundler = new IncrementalBundler(mergedConfig);\n\n  try {\n    const { customResolverOptions, ...defaultTransformInputOptions } = MetroServer.DEFAULT_GRAPH_OPTIONS;\n    return await bundler.buildGraphForEntries(\n      entries,\n      {\n        ...defaultTransformInputOptions,\n        customTransformOptions,\n        dev,\n        minify,\n        platform,\n        type,\n      },\n      { customResolverOptions }\n    );\n  } finally {\n    bundler.end();\n  }\n};\n\nexports.attachMetroCli = function (\n  yargs,\n  {\n    build = {},\n    serve = {},\n    dependencies = {},\n  }   \n                               \n                               \n                      \n       \n   \n  // prettier-ignore\n  // $FlowFixMe[prop-missing]\n  = {}\n) {\n  yargs.strict();\n\n  if (build) {\n    yargs.command(makeBuildCommand());\n  }\n  if (serve) {\n    yargs.command(makeServeCommand());\n  }\n  if (dependencies) {\n    yargs.command(makeDependenciesCommand());\n  }\n\n  return yargs;\n};\n\nasync function earlyPortCheck(host, port) {\n  const server = net.createServer((c) => c.end());\n  try {\n    await new Promise((resolve, reject) => {\n      server.on('error', (err) => {\n        reject(err);\n      });\n      server.listen(port, host, undefined, () => resolve());\n    });\n  } finally {\n    await new Promise((resolve) => server.close(() => resolve()));\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/index.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\n/*::\nexport type * from './index.flow';\n*/\n\ntry {\n  require('metro-babel-register').unstable_registerForMetroMonorepo();\n} catch {}\n\nmodule.exports = require('./index.flow');\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/isPnP.js",
    "content": "// MARK: - GRANITE\nlet cachedResult = null;\n\nmodule.exports = function isPnP() {\n  if (cachedResult !== null) {\n    return cachedResult;\n  }\n\n  try {\n    require('pnpapi');\n    return (cachedResult = true);\n  } catch {\n    return (cachedResult = false);\n  }\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/BatchProcessor.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst invariant = require('invariant');\n\n/**\n * We batch items together trying to minimize their processing, for example as\n * network queries. For that we wait a small moment before processing a batch.\n * We limit also the number of items we try to process in a single batch so that\n * if we have many items pending in a short amount of time, we can start\n * processing right away.\n */\nclass BatchProcessor {\n  _currentProcessCount;\n  _options;\n  _processBatch;\n  _queue;\n  _timeoutHandle;\n\n  constructor(options, processBatch) {\n    this._options = options;\n    this._processBatch = processBatch;\n    this._queue = [];\n    this._timeoutHandle = null;\n    this._currentProcessCount = 0;\n    // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n    this._processQueue = this._processQueue.bind(this);\n  }\n\n  _onBatchFinished() {\n    this._currentProcessCount--;\n    this._processQueueOnceReady();\n  }\n\n  _onBatchResults(jobs, results) {\n    invariant(results.length === jobs.length, 'Not enough results returned.');\n    for (let i = 0; i < jobs.length; ++i) {\n      jobs[i].resolve(results[i]);\n    }\n    this._onBatchFinished();\n  }\n\n  _onBatchError(jobs, error) {\n    for (let i = 0; i < jobs.length; ++i) {\n      jobs[i].reject(error);\n    }\n    this._onBatchFinished();\n  }\n\n  _processQueue() {\n    this._timeoutHandle = null;\n    const { concurrency } = this._options;\n    while (this._queue.length > 0 && this._currentProcessCount < concurrency) {\n      this._currentProcessCount++;\n      const jobs = this._queue.splice(0, this._options.maximumItems);\n      this._processBatch(jobs.map((job) => job.item)).then(\n        // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n        this._onBatchResults.bind(this, jobs),\n        // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n        this._onBatchError.bind(this, jobs)\n      );\n    }\n  }\n\n  _processQueueOnceReady() {\n    if (this._queue.length >= this._options.maximumItems) {\n      clearTimeout(this._timeoutHandle);\n      // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n      process.nextTick(this._processQueue);\n      return;\n    }\n    if (this._timeoutHandle == null) {\n      this._timeoutHandle = setTimeout(\n        // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n        this._processQueue,\n        this._options.maximumDelayMs\n      );\n    }\n  }\n\n  queue(item) {\n    return new Promise((resolve, reject) => {\n      this._queue.push({ item, resolve, reject });\n      this._processQueueOnceReady();\n    });\n  }\n}\n\nmodule.exports = BatchProcessor;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/CountingSet.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n/**\n * A Set that only deletes a given item when the number of delete(item) calls\n * matches the number of add(item) calls. Iteration and `size` are in terms of\n * *unique* items.\n */\nexport default class CountingSet {\n  #map = new Map();\n\n  constructor(items) {\n    if (items) {\n      if (items instanceof CountingSet) {\n        this.#map = new Map(items.#map);\n      } else {\n        for (const item of items) {\n          this.add(item);\n        }\n      }\n    }\n  }\n\n  has(item) {\n    return this.#map.has(item);\n  }\n\n  add(item) {\n    const newCount = this.count(item) + 1;\n    this.#map.set(item, newCount);\n  }\n\n  delete(item) {\n    const newCount = this.count(item) - 1;\n    if (newCount <= 0) {\n      this.#map.delete(item);\n    } else {\n      this.#map.set(item, newCount);\n    }\n  }\n\n  keys() {\n    return this.#map.keys();\n  }\n\n  values() {\n    return this.#map.keys();\n  }\n\n  *entries() {\n    for (const item of this) {\n      yield [item, item];\n    }\n  }\n\n  // Iterate over unique entries\n  // $FlowIssue[unsupported-syntax]\n  [Symbol.iterator]() {\n    return this.values();\n  }\n\n  /*::\n  // For Flow's benefit\n  @@iterator(): Iterator<T> {\n    return this.values();\n  }\n  */\n\n  // Number of unique entries\n  // $FlowIssue[unsafe-getters-setters]\n  get size() {\n    return this.#map.size;\n  }\n\n  count(item) {\n    return this.#map.get(item) ?? 0;\n  }\n\n  clear() {\n    this.#map.clear();\n  }\n\n  forEach(callbackFn, thisArg) {\n    for (const item of this) {\n      callbackFn.call(thisArg, item, item, this);\n    }\n  }\n\n  // For Jest purposes. Ideally a custom serializer would be enough, but in\n  // practice there is hardcoded magic for Set in toEqual (etc) that we cannot\n  // extend to custom collection classes. Instead let's assume values are\n  // sortable ( = strings) and make this look like an array with some stable\n  // order.\n  toJSON() {\n    return [...this].sort();\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/JsonReporter.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nclass JsonReporter {\n  _stream;\n\n  constructor(stream) {\n    this._stream = stream;\n  }\n\n  /**\n   * There is a special case for errors because they have non-enumerable fields.\n   * (Perhaps we should switch in favor of plain object?)\n   */\n  update(event) {\n    // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n    if (Object.prototype.toString.call(event.error) === '[object Error]') {\n      event = Object.assign(event, {\n        message: event.error.message,\n        stack: event.error.stack,\n      });\n    }\n\n    this._stream.write(JSON.stringify(event) + '\\n');\n  }\n}\n\nmodule.exports = JsonReporter;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/RamBundleParser.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n *       strict\n */\n\n'use strict';\n\nconst MAGIC_NUMBER = require('../shared/output/RamBundle/magic-number');\nconst SIZEOF_UINT32 = 4;\nconst HEADER_SIZE = 3;\n\n/**\n * Implementation of a RAM bundle parser in JS.\n *\n * It receives a Buffer as an input and implements two main methods, which are\n * able to run in constant time no matter the size of the bundle:\n *\n * getStartupCode(): returns the runtime and the startup code of the bundle.\n * getModule(): returns the code for the specified module.\n */\nclass RamBundleParser {\n  _buffer;\n  _numModules;\n  _startupCodeLength;\n  _startOffset;\n\n  // $FlowFixMe[missing-local-annot]\n  constructor(buffer) {\n    this._buffer = buffer;\n\n    if (this._readPosition(0) !== MAGIC_NUMBER) {\n      throw new Error('File is not a RAM bundle file');\n    }\n\n    this._numModules = this._readPosition(1);\n    this._startupCodeLength = this._readPosition(2);\n\n    // The startup code begins after the table of contents, which contains the\n    // 3 fields on the header plus 2 entries per module.\n    this._startOffset = (HEADER_SIZE + this._numModules * 2) * SIZEOF_UINT32;\n  }\n\n  _readPosition(pos) {\n    return this._buffer.readUInt32LE(pos * SIZEOF_UINT32);\n  }\n\n  getStartupCode() {\n    const start = this._startOffset;\n    const end = start + this._startupCodeLength - 1;\n\n    return this._buffer.toString('utf8', start, end);\n  }\n\n  getModule(id) {\n    const moduleOffset = this._readPosition(HEADER_SIZE + id * 2);\n    const moduleLength = this._readPosition(HEADER_SIZE + id * 2 + 1);\n\n    const start = this._startOffset + moduleOffset;\n    const end = start + moduleLength - 1;\n\n    return this._buffer.toString('utf8', start, end);\n  }\n}\n\nmodule.exports = RamBundleParser;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/ReportableEvent.d.ts",
    "content": "interface BundleDetails {\n  bundleType: string;\n  dev: boolean;\n  entryFile: string;\n  minify: boolean;\n  platform?: string;\n  runtimeBytecodeVersion?: number;\n}\n\ntype WatcherStatus =\n  | {\n      type: 'watchman_slow_command';\n      timeElapsed: number;\n      command: 'watch-project' | 'query';\n    }\n  | {\n      type: 'watchman_slow_command_complete';\n      timeElapsed: number;\n      command: 'watch-project' | 'query';\n    }\n  | {\n      type: 'watchman_warning';\n      warning: unknown;\n      command: 'watch-project' | 'query';\n    };\n\ntype HealthCheckResult =\n  | { type: 'error'; timeout: number; error: Error; watcher: string | null }\n  | {\n      type: 'success';\n      timeout: number;\n      timeElapsed: number;\n      watcher: string | null;\n    }\n  | {\n      type: 'timeout';\n      timeout: number;\n      watcher: string | null;\n      pauseReason: string | null;\n    };\n\nexport type ReportableEvent =\n  | {\n      port: number;\n      hasReducedPerformance: boolean;\n      type: 'initialize_started';\n    }\n  | {\n      type: 'initialize_failed';\n      port: number;\n      error: Error;\n    }\n  | {\n      type: 'initialize_done';\n      port: number;\n    }\n  | {\n      buildID: string;\n      type: 'bundle_build_done';\n    }\n  | {\n      buildID: string;\n      type: 'bundle_build_failed';\n    }\n  | {\n      type: 'bundle_save_log';\n      message: string;\n    }\n  | {\n      buildID: string;\n      bundleDetails: BundleDetails;\n      isPrefetch?: boolean;\n      type: 'bundle_build_started';\n    }\n  | {\n      error: Error;\n      type: 'bundling_error';\n    }\n  | {\n      type: 'dep_graph_loading';\n      hasReducedPerformance: boolean;\n    }\n  | { type: 'dep_graph_loaded' }\n  | {\n      buildID: string;\n      type: 'bundle_transform_progressed';\n      transformedFileCount: number;\n      totalFileCount: number;\n    }\n  | {\n      type: 'cache_read_error';\n      error: Error;\n    }\n  | {\n      type: 'cache_write_error';\n      error: Error;\n    }\n  | { type: 'transform_cache_reset' }\n  | {\n      type: 'worker_stdout_chunk';\n      chunk: string;\n    }\n  | {\n      type: 'worker_stderr_chunk';\n      chunk: string;\n    }\n  | {\n      type: 'hmr_client_error';\n      error: Error;\n    }\n  | {\n      type: 'client_log';\n      level: 'trace' | 'info' | 'warn' | 'log' | 'group' | 'groupCollapsed' | 'groupEnd' | 'debug';\n      data: Array<unknown>;\n      mode: 'BRIDGE' | 'NOBRIDGE';\n    }\n  | {\n      type: 'resolver_warning';\n      message: string;\n    }\n  | {\n      type: 'server_listening';\n      port: number;\n      address: string;\n      family: string;\n    }\n  | {\n      type: 'transformer_load_started';\n    }\n  | {\n      type: 'transformer_load_done';\n    }\n  | {\n      type: 'transformer_load_failed';\n      error: Error;\n    }\n  | {\n      type: 'watcher_health_check_result';\n      result: HealthCheckResult;\n    }\n  | {\n      type: 'watcher_status';\n      status: WatcherStatus;\n    };\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/TerminalReporter.d.ts",
    "content": "import type { ReportableEvent } from './ReportableEvent';\ntype Terminal = any;\ntype TerminalReportableEvent =\n  | ReportableEvent\n  | {\n      buildID: string;\n      type: 'bundle_transform_progressed_throttled';\n      transformedFileCount: number;\n      totalFileCount: number;\n    };\n\ndeclare class TerminalReporter {\n  readonly terminal: Terminal;\n  constructor(terminal: Terminal);\n  update(event: TerminalReportableEvent): void;\n}\n\nexport default TerminalReporter;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/TerminalReporter.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst logToConsole = require('./logToConsole');\nconst reporting = require('./reporting');\nconst chalk = require('chalk');\nconst throttle = require('lodash.throttle');\n// MARK: - GRANITE\nconst { AmbiguousModuleResolutionError } = require('../../../metro-core/src');\nconst path = require('path');\nconst debug = require('debug')('metro');\n\nconst GLOBAL_CACHE_DISABLED_MESSAGE_FORMAT = 'The global cache is now disabled because %s';\n\nconst DARK_BLOCK_CHAR = '\\u2593';\nconst LIGHT_BLOCK_CHAR = '\\u2591';\nconst MAX_PROGRESS_BAR_CHAR_WIDTH = 16;\n\n/**\n * We try to print useful information to the terminal for interactive builds.\n * This implements the `Reporter` interface from the './reporting' module.\n */\nclass TerminalReporter {\n  /**\n   * The bundle builds for which we are actively maintaining the status on the\n   * terminal, ie. showing a progress bar. There can be several bundles being\n   * built at the same time.\n   */\n  _activeBundles;\n\n  _scheduleUpdateBundleProgress;\n\n  terminal;\n\n  constructor(terminal) {\n    this._activeBundles = new Map();\n    this._scheduleUpdateBundleProgress = throttle((data) => {\n      this.update({ ...data, type: 'bundle_transform_progressed_throttled' });\n    }, 100);\n    this.terminal = terminal;\n  }\n\n  /**\n   * Construct a message that represents the progress of a\n   * single bundle build, for example:\n   *\n   *     BUNDLE path/to/bundle.js ▓▓▓▓▓░░░░░░░░░░░ 36.6% (4790/7922)\n   */\n  _getBundleStatusMessage(\n    { bundleDetails: { entryFile, bundleType, runtimeBytecodeVersion }, transformedFileCount, totalFileCount, ratio },\n    phase\n  ) {\n    if (runtimeBytecodeVersion) {\n      bundleType = 'bytecodebundle';\n    }\n\n    const localPath = path.relative('.', entryFile);\n    const filledBar = Math.floor(ratio * MAX_PROGRESS_BAR_CHAR_WIDTH);\n    const bundleTypeColor = phase === 'done' ? chalk.green : phase === 'failed' ? chalk.red : chalk.yellow;\n    const progress =\n      phase === 'in_progress'\n        ? chalk.green.bgGreen(DARK_BLOCK_CHAR.repeat(filledBar)) +\n          chalk.bgWhite.white(LIGHT_BLOCK_CHAR.repeat(MAX_PROGRESS_BAR_CHAR_WIDTH - filledBar)) +\n          chalk.bold(` ${(100 * ratio).toFixed(1)}% `) +\n          chalk.dim(`(${transformedFileCount}/${totalFileCount})`)\n        : '';\n\n    return (\n      bundleTypeColor.inverse.bold(` ${bundleType.toUpperCase()} `) +\n      chalk.reset.dim(` ${path.dirname(localPath)}/`) +\n      chalk.bold(path.basename(localPath)) +\n      ' ' +\n      progress +\n      '\\n'\n    );\n  }\n\n  _logCacheDisabled(reason) {\n    const format = GLOBAL_CACHE_DISABLED_MESSAGE_FORMAT;\n    switch (reason) {\n      case 'too_many_errors':\n        reporting.logWarning(this.terminal, format, 'it has been failing too many times.');\n        break;\n      case 'too_many_misses':\n        reporting.logWarning(this.terminal, format, 'it has been missing too many consecutive keys.');\n        break;\n    }\n  }\n\n  _logBundleBuildDone(buildID) {\n    const progress = this._activeBundles.get(buildID);\n    if (progress != null) {\n      const msg = this._getBundleStatusMessage(\n        {\n          ...progress,\n          ratio: 1,\n          transformedFileCount: progress.totalFileCount,\n        },\n        'done'\n      );\n      this.terminal.log(msg);\n      this._activeBundles.delete(buildID);\n    }\n  }\n\n  _logBundleBuildFailed(buildID) {\n    const progress = this._activeBundles.get(buildID);\n    if (progress != null) {\n      const msg = this._getBundleStatusMessage(progress, 'failed');\n      this.terminal.log(msg);\n    }\n  }\n\n  _logInitializing(port, hasReducedPerformance) {\n    // noop\n  }\n\n  _logInitializingFailed(port, error) {\n    if (error.code === 'EADDRINUSE') {\n      this.terminal.log(chalk.bgRed.bold(' ERROR '), chalk.red(\"Metro can't listen on port\", chalk.bold(String(port))));\n      this.terminal.log('Most likely another process is already using this port');\n      this.terminal.log('Run the following command to find out which process:');\n      this.terminal.log('\\n  ', chalk.bold('lsof -i :' + port), '\\n');\n      this.terminal.log('Then, you can either shut down the other process:');\n      this.terminal.log('\\n  ', chalk.bold('kill -9 <PID>'), '\\n');\n      this.terminal.log('or run Metro on different port.');\n    } else {\n      this.terminal.log(chalk.bgRed.bold(' ERROR '), chalk.red(error.message));\n      const errorAttributes = JSON.stringify(error);\n      if (errorAttributes !== '{}') {\n        this.terminal.log(chalk.red(errorAttributes));\n      }\n      this.terminal.log(chalk.red(error.stack));\n    }\n  }\n\n  /**\n   * This function is only concerned with logging and should not do state\n   * or terminal status updates.\n   */\n  _log(event) {\n    switch (event.type) {\n      case 'initialize_started':\n        this._logInitializing(event.port, event.hasReducedPerformance);\n        break;\n      case 'initialize_failed':\n        this._logInitializingFailed(event.port, event.error);\n        break;\n      case 'bundle_build_done':\n        this._logBundleBuildDone(event.buildID);\n        break;\n      case 'bundle_build_failed':\n        this._logBundleBuildFailed(event.buildID);\n        break;\n      case 'bundling_error':\n        this._logBundlingError(event.error);\n        break;\n      case 'global_cache_disabled':\n        this._logCacheDisabled(event.reason);\n        break;\n      case 'transform_cache_reset':\n        debug('the transform cache was reset.');\n        break;\n      case 'worker_stdout_chunk':\n        this._logWorkerChunk('stdout', event.chunk);\n        break;\n      case 'worker_stderr_chunk':\n        this._logWorkerChunk('stderr', event.chunk);\n        break;\n      case 'hmr_client_error':\n        this._logHmrClientError(event.error);\n        break;\n      case 'client_log':\n        logToConsole(this.terminal, event.level, event.mode, ...event.data);\n        break;\n      case 'dep_graph_loading':\n        if (event.hasReducedPerformance) {\n          this.terminal.log(\n            chalk.red(\n              'Metro is operating with reduced performance.\\n' + 'Please fix the problem above and restart Metro.\\n\\n'\n            )\n          );\n        }\n\n        break;\n    }\n  }\n\n  /**\n   * We do not want to log the whole stacktrace for bundling error, because\n   * these are operational errors, not programming errors, and the stacktrace\n   * is not actionable to end users.\n   */\n  _logBundlingError(error) {\n    if (error instanceof AmbiguousModuleResolutionError) {\n      const he = error.hasteError;\n      const message =\n        'ambiguous resolution: module `' +\n        `${error.fromModulePath}\\` tries to require \\`${he.hasteName}\\`, ` +\n        'but there are several files providing this module. You can delete ' +\n        'or fix them: \\n\\n' +\n        Object.keys(he.duplicatesSet)\n          .sort()\n          .map((dupFilePath) => `  * \\`${dupFilePath}\\`\\n`)\n          .join('');\n      reporting.logError(this.terminal, message);\n      return;\n    }\n\n    let { message } = error;\n\n    // Do not log the stack trace for SyntaxError (because it will always be in\n    // the parser, which is not helpful).\n    if (!(error instanceof SyntaxError)) {\n      if (error.snippet == null && error.stack != null) {\n        message = error.stack;\n      }\n    }\n\n    if (error.filename && !message.includes(error.filename)) {\n      message += ` [${error.filename}]`;\n    }\n\n    if (error.snippet != null) {\n      message += '\\n' + error.snippet;\n    }\n    reporting.logError(this.terminal, message);\n  }\n\n  _logWorkerChunk(origin, chunk) {\n    const lines = chunk.split('\\n');\n    if (lines.length >= 1 && lines[lines.length - 1] === '') {\n      lines.splice(lines.length - 1, 1);\n    }\n    lines.forEach((line) => {\n      this.terminal.log(`transform[${origin}]: ${line}`);\n    });\n  }\n\n  /**\n   * We use Math.pow(ratio, 2) to as a conservative measure of progress because\n   * we know the `totalCount` is going to progressively increase as well. We\n   * also prevent the ratio from going backwards.\n   */\n  _updateBundleProgress({ buildID, transformedFileCount, totalFileCount }) {\n    const currentProgress = this._activeBundles.get(buildID);\n    if (currentProgress == null) {\n      return;\n    }\n    const rawRatio = transformedFileCount / totalFileCount;\n    const conservativeRatio = Math.pow(rawRatio, 2);\n    const ratio = Math.max(conservativeRatio, currentProgress.ratio);\n    Object.assign(currentProgress, {\n      ratio,\n      transformedFileCount,\n      totalFileCount,\n    });\n  }\n\n  /**\n   * This function is exclusively concerned with updating the internal state.\n   * No logging or status updates should be done at this point.\n   */\n  _updateState(event) {\n    switch (event.type) {\n      case 'bundle_build_done':\n      case 'bundle_build_failed':\n        this._activeBundles.delete(event.buildID);\n        break;\n      case 'bundle_build_started':\n        const bundleProgress = {\n          bundleDetails: event.bundleDetails,\n          transformedFileCount: 0,\n          totalFileCount: 1,\n          ratio: 0,\n        };\n        this._activeBundles.set(event.buildID, bundleProgress);\n        break;\n\n      case 'bundle_transform_progressed_throttled':\n        this._updateBundleProgress(event);\n        break;\n    }\n  }\n\n  /**\n   * Return a status message that is always consistent with the current state\n   * of the application. Having this single function ensures we don't have\n   * different callsites overriding each other status messages.\n   */\n  _getStatusMessage() {\n    return Array.from(this._activeBundles.entries())\n      .map(([_, progress]) => this._getBundleStatusMessage(progress, 'in_progress'))\n      .filter((str) => str != null)\n      .join('\\n');\n  }\n\n  _logHmrClientError(e) {\n    reporting.logError(\n      this.terminal,\n      'A WebSocket client got a connection error. Please reload your device ' + 'to get HMR working again: %s',\n      e\n    );\n  }\n\n  /**\n   * Single entry point for reporting events. That allows us to implement the\n   * corresponding JSON reporter easily and have a consistent repor∏ting.\n   */\n  update(event) {\n    if (event.type === 'bundle_transform_progressed') {\n      this._scheduleUpdateBundleProgress(event);\n      return;\n    }\n\n    this._log(event);\n    this._updateState(event);\n    this.terminal.status(this._getStatusMessage());\n  }\n}\n\nmodule.exports = TerminalReporter;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/bundleToBytecode.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\n// The magic number is used as a header for bytecode.\n// It represents a Metro tunnel in binary.\n//\n// 11111111\n// 11100111\n// 11000011\n// 11000011\nconst MAGIC_NUMBER = 0xffe7c3c3;\n\nfunction getFileHeader(moduleCount) {\n  const buffer = Buffer.alloc(8);\n  buffer.writeUInt32LE(MAGIC_NUMBER, 0);\n  buffer.writeUInt32LE(moduleCount, 4);\n  return buffer;\n}\n\nfunction addModuleHeader(buffer) {\n  const { getFileLength } = require('metro-hermes-compiler');\n\n  const fileLength = getFileLength(buffer, 0);\n  const header = Buffer.alloc(4);\n  header.writeUInt32LE(fileLength, 0);\n  return [header, buffer];\n}\n\n/**\n * A bytecode bundle has the following format:\n *\n * 4 bytes MAGIC_NUMBER\n * 4 bytes Module count\n * 4 bytes Module length N + N bytes\n * ...\n *\n */\nfunction bundleToBytecode(bundle) {\n  const buffers = [];\n\n  if (bundle.pre.length) {\n    buffers.push(...bundle.pre);\n  }\n\n  const modules = [];\n\n  const sortedModules = bundle.modules\n    .slice()\n    // In a JS bundle, the order of modules needs to be deterministic for source\n    // maps to work. This constraint is not necessary for bytecode bundles but\n    // is kept for consistency.\n    .sort((a, b) => a[0] - b[0]);\n\n  for (const [id, bytecodeBundle] of sortedModules) {\n    buffers.push(...bytecodeBundle);\n    // Use the size of the last item in `bytecodeBundle` which is always\n    // the actual module without headers.\n    modules.push([id, bytecodeBundle[bytecodeBundle.length - 1].length]);\n  }\n\n  if (bundle.post.length) {\n    buffers.push(...bundle.post);\n  }\n\n  return {\n    bytecode: Buffer.concat([getFileHeader(buffers.length), ...buffers.flatMap(addModuleHeader)]),\n    metadata: {\n      pre: bundle.pre ? bundle.pre.length : 0,\n      post: bundle.post.length,\n      modules,\n    },\n  };\n}\n\nmodule.exports = bundleToBytecode;\nmodule.exports.MAGIC_NUMBER = MAGIC_NUMBER;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/bundleToString.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\n/**\n * Serializes a bundle into a plain JS bundle.\n */\nfunction bundleToString(bundle) {\n  let code = bundle.pre.length > 0 ? bundle.pre + '\\n' : '';\n  const modules = [];\n\n  const sortedModules = bundle.modules\n    .slice()\n    // The order of the modules needs to be deterministic in order for source\n    // maps to work properly.\n    .sort((a, b) => a[0] - b[0]);\n\n  for (const [id, moduleCode] of sortedModules) {\n    if (moduleCode.length > 0) {\n      code += moduleCode + '\\n';\n    }\n    modules.push([id, moduleCode.length]);\n  }\n\n  if (bundle.post.length > 0) {\n    code += bundle.post;\n  } else {\n    code = code.slice(0, -1);\n  }\n\n  return {\n    code,\n    metadata: { pre: bundle.pre.length, post: bundle.post.length, modules },\n  };\n}\n\nmodule.exports = bundleToString;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/contextModule.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\nimport crypto from 'crypto';\nimport path from 'path';\n\nimport nullthrows from 'nullthrows';\n\nfunction toHash(value) {\n  // Use `hex` to ensure filepath safety.\n  return crypto.createHash('sha1').update(value).digest('hex');\n}\n\n/** Given a fully qualified require context, return a virtual file path that ensures uniqueness between paths with different contexts. */\nexport function deriveAbsolutePathFromContext(from, context) {\n  // Drop the trailing slash, require.context should always be matched against a folder\n  // and we want to normalize the folder name as much as possible to prevent duplicates.\n  // This also makes the files show up in the correct location when debugging in Chrome.\n  const filePath = from.endsWith(path.sep) ? from.slice(0, -1) : from;\n  return (\n    filePath +\n    '?ctx=' +\n    toHash(\n      [\n        context.mode,\n        context.recursive ? 'recursive' : '',\n        new RegExp(context.filter.pattern, context.filter.flags).toString(),\n      ]\n        .filter(Boolean)\n        .join(' ')\n    )\n  );\n}\n\n/** Match a file against a require context. */\nexport function fileMatchesContext(testPath, context) {\n  // NOTE(EvanBacon): Ensure this logic is synchronized with the similar\n  // functionality in `metro-file-map/src/HasteFS.js` (`matchFilesWithContext()`)\n\n  const filePath = path.relative(nullthrows(context.from), testPath);\n  const filter = context.filter;\n  if (\n    // Ignore everything outside of the provided `root`.\n    !(filePath && !filePath.startsWith('..')) ||\n    // Prevent searching in child directories during a non-recursive search.\n    (!context.recursive && filePath.includes(path.sep)) ||\n    // Test against the filter.\n    !filter.test(\n      // NOTE(EvanBacon): Ensure files start with `./` for matching purposes\n      // this ensures packages work across Metro and Webpack (ex: Storybook for React DOM / React Native).\n      // `a/b.js` -> `./a/b.js`\n      './' + filePath.replace(/\\\\/g, '/')\n    )\n  ) {\n    return false;\n  }\n\n  return true;\n}\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/contextModuleTemplates.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\nimport * as path from 'path';\n\nfunction createFileMap(modulePath, files, processModule) {\n  let mapString = '\\n';\n\n  files\n    .slice()\n    // Sort for deterministic output\n    .sort()\n    .forEach((file) => {\n      let filePath = path.relative(modulePath, file);\n\n      // NOTE(EvanBacon): I'd prefer we prevent the ability for a module to require itself (`require.context('./')`)\n      // but Webpack allows this, keeping it here provides better parity between bundlers.\n\n      // Ensure relative file paths start with `./` so they match the\n      // patterns (filters) used to include them.\n      if (!filePath.startsWith('.')) {\n        filePath = `.${path.sep}` + filePath;\n      }\n      const key = JSON.stringify(filePath);\n      // NOTE(EvanBacon): Webpack uses `require.resolve` in order to load modules on demand,\n      // Metro doesn't have this functionality so it will use getters instead. Modules need to\n      // be loaded on demand because if we imported directly then users would get errors from importing\n      // a file without exports as soon as they create a new file and the context module is updated.\n\n      // NOTE: The values are set to `enumerable` so the `context.keys()` method works as expected.\n      mapString += `  ${key}: { enumerable: true, get() { return ${processModule(file)}; } },\\n`;\n    });\n  return `Object.defineProperties({}, {${mapString}})`;\n}\n\nfunction getEmptyContextModuleTemplate(modulePath) {\n  return `\nfunction metroEmptyContext(request) {\n  let e = new Error('No modules in context');\n  e.code = 'MODULE_NOT_FOUND';\n  throw e;\n}\n\n// Return the keys that can be resolved.\nmetroEmptyContext.keys = () => ([]);\n\n// Return the module identifier for a user request.\nmetroEmptyContext.resolve = function metroContextResolve(request) {\n  throw new Error('Unimplemented Metro module context functionality');\n}\n\nmodule.exports = metroEmptyContext;`;\n}\n\nfunction getLoadableContextModuleTemplate(modulePath, files, importSyntax, getContextTemplate) {\n  return `// All of the requested modules are loaded behind enumerable getters.\nconst map = ${createFileMap(modulePath, files, (moduleId) => `${importSyntax}(${JSON.stringify(moduleId)})`)};\n  \nfunction metroContext(request) {\n  ${getContextTemplate}\n}\n  \n// Return the keys that can be resolved.\nmetroContext.keys = function metroContextKeys() {\n  return Object.keys(map);\n};\n\n// Return the module identifier for a user request.\nmetroContext.resolve = function metroContextResolve(request) {\n  throw new Error('Unimplemented Metro module context functionality');\n}\n\nmodule.exports = metroContext;`;\n}\n\n/**\n * Generate a context module as a virtual file string.\n *\n * @prop {ContextMode} mode indicates how the modules should be loaded.\n * @prop {string} modulePath virtual file path for the virtual module. Example: `require.context('./src')` -> `'/path/to/project/src'`.\n * @prop {string[]} files list of absolute file paths that must be exported from the context module. Example: `['/path/to/project/src/index.js']`.\n *\n * @returns a string representing a context module (virtual file contents).\n */\nexport function getContextModuleTemplate(mode, modulePath, files) {\n  if (!files.length) {\n    return getEmptyContextModuleTemplate(modulePath);\n  }\n  switch (mode) {\n    case 'eager':\n      return getLoadableContextModuleTemplate(\n        modulePath,\n        files,\n        // NOTE(EvanBacon): It's unclear if we should use `import` or `require` here so sticking\n        // with the more stable option (`require`) for now.\n        'require',\n        [\n          '  // Here Promise.resolve().then() is used instead of new Promise() to prevent',\n          '  // uncaught exception popping up in devtools',\n          '  return Promise.resolve().then(() => map[request]);',\n        ].join('\\n')\n      );\n    case 'sync':\n      return getLoadableContextModuleTemplate(modulePath, files, 'require', '  return map[request];');\n    case 'lazy':\n    case 'lazy-once':\n      return getLoadableContextModuleTemplate(modulePath, files, 'import', '  return map[request];');\n    default:\n      throw new Error(`Metro context mode \"${mode}\" is unimplemented`);\n  }\n}\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/countLines.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst newline = /\\r\\n?|\\n|\\u2028|\\u2029/g;\n\nconst countLines = (string) => (string.match(newline) || []).length + 1;\n\nmodule.exports = countLines;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/createModuleIdFactory.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\nfunction createModuleIdFactory() {\n  const fileToIdMap = new Map();\n  let nextId = 0;\n  return (path) => {\n    let id = fileToIdMap.get(path);\n    if (typeof id !== 'number') {\n      id = nextId++;\n      fileToIdMap.set(path, id);\n    }\n    return id;\n  };\n}\n\nmodule.exports = createModuleIdFactory;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/createWebsocketServer.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\nimport ws from 'ws';\n\n/**\n * Returns a WebSocketServer to be attached to an existing HTTP instance. It forwards\n * the received events on the given \"websocketServer\" parameter. It must be an\n * object with the following fields:\n *\n *   - onClientConnect\n *   - onClientError\n *   - onClientMessage\n *   - onClientDisconnect\n */\n\nmodule.exports = function createWebsocketServer({ websocketServer }) {\n  const wss = new ws.Server({\n    noServer: true,\n  });\n\n  wss.on('connection', async (ws, req) => {\n    let connected = true;\n    const url = req.url;\n\n    const sendFn = (...args) => {\n      if (connected) {\n        ws.send(...args);\n      }\n    };\n\n    const client = await websocketServer.onClientConnect(url, sendFn);\n\n    if (client == null) {\n      ws.close();\n      return;\n    }\n\n    ws.on('error', (e) => {\n      websocketServer.onClientError && websocketServer.onClientError(client, e);\n    });\n\n    ws.on('close', () => {\n      websocketServer.onClientDisconnect && websocketServer.onClientDisconnect(client);\n      connected = false;\n    });\n\n    ws.on('message', (message) => {\n      websocketServer.onClientMessage && websocketServer.onClientMessage(client, message, sendFn);\n    });\n  });\n  return wss;\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/debounceAsyncQueue.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\n// Debounces calls with the given delay, and queues the next call while the\n// previous one hasn't completed so that no two calls can execute concurrently.\nfunction debounceAsyncQueue(fn, delay) {\n  let timeout;\n  let waiting = false;\n  let executing = false;\n  let callbacks = [];\n\n  async function execute() {\n    const currentCallbacks = callbacks;\n    callbacks = [];\n    executing = true;\n    const res = await fn();\n    currentCallbacks.forEach((c) => c(res));\n    executing = false;\n    if (callbacks.length > 0) {\n      await execute();\n    }\n  }\n\n  return () =>\n    new Promise((resolve, reject) => {\n      callbacks.push(resolve);\n\n      if (!executing) {\n        if (waiting) {\n          clearTimeout(timeout);\n        } else {\n          waiting = true;\n        }\n        timeout = setTimeout(async () => {\n          waiting = false;\n          await execute();\n        }, delay);\n      }\n    });\n}\n\nmodule.exports = debounceAsyncQueue;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/formatBundlingError.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n *\n */\n\n'use strict';\n\nconst GraphNotFoundError = require('../IncrementalBundler/GraphNotFoundError');\nconst ResourceNotFoundError = require('../IncrementalBundler/ResourceNotFoundError');\nconst RevisionNotFoundError = require('../IncrementalBundler/RevisionNotFoundError');\nconst { UnableToResolveError } = require('../node-haste/DependencyGraph/ModuleResolution');\nconst { codeFrameColumns } = require('@babel/code-frame');\nconst ErrorStackParser = require('error-stack-parser');\nconst fs = require('fs');\n// MARK: - GRANITE\nconst { AmbiguousModuleResolutionError } = require('../../../metro-core/src');\nconst serializeError = require('serialize-error');\n\nfunction formatBundlingError(error) {\n  if (error instanceof AmbiguousModuleResolutionError) {\n    const he = error.hasteError;\n    const message =\n      \"Ambiguous resolution: module '\" +\n      `${error.fromModulePath}\\' tries to require \\'${he.hasteName}\\', but ` +\n      'there are several files providing this module. You can delete or ' +\n      'fix them: \\n\\n' +\n      Object.keys(he.duplicatesSet)\n        .sort()\n        .map((dupFilePath) => `${dupFilePath}`)\n        .join('\\n\\n');\n\n    return {\n      type: 'AmbiguousModuleResolutionError',\n      message,\n      errors: [{ description: message }],\n    };\n  }\n\n  if (\n    error instanceof UnableToResolveError ||\n    (error instanceof Error && (error.type === 'TransformError' || error.type === 'NotFoundError'))\n  ) {\n    error.errors = [\n      {\n        description: error.message,\n        filename: error.filename,\n        lineNumber: error.lineNumber,\n      },\n    ];\n\n    return serializeError(error);\n  } else if (error instanceof ResourceNotFoundError) {\n    return {\n      type: 'ResourceNotFoundError',\n      errors: [],\n      message: error.message,\n    };\n  } else if (error instanceof GraphNotFoundError) {\n    return {\n      type: 'GraphNotFoundError',\n      errors: [],\n      message: error.message,\n    };\n  } else if (error instanceof RevisionNotFoundError) {\n    return {\n      type: 'RevisionNotFoundError',\n      errors: [],\n      message: error.message,\n    };\n  } else {\n    const stack = ErrorStackParser.parse(error);\n    const fileName = stack[0].fileName;\n    const column = stack[0].columnNumber;\n    const line = stack[0].lineNumber;\n\n    let codeFrame = '';\n    try {\n      codeFrame = codeFrameColumns(\n        // If the error was thrown in a node.js builtin module, this call will fail and mask the real error.\n        fs.readFileSync(fileName, 'utf8'),\n        {\n          start: { column, line },\n        },\n        { forceColor: true }\n      );\n    } catch {}\n\n    return {\n      type: 'InternalError',\n      errors: [],\n      message: `Metro has encountered an error: ${error.message}: ${fileName} (${line}:${column})\\n\\n${codeFrame}`,\n    };\n  }\n}\n\nmodule.exports = formatBundlingError;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/getAppendScripts.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nimport CountingSet from './CountingSet';\n\nconst getInlineSourceMappingURL = require('../DeltaBundler/Serializers/helpers/getInlineSourceMappingURL');\nconst sourceMapString = require('../DeltaBundler/Serializers/sourceMapString');\nconst countLines = require('./countLines');\nconst nullthrows = require('nullthrows');\nconst path = require('path');\n\nfunction getAppendScripts(entryPoint, modules, importBundleNames, options) {\n  const output = [];\n\n  if (importBundleNames.size) {\n    const importBundleNamesObject = Object.create(null);\n    importBundleNames.forEach((absolutePath) => {\n      const bundlePath = path.relative(options.serverRoot, absolutePath);\n      importBundleNamesObject[options.createModuleId(absolutePath)] = bundlePath.slice(\n        0,\n        -path.extname(bundlePath).length\n      );\n    });\n    const code = `(function(){var $$=${options.getRunModuleStatement(\n      options.createModuleId(options.asyncRequireModulePath)\n    )}$$.addImportBundleNames(${String(JSON.stringify(importBundleNamesObject))})})();`;\n    output.push({\n      path: '$$importBundleNames',\n      dependencies: new Map(),\n      getSource: () => Buffer.from(''),\n      inverseDependencies: new CountingSet(),\n      output: [\n        {\n          type: 'js/script/virtual',\n          data: {\n            code,\n            lineCount: countLines(code),\n            map: [],\n          },\n        },\n      ],\n    });\n  }\n\n  if (options.runModule) {\n    const paths = [...options.runBeforeMainModule, entryPoint];\n\n    for (const path of paths) {\n      if (modules.some((module) => module.path === path)) {\n        const code = options.getRunModuleStatement(options.createModuleId(path));\n        output.push({\n          path: `require-${path}`,\n          dependencies: new Map(),\n          getSource: () => Buffer.from(''),\n          inverseDependencies: new CountingSet(),\n          output: [\n            {\n              type: 'js/script/virtual',\n              data: {\n                code,\n                lineCount: countLines(code),\n                map: [],\n              },\n            },\n          ],\n        });\n      }\n    }\n  }\n\n  if (options.inlineSourceMap || options.sourceMapUrl) {\n    const sourceMappingURL = options.inlineSourceMap\n      ? getInlineSourceMappingURL(\n          sourceMapString(modules, {\n            processModuleFilter: () => true,\n            excludeSource: false,\n          })\n        )\n      : nullthrows(options.sourceMapUrl);\n\n    const code = `//# sourceMappingURL=${sourceMappingURL}`;\n    output.push({\n      path: 'source-map',\n      dependencies: new Map(),\n      getSource: () => Buffer.from(''),\n      inverseDependencies: new CountingSet(),\n      output: [\n        {\n          type: 'js/script/virtual',\n          data: {\n            code,\n            lineCount: countLines(code),\n            map: [],\n          },\n        },\n      ],\n    });\n  }\n\n  if (options.sourceUrl) {\n    const code = `//# sourceURL=${options.sourceUrl}`;\n    output.push({\n      path: 'source-url',\n      dependencies: new Map(),\n      getSource: () => Buffer.from(''),\n      inverseDependencies: new CountingSet(),\n      output: [\n        {\n          type: 'js/script/virtual',\n          data: {\n            code,\n            lineCount: countLines(code),\n            map: [],\n          },\n        },\n      ],\n    });\n  }\n\n  return output;\n}\n\nmodule.exports = getAppendScripts;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/getGraphId.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\n// MARK: - GRANITE\nconst canonicalize = require('../../../metro-core/src/canonicalize');\n\nfunction getGraphId(\n  entryFile,\n  options,\n  { shallow, experimentalImportBundleSupport, unstable_allowRequireContext, resolverOptions }\n) {\n  return JSON.stringify(\n    {\n      entryFile,\n      options: {\n        customResolverOptions: resolverOptions.customResolverOptions ?? {},\n        customTransformOptions: options.customTransformOptions ?? null,\n        dev: options.dev,\n        experimentalImportSupport: options.experimentalImportSupport || false,\n        hot: options.hot,\n        minify: options.minify,\n        unstable_disableES6Transforms: options.unstable_disableES6Transforms,\n        platform: options.platform != null ? options.platform : null,\n        runtimeBytecodeVersion: options.runtimeBytecodeVersion,\n        type: options.type,\n        experimentalImportBundleSupport,\n        unstable_allowRequireContext,\n        shallow,\n        unstable_transformProfile: options.unstable_transformProfile || 'default',\n      },\n    },\n    canonicalize\n  );\n}\n\nmodule.exports = getGraphId;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/getMaxWorkers.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\nconst os = require('os');\n\nmodule.exports = (workers) => {\n  const cores = os.cpus().length;\n  return typeof workers === 'number' && Number.isInteger(workers)\n    ? Math.min(cores, workers > 0 ? workers : 1)\n    : Math.max(1, Math.ceil(cores * (0.5 + 0.5 * Math.exp(-cores * 0.07)) - 1));\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/getPreludeCode.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\nfunction getPreludeCode({ extraVars, isDev, globalPrefix, requireCycleIgnorePatterns }) {\n  const vars = [\n    // Ensure these variable names match the ones referenced in metro-runtime\n    // require.js\n    '__BUNDLE_START_TIME__=this.nativePerformanceNow?nativePerformanceNow():Date.now()',\n    `__DEV__=${String(isDev)}`,\n    ...formatExtraVars(extraVars),\n    'process=this.process||{}',\n    `__METRO_GLOBAL_PREFIX__='${globalPrefix}'`,\n  ];\n\n  if (isDev) {\n    // Ensure these variable names match the ones referenced in metro-runtime\n    // require.js\n    vars.push(\n      `${globalPrefix}__requireCycleIgnorePatterns=[${requireCycleIgnorePatterns\n        .map((regex) => regex.toString())\n        .join(',')}]`\n    );\n  }\n\n  return `var ${vars.join(',')};${processEnv(isDev ? 'development' : 'production')}`;\n}\n\nconst excluded = new Set(['__BUNDLE_START_TIME__', '__DEV__', 'process']);\n\nfunction formatExtraVars(extraVars) {\n  const assignments = [];\n\n  for (const key in extraVars) {\n    if (extraVars.hasOwnProperty(key) && !excluded.has(key)) {\n      /* $FlowFixMe(>=0.95.0 site=react_native_fb) This comment suppresses an\n       * error found when Flow v0.95 was deployed. To see the error, delete\n       * this comment and run Flow. */\n      assignments.push(`${key}=${JSON.stringify(extraVars[key])}`);\n    }\n  }\n\n  return assignments;\n}\n\nfunction processEnv(nodeEnv) {\n  return `process.env=process.env||{};process.env.NODE_ENV=process.env.NODE_ENV||${JSON.stringify(nodeEnv)};`;\n}\n\nmodule.exports = getPreludeCode;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/getPrependedScripts.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nimport CountingSet from './CountingSet';\n\nconst countLines = require('./countLines');\nconst getPreludeCode = require('./getPreludeCode');\nconst transformHelpers = require('./transformHelpers');\n// MARK: - GRANITE\nconst defaults = require('../../../metro-config/src/defaults/defaults');\n\nasync function getPrependedScripts(\n  config,\n  options,\n\n  resolverOptions,\n  bundler,\n  deltaBundler\n) {\n  // Get all the polyfills from the relevant option params (the\n  // `getPolyfills()` method and the `polyfillModuleNames` variable).\n  const polyfillModuleNames = config.serializer\n    .getPolyfills({\n      platform: options.platform,\n    })\n    .concat(config.serializer.polyfillModuleNames);\n\n  const transformOptions = {\n    ...options,\n    type: 'script',\n  };\n\n  const dependencies = await deltaBundler.getDependencies([defaults.moduleSystem, ...polyfillModuleNames], {\n    resolve: await transformHelpers.getResolveDependencyFn(bundler, options.platform, resolverOptions),\n    transform: await transformHelpers.getTransformFn(\n      [defaults.moduleSystem, ...polyfillModuleNames],\n      bundler,\n      deltaBundler,\n      config,\n      transformOptions,\n      resolverOptions\n    ),\n    unstable_allowRequireContext: config.transformer.unstable_allowRequireContext,\n    transformOptions,\n    onProgress: null,\n    experimentalImportBundleSupport: config.transformer.experimentalImportBundleSupport,\n    shallow: false,\n  });\n\n  return [\n    _getPrelude({\n      dev: options.dev,\n      globalPrefix: config.transformer.globalPrefix,\n      requireCycleIgnorePatterns: config.resolver.requireCycleIgnorePatterns,\n    }),\n    ...dependencies.values(),\n  ];\n}\n\nfunction _getPrelude({ dev, globalPrefix, requireCycleIgnorePatterns }) {\n  const { compile } = require('metro-hermes-compiler');\n\n  const code = getPreludeCode({\n    isDev: dev,\n    globalPrefix,\n    requireCycleIgnorePatterns,\n  });\n  const name = '__prelude__';\n\n  return {\n    dependencies: new Map(),\n    getSource: () => Buffer.from(code),\n    inverseDependencies: new CountingSet(),\n    path: name,\n    output: [\n      {\n        type: 'js/script/virtual',\n        data: {\n          code,\n          lineCount: countLines(code),\n          map: [],\n        },\n      },\n      {\n        type: 'bytecode/script/virtual',\n        data: {\n          bytecode: compile(code, { sourceURL: '__prelude__.virtual.js' }).bytecode,\n        },\n      },\n    ],\n  };\n}\n\nmodule.exports = getPrependedScripts;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/logToConsole.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n *\n */\n\n/* eslint-disable no-console */\n\n'use strict';\n\nconst chalk = require('chalk');\nconst util = require('util');\n\nconst groupStack = [];\nlet collapsedGuardTimer;\n\nmodule.exports = (terminal, level, mode, ...data) => {\n  const logFunction = console[level] && level !== 'trace' ? level : 'log';\n  const color = level === 'error' ? chalk.inverse.red : level === 'warn' ? chalk.inverse.yellow : chalk.inverse.white;\n\n  if (level === 'group') {\n    groupStack.push(level);\n  } else if (level === 'groupCollapsed') {\n    groupStack.push(level);\n    clearTimeout(collapsedGuardTimer);\n    // Inform users that logs get swallowed if they forget to call `groupEnd`.\n    collapsedGuardTimer = setTimeout(() => {\n      if (groupStack.includes('groupCollapsed')) {\n        terminal.log(\n          chalk.inverse.yellow.bold(' WARN '),\n          'Expected `console.groupEnd` to be called after `console.groupCollapsed`.'\n        );\n        groupStack.length = 0;\n      }\n    }, 3000);\n    return;\n  } else if (level === 'groupEnd') {\n    groupStack.pop();\n    if (!groupStack.length) {\n      clearTimeout(collapsedGuardTimer);\n    }\n    return;\n  }\n\n  if (!groupStack.includes('groupCollapsed')) {\n    // Remove excess whitespace at the end of a log message, if possible.\n    const lastItem = data[data.length - 1];\n    if (typeof lastItem === 'string') {\n      data[data.length - 1] = lastItem.trimEnd();\n    }\n\n    const modePrefix = !mode || mode == 'BRIDGE' ? '' : `(${mode.toUpperCase()}) `;\n    terminal.log(\n      color.bold(` ${modePrefix}${logFunction.toUpperCase()} `) + ''.padEnd(groupStack.length * 2, ' '),\n      // `util.format` actually accepts any arguments.\n      // If the first argument is a string, it tries to format it.\n      // Otherwise, it just concatenates all arguments.\n      // $FlowIssue[incompatible-call] util.format expected the first argument to be a string\n      util.format(...data)\n    );\n  }\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/parseCustomResolverOptions.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @emails oncall+metro_bundler\n * @format\n *       strict-local\n */\n\n'use strict';\n\nconst nullthrows = require('nullthrows');\n\nconst PREFIX = 'resolver.';\n\nmodule.exports = function parseCustomResolverOptions(urlObj) {\n  const customResolverOptions = Object.create(null);\n  const query = nullthrows(urlObj.query);\n\n  Object.keys(query).forEach((key) => {\n    if (key.startsWith(PREFIX)) {\n      customResolverOptions[key.substr(PREFIX.length)] = query[key];\n    }\n  });\n\n  return customResolverOptions;\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/parseCustomTransformOptions.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @emails oncall+metro_bundler\n * @format\n *       strict-local\n */\n\n'use strict';\n\nconst nullthrows = require('nullthrows');\n\nconst PREFIX = 'transform.';\n\nmodule.exports = function parseCustomTransformOptions(urlObj) {\n  const customTransformOptions = Object.create(null);\n  const query = nullthrows(urlObj.query);\n\n  Object.keys(query).forEach((key) => {\n    if (key.startsWith(PREFIX)) {\n      customTransformOptions[key.substr(PREFIX.length)] = query[key];\n    }\n  });\n\n  return customTransformOptions;\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/parseOptionsFromUrl.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst parsePlatformFilePath = require('../node-haste/lib/parsePlatformFilePath');\nconst parseCustomResolverOptions = require('./parseCustomResolverOptions');\nconst parseCustomTransformOptions = require('./parseCustomTransformOptions');\nconst nullthrows = require('nullthrows');\nconst path = require('path');\nconst url = require('url');\n\nconst getBoolean = (query, opt, defaultValue) =>\n  query[opt] == null ? defaultValue : query[opt] === 'true' || query[opt] === '1';\n\nconst getNumber = (query, opt, defaultValue) => {\n  const number = parseInt(query[opt], 10);\n  return Number.isNaN(number) ? defaultValue : number;\n};\n\nconst getBundleType = (bundleType) => (bundleType === 'map' ? bundleType : 'bundle');\n\nconst getTransformProfile = (transformProfile) =>\n  transformProfile === 'hermes-stable' || transformProfile === 'hermes-canary' ? transformProfile : 'default';\n\nmodule.exports = function parseOptionsFromUrl(requestUrl, platforms, bytecodeVersion) {\n  const parsedURL = nullthrows(url.parse(requestUrl, true)); // `true` to parse the query param as an object.\n  const query = nullthrows(parsedURL.query);\n  const pathname = query.bundleEntry || (parsedURL.pathname != null ? decodeURIComponent(parsedURL.pathname) : '');\n  const platform = query.platform || parsePlatformFilePath(pathname, platforms).platform;\n  const bundleType = getBundleType(path.extname(pathname).substr(1));\n  const runtimeBytecodeVersion = getNumber(query, 'runtimeBytecodeVersion', null);\n\n  return {\n    bundleType,\n    runtimeBytecodeVersion: bytecodeVersion === runtimeBytecodeVersion ? bytecodeVersion : null,\n    customResolverOptions: parseCustomResolverOptions(parsedURL),\n    customTransformOptions: parseCustomTransformOptions(parsedURL),\n    dev: getBoolean(query, 'dev', true),\n    entryFile: pathname.replace(/^(?:\\.?\\/)?/, './').replace(/\\.[^/.]+$/, ''),\n    excludeSource: getBoolean(query, 'excludeSource', false),\n    hot: true,\n    inlineSourceMap: getBoolean(query, 'inlineSourceMap', false),\n    minify: getBoolean(query, 'minify', false),\n    modulesOnly: getBoolean(query, 'modulesOnly', false),\n    onProgress: null,\n    platform,\n    runModule: getBoolean(query, 'runModule', true),\n    shallow: getBoolean(query, 'shallow', false),\n    sourceMapUrl: url.format({\n      ...parsedURL,\n      // The Chrome Debugger loads bundles via Blob urls, whose\n      // protocol is blob:http. This breaks loading source maps through\n      // protocol-relative URLs, which is why we must force the HTTP protocol\n      // when loading the bundle for either Android or iOS.\n      protocol: platform != null && platform.match(/^(android|ios)$/) ? 'http' : '',\n      pathname: pathname.replace(/\\.(bundle|delta)$/, '.map'),\n    }),\n    sourceUrl: requestUrl,\n    unstable_transformProfile: getTransformProfile(query.unstable_transformProfile),\n  };\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/relativizeSourceMap.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst path = require('path');\n\nfunction relativizeSourceMapInline(sourceMap, sourcesRoot) {\n  // eslint-disable-next-line lint/strictly-null\n  if (sourceMap.mappings === undefined) {\n    for (let i = 0; i < sourceMap.sections.length; i++) {\n      relativizeSourceMapInline(sourceMap.sections[i].map, sourcesRoot);\n    }\n  } else {\n    for (let i = 0; i < sourceMap.sources.length; i++) {\n      sourceMap.sources[i] = path.relative(sourcesRoot, sourceMap.sources[i]);\n    }\n  }\n}\n\nmodule.exports = relativizeSourceMapInline;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/reporting.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst chalk = require('chalk');\nconst stripAnsi = require('strip-ansi');\nconst util = require('util');\n\n/**\n * A tagged union of all the actions that may happen and we may want to\n * report to the tool user.\n */\n\n/**\n * Code across the application takes a reporter as an option and calls the\n * update whenever one of the ReportableEvent happens. Code does not directly\n * write to the standard output, because a build would be:\n *\n *   1. ad-hoc, embedded into another tool, in which case we do not want to\n *   pollute that tool's own output. The tool is free to present the\n *   warnings/progress we generate any way they want, by specifing a custom\n *   reporter.\n *   2. run as a background process from another tool, in which case we want\n *   to expose updates in a way that is easily machine-readable, for example\n *   a JSON-stream. We don't want to pollute it with textual messages.\n *\n * We centralize terminal reporting into a single place because we want the\n * output to be robust and consistent. The most common reporter is\n * TerminalReporter, that should be the only place in the application should\n * access the `terminal` module (nor the `console`).\n */\n\n/**\n * A standard way to log a warning to the terminal. This should not be called\n * from some arbitrary Metro logic, only from the reporters. Instead of\n * calling this, add a new type of ReportableEvent instead, and implement a\n * proper handler in the reporter(s).\n */\nfunction logWarning(terminal, format, ...args) {\n  const str = util.format(format, ...args);\n  terminal.log('%s: %s', chalk.yellow('warning'), str);\n}\n\n/**\n * Similar to `logWarning`, but for messages that require the user to act.\n */\nfunction logError(terminal, format, ...args) {\n  terminal.log(\n    '%s: %s',\n    chalk.red('error'),\n    // Syntax errors may have colors applied for displaying code frames\n    // in various places outside of where Metro is currently running.\n    // If the current terminal does not support color, we'll strip the colors\n    // here.\n    util.format(chalk.supportsColor ? format : stripAnsi(format), ...args)\n  );\n}\n\n/**\n * A reporter that does nothing. Errors and warnings will be swallowed, that\n * is generally not what you want.\n */\nconst nullReporter = { update() {} };\n\nmodule.exports = {\n  logWarning,\n  logError,\n  nullReporter,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/splitBundleOptions.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\n/**\n * Splits a BundleOptions object into smaller, more manageable parts.\n */\nfunction splitBundleOptions(options) {\n  return {\n    entryFile: options.entryFile,\n    resolverOptions: {\n      customResolverOptions: options.customResolverOptions,\n    },\n    transformOptions: {\n      customTransformOptions: options.customTransformOptions,\n      dev: options.dev,\n      hot: options.hot,\n      minify: options.minify,\n      platform: options.platform,\n      runtimeBytecodeVersion: options.runtimeBytecodeVersion,\n      type: 'module',\n      unstable_transformProfile: options.unstable_transformProfile,\n    },\n    serializerOptions: {\n      excludeSource: options.excludeSource,\n      inlineSourceMap: options.inlineSourceMap,\n      modulesOnly: options.modulesOnly,\n      runModule: options.runModule,\n      sourceMapUrl: options.sourceMapUrl,\n      sourceUrl: options.sourceUrl,\n    },\n    graphOptions: {\n      shallow: options.shallow,\n    },\n    onProgress: options.onProgress,\n  };\n}\n\nmodule.exports = splitBundleOptions;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/lib/transformHelpers.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nimport { getContextModuleTemplate } from './contextModuleTemplates';\n\nconst path = require('path');\n\nconst baseIgnoredInlineRequires = ['React', 'react', 'react-native'];\n\nasync function calcTransformerOptions(entryFiles, bundler, deltaBundler, config, options, resolverOptions) {\n  const baseOptions = {\n    customTransformOptions: options.customTransformOptions,\n    dev: options.dev,\n    hot: options.hot,\n    inlineRequires: false,\n    inlinePlatform: true,\n    minify: options.minify,\n    platform: options.platform,\n    runtimeBytecodeVersion: options.runtimeBytecodeVersion,\n    unstable_transformProfile: options.unstable_transformProfile,\n  };\n\n  // When we're processing scripts, we don't need to calculate any\n  // inlineRequires information, since scripts by definition don't have\n  // requires().\n  if (options.type === 'script') {\n    return {\n      ...baseOptions,\n      type: 'script',\n    };\n  }\n\n  const getDependencies = async (path) => {\n    const dependencies = await deltaBundler.getDependencies([path], {\n      resolve: await getResolveDependencyFn(bundler, options.platform, resolverOptions),\n      transform: await getTransformFn(\n        [path],\n        bundler,\n        deltaBundler,\n        config,\n        {\n          ...options,\n          minify: false,\n        },\n        resolverOptions\n      ),\n      transformOptions: options,\n      onProgress: null,\n      experimentalImportBundleSupport: config.transformer.experimentalImportBundleSupport,\n      unstable_allowRequireContext: config.transformer.unstable_allowRequireContext,\n      shallow: false,\n    });\n\n    return Array.from(dependencies.keys());\n  };\n\n  const { transform } = await config.transformer.getTransformOptions(\n    entryFiles,\n    { dev: options.dev, hot: options.hot, platform: options.platform },\n    getDependencies\n  );\n\n  return {\n    ...baseOptions,\n    inlineRequires: transform.inlineRequires || false,\n    experimentalImportSupport: transform.experimentalImportSupport || false,\n    unstable_disableES6Transforms: transform.unstable_disableES6Transforms || false,\n    nonInlinedRequires: transform.nonInlinedRequires || baseIgnoredInlineRequires,\n    type: 'module',\n  };\n}\n\nfunction removeInlineRequiresBlockListFromOptions(path, inlineRequires) {\n  if (typeof inlineRequires === 'object') {\n    return !(path in inlineRequires.blockList);\n  }\n\n  return inlineRequires;\n}\n\nasync function getTransformFn(entryFiles, bundler, deltaBundler, config, options, resolverOptions) {\n  const { inlineRequires, ...transformOptions } = await calcTransformerOptions(\n    entryFiles,\n    bundler,\n    deltaBundler,\n    config,\n    options,\n    resolverOptions\n  );\n\n  return async (modulePath, requireContext) => {\n    let templateBuffer;\n\n    if (requireContext) {\n      const graph = await bundler.getDependencyGraph();\n\n      // TODO: Check delta changes to avoid having to look over all files each time\n      // this is a massive performance boost.\n\n      // Search against all files, this is very expensive.\n      // TODO: Maybe we could let the user specify which root to check against.\n      const files = graph.matchFilesWithContext(requireContext.from, {\n        filter: requireContext.filter,\n        recursive: requireContext.recursive,\n      });\n\n      const template = getContextModuleTemplate(requireContext.mode, requireContext.from, files);\n\n      templateBuffer = Buffer.from(template);\n    }\n\n    return await bundler.transformFile(\n      modulePath,\n      {\n        ...transformOptions,\n        type: getType(transformOptions.type, modulePath, config.resolver.assetExts),\n        inlineRequires: removeInlineRequiresBlockListFromOptions(modulePath, inlineRequires),\n      },\n      templateBuffer\n    );\n  };\n}\n\nfunction getType(type, filePath, assetExts) {\n  if (type === 'script') {\n    return type;\n  }\n\n  if (assetExts.indexOf(path.extname(filePath).slice(1)) !== -1) {\n    return 'asset';\n  }\n\n  return 'module';\n}\n\nasync function getResolveDependencyFn(bundler, platform, resolverOptions) {\n  const dependencyGraph = await await bundler.getDependencyGraph();\n\n  return (from, to) => dependencyGraph.resolveDependency(from, to, platform ?? null, resolverOptions);\n}\n\nmodule.exports = {\n  getTransformFn,\n  getResolveDependencyFn,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/node-haste/DependencyGraph/ModuleResolution.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst { codeFrameColumns } = require('@babel/code-frame');\nconst fs = require('fs');\nconst invariant = require('invariant');\nconst Resolver = require('metro-resolver');\nconst path = require('path');\nconst util = require('util');\n\nclass ModuleResolver {\n  _options;\n  // A module representing the project root, used as the origin when resolving `emptyModulePath`.\n  _projectRootFakeModule;\n  // An empty module, the result of resolving `emptyModulePath` from the project root.\n  _cachedEmptyModule;\n\n  // $FlowFixMe[missing-local-annot]\n  constructor(options) {\n    this._options = options;\n    const { projectRoot, moduleCache } = this._options;\n    this._projectRootFakeModule = {\n      path: path.join(projectRoot, '_'),\n      getPackage: () => moduleCache.getPackageOf(this._projectRootFakeModule.path),\n      isHaste() {\n        throw new Error('not implemented');\n      },\n      getName() {\n        throw new Error('not implemented');\n      },\n    };\n  }\n\n  _getEmptyModule() {\n    let emptyModule = this._cachedEmptyModule;\n    if (!emptyModule) {\n      emptyModule = this.resolveDependency(\n        this._projectRootFakeModule,\n        this._options.emptyModulePath,\n        false,\n        null,\n        /* resolverOptions */ {}\n      );\n      this._cachedEmptyModule = emptyModule;\n    }\n    return emptyModule;\n  }\n\n  _redirectRequire(fromModule, modulePath) {\n    const moduleCache = this._options.moduleCache;\n    try {\n      if (modulePath.startsWith('.')) {\n        const fromPackage = fromModule.getPackage();\n\n        if (fromPackage) {\n          // We need to convert the module path from module-relative to\n          // package-relative, so that we can easily match it against the\n          // \"browser\" map (where all paths are relative to the package root)\n          const fromPackagePath =\n            './' +\n            path.relative(path.dirname(fromPackage.path), path.resolve(path.dirname(fromModule.path), modulePath));\n\n          let redirectedPath = fromPackage.redirectRequire(fromPackagePath, this._options.mainFields);\n\n          // Since the redirected path is still relative to the package root,\n          // we have to transform it back to be module-relative (as it\n          // originally was)\n          if (redirectedPath !== false) {\n            redirectedPath =\n              './' +\n              path.relative(\n                path.dirname(fromModule.path),\n                path.resolve(path.dirname(fromPackage.path), redirectedPath)\n              );\n          }\n\n          return redirectedPath;\n        }\n      } else {\n        const pck = path.isAbsolute(modulePath) ? moduleCache.getPackageOf(modulePath) : fromModule.getPackage();\n\n        if (pck) {\n          return pck.redirectRequire(modulePath, this._options.mainFields);\n        }\n      }\n    } catch (err) {\n      // Do nothing. The standard module cache does not trigger any error, but\n      // the ModuleGraph one does, if the module does not exist.\n    }\n\n    return modulePath;\n  }\n\n  resolveDependency(fromModule, moduleName, allowHaste, platform, resolverOptions) {\n    try {\n      const result = Resolver.resolve(\n        {\n          ...this._options,\n          customResolverOptions: resolverOptions.customResolverOptions ?? {},\n          originModulePath: fromModule.path,\n          redirectModulePath: (modulePath) => this._redirectRequire(fromModule, modulePath),\n          allowHaste,\n          platform,\n          resolveHasteModule: (name) => this._options.moduleMap.getModule(name, platform, true),\n          resolveHastePackage: (name) => this._options.moduleMap.getPackage(name, platform, true),\n          getPackageMainPath: this._getPackageMainPath,\n        },\n        moduleName,\n        platform\n      );\n      return this._getFileResolvedModule(result);\n    } catch (error) {\n      if (error instanceof Resolver.FailedToResolvePathError) {\n        const { candidates } = error;\n        throw new UnableToResolveError(\n          fromModule.path,\n          moduleName,\n          [\n            '\\n\\nNone of these files exist:',\n            `  * ${Resolver.formatFileCandidates(this._removeRoot(candidates.file))}`,\n            `  * ${Resolver.formatFileCandidates(this._removeRoot(candidates.dir))}`,\n          ].join('\\n'),\n          {\n            cause: error,\n          }\n        );\n      }\n      if (error instanceof Resolver.FailedToResolveNameError) {\n        const dirPaths = error.dirPaths;\n        const extraPaths = error.extraPaths;\n        const displayDirPaths = dirPaths\n          .filter((dirPath) => this._options.dirExists(dirPath))\n          .map((dirPath) => path.relative(this._options.projectRoot, dirPath))\n          .concat(extraPaths);\n\n        const hint = displayDirPaths.length ? ' or in these directories:' : '';\n\n        throw new UnableToResolveError(\n          fromModule.path,\n          moduleName,\n          [\n            `${moduleName} could not be found within the project${hint || '.'}`,\n            ...displayDirPaths.map((dirPath) => `  ${dirPath}`),\n          ].join('\\n'),\n          {\n            cause: error,\n          }\n        );\n      }\n      throw error;\n    }\n  }\n\n  _getPackageMainPath = (packageJsonPath) => {\n    const package_ = this._options.moduleCache.getPackage(packageJsonPath);\n    return package_.getMain(this._options.mainFields);\n  };\n\n  /**\n   * FIXME: get rid of this function and of the reliance on `TModule`\n   * altogether, return strongly typed resolutions at the top-level instead.\n   */\n  _getFileResolvedModule(resolution) {\n    switch (resolution.type) {\n      case 'sourceFile':\n        return this._options.moduleCache.getModule(resolution.filePath);\n      case 'assetFiles':\n        // FIXME: we should forward ALL the paths/metadata,\n        // not just an arbitrary item!\n        const arbitrary = getArrayLowestItem(resolution.filePaths);\n        invariant(arbitrary != null, 'invalid asset resolution');\n        return this._options.moduleCache.getModule(arbitrary);\n      case 'empty':\n        // $FlowFixMe[incompatible-return]\n        return this._getEmptyModule();\n      default:\n        resolution.type;\n        throw new Error('invalid type');\n    }\n  }\n\n  _removeRoot(candidates) {\n    if (candidates.filePathPrefix) {\n      candidates.filePathPrefix = path.relative(this._options.projectRoot, candidates.filePathPrefix);\n    }\n    return candidates;\n  }\n}\n\nfunction getArrayLowestItem(a) {\n  if (a.length === 0) {\n    return undefined;\n  }\n  let lowest = a[0];\n  for (let i = 1; i < a.length; ++i) {\n    if (a[i] < lowest) {\n      lowest = a[i];\n    }\n  }\n  return lowest;\n}\n\nclass UnableToResolveError extends Error {\n  /**\n   * File path of the module that tried to require a module, ex. `/js/foo.js`.\n   */\n  originModulePath;\n  /**\n   * The name of the module that was required, no necessarily a path,\n   * ex. `./bar`, or `invariant`.\n   */\n  targetModuleName;\n  /**\n   * Original error that causes this error\n   */\n  cause;\n\n  constructor(originModulePath, targetModuleName, message, options) {\n    super();\n    this.originModulePath = originModulePath;\n    this.targetModuleName = targetModuleName;\n    const codeFrameMessage = this.buildCodeFrameMessage();\n    this.message =\n      util.format('Unable to resolve module %s from %s: %s', targetModuleName, originModulePath, message) +\n      (codeFrameMessage ? '\\n' + codeFrameMessage : '');\n\n    this.cause = options?.cause;\n  }\n\n  buildCodeFrameMessage() {\n    let file;\n    try {\n      file = fs.readFileSync(this.originModulePath, 'utf8');\n    } catch (error) {\n      if (error.code === 'ENOENT' || error.code === 'EISDIR') {\n        // We're probably dealing with a virtualised file system where\n        // `this.originModulePath` doesn't actually exist on disk.\n        // We can't show a code frame, but there's no need to let this I/O\n        // error shadow the original module resolution error.\n        return null;\n      }\n      throw error;\n    }\n\n    const lines = file.split('\\n');\n    let lineNumber = 0;\n    let column = -1;\n    for (let line = 0; line < lines.length; line++) {\n      const columnLocation = lines[line].lastIndexOf(this.targetModuleName);\n      if (columnLocation >= 0) {\n        lineNumber = line;\n        column = columnLocation;\n        break;\n      }\n    }\n\n    return codeFrameColumns(\n      fs.readFileSync(this.originModulePath, 'utf8'),\n      {\n        start: { column: column + 1, line: lineNumber + 1 },\n      },\n      { forceColor: process.env.NODE_ENV !== 'test' }\n    );\n  }\n}\n\nmodule.exports = {\n  ModuleResolver,\n  UnableToResolveError,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/node-haste/DependencyGraph/createHasteMap.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\nimport MetroFileMap, { DiskCacheManager } from 'metro-file-map';\n\nconst ci = require('ci-info');\nconst path = require('path');\n\nfunction getIgnorePattern(config) {\n  // For now we support both options\n  const { blockList, blacklistRE } = config.resolver;\n  const ignorePattern = blacklistRE || blockList;\n\n  // If neither option has been set, use default pattern\n  if (!ignorePattern) {\n    return / ^/;\n  }\n\n  const combine = (regexes) =>\n    new RegExp(regexes.map((regex) => '(' + regex.source.replace(/\\//g, path.sep) + ')').join('|'));\n\n  // If ignorePattern is an array, merge it into one\n  if (Array.isArray(ignorePattern)) {\n    return combine(ignorePattern);\n  }\n\n  return ignorePattern;\n}\n\nfunction createHasteMap(config, options) {\n  const dependencyExtractor = options?.extractDependencies === false ? null : config.resolver.dependencyExtractor;\n  const computeDependencies = dependencyExtractor != null;\n\n  return MetroFileMap.create({\n    cacheManagerFactory:\n      config?.unstable_fileMapCacheManagerFactory ??\n      ((buildParameters) =>\n        new DiskCacheManager({\n          buildParameters,\n          cacheDirectory: config.fileMapCacheDirectory ?? config.hasteMapCacheDirectory,\n          cacheFilePrefix: options?.cacheFilePrefix,\n        })),\n    perfLogger: config.unstable_perfLogger?.subSpan('hasteMap') ?? null,\n    computeDependencies,\n    computeSha1: true,\n    dependencyExtractor: config.resolver.dependencyExtractor,\n    extensions: Array.from(\n      new Set([...config.resolver.sourceExts, ...config.resolver.assetExts, ...config.watcher.additionalExts])\n    ),\n    forceNodeFilesystemAPI: !config.resolver.useWatchman,\n    hasteImplModulePath: config.resolver.hasteImplModulePath,\n    ignorePattern: getIgnorePattern(config),\n    maxWorkers: config.maxWorkers,\n    mocksPattern: '',\n    platforms: config.resolver.platforms,\n    retainAllFiles: true,\n    resetCache: config.resetCache,\n    rootDir: config.projectRoot,\n    roots: config.watchFolders,\n    throwOnModuleCollision: options?.throwOnModuleCollision ?? true,\n    useWatchman: config.resolver.useWatchman,\n    watch: options?.watch == null ? !ci.isCI : options.watch,\n    watchmanDeferStates: config.watcher.watchman.deferStates,\n  });\n}\n\nmodule.exports = createHasteMap;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/node-haste/DependencyGraph.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\nimport { ModuleMap as MetroFileMapModuleMap } from 'metro-file-map';\n\n// MARK: - GRANITE\nconst canonicalize = require('../../../metro-core/src/canonicalize');\nconst createHasteMap = require('./DependencyGraph/createHasteMap');\nconst { ModuleResolver } = require('./DependencyGraph/ModuleResolution');\nconst ModuleCache = require('./ModuleCache');\nconst { EventEmitter } = require('events');\nconst fs = require('fs');\n// MARK: - GRANITE\nconst {\n  AmbiguousModuleResolutionError,\n  Logger: { createActionStartEntry, createActionEndEntry, log },\n  PackageResolutionError,\n} = require('../../../metro-core/src');\nconst { InvalidPackageError } = require('metro-resolver');\nconst nullthrows = require('nullthrows');\nconst path = require('path');\nconst isPnP = require('../isPnP');\n\n// MARK: - GRANITE\nlet pnpapi;\n\nif (isPnP()) {\n  pnpapi = require('pnpapi');\n}\n\nconst { DuplicateHasteCandidatesError } = MetroFileMapModuleMap;\n\nconst NULL_PLATFORM = Symbol();\n\nfunction getOrCreateMap(map, field) {\n  let subMap = map.get(field);\n  if (!subMap) {\n    subMap = new Map();\n    map.set(field, subMap);\n  }\n  return subMap;\n}\n\nclass DependencyGraph extends EventEmitter {\n  _assetExtensions;\n  _config;\n  _haste;\n  _hasteFS;\n  _moduleCache;\n  _moduleMap;\n  _moduleResolver;\n  _resolutionCache;\n  _readyPromise;\n\n  constructor(config, options) {\n    super();\n\n    this._config = config;\n    this._assetExtensions = new Set(config.resolver.assetExts.map((asset) => '.' + asset));\n\n    const { hasReducedPerformance, watch } = options ?? {};\n    const initializingMetroLogEntry = log(createActionStartEntry('Initializing Metro'));\n\n    config.reporter.update({\n      type: 'dep_graph_loading',\n      hasReducedPerformance: !!hasReducedPerformance,\n    });\n    const haste = createHasteMap(config, { watch });\n\n    // We can have a lot of graphs listening to Haste for changes.\n    // Bump this up to silence the max listeners EventEmitter warning.\n    haste.setMaxListeners(1000);\n\n    this._haste = haste;\n\n    this._readyPromise = haste.build().then(({ hasteFS, moduleMap }) => {\n      log(createActionEndEntry(initializingMetroLogEntry));\n      config.reporter.update({ type: 'dep_graph_loaded' });\n\n      this._hasteFS = hasteFS;\n      this._moduleMap = moduleMap;\n\n      // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n      this._haste.on('change', this._onHasteChange.bind(this));\n      this._resolutionCache = new Map();\n      this._moduleCache = this._createModuleCache();\n      this._createModuleResolver();\n    });\n  }\n\n  // Waits for the dependency graph to become ready after initialisation.\n  // Don't read anything from the graph until this resolves.\n  async ready() {\n    await this._readyPromise;\n  }\n\n  // Creates the dependency graph and waits for it to become ready.\n  // @deprecated Use the constructor + ready() directly.\n  static async load(config, options) {\n    const self = new DependencyGraph(config, options);\n    await self.ready();\n    return self;\n  }\n\n  _getClosestPackage(filePath) {\n    const parsedPath = path.parse(filePath);\n    const root = parsedPath.root;\n    let dir = parsedPath.dir;\n    do {\n      const candidate = path.join(dir, 'package.json');\n      if (this._hasteFS.exists(candidate)) {\n        return candidate;\n      }\n      dir = path.dirname(dir);\n    } while (dir !== '.' && dir !== root);\n    return null;\n  }\n\n  /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n   * LTI update could not be added via codemod */\n  _onHasteChange({ eventsQueue, hasteFS, moduleMap }) {\n    this._hasteFS = hasteFS;\n    this._resolutionCache = new Map();\n    this._moduleMap = moduleMap;\n    eventsQueue.forEach(({ type, filePath }) => this._moduleCache.processFileChange(type, filePath));\n    this._createModuleResolver();\n    this.emit('change');\n  }\n\n  _createModuleResolver() {\n    this._moduleResolver = new ModuleResolver({\n      dirExists: (filePath) => {\n        try {\n          return fs.lstatSync(filePath).isDirectory();\n        } catch (e) {}\n        return false;\n      },\n      disableHierarchicalLookup: this._config.resolver.disableHierarchicalLookup,\n      doesFileExist: this._doesFileExist,\n      emptyModulePath: this._config.resolver.emptyModulePath,\n      extraNodeModules: this._config.resolver.extraNodeModules,\n      isAssetFile: (file) => this._assetExtensions.has(path.extname(file)),\n      mainFields: this._config.resolver.resolverMainFields,\n      moduleCache: this._moduleCache,\n      moduleMap: this._moduleMap,\n      nodeModulesPaths: this._config.resolver.nodeModulesPaths,\n      preferNativePlatform: true,\n      projectRoot: this._config.projectRoot,\n      resolveAsset: (dirPath, assetName, extension) => {\n        const basePath = dirPath + path.sep + assetName;\n        const assets = [\n          basePath + extension,\n          ...this._config.resolver.assetResolutions.map((resolution) => basePath + '@' + resolution + 'x' + extension),\n        ].filter((candidate) => this._hasteFS.exists(candidate));\n        return assets.length ? assets : null;\n      },\n      resolveRequest: this._config.resolver.resolveRequest,\n      sourceExts: this._config.resolver.sourceExts,\n    });\n  }\n\n  _createModuleCache() {\n    return new ModuleCache({\n      // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n      getClosestPackage: this._getClosestPackage.bind(this),\n    });\n  }\n\n  getSha1(filename) {\n    // TODO If it looks like we're trying to get the sha1 from a file located\n    // within a Zip archive, then we instead compute the sha1 for what looks\n    // like the Zip archive itself.\n\n    const splitIndex = filename.indexOf('.zip/');\n    const containerName = splitIndex !== -1 ? filename.slice(0, splitIndex + 4) : filename;\n\n    // TODO Calling realpath allows us to get a hash for a given path even when\n    // it's a symlink to a file, which prevents Metro from crashing in such a\n    // case. However, it doesn't allow Metro to track changes to the target file\n    // of the symlink. We should fix this by implementing a symlink map into\n    // Metro (or maybe by implementing those \"extra transformation sources\" we've\n    // been talking about for stuff like CSS or WASM).\n\n    // MARK: - GRANITE\n    const realpath = fs.realpathSync(containerName);\n    const resolvedPath = (pnpapi ? pnpapi.resolveVirtual(realpath) : realpath) ?? realpath;\n    const sha1 = this._hasteFS.getSha1(resolvedPath);\n\n    if (!sha1) {\n      throw new ReferenceError(\n        `SHA-1 for file ${filename} (${resolvedPath}) is not computed.\n         Potential causes:\n           1) You have symlinks in your project - watchman does not follow symlinks.\n           2) Check \\`blockList\\` in your metro.config.js and make sure it isn't excluding the file path.`\n      );\n    }\n\n    return sha1;\n  }\n\n  getWatcher() {\n    return this._haste;\n  }\n\n  end() {\n    this._haste.end();\n  }\n\n  /** Given a search context, return a list of file paths matching the query. */\n  matchFilesWithContext(from, context) {\n    return this._hasteFS.matchFilesWithContext(from, context);\n  }\n\n  resolveDependency(\n    from,\n    to,\n    platform,\n    resolverOptions,\n\n    // TODO: Fold assumeFlatNodeModules into resolverOptions and add to graphId\n    { assumeFlatNodeModules } = {\n      assumeFlatNodeModules: false,\n    }\n  ) {\n    const isSensitiveToOriginFolder =\n      // Resolution is always relative to the origin folder unless we assume a flat node_modules\n      !assumeFlatNodeModules ||\n      // Path requests are resolved relative to the origin folder\n      to.includes('/') ||\n      to === '.' ||\n      to === '..' ||\n      // Preserve standard assumptions under node_modules\n      from.includes(path.sep + 'node_modules' + path.sep);\n\n    // Compound key for the resolver cache\n    const resolverOptionsKey = JSON.stringify(resolverOptions.customResolverOptions ?? {}, canonicalize) ?? '';\n    const originKey = isSensitiveToOriginFolder ? path.dirname(from) : '';\n    const targetKey = to;\n    const platformKey = platform ?? NULL_PLATFORM;\n\n    // Traverse the resolver cache, which is a tree of maps\n    const mapByResolverOptions = this._resolutionCache;\n    const mapByOrigin = getOrCreateMap(mapByResolverOptions, resolverOptionsKey);\n    const mapByTarget = getOrCreateMap(mapByOrigin, originKey);\n    const mapByPlatform = getOrCreateMap(mapByTarget, targetKey);\n    let modulePath = mapByPlatform.get(platformKey);\n\n    if (!modulePath) {\n      try {\n        modulePath = this._moduleResolver.resolveDependency(\n          this._moduleCache.getModule(from),\n          to,\n          true,\n          platform,\n          resolverOptions\n        ).path;\n      } catch (error) {\n        if (error instanceof DuplicateHasteCandidatesError) {\n          throw new AmbiguousModuleResolutionError(from, error);\n        }\n        if (error instanceof InvalidPackageError) {\n          throw new PackageResolutionError({\n            packageError: error,\n            originModulePath: from,\n            targetModuleName: to,\n          });\n        }\n        throw error;\n      }\n    }\n\n    mapByPlatform.set(platformKey, modulePath);\n    return modulePath;\n  }\n\n  _doesFileExist = (filePath) => {\n    return this._hasteFS.exists(filePath);\n  };\n\n  getHasteName(filePath) {\n    const hasteName = this._hasteFS.getModuleName(filePath);\n\n    if (hasteName) {\n      return hasteName;\n    }\n\n    return path.relative(this._config.projectRoot, filePath);\n  }\n\n  getDependencies(filePath) {\n    return nullthrows(this._hasteFS.getDependencies(filePath));\n  }\n}\n\nmodule.exports = DependencyGraph;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/node-haste/Module.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst isAbsolutePath = require('absolute-path');\n\nclass Module {\n  path;\n\n  _moduleCache;\n  _sourceCode;\n\n  // $FlowFixMe[missing-local-annot]\n  constructor(file, moduleCache) {\n    if (!isAbsolutePath(file)) {\n      throw new Error('Expected file to be absolute path but got ' + file);\n    }\n\n    this.path = file;\n    this._moduleCache = moduleCache;\n  }\n\n  getPackage() {\n    return this._moduleCache.getPackageForModule(this);\n  }\n\n  invalidate() {}\n}\n\nmodule.exports = Module;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/node-haste/ModuleCache.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst Module = require('./Module');\nconst Package = require('./Package');\n\nclass ModuleCache {\n  _getClosestPackage;\n  _moduleCache;\n  _packageCache;\n  // Cache for \"closest package.json\" queries by module path.\n  _packagePathByModulePath;\n  // The inverse of _packagePathByModulePath.\n  _modulePathsByPackagePath;\n\n  constructor(options) {\n    this._getClosestPackage = options.getClosestPackage;\n    this._moduleCache = Object.create(null);\n    this._packageCache = Object.create(null);\n    this._packagePathByModulePath = Object.create(null);\n    this._modulePathsByPackagePath = Object.create(null);\n  }\n\n  getModule(filePath) {\n    if (!this._moduleCache[filePath]) {\n      this._moduleCache[filePath] = new Module(filePath, this);\n    }\n    return this._moduleCache[filePath];\n  }\n\n  getPackage(filePath) {\n    if (!this._packageCache[filePath]) {\n      this._packageCache[filePath] = new Package({\n        file: filePath,\n      });\n    }\n    return this._packageCache[filePath];\n  }\n\n  getPackageForModule(module) {\n    return this.getPackageOf(module.path);\n  }\n\n  getPackageOf(modulePath) {\n    let packagePath = this._packagePathByModulePath[modulePath];\n    if (packagePath && this._packageCache[packagePath]) {\n      return this._packageCache[packagePath];\n    }\n\n    packagePath = this._getClosestPackage(modulePath);\n    if (!packagePath) {\n      return null;\n    }\n\n    this._packagePathByModulePath[modulePath] = packagePath;\n    const modulePaths = this._modulePathsByPackagePath[packagePath] ?? new Set();\n    modulePaths.add(modulePath);\n    this._modulePathsByPackagePath[packagePath] = modulePaths;\n\n    return this.getPackage(packagePath);\n  }\n\n  processFileChange(type, filePath) {\n    if (this._moduleCache[filePath]) {\n      this._moduleCache[filePath].invalidate();\n      delete this._moduleCache[filePath];\n    }\n    if (this._packageCache[filePath]) {\n      this._packageCache[filePath].invalidate();\n      delete this._packageCache[filePath];\n    }\n    if (this._packagePathByModulePath[filePath]) {\n      // filePath is a module inside a package.\n      const packagePath = this._packagePathByModulePath[filePath];\n      delete this._packagePathByModulePath[filePath];\n      // This change doesn't invalidate any cached \"closest package.json\"\n      // queries for the package's other modules. Clean up only this module.\n      const modulePaths = this._modulePathsByPackagePath[packagePath];\n      if (modulePaths) {\n        modulePaths.delete(filePath);\n        if (modulePaths.size === 0) {\n          delete this._modulePathsByPackagePath[packagePath];\n        }\n      }\n    }\n    if (this._modulePathsByPackagePath[filePath]) {\n      // filePath is a package. This change invalidates all cached \"closest\n      // package.json\" queries for modules inside this package.\n      const modulePaths = this._modulePathsByPackagePath[filePath];\n      for (const modulePath of modulePaths) {\n        delete this._packagePathByModulePath[modulePath];\n      }\n      modulePaths.clear();\n      delete this._modulePathsByPackagePath[filePath];\n    }\n  }\n}\n\nmodule.exports = ModuleCache;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/node-haste/Package.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\nconst fs = require('fs');\nconst path = require('path');\n\nclass Package {\n  path;\n\n  _root;\n  _content;\n\n  constructor({ file }) {\n    this.path = path.resolve(file);\n    this._root = path.dirname(this.path);\n    this._content = null;\n  }\n\n  /**\n   * The `browser` field and replacement behavior is specified in\n   * https://github.com/defunctzombie/package-browser-field-spec.\n   */\n  getMain(mainFields) {\n    const json = this.read();\n\n    let main;\n\n    for (const name of mainFields) {\n      if (typeof json[name] === 'string') {\n        main = json[name];\n        break;\n      }\n    }\n\n    // flowlint-next-line sketchy-null-string:off\n    if (!main) {\n      main = 'index';\n    }\n\n    const replacements = getReplacements(json, mainFields);\n    if (replacements) {\n      const variants = [main];\n      if (main.slice(0, 2) === './') {\n        variants.push(main.slice(2));\n      } else {\n        variants.push('./' + main);\n      }\n\n      for (const variant of variants) {\n        const winner =\n          replacements[variant] ||\n          replacements[variant + '.js'] ||\n          replacements[variant + '.json'] ||\n          replacements[variant.replace(/(\\.js|\\.json)$/, '')];\n\n        if (winner) {\n          main = winner;\n          break;\n        }\n      }\n    }\n\n    return path.join(this._root, main);\n  }\n\n  invalidate() {\n    this._content = null;\n  }\n\n  redirectRequire(name, mainFields) {\n    const json = this.read();\n    const replacements = getReplacements(json, mainFields);\n\n    if (!replacements) {\n      return name;\n    }\n\n    if (!name.startsWith('.') && !path.isAbsolute(name)) {\n      const replacement = replacements[name];\n      // support exclude with \"someDependency\": false\n      return replacement === false ? false : replacement || name;\n    }\n\n    let relPath = './' + path.relative(this._root, path.resolve(this._root, name));\n\n    if (path.sep !== '/') {\n      relPath = relPath.replace(new RegExp('\\\\' + path.sep, 'g'), '/');\n    }\n\n    let redirect = replacements[relPath];\n\n    // false is a valid value\n    if (redirect == null) {\n      redirect = replacements[relPath + '.js'];\n      if (redirect == null) {\n        redirect = replacements[relPath + '.json'];\n      }\n    }\n\n    // support exclude with \"./someFile\": false\n    if (redirect === false) {\n      return false;\n    }\n\n    if (redirect) {\n      return path.join(this._root, redirect);\n    }\n\n    return name;\n  }\n\n  read() {\n    if (this._content == null) {\n      this._content = JSON.parse(fs.readFileSync(this.path, 'utf8'));\n    }\n    return this._content;\n  }\n}\n\nfunction getReplacements(pkg, mainFields) {\n  const replacements = mainFields\n    .map((name) => {\n      // If the field is a string, that doesn't mean we want to redirect the\n      //  `main` file itself to anything else. See the spec.\n      if (!pkg[name] || typeof pkg[name] === 'string') {\n        return null;\n      }\n\n      return pkg[name];\n    })\n    .filter(Boolean);\n\n  if (!replacements.length) {\n    return null;\n  }\n\n  return Object.assign({}, ...replacements.reverse());\n}\n\nmodule.exports = Package;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/node-haste/lib/AssetPaths.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\nconst parsePlatformFilePath = require('./parsePlatformFilePath');\nconst path = require('path');\n\nconst ASSET_BASE_NAME_RE = /(.+?)(@([\\d.]+)x)?$/;\n\nfunction parseBaseName(baseName) {\n  const match = baseName.match(ASSET_BASE_NAME_RE);\n  if (!match) {\n    throw new Error(`invalid asset name: \\`${baseName}'`);\n  }\n  const rootName = match[1];\n  if (match[3] != null) {\n    const resolution = parseFloat(match[3]);\n    if (!Number.isNaN(resolution)) {\n      return { rootName, resolution };\n    }\n  }\n  return { rootName, resolution: 1 };\n}\n\n/**\n * Return `null` if the `filePath` doesn't have a valid extension, required\n * to describe the type of an asset.\n */\nfunction tryParse(filePath, platforms) {\n  const result = parsePlatformFilePath(filePath, platforms);\n  const { dirPath, baseName, platform, extension } = result;\n  if (extension == null) {\n    return null;\n  }\n  const { rootName, resolution } = parseBaseName(baseName);\n  return {\n    assetName: path.join(dirPath, `${rootName}.${extension}`),\n    name: rootName,\n    platform,\n    resolution,\n    type: extension,\n  };\n}\n\nfunction parse(filePath, platforms) {\n  const result = tryParse(filePath, platforms);\n  if (result == null) {\n    throw new Error('invalid asset file path: `${filePath}');\n  }\n  return result;\n}\n\nmodule.exports = { parse, tryParse };\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/node-haste/lib/parsePlatformFilePath.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\nconst path = require('path');\n\nconst PATH_RE = /^(.+?)(\\.([^.]+))?\\.([^.]+)$/;\n\n/**\n * Extract the components of a file path that can have a platform specifier: Ex.\n * `index.ios.js` is specific to the `ios` platform and has the extension `js`.\n */\nfunction parsePlatformFilePath(filePath, platforms) {\n  const dirPath = path.dirname(filePath);\n  const fileName = path.basename(filePath);\n  const match = fileName.match(PATH_RE);\n  if (!match) {\n    return { dirPath, baseName: fileName, platform: null, extension: null };\n  }\n  const extension = match[4] || null;\n  const platform = match[3] || null;\n  if (platform == null || platforms.has(platform)) {\n    return { dirPath, baseName: match[1], platform, extension };\n  }\n  const baseName = `${match[1]}.${platform}`;\n  return { dirPath, baseName, platform: null, extension };\n}\n\nmodule.exports = parsePlatformFilePath;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/RamBundle/as-assets.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst relativizeSourceMapInline = require('../../../lib/relativizeSourceMap');\nconst writeFile = require('../writeFile');\nconst buildSourcemapWithMetadata = require('./buildSourcemapWithMetadata');\nconst MAGIC_RAM_BUNDLE_NUMBER = require('./magic-number');\nconst { joinModules } = require('./util');\nconst writeSourceMap = require('./write-sourcemap');\nconst fsPromises = require('fs').promises;\nconst path = require('path');\n// must not start with a dot, as that won't go into the apk\nconst MAGIC_RAM_BUNDLE_FILENAME = 'UNBUNDLE';\nconst MODULES_DIR = 'js-modules';\n\n/**\n * Saves all JS modules of an app as single files\n * The startup code (prelude, polyfills etc.) are written to the file\n * designated by the `bundleOuput` option.\n * All other modules go into a 'js-modules' folder that in the same parent\n * directory as the startup file.\n */\nfunction saveAsAssets(bundle, options, log) {\n  const { bundleOutput, bundleEncoding: encoding, sourcemapOutput, sourcemapSourcesRoot } = options;\n\n  log('start');\n  const { startupModules, lazyModules } = bundle;\n  log('finish');\n  const startupCode = joinModules(startupModules);\n\n  log('Writing bundle output to:', bundleOutput);\n  const modulesDir = path.join(path.dirname(bundleOutput), MODULES_DIR);\n  const writeUnbundle = createDir(modulesDir).then(\n    // create the modules directory first\n    () =>\n      Promise.all([\n        writeModules(lazyModules, modulesDir, encoding),\n        writeFile(bundleOutput, startupCode, encoding),\n        writeMagicFlagFile(modulesDir),\n      ])\n  );\n  writeUnbundle.then(() => log('Done writing unbundle output'));\n\n  if (sourcemapOutput) {\n    const sourceMap = buildSourcemapWithMetadata({\n      fixWrapperOffset: true,\n      lazyModules: lazyModules.concat(),\n      moduleGroups: null,\n      startupModules: startupModules.concat(),\n    });\n    if (sourcemapSourcesRoot !== undefined) {\n      relativizeSourceMapInline(sourceMap, sourcemapSourcesRoot);\n    }\n    const wroteSourceMap = writeSourceMap(sourcemapOutput, JSON.stringify(sourceMap), log);\n\n    return Promise.all([writeUnbundle, wroteSourceMap]);\n  } else {\n    return writeUnbundle;\n  }\n}\n\nfunction createDir(dirName) {\n  return fsPromises.mkdir(dirName, { recursive: true });\n}\n\nfunction writeModuleFile(module, modulesDir, encoding) {\n  const { code, id } = module;\n  return writeFile(path.join(modulesDir, id + '.js'), code, encoding);\n}\n\nfunction writeModules(modules, modulesDir, encoding) {\n  const writeFiles = modules.map((module) => writeModuleFile(module, modulesDir, encoding));\n  return Promise.all(writeFiles);\n}\n\nfunction writeMagicFlagFile(outputDir) {\n  const buffer = Buffer.alloc(4);\n  buffer.writeUInt32LE(MAGIC_RAM_BUNDLE_NUMBER, 0);\n  return writeFile(path.join(outputDir, MAGIC_RAM_BUNDLE_FILENAME), buffer);\n}\n\nmodule.exports = saveAsAssets;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/RamBundle/as-indexed-file.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst relativizeSourceMapInline = require('../../../lib/relativizeSourceMap');\nconst buildSourcemapWithMetadata = require('./buildSourcemapWithMetadata');\nconst MAGIC_UNBUNDLE_FILE_HEADER = require('./magic-number');\nconst { joinModules } = require('./util');\nconst writeSourceMap = require('./write-sourcemap');\nconst fs = require('fs');\n\nconst SIZEOF_UINT32 = 4;\n\n/**\n * Saves all JS modules of an app as a single file, separated with null bytes.\n * The file begins with an offset table that contains module ids and their\n * lengths/offsets.\n * The module id for the startup code (prelude, polyfills etc.) is the\n * empty string.\n */\nfunction saveAsIndexedFile(bundle, options, log) {\n  const { bundleOutput, bundleEncoding: encoding, sourcemapOutput, sourcemapSourcesRoot } = options;\n\n  log('start');\n  const { startupModules, lazyModules, groups } = bundle;\n  log('finish');\n\n  const moduleGroups = createModuleGroups(groups, lazyModules);\n  const startupCode = joinModules(startupModules);\n\n  log('Writing unbundle output to:', bundleOutput);\n  const writeUnbundle = writeBuffers(\n    fs.createWriteStream(bundleOutput),\n    buildTableAndContents(startupCode, lazyModules, moduleGroups, encoding)\n  ).then(() => log('Done writing unbundle output'));\n\n  if (sourcemapOutput) {\n    const sourceMap = buildSourcemapWithMetadata({\n      startupModules: startupModules.concat(),\n      lazyModules: lazyModules.concat(),\n      moduleGroups,\n      fixWrapperOffset: true,\n    });\n    if (sourcemapSourcesRoot !== undefined) {\n      relativizeSourceMapInline(sourceMap, sourcemapSourcesRoot);\n    }\n\n    const wroteSourceMap = writeSourceMap(sourcemapOutput, JSON.stringify(sourceMap), log);\n\n    return Promise.all([writeUnbundle, wroteSourceMap]);\n  } else {\n    return writeUnbundle;\n  }\n}\n\nconst fileHeader = Buffer.alloc(4);\nfileHeader.writeUInt32LE(MAGIC_UNBUNDLE_FILE_HEADER, 0);\nconst nullByteBuffer = Buffer.alloc(1).fill(0);\n\nfunction writeBuffers(stream, buffers) {\n  buffers.forEach((buffer) => stream.write(buffer));\n  return new Promise((resolve, reject) => {\n    stream.on('error', reject);\n    stream.on('finish', () => resolve());\n    stream.end();\n  });\n}\n\nfunction nullTerminatedBuffer(contents, encoding) {\n  return Buffer.concat([Buffer.from(contents, encoding), nullByteBuffer]);\n}\n\nfunction moduleToBuffer(id, code, encoding) {\n  return {\n    id,\n    buffer: nullTerminatedBuffer(code, encoding),\n  };\n}\n\nfunction entryOffset(n) {\n  // 2: num_entries + startup_code_len\n  // n * 2: each entry consists of two uint32s\n  return (2 + n * 2) * SIZEOF_UINT32;\n}\n\nfunction buildModuleTable(\n  startupCode,\n  moduleBuffers,\n\n  moduleGroups\n) {\n  // table format:\n  // - num_entries:      uint_32  number of entries\n  // - startup_code_len: uint_32  length of the startup section\n  // - entries:          entry...\n  //\n  // entry:\n  //  - module_offset:   uint_32  offset into the modules blob\n  //  - module_length:   uint_32  length of the module code in bytes\n\n  const moduleIds = [...moduleGroups.modulesById.keys()];\n  const maxId = moduleIds.reduce((max, id) => Math.max(max, id));\n  const numEntries = maxId + 1;\n  const table = Buffer.alloc(entryOffset(numEntries)).fill(0);\n\n  // num_entries\n  table.writeUInt32LE(numEntries, 0);\n\n  // startup_code_len\n  table.writeUInt32LE(startupCode.length, SIZEOF_UINT32);\n\n  // entries\n  let codeOffset = startupCode.length;\n  moduleBuffers.forEach(({ id, buffer }) => {\n    const group = moduleGroups.groups.get(id);\n    const idsInGroup = group ? [id].concat(Array.from(group)) : [id];\n\n    idsInGroup.forEach((moduleId) => {\n      const offset = entryOffset(moduleId);\n      // module_offset\n      table.writeUInt32LE(codeOffset, offset);\n      // module_length\n      table.writeUInt32LE(buffer.length, offset + SIZEOF_UINT32);\n    });\n    codeOffset += buffer.length;\n  });\n\n  return table;\n}\n\nfunction groupCode(rootCode, moduleGroup, modulesById) {\n  if (!moduleGroup || !moduleGroup.size) {\n    return rootCode;\n  }\n  const code = [rootCode];\n  for (const id of moduleGroup) {\n    code.push((modulesById.get(id) || { code: '' }).code);\n  }\n\n  return code.join('\\n');\n}\n\nfunction buildModuleBuffers(modules, moduleGroups, encoding) {\n  return modules\n    .filter((m) => !moduleGroups.modulesInGroups.has(m.id))\n    .map(({ id, code }) =>\n      moduleToBuffer(id, groupCode(code, moduleGroups.groups.get(id), moduleGroups.modulesById), encoding)\n    );\n}\n\nfunction buildTableAndContents(startupCode, modules, moduleGroups, encoding) {\n  // file contents layout:\n  // - magic number      char[4]  0xE5 0xD1 0x0B 0xFB (0xFB0BD1E5 uint32 LE)\n  // - offset table      table    see `buildModuleTables`\n  // - code blob         char[]   null-terminated code strings, starting with\n  //                              the startup code\n\n  const startupCodeBuffer = nullTerminatedBuffer(startupCode, encoding);\n  const moduleBuffers = buildModuleBuffers(modules, moduleGroups, encoding);\n  const table = buildModuleTable(startupCodeBuffer, moduleBuffers, moduleGroups);\n\n  return [fileHeader, table, startupCodeBuffer].concat(moduleBuffers.map(({ buffer }) => buffer));\n}\n\nfunction createModuleGroups(groups, modules) {\n  return {\n    groups,\n    modulesById: new Map(modules.map((m) => [m.id, m])),\n    modulesInGroups: new Set(concat(groups.values())),\n  };\n}\n\nfunction* concat(iterators) {\n  for (const it of iterators) {\n    yield* it;\n  }\n}\n\nexports.save = saveAsIndexedFile;\nexports.buildTableAndContents = buildTableAndContents;\nexports.createModuleGroups = createModuleGroups;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/RamBundle/buildSourcemapWithMetadata.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst { combineSourceMaps, combineSourceMapsAddingOffsets, joinModules } = require('./util');\n\nmodule.exports = ({ fixWrapperOffset, lazyModules, moduleGroups, startupModules }) => {\n  const options = fixWrapperOffset ? { fixWrapperOffset: true } : undefined;\n  const startupModule = {\n    code: joinModules(startupModules),\n    id: Number.MIN_SAFE_INTEGER,\n    map: combineSourceMaps(startupModules, undefined, options),\n    sourcePath: '',\n  };\n\n  // Add map of module id -> source to sourcemap\n  const module_paths = [];\n  startupModules.forEach((m) => {\n    module_paths[m.id] = m.sourcePath;\n  });\n  lazyModules.forEach((m) => {\n    module_paths[m.id] = m.sourcePath;\n  });\n\n  const map = combineSourceMapsAddingOffsets([startupModule].concat(lazyModules), module_paths, moduleGroups, options);\n  if (map.x_facebook_offsets != null) {\n    delete map.x_facebook_offsets[Number.MIN_SAFE_INTEGER];\n  }\n\n  return map;\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/RamBundle/magic-number.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\nmodule.exports = 0xfb0bd1e5;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/RamBundle/util.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nimport countLines from '../../../lib/countLines';\n\nconst invariant = require('invariant');\n\nfunction lineToLineSourceMap(source, filename = '') {\n  // The first line mapping in our package is the base64vlq code for zeros (A).\n  const firstLine = 'AAAA;';\n\n  // Most other lines in our mappings are all zeros (for module, column etc)\n  // except for the lineno mapping: curLineno - prevLineno = 1; Which is C.\n  const line = 'AACA;';\n\n  return {\n    file: filename,\n    mappings: firstLine + Array(countLines(source)).join(line),\n    sources: [filename],\n    names: [],\n    version: 3,\n  };\n}\n\nconst wrapperEnd = (wrappedCode) => wrappedCode.indexOf('{') + 1;\n\nconst Section = (line, column, map) => ({\n  map,\n  offset: { line, column },\n});\n\nfunction combineSourceMaps(modules, moduleGroups, options) {\n  const sections = combineMaps(modules, null, moduleGroups, options);\n  return { sections, version: 3 };\n}\n\nfunction combineSourceMapsAddingOffsets(modules, x_metro_module_paths, moduleGroups, options) {\n  const x_facebook_offsets = [];\n  const sections = combineMaps(modules, x_facebook_offsets, moduleGroups, options);\n  return { sections, version: 3, x_facebook_offsets, x_metro_module_paths };\n}\n\nfunction combineMaps(modules, offsets, moduleGroups, options) {\n  const sections = [];\n\n  let line = 0;\n  modules.forEach((moduleTransport) => {\n    const { code, id, name } = moduleTransport;\n    let column = 0;\n    let group;\n    let groupLines = 0;\n    let { map } = moduleTransport;\n\n    if (moduleGroups && moduleGroups.modulesInGroups.has(id)) {\n      // this is a module appended to another module\n      return;\n    }\n\n    if (offsets != null) {\n      group = moduleGroups && moduleGroups.groups.get(id);\n      if (group && moduleGroups) {\n        const { modulesById } = moduleGroups;\n        const otherModules = Array.from(group || [])\n          .map((moduleId) => modulesById.get(moduleId))\n          .filter(Boolean); // needed to appease flow\n        otherModules.forEach((m) => {\n          groupLines += countLines(m.code);\n        });\n        map = combineSourceMaps([moduleTransport].concat(otherModules));\n      }\n\n      column = options && options.fixWrapperOffset ? wrapperEnd(code) : 0;\n    }\n\n    invariant(!Array.isArray(map), 'Random Access Bundle source maps cannot be built from raw mappings');\n    sections.push(Section(line, column, map || lineToLineSourceMap(code, name)));\n    if (offsets != null && id != null) {\n      offsets[id] = line;\n      for (const moduleId of group || []) {\n        offsets[moduleId] = line;\n      }\n    }\n    line += countLines(code) + groupLines;\n  });\n\n  return sections;\n}\n\nconst joinModules = (modules) => modules.map((m) => m.code).join('\\n');\n\nmodule.exports = {\n  combineSourceMaps,\n  combineSourceMapsAddingOffsets,\n  countLines,\n  joinModules,\n  lineToLineSourceMap,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/RamBundle/write-sourcemap.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst writeFile = require('../writeFile');\n\nfunction writeSourcemap(fileName, contents, log) {\n  if (!fileName) {\n    return Promise.resolve();\n  }\n  log('Writing sourcemap output to:', fileName);\n  const writeMap = writeFile(fileName, contents, null);\n  writeMap.then(() => log('Done writing sourcemap output'));\n  return writeMap;\n}\n\nmodule.exports = writeSourcemap;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/RamBundle.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst Server = require('../../Server');\nconst asAssets = require('./RamBundle/as-assets');\nconst asIndexedFile = require('./RamBundle/as-indexed-file').save;\n\nasync function build(packagerClient, requestOptions) {\n  const options = {\n    ...Server.DEFAULT_BUNDLE_OPTIONS,\n    ...requestOptions,\n    bundleType: 'ram',\n  };\n  return await packagerClient.getRamBundleInfo(options);\n}\n\nfunction save(bundle, options, log) {\n  // We fork here depending on the platform: while Android is pretty good at\n  // loading individual assets, iOS has a large overhead when reading hundreds\n  // of assets from disk.\n  return options.platform === 'android' && !(options.indexedRamBundle === true)\n    ? asAssets(bundle, options, log)\n    : asIndexedFile(bundle, options, log);\n}\n\nexports.build = build;\nexports.save = save;\nexports.formatName = 'bundle';\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/bundle.flow.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst relativizeSourceMapInline = require('../../lib/relativizeSourceMap');\nconst Server = require('../../Server');\nconst writeFile = require('./writeFile');\n\nfunction buildBundle(packagerClient, requestOptions) {\n  return packagerClient.build({\n    ...Server.DEFAULT_BUNDLE_OPTIONS,\n    ...requestOptions,\n    bundleType: 'bundle',\n  });\n}\n\nfunction relativateSerializedMap(map, sourceMapSourcesRoot) {\n  const sourceMap = JSON.parse(map);\n  relativizeSourceMapInline(sourceMap, sourceMapSourcesRoot);\n  return JSON.stringify(sourceMap);\n}\n\nasync function saveBundleAndMap(\n  bundle,\n\n  options,\n  log\n) {\n  const { bundleOutput, bundleEncoding: encoding, sourcemapOutput, sourcemapSourcesRoot } = options;\n\n  const writeFns = [];\n\n  writeFns.push(async () => {\n    log('Writing bundle output to:', bundleOutput);\n    await writeFile(bundleOutput, bundle.code, encoding);\n    log('Done writing bundle output');\n  });\n\n  if (sourcemapOutput) {\n    let { map } = bundle;\n    if (sourcemapSourcesRoot !== undefined) {\n      log('start relativating source map');\n      map = relativateSerializedMap(map, sourcemapSourcesRoot);\n      log('finished relativating');\n    }\n\n    writeFns.push(async () => {\n      log('Writing sourcemap output to:', sourcemapOutput);\n      await writeFile(sourcemapOutput, map, null);\n      log('Done writing sourcemap output');\n    });\n  }\n\n  // Wait until everything is written to disk.\n  await Promise.all(writeFns.map((cb) => cb()));\n}\n\nexports.build = buildBundle;\nexports.save = saveBundleAndMap;\nexports.formatName = 'bundle';\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/bundle.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\n/*::\nexport type * from './bundle.flow';\n*/\n\ntry {\n  require('metro-babel-register').unstable_registerForMetroMonorepo();\n} catch {}\n\nmodule.exports = require('./bundle.flow');\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/meta.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\nconst crypto = require('crypto');\n\nconst isUTF8 = (encoding) => /^utf-?8$/i.test(encoding);\n\nconst constantFor = (encoding) =>\n  /^ascii$/i.test(encoding) ? 1 : isUTF8(encoding) ? 2 : /^(?:utf-?16(?:le)?|ucs-?2)$/.test(encoding) ? 3 : 0;\n\nmodule.exports = function (code, encoding = 'utf8') {\n  const buffer = asBuffer(code, encoding);\n  const hash = crypto.createHash('sha1');\n  hash.update(buffer);\n  const digest = hash.digest('buffer');\n  const signature = Buffer.alloc(digest.length + 1);\n  digest.copy(signature);\n  signature.writeUInt8(constantFor(tryAsciiPromotion(buffer, encoding)), signature.length - 1);\n  return signature;\n};\n\nfunction tryAsciiPromotion(buffer, encoding) {\n  if (!isUTF8(encoding)) {\n    return encoding;\n  }\n  for (let i = 0, n = buffer.length; i < n; i++) {\n    if (buffer[i] > 0x7f) {\n      return encoding;\n    }\n  }\n  return 'ascii';\n}\n\nfunction asBuffer(x, encoding) {\n  if (typeof x !== 'string') {\n    return x;\n  }\n  return Buffer.from(x, encoding);\n}\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/unbundle.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\n/* This is for retro-compatibility of React Native with older versions of\n * Metro. Use the `RamBundle` module directly. */\nmodule.exports = require('./RamBundle');\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/output/writeFile.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst denodeify = require('denodeify');\nconst fs = require('fs');\nconst throat = require('throat');\n\nconst writeFile = throat(128, denodeify(fs.writeFile));\n\nmodule.exports = writeFile;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro/src/shared/types.flow.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\n// Stricter representation of BundleOptions.\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-config/src/configTypes.flow.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n *       strict-local\n */\n\n'use strict';\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-config/src/defaults/defaults.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict\n * @format\n */\n\n'use strict';\n\n// MARK: - GRANITE\nconst defaultCreateModuleIdFactory = require('../../../metro/src/lib/createModuleIdFactory');\n\nexports.assetExts = [\n  // Image formats\n  'bmp',\n  'gif',\n  'jpg',\n  'jpeg',\n  'png',\n  'psd',\n  'svg',\n  'webp',\n  // Video formats\n  'm4v',\n  'mov',\n  'mp4',\n  'mpeg',\n  'mpg',\n  'webm',\n  // Audio formats\n  'aac',\n  'aiff',\n  'caf',\n  'm4a',\n  'mp3',\n  'wav',\n  // Document formats\n  'html',\n  'pdf',\n  'yaml',\n  'yml',\n  // Font formats\n  'otf',\n  'ttf',\n  // Archives (virtual files)\n  'zip',\n];\n\nexports.assetResolutions = ['1', '1.5', '2', '3', '4'];\n\nexports.sourceExts = ['js', 'jsx', 'json', 'ts', 'tsx'];\n\nexports.additionalExts = ['cjs', 'mjs'];\n\nexports.moduleSystem = require.resolve('metro-runtime/src/polyfills/require.js');\n\nexports.platforms = ['ios', 'android', 'windows', 'web'];\n\nexports.DEFAULT_METRO_MINIFIER_PATH = 'metro-minify-uglify';\n\nexports.defaultCreateModuleIdFactory = defaultCreateModuleIdFactory;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-config/src/defaults/exclusionList.d.ts",
    "content": "declare function exclusionList(additionalExclusions?: (RegExp | string)[]): RegExp;\n\nexport default exclusionList;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-config/src/defaults/exclusionList.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\n'use strict';\n\nvar path = require('path');\n\nvar list = [/\\/__tests__\\/.*/];\n\nfunction escapeRegExp(pattern) {\n  if (Object.prototype.toString.call(pattern) === '[object RegExp]') {\n    // the forward slash may or may not be escaped in regular expression depends\n    // on if it's in brackets. See this post for details\n    // https://github.com/nodejs/help/issues/3039. The or condition in string\n    // replace regexp is to cover both use cases.\n    // We should replace all forward slashes to proper OS specific separators.\n    // The separator needs to be escaped in the regular expression source string,\n    // hence the '\\\\' prefix.\n    return pattern.source.replace(/\\/|\\\\\\//g, '\\\\' + path.sep);\n  } else if (typeof pattern === 'string') {\n    // Make sure all the special characters used by regular expression are properly\n    // escaped. The string inputs are supposed to match as is.\n    var escaped = pattern.replace(/[\\-\\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n    // convert the '/' into an escaped local file separator. The separator needs\n    // to be escaped in the regular expression source string, hence the '\\\\' prefix.\n    return escaped.replace(/\\//g, '\\\\' + path.sep);\n  } else {\n    throw new Error('Unexpected exclusion pattern: ' + pattern);\n  }\n}\n\nfunction exclusionList(additionalExclusions) {\n  return new RegExp('(' + (additionalExclusions || []).concat(list).map(escapeRegExp).join('|') + ')$');\n}\n\nmodule.exports = exclusionList;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-config/src/defaults/index.d.ts",
    "content": "declare function getDefaultConfig(rootPath: string): any;\ndeclare function getDefaultValues(rootPath: string): any;\n\nexport default getDefaultConfig;\nexport { getDefaultValues };\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-config/src/defaults/index.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst {\n  DEFAULT_METRO_MINIFIER_PATH,\n  assetExts,\n  assetResolutions,\n  additionalExts,\n  defaultCreateModuleIdFactory,\n  platforms,\n  sourceExts,\n} = require('./defaults');\nconst exclusionList = require('./exclusionList');\nconst { FileStore } = require('metro-cache');\n// MARK: - GRANITE\nconst { Terminal } = require('../../../metro-core/src');\nconst getMaxWorkers = require('../../../metro/src/lib/getMaxWorkers');\nconst TerminalReporter = require('../../../metro/src/lib/TerminalReporter');\nconst os = require('os');\nconst path = require('path');\n\nconst getDefaultValues = (projectRoot) => ({\n  resolver: {\n    assetExts,\n    assetResolutions,\n    platforms,\n    sourceExts,\n    blockList: exclusionList(),\n    dependencyExtractor: undefined,\n    disableHierarchicalLookup: false,\n    emptyModulePath: require.resolve('metro-runtime/src/modules/empty-module.js'),\n    extraNodeModules: {},\n    hasteImplModulePath: undefined,\n    nodeModulesPaths: [],\n    resolveRequest: null,\n    resolverMainFields: ['browser', 'main'],\n    useWatchman: true,\n    requireCycleIgnorePatterns: [/(^|\\/|\\\\)node_modules($|\\/|\\\\)/],\n  },\n\n  serializer: {\n    polyfillModuleNames: [],\n    getRunModuleStatement: (moduleId) => `__r(${JSON.stringify(moduleId)});`,\n    getPolyfills: () => [],\n    postProcessBundleSourcemap: ({ code, map, outFileName }) => ({ code, map }),\n    getModulesRunBeforeMainModule: () => [],\n    processModuleFilter: (module) => true,\n    createModuleIdFactory: defaultCreateModuleIdFactory,\n    experimentalSerializerHook: () => {},\n    customSerializer: null,\n  },\n\n  server: {\n    useGlobalHotkey: true,\n    port: 8080,\n    enhanceMiddleware: (middleware) => middleware,\n    rewriteRequestUrl: (url) => url,\n    runInspectorProxy: true,\n    verifyConnections: false,\n    unstable_serverRoot: null,\n  },\n\n  symbolicator: {\n    customizeFrame: () => {},\n  },\n\n  transformer: {\n    assetPlugins: [],\n    asyncRequireModulePath: 'metro-runtime/src/modules/asyncRequire',\n    assetRegistryPath: 'missing-asset-registry-path',\n    babelTransformerPath: 'metro-babel-transformer',\n    dynamicDepsInPackages: 'throwAtRuntime',\n    enableBabelRCLookup: true,\n    enableBabelRuntime: true,\n    experimentalImportBundleSupport: false,\n    getTransformOptions: async () => ({\n      transform: {\n        experimentalImportSupport: false,\n        inlineRequires: false,\n        unstable_disableES6Transforms: false,\n      },\n      preloadedModules: false,\n      ramGroups: [],\n    }),\n    globalPrefix: '',\n    hermesParser: false,\n    minifierConfig: {\n      mangle: {\n        toplevel: false,\n      },\n      output: {\n        ascii_only: true,\n        quote_style: 3,\n        wrap_iife: true,\n      },\n      sourceMap: {\n        includeSources: false,\n      },\n      toplevel: false,\n      compress: {\n        // reduce_funcs inlines single-use functions, which cause perf regressions.\n        reduce_funcs: false,\n      },\n    },\n    minifierPath: DEFAULT_METRO_MINIFIER_PATH,\n    optimizationSizeLimit: 150 * 1024, // 150 KiB.\n    transformVariants: { default: {} },\n    workerPath: 'metro/src/DeltaBundler/Worker',\n    publicPath: '/assets',\n    allowOptionalDependencies: false,\n    unstable_allowRequireContext: false,\n    unstable_collectDependenciesPath: 'metro/src/ModuleGraph/worker/collectDependencies.js',\n    unstable_dependencyMapReservedName: null,\n    unstable_disableModuleWrapping: false,\n    unstable_disableNormalizePseudoGlobals: false,\n    unstable_compactOutput: false,\n  },\n  watcher: {\n    additionalExts,\n    watchman: {\n      deferStates: ['hg.update'],\n    },\n  },\n  cacheStores: [\n    new FileStore({\n      root: path.join(os.tmpdir(), 'metro-cache'),\n    }),\n  ],\n  cacheVersion: '1.0',\n  // We assume the default project path is two levels up from\n  // node_modules/metro/\n  projectRoot: projectRoot || path.resolve(__dirname, '../../..'),\n  stickyWorkers: true,\n  watchFolders: [],\n  transformerPath: 'metro-transform-worker',\n  maxWorkers: getMaxWorkers(),\n  resetCache: false,\n  reporter: new TerminalReporter(new Terminal(process.stdout)),\n});\n\nasync function getDefaultConfig(rootPath) {\n  // We can add more logic here to get a sensible default configuration, for\n  // now we just return a stub.\n\n  return getDefaultValues(rootPath);\n}\n\nmodule.exports = getDefaultConfig;\nmodule.exports.getDefaultValues = getDefaultValues;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-config/src/defaults/validConfig.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nmodule.exports = async () => {\n  const defaultConfig = await require('./index')('/path/to/project');\n  const validConfig = {\n    ...defaultConfig,\n    resolver: {\n      ...defaultConfig.resolver,\n      resolveRequest: function CustomResolver() {},\n      hasteImplModulePath: './path',\n    },\n    server: {\n      ...defaultConfig.server,\n      unstable_serverRoot: '',\n    },\n    transformer: {\n      ...defaultConfig.transformer,\n      getTransformOptions: function getTransformOptions() {},\n    },\n    serializer: {\n      ...defaultConfig.serializer,\n      customSerializer: function customSerializer() {},\n    },\n  };\n\n  return validConfig;\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-config/src/index.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst getDefaultConfig = require('./defaults');\nconst { loadConfig, mergeConfig, resolveConfig } = require('./loadConfig');\n\nmodule.exports = {\n  loadConfig,\n  resolveConfig,\n  mergeConfig,\n  getDefaultConfig,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-config/src/loadConfig.d.ts",
    "content": "declare function loadConfig(argv: any, defaultConfigOverrides: any): Promise<any>;\ndeclare function mergeConfig(defaultConfig: any, ...configs: any[]): any;\n\nexport { loadConfig, mergeConfig };\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-config/src/loadConfig.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst getDefaultConfig = require('./defaults');\nconst validConfig = require('./defaults/validConfig');\n// MARK: - GRANITE\nconst { cosmiconfig, defaultLoaders } = require('cosmiconfig');\nconst fs = require('fs');\nconst { validate } = require('jest-validate');\nconst MetroCache = require('metro-cache');\nconst path = require('path');\nconst { dirname, join } = require('path');\n\n/**\n * Takes the last argument if multiple of the same argument are given\n */\nfunction overrideArgument(arg) {\n  if (arg == null) {\n    return arg;\n  }\n\n  if (Array.isArray(arg)) {\n    // $FlowFixMe[incompatible-return]\n    return arg[arg.length - 1];\n  }\n\n  return arg;\n}\n\nconst explorer = cosmiconfig('metro', {\n  searchPlaces: ['metro.config.js', 'metro.config.json', 'package.json'],\n\n  loaders: {\n    // MARK: - GRANITE\n    ...defaultLoaders,\n    '.es6': defaultLoaders['.js'],\n    noExt: cosmiconfig.loadYaml,\n  },\n});\n\nconst isFile = (filePath) => fs.existsSync(filePath) && !fs.lstatSync(filePath).isDirectory();\n\nconst resolve = (filePath) => {\n  // Attempt to resolve the path with the node resolution algorithm but fall back to resolving\n  // the file relative to the current working directory if the input is not an absolute path.\n  try {\n    return require.resolve(filePath);\n  } catch (error) {\n    if (path.isAbsolute(filePath) || error.code !== 'MODULE_NOT_FOUND') {\n      throw error;\n    }\n  }\n\n  const possiblePath = path.resolve(process.cwd(), filePath);\n  return isFile(possiblePath) ? possiblePath : filePath;\n};\n\nasync function resolveConfig(filePath, cwd) {\n  if (filePath) {\n    return explorer.load(resolve(filePath));\n  }\n\n  const result = await explorer.search(cwd);\n  if (result == null) {\n    // No config file found, return a default\n    return {\n      isEmpty: true,\n      filepath: join(cwd || process.cwd(), 'metro.config.stub.js'),\n      config: {},\n    };\n  }\n\n  return result;\n}\n\nfunction mergeConfig(defaultConfig, ...configs) {\n  // If the file is a plain object we merge the file with the default config,\n  // for the function we don't do this since that's the responsibility of the user\n  return configs.reduce(\n    (totalConfig, nextConfig) => ({\n      ...totalConfig,\n      ...nextConfig,\n\n      cacheStores:\n        nextConfig.cacheStores != null\n          ? typeof nextConfig.cacheStores === 'function'\n            ? nextConfig.cacheStores(MetroCache)\n            : nextConfig.cacheStores\n          : totalConfig.cacheStores,\n\n      resolver: {\n        /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses\n         * an error found when Flow v0.111 was deployed. To see the error,\n         * delete this comment and run Flow. */\n        ...totalConfig.resolver,\n        ...(nextConfig.resolver || {}),\n        dependencyExtractor:\n          nextConfig.resolver && nextConfig.resolver.dependencyExtractor != null\n            ? resolve(nextConfig.resolver.dependencyExtractor)\n            : totalConfig.resolver.dependencyExtractor,\n        hasteImplModulePath:\n          nextConfig.resolver && nextConfig.resolver.hasteImplModulePath != null\n            ? resolve(nextConfig.resolver.hasteImplModulePath)\n            : totalConfig.resolver.hasteImplModulePath,\n      },\n      serializer: {\n        /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses\n         * an error found when Flow v0.111 was deployed. To see the error,\n         * delete this comment and run Flow. */\n        ...totalConfig.serializer,\n        ...(nextConfig.serializer || {}),\n      },\n      transformer: {\n        /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses\n         * an error found when Flow v0.111 was deployed. To see the error,\n         * delete this comment and run Flow. */\n        ...totalConfig.transformer,\n        ...(nextConfig.transformer || {}),\n        babelTransformerPath:\n          nextConfig.transformer && nextConfig.transformer.babelTransformerPath != null\n            ? resolve(nextConfig.transformer.babelTransformerPath)\n            : totalConfig.transformer.babelTransformerPath,\n      },\n      server: {\n        /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses\n         * an error found when Flow v0.111 was deployed. To see the error,\n         * delete this comment and run Flow. */\n        ...totalConfig.server,\n        ...(nextConfig.server || {}),\n      },\n      symbolicator: {\n        /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses\n         * an error found when Flow v0.111 was deployed. To see the error,\n         * delete this comment and run Flow. */\n        ...totalConfig.symbolicator,\n        ...(nextConfig.symbolicator || {}),\n      },\n      watcher: {\n        ...totalConfig.watcher,\n        ...nextConfig.watcher,\n        watchman: {\n          ...totalConfig.watcher?.watchman,\n          ...nextConfig.watcher?.watchman,\n        },\n      },\n    }),\n    defaultConfig\n  );\n}\n\nasync function loadMetroConfigFromDisk(path, cwd, defaultConfigOverrides) {\n  const resolvedConfigResults = await resolveConfig(path, cwd);\n\n  const { config: configModule, filepath } = resolvedConfigResults;\n  const rootPath = dirname(filepath);\n\n  const defaults = await getDefaultConfig(rootPath);\n  const defaultConfig = mergeConfig(defaults, defaultConfigOverrides);\n\n  if (typeof configModule === 'function') {\n    // Get a default configuration based on what we know, which we in turn can pass\n    // to the function.\n\n    const resultedConfig = await configModule(defaultConfig);\n    return mergeConfig(defaultConfig, resultedConfig);\n  }\n\n  return mergeConfig(defaultConfig, configModule);\n}\n\nfunction overrideConfigWithArguments(config, argv) {\n  // We override some config arguments here with the argv\n\n  const output = {\n    resolver: {},\n    serializer: {},\n    server: {},\n    transformer: {},\n  };\n\n  if (argv.port != null) {\n    output.server.port = Number(argv.port);\n  }\n\n  if (argv.runInspectorProxy != null) {\n    output.server.runInspectorProxy = Boolean(argv.runInspectorProxy);\n  }\n\n  if (argv.projectRoot != null) {\n    output.projectRoot = argv.projectRoot;\n  }\n\n  if (argv.watchFolders != null) {\n    output.watchFolders = argv.watchFolders;\n  }\n\n  if (argv.assetExts != null) {\n    output.resolver.assetExts = argv.assetExts;\n  }\n\n  if (argv.sourceExts != null) {\n    output.resolver.sourceExts = argv.sourceExts;\n  }\n\n  if (argv.platforms != null) {\n    output.resolver.platforms = argv.platforms;\n  }\n\n  if (argv['max-workers'] != null || argv.maxWorkers != null) {\n    output.maxWorkers = Number(argv['max-workers'] || argv.maxWorkers);\n  }\n\n  if (argv.transformer != null) {\n    output.transformer.babelTransformerPath = argv.transformer;\n  }\n\n  if (argv['reset-cache'] != null) {\n    output.resetCache = argv['reset-cache'];\n  }\n\n  if (argv.resetCache != null) {\n    output.resetCache = argv.resetCache;\n  }\n\n  if (argv.verbose === false) {\n    output.reporter = { update: () => {} };\n    // TODO: Ask if this is the way to go\n  }\n\n  return mergeConfig(config, output);\n}\n\n/**\n * Load the metro configuration from disk\n * @param  {object} argv                    Arguments coming from the CLI, can be empty\n * @param  {object} defaultConfigOverrides  A configuration that can override the default config\n * @return {object}                         Configuration returned\n */\nasync function loadConfig(argv = {}, defaultConfigOverrides = {}) {\n  argv.config = overrideArgument(argv.config);\n\n  const configuration = await loadMetroConfigFromDisk(argv.config, argv.cwd, defaultConfigOverrides);\n\n  validate(configuration, {\n    exampleConfig: await validConfig(),\n    recursiveBlacklist: ['reporter', 'resolver', 'transformer'],\n    deprecatedConfig: {\n      blacklistRE: () =>\n        `Warning: Metro config option \\`blacklistRE\\` is deprecated.\n         Please use \\`blockList\\` instead.`,\n    },\n  });\n\n  // Override the configuration with cli parameters\n  const configWithArgs = overrideConfigWithArguments(configuration, argv);\n\n  const overriddenConfig = {};\n\n  overriddenConfig.watchFolders = [configWithArgs.projectRoot, ...configWithArgs.watchFolders];\n\n  // Set the watchfolders to include the projectRoot, as Metro assumes that is\n  // the case\n  return mergeConfig(configWithArgs, overriddenConfig);\n}\n\nmodule.exports = {\n  loadConfig,\n  resolveConfig,\n  mergeConfig,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-core/src/Logger.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\n// MARK: - GRANITE\nconst VERSION = '0.0.0';\nconst { EventEmitter } = require('events');\nconst os = require('os');\nconst path = require('path');\n\nconst log_session = `${os.hostname()}-${Date.now()}`;\nconst eventEmitter = new EventEmitter();\n\nfunction on(event, handler) {\n  eventEmitter.on(event, handler);\n}\n\nfunction createEntry(data) {\n  const logEntry = typeof data === 'string' ? { log_entry_label: data } : data;\n\n  const entryPoint = logEntry.entry_point;\n  if (entryPoint) {\n    logEntry.entry_point = path.relative(process.cwd(), entryPoint);\n  }\n\n  return {\n    ...logEntry,\n    log_session,\n    metro_bundler_version: VERSION,\n  };\n}\n\nfunction createActionStartEntry(data) {\n  const logEntry = typeof data === 'string' ? { action_name: data } : data;\n  const { action_name } = logEntry;\n\n  return createEntry({\n    ...logEntry,\n    action_name,\n    action_phase: 'start',\n    log_entry_label: action_name,\n    start_timestamp: process.hrtime(),\n  });\n}\n\nfunction createActionEndEntry(logEntry) {\n  const { action_name, action_phase, start_timestamp } = logEntry;\n\n  if (action_phase !== 'start' || !Array.isArray(start_timestamp)) {\n    throw new Error('Action has not started or has already ended');\n  }\n\n  const timeDelta = process.hrtime(start_timestamp);\n  const duration_ms = Math.round((timeDelta[0] * 1e9 + timeDelta[1]) / 1e6);\n\n  return createEntry({\n    ...logEntry,\n    action_name,\n    action_phase: 'end',\n    duration_ms,\n    /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an\n     * error found when Flow v0.111 was deployed. To see the error, delete this\n     * comment and run Flow. */\n    log_entry_label: action_name,\n  });\n}\n\nfunction log(logEntry) {\n  eventEmitter.emit('log', logEntry);\n  return logEntry;\n}\n\nmodule.exports = {\n  on,\n  createEntry,\n  createActionStartEntry,\n  createActionEndEntry,\n  log,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-core/src/Terminal.d.ts",
    "content": "import type * as net from 'net';\nimport type * as stream from 'stream';\n\ntype UnderlyingStream = net.Socket | stream.Writable;\n\ndeclare class Terminal {\n  constructor(stream: UnderlyingStream);\n  /**\n   * Shows some text that is meant to be overriden later. Return the previous\n   * status that was shown and is no more. Calling `status()` with no argument\n   * removes the status altogether. The status is never shown in a\n   * non-interactive terminal: for example, if the output is redirected to a\n   * file, then we don't care too much about having a progress bar.\n   */\n  status(format: string, ...args: unknown[]): string;\n  /**\n   * Similar to `console.log`, except it moves the status/progress text out of\n   * the way correctly. In non-interactive terminals this is the same as\n   * `console.log`.\n   */\n  log(format: string, ...args: unknown[]): void;\n  /**\n   * Log the current status and start from scratch. This is useful if the last\n   * status was the last one of a series of updates.\n   */\n  persistStatus(): void;\n  flush(): void;\n}\n\nexport default Terminal;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-core/src/Terminal.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst throttle = require('lodash.throttle');\nconst readline = require('readline');\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * Clear some text that was previously printed on an interactive stream,\n * without trailing newline character (so we have to move back to the\n * beginning of the line).\n */\nfunction clearStringBackwards(stream, str) {\n  readline.moveCursor(stream, -stream.columns, 0);\n  readline.clearLine(stream, 0);\n  let lineCount = (str.match(/\\n/g) || []).length;\n  while (lineCount > 0) {\n    readline.moveCursor(stream, 0, -1);\n    readline.clearLine(stream, 0);\n    --lineCount;\n  }\n}\n\n/**\n * Cut a string into an array of string of the specific maximum size. A newline\n * ends a chunk immediately (it's not included in the \".\" RexExp operator), and\n * is not included in the result.\n * When counting we should ignore non-printable characters. In particular the\n * ANSI escape sequences (regex: /\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?m/)\n * (Not an exhaustive match, intended to match ANSI color escapes)\n * https://en.wikipedia.org/wiki/ANSI_escape_code\n */\nfunction chunkString(str, size) {\n  const ANSI_COLOR = '\\x1B\\\\[([0-9]{1,2}(;[0-9]{1,2})?)?m';\n  const SKIP_ANSI = `(?:${ANSI_COLOR})*`;\n  return str.match(new RegExp(`(?:${SKIP_ANSI}.){1,${size}}`, 'g')) || [];\n}\n\n/**\n * Get the stream as a TTY if it effectively looks like a valid TTY.\n */\nfunction getTTYStream(stream) {\n  if (stream instanceof tty.WriteStream && stream.isTTY && stream.columns >= 1) {\n    return stream;\n  }\n  return null;\n}\n\n/**\n * We don't just print things to the console, sometimes we also want to show\n * and update progress. This utility just ensures the output stays neat: no\n * missing newlines, no mangled log lines.\n *\n *     const terminal = Terminal.default;\n *     terminal.status('Updating... 38%');\n *     terminal.log('warning: Something happened.');\n *     terminal.status('Updating, done.');\n *     terminal.persistStatus();\n *\n * The final output:\n *\n *     warning: Something happened.\n *     Updating, done.\n *\n * Without the status feature, we may get a mangled output:\n *\n *     Updating... 38%warning: Something happened.\n *     Updating, done.\n *\n * This is meant to be user-readable and TTY-oriented. We use stdout by default\n * because it's more about status information than diagnostics/errors (stderr).\n *\n * Do not add any higher-level functionality in this class such as \"warning\" and\n * \"error\" printers, as it is not meant for formatting/reporting. It has the\n * single responsibility of handling status messages.\n */\nclass Terminal {\n  _logLines;\n  _nextStatusStr;\n  _scheduleUpdate;\n  _statusStr;\n  _stream;\n\n  constructor(stream) {\n    this._logLines = [];\n    this._nextStatusStr = '';\n    // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n    this._scheduleUpdate = throttle(this._update, 33);\n    this._statusStr = '';\n    this._stream = stream;\n  }\n\n  /**\n   * Clear and write the new status, logging in bulk in-between. Doing this in a\n   * throttled way (in a different tick than the calls to `log()` and\n   * `status()`) prevents us from repeatedly rewriting the status in case\n   * `terminal.log()` is called several times.\n   */\n  _update() {\n    const { _statusStr, _stream } = this;\n    const ttyStream = getTTYStream(_stream);\n    if (_statusStr === this._nextStatusStr && this._logLines.length === 0) {\n      return;\n    }\n    if (ttyStream != null) {\n      clearStringBackwards(ttyStream, _statusStr);\n    }\n    this._logLines.forEach((line) => {\n      _stream.write(line);\n      _stream.write('\\n');\n    });\n    this._logLines = [];\n    if (ttyStream != null) {\n      this._nextStatusStr = chunkString(this._nextStatusStr, ttyStream.columns).join('\\n');\n      _stream.write(this._nextStatusStr);\n    }\n    this._statusStr = this._nextStatusStr;\n  }\n\n  /**\n   * Shows some text that is meant to be overriden later. Return the previous\n   * status that was shown and is no more. Calling `status()` with no argument\n   * removes the status altogether. The status is never shown in a\n   * non-interactive terminal: for example, if the output is redirected to a\n   * file, then we don't care too much about having a progress bar.\n   */\n  status(format, ...args) {\n    const { _nextStatusStr } = this;\n    this._nextStatusStr = util.format(format, ...args);\n    this._scheduleUpdate();\n    return _nextStatusStr;\n  }\n\n  /**\n   * Similar to `console.log`, except it moves the status/progress text out of\n   * the way correctly. In non-interactive terminals this is the same as\n   * `console.log`.\n   */\n  log(format, ...args) {\n    this._logLines.push(util.format(format, ...args));\n    this._scheduleUpdate();\n  }\n\n  /**\n   * Log the current status and start from scratch. This is useful if the last\n   * status was the last one of a series of updates.\n   */\n  persistStatus() {\n    this.log(this._nextStatusStr);\n    this._nextStatusStr = '';\n  }\n\n  flush() {\n    // Useful if you're going to start calling console.log/console.error directly\n    // again; otherwise you could end up with mangled output when the queued\n    // update starts writing to stream after a delay.\n    /* $FlowFixMe(>=0.99.0 site=react_native_fb) This comment suppresses an\n     * error found when Flow v0.99 was deployed. To see the error, delete this\n     * comment and run Flow. */\n    this._scheduleUpdate.flush();\n  }\n}\n\nmodule.exports = Terminal;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-core/src/canonicalize.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nfunction canonicalize(key, value) {\n  if (\n    // eslint-disable-next-line lint/strictly-null\n    value === null ||\n    typeof value !== 'object' ||\n    Array.isArray(value)\n  ) {\n    return value;\n  }\n\n  const keys = Object.keys(value).sort();\n  const length = keys.length;\n  const object = {};\n\n  for (let i = 0; i < length; i++) {\n    object[keys[i]] = value[keys[i]];\n  }\n\n  return object;\n}\n\nmodule.exports = canonicalize;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-core/src/errors/AmbiguousModuleResolutionError.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nclass AmbiguousModuleResolutionError extends Error {\n  fromModulePath;\n  hasteError;\n\n  constructor(fromModulePath, hasteError) {\n    super(`Ambiguous module resolution from \\`${fromModulePath}\\`: ` + hasteError.message);\n    this.fromModulePath = fromModulePath;\n    this.hasteError = hasteError;\n  }\n}\n\nmodule.exports = AmbiguousModuleResolutionError;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-core/src/errors/PackageResolutionError.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst { formatFileCandidates } = require('metro-resolver');\n\nclass PackageResolutionError extends Error {\n  originModulePath;\n  packageError;\n  targetModuleName;\n\n  constructor(opts) {\n    const perr = opts.packageError;\n    super(\n      `While trying to resolve module \\`${opts.targetModuleName}\\` from file ` +\n        `\\`${opts.originModulePath}\\`, the package ` +\n        `\\`${perr.packageJsonPath}\\` was successfully found. However, ` +\n        'this package itself specifies ' +\n        'a `main` module field that could not be resolved (' +\n        `\\`${perr.mainPrefixPath}\\`. Indeed, none of these files exist:\\n\\n` +\n        `  * ${formatFileCandidates(perr.fileCandidates)}\\n` +\n        `  * ${formatFileCandidates(perr.indexCandidates)}`\n    );\n    Object.assign(this, opts);\n  }\n}\n\nmodule.exports = PackageResolutionError;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-core/src/errors.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst AmbiguousModuleResolutionError = require('./errors/AmbiguousModuleResolutionError');\nconst PackageResolutionError = require('./errors/PackageResolutionError');\n\nmodule.exports = {\n  AmbiguousModuleResolutionError,\n  PackageResolutionError,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-core/src/index.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst AmbiguousModuleResolutionError = require('./errors/AmbiguousModuleResolutionError');\nconst PackageResolutionError = require('./errors/PackageResolutionError');\nconst Logger = require('./Logger');\nconst Terminal = require('./Terminal');\n\nmodule.exports = {\n  AmbiguousModuleResolutionError,\n  Logger,\n  PackageResolutionError,\n  Terminal,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-inspector-proxy/src/Device.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport WS from 'ws';\n\nconst debug = require('debug')('Metro:InspectorProxy');\n\nconst PAGES_POLLING_INTERVAL = 1000;\n\n// Android's stock emulator and other emulators such as genymotion use a standard localhost alias.\nconst EMULATOR_LOCALHOST_ADDRESSES = ['10.0.2.2', '10.0.3.2'];\n\n// Prefix for script URLs that are alphanumeric IDs. See comment in _processMessageFromDevice method for\n// more details.\nconst FILE_PREFIX = 'file://';\n\nconst REACT_NATIVE_RELOADABLE_PAGE_ID = '-1';\n\n/**\n * Device class represents single device connection to Inspector Proxy. Each device\n * can have multiple inspectable pages.\n */\nclass Device {\n  // ID of the device.\n  _id;\n\n  // Name of the device.\n  _name;\n\n  // Package name of the app.\n  _app;\n\n  // Stores socket connection between Inspector Proxy and device.\n  _deviceSocket;\n\n  // Stores last list of device's pages.\n  _pages;\n\n  // Stores information about currently connected debugger (if any).\n  _debuggerConnection = null;\n\n  // Last known Page ID of the React Native page.\n  // This is used by debugger connections that don't have PageID specified\n  // (and will interact with the latest React Native page).\n  _lastConnectedReactNativePage = null;\n\n  // Whether we are in the middle of a reload in the REACT_NATIVE_RELOADABLE_PAGE.\n  _isReloading = false;\n\n  // The previous \"GetPages\" message, for deduplication in debug logs.\n  _lastGetPagesMessage = '';\n\n  // Mapping built from scriptParsed events and used to fetch file content in `Debugger.getScriptSource`.\n  _scriptIdToSourcePathMapping = new Map();\n\n  // Root of the project used for relative to absolute source path conversion.\n  _projectRoot;\n\n  // MARK: - GRANITE\n  _delegate;\n\n  // MARK: - GRANITE\n  // 네트워크 응답 데이터 저장하기 위한 변수 (key: requestId, value: { data: string, base64Encoded: bool })\n  _networkResponseData = new Map();\n\n  constructor(id, name, app, socket, projectRoot, delegate) {\n    this._id = id;\n    this._name = name;\n    this._app = app;\n    this._pages = [];\n    this._deviceSocket = socket;\n    this._projectRoot = projectRoot;\n    this._delegate = delegate;\n\n    this._deviceSocket.on('message', (message) => {\n      const parsedMessage = JSON.parse(message);\n      if (parsedMessage.event === 'getPages') {\n        // There's a 'getPages' message every second, so only show them if they change\n        if (message !== this._lastGetPagesMessage) {\n          debug('(Debugger)    (Proxy) <- (Device), getPages ping has changed: ' + message);\n          this._lastGetPagesMessage = message;\n        }\n      } else {\n        debug('(Debugger)    (Proxy) <- (Device): ' + message);\n      }\n      this._handleMessageFromDevice(parsedMessage);\n    });\n    this._deviceSocket.on('close', () => {\n      // Device disconnected - close debugger connection.\n      if (this._debuggerConnection) {\n        this._debuggerConnection.socket.close();\n        this._debuggerConnection = null;\n      }\n    });\n\n    this._setPagesPolling();\n  }\n\n  getName() {\n    return this._name;\n  }\n\n  getPagesList() {\n    if (this._lastConnectedReactNativePage) {\n      const reactNativeReloadablePage = {\n        id: REACT_NATIVE_RELOADABLE_PAGE_ID,\n        title: 'React Native Experimental (Improved Chrome Reloads)',\n        vm: \"don't use\",\n        app: this._app,\n      };\n      return this._pages.concat(reactNativeReloadablePage);\n    } else {\n      return this._pages;\n    }\n  }\n\n  // Handles new debugger connection to this device:\n  // 1. Sends connect event to device\n  // 2. Forwards all messages from the debugger to device as wrappedEvent\n  // 3. Sends disconnect event to device when debugger connection socket closes.\n  handleDebuggerConnection(socket, pageId) {\n    // Disconnect current debugger if we already have debugger connected.\n    if (this._debuggerConnection) {\n      this._debuggerConnection.socket.close();\n      this._debuggerConnection = null;\n    }\n\n    const debuggerInfo = {\n      socket,\n      prependedFilePrefix: false,\n      pageId,\n    };\n    this._debuggerConnection = debuggerInfo;\n\n    debug(`Got new debugger connection for page ${pageId} of ${this._name}`);\n\n    this._sendMessageToDevice({\n      event: 'connect',\n      payload: {\n        pageId: this._mapToDevicePageId(pageId),\n      },\n    });\n\n    socket.on('message', (message) => {\n      // MARK: - GRANITE\n      if (!this._lastConnectedReactNativePage) {\n        // 연결된 RN 인스턴스가 없는 경우 인스펙터로부터 받은 이벤트 발송하지 않도록 함\n        return;\n      }\n\n      debug('(Debugger) -> (Proxy)    (Device): ' + message);\n      const debuggerRequest = JSON.parse(message);\n      const interceptedResponse = this._interceptMessageFromDebugger(debuggerRequest, debuggerInfo);\n\n      if (interceptedResponse) {\n        socket.send(JSON.stringify(interceptedResponse));\n      } else {\n        this._sendMessageToDevice({\n          event: 'wrappedEvent',\n          payload: {\n            pageId: this._mapToDevicePageId(pageId),\n            wrappedEvent: JSON.stringify(debuggerRequest),\n          },\n        });\n      }\n    });\n    socket.on('close', () => {\n      debug(`Debugger for page ${pageId} and ${this._name} disconnected.`);\n      this._sendMessageToDevice({\n        event: 'disconnect',\n        payload: {\n          pageId: this._mapToDevicePageId(pageId),\n        },\n      });\n      this._debuggerConnection = null;\n    });\n\n    const sendFunc = socket.send;\n    socket.send = function (message) {\n      debug('(Debugger) <- (Proxy)    (Device): ' + message);\n      return sendFunc.call(socket, message);\n    };\n  }\n\n  // Handles messages received from device:\n  // 1. For getPages responses updates local _pages list.\n  // 2. All other messages are forwarded to debugger as wrappedEvent.\n  //\n  // In the future more logic will be added to this method for modifying\n  // some of the messages (like updating messages with source maps and file\n  // locations).\n  _handleMessageFromDevice(message) {\n    if (message.event === 'getPages') {\n      this._pages = message.payload;\n\n      // Check if device have new React Native page.\n      // There is usually no more than 2-3 pages per device so this operation\n      // is not expensive.\n      // TODO(hypuk): It is better for VM to send update event when new page is\n      // created instead of manually checking this on every getPages result.\n      for (let i = 0; i < this._pages.length; ++i) {\n        if (this._pages[i].title.indexOf('React') >= 0) {\n          if (this._pages[i].id != this._lastConnectedReactNativePage?.id) {\n            this._newReactNativePage(this._pages[i]);\n            break;\n          }\n        }\n      }\n    } else if (message.event === 'disconnect') {\n      // Device sends disconnect events only when page is reloaded or\n      // if debugger socket was disconnected.\n      const pageId = message.payload.pageId;\n      const debuggerSocket = this._debuggerConnection ? this._debuggerConnection.socket : null;\n      if (debuggerSocket && debuggerSocket.readyState === WS.OPEN) {\n        if (this._debuggerConnection != null && this._debuggerConnection.pageId !== REACT_NATIVE_RELOADABLE_PAGE_ID) {\n          debug(`Page ${pageId} is reloading.`);\n          debuggerSocket.send(JSON.stringify({ method: 'reload' }));\n        }\n      }\n    } else if (message.event === 'wrappedEvent') {\n      if (this._debuggerConnection == null) {\n        return;\n      }\n\n      // FIXME: Is it possible that we received message for pageID that does not\n      // correspond to current debugger connection?\n\n      const debuggerSocket = this._debuggerConnection.socket;\n      if (debuggerSocket == null || debuggerSocket.readyState !== WS.OPEN) {\n        // TODO(hypuk): Send error back to device?\n        return;\n      }\n\n      const parsedPayload = JSON.parse(message.payload.wrappedEvent);\n\n      if (this._debuggerConnection) {\n        // Wrapping just to make flow happy :)\n        this._processMessageFromDevice(parsedPayload, this._debuggerConnection);\n      }\n\n      const messageToSend = JSON.stringify(parsedPayload);\n      debuggerSocket.send(messageToSend);\n    }\n  }\n\n  // Sends single message to device.\n  _sendMessageToDevice(message) {\n    try {\n      if (message.event !== 'getPages') {\n        debug('(Debugger)    (Proxy) -> (Device): ' + JSON.stringify(message));\n      }\n      this._deviceSocket.send(JSON.stringify(message));\n    } catch (error) {}\n  }\n\n  // Sends 'getPages' request to device every PAGES_POLLING_INTERVAL milliseconds.\n  _setPagesPolling() {\n    setInterval(() => this._sendMessageToDevice({ event: 'getPages' }), PAGES_POLLING_INTERVAL);\n  }\n\n  // We received new React Native Page ID.\n  _newReactNativePage(page) {\n    debug(`React Native page updated to ${page.id}`);\n    if (this._debuggerConnection == null || this._debuggerConnection.pageId !== REACT_NATIVE_RELOADABLE_PAGE_ID) {\n      // We can just remember new page ID without any further actions if no\n      // debugger is currently attached or attached debugger is not\n      // \"Reloadable React Native\" connection.\n      this._lastConnectedReactNativePage = page;\n      return;\n    }\n    const oldPageId = this._lastConnectedReactNativePage?.id;\n    this._lastConnectedReactNativePage = page;\n    this._isReloading = true;\n\n    // We already had a debugger connected to React Native page and a\n    // new one appeared - in this case we need to emulate execution context\n    // detroy and resend Debugger.enable and Runtime.enable commands to new\n    // page.\n\n    if (oldPageId != null) {\n      this._sendMessageToDevice({\n        event: 'disconnect',\n        payload: {\n          pageId: oldPageId,\n        },\n      });\n    }\n\n    this._sendMessageToDevice({\n      event: 'connect',\n      payload: {\n        pageId: page.id,\n      },\n    });\n\n    const toSend = [\n      { method: 'Runtime.enable', id: 1e9 },\n      { method: 'Debugger.enable', id: 1e9 },\n    ];\n\n    for (const message of toSend) {\n      this._sendMessageToDevice({\n        event: 'wrappedEvent',\n        payload: {\n          pageId: this._mapToDevicePageId(page.id),\n          wrappedEvent: JSON.stringify(message),\n        },\n      });\n    }\n  }\n\n  // Allows to make changes in incoming message from device.\n  _processMessageFromDevice(payload, debuggerInfo) {\n    if (this._delegate?.onDeviceMessage?.(payload, debuggerInfo.socket)) {\n      return;\n    }\n\n    // Replace Android addresses for scriptParsed event.\n    if (payload.method === 'Debugger.scriptParsed') {\n      const params = payload.params || {};\n      if ('sourceMapURL' in params) {\n        for (let i = 0; i < EMULATOR_LOCALHOST_ADDRESSES.length; ++i) {\n          const address = EMULATOR_LOCALHOST_ADDRESSES[i];\n          if (params.sourceMapURL.indexOf(address) >= 0) {\n            payload.params.sourceMapURL = params.sourceMapURL.replace(address, 'localhost');\n            debuggerInfo.originalSourceURLAddress = address;\n          }\n        }\n      }\n      if ('url' in params) {\n        for (let i = 0; i < EMULATOR_LOCALHOST_ADDRESSES.length; ++i) {\n          const address = EMULATOR_LOCALHOST_ADDRESSES[i];\n          if (params.url.indexOf(address) >= 0) {\n            payload.params.url = params.url.replace(address, 'localhost');\n            debuggerInfo.originalSourceURLAddress = address;\n          }\n        }\n\n        // Chrome doesn't download source maps if URL param is not a valid\n        // URL. Some frameworks pass alphanumeric script ID instead of URL which causes\n        // Chrome to not download source maps. In this case we want to prepend script ID\n        // with 'file://' prefix.\n        if (payload.params.url.match(/^[0-9a-z]+$/)) {\n          payload.params.url = FILE_PREFIX + payload.params.url;\n          debuggerInfo.prependedFilePrefix = true;\n        }\n\n        // $FlowFixMe[prop-missing]\n        if (params.scriptId != null) {\n          this._scriptIdToSourcePathMapping.set(params.scriptId, params.url);\n        }\n      }\n\n      if (debuggerInfo.pageId == REACT_NATIVE_RELOADABLE_PAGE_ID) {\n        // Chrome won't use the source map unless it appears to be new.\n        if (payload.params.sourceMapURL) {\n          payload.params.sourceMapURL += '&cachePrevention=' + this._mapToDevicePageId(debuggerInfo.pageId);\n        }\n        if (payload.params.url) {\n          payload.params.url += '&cachePrevention=' + this._mapToDevicePageId(debuggerInfo.pageId);\n        }\n      }\n    }\n\n    if (payload.method === 'Runtime.executionContextCreated' && this._isReloading) {\n      // The new context is ready. First notify Chrome that we've reloaded so\n      // it'll resend its breakpoints. If we do this earlier, we may not be\n      // ready to receive them.\n      debuggerInfo.socket.send(JSON.stringify({ method: 'Runtime.executionContextsCleared' }));\n\n      // The VM starts in a paused mode. Ask it to resume.\n      // Note that if setting breakpoints in early initialization functions,\n      // there's a currently race condition between these functions executing\n      // and Chrome re-applying the breakpoints due to the message above.\n      //\n      // This is not an issue in VSCode/Nuclide where the IDE knows to resume\n      // at its convenience.\n      this._sendMessageToDevice({\n        event: 'wrappedEvent',\n        payload: {\n          pageId: this._mapToDevicePageId(debuggerInfo.pageId),\n          wrappedEvent: JSON.stringify({ method: 'Debugger.resume', id: 0 }),\n        },\n      });\n\n      this._isReloading = false;\n    }\n\n    // MARK: - GRANITE\n    // 네트워크 인스펙터에서 응답 데이터 미리보기를 구현하기 위한 커스텀 이벤트\n    if (payload.method === 'Bedrock.networkResponseData' || payload.method === 'Granite.networkResponseData') {\n      const params = payload.params ?? {};\n      if (typeof params.requestId === 'string') {\n        this._networkResponseData.set(params.requestId, {\n          data: params.data,\n          base64Encoded: params.base64Encoded,\n        });\n      }\n    }\n  }\n\n  // Allows to make changes in incoming messages from debugger.\n  _interceptMessageFromDebugger(req, debuggerInfo) {\n    let response = null;\n\n    if (this._delegate?.onDebuggerMessage?.(req, debuggerInfo.socket)) {\n      return null;\n    }\n\n    if (req.method === 'Debugger.setBreakpointByUrl') {\n      this._processDebuggerSetBreakpointByUrl(req, debuggerInfo);\n    } else if (req.method === 'Debugger.getScriptSource') {\n      response = {\n        id: req.id,\n        result: this._processDebuggerGetScriptSource(req),\n      };\n    } else if (req.method === 'Network.getResponseBody') {\n      // MARK: - GRANITE\n      response = this._processDebuggerGetResponseBody(req, debuggerInfo.socket);\n    }\n    return response;\n  }\n\n  // MARK: - GRANITE\n  _processDebuggerGetResponseBody(req) {\n    // `networkResponseData` 이벤트로부터 수신한 데이터를 꺼내 응답\n    // https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getResponseBody\n    const { requestId } = req.params;\n    if (this._networkResponseData.has(requestId)) {\n      const responseData = this._networkResponseData.get(requestId);\n      this._networkResponseData.delete(requestId);\n      return {\n        id: req.id,\n        result: this._createNetworkResponseData(responseData),\n      };\n    }\n    return null;\n  }\n\n  // MARK: - GRANITE\n  _createNetworkResponseData(responseData) {\n    let parsedOriginalData;\n    try {\n      /**\n       * 인코딩된 데이터인 경우 디코딩하여 JSON 형태의 값인지 확인\n       */\n      parsedOriginalData = JSON.parse(responseData.base64Encoded ? atob(responseData.data) : responseData.data);\n    } catch {\n      return {\n        body: responseData.data,\n        base64Encoded: responseData.base64Encoded,\n      };\n    }\n    const body = typeof parsedOriginalData === 'object' ? JSON.stringify(parsedOriginalData) : responseData.data;\n    return { body, base64Encoded: false };\n  }\n\n  _processDebuggerSetBreakpointByUrl(req, debuggerInfo) {\n    // If we replaced Android emulator's address to localhost we need to change it back.\n    if (debuggerInfo.originalSourceURLAddress) {\n      if (req.params.url) {\n        req.params.url = req.params.url.replace('localhost', debuggerInfo.originalSourceURLAddress);\n\n        if (req.params.url && req.params.url.startsWith(FILE_PREFIX) && debuggerInfo.prependedFilePrefix) {\n          // Remove fake URL prefix if we modified URL in _processMessageFromDevice.\n          // $FlowFixMe[incompatible-use]\n          req.params.url = req.params.url.slice(FILE_PREFIX.length);\n        }\n      }\n      if (req.params.urlRegex) {\n        req.params.urlRegex = req.params.urlRegex.replace(\n          /localhost/g,\n          // $FlowFixMe[incompatible-call]\n          debuggerInfo.originalSourceURLAddress\n        );\n      }\n    }\n  }\n\n  _processDebuggerGetScriptSource(req) {\n    let scriptSource = `Source for script with id '${req.params.scriptId}' was not found.`;\n\n    const pathToSource = this._scriptIdToSourcePathMapping.get(req.params.scriptId);\n    if (pathToSource) {\n      try {\n        scriptSource = fs.readFileSync(path.resolve(this._projectRoot, pathToSource), 'utf8');\n      } catch (err) {\n        scriptSource = err.message;\n      }\n    }\n\n    return {\n      scriptSource,\n    };\n  }\n\n  _mapToDevicePageId(pageId) {\n    if (pageId === REACT_NATIVE_RELOADABLE_PAGE_ID && this._lastConnectedReactNativePage != null) {\n      return this._lastConnectedReactNativePage.id;\n    } else {\n      return pageId;\n    }\n  }\n}\n\nmodule.exports = Device;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-inspector-proxy/src/InspectorProxy.d.ts",
    "content": "import * as http from 'http';\nimport * as ws from 'ws';\n\ndeclare class Device {\n  getName(): string;\n  getPageList(): unknown[];\n}\n\ndeclare class InspectorProxy {\n  static devices: Map<number, Device>;\n\n  processRequest: (request: http.IncomingMessage, response: http.ServerResponse, next: (error?: Error) => void) => void;\n  createWebSocketListeners: (server: http.Server) => {\n    ['/inspector/device']: ws.WebSocketServer;\n    ['/inspector/debug']: ws.WebSocketServer;\n  };\n\n  constructor(projectRoot: string);\n}\n\nexport default InspectorProxy;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-inspector-proxy/src/InspectorProxy.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst Device = require('./Device');\nconst debug = require('debug')('Metro:InspectorProxy');\nconst url = require('url');\nconst WS = require('ws');\n\nconst WS_DEVICE_URL = '/inspector/device';\nconst WS_DEBUGGER_URL = '/inspector/debug';\nconst PAGES_LIST_JSON_URL = '/json';\nconst PAGES_LIST_JSON_URL_2 = '/json/list';\nconst PAGES_LIST_JSON_VERSION_URL = '/json/version';\n\nconst INTERNAL_ERROR_CODE = 1011;\n\n/**\n * Main Inspector Proxy class that connects JavaScript VM inside Android/iOS apps and JS debugger.\n */\nclass InspectorProxy {\n  // MARK: - GRANITE\n  static devices;\n\n  // MARK: - GRANITE\n  _delegate;\n\n  // Root of the project used for relative to absolute source path conversion.\n  _projectRoot;\n\n  // MARK: - GRANITE\n  // 내부 변수를 static 필드로 변경하여 외부에서 접근하도록 변경함 (미사용)\n  // Maps device ID to Device instance.\n  _devices;\n\n  // Internal counter for device IDs -- just gets incremented for each new device.\n  _deviceCounter = 0;\n\n  // We store server's address with port (like '127.0.0.1:8081') to be able to build URLs\n  // (devtoolsFrontendUrl and webSocketDebuggerUrl) for page descriptions. These URLs are used\n  // by debugger to know where to connect.\n  _serverAddressWithPort = '';\n\n  constructor(projectRoot, delegate) {\n    this._projectRoot = projectRoot;\n\n    // MARK: - GRANITE\n    this._delegate = delegate;\n\n    // MARK: - GRANITE\n    InspectorProxy.devices = new Map();\n  }\n\n  // Process HTTP request sent to server. We only respond to 2 HTTP requests:\n  // 1. /json/version returns Chrome debugger protocol version that we use\n  // 2. /json and /json/list returns list of page descriptions (list of inspectable apps).\n  // This list is combined from all the connected devices.\n  processRequest(request, response, next) {\n    if (request.url === PAGES_LIST_JSON_URL || request.url === PAGES_LIST_JSON_URL_2) {\n      // Build list of pages from all devices.\n      let result = [];\n\n      // MARK: - GRANITE\n      Array.from(InspectorProxy.devices.entries()).forEach(([deviceId, device]) => {\n        result = result.concat(device.getPagesList().map((page) => this._buildPageDescription(deviceId, device, page)));\n      });\n\n      this._sendJsonResponse(response, result);\n    } else if (request.url === PAGES_LIST_JSON_VERSION_URL) {\n      this._sendJsonResponse(response, {\n        Browser: 'Mobile JavaScript',\n        'Protocol-Version': '1.1',\n      });\n    } else {\n      next();\n    }\n  }\n\n  // Adds websocket listeners to the provided HTTP/HTTPS server.\n  createWebSocketListeners(server) {\n    const { port } = server.address();\n    if (server.address().family === 'IPv6') {\n      this._serverAddressWithPort = `[::1]:${port}`;\n    } else {\n      this._serverAddressWithPort = `localhost:${port}`;\n    }\n    return {\n      [WS_DEVICE_URL]: this._createDeviceConnectionWSServer(),\n      [WS_DEBUGGER_URL]: this._createDebuggerConnectionWSServer(),\n    };\n  }\n\n  // Converts page information received from device into PageDescription object\n  // that is sent to debugger.\n  _buildPageDescription(deviceId, device, page) {\n    const debuggerUrl = `${this._serverAddressWithPort}${WS_DEBUGGER_URL}?device=${deviceId}&page=${page.id}`;\n    const webSocketDebuggerUrl = 'ws://' + debuggerUrl;\n    const devtoolsFrontendUrl =\n      'devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=' + encodeURIComponent(debuggerUrl);\n    return {\n      id: `${deviceId}-${page.id}`,\n      description: page.app,\n      title: page.title,\n      faviconUrl: 'https://reactjs.org/favicon.ico',\n      devtoolsFrontendUrl,\n      type: 'node',\n      webSocketDebuggerUrl,\n      vm: page.vm,\n    };\n  }\n\n  // Sends object as response to HTTP request.\n  // Just serializes object using JSON and sets required headers.\n  _sendJsonResponse(response, object) {\n    const data = JSON.stringify(object, null, 2);\n    response.writeHead(200, {\n      'Content-Type': 'application/json; charset=UTF-8',\n      'Cache-Control': 'no-cache',\n      'Content-Length': data.length.toString(),\n      Connection: 'close',\n    });\n    response.end(data);\n  }\n\n  // Adds websocket handler for device connections.\n  // Device connects to /inspector/device and passes device and app names as\n  // HTTP GET params.\n  // For each new websocket connection we parse device and app names and create\n  // new instance of Device class.\n  _createDeviceConnectionWSServer() {\n    const wss = new WS.Server({\n      noServer: true,\n      perMessageDeflate: true,\n    });\n    // $FlowFixMe[value-as-type]\n    wss.on('connection', async (socket, req) => {\n      try {\n        const query = url.parse(req.url || '', true).query || {};\n        const deviceName = query.name || 'Unknown';\n        const appName = query.app || 'Unknown';\n        const deviceId = this._deviceCounter++;\n\n        // MARK: - GRANITE\n        InspectorProxy.devices.set(\n          deviceId,\n          new Device(deviceId, deviceName, appName, socket, this._projectRoot, this._delegate)\n        );\n\n        debug(`Got new connection: device=${deviceName}, app=${appName}`);\n\n        socket.on('close', () => {\n          // MARK: - GRANITE\n          InspectorProxy.devices.delete(deviceId);\n          debug(`Device ${deviceName} disconnected.`);\n        });\n      } catch (e) {\n        console.error('error', e);\n        socket.close(INTERNAL_ERROR_CODE, e?.toString() ?? 'Unknown error');\n      }\n    });\n    return wss;\n  }\n\n  // Returns websocket handler for debugger connections.\n  // Debugger connects to webSocketDebuggerUrl that we return as part of page description\n  // in /json response.\n  // When debugger connects we try to parse device and page IDs from the query and pass\n  // websocket object to corresponding Device instance.\n  _createDebuggerConnectionWSServer() {\n    const wss = new WS.Server({\n      noServer: true,\n      perMessageDeflate: false,\n    });\n    // $FlowFixMe[value-as-type]\n    wss.on('connection', async (socket, req) => {\n      try {\n        const query = url.parse(req.url || '', true).query || {};\n        const deviceId = query.device;\n        const pageId = query.page;\n\n        if (deviceId == null || pageId == null) {\n          throw new Error('Incorrect URL - must provide device and page IDs');\n        }\n\n        // MARK: - GRANITE\n        const device = InspectorProxy.devices.get(parseInt(deviceId, 10));\n        if (device == null) {\n          throw new Error('Unknown device with ID ' + deviceId);\n        }\n\n        device.handleDebuggerConnection(socket, pageId);\n      } catch (e) {\n        console.error(e);\n        socket.close(INTERNAL_ERROR_CODE, e?.toString() ?? 'Unknown error');\n      }\n    });\n    return wss;\n  }\n}\n\nmodule.exports = InspectorProxy;\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-inspector-proxy/src/cli.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst { runInspectorProxy } = require('./index');\nconst yargs = require('yargs');\n\nconst argv = yargs\n  .option('port', {\n    alias: 'p',\n    describe: 'port to run inspector proxy on',\n    type: 'number',\n    default: 8081,\n  })\n  .option('root', {\n    alias: 'r',\n    describe: 'root folder of metro project',\n    type: 'string',\n    default: '',\n  }).argv;\n\nrunInspectorProxy(argv.port, argv.root);\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-inspector-proxy/src/index.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\nconst InspectorProxy = require('./InspectorProxy');\nconst { parse } = require('url');\n// Runs new HTTP Server and attaches Inspector Proxy to it.\n// Requires are inlined here because we don't want to import them\n// when someone needs only InspectorProxy instance (without starting\n// new HTTP server).\nfunction runInspectorProxy(port, projectRoot) {\n  const inspectorProxy = new InspectorProxy(projectRoot);\n  const app = require('connect')();\n  // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n  app.use(inspectorProxy.processRequest.bind(inspectorProxy));\n\n  const httpServer = require('http').createServer(app);\n  httpServer.listen(port, '127.0.0.1', () => {\n    const websocketEndpoints = inspectorProxy.createWebSocketListeners(httpServer);\n    httpServer.on('upgrade', (request, socket, head) => {\n      const { pathname } = parse(request.url);\n      if (pathname != null && websocketEndpoints[pathname]) {\n        websocketEndpoints[pathname].handleUpgrade(request, socket, head, (ws) => {\n          websocketEndpoints[pathname].emit('connection', ws, request);\n        });\n      } else {\n        socket.destroy();\n      }\n    });\n  });\n}\n\nmodule.exports = { InspectorProxy, runInspectorProxy };\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-inspector-proxy/src/types.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\n// Page information received from the device. New page is created for\n// each new instance of VM and can appear when user reloads React Native\n// application.\n\n// Chrome Debugger Protocol message/event passed between device and debugger.\n\n// Request sent from Inspector Proxy to Device when new debugger is connected\n// to particular page.\n\n// Request sent from Inspector Proxy to Device to notify that debugger is\n// disconnected.\n\n// Request sent from Inspector Proxy to Device to get a list of pages.\n\n// Response to GetPagesRequest containing a list of page infos.\n\n// Union type for all possible messages sent from device to Inspector Proxy.\n\n// Union type for all possible messages sent from Inspector Proxy to device.\n\n// Page description object that is sent in response to /json HTTP request from debugger.\n\n// Response to /json/version HTTP request from the debugger specifying browser type and\n// Chrome protocol version.\n\n/**\n * Types were exported from https://github.com/ChromeDevTools/devtools-protocol/blob/master/types/protocol.d.ts\n */\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-transform-worker/src/index.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nconst getMinifier = require('./utils/getMinifier');\nconst { transformFromAstSync } = require('@babel/core');\nconst generate = require('@babel/generator').default;\nconst babylon = require('@babel/parser');\nconst types = require('@babel/types');\nconst { stableHash } = require('metro-cache');\nconst getCacheKey = require('metro-cache-key');\nconst { fromRawMappings, toBabelSegments, toSegmentTuple } = require('metro-source-map');\nconst metroTransformPlugins = require('metro-transform-plugins');\n// MARK: - GRANITE\nconst countLines = require('../../metro/src/lib/countLines');\nconst {\n  InvalidRequireCallError: InternalInvalidRequireCallError,\n} = require('../../metro/src/ModuleGraph/worker/collectDependencies');\nconst generateImportNames = require('../../metro/src/ModuleGraph/worker/generateImportNames');\nconst JsFileWrapping = require('../../metro/src/ModuleGraph/worker/JsFileWrapping');\n\nconst nullthrows = require('nullthrows');\n\nfunction getDynamicDepsBehavior(inPackages, filename) {\n  switch (inPackages) {\n    case 'reject':\n      return 'reject';\n    case 'throwAtRuntime':\n      const isPackage = /(?:^|[/\\\\])node_modules[/\\\\]/.test(filename);\n      return isPackage ? inPackages : 'reject';\n    default:\n      inPackages;\n      throw new Error(`invalid value for dynamic deps behavior: \\`${inPackages}\\``);\n  }\n}\n\nconst minifyCode = async (config, projectRoot, filename, code, source, map, reserved = []) => {\n  const sourceMap = fromRawMappings([{ code, source, map, functionMap: null, path: filename }]).toMap(undefined, {});\n\n  const minify = getMinifier(config.minifierPath);\n\n  try {\n    const minified = await minify({\n      code,\n      map: sourceMap,\n      filename,\n      reserved,\n      config: config.minifierConfig,\n    });\n\n    return {\n      code: minified.code,\n      map: minified.map ? toBabelSegments(minified.map).map(toSegmentTuple) : [],\n    };\n  } catch (error) {\n    if (error.constructor.name === 'JS_Parse_Error') {\n      throw new Error(`${error.message} in file ${filename} at ${error.line}:${error.col}`);\n    }\n\n    throw error;\n  }\n};\n\nconst compileToBytecode = (rawCode, type, options) => {\n  let code = rawCode;\n  if (type.startsWith('js/module')) {\n    const index = code.lastIndexOf(')');\n    code = code.slice(0, index) + ',$$METRO_D[0],$$METRO_D[1],$$METRO_D[2]' + code.slice(index);\n  }\n  const HermesCompiler = require('metro-hermes-compiler');\n  return HermesCompiler.compile(code, options);\n};\n\nconst disabledDependencyTransformer = {\n  transformSyncRequire: () => void 0,\n  transformImportCall: () => void 0,\n  transformJSResource: () => void 0,\n  transformPrefetch: () => void 0,\n  transformIllegalDynamicRequire: () => void 0,\n};\n\nclass InvalidRequireCallError extends Error {\n  innerError;\n  filename;\n\n  constructor(innerError, filename) {\n    super(`${filename}:${innerError.message}`);\n    this.innerError = innerError;\n    this.filename = filename;\n  }\n}\n\nasync function transformJS(file, { config, options, projectRoot }) {\n  // Transformers can output null ASTs (if they ignore the file). In that case\n  // we need to parse the module source code to get their AST.\n  let ast = file.ast ?? babylon.parse(file.code, { sourceType: 'unambiguous' });\n\n  const { importDefault, importAll } = generateImportNames(ast);\n\n  // Add \"use strict\" if the file was parsed as a module, and the directive did\n  // not exist yet.\n  const { directives } = ast.program;\n\n  if (\n    ast.program.sourceType === 'module' &&\n    directives != null &&\n    directives.findIndex((d) => d.value.value === 'use strict') === -1\n  ) {\n    directives.push(types.directive(types.directiveLiteral('use strict')));\n  }\n\n  // Perform the import-export transform (in case it's still needed), then\n  // fold requires and perform constant folding (if in dev).\n  const plugins = [];\n  const babelPluginOpts = {\n    ...options,\n    inlineableCalls: [importDefault, importAll],\n    importDefault,\n    importAll,\n  };\n\n  if (options.experimentalImportSupport === true) {\n    plugins.push([metroTransformPlugins.importExportPlugin, babelPluginOpts]);\n  }\n\n  if (options.inlineRequires) {\n    plugins.push([\n      // $FlowFixMe[untyped-import] untyped module\n      require('babel-preset-fbjs/plugins/inline-requires'),\n      {\n        ...babelPluginOpts,\n        ignoredRequires: options.nonInlinedRequires,\n      },\n    ]);\n  }\n\n  plugins.push([metroTransformPlugins.inlinePlugin, babelPluginOpts]);\n\n  ast = nullthrows(\n    transformFromAstSync(ast, '', {\n      ast: true,\n      babelrc: false,\n      code: false,\n      configFile: false,\n      comments: false,\n      filename: file.filename,\n      plugins,\n      sourceMaps: false,\n      // Not-Cloning the input AST here should be safe because other code paths above this call\n      // are mutating the AST as well and no code is depending on the original AST.\n      // However, switching the flag to false caused issues with ES Modules if `experimentalImportSupport` isn't used https://github.com/facebook/metro/issues/641\n      // either because one of the plugins is doing something funky or Babel messes up some caches.\n      // Make sure to test the above mentioned case before flipping the flag back to false.\n      cloneInputAst: true,\n    }).ast\n  );\n\n  if (!options.dev) {\n    // Run the constant folding plugin in its own pass, avoiding race conditions\n    // with other plugins that have exit() visitors on Program (e.g. the ESM\n    // transform).\n    ast = nullthrows(\n      transformFromAstSync(ast, '', {\n        ast: true,\n        babelrc: false,\n        code: false,\n        configFile: false,\n        comments: false,\n        filename: file.filename,\n        plugins: [[metroTransformPlugins.constantFoldingPlugin, babelPluginOpts]],\n        sourceMaps: false,\n        cloneInputAst: false,\n      }).ast\n    );\n  }\n\n  let dependencyMapName = '';\n  let dependencies;\n  let wrappedAst;\n\n  // If the module to transform is a script (meaning that is not part of the\n  // dependency graph and it code will just be prepended to the bundle modules),\n  // we need to wrap it differently than a commonJS module (also, scripts do\n  // not have dependencies).\n  if (file.type === 'js/script') {\n    dependencies = [];\n    wrappedAst = JsFileWrapping.wrapPolyfill(ast);\n  } else {\n    try {\n      const opts = {\n        asyncRequireModulePath: config.asyncRequireModulePath,\n        dependencyTransformer:\n          config.unstable_disableModuleWrapping === true ? disabledDependencyTransformer : undefined,\n        dynamicRequires: getDynamicDepsBehavior(config.dynamicDepsInPackages, file.filename),\n        inlineableCalls: [importDefault, importAll],\n        keepRequireNames: options.dev,\n        allowOptionalDependencies: config.allowOptionalDependencies,\n        dependencyMapName: config.unstable_dependencyMapReservedName,\n        unstable_allowRequireContext: config.unstable_allowRequireContext,\n      };\n      // $FlowFixMe[unsupported-syntax] dynamic require\n      const collectDependencies = require(config.unstable_collectDependenciesPath);\n      ({ ast, dependencies, dependencyMapName } = collectDependencies(ast, opts));\n    } catch (error) {\n      if (error instanceof InternalInvalidRequireCallError) {\n        throw new InvalidRequireCallError(error, file.filename);\n      }\n      throw error;\n    }\n\n    if (config.unstable_disableModuleWrapping === true) {\n      wrappedAst = ast;\n    } else {\n      ({ ast: wrappedAst } = JsFileWrapping.wrapModule(\n        ast,\n        importDefault,\n        importAll,\n        dependencyMapName,\n        config.globalPrefix\n      ));\n    }\n  }\n\n  const minify =\n    options.minify &&\n    options.unstable_transformProfile !== 'hermes-canary' &&\n    options.unstable_transformProfile !== 'hermes-stable';\n\n  const reserved = [];\n  if (config.unstable_dependencyMapReservedName != null) {\n    reserved.push(config.unstable_dependencyMapReservedName);\n  }\n  if (minify && file.inputFileSize <= config.optimizationSizeLimit && !config.unstable_disableNormalizePseudoGlobals) {\n    reserved.push(\n      ...metroTransformPlugins.normalizePseudoGlobals(wrappedAst, {\n        reservedNames: reserved,\n      })\n    );\n  }\n\n  const result = generate(\n    wrappedAst,\n    {\n      comments: false,\n      compact: config.unstable_compactOutput,\n      filename: file.filename,\n      retainLines: false,\n      sourceFileName: file.filename,\n      sourceMaps: true,\n    },\n    file.code\n  );\n\n  let map = result.rawMappings ? result.rawMappings.map(toSegmentTuple) : [];\n  let code = result.code;\n\n  if (minify) {\n    ({ map, code } = await minifyCode(config, projectRoot, file.filename, result.code, file.code, map, reserved));\n  }\n\n  const output = [\n    {\n      data: {\n        code,\n        lineCount: countLines(code),\n        map,\n        functionMap: file.functionMap,\n      },\n      type: file.type,\n    },\n  ];\n\n  if (options.runtimeBytecodeVersion != null) {\n    output.push({\n      data: compileToBytecode(code, file.type, {\n        sourceURL: file.filename,\n        sourceMap: fromRawMappings([\n          {\n            code,\n            source: file.code,\n            map,\n            functionMap: null,\n            path: file.filename,\n          },\n        ]).toString(),\n      }),\n      type: getBytecodeFileType(file.type),\n    });\n  }\n\n  return {\n    dependencies,\n    output,\n  };\n}\n\n/**\n * Transforms an asset file\n */\nasync function transformAsset(file, context) {\n  const assetTransformer = require('./utils/assetTransformer');\n  const { assetRegistryPath, assetPlugins } = context.config;\n\n  const result = await assetTransformer.transform(\n    getBabelTransformArgs(file, context),\n    assetRegistryPath,\n    assetPlugins\n  );\n\n  const jsFile = {\n    ...file,\n    type: 'js/module/asset',\n    ast: result.ast,\n    functionMap: null,\n  };\n\n  return transformJS(jsFile, context);\n}\n\n/**\n * Transforms a JavaScript file with Babel before processing the file with\n * the generic JavaScript transformation.\n */\nasync function transformJSWithBabel(file, context) {\n  const { babelTransformerPath } = context.config;\n  // $FlowFixMe[unsupported-syntax] dynamic require\n  const transformer = require(babelTransformerPath);\n\n  const transformResult = await transformer.transform(getBabelTransformArgs(file, context));\n\n  const jsFile = {\n    ...file,\n    ast: transformResult.ast,\n    functionMap: transformResult.functionMap ?? null,\n  };\n\n  return await transformJS(jsFile, context);\n}\n\nasync function transformJSON(file, { options, config, projectRoot }) {\n  let code =\n    config.unstable_disableModuleWrapping === true\n      ? JsFileWrapping.jsonToCommonJS(file.code)\n      : JsFileWrapping.wrapJson(file.code, config.globalPrefix);\n  let map = [];\n\n  // TODO: When we can reuse transformJS for JSON, we should not derive `minify` separately.\n  const minify =\n    options.minify &&\n    options.unstable_transformProfile !== 'hermes-canary' &&\n    options.unstable_transformProfile !== 'hermes-stable';\n\n  if (minify) {\n    ({ map, code } = await minifyCode(config, projectRoot, file.filename, code, file.code, map));\n  }\n\n  let jsType;\n\n  if (file.type === 'asset') {\n    jsType = 'js/module/asset';\n  } else if (file.type === 'script') {\n    jsType = 'js/script';\n  } else {\n    jsType = 'js/module';\n  }\n\n  const output = [\n    {\n      data: { code, lineCount: countLines(code), map, functionMap: null },\n      type: jsType,\n    },\n  ];\n\n  if (options.runtimeBytecodeVersion != null) {\n    output.push({\n      data: compileToBytecode(code, jsType, {\n        sourceURL: file.filename,\n        sourceMap: fromRawMappings([\n          {\n            code,\n            source: file.code,\n            map,\n            functionMap: null,\n            path: file.filename,\n          },\n        ]).toString(),\n      }),\n      type: getBytecodeFileType(jsType),\n    });\n  }\n\n  return {\n    dependencies: [],\n    output,\n  };\n}\n\n/**\n * Returns the bytecode type for a file type\n */\nfunction getBytecodeFileType(type) {\n  switch (type) {\n    case 'js/module/asset':\n      return 'bytecode/module/asset';\n    case 'js/script':\n      return 'bytecode/script';\n    default:\n      type;\n      return 'bytecode/module';\n  }\n}\n\nfunction getBabelTransformArgs(file, { options, config, projectRoot }) {\n  const additionalBabelConfig = config.INTERNAL__babelConfig ?? {};\n\n  return {\n    filename: file.filename,\n    options: {\n      ...options,\n      enableBabelRCLookup: config.enableBabelRCLookup,\n      enableBabelRuntime: config.enableBabelRuntime,\n      globalPrefix: config.globalPrefix,\n      hermesParser: config.hermesParser,\n      // Inline requires are now performed at a secondary step. We cannot\n      // unfortunately remove it from the internal transformer, since this one\n      // is used by other tooling, and this would affect it.\n      inlineRequires: false,\n      nonInlinedRequires: [],\n      projectRoot,\n      publicPath: config.publicPath,\n    },\n    // MARK: - GRANITE\n    ...additionalBabelConfig,\n    plugins: additionalBabelConfig?.plugins ?? [],\n    src: file.code,\n  };\n}\n\nmodule.exports = {\n  transform: async (config, projectRoot, filename, data, options) => {\n    const context = {\n      config,\n      projectRoot,\n      options,\n    };\n    const sourceCode = data.toString('utf8');\n\n    const { unstable_dependencyMapReservedName } = config;\n    if (unstable_dependencyMapReservedName != null) {\n      const position = sourceCode.indexOf(unstable_dependencyMapReservedName);\n      if (position > -1) {\n        throw new SyntaxError(\n          'Source code contains the reserved string `' +\n            unstable_dependencyMapReservedName +\n            '` at character offset ' +\n            position\n        );\n      }\n    }\n\n    if (filename.endsWith('.json')) {\n      const jsonFile = {\n        filename,\n        inputFileSize: data.length,\n        code: sourceCode,\n        type: options.type,\n      };\n\n      return await transformJSON(jsonFile, context);\n    }\n\n    if (options.type === 'asset') {\n      const file = {\n        filename,\n        inputFileSize: data.length,\n        code: sourceCode,\n        type: options.type,\n      };\n\n      return await transformAsset(file, context);\n    }\n\n    const file = {\n      filename,\n      inputFileSize: data.length,\n      code: sourceCode,\n      type: options.type === 'script' ? 'js/script' : 'js/module',\n      functionMap: null,\n    };\n\n    return await transformJSWithBabel(file, context);\n  },\n\n  getCacheKey: (config) => {\n    const { babelTransformerPath, minifierPath, unstable_collectDependenciesPath, ...remainingConfig } = config;\n\n    const filesKey = getCacheKey([\n      require.resolve(babelTransformerPath),\n      require.resolve(minifierPath),\n      require.resolve('./utils/getMinifier'),\n      require.resolve('./utils/assetTransformer'),\n      require.resolve(unstable_collectDependenciesPath),\n      // MARK: - GRANITE\n      require.resolve('../../metro/src/ModuleGraph/worker/generateImportNames'),\n      require.resolve('../../metro/src/ModuleGraph/worker/JsFileWrapping'),\n      ...metroTransformPlugins.getTransformPluginCacheKeyFiles(),\n    ]);\n\n    // $FlowFixMe[unsupported-syntax]\n    const babelTransformer = require(babelTransformerPath);\n    return [\n      filesKey,\n      stableHash(remainingConfig).toString('hex'),\n      babelTransformer.getCacheKey ? babelTransformer.getCacheKey() : '',\n    ].join('$');\n  },\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-transform-worker/src/utils/assetTransformer.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *\n * @format\n */\n\n'use strict';\n\n// MARK: - GRANITE\nconst { getAssetData } = require('../../../metro/src/Assets');\nconst { generateAssetCodeFileAst } = require('../../../metro/src/Bundler/util');\nconst path = require('path');\n\nasync function transform({ filename, options, src }, assetRegistryPath, assetDataPlugins) {\n  options = options || {\n    platform: '',\n    projectRoot: '',\n    inlineRequires: false,\n    minify: false,\n  };\n\n  const absolutePath = path.resolve(options.projectRoot, filename);\n\n  const data = await getAssetData(absolutePath, filename, assetDataPlugins, options.platform, options.publicPath);\n\n  return {\n    ast: generateAssetCodeFileAst(assetRegistryPath, data),\n  };\n}\n\nmodule.exports = {\n  transform,\n};\n"
  },
  {
    "path": "packages/mpack/src/vendors/metro-transform-worker/src/utils/getMinifier.js",
    "content": "/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n *       strict-local\n * @format\n */\n\n'use strict';\n\nfunction getMinifier(minifierPath) {\n  // Note: minifierPath should be an absolute path OR a module name here!\n  // The options allow relative paths but they HAVE to be normalized at\n  // any entry point that accepts them...\n  try {\n    // $FlowFixMe TODO t0 cannot do require with literal\n    return require(minifierPath);\n  } catch (e) {\n    throw new Error(\n      'A problem occurred while trying to fetch the minifier. Path: \"' + minifierPath + '\", error message: ' + e.message\n    );\n  }\n}\n\nmodule.exports = getMinifier;\n"
  },
  {
    "path": "packages/mpack/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"emitDeclarationOnly\": true,\n    \"rootDir\": \"./src\",\n    \"outDir\": \"./dist\"\n  },\n  \"exclude\": [\"**/dist/*\", \"**/esm/*\", \"**/*.test.*\", \"**/*.spec.*\", \"**/*.e2e.*\", \"**/fixtures/*\"],\n  \"include\": [\"src\", \"src/vendors/metro-*/**/*.d.ts\"],\n  \"files\": [\"src/vendors/metro-inspector-proxy/src/InspectorProxy.d.ts\"]\n}\n"
  },
  {
    "path": "packages/mpack/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/mpack/tsconfig.spec.json",
    "content": "{\n  \"$schema\": \"http://json.schemastore.org/tsconfig\",\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"isolatedModules\": false\n  },\n  \"include\": [\"**/*.dummies.ts\", \"**/*.spec.ts\", \"**/*.spec.tsx\", \"**/*.test.ts\", \"**/*.test.tsx\"],\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "packages/mpack/tsup.config.mts",
    "content": "import { defineConfig } from 'tsup';\n\nconst RESOLVE_EXTENSION = ['ts', 'js'];\n\nexport default defineConfig({\n  entry: [\n    `src/**/*.{${RESOLVE_EXTENSION.join(',')}}`,\n    '!**/*.{spec,test,stories,d}.*',\n    '!**/fixtures/**',\n    '!**/__snapshots__/**',\n  ],\n  format: ['cjs'],\n  external: ['pnpapi'],\n  dts: false,\n  bundle: false,\n  clean: true,\n});\n"
  },
  {
    "path": "packages/mpack/vendors.d.ts",
    "content": "export * from './dist/vendors';\n"
  },
  {
    "path": "packages/mpack/vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  cacheDir: '.vitest',\n\n  test: {\n    globalSetup: ['./vitest.global-setup.mts'],\n    include: ['src/**/*.spec.ts'],\n    testTimeout: 600_000,\n    hookTimeout: 600_000,\n  },\n});\n"
  },
  {
    "path": "packages/mpack/vitest.global-setup.mts",
    "content": "import path from 'node:path';\nimport execa from 'execa';\n\nconst TARGET_PACKAGE_NAME = '@granite-js/mpack';\n\nconst rootDir = path.resolve(__dirname, '..', '..');\nconst toolsPath = path.resolve(rootDir, 'bin', 'tools');\n\nexport default async () => {\n  console.log('\\n\\n👉 Packing...');\n\n  await execa(toolsPath, ['linked-pack', TARGET_PACKAGE_NAME]);\n  await execa('git', ['checkout', '--', 'packages/*/package.json'], {\n    shell: true,\n    cwd: rootDir,\n  });\n\n  console.log('✅ Global setup completed successfully');\n};\n"
  },
  {
    "path": "packages/native/.scripts/generate-fingerprint.mts",
    "content": "import * as crypto from 'node:crypto';\nimport * as fs from 'node:fs/promises';\nimport * as path from 'node:path';\nimport * as esbuild from 'esbuild';\n\nconst ROOT = path.resolve(import.meta.dirname, '../');\nconst AUTO_GENERATED_COMMENT = '// This file is auto-generated by the generate-fingerprint script.';\n\nconst CJS_TEMPLATE = `\n${AUTO_GENERATED_COMMENT}\nmodule.exports = '$FINGERPRINT';\n`.trim();\n\nconst ESM_TEMPLATE = `\n${AUTO_GENERATED_COMMENT}\nexport default '$FINGERPRINT';\n`.trim();\n\nconst resolvedPackages: Record<string, string> = {};\nconst nativePackages = JSON.parse(await fs.readFile(path.join(ROOT, 'native-packages.json'), 'utf-8')) as string[];\n\ntry {\n  await esbuild.build({\n    bundle: true,\n    treeShaking: false,\n    logLevel: 'silent',\n    format: 'esm',\n    stdin: {\n      contents: `${nativePackages.map((pkg) => `import '${pkg}';`).join('\\n')}`,\n    },\n    plugins: [\n      {\n        name: 'resolve-strict-package-version',\n        setup(build) {\n          const RESOLVING = Symbol();\n\n          build.onResolve({ filter: /.*/ }, async (args) => {\n            if (args.pluginData === RESOLVING) {\n              return;\n            }\n\n            const resolveOptions = {\n              importer: args.importer,\n              kind: args.kind,\n              resolveDir: ROOT,\n              pluginData: RESOLVING,\n            };\n\n            // 1. Try to resolve '{packageName}/package.json'\n            let result = await build.resolve(path.join(args.path, 'package.json'), resolveOptions);\n\n            // 2. If not found, try to resolve '{packageName}'\n            if (result.errors.length) {\n              result = await build.resolve(args.path, resolveOptions);\n            }\n\n            if (result.errors.length) {\n              return result;\n            }\n\n            const packageName = args.path;\n            const packagePath = extractPackagePath(result.path, packageName);\n\n            if (packagePath) {\n              resolvedPackages[packageName] = await getPackageVersion(packagePath);\n            }\n\n            return result;\n          });\n        },\n      },\n    ],\n  });\n} catch (error) {\n  console.error('Failed to resolve package versions:', error);\n  process.exit(1);\n}\n\nfunction extractPackagePath(path: string, packageName: string) {\n  const normalizedPath = path.replace(/\\\\/g, '/');\n\n  if (normalizedPath.endsWith('/package.json')) {\n    return normalizedPath.replace(/\\/package\\.json$/, '');\n  }\n\n  const match = normalizedPath.match(new RegExp(`(.*?node_modules/${packageName})/.*$`));\n\n  if (match) {\n    return match[1]!;\n  }\n\n  throw new Error(`Failed to extract path: ${packageName}`);\n}\n\nasync function getPackageVersion(packagePath: string) {\n  const packageJson = JSON.parse(await fs.readFile(path.join(packagePath, 'package.json'), 'utf-8'));\n\n  return packageJson.version;\n}\n\nconst depsString = Object.entries(resolvedPackages)\n  .map(([pkg, version]) => `${pkg}@${version}`)\n  .join(' ');\nconst fingerprint = crypto.createHash('md5').update(depsString).digest('hex');\n\nconst cjsString = CJS_TEMPLATE.replace('$FINGERPRINT', fingerprint);\nconst esmString = ESM_TEMPLATE.replace('$FINGERPRINT', fingerprint);\n\nconsole.log(`👉 Generated fingerprint: ${fingerprint}`);\n\nawait fs.writeFile(path.join(ROOT, 'fingerprint/index.js'), cjsString, 'utf-8');\nawait fs.writeFile(path.join(ROOT, 'fingerprint/index.mjs'), esmString, 'utf-8');\n\nconsole.log('✅ Done!');\n\nprocess.exit(0);\n"
  },
  {
    "path": "packages/native/.scripts/sync-packages.mts",
    "content": "import { exec } from 'node:child_process';\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\n\nconst SHARED_SERVICE_NAME = '@granite-app/shared';\n\nasync function getPackageJson() {\n  const rawPackageJson = await fs.promises.readFile(path.resolve(import.meta.dirname, '../package.json'), {\n    encoding: 'utf-8',\n  });\n\n  return JSON.parse(rawPackageJson) as {\n    dependencies?: Record<string, string>;\n    devDependencies?: Record<string, string>;\n    exports?: Record<string, any>;\n  };\n}\n\nasync function getSharedPackageJson() {\n  const task = new Promise<string>((resolve, reject) => {\n    exec(`yarn workspace ${SHARED_SERVICE_NAME} exec cat package.json`, (error, stdout) => {\n      if (error) {\n        reject(error);\n        return;\n      }\n\n      resolve(stdout.trim());\n    });\n  });\n\n  const rawPackageJson = await task;\n\n  return JSON.parse(rawPackageJson) as {\n    dependencies?: Record<string, string>;\n    devDependencies?: Record<string, string>;\n  };\n}\n\nconst { dependencies = {}, exports = {} } = await getPackageJson();\nconst { dependencies: baseDependencies = {} } = await getSharedPackageJson();\nconst nativePackages = JSON.parse(\n  await fs.promises.readFile(path.resolve(import.meta.dirname, '../native-packages.json'), 'utf-8')\n) as string[];\nconst nativeDependencies = Object.keys(dependencies);\n\nlet mismatchCount = 0;\n\nconsole.log('Checking native packages...');\nif (!nativePackages.every((nativePackageName) => nativeDependencies.includes(nativePackageName))) {\n  console.error('❗️ Some native packages are not in the native package');\n  process.exit(1);\n} else {\n  console.log('✅ All native packages are in the native package');\n}\n\nconsole.log('Checking exports map...');\nlet hasExportsMapError = false;\nObject.entries(exports).forEach(([subpath, config]) => {\n  const targetDependency = nativeDependencies.find((dependencyName) => dependencyName === subpath.replace(/^\\.\\//, ''));\n\n  if (targetDependency == null) {\n    console.error(`❗️ ${subpath} is not in the exports map`);\n    hasExportsMapError ||= true;\n  }\n\n  if (config.default !== `./src/${targetDependency}/index.d.ts`) {\n    console.error(`❗️ ${targetDependency} is not in the exports map (field: default)`);\n    hasExportsMapError ||= true;\n  }\n\n  if (config.types !== `./dist/${targetDependency}/index.d.ts`) {\n    console.error(`❗️ ${targetDependency} is not in the exports map (field: types)`);\n    hasExportsMapError ||= true;\n  }\n});\n\nif (hasExportsMapError) {\n  process.exit(1);\n}\n\nconsole.log('Checking shared packages...');\nObject.entries(baseDependencies).forEach(([name, baseVersion]) => {\n  if (!(name in dependencies)) {\n    return;\n  }\n\n  const version = dependencies[name];\n  if (version !== baseVersion) {\n    console.error(`❗️ Version mismatch: ${name}@${version} (expect: ${baseVersion})`);\n    mismatchCount++;\n  } else {\n    console.log(`✅ ${name}@${version}`);\n  }\n});\n\nprocess.exit(mismatchCount === 0 ? 0 : 1);\n"
  },
  {
    "path": "packages/native/@react-native-async-storage/async-storage/index.d.ts",
    "content": "export { default } from '../../dist/@react-native-async-storage/async-storage';\nexport * from '../../dist/@react-native-async-storage/async-storage';\n"
  },
  {
    "path": "packages/native/@react-native-async-storage/async-storage/jest/async-storage-mock.d.ts",
    "content": "export { default } from '../../../dist/@react-native-async-storage/async-storage/jest/async-storage-mock';\nexport * from '../../../dist/@react-native-async-storage/async-storage/jest/async-storage-mock';\n"
  },
  {
    "path": "packages/native/@react-native-community/blur.d.ts",
    "content": "export * from '../dist/@react-native-community/blur';\n"
  },
  {
    "path": "packages/native/@react-navigation/elements.d.ts",
    "content": "export * from '../dist/@react-navigation/elements';\n"
  },
  {
    "path": "packages/native/@react-navigation/native-stack.d.ts",
    "content": "export * from '../dist/@react-navigation/native-stack';\n"
  },
  {
    "path": "packages/native/@react-navigation/native.d.ts",
    "content": "export * from '../dist/@react-navigation/native';\n"
  },
  {
    "path": "packages/native/@shopify/flash-list.d.ts",
    "content": "export * from '../dist/@shopify/flash-list';\n"
  },
  {
    "path": "packages/native/CHANGELOG.md",
    "content": "# @granite-js/native\n\n## 1.0.23\n\n### Patch Changes\n\n- d4d3993: feat(brownfield): sep brownfield module\n  - @granite-js/image@1.0.23\n  - @granite-js/lottie@1.0.23\n  - @granite-js/video@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/image@1.0.22\n- @granite-js/lottie@1.0.22\n- @granite-js/video@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/image@1.0.21\n- @granite-js/lottie@1.0.21\n- @granite-js/video@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- 324827a: chore: bump react-navigation\n  - @granite-js/image@1.0.20\n  - @granite-js/lottie@1.0.20\n  - @granite-js/video@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- Updated dependencies [6803c3e]\n  - @granite-js/lottie@1.0.19\n  - @granite-js/image@1.0.19\n  - @granite-js/video@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/image@1.0.18\n- @granite-js/lottie@1.0.18\n- @granite-js/video@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- Updated dependencies [98f8db8]\n- Updated dependencies [c090579]\n  - @granite-js/lottie@1.0.17\n  - @granite-js/video@1.0.17\n  - @granite-js/image@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/image@1.0.16\n- @granite-js/lottie@1.0.16\n- @granite-js/video@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- Updated dependencies [dfa2f63]\n  - @granite-js/video@1.0.15\n  - @granite-js/image@1.0.15\n  - @granite-js/lottie@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- Updated dependencies [4263c41]\n  - @granite-js/video@1.0.14\n  - @granite-js/image@1.0.14\n  - @granite-js/lottie@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- Updated dependencies [4218c46]\n- Updated dependencies [e26b4ea]\n- Updated dependencies [eddab4b]\n- Updated dependencies [dcffed6]\n  - @granite-js/video@1.0.13\n  - @granite-js/image@1.0.13\n  - @granite-js/lottie@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- Updated dependencies [61b8058]\n- Updated dependencies [61b8058]\n  - @granite-js/video@1.0.12\n  - @granite-js/image@1.0.12\n  - @granite-js/lottie@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- Updated dependencies [1ad07a5]\n  - @granite-js/image@1.0.11\n  - @granite-js/lottie@1.0.11\n  - @granite-js/video@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/image@1.0.10\n- @granite-js/lottie@1.0.10\n- @granite-js/video@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/image@1.0.9\n- @granite-js/lottie@1.0.9\n- @granite-js/video@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- Updated dependencies [503118a]\n- Updated dependencies [e059176]\n  - @granite-js/video@1.0.8\n  - @granite-js/image@1.0.8\n  - @granite-js/lottie@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/image@1.0.7\n- @granite-js/lottie@1.0.7\n- @granite-js/video@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- Updated dependencies [93e31cb]\n  - @granite-js/video@1.0.6\n  - @granite-js/image@1.0.6\n  - @granite-js/lottie@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- Updated dependencies [0b77824]\n  - @granite-js/lottie@1.0.5\n  - @granite-js/image@1.0.5\n  - @granite-js/video@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- cc75aa4: fix: default header title should be empty string\n  - @granite-js/image@1.0.4\n  - @granite-js/lottie@1.0.4\n  - @granite-js/video@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/image@1.0.3\n  - @granite-js/lottie@1.0.3\n  - @granite-js/video@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [b325495]\n  - @granite-js/image@1.0.2\n  - @granite-js/lottie@1.0.2\n  - @granite-js/video@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- Updated dependencies [ee26531]\n  - @granite-js/video@1.0.1\n  - @granite-js/image@1.0.1\n  - @granite-js/lottie@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/lottie@1.0.0\n  - @granite-js/image@1.0.0\n  - @granite-js/video@1.0.0\n"
  },
  {
    "path": "packages/native/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/native/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/native\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@babel/core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n2. **@babel/preset-env**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n3. **@babel/preset-typescript**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n4. **@babel/runtime**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n5. **@granite-js/image**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/toss/granite.git\n\t\n6. **@granite-js/lottie**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/anthropics/granite.git\n\t\n7. **@granite-js/video**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/toss/granite.git\n\t\n8. **@react-native-async-storage/async-storage**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/react-native-async-storage/async-storage.git\n\t\n9. **@react-native-community/blur**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/react-native-community/react-native-blur\n\t\n10. **@react-navigation/elements**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/react-navigation/react-navigation.git\n\t\n11. **@react-navigation/native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/react-navigation/react-navigation.git\n\t\n12. **@react-navigation/native-stack**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/react-navigation/react-navigation.git\n\t\n13. **@shopify/flash-list**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/Shopify/flash-list\n\t\n14. **@types/babel__core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n15. **@types/babel__preset-env**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n16. **@types/jest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n17. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n18. **@types/react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n19. **babel-jest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/jestjs/jest.git\n\t\n20. **esbuild**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/evanw/esbuild.git\n\t\n21. **eslint**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/eslint/eslint.git\n\t\n22. **jest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/jestjs/jest.git\n\t\n23. **react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/react.git\n\t\n24. **react-native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/react-native.git\n\t\n25. **react-native-gesture-handler**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/software-mansion/react-native-gesture-handler.git\n\t\n26. **react-native-pager-view**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/callstack/react-native-pager-view\n\t\n27. **react-native-safe-area-context**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/AppAndFlow/react-native-safe-area-context.git\n\t\n28. **react-native-screens**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/software-mansion/react-native-screens.git\n\t\n29. **react-native-svg**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/react-native-community/react-native-svg\n\t\n30. **react-native-webview**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/react-native-webview/react-native-webview.git\n\t\n31. **tsx**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/privatenumber/tsx.git\n\t\n32. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/native/README.md",
    "content": "# @granite-js/native\n\nA native module hub package for Granite\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/native/babel.config.js",
    "content": "module.exports = {\n  presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],\n};\n"
  },
  {
    "path": "packages/native/fingerprint/index.d.ts",
    "content": "declare const fingerprint: string;\n\nexport default fingerprint;\n"
  },
  {
    "path": "packages/native/fingerprint/index.js",
    "content": "// This file is auto-generated by the generate-fingerprint script.\nmodule.exports = '9ffbdcb0e415ea046edcfee5dbfe4c80';"
  },
  {
    "path": "packages/native/fingerprint/index.mjs",
    "content": "// This file is auto-generated by the generate-fingerprint script.\nexport default '9ffbdcb0e415ea046edcfee5dbfe4c80';"
  },
  {
    "path": "packages/native/fingerprint.d.ts",
    "content": "export { default } from './fingerprint/index';\n"
  },
  {
    "path": "packages/native/jest.config.js",
    "content": "const sharedConfig = require('../jest.config.js');\n\n/**\n * @type {import('@jest/types').Config.InitialOptions}\n */\nmodule.exports = {\n  ...sharedConfig,\n  rootDir: __dirname,\n};\n"
  },
  {
    "path": "packages/native/lottie-react-native.d.ts",
    "content": "import LottieView from '@granite-js/lottie';\n\nexport * from '@granite-js/lottie';\nexport { LottieView };\nexport default LottieView;\n"
  },
  {
    "path": "packages/native/native-packages.json",
    "content": "[\n  \"@react-native-async-storage/async-storage\",\n  \"@react-native-community/blur\",\n  \"@react-navigation/elements\",\n  \"@react-navigation/native\",\n  \"@react-navigation/native-stack\",\n  \"@shopify/flash-list\",\n  \"react-native-gesture-handler\",\n  \"react-native-pager-view\",\n  \"react-native-safe-area-context\",\n  \"react-native-screens\",\n  \"react-native-svg\",\n  \"react-native-webview\"\n]\n"
  },
  {
    "path": "packages/native/native.code-workspace",
    "content": "{\n  \"folders\": [\n    {\n      \"path\": \".\",\n    },\n  ],\n  \"settings\": {\n    \"eslint.nodePath\": \"../../.yarn/sdks\",\n    \"typescript.enablePromptUseWorkspaceTsdk\": true,\n    \"typescript.tsdk\": \"../../.yarn/sdks/typescript/lib\",\n    \"prettier.prettierPath\": \"../../.yarn/sdks/prettier/index.cjs\",\n    \"prettier.configPath\": \"../../.prettierrc\",\n    \"jest.enable\": true,\n    \"jest.rootPath\": \".\",\n    \"jest.jestCommandLine\": \"yarn jest\",\n  },\n}\n"
  },
  {
    "path": "packages/native/package.json",
    "content": "{\n  \"name\": \"@granite-js/native\",\n  \"version\": \"1.0.23\",\n  \"description\": \"A native module hub package for Granite\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/native\"\n  },\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"test\": \"yarn jest\",\n    \"lint\": \"eslint .\",\n    \"build\": \"rm -rf dist && yarn generate-fingerprint && tsc -p tsconfig.build.json\",\n    \"sync-packages\": \"tsx --import ./.scripts/sync-packages.mts\",\n    \"generate-fingerprint\": \"tsx -e \\\"import('./.scripts/generate-fingerprint.mts').catch(e=>{console.error(e);process.exit(1)})\\\"\"\n  },\n  \"exports\": {\n    \"./@react-native-async-storage/async-storage\": {\n      \"types\": \"./dist/@react-native-async-storage/async-storage/index.d.ts\",\n      \"default\": \"./src/@react-native-async-storage/async-storage/index.ts\"\n    },\n    \"./@react-native-community/blur\": {\n      \"types\": \"./dist/@react-native-community/blur.d.ts\",\n      \"default\": \"./src/@react-native-community/blur.ts\"\n    },\n    \"./@react-navigation/native\": {\n      \"types\": \"./dist/@react-navigation/native.d.ts\",\n      \"default\": \"./src/@react-navigation/native.ts\"\n    },\n    \"./@react-navigation/native-stack\": {\n      \"types\": \"./dist/@react-navigation/native-stack.d.ts\",\n      \"default\": \"./src/@react-navigation/native-stack.ts\"\n    },\n    \"./@react-navigation/elements\": {\n      \"types\": \"./dist/@react-navigation/elements.d.ts\",\n      \"default\": \"./src/@react-navigation/elements.ts\"\n    },\n    \"./@shopify/flash-list\": {\n      \"types\": \"./dist/@shopify/flash-list.d.ts\",\n      \"default\": \"./src/@shopify/flash-list.ts\"\n    },\n    \"./react-native-webview\": {\n      \"types\": \"./dist/react-native-webview.d.ts\",\n      \"default\": \"./src/react-native-webview.ts\"\n    },\n    \"./lottie-react-native\": {\n      \"types\": \"./dist/lottie-react-native.d.ts\",\n      \"default\": \"./src/lottie-react-native.ts\"\n    },\n    \"./react-native-fast-image\": {\n      \"types\": \"./dist/react-native-fast-image.d.ts\",\n      \"default\": \"./src/react-native-fast-image.ts\"\n    },\n    \"./react-native-video\": {\n      \"types\": \"./dist/react-native-video.d.ts\",\n      \"default\": \"./src/react-native-video.ts\"\n    },\n    \"./react-native-safe-area-context\": {\n      \"types\": \"./dist/react-native-safe-area-context/index.d.ts\",\n      \"default\": \"./src/react-native-safe-area-context/index.ts\"\n    },\n    \"./react-native-safe-area-context/jest/mock\": {\n      \"types\": \"./dist/react-native-safe-area-context/jest/mock.d.ts\",\n      \"default\": \"./src/react-native-safe-area-context/jest/mock.ts\"\n    },\n    \"./react-native-screens\": {\n      \"types\": \"./dist/react-native-screens.d.ts\",\n      \"default\": \"./src/react-native-screens.ts\"\n    },\n    \"./react-native-svg\": {\n      \"types\": \"./dist/react-native-svg.d.ts\",\n      \"default\": \"./src/react-native-svg.ts\"\n    },\n    \"./react-native-gesture-handler\": {\n      \"types\": \"./dist/react-native-gesture-handler/index.d.ts\",\n      \"default\": \"./src/react-native-gesture-handler/index.ts\"\n    },\n    \"./react-native-pager-view\": {\n      \"types\": \"./dist/react-native-pager-view.d.ts\",\n      \"default\": \"./src/react-native-pager-view.ts\"\n    },\n    \"./react-native-gesture-handler/jestSetup\": {\n      \"types\": \"./dist/react-native-gesture-handler/jestSetup.d.ts\",\n      \"default\": \"./src/react-native-gesture-handler/jestSetup.js\"\n    },\n    \"./fingerprint\": {\n      \"types\": \"./fingerprint/index.d.ts\",\n      \"import\": \"./fingerprint/index.mjs\",\n      \"require\": \"./fingerprint/index.js\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"**/*.d.ts\",\n    \"*.d.ts\",\n    \"src\",\n    \"dist\"\n  ],\n  \"dependencies\": {\n    \"@granite-js/image\": \"workspace:*\",\n    \"@granite-js/lottie\": \"workspace:*\",\n    \"@granite-js/video\": \"workspace:*\",\n    \"@react-native-async-storage/async-storage\": \"catalog:react-native\",\n    \"@react-native-community/blur\": \"catalog:react-native\",\n    \"@react-navigation/elements\": \"catalog:react-native\",\n    \"@react-navigation/native\": \"catalog:react-native\",\n    \"@react-navigation/native-stack\": \"catalog:react-native\",\n    \"@shopify/flash-list\": \"catalog:react-native\",\n    \"react-native-gesture-handler\": \"catalog:react-native\",\n    \"react-native-pager-view\": \"catalog:react-native\",\n    \"react-native-safe-area-context\": \"catalog:react-native\",\n    \"react-native-screens\": \"catalog:react-native\",\n    \"react-native-svg\": \"catalog:react-native\",\n    \"react-native-webview\": \"catalog:react-native\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"7.28.5\",\n    \"@babel/preset-env\": \"7.28.5\",\n    \"@babel/preset-typescript\": \"7.28.5\",\n    \"@babel/runtime\": \"7.28.4\",\n    \"@types/babel__core\": \"^7\",\n    \"@types/babel__preset-env\": \"^7\",\n    \"@types/jest\": \"^29.5.12\",\n    \"@types/node\": \"catalog:tools\",\n    \"@types/react\": \"catalog:react-native\",\n    \"babel-jest\": \"^29.7.0\",\n    \"esbuild\": \"0.25.8\",\n    \"eslint\": \"^9.7.0\",\n    \"jest\": \"^29.7.0\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"tsx\": \"^4.20.3\",\n    \"typescript\": \"catalog:tools\"\n  },\n  \"peerDependencies\": {\n    \"@babel/runtime\": \"*\",\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/native/react-native-fast-image.d.ts",
    "content": "export * from '@granite-js/image';\nexport { default } from '@granite-js/image';\n"
  },
  {
    "path": "packages/native/react-native-gesture-handler/index.d.ts",
    "content": "export * from '../dist/react-native-gesture-handler';\n"
  },
  {
    "path": "packages/native/react-native-gesture-handler/jestSetup.d.ts",
    "content": "export * from '../dist/react-native-gesture-handler/jestSetup';\n"
  },
  {
    "path": "packages/native/react-native-pager-view.d.ts",
    "content": "export * from './dist/react-native-pager-view';\nexport { default } from './dist/react-native-pager-view';\n"
  },
  {
    "path": "packages/native/react-native-safe-area-context/index.d.ts",
    "content": "export * from '../dist/react-native-safe-area-context';\n"
  },
  {
    "path": "packages/native/react-native-safe-area-context/jest/mock.d.ts",
    "content": "export { default } from '../../dist/react-native-safe-area-context/jest/mock';\n"
  },
  {
    "path": "packages/native/react-native-screens.d.ts",
    "content": "export * from './dist/react-native-screens';\n"
  },
  {
    "path": "packages/native/react-native-svg.d.ts",
    "content": "export { default } from './dist/react-native-svg';\nexport * from './dist/react-native-svg';\n"
  },
  {
    "path": "packages/native/react-native-video.d.ts",
    "content": "export * from '@granite-js/video';\nexport { default } from '@granite-js/video';\n"
  },
  {
    "path": "packages/native/react-native-webview.d.ts",
    "content": "export { default } from './dist/react-native-webview';\nexport * from './dist/react-native-webview';\n"
  },
  {
    "path": "packages/native/src/@react-native-async-storage/async-storage/index.ts",
    "content": "export { default } from '@react-native-async-storage/async-storage';\nexport * from '@react-native-async-storage/async-storage';\n"
  },
  {
    "path": "packages/native/src/@react-native-async-storage/async-storage/jest/async-storage-mock.ts",
    "content": "import MockedAsyncStorage from '@react-native-async-storage/async-storage/jest/async-storage-mock';\n\nexport default MockedAsyncStorage;\nexport * from '@react-native-async-storage/async-storage/jest/async-storage-mock';\n"
  },
  {
    "path": "packages/native/src/@react-native-community/blur.ts",
    "content": "export * from '@react-native-community/blur';\n"
  },
  {
    "path": "packages/native/src/@react-navigation/elements.ts",
    "content": "export * from '@react-navigation/elements';\n"
  },
  {
    "path": "packages/native/src/@react-navigation/native-stack.ts",
    "content": "export * from '@react-navigation/native-stack';\n"
  },
  {
    "path": "packages/native/src/@react-navigation/native.ts",
    "content": "export * from '@react-navigation/native';\n"
  },
  {
    "path": "packages/native/src/@shopify/flash-list.ts",
    "content": "export * from '@shopify/flash-list';\n"
  },
  {
    "path": "packages/native/src/lottie-react-native.ts",
    "content": "import LottieView from '@granite-js/lottie';\n\nexport * from '@granite-js/lottie';\nexport { LottieView };\nexport default LottieView;\n"
  },
  {
    "path": "packages/native/src/react-native-fast-image.ts",
    "content": "export * from '@granite-js/image';\nexport { default } from '@granite-js/image';\n"
  },
  {
    "path": "packages/native/src/react-native-gesture-handler/index.ts",
    "content": "export * from 'react-native-gesture-handler';\n"
  },
  {
    "path": "packages/native/src/react-native-gesture-handler/jestSetup.js",
    "content": "require('react-native-gesture-handler/jestSetup');\n"
  },
  {
    "path": "packages/native/src/react-native-gesture-handler/jestSetup.ts",
    "content": "import 'react-native-gesture-handler/jestSetup';\n"
  },
  {
    "path": "packages/native/src/react-native-pager-view.ts",
    "content": "import PagerView from 'react-native-pager-view';\n\nexport * from 'react-native-pager-view';\nexport { PagerView };\nexport default PagerView;\n"
  },
  {
    "path": "packages/native/src/react-native-safe-area-context/index.ts",
    "content": "export * from 'react-native-safe-area-context';\n"
  },
  {
    "path": "packages/native/src/react-native-safe-area-context/jest/mock.ts",
    "content": "export { default } from 'react-native-safe-area-context/jest/mock';\n"
  },
  {
    "path": "packages/native/src/react-native-screens.ts",
    "content": "export * from 'react-native-screens';\n"
  },
  {
    "path": "packages/native/src/react-native-svg.ts",
    "content": "export { default } from 'react-native-svg';\nexport * from 'react-native-svg';\n"
  },
  {
    "path": "packages/native/src/react-native-video.ts",
    "content": "export * from '@granite-js/video';\nexport { default } from '@granite-js/video';\n"
  },
  {
    "path": "packages/native/src/react-native-webview.ts",
    "content": "export { default } from 'react-native-webview';\nexport * from 'react-native-webview';\nexport type {\n  AndroidLayerType,\n  AndroidWebViewProps,\n  BasicAuthCredential,\n  CacheMode,\n  CommonNativeWebViewProps,\n  ContentInsetAdjustmentBehavior,\n  ContentInsetProp,\n  ContentMode,\n  DataDetectorTypes,\n  DecelerationRateConstant,\n  FileDownload,\n  FileDownloadEvent,\n  IOSWebViewProps,\n  MediaCapturePermissionGrantType,\n  OnShouldStartLoadWithRequest,\n  OverScrollModeType,\n  RNCWebViewUIManagerAndroid,\n  RNCWebViewUIManagerIOS,\n  ShouldStartLoadRequest,\n  ShouldStartLoadRequestEvent,\n  State,\n  SuppressMenuItem,\n  ViewManager,\n  WebViewCustomMenuItems,\n  WebViewError,\n  WebViewErrorEvent,\n  WebViewEvent,\n  WebViewHttpError,\n  WebViewHttpErrorEvent,\n  WebViewMessage,\n  WebViewMessageEvent,\n  WebViewNativeConfig,\n  WebViewNativeEvent,\n  WebViewNativeProgressEvent,\n  WebViewNavigation,\n  WebViewNavigationEvent,\n  WebViewOpenWindow,\n  WebViewOpenWindowEvent,\n  WebViewProgressEvent,\n  WebViewRenderProcessGoneDetail,\n  WebViewRenderProcessGoneEvent,\n  WebViewScrollEvent,\n  WebViewSharedProps,\n  WebViewSource,\n  WebViewSourceHtml,\n  WebViewSourceUri,\n  WebViewTerminatedEvent,\n} from 'react-native-webview/lib/WebViewTypes';\n"
  },
  {
    "path": "packages/native/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"emitDeclarationOnly\": true,\n    \"rootDir\": \"./src\",\n    \"outDir\": \"./dist\"\n  },\n  \"exclude\": [\"**/dist/*\", \"**/esm/*\", \"**/*.test.*\", \"**/*.spec.*\", \"**/*.e2e.*\", \"**/__fixtures__/*\"],\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/native/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    /* 서드파티 라이브러리 호환을 위해 추가합니다 */\n    \"jsx\": \"react\",\n    \"types\": [\"node\", \"jest\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/naver-map/.gitignore",
    "content": "# OSX\n.DS_Store\n\n# Node\nnode_modules/\nnpm-debug.log\nyarn-error.log\n\n# Build\nlib/\n\n# IDE\n.idea/\n.vscode/\n\n# Example app\nexample/ios/Pods/\nexample/ios/build/\nexample/android/build/\nexample/android/app/build/\nexample/android/.gradle/\nexample/vendor/\n\n# CocoaPods\nios/Pods/\n\n# Gradle\nandroid/.gradle/\nandroid/build/\n\n# Ruby\n*.lock\nvendor/\n\n# Misc\n*.log\n"
  },
  {
    "path": "packages/naver-map/CHANGELOG.md",
    "content": "# @granite-js/naver-map\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n## 1.0.18\n\n## 1.0.17\n\n## 1.0.16\n\n## 1.0.15\n\n## 1.0.14\n\n## 1.0.13\n\n## 1.0.12\n\n## 1.0.11\n\n## 1.0.10\n\n## 1.0.9\n\n## 1.0.8\n\n## 1.0.7\n\n## 1.0.6\n\n## 1.0.5\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "packages/naver-map/GraniteNaverMap.podspec",
    "content": "require \"json\"\n\npackage = JSON.parse(File.read(File.join(__dir__, \"package.json\")))\n\n# ============================================================\n# GraniteNaverMap Default Provider Configuration\n# ============================================================\n# Priority: GRANITE_NAVER_MAP_DEFAULT_PROVIDER > GRANITE_DEFAULT_PROVIDER_ALL > true (default)\n#\n# Examples:\n#   Include default provider (default):\n#     pod install\n#\n#   Exclude default provider for naver-map only:\n#     GRANITE_NAVER_MAP_DEFAULT_PROVIDER=false pod install\n#\n#   Exclude default providers for all Granite packages:\n#     GRANITE_DEFAULT_PROVIDER_ALL=false pod install\n#\n#   Exclude all but override naver-map to include:\n#     GRANITE_DEFAULT_PROVIDER_ALL=false GRANITE_NAVER_MAP_DEFAULT_PROVIDER=true pod install\n# ============================================================\nresolve_default_provider = lambda do |specific_key, fallback_key, default_value|\n  if ENV.key?(specific_key)\n    ENV[specific_key] == 'true'\n  elsif ENV.key?(fallback_key)\n    ENV[fallback_key] == 'true'\n  else\n    default_value\n  end\nend\n\nuse_default_provider = resolve_default_provider.call(\n  'GRANITE_NAVER_MAP_DEFAULT_PROVIDER',\n  'GRANITE_DEFAULT_PROVIDER_ALL',\n  true\n)\n\n# Exclude NMapsMap-dependent files when not using default provider\n# All NMapsMap-dependent files are in ios/builtinProvider/ directory\nexclude_patterns = []\nunless use_default_provider\n  exclude_patterns << \"ios/builtinProvider/**/*\"\nend\n\nPod::Spec.new do |s|\n  s.name         = \"GraniteNaverMap\"\n  s.version      = package[\"version\"]\n  s.summary      = package[\"description\"]\n  s.homepage     = package[\"homepage\"]\n  s.license      = package[\"license\"]\n  s.authors      = package[\"author\"]\n\n  s.platforms    = { :ios => min_ios_version_supported }\n  s.source       = { :git => \"https://github.com/toss/granite.git\", :tag => \"#{s.version}\" }\n\n  s.source_files = \"ios/**/*.{h,m,mm,swift}\"\n  s.exclude_files = exclude_patterns if exclude_patterns.any?\n\n  # Preprocessor definitions for conditional compilation\n  preprocessor_defs = ['$(inherited)']\n  preprocessor_defs << 'GRANITE_NAVER_MAP_DEFAULT_PROVIDER=1' if use_default_provider\n\n  # Swift Active Compilation Conditions\n  swift_flags = ['$(inherited)']\n  swift_flags << 'GRANITE_NAVER_MAP_DEFAULT_PROVIDER' if use_default_provider\n\n  s.pod_target_xcconfig = {\n    'CLANG_ENABLE_MODULES' => 'YES',\n    'DEFINES_MODULE' => 'YES',\n    'SWIFT_OBJC_INTERFACE_HEADER_NAME' => 'GraniteNaverMap-Swift.h',\n    'GCC_PREPROCESSOR_DEFINITIONS' => preprocessor_defs.join(' '),\n    'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => swift_flags.join(' ')\n  }\n\n  # React Native modules dependencies (Fabric/TurboModule)\n  install_modules_dependencies(s)\n\n  # Naver Maps SDK dependency (only when using default provider)\n  s.dependency \"NMapsMap\", \"~> 3.23.0\" if use_default_provider\nend\n"
  },
  {
    "path": "packages/naver-map/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/naver-map\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@granite-js/naver-map**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/toss/granite.git\n\t\n2. **@types/react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n3. **del-cli**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/sindresorhus/del-cli.git\n\t\n4. **eslint**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/eslint/eslint.git\n\t\n5. **react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/react.git\n\t\n6. **react-native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/react-native.git\n\t\n7. **react-native-builder-bob**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/callstack/react-native-builder-bob.git\n\t\n8. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/naver-map/android/build.gradle",
    "content": "buildscript {\n  ext.getExtOrDefault = {name ->\n    return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['GraniteNaverMap_' + name]\n  }\n\n  repositories {\n    google()\n    mavenCentral()\n  }\n\n  dependencies {\n    classpath \"com.android.tools.build:gradle:8.7.2\"\n    // noinspection DifferentKotlinGradleVersion\n    classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}\"\n  }\n}\n\n\napply plugin: \"com.android.library\"\napply plugin: \"kotlin-android\"\n\napply plugin: \"com.facebook.react\"\n\ndef getExtOrIntegerDefault(name) {\n  return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties[\"GraniteNaverMap_\" + name]).toInteger()\n}\n\n// ============================================================\n// GraniteNaverMap Default Provider Configuration\n// ============================================================\n// Priority: Environment Variable > gradle.properties > default (true)\n//\n// Environment Variables:\n//   GRANITE_NAVER_MAP_DEFAULT_PROVIDER - NaverMap specific override\n//   GRANITE_DEFAULT_PROVIDER_ALL - Global default for all Granite packages\n//\n// gradle.properties (alternative):\n//   GRANITE_NAVER_MAP_DEFAULT_PROVIDER=false\n//   GRANITE_DEFAULT_PROVIDER_ALL=false\n//\n// Examples:\n//   Include default provider (default):\n//     ./gradlew assembleDebug\n//\n//   Exclude default provider for naver-map only (env var):\n//     GRANITE_NAVER_MAP_DEFAULT_PROVIDER=false ./gradlew assembleDebug\n//\n//   Exclude default provider via gradle.properties:\n//     # In gradle.properties:\n//     GRANITE_NAVER_MAP_DEFAULT_PROVIDER=false\n//\n//   Exclude all but override naver-map to include:\n//     GRANITE_DEFAULT_PROVIDER_ALL=false GRANITE_NAVER_MAP_DEFAULT_PROVIDER=true ./gradlew assembleDebug\n// ============================================================\ndef resolveDefaultProvider(String specificKey, String fallbackKey, boolean defaultValue) {\n    // Priority: Environment Variable > gradle.properties > default\n\n    // Check specific key\n    def specificEnvValue = System.getenv(specificKey)\n    if (specificEnvValue != null) {\n        return specificEnvValue == 'true'\n    }\n    def specificPropValue = project.findProperty(specificKey)\n    if (specificPropValue != null) {\n        return specificPropValue.toString() == 'true'\n    }\n\n    // Check fallback key\n    def fallbackEnvValue = System.getenv(fallbackKey)\n    if (fallbackEnvValue != null) {\n        return fallbackEnvValue == 'true'\n    }\n    def fallbackPropValue = project.findProperty(fallbackKey)\n    if (fallbackPropValue != null) {\n        return fallbackPropValue.toString() == 'true'\n    }\n\n    return defaultValue\n}\n\ndef includeDefaultProvider = resolveDefaultProvider(\n    'GRANITE_NAVER_MAP_DEFAULT_PROVIDER',\n    'GRANITE_DEFAULT_PROVIDER_ALL',\n    true\n)\n\nandroid {\n  namespace \"run.granite.navermap\"\n\n  compileSdkVersion getExtOrIntegerDefault(\"compileSdkVersion\")\n\n  defaultConfig {\n    minSdkVersion getExtOrIntegerDefault(\"minSdkVersion\")\n    targetSdkVersion getExtOrIntegerDefault(\"targetSdkVersion\")\n\n    // Pass build config flag for conditional compilation\n    buildConfigField \"boolean\", \"INCLUDE_DEFAULT_PROVIDER\", \"${includeDefaultProvider}\"\n  }\n\n  buildFeatures {\n    buildConfig true\n  }\n\n  buildTypes {\n    release {\n      minifyEnabled false\n    }\n  }\n\n  lintOptions {\n    disable \"GradleCompatible\"\n  }\n\n  compileOptions {\n    sourceCompatibility JavaVersion.VERSION_1_8\n    targetCompatibility JavaVersion.VERSION_1_8\n  }\n\n  sourceSets {\n    main {\n      java.srcDirs += [\n        \"generated/java\",\n        \"generated/jni\"\n      ]\n\n      // Conditionally include the builtinProvider directory containing BuiltInGraniteNaverMapProvider\n      if (includeDefaultProvider) {\n        java.srcDirs += \"src/builtinProvider/java\"\n      }\n\n      // Include the appropriate ViewManager based on architecture\n      def isNewArchitectureEnabled = rootProject.findProperty(\"newArchEnabled\")?.toBoolean() ?: false\n      if (isNewArchitectureEnabled) {\n        java.srcDirs += \"src/newarch/java\"\n      } else {\n        java.srcDirs += \"src/oldarch/java\"\n      }\n    }\n  }\n}\n\nrepositories {\n  mavenCentral()\n  google()\n  maven {\n    url 'https://repository.map.naver.com/archive/maven'\n  }\n}\n\ndef kotlin_version = getExtOrDefault(\"kotlinVersion\")\n\ndependencies {\n  implementation \"com.facebook.react:react-android\"\n  implementation \"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version\"\n\n  // Naver Maps SDK (only included when default provider is enabled)\n  if (includeDefaultProvider) {\n    implementation \"com.naver.maps:map-sdk:3.21.0\"\n  }\n}\n"
  },
  {
    "path": "packages/naver-map/android/gradle.properties",
    "content": "GraniteImage_kotlinVersion=2.0.21\nGraniteImage_minSdkVersion=24\nGraniteImage_targetSdkVersion=34\nGraniteImage_compileSdkVersion=35\nGraniteImage_ndkVersion=27.1.12297006\n"
  },
  {
    "path": "packages/naver-map/android/src/builtinProvider/java/run/granite/navermap/builtinProvider/BuiltInGraniteNaverMapProvider.kt",
    "content": "package run.granite.navermap.builtinProvider\n\nimport android.content.Context\nimport run.granite.navermap.GraniteNaverMapProvider\nimport run.granite.navermap.GraniteNaverMapProviderFactory\nimport run.granite.navermap.GraniteNaverMapProviderDelegate\nimport run.granite.navermap.GraniteNaverMapCameraPosition\nimport run.granite.navermap.GraniteNaverMapCoordinate\nimport run.granite.navermap.GraniteNaverMapBounds\nimport run.granite.navermap.GraniteNaverMapType\nimport run.granite.navermap.GraniteNaverMapLocationTrackingMode\nimport run.granite.navermap.GraniteNaverMapMarkerData\nimport run.granite.navermap.GraniteNaverMapPolylineData\nimport run.granite.navermap.GraniteNaverMapPolygonData\nimport run.granite.navermap.GraniteNaverMapCircleData\nimport run.granite.navermap.GraniteNaverMapPathData\nimport android.graphics.BitmapFactory\nimport android.view.View\nimport android.widget.FrameLayout\nimport com.naver.maps.geometry.LatLng\nimport com.naver.maps.geometry.LatLngBounds\nimport com.naver.maps.map.CameraAnimation\nimport com.naver.maps.map.CameraPosition\nimport com.naver.maps.map.CameraUpdate\nimport com.naver.maps.map.LocationTrackingMode\nimport com.naver.maps.map.MapView\nimport com.naver.maps.map.NaverMap\nimport com.naver.maps.map.NaverMapOptions\nimport com.naver.maps.map.overlay.Marker\nimport com.naver.maps.map.overlay.OverlayImage\nimport com.naver.maps.map.overlay.PolylineOverlay\nimport com.naver.maps.map.overlay.PolygonOverlay\nimport com.naver.maps.map.overlay.CircleOverlay\nimport com.naver.maps.map.overlay.PathOverlay\nimport java.net.URL\nimport kotlin.concurrent.thread\n\n/**\n * Factory for creating BuiltInGraniteNaverMapProvider instances.\n * Each call to createProvider() returns a new instance.\n */\nclass BuiltInGraniteNaverMapProviderFactory : GraniteNaverMapProviderFactory {\n    override fun createProvider(context: Context): GraniteNaverMapProvider {\n        return BuiltInGraniteNaverMapProvider(context)\n    }\n}\n\n/**\n * Built-in provider using NMapsMap SDK\n */\nclass BuiltInGraniteNaverMapProvider(private val context: Context) : GraniteNaverMapProvider {\n    private var containerView: FrameLayout? = null\n    private var mapView: MapView? = null\n    private var naverMap: NaverMap? = null\n    private var delegate: GraniteNaverMapProviderDelegate? = null\n    private var mapReady = false\n    private var mapInitialized = false\n\n    private val density = context.resources.displayMetrics.density\n\n    private val markers: MutableMap<String, Marker> = mutableMapOf()\n    private val polylines: MutableMap<String, PolylineOverlay> = mutableMapOf()\n    private val polygons: MutableMap<String, PolygonOverlay> = mutableMapOf()\n    private val circles: MutableMap<String, CircleOverlay> = mutableMapOf()\n    private val paths: MutableMap<String, PathOverlay> = mutableMapOf()\n\n    private fun dpToPx(dp: Int): Int = (dp * density).toInt()\n    private fun dpToPx(dp: Float): Int = (dp * density).toInt()\n\n    override fun createMapView(context: Context): View {\n        val container = FrameLayout(context)\n        containerView = container\n\n        val map = MapView(context, NaverMapOptions())\n        mapView = map\n        container.addView(map, FrameLayout.LayoutParams(\n            FrameLayout.LayoutParams.MATCH_PARENT,\n            FrameLayout.LayoutParams.MATCH_PARENT\n        ))\n\n        return container\n    }\n\n    override fun setDelegate(delegate: GraniteNaverMapProviderDelegate?) {\n        this.delegate = delegate\n    }\n\n    override fun onAttachedToWindow() {\n        // Lifecycle is handled in onSizeChanged\n    }\n\n    override fun onDetachedFromWindow() {\n        mapView?.onPause()\n        mapView?.onStop()\n        mapView?.onDestroy()\n    }\n\n    override fun onSizeChanged(width: Int, height: Int) {\n        if (!mapInitialized && width > 0 && height > 0) {\n            mapInitialized = true\n            initializeMap()\n        }\n    }\n\n    override fun onHostResume() {\n        if (mapReady) {\n            mapView?.onResume()\n        }\n    }\n\n    override fun onHostPause() {\n        if (mapReady) {\n            mapView?.onPause()\n        }\n    }\n\n    private fun initializeMap() {\n        mapView?.onCreate(null)\n        mapView?.onStart()\n        mapView?.onResume()\n\n        mapView?.getMapAsync { map ->\n            naverMap = map\n            mapReady = true\n            setupMapListeners(map)\n            delegate?.onMapInitialized()\n        }\n    }\n\n    private fun setupMapListeners(map: NaverMap) {\n        map.addOnCameraIdleListener {\n            val position = map.cameraPosition\n            val contentBounds = map.contentBounds\n            val coveringBounds = map.coveringBounds\n\n            val cameraPos = GraniteNaverMapCameraPosition(\n                target = GraniteNaverMapCoordinate(position.target.latitude, position.target.longitude),\n                zoom = position.zoom,\n                tilt = position.tilt,\n                bearing = position.bearing\n            )\n\n            val contentRegion = listOf(\n                GraniteNaverMapCoordinate(contentBounds.southLatitude, contentBounds.westLongitude),\n                GraniteNaverMapCoordinate(contentBounds.southLatitude, contentBounds.eastLongitude),\n                GraniteNaverMapCoordinate(contentBounds.northLatitude, contentBounds.eastLongitude),\n                GraniteNaverMapCoordinate(contentBounds.northLatitude, contentBounds.westLongitude)\n            )\n\n            val coveringRegion = listOf(\n                GraniteNaverMapCoordinate(coveringBounds.southLatitude, coveringBounds.westLongitude),\n                GraniteNaverMapCoordinate(coveringBounds.southLatitude, coveringBounds.eastLongitude),\n                GraniteNaverMapCoordinate(coveringBounds.northLatitude, coveringBounds.eastLongitude),\n                GraniteNaverMapCoordinate(coveringBounds.northLatitude, coveringBounds.westLongitude)\n            )\n\n            delegate?.onCameraChange(cameraPos, contentRegion, coveringRegion)\n        }\n\n        map.addOnCameraChangeListener { reason, animated ->\n            delegate?.onTouch(reason, animated)\n        }\n\n        map.setOnMapClickListener { point, latLng ->\n            delegate?.onClick(point.x.toDouble(), point.y.toDouble(), latLng.latitude, latLng.longitude)\n        }\n    }\n\n    // MARK: - Camera\n\n    override fun moveCamera(position: GraniteNaverMapCameraPosition, animated: Boolean) {\n        val cameraPosition = CameraPosition(\n            LatLng(position.target.latitude, position.target.longitude),\n            position.zoom,\n            position.tilt,\n            position.bearing\n        )\n        val update = CameraUpdate.toCameraPosition(cameraPosition)\n        if (animated) {\n            update.animate(CameraAnimation.Easing)\n        }\n        naverMap?.moveCamera(update)\n    }\n\n    override fun animateToCoordinate(coordinate: GraniteNaverMapCoordinate) {\n        naverMap?.moveCamera(\n            CameraUpdate.scrollTo(LatLng(coordinate.latitude, coordinate.longitude))\n                .animate(CameraAnimation.Easing)\n        )\n    }\n\n    override fun animateToBounds(bounds: GraniteNaverMapBounds, padding: Int) {\n        val latLngBounds = LatLngBounds(\n            LatLng(bounds.southWest.latitude, bounds.southWest.longitude),\n            LatLng(bounds.northEast.latitude, bounds.northEast.longitude)\n        )\n        naverMap?.moveCamera(\n            CameraUpdate.fitBounds(latLngBounds, padding)\n                .animate(CameraAnimation.Easing)\n        )\n    }\n\n    // MARK: - Map Properties\n\n    override fun setMapType(type: GraniteNaverMapType) {\n        naverMap?.mapType = when (type) {\n            GraniteNaverMapType.BASIC -> NaverMap.MapType.Basic\n            GraniteNaverMapType.NAVI -> NaverMap.MapType.Navi\n            GraniteNaverMapType.SATELLITE -> NaverMap.MapType.Satellite\n            GraniteNaverMapType.HYBRID -> NaverMap.MapType.Hybrid\n            GraniteNaverMapType.TERRAIN -> NaverMap.MapType.Terrain\n            GraniteNaverMapType.NONE -> NaverMap.MapType.None\n        }\n    }\n\n    override fun setMapPadding(top: Int, left: Int, bottom: Int, right: Int) {\n        naverMap?.setContentPadding(left, top, right, bottom)\n    }\n\n    override fun setCompassEnabled(enabled: Boolean) {\n        naverMap?.uiSettings?.isCompassEnabled = enabled\n    }\n\n    override fun setScaleBarEnabled(enabled: Boolean) {\n        naverMap?.uiSettings?.isScaleBarEnabled = enabled\n    }\n\n    override fun setZoomControlEnabled(enabled: Boolean) {\n        naverMap?.uiSettings?.isZoomControlEnabled = enabled\n    }\n\n    override fun setLocationButtonEnabled(enabled: Boolean) {\n        naverMap?.uiSettings?.isLocationButtonEnabled = enabled\n    }\n\n    override fun setBuildingHeight(height: Float) {\n        naverMap?.buildingHeight = height\n    }\n\n    override fun setNightModeEnabled(enabled: Boolean) {\n        naverMap?.isNightModeEnabled = enabled\n    }\n\n    override fun setMinZoomLevel(level: Double) {\n        naverMap?.minZoom = level\n    }\n\n    override fun setMaxZoomLevel(level: Double) {\n        naverMap?.maxZoom = level\n    }\n\n    override fun setScrollGesturesEnabled(enabled: Boolean) {\n        naverMap?.uiSettings?.isScrollGesturesEnabled = enabled\n    }\n\n    override fun setZoomGesturesEnabled(enabled: Boolean) {\n        naverMap?.uiSettings?.isZoomGesturesEnabled = enabled\n    }\n\n    override fun setTiltGesturesEnabled(enabled: Boolean) {\n        naverMap?.uiSettings?.isTiltGesturesEnabled = enabled\n    }\n\n    override fun setRotateGesturesEnabled(enabled: Boolean) {\n        naverMap?.uiSettings?.isRotateGesturesEnabled = enabled\n    }\n\n    override fun setStopGesturesEnabled(enabled: Boolean) {\n        naverMap?.uiSettings?.isStopGesturesEnabled = enabled\n    }\n\n    override fun setLocationTrackingMode(mode: GraniteNaverMapLocationTrackingMode) {\n        naverMap?.locationTrackingMode = when (mode) {\n            GraniteNaverMapLocationTrackingMode.NONE -> LocationTrackingMode.None\n            GraniteNaverMapLocationTrackingMode.NO_FOLLOW -> LocationTrackingMode.NoFollow\n            GraniteNaverMapLocationTrackingMode.FOLLOW -> LocationTrackingMode.Follow\n            GraniteNaverMapLocationTrackingMode.FACE -> LocationTrackingMode.Face\n        }\n    }\n\n    override fun setLayerGroupEnabled(group: String, enabled: Boolean) {\n        val layerGroup = when (group) {\n            \"building\" -> NaverMap.LAYER_GROUP_BUILDING\n            \"ctt\" -> NaverMap.LAYER_GROUP_TRAFFIC\n            \"transit\" -> NaverMap.LAYER_GROUP_TRANSIT\n            \"bike\" -> NaverMap.LAYER_GROUP_BICYCLE\n            \"mountain\" -> NaverMap.LAYER_GROUP_MOUNTAIN\n            \"landparcel\" -> NaverMap.LAYER_GROUP_CADASTRAL\n            else -> return\n        }\n        naverMap?.setLayerGroupEnabled(layerGroup, enabled)\n    }\n\n    // MARK: - Markers\n\n    override fun addMarker(data: GraniteNaverMapMarkerData) {\n        val map = naverMap ?: return\n\n        val marker = Marker().apply {\n            position = LatLng(data.coordinate.latitude, data.coordinate.longitude)\n            if (data.zIndex != 0) zIndex = data.zIndex\n            if (data.rotation != 0f) angle = data.rotation\n            isFlat = data.flat\n            alpha = data.alpha\n\n            if (data.pinColor != 0 && (data.pinColor ushr 24) != 0) {\n                iconTintColor = data.pinColor\n            }\n\n            if (data.image.isNotEmpty()) {\n                loadMarkerImage(this, data.image)\n                if (data.width > 0) width = dpToPx(data.width)\n                if (data.height > 0) height = dpToPx(data.height)\n            }\n\n            setOnClickListener {\n                delegate?.onMarkerClick(data.identifier)\n                true\n            }\n\n            this.map = map\n        }\n\n        markers[data.identifier] = marker\n    }\n\n    override fun updateMarker(data: GraniteNaverMapMarkerData) {\n        markers[data.identifier]?.apply {\n            position = LatLng(data.coordinate.latitude, data.coordinate.longitude)\n            if (data.width > 0) width = dpToPx(data.width)\n            if (data.height > 0) height = dpToPx(data.height)\n            zIndex = data.zIndex\n            angle = data.rotation\n            isFlat = data.flat\n            alpha = data.alpha\n            if (data.pinColor != 0) iconTintColor = data.pinColor\n            if (data.image.isNotEmpty()) loadMarkerImage(this, data.image)\n        }\n    }\n\n    override fun removeMarker(identifier: String) {\n        markers[identifier]?.map = null\n        markers.remove(identifier)\n    }\n\n    private fun loadMarkerImage(marker: Marker, url: String) {\n        thread {\n            try {\n                val connection = URL(url).openConnection()\n                connection.connect()\n                val inputStream = connection.getInputStream()\n                val bitmap = BitmapFactory.decodeStream(inputStream)\n                inputStream.close()\n\n                containerView?.post {\n                    marker.icon = OverlayImage.fromBitmap(bitmap)\n                }\n            } catch (e: Exception) {\n                e.printStackTrace()\n            }\n        }\n    }\n\n    // MARK: - Polylines\n\n    private fun lineCapType(type: Int): PolylineOverlay.LineCap {\n        return when (type) {\n            1 -> PolylineOverlay.LineCap.Round\n            2 -> PolylineOverlay.LineCap.Square\n            else -> PolylineOverlay.LineCap.Butt\n        }\n    }\n\n    private fun lineJoinType(type: Int): PolylineOverlay.LineJoin {\n        return when (type) {\n            1 -> PolylineOverlay.LineJoin.Round\n            2 -> PolylineOverlay.LineJoin.Bevel\n            else -> PolylineOverlay.LineJoin.Miter\n        }\n    }\n\n    override fun addPolyline(data: GraniteNaverMapPolylineData) {\n        val map = naverMap ?: return\n        val coords = data.coordinates.map { LatLng(it.latitude, it.longitude) }\n        if (coords.size < 2) return\n\n        val polyline = PolylineOverlay().apply {\n            this.coords = coords\n            width = dpToPx(data.strokeWidth)\n            color = data.strokeColor\n            zIndex = data.zIndex\n            capType = lineCapType(data.lineCap)\n            joinType = lineJoinType(data.lineJoin)\n            if (data.pattern.isNotEmpty()) {\n                setPattern(*data.pattern.toIntArray())\n            }\n            this.map = map\n        }\n\n        polylines[data.identifier] = polyline\n    }\n\n    override fun updatePolyline(data: GraniteNaverMapPolylineData) {\n        val polyline = polylines[data.identifier] ?: return\n        val coords = data.coordinates.map { LatLng(it.latitude, it.longitude) }\n        if (coords.size >= 2) {\n            polyline.coords = coords\n        }\n        polyline.width = dpToPx(data.strokeWidth)\n        polyline.color = data.strokeColor\n        polyline.zIndex = data.zIndex\n        polyline.capType = lineCapType(data.lineCap)\n        polyline.joinType = lineJoinType(data.lineJoin)\n        if (data.pattern.isNotEmpty()) {\n            polyline.setPattern(*data.pattern.toIntArray())\n        }\n    }\n\n    override fun removePolyline(identifier: String) {\n        polylines[identifier]?.map = null\n        polylines.remove(identifier)\n    }\n\n    // MARK: - Polygons\n\n    override fun addPolygon(data: GraniteNaverMapPolygonData) {\n        val map = naverMap ?: return\n        val coords = data.coordinates.map { LatLng(it.latitude, it.longitude) }\n        if (coords.size < 3) return\n\n        val polygon = PolygonOverlay().apply {\n            this.coords = coords\n            if (data.holes.isNotEmpty()) {\n                this.holes = data.holes.map { hole ->\n                    hole.map { LatLng(it.latitude, it.longitude) }\n                }\n            }\n            color = data.fillColor\n            outlineColor = data.strokeColor\n            outlineWidth = dpToPx(data.strokeWidth)\n            zIndex = data.zIndex\n            this.map = map\n        }\n\n        polygons[data.identifier] = polygon\n    }\n\n    override fun updatePolygon(data: GraniteNaverMapPolygonData) {\n        val polygon = polygons[data.identifier] ?: return\n        val coords = data.coordinates.map { LatLng(it.latitude, it.longitude) }\n        if (coords.size >= 3) {\n            polygon.coords = coords\n        }\n        if (data.holes.isNotEmpty()) {\n            polygon.holes = data.holes.map { hole ->\n                hole.map { LatLng(it.latitude, it.longitude) }\n            }\n        }\n        polygon.color = data.fillColor\n        polygon.outlineColor = data.strokeColor\n        polygon.outlineWidth = dpToPx(data.strokeWidth)\n        polygon.zIndex = data.zIndex\n    }\n\n    override fun removePolygon(identifier: String) {\n        polygons[identifier]?.map = null\n        polygons.remove(identifier)\n    }\n\n    // MARK: - Circles\n\n    override fun addCircle(data: GraniteNaverMapCircleData) {\n        val map = naverMap ?: return\n\n        val circle = CircleOverlay().apply {\n            center = LatLng(data.center.latitude, data.center.longitude)\n            radius = data.radius\n            color = data.fillColor\n            outlineColor = data.strokeColor\n            outlineWidth = dpToPx(data.strokeWidth)\n            zIndex = data.zIndex\n            this.map = map\n        }\n\n        circles[data.identifier] = circle\n    }\n\n    override fun updateCircle(data: GraniteNaverMapCircleData) {\n        val circle = circles[data.identifier] ?: return\n        circle.center = LatLng(data.center.latitude, data.center.longitude)\n        circle.radius = data.radius\n        circle.color = data.fillColor\n        circle.outlineColor = data.strokeColor\n        circle.outlineWidth = dpToPx(data.strokeWidth)\n        circle.zIndex = data.zIndex\n    }\n\n    override fun removeCircle(identifier: String) {\n        circles[identifier]?.map = null\n        circles.remove(identifier)\n    }\n\n    // MARK: - Paths\n\n    override fun addPath(data: GraniteNaverMapPathData) {\n        val map = naverMap ?: return\n        val coords = data.coordinates.map { LatLng(it.latitude, it.longitude) }\n        if (coords.size < 2) return\n\n        val path = PathOverlay().apply {\n            this.coords = coords\n            width = dpToPx(data.width)\n            outlineWidth = dpToPx(data.outlineWidth)\n            color = data.color\n            outlineColor = data.outlineColor\n            passedColor = data.passedColor\n            passedOutlineColor = data.passedOutlineColor\n            progress = data.progress.toDouble()\n            zIndex = data.zIndex\n            if (data.patternInterval > 0) {\n                patternInterval = data.patternInterval\n            }\n            this.map = map\n        }\n\n        paths[data.identifier] = path\n    }\n\n    override fun updatePath(data: GraniteNaverMapPathData) {\n        val path = paths[data.identifier] ?: return\n        val coords = data.coordinates.map { LatLng(it.latitude, it.longitude) }\n        if (coords.size >= 2) {\n            path.coords = coords\n        }\n        path.width = dpToPx(data.width)\n        path.outlineWidth = dpToPx(data.outlineWidth)\n        path.color = data.color\n        path.outlineColor = data.outlineColor\n        path.passedColor = data.passedColor\n        path.passedOutlineColor = data.passedOutlineColor\n        path.progress = data.progress.toDouble()\n        path.zIndex = data.zIndex\n    }\n\n    override fun removePath(identifier: String) {\n        paths[identifier]?.map = null\n        paths.remove(identifier)\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/android/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n</manifest>\n"
  },
  {
    "path": "packages/naver-map/android/src/main/java/run/granite/navermap/GraniteNaverMapEvents.kt",
    "content": "package run.granite.navermap\n\nimport com.facebook.react.bridge.Arguments\nimport com.facebook.react.bridge.WritableMap\nimport com.facebook.react.uimanager.events.Event\n\nclass GraniteNaverMapInitializedEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteNaverMapInitializedEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"onInitialized\"\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n\nclass GraniteNaverMapCameraChangeEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val latitude: Double,\n    private val longitude: Double,\n    private val zoom: Double,\n    private val contentRegion: List<GraniteNaverMapCoordinate>,\n    private val coveringRegion: List<GraniteNaverMapCoordinate>\n) : Event<GraniteNaverMapCameraChangeEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"onCameraChange\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putDouble(\"latitude\", latitude)\n        putDouble(\"longitude\", longitude)\n        putDouble(\"zoom\", zoom)\n\n        val contentArray = Arguments.createArray().apply {\n            contentRegion.forEach { coord ->\n                pushMap(Arguments.createMap().apply {\n                    putDouble(\"latitude\", coord.latitude)\n                    putDouble(\"longitude\", coord.longitude)\n                })\n            }\n        }\n        putArray(\"contentRegion\", contentArray)\n\n        val coveringArray = Arguments.createArray().apply {\n            coveringRegion.forEach { coord ->\n                pushMap(Arguments.createMap().apply {\n                    putDouble(\"latitude\", coord.latitude)\n                    putDouble(\"longitude\", coord.longitude)\n                })\n            }\n        }\n        putArray(\"coveringRegion\", coveringArray)\n    }\n}\n\nclass GraniteNaverMapTouchEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val reason: Int,\n    private val animated: Boolean\n) : Event<GraniteNaverMapTouchEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"onTouch\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putInt(\"reason\", reason)\n        putBoolean(\"animated\", animated)\n    }\n}\n\nclass GraniteNaverMapClickEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val x: Double,\n    private val y: Double,\n    private val latitude: Double,\n    private val longitude: Double\n) : Event<GraniteNaverMapClickEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"onMapClick\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putDouble(\"x\", x)\n        putDouble(\"y\", y)\n        putDouble(\"latitude\", latitude)\n        putDouble(\"longitude\", longitude)\n    }\n}\n\nclass GraniteNaverMapMarkerClickEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val markerId: String\n) : Event<GraniteNaverMapMarkerClickEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"onMarkerClick\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putString(\"id\", markerId)\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/android/src/main/java/run/granite/navermap/GraniteNaverMapPackage.kt",
    "content": "package run.granite.navermap\n\nimport com.facebook.react.ReactPackage\nimport com.facebook.react.bridge.NativeModule\nimport com.facebook.react.bridge.ReactApplicationContext\nimport com.facebook.react.uimanager.ViewManager\n\nclass GraniteNaverMapPackage : ReactPackage {\n    override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {\n        return emptyList()\n    }\n\n    override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {\n        return listOf(GraniteNaverMapViewManager())\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/android/src/main/java/run/granite/navermap/GraniteNaverMapProvider.kt",
    "content": "package run.granite.navermap\n\nimport android.content.Context\nimport android.view.View\n\n/**\n * Data class for map coordinates\n */\ndata class GraniteNaverMapCoordinate(\n    val latitude: Double,\n    val longitude: Double\n)\n\n/**\n * Data class for camera position\n */\ndata class GraniteNaverMapCameraPosition(\n    val target: GraniteNaverMapCoordinate,\n    val zoom: Double,\n    val tilt: Double = 0.0,\n    val bearing: Double = 0.0\n)\n\n/**\n * Data class for bounds\n */\ndata class GraniteNaverMapBounds(\n    val southWest: GraniteNaverMapCoordinate,\n    val northEast: GraniteNaverMapCoordinate\n)\n\n/**\n * Map type enum\n */\nenum class GraniteNaverMapType {\n    BASIC, NAVI, SATELLITE, HYBRID, TERRAIN, NONE\n}\n\n/**\n * Location tracking mode enum\n */\nenum class GraniteNaverMapLocationTrackingMode {\n    NONE, NO_FOLLOW, FOLLOW, FACE\n}\n\n/**\n * Marker data\n */\ndata class GraniteNaverMapMarkerData(\n    val identifier: String,\n    val coordinate: GraniteNaverMapCoordinate,\n    val width: Int,\n    val height: Int,\n    val zIndex: Int,\n    val rotation: Float,\n    val flat: Boolean,\n    val alpha: Float,\n    val pinColor: Int,\n    val image: String\n)\n\n/**\n * Polyline data\n */\ndata class GraniteNaverMapPolylineData(\n    val identifier: String,\n    val coordinates: List<GraniteNaverMapCoordinate>,\n    val strokeWidth: Float,\n    val strokeColor: Int,\n    val zIndex: Int,\n    val lineCap: Int,\n    val lineJoin: Int,\n    val pattern: List<Int>\n)\n\n/**\n * Polygon data\n */\ndata class GraniteNaverMapPolygonData(\n    val identifier: String,\n    val coordinates: List<GraniteNaverMapCoordinate>,\n    val holes: List<List<GraniteNaverMapCoordinate>>,\n    val fillColor: Int,\n    val strokeColor: Int,\n    val strokeWidth: Float,\n    val zIndex: Int\n)\n\n/**\n * Circle data\n */\ndata class GraniteNaverMapCircleData(\n    val identifier: String,\n    val center: GraniteNaverMapCoordinate,\n    val radius: Double,\n    val fillColor: Int,\n    val strokeColor: Int,\n    val strokeWidth: Float,\n    val zIndex: Int\n)\n\n/**\n * Path data\n */\ndata class GraniteNaverMapPathData(\n    val identifier: String,\n    val coordinates: List<GraniteNaverMapCoordinate>,\n    val width: Float,\n    val outlineWidth: Float,\n    val color: Int,\n    val outlineColor: Int,\n    val passedColor: Int,\n    val passedOutlineColor: Int,\n    val patternImage: String,\n    val patternInterval: Int,\n    val progress: Float,\n    val zIndex: Int\n)\n\n/**\n * Provider delegate interface for map events\n */\ninterface GraniteNaverMapProviderDelegate {\n    fun onMapInitialized()\n    fun onCameraChange(position: GraniteNaverMapCameraPosition, contentRegion: List<GraniteNaverMapCoordinate>, coveringRegion: List<GraniteNaverMapCoordinate>)\n    fun onTouch(reason: Int, animated: Boolean)\n    fun onClick(x: Double, y: Double, latitude: Double, longitude: Double)\n    fun onMarkerClick(id: String)\n}\n\n/**\n * Factory interface for creating NaverMap providers.\n * Each call to createProvider() should return a new instance.\n *\n * Brownfield apps can implement this interface to provide their own map implementation.\n */\ninterface GraniteNaverMapProviderFactory {\n    /**\n     * Create a new provider instance.\n     * This should be called for each NaverMap view.\n     */\n    fun createProvider(context: Context): GraniteNaverMapProvider\n}\n\n/**\n * Pluggable Provider interface for NaverMap\n *\n * Brownfield apps can implement this interface to use their own map implementation.\n * Note: Each view should have its own Provider instance (created via Factory).\n */\ninterface GraniteNaverMapProvider {\n    /**\n     * Create the map container view\n     */\n    fun createMapView(context: Context): View\n\n    /**\n     * Set the delegate for map events\n     */\n    fun setDelegate(delegate: GraniteNaverMapProviderDelegate?)\n\n    /**\n     * Called when the view is attached to window\n     */\n    fun onAttachedToWindow()\n\n    /**\n     * Called when the view is detached from window\n     */\n    fun onDetachedFromWindow()\n\n    /**\n     * Called when the view size changes\n     */\n    fun onSizeChanged(width: Int, height: Int)\n\n    /**\n     * Called on host resume\n     */\n    fun onHostResume()\n\n    /**\n     * Called on host pause\n     */\n    fun onHostPause()\n\n    // MARK: - Camera\n\n    fun moveCamera(position: GraniteNaverMapCameraPosition, animated: Boolean)\n    fun animateToCoordinate(coordinate: GraniteNaverMapCoordinate)\n    fun animateToBounds(bounds: GraniteNaverMapBounds, padding: Int)\n\n    // MARK: - Map Properties\n\n    fun setMapType(type: GraniteNaverMapType)\n    fun setMapPadding(top: Int, left: Int, bottom: Int, right: Int)\n    fun setCompassEnabled(enabled: Boolean)\n    fun setScaleBarEnabled(enabled: Boolean)\n    fun setZoomControlEnabled(enabled: Boolean)\n    fun setLocationButtonEnabled(enabled: Boolean)\n    fun setBuildingHeight(height: Float)\n    fun setNightModeEnabled(enabled: Boolean)\n    fun setMinZoomLevel(level: Double)\n    fun setMaxZoomLevel(level: Double)\n    fun setScrollGesturesEnabled(enabled: Boolean)\n    fun setZoomGesturesEnabled(enabled: Boolean)\n    fun setTiltGesturesEnabled(enabled: Boolean)\n    fun setRotateGesturesEnabled(enabled: Boolean)\n    fun setStopGesturesEnabled(enabled: Boolean)\n    fun setLocationTrackingMode(mode: GraniteNaverMapLocationTrackingMode)\n    fun setLayerGroupEnabled(group: String, enabled: Boolean)\n\n    // MARK: - Markers\n\n    fun addMarker(data: GraniteNaverMapMarkerData)\n    fun updateMarker(data: GraniteNaverMapMarkerData)\n    fun removeMarker(identifier: String)\n\n    // MARK: - Polylines\n\n    fun addPolyline(data: GraniteNaverMapPolylineData)\n    fun updatePolyline(data: GraniteNaverMapPolylineData)\n    fun removePolyline(identifier: String)\n\n    // MARK: - Polygons\n\n    fun addPolygon(data: GraniteNaverMapPolygonData)\n    fun updatePolygon(data: GraniteNaverMapPolygonData)\n    fun removePolygon(identifier: String)\n\n    // MARK: - Circles\n\n    fun addCircle(data: GraniteNaverMapCircleData)\n    fun updateCircle(data: GraniteNaverMapCircleData)\n    fun removeCircle(identifier: String)\n\n    // MARK: - Paths\n\n    fun addPath(data: GraniteNaverMapPathData)\n    fun updatePath(data: GraniteNaverMapPathData)\n    fun removePath(identifier: String)\n}\n"
  },
  {
    "path": "packages/naver-map/android/src/main/java/run/granite/navermap/GraniteNaverMapRegistry.kt",
    "content": "package run.granite.navermap\n\nimport android.content.Context\n\n/**\n * Type alias for provider creation lambda\n */\ntypealias GraniteNaverMapProviderCreator = (Context) -> GraniteNaverMapProvider\n\n/**\n * Internal wrapper to adapt lambda to factory interface\n */\nprivate class LambdaProviderFactory(\n    private val creator: GraniteNaverMapProviderCreator\n) : GraniteNaverMapProviderFactory {\n    override fun createProvider(context: Context): GraniteNaverMapProvider {\n        return creator(context)\n    }\n}\n\n/**\n * Registry singleton for NaverMap provider factories\n *\n * Brownfield apps can register their own provider factory at app startup.\n * If no factory is registered and the default provider is included, the built-in\n * NMapsMap provider factory will be used.\n *\n * Usage:\n * ```kotlin\n * // In your Application.onCreate() or before using NaverMap:\n * GraniteNaverMapRegistry.register { context ->\n *     MyNaverMapProvider(context)\n * }\n * ```\n */\nobject GraniteNaverMapRegistry {\n    private var _factory: GraniteNaverMapProviderFactory? = null\n\n    /**\n     * The currently registered factory\n     */\n    val factory: GraniteNaverMapProviderFactory?\n        get() = _factory\n\n    /**\n     * Register a provider using a lambda. Call this at app startup before using NaverMap.\n     * This is the preferred Kotlin API.\n     *\n     * Usage:\n     * ```kotlin\n     * GraniteNaverMapRegistry.register { context ->\n     *     MyNaverMapProvider(context)\n     * }\n     * ```\n     */\n    fun register(creator: GraniteNaverMapProviderCreator) {\n        _factory = LambdaProviderFactory(creator)\n    }\n\n    /**\n     * Register a custom provider factory. Call this at app startup before using NaverMap.\n     * This API is provided for Java compatibility.\n     */\n    fun register(factory: GraniteNaverMapProviderFactory) {\n        _factory = factory\n    }\n\n    /**\n     * Create a new provider instance for a NaverMap view.\n     * Each view should call this to get its own provider instance.\n     *\n     * @return A new provider instance, or null if no factory is registered and default provider is not included\n     */\n    fun createProvider(context: Context): GraniteNaverMapProvider? {\n        // Use registered factory if available\n        _factory?.let { return it.createProvider(context) }\n\n        // Only try to create built-in provider if it's included in the build\n        if (BuildConfig.INCLUDE_DEFAULT_PROVIDER) {\n            return createBuiltInProviderFactory()?.createProvider(context)\n        }\n\n        return null\n    }\n\n    /**\n     * Create built-in provider factory using reflection to avoid compile-time dependency\n     */\n    private fun createBuiltInProviderFactory(): GraniteNaverMapProviderFactory? {\n        return try {\n            val clazz = Class.forName(\"run.granite.navermap.builtinProvider.BuiltInGraniteNaverMapProviderFactory\")\n            clazz.getDeclaredConstructor().newInstance() as GraniteNaverMapProviderFactory\n        } catch (e: Exception) {\n            null\n        }\n    }\n\n    /**\n     * Check if a custom factory has been registered\n     */\n    val hasCustomFactory: Boolean\n        get() = _factory != null\n\n    /**\n     * Check if the default provider is available in this build\n     */\n    val hasDefaultProvider: Boolean\n        get() = BuildConfig.INCLUDE_DEFAULT_PROVIDER\n\n    /**\n     * Reset the factory (useful for testing)\n     */\n    fun reset() {\n        _factory = null\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/android/src/main/java/run/granite/navermap/GraniteNaverMapView.kt",
    "content": "package run.granite.navermap\n\nimport android.content.Context\nimport android.util.Log\nimport android.widget.FrameLayout\nimport android.widget.TextView\nimport com.facebook.react.bridge.LifecycleEventListener\nimport com.facebook.react.bridge.ReactContext\nimport com.facebook.react.bridge.ReadableMap\nimport com.facebook.react.uimanager.UIManagerHelper\n\n/**\n * Provider-based NaverMapView implementation (no direct NMapsMap dependency)\n */\nclass GraniteNaverMapView(context: Context) : FrameLayout(context), LifecycleEventListener, GraniteNaverMapProviderDelegate {\n\n    companion object {\n        private const val TAG = \"GraniteNaverMapView\"\n        private var instanceCounter = 0\n    }\n\n    private val instanceId = ++instanceCounter\n    private val reactContext: ReactContext = context as ReactContext\n\n    private var provider: GraniteNaverMapProvider? = null\n    private var mapContentView: android.view.View? = null\n    private var mapInitialized = false\n\n    private fun getEventDispatcher(): com.facebook.react.uimanager.events.EventDispatcher? {\n        return UIManagerHelper.getEventDispatcherForReactTag(reactContext, id)\n    }\n\n    private fun getSurfaceId(): Int = UIManagerHelper.getSurfaceId(this)\n\n    init {\n        Log.d(TAG, \"GraniteNaverMapView init\")\n        setupProvider()\n    }\n\n    private fun setupProvider() {\n        // Create a new provider instance for this view\n        val mapProvider = GraniteNaverMapRegistry.createProvider(context)\n\n        if (mapProvider == null) {\n            // No provider factory available - show placeholder\n            Log.w(TAG, \"No NaverMap provider factory registered\")\n            val label = TextView(context).apply {\n                text = \"NaverMap provider not registered\"\n                textAlignment = TEXT_ALIGNMENT_CENTER\n            }\n            addView(label, LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT))\n            return\n        }\n\n        provider = mapProvider\n        mapProvider.setDelegate(this)\n\n        val mapView = mapProvider.createMapView(context)\n        mapContentView = mapView\n        addView(mapView, LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT))\n        Log.d(TAG, \"GraniteNaverMapView[$instanceId] - MapView added via provider\")\n    }\n\n    // Fabric requires explicit layout of children\n    override fun requestLayout() {\n        super.requestLayout()\n        post(measureAndLayout)\n    }\n\n    private val measureAndLayout = Runnable {\n        measure(\n            MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),\n            MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)\n        )\n        layout(left, top, right, bottom)\n    }\n\n    override fun onAttachedToWindow() {\n        Log.d(TAG, \"onAttachedToWindow\")\n        super.onAttachedToWindow()\n        reactContext.addLifecycleEventListener(this)\n        provider?.onAttachedToWindow()\n    }\n\n    override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {\n        super.onSizeChanged(w, h, oldw, oldh)\n        Log.d(TAG, \"onSizeChanged: ${w}x${h} (was ${oldw}x${oldh})\")\n        provider?.onSizeChanged(w, h)\n    }\n\n    override fun onDetachedFromWindow() {\n        Log.d(TAG, \"onDetachedFromWindow\")\n        reactContext.removeLifecycleEventListener(this)\n        provider?.onDetachedFromWindow()\n        super.onDetachedFromWindow()\n    }\n\n    override fun onHostResume() {\n        Log.d(TAG, \"onHostResume\")\n        provider?.onHostResume()\n    }\n\n    override fun onHostPause() {\n        Log.d(TAG, \"onHostPause\")\n        provider?.onHostPause()\n    }\n\n    override fun onHostDestroy() {\n        Log.d(TAG, \"onHostDestroy\")\n    }\n\n    // MARK: - GraniteNaverMapProviderDelegate\n\n    override fun onMapInitialized() {\n        getEventDispatcher()?.dispatchEvent(GraniteNaverMapInitializedEvent(getSurfaceId(), id))\n    }\n\n    override fun onCameraChange(position: GraniteNaverMapCameraPosition, contentRegion: List<GraniteNaverMapCoordinate>, coveringRegion: List<GraniteNaverMapCoordinate>) {\n        getEventDispatcher()?.dispatchEvent(\n            GraniteNaverMapCameraChangeEvent(\n                getSurfaceId(),\n                id,\n                position.target.latitude,\n                position.target.longitude,\n                position.zoom,\n                contentRegion,\n                coveringRegion\n            )\n        )\n    }\n\n    override fun onTouch(reason: Int, animated: Boolean) {\n        getEventDispatcher()?.dispatchEvent(GraniteNaverMapTouchEvent(getSurfaceId(), id, reason, animated))\n    }\n\n    override fun onClick(x: Double, y: Double, latitude: Double, longitude: Double) {\n        getEventDispatcher()?.dispatchEvent(GraniteNaverMapClickEvent(getSurfaceId(), id, x, y, latitude, longitude))\n    }\n\n    override fun onMarkerClick(id: String) {\n        getEventDispatcher()?.dispatchEvent(GraniteNaverMapMarkerClickEvent(getSurfaceId(), this.id, id))\n    }\n\n    // MARK: - Camera Methods\n\n    fun setCenter(latitude: Double, longitude: Double, zoom: Double, tilt: Double, bearing: Double) {\n        val position = GraniteNaverMapCameraPosition(\n            target = GraniteNaverMapCoordinate(latitude, longitude),\n            zoom = zoom,\n            tilt = tilt,\n            bearing = bearing\n        )\n        provider?.moveCamera(position, true)\n    }\n\n    fun animateToCoordinate(latitude: Double, longitude: Double) {\n        provider?.animateToCoordinate(GraniteNaverMapCoordinate(latitude, longitude))\n    }\n\n    fun animateToTwoCoordinates(lat1: Double, lng1: Double, lat2: Double, lng2: Double) {\n        val bounds = GraniteNaverMapBounds(\n            southWest = GraniteNaverMapCoordinate(minOf(lat1, lat2), minOf(lng1, lng2)),\n            northEast = GraniteNaverMapCoordinate(maxOf(lat1, lat2), maxOf(lng1, lng2))\n        )\n        provider?.animateToBounds(bounds, 24)\n    }\n\n    fun animateToRegion(latitude: Double, longitude: Double, latitudeDelta: Double, longitudeDelta: Double) {\n        val bounds = GraniteNaverMapBounds(\n            southWest = GraniteNaverMapCoordinate(latitude - latitudeDelta / 2, longitude - longitudeDelta / 2),\n            northEast = GraniteNaverMapCoordinate(latitude + latitudeDelta / 2, longitude + longitudeDelta / 2)\n        )\n        provider?.animateToBounds(bounds, 0)\n    }\n\n    // MARK: - Map Properties\n\n    fun setLayerGroupEnabled(group: String, enabled: Boolean) {\n        provider?.setLayerGroupEnabled(group, enabled)\n    }\n\n    fun setShowsMyLocationButton(show: Boolean) {\n        provider?.setLocationButtonEnabled(show)\n    }\n\n    fun setCompass(show: Boolean) {\n        provider?.setCompassEnabled(show)\n    }\n\n    fun setScaleBar(show: Boolean) {\n        provider?.setScaleBarEnabled(show)\n    }\n\n    fun setZoomControl(show: Boolean) {\n        provider?.setZoomControlEnabled(show)\n    }\n\n    fun setMapType(type: Int) {\n        val mapType = GraniteNaverMapType.values().getOrElse(type) { GraniteNaverMapType.BASIC }\n        provider?.setMapType(mapType)\n    }\n\n    fun setBuildingHeight(height: Float) {\n        provider?.setBuildingHeight(height)\n    }\n\n    fun setNightMode(enabled: Boolean) {\n        provider?.setNightModeEnabled(enabled)\n    }\n\n    fun setMinZoomLevel(level: Double) {\n        provider?.setMinZoomLevel(level)\n    }\n\n    fun setMaxZoomLevel(level: Double) {\n        provider?.setMaxZoomLevel(level)\n    }\n\n    fun setScrollGesturesEnabled(enabled: Boolean) {\n        provider?.setScrollGesturesEnabled(enabled)\n    }\n\n    fun setZoomGesturesEnabled(enabled: Boolean) {\n        provider?.setZoomGesturesEnabled(enabled)\n    }\n\n    fun setTiltGesturesEnabled(enabled: Boolean) {\n        provider?.setTiltGesturesEnabled(enabled)\n    }\n\n    fun setRotateGesturesEnabled(enabled: Boolean) {\n        provider?.setRotateGesturesEnabled(enabled)\n    }\n\n    fun setStopGesturesEnabled(enabled: Boolean) {\n        provider?.setStopGesturesEnabled(enabled)\n    }\n\n    fun setLocationTrackingMode(mode: Int) {\n        val trackingMode = GraniteNaverMapLocationTrackingMode.values().getOrElse(mode) { GraniteNaverMapLocationTrackingMode.NONE }\n        provider?.setLocationTrackingMode(trackingMode)\n    }\n\n    fun setMapPadding(top: Int, left: Int, bottom: Int, right: Int) {\n        provider?.setMapPadding(top, left, bottom, right)\n    }\n\n    // MARK: - Marker Methods (Old Architecture - ReadableMap)\n\n    fun addMarker(identifier: String, markerData: ReadableMap) {\n        val data = parseMarkerData(identifier, markerData)\n        provider?.addMarker(data)\n    }\n\n    fun updateMarker(identifier: String, markerData: ReadableMap) {\n        val data = parseMarkerData(identifier, markerData)\n        provider?.updateMarker(data)\n    }\n\n    fun removeMarker(identifier: String) {\n        provider?.removeMarker(identifier)\n    }\n\n    private fun parseMarkerData(identifier: String, data: ReadableMap): GraniteNaverMapMarkerData {\n        val coord = data.getMap(\"coordinate\")\n        return GraniteNaverMapMarkerData(\n            identifier = identifier,\n            coordinate = GraniteNaverMapCoordinate(\n                latitude = coord?.getDouble(\"latitude\") ?: 0.0,\n                longitude = coord?.getDouble(\"longitude\") ?: 0.0\n            ),\n            width = if (data.hasKey(\"width\")) data.getInt(\"width\") else 0,\n            height = if (data.hasKey(\"height\")) data.getInt(\"height\") else 0,\n            zIndex = if (data.hasKey(\"zIndex\")) data.getInt(\"zIndex\") else 0,\n            rotation = if (data.hasKey(\"rotation\")) data.getDouble(\"rotation\").toFloat() else 0f,\n            flat = if (data.hasKey(\"flat\")) data.getBoolean(\"flat\") else false,\n            alpha = if (data.hasKey(\"alpha\")) data.getDouble(\"alpha\").toFloat() else 1f,\n            pinColor = if (data.hasKey(\"pinColor\")) data.getInt(\"pinColor\") else 0,\n            image = if (data.hasKey(\"image\")) data.getString(\"image\") ?: \"\" else \"\"\n        )\n    }\n\n    // MARK: - Marker Methods (New Architecture - direct params)\n\n    fun addMarkerNew(\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        width: Int,\n        height: Int,\n        zIndex: Int,\n        rotation: Float,\n        flat: Boolean,\n        alpha: Float,\n        pinColor: Int,\n        image: String\n    ) {\n        Log.d(TAG, \"[$instanceId] addMarkerNew: id=$identifier\")\n        val data = GraniteNaverMapMarkerData(\n            identifier = identifier,\n            coordinate = GraniteNaverMapCoordinate(latitude, longitude),\n            width = width,\n            height = height,\n            zIndex = zIndex,\n            rotation = rotation,\n            flat = flat,\n            alpha = alpha,\n            pinColor = pinColor,\n            image = image\n        )\n        provider?.addMarker(data)\n    }\n\n    fun updateMarkerNew(\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        width: Int,\n        height: Int,\n        zIndex: Int,\n        rotation: Float,\n        flat: Boolean,\n        alpha: Float,\n        pinColor: Int,\n        image: String\n    ) {\n        val data = GraniteNaverMapMarkerData(\n            identifier = identifier,\n            coordinate = GraniteNaverMapCoordinate(latitude, longitude),\n            width = width,\n            height = height,\n            zIndex = zIndex,\n            rotation = rotation,\n            flat = flat,\n            alpha = alpha,\n            pinColor = pinColor,\n            image = image\n        )\n        provider?.updateMarker(data)\n    }\n\n    // MARK: - Polyline Methods\n\n    fun addPolyline(\n        identifier: String,\n        coordsJson: String,\n        strokeWidth: Float,\n        strokeColor: Int,\n        zIndex: Int,\n        lineCap: Int,\n        lineJoin: Int,\n        patternJson: String\n    ) {\n        Log.d(TAG, \"addPolyline: id=$identifier\")\n        val coords = parseCoordinatesJson(coordsJson)\n        if (coords.size < 2) return\n\n        val data = GraniteNaverMapPolylineData(\n            identifier = identifier,\n            coordinates = coords,\n            strokeWidth = strokeWidth,\n            strokeColor = strokeColor,\n            zIndex = zIndex,\n            lineCap = lineCap,\n            lineJoin = lineJoin,\n            pattern = parsePatternJson(patternJson)\n        )\n        provider?.addPolyline(data)\n    }\n\n    fun updatePolyline(\n        identifier: String,\n        coordsJson: String,\n        strokeWidth: Float,\n        strokeColor: Int,\n        zIndex: Int,\n        lineCap: Int,\n        lineJoin: Int,\n        patternJson: String\n    ) {\n        val coords = parseCoordinatesJson(coordsJson)\n        if (coords.size < 2) return\n\n        val data = GraniteNaverMapPolylineData(\n            identifier = identifier,\n            coordinates = coords,\n            strokeWidth = strokeWidth,\n            strokeColor = strokeColor,\n            zIndex = zIndex,\n            lineCap = lineCap,\n            lineJoin = lineJoin,\n            pattern = parsePatternJson(patternJson)\n        )\n        provider?.updatePolyline(data)\n    }\n\n    fun removePolyline(identifier: String) {\n        provider?.removePolyline(identifier)\n    }\n\n    // MARK: - Polygon Methods\n\n    fun addPolygon(\n        identifier: String,\n        coordsJson: String,\n        holesJson: String,\n        fillColor: Int,\n        strokeColor: Int,\n        strokeWidth: Float,\n        zIndex: Int\n    ) {\n        Log.d(TAG, \"addPolygon: id=$identifier\")\n        val coords = parseCoordinatesJson(coordsJson)\n        if (coords.size < 3) return\n\n        val data = GraniteNaverMapPolygonData(\n            identifier = identifier,\n            coordinates = coords,\n            holes = parseHolesJson(holesJson),\n            fillColor = fillColor,\n            strokeColor = strokeColor,\n            strokeWidth = strokeWidth,\n            zIndex = zIndex\n        )\n        provider?.addPolygon(data)\n    }\n\n    fun updatePolygon(\n        identifier: String,\n        coordsJson: String,\n        holesJson: String,\n        fillColor: Int,\n        strokeColor: Int,\n        strokeWidth: Float,\n        zIndex: Int\n    ) {\n        val coords = parseCoordinatesJson(coordsJson)\n        if (coords.size < 3) return\n\n        val data = GraniteNaverMapPolygonData(\n            identifier = identifier,\n            coordinates = coords,\n            holes = parseHolesJson(holesJson),\n            fillColor = fillColor,\n            strokeColor = strokeColor,\n            strokeWidth = strokeWidth,\n            zIndex = zIndex\n        )\n        provider?.updatePolygon(data)\n    }\n\n    fun removePolygon(identifier: String) {\n        provider?.removePolygon(identifier)\n    }\n\n    // MARK: - Circle Methods\n\n    fun addCircle(\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        radius: Double,\n        fillColor: Int,\n        strokeColor: Int,\n        strokeWidth: Float,\n        zIndex: Int\n    ) {\n        Log.d(TAG, \"addCircle: id=$identifier\")\n        val data = GraniteNaverMapCircleData(\n            identifier = identifier,\n            center = GraniteNaverMapCoordinate(latitude, longitude),\n            radius = radius,\n            fillColor = fillColor,\n            strokeColor = strokeColor,\n            strokeWidth = strokeWidth,\n            zIndex = zIndex\n        )\n        provider?.addCircle(data)\n    }\n\n    fun updateCircle(\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        radius: Double,\n        fillColor: Int,\n        strokeColor: Int,\n        strokeWidth: Float,\n        zIndex: Int\n    ) {\n        val data = GraniteNaverMapCircleData(\n            identifier = identifier,\n            center = GraniteNaverMapCoordinate(latitude, longitude),\n            radius = radius,\n            fillColor = fillColor,\n            strokeColor = strokeColor,\n            strokeWidth = strokeWidth,\n            zIndex = zIndex\n        )\n        provider?.updateCircle(data)\n    }\n\n    fun removeCircle(identifier: String) {\n        provider?.removeCircle(identifier)\n    }\n\n    // MARK: - Path Methods\n\n    fun addPath(\n        identifier: String,\n        coordsJson: String,\n        width: Float,\n        outlineWidth: Float,\n        color: Int,\n        outlineColor: Int,\n        passedColor: Int,\n        passedOutlineColor: Int,\n        patternImage: String,\n        patternInterval: Int,\n        progress: Float,\n        zIndex: Int\n    ) {\n        Log.d(TAG, \"addPath: id=$identifier\")\n        val coords = parseCoordinatesJson(coordsJson)\n        if (coords.size < 2) return\n\n        val data = GraniteNaverMapPathData(\n            identifier = identifier,\n            coordinates = coords,\n            width = width,\n            outlineWidth = outlineWidth,\n            color = color,\n            outlineColor = outlineColor,\n            passedColor = passedColor,\n            passedOutlineColor = passedOutlineColor,\n            patternImage = patternImage,\n            patternInterval = patternInterval,\n            progress = progress,\n            zIndex = zIndex\n        )\n        provider?.addPath(data)\n    }\n\n    fun updatePath(\n        identifier: String,\n        coordsJson: String,\n        width: Float,\n        outlineWidth: Float,\n        color: Int,\n        outlineColor: Int,\n        passedColor: Int,\n        passedOutlineColor: Int,\n        patternImage: String,\n        patternInterval: Int,\n        progress: Float,\n        zIndex: Int\n    ) {\n        val coords = parseCoordinatesJson(coordsJson)\n        if (coords.size < 2) return\n\n        val data = GraniteNaverMapPathData(\n            identifier = identifier,\n            coordinates = coords,\n            width = width,\n            outlineWidth = outlineWidth,\n            color = color,\n            outlineColor = outlineColor,\n            passedColor = passedColor,\n            passedOutlineColor = passedOutlineColor,\n            patternImage = patternImage,\n            patternInterval = patternInterval,\n            progress = progress,\n            zIndex = zIndex\n        )\n        provider?.updatePath(data)\n    }\n\n    fun removePath(identifier: String) {\n        provider?.removePath(identifier)\n    }\n\n    // MARK: - ArrowheadPath Methods (delegated to Path)\n\n    fun addArrowheadPath(\n        identifier: String,\n        coordsJson: String,\n        width: Float,\n        outlineWidth: Float,\n        color: Int,\n        outlineColor: Int,\n        headSizeRatio: Float,\n        zIndex: Int\n    ) {\n        // ArrowheadPath uses Path API with default passed colors\n        addPath(identifier, coordsJson, width, outlineWidth, color, outlineColor, color, outlineColor, \"\", 0, 0f, zIndex)\n    }\n\n    fun updateArrowheadPath(\n        identifier: String,\n        coordsJson: String,\n        width: Float,\n        outlineWidth: Float,\n        color: Int,\n        outlineColor: Int,\n        headSizeRatio: Float,\n        zIndex: Int\n    ) {\n        updatePath(identifier, coordsJson, width, outlineWidth, color, outlineColor, color, outlineColor, \"\", 0, 0f, zIndex)\n    }\n\n    fun removeArrowheadPath(identifier: String) {\n        removePath(identifier)\n    }\n\n    // MARK: - GroundOverlay Methods (TODO: Add to provider protocol)\n\n    fun addGroundOverlay(\n        identifier: String,\n        swLat: Double,\n        swLng: Double,\n        neLat: Double,\n        neLng: Double,\n        image: String,\n        alpha: Float,\n        zIndex: Int\n    ) {\n        // TODO: Add ground overlay support to provider protocol\n    }\n\n    fun updateGroundOverlay(\n        identifier: String,\n        swLat: Double,\n        swLng: Double,\n        neLat: Double,\n        neLng: Double,\n        image: String,\n        alpha: Float,\n        zIndex: Int\n    ) {\n        // TODO: Add ground overlay support to provider protocol\n    }\n\n    fun removeGroundOverlay(identifier: String) {\n        // TODO: Add ground overlay support to provider protocol\n    }\n\n    // MARK: - InfoWindow Methods (TODO: Add to provider protocol)\n\n    fun addInfoWindow(\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        text: String,\n        alpha: Float,\n        zIndex: Int,\n        offsetX: Int,\n        offsetY: Int\n    ) {\n        // TODO: Add info window support to provider protocol\n    }\n\n    fun updateInfoWindow(\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        text: String,\n        alpha: Float,\n        zIndex: Int,\n        offsetX: Int,\n        offsetY: Int\n    ) {\n        // TODO: Add info window support to provider protocol\n    }\n\n    fun removeInfoWindow(identifier: String) {\n        // TODO: Add info window support to provider protocol\n    }\n\n    // MARK: - JSON Parsing Helpers\n\n    private fun parseCoordinatesJson(json: String): List<GraniteNaverMapCoordinate> {\n        val result = mutableListOf<GraniteNaverMapCoordinate>()\n        try {\n            val array = org.json.JSONArray(json)\n            for (i in 0 until array.length()) {\n                val obj = array.getJSONObject(i)\n                result.add(GraniteNaverMapCoordinate(\n                    latitude = obj.getDouble(\"latitude\"),\n                    longitude = obj.getDouble(\"longitude\")\n                ))\n            }\n        } catch (e: Exception) {\n            e.printStackTrace()\n        }\n        return result\n    }\n\n    private fun parseHolesJson(json: String): List<List<GraniteNaverMapCoordinate>> {\n        val result = mutableListOf<List<GraniteNaverMapCoordinate>>()\n        try {\n            val array = org.json.JSONArray(json)\n            for (i in 0 until array.length()) {\n                val holeArray = array.getJSONArray(i)\n                val hole = mutableListOf<GraniteNaverMapCoordinate>()\n                for (j in 0 until holeArray.length()) {\n                    val obj = holeArray.getJSONObject(j)\n                    hole.add(GraniteNaverMapCoordinate(\n                        latitude = obj.getDouble(\"latitude\"),\n                        longitude = obj.getDouble(\"longitude\")\n                    ))\n                }\n                result.add(hole)\n            }\n        } catch (e: Exception) {\n            e.printStackTrace()\n        }\n        return result\n    }\n\n    private fun parsePatternJson(json: String): List<Int> {\n        val result = mutableListOf<Int>()\n        try {\n            val array = org.json.JSONArray(json)\n            for (i in 0 until array.length()) {\n                result.add(array.getInt(i))\n            }\n        } catch (e: Exception) {\n            e.printStackTrace()\n        }\n        return result\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/android/src/newarch/java/run/granite/navermap/GraniteNaverMapViewManager.kt",
    "content": "package run.granite.navermap\n\nimport android.util.Log\nimport com.facebook.react.bridge.ReadableArray\nimport com.facebook.react.bridge.ReadableMap\nimport com.facebook.react.module.annotations.ReactModule\nimport com.facebook.react.uimanager.SimpleViewManager\nimport com.facebook.react.uimanager.ThemedReactContext\nimport com.facebook.react.uimanager.ViewManagerDelegate\nimport com.facebook.react.uimanager.annotations.ReactProp\nimport com.facebook.react.viewmanagers.GraniteNaverMapViewManagerDelegate\nimport com.facebook.react.viewmanagers.GraniteNaverMapViewManagerInterface\n\n@ReactModule(name = GraniteNaverMapViewManager.NAME)\nclass GraniteNaverMapViewManager : SimpleViewManager<GraniteNaverMapView>(),\n    GraniteNaverMapViewManagerInterface<GraniteNaverMapView> {\n\n    private val delegate = GraniteNaverMapViewManagerDelegate(this)\n\n    override fun getDelegate(): ViewManagerDelegate<GraniteNaverMapView> = delegate\n\n    override fun getName(): String = NAME\n\n    override fun createViewInstance(reactContext: ThemedReactContext): GraniteNaverMapView {\n        Log.d(NAME, \"Creating GraniteNaverMapView instance\")\n        return GraniteNaverMapView(reactContext)\n    }\n\n    override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any>? {\n        return mapOf(\n            \"onInitialized\" to mapOf(\"registrationName\" to \"onInitialized\"),\n            \"onCameraChange\" to mapOf(\"registrationName\" to \"onCameraChange\"),\n            \"onTouch\" to mapOf(\"registrationName\" to \"onTouch\"),\n            \"onMapClick\" to mapOf(\"registrationName\" to \"onMapClick\"),\n            \"onMarkerClick\" to mapOf(\"registrationName\" to \"onMarkerClick\")\n        )\n    }\n\n    // Props\n    @ReactProp(name = \"center\")\n    override fun setCenter(view: GraniteNaverMapView, center: ReadableMap?) {\n        center?.let {\n            val lat = it.getDouble(\"latitude\")\n            val lng = it.getDouble(\"longitude\")\n            val zoom = if (it.hasKey(\"zoom\")) it.getDouble(\"zoom\") else 10.0\n            val tilt = if (it.hasKey(\"tilt\")) it.getDouble(\"tilt\") else 0.0\n            val bearing = if (it.hasKey(\"bearing\")) it.getDouble(\"bearing\") else 0.0\n            view.setCenter(lat, lng, zoom, tilt, bearing)\n        }\n    }\n\n    @ReactProp(name = \"showsMyLocationButton\")\n    override fun setShowsMyLocationButton(view: GraniteNaverMapView, show: Boolean) {\n        view.setShowsMyLocationButton(show)\n    }\n\n    @ReactProp(name = \"compass\")\n    override fun setCompass(view: GraniteNaverMapView, show: Boolean) {\n        view.setCompass(show)\n    }\n\n    @ReactProp(name = \"scaleBar\")\n    override fun setScaleBar(view: GraniteNaverMapView, show: Boolean) {\n        view.setScaleBar(show)\n    }\n\n    @ReactProp(name = \"zoomControl\")\n    override fun setZoomControl(view: GraniteNaverMapView, show: Boolean) {\n        view.setZoomControl(show)\n    }\n\n    @ReactProp(name = \"mapType\")\n    override fun setMapType(view: GraniteNaverMapView, mapType: Int) {\n        view.setMapType(mapType)\n    }\n\n    @ReactProp(name = \"buildingHeight\", defaultFloat = 1f)\n    override fun setBuildingHeight(view: GraniteNaverMapView, height: Float) {\n        view.setBuildingHeight(height)\n    }\n\n    @ReactProp(name = \"nightMode\")\n    override fun setNightMode(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setNightMode(enabled)\n    }\n\n    @ReactProp(name = \"minZoomLevel\", defaultDouble = 0.0)\n    override fun setMinZoomLevel(view: GraniteNaverMapView, level: Double) {\n        view.setMinZoomLevel(level)\n    }\n\n    @ReactProp(name = \"maxZoomLevel\", defaultDouble = 21.0)\n    override fun setMaxZoomLevel(view: GraniteNaverMapView, level: Double) {\n        view.setMaxZoomLevel(level)\n    }\n\n    @ReactProp(name = \"scrollGesturesEnabled\", defaultBoolean = true)\n    override fun setScrollGesturesEnabled(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setScrollGesturesEnabled(enabled)\n    }\n\n    @ReactProp(name = \"zoomGesturesEnabled\", defaultBoolean = true)\n    override fun setZoomGesturesEnabled(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setZoomGesturesEnabled(enabled)\n    }\n\n    @ReactProp(name = \"tiltGesturesEnabled\", defaultBoolean = true)\n    override fun setTiltGesturesEnabled(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setTiltGesturesEnabled(enabled)\n    }\n\n    @ReactProp(name = \"rotateGesturesEnabled\", defaultBoolean = true)\n    override fun setRotateGesturesEnabled(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setRotateGesturesEnabled(enabled)\n    }\n\n    @ReactProp(name = \"stopGesturesEnabled\", defaultBoolean = true)\n    override fun setStopGesturesEnabled(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setStopGesturesEnabled(enabled)\n    }\n\n    @ReactProp(name = \"locationTrackingMode\")\n    override fun setLocationTrackingMode(view: GraniteNaverMapView, mode: Int) {\n        view.setLocationTrackingMode(mode)\n    }\n\n    @ReactProp(name = \"mapPadding\")\n    override fun setMapPadding(view: GraniteNaverMapView, padding: ReadableMap?) {\n        padding?.let {\n            val top = if (it.hasKey(\"top\")) it.getInt(\"top\") else 0\n            val left = if (it.hasKey(\"left\")) it.getInt(\"left\") else 0\n            val bottom = if (it.hasKey(\"bottom\")) it.getInt(\"bottom\") else 0\n            val right = if (it.hasKey(\"right\")) it.getInt(\"right\") else 0\n            view.setMapPadding(top, left, bottom, right)\n        }\n    }\n\n    // Commands\n    override fun animateToCoordinate(view: GraniteNaverMapView, latitude: Double, longitude: Double) {\n        view.animateToCoordinate(latitude, longitude)\n    }\n\n    override fun animateToTwoCoordinates(\n        view: GraniteNaverMapView,\n        lat1: Double,\n        lng1: Double,\n        lat2: Double,\n        lng2: Double\n    ) {\n        view.animateToTwoCoordinates(lat1, lng1, lat2, lng2)\n    }\n\n    override fun animateToRegion(\n        view: GraniteNaverMapView,\n        latitude: Double,\n        longitude: Double,\n        latitudeDelta: Double,\n        longitudeDelta: Double\n    ) {\n        view.animateToRegion(latitude, longitude, latitudeDelta, longitudeDelta)\n    }\n\n    override fun setLayerGroupEnabled(view: GraniteNaverMapView, group: String, enabled: Boolean) {\n        view.setLayerGroupEnabled(group, enabled)\n    }\n\n    override fun addMarker(\n        view: GraniteNaverMapView,\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        width: Int,\n        height: Int,\n        zIndex: Int,\n        rotation: Float,\n        flat: Boolean,\n        alpha: Float,\n        pinColor: Int,\n        image: String\n    ) {\n        Log.d(NAME, \"addMarker called: id=$identifier, lat=$latitude, lng=$longitude\")\n        view.addMarkerNew(identifier, latitude, longitude, width, height, zIndex, rotation, flat, alpha, pinColor, image)\n    }\n\n    override fun updateMarker(\n        view: GraniteNaverMapView,\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        width: Int,\n        height: Int,\n        zIndex: Int,\n        rotation: Float,\n        flat: Boolean,\n        alpha: Float,\n        pinColor: Int,\n        image: String\n    ) {\n        view.updateMarkerNew(identifier, latitude, longitude, width, height, zIndex, rotation, flat, alpha, pinColor, image)\n    }\n\n    override fun removeMarker(view: GraniteNaverMapView, identifier: String) {\n        view.removeMarker(identifier)\n    }\n\n    // Polyline Commands\n    override fun addPolyline(\n        view: GraniteNaverMapView,\n        identifier: String,\n        coordsJson: String,\n        strokeWidth: Float,\n        strokeColor: Int,\n        zIndex: Int,\n        lineCap: Int,\n        lineJoin: Int,\n        patternJson: String\n    ) {\n        view.addPolyline(identifier, coordsJson, strokeWidth, strokeColor, zIndex, lineCap, lineJoin, patternJson)\n    }\n\n    override fun updatePolyline(\n        view: GraniteNaverMapView,\n        identifier: String,\n        coordsJson: String,\n        strokeWidth: Float,\n        strokeColor: Int,\n        zIndex: Int,\n        lineCap: Int,\n        lineJoin: Int,\n        patternJson: String\n    ) {\n        view.updatePolyline(identifier, coordsJson, strokeWidth, strokeColor, zIndex, lineCap, lineJoin, patternJson)\n    }\n\n    override fun removePolyline(view: GraniteNaverMapView, identifier: String) {\n        view.removePolyline(identifier)\n    }\n\n    // Polygon Commands\n    override fun addPolygon(\n        view: GraniteNaverMapView,\n        identifier: String,\n        coordsJson: String,\n        holesJson: String,\n        fillColor: Int,\n        strokeColor: Int,\n        strokeWidth: Float,\n        zIndex: Int\n    ) {\n        view.addPolygon(identifier, coordsJson, holesJson, fillColor, strokeColor, strokeWidth, zIndex)\n    }\n\n    override fun updatePolygon(\n        view: GraniteNaverMapView,\n        identifier: String,\n        coordsJson: String,\n        holesJson: String,\n        fillColor: Int,\n        strokeColor: Int,\n        strokeWidth: Float,\n        zIndex: Int\n    ) {\n        view.updatePolygon(identifier, coordsJson, holesJson, fillColor, strokeColor, strokeWidth, zIndex)\n    }\n\n    override fun removePolygon(view: GraniteNaverMapView, identifier: String) {\n        view.removePolygon(identifier)\n    }\n\n    // Circle Commands\n    override fun addCircle(\n        view: GraniteNaverMapView,\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        radius: Double,\n        fillColor: Int,\n        strokeColor: Int,\n        strokeWidth: Float,\n        zIndex: Int\n    ) {\n        view.addCircle(identifier, latitude, longitude, radius, fillColor, strokeColor, strokeWidth, zIndex)\n    }\n\n    override fun updateCircle(\n        view: GraniteNaverMapView,\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        radius: Double,\n        fillColor: Int,\n        strokeColor: Int,\n        strokeWidth: Float,\n        zIndex: Int\n    ) {\n        view.updateCircle(identifier, latitude, longitude, radius, fillColor, strokeColor, strokeWidth, zIndex)\n    }\n\n    override fun removeCircle(view: GraniteNaverMapView, identifier: String) {\n        view.removeCircle(identifier)\n    }\n\n    // Path Commands\n    override fun addPath(\n        view: GraniteNaverMapView,\n        identifier: String,\n        coordsJson: String,\n        width: Float,\n        outlineWidth: Float,\n        color: Int,\n        outlineColor: Int,\n        passedColor: Int,\n        passedOutlineColor: Int,\n        patternImage: String,\n        patternInterval: Int,\n        progress: Float,\n        zIndex: Int\n    ) {\n        view.addPath(identifier, coordsJson, width, outlineWidth, color, outlineColor, passedColor, passedOutlineColor, patternImage, patternInterval, progress, zIndex)\n    }\n\n    override fun updatePath(\n        view: GraniteNaverMapView,\n        identifier: String,\n        coordsJson: String,\n        width: Float,\n        outlineWidth: Float,\n        color: Int,\n        outlineColor: Int,\n        passedColor: Int,\n        passedOutlineColor: Int,\n        patternImage: String,\n        patternInterval: Int,\n        progress: Float,\n        zIndex: Int\n    ) {\n        view.updatePath(identifier, coordsJson, width, outlineWidth, color, outlineColor, passedColor, passedOutlineColor, patternImage, patternInterval, progress, zIndex)\n    }\n\n    override fun removePath(view: GraniteNaverMapView, identifier: String) {\n        view.removePath(identifier)\n    }\n\n    // ArrowheadPath Commands\n    override fun addArrowheadPath(\n        view: GraniteNaverMapView,\n        identifier: String,\n        coordsJson: String,\n        width: Float,\n        outlineWidth: Float,\n        color: Int,\n        outlineColor: Int,\n        headSizeRatio: Float,\n        zIndex: Int\n    ) {\n        view.addArrowheadPath(identifier, coordsJson, width, outlineWidth, color, outlineColor, headSizeRatio, zIndex)\n    }\n\n    override fun updateArrowheadPath(\n        view: GraniteNaverMapView,\n        identifier: String,\n        coordsJson: String,\n        width: Float,\n        outlineWidth: Float,\n        color: Int,\n        outlineColor: Int,\n        headSizeRatio: Float,\n        zIndex: Int\n    ) {\n        view.updateArrowheadPath(identifier, coordsJson, width, outlineWidth, color, outlineColor, headSizeRatio, zIndex)\n    }\n\n    override fun removeArrowheadPath(view: GraniteNaverMapView, identifier: String) {\n        view.removeArrowheadPath(identifier)\n    }\n\n    // GroundOverlay Commands\n    override fun addGroundOverlay(\n        view: GraniteNaverMapView,\n        identifier: String,\n        swLat: Double,\n        swLng: Double,\n        neLat: Double,\n        neLng: Double,\n        image: String,\n        alpha: Float,\n        zIndex: Int\n    ) {\n        view.addGroundOverlay(identifier, swLat, swLng, neLat, neLng, image, alpha, zIndex)\n    }\n\n    override fun updateGroundOverlay(\n        view: GraniteNaverMapView,\n        identifier: String,\n        swLat: Double,\n        swLng: Double,\n        neLat: Double,\n        neLng: Double,\n        image: String,\n        alpha: Float,\n        zIndex: Int\n    ) {\n        view.updateGroundOverlay(identifier, swLat, swLng, neLat, neLng, image, alpha, zIndex)\n    }\n\n    override fun removeGroundOverlay(view: GraniteNaverMapView, identifier: String) {\n        view.removeGroundOverlay(identifier)\n    }\n\n    // InfoWindow Commands\n    override fun addInfoWindow(\n        view: GraniteNaverMapView,\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        text: String,\n        alpha: Float,\n        zIndex: Int,\n        offsetX: Int,\n        offsetY: Int\n    ) {\n        view.addInfoWindow(identifier, latitude, longitude, text, alpha, zIndex, offsetX, offsetY)\n    }\n\n    override fun updateInfoWindow(\n        view: GraniteNaverMapView,\n        identifier: String,\n        latitude: Double,\n        longitude: Double,\n        text: String,\n        alpha: Float,\n        zIndex: Int,\n        offsetX: Int,\n        offsetY: Int\n    ) {\n        view.updateInfoWindow(identifier, latitude, longitude, text, alpha, zIndex, offsetX, offsetY)\n    }\n\n    override fun removeInfoWindow(view: GraniteNaverMapView, identifier: String) {\n        view.removeInfoWindow(identifier)\n    }\n\n    companion object {\n        const val NAME = \"GraniteNaverMapView\"\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/android/src/oldarch/java/run/granite/navermap/GraniteNaverMapViewManager.kt",
    "content": "package run.granite.navermap\n\nimport android.graphics.Color\nimport com.facebook.react.bridge.ReadableArray\nimport com.facebook.react.bridge.ReadableMap\nimport com.facebook.react.common.MapBuilder\nimport com.facebook.react.uimanager.SimpleViewManager\nimport com.facebook.react.uimanager.ThemedReactContext\nimport com.facebook.react.uimanager.annotations.ReactProp\n\n/**\n * Old Architecture ViewManager (no direct NMapsMap dependency)\n */\nclass GraniteNaverMapViewManager : SimpleViewManager<GraniteNaverMapView>() {\n\n    override fun getName(): String = \"GraniteNaverMapView\"\n\n    override fun createViewInstance(reactContext: ThemedReactContext): GraniteNaverMapView {\n        return GraniteNaverMapView(reactContext)\n    }\n\n    override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any>? {\n        return MapBuilder.builder<String, Any>()\n            .put(\"onInitialized\", MapBuilder.of(\"registrationName\", \"onInitialized\"))\n            .put(\"onCameraChange\", MapBuilder.of(\"registrationName\", \"onCameraChange\"))\n            .put(\"onTouch\", MapBuilder.of(\"registrationName\", \"onTouch\"))\n            .put(\"onMapClick\", MapBuilder.of(\"registrationName\", \"onMapClick\"))\n            .put(\"onMarkerClick\", MapBuilder.of(\"registrationName\", \"onMarkerClick\"))\n            .build()\n    }\n\n    override fun getCommandsMap(): Map<String, Int>? {\n        return MapBuilder.builder<String, Int>()\n            .put(\"animateToCoordinate\", COMMAND_ANIMATE_TO_COORDINATE)\n            .put(\"animateToTwoCoordinates\", COMMAND_ANIMATE_TO_TWO_COORDINATES)\n            .put(\"animateToRegion\", COMMAND_ANIMATE_TO_REGION)\n            .put(\"setLayerGroupEnabled\", COMMAND_SET_LAYER_GROUP_ENABLED)\n            .put(\"addMarker\", COMMAND_ADD_MARKER)\n            .put(\"updateMarker\", COMMAND_UPDATE_MARKER)\n            .put(\"removeMarker\", COMMAND_REMOVE_MARKER)\n            .put(\"addPolyline\", COMMAND_ADD_POLYLINE)\n            .put(\"updatePolyline\", COMMAND_UPDATE_POLYLINE)\n            .put(\"removePolyline\", COMMAND_REMOVE_POLYLINE)\n            .put(\"addPolygon\", COMMAND_ADD_POLYGON)\n            .put(\"updatePolygon\", COMMAND_UPDATE_POLYGON)\n            .put(\"removePolygon\", COMMAND_REMOVE_POLYGON)\n            .put(\"addCircle\", COMMAND_ADD_CIRCLE)\n            .put(\"updateCircle\", COMMAND_UPDATE_CIRCLE)\n            .put(\"removeCircle\", COMMAND_REMOVE_CIRCLE)\n            .put(\"addPath\", COMMAND_ADD_PATH)\n            .put(\"updatePath\", COMMAND_UPDATE_PATH)\n            .put(\"removePath\", COMMAND_REMOVE_PATH)\n            .put(\"addArrowheadPath\", COMMAND_ADD_ARROWHEAD_PATH)\n            .put(\"updateArrowheadPath\", COMMAND_UPDATE_ARROWHEAD_PATH)\n            .put(\"removeArrowheadPath\", COMMAND_REMOVE_ARROWHEAD_PATH)\n            .put(\"addGroundOverlay\", COMMAND_ADD_GROUND_OVERLAY)\n            .put(\"updateGroundOverlay\", COMMAND_UPDATE_GROUND_OVERLAY)\n            .put(\"removeGroundOverlay\", COMMAND_REMOVE_GROUND_OVERLAY)\n            .put(\"addInfoWindow\", COMMAND_ADD_INFO_WINDOW)\n            .put(\"updateInfoWindow\", COMMAND_UPDATE_INFO_WINDOW)\n            .put(\"removeInfoWindow\", COMMAND_REMOVE_INFO_WINDOW)\n            .build()\n    }\n\n    override fun receiveCommand(view: GraniteNaverMapView, commandId: Int, args: ReadableArray?) {\n        when (commandId) {\n            COMMAND_ANIMATE_TO_COORDINATE -> {\n                val coord = args?.getMap(0)\n                coord?.let {\n                    val lat = it.getDouble(\"latitude\")\n                    val lng = it.getDouble(\"longitude\")\n                    view.animateToCoordinate(lat, lng)\n                }\n            }\n            COMMAND_ANIMATE_TO_TWO_COORDINATES -> {\n                val coord1 = args?.getMap(0)\n                val coord2 = args?.getMap(1)\n                if (coord1 != null && coord2 != null) {\n                    view.animateToTwoCoordinates(\n                        coord1.getDouble(\"latitude\"), coord1.getDouble(\"longitude\"),\n                        coord2.getDouble(\"latitude\"), coord2.getDouble(\"longitude\")\n                    )\n                }\n            }\n            COMMAND_ANIMATE_TO_REGION -> {\n                val region = args?.getMap(0)\n                region?.let {\n                    val lat = it.getDouble(\"latitude\")\n                    val lng = it.getDouble(\"longitude\")\n                    val latDelta = it.getDouble(\"latitudeDelta\")\n                    val lngDelta = it.getDouble(\"longitudeDelta\")\n                    view.animateToRegion(lat, lng, latDelta, lngDelta)\n                }\n            }\n            COMMAND_SET_LAYER_GROUP_ENABLED -> {\n                val group = args?.getString(0)\n                val enabled = args?.getBoolean(1) ?: false\n                group?.let { view.setLayerGroupEnabled(it, enabled) }\n            }\n            COMMAND_ADD_MARKER -> {\n                val identifier = args?.getString(0)\n                val markerData = args?.getMap(1)\n                if (identifier != null && markerData != null) {\n                    view.addMarker(identifier, markerData)\n                }\n            }\n            COMMAND_UPDATE_MARKER -> {\n                val identifier = args?.getString(0)\n                val markerData = args?.getMap(1)\n                if (identifier != null && markerData != null) {\n                    view.updateMarker(identifier, markerData)\n                }\n            }\n            COMMAND_REMOVE_MARKER -> {\n                val identifier = args?.getString(0)\n                identifier?.let { view.removeMarker(it) }\n            }\n        }\n    }\n\n    @ReactProp(name = \"center\")\n    fun setCenter(view: GraniteNaverMapView, center: ReadableMap?) {\n        center?.let {\n            val lat = it.getDouble(\"latitude\")\n            val lng = it.getDouble(\"longitude\")\n            val zoom = if (it.hasKey(\"zoom\")) it.getDouble(\"zoom\") else 10.0\n            val tilt = if (it.hasKey(\"tilt\")) it.getDouble(\"tilt\") else 0.0\n            val bearing = if (it.hasKey(\"bearing\")) it.getDouble(\"bearing\") else 0.0\n            view.setCenter(lat, lng, zoom, tilt, bearing)\n        }\n    }\n\n    @ReactProp(name = \"showsMyLocationButton\")\n    fun setShowsMyLocationButton(view: GraniteNaverMapView, show: Boolean) {\n        view.setShowsMyLocationButton(show)\n    }\n\n    @ReactProp(name = \"compass\")\n    fun setCompass(view: GraniteNaverMapView, show: Boolean) {\n        view.setCompass(show)\n    }\n\n    @ReactProp(name = \"scaleBar\")\n    fun setScaleBar(view: GraniteNaverMapView, show: Boolean) {\n        view.setScaleBar(show)\n    }\n\n    @ReactProp(name = \"zoomControl\")\n    fun setZoomControl(view: GraniteNaverMapView, show: Boolean) {\n        view.setZoomControl(show)\n    }\n\n    @ReactProp(name = \"mapType\")\n    fun setMapType(view: GraniteNaverMapView, mapType: Int) {\n        view.setMapType(mapType)\n    }\n\n    @ReactProp(name = \"buildingHeight\", defaultFloat = 1f)\n    fun setBuildingHeight(view: GraniteNaverMapView, height: Float) {\n        view.setBuildingHeight(height)\n    }\n\n    @ReactProp(name = \"nightMode\")\n    fun setNightMode(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setNightMode(enabled)\n    }\n\n    @ReactProp(name = \"minZoomLevel\", defaultDouble = 0.0)\n    fun setMinZoomLevel(view: GraniteNaverMapView, level: Double) {\n        view.setMinZoomLevel(level)\n    }\n\n    @ReactProp(name = \"maxZoomLevel\", defaultDouble = 21.0)\n    fun setMaxZoomLevel(view: GraniteNaverMapView, level: Double) {\n        view.setMaxZoomLevel(level)\n    }\n\n    @ReactProp(name = \"scrollGesturesEnabled\", defaultBoolean = true)\n    fun setScrollGesturesEnabled(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setScrollGesturesEnabled(enabled)\n    }\n\n    @ReactProp(name = \"zoomGesturesEnabled\", defaultBoolean = true)\n    fun setZoomGesturesEnabled(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setZoomGesturesEnabled(enabled)\n    }\n\n    @ReactProp(name = \"tiltGesturesEnabled\", defaultBoolean = true)\n    fun setTiltGesturesEnabled(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setTiltGesturesEnabled(enabled)\n    }\n\n    @ReactProp(name = \"rotateGesturesEnabled\", defaultBoolean = true)\n    fun setRotateGesturesEnabled(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setRotateGesturesEnabled(enabled)\n    }\n\n    @ReactProp(name = \"stopGesturesEnabled\", defaultBoolean = true)\n    fun setStopGesturesEnabled(view: GraniteNaverMapView, enabled: Boolean) {\n        view.setStopGesturesEnabled(enabled)\n    }\n\n    @ReactProp(name = \"locationTrackingMode\")\n    fun setLocationTrackingMode(view: GraniteNaverMapView, mode: Int) {\n        view.setLocationTrackingMode(mode)\n    }\n\n    @ReactProp(name = \"mapPadding\")\n    fun setMapPadding(view: GraniteNaverMapView, padding: ReadableMap?) {\n        padding?.let {\n            val top = if (it.hasKey(\"top\")) it.getInt(\"top\") else 0\n            val left = if (it.hasKey(\"left\")) it.getInt(\"left\") else 0\n            val bottom = if (it.hasKey(\"bottom\")) it.getInt(\"bottom\") else 0\n            val right = if (it.hasKey(\"right\")) it.getInt(\"right\") else 0\n            view.setMapPadding(top, left, bottom, right)\n        }\n    }\n\n    companion object {\n        private const val COMMAND_ANIMATE_TO_COORDINATE = 1\n        private const val COMMAND_ANIMATE_TO_TWO_COORDINATES = 2\n        private const val COMMAND_ANIMATE_TO_REGION = 3\n        private const val COMMAND_SET_LAYER_GROUP_ENABLED = 4\n        private const val COMMAND_ADD_MARKER = 5\n        private const val COMMAND_UPDATE_MARKER = 6\n        private const val COMMAND_REMOVE_MARKER = 7\n        private const val COMMAND_ADD_POLYLINE = 8\n        private const val COMMAND_UPDATE_POLYLINE = 9\n        private const val COMMAND_REMOVE_POLYLINE = 10\n        private const val COMMAND_ADD_POLYGON = 11\n        private const val COMMAND_UPDATE_POLYGON = 12\n        private const val COMMAND_REMOVE_POLYGON = 13\n        private const val COMMAND_ADD_CIRCLE = 14\n        private const val COMMAND_UPDATE_CIRCLE = 15\n        private const val COMMAND_REMOVE_CIRCLE = 16\n        private const val COMMAND_ADD_PATH = 17\n        private const val COMMAND_UPDATE_PATH = 18\n        private const val COMMAND_REMOVE_PATH = 19\n        private const val COMMAND_ADD_ARROWHEAD_PATH = 20\n        private const val COMMAND_UPDATE_ARROWHEAD_PATH = 21\n        private const val COMMAND_REMOVE_ARROWHEAD_PATH = 22\n        private const val COMMAND_ADD_GROUND_OVERLAY = 23\n        private const val COMMAND_UPDATE_GROUND_OVERLAY = 24\n        private const val COMMAND_REMOVE_GROUND_OVERLAY = 25\n        private const val COMMAND_ADD_INFO_WINDOW = 26\n        private const val COMMAND_UPDATE_INFO_WINDOW = 27\n        private const val COMMAND_REMOVE_INFO_WINDOW = 28\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/example/.detoxrc.js",
    "content": "/** @type {Detox.DetoxConfig} */\nmodule.exports = {\n  testRunner: {\n    args: {\n      $0: 'jest',\n      config: 'e2e/jest.config.js',\n    },\n    jest: {\n      setupTimeout: 120000,\n    },\n  },\n  apps: {\n    'ios.debug': {\n      type: 'ios.app',\n      binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/GraniteNaverMapExample.app',\n      build:\n        'xcodebuild -workspace ios/GraniteNaverMapExample.xcworkspace -scheme GraniteNaverMapExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build',\n    },\n    'ios.release': {\n      type: 'ios.app',\n      binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/GraniteNaverMapExample.app',\n      build:\n        'xcodebuild -workspace ios/GraniteNaverMapExample.xcworkspace -scheme GraniteNaverMapExample -configuration Release -sdk iphonesimulator -derivedDataPath ios/build',\n    },\n    'android.debug': {\n      type: 'android.apk',\n      binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',\n      build: 'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..',\n      reversePorts: [8081],\n    },\n    'android.release': {\n      type: 'android.apk',\n      binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',\n      build: 'cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..',\n    },\n  },\n  devices: {\n    simulator: {\n      type: 'ios.simulator',\n      device: {\n        type: 'iPhone 16 Pro',\n      },\n    },\n    attached: {\n      type: 'android.attached',\n      device: {\n        adbName: '.*',\n      },\n    },\n    emulator: {\n      type: 'android.emulator',\n      device: {\n        avdName: 'Pixel_8_Pro',\n      },\n    },\n  },\n  configurations: {\n    'ios.sim.debug': {\n      device: 'simulator',\n      app: 'ios.debug',\n    },\n    'ios.sim.release': {\n      device: 'simulator',\n      app: 'ios.release',\n    },\n    'android.att.debug': {\n      device: 'attached',\n      app: 'android.debug',\n    },\n    'android.att.release': {\n      device: 'attached',\n      app: 'android.release',\n    },\n    'android.emu.debug': {\n      device: 'emulator',\n      app: 'android.debug',\n    },\n    'android.emu.release': {\n      device: 'emulator',\n      app: 'android.release',\n    },\n  },\n};\n"
  },
  {
    "path": "packages/naver-map/example/android/app/build.gradle",
    "content": "apply plugin: \"com.android.application\"\napply plugin: \"org.jetbrains.kotlin.android\"\napply plugin: \"com.facebook.react\"\n\n/**\n * This is the configuration block to customize your React Native Android app.\n * By default you don't need to apply any configuration, just uncomment the lines you need.\n */\nreact {\n    /* Folders */\n    //   The root of your project, i.e. where \"package.json\" lives. Default is '../..'\n    // root = file(\"../../\")\n    //   The folder where the react-native NPM package is. Default is ../../node_modules/react-native\n    // reactNativeDir = file(\"../../node_modules/react-native\")\n    //   The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen\n    // codegenDir = file(\"../../node_modules/@react-native/codegen\")\n    //   The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js\n    // cliFile = file(\"../../node_modules/react-native/cli.js\")\n\n    /* Variants */\n    //   The list of variants to that are debuggable. For those we're going to\n    //   skip the bundling of the JS bundle and the assets. By default is just 'debug'.\n    //   If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.\n    // debuggableVariants = [\"liteDebug\", \"prodDebug\"]\n\n    /* Bundling */\n    //   A list containing the node command and its flags. Default is just 'node'.\n    // nodeExecutableAndArgs = [\"node\"]\n    //\n    //   The command to run when bundling. By default is 'bundle'\n    // bundleCommand = \"ram-bundle\"\n    //\n    //   The path to the CLI configuration file. Default is empty.\n    // bundleConfig = file(../rn-cli.config.js)\n    //\n    //   The name of the generated asset file containing your JS bundle\n    // bundleAssetName = \"MyApplication.android.bundle\"\n    //\n    //   The entry file for bundle generation. Default is 'index.android.js' or 'index.js'\n    // entryFile = file(\"../js/MyApplication.android.js\")\n    //\n    //   A list of extra flags to pass to the 'bundle' commands.\n    //   See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle\n    // extraPackagerArgs = []\n\n    /* Hermes Commands */\n    //   The hermes compiler command to run. By default it is 'hermesc'\n    // hermesCommand = \"$rootDir/my-custom-hermesc/bin/hermesc\"\n    //\n    //   The list of flags to pass to the Hermes compiler. By default is \"-O\", \"-output-source-map\"\n    // hermesFlags = [\"-O\", \"-output-source-map\"]\n\n    /* Autolinking */\n    // Disabled - using manual module include\n    // autolinkLibrariesWithApp()\n}\n\n/**\n * Set this to true to Run Proguard on Release builds to minify the Java bytecode.\n */\ndef enableProguardInReleaseBuilds = false\n\n/**\n * The preferred build flavor of JavaScriptCore (JSC)\n *\n * For example, to use the international variant, you can use:\n * `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`\n *\n * The international variant includes ICU i18n library and necessary data\n * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that\n * give correct results when using with locales other than en-US. Note that\n * this variant is about 6MiB larger per architecture than default.\n */\ndef jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'\n\nandroid {\n    ndkVersion rootProject.ext.ndkVersion\n    buildToolsVersion rootProject.ext.buildToolsVersion\n    compileSdk rootProject.ext.compileSdkVersion\n\n    namespace \"run.granite.navermap.example\"\n    defaultConfig {\n        applicationId \"run.granite.navermap.example\"\n        minSdkVersion rootProject.ext.minSdkVersion\n        targetSdkVersion rootProject.ext.targetSdkVersion\n        versionCode 1\n        versionName \"1.0\"\n\n        // Detox instrumentation test runner\n        testBuildType System.getProperty('testBuildType', 'debug')\n        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'\n    }\n    signingConfigs {\n        debug {\n            storeFile file('debug.keystore')\n            storePassword 'android'\n            keyAlias 'androiddebugkey'\n            keyPassword 'android'\n        }\n    }\n    buildTypes {\n        debug {\n            signingConfig signingConfigs.debug\n        }\n        release {\n            // Caution! In production, you need to generate your own keystore file.\n            // see https://reactnative.dev/docs/signed-apk-android.\n            signingConfig signingConfigs.debug\n            minifyEnabled enableProguardInReleaseBuilds\n            proguardFiles getDefaultProguardFile(\"proguard-android.txt\"), \"proguard-rules.pro\"\n        }\n    }\n}\n\ndependencies {\n    // The version of react-native is set by the React Native Gradle Plugin\n    implementation(\"com.facebook.react:react-android\")\n\n    if (hermesEnabled.toBoolean()) {\n        implementation(\"com.facebook.react:hermes-android\")\n    } else {\n        implementation jscFlavor\n    }\n\n    // Granite NaverMap (manual include since autolinking is disabled)\n    implementation project(':granite-naver-map')\n\n    // Detox\n    androidTestImplementation('com.wix:detox:+')\n    androidTestImplementation 'junit:junit:4.13.2'\n}\n"
  },
  {
    "path": "packages/naver-map/example/android/app/src/androidTest/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"run.granite.navermap.example\">\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />\n    <uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />\n</manifest>\n"
  },
  {
    "path": "packages/naver-map/example/android/app/src/androidTest/java/run/granite/navermap/example/DetoxTest.java",
    "content": "package run.granite.navermap.example;\n\nimport com.wix.detox.Detox;\nimport com.wix.detox.config.DetoxConfig;\n\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport androidx.test.ext.junit.runners.AndroidJUnit4;\nimport androidx.test.filters.LargeTest;\nimport androidx.test.rule.ActivityTestRule;\n\n@RunWith(AndroidJUnit4.class)\n@LargeTest\npublic class DetoxTest {\n    @Rule\n    public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);\n\n    @Test\n    public void runDetoxTests() {\n        DetoxConfig detoxConfig = new DetoxConfig();\n        detoxConfig.idlePolicyConfig.masterTimeoutSec = 90;\n        detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60;\n        detoxConfig.rnContextLoadTimeoutSec = (BuildConfig.DEBUG ? 180 : 60);\n\n        Detox.runTests(mActivityRule, detoxConfig);\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/example/android/app/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />\n    <uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />\n\n    <application\n      android:name=\".MainApplication\"\n      android:label=\"@string/app_name\"\n      android:icon=\"@mipmap/ic_launcher\"\n      android:roundIcon=\"@mipmap/ic_launcher_round\"\n      android:allowBackup=\"false\"\n      android:theme=\"@style/AppTheme\"\n      android:usesCleartextTraffic=\"${usesCleartextTraffic}\"\n      android:supportsRtl=\"true\">\n      <activity\n        android:name=\".MainActivity\"\n        android:label=\"@string/app_name\"\n        android:configChanges=\"keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode\"\n        android:launchMode=\"singleTask\"\n        android:windowSoftInputMode=\"adjustResize\"\n        android:exported=\"true\">\n        <intent-filter>\n            <action android:name=\"android.intent.action.MAIN\" />\n            <category android:name=\"android.intent.category.LAUNCHER\" />\n        </intent-filter>\n      </activity>\n    </application>\n</manifest>\n"
  },
  {
    "path": "packages/naver-map/example/android/app/src/main/java/run/granite/navermap/example/MainActivity.kt",
    "content": "package run.granite.navermap.example\n\nimport com.facebook.react.ReactActivity\nimport com.facebook.react.ReactActivityDelegate\nimport com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled\nimport com.facebook.react.defaults.DefaultReactActivityDelegate\n\nclass MainActivity : ReactActivity() {\n\n  /**\n   * Returns the name of the main component registered from JavaScript. This is used to schedule\n   * rendering of the component.\n   */\n  override fun getMainComponentName(): String = \"GraniteNaverMapExample\"\n\n  /**\n   * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]\n   * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]\n   */\n  override fun createReactActivityDelegate(): ReactActivityDelegate =\n      DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)\n}\n"
  },
  {
    "path": "packages/naver-map/example/android/app/src/main/java/run/granite/navermap/example/MainApplication.kt",
    "content": "package run.granite.navermap.example\n\nimport android.app.Application\nimport com.facebook.react.ReactApplication\nimport com.facebook.react.ReactHost\nimport com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative\nimport com.facebook.react.ReactPackage\nimport com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost\nimport com.facebook.react.shell.MainReactPackage\nimport run.granite.navermap.GraniteNaverMapPackage\n\nclass MainApplication : Application(), ReactApplication {\n\n  override val reactHost: ReactHost by lazy {\n    getDefaultReactHost(\n      context = applicationContext,\n      packageList = getPackages(),\n    )\n  }\n\n  private fun getPackages(): List<ReactPackage> = listOf(\n    MainReactPackage(),\n    GraniteNaverMapPackage(),\n  )\n\n  override fun onCreate() {\n    super.onCreate()\n    loadReactNative(this)\n  }\n}\n"
  },
  {
    "path": "packages/naver-map/example/android/app/src/main/res/drawable/ic_launcher_foreground.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <path\n        android:fillColor=\"#1a1a2e\"\n        android:pathData=\"M54,54m-40,0a40,40 0,1 1,80 0a40,40 0,1 1,-80 0\"/>\n    <path\n        android:fillColor=\"#03DAC5\"\n        android:pathData=\"M54,30L54,54L74,54\"/>\n    <path\n        android:strokeColor=\"#03DAC5\"\n        android:strokeWidth=\"4\"\n        android:pathData=\"M54,30L54,54L74,54\"/>\n</vector>\n"
  },
  {
    "path": "packages/naver-map/example/android/app/src/main/res/drawable/rn_edit_text_material.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<inset xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:insetLeft=\"@dimen/abc_edit_text_inset_horizontal_material\"\n    android:insetRight=\"@dimen/abc_edit_text_inset_horizontal_material\"\n    android:insetTop=\"@dimen/abc_edit_text_inset_top_material\"\n    android:insetBottom=\"@dimen/abc_edit_text_inset_bottom_material\">\n\n    <selector>\n        <item android:state_enabled=\"false\" android:drawable=\"@drawable/abc_textfield_default_mtrl_alpha\" />\n        <item android:state_pressed=\"false\" android:state_focused=\"false\" android:drawable=\"@drawable/abc_textfield_default_mtrl_alpha\" />\n        <item android:drawable=\"@drawable/abc_textfield_activated_mtrl_alpha\" />\n    </selector>\n\n</inset>\n"
  },
  {
    "path": "packages/naver-map/example/android/app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ic_launcher_background\">#03DAC5</color>\n</resources>\n"
  },
  {
    "path": "packages/naver-map/example/android/app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">GraniteNaverMapExample</string>\n</resources>\n"
  },
  {
    "path": "packages/naver-map/example/android/app/src/main/res/values/styles.xml",
    "content": "<resources>\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.DayNight.NoActionBar\">\n        <item name=\"android:editTextBackground\">@drawable/rn_edit_text_material</item>\n        <item name=\"colorPrimary\">@android:color/darker_gray</item>\n        <item name=\"colorPrimaryDark\">@android:color/darker_gray</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "packages/naver-map/example/android/build.gradle",
    "content": "buildscript {\n    ext {\n        buildToolsVersion = \"36.0.0\"\n        minSdkVersion = 24\n        compileSdkVersion = 36\n        targetSdkVersion = 36\n        ndkVersion = \"27.1.12297006\"\n        kotlinVersion = \"2.1.20\"\n    }\n    repositories {\n        google()\n        mavenCentral()\n    }\n    dependencies {\n        classpath(\"com.android.tools.build:gradle\")\n        classpath(\"com.facebook.react:react-native-gradle-plugin\")\n        classpath(\"org.jetbrains.kotlin:kotlin-gradle-plugin\")\n    }\n}\n\napply plugin: \"com.facebook.react.rootproject\"\n"
  },
  {
    "path": "packages/naver-map/example/android/settings.gradle",
    "content": "pluginManagement { includeBuild(\"../node_modules/@react-native/gradle-plugin\") }\nplugins { id(\"com.facebook.react.settings\") }\n// Autolinking disabled - using manual module include\n// extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }\nrootProject.name = 'run.granite.navermap.example'\ninclude ':app'\ninclude ':granite-naver-map'\nproject(':granite-naver-map').projectDir = new File(rootProject.projectDir, '../../android')\nincludeBuild('../node_modules/@react-native/gradle-plugin')\n\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)\n    repositories {\n        google()\n        mavenCentral()\n        maven {\n            // Naver Maps repository\n            url \"https://repository.map.naver.com/archive/maven\"\n        }\n        maven {\n            // Detox repository\n            url \"$rootDir/../node_modules/detox/Detox-android\"\n        }\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/example/app.json",
    "content": "{\n  \"name\": \"GraniteNaverMapExample\",\n  \"displayName\": \"GraniteNaverMapExample\"\n}\n"
  },
  {
    "path": "packages/naver-map/example/babel.config.js",
    "content": "const path = require('path');\nconst { getConfig } = require('react-native-builder-bob/babel-config');\nconst pkg = require('../package.json');\n\nconst root = path.resolve(__dirname, '..');\n\nmodule.exports = getConfig(\n  {\n    presets: ['module:@react-native/babel-preset'],\n  },\n  { root, pkg }\n);\n"
  },
  {
    "path": "packages/naver-map/example/e2e/GraniteNaverMap.e2e.ts",
    "content": "import { device, element, by, expect } from 'detox';\n\ndescribe('GraniteNaverMap', () => {\n  beforeAll(async () => {\n    await device.launchApp();\n  });\n\n  beforeEach(async () => {\n    await device.reloadReactNative();\n  });\n\n  it('should display the app title', async () => {\n    await expect(element(by.id('app-title'))).toBeVisible();\n  });\n\n  it('should navigate to Seoul when button pressed', async () => {\n    await element(by.id('goto-seoul')).tap();\n    await expect(element(by.id('log-container'))).toBeVisible();\n  });\n\n  it('should navigate to Gangnam when button pressed', async () => {\n    await element(by.id('goto-gangnam')).tap();\n    await expect(element(by.id('log-container'))).toBeVisible();\n  });\n\n  it('should navigate to Hongdae when button pressed', async () => {\n    await element(by.id('goto-hongdae')).tap();\n    await expect(element(by.id('log-container'))).toBeVisible();\n  });\n\n  it('should toggle markers overlay', async () => {\n    await element(by.id('toggle-markers')).tap();\n    await expect(element(by.id('log-container'))).toBeVisible();\n  });\n\n  it('should toggle polyline overlay', async () => {\n    await element(by.id('toggle-polyline')).tap();\n    await expect(element(by.id('log-container'))).toBeVisible();\n  });\n\n  it('should toggle polygon overlay', async () => {\n    await element(by.id('toggle-polygon')).tap();\n    await expect(element(by.id('log-container'))).toBeVisible();\n  });\n\n  it('should toggle circle overlay', async () => {\n    await element(by.id('toggle-circle')).tap();\n    await expect(element(by.id('log-container'))).toBeVisible();\n  });\n\n  it('should toggle path overlay', async () => {\n    await element(by.id('toggle-path')).tap();\n    await expect(element(by.id('log-container'))).toBeVisible();\n  });\n\n  it('should cycle map type', async () => {\n    await element(by.id('toggle-maptype')).tap();\n    await expect(element(by.id('log-container'))).toBeVisible();\n  });\n\n  it('should toggle night mode', async () => {\n    await element(by.id('toggle-nightmode')).tap();\n    await expect(element(by.id('log-container'))).toBeVisible();\n  });\n\n  it('should clear logs', async () => {\n    await element(by.id('goto-seoul')).tap();\n    await element(by.id('clear-logs')).tap();\n    await expect(element(by.id('log-container'))).toBeVisible();\n  });\n});\n"
  },
  {
    "path": "packages/naver-map/example/e2e/jest.config.js",
    "content": "/** @type {import('@jest/types').Config.InitialOptions} */\nmodule.exports = {\n  rootDir: '..',\n  testMatch: ['<rootDir>/e2e/**/*.e2e.ts'],\n  testTimeout: 120000,\n  maxWorkers: 1,\n  globalSetup: 'detox/runners/jest/globalSetup',\n  globalTeardown: 'detox/runners/jest/globalTeardown',\n  reporters: ['detox/runners/jest/reporter'],\n  testEnvironment: 'detox/runners/jest/testEnvironment',\n  verbose: true,\n  transform: {\n    '^.+\\\\.(ts|tsx)$': ['ts-jest', { tsconfig: '<rootDir>/e2e/tsconfig.json' }],\n  },\n};\n"
  },
  {
    "path": "packages/naver-map/example/e2e/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"commonjs\",\n    \"lib\": [\"ES2020\"],\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"outDir\": \"./dist\",\n    \"rootDir\": \".\",\n    \"types\": [\"jest\", \"detox\", \"node\"]\n  },\n  \"include\": [\"**/*.ts\"],\n  \"exclude\": [\"dist\"]\n}\n"
  },
  {
    "path": "packages/naver-map/example/index.js",
    "content": "import { AppRegistry } from 'react-native';\nimport { name as appName } from './app.json';\nimport App from './src/App';\n\nAppRegistry.registerComponent(appName, () => App);\n"
  },
  {
    "path": "packages/naver-map/example/ios/.xcode.env",
    "content": "export NODE_BINARY=$(command -v node)\n"
  },
  {
    "path": "packages/naver-map/example/ios/GraniteNaverMapExample/AppDelegate.swift",
    "content": "import UIKit\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\n\n@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n  var window: UIWindow?\n\n  var reactNativeDelegate: ReactNativeDelegate?\n  var reactNativeFactory: RCTReactNativeFactory?\n\n  func application(\n    _ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n  ) -> Bool {\n    let delegate = ReactNativeDelegate()\n    let factory = RCTReactNativeFactory(delegate: delegate)\n    delegate.dependencyProvider = RCTAppDependencyProvider()\n\n    reactNativeDelegate = delegate\n    reactNativeFactory = factory\n\n    window = UIWindow(frame: UIScreen.main.bounds)\n\n    factory.startReactNative(\n      withModuleName: \"GraniteNaverMapExample\",\n      in: window,\n      launchOptions: launchOptions\n    )\n\n    return true\n  }\n}\n\nclass ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {\n  override func sourceURL(for bridge: RCTBridge) -> URL? {\n    self.bundleURL()\n  }\n\n  override func bundleURL() -> URL? {\n#if DEBUG\n    RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: \"index\")\n#else\n    Bundle.main.url(forResource: \"main\", withExtension: \"jsbundle\")\n#endif\n  }\n}\n"
  },
  {
    "path": "packages/naver-map/example/ios/GraniteNaverMapExample/Images.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\": [\n    {\n      \"idiom\": \"universal\",\n      \"platform\": \"ios\",\n      \"size\": \"1024x1024\"\n    }\n  ],\n  \"info\": {\n    \"author\": \"xcode\",\n    \"version\": 1\n  }\n}\n"
  },
  {
    "path": "packages/naver-map/example/ios/GraniteNaverMapExample/Images.xcassets/Contents.json",
    "content": "{\n  \"info\": {\n    \"author\": \"xcode\",\n    \"version\": 1\n  }\n}\n"
  },
  {
    "path": "packages/naver-map/example/ios/GraniteNaverMapExample/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>CADisableMinimumFrameDurationOnPhone</key>\n\t<true/>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>GraniteNaverMapExample</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</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>$(MARKETING_VERSION)</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>NSAppTransportSecurity</key>\n\t<dict>\n\t\t<key>NSAllowsArbitraryLoads</key>\n\t\t<false/>\n\t\t<key>NSAllowsLocalNetworking</key>\n\t\t<true/>\n\t</dict>\n\t<key>NSLocationWhenInUseUsageDescription</key>\n\t<string>This app needs access to your location to show it on the map.</string>\n\t<key>RCTNewArchEnabled</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>arm64</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UIViewControllerBasedStatusBarAppearance</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "packages/naver-map/example/ios/GraniteNaverMapExample/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"15702\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <device id=\"retina4_7\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"15704\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"GraniteNaverMapExample\" textAlignment=\"center\" lineBreakMode=\"middleTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"18\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GJd-Yh-RWb\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"202\" width=\"375\" height=\"43\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"36\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Powered by React Native\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"MN2-I3-ftu\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"626\" width=\"375\" height=\"21\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                        </subviews>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\" cocoaTouchSystemColor=\"whiteColor\"/>\n                        <constraints>\n                            <constraint firstItem=\"Bcu-3y-fUS\" firstAttribute=\"bottom\" secondItem=\"MN2-I3-ftu\" secondAttribute=\"bottom\" constant=\"20\" id=\"OZV-Vh-mqD\"/>\n                            <constraint firstItem=\"Bcu-3y-fUS\" firstAttribute=\"centerX\" secondItem=\"GJd-Yh-RWb\" secondAttribute=\"centerX\" id=\"Q3B-4B-g5h\"/>\n                            <constraint firstItem=\"MN2-I3-ftu\" firstAttribute=\"centerX\" secondItem=\"Bcu-3y-fUS\" secondAttribute=\"centerX\" id=\"akx-eg-2ui\"/>\n                            <constraint firstItem=\"MN2-I3-ftu\" firstAttribute=\"leading\" secondItem=\"Bcu-3y-fUS\" secondAttribute=\"leading\" id=\"i1E-0Y-4RG\"/>\n                            <constraint firstItem=\"GJd-Yh-RWb\" firstAttribute=\"centerY\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"bottom\" multiplier=\"1/3\" constant=\"1\" id=\"moa-c2-u7t\"/>\n                            <constraint firstItem=\"GJd-Yh-RWb\" firstAttribute=\"leading\" secondItem=\"Bcu-3y-fUS\" secondAttribute=\"leading\" symbolic=\"YES\" id=\"x7j-FC-K8j\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"Bcu-3y-fUS\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"52.173913043478265\" y=\"375\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "packages/naver-map/example/ios/GraniteNaverMapExample/PrivacyInfo.xcprivacy",
    "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>NSPrivacyAccessedAPITypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>NSPrivacyAccessedAPIType</key>\n\t\t\t<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>\n\t\t\t<key>NSPrivacyAccessedAPITypeReasons</key>\n\t\t\t<array>\n\t\t\t\t<string>C617.1</string>\n\t\t\t</array>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>NSPrivacyAccessedAPIType</key>\n\t\t\t<string>NSPrivacyAccessedAPICategoryUserDefaults</string>\n\t\t\t<key>NSPrivacyAccessedAPITypeReasons</key>\n\t\t\t<array>\n\t\t\t\t<string>CA92.1</string>\n\t\t\t</array>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>NSPrivacyAccessedAPIType</key>\n\t\t\t<string>NSPrivacyAccessedAPICategorySystemBootTime</string>\n\t\t\t<key>NSPrivacyAccessedAPITypeReasons</key>\n\t\t\t<array>\n\t\t\t\t<string>35F9.1</string>\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>NSPrivacyCollectedDataTypes</key>\n\t<array/>\n\t<key>NSPrivacyTracking</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "packages/naver-map/example/ios/GraniteNaverMapExample.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 54;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t0C80B921A6F3F58F76C31292 /* libPods-GraniteNaverMapExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-GraniteNaverMapExample.a */; };\n\t\t13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };\n\t\t761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };\n\t\t81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };\n\t\tBBDDA150B27522F5C980C682 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t13B07F961A680F5B00A75B9A /* GraniteNaverMapExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GraniteNaverMapExample.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = GraniteNaverMapExample/Images.xcassets; sourceTree = \"<group>\"; };\n\t\t13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = GraniteNaverMapExample/Info.plist; sourceTree = \"<group>\"; };\n\t\t13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = GraniteNaverMapExample/PrivacyInfo.xcprivacy; sourceTree = \"<group>\"; };\n\t\t3B4392A12AC88292D35C810B /* Pods-GraniteNaverMapExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-GraniteNaverMapExample.debug.xcconfig\"; path = \"Target Support Files/Pods-GraniteNaverMapExample/Pods-GraniteNaverMapExample.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t5709B34CF0A7D63546082F79 /* Pods-GraniteNaverMapExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-GraniteNaverMapExample.release.xcconfig\"; path = \"Target Support Files/Pods-GraniteNaverMapExample/Pods-GraniteNaverMapExample.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t5DCACB8F33CDC322A6C60F78 /* libPods-GraniteNaverMapExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"libPods-GraniteNaverMapExample.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = GraniteNaverMapExample/AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = GraniteNaverMapExample/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\tED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t13B07F8C1A680F5B00A75B9A /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0C80B921A6F3F58F76C31292 /* libPods-GraniteNaverMapExample.a 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\t13B07FAE1A68108700A75B9A /* GraniteNaverMapExample */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07FB51A68108700A75B9A /* Images.xcassets */,\n\t\t\t\t761780EC2CA45674006654EE /* AppDelegate.swift */,\n\t\t\t\t13B07FB61A68108700A75B9A /* Info.plist */,\n\t\t\t\t81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,\n\t\t\t\t13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,\n\t\t\t);\n\t\t\tname = GraniteNaverMapExample;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t2D16E6871FA4F8E400B85C8A /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tED297162215061F000B7C4FE /* JavaScriptCore.framework */,\n\t\t\t\t5DCACB8F33CDC322A6C60F78 /* libPods-GraniteNaverMapExample.a */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t832341AE1AAA6A7D00B99B32 /* Libraries */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tname = Libraries;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t83CBB9F61A601CBA00E9B192 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07FAE1A68108700A75B9A /* GraniteNaverMapExample */,\n\t\t\t\t832341AE1AAA6A7D00B99B32 /* Libraries */,\n\t\t\t\t83CBBA001A601CBA00E9B192 /* Products */,\n\t\t\t\t2D16E6871FA4F8E400B85C8A /* Frameworks */,\n\t\t\t\tBBD78D7AC51CEA395F1C20DB /* Pods */,\n\t\t\t);\n\t\t\tindentWidth = 2;\n\t\t\tsourceTree = \"<group>\";\n\t\t\ttabWidth = 2;\n\t\t\tusesTabs = 0;\n\t\t};\n\t\t83CBBA001A601CBA00E9B192 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07F961A680F5B00A75B9A /* GraniteNaverMapExample.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tBBD78D7AC51CEA395F1C20DB /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3B4392A12AC88292D35C810B /* Pods-GraniteNaverMapExample.debug.xcconfig */,\n\t\t\t\t5709B34CF0A7D63546082F79 /* Pods-GraniteNaverMapExample.release.xcconfig */,\n\t\t\t);\n\t\t\tpath = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t13B07F861A680F5B00A75B9A /* GraniteNaverMapExample */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget \"GraniteNaverMapExample\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tC38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t13B07F871A680F5B00A75B9A /* Sources */,\n\t\t\t\t13B07F8C1A680F5B00A75B9A /* Frameworks */,\n\t\t\t\t13B07F8E1A680F5B00A75B9A /* Resources */,\n\t\t\t\t00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,\n\t\t\t\t00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,\n\t\t\t\tE235C05ADACE081382539298 /* [CP] Copy Pods Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = GraniteNaverMapExample;\n\t\t\tproductName = GraniteNaverMapExample;\n\t\t\tproductReference = 13B07F961A680F5B00A75B9A /* GraniteNaverMapExample.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t83CBB9F71A601CBA00E9B192 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 1210;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t13B07F861A680F5B00A75B9A = {\n\t\t\t\t\t\tLastSwiftMigration = 1120;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject \"GraniteNaverMapExample\" */;\n\t\t\tcompatibilityVersion = \"Xcode 12.0\";\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 = 83CBB9F61A601CBA00E9B192;\n\t\t\tproductRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t13B07F861A680F5B00A75B9A /* GraniteNaverMapExample */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t13B07F8E1A680F5B00A75B9A /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,\n\t\t\t\tBBDDA150B27522F5C980C682 /* PrivacyInfo.xcprivacy 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\t00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"$(SRCROOT)/.xcode.env.local\",\n\t\t\t\t\"$(SRCROOT)/.xcode.env\",\n\t\t\t);\n\t\t\tname = \"Bundle React Native code and images\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"set -e\\n\\nWITH_ENVIRONMENT=\\\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\\\"\\nREACT_NATIVE_XCODE=\\\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\\\"\\n\\n/bin/sh -c \\\"\\\\\\\"$WITH_ENVIRONMENT\\\\\\\" \\\\\\\"$REACT_NATIVE_XCODE\\\\\\\"\\\"\\n\";\n\t\t};\n\t\t00EEFC60759A1932668264C0 /* [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-GraniteNaverMapExample/Pods-GraniteNaverMapExample-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-GraniteNaverMapExample/Pods-GraniteNaverMapExample-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-GraniteNaverMapExample/Pods-GraniteNaverMapExample-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tC38B50BA6285516D6DCD4F65 /* [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-GraniteNaverMapExample-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\tE235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {\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-GraniteNaverMapExample/Pods-GraniteNaverMapExample-resources-${CONFIGURATION}-input-files.xcfilelist\",\n\t\t\t);\n\t\t\tname = \"[CP] Copy Pods Resources\";\n\t\t\toutputFileListPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-GraniteNaverMapExample/Pods-GraniteNaverMapExample-resources-${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-GraniteNaverMapExample/Pods-GraniteNaverMapExample-resources.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t13B07F871A680F5B00A75B9A /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t761780ED2CA45674006654EE /* AppDelegate.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t13B07F941A680F5B00A75B9A /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-GraniteNaverMapExample.debug.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\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tINFOPLIST_FILE = GraniteNaverMapExample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\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\tMARKETING_VERSION = 1.0;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"-ObjC\",\n\t\t\t\t\t\"-lc++\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = run.granite.navermap.example;\n\t\t\t\tPRODUCT_NAME = GraniteNaverMapExample;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t13B07F951A680F5B00A75B9A /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-GraniteNaverMapExample.release.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\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tINFOPLIST_FILE = GraniteNaverMapExample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\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\tMARKETING_VERSION = 1.0;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"-ObjC\",\n\t\t\t\t\t\"-lc++\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = run.granite.navermap.example;\n\t\t\t\tPRODUCT_NAME = GraniteNaverMapExample;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t83CBBA201A601CBA00E9B192 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++20\";\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_COMMA = 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_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_IMPLICIT_RETAIN_SELF = 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\t\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = \"\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\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_SYMBOLS_PRIVATE_EXTERN = NO;\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_UNDECLARED_SELECTOR = YES;\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\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t/usr/lib/swift,\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tLIBRARY_SEARCH_PATHS = (\n\t\t\t\t\t\"\\\"$(SDKROOT)/usr/lib/swift\\\"\",\n\t\t\t\t\t\"\\\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\\\"\",\n\t\t\t\t\t\"\\\"$(inherited)\\\"\",\n\t\t\t\t);\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_CFLAGS = \"$(inherited)\";\n\t\t\t\tOTHER_CPLUSPLUSFLAGS = (\n\t\t\t\t\t\"$(OTHER_CFLAGS)\",\n\t\t\t\t\t\"-DFOLLY_NO_CONFIG\",\n\t\t\t\t\t\"-DFOLLY_MOBILE=1\",\n\t\t\t\t\t\"-DFOLLY_USE_LIBCPP=1\",\n\t\t\t\t\t\"-DFOLLY_CFG_NO_COROUTINES=1\",\n\t\t\t\t\t\"-DFOLLY_HAVE_CLOCK_GETTIME=1\",\n\t\t\t\t);\n\t\t\t\tREACT_NATIVE_PATH = \"${PODS_ROOT}/../../node_modules/react-native\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) DEBUG\";\n\t\t\t\tUSE_HERMES = true;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t83CBBA211A601CBA00E9B192 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++20\";\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_COMMA = 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_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_IMPLICIT_RETAIN_SELF = 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\t\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = \"\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\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_UNDECLARED_SELECTOR = YES;\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\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t/usr/lib/swift,\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tLIBRARY_SEARCH_PATHS = (\n\t\t\t\t\t\"\\\"$(SDKROOT)/usr/lib/swift\\\"\",\n\t\t\t\t\t\"\\\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\\\"\",\n\t\t\t\t\t\"\\\"$(inherited)\\\"\",\n\t\t\t\t);\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tOTHER_CFLAGS = \"$(inherited)\";\n\t\t\t\tOTHER_CPLUSPLUSFLAGS = (\n\t\t\t\t\t\"$(OTHER_CFLAGS)\",\n\t\t\t\t\t\"-DFOLLY_NO_CONFIG\",\n\t\t\t\t\t\"-DFOLLY_MOBILE=1\",\n\t\t\t\t\t\"-DFOLLY_USE_LIBCPP=1\",\n\t\t\t\t\t\"-DFOLLY_CFG_NO_COROUTINES=1\",\n\t\t\t\t\t\"-DFOLLY_HAVE_CLOCK_GETTIME=1\",\n\t\t\t\t);\n\t\t\t\tREACT_NATIVE_PATH = \"${PODS_ROOT}/../../node_modules/react-native\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tUSE_HERMES = true;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget \"GraniteNaverMapExample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t13B07F941A680F5B00A75B9A /* Debug */,\n\t\t\t\t13B07F951A680F5B00A75B9A /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject \"GraniteNaverMapExample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t83CBBA201A601CBA00E9B192 /* Debug */,\n\t\t\t\t83CBBA211A601CBA00E9B192 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;\n}\n"
  },
  {
    "path": "packages/naver-map/example/ios/GraniteNaverMapExample.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:GraniteNaverMapExample.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "packages/naver-map/example/ios/Podfile",
    "content": "ENV['RCT_NEW_ARCH_ENABLED'] = '1'\n\n# Resolve react_native_pods.rb with node to allow for hoisting\nrequire Pod::Executable.execute_command('node', ['-p',\n  'require.resolve(\n    \"react-native/scripts/react_native_pods.rb\",\n    {paths: [process.argv[1]]},\n  )', __dir__]).strip\n\nplatform :ios, min_ios_version_supported\nprepare_react_native_project!\n\nlinkage = ENV['USE_FRAMEWORKS']\nif linkage != nil\n  Pod::UI.puts \"Configuring Pod with #{linkage}ally linked Frameworks\".green\n  use_frameworks! :linkage => linkage.to_sym\nend\n\ntarget 'GraniteNaverMapExample' do\n  config = use_native_modules!\n\n  use_react_native!(\n    :path => config[:reactNativePath],\n    # An absolute path to your application root.\n    :app_path => \"#{Pod::Config.instance.installation_root}/..\"\n  )\n\n  post_install do |installer|\n    react_native_post_install(\n      installer,\n      config[:reactNativePath],\n      :mac_catalyst_enabled => false,\n      # :ccache_enabled => true\n    )\n  end\nend\n"
  },
  {
    "path": "packages/naver-map/example/jest.config.js",
    "content": "module.exports = {\n  preset: 'react-native',\n  modulePathIgnorePatterns: ['<rootDir>/e2e/', '<rootDir>/node_modules/'],\n};\n"
  },
  {
    "path": "packages/naver-map/example/metro.config.js",
    "content": "const path = require('path');\nconst { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');\n\nconst root = path.resolve(__dirname, '..');\n\n/**\n * Metro configuration\n * https://facebook.github.io/metro/docs/configuration\n *\n * @type {import('metro-config').MetroConfig}\n */\nconst config = {\n  watchFolders: [root],\n  resolver: {\n    extraNodeModules: {\n      '@granite-js/naver-map': root,\n    },\n  },\n};\n\nmodule.exports = mergeConfig(getDefaultConfig(__dirname), config);\n"
  },
  {
    "path": "packages/naver-map/example/package.json",
    "content": "{\n  \"name\": \"@granite-js/naver-map-example\",\n  \"version\": \"0.0.1\",\n  \"private\": true,\n  \"scripts\": {\n    \"android\": \"react-native run-android\",\n    \"ios\": \"react-native run-ios\",\n    \"start\": \"react-native start\",\n    \"build:android\": \"react-native build-android --extra-params \\\"--no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a\\\"\",\n    \"build:ios\": \"react-native build-ios --mode Debug\"\n  },\n  \"dependencies\": {\n    \"@granite-js/naver-map\": \"file:..\",\n    \"react\": \"19.2.0\",\n    \"react-native\": \"0.83.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.25.2\",\n    \"@babel/preset-env\": \"^7.25.3\",\n    \"@babel/runtime\": \"^7.25.0\",\n    \"@react-native-community/cli\": \"20.0.0\",\n    \"@react-native-community/cli-platform-android\": \"20.0.0\",\n    \"@react-native-community/cli-platform-ios\": \"20.0.0\",\n    \"@react-native/babel-preset\": \"0.83.0\",\n    \"@react-native/metro-config\": \"0.83.0\",\n    \"@react-native/typescript-config\": \"0.83.0\",\n    \"@types/jest\": \"^29.5.14\",\n    \"@types/react\": \"^19.2.0\",\n    \"detox\": \"^20.33.0\",\n    \"jest\": \"^29.7.0\",\n    \"react-native-builder-bob\": \"^0.40.17\",\n    \"react-native-monorepo-config\": \"^0.3.1\",\n    \"ts-jest\": \"^29.2.5\"\n  },\n  \"engines\": {\n    \"node\": \">=20\"\n  }\n}\n"
  },
  {
    "path": "packages/naver-map/example/react-native.config.js",
    "content": "const path = require('path');\nconst pkg = require('../package.json');\n\nmodule.exports = {\n  project: {\n    ios: {\n      automaticPodsInstallation: true,\n    },\n  },\n  dependencies: {\n    [pkg.name]: {\n      root: path.join(__dirname, '..'),\n      platforms: {\n        // Codegen script incorrectly fails without this\n        // So we explicitly specify the platforms with empty object\n        ios: {},\n        android: {},\n      },\n    },\n  },\n};\n"
  },
  {
    "path": "packages/naver-map/example/src/App.tsx",
    "content": "import {\n  NaverMapView,\n  Marker,\n  Polyline,\n  Polygon,\n  Circle,\n  Path,\n  type CameraChangeEvent,\n  type MapClickEvent,\n  GroundOverlay,\n  InfoWindow,\n  ArrowheadPath,\n} from '@granite-js/naver-map';\nimport { useState, useCallback } from 'react';\nimport { View, ScrollView, Text, TouchableOpacity, StyleSheet, SafeAreaView, Platform } from 'react-native';\n\n// Seoul coordinates\nconst SEOUL = { latitude: 37.5665, longitude: 126.978 };\nconst GANGNAM = { latitude: 37.4979, longitude: 127.0276 };\nconst HONGDAE = { latitude: 37.5563, longitude: 126.9236 };\nconst ITAEWON = { latitude: 37.5345, longitude: 126.9946 };\nconst BUSAN = { latitude: 35.1796, longitude: 129.0756 };\n\nexport default function App() {\n  const [logs, setLogs] = useState<string[]>([]);\n  const [center, setCenter] = useState({ ...SEOUL, zoom: 11 });\n  const [center2, setCenter2] = useState({ ...BUSAN, zoom: 11 });\n  const [showMarkers, setShowMarkers] = useState(true);\n  const [showPolyline, setShowPolyline] = useState(false);\n  const [showPolygon, setShowPolygon] = useState(false);\n  const [showCircle, setShowCircle] = useState(false);\n  const [showPath, setShowPath] = useState(false);\n  const [mapType, setMapType] = useState(0);\n  const [nightMode, setNightMode] = useState(false);\n\n  const addLog = useCallback((msg: string) => {\n    const timestamp = new Date().toLocaleTimeString();\n    setLogs((prev) => [`[${timestamp}] ${msg}`, ...prev.slice(0, 19)]);\n  }, []);\n\n  const handleCameraChange = useCallback(\n    (ev: CameraChangeEvent) => {\n      addLog(`Camera: ${ev.latitude.toFixed(4)}, ${ev.longitude.toFixed(4)}, zoom: ${ev.zoom.toFixed(1)}`);\n    },\n    [addLog]\n  );\n\n  const handleMapClick = useCallback(\n    (ev: MapClickEvent) => {\n      addLog(`Click: ${ev.latitude.toFixed(4)}, ${ev.longitude.toFixed(4)}`);\n    },\n    [addLog]\n  );\n\n  const handleMarkerPress = useCallback(\n    (name: string) => {\n      addLog(`Marker pressed: ${name}`);\n    },\n    [addLog]\n  );\n\n  const moveToLocation = useCallback(\n    (location: typeof SEOUL, name: string) => {\n      setCenter({ ...location, zoom: 14 });\n      addLog(`Move to: ${name}`);\n    },\n    [addLog]\n  );\n\n  const cycleMapType = useCallback(() => {\n    const types = [0, 1, 2, 3, 4]; // Basic, Navi, Satellite, Hybrid, Terrain\n    const typeNames = ['Basic', 'Navi', 'Satellite', 'Hybrid', 'Terrain'];\n    const nextIndex = (types.indexOf(mapType) + 1) % types.length;\n    setMapType(types[nextIndex]!);\n    addLog(`Map type: ${typeNames[nextIndex]}`);\n  }, [mapType, addLog]);\n\n  const clearLogs = useCallback(() => {\n    setLogs([]);\n  }, []);\n\n  return (\n    <SafeAreaView style={styles.safeArea}>\n      <ScrollView testID=\"main-scroll\" style={styles.scrollView} contentContainerStyle={styles.scrollContent}>\n        <Text testID=\"app-title\" style={styles.title}>\n          GraniteNaverMap Example\n        </Text>\n\n        {/* Map View */}\n        <View style={styles.mapContainer}>\n          <NaverMapView\n            style={styles.map}\n            center={center}\n            mapType={mapType}\n            nightMode={nightMode}\n            showsMyLocationButton={true}\n            compass={true}\n            scaleBar={true}\n            zoomControl={true}\n            onCameraChange={handleCameraChange}\n            onMapClick={handleMapClick}\n          >\n            <Marker\n              coordinate={{\n                latitude: 37.5676108,\n                longitude: 126.9773882,\n              }}\n              image=\"https://cdn-icons-png.flaticon.com/512/220/220218.png\"\n              width={50}\n              height={50}\n              onPress={() => {\n                console.log('Seoul City Hall marker pressed');\n              }}\n            />\n            {/* 경복궁 */}\n            <Marker\n              coordinate={{\n                latitude: 37.5796,\n                longitude: 126.977,\n              }}\n              pinColor=\"#FF0000\"\n              width={36}\n              height={36}\n              onPress={() => {\n                console.log('Gyeongbokgung marker pressed');\n              }}\n            />\n            {/* 남산타워 */}\n            <Marker\n              coordinate={{\n                latitude: 37.5512,\n                longitude: 126.9882,\n              }}\n              pinColor=\"#00FF00\"\n              width={36}\n              height={36}\n              onPress={() => {\n                console.log('Namsan Tower marker pressed');\n              }}\n            />\n            {/* 명동 */}\n            <Marker\n              coordinate={{\n                latitude: 37.5636,\n                longitude: 126.9869,\n              }}\n              pinColor=\"#0000FF\"\n              width={32}\n              height={32}\n              onPress={() => {\n                console.log('Myeongdong marker pressed');\n              }}\n            />\n            {/* 동대문 DDP */}\n            <Marker\n              coordinate={{\n                latitude: 37.5673,\n                longitude: 127.0095,\n              }}\n              pinColor=\"#FF6600\"\n              width={32}\n              height={32}\n              onPress={() => {\n                console.log('DDP marker pressed');\n              }}\n            />\n            {/* 이태원 */}\n            <Marker\n              coordinate={{\n                latitude: 37.5345,\n                longitude: 126.9946,\n              }}\n              pinColor=\"#9900FF\"\n              width={32}\n              height={32}\n              alpha={0.8}\n              onPress={() => {\n                console.log('Itaewon marker pressed');\n              }}\n            />\n            {/* 홍대입구 */}\n            <Marker\n              coordinate={{\n                latitude: 37.5563,\n                longitude: 126.9237,\n              }}\n              pinColor=\"#FF00FF\"\n              width={32}\n              height={32}\n              rotation={45}\n              onPress={() => {\n                console.log('Hongdae marker pressed');\n              }}\n            />\n\n            {/* ===== Overlay Examples ===== */}\n\n            {/* Polyline: 서울시청 → 경복궁 → 명동 연결 */}\n            <Polyline\n              coordinates={[\n                { latitude: 37.5666103, longitude: 126.9783882 }, // 서울시청\n                { latitude: 37.5796, longitude: 126.977 }, // 경복궁\n                { latitude: 37.5636, longitude: 126.9869 }, // 명동\n              ]}\n              strokeColor=\"#FF0000\"\n              strokeWidth={4}\n              lineCap=\"round\"\n              lineJoin=\"round\"\n            />\n\n            {/* Polygon: 숭례문 주변 삼각형 영역 */}\n            <Polygon\n              coordinates={[\n                { latitude: 37.5615, longitude: 126.973 },\n                { latitude: 37.5615, longitude: 126.978 },\n                { latitude: 37.558, longitude: 126.9755 },\n              ]}\n              fillColor={0x800000ff}\n              strokeColor={0xffff0000}\n              strokeWidth={3}\n            />\n\n            {/* Circle: 남산타워 주변 원형 영역 (반경 300m) */}\n            <Circle\n              center={{\n                latitude: 37.5512,\n                longitude: 126.9882,\n              }}\n              radius={300}\n              fillColor={0x3300ff00}\n              strokeColor={0xff00ff00}\n              strokeWidth={2}\n            />\n\n            {/* Path: 이태원 → DDP 경로 (진행률 표시) */}\n            <Path\n              coordinates={[\n                { latitude: 37.5345, longitude: 126.9946 }, // 이태원\n                { latitude: 37.545, longitude: 127.0 },\n                { latitude: 37.555, longitude: 127.005 },\n                { latitude: 37.5673, longitude: 127.0095 }, // DDP\n              ]}\n              width={8}\n              outlineWidth={2}\n              color=\"#3366FF\"\n              outlineColor=\"#FFFFFF\"\n              passedColor=\"#AAAAAA\"\n              passedOutlineColor=\"#FFFFFF\"\n              progress={0.5}\n            />\n\n            {/* ArrowheadPath: 홍대 → 시청 방향 화살표 경로 */}\n            <ArrowheadPath\n              coordinates={[\n                { latitude: 37.5563, longitude: 126.9237 }, // 홍대\n                { latitude: 37.558, longitude: 126.94 },\n                { latitude: 37.562, longitude: 126.955 },\n                { latitude: 37.5666103, longitude: 126.9783882 }, // 시청\n              ]}\n              width={6}\n              outlineWidth={1}\n              color=\"#FF6600\"\n              outlineColor=\"#FFFFFF\"\n              headSizeRatio={4}\n            />\n\n            {/* GroundOverlay: 경복궁 영역에 이미지 오버레이 */}\n            <GroundOverlay\n              bounds={{\n                southWest: { latitude: 37.577, longitude: 126.974 },\n                northEast: { latitude: 37.582, longitude: 126.98 },\n              }}\n              image=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS7VhNhtgLdxlTNHynZjJJML0nWAz9P90UQpg&s\"\n              alpha={0.8}\n            />\n\n            {/* InfoWindow: 서울시청 위에 정보창 */}\n            {/* <InfoWindow\n          coordinate={{\n            latitude: 37.5666103,\n            longitude: 126.9783882,\n          }}\n          text=\"서울시청\"\n          offsetY={-40}\n        /> */}\n\n            {/* InfoWindow: 경복궁 위에 정보창 */}\n            <InfoWindow\n              coordinate={{\n                latitude: 37.5796,\n                longitude: 126.977,\n              }}\n              text=\"경복궁\"\n              offsetY={-40}\n            />\n            {showMarkers && (\n              <>\n                <Marker coordinate={SEOUL} pinColor={0xff0000} onPress={() => handleMarkerPress('Seoul City Hall')} />\n                <Marker coordinate={GANGNAM} pinColor={0x00ff00} onPress={() => handleMarkerPress('Gangnam Station')} />\n                <Marker coordinate={HONGDAE} pinColor={0x0000ff} onPress={() => handleMarkerPress('Hongdae')} />\n                <Marker coordinate={ITAEWON} pinColor={0xffff00} onPress={() => handleMarkerPress('Itaewon')} />\n              </>\n            )}\n\n            {showPolyline && (\n              <Polyline\n                coordinates={[SEOUL, GANGNAM, ITAEWON, HONGDAE, SEOUL]}\n                strokeWidth={5}\n                strokeColor={0xff6b6b}\n              />\n            )}\n\n            {showPolygon && (\n              <Polygon\n                coordinates={[\n                  { latitude: 37.57, longitude: 126.97 },\n                  { latitude: 37.55, longitude: 127.0 },\n                  { latitude: 37.53, longitude: 126.97 },\n                  { latitude: 37.55, longitude: 126.94 },\n                ]}\n                fillColor={0x4caf5080}\n                strokeColor={0x4caf50}\n                strokeWidth={2}\n              />\n            )}\n\n            {showCircle && (\n              <Circle center={SEOUL} radius={2000} fillColor={0x2196f340} strokeColor={0x2196f3} strokeWidth={2} />\n            )}\n\n            {showPath && (\n              <Path\n                coordinates={[SEOUL, GANGNAM]}\n                width={10}\n                color={0xe91e63}\n                outlineWidth={2}\n                outlineColor={0xffffff}\n              />\n            )}\n          </NaverMapView>\n        </View>\n\n        {/* Second Map View - to test multiple map instances */}\n        <Text style={styles.mapTitle}>Map 2: Busan (Independent Instance)</Text>\n        <View style={styles.mapContainer2}>\n          <NaverMapView\n            style={styles.map}\n            center={center2}\n            mapType={0}\n            showsMyLocationButton={false}\n            compass={true}\n            scaleBar={false}\n            zoomControl={false}\n            onCameraChange={(ev) => {\n              addLog(`Map2 Camera: ${ev.latitude.toFixed(4)}, ${ev.longitude.toFixed(4)}`);\n            }}\n            onMapClick={(ev) => {\n              addLog(`Map2 Click: ${ev.latitude.toFixed(4)}, ${ev.longitude.toFixed(4)}`);\n            }}\n          >\n            <Marker coordinate={BUSAN} pinColor={0xff5500} onPress={() => handleMarkerPress('Busan (Map 2)')} />\n          </NaverMapView>\n        </View>\n\n        {/* Quick switch between maps */}\n        <View style={styles.section}>\n          <Text style={styles.sectionTitle}>0. Dual Map Test</Text>\n          <View style={styles.buttonRow}>\n            <TouchableOpacity\n              style={styles.button}\n              onPress={() => {\n                setCenter({ ...SEOUL, zoom: 14 });\n                addLog('Map1 → Seoul');\n              }}\n            >\n              <Text style={styles.buttonText}>Map1: Seoul</Text>\n            </TouchableOpacity>\n            <TouchableOpacity\n              style={styles.button}\n              onPress={() => {\n                setCenter2({ ...BUSAN, zoom: 14 });\n                addLog('Map2 → Busan');\n              }}\n            >\n              <Text style={styles.buttonText}>Map2: Busan</Text>\n            </TouchableOpacity>\n            <TouchableOpacity\n              style={styles.button}\n              onPress={() => {\n                setCenter2({ ...GANGNAM, zoom: 14 });\n                addLog('Map2 → Gangnam');\n              }}\n            >\n              <Text style={styles.buttonText}>Map2: Gangnam</Text>\n            </TouchableOpacity>\n          </View>\n        </View>\n\n        {/* Section 1: Location Shortcuts */}\n        <View style={styles.section}>\n          <Text style={styles.sectionTitle}>1. Quick Navigation</Text>\n          <View style={styles.buttonRow}>\n            <TouchableOpacity testID=\"goto-seoul\" style={styles.button} onPress={() => moveToLocation(SEOUL, 'Seoul')}>\n              <Text style={styles.buttonText}>Seoul</Text>\n            </TouchableOpacity>\n            <TouchableOpacity\n              testID=\"goto-gangnam\"\n              style={styles.button}\n              onPress={() => moveToLocation(GANGNAM, 'Gangnam')}\n            >\n              <Text style={styles.buttonText}>Gangnam</Text>\n            </TouchableOpacity>\n            <TouchableOpacity\n              testID=\"goto-hongdae\"\n              style={styles.button}\n              onPress={() => moveToLocation(HONGDAE, 'Hongdae')}\n            >\n              <Text style={styles.buttonText}>Hongdae</Text>\n            </TouchableOpacity>\n          </View>\n        </View>\n\n        {/* Section 2: Map Settings */}\n        <View style={styles.section}>\n          <Text style={styles.sectionTitle}>2. Map Settings</Text>\n          <View style={styles.buttonRow}>\n            <TouchableOpacity testID=\"toggle-maptype\" style={styles.button} onPress={cycleMapType}>\n              <Text style={styles.buttonText}>Map Type</Text>\n            </TouchableOpacity>\n            <TouchableOpacity\n              testID=\"toggle-nightmode\"\n              style={[styles.button, nightMode && styles.activeButton]}\n              onPress={() => {\n                setNightMode(!nightMode);\n                addLog(`Night mode: ${!nightMode}`);\n              }}\n            >\n              <Text style={styles.buttonText}>Night Mode</Text>\n            </TouchableOpacity>\n          </View>\n        </View>\n\n        {/* Section 3: Overlays */}\n        <View style={styles.section}>\n          <Text style={styles.sectionTitle}>3. Overlays</Text>\n          <View style={styles.buttonRow}>\n            <TouchableOpacity\n              testID=\"toggle-markers\"\n              style={[styles.smallButton, showMarkers && styles.activeButton]}\n              onPress={() => {\n                setShowMarkers(!showMarkers);\n                addLog(`Markers: ${!showMarkers}`);\n              }}\n            >\n              <Text style={styles.buttonText}>Markers</Text>\n            </TouchableOpacity>\n            <TouchableOpacity\n              testID=\"toggle-polyline\"\n              style={[styles.smallButton, showPolyline && styles.activeButton]}\n              onPress={() => {\n                setShowPolyline(!showPolyline);\n                addLog(`Polyline: ${!showPolyline}`);\n              }}\n            >\n              <Text style={styles.buttonText}>Polyline</Text>\n            </TouchableOpacity>\n            <TouchableOpacity\n              testID=\"toggle-polygon\"\n              style={[styles.smallButton, showPolygon && styles.activeButton]}\n              onPress={() => {\n                setShowPolygon(!showPolygon);\n                addLog(`Polygon: ${!showPolygon}`);\n              }}\n            >\n              <Text style={styles.buttonText}>Polygon</Text>\n            </TouchableOpacity>\n          </View>\n          <View style={styles.buttonRow}>\n            <TouchableOpacity\n              testID=\"toggle-circle\"\n              style={[styles.smallButton, showCircle && styles.activeButton]}\n              onPress={() => {\n                setShowCircle(!showCircle);\n                addLog(`Circle: ${!showCircle}`);\n              }}\n            >\n              <Text style={styles.buttonText}>Circle</Text>\n            </TouchableOpacity>\n            <TouchableOpacity\n              testID=\"toggle-path\"\n              style={[styles.smallButton, showPath && styles.activeButton]}\n              onPress={() => {\n                setShowPath(!showPath);\n                addLog(`Path: ${!showPath}`);\n              }}\n            >\n              <Text style={styles.buttonText}>Path</Text>\n            </TouchableOpacity>\n          </View>\n        </View>\n\n        {/* Event Logs */}\n        <View style={styles.section}>\n          <View style={styles.logHeader}>\n            <Text style={styles.sectionTitle}>Event Logs</Text>\n            <TouchableOpacity testID=\"clear-logs\" onPress={clearLogs}>\n              <Text style={styles.clearText}>Clear</Text>\n            </TouchableOpacity>\n          </View>\n          <View testID=\"log-container\" style={styles.logContainer}>\n            {logs.length === 0 ? (\n              <Text style={styles.logEmpty}>No events yet...</Text>\n            ) : (\n              logs.map((log, index) => (\n                <Text key={index} style={styles.logText}>\n                  {log}\n                </Text>\n              ))\n            )}\n          </View>\n        </View>\n      </ScrollView>\n    </SafeAreaView>\n  );\n}\n\nconst styles = StyleSheet.create({\n  safeArea: {\n    flex: 1,\n    backgroundColor: '#1a1a2e',\n  },\n  scrollView: {\n    flex: 1,\n  },\n  scrollContent: {\n    padding: 16,\n    paddingBottom: 40,\n  },\n  title: {\n    fontSize: 24,\n    fontWeight: 'bold',\n    color: '#fff',\n    textAlign: 'center',\n    marginBottom: 16,\n  },\n  mapContainer: {\n    width: '100%',\n    height: 300,\n    borderRadius: 8,\n    overflow: 'hidden',\n    marginBottom: 16,\n  },\n  mapContainer2: {\n    width: '100%',\n    height: 200,\n    borderRadius: 8,\n    overflow: 'hidden',\n    marginBottom: 16,\n  },\n  mapTitle: {\n    fontSize: 14,\n    fontWeight: '600',\n    color: '#03DAC5',\n    marginBottom: 8,\n  },\n  map: {\n    width: '100%',\n    height: '100%',\n  },\n  section: {\n    marginBottom: 20,\n    padding: 12,\n    backgroundColor: '#16213e',\n    borderRadius: 8,\n  },\n  sectionTitle: {\n    fontSize: 16,\n    fontWeight: 'bold',\n    color: '#03DAC5',\n    marginBottom: 12,\n  },\n  buttonRow: {\n    flexDirection: 'row',\n    flexWrap: 'wrap',\n    gap: 8,\n  },\n  button: {\n    backgroundColor: '#0f3460',\n    paddingVertical: 10,\n    paddingHorizontal: 16,\n    borderRadius: 6,\n    minWidth: 80,\n    alignItems: 'center',\n  },\n  smallButton: {\n    backgroundColor: '#0f3460',\n    paddingVertical: 8,\n    paddingHorizontal: 12,\n    borderRadius: 6,\n    minWidth: 70,\n    alignItems: 'center',\n  },\n  activeButton: {\n    backgroundColor: '#03DAC5',\n  },\n  buttonText: {\n    color: '#fff',\n    fontSize: 14,\n    fontWeight: '600',\n  },\n  logHeader: {\n    flexDirection: 'row',\n    justifyContent: 'space-between',\n    alignItems: 'center',\n    marginBottom: 8,\n  },\n  clearText: {\n    color: '#03DAC5',\n    fontSize: 14,\n  },\n  logContainer: {\n    backgroundColor: '#0a0a0a',\n    borderRadius: 6,\n    padding: 8,\n    maxHeight: 150,\n  },\n  logEmpty: {\n    color: '#666',\n    fontStyle: 'italic',\n  },\n  logText: {\n    color: '#4CAF50',\n    fontSize: 11,\n    fontFamily: Platform.OS === 'ios' ? 'Menlo' : 'monospace',\n    marginBottom: 2,\n  },\n});\n"
  },
  {
    "path": "packages/naver-map/ios/GraniteNaverMap-Bridging-Header.h",
    "content": "//\n//  GraniteNaverMap-Bridging-Header.h\n//  granite-naver-map\n//\n\n#import <React/RCTBridgeModule.h>\n#import <React/RCTViewManager.h>\n#import <React/RCTEventEmitter.h>\n#import <React/RCTConvert.h>\n#import <React/RCTLog.h>\n#import <React/RCTUIManager.h>\n\n// NMapsMap-specific imports (only when default provider is enabled)\n#ifdef GRANITE_NAVER_MAP_DEFAULT_PROVIDER\n#import \"RCTConvert+NMFMapView.h\"\n#endif\n\n#ifdef RCT_NEW_ARCH_ENABLED\n#import <React/RCTViewComponentView.h>\n#endif\n"
  },
  {
    "path": "packages/naver-map/ios/GraniteNaverMapProvider.swift",
    "content": "//\n//  GraniteNaverMapProvider.swift\n//  granite-naver-map\n//\n//  Pluggable Provider protocol for NaverMap\n//\n\nimport UIKit\n\n// MARK: - Provider Enums\n\n@objc public enum GraniteNaverMapType: Int {\n    case basic = 0\n    case navi = 1\n    case satellite = 2\n    case hybrid = 3\n    case terrain = 4\n    case none = 5\n}\n\n@objc public enum GraniteNaverMapLocationTrackingMode: Int {\n    case none = 0\n    case noFollow = 1\n    case follow = 2\n    case face = 3\n}\n\n// MARK: - Data Types\n\n@objc public class GraniteNaverMapCoordinate: NSObject {\n    @objc public let latitude: Double\n    @objc public let longitude: Double\n\n    @objc public init(latitude: Double, longitude: Double) {\n        self.latitude = latitude\n        self.longitude = longitude\n    }\n}\n\n@objc public class GraniteNaverMapCameraPosition: NSObject {\n    @objc public let target: GraniteNaverMapCoordinate\n    @objc public let zoom: Double\n    @objc public let tilt: Double\n    @objc public let bearing: Double\n\n    @objc public init(target: GraniteNaverMapCoordinate, zoom: Double, tilt: Double = 0, bearing: Double = 0) {\n        self.target = target\n        self.zoom = zoom\n        self.tilt = tilt\n        self.bearing = bearing\n    }\n}\n\n@objc public class GraniteNaverMapBounds: NSObject {\n    @objc public let southWest: GraniteNaverMapCoordinate\n    @objc public let northEast: GraniteNaverMapCoordinate\n\n    @objc public init(southWest: GraniteNaverMapCoordinate, northEast: GraniteNaverMapCoordinate) {\n        self.southWest = southWest\n        self.northEast = northEast\n    }\n}\n\n// MARK: - Marker Data\n\n@objc public class ProviderMarkerData: NSObject {\n    @objc public let identifier: String\n    @objc public let coordinate: GraniteNaverMapCoordinate\n    @objc public let width: Int\n    @objc public let height: Int\n    @objc public let zIndex: Int\n    @objc public let rotation: Float\n    @objc public let flat: Bool\n    @objc public let alpha: Float\n    @objc public let pinColor: Int\n    @objc public let image: String\n\n    @objc public init(\n        identifier: String,\n        coordinate: GraniteNaverMapCoordinate,\n        width: Int,\n        height: Int,\n        zIndex: Int,\n        rotation: Float,\n        flat: Bool,\n        alpha: Float,\n        pinColor: Int,\n        image: String\n    ) {\n        self.identifier = identifier\n        self.coordinate = coordinate\n        self.width = width\n        self.height = height\n        self.zIndex = zIndex\n        self.rotation = rotation\n        self.flat = flat\n        self.alpha = alpha\n        self.pinColor = pinColor\n        self.image = image\n    }\n}\n\n// MARK: - Overlay Data\n\n@objc public class ProviderPolylineData: NSObject {\n    @objc public let identifier: String\n    @objc public let coordinates: [GraniteNaverMapCoordinate]\n    @objc public let strokeWidth: Float\n    @objc public let strokeColor: Int\n    @objc public let zIndex: Int\n    @objc public let lineCap: Int\n    @objc public let lineJoin: Int\n    @objc public let pattern: [Int]\n\n    @objc public init(\n        identifier: String,\n        coordinates: [GraniteNaverMapCoordinate],\n        strokeWidth: Float,\n        strokeColor: Int,\n        zIndex: Int,\n        lineCap: Int,\n        lineJoin: Int,\n        pattern: [Int]\n    ) {\n        self.identifier = identifier\n        self.coordinates = coordinates\n        self.strokeWidth = strokeWidth\n        self.strokeColor = strokeColor\n        self.zIndex = zIndex\n        self.lineCap = lineCap\n        self.lineJoin = lineJoin\n        self.pattern = pattern\n    }\n}\n\n@objc public class ProviderPolygonData: NSObject {\n    @objc public let identifier: String\n    @objc public let coordinates: [GraniteNaverMapCoordinate]\n    @objc public let holes: [[GraniteNaverMapCoordinate]]\n    @objc public let fillColor: Int\n    @objc public let strokeColor: Int\n    @objc public let strokeWidth: Float\n    @objc public let zIndex: Int\n\n    @objc public init(\n        identifier: String,\n        coordinates: [GraniteNaverMapCoordinate],\n        holes: [[GraniteNaverMapCoordinate]],\n        fillColor: Int,\n        strokeColor: Int,\n        strokeWidth: Float,\n        zIndex: Int\n    ) {\n        self.identifier = identifier\n        self.coordinates = coordinates\n        self.holes = holes\n        self.fillColor = fillColor\n        self.strokeColor = strokeColor\n        self.strokeWidth = strokeWidth\n        self.zIndex = zIndex\n    }\n}\n\n@objc public class ProviderCircleData: NSObject {\n    @objc public let identifier: String\n    @objc public let center: GraniteNaverMapCoordinate\n    @objc public let radius: Double\n    @objc public let fillColor: Int\n    @objc public let strokeColor: Int\n    @objc public let strokeWidth: Float\n    @objc public let zIndex: Int\n\n    @objc public init(\n        identifier: String,\n        center: GraniteNaverMapCoordinate,\n        radius: Double,\n        fillColor: Int,\n        strokeColor: Int,\n        strokeWidth: Float,\n        zIndex: Int\n    ) {\n        self.identifier = identifier\n        self.center = center\n        self.radius = radius\n        self.fillColor = fillColor\n        self.strokeColor = strokeColor\n        self.strokeWidth = strokeWidth\n        self.zIndex = zIndex\n    }\n}\n\n@objc public class ProviderPathData: NSObject {\n    @objc public let identifier: String\n    @objc public let coordinates: [GraniteNaverMapCoordinate]\n    @objc public let width: Float\n    @objc public let outlineWidth: Float\n    @objc public let color: Int\n    @objc public let outlineColor: Int\n    @objc public let passedColor: Int\n    @objc public let passedOutlineColor: Int\n    @objc public let patternImage: String\n    @objc public let patternInterval: Int\n    @objc public let progress: Float\n    @objc public let zIndex: Int\n\n    @objc public init(\n        identifier: String,\n        coordinates: [GraniteNaverMapCoordinate],\n        width: Float,\n        outlineWidth: Float,\n        color: Int,\n        outlineColor: Int,\n        passedColor: Int,\n        passedOutlineColor: Int,\n        patternImage: String,\n        patternInterval: Int,\n        progress: Float,\n        zIndex: Int\n    ) {\n        self.identifier = identifier\n        self.coordinates = coordinates\n        self.width = width\n        self.outlineWidth = outlineWidth\n        self.color = color\n        self.outlineColor = outlineColor\n        self.passedColor = passedColor\n        self.passedOutlineColor = passedOutlineColor\n        self.patternImage = patternImage\n        self.patternInterval = patternInterval\n        self.progress = progress\n        self.zIndex = zIndex\n    }\n}\n\n// MARK: - Provider Delegate\n\n@objc public protocol GraniteNaverMapProviderDelegate: NSObjectProtocol {\n    @objc func mapViewDidInitialize()\n    @objc func mapViewDidChangeCamera(position: GraniteNaverMapCameraPosition)\n    @objc func mapViewDidTouch(reason: Int, animated: Bool)\n    @objc func mapViewDidClick(x: Double, y: Double, latitude: Double, longitude: Double)\n    @objc func mapViewDidClickMarker(id: String)\n}\n\n// MARK: - Provider Factory Protocol\n\n/// Factory protocol for creating NaverMap providers.\n/// Each call to createProvider() should return a new instance.\n@objc public protocol GraniteNaverMapProviderFactory: NSObjectProtocol {\n    /// Create a new provider instance.\n    /// This should be called for each NaverMap view.\n    @objc func createProvider() -> GraniteNaverMapProvidable\n}\n\n// MARK: - Provider Protocol\n\n@objc public protocol GraniteNaverMapProvidable: NSObjectProtocol {\n    /// Create the map view\n    @objc func createMapView(frame: CGRect) -> UIView\n\n    /// Set the delegate for map events\n    @objc func setDelegate(_ delegate: GraniteNaverMapProviderDelegate?)\n\n    // MARK: - Camera\n    @objc func moveCamera(to position: GraniteNaverMapCameraPosition, animated: Bool)\n    @objc func animateToCoordinate(_ coordinate: GraniteNaverMapCoordinate)\n    @objc func animateToBounds(_ bounds: GraniteNaverMapBounds, padding: CGFloat)\n\n    // MARK: - Map Properties\n    @objc func setMapType(_ type: GraniteNaverMapType)\n    @objc func setMapPadding(_ padding: UIEdgeInsets)\n    @objc func setCompassEnabled(_ enabled: Bool)\n    @objc func setScaleBarEnabled(_ enabled: Bool)\n    @objc func setZoomControlEnabled(_ enabled: Bool)\n    @objc func setLocationButtonEnabled(_ enabled: Bool)\n    @objc func setBuildingHeight(_ height: Float)\n    @objc func setNightModeEnabled(_ enabled: Bool)\n    @objc func setMinZoomLevel(_ level: Double)\n    @objc func setMaxZoomLevel(_ level: Double)\n    @objc func setScrollGesturesEnabled(_ enabled: Bool)\n    @objc func setZoomGesturesEnabled(_ enabled: Bool)\n    @objc func setTiltGesturesEnabled(_ enabled: Bool)\n    @objc func setRotateGesturesEnabled(_ enabled: Bool)\n    @objc func setStopGesturesEnabled(_ enabled: Bool)\n    @objc func setLocationTrackingMode(_ mode: GraniteNaverMapLocationTrackingMode)\n    @objc func setLayerGroupEnabled(group: String, enabled: Bool)\n\n    // MARK: - Markers\n    @objc func addMarker(_ data: ProviderMarkerData)\n    @objc func updateMarker(_ data: ProviderMarkerData)\n    @objc func removeMarker(identifier: String)\n\n    // MARK: - Polylines\n    @objc func addPolyline(_ data: ProviderPolylineData)\n    @objc func updatePolyline(_ data: ProviderPolylineData)\n    @objc func removePolyline(identifier: String)\n\n    // MARK: - Polygons\n    @objc func addPolygon(_ data: ProviderPolygonData)\n    @objc func updatePolygon(_ data: ProviderPolygonData)\n    @objc func removePolygon(identifier: String)\n\n    // MARK: - Circles\n    @objc func addCircle(_ data: ProviderCircleData)\n    @objc func updateCircle(_ data: ProviderCircleData)\n    @objc func removeCircle(identifier: String)\n\n    // MARK: - Paths\n    @objc func addPath(_ data: ProviderPathData)\n    @objc func updatePath(_ data: ProviderPathData)\n    @objc func removePath(identifier: String)\n}\n"
  },
  {
    "path": "packages/naver-map/ios/GraniteNaverMapRegistry.swift",
    "content": "//\n//  GraniteNaverMapRegistry.swift\n//  granite-naver-map\n//\n//  Registry singleton for NaverMap provider factories\n//\n\nimport Foundation\n\n/// Type alias for provider creation closure\npublic typealias GraniteNaverMapProviderCreator = () -> GraniteNaverMapProvidable\n\n/// Internal wrapper to adapt closure to factory protocol (for Obj-C compatibility)\nprivate class ClosureProviderFactory: NSObject, GraniteNaverMapProviderFactory {\n    private let creator: GraniteNaverMapProviderCreator\n\n    init(creator: @escaping GraniteNaverMapProviderCreator) {\n        self.creator = creator\n        super.init()\n    }\n\n    func createProvider() -> GraniteNaverMapProvidable {\n        return creator()\n    }\n}\n\n@objc public class GraniteNaverMapRegistry: NSObject {\n    @objc public static let shared = GraniteNaverMapRegistry()\n\n    @objc public private(set) var factory: GraniteNaverMapProviderFactory?\n\n    private override init() {\n        super.init()\n    }\n\n    /// Register a provider using a closure. Call this at app startup before using NaverMap.\n    /// This is the preferred Swift API.\n    ///\n    /// Usage:\n    /// ```swift\n    /// GraniteNaverMapRegistry.shared.register {\n    ///     return MyNaverMapProvider()\n    /// }\n    /// ```\n    public func register(creator: @escaping GraniteNaverMapProviderCreator) {\n        self.factory = ClosureProviderFactory(creator: creator)\n    }\n\n    /// Register a custom provider factory. Call this at app startup before using NaverMap.\n    /// This API is provided for Obj-C compatibility.\n    @objc public func register(factory: GraniteNaverMapProviderFactory) {\n        self.factory = factory\n    }\n\n    /// Create a new provider instance for a NaverMap view.\n    /// Each view should call this to get its own provider instance.\n    @objc public func createProvider() -> GraniteNaverMapProvidable? {\n        // Use registered factory if available\n        if let factory = factory {\n            return factory.createProvider()\n        }\n\n        #if GRANITE_NAVER_MAP_DEFAULT_PROVIDER\n        // Use built-in factory\n        let builtInFactory = BuiltInNaverMapProviderFactory()\n        return builtInFactory.createProvider()\n        #else\n        // No default provider available - user must register a custom factory\n        return nil\n        #endif\n    }\n\n    /// Check if a custom factory has been registered\n    @objc public var hasCustomFactory: Bool {\n        return factory != nil\n    }\n\n    /// Check if a default provider is available\n    @objc public var hasDefaultProvider: Bool {\n        #if GRANITE_NAVER_MAP_DEFAULT_PROVIDER\n        return true\n        #else\n        return false\n        #endif\n    }\n\n    /// Reset the factory (useful for testing)\n    @objc public func reset() {\n        factory = nil\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/ios/GraniteNaverMapView.h",
    "content": "#import <UIKit/UIKit.h>\n\n#ifndef GraniteNaverMapViewNativeComponent_h\n#define GraniteNaverMapViewNativeComponent_h\n\nNS_ASSUME_NONNULL_BEGIN\n\n// Forward declare to avoid pulling in C++ headers\n// RCTViewComponentView import is in the .mm file\n@interface GraniteNaverMapView : UIView\n@end\n\nNS_ASSUME_NONNULL_END\n\n#endif /* GraniteNaverMapViewNativeComponent_h */\n"
  },
  {
    "path": "packages/naver-map/ios/GraniteNaverMapView.mm",
    "content": "//\n//  GraniteNaverMapView.mm\n//  GraniteNaverMap\n//\n\n#import <UIKit/UIKit.h>\n\n#import <React/RCTViewComponentView.h>\n#import <React/RCTConversions.h>\n#import <React/RCTFabricComponentsPlugins.h>\n#import <React/RCTComponentViewFactory.h>\n\n#import <react/renderer/components/GraniteNaverMapViewSpec/ComponentDescriptors.h>\n#import <react/renderer/components/GraniteNaverMapViewSpec/EventEmitters.h>\n#import <react/renderer/components/GraniteNaverMapViewSpec/Props.h>\n#import <react/renderer/components/GraniteNaverMapViewSpec/RCTComponentViewHelpers.h>\n\n// Import Swift module - the header is generated during build\n#if __has_include(<GraniteNaverMap/GraniteNaverMap-Swift.h>)\n#import <GraniteNaverMap/GraniteNaverMap-Swift.h>\n#elif __has_include(<granite_naver_map/granite_naver_map-Swift.h>)\n#import <granite_naver_map/granite_naver_map-Swift.h>\n#else\n#import \"GraniteNaverMap-Swift.h\"\n#endif\n\nusing namespace facebook::react;\n\n// Define GraniteNaverMapView inheriting from RCTViewComponentView here in .mm file\n// The header declares it as UIView to avoid exposing C++ headers to Swift module\n@interface GraniteNaverMapView : RCTViewComponentView <RCTGraniteNaverMapViewViewProtocol, GraniteNaverMapViewDelegate>\n@end\n\n@implementation GraniteNaverMapView {\n    GraniteNaverMapViewImpl *_mapView;\n    NSMutableDictionary<NSString *, id> *_markers;\n}\n\n+ (ComponentDescriptorProvider)componentDescriptorProvider\n{\n    return concreteComponentDescriptorProvider<GraniteNaverMapViewComponentDescriptor>();\n}\n\n- (instancetype)initWithFrame:(CGRect)frame\n{\n    if (self = [super initWithFrame:frame]) {\n        static const auto defaultProps = std::make_shared<const GraniteNaverMapViewProps>();\n        _props = defaultProps;\n\n        _mapView = [[GraniteNaverMapViewImpl alloc] initWithFrame:self.bounds];\n        _mapView.eventDelegate = self;\n        _markers = [NSMutableDictionary new];\n\n        self.contentView = _mapView;\n    }\n    return self;\n}\n\n- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps\n{\n    const auto &oldViewProps = *std::static_pointer_cast<GraniteNaverMapViewProps const>(_props);\n    const auto &newViewProps = *std::static_pointer_cast<GraniteNaverMapViewProps const>(props);\n\n    // center\n    if (oldViewProps.center.latitude != newViewProps.center.latitude ||\n        oldViewProps.center.longitude != newViewProps.center.longitude ||\n        oldViewProps.center.zoom != newViewProps.center.zoom ||\n        oldViewProps.center.tilt != newViewProps.center.tilt ||\n        oldViewProps.center.bearing != newViewProps.center.bearing) {\n        [_mapView setCenterWithLatitude:newViewProps.center.latitude\n                              longitude:newViewProps.center.longitude\n                                   zoom:newViewProps.center.zoom\n                                   tilt:newViewProps.center.tilt\n                                bearing:newViewProps.center.bearing];\n    }\n\n    // showsMyLocationButton\n    if (oldViewProps.showsMyLocationButton != newViewProps.showsMyLocationButton) {\n        _mapView.showsMyLocationButton = newViewProps.showsMyLocationButton;\n    }\n\n    // compass\n    if (oldViewProps.compass != newViewProps.compass) {\n        _mapView.compass = newViewProps.compass;\n    }\n\n    // scaleBar\n    if (oldViewProps.scaleBar != newViewProps.scaleBar) {\n        _mapView.scaleBar = newViewProps.scaleBar;\n    }\n\n    // zoomControl\n    if (oldViewProps.zoomControl != newViewProps.zoomControl) {\n        _mapView.zoomControl = newViewProps.zoomControl;\n    }\n\n    // mapType\n    if (oldViewProps.mapType != newViewProps.mapType) {\n        [_mapView setMapType:newViewProps.mapType];\n    }\n\n    // minZoomLevel\n    if (oldViewProps.minZoomLevel != newViewProps.minZoomLevel) {\n        _mapView.minZoomLevel = newViewProps.minZoomLevel;\n    }\n\n    // maxZoomLevel\n    if (oldViewProps.maxZoomLevel != newViewProps.maxZoomLevel) {\n        _mapView.maxZoomLevel = newViewProps.maxZoomLevel;\n    }\n\n    // buildingHeight\n    if (oldViewProps.buildingHeight != newViewProps.buildingHeight) {\n        _mapView.buildingHeight = newViewProps.buildingHeight;\n    }\n\n    // nightMode\n    if (oldViewProps.nightMode != newViewProps.nightMode) {\n        _mapView.nightMode = newViewProps.nightMode;\n    }\n\n    // mapPadding\n    if (oldViewProps.mapPadding.top != newViewProps.mapPadding.top ||\n        oldViewProps.mapPadding.left != newViewProps.mapPadding.left ||\n        oldViewProps.mapPadding.bottom != newViewProps.mapPadding.bottom ||\n        oldViewProps.mapPadding.right != newViewProps.mapPadding.right) {\n        UIEdgeInsets padding = UIEdgeInsetsMake(\n            newViewProps.mapPadding.top,\n            newViewProps.mapPadding.left,\n            newViewProps.mapPadding.bottom,\n            newViewProps.mapPadding.right\n        );\n        _mapView.mapPadding = padding;\n    }\n\n    // locationTrackingMode\n    if (oldViewProps.locationTrackingMode != newViewProps.locationTrackingMode) {\n        _mapView.locationTrackingMode = newViewProps.locationTrackingMode;\n    }\n\n    // scrollGesturesEnabled\n    if (oldViewProps.scrollGesturesEnabled != newViewProps.scrollGesturesEnabled) {\n        _mapView.scrollGesturesEnabled = newViewProps.scrollGesturesEnabled;\n    }\n\n    // zoomGesturesEnabled\n    if (oldViewProps.zoomGesturesEnabled != newViewProps.zoomGesturesEnabled) {\n        _mapView.zoomGesturesEnabled = newViewProps.zoomGesturesEnabled;\n    }\n\n    // tiltGesturesEnabled\n    if (oldViewProps.tiltGesturesEnabled != newViewProps.tiltGesturesEnabled) {\n        _mapView.tiltGesturesEnabled = newViewProps.tiltGesturesEnabled;\n    }\n\n    // rotateGesturesEnabled\n    if (oldViewProps.rotateGesturesEnabled != newViewProps.rotateGesturesEnabled) {\n        _mapView.rotateGesturesEnabled = newViewProps.rotateGesturesEnabled;\n    }\n\n    // stopGesturesEnabled\n    if (oldViewProps.stopGesturesEnabled != newViewProps.stopGesturesEnabled) {\n        _mapView.stopGesturesEnabled = newViewProps.stopGesturesEnabled;\n    }\n\n    [super updateProps:props oldProps:oldProps];\n}\n\n#pragma mark - RCTGraniteNaverMapViewViewProtocol\n\n- (void)animateToCoordinate:(double)latitude longitude:(double)longitude\n{\n    [_mapView animateToCoordinateWithLatitude:latitude longitude:longitude];\n}\n\n- (void)animateToTwoCoordinates:(double)lat1 lng1:(double)lng1 lat2:(double)lat2 lng2:(double)lng2\n{\n    [_mapView animateToTwoCoordinatesWithLat1:lat1 lng1:lng1 lat2:lat2 lng2:lng2];\n}\n\n- (void)animateToRegion:(double)latitude longitude:(double)longitude latitudeDelta:(double)latitudeDelta longitudeDelta:(double)longitudeDelta\n{\n    [_mapView animateToRegionWithLatitude:latitude longitude:longitude latitudeDelta:latitudeDelta longitudeDelta:longitudeDelta];\n}\n\n- (void)setLayerGroupEnabled:(NSString *)group enabled:(BOOL)enabled\n{\n    [_mapView setLayerGroupEnabledWithGroup:group enabled:enabled];\n}\n\n- (void)addMarker:(NSString *)identifier latitude:(double)latitude longitude:(double)longitude width:(NSInteger)width height:(NSInteger)height zIndex:(NSInteger)zIndex rotation:(float)rotation flat:(BOOL)flat alpha:(float)alpha pinColor:(NSInteger)pinColor image:(NSString *)image\n{\n    [_mapView addMarkerWithIdentifier:identifier latitude:latitude longitude:longitude width:width height:height zIndex:zIndex rotation:rotation flat:flat alpha:alpha pinColor:pinColor image:image];\n}\n\n- (void)updateMarker:(NSString *)identifier latitude:(double)latitude longitude:(double)longitude width:(NSInteger)width height:(NSInteger)height zIndex:(NSInteger)zIndex rotation:(float)rotation flat:(BOOL)flat alpha:(float)alpha pinColor:(NSInteger)pinColor image:(NSString *)image\n{\n    [_mapView updateMarkerWithIdentifier:identifier latitude:latitude longitude:longitude width:width height:height zIndex:zIndex rotation:rotation flat:flat alpha:alpha pinColor:pinColor image:image];\n}\n\n- (void)removeMarker:(NSString *)identifier\n{\n    [_mapView removeMarkerWithIdentifier:identifier];\n}\n\n#pragma mark - Polyline Commands\n\n- (void)addPolyline:(NSString *)identifier coordsJson:(NSString *)coordsJson strokeWidth:(float)strokeWidth strokeColor:(NSInteger)strokeColor zIndex:(NSInteger)zIndex lineCap:(NSInteger)lineCap lineJoin:(NSInteger)lineJoin patternJson:(NSString *)patternJson\n{\n    [_mapView addPolylineWithIdentifier:identifier coordsJson:coordsJson strokeWidth:strokeWidth strokeColor:strokeColor zIndex:zIndex lineCap:lineCap lineJoin:lineJoin patternJson:patternJson];\n}\n\n- (void)updatePolyline:(NSString *)identifier coordsJson:(NSString *)coordsJson strokeWidth:(float)strokeWidth strokeColor:(NSInteger)strokeColor zIndex:(NSInteger)zIndex lineCap:(NSInteger)lineCap lineJoin:(NSInteger)lineJoin patternJson:(NSString *)patternJson\n{\n    [_mapView updatePolylineWithIdentifier:identifier coordsJson:coordsJson strokeWidth:strokeWidth strokeColor:strokeColor zIndex:zIndex lineCap:lineCap lineJoin:lineJoin patternJson:patternJson];\n}\n\n- (void)removePolyline:(NSString *)identifier\n{\n    [_mapView removePolylineWithIdentifier:identifier];\n}\n\n#pragma mark - Polygon Commands\n\n- (void)addPolygon:(NSString *)identifier coordsJson:(NSString *)coordsJson holesJson:(NSString *)holesJson fillColor:(NSInteger)fillColor strokeColor:(NSInteger)strokeColor strokeWidth:(float)strokeWidth zIndex:(NSInteger)zIndex\n{\n    [_mapView addPolygonWithIdentifier:identifier coordsJson:coordsJson holesJson:holesJson fillColor:fillColor strokeColor:strokeColor strokeWidth:strokeWidth zIndex:zIndex];\n}\n\n- (void)updatePolygon:(NSString *)identifier coordsJson:(NSString *)coordsJson holesJson:(NSString *)holesJson fillColor:(NSInteger)fillColor strokeColor:(NSInteger)strokeColor strokeWidth:(float)strokeWidth zIndex:(NSInteger)zIndex\n{\n    [_mapView updatePolygonWithIdentifier:identifier coordsJson:coordsJson holesJson:holesJson fillColor:fillColor strokeColor:strokeColor strokeWidth:strokeWidth zIndex:zIndex];\n}\n\n- (void)removePolygon:(NSString *)identifier\n{\n    [_mapView removePolygonWithIdentifier:identifier];\n}\n\n#pragma mark - Circle Commands\n\n- (void)addCircle:(NSString *)identifier latitude:(double)latitude longitude:(double)longitude radius:(double)radius fillColor:(NSInteger)fillColor strokeColor:(NSInteger)strokeColor strokeWidth:(float)strokeWidth zIndex:(NSInteger)zIndex\n{\n    [_mapView addCircleWithIdentifier:identifier latitude:latitude longitude:longitude radius:radius fillColor:fillColor strokeColor:strokeColor strokeWidth:strokeWidth zIndex:zIndex];\n}\n\n- (void)updateCircle:(NSString *)identifier latitude:(double)latitude longitude:(double)longitude radius:(double)radius fillColor:(NSInteger)fillColor strokeColor:(NSInteger)strokeColor strokeWidth:(float)strokeWidth zIndex:(NSInteger)zIndex\n{\n    [_mapView updateCircleWithIdentifier:identifier latitude:latitude longitude:longitude radius:radius fillColor:fillColor strokeColor:strokeColor strokeWidth:strokeWidth zIndex:zIndex];\n}\n\n- (void)removeCircle:(NSString *)identifier\n{\n    [_mapView removeCircleWithIdentifier:identifier];\n}\n\n#pragma mark - Path Commands\n\n- (void)addPath:(NSString *)identifier coordsJson:(NSString *)coordsJson width:(float)width outlineWidth:(float)outlineWidth color:(NSInteger)color outlineColor:(NSInteger)outlineColor passedColor:(NSInteger)passedColor passedOutlineColor:(NSInteger)passedOutlineColor patternImage:(NSString *)patternImage patternInterval:(NSInteger)patternInterval progress:(float)progress zIndex:(NSInteger)zIndex\n{\n    [_mapView addPathWithIdentifier:identifier coordsJson:coordsJson width:width outlineWidth:outlineWidth color:color outlineColor:outlineColor passedColor:passedColor passedOutlineColor:passedOutlineColor patternImage:patternImage patternInterval:patternInterval progress:progress zIndex:zIndex];\n}\n\n- (void)updatePath:(NSString *)identifier coordsJson:(NSString *)coordsJson width:(float)width outlineWidth:(float)outlineWidth color:(NSInteger)color outlineColor:(NSInteger)outlineColor passedColor:(NSInteger)passedColor passedOutlineColor:(NSInteger)passedOutlineColor patternImage:(NSString *)patternImage patternInterval:(NSInteger)patternInterval progress:(float)progress zIndex:(NSInteger)zIndex\n{\n    [_mapView updatePathWithIdentifier:identifier coordsJson:coordsJson width:width outlineWidth:outlineWidth color:color outlineColor:outlineColor passedColor:passedColor passedOutlineColor:passedOutlineColor patternImage:patternImage patternInterval:patternInterval progress:progress zIndex:zIndex];\n}\n\n- (void)removePath:(NSString *)identifier\n{\n    [_mapView removePathWithIdentifier:identifier];\n}\n\n#pragma mark - ArrowheadPath Commands\n\n- (void)addArrowheadPath:(NSString *)identifier coordsJson:(NSString *)coordsJson width:(float)width outlineWidth:(float)outlineWidth color:(NSInteger)color outlineColor:(NSInteger)outlineColor headSizeRatio:(float)headSizeRatio zIndex:(NSInteger)zIndex\n{\n    [_mapView addArrowheadPathWithIdentifier:identifier coordsJson:coordsJson width:width outlineWidth:outlineWidth color:color outlineColor:outlineColor headSizeRatio:headSizeRatio zIndex:zIndex];\n}\n\n- (void)updateArrowheadPath:(NSString *)identifier coordsJson:(NSString *)coordsJson width:(float)width outlineWidth:(float)outlineWidth color:(NSInteger)color outlineColor:(NSInteger)outlineColor headSizeRatio:(float)headSizeRatio zIndex:(NSInteger)zIndex\n{\n    [_mapView updateArrowheadPathWithIdentifier:identifier coordsJson:coordsJson width:width outlineWidth:outlineWidth color:color outlineColor:outlineColor headSizeRatio:headSizeRatio zIndex:zIndex];\n}\n\n- (void)removeArrowheadPath:(NSString *)identifier\n{\n    [_mapView removeArrowheadPathWithIdentifier:identifier];\n}\n\n#pragma mark - GroundOverlay Commands\n\n- (void)addGroundOverlay:(NSString *)identifier southWestLat:(double)southWestLat southWestLng:(double)southWestLng northEastLat:(double)northEastLat northEastLng:(double)northEastLng image:(NSString *)image alpha:(float)alpha zIndex:(NSInteger)zIndex\n{\n    [_mapView addGroundOverlayWithIdentifier:identifier southWestLat:southWestLat southWestLng:southWestLng northEastLat:northEastLat northEastLng:northEastLng image:image alpha:alpha zIndex:zIndex];\n}\n\n- (void)updateGroundOverlay:(NSString *)identifier southWestLat:(double)southWestLat southWestLng:(double)southWestLng northEastLat:(double)northEastLat northEastLng:(double)northEastLng image:(NSString *)image alpha:(float)alpha zIndex:(NSInteger)zIndex\n{\n    [_mapView updateGroundOverlayWithIdentifier:identifier southWestLat:southWestLat southWestLng:southWestLng northEastLat:northEastLat northEastLng:northEastLng image:image alpha:alpha zIndex:zIndex];\n}\n\n- (void)removeGroundOverlay:(NSString *)identifier\n{\n    [_mapView removeGroundOverlayWithIdentifier:identifier];\n}\n\n#pragma mark - InfoWindow Commands\n\n- (void)addInfoWindow:(NSString *)identifier latitude:(double)latitude longitude:(double)longitude text:(NSString *)text alpha:(float)alpha zIndex:(NSInteger)zIndex offsetX:(NSInteger)offsetX offsetY:(NSInteger)offsetY\n{\n    [_mapView addInfoWindowWithIdentifier:identifier latitude:latitude longitude:longitude text:text alpha:alpha zIndex:zIndex offsetX:offsetX offsetY:offsetY];\n}\n\n- (void)updateInfoWindow:(NSString *)identifier latitude:(double)latitude longitude:(double)longitude text:(NSString *)text alpha:(float)alpha zIndex:(NSInteger)zIndex offsetX:(NSInteger)offsetX offsetY:(NSInteger)offsetY\n{\n    [_mapView updateInfoWindowWithIdentifier:identifier latitude:latitude longitude:longitude text:text alpha:alpha zIndex:zIndex offsetX:offsetX offsetY:offsetY];\n}\n\n- (void)removeInfoWindow:(NSString *)identifier\n{\n    [_mapView removeInfoWindowWithIdentifier:identifier];\n}\n\n- (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args\n{\n    RCTGraniteNaverMapViewHandleCommand(self, commandName, args);\n}\n\n#pragma mark - GraniteNaverMapViewDelegate\n\n- (void)mapViewDidInitialize\n{\n    if (_eventEmitter) {\n        std::dynamic_pointer_cast<const GraniteNaverMapViewEventEmitter>(_eventEmitter)->onInitialized({});\n    }\n}\n\n- (void)mapViewDidChangeCameraWithLatitude:(double)latitude longitude:(double)longitude zoom:(double)zoom\n{\n    if (_eventEmitter) {\n        GraniteNaverMapViewEventEmitter::OnCameraChange event = {\n            .latitude = latitude,\n            .longitude = longitude,\n            .zoom = zoom\n        };\n        std::dynamic_pointer_cast<const GraniteNaverMapViewEventEmitter>(_eventEmitter)->onCameraChange(event);\n    }\n}\n\n- (void)mapViewDidTouchWithReason:(NSInteger)reason animated:(BOOL)animated\n{\n    if (_eventEmitter) {\n        GraniteNaverMapViewEventEmitter::OnTouch event = {\n            .reason = static_cast<int>(reason),\n            .animated = animated\n        };\n        std::dynamic_pointer_cast<const GraniteNaverMapViewEventEmitter>(_eventEmitter)->onTouch(event);\n    }\n}\n\n- (void)mapViewDidClickWithX:(double)x y:(double)y latitude:(double)latitude longitude:(double)longitude\n{\n    if (_eventEmitter) {\n        GraniteNaverMapViewEventEmitter::OnMapClick event = {\n            .x = x,\n            .y = y,\n            .latitude = latitude,\n            .longitude = longitude\n        };\n        std::dynamic_pointer_cast<const GraniteNaverMapViewEventEmitter>(_eventEmitter)->onMapClick(event);\n    }\n}\n\n- (void)mapViewDidClickMarkerWithId:(NSString *)markerId\n{\n    if (_eventEmitter) {\n        GraniteNaverMapViewEventEmitter::OnMarkerClick event = {\n            .id = std::string([markerId UTF8String])\n        };\n        std::dynamic_pointer_cast<const GraniteNaverMapViewEventEmitter>(_eventEmitter)->onMarkerClick(event);\n    }\n}\n\n@end\n\nClass<RCTComponentViewProtocol> GraniteNaverMapViewCls(void)\n{\n    return GraniteNaverMapView.class;\n}\n"
  },
  {
    "path": "packages/naver-map/ios/GraniteNaverMapViewImpl.swift",
    "content": "//\n//  GraniteNaverMapViewImpl.swift\n//  granite-naver-map\n//\n//  Provider-based implementation of NaverMapView (no direct NMapsMap dependency)\n//\n\nimport UIKit\n\n@objc public protocol GraniteNaverMapViewDelegate: AnyObject {\n    @objc func mapViewDidInitialize()\n    @objc func mapViewDidChangeCamera(latitude: Double, longitude: Double, zoom: Double)\n    @objc func mapViewDidTouch(reason: Int, animated: Bool)\n    @objc func mapViewDidClick(x: Double, y: Double, latitude: Double, longitude: Double)\n    @objc func mapViewDidClickMarker(id: String)\n}\n\n@objc public class GraniteNaverMapViewImpl: UIView {\n    @objc public weak var eventDelegate: GraniteNaverMapViewDelegate?\n\n    private var provider: GraniteNaverMapProvidable?\n    private var mapContentView: UIView?\n    private var isInitialized = false\n\n    public override init(frame: CGRect) {\n        super.init(frame: frame)\n        setupProvider()\n    }\n\n    required init?(coder: NSCoder) {\n        fatalError(\"init(coder:) has not been implemented\")\n    }\n\n    private func setupProvider() {\n        // Create a new provider instance for this view\n        guard let provider = GraniteNaverMapRegistry.shared.createProvider() else {\n            // No provider factory available - show placeholder or error\n            let label = UILabel(frame: bounds)\n            label.text = \"NaverMap provider not registered\"\n            label.textAlignment = .center\n            label.autoresizingMask = [.flexibleWidth, .flexibleHeight]\n            addSubview(label)\n            return\n        }\n\n        self.provider = provider\n        provider.setDelegate(self)\n\n        let mapView = provider.createMapView(frame: bounds)\n        mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]\n        addSubview(mapView)\n        self.mapContentView = mapView\n    }\n\n    public override func layoutSubviews() {\n        super.layoutSubviews()\n        if !isInitialized && bounds.width > 0 && bounds.height > 0 {\n            isInitialized = true\n            eventDelegate?.mapViewDidInitialize()\n        }\n    }\n\n    // MARK: - Property Setters\n\n    @objc public func setCenter(latitude: Double, longitude: Double, zoom: Double, tilt: Double, bearing: Double) {\n        let position = GraniteNaverMapCameraPosition(\n            target: GraniteNaverMapCoordinate(latitude: latitude, longitude: longitude),\n            zoom: zoom,\n            tilt: tilt,\n            bearing: bearing\n        )\n        provider?.moveCamera(to: position, animated: false)\n    }\n\n    @objc public func setMapType(_ type: Int) {\n        guard let mapType = GraniteNaverMapType(rawValue: type) else { return }\n        provider?.setMapType(mapType)\n    }\n\n    @objc public var mapPadding: UIEdgeInsets = .zero {\n        didSet {\n            provider?.setMapPadding(mapPadding)\n        }\n    }\n\n    @objc public var compass: Bool = true {\n        didSet {\n            provider?.setCompassEnabled(compass)\n        }\n    }\n\n    @objc public var scaleBar: Bool = true {\n        didSet {\n            provider?.setScaleBarEnabled(scaleBar)\n        }\n    }\n\n    @objc public var zoomControl: Bool = true {\n        didSet {\n            provider?.setZoomControlEnabled(zoomControl)\n        }\n    }\n\n    @objc public var buildingHeight: Float = 1.0 {\n        didSet {\n            provider?.setBuildingHeight(buildingHeight)\n        }\n    }\n\n    @objc public var nightMode: Bool = false {\n        didSet {\n            provider?.setNightModeEnabled(nightMode)\n        }\n    }\n\n    @objc public var minZoomLevel: Double = 0 {\n        didSet {\n            provider?.setMinZoomLevel(minZoomLevel)\n        }\n    }\n\n    @objc public var maxZoomLevel: Double = 21 {\n        didSet {\n            provider?.setMaxZoomLevel(maxZoomLevel)\n        }\n    }\n\n    @objc public var scrollGesturesEnabled: Bool = true {\n        didSet {\n            provider?.setScrollGesturesEnabled(scrollGesturesEnabled)\n        }\n    }\n\n    @objc public var tiltGesturesEnabled: Bool = true {\n        didSet {\n            provider?.setTiltGesturesEnabled(tiltGesturesEnabled)\n        }\n    }\n\n    @objc public var rotateGesturesEnabled: Bool = true {\n        didSet {\n            provider?.setRotateGesturesEnabled(rotateGesturesEnabled)\n        }\n    }\n\n    @objc public var stopGesturesEnabled: Bool = true {\n        didSet {\n            provider?.setStopGesturesEnabled(stopGesturesEnabled)\n        }\n    }\n\n    @objc public var locationTrackingMode: Int = 0 {\n        didSet {\n            guard let mode = GraniteNaverMapLocationTrackingMode(rawValue: locationTrackingMode) else { return }\n            provider?.setLocationTrackingMode(mode)\n        }\n    }\n\n    @objc public var showsMyLocationButton: Bool = false {\n        didSet {\n            provider?.setLocationButtonEnabled(showsMyLocationButton)\n        }\n    }\n\n    @objc public var zoomGesturesEnabled: Bool = true {\n        didSet {\n            provider?.setZoomGesturesEnabled(zoomGesturesEnabled)\n        }\n    }\n\n    // MARK: - Commands\n\n    @objc public func animateToCoordinate(latitude: Double, longitude: Double) {\n        let coord = GraniteNaverMapCoordinate(latitude: latitude, longitude: longitude)\n        provider?.animateToCoordinate(coord)\n    }\n\n    @objc public func animateToTwoCoordinates(lat1: Double, lng1: Double, lat2: Double, lng2: Double) {\n        let bounds = GraniteNaverMapBounds(\n            southWest: GraniteNaverMapCoordinate(latitude: min(lat1, lat2), longitude: min(lng1, lng2)),\n            northEast: GraniteNaverMapCoordinate(latitude: max(lat1, lat2), longitude: max(lng1, lng2))\n        )\n        provider?.animateToBounds(bounds, padding: 24.0)\n    }\n\n    @objc public func animateToRegion(latitude: Double, longitude: Double, latitudeDelta: Double, longitudeDelta: Double) {\n        let bounds = GraniteNaverMapBounds(\n            southWest: GraniteNaverMapCoordinate(latitude: latitude - latitudeDelta / 2, longitude: longitude - longitudeDelta / 2),\n            northEast: GraniteNaverMapCoordinate(latitude: latitude + latitudeDelta / 2, longitude: longitude + longitudeDelta / 2)\n        )\n        provider?.animateToBounds(bounds, padding: 0)\n    }\n\n    @objc public func setLayerGroupEnabled(group: String, enabled: Bool) {\n        provider?.setLayerGroupEnabled(group: group, enabled: enabled)\n    }\n\n    // MARK: - Marker Commands\n\n    @objc public func addMarker(identifier: String, latitude: Double, longitude: Double, width: Int, height: Int, zIndex: Int, rotation: Float, flat: Bool, alpha: Float, pinColor: Int, image: String) {\n        let data = ProviderMarkerData(\n            identifier: identifier,\n            coordinate: GraniteNaverMapCoordinate(latitude: latitude, longitude: longitude),\n            width: width,\n            height: height,\n            zIndex: zIndex,\n            rotation: rotation,\n            flat: flat,\n            alpha: alpha,\n            pinColor: pinColor,\n            image: image\n        )\n        provider?.addMarker(data)\n    }\n\n    @objc public func updateMarker(identifier: String, latitude: Double, longitude: Double, width: Int, height: Int, zIndex: Int, rotation: Float, flat: Bool, alpha: Float, pinColor: Int, image: String) {\n        let data = ProviderMarkerData(\n            identifier: identifier,\n            coordinate: GraniteNaverMapCoordinate(latitude: latitude, longitude: longitude),\n            width: width,\n            height: height,\n            zIndex: zIndex,\n            rotation: rotation,\n            flat: flat,\n            alpha: alpha,\n            pinColor: pinColor,\n            image: image\n        )\n        provider?.updateMarker(data)\n    }\n\n    @objc public func removeMarker(identifier: String) {\n        provider?.removeMarker(identifier: identifier)\n    }\n\n    // MARK: - Polyline Commands\n\n    private func parseCoordinates(_ json: String) -> [GraniteNaverMapCoordinate] {\n        guard let data = json.data(using: .utf8),\n              let coords = try? JSONSerialization.jsonObject(with: data) as? [[String: Double]] else {\n            return []\n        }\n        return coords.compactMap { coord in\n            guard let lat = coord[\"latitude\"], let lng = coord[\"longitude\"] else { return nil }\n            return GraniteNaverMapCoordinate(latitude: lat, longitude: lng)\n        }\n    }\n\n    private func parsePattern(_ json: String) -> [Int] {\n        guard let data = json.data(using: .utf8),\n              let pattern = try? JSONSerialization.jsonObject(with: data) as? [Int] else {\n            return []\n        }\n        return pattern\n    }\n\n    @objc public func addPolyline(identifier: String, coordsJson: String, strokeWidth: Float, strokeColor: Int, zIndex: Int, lineCap: Int, lineJoin: Int, patternJson: String) {\n        let coords = parseCoordinates(coordsJson)\n        guard coords.count >= 2 else { return }\n\n        let data = ProviderPolylineData(\n            identifier: identifier,\n            coordinates: coords,\n            strokeWidth: strokeWidth,\n            strokeColor: strokeColor,\n            zIndex: zIndex,\n            lineCap: lineCap,\n            lineJoin: lineJoin,\n            pattern: parsePattern(patternJson)\n        )\n        provider?.addPolyline(data)\n    }\n\n    @objc public func updatePolyline(identifier: String, coordsJson: String, strokeWidth: Float, strokeColor: Int, zIndex: Int, lineCap: Int, lineJoin: Int, patternJson: String) {\n        let coords = parseCoordinates(coordsJson)\n        guard coords.count >= 2 else { return }\n\n        let data = ProviderPolylineData(\n            identifier: identifier,\n            coordinates: coords,\n            strokeWidth: strokeWidth,\n            strokeColor: strokeColor,\n            zIndex: zIndex,\n            lineCap: lineCap,\n            lineJoin: lineJoin,\n            pattern: parsePattern(patternJson)\n        )\n        provider?.updatePolyline(data)\n    }\n\n    @objc public func removePolyline(identifier: String) {\n        provider?.removePolyline(identifier: identifier)\n    }\n\n    // MARK: - Polygon Commands\n\n    private func parseHoles(_ json: String) -> [[GraniteNaverMapCoordinate]] {\n        guard let data = json.data(using: .utf8),\n              let holes = try? JSONSerialization.jsonObject(with: data) as? [[[String: Double]]] else {\n            return []\n        }\n        return holes.map { hole in\n            hole.compactMap { coord in\n                guard let lat = coord[\"latitude\"], let lng = coord[\"longitude\"] else { return nil }\n                return GraniteNaverMapCoordinate(latitude: lat, longitude: lng)\n            }\n        }\n    }\n\n    @objc public func addPolygon(identifier: String, coordsJson: String, holesJson: String, fillColor: Int, strokeColor: Int, strokeWidth: Float, zIndex: Int) {\n        let coords = parseCoordinates(coordsJson)\n        guard coords.count >= 3 else { return }\n\n        let data = ProviderPolygonData(\n            identifier: identifier,\n            coordinates: coords,\n            holes: parseHoles(holesJson),\n            fillColor: fillColor,\n            strokeColor: strokeColor,\n            strokeWidth: strokeWidth,\n            zIndex: zIndex\n        )\n        provider?.addPolygon(data)\n    }\n\n    @objc public func updatePolygon(identifier: String, coordsJson: String, holesJson: String, fillColor: Int, strokeColor: Int, strokeWidth: Float, zIndex: Int) {\n        let coords = parseCoordinates(coordsJson)\n        guard coords.count >= 3 else { return }\n\n        let data = ProviderPolygonData(\n            identifier: identifier,\n            coordinates: coords,\n            holes: parseHoles(holesJson),\n            fillColor: fillColor,\n            strokeColor: strokeColor,\n            strokeWidth: strokeWidth,\n            zIndex: zIndex\n        )\n        provider?.updatePolygon(data)\n    }\n\n    @objc public func removePolygon(identifier: String) {\n        provider?.removePolygon(identifier: identifier)\n    }\n\n    // MARK: - Circle Commands\n\n    @objc public func addCircle(identifier: String, latitude: Double, longitude: Double, radius: Double, fillColor: Int, strokeColor: Int, strokeWidth: Float, zIndex: Int) {\n        let data = ProviderCircleData(\n            identifier: identifier,\n            center: GraniteNaverMapCoordinate(latitude: latitude, longitude: longitude),\n            radius: radius,\n            fillColor: fillColor,\n            strokeColor: strokeColor,\n            strokeWidth: strokeWidth,\n            zIndex: zIndex\n        )\n        provider?.addCircle(data)\n    }\n\n    @objc public func updateCircle(identifier: String, latitude: Double, longitude: Double, radius: Double, fillColor: Int, strokeColor: Int, strokeWidth: Float, zIndex: Int) {\n        let data = ProviderCircleData(\n            identifier: identifier,\n            center: GraniteNaverMapCoordinate(latitude: latitude, longitude: longitude),\n            radius: radius,\n            fillColor: fillColor,\n            strokeColor: strokeColor,\n            strokeWidth: strokeWidth,\n            zIndex: zIndex\n        )\n        provider?.updateCircle(data)\n    }\n\n    @objc public func removeCircle(identifier: String) {\n        provider?.removeCircle(identifier: identifier)\n    }\n\n    // MARK: - Path Commands\n\n    @objc public func addPath(identifier: String, coordsJson: String, width: Float, outlineWidth: Float, color: Int, outlineColor: Int, passedColor: Int, passedOutlineColor: Int, patternImage: String, patternInterval: Int, progress: Float, zIndex: Int) {\n        let coords = parseCoordinates(coordsJson)\n        guard coords.count >= 2 else { return }\n\n        let data = ProviderPathData(\n            identifier: identifier,\n            coordinates: coords,\n            width: width,\n            outlineWidth: outlineWidth,\n            color: color,\n            outlineColor: outlineColor,\n            passedColor: passedColor,\n            passedOutlineColor: passedOutlineColor,\n            patternImage: patternImage,\n            patternInterval: patternInterval,\n            progress: progress,\n            zIndex: zIndex\n        )\n        provider?.addPath(data)\n    }\n\n    @objc public func updatePath(identifier: String, coordsJson: String, width: Float, outlineWidth: Float, color: Int, outlineColor: Int, passedColor: Int, passedOutlineColor: Int, patternImage: String, patternInterval: Int, progress: Float, zIndex: Int) {\n        let coords = parseCoordinates(coordsJson)\n        guard coords.count >= 2 else { return }\n\n        let data = ProviderPathData(\n            identifier: identifier,\n            coordinates: coords,\n            width: width,\n            outlineWidth: outlineWidth,\n            color: color,\n            outlineColor: outlineColor,\n            passedColor: passedColor,\n            passedOutlineColor: passedOutlineColor,\n            patternImage: patternImage,\n            patternInterval: patternInterval,\n            progress: progress,\n            zIndex: zIndex\n        )\n        provider?.updatePath(data)\n    }\n\n    @objc public func removePath(identifier: String) {\n        provider?.removePath(identifier: identifier)\n    }\n\n    // MARK: - ArrowheadPath Commands (delegated to Path for now)\n\n    @objc public func addArrowheadPath(identifier: String, coordsJson: String, width: Float, outlineWidth: Float, color: Int, outlineColor: Int, headSizeRatio: Float, zIndex: Int) {\n        // ArrowheadPath uses the same path API with default passed colors\n        addPath(identifier: identifier, coordsJson: coordsJson, width: width, outlineWidth: outlineWidth, color: color, outlineColor: outlineColor, passedColor: color, passedOutlineColor: outlineColor, patternImage: \"\", patternInterval: 0, progress: 0, zIndex: zIndex)\n    }\n\n    @objc public func updateArrowheadPath(identifier: String, coordsJson: String, width: Float, outlineWidth: Float, color: Int, outlineColor: Int, headSizeRatio: Float, zIndex: Int) {\n        updatePath(identifier: identifier, coordsJson: coordsJson, width: width, outlineWidth: outlineWidth, color: color, outlineColor: outlineColor, passedColor: color, passedOutlineColor: outlineColor, patternImage: \"\", patternInterval: 0, progress: 0, zIndex: zIndex)\n    }\n\n    @objc public func removeArrowheadPath(identifier: String) {\n        removePath(identifier: identifier)\n    }\n\n    // MARK: - GroundOverlay Commands (requires provider extension)\n\n    @objc public func addGroundOverlay(identifier: String, southWestLat: Double, southWestLng: Double, northEastLat: Double, northEastLng: Double, image: String, alpha: Float, zIndex: Int) {\n        // TODO: Add ground overlay support to provider protocol\n    }\n\n    @objc public func updateGroundOverlay(identifier: String, southWestLat: Double, southWestLng: Double, northEastLat: Double, northEastLng: Double, image: String, alpha: Float, zIndex: Int) {\n        // TODO: Add ground overlay support to provider protocol\n    }\n\n    @objc public func removeGroundOverlay(identifier: String) {\n        // TODO: Add ground overlay support to provider protocol\n    }\n\n    // MARK: - InfoWindow Commands (requires provider extension)\n\n    @objc public func addInfoWindow(identifier: String, latitude: Double, longitude: Double, text: String, alpha: Float, zIndex: Int, offsetX: Int, offsetY: Int) {\n        // TODO: Add info window support to provider protocol\n    }\n\n    @objc public func updateInfoWindow(identifier: String, latitude: Double, longitude: Double, text: String, alpha: Float, zIndex: Int, offsetX: Int, offsetY: Int) {\n        // TODO: Add info window support to provider protocol\n    }\n\n    @objc public func removeInfoWindow(identifier: String) {\n        // TODO: Add info window support to provider protocol\n    }\n}\n\n// MARK: - GraniteNaverMapProviderDelegate\n\nextension GraniteNaverMapViewImpl: GraniteNaverMapProviderDelegate {\n    public func mapViewDidInitialize() {\n        eventDelegate?.mapViewDidInitialize()\n    }\n\n    public func mapViewDidChangeCamera(position: GraniteNaverMapCameraPosition) {\n        eventDelegate?.mapViewDidChangeCamera(\n            latitude: position.target.latitude,\n            longitude: position.target.longitude,\n            zoom: position.zoom\n        )\n    }\n\n    public func mapViewDidTouch(reason: Int, animated: Bool) {\n        eventDelegate?.mapViewDidTouch(reason: reason, animated: animated)\n    }\n\n    public func mapViewDidClick(x: Double, y: Double, latitude: Double, longitude: Double) {\n        eventDelegate?.mapViewDidClick(x: x, y: y, latitude: latitude, longitude: longitude)\n    }\n\n    public func mapViewDidClickMarker(id: String) {\n        eventDelegate?.mapViewDidClickMarker(id: id)\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/ios/GraniteNaverMapViewManager.m",
    "content": "//\n//  GraniteNaverMapViewManager.m\n//  granite-naver-map\n//\n//  Old Architecture bridge (no direct NMapsMap dependency)\n//\n\n#import <React/RCTBridge.h>\n#import <React/RCTViewManager.h>\n\n@interface RCT_EXTERN_MODULE(GraniteNaverMapViewManager, RCTViewManager)\n\nRCT_EXPORT_VIEW_PROPERTY(showsMyLocationButton, BOOL)\nRCT_EXPORT_VIEW_PROPERTY(mapPadding, UIEdgeInsets)\nRCT_EXPORT_VIEW_PROPERTY(mapType, int)\nRCT_EXPORT_VIEW_PROPERTY(compass, BOOL)\nRCT_EXPORT_VIEW_PROPERTY(scaleBar, BOOL)\nRCT_EXPORT_VIEW_PROPERTY(zoomControl, BOOL)\nRCT_EXPORT_VIEW_PROPERTY(buildingHeight, float)\nRCT_EXPORT_VIEW_PROPERTY(nightMode, BOOL)\nRCT_EXPORT_VIEW_PROPERTY(minZoomLevel, double)\nRCT_EXPORT_VIEW_PROPERTY(maxZoomLevel, double)\nRCT_EXPORT_VIEW_PROPERTY(scrollGesturesEnabled, BOOL)\nRCT_EXPORT_VIEW_PROPERTY(zoomGesturesEnabled, BOOL)\nRCT_EXPORT_VIEW_PROPERTY(tiltGesturesEnabled, BOOL)\nRCT_EXPORT_VIEW_PROPERTY(rotateGesturesEnabled, BOOL)\nRCT_EXPORT_VIEW_PROPERTY(stopGesturesEnabled, BOOL)\nRCT_EXPORT_VIEW_PROPERTY(tilt, BOOL)\nRCT_EXPORT_VIEW_PROPERTY(onInitialized, RCTDirectEventBlock)\nRCT_EXPORT_VIEW_PROPERTY(onCameraChange, RCTDirectEventBlock)\nRCT_EXPORT_VIEW_PROPERTY(onTouch, RCTDirectEventBlock)\nRCT_EXPORT_VIEW_PROPERTY(onMapClick, RCTDirectEventBlock)\nRCT_EXPORT_VIEW_PROPERTY(onMarkerClick, RCTDirectEventBlock)\nRCT_EXPORT_VIEW_PROPERTY(locationTrackingMode, int)\n\nRCT_EXTERN_METHOD(setLayerGroupEnabled:(nonnull NSNumber *)reactTag\n                  withGroup:(NSString *)group\n                  withEnabled:(BOOL)enabled)\n\nRCT_EXTERN_METHOD(animateToCoordinate:(nonnull NSNumber *)reactTag\n                  withLatitude:(double)latitude\n                  withLongitude:(double)longitude)\n\nRCT_EXTERN_METHOD(animateToTwoCoordinates:(nonnull NSNumber *)reactTag\n                  withLat1:(double)lat1\n                  withLng1:(double)lng1\n                  withLat2:(double)lat2\n                  withLng2:(double)lng2)\n\nRCT_EXTERN_METHOD(animateToRegion:(nonnull NSNumber *)reactTag\n                  withLatitude:(double)latitude\n                  withLongitude:(double)longitude\n                  withLatitudeDelta:(double)latitudeDelta\n                  withLongitudeDelta:(double)longitudeDelta)\n\nRCT_EXTERN_METHOD(addMarker:(nonnull NSNumber *)reactTag\n                  identifier:(NSString *)identifier\n                  markerData:(NSDictionary *)markerData)\n\nRCT_EXTERN_METHOD(updateMarker:(nonnull NSNumber *)reactTag\n                  identifier:(NSString *)identifier\n                  markerData:(NSDictionary *)markerData)\n\nRCT_EXTERN_METHOD(removeMarker:(nonnull NSNumber *)reactTag\n                  identifier:(NSString *)identifier)\n\n@end\n"
  },
  {
    "path": "packages/naver-map/ios/GraniteNaverMapViewManager.swift",
    "content": "//\n//  GraniteNaverMapViewManager.swift\n//  granite-naver-map\n//\n//  Old Architecture ViewManager (no direct NMapsMap dependency)\n//\n\nimport React\nimport UIKit\n\n@objc(GraniteNaverMapViewManager)\nclass GraniteNaverMapViewManager: RCTViewManager {\n\n    override func view() -> UIView! {\n        let mapView = GraniteNaverMapView(frame: CGRect(x: 0, y: 0, width: 200, height: 300))\n        mapView.bridge = bridge\n        return mapView\n    }\n\n    override static func requiresMainQueueSetup() -> Bool {\n        false\n    }\n\n    @objc static func performActionWithView(\n        reactTag: NSNumber,\n        bridge: RCTBridge,\n        action: @escaping (GraniteNaverMapView) -> Void\n    ) {\n        bridge.uiManager.addUIBlock { (_, viewRegistry) in\n            guard let view = viewRegistry?[reactTag] as? GraniteNaverMapView else {\n                return\n            }\n            action(view)\n        }\n    }\n\n    static let layerGroups: [String: String] = [\n        \"building\": \"building\",\n        \"ctt\": \"traffic\",\n        \"transit\": \"transit\",\n        \"bike\": \"bicycle\",\n        \"mountain\": \"mountain\",\n        \"landparcel\": \"cadastral\"\n    ]\n\n    @objc(setLayerGroupEnabled:withGroup:withEnabled:)\n    func setLayerGroupEnabled(_ reactTag: NSNumber, withGroup group: String, withEnabled enabled: Bool) {\n        Self.performActionWithView(reactTag: reactTag, bridge: bridge) { view in\n            view.setLayerGroupEnabled(group: group, enabled: enabled)\n        }\n    }\n\n    @objc(animateToCoordinate:withLatitude:withLongitude:)\n    func animateToCoordinate(_ reactTag: NSNumber, withLatitude latitude: Double, withLongitude longitude: Double) {\n        Self.performActionWithView(reactTag: reactTag, bridge: bridge) { view in\n            let coord = GraniteNaverMapCoordinate(latitude: latitude, longitude: longitude)\n            view.animateToCoordinate(coord)\n        }\n    }\n\n    @objc(animateToTwoCoordinates:withLat1:withLng1:withLat2:withLng2:)\n    func animateToTwoCoordinates(_ reactTag: NSNumber, withLat1 lat1: Double, withLng1 lng1: Double, withLat2 lat2: Double, withLng2 lng2: Double) {\n        Self.performActionWithView(reactTag: reactTag, bridge: bridge) { view in\n            let bounds = GraniteNaverMapBounds(\n                southWest: GraniteNaverMapCoordinate(latitude: min(lat1, lat2), longitude: min(lng1, lng2)),\n                northEast: GraniteNaverMapCoordinate(latitude: max(lat1, lat2), longitude: max(lng1, lng2))\n            )\n            view.animateToBounds(bounds, padding: 24.0)\n        }\n    }\n\n    @objc(animateToRegion:withLatitude:withLongitude:withLatitudeDelta:withLongitudeDelta:)\n    func animateToRegion(_ reactTag: NSNumber, withLatitude latitude: Double, withLongitude longitude: Double, withLatitudeDelta latitudeDelta: Double, withLongitudeDelta longitudeDelta: Double) {\n        Self.performActionWithView(reactTag: reactTag, bridge: bridge) { view in\n            let bounds = GraniteNaverMapBounds(\n                southWest: GraniteNaverMapCoordinate(latitude: latitude - latitudeDelta / 2, longitude: longitude - longitudeDelta / 2),\n                northEast: GraniteNaverMapCoordinate(latitude: latitude + latitudeDelta / 2, longitude: longitude + longitudeDelta / 2)\n            )\n            view.animateToBounds(bounds, padding: 0)\n        }\n    }\n\n    @objc(addMarker:identifier:markerData:)\n    func addMarker(_ reactTag: NSNumber, identifier: String, markerData: [String: Any]) {\n        Self.performActionWithView(reactTag: reactTag, bridge: bridge) { view in\n            let data = ProviderMarkerData(\n                identifier: identifier,\n                coordinate: GraniteNaverMapCoordinate(\n                    latitude: markerData[\"latitude\"] as? Double ?? 0,\n                    longitude: markerData[\"longitude\"] as? Double ?? 0\n                ),\n                width: markerData[\"width\"] as? Int ?? 0,\n                height: markerData[\"height\"] as? Int ?? 0,\n                zIndex: markerData[\"zIndex\"] as? Int ?? 0,\n                rotation: markerData[\"rotation\"] as? Float ?? 0,\n                flat: markerData[\"flat\"] as? Bool ?? false,\n                alpha: markerData[\"alpha\"] as? Float ?? 1,\n                pinColor: markerData[\"pinColor\"] as? Int ?? 0,\n                image: markerData[\"image\"] as? String ?? \"\"\n            )\n            view.addMarker(data)\n        }\n    }\n\n    @objc(updateMarker:identifier:markerData:)\n    func updateMarker(_ reactTag: NSNumber, identifier: String, markerData: [String: Any]) {\n        Self.performActionWithView(reactTag: reactTag, bridge: bridge) { view in\n            let data = ProviderMarkerData(\n                identifier: identifier,\n                coordinate: GraniteNaverMapCoordinate(\n                    latitude: markerData[\"latitude\"] as? Double ?? 0,\n                    longitude: markerData[\"longitude\"] as? Double ?? 0\n                ),\n                width: markerData[\"width\"] as? Int ?? 0,\n                height: markerData[\"height\"] as? Int ?? 0,\n                zIndex: markerData[\"zIndex\"] as? Int ?? 0,\n                rotation: markerData[\"rotation\"] as? Float ?? 0,\n                flat: markerData[\"flat\"] as? Bool ?? false,\n                alpha: markerData[\"alpha\"] as? Float ?? 1,\n                pinColor: markerData[\"pinColor\"] as? Int ?? 0,\n                image: markerData[\"image\"] as? String ?? \"\"\n            )\n            view.updateMarker(data)\n        }\n    }\n\n    @objc(removeMarker:identifier:)\n    func removeMarker(_ reactTag: NSNumber, identifier: String) {\n        Self.performActionWithView(reactTag: reactTag, bridge: bridge) { view in\n            view.removeMarker(identifier: identifier)\n        }\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/ios/GraniteNaverMapViewWrapper.swift",
    "content": "//\n//  GraniteNaverMapViewWrapper.swift\n//  granite-naver-map\n//\n//  Provider-based wrapper for Old Architecture (no direct NMapsMap dependency)\n//\n\nimport React\nimport UIKit\n\nclass GraniteNaverMapView: UIView {\n    weak var bridge: RCTBridge?\n\n    @objc var onInitialized: RCTDirectEventBlock?\n    @objc var onCameraChange: RCTDirectEventBlock?\n    @objc var onTouch: RCTDirectEventBlock?\n    @objc var onMapClick: RCTDirectEventBlock?\n    @objc var onMarkerClick: RCTDirectEventBlock?\n\n    private var provider: GraniteNaverMapProvidable?\n    private var mapContentView: UIView?\n\n    override init(frame: CGRect) {\n        super.init(frame: frame)\n        setupProvider()\n    }\n\n    required init?(coder: NSCoder) {\n        fatalError(\"init(coder:) has not been implemented\")\n    }\n\n    private func setupProvider() {\n        // Create a new provider instance for this view\n        guard let provider = GraniteNaverMapRegistry.shared.createProvider() else {\n            // No provider factory available - show placeholder or error\n            let label = UILabel(frame: bounds)\n            label.text = \"NaverMap provider not registered\"\n            label.textAlignment = .center\n            label.autoresizingMask = [.flexibleWidth, .flexibleHeight]\n            addSubview(label)\n            return\n        }\n\n        self.provider = provider\n        provider.setDelegate(self)\n\n        let mapView = provider.createMapView(frame: bounds)\n        mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]\n        addSubview(mapView)\n        self.mapContentView = mapView\n    }\n\n    // MARK: - Property Setters\n\n    @objc func setMapType(_ type: Int) {\n        guard let mapType = GraniteNaverMapType(rawValue: type) else { return }\n        provider?.setMapType(mapType)\n    }\n\n    @objc var mapPadding: UIEdgeInsets = .zero {\n        didSet {\n            provider?.setMapPadding(mapPadding)\n        }\n    }\n\n    @objc var compass: Bool = true {\n        didSet {\n            provider?.setCompassEnabled(compass)\n        }\n    }\n\n    @objc var scaleBar: Bool = true {\n        didSet {\n            provider?.setScaleBarEnabled(scaleBar)\n        }\n    }\n\n    @objc var zoomControl: Bool = true {\n        didSet {\n            provider?.setZoomControlEnabled(zoomControl)\n        }\n    }\n\n    @objc var buildingHeight: Float = 1.0 {\n        didSet {\n            provider?.setBuildingHeight(buildingHeight)\n        }\n    }\n\n    @objc var nightMode: Bool = false {\n        didSet {\n            provider?.setNightModeEnabled(nightMode)\n        }\n    }\n\n    @objc var minZoomLevel: Double = 0 {\n        didSet {\n            provider?.setMinZoomLevel(minZoomLevel)\n        }\n    }\n\n    @objc var maxZoomLevel: Double = 21 {\n        didSet {\n            provider?.setMaxZoomLevel(maxZoomLevel)\n        }\n    }\n\n    @objc var scrollGesturesEnabled: Bool = true {\n        didSet {\n            provider?.setScrollGesturesEnabled(scrollGesturesEnabled)\n        }\n    }\n\n    @objc var tiltGesturesEnabled: Bool = true {\n        didSet {\n            provider?.setTiltGesturesEnabled(tiltGesturesEnabled)\n        }\n    }\n\n    @objc var rotateGesturesEnabled: Bool = true {\n        didSet {\n            provider?.setRotateGesturesEnabled(rotateGesturesEnabled)\n        }\n    }\n\n    @objc var stopGesturesEnabled: Bool = true {\n        didSet {\n            provider?.setStopGesturesEnabled(stopGesturesEnabled)\n        }\n    }\n\n    @objc var tilt: Bool = true {\n        didSet {\n            provider?.setTiltGesturesEnabled(tilt)\n        }\n    }\n\n    @objc var locationTrackingMode: UInt = 0 {\n        didSet {\n            guard let mode = GraniteNaverMapLocationTrackingMode(rawValue: Int(locationTrackingMode)) else { return }\n            provider?.setLocationTrackingMode(mode)\n        }\n    }\n\n    @objc var showsMyLocationButton: Bool = false {\n        didSet {\n            provider?.setLocationButtonEnabled(showsMyLocationButton)\n        }\n    }\n\n    @objc var zoomGesturesEnabled: Bool = true {\n        didSet {\n            provider?.setZoomGesturesEnabled(zoomGesturesEnabled)\n        }\n    }\n\n    // MARK: - Commands\n\n    func animateToCoordinate(_ coord: GraniteNaverMapCoordinate) {\n        provider?.animateToCoordinate(coord)\n    }\n\n    func animateToBounds(_ bounds: GraniteNaverMapBounds, padding: CGFloat) {\n        provider?.animateToBounds(bounds, padding: padding)\n    }\n\n    func setLayerGroupEnabled(group: String, enabled: Bool) {\n        provider?.setLayerGroupEnabled(group: group, enabled: enabled)\n    }\n\n    func addMarker(_ data: ProviderMarkerData) {\n        provider?.addMarker(data)\n    }\n\n    func updateMarker(_ data: ProviderMarkerData) {\n        provider?.updateMarker(data)\n    }\n\n    func removeMarker(identifier: String) {\n        provider?.removeMarker(identifier: identifier)\n    }\n}\n\n// MARK: - GraniteNaverMapProviderDelegate\n\nextension GraniteNaverMapView: GraniteNaverMapProviderDelegate {\n    func mapViewDidInitialize() {\n        onInitialized?([:])\n    }\n\n    func mapViewDidChangeCamera(position: GraniteNaverMapCameraPosition) {\n        onCameraChange?([\n            \"latitude\": position.target.latitude,\n            \"longitude\": position.target.longitude,\n            \"zoom\": position.zoom\n        ])\n    }\n\n    func mapViewDidTouch(reason: Int, animated: Bool) {\n        onTouch?([\"animated\": animated, \"reason\": reason])\n    }\n\n    func mapViewDidClick(x: Double, y: Double, latitude: Double, longitude: Double) {\n        onMapClick?([\n            \"x\": x,\n            \"y\": y,\n            \"latitude\": latitude,\n            \"longitude\": longitude\n        ])\n    }\n\n    func mapViewDidClickMarker(id: String) {\n        onMarkerClick?([\"id\": id])\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/ios/builtinProvider/BuiltInNaverMapProvider.swift",
    "content": "//\n//  BuiltInNaverMapProvider.swift\n//  granite-naver-map\n//\n//  Built-in provider using NMapsMap SDK\n//\n\nimport UIKit\nimport NMapsMap\n\n/// Factory for creating BuiltInNaverMapProvider instances.\n/// Each call to createProvider() returns a new instance.\n@objc public class BuiltInNaverMapProviderFactory: NSObject, GraniteNaverMapProviderFactory {\n    @objc public func createProvider() -> GraniteNaverMapProvidable {\n        return BuiltInNaverMapProvider()\n    }\n}\n\n@objc public class BuiltInNaverMapProvider: NSObject, GraniteNaverMapProvidable {\n    private var mapView: NMFNaverMapView?\n    private weak var delegate: GraniteNaverMapProviderDelegate?\n    private var isInitialized = false\n\n    private var markers: [String: NMFMarker] = [:]\n    private var polylines: [String: NMFPolylineOverlay] = [:]\n    private var polygons: [String: NMFPolygonOverlay] = [:]\n    private var circles: [String: NMFCircleOverlay] = [:]\n    private var paths: [String: NMFPath] = [:]\n\n    // MARK: - GraniteNaverMapProvidable\n\n    @objc public func createMapView(frame: CGRect) -> UIView {\n        let view = NMFNaverMapView(frame: frame)\n        self.mapView = view\n        setupMap(view)\n        return view\n    }\n\n    @objc public func setDelegate(_ delegate: GraniteNaverMapProviderDelegate?) {\n        self.delegate = delegate\n    }\n\n    private func setupMap(_ view: NMFNaverMapView) {\n        view.mapView.touchDelegate = self\n        view.mapView.addCameraDelegate(delegate: self)\n    }\n\n    // MARK: - Camera\n\n    @objc public func moveCamera(to position: GraniteNaverMapCameraPosition, animated: Bool) {\n        guard let mapView = mapView else { return }\n        let cameraPosition = NMFCameraPosition(\n            NMGLatLng(lat: position.target.latitude, lng: position.target.longitude),\n            zoom: position.zoom,\n            tilt: position.tilt,\n            heading: position.bearing\n        )\n        let update = NMFCameraUpdate(position: cameraPosition)\n        if animated {\n            update.animation = .easeIn\n        }\n        mapView.mapView.moveCamera(update)\n    }\n\n    @objc public func animateToCoordinate(_ coordinate: GraniteNaverMapCoordinate) {\n        guard let mapView = mapView else { return }\n        let cameraUpdate = NMFCameraUpdate(scrollTo: NMGLatLng(lat: coordinate.latitude, lng: coordinate.longitude))\n        cameraUpdate.animation = .easeIn\n        mapView.mapView.moveCamera(cameraUpdate)\n    }\n\n    @objc public func animateToBounds(_ bounds: GraniteNaverMapBounds, padding: CGFloat) {\n        guard let mapView = mapView else { return }\n        let nmgBounds = NMGLatLngBounds(\n            southWest: NMGLatLng(lat: bounds.southWest.latitude, lng: bounds.southWest.longitude),\n            northEast: NMGLatLng(lat: bounds.northEast.latitude, lng: bounds.northEast.longitude)\n        )\n        let cameraUpdate = NMFCameraUpdate(fit: nmgBounds, padding: padding)\n        cameraUpdate.animation = .easeIn\n        mapView.mapView.moveCamera(cameraUpdate)\n    }\n\n    // MARK: - Map Properties\n\n    @objc public func setMapType(_ type: GraniteNaverMapType) {\n        guard let mapView = mapView, let nmfType = NMFMapType(rawValue: type.rawValue) else { return }\n        mapView.mapView.mapType = nmfType\n    }\n\n    @objc public func setMapPadding(_ padding: UIEdgeInsets) {\n        mapView?.mapView.contentInset = padding\n    }\n\n    @objc public func setCompassEnabled(_ enabled: Bool) {\n        mapView?.showCompass = enabled\n    }\n\n    @objc public func setScaleBarEnabled(_ enabled: Bool) {\n        mapView?.showScaleBar = enabled\n    }\n\n    @objc public func setZoomControlEnabled(_ enabled: Bool) {\n        mapView?.showZoomControls = enabled\n    }\n\n    @objc public func setLocationButtonEnabled(_ enabled: Bool) {\n        mapView?.showLocationButton = enabled\n    }\n\n    @objc public func setBuildingHeight(_ height: Float) {\n        mapView?.mapView.buildingHeight = height\n    }\n\n    @objc public func setNightModeEnabled(_ enabled: Bool) {\n        mapView?.mapView.isNightModeEnabled = enabled\n    }\n\n    @objc public func setMinZoomLevel(_ level: Double) {\n        mapView?.mapView.minZoomLevel = level\n    }\n\n    @objc public func setMaxZoomLevel(_ level: Double) {\n        mapView?.mapView.maxZoomLevel = level\n    }\n\n    @objc public func setScrollGesturesEnabled(_ enabled: Bool) {\n        mapView?.mapView.isScrollGestureEnabled = enabled\n    }\n\n    @objc public func setZoomGesturesEnabled(_ enabled: Bool) {\n        mapView?.mapView.isZoomGestureEnabled = enabled\n    }\n\n    @objc public func setTiltGesturesEnabled(_ enabled: Bool) {\n        mapView?.mapView.isTiltGestureEnabled = enabled\n    }\n\n    @objc public func setRotateGesturesEnabled(_ enabled: Bool) {\n        mapView?.mapView.isRotateGestureEnabled = enabled\n    }\n\n    @objc public func setStopGesturesEnabled(_ enabled: Bool) {\n        mapView?.mapView.isStopGestureEnabled = enabled\n    }\n\n    @objc public func setLocationTrackingMode(_ mode: GraniteNaverMapLocationTrackingMode) {\n        guard let mapView = mapView else { return }\n        mapView.mapView.positionMode = NMFMyPositionMode(rawValue: UInt(mode.rawValue)) ?? .disabled\n    }\n\n    @objc public func setLayerGroupEnabled(group: String, enabled: Bool) {\n        guard let mapView = mapView else { return }\n        let layerGroups: [String: String] = [\n            \"building\": NMF_LAYER_GROUP_BUILDING,\n            \"ctt\": NMF_LAYER_GROUP_TRAFFIC,\n            \"transit\": NMF_LAYER_GROUP_TRANSIT,\n            \"bike\": NMF_LAYER_GROUP_BICYCLE,\n            \"mountain\": NMF_LAYER_GROUP_MOUNTAIN,\n            \"landparcel\": NMF_LAYER_GROUP_CADASTRAL\n        ]\n        guard let layerGroup = layerGroups[group] else { return }\n        mapView.mapView.setLayerGroup(layerGroup, isEnabled: enabled)\n    }\n\n    // MARK: - Markers\n\n    @objc public func addMarker(_ data: ProviderMarkerData) {\n        guard let mapView = mapView else { return }\n\n        let marker = NMFMarker()\n        marker.position = NMGLatLng(lat: data.coordinate.latitude, lng: data.coordinate.longitude)\n        marker.width = CGFloat(data.width)\n        marker.height = CGFloat(data.height)\n        marker.zIndex = data.zIndex\n        marker.angle = CGFloat(data.rotation)\n        marker.isFlat = data.flat\n        marker.alpha = CGFloat(data.alpha)\n\n        marker.mapView = mapView.mapView\n        markers[data.identifier] = marker\n\n        let identifier = data.identifier\n        marker.touchHandler = { [weak self] _ -> Bool in\n            self?.delegate?.mapViewDidClickMarker(id: identifier)\n            return true\n        }\n\n        if !data.image.isEmpty {\n            loadMarkerImage(marker: marker, image: data.image)\n        }\n    }\n\n    @objc public func updateMarker(_ data: ProviderMarkerData) {\n        guard let marker = markers[data.identifier] else { return }\n\n        marker.position = NMGLatLng(lat: data.coordinate.latitude, lng: data.coordinate.longitude)\n        marker.width = CGFloat(data.width)\n        marker.height = CGFloat(data.height)\n        marker.zIndex = data.zIndex\n        marker.angle = CGFloat(data.rotation)\n        marker.isFlat = data.flat\n        marker.alpha = CGFloat(data.alpha)\n\n        if !data.image.isEmpty {\n            loadMarkerImage(marker: marker, image: data.image)\n        }\n    }\n\n    @objc public func removeMarker(identifier: String) {\n        guard let marker = markers[identifier] else { return }\n        marker.mapView = nil\n        markers[identifier] = nil\n    }\n\n    private func loadMarkerImage(marker: NMFMarker, image: String) {\n        if image.hasPrefix(\"http://\") || image.hasPrefix(\"https://\") {\n            guard let url = URL(string: image) else { return }\n            Task {\n                guard let (data, _) = try? await URLSession.shared.data(from: url),\n                      let uiImage = UIImage(data: data) else { return }\n                await MainActor.run {\n                    marker.iconImage = NMFOverlayImage(image: uiImage)\n                }\n            }\n        } else {\n            marker.iconImage = NMFOverlayImage(name: image)\n        }\n    }\n\n    // MARK: - Polylines\n\n    private func colorFromInt(_ value: Int) -> UIColor {\n        let uValue = UInt32(bitPattern: Int32(truncatingIfNeeded: value))\n        let alpha = CGFloat((uValue >> 24) & 0xFF) / 255.0\n        let red = CGFloat((uValue >> 16) & 0xFF) / 255.0\n        let green = CGFloat((uValue >> 8) & 0xFF) / 255.0\n        let blue = CGFloat(uValue & 0xFF) / 255.0\n        return UIColor(red: red, green: green, blue: blue, alpha: alpha)\n    }\n\n    private func lineCapType(_ value: Int) -> NMFOverlayLineCap {\n        switch value {\n        case 1: return .round\n        case 2: return .square\n        default: return .butt\n        }\n    }\n\n    private func lineJoinType(_ value: Int) -> NMFOverlayLineJoin {\n        switch value {\n        case 1: return .miter\n        case 2: return .round\n        default: return .bevel\n        }\n    }\n\n    @objc public func addPolyline(_ data: ProviderPolylineData) {\n        guard let mapView = mapView else { return }\n\n        let coords = data.coordinates.map { NMGLatLng(lat: $0.latitude, lng: $0.longitude) }\n        guard coords.count >= 2 else { return }\n\n        let polyline = NMFPolylineOverlay(NMGLineString(points: coords))\n        polyline?.width = CGFloat(data.strokeWidth)\n        polyline?.color = colorFromInt(data.strokeColor)\n        polyline?.zIndex = data.zIndex\n        polyline?.capType = lineCapType(data.lineCap)\n        polyline?.joinType = lineJoinType(data.lineJoin)\n\n        if !data.pattern.isEmpty {\n            polyline?.pattern = data.pattern.map { NSNumber(value: $0) }\n        }\n\n        polyline?.mapView = mapView.mapView\n        if let polyline = polyline {\n            polylines[data.identifier] = polyline\n        }\n    }\n\n    @objc public func updatePolyline(_ data: ProviderPolylineData) {\n        guard let polyline = polylines[data.identifier] else { return }\n\n        let coords = data.coordinates.map { NMGLatLng(lat: $0.latitude, lng: $0.longitude) }\n        if coords.count >= 2 {\n            polyline.line = NMGLineString(points: coords)\n        }\n        polyline.width = CGFloat(data.strokeWidth)\n        polyline.color = colorFromInt(data.strokeColor)\n        polyline.zIndex = data.zIndex\n        polyline.capType = lineCapType(data.lineCap)\n        polyline.joinType = lineJoinType(data.lineJoin)\n\n        if !data.pattern.isEmpty {\n            polyline.pattern = data.pattern.map { NSNumber(value: $0) }\n        }\n    }\n\n    @objc public func removePolyline(identifier: String) {\n        guard let polyline = polylines[identifier] else { return }\n        polyline.mapView = nil\n        polylines[identifier] = nil\n    }\n\n    // MARK: - Polygons\n\n    @objc public func addPolygon(_ data: ProviderPolygonData) {\n        guard let mapView = mapView else { return }\n\n        let coords = data.coordinates.map { NMGLatLng(lat: $0.latitude, lng: $0.longitude) }\n        guard coords.count >= 3 else { return }\n\n        let exteriorRing = NMGLineString(points: coords)\n\n        let nmgPolygon: NMGPolygon<AnyObject>\n        if data.holes.isEmpty {\n            nmgPolygon = unsafeBitCast(NMGPolygon(ring: exteriorRing), to: NMGPolygon<AnyObject>.self)\n        } else {\n            let interiorRings = data.holes.map { hole in\n                NMGLineString(points: hole.map { NMGLatLng(lat: $0.latitude, lng: $0.longitude) })\n            }\n            nmgPolygon = unsafeBitCast(NMGPolygon(ring: exteriorRing, interiorRings: interiorRings), to: NMGPolygon<AnyObject>.self)\n        }\n\n        let polygon = NMFPolygonOverlay(nmgPolygon)\n        polygon?.fillColor = colorFromInt(data.fillColor)\n        polygon?.outlineColor = colorFromInt(data.strokeColor)\n        polygon?.outlineWidth = UInt(data.strokeWidth)\n        polygon?.zIndex = data.zIndex\n        polygon?.mapView = mapView.mapView\n        if let polygon = polygon {\n            polygons[data.identifier] = polygon\n        }\n    }\n\n    @objc public func updatePolygon(_ data: ProviderPolygonData) {\n        guard let polygon = polygons[data.identifier] else { return }\n\n        let coords = data.coordinates.map { NMGLatLng(lat: $0.latitude, lng: $0.longitude) }\n        if coords.count >= 3 {\n            let exteriorRing = NMGLineString(points: coords)\n\n            if data.holes.isEmpty {\n                let nmgPolygon = NMGPolygon(ring: exteriorRing)\n                polygon.polygon = unsafeBitCast(nmgPolygon, to: NMGPolygon<AnyObject>.self)\n            } else {\n                let interiorRings = data.holes.map { hole in\n                    NMGLineString(points: hole.map { NMGLatLng(lat: $0.latitude, lng: $0.longitude) })\n                }\n                let nmgPolygon = NMGPolygon(ring: exteriorRing, interiorRings: interiorRings)\n                polygon.polygon = unsafeBitCast(nmgPolygon, to: NMGPolygon<AnyObject>.self)\n            }\n        }\n\n        polygon.fillColor = colorFromInt(data.fillColor)\n        polygon.outlineColor = colorFromInt(data.strokeColor)\n        polygon.outlineWidth = UInt(data.strokeWidth)\n        polygon.zIndex = data.zIndex\n    }\n\n    @objc public func removePolygon(identifier: String) {\n        guard let polygon = polygons[identifier] else { return }\n        polygon.mapView = nil\n        polygons[identifier] = nil\n    }\n\n    // MARK: - Circles\n\n    @objc public func addCircle(_ data: ProviderCircleData) {\n        guard let mapView = mapView else { return }\n\n        let circle = NMFCircleOverlay(NMGLatLng(lat: data.center.latitude, lng: data.center.longitude), radius: data.radius)\n        circle.fillColor = colorFromInt(data.fillColor)\n        circle.outlineColor = colorFromInt(data.strokeColor)\n        circle.outlineWidth = Double(data.strokeWidth)\n        circle.zIndex = data.zIndex\n        circle.mapView = mapView.mapView\n        circles[data.identifier] = circle\n    }\n\n    @objc public func updateCircle(_ data: ProviderCircleData) {\n        guard let circle = circles[data.identifier] else { return }\n\n        circle.center = NMGLatLng(lat: data.center.latitude, lng: data.center.longitude)\n        circle.radius = data.radius\n        circle.fillColor = colorFromInt(data.fillColor)\n        circle.outlineColor = colorFromInt(data.strokeColor)\n        circle.outlineWidth = Double(data.strokeWidth)\n        circle.zIndex = data.zIndex\n    }\n\n    @objc public func removeCircle(identifier: String) {\n        guard let circle = circles[identifier] else { return }\n        circle.mapView = nil\n        circles[identifier] = nil\n    }\n\n    // MARK: - Paths\n\n    @objc public func addPath(_ data: ProviderPathData) {\n        guard let mapView = mapView else { return }\n\n        let coords = data.coordinates.map { NMGLatLng(lat: $0.latitude, lng: $0.longitude) }\n        guard coords.count >= 2 else { return }\n\n        let path = NMFPath(points: coords)\n        path?.width = CGFloat(data.width)\n        path?.outlineWidth = CGFloat(data.outlineWidth)\n        path?.color = colorFromInt(data.color)\n        path?.outlineColor = colorFromInt(data.outlineColor)\n        path?.passedColor = colorFromInt(data.passedColor)\n        path?.passedOutlineColor = colorFromInt(data.passedOutlineColor)\n        path?.progress = Double(data.progress)\n        path?.zIndex = data.zIndex\n\n        if !data.patternImage.isEmpty {\n            path?.patternIcon = NMFOverlayImage(name: data.patternImage)\n            path?.patternInterval = UInt(data.patternInterval)\n        }\n\n        path?.mapView = mapView.mapView\n        if let path = path {\n            paths[data.identifier] = path\n        }\n    }\n\n    @objc public func updatePath(_ data: ProviderPathData) {\n        guard let path = paths[data.identifier] else { return }\n\n        let coords = data.coordinates.map { NMGLatLng(lat: $0.latitude, lng: $0.longitude) }\n        if coords.count >= 2 {\n            path.path = NMGLineString(points: coords)\n        }\n        path.width = CGFloat(data.width)\n        path.outlineWidth = CGFloat(data.outlineWidth)\n        path.color = colorFromInt(data.color)\n        path.outlineColor = colorFromInt(data.outlineColor)\n        path.passedColor = colorFromInt(data.passedColor)\n        path.passedOutlineColor = colorFromInt(data.passedOutlineColor)\n        path.progress = Double(data.progress)\n        path.zIndex = data.zIndex\n\n        if !data.patternImage.isEmpty {\n            path.patternIcon = NMFOverlayImage(name: data.patternImage)\n            path.patternInterval = UInt(data.patternInterval)\n        }\n    }\n\n    @objc public func removePath(identifier: String) {\n        guard let path = paths[identifier] else { return }\n        path.mapView = nil\n        paths[identifier] = nil\n    }\n\n    // MARK: - Internal\n\n    func notifyInitialized() {\n        if !isInitialized {\n            isInitialized = true\n            delegate?.mapViewDidInitialize()\n        }\n    }\n}\n\n// MARK: - NMFMapViewTouchDelegate\n\nextension BuiltInNaverMapProvider: NMFMapViewTouchDelegate {\n    public func mapView(_ mapView: NMFMapView, didTapMap latlng: NMGLatLng, point: CGPoint) {\n        delegate?.mapViewDidClick(x: point.x, y: point.y, latitude: latlng.lat, longitude: latlng.lng)\n    }\n}\n\n// MARK: - NMFMapViewCameraDelegate\n\nextension BuiltInNaverMapProvider: NMFMapViewCameraDelegate {\n    public func mapView(_ mapView: NMFMapView, cameraWillChangeByReason reason: Int, animated: Bool) {\n        delegate?.mapViewDidTouch(reason: reason, animated: animated)\n    }\n\n    public func mapViewCameraIdle(_ mapView: NMFMapView) {\n        let position = mapView.cameraPosition\n        let cameraPosition = GraniteNaverMapCameraPosition(\n            target: GraniteNaverMapCoordinate(latitude: position.target.lat, longitude: position.target.lng),\n            zoom: position.zoom,\n            tilt: position.tilt,\n            bearing: position.heading\n        )\n        delegate?.mapViewDidChangeCamera(position: cameraPosition)\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/ios/builtinProvider/GraniteNaverMapMarkerData.swift",
    "content": "//\n//  GraniteNaverMapMarkerData.swift\n//  granite-naver-map\n//\n\nimport Foundation\nimport NMapsMap\nimport React\n\nstruct GraniteNaverMapMarkerData {\n    let coordinate: NMGLatLng?\n    let width: CGFloat?\n    let height: CGFloat?\n    let zIndex: Int?\n    let image: String?\n    let rotation: CGFloat?\n    let flat: Bool?\n    let alpha: CGFloat?\n    let pinColor: UIColor?\n\n    init(\n        coordinate: NMGLatLng? = nil,\n        width: CGFloat? = nil,\n        height: CGFloat? = nil,\n        zIndex: Int? = nil,\n        image: String? = nil,\n        rotation: CGFloat? = nil,\n        flat: Bool? = nil,\n        alpha: CGFloat? = nil,\n        pinColor: UIColor? = nil\n    ) {\n        self.coordinate = coordinate\n        self.width = width\n        self.height = height\n        self.zIndex = zIndex\n        self.image = image\n        self.rotation = rotation\n        self.flat = flat\n        self.alpha = alpha\n        self.pinColor = pinColor\n    }\n\n    init(object: [String: Any]) {\n        if let coordinate = object[\"coordinate\"] as? [String: Double],\n           let lat = coordinate[\"latitude\"],\n           let lng = coordinate[\"longitude\"] {\n            self.coordinate = NMGLatLng(lat: lat, lng: lng)\n        } else {\n            self.coordinate = nil\n        }\n\n        self.width = object[\"width\"] as? CGFloat\n        self.height = object[\"height\"] as? CGFloat\n        self.zIndex = object[\"zIndex\"] as? Int\n        self.image = object[\"image\"] as? String\n        self.rotation = object[\"rotation\"] as? CGFloat\n        self.flat = object[\"flat\"] as? Bool\n        self.alpha = object[\"alpha\"] as? CGFloat\n\n        if let pinColor = object[\"pinColor\"] as? Int {\n            self.pinColor = RCTConvert.uiColor(pinColor)\n        } else {\n            self.pinColor = nil\n        }\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/ios/builtinProvider/NMFMarker+Extension.swift",
    "content": "//\n//  NMFMarker+Extension.swift\n//  react-native-toss-naver-map\n//\n\nimport Foundation\nimport NMapsMap\n\nextension NMFMarker {\n\n    func loadImage(from urlString: String) {\n        guard let url = URL(string: urlString) else { return }\n\n        URLSession.shared.dataTask(with: url) { [weak self] data, _, error in\n            guard let data = data,\n                  error == nil,\n                  let image = UIImage(data: data) else {\n                return\n            }\n\n            DispatchQueue.main.async {\n                let overlayImage = NMFOverlayImage(image: image)\n                self?.iconImage = overlayImage\n            }\n        }.resume()\n    }\n\n    func applyMarkerData(_ markerData: GraniteNaverMapMarkerData) {\n        if let coordinate = markerData.coordinate {\n            self.position = coordinate\n        }\n\n        if let width = markerData.width {\n            self.width = width\n        }\n\n        if let height = markerData.height {\n            self.height = height\n        }\n\n        if let zIndex = markerData.zIndex {\n            self.zIndex = zIndex\n        }\n\n        if let imageURL = markerData.image {\n            loadImage(from: imageURL)\n        }\n\n        if let rotation = markerData.rotation {\n            self.angle = rotation\n        }\n\n        if let flat = markerData.flat {\n            self.isFlat = flat\n        }\n\n        if let alpha = markerData.alpha {\n            self.alpha = alpha\n        }\n\n        if let pinColor = markerData.pinColor {\n            self.iconTintColor = pinColor\n        }\n    }\n}\n"
  },
  {
    "path": "packages/naver-map/ios/builtinProvider/RCTConvert+NMFMapView.h",
    "content": "//\n//  RCTConvert+NMFMapView.h\n//  react-native-toss-naver-map\n//\n\n#import <React/RCTConvert.h>\n#import <NMapsMap/NMapsMap.h>\n\n@interface RCTConvert (NMFMapView)\n\n+ (NMFCameraUpdate *)NMFCameraUpdate:(id)json;\n+ (NMFCameraUpdate *)NMFCameraUpdateWith:(id)json;\n+ (NMGLatLng *)NMGLatLng:(id)json;\n+ (NMGLatLngBounds *)NMGLatLngBounds:(id)json;\n+ (NMFAlignType *)NMFAlignType:(id)json;\n\n@end\n"
  },
  {
    "path": "packages/naver-map/ios/builtinProvider/RCTConvert+NMFMapView.m",
    "content": "//\n//  RCTConvert+NMFMapView.m\n//  react-native-toss-naver-map\n//\n\n#import <NMapsMap/NMFCameraUpdate.h>\n#import <NMapsMap/NMFCameraPosition.h>\n#import <NMapsMap/NMFOverlay.h>\n\n#import \"RCTConvert+NMFMapView.h\"\n\n@implementation RCTConvert (NMFMapView)\n\n+ (NMFCameraUpdate *)NMFCameraUpdate:(id)json\n{\n    json = [self NSDictionary:json];\n    return [NMFCameraUpdate cameraUpdateWithScrollTo:NMGLatLngMake([self double:json[@\"latitude\"]], [self double:json[@\"longitude\"]])\n                                              zoomTo:[self double:json[@\"zoom\"]]];\n}\n\n+ (NMFCameraUpdate *)NMFCameraUpdateWith:(id)json\n{\n    NMGLatLng *position = NMGLatLngMake([self double:json[@\"latitude\"]], [self double:json[@\"longitude\"]]);\n    double zoom = [self double:json[@\"zoom\"]];\n    double tilt = [self double:json[@\"tilt\"]];\n    double bearing = [self double:json[@\"bearing\"]];\n\n    NMFCameraPosition *cameraPosition = [NMFCameraPosition cameraPosition:position zoom:zoom tilt:tilt heading:bearing];\n    NMFCameraUpdate *cameraUpdate = [NMFCameraUpdate cameraUpdateWithPosition:cameraPosition];\n    cameraUpdate.animation = NMFCameraUpdateAnimationEaseIn;\n    return cameraUpdate;\n}\n\n+ (NMGLatLng *)NMGLatLng:(id)json\n{\n    json = [self NSDictionary:json];\n    return NMGLatLngMake([self double:json[@\"latitude\"]], [self double:json[@\"longitude\"]]);\n}\n\n+ (NMGLatLngBounds *)NMGLatLngBounds:(id)json\n{\n    json = [self NSDictionary:json];\n    double lat = [self double:json[@\"latitude\"]];\n    double latDelta = [self double:json[@\"latitudeDelta\"]];\n    double lng = [self double:json[@\"longitude\"]];\n    double lngDelta = [self double:json[@\"longitudeDelta\"]];\n    return NMGLatLngBoundsMake(lat - latDelta / 2, lng - lngDelta / 2,  // southwest\n                               lat + latDelta / 2, lng + lngDelta / 2); // northeast\n}\n\n+ (NMFAlignType *)NMFAlignType:(id)json\n{\n    json = [self NSNumber:json];\n    if ([json isEqual:@(0)]) return NMFAlignType.center;\n    if ([json isEqual:@(1)]) return NMFAlignType.left;\n    if ([json isEqual:@(2)]) return NMFAlignType.right;\n    if ([json isEqual:@(3)]) return NMFAlignType.top;\n    if ([json isEqual:@(4)]) return NMFAlignType.bottom;\n    if ([json isEqual:@(5)]) return NMFAlignType.topLeft;\n    if ([json isEqual:@(6)]) return NMFAlignType.topRight;\n    if ([json isEqual:@(7)]) return NMFAlignType.bottomRight;\n    if ([json isEqual:@(8)]) return NMFAlignType.bottomLeft;\n\n    return NMFAlignType.bottom;\n}\n\n@end\n"
  },
  {
    "path": "packages/naver-map/package.json",
    "content": "{\n  \"name\": \"@granite-js/naver-map\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Pluggable Naver Map component for React Native with provider selection\",\n  \"type\": \"module\",\n  \"main\": \"./dist/module/index.js\",\n  \"types\": \"./dist/typescript/index.d.ts\",\n  \"react-native\": \"./src/index.tsx\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/typescript/index.d.ts\",\n      \"react-native\": \"./src/index.tsx\",\n      \"default\": \"./dist/module/index.js\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"src\",\n    \"dist\",\n    \"android\",\n    \"ios\",\n    \"*.podspec\",\n    \"react-native.config.js\",\n    \"!example/**\",\n    \"!ios/build\",\n    \"!android/build\",\n    \"!android/gradle\",\n    \"!android/gradlew\",\n    \"!android/gradlew.bat\",\n    \"!android/local.properties\",\n    \"!**/__tests__\",\n    \"!**/__fixtures__\",\n    \"!**/__mocks__\",\n    \"!**/.*\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"example\": \"yarn workspace @granite-js/naver-map-example\",\n    \"clean\": \"del-cli android/build example/android/build example/android/app/build example/ios/build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"eslint .\",\n    \"build\": \"bob build && tsc --project tsconfig.build.json\"\n  },\n  \"keywords\": [\n    \"react-native\",\n    \"ios\",\n    \"android\",\n    \"naver\",\n    \"map\",\n    \"navermap\",\n    \"korea\",\n    \"pluggable\",\n    \"provider\",\n    \"brownfield\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/naver-map\"\n  },\n  \"author\": \"Toss <platform@toss.im>\",\n  \"homepage\": \"https://github.com/toss/granite/tree/main/packages/naver-map#readme\",\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@types/react\": \"catalog:react-native\",\n    \"del-cli\": \"^6.0.0\",\n    \"eslint\": \"^9.7.0\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"react-native-builder-bob\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\"\n  },\n  \"peerDependencies\": {\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"codegenConfig\": {\n    \"name\": \"GraniteNaverMapViewSpec\",\n    \"type\": \"components\",\n    \"jsSrcsDir\": \"src/specs\",\n    \"android\": {\n      \"javaPackageName\": \"run.granite.navermap\"\n    },\n    \"ios\": {\n      \"componentProvider\": {\n        \"GraniteNaverMapView\": \"GraniteNaverMapView\"\n      }\n    }\n  },\n  \"sideEffects\": false,\n  \"react-native-builder-bob\": {\n    \"source\": \"src\",\n    \"output\": \"dist\",\n    \"targets\": [\n      [\n        \"module\",\n        {\n          \"esm\": true\n        }\n      ]\n    ]\n  }\n}\n"
  },
  {
    "path": "packages/naver-map/src/NaverMapView.tsx",
    "content": "import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { Platform, View, type NativeSyntheticEvent, type StyleProp, type ViewStyle } from 'react-native';\nimport { MapContext } from './internals/context';\nimport type { MarkerEventListeners } from './overlays/Marker';\nimport GraniteNaverMapViewNativeComponent, {\n  OnCameraChangeEvent,\n  OnTouchEvent,\n  OnMapClickEvent,\n  OnMarkerClickEvent,\n} from './specs/GraniteNaverMapViewNativeComponent';\nimport type { Coord } from './types';\n\nexport interface MapViewProps {\n  style?: StyleProp<ViewStyle>;\n  center?: Coord & {\n    zoom?: number;\n    tilt?: number;\n    bearing?: number;\n  };\n  showsMyLocationButton?: boolean;\n  compass?: boolean;\n  scaleBar?: boolean;\n  zoomControl?: boolean;\n  mapType?: number;\n  minZoomLevel?: number;\n  maxZoomLevel?: number;\n  buildingHeight?: number;\n  locationTrackingMode?: number;\n  tilt?: number;\n  bearing?: number;\n  nightMode?: boolean;\n  mapPadding?: {\n    top?: number;\n    left?: number;\n    bottom?: number;\n    right?: number;\n  };\n  scrollGesturesEnabled?: boolean;\n  zoomGesturesEnabled?: boolean;\n  tiltGesturesEnabled?: boolean;\n  rotateGesturesEnabled?: boolean;\n  stopGesturesEnabled?: boolean;\n  onCameraChange?: (event: NativeSyntheticEvent<OnCameraChangeEvent>) => void;\n  onTouch?: (event: NativeSyntheticEvent<OnTouchEvent>) => void;\n  onMapClick?: (event: NativeSyntheticEvent<OnMapClickEvent>) => void;\n  onInitialized?: () => void;\n  children?: React.ReactNode;\n}\n\n/**\n * Avoid View Flattening issue on Android\n */\nconst AvoidViewFlatteningOnAndroid = ({\n  style,\n  children,\n}: {\n  style?: StyleProp<ViewStyle>;\n  children: React.ReactNode;\n}) => {\n  if (Platform.OS === 'android') {\n    return (\n      <View style={style} collapsable={false}>\n        {children}\n      </View>\n    );\n  }\n  return <>{children}</>;\n};\n\nexport function NaverMapView({\n  style,\n  onTouch,\n  onMapClick,\n  onCameraChange,\n  onInitialized,\n  children,\n  center,\n  mapPadding,\n  ...props\n}: MapViewProps) {\n  const mapRef = useRef<React.ElementRef<typeof GraniteNaverMapViewNativeComponent>>(null);\n  const [isReady, setIsReady] = useState(false);\n  const markersRef = useRef<Map<string, MarkerEventListeners>>(new Map());\n\n  const onMarkerClick = useCallback((event: NativeSyntheticEvent<OnMarkerClickEvent>) => {\n    const marker = markersRef.current.get(event.nativeEvent.id);\n    marker?.onPress?.();\n  }, []);\n\n  const handleCameraChange = useCallback(\n    (event: NativeSyntheticEvent<OnCameraChangeEvent>) => {\n      onCameraChange?.(event);\n    },\n    [onCameraChange]\n  );\n\n  const handleTouch = useCallback(\n    (event: NativeSyntheticEvent<OnTouchEvent>) => {\n      onTouch?.(event);\n    },\n    [onTouch]\n  );\n\n  const handleMapClick = useCallback(\n    (event: NativeSyntheticEvent<OnMapClickEvent>) => {\n      onMapClick?.(event);\n    },\n    [onMapClick]\n  );\n\n  const handleInitialized = useCallback(() => {\n    console.log('[NaverMapView] handleInitialized called - setting isReady to true');\n    setIsReady(true);\n    onInitialized?.();\n  }, [onInitialized]);\n\n  const mapContext = useMemo(\n    () => (isReady && mapRef.current ? { mapView: mapRef.current, markers: markersRef.current } : null),\n    [isReady]\n  );\n\n  // Convert center prop to native format\n  const nativeCenter = useMemo(() => {\n    if (!center) {\n      return undefined;\n    }\n    return {\n      latitude: center.latitude,\n      longitude: center.longitude,\n      zoom: center.zoom,\n      tilt: center.tilt,\n      bearing: center.bearing,\n    };\n  }, [center]);\n\n  // Convert mapPadding prop to native format\n  const nativeMapPadding = useMemo(() => {\n    if (!mapPadding) {\n      return undefined;\n    }\n    return {\n      top: mapPadding.top,\n      left: mapPadding.left,\n      bottom: mapPadding.bottom,\n      right: mapPadding.right,\n    };\n  }, [mapPadding]);\n\n  return (\n    <AvoidViewFlatteningOnAndroid style={style}>\n      <MapContext.Provider value={mapContext}>\n        <GraniteNaverMapViewNativeComponent\n          ref={mapRef}\n          style={Platform.OS === 'ios' ? style : { flex: 1 }}\n          {...props}\n          center={nativeCenter}\n          mapPadding={nativeMapPadding}\n          onInitialized={handleInitialized}\n          onMarkerClick={onMarkerClick}\n          onCameraChange={handleCameraChange}\n          onTouch={handleTouch}\n          onMapClick={handleMapClick}\n        />\n        {children}\n      </MapContext.Provider>\n    </AvoidViewFlatteningOnAndroid>\n  );\n}\n"
  },
  {
    "path": "packages/naver-map/src/index.tsx",
    "content": "export * from './overlays';\nexport * from './NaverMapView';\nexport * from './types';\n"
  },
  {
    "path": "packages/naver-map/src/internals/colorUtils.ts",
    "content": "function normalizeColor(color: string | number): number | null {\n  if (typeof color === 'number') {\n    if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n      return color;\n    }\n    return null;\n  }\n\n  if (typeof color !== 'string') {\n    return null;\n  }\n\n  const matchers = getMatchers();\n  let match;\n\n  // Ordered based on occurrences on Facebook codebase\n  if ((match = matchers.hex6.exec(color))) {\n    return parseInt(match[1] + 'ff', 16) >>> 0;\n  }\n\n  const colorFromKeyword = normalizeKeyword(color);\n  if (colorFromKeyword != null) {\n    return colorFromKeyword;\n  }\n\n  if ((match = matchers.rgba.exec(color) || matchers.rgb.exec(color))) {\n    // rgb(R G B / A) / rgba(R G B / A) notation\n    if (match[9] !== undefined && match[10] !== undefined && match[11] !== undefined && match[12] !== undefined) {\n      return (\n        ((parse255(match[9]) << 24) | // r\n          (parse255(match[10]) << 16) | // g\n          (parse255(match[11]) << 8) | // b\n          parse1(match[12])) >>> // a\n        0\n      );\n    }\n    // rgb(R, G, B, A) / rgba(R, G, B, A) notation\n    else if (match[5] !== undefined && match[6] !== undefined && match[7] !== undefined && match[8] !== undefined) {\n      return (\n        ((parse255(match[5]) << 24) | // r\n          (parse255(match[6]) << 16) | // g\n          (parse255(match[7]) << 8) | // b\n          parse1(match[8])) >>> // a\n        0\n      );\n    }\n    // rgb(R, G, B) / rgba(R, G, B) notation\n    if (match[2] === undefined || match[3] === undefined || match[4] === undefined) {\n      return null;\n    }\n    return (\n      ((parse255(match[2]) << 24) | // r\n        (parse255(match[3]) << 16) | // g\n        (parse255(match[4]) << 8) | // b\n        0x000000ff) >>> // a\n      0\n    );\n  }\n\n  if ((match = matchers.hex3.exec(color))) {\n    if (match[1] === undefined || match[2] === undefined || match[3] === undefined) {\n      return null;\n    }\n    return (\n      parseInt(\n        match[1] +\n          match[1] + // r\n          match[2] +\n          match[2] + // g\n          match[3] +\n          match[3] + // b\n          'ff', // a\n        16\n      ) >>> 0\n    );\n  }\n\n  // https://drafts.csswg.org/css-color-4/#hex-notation\n  if ((match = matchers.hex8.exec(color))) {\n    if (match[1] === undefined) {\n      return null;\n    }\n    return parseInt(match[1], 16) >>> 0;\n  }\n\n  if ((match = matchers.hex4.exec(color))) {\n    if (match[1] === undefined || match[2] === undefined || match[3] === undefined || match[4] === undefined) {\n      return null;\n    }\n    return (\n      parseInt(\n        match[1] +\n          match[1] + // r\n          match[2] +\n          match[2] + // g\n          match[3] +\n          match[3] + // b\n          match[4] +\n          match[4], // a\n        16\n      ) >>> 0\n    );\n  }\n\n  if ((match = matchers.hsl.exec(color))) {\n    if (match[1] === undefined || match[2] === undefined || match[3] === undefined) {\n      return null;\n    }\n    return (\n      (hslToRgb(\n        parse360(match[1]), // h\n        parsePercentage(match[2]), // s\n        parsePercentage(match[3]) // l\n      ) |\n        0x000000ff) >>> // a\n      0\n    );\n  }\n\n  if ((match = matchers.hsla.exec(color))) {\n    // hsla(H S L / A) notation\n    if (match[6] !== undefined && match[7] !== undefined && match[8] !== undefined && match[9] !== undefined) {\n      return (\n        (hslToRgb(\n          parse360(match[6]), // h\n          parsePercentage(match[7]), // s\n          parsePercentage(match[8]) // l\n        ) |\n          parse1(match[9])) >>> // a\n        0\n      );\n    }\n\n    // hsla(H, S, L, A) notation\n    if (match[2] === undefined || match[3] === undefined || match[4] === undefined || match[5] === undefined) {\n      return null;\n    }\n    return (\n      (hslToRgb(\n        parse360(match[2]), // h\n        parsePercentage(match[3]), // s\n        parsePercentage(match[4]) // l\n      ) |\n        parse1(match[5])) >>> // a\n      0\n    );\n  }\n\n  if ((match = matchers.hwb.exec(color))) {\n    if (match[5] !== undefined && match[6] !== undefined && match[7] !== undefined && match[8] !== undefined) {\n      // hwb(H W B / A) notation\n      return (\n        (hwbToRgb(\n          parse360(match[5]), // h\n          parsePercentage(match[6]), // w\n          parsePercentage(match[7]) // b\n        ) |\n          parse1(match[8])) >>> // a\n        0\n      );\n    }\n    // hwb(H W B) notation\n    if (match[2] === undefined || match[3] === undefined || match[4] === undefined) {\n      return null;\n    }\n    return (\n      (hwbToRgb(\n        parse360(match[2]), // h\n        parsePercentage(match[3]), // w\n        parsePercentage(match[4]) // b\n      ) |\n        0x000000ff) >>> // a\n      0\n    );\n  }\n\n  return null;\n}\n\nfunction hue2rgb(p: number, q: number, t: number): number {\n  if (t < 0) {\n    t += 1;\n  }\n  if (t > 1) {\n    t -= 1;\n  }\n  if (t < 1 / 6) {\n    return p + (q - p) * 6 * t;\n  }\n  if (t < 1 / 2) {\n    return q;\n  }\n  if (t < 2 / 3) {\n    return p + (q - p) * (2 / 3 - t) * 6;\n  }\n  return p;\n}\n\nfunction hslToRgb(h: number, s: number, l: number): number {\n  const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n  const p = 2 * l - q;\n  const r = hue2rgb(p, q, h + 1 / 3);\n  const g = hue2rgb(p, q, h);\n  const b = hue2rgb(p, q, h - 1 / 3);\n\n  return (Math.round(r * 255) << 24) | (Math.round(g * 255) << 16) | (Math.round(b * 255) << 8);\n}\n\nfunction hwbToRgb(h: number, w: number, b: number): number {\n  if (w + b >= 1) {\n    const gray = Math.round((w * 255) / (w + b));\n\n    return (gray << 24) | (gray << 16) | (gray << 8);\n  }\n\n  const red = hue2rgb(0, 1, h + 1 / 3) * (1 - w - b) + w;\n  const green = hue2rgb(0, 1, h) * (1 - w - b) + w;\n  const blue = hue2rgb(0, 1, h - 1 / 3) * (1 - w - b) + w;\n\n  return (Math.round(red * 255) << 24) | (Math.round(green * 255) << 16) | (Math.round(blue * 255) << 8);\n}\n\nconst NUMBER = '[-+]?\\\\d*\\\\.?\\\\d+';\nconst PERCENTAGE = NUMBER + '%';\n\nfunction call(...args: string[]): string {\n  return '\\\\(\\\\s*(' + args.join(')\\\\s*,?\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nfunction callModern(...args: string[]): string {\n  return '\\\\(\\\\s*(' + args.join(')\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nfunction callWithSlashSeparator(...args: string[]): string {\n  return (\n    '\\\\(\\\\s*(' +\n    args.slice(0, args.length - 1).join(')\\\\s*,?\\\\s*(') +\n    ')\\\\s*/\\\\s*(' +\n    args[args.length - 1] +\n    ')\\\\s*\\\\)'\n  );\n}\n\nfunction commaSeparatedCall(...args: string[]): string {\n  return '\\\\(\\\\s*(' + args.join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nlet cachedMatchers: {\n  rgb: RegExp;\n  rgba: RegExp;\n  hsl: RegExp;\n  hsla: RegExp;\n  hwb: RegExp;\n  hex3: RegExp;\n  hex4: RegExp;\n  hex6: RegExp;\n  hex8: RegExp;\n};\n\nfunction getMatchers(): typeof cachedMatchers {\n  if (cachedMatchers === undefined) {\n    const rgbRegexPattern =\n      call(NUMBER, NUMBER, NUMBER) +\n      '|' +\n      commaSeparatedCall(NUMBER, NUMBER, NUMBER, NUMBER) +\n      '|' +\n      callWithSlashSeparator(NUMBER, NUMBER, NUMBER, NUMBER);\n\n    cachedMatchers = {\n      rgb: new RegExp('rgb(' + rgbRegexPattern + ')'),\n      rgba: new RegExp('rgba(' + rgbRegexPattern + ')'),\n      hsl: new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n      hsla: new RegExp(\n        'hsla(' +\n          commaSeparatedCall(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +\n          '|' +\n          callWithSlashSeparator(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +\n          ')'\n      ),\n      hwb: new RegExp(\n        'hwb(' +\n          callModern(NUMBER, PERCENTAGE, PERCENTAGE) +\n          '|' +\n          callWithSlashSeparator(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +\n          ')'\n      ),\n      hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n      hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n      hex6: /^#([0-9a-fA-F]{6})$/,\n      hex8: /^#([0-9a-fA-F]{8})$/,\n    };\n  }\n  return cachedMatchers;\n}\n\nfunction parse255(str: string): number {\n  const int = parseInt(str, 10);\n  if (int < 0) {\n    return 0;\n  }\n  if (int > 255) {\n    return 255;\n  }\n  return int;\n}\n\nfunction parse360(str: string): number {\n  const int = parseFloat(str);\n  return (((int % 360) + 360) % 360) / 360;\n}\n\nfunction parse1(str: string): number {\n  const num = parseFloat(str);\n  if (num < 0) {\n    return 0;\n  }\n  if (num > 1) {\n    return 255;\n  }\n  return Math.round(num * 255);\n}\n\nfunction parsePercentage(str: string): number {\n  // parseFloat conveniently ignores the final %\n  const int = parseFloat(str);\n  if (int < 0) {\n    return 0;\n  }\n  if (int > 100) {\n    return 1;\n  }\n  return int / 100;\n}\n\nfunction normalizeKeyword(name: string): number | null {\n  switch (name) {\n    case 'transparent':\n      return 0x00000000;\n    // http://www.w3.org/TR/css3-color/#svg-color\n    case 'aliceblue':\n      return 0xf0f8ffff;\n    case 'antiquewhite':\n      return 0xfaebd7ff;\n    case 'aqua':\n      return 0x00ffffff;\n    case 'aquamarine':\n      return 0x7fffd4ff;\n    case 'azure':\n      return 0xf0ffffff;\n    case 'beige':\n      return 0xf5f5dcff;\n    case 'bisque':\n      return 0xffe4c4ff;\n    case 'black':\n      return 0x000000ff;\n    case 'blanchedalmond':\n      return 0xffebcdff;\n    case 'blue':\n      return 0x0000ffff;\n    case 'blueviolet':\n      return 0x8a2be2ff;\n    case 'brown':\n      return 0xa52a2aff;\n    case 'burlywood':\n      return 0xdeb887ff;\n    case 'burntsienna':\n      return 0xea7e5dff;\n    case 'cadetblue':\n      return 0x5f9ea0ff;\n    case 'chartreuse':\n      return 0x7fff00ff;\n    case 'chocolate':\n      return 0xd2691eff;\n    case 'coral':\n      return 0xff7f50ff;\n    case 'cornflowerblue':\n      return 0x6495edff;\n    case 'cornsilk':\n      return 0xfff8dcff;\n    case 'crimson':\n      return 0xdc143cff;\n    case 'cyan':\n      return 0x00ffffff;\n    case 'darkblue':\n      return 0x00008bff;\n    case 'darkcyan':\n      return 0x008b8bff;\n    case 'darkgoldenrod':\n      return 0xb8860bff;\n    case 'darkgray':\n      return 0xa9a9a9ff;\n    case 'darkgreen':\n      return 0x006400ff;\n    case 'darkgrey':\n      return 0xa9a9a9ff;\n    case 'darkkhaki':\n      return 0xbdb76bff;\n    case 'darkmagenta':\n      return 0x8b008bff;\n    case 'darkolivegreen':\n      return 0x556b2fff;\n    case 'darkorange':\n      return 0xff8c00ff;\n    case 'darkorchid':\n      return 0x9932ccff;\n    case 'darkred':\n      return 0x8b0000ff;\n    case 'darksalmon':\n      return 0xe9967aff;\n    case 'darkseagreen':\n      return 0x8fbc8fff;\n    case 'darkslateblue':\n      return 0x483d8bff;\n    case 'darkslategray':\n      return 0x2f4f4fff;\n    case 'darkslategrey':\n      return 0x2f4f4fff;\n    case 'darkturquoise':\n      return 0x00ced1ff;\n    case 'darkviolet':\n      return 0x9400d3ff;\n    case 'deeppink':\n      return 0xff1493ff;\n    case 'deepskyblue':\n      return 0x00bfffff;\n    case 'dimgray':\n      return 0x696969ff;\n    case 'dimgrey':\n      return 0x696969ff;\n    case 'dodgerblue':\n      return 0x1e90ffff;\n    case 'firebrick':\n      return 0xb22222ff;\n    case 'floralwhite':\n      return 0xfffaf0ff;\n    case 'forestgreen':\n      return 0x228b22ff;\n    case 'fuchsia':\n      return 0xff00ffff;\n    case 'gainsboro':\n      return 0xdcdcdcff;\n    case 'ghostwhite':\n      return 0xf8f8ffff;\n    case 'gold':\n      return 0xffd700ff;\n    case 'goldenrod':\n      return 0xdaa520ff;\n    case 'gray':\n      return 0x808080ff;\n    case 'green':\n      return 0x008000ff;\n    case 'greenyellow':\n      return 0xadff2fff;\n    case 'grey':\n      return 0x808080ff;\n    case 'honeydew':\n      return 0xf0fff0ff;\n    case 'hotpink':\n      return 0xff69b4ff;\n    case 'indianred':\n      return 0xcd5c5cff;\n    case 'indigo':\n      return 0x4b0082ff;\n    case 'ivory':\n      return 0xfffff0ff;\n    case 'khaki':\n      return 0xf0e68cff;\n    case 'lavender':\n      return 0xe6e6faff;\n    case 'lavenderblush':\n      return 0xfff0f5ff;\n    case 'lawngreen':\n      return 0x7cfc00ff;\n    case 'lemonchiffon':\n      return 0xfffacdff;\n    case 'lightblue':\n      return 0xadd8e6ff;\n    case 'lightcoral':\n      return 0xf08080ff;\n    case 'lightcyan':\n      return 0xe0ffffff;\n    case 'lightgoldenrodyellow':\n      return 0xfafad2ff;\n    case 'lightgray':\n      return 0xd3d3d3ff;\n    case 'lightgreen':\n      return 0x90ee90ff;\n    case 'lightgrey':\n      return 0xd3d3d3ff;\n    case 'lightpink':\n      return 0xffb6c1ff;\n    case 'lightsalmon':\n      return 0xffa07aff;\n    case 'lightseagreen':\n      return 0x20b2aaff;\n    case 'lightskyblue':\n      return 0x87cefaff;\n    case 'lightslategray':\n      return 0x778899ff;\n    case 'lightslategrey':\n      return 0x778899ff;\n    case 'lightsteelblue':\n      return 0xb0c4deff;\n    case 'lightyellow':\n      return 0xffffe0ff;\n    case 'lime':\n      return 0x00ff00ff;\n    case 'limegreen':\n      return 0x32cd32ff;\n    case 'linen':\n      return 0xfaf0e6ff;\n    case 'magenta':\n      return 0xff00ffff;\n    case 'maroon':\n      return 0x800000ff;\n    case 'mediumaquamarine':\n      return 0x66cdaaff;\n    case 'mediumblue':\n      return 0x0000cdff;\n    case 'mediumorchid':\n      return 0xba55d3ff;\n    case 'mediumpurple':\n      return 0x9370dbff;\n    case 'mediumseagreen':\n      return 0x3cb371ff;\n    case 'mediumslateblue':\n      return 0x7b68eeff;\n    case 'mediumspringgreen':\n      return 0x00fa9aff;\n    case 'mediumturquoise':\n      return 0x48d1ccff;\n    case 'mediumvioletred':\n      return 0xc71585ff;\n    case 'midnightblue':\n      return 0x191970ff;\n    case 'mintcream':\n      return 0xf5fffaff;\n    case 'mistyrose':\n      return 0xffe4e1ff;\n    case 'moccasin':\n      return 0xffe4b5ff;\n    case 'navajowhite':\n      return 0xffdeadff;\n    case 'navy':\n      return 0x000080ff;\n    case 'oldlace':\n      return 0xfdf5e6ff;\n    case 'olive':\n      return 0x808000ff;\n    case 'olivedrab':\n      return 0x6b8e23ff;\n    case 'orange':\n      return 0xffa500ff;\n    case 'orangered':\n      return 0xff4500ff;\n    case 'orchid':\n      return 0xda70d6ff;\n    case 'palegoldenrod':\n      return 0xeee8aaff;\n    case 'palegreen':\n      return 0x98fb98ff;\n    case 'paleturquoise':\n      return 0xafeeeeff;\n    case 'palevioletred':\n      return 0xdb7093ff;\n    case 'papayawhip':\n      return 0xffefd5ff;\n    case 'peachpuff':\n      return 0xffdab9ff;\n    case 'peru':\n      return 0xcd853fff;\n    case 'pink':\n      return 0xffc0cbff;\n    case 'plum':\n      return 0xdda0ddff;\n    case 'powderblue':\n      return 0xb0e0e6ff;\n    case 'purple':\n      return 0x800080ff;\n    case 'rebeccapurple':\n      return 0x663399ff;\n    case 'red':\n      return 0xff0000ff;\n    case 'rosybrown':\n      return 0xbc8f8fff;\n    case 'royalblue':\n      return 0x4169e1ff;\n    case 'saddlebrown':\n      return 0x8b4513ff;\n    case 'salmon':\n      return 0xfa8072ff;\n    case 'sandybrown':\n      return 0xf4a460ff;\n    case 'seagreen':\n      return 0x2e8b57ff;\n    case 'seashell':\n      return 0xfff5eeff;\n    case 'sienna':\n      return 0xa0522dff;\n    case 'silver':\n      return 0xc0c0c0ff;\n    case 'skyblue':\n      return 0x87ceebff;\n    case 'slateblue':\n      return 0x6a5acdff;\n    case 'slategray':\n      return 0x708090ff;\n    case 'slategrey':\n      return 0x708090ff;\n    case 'snow':\n      return 0xfffafaff;\n    case 'springgreen':\n      return 0x00ff7fff;\n    case 'steelblue':\n      return 0x4682b4ff;\n    case 'tan':\n      return 0xd2b48cff;\n    case 'teal':\n      return 0x008080ff;\n    case 'thistle':\n      return 0xd8bfd8ff;\n    case 'tomato':\n      return 0xff6347ff;\n    case 'turquoise':\n      return 0x40e0d0ff;\n    case 'violet':\n      return 0xee82eeff;\n    case 'wheat':\n      return 0xf5deb3ff;\n    case 'white':\n      return 0xffffffff;\n    case 'whitesmoke':\n      return 0xf5f5f5ff;\n    case 'yellow':\n      return 0xffff00ff;\n    case 'yellowgreen':\n      return 0x9acd32ff;\n  }\n  return null;\n}\n\n// Convert RRGGBBAA (normalizeColor output) to AARRGGBB (Android format)\nexport const rgbaToArgb = (rgba: number): number => {\n  const r = (rgba >>> 24) & 0xff;\n  const g = (rgba >>> 16) & 0xff;\n  const b = (rgba >>> 8) & 0xff;\n  const a = rgba & 0xff;\n  return ((a << 24) | (r << 16) | (g << 8) | b) >>> 0;\n};\n\n// Convert unsigned color to signed Int32 (for Codegen compatibility)\nexport const toSignedInt32 = (n: number): number => (n > 0x7fffffff ? n - 0x100000000 : n);\n\n// Process color from normalizeColor output (RRGGBBAA -> AARRGGBB -> signed Int32)\nexport const processColor = (\n  color: number | null | undefined,\n  defaultColor = 0xff000000ff // Default: opaque black in RRGGBBAA\n): number => {\n  const rgba = typeof color === 'number' ? color : defaultColor;\n  const argb = rgbaToArgb(rgba);\n  return toSignedInt32(argb);\n};\n\n// Process color that's already in AARRGGBB format (just convert to signed Int32)\nexport const processArgbColor = (\n  color: number | null | undefined,\n  defaultColor = 0xff000000 // Default: opaque black in AARRGGBB\n): number => {\n  const argb = typeof color === 'number' ? color : defaultColor;\n  return toSignedInt32(argb);\n};\n\n/**\n * Process raw color input from user (handles both string and number inputs)\n * - String colors (e.g., \"#FF0000\", \"red\") → normalize → RRGGBBAA → convert to AARRGGBB → signed\n * - Number colors (e.g., 0xFFFF0000) → assume AARRGGBB → just convert to signed\n */\nexport const processColorInput = (\n  color: number | string | null | undefined,\n  defaultColorArgb = 0xff000000 // Default in AARRGGBB format\n): number => {\n  if (color == null) {\n    return toSignedInt32(defaultColorArgb);\n  }\n\n  if (typeof color === 'string') {\n    const normalized = normalizeColor(color);\n    if (normalized == null) {\n      return toSignedInt32(defaultColorArgb);\n    }\n    const argb = rgbaToArgb(normalized);\n    return toSignedInt32(argb);\n  }\n\n  // Number color - assume already in AARRGGBB format\n  return toSignedInt32(color);\n};\n"
  },
  {
    "path": "packages/naver-map/src/internals/context.ts",
    "content": "import { createContext, useContext } from 'react';\nimport type { View } from 'react-native';\nimport type { MarkerEventListeners } from '../overlays/Marker';\n\nexport interface MapContextValue {\n  readonly mapView: View;\n  markers: Map<string, MarkerEventListeners>;\n}\n\nexport const MapContext = createContext<MapContextValue | null>(null);\n\nexport function useMapContext() {\n  return useContext(MapContext);\n}\n"
  },
  {
    "path": "packages/naver-map/src/internals/id.ts",
    "content": "import { useState } from 'react';\n\nfunction generateId() {\n  return Math.random().toString(36).substring(2) + Date.now().toString(36);\n}\n\nexport function useOverlayId() {\n  return useState(generateId)[0];\n}\n"
  },
  {
    "path": "packages/naver-map/src/internals/useMapOverlay.ts",
    "content": "import { useEffect, useLayoutEffect } from 'react';\nimport type { View } from 'react-native';\nimport { type MapContextValue, useMapContext } from './context';\nimport { useOverlayId } from './id';\n\ninterface MapOverlayProps<EventListeners, Props> {\n  registrySelector: (c: MapContextValue) => Map<string, Partial<EventListeners>>;\n  methods: MapOverlayMethods<Props>;\n  props: Props;\n  eventListeners: Partial<EventListeners>;\n}\n\ninterface MapOverlayMethods<Props> {\n  add: (v: View, id: string, args: Props) => void;\n  update: (v: View, id: string, args: Props) => void;\n  remove: (v: View, id: string) => void;\n}\n\nexport function useMapOverlay<EventListeners, Props>({\n  props,\n  eventListeners,\n  methods,\n  registrySelector,\n}: MapOverlayProps<EventListeners, Props>) {\n  const id = useOverlayId();\n  const mapContext = useMapContext();\n\n  useEffect(() => {\n    if (!mapContext) {\n      return;\n    }\n\n    const registry = registrySelector(mapContext);\n    registry.set(id, eventListeners);\n    return () => {\n      registry.delete(id);\n    };\n  }, [id, mapContext, registrySelector, eventListeners]);\n\n  useLayoutEffect(() => {\n    console.log('[useMapOverlay] useLayoutEffect - mapContext:', mapContext ? 'exists' : 'null', 'id:', id);\n    if (!mapContext) {\n      return;\n    }\n\n    const { mapView } = mapContext;\n    console.log('[useMapOverlay] calling methods.add for id:', id);\n    methods.add(mapView, id, props);\n    return () => methods.remove(mapView, id);\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [id, mapContext, methods]);\n\n  useLayoutEffect(() => {\n    if (!mapContext) {\n      return;\n    }\n    methods.update(mapContext.mapView, id, props);\n  }, [id, mapContext, methods, props]);\n}\n"
  },
  {
    "path": "packages/naver-map/src/internals/usePreservedReference.ts",
    "content": "import { useRef } from 'react';\n\n/**\n * Returns a memoized reference that only changes when the object's content changes.\n * This is useful for preventing unnecessary re-renders when object references change\n * but the content remains the same.\n */\nexport function usePreservedReference<T>(value: T): T {\n  const ref = useRef<T>(value);\n\n  if (!shallowEqual(ref.current, value)) {\n    ref.current = value;\n  }\n\n  return ref.current;\n}\n\nfunction shallowEqual<T>(a: T, b: T): boolean {\n  if (a === b) {\n    return true;\n  }\n\n  if (typeof a !== 'object' || typeof b !== 'object' || a === null || b === null) {\n    return false;\n  }\n\n  const keysA = Object.keys(a) as (keyof T)[];\n  const keysB = Object.keys(b) as (keyof T)[];\n\n  if (keysA.length !== keysB.length) {\n    return false;\n  }\n\n  for (const key of keysA) {\n    if (a[key] !== b[key]) {\n      return false;\n    }\n  }\n\n  return true;\n}\n"
  },
  {
    "path": "packages/naver-map/src/overlays/ArrowheadPath.ts",
    "content": "import { type View } from 'react-native';\nimport { processColorInput } from '../internals/colorUtils';\nimport { useMapOverlay } from '../internals/useMapOverlay';\nimport { usePreservedReference } from '../internals/usePreservedReference';\nimport { Commands } from '../specs/GraniteNaverMapViewNativeComponent';\nimport type { Coord } from '../types/Coord';\n\nexport interface ArrowheadPathProps {\n  coordinates: Coord[];\n  color?: number | string;\n  outlineColor?: number | string;\n  width?: number;\n  outlineWidth?: number;\n  headSizeRatio?: number;\n  zIndex?: number;\n}\n\nconst add = (v: View, id: string, args: ArrowheadPathProps) => {\n  const color = processColorInput(args.color, 0xff000000);\n  const outlineColor = processColorInput(args.outlineColor, 0xffffffff);\n  const coordsJson = JSON.stringify(args.coordinates);\n\n  Commands.addArrowheadPath(\n    v as any,\n    id,\n    coordsJson,\n    args.width ?? 5,\n    args.outlineWidth ?? 1,\n    color,\n    outlineColor,\n    args.headSizeRatio ?? 3,\n    args.zIndex ?? 0\n  );\n};\n\nconst update = (v: View, id: string, args: ArrowheadPathProps) => {\n  const color = processColorInput(args.color, 0xff000000);\n  const outlineColor = processColorInput(args.outlineColor, 0xffffffff);\n  const coordsJson = JSON.stringify(args.coordinates);\n\n  Commands.updateArrowheadPath(\n    v as any,\n    id,\n    coordsJson,\n    args.width ?? 5,\n    args.outlineWidth ?? 1,\n    color,\n    outlineColor,\n    args.headSizeRatio ?? 3,\n    args.zIndex ?? 0\n  );\n};\n\nconst remove = (v: View, id: string) => {\n  Commands.removeArrowheadPath(v as any, id);\n};\n\nconst methods = { add, update, remove };\n\nexport function ArrowheadPath(props: ArrowheadPathProps) {\n  const preserved = usePreservedReference(props);\n\n  useMapOverlay<object, ArrowheadPathProps>({\n    registrySelector: (c) => c.markers,\n    methods,\n    props: preserved,\n    eventListeners: {},\n  });\n\n  return null;\n}\n"
  },
  {
    "path": "packages/naver-map/src/overlays/Circle.ts",
    "content": "import { type View } from 'react-native';\nimport { processColorInput } from '../internals/colorUtils';\nimport { useMapOverlay } from '../internals/useMapOverlay';\nimport { usePreservedReference } from '../internals/usePreservedReference';\nimport { Commands } from '../specs/GraniteNaverMapViewNativeComponent';\nimport type { Coord } from '../types/Coord';\n\nexport interface CircleProps {\n  center: Coord;\n  radius: number;\n  fillColor?: number | string;\n  strokeColor?: number | string;\n  strokeWidth?: number;\n  zIndex?: number;\n}\n\nconst add = (v: View, id: string, args: CircleProps) => {\n  const fillColor = processColorInput(args.fillColor, 0x80000000);\n  const strokeColor = processColorInput(args.strokeColor, 0xff000000);\n\n  Commands.addCircle(\n    v as any,\n    id,\n    args.center.latitude,\n    args.center.longitude,\n    args.radius,\n    fillColor,\n    strokeColor,\n    args.strokeWidth ?? 0,\n    args.zIndex ?? 0\n  );\n};\n\nconst update = (v: View, id: string, args: CircleProps) => {\n  const fillColor = processColorInput(args.fillColor, 0x80000000);\n  const strokeColor = processColorInput(args.strokeColor, 0xff000000);\n\n  Commands.updateCircle(\n    v as any,\n    id,\n    args.center.latitude,\n    args.center.longitude,\n    args.radius,\n    fillColor,\n    strokeColor,\n    args.strokeWidth ?? 0,\n    args.zIndex ?? 0\n  );\n};\n\nconst remove = (v: View, id: string) => {\n  Commands.removeCircle(v as any, id);\n};\n\nconst methods = { add, update, remove };\n\nexport function Circle(props: CircleProps) {\n  const preserved = usePreservedReference(props);\n\n  useMapOverlay<object, CircleProps>({\n    registrySelector: (c) => c.markers,\n    methods,\n    props: preserved,\n    eventListeners: {},\n  });\n\n  return null;\n}\n"
  },
  {
    "path": "packages/naver-map/src/overlays/GroundOverlay.ts",
    "content": "import { type View } from 'react-native';\nimport { useMapOverlay } from '../internals/useMapOverlay';\nimport { usePreservedReference } from '../internals/usePreservedReference';\nimport { Commands } from '../specs/GraniteNaverMapViewNativeComponent';\nimport type { Coord } from '../types/Coord';\n\nexport interface GroundOverlayProps {\n  bounds: {\n    northEast: Coord;\n    southWest: Coord;\n  };\n  image: string;\n  alpha?: number;\n  zIndex?: number;\n}\n\nconst add = (v: View, id: string, args: GroundOverlayProps) => {\n  Commands.addGroundOverlay(\n    v as any,\n    id,\n    args.bounds.southWest.latitude,\n    args.bounds.southWest.longitude,\n    args.bounds.northEast.latitude,\n    args.bounds.northEast.longitude,\n    args.image,\n    args.alpha ?? 1,\n    args.zIndex ?? 0\n  );\n};\n\nconst update = (v: View, id: string, args: GroundOverlayProps) => {\n  Commands.updateGroundOverlay(\n    v as any,\n    id,\n    args.bounds.southWest.latitude,\n    args.bounds.southWest.longitude,\n    args.bounds.northEast.latitude,\n    args.bounds.northEast.longitude,\n    args.image,\n    args.alpha ?? 1,\n    args.zIndex ?? 0\n  );\n};\n\nconst remove = (v: View, id: string) => {\n  Commands.removeGroundOverlay(v as any, id);\n};\n\nconst methods = { add, update, remove };\n\nexport function GroundOverlay(props: GroundOverlayProps) {\n  const preserved = usePreservedReference(props);\n\n  useMapOverlay<object, GroundOverlayProps>({\n    registrySelector: (c) => c.markers,\n    methods,\n    props: preserved,\n    eventListeners: {},\n  });\n\n  return null;\n}\n"
  },
  {
    "path": "packages/naver-map/src/overlays/InfoWindow.ts",
    "content": "import { type View } from 'react-native';\nimport { useMapOverlay } from '../internals/useMapOverlay';\nimport { usePreservedReference } from '../internals/usePreservedReference';\nimport { Commands } from '../specs/GraniteNaverMapViewNativeComponent';\nimport type { Coord } from '../types/Coord';\n\nexport interface InfoWindowProps {\n  coordinate: Coord;\n  text: string;\n  alpha?: number;\n  zIndex?: number;\n  offsetX?: number;\n  offsetY?: number;\n  onPress?: () => void;\n}\n\nexport interface InfoWindowEventListeners {\n  onPress?: () => void;\n}\n\nconst add = (v: View, id: string, args: InfoWindowProps) => {\n  Commands.addInfoWindow(\n    v as any,\n    id,\n    args.coordinate.latitude,\n    args.coordinate.longitude,\n    args.text,\n    args.alpha ?? 1,\n    args.zIndex ?? 0,\n    args.offsetX ?? 0,\n    args.offsetY ?? 0\n  );\n};\n\nconst update = (v: View, id: string, args: InfoWindowProps) => {\n  Commands.updateInfoWindow(\n    v as any,\n    id,\n    args.coordinate.latitude,\n    args.coordinate.longitude,\n    args.text,\n    args.alpha ?? 1,\n    args.zIndex ?? 0,\n    args.offsetX ?? 0,\n    args.offsetY ?? 0\n  );\n};\n\nconst remove = (v: View, id: string) => {\n  Commands.removeInfoWindow(v as any, id);\n};\n\nconst methods = { add, update, remove };\n\nexport function InfoWindow(props: InfoWindowProps) {\n  const preserved = usePreservedReference(props);\n\n  useMapOverlay<InfoWindowEventListeners, InfoWindowProps>({\n    registrySelector: (c) => c.markers,\n    methods,\n    props: preserved,\n    eventListeners: {\n      onPress: props.onPress,\n    },\n  });\n\n  return null;\n}\n"
  },
  {
    "path": "packages/naver-map/src/overlays/Marker.ts",
    "content": "import { type View } from 'react-native';\nimport { processColorInput } from '../internals/colorUtils';\nimport { useMapOverlay } from '../internals/useMapOverlay';\nimport { usePreservedReference } from '../internals/usePreservedReference';\nimport { Commands } from '../specs/GraniteNaverMapViewNativeComponent';\nimport type { Coord } from '../types/Coord';\n\nexport interface MarkerProps extends MarkerEventListeners {\n  coordinate: Coord;\n  pinColor?: number | string;\n  image?: string;\n  rotation?: number;\n  flat?: boolean;\n  width?: number;\n  height?: number;\n  alpha?: number;\n  zIndex?: number;\n}\n\nexport interface MarkerEventListeners {\n  onPress?: () => void;\n}\n\nconst add = (v: View, id: string, args: MarkerProps) => {\n  // pinColor: 0 means use default icon, otherwise process the color\n  const pinColor = args.pinColor != null ? processColorInput(args.pinColor, 0) : 0;\n\n  Commands.addMarker(\n    v as any,\n    id,\n    args.coordinate.latitude,\n    args.coordinate.longitude,\n    args.width ?? 0,\n    args.height ?? 0,\n    args.zIndex ?? 0,\n    args.rotation ?? 0,\n    args.flat ?? false,\n    args.alpha ?? 1,\n    pinColor,\n    args.image ?? ''\n  );\n};\n\nconst update = (v: View, id: string, args: MarkerProps) => {\n  // pinColor: 0 means use default icon, otherwise process the color\n  const pinColor = args.pinColor != null ? processColorInput(args.pinColor, 0) : 0;\n\n  Commands.updateMarker(\n    v as any,\n    id,\n    args.coordinate.latitude,\n    args.coordinate.longitude,\n    args.width ?? 0,\n    args.height ?? 0,\n    args.zIndex ?? 0,\n    args.rotation ?? 0,\n    args.flat ?? false,\n    args.alpha ?? 1,\n    pinColor,\n    args.image ?? ''\n  );\n};\n\nconst remove = (v: View, id: string) => {\n  Commands.removeMarker(v as any, id);\n};\n\nconst methods = { add, update, remove };\n\nexport function Marker(props: MarkerProps) {\n  const preserved = usePreservedReference(props);\n\n  useMapOverlay<MarkerEventListeners, MarkerProps>({\n    registrySelector: (c) => c.markers,\n    methods,\n    props: preserved,\n    eventListeners: {\n      onPress: props.onPress,\n    },\n  });\n\n  return null;\n}\n"
  },
  {
    "path": "packages/naver-map/src/overlays/Path.ts",
    "content": "import { type View } from 'react-native';\nimport { processColorInput } from '../internals/colorUtils';\nimport { useMapOverlay } from '../internals/useMapOverlay';\nimport { usePreservedReference } from '../internals/usePreservedReference';\nimport { Commands } from '../specs/GraniteNaverMapViewNativeComponent';\nimport type { Coord } from '../types/Coord';\n\nexport interface PathProps {\n  coordinates: Coord[];\n  color?: number | string;\n  outlineColor?: number | string;\n  passedColor?: number | string;\n  passedOutlineColor?: number | string;\n  width?: number;\n  outlineWidth?: number;\n  patternImage?: string;\n  patternInterval?: number;\n  progress?: number;\n  zIndex?: number;\n}\n\nconst add = (v: View, id: string, args: PathProps) => {\n  const color = processColorInput(args.color, 0xff000000);\n  const outlineColor = processColorInput(args.outlineColor, 0xffffffff);\n  const passedColor = processColorInput(args.passedColor, 0xff808080);\n  const passedOutlineColor = processColorInput(args.passedOutlineColor, 0xffffffff);\n  const coordsJson = JSON.stringify(args.coordinates);\n\n  Commands.addPath(\n    v as any,\n    id,\n    coordsJson,\n    args.width ?? 5,\n    args.outlineWidth ?? 1,\n    color,\n    outlineColor,\n    passedColor,\n    passedOutlineColor,\n    args.patternImage ?? '',\n    args.patternInterval ?? 0,\n    args.progress ?? 0,\n    args.zIndex ?? 0\n  );\n};\n\nconst update = (v: View, id: string, args: PathProps) => {\n  const color = processColorInput(args.color, 0xff000000);\n  const outlineColor = processColorInput(args.outlineColor, 0xffffffff);\n  const passedColor = processColorInput(args.passedColor, 0xff808080);\n  const passedOutlineColor = processColorInput(args.passedOutlineColor, 0xffffffff);\n  const coordsJson = JSON.stringify(args.coordinates);\n\n  Commands.updatePath(\n    v as any,\n    id,\n    coordsJson,\n    args.width ?? 5,\n    args.outlineWidth ?? 1,\n    color,\n    outlineColor,\n    passedColor,\n    passedOutlineColor,\n    args.patternImage ?? '',\n    args.patternInterval ?? 0,\n    args.progress ?? 0,\n    args.zIndex ?? 0\n  );\n};\n\nconst remove = (v: View, id: string) => {\n  Commands.removePath(v as any, id);\n};\n\nconst methods = { add, update, remove };\n\nexport function Path(props: PathProps) {\n  const preserved = usePreservedReference(props);\n\n  useMapOverlay<object, PathProps>({\n    registrySelector: (c) => c.markers,\n    methods,\n    props: preserved,\n    eventListeners: {},\n  });\n\n  return null;\n}\n"
  },
  {
    "path": "packages/naver-map/src/overlays/Polygon.ts",
    "content": "import { type View } from 'react-native';\nimport { processColorInput } from '../internals/colorUtils';\nimport { useMapOverlay } from '../internals/useMapOverlay';\nimport { usePreservedReference } from '../internals/usePreservedReference';\nimport { Commands } from '../specs/GraniteNaverMapViewNativeComponent';\nimport type { Coord } from '../types/Coord';\n\nexport interface PolygonProps {\n  coordinates: Coord[];\n  holes?: Coord[][];\n  fillColor?: number | string;\n  strokeColor?: number | string;\n  strokeWidth?: number;\n  zIndex?: number;\n}\n\n// Close the ring by adding the first coordinate at the end if not already closed\nconst closeRing = (coords: Coord[]): Coord[] => {\n  if (coords.length < 3) {\n    return coords;\n  }\n  const first = coords[0]!;\n  const last = coords[coords.length - 1]!;\n  if (first.latitude === last.latitude && first.longitude === last.longitude) {\n    return coords; // Already closed\n  }\n  return [...coords, first];\n};\n\nconst add = (v: View, id: string, args: PolygonProps) => {\n  const fillColor = processColorInput(args.fillColor, 0x80000000);\n  const strokeColor = processColorInput(args.strokeColor, 0xff000000);\n  const coordsJson = JSON.stringify(closeRing(args.coordinates));\n  const holesJson = JSON.stringify((args.holes ?? []).map(closeRing));\n\n  Commands.addPolygon(\n    v as any,\n    id,\n    coordsJson,\n    holesJson,\n    fillColor,\n    strokeColor,\n    args.strokeWidth ?? 0,\n    args.zIndex ?? 0\n  );\n};\n\nconst update = (v: View, id: string, args: PolygonProps) => {\n  const fillColor = processColorInput(args.fillColor, 0x80000000);\n  const strokeColor = processColorInput(args.strokeColor, 0xff000000);\n  const coordsJson = JSON.stringify(closeRing(args.coordinates));\n  const holesJson = JSON.stringify((args.holes ?? []).map(closeRing));\n\n  Commands.updatePolygon(\n    v as any,\n    id,\n    coordsJson,\n    holesJson,\n    fillColor,\n    strokeColor,\n    args.strokeWidth ?? 0,\n    args.zIndex ?? 0\n  );\n};\n\nconst remove = (v: View, id: string) => {\n  Commands.removePolygon(v as any, id);\n};\n\nconst methods = { add, update, remove };\n\nexport function Polygon(props: PolygonProps) {\n  const preserved = usePreservedReference(props);\n\n  useMapOverlay<object, PolygonProps>({\n    registrySelector: (c) => c.markers,\n    methods,\n    props: preserved,\n    eventListeners: {},\n  });\n\n  return null;\n}\n"
  },
  {
    "path": "packages/naver-map/src/overlays/Polyline.ts",
    "content": "import { type View } from 'react-native';\nimport { processColorInput } from '../internals/colorUtils';\nimport { useMapOverlay } from '../internals/useMapOverlay';\nimport { usePreservedReference } from '../internals/usePreservedReference';\nimport { Commands } from '../specs/GraniteNaverMapViewNativeComponent';\nimport type { Coord } from '../types/Coord';\n\nexport interface PolylineProps {\n  coordinates: Coord[];\n  strokeColor?: number | string;\n  strokeWidth?: number;\n  zIndex?: number;\n  lineCap?: 'butt' | 'round' | 'square';\n  lineJoin?: 'bevel' | 'miter' | 'round';\n  pattern?: number[];\n}\n\nconst lineCapToInt = (cap?: string): number => {\n  switch (cap) {\n    case 'round':\n      return 1;\n    case 'square':\n      return 2;\n    default:\n      return 0; // butt\n  }\n};\n\nconst lineJoinToInt = (join?: string): number => {\n  switch (join) {\n    case 'miter':\n      return 1;\n    case 'round':\n      return 2;\n    default:\n      return 0; // bevel\n  }\n};\n\nconst add = (v: View, id: string, args: PolylineProps) => {\n  const strokeColor = processColorInput(args.strokeColor, 0xff000000);\n  const coordsJson = JSON.stringify(args.coordinates);\n  const patternJson = JSON.stringify(args.pattern ?? []);\n\n  Commands.addPolyline(\n    v as any,\n    id,\n    coordsJson,\n    args.strokeWidth ?? 1,\n    strokeColor,\n    args.zIndex ?? 0,\n    lineCapToInt(args.lineCap),\n    lineJoinToInt(args.lineJoin),\n    patternJson\n  );\n};\n\nconst update = (v: View, id: string, args: PolylineProps) => {\n  const strokeColor = processColorInput(args.strokeColor, 0xff000000);\n  const coordsJson = JSON.stringify(args.coordinates);\n  const patternJson = JSON.stringify(args.pattern ?? []);\n\n  Commands.updatePolyline(\n    v as any,\n    id,\n    coordsJson,\n    args.strokeWidth ?? 1,\n    strokeColor,\n    args.zIndex ?? 0,\n    lineCapToInt(args.lineCap),\n    lineJoinToInt(args.lineJoin),\n    patternJson\n  );\n};\n\nconst remove = (v: View, id: string) => {\n  Commands.removePolyline(v as any, id);\n};\n\nconst methods = { add, update, remove };\n\nexport function Polyline(props: PolylineProps) {\n  const preserved = usePreservedReference(props);\n\n  useMapOverlay<object, PolylineProps>({\n    registrySelector: (c) => c.markers, // reuse markers registry for now\n    methods,\n    props: preserved,\n    eventListeners: {},\n  });\n\n  return null;\n}\n"
  },
  {
    "path": "packages/naver-map/src/overlays/index.ts",
    "content": "export { Marker } from './Marker';\nexport type { MarkerProps, MarkerEventListeners } from './Marker';\n\nexport { Polyline } from './Polyline';\nexport type { PolylineProps } from './Polyline';\n\nexport { Polygon } from './Polygon';\nexport type { PolygonProps } from './Polygon';\n\nexport { Circle } from './Circle';\nexport type { CircleProps } from './Circle';\n\nexport { Path } from './Path';\nexport type { PathProps } from './Path';\n\nexport { ArrowheadPath } from './ArrowheadPath';\nexport type { ArrowheadPathProps } from './ArrowheadPath';\n\nexport { GroundOverlay } from './GroundOverlay';\nexport type { GroundOverlayProps } from './GroundOverlay';\n\nexport { InfoWindow } from './InfoWindow';\nexport type { InfoWindowProps, InfoWindowEventListeners } from './InfoWindow';\n"
  },
  {
    "path": "packages/naver-map/src/specs/GraniteNaverMapViewNativeComponent.ts",
    "content": "import type { HostComponent, ViewProps } from 'react-native';\nimport type { DirectEventHandler, Double, Float, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';\nimport codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\n\n// ============================================================\n// Event Types\n// ============================================================\n\nexport type OnCameraChangeEvent = Readonly<{\n  latitude: Double;\n  longitude: Double;\n  zoom: Double;\n}>;\n\nexport type OnTouchEvent = Readonly<{\n  reason: Int32;\n  animated: boolean;\n}>;\n\nexport type OnMapClickEvent = Readonly<{\n  x: Double;\n  y: Double;\n  latitude: Double;\n  longitude: Double;\n}>;\n\nexport type OnMarkerClickEvent = Readonly<{\n  id: string;\n}>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type OnInitializedEvent = Readonly<{}>;\n\n// Center prop type\ntype CenterProp = Readonly<{\n  latitude: Double;\n  longitude: Double;\n  zoom?: Double;\n  tilt?: Double;\n  bearing?: Double;\n}>;\n\n// Padding prop type\ntype PaddingProp = Readonly<{\n  top?: Double;\n  left?: Double;\n  bottom?: Double;\n  right?: Double;\n}>;\n\nexport interface NativeProps extends ViewProps {\n  // Camera\n  center?: CenterProp;\n\n  // UI Controls\n  showsMyLocationButton?: boolean;\n  compass?: boolean;\n  scaleBar?: boolean;\n  zoomControl?: boolean;\n\n  // Map settings\n  mapType?: WithDefault<Int32, 0>;\n  minZoomLevel?: WithDefault<Double, 0>;\n  maxZoomLevel?: WithDefault<Double, 21>;\n  buildingHeight?: WithDefault<Float, 1>;\n  nightMode?: boolean;\n  mapPadding?: PaddingProp;\n  locationTrackingMode?: WithDefault<Int32, 0>;\n\n  // Gestures\n  scrollGesturesEnabled?: WithDefault<boolean, true>;\n  zoomGesturesEnabled?: WithDefault<boolean, true>;\n  tiltGesturesEnabled?: WithDefault<boolean, true>;\n  rotateGesturesEnabled?: WithDefault<boolean, true>;\n  stopGesturesEnabled?: WithDefault<boolean, true>;\n\n  // Events\n  onInitialized?: DirectEventHandler<OnInitializedEvent>;\n  onCameraChange?: DirectEventHandler<OnCameraChangeEvent>;\n  onTouch?: DirectEventHandler<OnTouchEvent>;\n  onMapClick?: DirectEventHandler<OnMapClickEvent>;\n  onMarkerClick?: DirectEventHandler<OnMarkerClickEvent>;\n}\n\ntype ComponentType = HostComponent<NativeProps>;\n\ninterface NativeCommands {\n  animateToCoordinate: (viewRef: React.ElementRef<ComponentType>, latitude: Double, longitude: Double) => void;\n  animateToTwoCoordinates: (\n    viewRef: React.ElementRef<ComponentType>,\n    lat1: Double,\n    lng1: Double,\n    lat2: Double,\n    lng2: Double\n  ) => void;\n  animateToRegion: (\n    viewRef: React.ElementRef<ComponentType>,\n    latitude: Double,\n    longitude: Double,\n    latitudeDelta: Double,\n    longitudeDelta: Double\n  ) => void;\n  setLayerGroupEnabled: (viewRef: React.ElementRef<ComponentType>, group: string, enabled: boolean) => void;\n  // Marker\n  addMarker: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    latitude: Double,\n    longitude: Double,\n    width: Int32,\n    height: Int32,\n    zIndex: Int32,\n    rotation: Float,\n    flat: boolean,\n    alpha: Float,\n    pinColor: Int32,\n    image: string\n  ) => void;\n  updateMarker: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    latitude: Double,\n    longitude: Double,\n    width: Int32,\n    height: Int32,\n    zIndex: Int32,\n    rotation: Float,\n    flat: boolean,\n    alpha: Float,\n    pinColor: Int32,\n    image: string\n  ) => void;\n  removeMarker: (viewRef: React.ElementRef<ComponentType>, identifier: string) => void;\n  // Polyline\n  addPolyline: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    coordsJson: string,\n    strokeWidth: Float,\n    strokeColor: Int32,\n    zIndex: Int32,\n    lineCap: Int32,\n    lineJoin: Int32,\n    patternJson: string\n  ) => void;\n  updatePolyline: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    coordsJson: string,\n    strokeWidth: Float,\n    strokeColor: Int32,\n    zIndex: Int32,\n    lineCap: Int32,\n    lineJoin: Int32,\n    patternJson: string\n  ) => void;\n  removePolyline: (viewRef: React.ElementRef<ComponentType>, identifier: string) => void;\n  // Polygon\n  addPolygon: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    coordsJson: string,\n    holesJson: string,\n    fillColor: Int32,\n    strokeColor: Int32,\n    strokeWidth: Float,\n    zIndex: Int32\n  ) => void;\n  updatePolygon: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    coordsJson: string,\n    holesJson: string,\n    fillColor: Int32,\n    strokeColor: Int32,\n    strokeWidth: Float,\n    zIndex: Int32\n  ) => void;\n  removePolygon: (viewRef: React.ElementRef<ComponentType>, identifier: string) => void;\n  // Circle\n  addCircle: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    latitude: Double,\n    longitude: Double,\n    radius: Double,\n    fillColor: Int32,\n    strokeColor: Int32,\n    strokeWidth: Float,\n    zIndex: Int32\n  ) => void;\n  updateCircle: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    latitude: Double,\n    longitude: Double,\n    radius: Double,\n    fillColor: Int32,\n    strokeColor: Int32,\n    strokeWidth: Float,\n    zIndex: Int32\n  ) => void;\n  removeCircle: (viewRef: React.ElementRef<ComponentType>, identifier: string) => void;\n  // Path\n  addPath: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    coordsJson: string,\n    width: Float,\n    outlineWidth: Float,\n    color: Int32,\n    outlineColor: Int32,\n    passedColor: Int32,\n    passedOutlineColor: Int32,\n    patternImage: string,\n    patternInterval: Int32,\n    progress: Float,\n    zIndex: Int32\n  ) => void;\n  updatePath: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    coordsJson: string,\n    width: Float,\n    outlineWidth: Float,\n    color: Int32,\n    outlineColor: Int32,\n    passedColor: Int32,\n    passedOutlineColor: Int32,\n    patternImage: string,\n    patternInterval: Int32,\n    progress: Float,\n    zIndex: Int32\n  ) => void;\n  removePath: (viewRef: React.ElementRef<ComponentType>, identifier: string) => void;\n  // ArrowheadPath\n  addArrowheadPath: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    coordsJson: string,\n    width: Float,\n    outlineWidth: Float,\n    color: Int32,\n    outlineColor: Int32,\n    headSizeRatio: Float,\n    zIndex: Int32\n  ) => void;\n  updateArrowheadPath: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    coordsJson: string,\n    width: Float,\n    outlineWidth: Float,\n    color: Int32,\n    outlineColor: Int32,\n    headSizeRatio: Float,\n    zIndex: Int32\n  ) => void;\n  removeArrowheadPath: (viewRef: React.ElementRef<ComponentType>, identifier: string) => void;\n  // GroundOverlay\n  addGroundOverlay: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    southWestLat: Double,\n    southWestLng: Double,\n    northEastLat: Double,\n    northEastLng: Double,\n    image: string,\n    alpha: Float,\n    zIndex: Int32\n  ) => void;\n  updateGroundOverlay: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    southWestLat: Double,\n    southWestLng: Double,\n    northEastLat: Double,\n    northEastLng: Double,\n    image: string,\n    alpha: Float,\n    zIndex: Int32\n  ) => void;\n  removeGroundOverlay: (viewRef: React.ElementRef<ComponentType>, identifier: string) => void;\n  // InfoWindow\n  addInfoWindow: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    latitude: Double,\n    longitude: Double,\n    text: string,\n    alpha: Float,\n    zIndex: Int32,\n    offsetX: Int32,\n    offsetY: Int32\n  ) => void;\n  updateInfoWindow: (\n    viewRef: React.ElementRef<ComponentType>,\n    identifier: string,\n    latitude: Double,\n    longitude: Double,\n    text: string,\n    alpha: Float,\n    zIndex: Int32,\n    offsetX: Int32,\n    offsetY: Int32\n  ) => void;\n  removeInfoWindow: (viewRef: React.ElementRef<ComponentType>, identifier: string) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({\n  supportedCommands: [\n    'animateToCoordinate',\n    'animateToTwoCoordinates',\n    'animateToRegion',\n    'setLayerGroupEnabled',\n    // Marker\n    'addMarker',\n    'updateMarker',\n    'removeMarker',\n    // Polyline\n    'addPolyline',\n    'updatePolyline',\n    'removePolyline',\n    // Polygon\n    'addPolygon',\n    'updatePolygon',\n    'removePolygon',\n    // Circle\n    'addCircle',\n    'updateCircle',\n    'removeCircle',\n    // Path\n    'addPath',\n    'updatePath',\n    'removePath',\n    // ArrowheadPath\n    'addArrowheadPath',\n    'updateArrowheadPath',\n    'removeArrowheadPath',\n    // GroundOverlay\n    'addGroundOverlay',\n    'updateGroundOverlay',\n    'removeGroundOverlay',\n    // InfoWindow\n    'addInfoWindow',\n    'updateInfoWindow',\n    'removeInfoWindow',\n  ],\n});\n\nexport default codegenNativeComponent<NativeProps>('GraniteNaverMapView') as ComponentType;\n"
  },
  {
    "path": "packages/naver-map/src/types/Coord.ts",
    "content": "export interface Coord {\n  latitude: number;\n  longitude: number;\n}\n"
  },
  {
    "path": "packages/naver-map/src/types/index.ts",
    "content": "import type { NativeSyntheticEvent } from 'react-native';\nimport type {\n  OnCameraChangeEvent,\n  OnTouchEvent,\n  OnMapClickEvent,\n  OnMarkerClickEvent,\n} from '../specs/GraniteNaverMapViewNativeComponent';\n\nexport * from './Coord';\n\n// ============================================================\n// Event Types\n// ============================================================\n\n/**\n * Camera change event data\n */\nexport interface CameraChangeEvent {\n  latitude: number;\n  longitude: number;\n  zoom: number;\n}\n\n/**\n * Touch event data\n */\nexport interface TouchEvent {\n  reason: number;\n  animated: boolean;\n}\n\n/**\n * Map click event data\n */\nexport interface MapClickEvent {\n  x: number;\n  y: number;\n  latitude: number;\n  longitude: number;\n}\n\n/**\n * Marker click event data\n */\nexport interface MarkerClickEvent {\n  id: string;\n}\n\n// ============================================================\n// Component Props\n// ============================================================\n\nexport interface NaverMapViewProps {\n  /**\n   * Callback when map is initialized\n   */\n  onInitialized?: () => void;\n\n  /**\n   * Callback when camera changes\n   */\n  onCameraChange?: (event: NativeSyntheticEvent<OnCameraChangeEvent>) => void;\n\n  /**\n   * Callback when map is touched\n   */\n  onTouch?: (event: NativeSyntheticEvent<OnTouchEvent>) => void;\n\n  /**\n   * Callback when map is clicked\n   */\n  onMapClick?: (event: NativeSyntheticEvent<OnMapClickEvent>) => void;\n\n  /**\n   * Callback when marker is clicked\n   */\n  onMarkerClick?: (event: NativeSyntheticEvent<OnMarkerClickEvent>) => void;\n}\n"
  },
  {
    "path": "packages/naver-map/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"declarationDir\": \"dist/typescript\",\n    \"emitDeclarationOnly\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/naver-map/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/plugin-core/CHANGELOG.md",
    "content": "# @granite-js/plugin-core\n\n## 1.0.23\n\n### Patch Changes\n\n- @granite-js/utils@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/utils@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/utils@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- @granite-js/utils@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/utils@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/utils@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/utils@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/utils@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/utils@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/utils@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/utils@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/utils@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/utils@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/utils@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/utils@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/utils@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/utils@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/utils@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/utils@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- @granite-js/utils@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/utils@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- d4beb3b: expose context to dynamic config plugin\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [b325495]\n  - @granite-js/utils@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- @granite-js/utils@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/utils@1.0.0\n"
  },
  {
    "path": "packages/plugin-core/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/plugin-core/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/plugin-core\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@swc/core**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: git+https://github.com/swc-project/swc.git\n\t\n2. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n3. **@types/babel__core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n4. **@types/connect**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n5. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n6. **@types/ws**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n7. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n8. **cosmiconfig**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/cosmiconfig/cosmiconfig.git\n\t\n9. **cosmiconfig-typescript-loader**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/Codex-/cosmiconfig-typescript-loader.git\n\t\n10. **es-toolkit**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/toss/es-toolkit.git\n\t\n11. **esbuild**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/evanw/esbuild.git\n\t\n12. **fastify**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/fastify/fastify.git\n\t\n13. **tsdown**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/rolldown/tsdown.git\n\t\n14. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n15. **zod**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/colinhacks/zod.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/plugin-core/README.md",
    "content": "# @granite-js/plugin-core\n\nThe core plugin module for Granite\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/plugin-core/package.json",
    "content": "{\n  \"name\": \"@granite-js/plugin-core\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"description\": \"The core plugin module for Granite\",\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"test\": \"vitest --run\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"build\": \"tsdown\"\n  },\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/plugin-core\"\n  },\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"devDependencies\": {\n    \"@types/node\": \"catalog:tools\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"tsdown\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\"\n  },\n  \"dependencies\": {\n    \"@granite-js/utils\": \"workspace:*\",\n    \"@swc/core\": \"catalog:swc\",\n    \"@types/babel__core\": \"^7\",\n    \"@types/connect\": \"^3\",\n    \"@types/ws\": \"^8.18.0\",\n    \"cosmiconfig\": \"^9.0.0\",\n    \"cosmiconfig-typescript-loader\": \"^5.1.0\",\n    \"es-toolkit\": \"^1.39.8\",\n    \"esbuild\": \"^0.25.8\",\n    \"fastify\": \"4.14.0\",\n    \"zod\": \"^4.0.10\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/plugin-core/src/config/defineConfig.ts",
    "content": "import path from 'path';\nimport { getPackageRoot } from '@granite-js/utils';\nimport { isNotNil } from 'es-toolkit';\nimport { prepareGraniteGlobalsScript } from './graniteGlobals';\nimport { pluginConfigSchema, type CompleteGraniteConfig, type GraniteConfig } from '../schema/pluginConfig';\nimport { resolvePlugins } from '../utils/resolvePlugins';\n\n/**\n * @public\n * @category Configuration\n * @name defineConfig\n * @description\n * Configures your Granite application by defining key settings in `granite.config.ts`.\n *\n * The configuration lets you specify:\n * - How users will access your app through a URL scheme (e.g. `granite://`)\n * - Your app's unique name that appears in the URL (e.g. `granite://my-service`)\n * - Build settings for bundlers like ESBuild and Metro\n * - Code transformation settings through Babel\n * - Additional functionality through Granite plugins\n *\n * @param config - Configuration options\n * @param config.cwd - Working directory for build process (defaults to process.cwd())\n * @param config.appName - Your app's unique identifier\n * @param config.host - Host name for your app (e.g. 'scheme://host/app-name')\n * @param config.scheme - URL scheme for launching your app (e.g. 'granite')\n * @param config.outdir - Where to output build files (defaults to 'dist')\n * @param config.entryFile - Your app's entry point (defaults to './src/_app.tsx')\n * @param config.build - Customize build settings\n * @param config.metro - Configure Metro bundler settings\n * @param config.devServer - Configure Mpack dev server settings\n * @param config.plugins - Granite plugins to enhance functionality\n * @param config.reactNativePath - Path to `react-native` directory (defaults to project's `react-native` package path)\n * @returns The processed configuration\n *\n * @example\n * Here's a basic configuration that:\n * - Makes your app accessible via the `granite://` scheme\n * - Names your service \"my-app\" so it's reachable at `granite://my-app`\n * - Uses the Hermes plugin to optimize JavaScript bundles into bytecode\n *\n * ```ts\n * import { defineConfig } from '@granite-js/react-native/config';\n * import { hermes } from '@granite-js/plugin-hermes';\n *\n * export default defineConfig({\n *   // The name of your microservice\n *   appName: 'my-app',\n *   // (Optional) The host name for your app (e.g. 'scheme://host/app-name')\n *   host: 'super',\n *   // The URL scheme for deep linking\n *   scheme: 'granite',\n *   // Entry file path\n *   entryFile: 'index.ts',\n *   // Array of plugins to use\n *   plugins: [hermes()],\n * });\n * ```\n */\nexport const defineConfig = async (config: GraniteConfig): Promise<CompleteGraniteConfig> => {\n  const parsed = pluginConfigSchema.parse(config);\n  const cwd = parsed.cwd ?? getPackageRoot();\n  const appName = parsed.appName;\n  const host = parsed.host ?? '';\n  const scheme = parsed.scheme;\n  const entryFile = path.resolve(cwd, parsed.entryFile);\n  const outdir = path.join(cwd, parsed.outdir);\n  const parsedBuildConfig = parsed.build;\n  const parsedDevServerConfig = parsed.devServer;\n  const parsedMetroConfig = parsed.metro;\n  const parsedConfig = {\n    ...parsedBuildConfig,\n    devServer: parsedDevServerConfig,\n    metro: parsedMetroConfig,\n  };\n\n  const { configs, pluginHooks } = await resolvePlugins(parsed.plugins);\n  const globalsScriptConfig = prepareGraniteGlobalsScript({ rootDir: cwd, appName, scheme, host });\n\n  return {\n    cwd,\n    appName,\n    entryFile,\n    outdir,\n    pluginHooks,\n    pluginConfigs: [parsedConfig, globalsScriptConfig, ...configs].filter(isNotNil),\n    reactNativePath: parsed.reactNativePath,\n  };\n};\n"
  },
  {
    "path": "packages/plugin-core/src/config/graniteGlobals.ts",
    "content": "import fs from 'fs';\nimport path from 'path';\nimport { getLocalTempDirectoryPath, prepareLocalDirectory } from '@granite-js/utils';\nimport type { PluginConfig } from '../types';\n\ninterface GraniteGlobalsConfig {\n  rootDir: string;\n  appName: string;\n  scheme: string;\n  host: string;\n}\n\nexport function prepareGraniteGlobalsScript(config: GraniteGlobalsConfig): PluginConfig {\n  const filePath = writeGraniteGlobalsScript(config);\n\n  return {\n    esbuild: {\n      prelude: [filePath],\n    },\n    metro: {\n      serializer: {\n        getPolyfills: () => [filePath],\n      },\n    },\n  };\n}\n\nfunction writeGraniteGlobalsScript(config: GraniteGlobalsConfig) {\n  const script = getGraniteGlobalScript(config);\n  const filePath = path.join(getLocalTempDirectoryPath(config.rootDir), 'granite-globals.js');\n\n  prepareLocalDirectory(config.rootDir);\n  fs.writeFileSync(filePath, script, 'utf-8');\n\n  return filePath;\n}\n\nfunction getGraniteGlobalScript({ appName, scheme, host }: GraniteGlobalsConfig) {\n  return [\n    'global.__granite = global.__granite || {};',\n    `global.__granite.app = { name: ${JSON.stringify(appName)}, scheme: ${JSON.stringify(scheme)}, host: ${JSON.stringify(host)} };`,\n  ].join('\\n');\n}\n"
  },
  {
    "path": "packages/plugin-core/src/config/loadConfig.ts",
    "content": "import path from 'path';\nimport { getPackageRoot } from '@granite-js/utils';\nimport { cosmiconfig, type CosmiconfigResult, type Options as CosmiconfigOptions } from 'cosmiconfig';\nimport { TypeScriptLoader } from 'cosmiconfig-typescript-loader';\nimport { assert } from 'es-toolkit';\nimport type { defineConfig } from './defineConfig';\nimport type { CompleteGraniteConfig } from '../schema/pluginConfig';\n\nconst MODULE_NAME = 'granite';\n\nexport interface LoadConfigOptions {\n  /**\n   * Root directory to search for the config file.\n   *\n   * Defaults to project root\n   */\n  root?: string;\n  /**\n   * Exact path to the config file.\n   *\n   * If provided, the config file will be loaded from the given path.\n   * Otherwise, the config file will be searched for in the root directory.\n   */\n  configFile?: string;\n}\n\nexport const loadConfig = async (options: LoadConfigOptions = {}): Promise<CompleteGraniteConfig> => {\n  let result: CosmiconfigResult;\n  const resolveRoot = options.root ?? getPackageRoot();\n\n  if (options.configFile) {\n    result = await getConfigExplorer().load(path.resolve(resolveRoot, options.configFile));\n  } else {\n    result = await getConfigExplorer({\n      searchPlaces: [\n        `${MODULE_NAME}.config.ts`,\n        `${MODULE_NAME}.config.mts`,\n        `${MODULE_NAME}.config.js`,\n        `${MODULE_NAME}.config.cjs`,\n      ],\n    }).search(resolveRoot);\n  }\n\n  assert(result, 'Config file not found');\n\n  const config: Awaited<ReturnType<typeof defineConfig>> = await result.config;\n\n  return config;\n};\n\nfunction getConfigExplorer(options?: Partial<CosmiconfigOptions>) {\n  return cosmiconfig(MODULE_NAME, {\n    loaders: {\n      '.ts': TypeScriptLoader(),\n      '.mts': TypeScriptLoader(),\n    },\n    ...options,\n  });\n}\n"
  },
  {
    "path": "packages/plugin-core/src/createContext.ts",
    "content": "import type { PluginContext } from './types';\n\nexport function createContext(): PluginContext {\n  return {\n    meta: Object.create(null),\n  };\n}\n"
  },
  {
    "path": "packages/plugin-core/src/index.ts",
    "content": "export * from './createContext';\nexport * from './utils/flattenPlugins';\nexport * from './utils/resolvePlugins';\nexport * from './utils/mergeConfig';\nexport * from './utils/mergeBuildConfigs';\nexport * from './utils/createPluginHooksDriver';\nexport * from './utils/buildResult';\nexport * from './utils/resolveConfig';\n\nexport { defineConfig } from './config/defineConfig';\nexport { loadConfig } from './config/loadConfig';\n\nexport { pluginConfigSchema } from './schema/pluginConfig';\nexport type * from './schema/pluginConfig';\nexport type * from './types';\n"
  },
  {
    "path": "packages/plugin-core/src/schema/pluginConfig.ts",
    "content": "import * as z from 'zod';\nimport type {\n  AdditionalMetroConfig,\n  DevServerConfig,\n  GranitePluginBuildPostHandler,\n  GranitePluginBuildPreHandler,\n  GranitePluginDevPostHandler,\n  GranitePluginDevPreHandler,\n  MetroDevServerConfig,\n  PluginBuildConfig,\n  PluginConfig,\n  PluginInput,\n} from '../types';\n\nexport const pluginConfigSchema = z.object({\n  cwd: z.string().default(process.cwd()),\n  appName: z.string(),\n  host: z.string().optional(),\n  scheme: z.string(),\n  outdir: z.string().default('dist'),\n  entryFile: z.string().default('./src/_app.tsx'),\n  build: z.custom<PluginBuildConfig>().optional(),\n  devServer: z.custom<DevServerConfig>().optional(),\n  metro: z.custom<AdditionalMetroConfig & MetroDevServerConfig>().optional(),\n  plugins: z.custom<PluginInput>(),\n  reactNativePath: z.string().optional(),\n});\n\nexport type GraniteConfig = z.input<typeof pluginConfigSchema>;\nexport type ParsedGraniteConfig = z.output<typeof pluginConfigSchema>;\nexport type CompleteGraniteConfig = {\n  cwd: ParsedGraniteConfig['cwd'];\n  appName: ParsedGraniteConfig['appName'];\n  entryFile: ParsedGraniteConfig['entryFile'];\n  outdir: ParsedGraniteConfig['outdir'];\n  pluginHooks: GranitePluginHooks;\n  pluginConfigs: PluginConfig[];\n  reactNativePath?: string;\n};\n\nexport interface GranitePluginHooks {\n  devServer: {\n    preHandlers: GranitePluginDevPreHandler[];\n    postHandlers: GranitePluginDevPostHandler[];\n  };\n  build: {\n    preHandlers: GranitePluginBuildPreHandler[];\n    postHandlers: GranitePluginBuildPostHandler[];\n  };\n}\n"
  },
  {
    "path": "packages/plugin-core/src/types/BuildConfig.ts",
    "content": "import * as swc from '@swc/core';\nimport * as esbuild from 'esbuild';\n\nexport interface BuildConfig {\n  /**\n   * Build platform\n   */\n  platform: 'ios' | 'android';\n  /**\n   * Entry file path\n   */\n  entry: string;\n  /**\n   * Build output file path\n   */\n  outfile: string;\n  /**\n   * Source map output file path\n   *\n   * @default `${outfile}.map`\n   */\n  sourcemapOutfile?: string;\n  /**\n   * Module resolution configuration\n   */\n  resolver?: ResolverConfig;\n  /**\n   * Transformer configuration\n   */\n  transformer?: {\n    transformSync?: TransformSync;\n    transformAsync?: TransformAsync;\n  };\n  /**\n   * esbuild configuration\n   */\n  esbuild?: EsbuildConfig;\n  /**\n   * Custom babel configuration\n   */\n  babel?: BabelConfig;\n  /**\n   * Custom swc configuration\n   */\n  swc?: SwcConfig;\n  /**\n   * Additional data\n   *\n   * Included in the build result data, used for post-processing based on specific values\n   * (eg. add specific extra data in preset, and distinguish which preset the build result is from)\n   *\n   * ```js\n   * const result = new Bundler({\n   *   bundlerConfig: {\n   *     buildConfig: {\n   *       extra: {\n   *         reanimated: 3,\n   *       },\n   *     },\n   *   },\n   *   ...\n   * }).build();\n   *\n   * if (result.extra?.reanimated === 3) {\n   *   // handle build result for reanimated v3\n   * }\n   * ```\n   */\n  extra?: any;\n  /**\n   * Path to `react-native` package path\n   */\n  reactNativePath?: string;\n}\n\nexport interface ResolverConfig {\n  /**\n   * Dependency alias configuration\n   */\n  alias?: AliasConfig[];\n  /**\n   * Custom module protocol configuration\n   */\n  protocols?: ProtocolConfig;\n}\n\nexport interface AliasConfig extends Pick<esbuild.ResolveOptions, 'importer' | 'kind' | 'resolveDir' | 'with'> {\n  /**\n   * Replacement target module path\n   */\n  from: string;\n  /**\n   * Replacement module path or function that returns module path\n   */\n  to: ResolveResult | AliasResolver;\n  /**\n   * - `false`: (default) replace even if subpath exists (`^name(?:$|/)`)\n   * - `true`: replace only if the target is exactly matched (`^name$`)\n   *\n   * ```js\n   * const config = {\n   *   alias: [\n   *    { from: 'react-native', to: 'react-native-0.68' },\n   *    { from: 'react', to: 'react-17', exact: true },\n   *   ],\n   * };\n   *\n   * // AS IS\n   * import * as RN from 'react-native';\n   * import 'react-native/Libraries/Core/InitializeCore';\n   * import React from 'react';\n   * import runtime from 'react/runtime';\n   *\n   * // TO BE\n   * import * as RN from 'react-native-0.68';\n   * import 'react-native-0.68/Libraries/Core/InitializeCore';\n   * import React from 'react-17';\n   * import runtime from 'react/runtime'; // exact\n   * ```\n   */\n  exact?: boolean;\n}\n\nexport type ResolveResult = string | ResolveResultWithOptions;\n\nexport interface ResolveResultWithOptions extends Omit<esbuild.ResolveOptions, 'pluginName' | 'pluginData'> {\n  path: string;\n}\n\nexport type AliasResolver = (context: {\n  args: esbuild.OnResolveArgs;\n  resolve: esbuild.PluginBuild['resolve'];\n}) => ResolveResult | Promise<ResolveResult>;\n\n/**\n * Custom protocol resolve configuration\n *\n * This option configures to directly resolve and load modules referenced by the specified protocol\n *\n * ```ts\n * // AS-IS\n * import mod from 'custom-protocol:/path/to/module';\n *\n * // TO-BE\n * // `custom-protocol:/path/to/module` module is handled as follows\n * export default global.__import('/path/to/module');\n * ```\n *\n * Configuration example\n *\n * ```ts\n * {\n *   'custom-protocol': {\n *     resolve: (args) => args.path,\n *     load: (args) => {\n *       return { loader: 'ts', contents: `export default global.__import('${args.path}')` };\n *     },\n *   },\n * }\n * ```\n */\nexport interface ProtocolConfig {\n  [name: string]: {\n    /**\n     * Module path to resolve\n     */\n    resolve?: (args: esbuild.OnResolveArgs) => string | Promise<string>;\n    /**\n     * Return module code based on the resolved path\n     */\n    load: (args: esbuild.OnLoadArgs) => esbuild.OnLoadResult | Promise<esbuild.OnLoadResult>;\n  };\n}\n\nexport interface TransformerConfig {\n  transformSync?: TransformSync;\n  transformAsync?: TransformAsync;\n}\n\nexport type TransformSync = (id: string, code: string) => string;\nexport type TransformAsync = (id: string, code: string) => Promise<string>;\n\nexport interface EsbuildConfig extends esbuild.BuildOptions {\n  /**\n   * Script path to inject at the entry point\n   *\n   * esbuild.inject option added script is not only injected into the entry-point module, but also into all modules.\n   * entry-point module's top level only inject code.\n   *\n   * - injected only once at the top level of the entry-point module\n   * - duplicate inject script is removed, reducing bundle size\n   *\n   * @see issue {@link https://github.com/evanw/esbuild/issues/475}\n   */\n  prelude?: string[];\n}\n\nexport interface SwcConfig {\n  /**\n   * Plugin binary(wasm) path, plugin configuration\n   */\n  plugins?: NonNullable<swc.JscConfig['experimental']>['plugins'];\n}\n\nexport interface BabelConfig {\n  /**\n   * List of rules for Babel transform processing\n   * (option to skip Babel transform only when certain conditions are met)\n   *\n   * If all rules return `false`, Babel transform is skipped\n   */\n  conditions?: Array<(code: string, path: string) => boolean>;\n  configFile?: string;\n  presets?: string[];\n  plugins?: (string | [string, any])[];\n}\n"
  },
  {
    "path": "packages/plugin-core/src/types/BuildResult.ts",
    "content": "import type * as esbuild from 'esbuild';\nimport type { BuildConfig } from './BuildConfig';\n\nexport type BuildResult = BuildSuccessResult | BuildFailureResult;\n\nexport interface BuildSuccessResult extends esbuild.BuildResult {\n  bundle: BundleData;\n  outfile: BuildConfig['outfile'];\n  sourcemapOutfile: NonNullable<BuildConfig['sourcemapOutfile']>;\n  platform: BuildConfig['platform'];\n  extra: BuildConfig['extra'];\n  totalModuleCount: number;\n  duration: number;\n  size: number;\n}\n\nexport interface BuildFailureResult extends esbuild.BuildResult {\n  platform: BuildConfig['platform'];\n  extra: BuildConfig['extra'];\n  duration: number;\n}\n\nexport interface BundleData {\n  source: esbuild.OutputFile;\n  sourcemap: esbuild.OutputFile;\n}\n"
  },
  {
    "path": "packages/plugin-core/src/types/DevServerConfig.ts",
    "content": "import type { HandleFunction } from 'connect';\nimport type { FastifyPluginAsync, FastifyPluginCallback } from 'fastify';\nimport * as ws from 'ws';\n\nexport type Middleware = FastifyPluginAsync | FastifyPluginCallback;\nexport type MetroMiddleware = HandleFunction;\n\nexport interface InspectorProxyConfig {\n  delegate?: {\n    /**\n     * @param message CDP message from the connected device\n     * @param socket `WebSocket` instance that connected to the device\n     * @returns `true` if the message is handled, `false` otherwise\n     */\n    onDeviceMessage?: <DeviceMessage extends { method: string; params: Record<string, any> }>(\n      message: DeviceMessage,\n      socket: ws.WebSocket\n    ) => boolean;\n    /**\n     * @param message CDP message from debugger\n     * @param socket `WebSocket` instance that connected to debugger\n     * @returns `true` if the message is handled, `false` otherwise\n     */\n    onDebuggerMessage?: <DebuggerMessage extends { method: string; params: Record<string, any> }>(\n      message: DebuggerMessage,\n      socket: ws.WebSocket\n    ) => boolean;\n  };\n}\n\nexport interface DevServerConfig {\n  middlewares?: Middleware[];\n  inspectorProxy?: InspectorProxyConfig;\n}\n\nexport interface MetroDevServerConfig {\n  middlewares?: MetroMiddleware[];\n  inspectorProxy?: InspectorProxyConfig;\n}\n"
  },
  {
    "path": "packages/plugin-core/src/types/GranitePlugin.ts",
    "content": "import type { BuildConfig } from './BuildConfig';\nimport type { BuildResult } from './BuildResult';\nimport type { DevServerConfig, MetroDevServerConfig } from './DevServerConfig';\nimport type { AdditionalMetroConfig } from './MetroConfig';\n\nexport interface GranitePluginConfig {\n  entryFile: string;\n  cwd: string;\n  appName: string;\n  outdir: string;\n}\n\nexport interface GranitePluginDevHandlerArgs extends GranitePluginConfig {\n  host: string;\n  port: number;\n}\n\nexport type GranitePluginPreHandlerArgs = GranitePluginConfig;\n\nexport interface GranitePluginPostHandlerArgs extends GranitePluginConfig {\n  buildResults: BuildResult[];\n}\n\nexport interface PluginContext {\n  meta: any;\n}\n\nexport type GranitePluginDevPreHandler = (\n  this: PluginContext,\n  args: GranitePluginDevHandlerArgs\n) => void | Promise<void>;\nexport type GranitePluginDevPostHandler = (\n  this: PluginContext,\n  args: GranitePluginDevHandlerArgs\n) => void | Promise<void>;\nexport type GranitePluginBuildPreHandler = (\n  this: PluginContext,\n  args: GranitePluginPreHandlerArgs\n) => void | Promise<void>;\nexport type GranitePluginBuildPostHandler = (\n  this: PluginContext,\n  args: GranitePluginPostHandlerArgs\n) => void | Promise<void>;\n\nexport interface GranitePluginCore {\n  /**\n   * Plugin name\n   */\n  name: string;\n  /**\n   * Dev handler (granite dev command)\n   */\n  dev?:\n    | {\n        order: 'pre';\n        handler: GranitePluginDevPreHandler;\n      }\n    | {\n        order: 'post';\n        handler: GranitePluginDevPostHandler;\n      };\n  /**\n   * Build handler (granite build command)\n   */\n  build?:\n    | {\n        order: 'pre';\n        handler: GranitePluginBuildPreHandler;\n      }\n    | {\n        order: 'post';\n        handler: GranitePluginBuildPostHandler;\n      };\n  /**\n   * Plugin config\n   */\n  config?: PluginConfig;\n}\nexport type PluginConfig = StaticPluginConfig | DynamicPluginConfig;\n\nexport type StaticPluginConfig = Omit<PluginBuildConfig, 'platform' | 'outfile'> & {\n  devServer?: DevServerConfig;\n  metro?: PluginMetroConfig;\n};\n\nexport type DynamicPluginConfig =\n  | ((context: PluginConfigContext) => StaticPluginConfig | null | undefined | void)\n  | ((context: PluginConfigContext) => Promise<StaticPluginConfig | null | undefined | void>);\n\nexport interface PluginConfigContext {\n  command: 'build' | 'serve';\n}\n\n// Omitted options are configured by `PluginBuildConfig['babel']`, `PluginBuildConfig['transformer']`\nexport type PluginMetroConfig = Omit<ResolvedMetroConfig, 'babelConfig' | 'transformSync'>;\n\nexport type ResolvedPluginConfig = Omit<StaticPluginConfig, 'metro'> & { metro?: ResolvedMetroConfig };\nexport type ResolvedMetroConfig = AdditionalMetroConfig & MetroDevServerConfig;\n\nexport type PluginResolvable =\n  | GranitePlugin // Plugin definition (e.g. { name: string; config?: any })\n  | GranitePluginCore // Or plugin's default form\n  | Promise<GranitePlugin>\n  | Promise<GranitePluginCore>;\n\nexport type PluginInput = PluginResolvable | PluginInput[];\n\nexport type PluginBuildConfig = Omit<BuildConfig, 'platform' | 'entry' | 'outfile'>;\n\nexport type GranitePlugin = GranitePluginCore | Promise<GranitePluginCore>;\n"
  },
  {
    "path": "packages/plugin-core/src/types/MetroConfig.ts",
    "content": "import * as babel from '@babel/core';\nimport type { MetroConfig } from './vendors/metro';\n\nexport interface AdditionalMetroConfig extends MetroConfig {\n  /**\n   * Partial support for some options only\n   *\n   * - `getPolyfills`\n   */\n  serializer?: MetroConfig['serializer'];\n  /**\n   * Partial support for some options only\n   *\n   * - `blockList`\n   * - `resolverMainFields`\n   * - `resolveRequest`\n   * - `conditionNames`\n   */\n  resolver?: MetroConfig['resolver'] & {\n    /**\n     * Defaults to `['react-native', 'require', 'node', 'default']`\n     */\n    conditionNames?: string[];\n  };\n  reporter?: MetroConfig['reporter'];\n  babelConfig?: babel.TransformOptions;\n  transformSync?: (id: string, code: string) => string;\n  projectRoot?: MetroConfig['projectRoot'];\n  reactNativePath?: string;\n}\n"
  },
  {
    "path": "packages/plugin-core/src/types/index.ts",
    "content": "export * from './BuildConfig';\nexport * from './BuildResult';\nexport * from './DevServerConfig';\nexport * from './GranitePlugin';\nexport * from './MetroConfig';\nexport type { ResolutionContext as MetroResolutionContext } from './vendors/metro';\n"
  },
  {
    "path": "packages/plugin-core/src/types/vendors/metro.ts",
    "content": "type Untyped = any;\n\ninterface PackageJson {\n  readonly name?: string;\n  readonly main?: string;\n  readonly exports?: string | Untyped;\n}\n\ninterface PackageInfo {\n  readonly packageJson: PackageJson;\n  readonly rootPath: string;\n}\n\ntype ResolveAsset = (dirPath: string, assetName: string, extension: string) => string[] | undefined;\n\nexport interface ResolutionContext {\n  readonly assetExts: string[];\n  readonly allowHaste: boolean;\n  readonly customResolverOptions: Untyped;\n  readonly disableHierarchicalLookup: boolean;\n  readonly doesFileExist: Untyped;\n  readonly extraNodeModules?: { [key: string]: string };\n  readonly getPackage: (packageJsonPath: string) => PackageJson | null;\n  readonly getPackageForModule: (modulePath: string) => PackageInfo | null;\n  readonly dependency?: any;\n  readonly mainFields: string[];\n  readonly originModulePath: string;\n  readonly nodeModulesPaths: string[];\n  readonly preferNativePlatform: boolean;\n  readonly resolveAsset: ResolveAsset;\n  readonly redirectModulePath: (modulePath: string) => string | false;\n  readonly resolveHasteModule: (name: string) => string | undefined;\n  readonly resolveHastePackage: (name: string) => string | undefined;\n  readonly resolveRequest?: CustomResolver;\n  readonly sourceExts: string[];\n}\n\nexport interface CustomResolutionContext extends ResolutionContext {\n  readonly resolveRequest: CustomResolver;\n}\n\ntype CustomResolver = (context: CustomResolutionContext, moduleName: string, platform: string | null) => any;\n\ninterface ResolverConfig {\n  /**\n   * Defaults to `['react-native', 'browser', 'main']`\n   */\n  resolverMainFields: string[];\n  assetExts: string[];\n  assetResolutions: string[];\n  blacklistRE?: RegExp | RegExp[];\n  blockList: RegExp | RegExp[];\n  dependencyExtractor?: string;\n  disableHierarchicalLookup: boolean;\n  extraNodeModules: { [name: string]: string };\n  emptyModulePath: string;\n  enableGlobalPackages: boolean;\n  hasteImplModulePath?: string;\n  nodeModulesPaths: string[];\n  platforms: string[];\n  resolveRequest?: CustomResolver;\n  sourceExts: string[];\n  useWatchman: boolean;\n  requireCycleIgnorePatterns: ReadonlyArray<RegExp>;\n}\n\ninterface BundleDetails {\n  bundleType: string;\n  dev: boolean;\n  entryFile: string;\n  minify: boolean;\n  platform?: string;\n  runtimeBytecodeVersion?: number;\n}\n\ntype WatcherStatus =\n  | {\n      type: 'watchman_slow_command';\n      timeElapsed: number;\n      command: 'watch-project' | 'query';\n    }\n  | {\n      type: 'watchman_slow_command_complete';\n      timeElapsed: number;\n      command: 'watch-project' | 'query';\n    }\n  | {\n      type: 'watchman_warning';\n      warning: unknown;\n      command: 'watch-project' | 'query';\n    };\n\ntype HealthCheckResult =\n  | { type: 'error'; timeout: number; error: Error; watcher: string | null }\n  | {\n      type: 'success';\n      timeout: number;\n      timeElapsed: number;\n      watcher: string | null;\n    }\n  | {\n      type: 'timeout';\n      timeout: number;\n      watcher: string | null;\n      pauseReason: string | null;\n    };\n\nexport type ReportableEvent =\n  | {\n      port: number;\n      hasReducedPerformance: boolean;\n      type: 'initialize_started';\n    }\n  | {\n      type: 'initialize_failed';\n      port: number;\n      error: Error;\n    }\n  | {\n      type: 'initialize_done';\n      port: number;\n    }\n  | {\n      buildID: string;\n      type: 'bundle_build_done';\n    }\n  | {\n      buildID: string;\n      type: 'bundle_build_failed';\n    }\n  | {\n      type: 'bundle_save_log';\n      message: string;\n    }\n  | {\n      buildID: string;\n      bundleDetails: BundleDetails;\n      isPrefetch?: boolean;\n      type: 'bundle_build_started';\n    }\n  | {\n      error: Error;\n      type: 'bundling_error';\n    }\n  | {\n      type: 'dep_graph_loading';\n      hasReducedPerformance: boolean;\n    }\n  | { type: 'dep_graph_loaded' }\n  | {\n      buildID: string;\n      type: 'bundle_transform_progressed';\n      transformedFileCount: number;\n      totalFileCount: number;\n    }\n  | {\n      type: 'cache_read_error';\n      error: Error;\n    }\n  | {\n      type: 'cache_write_error';\n      error: Error;\n    }\n  | { type: 'transform_cache_reset' }\n  | {\n      type: 'worker_stdout_chunk';\n      chunk: string;\n    }\n  | {\n      type: 'worker_stderr_chunk';\n      chunk: string;\n    }\n  | {\n      type: 'hmr_client_error';\n      error: Error;\n    }\n  | {\n      type: 'client_log';\n      level: 'trace' | 'info' | 'warn' | 'log' | 'group' | 'groupCollapsed' | 'groupEnd' | 'debug';\n      data: Array<unknown>;\n      mode: 'BRIDGE' | 'NOBRIDGE';\n    }\n  | {\n      type: 'resolver_warning';\n      message: string;\n    }\n  | {\n      type: 'server_listening';\n      port: number;\n      address: string;\n      family: string;\n    }\n  | {\n      type: 'transformer_load_started';\n    }\n  | {\n      type: 'transformer_load_done';\n    }\n  | {\n      type: 'transformer_load_failed';\n      error: Error;\n    }\n  | {\n      type: 'watcher_health_check_result';\n      result: HealthCheckResult;\n    }\n  | {\n      type: 'watcher_status';\n      status: WatcherStatus;\n    };\n\nexport interface MetroConfig {\n  readonly projectRoot?: string;\n  readonly watchFolders?: string[];\n  readonly cacheStores?: any;\n  readonly resolver?: Partial<ResolverConfig>;\n  readonly server?: any;\n  readonly serializer?: object & {\n    getPolyfills?: () => string[];\n  };\n  readonly symbolicator?: any;\n  readonly transformer?: any;\n  readonly watcher?: any;\n  readonly reporter?: {\n    update: (event: ReportableEvent) => void;\n  };\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/buildResult.ts",
    "content": "import type { BuildFailureResult, BuildResult, BuildSuccessResult } from '../types';\n\nexport function isBuildSuccess(result: BuildResult): result is BuildSuccessResult {\n  return 'bundle' in result;\n}\n\nexport function isBuildFailure(result: BuildResult): result is BuildFailureResult {\n  return !('bundle' in result);\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/createPluginHooksDriver.ts",
    "content": "import type { CompleteGraniteConfig } from '../schema/pluginConfig';\nimport type {\n  GranitePluginConfig,\n  GranitePluginDevHandlerArgs,\n  GranitePluginPostHandlerArgs,\n  PluginContext,\n} from '../types';\n\nexport function createPluginHooksDriver(config: CompleteGraniteConfig) {\n  const context = createPluginContext();\n  const { devServer: devServerHooks, build: buildHooks } = config.pluginHooks;\n  const baseArgs = {\n    cwd: config.cwd,\n    appName: config.appName,\n    entryFile: config.entryFile,\n    outdir: config.outdir,\n  };\n\n  return {\n    devServer: {\n      pre: async (args: Omit<GranitePluginDevHandlerArgs, keyof GranitePluginConfig>) => {\n        for (const handler of devServerHooks.preHandlers) {\n          await handler.call(context, { ...baseArgs, ...args });\n        }\n      },\n      post: async (args: Omit<GranitePluginDevHandlerArgs, keyof GranitePluginConfig>) => {\n        for (const handler of devServerHooks.postHandlers) {\n          await handler.call(context, { ...baseArgs, ...args });\n        }\n      },\n    },\n    build: {\n      pre: async () => {\n        for (const handler of buildHooks.preHandlers) {\n          await handler.call(context, { ...baseArgs });\n        }\n      },\n      post: async (args: Omit<GranitePluginPostHandlerArgs, keyof GranitePluginConfig>) => {\n        for (const handler of buildHooks.postHandlers) {\n          await handler.call(context, { ...baseArgs, ...args });\n        }\n      },\n    },\n  };\n}\n\nexport function createPluginContext(): PluginContext {\n  const meta = Object.create(null);\n  const context: PluginContext = {\n    meta,\n  };\n\n  return context;\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/flattenPlugins.spec.ts",
    "content": "import { describe, it, expect } from 'vitest';\nimport { flattenPlugins } from './flattenPlugins';\nimport type { PluginInput } from '../types';\n\ndescribe('flattenPlugins', () => {\n  it('단일 플러그인을 처리할 수 있다', async () => {\n    const plugin: PluginInput = {\n      name: 'test',\n    };\n\n    const result = await flattenPlugins(plugin);\n    expect(result).toEqual([plugin]);\n  });\n\n  it('플러그인 배열을 처리할 수 있다', async () => {\n    const plugins: PluginInput = [{ name: 'test1' }, { name: 'test2' }];\n\n    const result = await flattenPlugins(plugins);\n    expect(result).toEqual(plugins);\n  });\n\n  it('Promise로 감싸진 플러그인을 처리할 수 있다', async () => {\n    const plugin: PluginInput = {\n      name: 'test',\n    };\n\n    const result = await flattenPlugins(Promise.resolve(plugin));\n    expect(result).toEqual([plugin]);\n  });\n\n  it('Promise로 감싸진 플러그인 배열을 처리할 수 있다', async () => {\n    const plugins: PluginInput = [{ name: 'test1' }, { name: 'test2' }];\n\n    const result = await flattenPlugins(await Promise.resolve(plugins));\n    expect(result).toEqual(plugins);\n  });\n\n  it('중첩된 플러그인 배열을 평탄화할 수 있다', async () => {\n    const plugins = [{ name: 'test1' }, { name: 'test2' }];\n    const plugins2 = Promise.resolve([{ name: 'test3' }, { name: 'test4' }]);\n\n    const nestedPlugins: PluginInput = [plugins, plugins2 as any];\n    const result = await flattenPlugins(nestedPlugins);\n    expect(result).toEqual([{ name: 'test1' }, { name: 'test2' }, { name: 'test3' }, { name: 'test4' }]);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/flattenPlugins.ts",
    "content": "import type { PluginInput, GranitePluginCore } from '../types';\n\nexport const flattenPlugins = async (plugin: PluginInput): Promise<GranitePluginCore[]> => {\n  if (Array.isArray(plugin)) {\n    const flattened = await Promise.all(\n      plugin.map(async (p) => {\n        if (p instanceof Promise) {\n          const resolved = await p;\n          if (Array.isArray(resolved)) {\n            const nested = await Promise.all(resolved.map(flattenPlugins));\n            return nested.flat();\n          }\n          return flattenPlugins(resolved);\n        }\n        return flattenPlugins(p);\n      })\n    );\n    return flattened.flat();\n  }\n\n  const resolved = await plugin;\n  return [resolved];\n};\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeBabel.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { mergeBabel } from './mergeBabel';\n\ndescribe('mergeBabel', () => {\n  it('returns undefined when both source and target are undefined', () => {\n    const result = mergeBabel(undefined, undefined);\n    expect(result).toBeUndefined();\n  });\n\n  it('returns target when source is undefined', () => {\n    const target = { presets: ['preset1'] };\n    const result = mergeBabel(undefined, target);\n    expect(result).toEqual(target);\n  });\n\n  it('returns source when target is undefined', () => {\n    const source = { presets: ['preset1'] };\n    const result = mergeBabel(source, undefined);\n    expect(result).toEqual(source);\n  });\n\n  it('merges presets arrays', () => {\n    const source = { presets: ['preset1'] };\n    const target = { presets: ['preset2'] };\n    const result = mergeBabel(source, target);\n\n    expect(result?.presets).toEqual(['preset1', 'preset2']);\n  });\n\n  it('merges plugins arrays', () => {\n    const source = { plugins: ['plugin1'] };\n    const target = { plugins: ['plugin2'] };\n    const result = mergeBabel(source, target);\n\n    expect(result?.plugins).toEqual(['plugin1', 'plugin2']);\n  });\n\n  it('merges conditions arrays', () => {\n    const condition1 = (code: string) => code.includes('test1');\n    const condition2 = (code: string) => code.includes('test2');\n\n    const source = { conditions: [condition1] };\n    const target = { conditions: [condition2] };\n    const result = mergeBabel(source, target);\n\n    expect(result?.conditions).toHaveLength(2);\n    expect(result?.conditions).toContain(condition1);\n    expect(result?.conditions).toContain(condition2);\n  });\n\n  it('handles missing arrays gracefully', () => {\n    const source = { presets: ['preset1'] };\n    const target = { plugins: ['plugin1'] };\n    const result = mergeBabel(source, target);\n\n    expect(result?.presets).toEqual(['preset1']);\n    expect(result?.plugins).toEqual(['plugin1']);\n  });\n\n  it('overrides scalar properties', () => {\n    const source = { configFile: 'babel.config.js' };\n    const target = { configFile: 'babel.config.json' };\n    const result = mergeBabel(source, target);\n\n    expect(result?.configFile).toBe('babel.config.json');\n  });\n\n  it('performs complete merge with all properties', () => {\n    const condition1 = (code: string) => code.includes('test1');\n    const condition2 = (code: string) => code.includes('test2');\n\n    const source = {\n      configFile: 'babel.config.js',\n      presets: ['preset1'],\n      plugins: ['plugin1'],\n      conditions: [condition1],\n    };\n\n    const target = {\n      configFile: 'babel.config.json',\n      presets: ['preset2'],\n      plugins: ['plugin2'],\n      conditions: [condition2],\n    };\n\n    const result = mergeBabel(source, target);\n\n    expect(result).toEqual({\n      configFile: 'babel.config.json',\n      presets: ['preset1', 'preset2'],\n      plugins: ['plugin1', 'plugin2'],\n      conditions: [condition1, condition2],\n    });\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeBabel.ts",
    "content": "import type { BuildConfig } from '../types';\n\nexport function mergeBabel(source: BuildConfig['babel'], target: BuildConfig['babel']): BuildConfig['babel'] {\n  if (!(source || target)) {\n    return undefined;\n  }\n\n  if (source == null) {\n    return target;\n  }\n\n  if (target == null) {\n    return source;\n  }\n\n  return {\n    ...source,\n    ...target,\n    presets: [...(source.presets ?? []), ...(target.presets ?? [])],\n    plugins: [...(source.plugins ?? []), ...(target.plugins ?? [])],\n    conditions: [...(source.conditions ?? []), ...(target.conditions ?? [])],\n  };\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeBuildConfigs.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport type { BuildConfig } from '../types';\nimport { mergeBuildConfigs } from './mergeBuildConfigs';\n\ndescribe('mergeBuildConfigs', () => {\n  it('빌드 설정 2개를 머지할 수 있다.', () => {\n    const config1: BuildConfig = {\n      platform: 'ios',\n      entry: './index.js',\n      outfile: './dist/index.js',\n      resolver: {\n        alias: [{ from: 'a', to: 'b' }],\n      },\n      esbuild: {\n        banner: {\n          js: 'console.log(\"banner\");',\n        },\n        inject: ['foo'],\n      },\n      swc: {\n        plugins: [['plugin-a', {}]],\n      },\n    };\n\n    const config2: Partial<BuildConfig> = {\n      resolver: {\n        alias: [{ from: 'c', to: 'd' }],\n      },\n      esbuild: {\n        minify: false,\n        banner: {\n          js: 'console.log(\"banner2\");',\n        },\n      },\n      swc: {\n        plugins: [['plugin-b', {}]],\n      },\n    };\n\n    const merged = mergeBuildConfigs(config1, config2);\n\n    expect(merged.resolver?.alias).toHaveLength(2);\n    expect(merged.swc?.plugins).toHaveLength(2);\n    expect(merged).toMatchInlineSnapshot(`\n      {\n        \"babel\": undefined,\n        \"entry\": \"./index.js\",\n        \"esbuild\": {\n          \"banner\": {\n            \"js\": \"console.log(\"banner\");\n      console.log(\"banner2\");\",\n          },\n          \"define\": {},\n          \"inject\": [\n            \"foo\",\n          ],\n          \"minify\": false,\n          \"prelude\": [],\n        },\n        \"extra\": undefined,\n        \"outfile\": \"./dist/index.js\",\n        \"platform\": \"ios\",\n        \"resolver\": {\n          \"alias\": [\n            {\n              \"from\": \"a\",\n              \"to\": \"b\",\n            },\n            {\n              \"from\": \"c\",\n              \"to\": \"d\",\n            },\n          ],\n          \"protocols\": {},\n        },\n        \"swc\": {\n          \"plugins\": [\n            [\n              \"plugin-a\",\n              {},\n            ],\n            [\n              \"plugin-b\",\n              {},\n            ],\n          ],\n        },\n        \"transformer\": undefined,\n      }\n    `);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeBuildConfigs.ts",
    "content": "import type { BuildConfig } from '../types';\nimport { mergeBabel } from './mergeBabel';\nimport { mergeEsbuild } from './mergeEsbuild';\nimport { mergeExtra } from './mergeExtra';\nimport { mergeResolver } from './mergeResolver';\nimport { mergeSwc } from './mergeSwc';\nimport { mergeTransformer } from './mergeTransformer';\n\nexport function mergeBuildConfigs(baseConfig: BuildConfig, ...otherConfigs: Partial<BuildConfig>[]): BuildConfig {\n  const mergedConfig = otherConfigs.reduce(\n    (acc, curr) => ({\n      entry: acc.entry ?? curr.entry,\n      outfile: acc.outfile ?? curr.outfile,\n      platform: acc.platform ?? curr.platform,\n      resolver: mergeResolver(acc.resolver, curr.resolver),\n      transformer: mergeTransformer(acc.transformer, curr.transformer),\n      esbuild: mergeEsbuild(acc.esbuild, curr.esbuild),\n      swc: mergeSwc(acc.swc, curr.swc),\n      babel: mergeBabel(acc.babel, curr.babel),\n      extra: mergeExtra(acc.extra, curr.extra),\n    }),\n    baseConfig\n  );\n\n  return mergedConfig as BuildConfig;\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeConfig.spec.ts",
    "content": "import { vitest, describe, expect, it } from 'vitest';\nimport { mergeConfig } from './mergeConfig';\nimport { GranitePluginCore } from '../types';\n\ndescribe('mergeConfig', () => {\n  it('merges all configuration sections', async () => {\n    const mockLoad1 = vitest.fn();\n    const mockLoad2 = vitest.fn();\n\n    const mockPluginOption = {};\n    const mockCondition1 = vitest.fn();\n    const mockCondition2 = vitest.fn();\n\n    const mockMiddleware1 = vitest.fn();\n    const mockMiddleware2 = vitest.fn();\n    const mockMiddleware3 = vitest.fn();\n    const mockMiddleware4 = vitest.fn();\n    const mockUpdate = vitest.fn();\n\n    const source: GranitePluginCore['config'] = {\n      resolver: {\n        alias: [{ from: 'src', to: './src' }],\n        protocols: {\n          custom1: {\n            load: mockLoad1,\n          },\n        },\n      },\n      transformer: {\n        transformSync: vitest.fn(),\n      },\n      babel: {\n        presets: ['preset1'],\n        plugins: [['plugin1', mockPluginOption], 'plugin2'],\n        conditions: [mockCondition1],\n      },\n      esbuild: {\n        minify: true,\n        banner: {\n          js: 'console.log(\"banner 1\");',\n        },\n        prelude: ['source.js'],\n      },\n      devServer: {\n        middlewares: [mockMiddleware1],\n      },\n      metro: {\n        middlewares: [mockMiddleware2],\n        resolver: {\n          blockList: [/foo/, /bar/],\n        },\n        serializer: {\n          getPolyfills: () => ['metro-prelude-1.js'],\n        },\n      },\n    };\n\n    const target: GranitePluginCore['config'] = {\n      resolver: {\n        alias: [{ from: 'utils', to: './utils' }],\n        protocols: {\n          custom2: {\n            load: mockLoad2,\n          },\n        },\n      },\n      transformer: {\n        transformAsync: vitest.fn(),\n      },\n      babel: {\n        presets: ['preset2'],\n        plugins: ['plugin3'],\n        conditions: [mockCondition2],\n      },\n      esbuild: {\n        sourcemap: true,\n        banner: {\n          js: 'console.log(\"banner 2\");',\n        },\n        prelude: ['target.js'],\n      },\n      swc: {\n        plugins: [['plugin1', {}]],\n      },\n      devServer: {\n        middlewares: [mockMiddleware3],\n      },\n      metro: {\n        middlewares: [mockMiddleware4],\n        resolver: {\n          blockList: /baz/,\n        },\n        serializer: {\n          getPolyfills: () => ['metro-prelude-2.js'],\n        },\n        reporter: {\n          update: mockUpdate,\n        },\n      },\n    };\n\n    const result = await mergeConfig({\n      configs: [source, target],\n      context: { command: 'build' },\n    });\n\n    expect(result).toEqual({\n      resolver: {\n        alias: [\n          { from: 'src', to: './src' },\n          { from: 'utils', to: './utils' },\n        ],\n        protocols: {\n          custom1: {\n            load: mockLoad1,\n          },\n          custom2: {\n            load: mockLoad2,\n          },\n        },\n      },\n      transformer: {\n        transformSync: expect.any(Function),\n        transformAsync: expect.any(Function),\n      },\n      babel: {\n        presets: ['preset1', 'preset2'],\n        conditions: [mockCondition1, mockCondition2],\n        plugins: [['plugin1', mockPluginOption], 'plugin2', 'plugin3'],\n      },\n      esbuild: {\n        minify: true,\n        sourcemap: true,\n        define: {},\n        inject: [],\n        banner: {\n          js: 'console.log(\"banner 1\");\\nconsole.log(\"banner 2\");',\n        },\n        prelude: ['source.js', 'target.js'],\n      },\n      swc: {\n        plugins: [['plugin1', {}]],\n      },\n      devServer: {\n        middlewares: [mockMiddleware1, mockMiddleware3],\n      },\n      metro: {\n        middlewares: [mockMiddleware2, mockMiddleware4],\n        resolver: {\n          blockList: [/foo/, /bar/, /baz/],\n        },\n        reporter: {\n          update: mockUpdate,\n        },\n        serializer: {\n          getPolyfills: expect.any(Function),\n        },\n      },\n      extra: undefined,\n    });\n\n    expect(result?.metro?.serializer?.getPolyfills?.()).toEqual(['metro-prelude-1.js', 'metro-prelude-2.js']);\n  });\n\n  it('handles partial configurations', async () => {\n    const source: GranitePluginCore['config'] = {\n      babel: { presets: ['preset1'] },\n    };\n\n    const target: GranitePluginCore['config'] = {\n      esbuild: { minify: true },\n    };\n\n    const result = await mergeConfig({\n      configs: [source, target],\n      context: { command: 'build' },\n    });\n\n    expect(result).toEqual({\n      babel: { presets: ['preset1'] },\n      esbuild: { minify: true },\n      resolver: undefined,\n      transformer: undefined,\n      swc: undefined,\n      devServer: undefined,\n      metro: undefined,\n      extra: undefined,\n    });\n  });\n\n  it('preserves top-level properties', async () => {\n    const source: GranitePluginCore['config'] = {\n      extra: { customOption: 'source' },\n    };\n\n    const target: GranitePluginCore['config'] = {\n      extra: { anotherOption: 'target' },\n    };\n\n    const result = await mergeConfig({\n      configs: [source, target],\n      context: { command: 'build' },\n    });\n\n    expect(result?.extra).toEqual({\n      customOption: 'source',\n      anotherOption: 'target',\n    });\n  });\n\n  it('handles complex nested configuration merge', async () => {\n    const mockLoad = vitest.fn();\n    const mockTransform = vitest.fn();\n\n    const mockMiddleware1 = vitest.fn();\n    const mockMiddleware2 = vitest.fn();\n\n    const source: GranitePluginCore['config'] = {\n      resolver: {\n        alias: [{ from: '@components', to: './src/components' }],\n        protocols: {\n          'custom:': { load: mockLoad },\n        },\n      },\n      transformer: {\n        transformSync: mockTransform,\n      },\n      babel: {\n        presets: ['@babel/preset-react'],\n        plugins: ['babel-plugin-transform-imports'],\n      },\n      esbuild: {\n        target: 'es2020',\n        prelude: ['react-polyfill.js'],\n      },\n      swc: {\n        plugins: [['@swc/plugin-styled-components', { displayName: true }]],\n      },\n      metro: {\n        middlewares: [mockMiddleware1],\n      },\n    };\n\n    const target: GranitePluginCore['config'] = {\n      resolver: {\n        alias: [{ from: '@utils', to: './src/utils' }],\n      },\n      babel: {\n        plugins: ['babel-plugin-module-resolver'],\n      },\n      esbuild: {\n        minify: true,\n        prelude: ['core-js-polyfill.js'],\n      },\n      metro: {\n        middlewares: [mockMiddleware2],\n      },\n    };\n\n    const result = await mergeConfig({\n      configs: [source, target],\n      context: { command: 'build' },\n    });\n\n    expect(result?.resolver?.alias).toHaveLength(2);\n    expect(result?.babel?.presets).toEqual(['@babel/preset-react']);\n    expect(result?.babel?.plugins).toEqual(['babel-plugin-transform-imports', 'babel-plugin-module-resolver']);\n    expect(result?.esbuild?.target).toBe('es2020');\n    expect(result?.esbuild?.minify).toBe(true);\n    expect(result?.esbuild?.prelude).toEqual(['react-polyfill.js', 'core-js-polyfill.js']);\n    expect(result?.metro?.middlewares).toEqual([mockMiddleware1, mockMiddleware2]);\n  });\n\n  it('merges multiple configs', async () => {\n    const mockLoad1 = vitest.fn();\n    const mockLoad2 = vitest.fn();\n\n    const mockPluginOption = {};\n    const mockCondition1 = vitest.fn();\n    const mockCondition2 = vitest.fn();\n\n    const mockMiddleware1 = vitest.fn();\n    const mockMiddleware2 = vitest.fn();\n    const mockMiddleware3 = vitest.fn();\n    const mockMiddleware4 = vitest.fn();\n    const mockUpdate = vitest.fn();\n\n    const mockTransform1 = vitest.fn().mockImplementation((_: string, code: string) => {\n      return '// from transform 2\\n' + code;\n    });\n\n    const mockTransform2 = vitest.fn().mockImplementation((_: string, code: string) => {\n      return '// from transform 2\\n' + code;\n    });\n\n    const source: GranitePluginCore['config'] = {\n      resolver: {\n        alias: [{ from: 'src', to: './src' }],\n        protocols: {\n          custom1: {\n            load: mockLoad1,\n          },\n        },\n      },\n      transformer: {\n        transformSync: mockTransform1,\n      },\n      babel: {\n        presets: ['preset1'],\n      },\n      esbuild: {\n        banner: {\n          js: 'console.log(\"banner 1\");',\n        },\n        prelude: ['source.js'],\n      },\n      metro: {\n        middlewares: [mockMiddleware1],\n        serializer: {\n          getPolyfills: () => ['metro-prelude-1.js'],\n        },\n      },\n    };\n\n    const target1: GranitePluginCore['config'] = {\n      resolver: {\n        alias: [{ from: 'src-1', to: './src-1' }],\n        protocols: {\n          custom2: {\n            load: mockLoad2,\n          },\n        },\n      },\n      babel: {\n        presets: ['preset2'],\n        plugins: [['plugin1', mockPluginOption], 'plugin2'],\n      },\n      metro: {\n        middlewares: [mockMiddleware2],\n        resolver: {\n          blockList: [/foo/, /bar/],\n        },\n      },\n      devServer: {\n        middlewares: [mockMiddleware3],\n      },\n    };\n\n    const target2: GranitePluginCore['config'] = {\n      babel: {\n        plugins: ['plugin3'],\n        conditions: [mockCondition1],\n      },\n      swc: {\n        plugins: ['swc-plugin' as any],\n      },\n      metro: {\n        serializer: {\n          getPolyfills: () => ['metro-prelude-2.js'],\n        },\n      },\n      extra: { target2: '2' },\n    };\n\n    const target3: GranitePluginCore['config'] = {\n      transformer: {\n        transformSync: mockTransform2,\n      },\n      babel: {\n        plugins: ['plugin4'],\n        conditions: [mockCondition2],\n      },\n      esbuild: {\n        prelude: ['source-2.js'],\n        banner: {\n          js: 'console.log(\"banner 2\");',\n        },\n      },\n      metro: {\n        resolver: {\n          blockList: /baz/,\n        },\n        reporter: {\n          update: mockUpdate,\n        },\n      },\n      devServer: {\n        middlewares: [mockMiddleware4],\n      },\n      extra: { target3: '3' },\n    };\n\n    const result = await mergeConfig({\n      configs: [source, target1, target2, target3],\n      context: { command: 'build' },\n    });\n\n    expect(result).toEqual({\n      resolver: {\n        alias: [\n          { from: 'src', to: './src' },\n          { from: 'src-1', to: './src-1' },\n        ],\n        protocols: {\n          custom1: { load: mockLoad1 },\n          custom2: { load: mockLoad2 },\n        },\n      },\n      transformer: {\n        transformSync: expect.any(Function),\n        transformAsync: undefined,\n      },\n      esbuild: {\n        define: {},\n        inject: [],\n        prelude: ['source.js', 'source-2.js'],\n        banner: {\n          js: 'console.log(\"banner 1\");\\nconsole.log(\"banner 2\");',\n        },\n      },\n      swc: {\n        plugins: ['swc-plugin'],\n      },\n      babel: {\n        presets: ['preset1', 'preset2'],\n        plugins: [['plugin1', {}], 'plugin2', 'plugin3', 'plugin4'],\n        conditions: [mockCondition1, mockCondition2],\n      },\n      metro: {\n        middlewares: [mockMiddleware1, mockMiddleware2],\n        reporter: {\n          update: mockUpdate,\n        },\n        resolver: {\n          blockList: [/foo/, /bar/, /baz/],\n        },\n        serializer: {\n          getPolyfills: expect.any(Function),\n        },\n      },\n      devServer: {\n        middlewares: [mockMiddleware3, mockMiddleware4],\n      },\n      extra: { target2: '2', target3: '3' },\n    });\n  });\n\n  it('merges dynamic configs', async () => {\n    const source: GranitePluginCore['config'] = () => ({\n      babel: { presets: ['preset1'] },\n    });\n\n    const target1: GranitePluginCore['config'] = () => ({\n      babel: { presets: ['preset2'] },\n    });\n\n    const target2: GranitePluginCore['config'] = async () => ({\n      babel: { presets: ['preset3'] },\n    });\n\n    const target3: GranitePluginCore['config'] = async (context) => ({\n      babel: { presets: [context.command === 'build' ? 'build-preset' : 'serve-preset'] },\n    });\n\n    const result = await mergeConfig({\n      configs: [source, target1, target2, target3],\n      context: { command: 'build' },\n    });\n\n    expect(result?.babel?.presets).toEqual(['preset1', 'preset2', 'preset3', 'build-preset']);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeConfig.ts",
    "content": "import type { PluginConfig, PluginConfigContext } from '../types';\nimport { mergeBabel } from './mergeBabel';\nimport { mergeDevServer } from './mergeDevServer';\nimport { mergeEsbuild } from './mergeEsbuild';\nimport { mergeExtra } from './mergeExtra';\nimport { mergeMetro } from './mergeMetro';\nimport { mergeResolver } from './mergeResolver';\nimport { mergeSwc } from './mergeSwc';\nimport { mergeTransformer } from './mergeTransformer';\n\nexport interface MergeConfigOptions {\n  configs: PluginConfig[];\n  context: PluginConfigContext;\n}\n\nexport async function mergeConfig({ configs, context }: MergeConfigOptions) {\n  const [base, ...rest] = configs;\n\n  if (base == null) {\n    return undefined;\n  }\n\n  if (rest.length === 0) {\n    return resolveDynamicConfig(base, context);\n  }\n\n  return rest.reduce(\n    async (acc, curr) => {\n      const resolved = await Promise.all([acc, resolveDynamicConfig(curr, context)]);\n      const resolvedAcc = resolved[0] ?? {};\n      const resolvedCurr = resolved[1] ?? {};\n\n      return {\n        ...resolvedAcc,\n        ...resolvedCurr,\n        resolver: mergeResolver(resolvedAcc?.resolver, resolvedCurr?.resolver),\n        transformer: mergeTransformer(resolvedAcc?.transformer, resolvedCurr?.transformer),\n        esbuild: mergeEsbuild(resolvedAcc?.esbuild, resolvedCurr?.esbuild),\n        babel: mergeBabel(resolvedAcc?.babel, resolvedCurr?.babel),\n        swc: mergeSwc(resolvedAcc?.swc, resolvedCurr?.swc),\n        devServer: mergeDevServer(resolvedAcc?.devServer, resolvedCurr?.devServer),\n        metro: mergeMetro(resolvedAcc?.metro, resolvedCurr?.metro),\n        extra: mergeExtra(resolvedAcc?.extra, resolvedCurr?.extra),\n        reactNativePath: resolvedCurr?.reactNativePath ?? resolvedAcc?.reactNativePath,\n      };\n    },\n    resolveDynamicConfig(base, context)\n  );\n}\n\nasync function resolveDynamicConfig(config: PluginConfig, context: PluginConfigContext) {\n  if (typeof config === 'function') {\n    return await config(context);\n  }\n\n  return config;\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeDevServer.spec.ts",
    "content": "import { describe, expect, it, vitest } from 'vitest';\nimport { mergeDevServer } from './mergeDevServer';\n\ndescribe('mergeDevServer', () => {\n  it('should merge dev server configs', () => {\n    const middleware1 = vitest.fn();\n    const middleware2 = vitest.fn();\n    const middleware3 = vitest.fn();\n\n    const source = { middlewares: [middleware1, middleware2] };\n    const target = { middlewares: [middleware3] };\n    const result = mergeDevServer(source, target);\n\n    expect(result).toEqual({\n      middlewares: [middleware1, middleware2, middleware3],\n    });\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeDevServer.ts",
    "content": "import type { DevServerConfig } from '../types';\n\nexport function mergeDevServer(source?: DevServerConfig, target?: DevServerConfig) {\n  if (!(source || target)) {\n    return undefined;\n  }\n\n  if (source == null) {\n    return target;\n  }\n\n  if (target == null) {\n    return source;\n  }\n\n  return {\n    ...source,\n    ...target,\n    middlewares: [...(source.middlewares ?? []), ...(target.middlewares ?? [])],\n  };\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeEsbuild.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { mergeEsbuild } from './mergeEsbuild';\n\ndescribe('mergeEsbuild', () => {\n  it('returns undefined when both source and target are undefined', () => {\n    const result = mergeEsbuild(undefined, undefined);\n    expect(result).toBeUndefined();\n  });\n\n  it('returns target when source is undefined', () => {\n    const target = { minify: true };\n    const result = mergeEsbuild(undefined, target);\n    expect(result).toEqual(target);\n  });\n\n  it('returns source when target is undefined', () => {\n    const source = { minify: true };\n    const result = mergeEsbuild(source, undefined);\n    expect(result).toEqual(source);\n  });\n\n  it('merges prelude arrays', () => {\n    const source = { prelude: ['prelude1.js'] };\n    const target = { prelude: ['prelude2.js'] };\n    const result = mergeEsbuild(source, target);\n\n    expect(result?.prelude).toEqual(['prelude1.js', 'prelude2.js']);\n  });\n\n  it('handles missing prelude arrays', () => {\n    const source = { minify: true };\n    const target = { prelude: ['prelude.js'] };\n    const result = mergeEsbuild(source, target);\n\n    expect(result?.prelude).toEqual(['prelude.js']);\n    expect(result?.minify).toBe(true);\n  });\n\n  it('merges esbuild options with target overriding source', () => {\n    const source = {\n      minify: true,\n      sourcemap: false,\n      prelude: ['source.js'],\n    };\n    const target = {\n      minify: false,\n      bundle: true,\n      prelude: ['target.js'],\n    };\n    const result = mergeEsbuild(source, target);\n\n    expect(result?.minify).toBe(false);\n    expect(result?.sourcemap).toBe(false);\n    expect(result?.bundle).toBe(true);\n    expect(result?.prelude).toEqual(['source.js', 'target.js']);\n  });\n\n  it('preserves all esbuild build options', () => {\n    const source = {\n      target: 'es2020',\n      format: 'esm' as const,\n      banner: {\n        js: 'console.log(\"banner 1\");',\n      },\n      define: {\n        __DEV__: 'true',\n      },\n      inject: ['react-polyfill.js', 'core-js-polyfill.js'],\n      prelude: ['polyfill.js'],\n    };\n    const target = {\n      outdir: 'dist',\n      splitting: true,\n      banner: {\n        js: 'console.log(\"banner 2\");',\n      },\n      define: {\n        __DEV2__: 'true',\n      },\n      inject: ['runtime.js'],\n      prelude: ['runtime.js'],\n    };\n    const result = mergeEsbuild(source, target);\n\n    expect(result).toEqual({\n      target: 'es2020',\n      format: 'esm',\n      outdir: 'dist',\n      splitting: true,\n      prelude: ['polyfill.js', 'runtime.js'],\n      banner: {\n        js: 'console.log(\"banner 1\");\\nconsole.log(\"banner 2\");',\n      },\n      define: {\n        __DEV__: 'true',\n        __DEV2__: 'true',\n      },\n      inject: ['react-polyfill.js', 'core-js-polyfill.js', 'runtime.js'],\n    });\n  });\n\n  it('handles empty prelude arrays', () => {\n    const source = { prelude: [], minify: true };\n    const target = { prelude: ['script.js'] };\n    const result = mergeEsbuild(source, target);\n\n    expect(result?.prelude).toEqual(['script.js']);\n    expect(result?.minify).toBe(true);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeEsbuild.ts",
    "content": "import type { BuildConfig } from '../types';\n\ntype Banner = { [type: string]: string };\n\nexport function mergeEsbuild(source: BuildConfig['esbuild'], target: BuildConfig['esbuild']): BuildConfig['esbuild'] {\n  if (!(source || target)) {\n    return undefined;\n  }\n\n  if (source == null) {\n    return target;\n  }\n\n  if (target == null) {\n    return source;\n  }\n\n  return {\n    ...source,\n    ...target,\n    define: { ...source.define, ...target.define },\n    inject: [...(source.inject || []), ...(target.inject || [])],\n    prelude: [...(source.prelude || []), ...(target.prelude || [])],\n    banner: mergeBanners(source.banner ?? {}, target.banner ?? {}),\n  };\n}\n\nfunction mergeBanners(baseBanner: Banner, overrideBanner: Banner) {\n  const result = { ...baseBanner };\n\n  for (const [key, value] of Object.entries(overrideBanner)) {\n    result[key] = `${result[key] ?? ''}\\n${value}`;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeExtra.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { mergeExtra } from './mergeExtra';\n\ndescribe('mergeExtra', () => {\n  it('should return undefined when both source and target are undefined', () => {\n    const result = mergeExtra(undefined, undefined);\n    expect(result).toBeUndefined();\n  });\n\n  it('should return target when source is undefined', () => {\n    const target = { a: 1 };\n    const result = mergeExtra(undefined, target);\n    expect(result).toBe(target);\n  });\n\n  it('should return source when target is undefined', () => {\n    const source = { a: 1 };\n    const result = mergeExtra(source, undefined);\n    expect(result).toBe(source);\n  });\n\n  it('should merge objects', () => {\n    const source = { a: 1 };\n    const target = { b: 2 };\n    const result = mergeExtra(source, target);\n    expect(result).toEqual({ a: 1, b: 2 });\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeExtra.ts",
    "content": "export function mergeExtra<T1 extends object, T2 extends object>(source?: T1, target?: T2) {\n  if (!(source || target)) {\n    return undefined;\n  }\n\n  if (source == null) {\n    return target;\n  }\n\n  if (target == null) {\n    return source;\n  }\n\n  return { ...source, ...target };\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeMetro.spec.ts",
    "content": "import { vitest, describe, expect, it } from 'vitest';\nimport { mergeMetro } from './mergeMetro';\nimport type { PluginMetroConfig } from '../types';\n\ndescribe('mergeMetro', () => {\n  it('should return undefined when both source and target are undefined', () => {\n    const result = mergeMetro();\n    expect(result).toBeUndefined();\n  });\n\n  it('should return undefined when both source and target are null', () => {\n    const result = mergeMetro(undefined, undefined);\n    expect(result).toBeUndefined();\n  });\n\n  it('should return target when source is undefined', () => {\n    const target: PluginMetroConfig = { middlewares: [] };\n    const result = mergeMetro(undefined, target);\n    expect(result).toBe(target);\n  });\n\n  it('should return source when target is undefined', () => {\n    const source: PluginMetroConfig = { middlewares: [] };\n    const result = mergeMetro(source, undefined);\n    expect(result).toBe(source);\n  });\n\n  it('should merge configs with middlewares array concatenation', () => {\n    const middleware1 = vitest.fn();\n    const middleware2 = vitest.fn();\n    const middleware3 = vitest.fn();\n\n    const source: PluginMetroConfig = {\n      middlewares: [middleware1, middleware2],\n    };\n    const target: PluginMetroConfig = {\n      middlewares: [middleware3],\n    };\n\n    const result = mergeMetro(source, target);\n\n    expect(result).toEqual({\n      middlewares: [middleware1, middleware2, middleware3],\n      reporter: undefined,\n      serializer: undefined,\n    });\n  });\n\n  it('should handle empty middlewares arrays', () => {\n    const source: PluginMetroConfig = { middlewares: [] };\n    const target: PluginMetroConfig = { middlewares: [] };\n\n    const result = mergeMetro(source, target);\n\n    expect(result).toEqual({\n      middlewares: [],\n      resolver: undefined,\n      serializer: undefined,\n      reporter: undefined,\n    });\n  });\n\n  it('should handle undefined middlewares in source', () => {\n    const middleware1 = vitest.fn();\n    const source: PluginMetroConfig = {};\n    const target: PluginMetroConfig = { middlewares: [middleware1] };\n\n    const result = mergeMetro(source, target);\n\n    expect(result).toEqual({\n      middlewares: [middleware1],\n      resolver: undefined,\n      serializer: undefined,\n      reporter: undefined,\n    });\n  });\n\n  it('should handle undefined middlewares in target', () => {\n    const middleware1 = vitest.fn();\n    const source: PluginMetroConfig = { middlewares: [middleware1] };\n    const target: PluginMetroConfig = {};\n\n    const result = mergeMetro(source, target);\n\n    expect(result).toEqual({\n      middlewares: [middleware1],\n      resolver: undefined,\n      serializer: undefined,\n      reporter: undefined,\n    });\n  });\n\n  it('should merge all properties from both configs', () => {\n    const middleware1 = vitest.fn();\n    const middleware2 = vitest.fn();\n    const update1 = vitest.fn();\n    const update2 = vitest.fn();\n\n    const source: PluginMetroConfig = {\n      middlewares: [middleware1],\n      resolver: {\n        blockList: [/foo/, /bar/],\n      },\n      serializer: {\n        getPolyfills: () => ['./polyfill-1.js'],\n      },\n      reporter: {\n        update: update1,\n      },\n    };\n    const target: PluginMetroConfig = {\n      middlewares: [middleware2],\n      resolver: {\n        blockList: /baz/,\n      },\n      serializer: {\n        getPolyfills: () => ['./polyfill-2.js', './polyfill-3.js'],\n      },\n      reporter: {\n        update: update2,\n      },\n    };\n\n    const result = mergeMetro(source, target);\n\n    expect(result).toEqual({\n      middlewares: [middleware1, middleware2],\n      resolver: {\n        blockList: [/foo/, /bar/, /baz/],\n      },\n      serializer: {\n        getPolyfills: expect.any(Function),\n      },\n      reporter: {\n        update: expect.any(Function),\n      },\n    });\n\n    // Serializer\n    expect(result?.serializer?.getPolyfills?.()).toEqual(['./polyfill-1.js', './polyfill-2.js', './polyfill-3.js']);\n\n    // Reporter\n    result?.reporter?.update?.({} as any);\n    expect(update1).toHaveBeenCalledTimes(1);\n    expect(update2).toHaveBeenCalledTimes(1);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeMetro.ts",
    "content": "import { isNotNil } from 'es-toolkit';\nimport type { PluginMetroConfig } from '../types';\n\nexport function mergeMetro(source?: PluginMetroConfig, target?: PluginMetroConfig): PluginMetroConfig | undefined {\n  if (!(source || target)) {\n    return undefined;\n  }\n\n  if (source == null) {\n    return target;\n  }\n\n  if (target == null) {\n    return source;\n  }\n\n  return {\n    ...source,\n    ...target,\n    middlewares: [...(source.middlewares || []), ...(target.middlewares || [])],\n    resolver: mergeResolver(source.resolver, target.resolver),\n    serializer: mergeSerializer(source.serializer, target.serializer),\n    reporter: mergeReporter(source.reporter, target.reporter),\n  };\n}\n\nfunction mergeResolver(\n  source?: PluginMetroConfig['resolver'],\n  target?: PluginMetroConfig['resolver']\n): PluginMetroConfig['resolver'] {\n  if (!(source || target)) {\n    return undefined;\n  }\n\n  if (source == null) {\n    return target;\n  }\n\n  if (target == null) {\n    return source;\n  }\n\n  return {\n    ...source,\n    ...target,\n    blockList: [\n      ...((Array.isArray(source.blockList) ? source.blockList : [source.blockList]) || []),\n      ...((Array.isArray(target.blockList) ? target.blockList : [target.blockList]) || []),\n    ].filter(isNotNil),\n  };\n}\n\nfunction mergeSerializer(\n  source?: PluginMetroConfig['serializer'],\n  target?: PluginMetroConfig['serializer']\n): PluginMetroConfig['serializer'] {\n  if (!(source || target)) {\n    return undefined;\n  }\n\n  if (source == null) {\n    return target;\n  }\n\n  if (target == null) {\n    return source;\n  }\n\n  return {\n    ...source,\n    ...target,\n    getPolyfills: () => [...(source.getPolyfills?.() || []), ...(target.getPolyfills?.() || [])],\n  };\n}\n\nfunction mergeReporter(\n  source?: PluginMetroConfig['reporter'],\n  target?: PluginMetroConfig['reporter']\n): PluginMetroConfig['reporter'] {\n  if (!(source || target)) {\n    return undefined;\n  }\n\n  if (source == null) {\n    return target;\n  }\n\n  if (target == null) {\n    return source;\n  }\n\n  return {\n    update: (event) => {\n      source.update?.(event);\n      target.update?.(event);\n    },\n  };\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeResolver.spec.ts",
    "content": "import { vitest, describe, expect, it } from 'vitest';\nimport { mergeResolver } from './mergeResolver';\n\ndescribe('mergeResolver', () => {\n  it('returns undefined when both source and target are undefined', () => {\n    const result = mergeResolver(undefined, undefined);\n    expect(result).toBeUndefined();\n  });\n\n  it('returns target when source is undefined', () => {\n    const target = { alias: [{ from: 'a', to: 'b' }] };\n    const result = mergeResolver(undefined, target);\n    expect(result).toEqual(target);\n  });\n\n  it('returns source when target is undefined', () => {\n    const source = { alias: [{ from: 'a', to: 'b' }] };\n    const result = mergeResolver(source, undefined);\n    expect(result).toEqual(source);\n  });\n\n  it('merges alias arrays', () => {\n    const source = { alias: [{ from: 'src', to: './src' }] };\n    const target = { alias: [{ from: 'utils', to: './utils' }] };\n    const result = mergeResolver(source, target);\n\n    expect(result?.alias).toHaveLength(2);\n    expect(result?.alias).toContainEqual({ from: 'src', to: './src' });\n    expect(result?.alias).toContainEqual({ from: 'utils', to: './utils' });\n  });\n\n  it('merges protocols objects', () => {\n    const mockLoad = vitest.fn();\n    const mockResolve = vitest.fn();\n\n    const source = {\n      protocols: {\n        custom1: { load: mockLoad },\n      },\n    };\n    const target = {\n      protocols: {\n        custom2: { load: mockLoad, resolve: mockResolve },\n      },\n    };\n    const result = mergeResolver(source, target);\n\n    expect(result?.protocols).toHaveProperty('custom1');\n    expect(result?.protocols).toHaveProperty('custom2');\n    expect(result?.protocols?.['custom1']?.load).toBe(mockLoad);\n    expect(result?.protocols?.['custom2']?.resolve).toBe(mockResolve);\n  });\n\n  it('handles missing properties gracefully', () => {\n    const source = { alias: [{ from: 'src', to: './src' }] };\n    const target = { protocols: { custom: { load: vitest.fn() } } };\n    const result = mergeResolver(source, target);\n\n    expect(result?.alias).toEqual([{ from: 'src', to: './src' }]);\n    expect(result?.protocols).toEqual({ custom: { load: expect.any(Function) } });\n  });\n\n  it('handles empty arrays and objects', () => {\n    const source = { alias: [], protocols: {} };\n    const target = { alias: [{ from: 'utils', to: './utils' }] };\n    const result = mergeResolver(source, target);\n\n    expect(result?.alias).toEqual([{ from: 'utils', to: './utils' }]);\n    expect(result?.protocols).toEqual({});\n  });\n\n  it('overwrites protocols with same key', () => {\n    const mockLoad1 = vitest.fn();\n    const mockLoad2 = vitest.fn();\n\n    const source = { protocols: { custom: { load: mockLoad1 } } };\n    const target = { protocols: { custom: { load: mockLoad2 } } };\n    const result = mergeResolver(source, target);\n\n    expect(result?.protocols?.['custom']?.load).toBe(mockLoad2);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeResolver.ts",
    "content": "import type { BuildConfig } from '../types';\n\nexport function mergeResolver(\n  source: BuildConfig['resolver'],\n  target: BuildConfig['resolver']\n): BuildConfig['resolver'] {\n  if (!(source || target)) {\n    return undefined;\n  }\n\n  if (source == null) {\n    return target;\n  }\n\n  if (target == null) {\n    return source;\n  }\n\n  return {\n    alias: [...(source.alias ?? []), ...(target.alias ?? [])],\n    protocols: {\n      ...source.protocols,\n      ...target.protocols,\n    },\n  };\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeSwc.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { mergeSwc } from './mergeSwc';\n\ndescribe('mergeSwc', () => {\n  it('returns undefined when both source and target are undefined', () => {\n    const result = mergeSwc(undefined, undefined);\n    expect(result).toBeUndefined();\n  });\n\n  it('returns target when source is undefined', () => {\n    const target = { plugins: [['plugin1', {}]] as any[] };\n    const result = mergeSwc(undefined, target);\n    expect(result).toEqual(target);\n  });\n\n  it('returns source when target is undefined', () => {\n    const source = { plugins: [['plugin1', {}]] as any[] };\n    const result = mergeSwc(source, undefined);\n    expect(result).toEqual(source);\n  });\n\n  it('merges plugins arrays', () => {\n    const source = { plugins: [['plugin1', { option: 1 }]] as any[] };\n    const target = { plugins: [['plugin2', { option: 2 }]] as any[] };\n    const result = mergeSwc(source, target);\n\n    expect(result?.plugins).toHaveLength(2);\n    expect(result?.plugins).toContainEqual(['plugin1', { option: 1 }]);\n    expect(result?.plugins).toContainEqual(['plugin2', { option: 2 }]);\n  });\n\n  it('handles missing plugins arrays', () => {\n    const source = { customOption: 'value' } as any;\n    const target = { plugins: [['plugin1', {}]] as any[] };\n    const result = mergeSwc(source, target);\n\n    expect(result?.plugins).toEqual([['plugin1', {}]]);\n    expect((result as any)?.customOption).toBe('value');\n  });\n\n  it('handles empty plugins arrays', () => {\n    const source = { plugins: [] as any[] };\n    const target = { plugins: [['plugin1', {}]] as any[] };\n    const result = mergeSwc(source, target);\n\n    expect(result?.plugins).toEqual([['plugin1', {}]]);\n  });\n\n  it('preserves other SwcConfig properties', () => {\n    const source = {\n      plugins: [['plugin1', {}]],\n      customProperty: 'source-value',\n    } as any;\n    const target = {\n      plugins: [['plugin2', {}]],\n      anotherProperty: 'target-value',\n    } as any;\n    const result = mergeSwc(source, target);\n\n    expect(result?.plugins).toHaveLength(2);\n    expect((result as any)?.customProperty).toBe('source-value');\n    expect((result as any)?.anotherProperty).toBe('target-value');\n  });\n\n  it('handles complex plugin configurations', () => {\n    const source = {\n      plugins: [\n        [\n          '@swc/plugin-transform-imports',\n          {\n            lodash: { transform: 'lodash/${member}' },\n          },\n        ],\n      ] as any[],\n    };\n    const target = {\n      plugins: [\n        [\n          '@swc/plugin-styled-components',\n          {\n            displayName: true,\n          },\n        ],\n      ] as any[],\n    };\n    const result = mergeSwc(source, target);\n\n    expect(result?.plugins).toHaveLength(2);\n    expect(result?.plugins).toContainEqual([\n      '@swc/plugin-transform-imports',\n      { lodash: { transform: 'lodash/${member}' } },\n    ]);\n    expect(result?.plugins).toContainEqual(['@swc/plugin-styled-components', { displayName: true }]);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeSwc.ts",
    "content": "import type { BuildConfig } from '../types';\n\nexport function mergeSwc(source: BuildConfig['swc'], target: BuildConfig['swc']): BuildConfig['swc'] {\n  if (!(source || target)) {\n    return undefined;\n  }\n\n  if (source == null) {\n    return target;\n  }\n\n  if (target == null) {\n    return source;\n  }\n\n  return {\n    ...source,\n    ...target,\n    plugins: [...(source.plugins || []), ...(target.plugins || [])],\n  };\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeTransformer.spec.ts",
    "content": "import { vitest, describe, expect, it } from 'vitest';\nimport { mergeTransformer } from './mergeTransformer';\n\ndescribe('mergeTransformer', () => {\n  it('returns undefined when both source and target are undefined', () => {\n    const result = mergeTransformer(undefined, undefined);\n    expect(result).toBeUndefined();\n  });\n\n  it('returns target when source is undefined', () => {\n    const mockTransform = vitest.fn();\n    const target = { transformSync: mockTransform };\n    const result = mergeTransformer(undefined, target);\n    expect(result).toEqual(target);\n  });\n\n  it('returns source when target is undefined', () => {\n    const mockTransform = vitest.fn();\n    const source = { transformSync: mockTransform };\n    const result = mergeTransformer(source, undefined);\n    expect(result).toEqual(source);\n  });\n\n  it('creates chained transformer functions when both source and target have transformSync', () => {\n    const mockTransformSync1 = vitest.fn((_id: string, code: string) => `transformed1(${code})`);\n    const mockTransformSync2 = vitest.fn((_id: string, code: string) => `transformed2(${code})`);\n\n    const source = { transformSync: mockTransformSync1 };\n    const target = { transformSync: mockTransformSync2 };\n    const result = mergeTransformer(source, target);\n\n    const output = result?.transformSync?.('test.js', 'original code');\n\n    expect(mockTransformSync1).toHaveBeenCalledWith('test.js', 'original code');\n    expect(mockTransformSync2).toHaveBeenCalledWith('test.js', 'transformed1(original code)');\n    expect(output).toBe('transformed2(transformed1(original code))');\n  });\n\n  it('creates chained async transformer functions when both source and target have transformAsync', async () => {\n    const mockTransformAsync1 = vitest.fn(async (_id: string, code: string) => `asyncTransformed1(${code})`);\n    const mockTransformAsync2 = vitest.fn(async (_id: string, code: string) => `asyncTransformed2(${code})`);\n\n    const source = { transformAsync: mockTransformAsync1 };\n    const target = { transformAsync: mockTransformAsync2 };\n    const result = mergeTransformer(source, target);\n\n    const output = await result?.transformAsync?.('test.js', 'original code');\n\n    expect(mockTransformAsync1).toHaveBeenCalledWith('test.js', 'original code');\n    expect(mockTransformAsync2).toHaveBeenCalledWith('test.js', 'asyncTransformed1(original code)');\n    expect(output).toBe('asyncTransformed2(asyncTransformed1(original code))');\n  });\n\n  it('uses target transformSync when source has no transformSync', () => {\n    const mockTransformSync = vitest.fn((_id: string, code: string) => `transformed(${code})`);\n\n    const source = {};\n    const target = { transformSync: mockTransformSync };\n    const result = mergeTransformer(source, target);\n\n    expect(result?.transformSync).toBe(mockTransformSync);\n  });\n\n  it('uses source transformSync when target has no transformSync', () => {\n    const mockTransformSync = vitest.fn((_id: string, code: string) => `transformed(${code})`);\n\n    const source = { transformSync: mockTransformSync };\n    const target = {};\n    const result = mergeTransformer(source, target);\n\n    expect(result?.transformSync).toBe(mockTransformSync);\n  });\n\n  it('uses target transformAsync when source has no transformAsync', async () => {\n    const mockTransformAsync = vitest.fn(async (_id: string, code: string) => `asyncTransformed(${code})`);\n\n    const source = {};\n    const target = { transformAsync: mockTransformAsync };\n    const result = mergeTransformer(source, target);\n\n    expect(result?.transformAsync).toBe(mockTransformAsync);\n  });\n\n  it('uses source transformAsync when target has no transformAsync', async () => {\n    const mockTransformAsync = vitest.fn(async (_id: string, code: string) => `asyncTransformed(${code})`);\n\n    const source = { transformAsync: mockTransformAsync };\n    const target = {};\n    const result = mergeTransformer(source, target);\n\n    expect(result?.transformAsync).toBe(mockTransformAsync);\n  });\n\n  it('returns undefined for transformSync when neither source nor target have it', () => {\n    const source = {};\n    const target = {};\n    const result = mergeTransformer(source, target);\n\n    expect(result?.transformSync).toBeUndefined();\n  });\n\n  it('returns undefined for transformAsync when neither source nor target have it', () => {\n    const source = {};\n    const target = {};\n    const result = mergeTransformer(source, target);\n\n    expect(result?.transformAsync).toBeUndefined();\n  });\n\n  it('preserves original code when chained transforms return undefined', () => {\n    const mockTransformSync1 = vitest.fn(() => undefined as any);\n    const mockTransformSync2 = vitest.fn(() => undefined as any);\n\n    const source = { transformSync: mockTransformSync1 };\n    const target = { transformSync: mockTransformSync2 };\n    const result = mergeTransformer(source, target);\n\n    const output = result?.transformSync?.('test.js', 'original code');\n\n    expect(output).toBe('original code');\n  });\n\n  it('preserves original code when chained async transforms return undefined', async () => {\n    const mockTransformAsync1 = vitest.fn(async () => undefined as any);\n    const mockTransformAsync2 = vitest.fn(async () => undefined as any);\n\n    const source = { transformAsync: mockTransformAsync1 };\n    const target = { transformAsync: mockTransformAsync2 };\n    const result = mergeTransformer(source, target);\n\n    const output = await result?.transformAsync?.('test.js', 'original code');\n\n    expect(output).toBe('original code');\n  });\n\n  it('handles mixed sync and async transformations independently', async () => {\n    const mockTransformSync = vitest.fn((_id: string, code: string) => `sync(${code})`);\n    const mockTransformAsync = vitest.fn(async (_id: string, code: string) => `async(${code})`);\n\n    const source = { transformSync: mockTransformSync };\n    const target = { transformAsync: mockTransformAsync };\n    const result = mergeTransformer(source, target);\n\n    expect(result?.transformSync).toBe(mockTransformSync);\n    expect(result?.transformAsync).toBe(mockTransformAsync);\n  });\n\n  it('creates complete transformer object with both sync and async functions', () => {\n    const mockTransformSync1 = vitest.fn((_id: string, code: string) => `sync1(${code})`);\n    const mockTransformSync2 = vitest.fn((_id: string, code: string) => `sync2(${code})`);\n    const mockTransformAsync1 = vitest.fn(async (_id: string, code: string) => `async1(${code})`);\n    const mockTransformAsync2 = vitest.fn(async (_id: string, code: string) => `async2(${code})`);\n\n    const source = {\n      transformSync: mockTransformSync1,\n      transformAsync: mockTransformAsync1,\n    };\n    const target = {\n      transformSync: mockTransformSync2,\n      transformAsync: mockTransformAsync2,\n    };\n    const result = mergeTransformer(source, target);\n\n    expect(result?.transformSync).toBeDefined();\n    expect(result?.transformAsync).toBeDefined();\n\n    // Test that both chaining works\n    const syncOutput = result?.transformSync?.('test.js', 'code');\n    expect(syncOutput).toBe('sync2(sync1(code))');\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/mergeTransformer.ts",
    "content": "import type { BuildConfig, TransformSync, TransformAsync } from '../types';\n\nexport function mergeTransformer(\n  source: BuildConfig['transformer'],\n  target: BuildConfig['transformer']\n): BuildConfig['transformer'] {\n  if (!(source || target)) {\n    return undefined;\n  }\n\n  if (source == null) {\n    return target;\n  }\n\n  if (target == null) {\n    return source;\n  }\n\n  let transformSync: TransformSync | undefined;\n  let transformAsync: TransformAsync | undefined;\n\n  if (!(source.transformSync || target.transformSync)) {\n    transformSync = undefined;\n  } else if (source.transformSync && target.transformSync) {\n    transformSync = (id: string, code: string) => {\n      let src = code;\n      src = source.transformSync?.(id, src) ?? src;\n      src = target.transformSync?.(id, src) ?? src;\n      return src;\n    };\n  } else if (source.transformSync) {\n    transformSync = source.transformSync;\n  } else if (target.transformSync) {\n    transformSync = target.transformSync;\n  }\n\n  if (!(source.transformAsync || target.transformAsync)) {\n    transformAsync = undefined;\n  } else if (source.transformAsync && target.transformAsync) {\n    transformAsync = async (id: string, code: string) => {\n      let src = code;\n      src = (await source.transformAsync?.(id, src)) ?? src;\n      src = (await target.transformAsync?.(id, src)) ?? src;\n      return src;\n    };\n  } else if (source.transformAsync) {\n    transformAsync = source.transformAsync;\n  } else if (target.transformAsync) {\n    transformAsync = target.transformAsync;\n  }\n\n  return { transformSync, transformAsync };\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/resolveConfig.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { resolveConfig } from './resolveConfig';\nimport type { GranitePluginCore, PluginConfigContext } from '../types';\nimport { resolvePlugins } from './resolvePlugins';\n\ndescribe('resolveConfig', () => {\n  const CONTEXT_SHIMS: PluginConfigContext = { command: 'build' };\n  const CONFIG_SHIMS = {\n    appName: 'test',\n    cwd: '/',\n    entryFile: '/app.ts',\n    outdir: '/dist',\n    pluginHooks: {\n      build: {\n        preHandlers: [],\n        postHandlers: [],\n      },\n      devServer: {\n        preHandlers: [],\n        postHandlers: [],\n      },\n    },\n  };\n\n  function dummyPlugin(): GranitePluginCore {\n    let count = 0;\n\n    return {\n      name: 'dummy-plugin',\n      config: () => {\n        return {\n          esbuild: {\n            banner: {\n              js: `console.log('dynamic config resolved #${++count}');`,\n            },\n          },\n          babel: {\n            plugins: ['foo', 'bar', 'baz'],\n          },\n          transformer: {\n            transformSync: (_id, code) => {\n              return [code + '// replaced code'].join('\\n');\n            },\n          },\n        };\n      },\n    };\n  }\n\n  it('should return resolved config', async () => {\n    const { configs } = await resolvePlugins([dummyPlugin()]);\n\n    const result1 = await resolveConfig({ ...CONFIG_SHIMS, pluginConfigs: configs }, CONTEXT_SHIMS);\n    const result2 = await resolveConfig({ ...CONFIG_SHIMS, pluginConfigs: configs }, CONTEXT_SHIMS);\n\n    const value1 = result1.esbuild?.banner?.js;\n    const value2 = result2.esbuild?.banner?.js;\n\n    expect(value1).toMatchInlineSnapshot(`\"console.log('dynamic config resolved #1');\"`);\n    expect(value2).toMatchInlineSnapshot(`\"console.log('dynamic config resolved #2');\"`);\n    expect(value1).not.toEqual(value2);\n  });\n\n  it('should resolve metro config', async () => {\n    const { configs } = await resolvePlugins([dummyPlugin()]);\n\n    const result = await resolveConfig({ ...CONFIG_SHIMS, pluginConfigs: configs }, CONTEXT_SHIMS);\n\n    // Granite config\n    expect(result.transformer?.transformSync).toBeDefined();\n    expect(result.babel?.plugins).toEqual(['foo', 'bar', 'baz']);\n\n    // Metro config (compatibilities)\n    expect(result.metro?.transformSync).toBeDefined();\n    expect(result.transformer?.transformSync?.('file.js', 'ident')).toEqual('ident// replaced code');\n    expect(result.metro?.babelConfig?.plugins).toEqual(['foo', 'bar', 'baz']);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-core/src/utils/resolveConfig.ts",
    "content": "import { mergeConfig } from './mergeConfig';\nimport type { CompleteGraniteConfig } from '../schema/pluginConfig';\nimport type { PluginConfigContext, ResolvedMetroConfig, ResolvedPluginConfig, StaticPluginConfig } from '../types';\n\nconst EMPTY_CONFIG: ResolvedPluginConfig = {};\n\nexport async function resolveConfig(config: CompleteGraniteConfig, context: PluginConfigContext) {\n  const [base] = config.pluginConfigs;\n\n  if (base == null) {\n    return EMPTY_CONFIG;\n  }\n\n  const mergedConfig =\n    (await mergeConfig({\n      configs: config.pluginConfigs,\n      context,\n    })) ?? EMPTY_CONFIG;\n  const resolvedConfig: ResolvedPluginConfig = { ...mergedConfig, metro: resolveMetroConfig(mergedConfig) };\n\n  return resolvedConfig;\n}\n\n/**\n * Injects the some config into the metro config to ensure compatibility with the plugin config.\n */\nfunction resolveMetroConfig(pluginConfig: StaticPluginConfig): ResolvedMetroConfig {\n  const metroConfig = pluginConfig.metro ?? {};\n\n  return {\n    ...metroConfig,\n    reactNativePath: pluginConfig.reactNativePath,\n    babelConfig: pluginConfig.babel,\n    transformSync: pluginConfig?.transformer?.transformSync,\n  };\n}\n"
  },
  {
    "path": "packages/plugin-core/src/utils/resolvePlugins.ts",
    "content": "import { isNotNil } from 'es-toolkit';\nimport { flattenPlugins } from './flattenPlugins';\nimport type {\n  GranitePluginBuildPostHandler,\n  GranitePluginBuildPreHandler,\n  GranitePluginDevPostHandler,\n  GranitePluginDevPreHandler,\n  PluginInput,\n} from '../types';\n\nexport async function resolvePlugins(plugins: PluginInput) {\n  const pluginsResolved = await flattenPlugins(plugins);\n\n  return {\n    plugins: pluginsResolved,\n    configs: pluginsResolved.map((plugin) => plugin.config).filter(isNotNil),\n    pluginHooks: {\n      devServer: {\n        preHandlers: pluginsResolved\n          .filter((plugin) => plugin.dev?.order === 'pre')\n          .map((plugin) => plugin.dev?.handler as GranitePluginDevPreHandler),\n        postHandlers: pluginsResolved\n          .filter((plugin) => plugin.dev?.order === 'post')\n          .map((plugin) => plugin.dev?.handler as GranitePluginDevPostHandler),\n      },\n      build: {\n        preHandlers: pluginsResolved\n          .filter((plugin) => plugin.build?.order === 'pre')\n          .map((plugin) => plugin.build?.handler as GranitePluginBuildPreHandler),\n        postHandlers: pluginsResolved\n          .filter((plugin) => plugin.build?.order === 'post')\n          .map((plugin) => plugin.build?.handler as GranitePluginBuildPostHandler),\n      },\n    },\n  };\n}\n"
  },
  {
    "path": "packages/plugin-core/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/plugin-core/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig([\n  {\n    entry: ['src/index.ts'],\n    format: ['esm', 'cjs'],\n    dts: true,\n    fixedExtension: false,\n  },\n]);\n"
  },
  {
    "path": "packages/plugin-env/CHANGELOG.md",
    "content": "# @granite-js/plugin-env\n\n## 1.0.23\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.23\n- @granite-js/utils@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.22\n- @granite-js/utils@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.21\n- @granite-js/utils@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.20\n- @granite-js/utils@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.19\n- @granite-js/utils@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.18\n- @granite-js/utils@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.17\n- @granite-js/utils@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.16\n- @granite-js/utils@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.15\n- @granite-js/utils@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.14\n- @granite-js/utils@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.13\n- @granite-js/utils@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.12\n- @granite-js/utils@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.11\n- @granite-js/utils@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.10\n- @granite-js/utils@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.9\n- @granite-js/utils@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.8\n- @granite-js/utils@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.7\n- @granite-js/utils@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.6\n- @granite-js/utils@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.5\n- @granite-js/utils@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.4\n- @granite-js/utils@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/plugin-core@1.0.3\n  - @granite-js/utils@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [d4beb3b]\n- Updated dependencies [b325495]\n  - @granite-js/plugin-core@1.0.2\n  - @granite-js/utils@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.1\n- @granite-js/utils@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/plugin-core@1.0.0\n  - @granite-js/utils@1.0.0\n"
  },
  {
    "path": "packages/plugin-env/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/plugin-env/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/plugin-env\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@babel/core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n2. **@babel/types**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n3. **@types/babel__core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n4. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n5. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n6. **tsdown**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/rolldown/tsdown.git\n\t\n7. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n8. **@granite-js/plugin-env**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: git+https://github.com/toss/granite.git\n\t\n9. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/plugin-env/README.md",
    "content": "# @granite-js/plugin-env\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/plugin-env/package.json",
    "content": "{\n  \"name\": \"@granite-js/plugin-env\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"license\": \"Apache-2.0\",\n  \"description\": \"An env plugin for Granite\",\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"test\": \"vitest --run --coverage\",\n    \"build\": \"tsdown\"\n  },\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/plugin-env\"\n  },\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"devDependencies\": {\n    \"@babel/core\": \"7.28.5\",\n    \"@babel/types\": \"7.28.5\",\n    \"@types/babel__core\": \"^7.20.5\",\n    \"@types/node\": \"catalog:tools\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"tsdown\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\"\n  },\n  \"dependencies\": {\n    \"@granite-js/plugin-core\": \"workspace:*\",\n    \"@granite-js/utils\": \"workspace:*\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/plugin-env/src/envPlugin.ts",
    "content": "import crypto from 'crypto';\nimport fs from 'fs';\nimport { join } from 'path';\nimport type { GranitePluginCore } from '@granite-js/plugin-core';\nimport { getPackageRoot, prepareLocalDirectory } from '@granite-js/utils';\nimport { generateEnvType } from './generateEnvType';\nimport { getRuntimeEnvScript } from './getRuntimeEnvScript';\nimport type { SerializableObject } from './types';\n\ninterface EnvPluginOptions {\n  /**\n   * Automatically generate `env.d.ts` file.\n   *\n   * Defaults to `true`.\n   */\n  dts?: boolean;\n}\n\nconst DEFAULT_OPTIONS: Required<EnvPluginOptions> = {\n  dts: true,\n};\n\nexport const envPlugin = (environments: SerializableObject, options?: EnvPluginOptions): GranitePluginCore => {\n  const completeOptions = { ...DEFAULT_OPTIONS, ...options };\n  const packageRoot = getPackageRoot();\n  const script = getRuntimeEnvScript(environments);\n  const hash = crypto.createHash('sha256').update(script).digest('hex').slice(0, 8);\n\n  const localDir = prepareLocalDirectory(packageRoot);\n  const envFilePath = join(localDir, `.granite-${hash}.env.js`);\n\n  const setup = () => {\n    fs.writeFileSync(envFilePath, script, 'utf-8');\n    if (completeOptions.dts) {\n      generateEnvType(packageRoot, environments);\n    }\n  };\n\n  return {\n    name: 'env-plugin',\n    build: {\n      order: 'pre',\n      handler: setup,\n    },\n    dev: {\n      order: 'pre',\n      handler: setup,\n    },\n    config: {\n      metro: {\n        serializer: {\n          getPolyfills: () => [envFilePath],\n        },\n      },\n      esbuild: {\n        define: {\n          'import.meta.env': JSON.stringify(environments),\n        },\n      },\n      babel: {\n        plugins: [\n          /**\n           * This babel plugin is only using in Metro environment (CommonJS).\n           * Resolve `.cjs` file to avoid the error below.\n           *\n           * - `[BABEL]: You appear to be using a native ECMAScript module plugin, which is only supported when running Babel asynchronously.\n           */\n          require.resolve('./plugins/babel.cjs'),\n        ],\n      },\n    },\n  };\n};\n"
  },
  {
    "path": "packages/plugin-env/src/generateEnvType.ts",
    "content": "import fs from 'fs';\nimport { join } from 'path';\nimport { ensureSafetyInvokeSync } from '@granite-js/utils';\nimport type { SerializableObject } from './types';\n\nconst DEF_PLACEHOLDER = '$$__DEF';\nconst ENV_TYPE_TEMPLATE = `\n// Auto generated by env plugin. DO NOT EDIT.\ntype Env = {\n${DEF_PLACEHOLDER}\n};\n\ninterface ImportMeta {\n  readonly env: Env & {};\n}\n`.trim();\n\nfunction getEnvDefinitionScript(environments: SerializableObject) {\n  const defs = Object.keys(environments)\n    .map((envName) => {\n      // Add 2 spaces to indent.\n      return `  ${envName}: string;`;\n    })\n    .join('\\n');\n\n  const script = ENV_TYPE_TEMPLATE.replace(DEF_PLACEHOLDER, defs);\n\n  // Add trailing newline.\n  return script + '\\n';\n}\n\nfunction generateEnvTypeImpl(rootPath: string, environments: SerializableObject) {\n  const sourcePath = join(rootPath, 'src');\n  const stat = fs.statSync(sourcePath);\n\n  if (!stat.isDirectory()) {\n    console.warn('Failed to generate env type. <rootDir>/src directory not found.');\n    return;\n  }\n\n  fs.writeFileSync(join(sourcePath, 'env.d.ts'), getEnvDefinitionScript(environments), 'utf-8');\n}\n\nexport const generateEnvType = ensureSafetyInvokeSync(generateEnvTypeImpl);\n"
  },
  {
    "path": "packages/plugin-env/src/getRuntimeEnvScript.spec.ts",
    "content": "import vm, { type Context } from 'vm';\nimport { describe, it, expect, beforeAll } from 'vitest';\nimport { getRuntimeEnvScript } from './getRuntimeEnvScript';\n\ndescribe('getRuntimeEnvScript', () => {\n  let globalThis: any;\n  let context: ReturnType<typeof createSandboxContext>;\n\n  function createSandboxContext(contextObject?: Context) {\n    const context = vm.createContext(contextObject);\n\n    function evaluate(code: string) {\n      return new vm.Script(code).runInContext(context);\n    }\n\n    return { evaluate };\n  }\n\n  beforeAll(() => {\n    globalThis = {};\n    context = createSandboxContext({ globalThis });\n    context.evaluate(\n      getRuntimeEnvScript({\n        VALUE_1: 123,\n        VALUE_2: 'string',\n        VALUE_3: true,\n        VALUE_4: null,\n        VALUE_5: undefined,\n        VALUE_6: {},\n      })\n    );\n  });\n\n  it('should define `__granite.meta.env` in the global context', () => {\n    expect(context.evaluate('typeof globalThis.__granite.meta.env')).toBe('object');\n  });\n\n  it('should define environment variables as strings', () => {\n    expect(typeof globalThis.__granite.meta.env.VALUE_1).toBe('string');\n    expect(typeof globalThis.__granite.meta.env.VALUE_2).toBe('string');\n    expect(typeof globalThis.__granite.meta.env.VALUE_3).toBe('string');\n    expect(typeof globalThis.__granite.meta.env.VALUE_4).toBe('string');\n    expect(typeof globalThis.__granite.meta.env.VALUE_5).toBe('string');\n    expect(typeof globalThis.__granite.meta.env.VALUE_6).toBe('string');\n    expect(globalThis).toMatchInlineSnapshot(`\n      {\n        \"__granite\": {\n          \"meta\": {\n            \"env\": {\n              \"VALUE_1\": \"123\",\n              \"VALUE_2\": \"string\",\n              \"VALUE_3\": \"true\",\n              \"VALUE_4\": \"null\",\n              \"VALUE_5\": \"undefined\",\n              \"VALUE_6\": \"[object Object]\",\n            },\n          },\n        },\n      }\n    `);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-env/src/getRuntimeEnvScript.ts",
    "content": "import type { SerializableObject } from './types';\n\nexport function getRuntimeEnvScript(serializableObject: SerializableObject) {\n  const assignExpressions = Object.entries(serializableObject).map(\n    ([key, value]) => `global.__granite.meta.env['${key}'] = ${JSON.stringify(String(value))};`\n  );\n\n  return `\n  (function (global) {\n    global.__granite = global.__granite || {};\n    global.__granite.meta = global.__granite.meta || {};\n    global.__granite.meta.env = global.__granite.meta.env || {};\n    ${assignExpressions.join('\\n')}\n  })(\n    typeof globalThis !== 'undefined'\n      ? globalThis\n      : typeof global !== 'undefined'\n      ? global\n      : typeof window !== 'undefined'\n      ? window\n      : this\n  );\n  `;\n}\n"
  },
  {
    "path": "packages/plugin-env/src/index.ts",
    "content": "export { envPlugin as env } from './envPlugin';\n"
  },
  {
    "path": "packages/plugin-env/src/plugins/babel.spec.ts",
    "content": "import * as babel from '@babel/core';\nimport { describe, it, expect } from 'vitest';\nimport plugin from './babel.js';\n\ndescribe('babel plugin', () => {\n  it('should replace import.meta.env.<PROPERTY> with global.__granite.meta.env.<PROPERTY>', () => {\n    const code = ['global.__granite.meta.env;', 'import.meta.env.MY_VAL;', `import.meta.env['MY_VAL'];`].join('\\n');\n    const result = babel.transform(code, { plugins: [plugin] });\n    expect(result?.code).toMatchInlineSnapshot(`\n      \"global.__granite.meta.env;\n      global.__granite.meta.env.MY_VAL;\n      global.__granite.meta.env['MY_VAL'];\"\n    `);\n  });\n\n  it('should skip if the node is not import.meta.env.<PROPERTY>', () => {\n    const code = ['import.meta.foo.MY_VAL;', `import.meta.foo['MY_VAL'];`].join('\\n');\n    const result = babel.transform(code, { plugins: [plugin] });\n    expect(result?.code).toBe(code);\n    expect(result?.code).toMatchInlineSnapshot(`\n      \"import.meta.foo.MY_VAL;\n      import.meta.foo['MY_VAL'];\"\n    `);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-env/src/plugins/babel.ts",
    "content": "import { PluginObj } from '@babel/core';\nimport type * as BabelTypes from '@babel/types';\n\nconst GLOBAL_NAMESPACE = '__granite';\n\nexport default function replaceImportMetaEnv({ types: t }: { types: typeof BabelTypes }): PluginObj {\n  function isImportMetaEnv(node: BabelTypes.Node): node is BabelTypes.MemberExpression {\n    if (!t.isMemberExpression(node)) {\n      return false;\n    }\n    if (!t.isMetaProperty(node.object)) {\n      return false;\n    }\n    if (!t.isIdentifier(node.property)) {\n      return false;\n    }\n    return node.object.meta.name === 'import' && node.object.property.name === 'meta' && node.property.name === 'env';\n  }\n\n  return {\n    name: 'replace-import-meta-env',\n    visitor: {\n      MemberExpression(path) {\n        const node = path.node;\n\n        if (isImportMetaEnv(node)) {\n          let replacement: BabelTypes.MemberExpression | BabelTypes.OptionalMemberExpression = t.memberExpression(\n            t.memberExpression(\n              t.memberExpression(t.identifier('global'), t.identifier(GLOBAL_NAMESPACE)),\n              t.identifier('meta')\n            ),\n            node.property,\n            node.computed\n          );\n\n          if (node.optional) {\n            replacement = t.optionalMemberExpression(\n              replacement.object,\n              replacement.property as BabelTypes.Identifier,\n              replacement.computed,\n              true\n            );\n          }\n\n          path.replaceWith(replacement);\n        }\n      },\n    },\n  };\n}\n"
  },
  {
    "path": "packages/plugin-env/src/types.ts",
    "content": "export interface SerializableObject {\n  [key: string]: string | number | boolean | null | undefined | SerializableObject;\n}\n"
  },
  {
    "path": "packages/plugin-env/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/plugin-env/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig([\n  {\n    entry: ['src/index.ts'],\n    format: ['esm', 'cjs'],\n    dts: true,\n    external: ['./plugins/babel.cjs'],\n    fixedExtension: false,\n  },\n  {\n    entry: ['src/plugins/babel.ts'],\n    format: ['cjs'],\n    outDir: 'dist/plugins',\n    dts: false,\n    fixedExtension: false,\n  },\n]);\n"
  },
  {
    "path": "packages/plugin-env/vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  test: {\n    include: ['src/**/*.spec.ts'],\n  },\n});\n"
  },
  {
    "path": "packages/plugin-hermes/CHANGELOG.md",
    "content": "# @granite-js/plugin-hermes\n\n## 1.0.23\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.23\n- @granite-js/utils@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.22\n- @granite-js/utils@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.21\n- @granite-js/utils@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.20\n- @granite-js/utils@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.19\n- @granite-js/utils@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.18\n- @granite-js/utils@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.17\n- @granite-js/utils@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.16\n- @granite-js/utils@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.15\n- @granite-js/utils@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.14\n- @granite-js/utils@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.13\n- @granite-js/utils@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.12\n- @granite-js/utils@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.11\n- @granite-js/utils@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.10\n- @granite-js/utils@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.9\n- @granite-js/utils@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.8\n- @granite-js/utils@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.7\n- @granite-js/utils@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.6\n- @granite-js/utils@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.5\n- @granite-js/utils@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.4\n- @granite-js/utils@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/plugin-core@1.0.3\n  - @granite-js/utils@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [d4beb3b]\n- Updated dependencies [b325495]\n  - @granite-js/plugin-core@1.0.2\n  - @granite-js/utils@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.1\n- @granite-js/utils@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/plugin-core@1.0.0\n  - @granite-js/utils@1.0.0\n"
  },
  {
    "path": "packages/plugin-hermes/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/plugin-hermes/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/plugin-hermes\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n2. **es-toolkit**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/toss/es-toolkit.git\n\t\n3. **execa**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/sindresorhus/execa.git\n\t\n4. **tsdown**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/rolldown/tsdown.git\n\t\n5. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n6. **source-map**\n\t\n   - License: BSD-3-Clause\n   - License Text: https://opensource.org/licenses/BSD-3-Clause\n   - Repository: http://github.com/mozilla/source-map.git\n\t\n7. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/plugin-hermes/README.md",
    "content": "# @granite-js/plugin-hermes\n\nHermes compilation plugin for Granite\n\n## Installation\n\n```bash\n# NPM\nnpm install @granite-js/plugin-hermes\n\n# pnpm\npnpm install @granite-js/plugin-hermes\n\n# yarn\nyarn add @granite-js/plugin-hermes\n```\n\n## Usage\n\n```ts\nimport { defineConfig } from '@granite-js/react-native/config';\nimport { hermes } from '@granite-js/plugin-hermes';\n\nexport default defineConfig({\n  plugins: [\n    hermes({\n      /**\n       * Optimization level.\n       *\n       * - `O0`: No optimization\n       * - `Og`: Optimizations suitable for debugging\n       * - `O`: Expensive optimizations\n       *\n       * Defaults to `O`.\n       */\n      optimization: 'O',\n      /**\n       * Disable warning message.\n       *\n       * Defaults to `true`.\n       */\n      disableWarning: true,\n      /**\n       * Emit source map.\n       *\n       * Defaults to `true`.\n       */\n      sourcemap: true,\n    }),\n  ],\n});\n```\n\n```ts\n// In other plugin handlers\nfunction handler() {\n  const hermesPluginResults = this.meta.hermes ?? [];\n\n  for (const hermesPluginResult of hermesPluginResults) {\n    console.log(`Hermes bytecode path: ${hermesPluginResult.hbc}`);\n    console.log(`Hermes sourcemap path: ${hermesPluginResult.hbcSourcemap ?? 'N/A'}`);\n  }\n}\n```\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/plugin-hermes/package.json",
    "content": "{\n  \"name\": \"@granite-js/plugin-hermes\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Hermes compilation plugin for Granite\",\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"test\": \"vitest --run --coverage --passWithNoTests\",\n    \"build\": \"tsdown\"\n  },\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/plugin-hermes\"\n  },\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"devDependencies\": {\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"tsdown\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\"\n  },\n  \"dependencies\": {\n    \"@granite-js/plugin-core\": \"workspace:*\",\n    \"@granite-js/utils\": \"workspace:*\",\n    \"es-toolkit\": \"^1.39.8\",\n    \"execa\": \"^5\",\n    \"source-map\": \"^0.8.0-beta.0\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/plugin-hermes/src/compileHbc.ts",
    "content": "import { isNotNil } from 'es-toolkit';\nimport execa from 'execa';\nimport type { HermesPluginOptions } from './types';\n\nexport interface CompileHbcOptions extends HermesPluginOptions {\n  /**\n   * Executable hermesc binary path.\n   */\n  hermesc: string;\n  /**\n   * JS bundle path.\n   */\n  jsBundle: string;\n  /**\n   * Output file path.\n   */\n  outfile: string;\n}\n\nexport interface CompileHbcResult {\n  hbc: string;\n  hbcSourcemap: string | null;\n}\n\nconst DEFAULT_OPTIONS: Required<Omit<HermesPluginOptions, 'binaryPath'>> = {\n  disableWarning: true,\n  optimization: 'O',\n  sourcemap: true,\n};\n\nexport async function compileHbc({\n  hermesc,\n  jsBundle,\n  outfile,\n  ...options\n}: CompileHbcOptions): Promise<CompileHbcResult> {\n  const completeOptions = { ...DEFAULT_OPTIONS, ...options };\n\n  await execa(\n    hermesc,\n    [\n      `-${completeOptions.optimization}`,\n      completeOptions.disableWarning ? '-w' : null,\n      completeOptions.sourcemap ? '-output-source-map' : null,\n      ...getBaseArguments(outfile, jsBundle),\n    ].filter(isNotNil)\n  );\n\n  return { hbc: outfile, hbcSourcemap: completeOptions.sourcemap ? `${outfile}.map` : null };\n}\n\nfunction getBaseArguments(outfile: string, jsBundle: string) {\n  return ['-emit-binary', '-out', outfile, jsBundle];\n}\n"
  },
  {
    "path": "packages/plugin-hermes/src/composeSourcemap.ts",
    "content": "import * as fs from 'fs/promises';\nimport { SourceMapConsumer, SourceMapGenerator } from 'source-map';\n\nexport async function writeComposedSourcemap(jsSourcemapPath: string, hbcSourcemapPath: string) {\n  const sourcemapContent = await composeSourcemap(jsSourcemapPath, hbcSourcemapPath);\n\n  await fs.writeFile(hbcSourcemapPath, sourcemapContent, 'utf-8');\n}\n\nasync function composeSourcemap(jsSourcemapPath: string, hbcSourcemapPath: string) {\n  const [jsSourceMapContent, hbcSourceMapContent] = await Promise.all([\n    fs.readFile(jsSourcemapPath, 'utf8'),\n    fs.readFile(hbcSourcemapPath, 'utf8'),\n  ]);\n\n  const jsMapConsumer = await new SourceMapConsumer(jsSourceMapContent);\n  const hermesMapConsumer = await new SourceMapConsumer(hbcSourceMapContent);\n\n  const generator = SourceMapGenerator.fromSourceMap(hermesMapConsumer);\n\n  generator.applySourceMap(jsMapConsumer, hermesMapConsumer.sources[0]);\n\n  return generator.toString();\n}\n"
  },
  {
    "path": "packages/plugin-hermes/src/hermesPlugin.ts",
    "content": "import { isBuildSuccess, type GranitePluginCore } from '@granite-js/plugin-core';\nimport { compileHbc, type CompileHbcResult } from './compileHbc';\nimport { writeComposedSourcemap } from './composeSourcemap';\nimport { resolveHermesBinaryPath } from './resolveHermesBinaryPath';\nimport type { HermesPluginOptions } from './types';\n\nexport const hermesPlugin = (options?: HermesPluginOptions): GranitePluginCore => {\n  const hermesc = options?.binaryPath ?? resolveHermesBinaryPath();\n\n  return {\n    name: 'hermes-plugin',\n    build: {\n      order: 'post',\n      handler: async function (config) {\n        const hermesResult: CompileHbcResult[] = [];\n        const files = config.buildResults.filter(isBuildSuccess).map(({ outfile, sourcemapOutfile }) => ({\n          jsBundle: outfile,\n          jsSourcemap: sourcemapOutfile,\n          hermesBytecode: outfile.replace(/\\.js$/, '.hbc'),\n        }));\n\n        for (const file of files) {\n          const { jsBundle, jsSourcemap, hermesBytecode } = file;\n          const { hbc, hbcSourcemap } = await compileHbc({ hermesc, jsBundle, outfile: hermesBytecode, ...options });\n\n          if (hbcSourcemap != null) {\n            await writeComposedSourcemap(jsSourcemap, hbcSourcemap);\n          }\n\n          hermesResult.push({ hbc, hbcSourcemap });\n        }\n\n        this.meta.hermes = hermesResult;\n      },\n    },\n    config: {\n      esbuild: {\n        /**\n         * Hermes doesn't need minified input.\n         * Hermes sourcemap generation logic is affected by the JS bundle string offset, so minified bundle may cause problems with sourcemaps.\n         *\n         * @see {@link https://github.com/facebook/hermes/issues/452#issuecomment-776816638}\n         * @see {@link https://github.com/facebook/hermes/issues/945#issuecomment-1975250261}\n         */\n        minify: false,\n      },\n    },\n  };\n};\n"
  },
  {
    "path": "packages/plugin-hermes/src/index.ts",
    "content": "export { hermesPlugin as hermes } from './hermesPlugin';\n"
  },
  {
    "path": "packages/plugin-hermes/src/resolveHermesBinaryPath.ts",
    "content": "import fs from 'fs';\nimport path from 'path';\nimport { getPackageRoot } from '@granite-js/utils';\n\n/**\n * Returns the Hermes OS binary folder name for the current platform.\n */\nfunction getHermesOSBin(): string {\n  switch (process.platform) {\n    case 'win32':\n      return 'win64-bin';\n    case 'darwin':\n      return 'osx-bin';\n    default:\n      return 'linux64-bin';\n  }\n}\n\n/**\n * Returns the Hermes executable name for the current platform.\n */\nfunction getHermesOSExe(): string {\n  const hermesExecutableName = 'hermesc';\n  return process.platform === 'win32' ? `${hermesExecutableName}.exe` : hermesExecutableName;\n}\n\nfunction getReactNativePackagePath(root: string): string {\n  try {\n    return path.dirname(\n      require.resolve('react-native/package.json', {\n        paths: [root],\n      })\n    );\n  } catch {\n    return path.join('node_modules', 'react-native');\n  }\n}\n\nfunction getHermesCompilerPackagePath(reactNativePath: string): string | null {\n  try {\n    return path.dirname(\n      require.resolve('hermes-compiler/package.json', {\n        paths: [reactNativePath],\n      })\n    );\n  } catch {\n    return null;\n  }\n}\n\nfunction getPackagePathFromRoot(root: string, pkgName: string): string | null {\n  try {\n    return path.dirname(\n      require.resolve(`${pkgName}/package.json`, {\n        paths: [root],\n      })\n    );\n  } catch {\n    return null;\n  }\n}\n\nfunction fileExists(file: string): boolean {\n  try {\n    return fs.statSync(file).isFile();\n  } catch {\n    return false;\n  }\n}\n\nexport function resolveHermesBinaryPath() {\n  const root = getPackageRoot();\n  const reactNativePath = getReactNativePackagePath(root);\n\n  // 1) RN 0.83+: prefer hermes-compiler package\n  const hermesCompilerPath = getHermesCompilerPackagePath(reactNativePath);\n  if (hermesCompilerPath) {\n    const engine = path.join(hermesCompilerPath, 'hermesc', getHermesOSBin(), getHermesOSExe());\n    if (fileExists(engine)) {\n      return engine;\n    }\n  }\n\n  // 2) RN 0.69+: bundled hermesc inside react-native\n  const bundledHermesEngine = path.join(reactNativePath, 'sdks', 'hermesc', getHermesOSBin(), getHermesOSExe());\n  if (fileExists(bundledHermesEngine)) {\n    return bundledHermesEngine;\n  }\n\n  // 3) hermes-engine package\n  const hermesEnginePkg = getPackagePathFromRoot(root, 'hermes-engine');\n  if (hermesEnginePkg) {\n    const engine = path.join(hermesEnginePkg, getHermesOSBin(), getHermesOSExe());\n    if (fileExists(engine)) {\n      return engine;\n    }\n  }\n\n  // 4) hermesvm package (final fallback)\n  const hermesVmPkg = getPackagePathFromRoot(root, 'hermesvm');\n  if (hermesVmPkg) {\n    const engine = path.join(hermesVmPkg, getHermesOSBin(), 'hermes');\n    if (fileExists(engine)) {\n      return engine;\n    }\n  }\n\n  // Fallback: return legacy bundled path to keep previous behavior\n  return path.join(reactNativePath, 'sdks', 'hermesc', getHermesOSBin(), getHermesOSExe());\n}\n"
  },
  {
    "path": "packages/plugin-hermes/src/types.ts",
    "content": "export interface HermesPluginOptions {\n  /**\n   * Optimization level.\n   *\n   * - `O0`: No optimization\n   * - `Og`: Optimizations suitable for debugging\n   * - `O`: Expensive optimizations\n   *\n   * Defaults to `O`.\n   */\n  optimization?: 'O0' | 'Og' | 'O';\n  /**\n   * Disable warning message.\n   *\n   * Defaults to `true`.\n   */\n  disableWarning?: boolean;\n  /**\n   * Emit source map.\n   *\n   * Defaults to `true`.\n   */\n  sourcemap?: boolean;\n  /**\n   * Path to hermesc binary.\n   *\n   * Defaults to `hermesc` in `react-native/sdks/hermesc/<platform>/hermesc`.\n   */\n  binaryPath?: string;\n}\n"
  },
  {
    "path": "packages/plugin-hermes/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/plugin-hermes/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  entry: ['src/index.ts'],\n  format: ['esm', 'cjs'],\n  dts: true,\n  fixedExtension: false,\n});\n"
  },
  {
    "path": "packages/plugin-hermes/vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  test: {\n    include: ['src/**/*.spec.ts'],\n  },\n});\n"
  },
  {
    "path": "packages/plugin-micro-frontend/CHANGELOG.md",
    "content": "# @granite-js/plugin-micro-frontend\n\n## 1.0.23\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.23\n- @granite-js/utils@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.22\n- @granite-js/utils@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.21\n- @granite-js/utils@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.20\n- @granite-js/utils@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.19\n- @granite-js/utils@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.18\n- @granite-js/utils@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.17\n- @granite-js/utils@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.16\n- @granite-js/utils@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.15\n- @granite-js/utils@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.14\n- @granite-js/utils@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.13\n- @granite-js/utils@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.12\n- @granite-js/utils@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.11\n- @granite-js/utils@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.10\n- @granite-js/utils@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.9\n- @granite-js/utils@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.8\n- @granite-js/utils@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.7\n- @granite-js/utils@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.6\n- @granite-js/utils@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.5\n- @granite-js/utils@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.4\n- @granite-js/utils@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/plugin-core@1.0.3\n  - @granite-js/utils@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [d4beb3b]\n- Updated dependencies [b325495]\n  - @granite-js/plugin-core@1.0.2\n  - @granite-js/utils@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.1\n- @granite-js/utils@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/plugin-core@1.0.0\n  - @granite-js/utils@1.0.0\n"
  },
  {
    "path": "packages/plugin-micro-frontend/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/plugin-micro-frontend/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/plugin-micro-frontend\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n2. **es-toolkit**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/toss/es-toolkit.git\n\t\n3. **tsdown**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/rolldown/tsdown.git\n\t\n4. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n5. **picocolors**\n\t\n   - License: ISC\n   - License Text: https://opensource.org/licenses/ISC\n   - Repository: git+https://github.com/alexeyraspopov/picocolors.git\n\t\n6. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/plugin-micro-frontend/README.md",
    "content": "# @granite-js/plugin-micro-frontend\n\nPlugin for sharing modules\n\n## Installation\n\n```bash\n# NPM\nnpm install @granite-js/plugin-micro-frontend\n\n# pnpm\npnpm add @granite-js/plugin-micro-frontend\n\n# yarn\nyarn add @granite-js/plugin-micro-frontend\n```\n\n## Usage\n\n```ts\nimport { defineConfig } from '@granite-js/react-native/config';\nimport { microFrontend } from '@granite-js/plugin-micro-frontend';\n\n// Example 1. Host container\nexport default defineConfig({\n  plugins: [\n    microFrontend({\n      /**\n       * Container name\n       */\n      name: 'host',\n      /**\n       * Configuration for the remote field to emulate the internal `importLazy` behavior\n       */\n      remote: {\n        host: 'localhost',\n        port: 8082,\n      },\n      /**\n       * Shared modules config\n       */\n      shared: {\n        react: {\n          /**\n           * Whether the module is eager\n           *\n           * Specifies whether the module is eager; if true, it's bundled with the host, otherwise loaded from the shared registry\n           */\n          eager: true,\n        },\n        'react-native': {\n          eager: true,\n        },\n      },\n    }),\n  ],\n});\n\n// Example 2. Remote container\nexport default defineConfig({\n  plugins: [\n    microFrontend({\n      /**\n       * Container name\n       */\n      name: 'remote',\n      /**\n       * Shared modules config\n       */\n      shared: [\n        // Libraries are loaded from the shared registry\n        'react',\n        'react-native',\n      ],\n    }),\n  ],\n});\n```\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/plugin-micro-frontend/package.json",
    "content": "{\n  \"name\": \"@granite-js/plugin-micro-frontend\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Plugin for micro frontend\",\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"test\": \"vitest --run\",\n    \"build\": \"tsdown\"\n  },\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/plugin-micro-frontend\"\n  },\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./runtime\": {\n      \"import\": {\n        \"types\": \"./dist/runtime/index.d.ts\",\n        \"default\": \"./dist/runtime/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/runtime/index.d.cts\",\n        \"default\": \"./dist/runtime/index.cjs\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\",\n    \"*.d.ts\"\n  ],\n  \"devDependencies\": {\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"tsdown\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\"\n  },\n  \"dependencies\": {\n    \"@granite-js/plugin-core\": \"workspace:*\",\n    \"@granite-js/utils\": \"workspace:*\",\n    \"es-toolkit\": \"^1.39.8\",\n    \"picocolors\": \"^1.1.1\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/runtime.d.ts",
    "content": "export * from './dist/runtime';\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/index.ts",
    "content": "export { microFrontendPlugin as microFrontend } from './microFrontendPlugin';\nexport type { MicroFrontendPluginOptions } from './types';\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/log.ts",
    "content": "import pc from 'picocolors';\n\nconst tag = pc.bold(pc.bgCyan(pc.black(' MICRO FRONTEND ')));\n\nexport function log(...args: any[]) {\n  console.log(tag, ...args);\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/microFrontendPlugin.ts",
    "content": "import * as fs from 'fs';\nimport * as path from 'path';\nimport { GranitePluginCore } from '@granite-js/plugin-core';\nimport { prepareLocalDirectory } from '@granite-js/utils';\nimport { getPreludeConfig } from './prelude';\nimport { fetchRemoteBundle } from './remote';\nimport { virtualSharedConfig } from './resolver';\nimport type { MicroFrontendPluginOptions } from './types';\nimport { intoShared } from './utils/intoShared';\n\nexport const microFrontendPlugin = async (options: MicroFrontendPluginOptions): Promise<GranitePluginCore> => {\n  const sharedConfig = intoShared(options.shared);\n  const sharedEntries = Object.entries(sharedConfig ?? {});\n  const nonEagerEntries = sharedEntries\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    .filter(([_, config]) => config.eager !== true);\n\n  const rootDir = process.cwd();\n  const preludeConfig = getPreludeConfig({ ...options, shared: sharedConfig });\n  const localDir = prepareLocalDirectory(rootDir);\n  const preludePath = path.join(localDir, 'micro-frontend-runtime.js');\n  fs.writeFileSync(preludePath, preludeConfig.preludeScript);\n\n  /**\n   * @TODO `MPACK_DEV_SERVER` flag should be removed after next version of bundle loader is released and load bundle dynamically at JS runtime.\n   */\n  if (process.env.MPACK_DEV_SERVER === 'true' && options.remote) {\n    await fetchRemoteBundle(options.remote);\n  }\n\n  /**\n   * If importing `react-native` from the shared registry, skip its prelude scripts\n   * to ensure the core is loaded only once per runtime by the host.\n   */\n  const isReactNativeShared = Boolean(nonEagerEntries.find(([libName]) => libName === 'react-native'));\n\n  const virtualShared = virtualSharedConfig(nonEagerEntries);\n\n  return {\n    name: 'micro-frontend-plugin',\n    config: {\n      extra: isReactNativeShared ? { skipReactNativePolyfills: true, skipReactNativeInitializeCore: true } : undefined,\n      resolver: {\n        alias: virtualShared.alias,\n        protocols: virtualShared.protocols,\n      },\n      esbuild: {\n        prelude: [preludePath],\n        banner: {\n          js: preludeConfig.banner,\n        },\n      },\n    },\n  };\n};\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/prelude.spec.ts",
    "content": "import { describe, it, expect } from 'vitest';\nimport { getPreludeConfig } from './prelude';\n\ndescribe('prelude', () => {\n  it('', () => {\n    const config = getPreludeConfig({\n      name: 'test',\n      remote: {\n        host: 'localhost',\n        port: 8082,\n      },\n      shared: {\n        react: {\n          eager: true,\n        },\n        'react-native': {\n          eager: true,\n        },\n      },\n    });\n\n    expect(config).toMatchInlineSnapshot(`\n      {\n        \"banner\": \"\n          if (global.__MICRO_FRONTEND__ == null) {\n            global.__MICRO_FRONTEND__ = {\n              __SHARED__: {},\n              __INSTANCES__: [],\n            };\n          }\n          \",\n        \"preludeScript\": \"import { registerShared, createContainer, exposeModule } from '@granite-js/plugin-micro-frontend/runtime';\n      const __container = createContainer('test', {\"remote\":{\"host\":\"localhost\",\"port\":8082},\"shared\":{\"react\":{\"eager\":true},\"react-native\":{\"eager\":true}}});\n\n          // react\n          import * as __mod0 from 'react';\n          registerShared('react', __mod0);\n          \n\n          // react-native\n          import * as __mod1 from 'react-native';\n          registerShared('react-native', __mod1);\n          \",\n      }\n    `);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/prelude.ts",
    "content": "import path from 'path';\nimport type { MicroFrontendPluginOptions } from './types';\n\nexport function getPreludeConfig(options: MicroFrontendPluginOptions) {\n  const sharedEntries = Object.entries(options.shared ?? {});\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const eagerEntries = sharedEntries.filter(([_, config]) => config.eager === true);\n\n  const registerStatements = eagerEntries.map(([libName], index) => {\n    const identifier = `__mod${index}`;\n    return `\n    // ${libName}\n    import * as ${identifier} from '${libName}';\n    registerShared('${libName}', ${identifier});\n    `;\n  });\n\n  const exposeStatements = Object.entries(options.exposes ?? {}).map(([exposeName, modulePath], index) => {\n    const identifier = `__expose${index}`;\n    const resolvedModulePath = path.resolve(modulePath);\n\n    return `\n    import * as ${identifier} from '${resolvedModulePath}';\n    exposeModule(__container, '${exposeName}', ${identifier});\n    `;\n  });\n\n  const preludeScript = [\n    `import { registerShared, createContainer, exposeModule } from '@granite-js/plugin-micro-frontend/runtime';`,\n    `const __container = createContainer('${options.name}', ${JSON.stringify({ remote: options.remote, shared: options.shared })});`,\n    ...registerStatements,\n    ...exposeStatements,\n  ].join('\\n');\n\n  return {\n    banner: `\n    if (global.__MICRO_FRONTEND__ == null) {\n      global.__MICRO_FRONTEND__ = {\n        __SHARED__: {},\n        __INSTANCES__: [],\n      };\n    }\n    `,\n    preludeScript,\n  };\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/remote.ts",
    "content": "import { log } from './log';\nimport type { RemoteConfig } from './types';\n\nconst FALLBACK_SCRIPT = `console.warn('[MICRO FRONTEND] Failed to fetch remote bundles. Please check if the remote dev server is running')`;\n\nexport async function fetchRemoteBundle(remote: RemoteConfig) {\n  globalThis.remoteBundles = {\n    android: FALLBACK_SCRIPT,\n    ios: FALLBACK_SCRIPT,\n  };\n\n  try {\n    log('Prefetching remote bundles for development environment...');\n    const [androidBundle, iosBundle] = await Promise.all([fetchBundle(remote, 'android'), fetchBundle(remote, 'ios')]);\n\n    globalThis.remoteBundles = {\n      android: androidBundle,\n      ios: iosBundle,\n    };\n    log('Fetch complete');\n  } catch {\n    log('Failed to fetch remote bundles. Please check if the remote dev server is running');\n  }\n}\n\nasync function fetchBundle(remote: RemoteConfig, platform: 'android' | 'ios') {\n  const response = await fetch(`http://${remote.host}:${remote.port}/index.bundle?dev=true&platform=${platform}`);\n  const bundle = await response.text();\n  return bundle;\n}\n\ndeclare global {\n  var remoteBundles: Record<'android' | 'ios', string> | null;\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/resolver.ts",
    "content": "import type { ResolverConfig } from '@granite-js/plugin-core';\n\nconst VIRTUAL_SHARED_PROTOCOL = 'virtual-shared';\n\nexport function virtualSharedConfig<Entries extends [string, object]>(moduleEntries: Entries[]) {\n  const alias: ResolverConfig['alias'] = moduleEntries.map(([libName]) => ({\n    from: libName,\n    to: `${VIRTUAL_SHARED_PROTOCOL}:${libName}`,\n    exact: true,\n  }));\n\n  const protocols: ResolverConfig['protocols'] = {\n    [VIRTUAL_SHARED_PROTOCOL]: {\n      load: function virtualSharedProtocolLoader(args: { path: string }) {\n        return {\n          loader: 'js',\n          contents: `\n          var sharedModule = global.__MICRO_FRONTEND__.__SHARED__['${args.path}'];\n\n          if (sharedModule == null) {\n            throw new Error(\"'${args.path}' is not registered in the shared registry\");\n          }\n\n          module.exports = sharedModule.get();\n          `,\n        };\n      },\n    },\n  };\n\n  return { alias, protocols: alias.length > 0 ? protocols : undefined };\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/runtime/createContainer.ts",
    "content": "import type { RemoteConfig, SharedConfig, ExposeConfig } from '../types';\nimport type { Container } from './types';\n\nexport function createContainer(\n  name: string,\n  config: { remote?: RemoteConfig; shared?: SharedConfig; exposes?: ExposeConfig }\n) {\n  if (typeof global.__MICRO_FRONTEND__.__INSTANCES__[name] === 'number') {\n    throw new Error(`'${name}' container already registered`);\n  }\n\n  const containerIndex = global.__MICRO_FRONTEND__.__INSTANCES__.length;\n  const container: Container = {\n    name,\n    config,\n    exposeMap: {},\n  };\n\n  Object.defineProperty(global.__MICRO_FRONTEND__.__INSTANCES__, name, {\n    value: containerIndex,\n    enumerable: false,\n    writable: false,\n  });\n\n  global.__MICRO_FRONTEND__.__INSTANCES__.push(container);\n\n  return container;\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/runtime/exposeModule.ts",
    "content": "import type { Container, Module } from './types';\nimport { normalizePath, toESM } from './utils';\n\nexport function exposeModule(container: Container, exposeName: string, module: Module) {\n  const normalizedExposeName = normalizePath(exposeName);\n\n  if (container.exposeMap[normalizedExposeName]) {\n    throw new Error(`'${exposeName}' is already exposed in ${container.name} container`);\n  }\n\n  Object.defineProperty(container.exposeMap, normalizedExposeName, {\n    get: () => toESM(module),\n    enumerable: true,\n  });\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/runtime/index.ts",
    "content": "export { createContainer } from './createContainer';\nexport { registerShared } from './registerShared';\nexport { exposeModule } from './exposeModule';\nexport { getContainer, parseRemotePath, importRemoteModule } from './utils';\n\nexport type { RuntimeContext, Container, Module, SharedModuleRegistry } from './types';\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/runtime/registerShared.ts",
    "content": "import type { Module } from './types';\nimport { toESM } from './utils';\n\nexport function registerShared(libName: string, module: Module) {\n  if (global.__MICRO_FRONTEND__.__SHARED__[libName]) {\n    throw new Error(`'${libName}' already registered as a shared module`);\n  }\n\n  global.__MICRO_FRONTEND__.__SHARED__[libName] = {\n    get: () => toESM(module),\n    // Always mark as loaded because we don't support lazy loading yet.\n    loaded: true,\n  };\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/runtime/runtime.spec.ts",
    "content": "import { describe, it, expect, beforeAll } from 'vitest';\nimport { createContainer } from './createContainer';\nimport { exposeModule } from './exposeModule';\nimport { registerShared } from './registerShared';\n\ndescribe('runtime', () => {\n  beforeAll(() => {\n    global.__MICRO_FRONTEND__ = {\n      __INSTANCES__: [] as any,\n      __SHARED__: {},\n    };\n  });\n\n  describe('container', () => {\n    const CONTAINER_NAME = 'test-app';\n\n    it('should register a new container', () => {\n      const container = createContainer(CONTAINER_NAME, { shared: { lib: { eager: true } } });\n\n      expect(container.name).toBe(CONTAINER_NAME);\n      expect(global.__MICRO_FRONTEND__.__INSTANCES__.length).toBe(1);\n      expect(global.__MICRO_FRONTEND__.__INSTANCES__).toMatchInlineSnapshot(`\n        [\n          {\n            \"config\": {\n              \"shared\": {\n                \"lib\": {\n                  \"eager\": true,\n                },\n              },\n            },\n            \"exposeMap\": {},\n            \"name\": \"test-app\",\n          },\n        ]\n      `);\n    });\n\n    it('should throw an error if a container is already registered', () => {\n      expect(() => createContainer(CONTAINER_NAME, { shared: { react: { eager: true } } })).toThrow();\n    });\n  });\n\n  describe('registerShared', () => {\n    it('should register a shared module', () => {\n      const mod = {};\n      registerShared('lib-name', mod);\n\n      expect(global.__MICRO_FRONTEND__.__SHARED__['lib-name']).toBeTruthy();\n      expect(global.__MICRO_FRONTEND__.__SHARED__['lib-name']?.get()).toEqual(mod);\n    });\n\n    it('should throw an error if a shared module is already registered', () => {\n      expect(() => registerShared('lib-name', {})).toThrow();\n    });\n  });\n\n  describe('exposeModule', () => {\n    it('should expose a module', () => {\n      const mod = {};\n      const container = createContainer('exposed-app-1', {});\n      exposeModule(container, './my-module', mod);\n      exposeModule(container, 'my-module/foo', mod);\n      exposeModule(container, '../../../my-module', mod);\n\n      expect(container.exposeMap['my-module']).toEqual(mod);\n      expect(container.exposeMap['my-module/foo']).toEqual(mod);\n      expect(container.exposeMap['../../../my-module']).toEqual(mod);\n    });\n\n    it('should throw an error if a module is already exposed', () => {\n      const mod = {};\n      const container = createContainer('exposed-app-2', {});\n      exposeModule(container, './my-module', mod);\n      exposeModule(container, 'my-module/foo', mod);\n      exposeModule(container, '../../../my-module', mod);\n\n      expect(() => exposeModule(container, 'my-module', mod)).toThrow();\n      expect(() => exposeModule(container, 'my-module/foo', mod)).toThrow();\n      expect(() => exposeModule(container, '../../../my-module', mod)).toThrow();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/runtime/types.ts",
    "content": "/* eslint-disable @typescript-eslint/naming-convention */\nimport type { RemoteConfig, SharedConfig } from '../types';\n\ndeclare global {\n  var __MICRO_FRONTEND__: RuntimeContext;\n}\n\nexport interface RuntimeContext {\n  __INSTANCES__: Container[] & Record<string, number>;\n  __SHARED__: SharedModuleRegistry;\n}\n\nexport interface Container {\n  name: string;\n  exposeMap: Record<string, Module>;\n  config: {\n    remote?: RemoteConfig;\n    shared?: SharedConfig;\n  };\n}\n\nexport interface SharedModuleRegistry {\n  [libName: string]: {\n    get: () => Module;\n    loaded: boolean;\n  };\n}\n\nexport type Module = any;\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/runtime/utils.spec.ts",
    "content": "import { describe, it, expect, beforeAll } from 'vitest';\nimport { createContainer } from './createContainer';\nimport { exposeModule } from './exposeModule';\nimport { normalizePath, parseRemotePath, importRemoteModule, getContainer, toESM } from './utils';\n\ndescribe('utils', () => {\n  describe('getContainer', () => {\n    beforeAll(() => {\n      global.__MICRO_FRONTEND__ = {\n        __INSTANCES__: [] as any,\n        __SHARED__: {},\n      };\n    });\n\n    it('should return the container', () => {\n      const container = createContainer('remoteApp', {});\n\n      expect(getContainer('remoteApp')).toBe(container);\n      expect(getContainer('unknown')).toBe(null);\n    });\n  });\n\n  describe('normalizePath', () => {\n    it('should normalize path', () => {\n      expect(normalizePath('./components/Button')).toBe('components/Button');\n      expect(normalizePath('components/Button')).toBe('components/Button');\n      expect(normalizePath('../../components/Button')).toBe('../../components/Button');\n    });\n  });\n\n  describe('parseRemotePath', () => {\n    it('should parse remote path', () => {\n      expect(parseRemotePath('remoteA/components/Button')).toEqual({\n        remoteName: 'remoteA',\n        modulePath: 'components/Button',\n        fullRequest: 'remoteA/components/Button',\n      });\n      expect(parseRemotePath('remoteB/./components/Button')).toEqual({\n        remoteName: 'remoteB',\n        modulePath: './components/Button',\n        fullRequest: 'remoteB/./components/Button',\n      });\n      expect(parseRemotePath('remoteC/../../components/Button')).toEqual({\n        remoteName: 'remoteC',\n        modulePath: '../../components/Button',\n        fullRequest: 'remoteC/../../components/Button',\n      });\n    });\n  });\n\n  describe('importRemoteModule', () => {\n    beforeAll(() => {\n      global.__MICRO_FRONTEND__ = {\n        __INSTANCES__: [] as any,\n        __SHARED__: {},\n      };\n    });\n\n    it('should return the exposed module', () => {\n      const Button = {};\n      const container = createContainer('remoteApp', {});\n\n      exposeModule(container, './components/Button', { default: Button });\n      exposeModule(container, '../../../components/Button', { default: Button });\n\n      // Relative path\n      expect(importRemoteModule('remoteApp/./components/Button')).toEqual(\n        expect.objectContaining({\n          default: Button,\n        })\n      );\n      expect(importRemoteModule('remoteApp/components/Button')).toEqual(\n        expect.objectContaining({\n          default: Button,\n        })\n      );\n\n      // Relative path (parent)\n      expect(importRemoteModule('remoteApp/../../../components/Button')).toEqual(\n        expect.objectContaining({\n          default: Button,\n        })\n      );\n    });\n  });\n\n  describe('toESM', () => {\n    it('should return the ESM compatible module', () => {\n      // Non-ESM compatible module\n      const module1 = { foo: 'foo' };\n\n      // ESM Compatible modules\n      const module2 = { bar: 'bar', default: {} };\n      const module3 = { baz: 'baz', default: {} };\n\n      Object.defineProperty(module2, '__esModule', { value: true, configurable: false });\n      Object.defineProperty(module3, '__esModule', { get: () => true, configurable: true });\n      expect(() => Object.defineProperty(module2, '__esModule', { value: false })).toThrowErrorMatchingInlineSnapshot(\n        `[TypeError: Cannot redefine property: __esModule]`\n      );\n      expect(() => Object.assign(module3, { __esModule: true })).toThrowErrorMatchingInlineSnapshot(\n        `[TypeError: Cannot set property __esModule of #<Object> which has only a getter]`\n      );\n\n      const result1 = toESM(module1);\n      const result2 = toESM(module2);\n      const result3 = toESM(module3);\n\n      expect(result1.__esModule).toEqual(true);\n      expect(result1.foo).toEqual('foo');\n      expect(result1.default).toEqual(module1);\n\n      expect(result2.__esModule).toEqual(true);\n      expect(result2.bar).toEqual('bar');\n\n      expect(result3.__esModule).toEqual(true);\n      expect(result3.baz).toEqual('baz');\n    });\n  });\n});\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/runtime/utils.ts",
    "content": "import type { Module } from './types';\n\nexport function getContainer(instanceName: string) {\n  const containerIndex = __MICRO_FRONTEND__.__INSTANCES__[instanceName];\n\n  return typeof containerIndex === 'number' ? __MICRO_FRONTEND__.__INSTANCES__[containerIndex]! : null;\n}\n\nexport function normalizePath(path: string) {\n  if (path.startsWith('./')) {\n    return path.slice(2);\n  }\n\n  return path;\n}\n\nexport function parseRemotePath(remotePath: string) {\n  const [remoteName, ...rest] = remotePath.split('/');\n\n  if (remoteName && rest.length > 0) {\n    return {\n      remoteName,\n      modulePath: rest.join('/'),\n      fullRequest: remotePath,\n    };\n  }\n\n  throw new Error(`Invalid remote request: ${remotePath}`);\n}\n\nexport function importRemoteModule(remoteRequestPath: string) {\n  const { remoteName, modulePath } = parseRemotePath(remoteRequestPath);\n  const container = getContainer(remoteName);\n\n  if (container == null) {\n    throw new Error(`${remoteName} container not found`);\n  }\n\n  const module = container.exposeMap[normalizePath(modulePath)];\n  if (module == null) {\n    throw new Error(`Could not resolve '${modulePath}' in ${remoteName} container`);\n  }\n\n  return module;\n}\n\nexport function toESM(module: Module) {\n  if (module.__esModule) {\n    return module;\n  }\n\n  // Add `__esModule` flag to ensure compatibility between ESM and CJS.\n  return Object.defineProperties(module, {\n    __esModule: { value: true },\n    ...(module.default == null\n      ? {\n          default: {\n            value: module,\n            enumerable: true,\n          },\n        }\n      : null),\n  });\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/types.ts",
    "content": "export interface MicroFrontendPluginOptions extends MicroFrontendOptions {\n  /**\n   * Path to react-native base directory.\n   *\n   * Defaults to project's `react-native` directory.\n   */\n  reactNativeBasePath?: string;\n}\n\nexport interface MicroFrontendOptions {\n  /**\n   * Container name\n   */\n  name: string;\n  /**\n   * Configuration for the remote field to emulate the internal `importLazy` behavior\n   */\n  remote?: RemoteConfig;\n  /**\n   * Shared modules config\n   */\n  shared?: SharedConfig | string[];\n  /**\n   * Configuration for exposing modules to other containers\n   */\n  exposes?: ExposeConfig;\n}\n\nexport interface RemoteConfig {\n  /**\n   * Host name\n   */\n  host: string;\n  /**\n   * Port number\n   */\n  port: number;\n}\n\nexport interface SharedConfig {\n  [lib: string]: {\n    /**\n     * Whether the module is eager\n     *\n     * Specifies whether the module is eager; if true, it's bundled with the host, otherwise loaded from the shared registry\n     */\n    eager?: boolean;\n  };\n}\n\nexport interface ExposeConfig {\n  [exposePath: string]: string;\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/utils/intoShared.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { intoShared } from './intoShared';\n\ndescribe('intoShared', () => {\n  it('basic cases', () => {\n    expect(intoShared(undefined)).toBeUndefined();\n\n    expect(\n      intoShared({\n        react: {\n          eager: true,\n        },\n        'react-native': {\n          eager: true,\n        },\n      })\n    ).toEqual({\n      react: { eager: true },\n      'react/jsx-runtime': { eager: true },\n      'react/jsx-dev-runtime': { eager: true },\n      'react-native': { eager: true },\n      'react-native/Libraries/BatchedBridge/BatchedBridge': { eager: true },\n      'react-native/Libraries/BatchedBridge/NativeModules': { eager: true },\n      'react-native/Libraries/BatchedBridge/MessageQueue': { eager: true },\n      'react-native/Libraries/NativeComponent/NativeComponentRegistry': { eager: true },\n      'react-native/Libraries/NativeComponent/NativeComponentRegistryUnstable': { eager: true },\n      'react-native/Libraries/NativeComponent/ViewConfigIgnore': { eager: true },\n      'react-native/Libraries/ReactNative/RendererProxy': { eager: true },\n      'react-native/Libraries/StyleSheet/PlatformColorValueTypes': { eager: true },\n      'react-native/Libraries/StyleSheet/normalizeColor': { eager: true },\n      'react-native/Libraries/StyleSheet/processColor': { eager: true },\n      'react-native/Libraries/TurboModule/TurboModuleRegistry': { eager: true },\n      'react-native/Libraries/Utilities/NativePlatformConstantsIOS': { eager: true },\n      'react-native/Libraries/Utilities/Platform': { eager: true },\n      'react-native/Libraries/Utilities/defineLazyObjectProperty': { eager: true },\n    });\n\n    expect(intoShared(['react', 'react-native'])).toEqual({\n      react: {},\n      'react/jsx-runtime': {},\n      'react/jsx-dev-runtime': {},\n      'react-native': {},\n      'react-native/Libraries/BatchedBridge/BatchedBridge': {},\n      'react-native/Libraries/BatchedBridge/NativeModules': {},\n      'react-native/Libraries/BatchedBridge/MessageQueue': {},\n      'react-native/Libraries/NativeComponent/NativeComponentRegistry': {},\n      'react-native/Libraries/NativeComponent/NativeComponentRegistryUnstable': {},\n      'react-native/Libraries/NativeComponent/ViewConfigIgnore': {},\n      'react-native/Libraries/ReactNative/RendererProxy': {},\n      'react-native/Libraries/StyleSheet/PlatformColorValueTypes': {},\n      'react-native/Libraries/StyleSheet/normalizeColor': {},\n      'react-native/Libraries/StyleSheet/processColor': {},\n      'react-native/Libraries/TurboModule/TurboModuleRegistry': {},\n      'react-native/Libraries/Utilities/NativePlatformConstantsIOS': {},\n      'react-native/Libraries/Utilities/Platform': {},\n      'react-native/Libraries/Utilities/defineLazyObjectProperty': {},\n    });\n  });\n});\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/utils/intoShared.ts",
    "content": "import type { MicroFrontendPluginOptions, SharedConfig } from '../types';\n\nconst SHARED_PRESETS: Record<string, string[]> = {\n  'react-native': [\n    'react-native/Libraries/BatchedBridge/BatchedBridge',\n    'react-native/Libraries/BatchedBridge/NativeModules',\n    'react-native/Libraries/BatchedBridge/MessageQueue',\n    'react-native/Libraries/NativeComponent/NativeComponentRegistry',\n    'react-native/Libraries/NativeComponent/NativeComponentRegistryUnstable',\n    'react-native/Libraries/NativeComponent/ViewConfigIgnore',\n    'react-native/Libraries/ReactNative/RendererProxy',\n    'react-native/Libraries/StyleSheet/PlatformColorValueTypes',\n    'react-native/Libraries/StyleSheet/normalizeColor',\n    'react-native/Libraries/StyleSheet/processColor',\n    'react-native/Libraries/TurboModule/TurboModuleRegistry',\n    'react-native/Libraries/Utilities/NativePlatformConstantsIOS',\n    'react-native/Libraries/Utilities/Platform',\n    'react-native/Libraries/Utilities/defineLazyObjectProperty',\n  ],\n  react: ['react/jsx-runtime', 'react/jsx-dev-runtime'],\n};\n\nexport function intoShared(shared: MicroFrontendPluginOptions['shared']): SharedConfig | undefined {\n  if (shared == null) {\n    return undefined;\n  }\n\n  const normalized = Array.isArray(shared)\n    ? shared.reduce(\n        (acc, lib) => {\n          acc[lib] = {};\n          return acc;\n        },\n        {} as Record<string, SharedConfig[string]>\n      )\n    : { ...shared };\n\n  for (const [lib, subpaths] of Object.entries(SHARED_PRESETS)) {\n    const libConfig = normalized[lib];\n    if (libConfig == null) {\n      continue;\n    }\n\n    for (const subpath of subpaths) {\n      if (normalized[subpath] == null) {\n        normalized[subpath] = { ...libConfig };\n      }\n    }\n  }\n\n  return normalized;\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/src/utils/resolveReactNativeBasePath.ts",
    "content": "import path from 'path';\nimport { getPackageRoot } from '@granite-js/utils';\n\nexport function resolveReactNativeBasePath() {\n  return path.dirname(require.resolve('react-native/package.json', { paths: [getPackageRoot()] }));\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/plugin-micro-frontend/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig([\n  {\n    entry: ['src/index.ts'],\n    format: ['esm', 'cjs'],\n    dts: true,\n    fixedExtension: false,\n  },\n  {\n    entry: ['src/runtime/index.ts'],\n    format: ['esm', 'cjs'],\n    dts: true,\n    outDir: 'dist/runtime',\n    fixedExtension: false,\n  },\n]);\n"
  },
  {
    "path": "packages/plugin-micro-frontend/vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  test: {\n    include: ['src/**/*.spec.ts'],\n  },\n});\n"
  },
  {
    "path": "packages/plugin-router/CHANGELOG.md",
    "content": "# @granite-js/plugin-router\n\n## 1.0.23\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/plugin-core@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [d4beb3b]\n- Updated dependencies [b325495]\n  - @granite-js/plugin-core@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- ee26531: fix: align exports map\n  - @granite-js/plugin-core@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/plugin-core@1.0.0\n"
  },
  {
    "path": "packages/plugin-router/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/plugin-router\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@swc/core**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: git+https://github.com/swc-project/swc.git\n\t\n2. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n3. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n4. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n5. **chokidar**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/paulmillr/chokidar.git\n\t\n6. **es-toolkit**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/toss/es-toolkit.git\n\t\n7. **tsdown**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/rolldown/tsdown.git\n\t\n8. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/plugin-router/README.md",
    "content": "# @granite-js/plugin-router\n\nA Route Generator for Granite project\n"
  },
  {
    "path": "packages/plugin-router/__fixtures__/has-named-export-route.tsx",
    "content": "/**\n * mock createRoute\n */\nfunction createRoute(path: string, options?: any) {\n  return [path, options];\n}\n\nconst Route = createRoute('/test', {\n  validateParams: (params: any) => params as { name: string },\n});\n\nexport { Route };\n\nexport default function HasExportRoute() {\n  return;\n}\n"
  },
  {
    "path": "packages/plugin-router/__fixtures__/has-variable-export-route.tsx",
    "content": "/**\n * mock createRoute\n */\nfunction createRoute(path: string, options?: any) {\n  return [path, options];\n}\n\nexport const Route = createRoute('/test', {\n  validateParams: (params: any) => params as { name: string },\n});\n\nexport default function HasExportRoute() {\n  return;\n}\n"
  },
  {
    "path": "packages/plugin-router/__fixtures__/no-export-route.tsx",
    "content": "export default function NoExportRoute() {\n  return;\n}\n"
  },
  {
    "path": "packages/plugin-router/package.json",
    "content": "{\n  \"name\": \"@granite-js/plugin-router\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"description\": \"A Route Generator for Granite project\",\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/plugin-router\"\n  },\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"eslint .\",\n    \"test\": \"vitest --no-watch --coverage\",\n    \"build\": \"tsdown\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"devDependencies\": {\n    \"@types/node\": \"catalog:tools\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"tsdown\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\"\n  },\n  \"dependencies\": {\n    \"@granite-js/plugin-core\": \"workspace:*\",\n    \"@swc/core\": \"catalog:swc\",\n    \"chokidar\": \"4.0.1\",\n    \"es-toolkit\": \"^1.39.8\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/plugin-router/src/checkExportRoute.spec.ts",
    "content": "import { resolve } from 'path';\nimport { describe, it, expect } from 'vitest';\nimport { checkExportRoute } from './checkExportRoute';\n\ndescribe('checkExportRoute', () => {\n  it('checks export const Route = ... format', async () => {\n    const result = checkExportRoute(resolve(__dirname, '..', '__fixtures__/has-variable-export-route.tsx'));\n    expect(result).toBe(true);\n  });\n\n  it('checks export { Route } format', async () => {\n    const result = checkExportRoute(resolve(__dirname, '..', '__fixtures__/has-named-export-route.tsx'));\n    expect(result).toBe(true);\n  });\n\n  it('no Route in export', async () => {\n    const result = checkExportRoute(resolve(__dirname, '..', '__fixtures__/no-export-route.tsx'));\n    expect(result).toBe(false);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-router/src/checkExportRoute.ts",
    "content": "import { parseFileSync } from '@swc/core';\n\n/**\n * Checks if Route is exported from the file.\n */\nexport function checkExportRoute(path: string) {\n  try {\n    const ast = parseFileSync(path, {\n      syntax: 'typescript',\n      tsx: true,\n    });\n\n    // Check for export { Route } format\n    const hasExportSpecifiers = ast.body.some((node) => {\n      if (node.type !== 'ExportNamedDeclaration') {\n        return false;\n      }\n      return node.specifiers?.some((specifier) => {\n        if (specifier.type !== 'ExportSpecifier') {\n          return false;\n        }\n        return specifier.orig?.value === 'Route';\n      });\n    });\n\n    if (hasExportSpecifiers) {\n      return true;\n    }\n\n    // Check for export const Route = ... format\n    const hasExportNamedVariable = ast.body.some((node) => {\n      if (node.type !== 'ExportDeclaration') {\n        return false;\n      }\n      if (node.declaration.type !== 'VariableDeclaration') {\n        return false;\n      }\n\n      return node.declaration.declarations.some(\n        (declaration) => declaration.id.type === 'Identifier' && declaration.id.value === 'Route'\n      );\n    });\n\n    return hasExportNamedVariable;\n  } catch {\n    return false;\n  }\n}\n"
  },
  {
    "path": "packages/plugin-router/src/generateRouterFile.ts",
    "content": "import { existsSync, readdirSync, readFileSync, writeFileSync } from 'fs';\nimport { join, parse } from 'path';\nimport { checkExportRoute } from './checkExportRoute';\nimport { getComponentName } from './getComponentName';\nimport { getPath } from './getPath';\nimport { ROUTER_GEN_TEMPLATE } from './template';\nimport { transformTemplate } from './utils/transformTemplate';\n\nexport function generateRouterFile() {\n  const cwd = process.cwd();\n  function getPageFiles(dir: string, prefix = ''): string[] {\n    const files = readdirSync(join(cwd, dir), { withFileTypes: true });\n\n    return files.reduce<string[]>((acc, file) => {\n      if (file.isDirectory()) {\n        return [...acc, ...getPageFiles(`${dir}/${file.name}`, `${prefix}${file.name}/`)];\n      }\n\n      if (file.name.endsWith('.tsx') || file.name.endsWith('.ts')) {\n        const name = parse(file.name).name;\n        const ext = parse(file.name).ext;\n        return [...acc, `${prefix}${name}${ext}`];\n      }\n\n      return acc;\n    }, []);\n  }\n\n  const allPages = getPageFiles('pages');\n  const exportRouteMap = new Map(allPages.map((page) => [page, checkExportRoute(join(cwd, 'pages', page))]));\n\n  const pageFiles = allPages.filter((page) => !page.startsWith('_') && exportRouteMap.get(page));\n\n  const pageImports = pageFiles\n    .map((page) => {\n      const componentName = getComponentName(page);\n      const pagePath = getPath(page);\n      return transformTemplate(\"import { Route as _%%componentName%%Route } from '../pages%%pagePath%%';\", {\n        componentName,\n        pagePath,\n      });\n    })\n    .join('\\n');\n\n  const pageInputRoutes = pageFiles\n    .map((page) => {\n      const componentName = getComponentName(page);\n      const pagePath = getPath(page);\n      return transformTemplate(\"    '%%pagePath%%': (typeof _%%componentName%%Route)['_inputType'];\", {\n        componentName,\n        pagePath,\n      });\n    })\n    .join('\\n');\n\n  const pageRoutes = pageFiles\n    .map((page) => {\n      const componentName = getComponentName(page);\n      const pagePath = getPath(page);\n      return transformTemplate(\"    '%%pagePath%%': (typeof _%%componentName%%Route)['_outputType'];\", {\n        componentName,\n        pagePath,\n      });\n    })\n    .join('\\n');\n\n  const generatedContent = transformTemplate(ROUTER_GEN_TEMPLATE, {\n    pageImports,\n    pageInputRoutes,\n    pageRoutes,\n  });\n\n  const routerFilePath = join(cwd, 'src', 'router.gen.ts');\n\n  if (existsSync(routerFilePath)) {\n    const existingContent = readFileSync(routerFilePath, 'utf-8');\n    if (existingContent === generatedContent) {\n      return;\n    }\n  }\n\n  writeFileSync(routerFilePath, generatedContent);\n  console.log('✅ Router file generated successfully!');\n}\n"
  },
  {
    "path": "packages/plugin-router/src/getComponentName.spec.ts",
    "content": "import { describe, it, expect } from 'vitest';\nimport { getComponentName } from './getComponentName';\n\ndescribe('getComponentName', () => {\n  it('pages/index.tsx', () => {\n    const result = getComponentName('pages/index.tsx');\n    expect(result).toMatch('Index');\n  });\n\n  it('pages/about.tsx', () => {\n    const result = getComponentName('pages/about.tsx');\n    expect(result).toMatch('About');\n  });\n\n  it('pages/about/index.tsx', async () => {\n    const result = getComponentName('pages/about/index.tsx');\n    expect(result).toMatch('About');\n  });\n\n  it('pages/about/hi.tsx', async () => {\n    const result = getComponentName('pages/about/hi.tsx');\n    expect(result).toMatch('AboutHi');\n  });\n\n  it('pages/granite-module/share.tsx', async () => {\n    const result = getComponentName('pages/granite-module/share.tsx');\n    expect(result).toMatch('GraniteModuleShare');\n  });\n});\n"
  },
  {
    "path": "packages/plugin-router/src/getComponentName.ts",
    "content": "import { pascalCase } from 'es-toolkit';\n\nexport function getComponentName(filePath: string): string {\n  const path = filePath.replace(/^pages\\//, '').replace(/\\.(tsx|ts)$/, '');\n\n  const segments = path.split('/').filter(Boolean);\n\n  if (segments[segments.length - 1] === 'index') {\n    segments.pop();\n  }\n\n  const componentName = segments.map((segment) => pascalCase(segment)).join('');\n\n  return componentName || 'Index';\n}\n"
  },
  {
    "path": "packages/plugin-router/src/getPageName.spec.ts",
    "content": "import { describe, it, expect } from 'vitest';\nimport { getPageName } from './getPageName';\n\ndescribe('getPageName', () => {\n  it('pages/_layout.tsx', () => {\n    const result = getPageName('pages/_layout.tsx');\n    expect(result).toMatch('');\n  });\n\n  it('pages/about/_layout.tsx', async () => {\n    const result = getPageName('pages/about/_layout.tsx');\n    expect(result).toMatch('About');\n  });\n\n  it('pages/granite-module/_layout.tsx', async () => {\n    const result = getPageName('pages/granite-module/_layout.tsx');\n    expect(result).toMatch('GraniteModule');\n  });\n\n  it('pages/granite-module/share/_layout.tsx', async () => {\n    const result = getPageName('pages/granite-module/share/_layout.tsx');\n    expect(result).toMatch('Share');\n  });\n});\n"
  },
  {
    "path": "packages/plugin-router/src/getPageName.ts",
    "content": "import { pascalCase } from 'es-toolkit';\n\nexport function getPageName(filePath: string) {\n  // Split the file path into segments\n  const parts = filePath.split('/');\n\n  // Remove the \"pages\" directory\n  const indexOfPages = parts.indexOf('pages');\n  if (indexOfPages === -1) {\n    return '';\n  } // Invalid path\n  const relevantParts = parts.slice(indexOfPages + 1);\n\n  // Ignore the last part if it is \"_layout.tsx\" or any \"_*.tsx\"\n  if (relevantParts.at(-1)?.startsWith('_')) {\n    relevantParts.pop();\n  }\n\n  // Get the last relevant part and convert it to PascalCase\n  const lastPart = relevantParts.at(-1);\n  if (!lastPart) {\n    return '';\n  } // No valid name found\n\n  return pascalCase(lastPart);\n}\n"
  },
  {
    "path": "packages/plugin-router/src/getPath.spec.ts",
    "content": "import { describe, it, expect } from 'vitest';\nimport { getPath } from './getPath';\n\ndescribe('getPath', () => {\n  it('pages/index.tsx', () => {\n    const result = getPath('pages/index.tsx');\n    expect(result).toMatch('/');\n  });\n\n  it('pages/index.ts', () => {\n    const result = getPath('pages/index.ts');\n    expect(result).toMatch('/');\n  });\n\n  it('pages/about.tsx', () => {\n    const result = getPath('pages/about.tsx');\n    expect(result).toMatch('/about');\n  });\n\n  it('pages/about.ts', () => {\n    const result = getPath('pages/about.ts');\n    expect(result).toMatch('/about');\n  });\n\n  it('pages/about/index.tsx', async () => {\n    const result = getPath('pages/about/index.tsx');\n    expect(result).toMatch('/about');\n  });\n\n  it('pages/about/name.tsx', async () => {\n    const result = getPath('pages/about/name.tsx');\n    expect(result).toMatch('/about/name');\n  });\n\n  it('pages/about/name.ts', async () => {\n    const result = getPath('pages/about/name.ts');\n    expect(result).toMatch('/about/name');\n  });\n});\n"
  },
  {
    "path": "packages/plugin-router/src/getPath.ts",
    "content": "export function getPath(filePath: string): string {\n  // Remove leading 'pages/' and trailing extension\n  let path = filePath.replace(/^pages\\//, '').replace(/\\.[^/.]+$/, '');\n\n  // If the path ends in 'index', remove it, unless it's just 'index'\n  if (path.endsWith('/index')) {\n    path = path.replace(/\\/index$/, '');\n  } else if (path === 'index') {\n    path = '';\n  }\n\n  // Ensure it starts with a slash, unless it's empty (then root)\n  return `/${path}`;\n}\n"
  },
  {
    "path": "packages/plugin-router/src/index.ts",
    "content": "export * from './routerPlugin';\n"
  },
  {
    "path": "packages/plugin-router/src/routerPlugin.ts",
    "content": "import type { GranitePluginCore } from '@granite-js/plugin-core';\nimport { generateRouterFile } from './generateRouterFile';\nimport { watchRouter } from './watchRouter';\n\ninterface RouterPluginOptions {\n  watch?: boolean;\n}\n\nconst DEFAULT_OPTIONS: Required<RouterPluginOptions> = {\n  watch: true,\n};\n\nexport const router = (options: RouterPluginOptions = DEFAULT_OPTIONS): GranitePluginCore => {\n  return {\n    name: 'router-plugin',\n    build: {\n      order: 'pre',\n      handler: () => {\n        generateRouterFile();\n      },\n    },\n    dev: {\n      order: 'pre',\n      handler: () => {\n        generateRouterFile();\n        if (options.watch) {\n          watchRouter();\n        }\n      },\n    },\n  };\n};\n"
  },
  {
    "path": "packages/plugin-router/src/template.ts",
    "content": "export const NEW_ROUTE_FILE_TEMPLATE = `import React from 'react';\nimport { Text, View } from 'react-native';\nimport { createRoute } from '@granite-js/react-native';\n\nexport const Route = createRoute('%%path%%', {\n  validateParams: (params) => params,\n  component: %%componentName%%,\n});\n\nfunction %%componentName%%() {\n  return (\n    <View>\n      <Text>Hello %%componentName%%</Text>\n    </View>\n  );\n}\n`;\n\nexport const ROUTER_GEN_TEMPLATE = `/* eslint-disable */\n// This file is auto-generated by @granite-js/react-native. DO NOT EDIT.\n%%pageImports%%\n\ndeclare module '@granite-js/react-native' {\n  interface RegisterScreenInput {\n%%pageInputRoutes%%\n  }\n\n  interface RegisterScreen {\n%%pageRoutes%%\n  }\n}\n`;\n\nexport const NEW_LAYOUT_FILE_TEMPLATE = `import React, { PropsWithChildren } from 'react';\n\nexport default function %%componentName%%Layout({ children }: PropsWithChildren) {\n  return (\n    <>\n      {children}\n    </>\n  );\n}\n`;\n"
  },
  {
    "path": "packages/plugin-router/src/transformNewRouteFile.spec.ts",
    "content": "import { describe, it, expect } from 'vitest';\nimport { transformNewLayoutFile, transformNewRouteFile } from './transformNewRouteFile';\n\ndescribe('transformNewRouteFile', () => {\n  it('creates pages/index.tsx file', async () => {\n    const result = await transformNewRouteFile('pages/index.tsx');\n    expect(result).toMatch(\"export const Route = createRoute('/'\");\n  });\n\n  it('creates pages/about.tsx file', async () => {\n    const result = await transformNewRouteFile('pages/about.tsx');\n    expect(result).toMatch(\"export const Route = createRoute('/about'\");\n  });\n\n  it('creates pages/about/index.tsx file', async () => {\n    const result = await transformNewRouteFile('pages/about/index.tsx');\n    expect(result).toMatch(\"export const Route = createRoute('/about'\");\n  });\n});\n\ndescribe('transformNewLayoutFile', () => {\n  it('creates pages/_layout.tsx file', async () => {\n    const result = await transformNewLayoutFile('pages/_layout.tsx');\n    expect(result).toMatch('export default function Layout');\n  });\n\n  it('creates pages/about/_layout.tsx file', async () => {\n    const result = await transformNewLayoutFile('pages/about/_layout.tsx');\n    expect(result).toMatch('export default function AboutLayout');\n  });\n});\n"
  },
  {
    "path": "packages/plugin-router/src/transformNewRouteFile.ts",
    "content": "import { getComponentName } from './getComponentName';\nimport { getPageName } from './getPageName';\nimport { getPath } from './getPath';\nimport { NEW_LAYOUT_FILE_TEMPLATE, NEW_ROUTE_FILE_TEMPLATE } from './template';\nimport { transformTemplate } from './utils/transformTemplate';\n\nexport async function transformNewRouteFile(path: string) {\n  return transformTemplate(NEW_ROUTE_FILE_TEMPLATE, {\n    path: getPath(path),\n    componentName: getComponentName(path),\n  });\n}\n\nexport async function transformNewLayoutFile(path: string) {\n  return transformTemplate(NEW_LAYOUT_FILE_TEMPLATE, {\n    componentName: getPageName(path),\n  });\n}\n"
  },
  {
    "path": "packages/plugin-router/src/types.ts",
    "content": ""
  },
  {
    "path": "packages/plugin-router/src/utils/transformTemplate.spec.ts",
    "content": "import { expect, it, describe } from 'vitest';\nimport { transformTemplate } from './transformTemplate';\n\ndescribe('transformTemplate', () => {\n  it('단일 플레이스홀더를 올바르게 대체해야 합니다', () => {\n    const result = transformTemplate('안녕하세요 %%name%%님', { name: '홍길동' });\n    expect(result).toBe('안녕하세요 홍길동님');\n  });\n\n  it('여러 플레이스홀더를 올바르게 대체해야 합니다', () => {\n    const result = transformTemplate('안녕하세요 %%name%%님, 당신의 나이는 %%age%%살 입니다.', {\n      name: '홍길동',\n      age: '20',\n    });\n    expect(result).toBe('안녕하세요 홍길동님, 당신의 나이는 20살 입니다.');\n  });\n\n  it('동일한 플레이스홀더가 여러번 나타나는 경우 모두 대체해야 합니다', () => {\n    const result = transformTemplate('%%name%%님 안녕하세요, %%name%%님을 다시 만나뵙게 되어 기쁩니다.', {\n      name: '홍길동',\n    });\n    expect(result).toBe('홍길동님 안녕하세요, 홍길동님을 다시 만나뵙게 되어 기쁩니다.');\n  });\n\n  it('플레이스홀더가 없는 문자열은 그대로 반환해야 합니다', () => {\n    const result = transformTemplate('안녕하세요', {} as any);\n    expect(result).toBe('안녕하세요');\n  });\n});\n"
  },
  {
    "path": "packages/plugin-router/src/utils/transformTemplate.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype ExtractPlaceholders<T extends string> = T extends `${infer _Start}%%${infer Key}%%${infer Rest}`\n  ? Key | ExtractPlaceholders<Rest>\n  : never;\n\ntype TransformTemplateArgs<T extends string> = {\n  [Key in ExtractPlaceholders<T>]: string;\n};\n\n/**\n * 템플릿 문자열에서 %%key%% 형식의 플레이스홀더를 values 객체의 값으로 대체합니다.\n * 제네릭 타입 T를 통해 템플릿 문자열의 플레이스홀더 키를 자동으로 추론하여 타입 안정성을 보장합니다.\n *\n * @example\n * const str = \"안녕하세요 %%name%%님, 당신의 나이는 %%age%%살 입니다.\"\n * const result = transformTemplate(str, { name: \"홍길동\", age: \"20\" })\n * // 결과: \"안녕하세요 홍길동님, 당신의 나이는 20살 입니다.\"\n */\nexport function transformTemplate<T extends string>(templateString: T, values: TransformTemplateArgs<T>): string {\n  let result: string = templateString;\n  for (const key in values) {\n    const placeholder = `%%${key}%%`;\n    result = result.replace(new RegExp(placeholder, 'g'), (values as any)[key]);\n  }\n  return result;\n}\n"
  },
  {
    "path": "packages/plugin-router/src/watchRouter.ts",
    "content": "import { readFile, writeFile } from 'fs/promises';\nimport { join, parse } from 'path';\nimport chokidar from 'chokidar';\nimport { kebabCase } from 'es-toolkit';\nimport { generateRouterFile } from './generateRouterFile';\nimport { transformNewLayoutFile, transformNewRouteFile } from './transformNewRouteFile';\n\nexport interface WatchRouterOptions {\n  /**\n   * Generate router file immediately when `watchRouter` is called.\n   *\n   * Defaults to `false`.\n   */\n  immediate?: boolean;\n}\n\nexport function watchRouter() {\n  const watcher = chokidar.watch('./pages', {\n    ignored: (path, stats) => {\n      return Boolean(stats?.isFile() && !path.endsWith('.ts') && !path.endsWith('.tsx'));\n    },\n    ignoreInitial: true,\n    persistent: true,\n    cwd: process.cwd(),\n  });\n\n  const handleAdd = async (path: string) => {\n    const file = join(process.cwd(), path);\n    const code = await readFile(file, 'utf8');\n\n    if (code !== '') {\n      return;\n    }\n\n    const filename = parse(path).name;\n\n    // ignore _ keyword\n    if (filename.startsWith('_')) {\n      switch (filename) {\n        case '_layout':\n          console.log('👀 Layout file has been added');\n          await writeFile(path, await transformNewLayoutFile(path));\n          return;\n        default:\n          return;\n      }\n    }\n\n    const componentName = kebabCase(filename);\n    if (componentName !== filename) {\n      console.log(\n        `❌ File name should be in kebab-case format. Would you like to rename ${filename} to ${componentName}?`\n      );\n      return;\n    }\n\n    console.log(`👀 File ${path} has been added`);\n    await writeFile(path, await transformNewRouteFile(path));\n    await generateRouterFile();\n  };\n\n  watcher.on('add', handleAdd);\n  watcher.on('change', generateRouterFile);\n  watcher.on('unlink', generateRouterFile);\n\n  return () => {\n    watcher.off('add', handleAdd);\n    watcher.off('change', generateRouterFile);\n    watcher.off('unlink', generateRouterFile);\n    watcher.close();\n  };\n}\n"
  },
  {
    "path": "packages/plugin-router/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\"],\n    \"lib\": [\"ESNext\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/plugin-router/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  entry: ['src/index.ts'],\n  format: ['esm', 'cjs'],\n  dts: true,\n  fixedExtension: false,\n});\n"
  },
  {
    "path": "packages/plugin-router/vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  cacheDir: '.vitest',\n  test: {\n    include: ['src/**/*.spec.ts'],\n    testTimeout: 600_000,\n    hookTimeout: 600_000,\n  },\n});\n"
  },
  {
    "path": "packages/plugin-rozenite/CHANGELOG.md",
    "content": "# @granite-js/plugin-rozenite\n\n## 1.0.23\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.23\n- @granite-js/utils@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.22\n- @granite-js/utils@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.21\n- @granite-js/utils@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.20\n- @granite-js/utils@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.19\n- @granite-js/utils@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- a09e0fd: Stop disabling Rozenite auto-discovery by default and upgrade `@rozenite/middleware` to `1.6.0`.\n  - @granite-js/plugin-core@1.0.18\n  - @granite-js/utils@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.17\n- @granite-js/utils@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.16\n- @granite-js/utils@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.15\n- @granite-js/utils@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.14\n- @granite-js/utils@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.13\n- @granite-js/utils@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.12\n- @granite-js/utils@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.11\n- @granite-js/utils@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.10\n- @granite-js/utils@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.9\n- @granite-js/utils@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.8\n- @granite-js/utils@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.7\n- @granite-js/utils@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.6\n- @granite-js/utils@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.5\n- @granite-js/utils@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.4\n- @granite-js/utils@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/plugin-core@1.0.3\n  - @granite-js/utils@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [d4beb3b]\n- Updated dependencies [b325495]\n  - @granite-js/plugin-core@1.0.2\n  - @granite-js/utils@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.1\n- @granite-js/utils@1.0.1\n\n## 1.0.0\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/plugin-core@1.0.0\n  - @granite-js/utils@1.0.0\n"
  },
  {
    "path": "packages/plugin-rozenite/LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1.  Definitions.\n\n    \"License\" shall mean the terms and conditions for use, reproduction,\n    and distribution as defined by Sections 1 through 9 of this document.\n\n    \"Licensor\" shall mean the copyright owner or entity authorized by\n    the copyright owner that is granting the License.\n\n    \"Legal Entity\" shall mean the union of the acting entity and all\n    other entities that control, are controlled by, or are under common\n    control with that entity. For the purposes of this definition,\n    \"control\" means (i) the power, direct or indirect, to cause the\n    direction or management of such entity, whether by contract or\n    otherwise, or (ii) ownership of fifty percent (50%) or more of the\n    outstanding shares, or (iii) beneficial ownership of such entity.\n\n    \"You\" (or \"Your\") shall mean an individual or Legal Entity\n    exercising permissions granted by this License.\n\n    \"Source\" form shall mean the preferred form for making modifications,\n    including but not limited to software source code, documentation\n    source, and configuration files.\n\n    \"Object\" form shall mean any form resulting from mechanical\n    transformation or translation of a Source form, including but\n    not limited to compiled object code, generated documentation,\n    and conversions to other media types.\n\n    \"Work\" shall mean the work of authorship, whether in Source or\n    Object form, made available under the License, as indicated by a\n    copyright notice that is included in or attached to the work\n    (an example is provided in the Appendix below).\n\n    \"Derivative Works\" shall mean any work, whether in Source or Object\n    form, that is based on (or derived from) the Work and for which the\n    editorial revisions, annotations, elaborations, or other modifications\n    represent, as a whole, an original work of authorship. For the purposes\n    of this License, Derivative Works shall not include works that remain\n    separable from, or merely link (or bind by name) to the interfaces of,\n    the Work and Derivative Works thereof.\n\n    \"Contribution\" shall mean any work of authorship, including\n    the original version of the Work and any modifications or additions\n    to that Work or Derivative Works thereof, that is intentionally\n    submitted to Licensor for inclusion in the Work by the copyright owner\n    or by an individual or Legal Entity authorized to submit on behalf of\n    the copyright owner. For the purposes of this definition, \"submitted\"\n    means any form of electronic, verbal, or written communication sent\n    to the Licensor or its representatives, including but not limited to\n    communication on electronic mailing lists, source code control systems,\n    and issue tracking systems that are managed by, or on behalf of, the\n    Licensor for the purpose of discussing and improving the Work, but\n    excluding communication that is conspicuously marked or otherwise\n    designated in writing by the copyright owner as \"Not a Contribution.\"\n\n    \"Contributor\" shall mean Licensor and any individual or Legal Entity\n    on behalf of whom a Contribution has been received by Licensor and\n    subsequently incorporated within the Work.\n\n2.  Grant of Copyright License. Subject to the terms and conditions of\n    this License, each Contributor hereby grants to You a perpetual,\n    worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n    copyright license to reproduce, prepare Derivative Works of,\n    publicly display, publicly perform, sublicense, and distribute the\n    Work and such Derivative Works in Source or Object form.\n\n3.  Grant of Patent License. Subject to the terms and conditions of\n    this License, each Contributor hereby grants to You a perpetual,\n    worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n    (except as stated in this section) patent license to make, have made,\n    use, offer to sell, sell, import, and otherwise transfer the Work,\n    where such license applies only to those patent claims licensable\n    by such Contributor that are necessarily infringed by their\n    Contribution(s) alone or by combination of their Contribution(s)\n    with the Work to which such Contribution(s) was submitted. If You\n    institute patent litigation against any entity (including a\n    cross-claim or counterclaim in a lawsuit) alleging that the Work\n    or a Contribution incorporated within the Work constitutes direct\n    or contributory patent infringement, then any patent licenses\n    granted to You under this License for that Work shall terminate\n    as of the date such litigation is filed.\n\n4.  Redistribution. You may reproduce and distribute copies of the\n    Work or Derivative Works thereof in any medium, with or without\n    modifications, and in Source or Object form, provided that You\n    meet the following conditions:\n\n    (a) You must give any other recipients of the Work or\n    Derivative Works a copy of this License; and\n\n    (b) You must cause any modified files to carry prominent notices\n    stating that You changed the files; and\n\n    (c) You must retain, in the Source form of any Derivative Works\n    that You distribute, all copyright, patent, trademark, and\n    attribution notices from the Source form of the Work,\n    excluding those notices that do not pertain to any part of\n    the Derivative Works; and\n\n    (d) If the Work includes a \"NOTICE\" text file as part of its\n    distribution, then any Derivative Works that You distribute must\n    include a readable copy of the attribution notices contained\n    within such NOTICE file, excluding those notices that do not\n    pertain to any part of the Derivative Works, in at least one\n    of the following places: within a NOTICE text file distributed\n    as part of the Derivative Works; within the Source form or\n    documentation, if provided along with the Derivative Works; or,\n    within a display generated by the Derivative Works, if and\n    wherever such third-party notices normally appear. The contents\n    of the NOTICE file are for informational purposes only and\n    do not modify the License. You may add Your own attribution\n    notices within Derivative Works that You distribute, alongside\n    or as an addendum to the NOTICE text from the Work, provided\n    that such additional attribution notices cannot be construed\n    as modifying the License.\n\n    You may add Your own copyright statement to Your modifications and\n    may provide additional or different license terms and conditions\n    for use, reproduction, or distribution of Your modifications, or\n    for any such Derivative Works as a whole, provided Your use,\n    reproduction, and distribution of the Work otherwise complies with\n    the conditions stated in this License.\n\n5.  Submission of Contributions. Unless You explicitly state otherwise,\n    any Contribution intentionally submitted for inclusion in the Work\n    by You to the Licensor shall be under the terms and conditions of\n    this License, without any additional terms or conditions.\n    Notwithstanding the above, nothing herein shall supersede or modify\n    the terms of any separate license agreement you may have executed\n    with Licensor regarding such Contributions.\n\n6.  Trademarks. This License does not grant permission to use the trade\n    names, trademarks, service marks, or product names of the Licensor,\n    except as required for reasonable and customary use in describing the\n    origin of the Work and reproducing the content of the NOTICE file.\n\n7.  Disclaimer of Warranty. Unless required by applicable law or\n    agreed to in writing, Licensor provides the Work (and each\n    Contributor provides its Contributions) on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n    implied, including, without limitation, any warranties or conditions\n    of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n    PARTICULAR PURPOSE. You are solely responsible for determining the\n    appropriateness of using or redistributing the Work and assume any\n    risks associated with Your exercise of permissions under this License.\n\n8.  Limitation of Liability. In no event and under no legal theory,\n    whether in tort (including negligence), contract, or otherwise,\n    unless required by applicable law (such as deliberate and grossly\n    negligent acts) or agreed to in writing, shall any Contributor be\n    liable to You for damages, including any direct, indirect, special,\n    incidental, or consequential damages of any character arising as a\n    result of this License or out of the use or inability to use the\n    Work (including but not limited to damages for loss of goodwill,\n    work stoppage, computer failure or malfunction, or any and all\n    other commercial damages or losses), even if such Contributor\n    has been advised of the possibility of such damages.\n\n9.  Accepting Warranty or Additional Liability. While redistributing\n    the Work or Derivative Works thereof, You may choose to offer,\n    and charge a fee for, acceptance of support, warranty, indemnity,\n    or other liability obligations and/or rights consistent with this\n    License. However, in accepting such obligations, You may act only\n    on Your own behalf and on Your sole responsibility, not on behalf\n    of any other Contributor, and only if You agree to indemnify,\n    defend, and hold each Contributor harmless for any liability\n    incurred by, or claims asserted against, such Contributor by reason\n    of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "packages/plugin-rozenite/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/plugin-rozenite\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@rozenite/middleware**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/callstackincubator/rozenite.git\n\t\n2. **@types/connect**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n3. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n4. **tsdown**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/rolldown/tsdown.git\n\t\n5. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n6. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/plugin-rozenite/README.md",
    "content": "# @granite-js/plugin-rozenite\n\nRozenite integration plugin for Granite applications.\n"
  },
  {
    "path": "packages/plugin-rozenite/package.json",
    "content": "{\n  \"name\": \"@granite-js/plugin-rozenite\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Rozenite integration plugin for Granite\",\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"test\": \"vitest --run --passWithNoTests\",\n    \"build\": \"tsdown\"\n  },\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/plugin-rozenite\"\n  },\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"devDependencies\": {\n    \"@types/connect\": \"^3.4.38\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"tsdown\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\"\n  },\n  \"dependencies\": {\n    \"@granite-js/plugin-core\": \"workspace:*\",\n    \"@granite-js/utils\": \"workspace:*\",\n    \"@rozenite/middleware\": \"1.6.0\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/plugin-rozenite/src/index.ts",
    "content": "export { rozenitePlugin as rozenite } from './rozenitePlugin';\nexport type { RozenitePluginOptions } from './types';\n"
  },
  {
    "path": "packages/plugin-rozenite/src/rozenitePlugin.ts",
    "content": "import type { IncomingMessage, ServerResponse } from 'node:http';\nimport type { GranitePluginCore, MetroMiddleware } from '@granite-js/plugin-core';\nimport { getPackageRoot } from '@granite-js/utils';\nimport { initializeRozenite } from '@rozenite/middleware';\nimport type { NextHandleFunction } from 'connect';\nimport type { RozenitePluginOptions } from './types';\n\nconst PLUGIN_NAME = 'rozenite-plugin';\n\nconst createRozeniteMiddleware = (\n  projectRoot: string,\n  options: Omit<RozenitePluginOptions, 'enabled'>\n): MetroMiddleware => {\n  let rozeniteMiddleware: MetroMiddleware | undefined;\n\n  const middleware: MetroMiddleware = (\n    req: IncomingMessage,\n    res: ServerResponse,\n    next: NextHandleFunction\n  ) => {\n    if (rozeniteMiddleware == null) {\n      try {\n        const { middleware } = initializeRozenite({\n          projectRoot,\n          ...options,\n        });\n\n        rozeniteMiddleware = middleware as unknown as MetroMiddleware;\n      } catch (e) {\n        console.error('[rozenite-plugin] initializeRozenite FAILED:', e);\n        return (next as unknown as (err?: unknown) => void)();\n      }\n    }\n\n    const handler = rozeniteMiddleware as unknown as (\n      req: IncomingMessage,\n      res: ServerResponse,\n      next: NextHandleFunction\n    ) => void;\n\n    return handler(req, res, next);\n  };\n\n  return middleware;\n};\n\nexport const rozenitePlugin = (options: RozenitePluginOptions = {}): GranitePluginCore => {\n  const { enabled = true, ...rozeniteOptions } = options;\n\n  if (!enabled) {\n    return { name: PLUGIN_NAME };\n  }\n\n  const projectRoot = getPackageRoot();\n\n  return {\n    name: PLUGIN_NAME,\n    config: {\n      metro: {\n        middlewares: [createRozeniteMiddleware(projectRoot, rozeniteOptions)],\n      },\n    },\n  };\n};\n"
  },
  {
    "path": "packages/plugin-rozenite/src/types.ts",
    "content": "import type { RozeniteConfig } from '@rozenite/middleware';\n\nexport type RozenitePluginOptions = {\n  /**\n   * Whether to enable Rozenite middleware in dev server.\n   * @default true\n   */\n  enabled?: boolean;\n} & Omit<RozeniteConfig, 'projectRoot'>;\n"
  },
  {
    "path": "packages/plugin-rozenite/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/plugin-rozenite/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  entry: ['src/index.ts'],\n  format: ['esm', 'cjs'],\n  dts: true,\n  fixedExtension: false,\n});\n"
  },
  {
    "path": "packages/plugin-rozenite/vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  test: {\n    include: ['src/**/*.spec.ts'],\n  },\n});\n"
  },
  {
    "path": "packages/plugin-sentry/CHANGELOG.md",
    "content": "# @granite-js/plugin-sentry\n\n## 1.0.23\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.23\n- @granite-js/utils@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.22\n- @granite-js/utils@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.21\n- @granite-js/utils@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.20\n- @granite-js/utils@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.19\n- @granite-js/utils@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.18\n- @granite-js/utils@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.17\n- @granite-js/utils@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.16\n- @granite-js/utils@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.15\n- @granite-js/utils@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.14\n- @granite-js/utils@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.13\n- @granite-js/utils@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.12\n- @granite-js/utils@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.11\n- @granite-js/utils@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.10\n- @granite-js/utils@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.9\n- @granite-js/utils@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.8\n- @granite-js/utils@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.7\n- @granite-js/utils@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.6\n- @granite-js/utils@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.5\n- @granite-js/utils@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.4\n- @granite-js/utils@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [7694332]\n  - @granite-js/plugin-core@1.0.3\n  - @granite-js/utils@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [d4beb3b]\n- Updated dependencies [b325495]\n  - @granite-js/plugin-core@1.0.2\n  - @granite-js/utils@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- @granite-js/plugin-core@1.0.1\n- @granite-js/utils@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/plugin-core@1.0.0\n  - @granite-js/utils@1.0.0\n"
  },
  {
    "path": "packages/plugin-sentry/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/plugin-sentry/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/plugin-sentry\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@sentry/cli**\n\t\n   - License: BSD-3-Clause\n   - License Text: https://opensource.org/licenses/BSD-3-Clause\n   - Repository: git://github.com/getsentry/sentry-cli.git\n\t\n2. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n3. **es-toolkit**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/toss/es-toolkit.git\n\t\n4. **execa**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/sindresorhus/execa.git\n\t\n5. **tsdown**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/rolldown/tsdown.git\n\t\n6. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n7. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/plugin-sentry/README.md",
    "content": "# @granite-js/plugin-sentry\n\nPlugin for integrating [Sentry](https://sentry.io) with Granite applications\n\n## Installation\n\n```bash\n# NPM\nnpm install @granite-js/plugin-sentry\n\n# pnpm\npnpm add @granite-js/plugin-sentry\n\n# yarn\nyarn add @granite-js/plugin-sentry\n```\n\n## Usage\n\n```ts\nimport { defineConfig } from '@granite-js/react-native/config';\nimport { sentry } from '@granite-js/plugin-sentry';\n\nexport default defineConfig({\n  plugins: [\n    sentry({\n      /**\n       * Sentry CLI Options\n       */\n      authToken: process.env.SENTRY_AUTH_TOKEN,\n      org: '<SENTRY_ORG>',\n      project: '<SENTRY_PROJECT>',\n    }),\n  ],\n});\n```\n\n> [!IMPORTANT]  \n> If you're using [@granite-js/plugin-hermes](https://github.com/toss/granite/tree/main/packages/plugin-hermes), the Sentry plugin should be configured after the Hermes plugin.\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/plugin-sentry/package.json",
    "content": "{\n  \"name\": \"@granite-js/plugin-sentry\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Plugin for integrating Sentry with Granite applications\",\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"test\": \"vitest --run\",\n    \"build\": \"tsdown\"\n  },\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/plugin-sentry\"\n  },\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"devDependencies\": {\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"tsdown\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\"\n  },\n  \"dependencies\": {\n    \"@granite-js/plugin-core\": \"workspace:*\",\n    \"@granite-js/utils\": \"workspace:*\",\n    \"@sentry/cli\": \"^2.45.0\",\n    \"es-toolkit\": \"^1.39.8\",\n    \"execa\": \"^5\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/plugin-sentry/src/extractSentryDebugId.spec.ts",
    "content": "import { randomUUID } from 'crypto';\nimport { describe, it, expect } from 'vitest';\nimport { extractSentryDebugId } from './extractSentryDebugId';\n\ndescribe('extractSentryDebugId', () => {\n  it('should extract the Sentry debug ID from the bundle content', () => {\n    const dummyDebugId = randomUUID();\n    const debugId = extractSentryDebugId(`\n      // SENTRY_DEBUG_ID=${dummyDebugId}\n      console.log('Hello, world!');\n    `);\n\n    expect(debugId).toBe(dummyDebugId);\n  });\n});\n"
  },
  {
    "path": "packages/plugin-sentry/src/extractSentryDebugId.ts",
    "content": "import { SENTRY_DEBUG_ID_HOLDER } from './snippets';\n\nexport function extractSentryDebugId(bundleContent: string) {\n  return bundleContent.match(new RegExp(`${SENTRY_DEBUG_ID_HOLDER}=([\\\\w-]+)`))?.[1];\n}\n"
  },
  {
    "path": "packages/plugin-sentry/src/index.ts",
    "content": "export { sentryPlugin as sentry } from './sentryPlugin';\nexport type { SentryPluginOptions } from './types';\n"
  },
  {
    "path": "packages/plugin-sentry/src/injectSentryDebugId.ts",
    "content": "import * as fs from 'fs/promises';\n\nexport async function writeDebugIdInjectedSourcemap(sourcemapPath: string, debugId: string) {\n  const sourcemapObject = await injectSentryDebugId(sourcemapPath, debugId);\n  await fs.writeFile(sourcemapPath, JSON.stringify(sourcemapObject, null, 2), 'utf-8');\n}\n\nasync function injectSentryDebugId(sourcemapPath: string, debugId: string) {\n  const sourcemapContent = await fs.readFile(sourcemapPath, 'utf-8');\n  const sourcemapObject = JSON.parse(sourcemapContent);\n\n  sourcemapObject.debugId = debugId;\n\n  return sourcemapObject;\n}\n"
  },
  {
    "path": "packages/plugin-sentry/src/resolveHermesBundle.ts",
    "content": "import * as fs from 'fs';\n\nexport function tryResolveHermesBundle(jsBundlePath: string) {\n  const lookupPath = jsBundlePath.replace(/\\.js$/, '.hbc');\n\n  return fs.existsSync(lookupPath) ? { hbc: lookupPath, sourcemap: `${lookupPath}.map` } : null;\n}\n"
  },
  {
    "path": "packages/plugin-sentry/src/sentryClientActions.ts",
    "content": "import SentryCLI from '@sentry/cli';\nimport { asyncNoop } from 'es-toolkit';\nimport type { SentryPluginContext, SentryPluginOptions } from './types';\nimport { uploadSourcemap, type UploadSourcemapOptions } from './uploadSourcemap';\n\nexport interface SentryClientActions {\n  uploadSourcemap: ({ root }: Omit<SentryPluginContext, 'client'>, options: UploadSourcemapOptions) => Promise<void>;\n}\n\nexport function createClientActions(options: SentryPluginOptions): SentryClientActions {\n  if (options.enabled === false || options.useClient === false) {\n    return {\n      uploadSourcemap: asyncNoop,\n    };\n  }\n\n  const client = new SentryCLI(null, options);\n\n  return {\n    uploadSourcemap: async (context, options) => {\n      await uploadSourcemap({ client, ...context }, options);\n    },\n  };\n}\n"
  },
  {
    "path": "packages/plugin-sentry/src/sentryPlugin.ts",
    "content": "import * as fs from 'fs/promises';\nimport { isBuildSuccess, type GranitePluginCore } from '@granite-js/plugin-core';\nimport { noop } from 'es-toolkit';\nimport { extractSentryDebugId } from './extractSentryDebugId';\nimport { writeDebugIdInjectedSourcemap } from './injectSentryDebugId';\nimport { tryResolveHermesBundle } from './resolveHermesBundle';\nimport { createClientActions } from './sentryClientActions';\nimport { getSentryDebugIdSnippets } from './snippets';\nimport type { SentryPluginOptions, SentryPluginResult } from './types';\n\nconst PLUGIN_NAME = 'sentry-plugin';\nconst PLUGIN_SHIM: GranitePluginCore = { name: PLUGIN_NAME };\n\nexport const sentryPlugin = ({ enabled = true, ...options }: SentryPluginOptions = {}): GranitePluginCore => {\n  if (enabled === false) {\n    return PLUGIN_SHIM;\n  }\n\n  const sentryActions = createClientActions(options);\n\n  return {\n    name: PLUGIN_NAME,\n    build: {\n      order: 'post',\n      handler: async function (config) {\n        const sentryResults: SentryPluginResult[] = [];\n        const files = config.buildResults.filter(isBuildSuccess).map(({ outfile, sourcemapOutfile }) => ({\n          bundle: outfile,\n          sourcemap: sourcemapOutfile,\n        }));\n\n        for (const file of files) {\n          const { bundle, sourcemap } = file;\n          const bundleContent = await fs.readFile(bundle, 'utf-8');\n          const debugId = await extractSentryDebugId(bundleContent);\n\n          if (debugId == null) {\n            console.error('Cannot find Sentry Debug ID');\n            continue;\n          }\n\n          const hermesBundle = tryResolveHermesBundle(bundle);\n          const targetBundle = hermesBundle?.hbc ?? bundle;\n          const targetSourcemap = hermesBundle?.sourcemap ?? sourcemap;\n\n          await Promise.all([\n            writeDebugIdInjectedSourcemap(sourcemap, debugId),\n            hermesBundle?.sourcemap ? writeDebugIdInjectedSourcemap(hermesBundle?.sourcemap, debugId) : noop,\n          ]);\n\n          await sentryActions.uploadSourcemap(\n            { root: config.cwd },\n            {\n              bundlePath: targetBundle,\n              sourcemapPath: targetSourcemap,\n            }\n          );\n\n          sentryResults.push({\n            bundle: targetBundle,\n            sourcemap: targetSourcemap,\n            debugId,\n          });\n        }\n\n        this.meta.sentry = sentryResults;\n      },\n    },\n    config: () => {\n      // Generate sentry debug id by dynamic config to ensure that the debug id is unique for each build\n      const { injectionScript, sourceMappingComment } = getSentryDebugIdSnippets();\n\n      return {\n        esbuild: {\n          banner: {\n            js: injectionScript,\n          },\n          footer: {\n            js: sourceMappingComment,\n          },\n        },\n      };\n    },\n  };\n};\n"
  },
  {
    "path": "packages/plugin-sentry/src/snippets.ts",
    "content": "import { randomUUID } from 'crypto';\n\n// To extract debugId from bundle\nexport const SENTRY_DEBUG_ID_HOLDER = 'SENTRY_DEBUG_ID';\n\nexport function getSentryDebugIdSnippets() {\n  const debugId = randomUUID();\n\n  const debugIdHolder = `${SENTRY_DEBUG_ID_HOLDER}=${debugId}`;\n  const sourceMappingComment = `//# debugId=${debugId}`;\n  const injectionScript = `\n  // ${debugIdHolder}\n  try {\n    var globalObject =\n      'undefined' != typeof window\n        ? window\n        : 'undefined' != typeof global\n          ? global\n          : 'undefined' != typeof self\n            ? self\n            : {};\n\n    var stack = new Error().stack;\n\n    if (stack) {\n      globalObject._sentryDebugIds = globalObject._sentryDebugIds || {};\n      globalObject._sentryDebugIds[stack] = '${debugId}';\n      globalObject._sentryDebugIdIdentifier = 'sentry-dbid-${debugId}';\n    }\n  } catch (e) {}\n  `;\n\n  return { injectionScript, sourceMappingComment };\n}\n"
  },
  {
    "path": "packages/plugin-sentry/src/types.ts",
    "content": "import SentryCLI, { type SentryCliOptions } from '@sentry/cli';\n\nexport type SentryPluginOptions = WithSentryCliOptions | WithoutSentryCliOptions;\n\ninterface WithSentryCliOptions extends SentryCliOptions, BaseSentryPluginOptions {\n  useClient?: true;\n}\n\ninterface WithoutSentryCliOptions extends BaseSentryPluginOptions {\n  useClient: false;\n}\n\ninterface BaseSentryPluginOptions {\n  /**\n   * @default true\n   */\n  enabled?: boolean;\n}\n\nexport interface SentryPluginContext {\n  client: SentryCLI;\n  root: string;\n}\n\nexport interface SentryPluginResult {\n  bundle: string;\n  sourcemap: string;\n  debugId: string;\n}\n"
  },
  {
    "path": "packages/plugin-sentry/src/uploadSourcemap.ts",
    "content": "import type { SentryPluginContext } from './types';\n\nexport interface UploadSourcemapOptions {\n  bundlePath: string;\n  sourcemapPath: string;\n}\n\nexport function uploadSourcemap(context: SentryPluginContext, { bundlePath, sourcemapPath }: UploadSourcemapOptions) {\n  return context.client.execute(\n    ['sourcemaps', 'upload', '--debug-id-reference', '--strip-prefix', context.root, bundlePath, sourcemapPath],\n    true\n  );\n}\n"
  },
  {
    "path": "packages/plugin-sentry/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/plugin-sentry/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  entry: ['src/index.ts'],\n  format: ['esm', 'cjs'],\n  dts: true,\n  fixedExtension: false,\n});\n"
  },
  {
    "path": "packages/plugin-sentry/vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  test: {\n    include: ['src/**/*.spec.ts'],\n  },\n});\n"
  },
  {
    "path": "packages/react-native/CHANGELOG.md",
    "content": "# @granite-js/react-native\n\n## 1.0.23\n\n### Patch Changes\n\n- d4d3993: feat(brownfield): sep brownfield module\n- Updated dependencies [63217da]\n- Updated dependencies [d4d3993]\n  - @granite-js/mpack@1.0.23\n  - @granite-js/brownfield-module@1.0.23\n  - @granite-js/native@1.0.23\n  - @granite-js/cli@1.0.23\n  - @granite-js/blur-view@1.0.23\n  - @granite-js/jest@1.0.23\n  - @granite-js/style-utils@1.0.23\n  - @granite-js/plugin-core@1.0.23\n  - @granite-js/video@1.0.23\n\n## 1.0.22\n\n### Patch Changes\n\n- @granite-js/blur-view@1.0.22\n- @granite-js/cli@1.0.22\n- @granite-js/jest@1.0.22\n- @granite-js/mpack@1.0.22\n- @granite-js/native@1.0.22\n- @granite-js/plugin-core@1.0.22\n- @granite-js/style-utils@1.0.22\n- @granite-js/video@1.0.22\n\n## 1.0.21\n\n### Patch Changes\n\n- @granite-js/blur-view@1.0.21\n- @granite-js/cli@1.0.21\n- @granite-js/jest@1.0.21\n- @granite-js/mpack@1.0.21\n- @granite-js/native@1.0.21\n- @granite-js/plugin-core@1.0.21\n- @granite-js/style-utils@1.0.21\n- @granite-js/video@1.0.21\n\n## 1.0.20\n\n### Patch Changes\n\n- Updated dependencies [324827a]\n  - @granite-js/native@1.0.20\n  - @granite-js/blur-view@1.0.20\n  - @granite-js/jest@1.0.20\n  - @granite-js/style-utils@1.0.20\n  - @granite-js/cli@1.0.20\n  - @granite-js/mpack@1.0.20\n  - @granite-js/plugin-core@1.0.20\n  - @granite-js/video@1.0.20\n\n## 1.0.19\n\n### Patch Changes\n\n- adfe616: perf(react-native): without new URL optimize\n- b084323: feat: add useKeyboardHeight\n  - @granite-js/native@1.0.19\n  - @granite-js/blur-view@1.0.19\n  - @granite-js/jest@1.0.19\n  - @granite-js/style-utils@1.0.19\n  - @granite-js/cli@1.0.19\n  - @granite-js/mpack@1.0.19\n  - @granite-js/plugin-core@1.0.19\n  - @granite-js/video@1.0.19\n\n## 1.0.18\n\n### Patch Changes\n\n- 96fe7c1: Use Android keyboard show/hide events in New Architecture for `useKeyboardAnimatedHeight`.\n  - @granite-js/blur-view@1.0.18\n  - @granite-js/cli@1.0.18\n  - @granite-js/jest@1.0.18\n  - @granite-js/mpack@1.0.18\n  - @granite-js/native@1.0.18\n  - @granite-js/plugin-core@1.0.18\n  - @granite-js/style-utils@1.0.18\n  - @granite-js/video@1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- Updated dependencies [c090579]\n  - @granite-js/video@1.0.17\n  - @granite-js/native@1.0.17\n  - @granite-js/blur-view@1.0.17\n  - @granite-js/jest@1.0.17\n  - @granite-js/style-utils@1.0.17\n  - @granite-js/cli@1.0.17\n  - @granite-js/mpack@1.0.17\n  - @granite-js/plugin-core@1.0.17\n\n## 1.0.16\n\n### Patch Changes\n\n- e0cf72d: feat: add onVisibilityChange\n  - @granite-js/blur-view@1.0.16\n  - @granite-js/cli@1.0.16\n  - @granite-js/jest@1.0.16\n  - @granite-js/mpack@1.0.16\n  - @granite-js/native@1.0.16\n  - @granite-js/plugin-core@1.0.16\n  - @granite-js/style-utils@1.0.16\n  - @granite-js/video@1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- Updated dependencies [dfa2f63]\n  - @granite-js/video@1.0.15\n  - @granite-js/native@1.0.15\n  - @granite-js/blur-view@1.0.15\n  - @granite-js/jest@1.0.15\n  - @granite-js/style-utils@1.0.15\n  - @granite-js/cli@1.0.15\n  - @granite-js/mpack@1.0.15\n  - @granite-js/plugin-core@1.0.15\n\n## 1.0.14\n\n### Patch Changes\n\n- Updated dependencies [4263c41]\n  - @granite-js/video@1.0.14\n  - @granite-js/native@1.0.14\n  - @granite-js/blur-view@1.0.14\n  - @granite-js/jest@1.0.14\n  - @granite-js/style-utils@1.0.14\n  - @granite-js/cli@1.0.14\n  - @granite-js/mpack@1.0.14\n  - @granite-js/plugin-core@1.0.14\n\n## 1.0.13\n\n### Patch Changes\n\n- Updated dependencies [4218c46]\n- Updated dependencies [dcffed6]\n  - @granite-js/video@1.0.13\n  - @granite-js/native@1.0.13\n  - @granite-js/blur-view@1.0.13\n  - @granite-js/jest@1.0.13\n  - @granite-js/style-utils@1.0.13\n  - @granite-js/cli@1.0.13\n  - @granite-js/mpack@1.0.13\n  - @granite-js/plugin-core@1.0.13\n\n## 1.0.12\n\n### Patch Changes\n\n- Updated dependencies [61b8058]\n- Updated dependencies [61b8058]\n  - @granite-js/video@1.0.12\n  - @granite-js/native@1.0.12\n  - @granite-js/blur-view@1.0.12\n  - @granite-js/jest@1.0.12\n  - @granite-js/style-utils@1.0.12\n  - @granite-js/cli@1.0.12\n  - @granite-js/mpack@1.0.12\n  - @granite-js/plugin-core@1.0.12\n\n## 1.0.11\n\n### Patch Changes\n\n- @granite-js/native@1.0.11\n- @granite-js/blur-view@1.0.11\n- @granite-js/jest@1.0.11\n- @granite-js/style-utils@1.0.11\n- @granite-js/cli@1.0.11\n- @granite-js/mpack@1.0.11\n- @granite-js/plugin-core@1.0.11\n- @granite-js/video@1.0.11\n\n## 1.0.10\n\n### Patch Changes\n\n- 6b9ba49: feat: granite brownfield module for brick autolinking\n  - @granite-js/blur-view@1.0.10\n  - @granite-js/cli@1.0.10\n  - @granite-js/jest@1.0.10\n  - @granite-js/mpack@1.0.10\n  - @granite-js/native@1.0.10\n  - @granite-js/plugin-core@1.0.10\n  - @granite-js/style-utils@1.0.10\n  - @granite-js/video@1.0.10\n\n## 1.0.9\n\n### Patch Changes\n\n- @granite-js/blur-view@1.0.9\n- @granite-js/cli@1.0.9\n- @granite-js/jest@1.0.9\n- @granite-js/mpack@1.0.9\n- @granite-js/native@1.0.9\n- @granite-js/plugin-core@1.0.9\n- @granite-js/style-utils@1.0.9\n- @granite-js/video@1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- Updated dependencies [503118a]\n- Updated dependencies [e059176]\n  - @granite-js/video@1.0.8\n  - @granite-js/native@1.0.8\n  - @granite-js/blur-view@1.0.8\n  - @granite-js/jest@1.0.8\n  - @granite-js/style-utils@1.0.8\n  - @granite-js/cli@1.0.8\n  - @granite-js/mpack@1.0.8\n  - @granite-js/plugin-core@1.0.8\n\n## 1.0.7\n\n### Patch Changes\n\n- @granite-js/blur-view@1.0.7\n- @granite-js/cli@1.0.7\n- @granite-js/jest@1.0.7\n- @granite-js/mpack@1.0.7\n- @granite-js/native@1.0.7\n- @granite-js/plugin-core@1.0.7\n- @granite-js/style-utils@1.0.7\n- @granite-js/video@1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- Updated dependencies [93e31cb]\n  - @granite-js/video@1.0.6\n  - @granite-js/native@1.0.6\n  - @granite-js/blur-view@1.0.6\n  - @granite-js/jest@1.0.6\n  - @granite-js/style-utils@1.0.6\n  - @granite-js/cli@1.0.6\n  - @granite-js/mpack@1.0.6\n  - @granite-js/plugin-core@1.0.6\n\n## 1.0.5\n\n### Patch Changes\n\n- @granite-js/native@1.0.5\n- @granite-js/blur-view@1.0.5\n- @granite-js/jest@1.0.5\n- @granite-js/style-utils@1.0.5\n- @granite-js/cli@1.0.5\n- @granite-js/mpack@1.0.5\n- @granite-js/plugin-core@1.0.5\n- @granite-js/video@1.0.5\n\n## 1.0.4\n\n### Patch Changes\n\n- cc75aa4: fix: default header title should be empty string\n- Updated dependencies [cc75aa4]\n  - @granite-js/native@1.0.4\n  - @granite-js/blur-view@1.0.4\n  - @granite-js/jest@1.0.4\n  - @granite-js/style-utils@1.0.4\n  - @granite-js/cli@1.0.4\n  - @granite-js/mpack@1.0.4\n  - @granite-js/plugin-core@1.0.4\n  - @granite-js/video@1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n- Updated dependencies [23d1a4a]\n- Updated dependencies [7694332]\n  - @granite-js/jest@1.0.3\n  - @granite-js/blur-view@1.0.3\n  - @granite-js/cli@1.0.3\n  - @granite-js/mpack@1.0.3\n  - @granite-js/native@1.0.3\n  - @granite-js/plugin-core@1.0.3\n  - @granite-js/style-utils@1.0.3\n  - @granite-js/video@1.0.3\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n- Updated dependencies [d4beb3b]\n- Updated dependencies [b325495]\n  - @granite-js/plugin-core@1.0.2\n  - @granite-js/mpack@1.0.2\n  - @granite-js/blur-view@1.0.2\n  - @granite-js/cli@1.0.2\n  - @granite-js/jest@1.0.2\n  - @granite-js/native@1.0.2\n  - @granite-js/style-utils@1.0.2\n  - @granite-js/video@1.0.2\n\n## 1.0.1\n\n### Patch Changes\n\n- Updated dependencies [ee26531]\n  - @granite-js/video@1.0.1\n  - @granite-js/native@1.0.1\n  - @granite-js/blur-view@1.0.1\n  - @granite-js/jest@1.0.1\n  - @granite-js/style-utils@1.0.1\n  - @granite-js/cli@1.0.1\n  - @granite-js/mpack@1.0.1\n  - @granite-js/plugin-core@1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n\n### Patch Changes\n\n- Updated dependencies [260daab]\n  - @granite-js/plugin-core@1.0.0\n  - @granite-js/style-utils@1.0.0\n  - @granite-js/blur-view@1.0.0\n  - @granite-js/native@1.0.0\n  - @granite-js/mpack@1.0.0\n  - @granite-js/video@1.0.0\n  - @granite-js/jest@1.0.0\n  - @granite-js/cli@1.0.0\n"
  },
  {
    "path": "packages/react-native/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/react-native/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/react-native\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@babel/core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n2. **@babel/preset-env**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n3. **@babel/preset-typescript**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n4. **@granite-js/video**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/toss/granite.git\n\t\n5. **@standard-schema/spec**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/standard-schema/standard-schema\n\t\n6. **@testing-library/dom**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/testing-library/dom-testing-library\n\t\n7. **@testing-library/react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/testing-library/react-testing-library\n\t\n8. **@types/babel__core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n9. **@types/babel__preset-env**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n10. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n11. **@types/react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n12. **@types/react-dom**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n13. **@vitest/coverage-v8**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n14. **es-toolkit**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/toss/es-toolkit.git\n\t\n15. **esbuild**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/evanw/esbuild.git\n\t\n16. **eslint**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/eslint/eslint.git\n\t\n17. **jsdom**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/jsdom/jsdom.git\n\t\n18. **react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/react.git\n\t\n19. **react-dom**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/react.git\n\t\n20. **react-native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/react-native.git\n\t\n21. **react-native-url-polyfill**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/charpeni/react-native-url-polyfill.git\n\t\n22. **tsup**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/egoist/tsup.git\n\t\n23. **vitest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/vitest-dev/vitest.git\n\t\n24. **zod**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/colinhacks/zod.git\n\t\n25. **brick-module**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/toss/brick.git\n\t\n26. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/react-native/README.md",
    "content": "# @granite-js/react-native\n\nThe Granite Framework\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/react-native/async-bridges.d.ts",
    "content": "export * from './dist/async-bridges';\n"
  },
  {
    "path": "packages/react-native/babel.config.js",
    "content": "module.exports = {\n  presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],\n};\n"
  },
  {
    "path": "packages/react-native/bin/cli.js",
    "content": "#!/usr/bin/env node\n\nrequire('@granite-js/cli').initialize();\n"
  },
  {
    "path": "packages/react-native/cli.d.ts",
    "content": "export * from './dist/cli';\n"
  },
  {
    "path": "packages/react-native/config.d.ts",
    "content": "export * from './dist/config';\n"
  },
  {
    "path": "packages/react-native/constant-bridges.d.ts",
    "content": "export * from './dist/constant-bridges';\n"
  },
  {
    "path": "packages/react-native/jest.d.ts",
    "content": "export * from './dist/jest';\n"
  },
  {
    "path": "packages/react-native/package.json",
    "content": "{\n  \"name\": \"@granite-js/react-native\",\n  \"version\": \"1.0.23\",\n  \"description\": \"The Granite Framework\",\n  \"bin\": {\n    \"granite\": \"./bin/cli.js\"\n  },\n  \"scripts\": {\n    \"typecheck\": \"tsc --noEmit\",\n    \"test\": \"vitest --no-watch --coverage\",\n    \"lint\": \"eslint .\",\n    \"build\": \"tsup && tsc -p tsconfig.build.json\",\n    \"prepack\": \"yarn build\"\n  },\n  \"main\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/react-native\"\n  },\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.ts\",\n      \"default\": \"./src/index.ts\"\n    },\n    \"./async-bridges\": {\n      \"import\": {\n        \"types\": \"./dist/async-bridges.d.mts\",\n        \"default\": \"./dist/async-bridges.mjs\"\n      },\n      \"require\": {\n        \"types\": \"./dist/async-bridges.d.ts\",\n        \"default\": \"./dist/async-bridges.js\"\n      }\n    },\n    \"./constant-bridges\": {\n      \"import\": {\n        \"types\": \"./dist/constant-bridges.d.mts\",\n        \"default\": \"./dist/constant-bridges.mjs\"\n      },\n      \"require\": {\n        \"types\": \"./dist/constant-bridges.d.ts\",\n        \"default\": \"./dist/constant-bridges.js\"\n      }\n    },\n    \"./config\": {\n      \"import\": {\n        \"types\": \"./dist/config.d.mts\",\n        \"default\": \"./dist/config.mjs\"\n      },\n      \"require\": {\n        \"types\": \"./dist/config.d.ts\",\n        \"default\": \"./dist/config.js\"\n      }\n    },\n    \"./cli\": {\n      \"import\": {\n        \"types\": \"./dist/cli.d.mts\",\n        \"default\": \"./dist/cli.mjs\"\n      },\n      \"require\": {\n        \"types\": \"./dist/cli.d.ts\",\n        \"default\": \"./dist/cli.js\"\n      }\n    },\n    \"./jest\": {\n      \"import\": {\n        \"types\": \"./dist/jest.d.mts\",\n        \"default\": \"./dist/jest.mjs\"\n      },\n      \"require\": {\n        \"types\": \"./dist/jest.d.ts\",\n        \"default\": \"./dist/jest.js\"\n      }\n    },\n    \"./types\": {\n      \"types\": \"./dist/types/global.d.ts\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"src\",\n    \"dist\",\n    \"bin\",\n    \"config.js\",\n    \"cli.js\",\n    \"*.d.ts\"\n  ],\n  \"devDependencies\": {\n    \"@babel/core\": \"7.28.5\",\n    \"@babel/preset-env\": \"7.28.5\",\n    \"@babel/preset-typescript\": \"7.28.5\",\n    \"@granite-js/native\": \"workspace:*\",\n    \"@testing-library/dom\": \"^10.4.0\",\n    \"@testing-library/react\": \"^16.1.0\",\n    \"@types/babel__core\": \"^7\",\n    \"@types/babel__preset-env\": \"^7\",\n    \"@types/node\": \"catalog:tools\",\n    \"@types/react\": \"catalog:react-native\",\n    \"@types/react-dom\": \"catalog:react-native\",\n    \"@vitest/coverage-v8\": \"^4.0.12\",\n    \"brick-module\": \"catalog:brick-module\",\n    \"esbuild\": \"0.25.9\",\n    \"eslint\": \"^9.7.0\",\n    \"jsdom\": \"^25.0.1\",\n    \"react\": \"catalog:react-native\",\n    \"react-dom\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"tsup\": \"^8.5.0\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"^4.0.12\",\n    \"zod\": \"^4.1.12\"\n  },\n  \"peerDependencies\": {\n    \"@granite-js/native\": \"workspace:*\",\n    \"@types/react\": \"*\",\n    \"brick-module\": \"*\",\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"dependencies\": {\n    \"@granite-js/blur-view\": \"workspace:*\",\n    \"@granite-js/brownfield-module\": \"workspace:*\",\n    \"@granite-js/cli\": \"workspace:*\",\n    \"@granite-js/jest\": \"workspace:*\",\n    \"@granite-js/mpack\": \"workspace:*\",\n    \"@granite-js/plugin-core\": \"workspace:*\",\n    \"@granite-js/style-utils\": \"workspace:*\",\n    \"@granite-js/video\": \"workspace:*\",\n    \"@standard-schema/spec\": \"^1.0.0\",\n    \"es-toolkit\": \"^1.39.8\",\n    \"react-native-url-polyfill\": \"3.0.0\"\n  },\n  \"sideEffects\": [\n    \"dist/async-bridges.*\",\n    \"dist/constant-bridges.*\",\n    \"src/types/global.ts\"\n  ]\n}\n"
  },
  {
    "path": "packages/react-native/presets.d.ts",
    "content": "export * from './dist/presets';\n"
  },
  {
    "path": "packages/react-native/react-native.code-workspace",
    "content": "{\n  \"folders\": [\n    {\n      \"path\": \".\",\n    },\n  ],\n  \"settings\": {\n    \"eslint.nodePath\": \"../../.yarn/sdks\",\n    \"typescript.enablePromptUseWorkspaceTsdk\": true,\n    \"typescript.tsdk\": \"../../.yarn/sdks/typescript/lib\",\n    \"prettier.prettierPath\": \"../../.yarn/sdks/prettier/index.cjs\",\n    \"prettier.configPath\": \"../../.prettierrc\",\n    \"jest.enable\": true,\n    \"jest.rootPath\": \".\",\n    \"jest.jestCommandLine\": \"yarn jest\",\n  },\n}\n"
  },
  {
    "path": "packages/react-native/src/app/App/index.android.tsx",
    "content": "import { VisibilityProvider } from '../../visibility';\nimport { Props } from '.';\n\nexport function App({ children }: Props) {\n  return <VisibilityProvider isVisible={true}>{children}</VisibilityProvider>;\n}\n"
  },
  {
    "path": "packages/react-native/src/app/App/index.d.ts",
    "content": "import { PropsWithChildren } from 'react';\nimport { InitialProps } from '../../initial-props';\n\nexport type Props = PropsWithChildren<InitialProps>;\n\nexport declare function App(props: Props): JSX.Element;\n"
  },
  {
    "path": "packages/react-native/src/app/App/index.ios.tsx",
    "content": "import { useMemo } from 'react';\nimport { VisibilityProvider } from '../../visibility';\nimport { Props } from '.';\n\ntype IOSInitialProps = Props & {\n  isVisible: boolean;\n};\n\nexport function App({ children, ...props }: IOSInitialProps) {\n  const { isVisible } = useMemo(() => props, [props]);\n\n  return <VisibilityProvider isVisible={isVisible}>{children}</VisibilityProvider>;\n}\n"
  },
  {
    "path": "packages/react-native/src/app/AppRoot.tsx",
    "content": "import { SafeAreaProvider } from '@granite-js/native/react-native-safe-area-context';\nimport type { ComponentType, PropsWithChildren } from 'react';\nimport type { InitialProps } from '../initial-props';\nimport { Router, type InternalRouterProps } from '../router';\nimport { BackEventProvider } from '../use-back-event';\nimport { App } from './App';\nimport type { GraniteProps } from './Granite';\nimport { getSchemePrefix } from '../utils/getSchemePrefix';\nimport { InitialPropsProvider } from './context/InitialPropsContext';\n\n/**\n * @internal\n */\ninterface AppRootProps extends GraniteProps {\n  container: ComponentType<PropsWithChildren<InitialProps>>;\n  initialProps: InitialProps;\n  initialScheme: string;\n  setIosSwipeGestureEnabled?: ({ isEnabled }: { isEnabled: boolean }) => void;\n  getInitialUrl: InternalRouterProps['getInitialUrl'];\n}\n\nexport function AppRoot({\n  appName,\n  context,\n  container: Container,\n  initialProps,\n  initialScheme,\n  router,\n  setIosSwipeGestureEnabled,\n  getInitialUrl,\n}: AppRootProps) {\n  const prefix = getSchemePrefix({\n    appName,\n    scheme: global.__granite.app.scheme,\n    host: global.__granite.app.host,\n  });\n\n  return (\n    <InitialPropsProvider initialProps={initialProps}>\n      <App {...initialProps}>\n        <SafeAreaProvider>\n          <BackEventProvider>\n            <Router\n              context={context}\n              initialProps={initialProps}\n              initialScheme={initialScheme}\n              container={Container}\n              prefix={prefix}\n              setIosSwipeGestureEnabled={setIosSwipeGestureEnabled}\n              getInitialUrl={getInitialUrl}\n              {...router}\n            />\n          </BackEventProvider>\n        </SafeAreaProvider>\n      </App>\n    </InitialPropsProvider>\n  );\n}\n"
  },
  {
    "path": "packages/react-native/src/app/Granite.tsx",
    "content": "import { ComponentType, type JSX, PropsWithChildren } from 'react';\nimport { AppRegistry } from 'react-native';\nimport { ENTRY_BUNDLE_NAME } from '../constants';\nimport type { InitialProps } from '../initial-props';\nimport type { RouterProps, RequireContext } from '../router';\nimport { AppRoot } from './AppRoot';\nimport { HostAppRoot } from './HostAppRoot';\nimport { getSchemeUri } from '../constant-bridges';\nimport { setupPolyfills } from '../polyfills';\n\nexport interface GraniteProps {\n  /**\n   * @description\n   * The name of the app.\n   */\n  appName: string;\n  /**\n   * @description\n   * The context of the app.\n   *\n   * @TODO Hide context\n   */\n  context: RequireContext;\n  /**\n   * @description\n   * Configuration object to be passed to the router.\n   */\n  router?: RouterProps;\n\n  /**\n   * @description\n   * The initial scheme of the app.\n   */\n  initialScheme?: string;\n\n  /**\n   * @description\n   * The function to set the iOS swipe gesture enabled.\n   */\n  setIosSwipeGestureEnabled?: ({ isEnabled }: { isEnabled: boolean }) => void;\n\n  /**\n   * @description\n   * The function to provide the initial URL to router.\n   * @param initialScheme The initial scheme of the app.\n   * @returns\n   */\n  getInitialUrl?: (initialScheme: string) => string | undefined | Promise<string | undefined>;\n}\n\nconst createApp = () => {\n  let _appName: string | null = null;\n\n  setupPolyfills();\n\n  function registerComponent(appKey: string, component: React.ComponentType<any>): string {\n    if (AppRegistry.getAppKeys().includes(appKey)) {\n      // `AppRegistry.registerComponent` returns the app key.\n      return appKey;\n    }\n\n    return AppRegistry.registerComponent(appKey, () => component);\n  }\n\n  return {\n    registerApp(\n      AppContainer: ComponentType<PropsWithChildren<InitialProps>>,\n      { appName, context, router, initialScheme, setIosSwipeGestureEnabled, getInitialUrl }: GraniteProps\n    ): (initialProps: InitialProps) => JSX.Element {\n      if (appName === ENTRY_BUNDLE_NAME) {\n        throw new Error(`Reserved app name 'shared' cannot be used`);\n      }\n\n      function Root(initialProps: InitialProps) {\n        return (\n          <AppRoot\n            container={AppContainer}\n            initialProps={initialProps}\n            initialScheme={initialScheme ?? getSchemeUri()}\n            setIosSwipeGestureEnabled={setIosSwipeGestureEnabled}\n            getInitialUrl={getInitialUrl}\n            appName={appName}\n            context={context}\n            router={router}\n          />\n        );\n      }\n\n      registerComponent(appName, Root);\n      _appName = appName;\n\n      return Root;\n    },\n\n    registerHostApp(\n      AppContainer: ComponentType<PropsWithChildren<InitialProps>>,\n      { appName }: Pick<GraniteProps, 'appName'>\n    ): (initialProps: InitialProps) => React.JSX.Element {\n      if (appName !== ENTRY_BUNDLE_NAME) {\n        throw new Error(`Host appName must be 'shared'`);\n      }\n\n      function Root(initialProps: InitialProps) {\n        return <HostAppRoot container={AppContainer} initialProps={initialProps} />;\n      }\n\n      registerComponent(appName, Root);\n      _appName = appName;\n\n      return Root;\n    },\n\n    get appName(): string {\n      if (_appName === null) {\n        throw new Error('Granite.appName can only be used after registerApp or registerHostApp has been called.');\n      }\n      return _appName;\n    },\n  };\n};\n\n/**\n * @public\n * @category Core\n * @name Granite\n * @description\n *\n * @property {RegisterService} registerApp - This function sets up the basic environment for your service and helps you start service development quickly without needing complex configuration. By just passing `appName`, you can immediately use various features such as file-based routing, query parameter handling, and back navigation control.\n *\n * The features provided by the `Granite.registerApp` function are as follows:\n * - Routing: URLs are automatically mapped according to file paths. It works similarly to Next.js's file-based routing. For example, the `/my-service/pages/index.ts` file can be accessed at `scheme://my-service`, and the `/my-service/pages/home.ts` file can be accessed at `scheme://my-service/home`.\n * - Query Parameters: You can easily use query parameters received through URL schemes. For example, you can receive a `referrer` parameter and log it.\n * - Back Navigation Control: You can control back navigation events. For example, when a user presses back on a screen, you can show a dialog or close the screen.\n * - Screen Visibility: You can determine whether a screen is visible or hidden from the user. For example, you can use this value to handle specific actions when a user leaves for the home screen.\n *\n * @example\n *\n * ### Example of creating with the `Granite` component\n *\n * ```tsx\n * import { PropsWithChildren } from 'react';\n * import { Granite, InitialProps } from '@granite-js/react-native';\n * import { context } from '../require.context';\n *\n * function AppContainer({ children }: PropsWithChildren<InitialProps>) {\n *  return <>{children}</>;\n * }\n *\n * export default Granite.registerApp(AppContainer, {\n *  appName: 'my-app',\n *  context,\n * });\n *\n * ```\n */\nexport const Granite = createApp();\n"
  },
  {
    "path": "packages/react-native/src/app/HostAppRoot.tsx",
    "content": "import type { ComponentType, PropsWithChildren } from 'react';\nimport type { InitialProps } from '../initial-props';\nimport { App } from './App';\n\n/**\n * @internal\n */\ninterface HostAppRootProps {\n  container: ComponentType<PropsWithChildren<InitialProps>>;\n  initialProps: InitialProps;\n}\n\nexport function HostAppRoot({ container: Container, initialProps }: HostAppRootProps) {\n  return (\n    <App {...initialProps}>\n      <Container {...initialProps} />\n    </App>\n  );\n}\n"
  },
  {
    "path": "packages/react-native/src/app/context/InitialPropsContext.tsx",
    "content": "import { createContext, useContext, type PropsWithChildren } from 'react';\nimport { InitialProps } from '../../initial-props';\n\nexport const InitialPropsContext = createContext<InitialProps | null>(null);\n\nexport function InitialPropsProvider({ children, initialProps }: PropsWithChildren<{ initialProps: InitialProps }>) {\n  return <InitialPropsContext.Provider value={initialProps}>{children}</InitialPropsContext.Provider>;\n}\n\n/**\n * @public\n * @name useInitialProps\n * @category Core\n * @description Provides initial data passed from the native platform (Android or iOS) when entering a specific screen in React Native apps. This data can be used to immediately apply themes or user settings right after app launch. For example, you can receive dark mode settings from the native platform and apply dark mode immediately when the React Native app starts.\n * @returns {InitialProps} Initial data for the app\n * @example\n *\n * ### Checking dark mode status with initial data\n *\n * ```tsx\n * import { useInitialProps } from '@granite-js/react-native';\n *\n * function Page() {\n *   const initialProps = useInitialProps();\n *   // 'light' or 'dark'\n *   console.log(initialProps.initialColorPreference);\n *   return <></>;\n * }\n * ```\n */\nexport function useInitialProps<T extends InitialProps>() {\n  const initialProps = useContext(InitialPropsContext);\n\n  if (!initialProps) {\n    throw new Error('InitialPropsContext not found');\n  }\n\n  return initialProps as T;\n}\n"
  },
  {
    "path": "packages/react-native/src/app/context/getSearchParamsFromUrl.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getSearchParamsFromUrl } from './getSearchParamsFromUrl';\n\ndescribe('getSearchParamsFromUrl', () => {\n  it('returns query parameters from a custom scheme URL', () => {\n    expect(getSearchParamsFromUrl('myapp://home?userId=42&theme=dark')).toEqual({\n      userId: '42',\n      theme: 'dark',\n    });\n  });\n\n  it('decodes query parameters the same way as URLSearchParams', () => {\n    expect(getSearchParamsFromUrl('myapp://home?name=foo+bar&message=hello%20world')).toEqual({\n      name: 'foo bar',\n      message: 'hello world',\n    });\n  });\n\n  it('ignores the hash fragment and keeps the last duplicated key', () => {\n    expect(getSearchParamsFromUrl('myapp://home?a=1&a=2#section')).toEqual({\n      a: '2',\n    });\n  });\n\n  it('returns an empty object for URLs without a query string', () => {\n    expect(getSearchParamsFromUrl('myapp://home')).toEqual({});\n  });\n\n  it('returns an empty object for invalid URLs', () => {\n    expect(getSearchParamsFromUrl('not a url')).toEqual({});\n  });\n});\n"
  },
  {
    "path": "packages/react-native/src/app/context/getSearchParamsFromUrl.ts",
    "content": "export function getSearchParamsFromUrl(url: string): Record<string, string> {\n  if (typeof URLSearchParams === 'undefined') {\n    return {};\n  }\n\n  const queryString = getQueryString(url);\n\n  if (queryString == null || queryString.length === 0) {\n    return {};\n  }\n\n  return Object.fromEntries(new URLSearchParams(queryString));\n}\n\nfunction getQueryString(url: string) {\n  const questionMarkIndex = url.indexOf('?');\n\n  if (questionMarkIndex === -1) {\n    return null;\n  }\n\n  const fragmentIndex = url.indexOf('#', questionMarkIndex + 1);\n  const queryEndIndex = fragmentIndex === -1 ? url.length : fragmentIndex;\n\n  return url.slice(questionMarkIndex + 1, queryEndIndex);\n}\n"
  },
  {
    "path": "packages/react-native/src/app/context/useInitialSearchParams.ts",
    "content": "import { useMemo } from 'react';\nimport { useInitialProps } from './InitialPropsContext';\nimport { getSearchParamsFromUrl } from './getSearchParamsFromUrl';\nimport { getSchemeUri } from '../../native-modules';\n\n/**\n * @public\n * @name useInitialSearchParams\n * @category EnvironmentCheck\n * @description A hook that returns the query parameters from the URL passed when the app is first launched, directly as an object. This allows immediate application of initial entry handling like login or theme settings, enabling quick customization of user experience. If an invalid URL is provided, it safely returns an empty object. When the native platform (Android or iOS) passes a URL with query parameters to the app on first launch, you can easily read each parameter value using this hook.\n *\n * @returns {Record<string, string>} An object containing key-value pairs of query parameters from the initial URL. Returns an empty object if there are no query parameters or if the URL is invalid.\n * @example\n * ```tsx\n * import { useInitialSearchParams } from '@granite-js/react-native';\n *\n * function Page() {\n *   const params = useInitialSearchParams();\n *   // Example: if initial URL is myapp://home?userId=42&theme=dark\n *   console.log(params.userId); // \"42\"\n *   console.log(params.theme);  // \"dark\"\n *   return <></>;\n * }\n * ```\n */\nexport function useInitialSearchParams() {\n  const scheme = useInitialProps().scheme ?? getSchemeUri();\n\n  return useMemo(() => getSearchParamsFromUrl(scheme), [scheme]);\n}\n"
  },
  {
    "path": "packages/react-native/src/app/index.ts",
    "content": "export { useInitialProps } from './context/InitialPropsContext';\nexport { useInitialSearchParams } from './context/useInitialSearchParams';\nexport { Granite } from './Granite';\nexport type { GraniteProps } from './Granite';\n"
  },
  {
    "path": "packages/react-native/src/async-bridges.ts",
    "content": "export * from './native-modules/natives/closeView';\nexport * from './native-modules/natives/openURL';\n"
  },
  {
    "path": "packages/react-native/src/cli.ts",
    "content": "export { initialize } from '@granite-js/cli';\n"
  },
  {
    "path": "packages/react-native/src/config.ts",
    "content": "export { defineConfig } from '@granite-js/plugin-core';\n"
  },
  {
    "path": "packages/react-native/src/constant-bridges.ts",
    "content": "export * from './native-modules/natives/getSchemeUri';\n"
  },
  {
    "path": "packages/react-native/src/constants.ts",
    "content": "export const ENTRY_BUNDLE_NAME = 'shared';\n"
  },
  {
    "path": "packages/react-native/src/dev-entrypoint/index.tsx",
    "content": "import type { ComponentType } from 'react';\nimport { AppRegistry } from 'react-native';\nimport { ENTRY_BUNDLE_NAME } from '../constants';\n\nexport function register(Component: ComponentType<any>) {\n  if (AppRegistry.getAppKeys().includes(ENTRY_BUNDLE_NAME)) {\n    console.warn('Granite entrypoint is already registered');\n    return;\n  }\n\n  const component = (props: any) => <Component {...props} />;\n\n  AppRegistry.registerComponent(ENTRY_BUNDLE_NAME, () => component);\n}\n"
  },
  {
    "path": "packages/react-native/src/event/abstract.ts",
    "content": "export abstract class GraniteEventDefinition<O = undefined, R = void> {\n  // Event name (literal type recommended)\n  abstract name: string;\n\n  /**\n   * Method to implement event logic.\n   * @param options - Event options (undefined if not used)\n   * @param onEvent - Callback called when the event is triggered.\n   * @param onError - Callback called on error (error type: unknown)\n   */\n  abstract listener(options: O, onEvent: (response: R) => void, onError: (error: unknown) => void): void;\n\n  /**\n   * Additional logic to execute when removing the event listener.\n   * If needed in the plugin, override this method and it will be called\n   * when the listener is removed.\n   */\n  abstract remove(): void;\n}\n\n/**\n * GraniteEvent class registers event definition instances passed to the constructor.\n * The addEventListener method only allows registered event names, and the types of passed\n * options/callbacks are automatically inferred.\n *\n * Each subscription is uniquely identified by (event name + options).\n */\nexport class GraniteEvent<Defs extends GraniteEventDefinition<unknown, unknown>> {\n  private definitions = new Map<Defs['name'], Defs>();\n  private subscriptionGroups = new Map<\n    string,\n    {\n      eventName: Defs['name'];\n      options: Extract<Defs, { name: Defs['name'] }> extends GraniteEventDefinition<infer O, any> ? O : never;\n      callbacks: Array<{\n        onEvent: (response: any) => void;\n        onError?: (error: unknown) => void;\n      }>;\n    }\n  >();\n\n  constructor(defs: Defs[]) {\n    for (const def of defs) {\n      this.definitions.set(def.name, def);\n    }\n  }\n\n  addEventListener<E extends Defs['name']>(\n    eventName: E,\n    listener: Extract<Defs, { name: E }> extends GraniteEventDefinition<infer O, infer R>\n      ? [O] extends [undefined]\n        ? { onEvent: (response: R) => void; onError?: (error: unknown) => void }\n        : { options: O; onEvent: (response: R) => void; onError?: (error: unknown) => void }\n      : never\n  ): () => void {\n    const def = this.definitions.get(eventName);\n    if (!def) {\n      throw new Error(`Event \"${String(eventName)}\" is not registered.`);\n    }\n    const opts = (listener as any).options;\n    const key = this._getKey(String(eventName), opts);\n    let group = this.subscriptionGroups.get(key);\n\n    if (!group) {\n      group = {\n        eventName,\n        options: opts,\n        callbacks: [],\n      };\n      this.subscriptionGroups.set(key, group);\n\n      const aggregatedOnEvent = (response: any) => {\n        for (const cb of group!.callbacks) {\n          cb.onEvent(response);\n        }\n      };\n      const aggregatedOnError = (error: unknown) => {\n        for (const cb of group!.callbacks) {\n          if (cb.onError) {\n            cb.onError(error);\n          }\n        }\n      };\n\n      def.listener(group.options, aggregatedOnEvent, aggregatedOnError);\n    }\n\n    group.callbacks.push({ onEvent: listener.onEvent, onError: listener.onError });\n\n    return () => {\n      const grp = this.subscriptionGroups.get(key);\n      if (!grp) {\n        return;\n      }\n      grp.callbacks = grp.callbacks.filter((cb) => cb.onEvent !== listener.onEvent);\n      if (grp.callbacks.length === 0) {\n        def.remove();\n        this.subscriptionGroups.delete(key);\n      }\n    };\n  }\n\n  emit<E extends Defs['name']>(\n    eventName: E,\n    data: Extract<Defs, { name: E }> extends GraniteEventDefinition<unknown, infer R> ? R : never\n  ) {\n    const def = this.definitions.get(eventName);\n    if (!def) {\n      throw new Error(`Event \"${String(eventName)}\" is not registered.`);\n    }\n\n    for (const group of this.subscriptionGroups.values()) {\n      if (group.eventName === eventName) {\n        for (const callback of group.callbacks) {\n          try {\n            callback.onEvent(data);\n          } catch (error) {\n            if (callback.onError) {\n              callback.onError(error);\n            }\n          }\n        }\n      }\n    }\n  }\n\n  private _getKey(eventName: string, options: unknown): string {\n    return `${eventName}:${options ? JSON.stringify(options) : ''}`;\n  }\n}\n"
  },
  {
    "path": "packages/react-native/src/event/index.ts",
    "content": "export * from './abstract';\nexport * from './useGraniteEvent';\n"
  },
  {
    "path": "packages/react-native/src/event/useGraniteEvent.ts",
    "content": "import { useMemo } from 'react';\nimport { GraniteEvent, GraniteEventDefinition } from './abstract';\nimport { BackEventControls, useBackEvent } from '../use-back-event/useBackEvent';\n\nclass BackEvent extends GraniteEventDefinition<void, void> {\n  name = 'backEvent' as const;\n\n  ref = {\n    remove: () => {},\n  };\n\n  constructor(private backEventControls: BackEventControls) {\n    super();\n  }\n\n  remove() {\n    this.ref.remove();\n  }\n\n  listener(_: void, onEvent: (response: void) => void): void {\n    this.backEventControls.addEventListener(onEvent);\n    this.ref.remove = () => this.backEventControls.removeEventListener(onEvent);\n  }\n}\n\nexport function useGraniteEvent() {\n  const backEvent = useBackEvent();\n\n  const event = useMemo(() => {\n    return new GraniteEvent([new BackEvent(backEvent)]);\n  }, [backEvent]);\n\n  return event;\n}\n"
  },
  {
    "path": "packages/react-native/src/image/Image.tsx",
    "content": "import GraniteImage, {\n  GraniteImageProps,\n  OnErrorEvent,\n  OnLoadEndEvent,\n  OnLoadStartEvent,\n  type GraniteImageSource,\n} from '@granite-js/native/react-native-fast-image';\nimport { NativeSyntheticEvent, StyleSheet } from 'react-native';\nimport { SvgImage } from './SvgImage';\n\ntype Source = {\n  uri?: string;\n  headers?: Record<string, string>;\n  priority?: 'low' | 'normal' | 'high';\n  cache?: 'immutable' | 'web' | 'cacheOnly';\n};\n\nexport interface ImageProps extends Omit<GraniteImageProps, 'source' | 'onError'> {\n  source?: Source;\n\n  onLoadStart?: (event: NativeSyntheticEvent<OnLoadStartEvent> | Readonly<{ type: 'svg' }>) => void;\n  onLoadEnd?: (event: NativeSyntheticEvent<OnLoadEndEvent> | Readonly<{ type: 'svg' }>) => void;\n  onError?: (event: NativeSyntheticEvent<OnErrorEvent> | Readonly<{ type: 'svg' }>) => void;\n}\n\n/**\n * @public\n * @category UI\n * @name Image\n * @description You can use the `Image` component to load and render bitmap images (such as PNG, JPG) or vector images (SVG). It automatically renders with the appropriate method depending on the image format.\n *\n * @param {object} [props] - The `props` object passed to the component.\n * @param {object} [props.style] - An object that defines the style for the image component. It can include layout-related properties like `width` and `height`.\n * @param {object} [props.source] - An object containing information about the image resource to load.\n * @param {string} [props.source.uri] - The URI address representing the image resource to load.\n * @param {'immutable' | 'web' | 'cacheOnly'} [props.source.cache = 'immutable'] - An option to set the image caching strategy. This applies only to bitmap images. The default value is `immutable`.\n * @param {() => void} [props.onLoadStart] - A callback function that is called when image loading starts.\n * @param {() => void} [props.onLoadEnd] - A callback function that is called when image loading finishes.\n * @param {() => void} [props.onError] - A callback function that is called when an error occurs during image loading.\n *\n * @example\n * ### Example: Loading and rendering an image\n *\n * The following example shows how to load bitmap and vector image resources, and how to print an error message to `console.log` if an error occurs.\n *\n * ```tsx\n * import { Image } from '@granite-js/react-native';\n * import { View } from 'react-native';\n *\n * export function ImageExample() {\n *   return (\n *     <View>\n *       <Image\n *         source={{ uri: 'my-image-link' }}\n *         style={{\n *           width: 300,\n *           height: 300,\n *           borderWidth: 1,\n *         }}\n *         onError={() => {\n *           console.log('Failed to load image');\n *         }}\n *       />\n *\n *       <Image\n *         source={{ uri: 'my-svg-link' }}\n *         style={{\n *           width: 300,\n *           height: 300,\n *           borderWidth: 1,\n *         }}\n *         onError={() => {\n *           console.log('Failed to load image');\n *         }}\n *       />\n *     </View>\n *   );\n * }\n * ```\n */\nfunction Image(props: ImageProps) {\n  if (typeof props.source === 'object' && props.source.uri?.endsWith('.svg')) {\n    const style = StyleSheet.flatten(props.style);\n    const width = style?.width;\n    const height = style?.height;\n\n    return (\n      <SvgImage\n        testID={props.testID}\n        url={props.source.uri!}\n        width={width}\n        height={height}\n        style={props.style}\n        onLoadStart={props.onLoadStart ? (e) => props.onLoadStart?.({ type: 'svg', ...e }) : undefined}\n        onLoadEnd={props.onLoadEnd ? (e) => props.onLoadEnd?.({ type: 'svg', ...e }) : undefined}\n        onError={props.onError ? () => props.onError?.({ type: 'svg' }) : undefined}\n      />\n    );\n  }\n\n  const source: GraniteImageSource | string | undefined = props.source\n    ? props.source.uri\n      ? {\n          uri: props.source.uri,\n          headers: props.source.headers,\n          priority: props.source.priority,\n          cache: props.source.cache,\n        }\n      : undefined\n    : undefined;\n\n  if (!source) {\n    return null;\n  }\n\n  const handleError = props.onError\n    ? (event: NativeSyntheticEvent<OnErrorEvent>) => {\n        props.onError?.(event);\n      }\n    : undefined;\n\n  return <GraniteImage {...props} source={source} onError={handleError} />;\n}\n\nexport { Image };\n"
  },
  {
    "path": "packages/react-native/src/image/SvgImage.tsx",
    "content": "import { SvgUri, SvgXml } from '@granite-js/native/react-native-svg';\nimport { createElement, useEffect, useCallback, useState } from 'react';\nimport { View, type ViewStyle, type StyleProp } from 'react-native';\nimport type { DimensionValue, NumberValue } from './types';\nimport { usePreservedCallback } from '../utils/usePreservedCallback';\n\nexport interface SvgImageProps {\n  url: string;\n  width?: DimensionValue;\n  height?: DimensionValue;\n  style?: StyleProp<any>;\n  testID?: string;\n  onLoadStart?: (event: object) => void;\n  onLoadEnd?: (event: object) => void;\n  onError?: () => void;\n}\n\n/**\n * @name SvgImage\n * @category Components\n * @description The `SvgImage` component loads and renders SVG images from a given external URL.\n * @link https://github.com/software-mansion/react-native-svg/tree/v13.14.0/README.md\n *\n * @param {object} props - The `props` object passed to the component.\n * @param {string} props.url - The URI address of the SVG image to load.\n * @param {number | string} [props.width = '100%'] - Sets the horizontal size of the SVG image. Default value is '`100%`'.\n * @param {number | string} [props.height = '100%'] - Sets the vertical size of the SVG image. Default value is '`100%`'.\n * @param {object} props.style - Sets the style of the image component.\n * @param {() => void} props.onLoadStart - A callback function called when the SVG image resource starts loading.\n * @param {() => void} props.onLoadEnd - A callback function called after the SVG image resource is loaded.\n * @param {() => void} props.onError - A callback function called when an error occurs during SVG image loading.\n *\n * @example\n * ```tsx\n * import { SvgImage } from './SvgImage';\n * import { View } from 'react-native';\n *\n * function MyComponent() {\n *   return (\n *     <View>\n *       <SvgImage\n *         url=\"https://example.com/icon.svg\"\n *         width={100}\n *         height={100}\n *         onError={() => console.log('An error occurred while loading the SVG')}\n *       />\n *     </View>\n *   );\n * }\n * ```\n */\nexport function SvgImage({\n  url,\n  width = '100%',\n  height = '100%',\n  style,\n  testID,\n  onLoadStart: _onLoadStart,\n  onLoadEnd: _onLoadEnd,\n  onError: _onError,\n}: SvgImageProps) {\n  const svgStyle = { width, height } as { width: NumberValue; height: NumberValue };\n  const [data, setData] = useState<string | undefined>(undefined);\n  const [isError, setIsError] = useState(false);\n\n  const onLoadStart = usePreservedCallback(() => _onLoadStart?.({}));\n  const onLoadEnd = usePreservedCallback(() => _onLoadEnd?.({}));\n  const onError = usePreservedCallback(() => _onError?.());\n\n  // Component to occupy layout space when the image is not yet rendered\n  const Fallback = useCallback(\n    () => createElement(View, { style: { width, height } as ViewStyle }, null),\n    [width, height]\n  );\n\n  useEffect(() => {\n    let isMounted = true;\n\n    /**\n     * First attempts to fetch the XML resource, and if that fails, tries to load directly by passing the URI to the Svg component\n     */\n    async function fetchSvg() {\n      onLoadStart();\n\n      try {\n        const response = await fetch(url);\n        const svg = await response.text();\n\n        if (isMounted) {\n          onLoadEnd();\n          setData(svg);\n        }\n      } catch {\n        setIsError(true);\n      }\n    }\n\n    fetchSvg();\n\n    return () => {\n      isMounted = false;\n    };\n  }, [onLoadStart, onLoadEnd, url]);\n\n  if (data == null) {\n    return <Fallback />;\n  }\n\n  if (isError) {\n    return (\n      <SvgUri\n        testID={testID}\n        uri={url}\n        style={style}\n        {...svgStyle}\n        onError={onError}\n        onLoad={onLoadEnd}\n        fallback={<Fallback />}\n      />\n    );\n  }\n\n  return <SvgXml testID={testID} xml={data} style={style} {...svgStyle} fallback={<Fallback />} />;\n}\n"
  },
  {
    "path": "packages/react-native/src/image/index.ts",
    "content": "export { Image, type ImageProps } from './Image';\n"
  },
  {
    "path": "packages/react-native/src/image/types.ts",
    "content": "import type { Animated } from 'react-native';\n\n// FIXME: DimensionValue type is not available in React Native 0.68, so it's defined separately\nexport type DimensionValue = string | number | 'auto' | `${number}%` | Animated.AnimatedNode | null;\n\nexport type NumberValue = number | string;\n"
  },
  {
    "path": "packages/react-native/src/impression-area/ImpressionArea.tsx",
    "content": "import { debounce } from 'es-toolkit';\nimport { PropsWithChildren, ReactElement, ReactNode, useContext, useEffect, useMemo, useState } from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\nimport { InView, IOContext } from '../intersection-observer';\nimport { noop } from '../utils/noop';\nimport { usePreservedCallback } from '../utils/usePreservedCallback';\nimport { useVisibility } from '../visibility';\n\ninterface Props {\n  onImpressionStart?: () => void;\n  onImpressionEnd?: () => void;\n  enabled?: boolean;\n  UNSAFE__impressFallbackOnMount?: boolean;\n  style?: StyleProp<ViewStyle>;\n  areaThreshold?: number;\n  timeThreshold?: number;\n  children?: ReactNode;\n}\n\n/**\n * @public\n * @category Screen Control\n * @name ImpressionArea\n * @description\n * A component that detects whether a specific component is visible on the screen and notifies the outside. Using this component, you can easily implement features like collecting logs or running animations when a specific component becomes visible on the screen.\n * The visibility is detected using the return value of `useVisibility` and the `IOScrollView` and `InView` components that indicate whether the component is displayed within the viewport. When using `ScrollView` in React, even if a view is not visible on the screen, using `ImpressionArea` allows you to trigger events only when the view is actually visible on the screen.\n\n::: info Note\n\n`ImpressionArea` must be used inside `IOScrollView`. If you need to use it outside of `IOScrollView`, you can set the `UNSAFE__impressFallbackOnMount` property to `true` to detect based on when the component is mounted. If this property is set to `false` and used outside of `IOScrollView`, an `IOProviderMissingError` will occur.\n\n:::\n *\n * @param {() => void} [onImpressionStart] Callback function that is executed when the child component becomes visible on the screen.\n * @param {() => void} [onImpressionEnd] Callback function that is executed when the child component is hidden from the screen.\n * @param {boolean} [enabled=true] Value that directly controls the condition for visibility. Default value is `true`. If passed as `false`, the `onImpressionStart` callback function will not be executed even if the component is visible.\n * @param {number} [areaThreshold=0] Value that sets the ratio of the visible area. If the component appears on the screen with a ratio greater than this value, `onImpressionStart` is called.\n * The value should be set between 0 and 1. Setting it to 0 triggers the event when even 1px of the component is visible. Conversely, setting it to 1 only triggers the event when the component is 100% visible on the screen.\n * @param {number} [timeThreshold=0] Sets the time in milliseconds before `onImpressionStart` is called after this component becomes visible on the screen. Default value is `0` milliseconds (0 seconds).\n * @param {ViewStyle} [style] `style` value to be applied to the `InView` component. Default value is `undefined`, used when you want to specify a style.\n * @param {boolean} [UNSAFE__impressFallbackOnMount=false] Whether to consider the component as visible immediately when mounted. Default value is `false`.\n * Useful when you cannot determine if the component is in the viewport without using `IOScrollView`. For example, a component located outside of `IOScrollView` will be considered visible at mount time if set to `true`.\n *\n * @returns {ReactElement} - Returns a component that can detect visibility on the screen.\n * @example\n * \n * ### Basic Usage Example\n * \n * ```tsx\n * import { useState } from 'react';\n * import { Button, Dimensions, Text, View } from 'react-native';\n * import { ImpressionArea, IOScrollView } from '@granite-js/react-native';\n * \n * export default function ImpressionAreaExample() {\n *  const [isImpressionStart, setIsImpressionStart] = useState(false);\n * \n *  return (\n *    <>\n *      <Text>{isImpressionStart ? 'Impression Start' : 'Impression End'}</Text>\n *        <IOScrollView\n *          style={{\n *            flex: 1,\n *            margin: 16,\n *            backgroundColor: 'white',\n *          }}\n *        >\n *        <View\n *          style={{\n *            height: Dimensions.get('screen').height,\n *            borderWidth: 1,\n *            borderColor: 'black',\n *          }}\n *        >\n *          <Text>Scroll to here</Text>\n *        </View>\n * \n *        <ImpressionArea\n *          onImpressionStart={() => setIsImpressionStart(true)}\n *          onImpressionEnd={() => setIsImpressionStart(false)}\n *        >\n *          <Button title=\"Button\" />\n *        </ImpressionArea>\n *      </IOScrollView>\n *    </>\n *  );\n * }\n * ```\n *\n * ### Example of Detection at Mount Time\n * \n * When `ImpressionArea` is not located inside a component like `IOScrollView`, setting `UNSAFE__impressFallbackOnMount` to `true` will consider the component as visible when it is mounted.\n * \n * ```tsx\n * import { useState } from 'react';\n * import { Button, Dimensions, ScrollView, Text, View } from 'react-native';\n * import { ImpressionArea } from '@granite-js/react-native';\n * \n * export default function ImpressionArea2Example() {\n *  const [isImpressionStart, setIsImpressionStart] = useState(false);\n * \n *  return (\n *    <>\n *      <Text>{isImpressionStart ? 'Impression Start' : 'Impression End'}</Text>\n *      <ScrollView\n *        style={{\n *          flex: 1,\n *          margin: 16,\n *          backgroundColor: 'white',\n *        }}\n *      >\n *        <View\n *          style={{\n *            height: Dimensions.get('screen').height,\n *            borderWidth: 1,\n *            borderColor: 'black',\n *          }}\n *        >\n *          <Text>Scroll to here</Text>\n *        </View>\n * \n *        <ImpressionArea\n *          UNSAFE__impressFallbackOnMount={true}\n *          onImpressionStart={() => setIsImpressionStart(true)}\n *          onImpressionEnd={() => setIsImpressionStart(false)}\n *        >\n *          <Button title=\"Button\" />\n *        </ImpressionArea>\n *      </ScrollView>\n *    </>\n *  );\n * }\n * ```\n */\nexport function ImpressionArea(props: Props): ReactElement {\n  const context = useContext(IOContext);\n\n  if (context?.manager == null && props.UNSAFE__impressFallbackOnMount) {\n    return <ImpressionAreaOnMount {...props} />;\n  }\n\n  return <ImpressionAreaWithIntersectionObserver {...props} />;\n}\n\nexport class IOProviderMissingError extends Error {\n  message =\n    'ImpressionArea가 IOContext.Provider 밖에서 사용되었습니다. ' +\n    '최상위 ScrollView가 @granite-js/react-native의 IOScrollView인지 확인해주세요.';\n}\n\n/**\n * @category Components\n * @kind function\n * @name ImpressionAreaOnMount\n * @description\n * A component that calls `onImpressionStart` and `onImpressionEnd` when the component is mounted on the screen.\n * Used when `UNSAFE__impressFallbackOnMount` is `true` in `ImpressionArea`.\n * This component can be used when `ImpressionArea` is needed outside of `IOScrollView`.\n *\n * @param {() => void} [onImpressionStart] - Callback function that is called when the component is mounted.\n * @param {() => void} [onImpressionEnd] - Callback function that is called when the component is unmounted.\n * @param {StyleProp<ViewStyle>} [style] - Sets the style of the top-level container of the `ImpressionAreaOnMount` component.\n * @param {ReactNode} [children] - Sets the child components to be wrapped by `ImpressionAreaOnMount`.\n * @returns {ReactElement} - Returns a component that detects mount status\n * @example\n * ### Example of Detection at Mount Time\n * ```tsx\n * import { ImpressionAreaOnMount } from '@granite-js/react-native';\n *\n * export default function AlwaysImpressionAreaPage() {\n *   // isImpressionStart is set to true when AlwaysImpressionAreaPage is mounted\n *   const [isImpressionStart, setIsImpressionStart] = useState(false);\n *\n *   return (\n *     <ScrollView\n *       style={{\n *         flex: 1,\n *         padding: 16,\n *         backgroundColor: 'white',\n *       }}\n *     >\n *       <TestTitle title=\"ImpressionArea\" description=\"@granite-js/impression-area\" />\n *       <Button label={'Scroll to origin'} onPress={() => {}} />\n *       <Code style={{ width, height }} json={{ isImpressionStart }} />\n *       <ImpressionAreaOnMount\n *         onImpressionStart={() => setIsImpressionStart(true)}\n *         onImpressionEnd={() => setIsImpressionStart(false)}\n *       >\n *         <Button label={'Scroll to here'} onPress={() => {}} />\n *       </ImpressionArea>\n *     </ScrollView>\n *   );\n * }\n * ```\n */\nexport function ImpressionAreaOnMount({\n  onImpressionStart: _onImpressionStart = noop,\n  onImpressionEnd: _onImpressionEnd = noop,\n  style,\n  children,\n}: PropsWithChildren<Props>): ReactElement {\n  const visible = useVisibility();\n\n  const isImpressed = visible;\n\n  const onImpressionStart = usePreservedCallback(_onImpressionStart);\n  const onImpressionEnd = usePreservedCallback(_onImpressionEnd);\n\n  useEffect(() => {\n    if (isImpressed) {\n      onImpressionStart();\n    } else {\n      onImpressionEnd();\n    }\n  }, [isImpressed, onImpressionStart, onImpressionEnd]);\n\n  return <View style={style}>{children}</View>;\n}\n\n/**\n * @category Components\n * @kind function\n * @name ImpressionAreaWithIntersectionObserver\n * @description\n * A component that calls `onImpressionStart` and `onImpressionEnd` based on whether the component is visible on the user's screen.\n * This is a component that can be used in `IOScrollView` and can notify the outside about its visibility status.\n *\n * @param {() => void} [onImpressionStart] - Callback function that is called when the component becomes visible on the screen.\n * @param {() => void} [onImpressionEnd] - Callback function that is called when the component disappears from the screen.\n * @param {boolean} [enabled=true] - Sets whether to enable `ImpressionArea`.\n * @param {StyleProp<ViewStyle>} [style] - Sets the style of the top-level container of the `ImpressionAreaWithIntersectionObserver` component.\n * @param {number} [areaThreshold=0] - Considers the component visible when its visible area exceeds the set ratio.\n * @param {number} [timeThreshold=0] - Sets the time in milliseconds before `onImpressionStart` and `onImpressionEnd` are called after the component becomes visible on the screen. Default value is `0` milliseconds.\n * @param {ReactNode} [children] - Sets the child components to be wrapped by `ImpressionAreaWithIntersectionObserver`.\n * @returns {ReactElement} - Returns a component that can detect visibility on the screen.\n * @example\n * ### Example using IntersectionObserver\n * ```tsx\n * import { ImpressionAreaWithIntersectionObserver, IOScrollView } from '@granite-js/react-native';\n *\n * export default function ImpressionAreaPage() {\n *   const [isImpressionStart, setIsImpressionStart] = useState(false);\n *\n *   return (\n *     <IOScrollView\n *       style={{\n *         flex: 1,\n *         margin: 16,\n *         backgroundColor: 'white',\n *       }}\n *     >\n *       <TestTitle title=\"ImpressionArea\" description=\"@granite-js/impression-area\" />\n *       <Button label={'Scroll to origin'} onPress={() => {}} />\n *       <Code style={{ width, height }} textStyle={{ flex: 1, verticalAlign: 'middle' }} json={{ isImpressionStart }} />\n *       <ImpressionAreaWithIntersectionObserver\n *         onImpressionStart={() => setIsImpressionStart(true)}\n *         onImpressionEnd={() => setIsImpressionStart(false)}\n *       >\n *         <Button label={'Scroll to here'} onPress={() => {}} />\n *       </ImpressionArea>\n *     </IOScrollView>\n *   );\n * }\n * ```\n */\nexport function ImpressionAreaWithIntersectionObserver({\n  onImpressionStart: _onImpressionStart = noop,\n  onImpressionEnd: _onImpressionEnd = noop,\n  timeThreshold = 0,\n  ...props\n}: PropsWithChildren<{\n  onImpressionStart?: () => void;\n  onImpressionEnd?: () => void;\n  enabled?: boolean;\n  style?: StyleProp<ViewStyle>;\n  areaThreshold?: number;\n  timeThreshold?: number;\n}>): ReactElement {\n  const [isImpressed, setIsImpressed] = useState(false);\n\n  const onImpressionChange = useMemo(() => {\n    if (timeThreshold === 0) {\n      return setIsImpressed;\n    } else {\n      return debounce(setIsImpressed, timeThreshold);\n    }\n  }, [setIsImpressed, timeThreshold]);\n\n  const onImpressionStart = usePreservedCallback(_onImpressionStart);\n  const onImpressionEnd = usePreservedCallback(_onImpressionEnd);\n\n  useEffect(() => {\n    if (isImpressed) {\n      onImpressionStart?.();\n    } else {\n      onImpressionEnd?.();\n    }\n  }, [isImpressed, onImpressionStart, onImpressionEnd]);\n\n  return <ImpressionAreaImpl {...props} onImpressionChange={onImpressionChange} />;\n}\n\nfunction ImpressionAreaImpl({\n  children,\n  onImpressionChange: _onImpressionChange = noop,\n  enabled = true,\n  areaThreshold = 0,\n  style,\n}: PropsWithChildren<{\n  onImpressionChange?: (isImpressed: boolean) => void;\n  enabled?: boolean;\n  style?: StyleProp<ViewStyle>;\n  areaThreshold?: number;\n}>) {\n  const visible = useVisibility();\n  const [inviewImpressed, setInviewImpressed] = useState(false);\n\n  const context = useContext(IOContext);\n\n  if (context?.manager == null) {\n    throw new IOProviderMissingError();\n  }\n\n  const impressed = visible && inviewImpressed && enabled;\n  const onImpressionChange = usePreservedCallback(_onImpressionChange);\n\n  useEffect(() => {\n    onImpressionChange?.(impressed);\n  }, [impressed, onImpressionChange]);\n\n  return (\n    <InView\n      onChange={(inView, currentThreshold) => {\n        const isVisible = inView && currentThreshold >= areaThreshold;\n        setInviewImpressed(isVisible);\n      }}\n      style={style}\n    >\n      {children}\n    </InView>\n  );\n}\n"
  },
  {
    "path": "packages/react-native/src/impression-area/index.ts",
    "content": "export * from './ImpressionArea';\n"
  },
  {
    "path": "packages/react-native/src/index.ts",
    "content": "import './types/global';\n\nexport { Granite, useInitialSearchParams, useInitialProps } from './app';\nexport * from '@granite-js/style-utils';\nexport {\n  type GraniteImageSource,\n  type GraniteImageStatic,\n  type ResizeMode,\n  type CachePolicy,\n  type Priority,\n  type OnLoadEvent,\n  type OnProgressEvent,\n} from '@granite-js/native/react-native-fast-image';\n\n// Image with SVG support\nexport * from './image';\nexport * from './lottie';\n\nexport * from './dev-entrypoint';\nexport * from './native-modules/natives';\nexport * from './visibility';\nexport * from './use-back-event';\nexport * from './keyboard';\nexport * from './intersection-observer';\nexport * from './impression-area';\nexport * from './scroll-view-inertial-background';\nexport * from './router/createRoute';\nexport * from './router/hooks/useIsInitialScreen';\nexport * from './event';\nexport * from './video';\nexport * from './status-bar';\nexport * from '@granite-js/blur-view';\n\nexport { BackButton, useRouterBackHandler } from './router';\n\nexport type { InitialProps, ColorPreference } from './initial-props';\nexport type { GraniteProps } from './app';\n"
  },
  {
    "path": "packages/react-native/src/initial-props/InitialProps.ts",
    "content": "/**\n * @public\n * @category UI\n * @name ColorPreference\n * @description\n * Type representing the color mode of the current device. It is a string representing light mode and dark mode.\n *\n * @typedef {'light' | 'dark'} ColorPreference\n */\nexport type ColorPreference = 'light' | 'dark';\n\n/**\n * @category Types\n * @name BaseInitialProps\n * @description\n * Interface representing the base initial properties.\n *\n * @interface\n * @property {'ios' | 'android'} platform - Platform type\n * @property {ColorPreference} initialColorPreference - Initial color\n * @property {string} [scheme] - Executed scheme\n */\ntype BaseInitialProps = {\n  platform: 'ios' | 'android';\n  initialColorPreference: ColorPreference;\n  scheme?: string;\n};\n\n/**\n * @category Types\n * @name AndroidInitialProps\n * @description\n * Values passed from Android to React Native.\n *\n * @interface\n * @augments BaseInitialProps\n * @property {'android'} platform - Platform name (Android)\n */\nexport type AndroidInitialProps = BaseInitialProps & {\n  platform: 'android';\n};\n\n/**\n * @category Types\n * @name IOSInitialProps\n * @description\n * Interface representing iOS initial properties.\n *\n * @interface\n * @augments BaseInitialProps\n * @property {'ios'} platform - Platform (iOS)\n */\nexport type IOSInitialProps = BaseInitialProps & {\n  platform: 'ios';\n};\n\n/**\n * @public\n * @category Core\n * @name InitialProps\n * @description\n * Provides the initial data type that native platforms (Android/iOS) pass to the app when a user enters a specific screen in a React Native app.\n * The initial data contains important information used for screen initialization, and the required data types differ by native platform.\n *\n * The data type provided by Android is `AndroidInitialProps`, and the data type provided by iOS is `IOSInitialProps`.\n *\n * @property {'ios' | 'android'} platform - The platform on which the app is currently running. Has a value of either `ios` or `android`.\n * @property {ColorPreference} initialColorPreference - The initial color theme. Represents the color theme set by the user.\n * @property {string} [scheme] - The URL scheme used to enter the current screen.\n *\n * @example\n *\n * ### Example using `InitialProps`\n *\n * ::: code-group\n * ```tsx [_app.tsx]\n * import { PropsWithChildren } from 'react';\n * import { Granite, InitialProps } from '@granite-js/react-native';\n * import { context } from '../require.context';\n *\n * const APP_NAME = 'my-app-name';\n *\n * function AppContainer({ children, ...initialProps }: PropsWithChildren<InitialProps>) {\n *   console.log({ initialProps });\n *   return <>{children}</>;\n * }\n *\n * export default Granite.registerApp(AppContainer, {\n *   appName: APP_NAME,\n *   context,\n * });\n * ```\n * :::\n */\nexport type InitialProps = AndroidInitialProps | IOSInitialProps;\n"
  },
  {
    "path": "packages/react-native/src/initial-props/index.ts",
    "content": "export * from './InitialProps';\n"
  },
  {
    "path": "packages/react-native/src/intersection-observer/IOContext.ts",
    "content": "import { createContext } from 'react';\nimport IOManager from './IOManager';\n\nexport interface IOContextValue {\n  manager: null | IOManager;\n}\n\n/**\n * @name IOContext\n * @description Context that shares the IOManager instance.\n */\nconst IOContext = createContext<IOContextValue>({\n  manager: null,\n});\n\nexport default IOContext;\n"
  },
  {
    "path": "packages/react-native/src/intersection-observer/IOFlatList.ts",
    "content": "import React, { RefAttributes } from 'react';\nimport { FlatList, FlatListProps } from 'react-native';\nimport withIO, { IOComponentProps } from './withIO';\n\nexport type IOFlatListController = FlatList;\n\nexport type IOFlatListProps<ItemT = any> = IOComponentProps & FlatListProps<ItemT>;\n\n/**\n * @public\n * @category Screen Control\n * @name IOFlatList\n * @description\n * `IOFlatList` is a `FlatList` component with added Intersection Observer functionality to detect when specific elements become visible or disappear from the screen during scrolling. Using this component, you can easily check and handle whether each item in the list is visible on the screen.\n *\n * When used with `InView`, you can check the exposure status of each element. The [InView](/reference/react-native/Screen%20Control/InView) component included as a child element detects whether the element is visible on the screen through the observation functionality of `IOFlatList` and triggers events based on the exposure status.\n *\n * @example\n *\n * You can check whether each item in the list appears on the screen using `IOFlatList`.\n * When each item in the list appears on the screen, the `InView` component changes to the `visible` state.\n *\n * ```tsx\n * import { ReactNode, useState } from 'react';\n * import { StyleSheet, Text, View } from 'react-native';\n * import { InView, IOFlatList } from '@granite-js/react-native';\n *\n * const mockData = Array.from({ length: 30 }, (_, i) => ({ key: String(i) }));\n *\n * export default function FlatListPage() {\n *  return <IOFlatList data={mockData} renderItem={({ item }) => <InViewItem>{item.key}</InViewItem>} />;\n * }\n *\n * function InViewItem({ children }: { children: ReactNode }) {\n *  const [visible, setVisible] = useState(false);\n *\n *  return (\n *    <InView onChange={setVisible}>\n *      <View style={styles.item}>\n *        <Text>{children}</Text>\n *        <Text>{visible ? 'visible' : ''}</Text>\n *      </View>\n *    </InView>\n *  );\n * }\n *\n * const styles = StyleSheet.create({\n *  item: {\n *    padding: 16,\n *    borderBottomWidth: 1,\n *    borderBottomColor: '#ddd',\n *  },\n * });\n * ```\n */\nconst IOFlatList = withIO(FlatList, [\n  'flashScrollIndicators',\n  'getNativeScrollRef',\n  'getScrollResponder',\n  'getScrollableNode',\n  'scrollToEnd',\n  'scrollToIndex',\n  'scrollToItem',\n  'scrollToOffset',\n]) as unknown as typeof IOFlatListFunction;\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare function IOFlatListFunction<ItemT = any>(\n  props: IOFlatListProps<ItemT> & RefAttributes<IOFlatListController>\n): React.JSX.Element;\n\nexport default IOFlatList;\n"
  },
  {
    "path": "packages/react-native/src/intersection-observer/IOManager.ts",
    "content": "import IntersectionObserver, {\n  IntersectionObserverOptions,\n  IntersectionObserverEntry,\n  Element,\n} from './IntersectionObserver';\n\nexport type ObserverInstanceCallback = (inView: boolean, intersectionRatio: number) => void;\n\nexport interface ObserverInstance {\n  readonly callback: ObserverInstanceCallback;\n  readonly element: Element;\n  readonly observerId: number;\n  readonly observer: IntersectionObserver;\n}\n\n/**\n * @kind class\n * @name IOManager\n * @description A class that tracks the visibility of DOM elements using `IntersectionObserver` instances and executes callbacks when elements enter or leave the viewport.\n * This class makes it easy to manage multiple elements and execute custom logic based on the visibility status of each element.\n */\nclass IOManager {\n  io: IntersectionObserver;\n  observerId: number;\n  instanceMap: Map<Element, ObserverInstance> = new Map();\n\n  constructor(options: IntersectionObserverOptions) {\n    this.io = new IntersectionObserver(this.handleChange, options);\n    this.observerId = 0;\n  }\n\n  handleChange = (entries: IntersectionObserverEntry[]) => {\n    for (let index = 0; index < entries.length; index += 1) {\n      const entry = entries[index];\n\n      if (entry == null) {\n        continue;\n      }\n\n      const { target, isIntersecting, intersectionRatio } = entry;\n      const instance = this.instanceMap.get(target);\n      if (instance) {\n        instance.callback(isIntersecting, intersectionRatio);\n      }\n    }\n  };\n\n  observe(element: Element, callback: ObserverInstanceCallback): ObserverInstance {\n    const existInstance = this.instanceMap.get(element);\n    if (existInstance) {\n      return existInstance;\n    }\n    this.observerId += 1;\n    const instance: ObserverInstance = {\n      callback,\n      element,\n      observerId: this.observerId,\n      observer: this.io,\n    };\n    this.instanceMap.set(element, instance);\n    this.io.observe(element);\n    return instance;\n  }\n\n  unobserve(element: any) {\n    if (this.instanceMap.has(element)) {\n      this.instanceMap.delete(element);\n      this.io.unobserve(element);\n    }\n  }\n}\n\nexport default IOManager;\n"
  },
  {
    "path": "packages/react-native/src/intersection-observer/IOScrollView.ts",
    "content": "import { ForwardRefExoticComponent, RefAttributes } from 'react';\nimport { ScrollView, ScrollViewProps } from 'react-native';\nimport withIO, { IOComponentProps } from './withIO';\n\nexport type IOScrollViewController = ScrollView;\n\nexport type IOScrollViewProps = IOComponentProps & ScrollViewProps;\n\n/**\n * @public\n * @category Screen Control\n * @name IOScrollView\n * @description\n * `IOScrollView` is a [ScrollView](https://reactnative.dev/docs/scrollview) component with added `Intersection Observer` functionality. It can detect when specific elements become visible or disappear from the screen during scrolling.\n * By utilizing this functionality with the `InView` component as a child element, you can easily check whether elements are exposed on the screen.\n *\n * @example\n *\n * You can check whether each item in the list appears on the screen using `IOScrollView`.\n * When each item in the list appears on the screen, the `InView` component changes to the `visible` state.\n *\n * ```tsx\n * import { ReactNode, useState } from 'react';\n * import { StyleSheet, Text, View } from 'react-native';\n * import { InView, IOScrollView } from '@granite-js/react-native';\n *\n * const mockData = Array.from({ length: 30 }, (_, i) => ({ key: String(i) }));\n *\n * export default function IOScrollViewPage() {\n *  return (\n *    <IOScrollView>\n *      {mockData.map((data) => (\n *        <InViewItem key={data.key}>{data.key}</InViewItem>\n *      ))}\n *    </IOScrollView>\n *  );\n * }\n *\n * function InViewItem({ children }: { children: ReactNode }) {\n *  const [visible, setVisible] = useState(false);\n *\n *  return (\n *    <InView onChange={setVisible}>\n *      <View style={styles.item}>\n *        <Text>{children}</Text>\n *        <Text>{visible ? 'visible' : ''}</Text>\n *      </View>\n *    </InView>\n *  );\n * }\n *\n * const styles = StyleSheet.create({\n *  item: {\n *    padding: 16,\n *    borderBottomWidth: 1,\n *    borderBottomColor: '#ddd',\n *  },\n * });\n * ```\n */\nconst IOScrollView = withIO(ScrollView, [\n  'scrollTo',\n  'scrollToEnd',\n  'getScrollResponder',\n  'getScrollableNode',\n  'getInnerViewNode',\n]) as unknown as ForwardRefExoticComponent<IOScrollViewProps & RefAttributes<IOScrollViewController>>;\n\nexport default IOScrollView;\n"
  },
  {
    "path": "packages/react-native/src/intersection-observer/InView.tsx",
    "content": "import { ComponentType, PureComponent, ReactElement, ReactNode, RefObject } from 'react';\nimport { LayoutChangeEvent, View, ViewProps } from 'react-native';\nimport IOContext, { IOContextValue } from './IOContext';\nimport { ObserverInstance } from './IOManager';\nimport { Element } from './IntersectionObserver';\n\nexport interface RenderProps {\n  inView: boolean;\n  onChange: (inView: boolean) => void;\n}\n\nexport interface Props {\n  [key: string]: any;\n}\n\nexport type InViewProps<T = Props> = T & {\n  children: ReactNode | ((fields: RenderProps) => ReactElement<View>);\n  as?: ComponentType<any>;\n  triggerOnce?: boolean;\n  onLayout?: (event: LayoutChangeEvent) => void;\n  onChange?: (inView: boolean, areaThreshold: number) => void;\n};\n\nexport type InViewWrapper = ComponentType<{\n  ref?: RefObject<any> | ((ref: any) => void);\n  onLayout?: (event: LayoutChangeEvent) => void;\n}>;\n\n/**\n * @public\n * @category Screen Control\n * @name InView\n * @description\n * The `InView` component detects when an element starts to become visible on the screen or disappears from the screen.\n * When an element starts to become visible on the screen, the `onChanged` handler is called with `true` as the first argument. Conversely, when the element disappears from the screen, `false` is passed.\n * The second argument of the `onChanged` handler receives the exposure ratio of the element on the screen. The exposure ratio value ranges from `0` to `1.0`. For example, if `0.2` is passed, it means the component is 20% exposed on the screen.\n *\n::: warning Note\n\n`InView` must be used inside [IOScrollView](/reference/react-native/Screen%20Control/InView.md) or [IOFlatList](/reference/react-native/Screen%20Control/IOFlatList.md) that includes `IOContext`.\nIf used outside of `IOContext`, an `IOProviderMissingError` will occur.\n\n:::\n\n * @param {Object} props - Props object passed to the component.\n * @param {React.ReactNode} props.children - Child components to be rendered under the component.\n * @param {React.ComponentType} [prop.as=View] - Specifies the component to actually render. Default is the [View](https://reactnative.dev/docs/view) component.\n * @param {boolean} [triggerOnce=false] - Use this option if you want to call the `onChange` callback only once when the element first becomes visible.\n * @param {(event: LayoutChangeEvent) => void} [onLayout] - Callback function called when there is a change in the layout.\n * @param {(inView: boolean, areaThreshold: number) => void} [onChange] - Callback function called when an element appears or disappears from the screen. The first argument receives the visibility status, and the second argument receives the exposure ratio.\n * \n * @example\n * \n * ### Detecting the `10%` point of an element using the `InView` component\n * \n * ```tsx\n * import { LayoutChangeEvent, View, Text, Dimensions } from 'react-native';\n * import { InView, IOScrollView } from '@granite-js/react-native';\n * \n * export function InViewExample() {\n *   const handleLayout = (event: LayoutChangeEvent) => {\n *     console.log('Layout changed', event.nativeEvent.layout);\n *   };\n * \n *   const handleChange = (inView: boolean, areaThreshold: number) => {\n *     if (inView) {\n *       console.log(`Element is visible at ${areaThreshold * 100}% ratio`);\n *     } else {\n *       console.log('Element is not visible');\n *     }\n *   };\n * \n *   return (\n *     <IOScrollView>\n *       <View style={{ height: HEIGHT, width: '100%', backgroundColor: 'blue' }}>\n *         <Text style={{ color: 'white' }}>Please scroll down</Text>\n *       </View>\n *       <InView onLayout={handleLayout} onChange={handleChange}>\n *         <View style={{ width: 100, height: 300, backgroundColor: 'yellow' }}>\n *           <View style={{ position: 'absolute', top: 30, width: 100, height: 1, borderWidth: 1 }}>\n *             <Text style={{ position: 'absolute', top: 0 }}>10% point</Text>\n *           </View>\n *         </View>\n *       </InView>\n *     </IOScrollView>\n *   );\n * }\n * ```\n */\nclass InView<T = ViewProps> extends PureComponent<InViewProps<T>> {\n  static contextType = IOContext;\n  static defaultProps: Partial<InViewProps> = {\n    triggerOnce: false,\n    as: View,\n  };\n\n  context: undefined | IOContextValue = undefined;\n  mounted = false;\n\n  protected element: Element;\n  protected instance: undefined | ObserverInstance;\n  protected view: any;\n\n  constructor(props: InViewProps<T>) {\n    super(props);\n\n    this.element = {\n      inView: false,\n      intersectionRatio: 0,\n      layout: {\n        x: 0,\n        y: 0,\n        width: 0,\n        height: 0,\n      },\n      measureLayout: this.measureLayout,\n    };\n  }\n\n  componentDidMount() {\n    this.mounted = true;\n    if (this.context?.manager) {\n      this.instance = this.context.manager.observe(this.element, this.handleChange);\n    }\n  }\n\n  componentWillUnmount() {\n    this.mounted = false;\n    if (this.context?.manager && this.instance) {\n      this.context.manager.unobserve(this.element);\n    }\n  }\n\n  protected handleChange = (inView: boolean, areaThreshold: number) => {\n    if (this.mounted) {\n      const { triggerOnce, onChange } = this.props;\n      if (inView && triggerOnce) {\n        if (this.context?.manager) {\n          this.context?.manager.unobserve(this.element);\n        }\n      }\n      if (onChange) {\n        onChange(inView, areaThreshold);\n      }\n    }\n  };\n\n  protected handleRef = (ref: any) => {\n    this.view = ref;\n  };\n\n  protected handleLayout = (event: LayoutChangeEvent) => {\n    const {\n      nativeEvent: { layout },\n    } = event;\n    if (layout.width !== this.element.layout.width || layout.height !== this.element.layout.height) {\n      if (this.element.onLayout) {\n        this.element.onLayout();\n      }\n    }\n    const { onLayout } = this.props;\n    if (onLayout) {\n      onLayout(event);\n    }\n  };\n\n  measure = (...args: any) => {\n    this.view.measure(...args);\n  };\n\n  measureInWindow = (...args: any) => {\n    this.view.measureInWindow(...args);\n  };\n\n  measureLayout = (...args: any) => {\n    this.view.measureLayout(...args);\n  };\n\n  setNativeProps = (...args: any) => {\n    this.view.setNativeProps(...args);\n  };\n\n  focus = (...args: any) => {\n    this.view.focus(...args);\n  };\n\n  blur = (...args: any) => {\n    this.view.blur(...args);\n  };\n\n  render() {\n    const { as, children, ...props } = this.props;\n    if (typeof children === 'function') {\n      return null;\n    }\n    const ViewComponent: InViewWrapper = (as || View) as InViewWrapper;\n    return (\n      <ViewComponent {...props} ref={this.handleRef} onLayout={this.handleLayout}>\n        {children}\n      </ViewComponent>\n    );\n  }\n}\n\nexport default InView;\n"
  },
  {
    "path": "packages/react-native/src/intersection-observer/IntersectionObserver.ts",
    "content": "import { throttle } from 'es-toolkit';\nimport { LayoutRectangle, NativeScrollEvent } from 'react-native';\n\nexport interface Root {\n  /**\n   * NodeHandle of the target component\n   */\n  node: any;\n  /**\n   * Whether horizontal scroll is enabled\n   */\n  horizontal: boolean;\n  /**\n   * Scroll event of the target component\n   */\n  current: NativeScrollEvent;\n  onLayout?: () => void;\n  onScroll?: (event: NativeScrollEvent) => void;\n}\n\nexport interface Element {\n  inView: boolean;\n  intersectionRatio: number;\n  layout: LayoutRectangle;\n  measureLayout: (node: any, callback: (x: number, y: number, width: number, height: number) => void) => void;\n  onLayout?: () => void;\n}\n\nexport interface IntersectionObserverEntry {\n  target: Element;\n  isIntersecting: boolean;\n  intersectionRatio: number;\n}\n\nexport interface RootMargin {\n  left?: number;\n  right?: number;\n  top?: number;\n  bottom?: number;\n}\n\nexport interface IntersectionObserverOptions {\n  /**\n   * Information about the component that wraps the element\n   */\n  root: Root;\n  rootMargin?: RootMargin;\n  threshold?: number | number[];\n}\n\nexport type IntersectionObserverCallback = (entries: IntersectionObserverEntry[]) => void;\n\nexport const defaultRootMargin: RootMargin = {\n  left: 0,\n  right: 0,\n  top: 0,\n  bottom: 0,\n};\n\nexport const defaultThreshold = 0;\n\n/**\n * @kind class\n * @name IntersectionObserver\n * @description\n * IntersectionObserver implemented for React Native environment.\n *\n * @param {IntersectionObserverCallback} callback - Callback function that is called when the visibility state of the target element changes.\n * @param {IntersectionObserverOptions} options - Options object that controls the behavior of IntersectionObserver.\n */\nclass IntersectionObserver {\n  protected callback: IntersectionObserverCallback;\n  protected options: IntersectionObserverOptions;\n  protected targets: Element[];\n\n  constructor(callback: IntersectionObserverCallback, options: IntersectionObserverOptions) {\n    this.callback = callback;\n    this.options = options;\n    this.targets = [];\n    this.options.root.onLayout = this.handleLayout;\n    this.options.root.onScroll = this.handleScroll;\n  }\n\n  protected measureTarget = (target: Element) => {\n    const rootNode = this.options.root.node;\n    if (rootNode) {\n      target.measureLayout(rootNode, (x, y, width, height) => {\n        target.layout = {\n          x,\n          y,\n          width,\n          height,\n        };\n        this.handleScroll();\n      });\n    }\n  };\n\n  protected handleLayout = throttle(\n    () => {\n      for (let index = 0; index < this.targets.length; index += 1) {\n        const target = this.targets[index];\n\n        if (target != null) {\n          this.measureTarget(target);\n        }\n      }\n    },\n    300,\n    { edges: ['trailing'] }\n  ) as () => void;\n\n  protected handleScroll = throttle(\n    () => {\n      const rootMargin = this.options?.rootMargin || defaultRootMargin;\n\n      const {\n        horizontal,\n        current: { contentOffset, contentSize, layoutMeasurement },\n      } = this.options.root;\n      if (\n        contentSize.width <= 0 ||\n        contentSize.height <= 0 ||\n        layoutMeasurement.width <= 0 ||\n        layoutMeasurement.height <= 0\n      ) {\n        return;\n      }\n      const contentOffsetWithLayout = horizontal\n        ? contentOffset.x + layoutMeasurement.width\n        : contentOffset.y + layoutMeasurement.height;\n      const changedTargets: IntersectionObserverEntry[] = [];\n      for (let index = 0; index < this.targets.length; index += 1) {\n        const target = this.targets[index];\n\n        if (target == null) {\n          continue;\n        }\n\n        const targetLayout = target.layout;\n        if (!targetLayout || targetLayout.width === 0 || targetLayout.height === 0) {\n          continue;\n        }\n\n        const previousIntersectionRatio = target.intersectionRatio;\n\n        let isIntersecting = false;\n        let intersectionRatio = previousIntersectionRatio;\n\n        if (horizontal) {\n          const visibleTargetMinX = Math.max(contentOffset.x - (rootMargin.left || 0), targetLayout.x);\n          const visibleTargetMaxX = Math.min(\n            contentOffsetWithLayout + (rootMargin.left || 0),\n            targetLayout.x + targetLayout.width\n          );\n          const visibleHeight = Math.max(visibleTargetMaxX - visibleTargetMinX, 0);\n\n          intersectionRatio = visibleHeight / targetLayout.height;\n          isIntersecting =\n            contentOffsetWithLayout + (rootMargin.right || 0) >= targetLayout.x &&\n            contentOffset.x - (rootMargin.left || 0) <= targetLayout.x + targetLayout.width;\n        } else {\n          const visibleTargetMinY = Math.max(contentOffset.y - (rootMargin.top || 0), targetLayout.y);\n          const visibleTargetMaxY = Math.min(\n            contentOffsetWithLayout + (rootMargin.bottom || 0),\n            targetLayout.y + targetLayout.height\n          );\n          const visibleHeight = Math.max(visibleTargetMaxY - visibleTargetMinY, 0);\n\n          intersectionRatio = visibleHeight / targetLayout.height;\n          isIntersecting =\n            contentOffsetWithLayout + (rootMargin.bottom || 0) >= targetLayout.y &&\n            contentOffset.y - (rootMargin.top || 0) <= targetLayout.y + targetLayout.height;\n        }\n\n        intersectionRatio = Math.floor(intersectionRatio * 100) / 100;\n\n        if (target.inView !== isIntersecting || target.intersectionRatio !== intersectionRatio) {\n          target.inView = isIntersecting;\n          target.intersectionRatio = intersectionRatio;\n\n          changedTargets.push({\n            target,\n            isIntersecting,\n            intersectionRatio,\n          });\n        }\n      }\n      this.callback(changedTargets);\n    },\n    100,\n    { edges: ['trailing'] }\n  ) as () => void;\n\n  public observe(target: Element) {\n    const index = this.targets.indexOf(target);\n    if (index < 0) {\n      target.onLayout = this.handleLayout;\n      this.targets.push(target);\n    }\n  }\n\n  public unobserve(target: Element) {\n    const index = this.targets.indexOf(target);\n    if (index >= 0) {\n      target.onLayout = undefined;\n      this.targets.splice(index, 1);\n    }\n  }\n}\n\nexport default IntersectionObserver;\n"
  },
  {
    "path": "packages/react-native/src/intersection-observer/index.ts",
    "content": "import IOContext from './IOContext';\nimport IOFlatList, { type IOFlatListController, type IOFlatListProps } from './IOFlatList';\nimport IOScrollView, { type IOScrollViewController, type IOScrollViewProps } from './IOScrollView';\nimport InView, { type InViewProps } from './InView';\nimport {\n  type IntersectionObserverEntry,\n  type IntersectionObserverOptions,\n  type RootMargin,\n} from './IntersectionObserver';\nimport type { IOComponentProps } from './withIO';\n\nexport type {\n  IntersectionObserverEntry,\n  IntersectionObserverOptions,\n  RootMargin,\n  InViewProps,\n  IOComponentProps,\n  IOFlatListController,\n  IOFlatListProps,\n  IOScrollViewController,\n  IOScrollViewProps,\n};\n\nexport { InView, IOContext, IOFlatList, IOScrollView };\n"
  },
  {
    "path": "packages/react-native/src/intersection-observer/withIO.tsx",
    "content": "import { type ComponentProps, PureComponent, RefObject, createRef } from 'react';\nimport { LayoutChangeEvent, NativeScrollEvent, NativeSyntheticEvent, ScrollView, View } from 'react-native';\nimport IOContext, { IOContextValue } from './IOContext';\nimport IOManager from './IOManager';\nimport { Root, RootMargin } from './IntersectionObserver';\n\nexport interface IOComponentProps {\n  rootMargin?: RootMargin;\n}\n\n/**\n * @category Functions\n * @kind function\n * @name withIO\n * @description\n * A Higher-Order Component (HoC) that wraps a component with `IOContext` to enable Intersection Observer functionality.\n *\n * @argument\n * @param {React.ComponentType} [BaseComponent] - Callback function that is called when the component is mounted.\n * @param {string[]} [methods] - List of event handler names from BaseComponent to be bound.\n * @returns {React.ComponentType} - Returns a wrapped component that can use Intersection Observer functionality.\n */\nfunction withIO<\n  CompProps extends Pick<\n    ComponentProps<typeof ScrollView>,\n    'horizontal' | 'scrollEventThrottle' | 'onContentSizeChange' | 'onLayout' | 'onScroll'\n  >,\n>(BaseComponent: React.ComponentType<CompProps>, methods: string[]) {\n  type ScrollableComponentProps = CompProps & IOComponentProps;\n  const IOScrollableComponent = class extends PureComponent<ScrollableComponentProps> {\n    protected node: any;\n    protected scroller: RefObject<any>;\n    protected root: Root;\n    protected manager: IOManager;\n    protected contextValue: IOContextValue;\n\n    constructor(props: ScrollableComponentProps) {\n      super(props);\n\n      // eslint-disable-next-line @typescript-eslint/no-this-alias\n      const self = this;\n      this.scroller = createRef();\n      this.node = null;\n      this.root = {\n        get node() {\n          return self.node;\n        },\n        get horizontal() {\n          return Boolean(self.props.horizontal);\n        },\n        current: {\n          contentInset: {\n            top: 0,\n            right: 0,\n            bottom: 0,\n            left: 0,\n          },\n          contentOffset: {\n            x: 0,\n            y: 0,\n          },\n          contentSize: {\n            width: 0,\n            height: 0,\n          },\n          layoutMeasurement: {\n            width: 0,\n            height: 0,\n          },\n          zoomScale: 1,\n        },\n      };\n      const manager = new IOManager({\n        root: this.root,\n        get rootMargin() {\n          return self.props.rootMargin;\n        },\n      });\n      this.manager = manager;\n      this.contextValue = {\n        manager,\n      };\n    }\n\n    componentDidMount() {\n      // Prefer a native scroll ref (FlatList/VirtualizedList),\n      // otherwise fall back to the host ref (ScrollView).\n      this.node = this.resolveRootNode();\n      methods.forEach((method) => {\n        (this as any)[method] = (...args: any) => {\n          this.scroller.current?.[method]?.(...args);\n        };\n      });\n    }\n\n    render() {\n      return (\n        <IOContext.Provider value={this.contextValue}>\n          <BaseComponent\n            scrollEventThrottle={16}\n            {...this.props}\n            ref={this.scroller}\n            onContentSizeChange={this.handleContentSizeChange}\n            onLayout={this.handleLayout}\n            onScroll={this.handleScroll}\n          />\n        </IOContext.Provider>\n      );\n    }\n\n    // Private helpers to keep type-safety encapsulated\n    private isRefObject<T>(v: unknown): v is RefObject<T> {\n      return typeof v === 'object' && v !== null && 'current' in (v as Record<string, unknown>);\n    }\n\n    private toView(v: RefObject<View> | View | null | undefined): View | null {\n      if (!v) {\n        return null;\n      }\n      return this.isRefObject<View>(v) ? (v.current ?? null) : v;\n    }\n\n    private callIfFunction<T extends object, K extends string>(obj: T | null | undefined, key: K): unknown {\n      if (!obj) {\n        return null;\n      }\n      const rec = obj as unknown as Record<string, unknown>;\n      const fn = rec[String(key)];\n      if (typeof fn === 'function') {\n        return fn.call(obj);\n      }\n      return null;\n    }\n\n    protected resolveRootNode = (): View | null => {\n      const instance = this.scroller.current as unknown;\n\n      // 1) Prefer native scroll ref (FlatList/VirtualizedList on Fabric)\n      const viaNativeRef = this.callIfFunction(instance as object, 'getNativeScrollRef');\n      const nativeFromNativeRef = this.toView(viaNativeRef as RefObject<View> | View | null | undefined);\n      if (nativeFromNativeRef) {\n        return nativeFromNativeRef;\n      }\n\n      // 2) Fallback to getScrollRef\n      const viaScrollRef = this.callIfFunction(instance as object, 'getScrollRef');\n      const nativeFromScrollRef = this.toView(viaScrollRef as RefObject<View> | View | null | undefined);\n      if (nativeFromScrollRef) {\n        return nativeFromScrollRef;\n      }\n\n      // 3) Fallback to getScrollableNode (exclude numeric handles)\n      const scrollable = this.callIfFunction(instance as object, 'getScrollableNode');\n      if (scrollable && typeof scrollable !== 'number') {\n        return scrollable as View;\n      }\n\n      // 4) Lastly, treat the instance itself as a View or RefObject<View>\n      return this.toView(instance as RefObject<View> | View | null | undefined);\n    };\n\n    protected handleContentSizeChange = (width: number, height: number) => {\n      const { contentSize } = this.root.current;\n      if (width !== contentSize.width || height !== contentSize.height) {\n        this.root.current.contentSize = { width, height };\n        if (width > 0 && height > 0 && this.root.onLayout) {\n          this.root.onLayout();\n        }\n      }\n      const { onContentSizeChange } = this.props;\n      if (onContentSizeChange) {\n        onContentSizeChange(width, height);\n      }\n    };\n\n    protected handleLayout = (event: LayoutChangeEvent) => {\n      const {\n        nativeEvent: { layout },\n      } = event;\n      const { layoutMeasurement } = this.root.current;\n      if (layoutMeasurement.width !== layout.width || layoutMeasurement.height !== layout.height) {\n        this.root.current.layoutMeasurement = layout;\n      }\n      const { onLayout } = this.props;\n      if (onLayout) {\n        onLayout(event);\n      }\n    };\n\n    protected handleScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n      this.root.current = event.nativeEvent;\n      if (this.root.onScroll) {\n        this.root.onScroll(this.root.current);\n      }\n      const { onScroll } = this.props;\n      if (onScroll) {\n        onScroll(event);\n      }\n    };\n  };\n\n  return IOScrollableComponent as typeof BaseComponent;\n}\n\nexport default withIO;\n"
  },
  {
    "path": "packages/react-native/src/jest.ts",
    "content": "export { setup, config } from '@granite-js/jest';\n"
  },
  {
    "path": "packages/react-native/src/keyboard/KeyboardAboveView.tsx",
    "content": "import { ComponentProps, ReactElement } from 'react';\nimport { Animated, View } from 'react-native';\nimport { useKeyboardAnimatedHeight } from './useKeyboardAnimatedHeight';\n\n/**\n * @public\n * @category UI\n * @name KeyboardAboveView\n * @kind function\n * @description\n * A component that automatically lifts child components above the keyboard when it appears on the screen.\n * It's useful when you want to keep elements like a \"Send\" button fixed above the keyboard during text input.\n *\n * @param {StyleProp<ViewStyle>} [props.style] - Additional styles can be applied. For example, you can set background color or size.\n * @param {ReactNode} [props.children] - Components to be displayed above the keyboard when it appears. For example, you can include buttons, text input fields, etc.\n * @returns {ReactElement} - Returns an [`Animated.View`](https://reactnative.dev/docs/animated#createanimatedcomponent) that is adjusted above the keyboard when it appears.\n * @example\n *\n * ### Lifting elements above the keyboard\n *\n * ```tsx\n * import { ScrollView, TextInput, View, Text } from 'react-native';\n * import { KeyboardAboveView } from '@granite-js/react-native';\n *\n * export function KeyboardAboveViewExample() {\n *   return (\n *     <>\n *       <ScrollView>\n *         <TextInput placeholder=\"placeholder\" />\n *       </ScrollView>\n *\n *       <KeyboardAboveView>\n *         <View style={{ width: '100%', height: 50, backgroundColor: 'yellow' }}>\n *           <Text>Above the keyboard</Text>\n *         </View>\n *       </KeyboardAboveView>\n *     </>\n *   );\n * }\n * ```\n */\nexport function KeyboardAboveView({ style, children, ...props }: ComponentProps<typeof View>): ReactElement {\n  const keyboardHeight = useKeyboardAnimatedHeight();\n\n  return (\n    <Animated.View\n      style={[\n        style,\n        {\n          transform: [\n            {\n              translateY: Animated.subtract(0, keyboardHeight),\n            },\n          ],\n        },\n      ]}\n      {...props}\n    >\n      {children}\n    </Animated.View>\n  );\n}\n"
  },
  {
    "path": "packages/react-native/src/keyboard/getInitialKeyboardHeight.ts",
    "content": "import { Platform, Keyboard } from \"react-native\";\nimport { isNewArchEnabled } from \"../utils/isNewArchEnabled\";\n\nexport function getInitialKeyboardHeight() {\n    if (Platform.OS === 'android' && !isNewArchEnabled()) {\n      return 0;\n    }\n\n    /**\n     * Branch handling for React Native 0.68.0 version where `metrics()` does not exist\n     */\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    if (typeof Keyboard?.metrics === 'function') {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      return Keyboard.metrics()?.height ?? 0;\n    } else {\n      return 0;\n    }\n}\n"
  },
  {
    "path": "packages/react-native/src/keyboard/getKeyboardEventNames.ts",
    "content": "import { Platform } from \"react-native\";\nimport { isNewArchEnabled } from \"../utils/isNewArchEnabled\";\n\nexport function getKeyboardEventNames() {\n    if (Platform.OS === 'ios') {\n      return {\n        show: 'keyboardWillShow',\n        hide: 'keyboardWillHide',\n      } as const;\n    }\n\n    if (Platform.OS === 'android' && isNewArchEnabled()) {\n      return {\n        show: 'keyboardDidShow',\n        hide: 'keyboardDidHide',\n      } as const;\n    }\n\n    return null;\n  }\n"
  },
  {
    "path": "packages/react-native/src/keyboard/index.ts",
    "content": "export { KeyboardAboveView } from './KeyboardAboveView';\nexport { useKeyboardAnimatedHeight } from './useKeyboardAnimatedHeight';\nexport { useKeyboardHeight } from './useKeyboardHeight';\n"
  },
  {
    "path": "packages/react-native/src/keyboard/useKeyboardAnimatedHeight.tsx",
    "content": "import { useEffect, useRef } from 'react';\nimport { Animated, Keyboard } from 'react-native';\nimport { getInitialKeyboardHeight } from './getInitialKeyboardHeight';\nimport { getKeyboardEventNames } from './getKeyboardEventNames';\n\n/**\n * @category Hooks\n * @name useKeyboardAnimatedHeight\n * @description\n * A Hook that returns an animatable value (`Animated.Value`) representing the keyboard height changes when the keyboard appears or disappears. You can smoothly animate UI elements according to the keyboard height as it rises or falls.\n *\n * This Hook uses `keyboardWillShow`/`keyboardWillHide` on iOS, and `keyboardDidShow`/`keyboardDidHide` on Android when React Native New Architecture is enabled. On Android Old Architecture, it always returns an `Animated.Value` with an initial value of `0`.\n *\n * @returns {Animated.Value} - An animation value representing the keyboard height.\n * @example\n * ```typescript\n * const keyboardHeight = useKeyboardAnimatedHeight();\n *\n * <Animated.View style={{ marginBottom: keyboardHeight }}>\n *  {children}\n * </Animated.View>\n * ```\n */\nexport function useKeyboardAnimatedHeight(): Animated.Value {\n  const keyboardHeight = useRef(new Animated.Value(getInitialKeyboardHeight())).current;\n\n  useEffect(() => {\n    const keyboardEventNames = getKeyboardEventNames();\n\n    if (keyboardEventNames == null) {\n      return;\n    }\n\n    const showSubscription = Keyboard.addListener(keyboardEventNames.show, (event) => {\n      const height = event.endCoordinates.height;\n\n      Animated.spring(keyboardHeight, {\n        toValue: height,\n        useNativeDriver: true,\n        ...spring.quick,\n      }).start();\n    });\n\n    const hideSubscription = Keyboard.addListener(keyboardEventNames.hide, () => {\n      Animated.spring(keyboardHeight, {\n        toValue: 0,\n        useNativeDriver: true,\n        ...spring.quick,\n      }).start();\n    });\n\n    return () => {\n      showSubscription.remove();\n      hideSubscription.remove();\n    };\n  }, [keyboardHeight]);\n\n  return keyboardHeight;\n}\n\nconst spring = {\n  quick: {\n    stiffness: 800,\n    damping: 55,\n    mass: 1,\n  },\n};\n"
  },
  {
    "path": "packages/react-native/src/keyboard/useKeyboardHeight.tsx",
    "content": "import { useEffect, useState } from 'react';\nimport { Keyboard } from 'react-native';\nimport { getInitialKeyboardHeight } from './getInitialKeyboardHeight';\nimport { getKeyboardEventNames } from './getKeyboardEventNames';\n\n/**\n * @category Hooks\n * @name useKeyboardHeight\n * @description\n * A Hook that returns the current keyboard height as a number when the keyboard appears or disappears. Unlike `useKeyboardAnimatedHeight`, this Hook does not animate the value — it simply reflects the latest keyboard height.\n *\n * This Hook uses `keyboardWillShow`/`keyboardWillHide` on iOS, and `keyboardDidShow`/`keyboardDidHide` on Android when React Native New Architecture is enabled. On Android Old Architecture, it always returns `0`.\n *\n * @returns {number} - The current keyboard height.\n * @example\n * ```typescript\n * const keyboardHeight = useKeyboardHeight();\n *\n * <View style={{ marginBottom: keyboardHeight }}>\n *  {children}\n * </View>\n * ```\n */\nexport function useKeyboardHeight(): number {\n  const [keyboardHeight, setKeyboardHeight] = useState<number>(getInitialKeyboardHeight);\n\n  useEffect(() => {\n    const keyboardEventNames = getKeyboardEventNames();\n\n    if (keyboardEventNames == null) {\n      return;\n    }\n\n    const showSubscription = Keyboard.addListener(keyboardEventNames.show, (event) => {\n      setKeyboardHeight(event.endCoordinates.height);\n    });\n\n    const hideSubscription = Keyboard.addListener(keyboardEventNames.hide, () => {\n      setKeyboardHeight(0);\n    });\n\n    return () => {\n      showSubscription.remove();\n      hideSubscription.remove();\n    };\n  }, []);\n\n  return keyboardHeight;\n}\n"
  },
  {
    "path": "packages/react-native/src/lottie/Lottie.tsx",
    "content": "import LottieView, { type AnimationObject } from '@granite-js/native/lottie-react-native';\nimport type { ComponentProps } from 'react';\nimport { View } from 'react-native';\nimport { ensureSafeLottie, hasFonts } from './ensureSafeLottie';\nimport { useFetchResource } from './useFetchResource';\n\ntype LottieViewProps = ComponentProps<typeof LottieView>;\ntype BaseProps = Omit<LottieViewProps, 'source'> & {\n  /**\n   * Height is required to prevent layout shifting.\n   */\n  height: number | '100%';\n  width?: number | '100%';\n  maxWidth?: number;\n};\n\nexport type RemoteLottieProps = BaseProps & {\n  src: string;\n};\n\nexport type AnimationObjectLottieProps = BaseProps & {\n  animationObject: AnimationObject;\n};\n\nexport function Lottie({\n  width,\n  maxWidth,\n  height,\n  src,\n  autoPlay = true,\n  speed = 1,\n  style,\n  onAnimationFailure,\n  ...props\n}: RemoteLottieProps) {\n  const handleAnimationFailure = onAnimationFailure\n    ? (error: string) => {\n        onAnimationFailure(error);\n      }\n    : undefined;\n\n  const jsonData = useFetchResource(src, handleAnimationFailure);\n\n  if (jsonData == null) {\n    return <View testID=\"lottie-placeholder\" style={[{ opacity: 1, width, height }, style]} />;\n  }\n\n  if (hasFonts(jsonData) && __DEV__) {\n    throw new Error(\n      `The Lottie resource contains custom fonts which is unsafe. Please remove the custom fonts. source: ${src}`\n    );\n  }\n\n  return (\n    <LottieView\n      source={ensureSafeLottie(jsonData)}\n      autoPlay={autoPlay}\n      speed={speed}\n      style={[{ width, height, maxWidth }, style]}\n      onAnimationFailure={onAnimationFailure}\n      {...props}\n    />\n  );\n}\n\nLottie.AnimationObject = function LottieWithAnimationObject({\n  width,\n  maxWidth,\n  height,\n  animationObject,\n  autoPlay = true,\n  speed = 1,\n  style,\n  onAnimationFailure,\n  ...props\n}: AnimationObjectLottieProps) {\n  return (\n    <LottieView\n      source={animationObject}\n      autoPlay={autoPlay}\n      speed={speed}\n      style={[{ width, height, maxWidth }, style]}\n      onAnimationFailure={onAnimationFailure}\n      {...props}\n    />\n  );\n};\n"
  },
  {
    "path": "packages/react-native/src/lottie/ensureSafeLottie.ts",
    "content": "import type { AnimationObject } from '@granite-js/native/lottie-react-native';\n\ntype AnimationObjectWithFonts = AnimationObject & {\n  fonts?: { list?: unknown[] };\n};\n\nexport function hasFonts(animationData: AnimationObject): boolean {\n  const data = animationData as AnimationObjectWithFonts;\n  return Array.isArray(data.fonts?.list) && data.fonts.list.length > 0;\n}\n\nexport function ensureSafeLottie(animationData: AnimationObject): AnimationObject {\n  const { fonts, ...safeData } = animationData as AnimationObjectWithFonts;\n  return safeData as AnimationObject;\n}\n"
  },
  {
    "path": "packages/react-native/src/lottie/index.ts",
    "content": "export { Lottie, type RemoteLottieProps, type AnimationObjectLottieProps } from './Lottie';\n"
  },
  {
    "path": "packages/react-native/src/lottie/useFetchResource.ts",
    "content": "import type { AnimationObject } from '@granite-js/native/lottie-react-native';\nimport { useState, useEffect } from 'react';\n\nexport function useFetchResource(src: string, onAnimationFailure?: (error: string) => void): AnimationObject | null {\n  const [jsonData, setJsonData] = useState<AnimationObject | null>(null);\n\n  useEffect(() => {\n    let canceled = false;\n\n    fetch(src)\n      .then((res) => res.json())\n      .then((data) => {\n        if (!canceled) {\n          setJsonData(data);\n        }\n      })\n      .catch((error) => {\n        if (error instanceof Error) {\n          onAnimationFailure?.(error.message);\n        } else {\n          onAnimationFailure?.('Unknown error');\n        }\n      });\n\n    return () => {\n      canceled = true;\n    };\n  }, [src, onAnimationFailure]);\n\n  return jsonData;\n}\n"
  },
  {
    "path": "packages/react-native/src/native-modules/index.ts",
    "content": "/** Bridges API */\nexport * from './natives';\n"
  },
  {
    "path": "packages/react-native/src/native-modules/natives/closeView.ts",
    "content": "import { GraniteBrownfieldModule } from '@granite-js/brownfield-module';\n\n/**\n * @public\n * @category Screen Control\n * @kind function\n * @name closeView\n * @description Function that closes the current screen. It can be used when you want to exit a service by pressing a \"Close\" button.\n * @returns {Promise<void>}\n *\n * @example\n * ### Close screen with close button\n *\n * ```tsx\n * import { Button } from 'react-native';\n * import { closeView } from '@granite-js/react-native';\n *\n * function CloseButton() {\n *  return <Button title=\"Close\" onPress={closeView} />;\n * }\n * ```\n */\nexport async function closeView() {\n  return GraniteBrownfieldModule?.closeView();\n}\n"
  },
  {
    "path": "packages/react-native/src/native-modules/natives/getSchemeUri.ts",
    "content": "import { GraniteBrownfieldModule } from '@granite-js/brownfield-module';\n\n/**\n * @public\n * @name getSchemeUri\n * @category Environment Check\n * @kind function\n * @description Returns the scheme value when first entering the screen. URI changes due to page navigation are not reflected.\n * @returns {string} Returns the scheme value when first entering the screen.\n *\n * @example\n * ### Get initial scheme value\n *\n * ```tsx\n * import { getSchemeUri } from '@granite-js/react-native';\n * import { Text } from 'react-native';\n *\n * function MyPage() {\n *  const schemeUri = getSchemeUri();\n *\n *  return <Text>Initial scheme value: {schemeUri}</Text>\n * }\n * ```\n */\nexport function getSchemeUri() {\n  return GraniteBrownfieldModule.getConstants().schemeUri;\n}\n"
  },
  {
    "path": "packages/react-native/src/native-modules/natives/index.ts",
    "content": "export * from './closeView';\nexport * from './getSchemeUri';\nexport * from './openURL';\n"
  },
  {
    "path": "packages/react-native/src/native-modules/natives/openURL.ts",
    "content": "import { Linking } from 'react-native';\n\n/**\n * @public\n * @kind function\n * @category Screen Navigation\n *\n * @name openURL\n * @signature\n * ```typescript\n * function openURL(url: string): Promise<any>;\n * ```\n *\n * @description\n * Opens the specified URL in the device's default browser or related app.\n * This function uses the [`Linking.openURL`](https://reactnative.dev/docs/0.72/linking#openurl) method from `react-native` to open the URL.\n *\n * @param {string} url URL address to open\n * @returns {Promise<any>} Promise that resolves when the URL is successfully opened\n *\n * @example\n *\n * ### Open external URL\n *\n * ```tsx\n * import { openURL } from '@granite-js/react-native';\n * import { Button } from 'react-native';\n *\n * function Page() {\n *   const handlePress = () => {\n *     openURL('https://google.com');\n *   };\n *\n *   return <Button title=\"Open Google Website\" onPress={handlePress} />;\n * }\n * ```\n */\nexport function openURL(url: string): Promise<any> {\n  return Linking.openURL(url);\n}\n"
  },
  {
    "path": "packages/react-native/src/polyfills/index.ts",
    "content": "import { setupURLPolyfill } from 'react-native-url-polyfill';\n\nexport function setupPolyfills() {\n  setupAsyncIterator();\n  setupURLPolyfill();\n}\n\nfunction setupAsyncIterator() {\n  if (typeof Symbol !== 'undefined' && !Symbol.asyncIterator) {\n    (Symbol as any).asyncIterator = Symbol.for('@@asyncIterator');\n  }\n}\n"
  },
  {
    "path": "packages/react-native/src/router/Router.tsx",
    "content": "import { HeaderBackButtonProps } from '@granite-js/native/@react-navigation/elements';\nimport {\n  createNavigationContainerRef,\n  NavigationContainer,\n  NavigationContainerRefWithCurrent,\n  ParamListBase,\n  RouteProp,\n} from '@granite-js/native/@react-navigation/native';\nimport { NativeStackNavigationOptions } from '@granite-js/native/@react-navigation/native-stack';\nimport {\n  ComponentProps,\n  ComponentType,\n  Fragment,\n  PropsWithChildren,\n  ReactElement,\n  useCallback,\n  useMemo,\n  useState,\n} from 'react';\nimport { InitialProps } from '..';\nimport { closeView } from '../native-modules';\nimport { BackButton } from './components/BackButton';\nimport { CanGoBackGuard } from './components/CanGoBackGuard';\nimport { StackNavigator } from './components/StackNavigator';\nimport { useInternalRouterBackHandler } from './components/useRouterBackHandler';\nimport { useRouterControls, type RouterControlsConfig } from './hooks/useRouterControls';\nimport type { ErrorComponent, RequireContext } from './types';\nimport { BASE_STACK_NAVIGATOR_STYLE } from './types/screen-option';\n\n/**\n * @internal\n */\nexport interface InternalRouterProps {\n  /**\n   * @name context\n   * @description\n   * Object containing screen information used for file-based routing.\n   */\n  context: RequireContext;\n  /**\n   * @name prefix\n   * @description\n   * Prefix to use when the scheme is executed. For example, to enter 'scheme://my-service/intro', you need to set 'scheme://my-service' as the prefix.\n   */\n  prefix: string;\n  /**\n   * @name canGoBack\n   * @description\n   * Whether navigation back is possible. Default is true, and when set to true, you can use the back gesture or back button from @react-navigation/native.\n   * @default true\n   */\n  canGoBack?: boolean;\n  /**\n   * @name onBack\n   * @description\n   * Callback function called when navigating back.\n   */\n  onBack?: () => void;\n  /**\n   * @name container\n   * @description\n   * Container component that wraps the Navigator from @react-navigation/native.\n   */\n  container: ComponentType<PropsWithChildren<InitialProps>>;\n  initialProps: InitialProps;\n  initialScheme: string;\n  setIosSwipeGestureEnabled?: ({ isEnabled }: { isEnabled: boolean }) => Promise<void> | void;\n  getInitialUrl?: RouterControlsConfig['getInitialUrl'];\n}\n\nexport type RouterProps = StackNavigatorProps & NavigationContainerProps;\n\ninterface StackNavigatorProps {\n  /**\n   * @name navigationContainerRef\n   * @description\n   * You can create and pass a NavigationContainerRef from @react-navigation/native externally. This allows external control of the router.\n   */\n  navigationContainerRef?: NavigationContainerRefWithCurrent<never>;\n  /**\n   * @name defaultScreenOption\n   * @description\n   * Default options for screens. You can set options to be applied commonly to screens, such as title or headerStyle.\n   */\n  defaultScreenOption?:\n    | NativeStackNavigationOptions\n    | ((props: { route: RouteProp<ParamListBase>; navigation: any }) => NativeStackNavigationOptions);\n  /**\n   * @name screenContainer\n   * @description\n   * Container component that wraps each Screen component.\n   */\n  screenContainer?: ComponentType<PropsWithChildren<any>>;\n  /**\n   * @name defaultErrorComponent\n   * @description\n   * Error boundary component used when a route does not provide its own error component.\n   */\n  defaultErrorComponent?: ErrorComponent;\n}\n\ntype NavigationContainerProps = Pick<\n  ComponentProps<typeof NavigationContainer>,\n  'ref' | 'documentTitle' | 'fallback' | 'onReady' | 'onUnhandledAction' | 'onStateChange' | 'initialState'\n>;\n\n/**\n * @category Components\n * @kind function\n * @name Router\n * @description\n * Router component for page navigation in React Native environment.\n * Automatically assigns appropriate paths to screens based on file naming rules in pages/*.\n * Using this component, you can manage screens in a way similar to Next.js's file-based routing.\n *\n * @param {string} prefix Prefix to use when the scheme is executed. For example, to enter 'scheme://my-service/intro', you need to set 'scheme://my-service' as the prefix.\n * @param {RequireContext} context Object containing information about screens for file-based routing.\n * @param {NavigationContainerRefWithCurrent<never>} [navigationContainerRef] You can create and pass a NavigationContainerRef from @react-navigation/native externally. This allows external control of the router.\n * @param {NativeStackNavigationOptions | ((props: { route: RouteProp<ParamListBase>; navigation: any }) => NativeStackNavigationOptions)} [defaultScreenOption] Default options for screens. You can set options to be applied commonly to screens, such as title or headerStyle.\n * @param {boolean} [canGoBack=true] Whether navigation back is possible. Default is true, and when set to true, you can use the back gesture or back button from @react-navigation/native.\n * @param {() => void} [onBack] Callback function called when the user presses the back button or uses the back gesture. For example, you can set it to log when the user presses the back button.\n * @param {ComponentType<{ children: ReactNode }>} [container=Fragment] Container component that wraps the Navigator from @react-navigation/native.\n * @param {ComponentType<{ error: unknown; reset: () => void }>} [defaultErrorComponent] Default error component for screens without a route-specific error component.\n * @param {NavigationContainerProps} [navigationContainerProps] - You can set props to be passed to NavigationContainer from @react-navigation/native.\n *\n * @returns {ReactElement} - Returns the router component.\n * @example\n * ```tsx\n * import { Router } from '@granite-js/react-native';\n * import { context } from '../require.context';\n *\n * function App() {\n *  return <Router context={context} prefix={'scheme://testbench'} />;\n * }\n * ```\n */\nexport function Router({\n  // Internal props\n  prefix,\n  context,\n  container: Container = Fragment,\n  initialProps,\n  initialScheme,\n  // Public props (NavigationContainer)\n  navigationContainerRef,\n  defaultScreenOption,\n  screenContainer,\n  defaultErrorComponent,\n  // Public props (StackNavigator)\n  setIosSwipeGestureEnabled,\n  getInitialUrl,\n  ...navigationContainerProps\n}: InternalRouterProps & RouterProps): ReactElement {\n  const { Screens, linkingOptions } = useRouterControls({\n    prefix,\n    context,\n    screenContainer,\n    initialScheme,\n    getInitialUrl,\n    defaultErrorComponent,\n  });\n\n  const ref = useMemo(() => navigationContainerRef ?? createNavigationContainerRef<never>(), [navigationContainerRef]);\n\n  const { handler, canGoBack, onBack } = useInternalRouterBackHandler({\n    navigationContainerRef: ref,\n    onClose: closeView,\n  });\n\n  const headerLeft = useCallback(\n    (backButtonProps: HeaderBackButtonProps) => <BackButton {...backButtonProps} onPress={handler} />,\n    [handler]\n  );\n\n  const screenOptions = useCallback(\n    (screenProps: any) => ({\n      ...BASE_STACK_NAVIGATOR_STYLE,\n      gestureEnabled: canGoBack,\n      headerLeft,\n      ...(typeof defaultScreenOption === 'function' ? defaultScreenOption(screenProps) : defaultScreenOption),\n    }),\n    [canGoBack, defaultScreenOption, headerLeft]\n  );\n\n  const [isInitialScreen, setIsInitialScreen] = useState(true);\n\n  return (\n    <NavigationContainer\n      onStateChange={(state) => {\n        setIsInitialScreen(state ? state?.index === 0 : true);\n      }}\n      ref={ref}\n      {...navigationContainerProps}\n      linking={linkingOptions}\n    >\n      <CanGoBackGuard\n        canGoBack={canGoBack}\n        isInitialScreen={isInitialScreen}\n        onBack={onBack}\n        setIosSwipeGestureEnabled={setIosSwipeGestureEnabled}\n      >\n        <Container {...initialProps}>\n          <StackNavigator.Navigator screenOptions={screenOptions}>{Screens}</StackNavigator.Navigator>\n        </Container>\n      </CanGoBackGuard>\n    </NavigationContainer>\n  );\n}\n"
  },
  {
    "path": "packages/react-native/src/router/components/BackButton.tsx",
    "content": "import { SvgXml } from '@granite-js/native/react-native-svg';\nimport { Platform, TouchableOpacity, TouchableOpacityProps, View } from 'react-native';\n\ninterface BackButtonProps extends TouchableOpacityProps {\n  tintColor?: string;\n  onPress?: () => void;\n}\n/**\n * @public\n * @category UI\n * @name BackButton\n * @description\n * A back button component. This component is primarily used to implement functionality for returning to the previous screen in navigation headers or custom screen tops. If no `onPress` handler is set, it won't perform any action.\n *\n * @param {string} [props.tintColor] - The color of the button icon. You can use CSS color strings.\n * @param {() => void} [props.onPress] - A function to execute when the button is pressed. For example, you can add a function to return to the previous screen.\n *\n * @returns {ReactElement} Returns a back button component.\n * @example\n *\n * ### Example of directly passing a handler to a back button and setting a function to close the view\n *\n * ```tsx\n * import { createNavigationContainerRef, useNavigation } from '@granite-js/native/@react-navigation/native';\n * import { BackButton, useRouterBackHandler } from '@granite-js/react-native';\n * import { useEffect } from 'react';\n *\n * const navigationContainerRef = createNavigationContainerRef();\n *\n * function MyBackButton() {\n *   const navigation = useNavigation();\n *\n *   const { handler } = useRouterBackHandler({\n *     navigationContainerRef,\n *     onClose: () => {\n *       // close the view\n *     },\n *   });\n *\n *   useEffect(() => {\n *     navigation.setOptions({\n *       headerLeft: () => <BackButton onPress={handler} />,\n *     });\n *   }, [handler, navigation]);\n *\n *   return <></>;\n * }\n */\nfunction BackButton({ tintColor, onPress }: BackButtonProps) {\n  return <NavbarBackButton onPress={onPress} color={tintColor} />;\n}\n\nfunction NavbarBackButton({ onPress, color }: { onPress?: () => void; color?: string }) {\n  return (\n    <TouchableOpacity\n      hitSlop={{ top: 10, right: 10, bottom: 10, left: 10 }}\n      style={{ width: 24, height: 24 }}\n      onPress={onPress}\n      accessible={true}\n      accessibilityLabel=\"Go back\"\n      accessibilityRole=\"button\"\n    >\n      <View style={{ width: 24, height: 24 }}>\n        <SvgXml\n          width={24}\n          height={24}\n          xml={BACK_BUTTON_XML.replace(/fill=\"#[0-9a-fA-F]{6}\"/g, `fill=\"${color}\"`)}\n          style={{\n            marginLeft: BACK_BUTTON_MARGIN,\n          }}\n        />\n      </View>\n    </TouchableOpacity>\n  );\n}\n\nconst ANDROID_BACK_BUTTON = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" class=\"line-icon\">\n<path fill=\"#B0B8C1\" fill-rule=\"evenodd\" d=\"M20.966 10.8H6.93l5.451-5.451a1.2 1.2 0 10-1.697-1.697l-7.5 7.5c-.003.002-.004.006-.007.009a1.2 1.2 0 00-.252 1.298c.06.143.145.27.252.38l.007.01 7.5 7.5c.235.234.542.35.848.35a1.2 1.2 0 00.849-2.048L6.931 13.2h14.036a1.2 1.2 0 100-2.4\"/>\n</svg>`;\n\nconst IOS_BACK_BUTTON = `<svg enable-background=\"new 0 0 24 24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"m20.8 20.7c-.3 0-.6-.1-.8-.4l-7.5-7.5c-.5-.5-.5-1.2 0-1.7l7.5-7.5c.5-.5 1.2-.5 1.7 0s.5 1.2 0 1.7l-6.8 6.7 6.7 6.7c.5.5.5 1.2 0 1.7-.2.2-.5.3-.8.3z\" fill=\"#b0b8c1\"/>\n</svg>`;\n\nconst BACK_BUTTON_XML = Platform.select<string>({\n  android: ANDROID_BACK_BUTTON,\n  ios: IOS_BACK_BUTTON,\n  default: IOS_BACK_BUTTON,\n});\n\nconst BACK_BUTTON_MARGIN = Platform.select<number>({\n  android: -4,\n  ios: -12,\n  default: -12,\n});\n\nexport { BackButton };\n"
  },
  {
    "path": "packages/react-native/src/router/components/CanGoBackGuard.tsx",
    "content": "import { ReactNode, useEffect } from 'react';\nimport { BackHandler } from 'react-native';\n\nexport function CanGoBackGuard({\n  children,\n  canGoBack,\n  onBack,\n  isInitialScreen,\n  setIosSwipeGestureEnabled,\n}: {\n  canGoBack: boolean;\n  isInitialScreen: boolean;\n  children: ReactNode;\n  onBack?: () => void;\n  setIosSwipeGestureEnabled?: ({ isEnabled }: { isEnabled: boolean }) => void;\n}) {\n  const shouldBlockGoingBack = !canGoBack;\n\n  useEffect(() => {\n    if (!isInitialScreen || !canGoBack) {\n      setIosSwipeGestureEnabled?.({ isEnabled: false });\n\n      return () => {\n        setIosSwipeGestureEnabled?.({ isEnabled: true });\n      };\n    }\n\n    return;\n  }, [canGoBack, isInitialScreen, setIosSwipeGestureEnabled]);\n\n  useEffect(() => {\n    if (shouldBlockGoingBack) {\n      const subscription = BackHandler.addEventListener('hardwareBackPress', () => {\n        onBack?.();\n        return true;\n      });\n\n      return () => {\n        subscription.remove();\n      };\n    }\n\n    return;\n  }, [shouldBlockGoingBack, onBack]);\n\n  return <>{children}</>;\n}\n"
  },
  {
    "path": "packages/react-native/src/router/components/ErrorBoundary.tsx",
    "content": "import { Component, type ReactNode } from 'react';\nimport type { ErrorComponent } from '../types';\n\ninterface ErrorBoundaryProps {\n  fallback: ErrorComponent;\n  children: ReactNode;\n}\n\ninterface ErrorBoundaryState {\n  error: unknown | null;\n}\n\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n  state: ErrorBoundaryState = {\n    error: null,\n  };\n\n  static getDerivedStateFromError(error: unknown): ErrorBoundaryState {\n    return { error };\n  }\n\n  render() {\n    if (this.state.error != null) {\n      const Fallback = this.props.fallback;\n      return <Fallback error={this.state.error} reset={this.reset} />;\n    }\n\n    return this.props.children;\n  }\n\n  private reset = () => {\n    if (this.state.error == null) {\n      return;\n    }\n\n    this.setState({ error: null });\n  };\n}\n"
  },
  {
    "path": "packages/react-native/src/router/components/StackNavigator.tsx",
    "content": "import { createNativeStackNavigator } from '@granite-js/native/@react-navigation/native-stack';\n\nfunction createStackNavigator() {\n  const Stack = createNativeStackNavigator();\n\n  return {\n    Navigator: Stack.Navigator,\n    Screen: Stack.Screen,\n  };\n}\n\nexport const StackNavigator = createStackNavigator();\n"
  },
  {
    "path": "packages/react-native/src/router/components/useRouterBackHandler.tsx",
    "content": "import { NavigationContainerRefWithCurrent } from '@granite-js/native/@react-navigation/native';\nimport { useCallback, useMemo } from 'react';\nimport { useBackEventContext } from '../../use-back-event';\n\n/**\n * @public\n * @name useRouterBackHandler\n * @category Screen Control\n * @description\n * A hook that provides a handler for handling back navigation actions. This can be used when you need to close a view directly when the back button is pressed in modals or independent screens where there's no navigation stack. This hook uses `NavigationContainerRef` from `@react-navigation/native` to navigate to the previous screen if there's a remaining navigation stack, or executes the user-defined `onClose` function if the stack is empty.\n *\n * @param {NavigationContainerRefWithCurrent<never>} navigationContainerRef - A `NavigationContainerRef` that can reference the current navigation state. Used when executing back navigation actions.\n * @param {() => void} [onClose] - A function to execute when the navigation stack is empty. For example, you can pass a function that closes a React Native View.\n *\n * @returns {{ handler: () => void }} A handler function that can be used in back buttons or similar components.\n *\n * @example\n *\n * ### Example of directly passing a handler to a back button and setting a function to close the view\n *\n * ```tsx\n * import { createNavigationContainerRef, useNavigation } from '@granite-js/native/@react-navigation/native';\n * import { BackButton, useRouterBackHandler } from '@granite-js/react-native';\n * import { useEffect } from 'react';\n *\n * const navigationContainerRef = createNavigationContainerRef();\n *\n * function MyBackButton() {\n *   const navigation = useNavigation();\n *\n *   const { handler } = useRouterBackHandler({\n *     navigationContainerRef,\n *     onClose: () => {\n *       // close the view\n *     },\n *   });\n *\n *   useEffect(() => {\n *     navigation.setOptions({\n *       headerLeft: () => <BackButton onPress={handler} />,\n *     });\n *   }, [handler, navigation]);\n *\n *   return <></>;\n * }\n */\nexport function useRouterBackHandler({\n  navigationContainerRef,\n  onClose,\n}: {\n  navigationContainerRef: NavigationContainerRefWithCurrent<never>;\n  onClose?: () => void;\n}) {\n  const { handler } = useInternalRouterBackHandler({ navigationContainerRef, onClose });\n\n  return { handler };\n}\n\nexport function useInternalRouterBackHandler({\n  navigationContainerRef,\n  onClose,\n}: {\n  navigationContainerRef: NavigationContainerRefWithCurrent<never>;\n  onClose?: () => void;\n}) {\n  const { hasBackEvent, onBack } = useBackEventContext();\n  const canGoBack = !hasBackEvent;\n\n  const handler = useCallback(() => {\n    onBack?.();\n\n    if (!canGoBack) {\n      return;\n    }\n\n    if (navigationContainerRef.canGoBack()) {\n      navigationContainerRef.goBack();\n    } else {\n      onClose?.();\n    }\n  }, [canGoBack, onClose, navigationContainerRef, onBack]);\n\n  return useMemo(\n    () => ({\n      handler,\n      canGoBack,\n      onBack,\n    }),\n    [canGoBack, handler, onBack]\n  );\n}\n"
  },
  {
    "path": "packages/react-native/src/router/constants.ts",
    "content": "export const RESERVED_KEYWORDS = ['_layout'];\n\nexport const RESERVED_PATHS = ['/_404'];\n"
  },
  {
    "path": "packages/react-native/src/router/createRoute.test-d.ts",
    "content": "import { assertType, describe, it } from 'vitest';\nimport { z } from 'zod';\nimport { createRoute, useNavigation, useParams } from './createRoute';\n\ndeclare module './createRoute' {\n  interface RegisterScreenInput {\n    '/test': {\n      id: string;\n      name: string;\n    };\n    '/test-schema': {\n      id: string;\n      count: number;\n    };\n    '/test-transform': {\n      id: string;\n    };\n    '/test-with-defaults': {\n      animation?: boolean;\n    };\n  }\n\n  interface RegisterScreen {\n    '/test': {\n      id: string;\n      name: string;\n    };\n    '/test-schema': {\n      id: string;\n      count: number;\n    };\n    '/test-transform': {\n      id: number;\n    };\n    '/test-with-defaults': {\n      animation: boolean;\n    };\n  }\n}\n\ndescribe('createRoute', () => {\n  const Route = createRoute('/test', {\n    component: () => null,\n    validateParams: (params) => params as { id: string; name: string },\n  });\n\n  it('useParams', () => {\n    assertType<{\n      id: string;\n      name: string;\n    }>(Route.useParams());\n\n    assertType<Readonly<object | undefined>>(useParams({ strict: false }));\n\n    // @ts-expect-error - Type error should occur when strict is false\n    assertType<{ id: string; name: string }>(useParams({ strict: false }));\n\n    assertType<{\n      id: string;\n      name: string;\n    }>(useParams({ from: '/test', strict: true }));\n\n    assertType<{\n      id: string;\n      name: string;\n    }>(useParams({ from: '/test' }));\n\n    // @ts-expect-error Type error should occur when no options\n    assertType(useParams());\n\n    // @ts-expect-error Type error should occur when empty object\n    assertType(useParams({}));\n\n    // @ts-expect-error Type error should occur when path is not registered\n    assertType(useParams({ from: '/abcdefg' }));\n\n    // @ts-expect-error Type error should occur since 'from' and 'strict: false' are conflicting options\n    assertType(useParams({ from: '/test', strict: false }));\n  });\n\n  it('should infer _inputType and _outputType without undefined for function pattern', () => {\n    type InputType = (typeof Route)['_inputType'];\n    type OutputType = (typeof Route)['_outputType'];\n\n    // _inputType should be inferred as the exact type, not a union with undefined\n    assertType<{\n      id: string;\n      name: string;\n    }>({} as InputType);\n\n    // _outputType should be inferred as the exact type, not a union with undefined\n    assertType<{\n      id: string;\n      name: string;\n    }>({} as OutputType);\n\n    // Verify that undefined is not part of the union\n    type InputHasUndefined = undefined extends InputType ? true : false;\n    type OutputHasUndefined = undefined extends OutputType ? true : false;\n\n    assertType<false>({} as InputHasUndefined);\n    assertType<false>({} as OutputHasUndefined);\n  });\n});\n\ndescribe('createRoute with StandardSchema', () => {\n  it('should infer correct type from StandardSchema', () => {\n    const RouteWithSchema = createRoute('/test-schema', {\n      component: () => null,\n      validateParams: z.object({\n        id: z.string(),\n        count: z.number(),\n      }),\n    });\n\n    assertType<{\n      id: string;\n      count: number;\n    }>(RouteWithSchema.useParams());\n  });\n\n  it('should infer _inputType and _outputType without undefined', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const RouteWithSchema = createRoute('/test-schema', {\n      component: () => null,\n      validateParams: z.object({\n        id: z.string(),\n        count: z.number(),\n      }),\n    });\n\n    type InputType = (typeof RouteWithSchema)['_inputType'];\n    type OutputType = (typeof RouteWithSchema)['_outputType'];\n    type UseParamsReturnType = ReturnType<(typeof RouteWithSchema)['useParams']>;\n\n    // _inputType should be inferred as the exact type, not a union with undefined\n    assertType<{\n      id: string;\n      count: number;\n    }>({} as InputType);\n\n    // _outputType should be inferred as the exact type, not a union with undefined\n    assertType<{\n      id: string;\n      count: number;\n    }>({} as OutputType);\n\n    // useParams should return the exact type, not a union with undefined\n    assertType<{\n      id: string;\n      count: number;\n    }>({} as UseParamsReturnType);\n\n    // Verify that undefined is not part of the union for all types\n    type InputHasUndefined = undefined extends InputType ? true : false;\n    type OutputHasUndefined = undefined extends OutputType ? true : false;\n    type UseParamsHasUndefined = undefined extends UseParamsReturnType ? true : false;\n\n    assertType<false>({} as InputHasUndefined);\n    assertType<false>({} as OutputHasUndefined);\n    assertType<false>({} as UseParamsHasUndefined);\n\n    // useNavigation should accept input type for navigate parameters\n    const navigation = useNavigation();\n\n    // Should accept exact input type\n    navigation.navigate('/test-schema', { id: 'test', count: 123 });\n  });\n\n  it('should infer output type from transformation', () => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const RouteWithTransform = createRoute('/test-transform', {\n      component: () => null,\n      validateParams: z.object({\n        id: z.string().transform((v) => parseInt(v)),\n      }),\n    });\n\n    type InputType = (typeof RouteWithTransform)['_inputType'];\n    type OutputType = (typeof RouteWithTransform)['_outputType'];\n    type UseParamsReturnType = ReturnType<(typeof RouteWithTransform)['useParams']>;\n\n    // _inputType should be string (before transformation)\n    assertType<{\n      id: string;\n    }>({} as InputType);\n\n    // _outputType should be number (after transformation)\n    assertType<{\n      id: number;\n    }>({} as OutputType);\n\n    // useParams should return output type (number)\n    assertType<{\n      id: number;\n    }>({} as UseParamsReturnType);\n\n    // useNavigation should accept input type (string)\n    const navigation = useNavigation();\n    navigation.navigate('/test-transform', { id: 'test-id' });\n\n    // Verify that input and output types are different\n    type InputIsString = InputType extends { id: string } ? true : false;\n    type OutputIsNumber = OutputType extends { id: number } ? true : false;\n\n    assertType<true>({} as InputIsString);\n    assertType<true>({} as OutputIsNumber);\n  });\n\n  it('should work with useParams hook', () => {\n    createRoute('/test-schema', {\n      component: () => null,\n      validateParams: z.object({\n        id: z.string(),\n        count: z.number(),\n      }),\n    });\n\n    assertType<{\n      id: string;\n      count: number;\n    }>(useParams({ from: '/test-schema' }));\n  });\n\n  it('should separate input and output types with defaults', () => {\n    const RouteWithDefaults = createRoute('/test-with-defaults', {\n      component: () => null,\n      validateParams: z.object({\n        animation: z.boolean().default(true),\n      }),\n    });\n\n    // useParams returns output type (required)\n    assertType<{ animation: boolean }>(RouteWithDefaults.useParams());\n\n    // navigation.navigate should accept input type (optional)\n    const navigation = useNavigation();\n\n    // Should accept with animation parameter\n    navigation.navigate('/test-with-defaults', { animation: false });\n\n    // Should accept without animation parameter (default will be used)\n    navigation.navigate('/test-with-defaults', {});\n  });\n});\n"
  },
  {
    "path": "packages/react-native/src/router/createRoute.ts",
    "content": "import {\n  type ParamListBase,\n  useNavigation as useNavigationNative,\n  useRoute,\n} from '@granite-js/native/@react-navigation/native';\nimport {\n  NativeStackNavigationOptions,\n  NativeStackNavigationProp,\n} from '@granite-js/native/@react-navigation/native-stack';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { useMemo } from 'react';\nimport { RESERVED_PATHS } from './constants';\nimport type { ErrorComponent } from './types';\nimport { defaultParserParams } from './utils/defaultParserParams';\nimport { type InferOutput, type InferInput } from './utils/standardSchema';\nimport { validateRouteParams } from './utils/validateRouteParams';\n\nexport interface RouteOptions<T extends Readonly<object | undefined>> {\n  parserParams?: (params: Record<string, unknown>) => Record<string, unknown>;\n  validateParams?: ((params: Readonly<object | undefined>) => T) | StandardSchemaV1<any, T>;\n  component: React.FC<any>;\n  errorComponent?: ErrorComponent;\n  screenOptions?: NativeStackNavigationOptions | ((context: { params: T }) => NativeStackNavigationOptions);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface RegisterScreenInput {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface RegisterScreen {}\n\nexport type NavigationProps = NativeStackNavigationProp<\n  // @ts-expect-error - override type\n  keyof RegisterScreenInput extends never ? ParamListBase : RegisterScreenInput\n>;\n\nexport function useNavigation() {\n  return useNavigationNative<NavigationProps>();\n}\n\nexport type RouteHooksOptions<TScreen extends keyof RegisterScreen> =\n  | {\n      from: TScreen;\n      strict?: true;\n    }\n  | {\n      strict: false;\n      from?: never;\n    };\n\nexport const routeMap = new Map<\n  keyof RegisterScreenInput,\n  {\n    options: Omit<RouteOptions<any>, 'component' | 'screenOptions' | 'errorComponent'>;\n    component: React.FC<any>;\n    errorComponent?: ErrorComponent;\n    screenOptions?: NativeStackNavigationOptions | ((context: { params: any }) => NativeStackNavigationOptions);\n  }\n>();\n\nexport function useMatchOptions<TScreen extends keyof RegisterScreen>(options: RouteHooksOptions<TScreen>) {\n  const route = useRoute();\n  const from = 'from' in options ? options.from : (route.name as TScreen);\n  const strict = 'from' in options ? true : options.strict;\n\n  if (strict && from !== route.name) {\n    throw new Error(`Cannot access parameters from route '${from}' in current route '${route.name}'`);\n  }\n\n  return useMemo(() => {\n    if (!from) {\n      return null;\n    }\n\n    if (!(routeMap.has(from) || RESERVED_PATHS.includes(from))) {\n      throw new Error(`Route '${from}' is not registered`);\n    }\n\n    const routeOptions = routeMap.get(from);\n    return {\n      ...routeOptions?.options,\n      parserParams: routeOptions?.options.parserParams ?? defaultParserParams,\n    };\n  }, [from]);\n}\n\nexport function useParams<TScreen extends keyof RegisterScreen>(options: {\n  from: TScreen;\n  strict?: true;\n}): RegisterScreen[TScreen];\nexport function useParams(options: { strict: false }): Readonly<object | undefined>;\n\n/**\n * @public\n * @category Screen Control\n * @name useParams\n * @description\n *\n * `useParams` is a hook that retrieves parameters from a specified route.\n * Using this hook, you can easily access parameters of the current route.\n * With the `validateParams` option, you can validate parameter structure and transform types,\n * reducing runtime errors and writing safer code.\n *\n * @param {RouteHooksOptions<TScreen>} options Object containing information about the route to retrieve.\n * @param {string} [options.from] Route path to retrieve parameters from. If not specified, retrieves parameters from the current route. Must be specified when strict mode is true.\n * @param {boolean} [options.strict] Strict mode setting. When set to true, throws an error if the specified route doesn't match the current route. When set to false, skips validateParams validation and returns parameters of the current screen as is.\n *\n * @example\n * ### Retrieving Route Parameters\n *\n *\n * ::: code-group\n *\n * ```tsx [pages/examples/use-params.tsx]\n * import React from 'react';\n * import { Text } from 'react-native';\n * import { createRoute, useParams } from '@granite-js/react-native';\n *\n * export const Route = createRoute('/examples/use-params', {\n *   validateParams: (params) => params as { id: string },\n *   component: UseParamsExample,\n * });\n *\n * function UseParamsExample() {\n *   // First method: Using the useParams method of the route object\n *   const params = Route.useParams();\n *\n *   // Second method: Using the useParams hook directly\n *   const params2 = useParams({ from: '/examples/use-params' });\n *\n *   // Third method: Using with strict mode set to false\n *   // When strict is false, retrieves parameters from the current route\n *   // and skips validation even if validateParams is defined\n *   const params3 = useParams({ strict: false }) as { id: string };\n *\n *   return (\n *     <>\n *       <Text>{params.id}</Text>\n *       <Text>{params2.id}</Text>\n *       <Text>{params3.id}</Text>\n *     </>\n *   );\n * }\n * ```\n * :::\n */\nexport function useParams<TScreen extends keyof RegisterScreen>(\n  options: RouteHooksOptions<TScreen>\n): TScreen extends keyof RegisterScreen ? RegisterScreen[TScreen] : Readonly<object | undefined> {\n  const routeOptions = useMatchOptions(options);\n  const route = useRoute();\n\n  const isStrict = typeof options.from === 'string' ? true : options.strict;\n  const params = useMemo(() => {\n    if (!routeOptions) {\n      return (route.params ?? {}) as Readonly<object | undefined>;\n    }\n\n    const parsedParams = routeOptions.parserParams(route.params as Record<string, string>);\n\n    if (!isStrict || !routeOptions.validateParams) {\n      return parsedParams;\n    }\n\n    return validateRouteParams(routeOptions.validateParams, parsedParams);\n  }, [routeOptions, route.params, isStrict]);\n\n  return params;\n}\n\n// Overload 1: StandardSchema pattern\nexport function createRoute<TSchema extends StandardSchemaV1<any, any>>(\n  path: keyof RegisterScreenInput,\n  options: Omit<RouteOptions<any>, 'validateParams'> & {\n    validateParams: TSchema;\n  }\n): {\n  _path: keyof RegisterScreenInput;\n  useNavigation: typeof useNavigation;\n  useParams: () => InferOutput<TSchema>;\n  _inputType: InferInput<TSchema>;\n  _outputType: InferOutput<TSchema>;\n};\n\n// Overload 2: Function pattern\nexport function createRoute<T extends Readonly<object | undefined>>(\n  path: keyof RegisterScreenInput,\n  options: RouteOptions<T>\n): {\n  _path: keyof RegisterScreenInput;\n  useNavigation: typeof useNavigation;\n  useParams: () => T;\n  _inputType: T;\n  _outputType: T;\n};\n\n// Implementation\nexport function createRoute(path: keyof RegisterScreenInput, options: RouteOptions<any>) {\n  const { component, screenOptions, errorComponent, ...restOptions } = options;\n  routeMap.set(path, {\n    options: restOptions,\n    component,\n    errorComponent,\n    screenOptions: screenOptions,\n  });\n\n  const _path = path as keyof RegisterScreenInput;\n  return {\n    _path,\n    useNavigation,\n    useParams: () => useParams({ from: _path as keyof RegisterScreen, strict: true }),\n\n    // These properties are only used for type inference in the generated router files\n    // The actual values are never accessed at runtime\n    _inputType: {},\n    _outputType: {},\n  };\n}\n"
  },
  {
    "path": "packages/react-native/src/router/hooks/useInitialRouteName.tsx",
    "content": "import { Platform } from 'react-native';\n\nexport function useInitialRouteName({ prefix, initialScheme }: { prefix: string; initialScheme?: string }) {\n  if (!initialScheme) {\n    return '/';\n  }\n\n  const pathname = removeTrailingSlash(initialScheme).slice(prefix.length).split('?')[0];\n  const shouldUseIndex = pathname?.length === 0;\n\n  return shouldUseIndex ? '/' : pathname;\n}\n\nfunction removeTrailingSlash(scheme: string) {\n  if (Platform.OS === 'android') {\n    return scheme.replaceAll(/\\/+$/g, '');\n  }\n\n  return scheme;\n}\n"
  },
  {
    "path": "packages/react-native/src/router/hooks/useIsInitialScreen.ts",
    "content": "import { useNavigationState } from '@granite-js/native/@react-navigation/native';\n\n/**\n * Hook that determines if the current screen is the initial screen in the navigation stack.\n *\n * @returns {boolean} True if the current screen is the initial (first) screen in the stack, false otherwise.\n */\nexport function useIsInitialScreen() {\n  const index = useNavigationState((state) => state?.index ?? 0);\n\n  return index === 0;\n}\n"
  },
  {
    "path": "packages/react-native/src/router/hooks/useRouterControls.tsx",
    "content": "import { NavigationContainer } from '@granite-js/native/@react-navigation/native';\nimport { useMemo, type ComponentProps, type ComponentType, type PropsWithChildren } from 'react';\nimport { ErrorBoundary } from '../components/ErrorBoundary';\nimport { StackNavigator } from '../components/StackNavigator';\nimport { RESERVED_KEYWORDS } from '../constants';\nimport type { ErrorComponent, RequireContext } from '../types';\nimport { getRouteScreens, getScreenPathMapConfig } from '../utils';\nimport { createParentRouteScreenMap } from '../utils/createParentRouteScreenMap';\nimport { mergeParentLayoutScreen } from '../utils/mergeParentLayoutScreen';\nimport { getFileNameFromPath } from '../utils/path';\n\ntype NavigationContainerProps = ComponentProps<typeof NavigationContainer>;\n\nexport interface RouterControlsConfig {\n  prefix: string;\n  initialScheme: string;\n  context: RequireContext;\n  getInitialUrl?: (initialScheme: string) => string | undefined | Promise<string | undefined>;\n  screenContainer?: ComponentType<PropsWithChildren<any>>;\n  defaultErrorComponent?: ErrorComponent;\n}\n\nexport function useRouterControls({\n  prefix,\n  context,\n  screenContainer: ScreenContainer,\n  getInitialUrl = defaultGetInitialUrl,\n  initialScheme,\n  defaultErrorComponent,\n}: RouterControlsConfig) {\n  const routeScreens = useMemo(() => getRouteScreens(context), [context]);\n\n  const registerScreens = useMemo(() => {\n    return routeScreens.filter(\n      (screen) => !RESERVED_KEYWORDS.includes(getFileNameFromPath(screen.path, { withExtension: false }))\n    );\n  }, [routeScreens]);\n\n  const layoutScreenMap = useMemo(() => createParentRouteScreenMap(routeScreens, '_layout'), [routeScreens]);\n\n  const Screens = useMemo(() => {\n    return registerScreens.map((routeScreen) => {\n      const RouteErrorComponent = routeScreen.errorComponent;\n      const Layout = mergeParentLayoutScreen(layoutScreenMap, routeScreen.path);\n\n      const Component = function Component() {\n        const routeElement =\n          RouteErrorComponent == null ? (\n            <routeScreen.component />\n          ) : (\n            <ErrorBoundary fallback={RouteErrorComponent}>\n              <routeScreen.component />\n            </ErrorBoundary>\n          );\n\n        const element = <Layout>{routeElement}</Layout>;\n        const wrappedElement = ScreenContainer == null ? element : <ScreenContainer>{element}</ScreenContainer>;\n\n        if (defaultErrorComponent == null) {\n          return wrappedElement;\n        }\n\n        return <ErrorBoundary fallback={defaultErrorComponent}>{wrappedElement}</ErrorBoundary>;\n      };\n\n      const routePath = routeScreen.path;\n      const options = routeScreen.screenOptions ?? {};\n\n      return <StackNavigator.Screen key={routePath} name={routePath} component={Component} options={options} />;\n    });\n  }, [registerScreens, layoutScreenMap, ScreenContainer, defaultErrorComponent]);\n\n  const linkingOptions: NavigationContainerProps['linking'] = useMemo(() => {\n    return {\n      prefixes: [prefix],\n      config: {\n        screens: getScreenPathMapConfig(registerScreens),\n      },\n      async getInitialURL() {\n        return (getInitialUrl ?? defaultGetInitialUrl)(initialScheme);\n      },\n    };\n  }, [initialScheme, prefix, registerScreens, getInitialUrl]);\n\n  return { Screens, linkingOptions };\n}\n\nfunction defaultGetInitialUrl(initialScheme: string) {\n  if (initialScheme == null) {\n    return;\n  }\n\n  /** @NOTE Korean paths need to be decoded. */\n  return decodeURI(initialScheme);\n}\n"
  },
  {
    "path": "packages/react-native/src/router/index.ts",
    "content": "export * from './Router';\nexport { getRouteScreens, getScreenPathMapConfig, defaultParserParams } from './utils';\nexport * from './types';\nexport * from './components/BackButton';\nexport * from './components/useRouterBackHandler';\n"
  },
  {
    "path": "packages/react-native/src/router/types/ErrorComponent.ts",
    "content": "import type { ComponentType } from 'react';\n\nexport interface ErrorComponentProps {\n  error: unknown;\n  reset: () => void;\n}\n\nexport type ErrorComponent = ComponentType<ErrorComponentProps>;\n"
  },
  {
    "path": "packages/react-native/src/router/types/RequireContext.ts",
    "content": "export interface RequireContext {\n  keys(): string[];\n  (id: string): any;\n  <T>(id: string): T;\n  resolve(id: string): string;\n  id: string;\n}\n"
  },
  {
    "path": "packages/react-native/src/router/types/RouteScreen.ts",
    "content": "import { NativeStackNavigationOptions } from '@granite-js/native/@react-navigation/native-stack';\nimport type { ErrorComponent } from './ErrorComponent';\nimport { Screen } from './Screen';\n\n/**\n * @name RouteScreen\n */\nexport interface RouteScreen {\n  /**\n   * @name path\n   * @description Path information (e.g. \"/\", \"/list\", \"/list/:id\", etc.)\n   */\n  path: string;\n  /**\n   * @name component\n   * @description Screen component\n   */\n  component: Screen;\n  /**\n   * @name errorComponent\n   * @description Error boundary component for this screen\n   */\n  errorComponent?: ErrorComponent;\n  /**\n   * @name screenOptions\n   * @description Screen options for React Navigation (can be static or a function that receives route params)\n   */\n  screenOptions?: NativeStackNavigationOptions;\n}\n"
  },
  {
    "path": "packages/react-native/src/router/types/Screen.tsx",
    "content": "import type { NativeStackNavigationOptions } from '@granite-js/native/@react-navigation/native-stack';\nimport type { ComponentType } from 'react';\n\n/**\n * @name Screen\n * @description A Screen that serves as a unit of navigation\n * @example\n *\n * ```ts\n * function Page() {\n *  // ...\n * }\n *\n * Page.screenOptions = {\n *   // ...\n * }\n * ```\n */\nexport type Screen = ComponentType & GraniteScreenOptions;\n\ninterface GraniteScreenOptions {\n  /** @description Add this when customization is needed for NativeStack Screen's screenOptions */\n  screenOptions?: NativeStackNavigationOptions;\n}\n"
  },
  {
    "path": "packages/react-native/src/router/types/index.ts",
    "content": "export * from './RequireContext';\nexport * from './RouteScreen';\nexport * from './Screen';\nexport * from './ErrorComponent';\n"
  },
  {
    "path": "packages/react-native/src/router/types/screen-option.ts",
    "content": "import { NativeStackNavigationOptions } from '@granite-js/native/@react-navigation/native-stack';\nimport { Platform } from 'react-native';\n\nexport const DEFAULT_BACKGROUND_COLOR = '#ffffff';\nexport const DEFAULT_HEADER_TINT_COLOR = '#191f28';\nexport const BASE_STACK_NAVIGATOR_STYLE: NativeStackNavigationOptions = {\n  headerTitle: '',\n  contentStyle: {\n    backgroundColor: DEFAULT_BACKGROUND_COLOR,\n  },\n  headerTintColor: DEFAULT_HEADER_TINT_COLOR,\n  headerTitleStyle: {\n    color: 'transparent',\n  },\n  headerStyle: {\n    backgroundColor: DEFAULT_BACKGROUND_COLOR,\n  },\n  headerShadowVisible: false,\n\n  // FIX\n  // According to the docs, react-navigation's Android transition behavior should follow the OS default, but in reality, it doesn't.\n  // We've decided to solve this issue by unifying the animation to slide up from bottom.\n  animation: Platform.OS === 'android' ? 'fade_from_bottom' : 'default',\n};\n"
  },
  {
    "path": "packages/react-native/src/router/utils/createParentRouteScreenMap.spec.ts",
    "content": "import { describe, it, expect } from 'vitest';\nimport { createParentRouteScreenMap } from './createParentRouteScreenMap';\nimport type { RouteScreen } from '../types/RouteScreen';\n\ndescribe('createParentRouteScreenMap', () => {\n  describe('When there are nested layouts', () => {\n    it('Each page is mapped to its nearest parent layout', () => {\n      const paths: RouteScreen[] = [\n        { path: './granite-module/_layout', component: () => null },\n        { path: './granite-module/test', component: () => null },\n        { path: './about/_layout', component: () => null },\n        { path: './about/test', component: () => null },\n        { path: './about', component: () => null },\n        { path: './image', component: () => null },\n      ];\n\n      const layoutMap = createParentRouteScreenMap(paths, '_layout');\n\n      // Pages in granite-module directory are mapped to their layout\n      expect(layoutMap.get('./granite-module/test')?.path).toBe('./granite-module/_layout');\n\n      // Pages in about directory are mapped to their layout\n      expect(layoutMap.get('./about')?.path).toBe('./about/_layout');\n      expect(layoutMap.get('./about/test')?.path).toBe('./about/_layout');\n\n      // Pages without layout are undefined\n      expect(layoutMap.get('./image')).toBeUndefined();\n\n      // Layout files are not mapped because there's no layout at the root\n      expect(layoutMap.get('./granite-module/_layout')).toBeUndefined();\n      expect(layoutMap.get('./about/_layout')).toBeUndefined();\n    });\n\n    it('If there is a root layout, pages without layout are mapped to the root layout', () => {\n      const paths: RouteScreen[] = [\n        { path: './_layout', component: () => null },\n        { path: './image', component: () => null },\n        { path: './granite-module/_layout', component: () => null },\n        { path: './granite-module/test', component: () => null },\n        { path: './about/_layout', component: () => null },\n        { path: './about', component: () => null },\n        { path: './about/test', component: () => null },\n      ];\n\n      const layoutMap = createParentRouteScreenMap(paths, '_layout');\n\n      // Pages in each directory are mapped to their layout\n      expect(layoutMap.get('./granite-module/test')?.path).toBe('./granite-module/_layout');\n      expect(layoutMap.get('./about')?.path).toBe('./about/_layout');\n      expect(layoutMap.get('./about/test')?.path).toBe('./about/_layout');\n\n      // Pages without layout are mapped to root layout\n      expect(layoutMap.get('./image')?.path).toBe('./_layout');\n      expect(layoutMap.get('./_layout')).toBeUndefined();\n      expect(layoutMap.get('./granite-module/_layout')?.path).toBe('./_layout');\n      expect(layoutMap.get('./about/_layout')?.path).toBe('./_layout');\n    });\n\n    it('Layout mapping works correctly in nested directory structure', () => {\n      const paths: RouteScreen[] = [\n        { path: './nested', component: () => null },\n        { path: './nested/_layout', component: () => null },\n        { path: './nested/test', component: () => null },\n      ];\n\n      const layoutMap = createParentRouteScreenMap(paths, '_layout');\n\n      // nested is mapped to nested/_layout\n      expect(layoutMap.get('./nested')?.path).toBe('./nested/_layout');\n\n      // nested/test is mapped to nested/_layout\n      expect(layoutMap.get('./nested/test')?.path).toBe('./nested/_layout');\n\n      expect(layoutMap.get('./nested/_layout')?.path).toBeUndefined();\n    });\n\n    it('Layout mapping works correctly in double nested directory structure', () => {\n      const paths: RouteScreen[] = [\n        { path: './nested/_layout', component: () => null },\n        { path: './nested/test', component: () => null },\n        { path: './nested/deep/_layout', component: () => null },\n        { path: './nested/deep/test', component: () => null },\n      ];\n\n      const layoutMap = createParentRouteScreenMap(paths, '_layout');\n\n      // nested/test is mapped to nested/_layout\n      expect(layoutMap.get('./nested/test')?.path).toBe('./nested/_layout');\n\n      // nested/deep/test is mapped to nested/deep/_layout\n      expect(layoutMap.get('./nested/deep/test')?.path).toBe('./nested/deep/_layout');\n\n      // nested/deep/_layout is mapped to nested/_layout\n      expect(layoutMap.get('./nested/deep/_layout')?.path).toBe('./nested/_layout');\n\n      // nested/_layout is not mapped\n      expect(layoutMap.get('./nested/_layout')?.path).toBeUndefined();\n    });\n\n    it('Layout mapping works correctly in triple nested directory structure', () => {\n      const paths: RouteScreen[] = [\n        { path: './nested/_layout', component: () => null },\n        { path: './nested/test', component: () => null },\n        { path: './nested/deep/_layout', component: () => null },\n        { path: './nested/deep/test', component: () => null },\n        { path: './nested/deep/deeper/_layout', component: () => null },\n        { path: './nested/deep/deeper/test', component: () => null },\n      ];\n\n      const layoutMap = createParentRouteScreenMap(paths, '_layout');\n\n      // nested/test is mapped to nested/_layout\n      expect(layoutMap.get('./nested/test')?.path).toBe('./nested/_layout');\n\n      // nested/deep/test is mapped to nested/deep/_layout\n      expect(layoutMap.get('./nested/deep/test')?.path).toBe('./nested/deep/_layout');\n\n      // nested/deep/deeper/test is mapped to nested/deep/deeper/_layout\n      expect(layoutMap.get('./nested/deep/deeper/test')?.path).toBe('./nested/deep/deeper/_layout');\n\n      // nested/deep/deeper/_layout is mapped to nested/deep/_layout\n      expect(layoutMap.get('./nested/deep/deeper/_layout')?.path).toBe('./nested/deep/_layout');\n\n      // nested/deep/_layout is mapped to nested/_layout\n      expect(layoutMap.get('./nested/deep/_layout')?.path).toBe('./nested/_layout');\n\n      // nested/_layout is not mapped\n      expect(layoutMap.get('./nested/_layout')?.path).toBeUndefined();\n    });\n  });\n\n  describe('When there are no layouts', () => {\n    it('All pages are mapped to undefined', () => {\n      const paths: RouteScreen[] = [\n        { path: './page1', component: () => null },\n        { path: './page2', component: () => null },\n        { path: './nested/page3', component: () => null },\n        { path: './nested/deep/page4', component: () => null },\n      ];\n\n      const layoutMap = createParentRouteScreenMap(paths, '_layout');\n\n      // All pages are undefined\n      expect(layoutMap.get('./page1')).toBeUndefined();\n      expect(layoutMap.get('./page2')).toBeUndefined();\n      expect(layoutMap.get('./nested/page3')).toBeUndefined();\n      expect(layoutMap.get('./nested/deep/page4')).toBeUndefined();\n    });\n  });\n\n  it('Nested _layout is mapped to parent _layout', () => {\n    const paths: RouteScreen[] = [\n      { path: './_layout', component: () => null },\n      { path: './nested/_layout', component: () => null },\n      { path: './nested/test', component: () => null },\n      { path: './nested/deep/_layout', component: () => null },\n      { path: './nested/deep/test', component: () => null },\n    ];\n\n    const layoutMap = createParentRouteScreenMap(paths, '_layout');\n    expect(layoutMap.get('./nested/deep/test')?.path).toBe('./nested/deep/_layout');\n    expect(layoutMap.get('./nested/deep/_layout')?.path).toBe('./nested/_layout');\n    expect(layoutMap.get('./nested/_layout')?.path).toBe('./_layout');\n    expect(layoutMap.get('./_layout')?.path).toBeUndefined();\n  });\n});\n"
  },
  {
    "path": "packages/react-native/src/router/utils/createParentRouteScreenMap.ts",
    "content": "import { getFileNameFromPath } from './path';\nimport type { RouteScreen } from '../types/RouteScreen';\n\n/**\n * Extracts only the directory path from a given file path\n * Example) './about/test' -> './about'\n * Example) './about'     -> '.' (default logic)\n *  but... For testing, if the path is included in 'layoutDirs', return as is\n */\nfunction getDirectoryPath(filePath: string, layoutDirs: Set<string>): string {\n  // If included in layoutDirs, this path itself is a directory-based route\n  if (layoutDirs.has(filePath)) {\n    return filePath;\n  }\n\n  const lastSlashIndex = filePath.lastIndexOf('/');\n  if (lastSlashIndex === -1) {\n    // If there's no slash, treat as '.'\n    return '.';\n  }\n  const dirPath = filePath.substring(0, lastSlashIndex);\n  return dirPath === '' ? '.' : dirPath;\n}\n\n/**\n * Get parent directory path\n * Example) './nested/deep' -> './nested'\n * Example) './nested' -> '.'\n * Example) '.' -> '' (no more parent)\n */\nfunction getParentDirectory(dirPath: string): string {\n  if (dirPath === '.' || dirPath === '') {\n    return '';\n  }\n  const idx = dirPath.lastIndexOf('/');\n  if (idx === -1) {\n    return '.';\n  }\n  const parent = dirPath.substring(0, idx);\n  return parent === '' ? '.' : parent;\n}\n\n/**\n * @name createParentRouteScreenMap\n * @description\n *   Finds a specific keyword in a given list of files and\n *   maps each page/layout to use its \"nearest parent layout\"\n */\nexport function createParentRouteScreenMap(routeScreens: RouteScreen[], keyword: string): Map<string, RouteScreen> {\n  // 1) Find keyword files and record their directories in layoutDirs set\n  //    Example) \"./about/[keyword]\" -> layoutDirs.add(\"./about\")\n  const layoutDirs = new Set<string>();\n  const layoutScreens = new Map<string, RouteScreen>();\n\n  for (const screen of routeScreens) {\n    const fileName = getFileNameFromPath(screen.path, { withExtension: false });\n    if (fileName === keyword) {\n      const dirPath = screen.path.substring(0, screen.path.lastIndexOf('/'));\n      layoutDirs.add(dirPath || '.'); // Store directory path like './about'\n    }\n  }\n\n  // 2) Create layoutScreens (directory->keyword file) mapping\n  for (const screen of routeScreens) {\n    const fileName = getFileNameFromPath(screen.path, { withExtension: false });\n    if (fileName === keyword) {\n      // The directory this keyword file belongs to is already in layoutDirs\n      // dirPath: './about', './nested', etc.\n      const dirPath = getDirectoryPath(screen.path, layoutDirs);\n      layoutScreens.set(dirPath, screen);\n    }\n  }\n\n  /**\n   * 3) Function to find the nearest layout by traversing up parent directories\n   *    - skipSameDir: whether to check from own directory or from parent\n   *\n   *    memo: (dirPath + '|' + skipSameDir) -> RouteScreen | undefined\n   */\n  const memo = new Map<string, RouteScreen | undefined>();\n\n  function findNearestLayout(dir: string, skipSameDir = false): RouteScreen | undefined {\n    const cacheKey = dir + '|' + skipSameDir;\n    if (memo.has(cacheKey)) {\n      return memo.get(cacheKey);\n    }\n\n    let current = dir;\n\n    if (skipSameDir) {\n      current = getParentDirectory(current);\n    }\n\n    while (current) {\n      if (layoutScreens.has(current)) {\n        const foundLayout = layoutScreens.get(current);\n        memo.set(cacheKey, foundLayout);\n        return foundLayout;\n      }\n      if (current === '.' || current === '') {\n        break;\n      }\n      current = getParentDirectory(current);\n    }\n\n    memo.set(cacheKey, undefined);\n    return undefined;\n  }\n\n  // 4) Finally create \"path -> parent layout\" mapping\n  const parentRouteScreenMap = new Map<string, RouteScreen>();\n\n  for (const screen of routeScreens) {\n    const fileName = getFileNameFromPath(screen.path, { withExtension: false });\n\n    // Get the \"directory\" this file (or directory) belongs to\n    const dirPath = getDirectoryPath(screen.path, layoutDirs);\n\n    if (fileName === keyword) {\n      // (1) If this is a keyword file, search for layout in \"parent directory\"\n      //     => must skip self (skipSameDir=true)\n      const parentLayout = findNearestLayout(dirPath, true);\n      if (parentLayout) {\n        parentRouteScreenMap.set(screen.path, parentLayout);\n      }\n    } else {\n      // (2) If it's a regular page (or regular file), search for layout from own directory up\n      const nearestLayout = findNearestLayout(dirPath, false);\n      if (nearestLayout) {\n        parentRouteScreenMap.set(screen.path, nearestLayout);\n      }\n    }\n  }\n\n  return parentRouteScreenMap;\n}\n"
  },
  {
    "path": "packages/react-native/src/router/utils/defaultParserParams.spec.ts",
    "content": "import { describe, it, expect } from 'vitest';\nimport { defaultParserParams } from './defaultParserParams';\n\ndescribe('defaultParserParams', () => {\n  it('Parses numeric and boolean values from strings', () => {\n    const result = defaultParserParams({ foo: '123', bar: 'true' });\n    expect(result).toEqual({\n      foo: 123,\n      bar: true,\n    });\n  });\n\n  it('Parses parameters in query string format', () => {\n    const result = defaultParserParams({ foo: '123', bar: 'true' });\n    expect(result).toEqual({\n      foo: 123,\n      bar: true,\n    });\n  });\n\n  it('Maintains original value for unparseable strings', () => {\n    const result = defaultParserParams({ name: 'john', age: 'invalid' });\n    expect(result).toEqual({\n      name: 'john',\n      age: 'invalid',\n    });\n  });\n\n  it('Parses JSON format arrays', () => {\n    const result = defaultParserParams({ numbers: '[1,2,3]', strings: '[\"a\",\"b\"]' });\n    expect(result).toEqual({\n      numbers: [1, 2, 3],\n      strings: ['a', 'b'],\n    });\n  });\n\n  it('Parses JSON format objects', () => {\n    const result = defaultParserParams({ user: '{\"name\":\"john\",\"age\":30}' });\n    expect(result).toEqual({\n      user: {\n        name: 'john',\n        age: 30,\n      },\n    });\n  });\n});\n"
  },
  {
    "path": "packages/react-native/src/router/utils/defaultParserParams.ts",
    "content": "/**\n * Parses URL query string and converts it to an object.\n * @param params - Query string to parse\n * @returns Parsed query object\n * @example\n * // Input: { foo: '123', bar: 'true' }\n * // Output: { foo: 123, bar: true }\n */\nexport function defaultParserParams(params?: Record<string, string>): Record<string, unknown> {\n  return Object.fromEntries(\n    Object.entries(params ?? {}).map(([key, value]) => {\n      try {\n        return [key, JSON.parse(value)];\n      } catch {\n        return [key, value];\n      }\n    })\n  );\n}\n"
  },
  {
    "path": "packages/react-native/src/router/utils/index.ts",
    "content": "export * from './screen';\nexport * from './defaultParserParams';\n"
  },
  {
    "path": "packages/react-native/src/router/utils/matchers.ts",
    "content": "/** `[page]` -> `page` */\nexport function matchDynamicName(name: string): string | undefined {\n  // eslint-disable-next-line no-useless-escape\n  return name.match(/^\\[([^[\\](?:\\.\\.\\.)]+?)\\]$/)?.[1];\n}\n"
  },
  {
    "path": "packages/react-native/src/router/utils/mergeParentLayoutScreen.spec.tsx",
    "content": "import { render } from '@testing-library/react';\nimport { ReactNode } from 'react';\nimport { it, describe, expect } from 'vitest';\nimport { Screen } from '..';\nimport { mergeParentLayoutScreen } from './mergeParentLayoutScreen';\nimport { RouteScreen } from '../types/RouteScreen';\n\ndeclare global {\n  interface HTMLElement {\n    innerHTML: string;\n  }\n}\n\nfunction ItemLayout({ children }: { children: ReactNode }) {\n  return <div id=\"item-layout\">{children}</div>;\n}\n\nfunction RootLayout({ children }: { children: ReactNode }) {\n  return <div id=\"root-layout\">{children}</div>;\n}\n\nfunction SubItemLayout({ children }: { children: ReactNode }) {\n  return <div id=\"sub-item-layout\">{children}</div>;\n}\n\ndescribe('mergeParentLayoutScreen', () => {\n  it('Parent layout and child layout should be nested in the correct order', () => {\n    const map = new Map<string, RouteScreen>();\n\n    map.set('./item/detail', {\n      component: ItemLayout as Screen,\n      path: './item/_layout',\n    });\n\n    map.set('./item/_layout', {\n      component: RootLayout as Screen,\n      path: './_layout',\n    });\n\n    const MergedLayout = mergeParentLayoutScreen(map, './item/detail');\n\n    const { container } = render(<MergedLayout>item detail</MergedLayout>);\n\n    // Should be nested in order: RootLayout > ItemLayout > content\n    expect(container.innerHTML).toBe(\n      render(\n        <div id=\"root-layout\">\n          <div id=\"item-layout\">item detail</div>\n        </div>\n      ).container.innerHTML\n    );\n  });\n\n  it('Triple nested layout should render in the correct order', () => {\n    const map = new Map<string, RouteScreen>();\n\n    map.set('./item/detail/sub', {\n      component: SubItemLayout as Screen,\n      path: './item/detail/_layout',\n    });\n\n    map.set('./item/detail/_layout', {\n      component: ItemLayout as Screen,\n      path: './item/_layout',\n    });\n\n    map.set('./item/_layout', {\n      component: RootLayout as Screen,\n      path: './_layout',\n    });\n\n    const MergedLayout = mergeParentLayoutScreen(map, './item/detail/sub');\n\n    const { container } = render(<MergedLayout>sub item detail</MergedLayout>);\n\n    // Should be nested in order: RootLayout > ItemLayout > SubItemLayout > content\n    expect(container.innerHTML).toBe(\n      render(\n        <div id=\"root-layout\">\n          <div id=\"item-layout\">\n            <div id=\"sub-item-layout\">sub item detail</div>\n          </div>\n        </div>\n      ).container.innerHTML\n    );\n  });\n\n  it('Single layout should render correctly', () => {\n    const map = new Map<string, RouteScreen>();\n\n    map.set('./item/detail', {\n      component: RootLayout as Screen,\n      path: './_layout',\n    });\n\n    const MergedLayout = mergeParentLayoutScreen(map, './item/detail');\n\n    const { container } = render(<MergedLayout>item detail</MergedLayout>);\n\n    expect(container.innerHTML).toBe(render(<div id=\"root-layout\">item detail</div>).container.innerHTML);\n  });\n\n  it('Should render only content when no layout is defined', () => {\n    const map = new Map<string, RouteScreen>();\n\n    const MergedLayout = mergeParentLayoutScreen(map, './item/detail');\n\n    const { container } = render(<MergedLayout>item detail</MergedLayout>);\n\n    expect(container.innerHTML).toBe(render(<>item detail</>).container.innerHTML);\n  });\n});\n"
  },
  {
    "path": "packages/react-native/src/router/utils/mergeParentLayoutScreen.tsx",
    "content": "import { FC, ReactNode } from 'react';\nimport { RouteScreen } from '../types/RouteScreen';\n\nexport type LayoutScreen = FC<{ children: ReactNode }>;\n\n/**\n * Starting from the layout mapped to a specific path, traverses up to parent layouts,\n * creates an array in the order of \"innermost → outermost\",\n * then builds up the final wrapper component using reduce.\n *\n * Example) map:\n *   './item/detail' => { component: ItemLayout, path: './item/_layout' }\n *   './item/_layout' => { component: RootLayout, path: './_layout' }\n *\n * => layoutChain = [ItemLayout, RootLayout]\n * => Final rendering result: <RootLayout><ItemLayout>children</ItemLayout></RootLayout>\n */\nexport function mergeParentLayoutScreen(screens: Map<string, RouteScreen>, path: string): LayoutScreen {\n  // Final wrapper component\n  let MergedLayout: FC<{ children?: ReactNode }> = ({ children }) => <>{children}</>;\n\n  let currentPath: string | undefined = path;\n  while (currentPath) {\n    const routeScreen = screens.get(currentPath);\n    if (!routeScreen) {\n      break;\n    }\n\n    // Wrap with immediate parent wrapper\n    const LayoutScreen = routeScreen.component as LayoutScreen;\n    const ChildLayout = MergedLayout;\n    MergedLayout = ({ children }) => (\n      <LayoutScreen>\n        <ChildLayout>{children}</ChildLayout>\n      </LayoutScreen>\n    );\n\n    // Move to parent path\n    currentPath = routeScreen.path;\n  }\n\n  return MergedLayout;\n}\n"
  },
  {
    "path": "packages/react-native/src/router/utils/path.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport {\n  excludeDynamicNamePattern,\n  excludeFileExtension,\n  excludeRelativePath,\n  getFileNameFromPath,\n  getRoutePath,\n} from './path';\n\ndescribe('excludeFileExtension', () => {\n  it('\"./index.ts\" is changed to \"./index\"', () => {\n    expect(excludeFileExtension('./index.ts')).toEqual('./index');\n  });\n\n  it('\"./index.js\" is changed to \"./index\"', () => {\n    expect(excludeFileExtension('./index.js')).toEqual('./index');\n  });\n\n  it('\"./list/detail.tsx\" is changed to \"./list/detail\"', () => {\n    expect(excludeFileExtension('./list/detail.tsx')).toEqual('./list/detail');\n  });\n\n  it('\"./list/detail.jsx\" is changed to \"./list/detail\"', () => {\n    expect(excludeFileExtension('./list/detail.jsx')).toEqual('./list/detail');\n  });\n\n  it('\"./detail.foo\" remains as \"./detail.foo\"', () => {\n    expect(excludeFileExtension('./detail.foo')).toEqual('./detail.foo');\n  });\n});\n\ndescribe('excludeRelativePath', () => {\n  it('\"./index.tsx\" is changed to \"index.tsx\"', () => {\n    expect(excludeRelativePath('./index.tsx')).toEqual('index.tsx');\n  });\n\n  it('\"./../index.tsx\" is changed to \"index.tsx\"', () => {\n    expect(excludeRelativePath('./../index.tsx')).toEqual('index.tsx');\n  });\n\n  it('\"../../index.tsx\" is changed to \"index.tsx\"', () => {\n    expect(excludeRelativePath('../../index.tsx')).toEqual('index.tsx');\n  });\n});\n\ndescribe('excludeDynamicNamePattern', () => {\n  it('\"[id]\" is changed to \"id\"', () => {\n    expect(excludeDynamicNamePattern('[id]')).toEqual('id');\n  });\n\n  it('\"[id]/[name]\" is changed to \"id/name\"', () => {\n    expect(excludeDynamicNamePattern('[id]/[name]')).toEqual('id/name');\n  });\n});\n\ndescribe('getRoutePath', () => {\n  describe('posix', () => {\n    it('\"/index.tsx\" is converted to \"/\"', () => {\n      expect(getRoutePath('/index.tsx')).toEqual('/');\n    });\n\n    it('\"/index.ts\" is converted to \"/\"', () => {\n      expect(getRoutePath('/index.tsx')).toEqual('/');\n    });\n\n    it('\"/list/index.tsx\" is converted to \"/list\"', () => {\n      expect(getRoutePath('/list/index.tsx')).toEqual('/list');\n    });\n\n    it('\"/list/detail.tsx\" is converted to \"/list\"', () => {\n      expect(getRoutePath('/list/detail.tsx')).toEqual('/list/detail');\n    });\n\n    it('\"/list/[id].tsx\" is converted to \"/:id\"', () => {\n      expect(getRoutePath('/list/[id].tsx')).toEqual('/list/:id');\n    });\n\n    it('\"/list/[id].js\" is converted to \"/:id\"', () => {\n      expect(getRoutePath('/list/[id].js')).toEqual('/list/:id');\n    });\n  });\n\n  describe('window', () => {\n    it('\"\\\\index.tsx\" is converted to \"/\"', () => {\n      expect(getRoutePath('\\\\index.tsx')).toEqual('/');\n    });\n\n    it('\"\\\\index.ts\" is converted to \"/\"', () => {\n      expect(getRoutePath('\\\\index.tsx')).toEqual('/');\n    });\n\n    it('\"\\\\list\\\\index.tsx\" is converted to \"/list\"', () => {\n      expect(getRoutePath('\\\\list\\\\index.tsx')).toEqual('/list');\n    });\n\n    it('\"\\\\list\\\\detail.tsx\" is converted to \"/list\"', () => {\n      expect(getRoutePath('\\\\list\\\\detail.tsx')).toEqual('/list/detail');\n    });\n\n    it('\"\\\\list\\\\[id].tsx\" is converted to \"/:id\"', () => {\n      expect(getRoutePath('\\\\list\\\\[id].tsx')).toEqual('/list/:id');\n    });\n\n    it('\"\\\\list\\\\[id].js\" is converted to \"/:id\"', () => {\n      expect(getRoutePath('\\\\list\\\\[id].js')).toEqual('/list/:id');\n    });\n  });\n});\n\ndescribe('getFileNameFromPath', () => {\n  it('extracts filename from file path', () => {\n    const result = getFileNameFromPath('/path/to/file.txt');\n    expect(result).toBe('file.txt');\n  });\n\n  it('returns the filename when path is just a filename', () => {\n    const result = getFileNameFromPath('file.txt');\n    expect(result).toBe('file.txt');\n  });\n\n  it('returns empty string when path is empty', () => {\n    const result = getFileNameFromPath('');\n    expect(result).toBe('');\n  });\n\n  it('returns empty string when path ends with slash', () => {\n    const result = getFileNameFromPath('/path/to/directory/');\n    expect(result).toBe('');\n  });\n\n  it('extracts filename without extension using withExtension option', () => {\n    const result = getFileNameFromPath('/path/to/file.txt', { withExtension: false });\n    expect(result).toBe('file');\n  });\n});\n"
  },
  {
    "path": "packages/react-native/src/router/utils/path.ts",
    "content": "import { matchDynamicName } from './matchers';\n\n/**\n * Converts Windows-style paths to Posix-based paths.\n *\n * @example\n * ```ts\n * toPosixBasedPath(\".\\\\index.tsx\") // \"./index.tsx\"\n * toPosixBasedPath(\"..\\\\..\\\\index.tsx\") // \"../../index.tsx\"\n * ```\n */\nfunction toPosixBasedPath(filePath: string): string {\n  return filePath.replace(/\\\\/g, '/');\n}\n\n/**\n * @name excludeFileExtension\n * @description Removes file extension.\n */\nexport function excludeFileExtension(name: string): string {\n  return name.replace(/\\.(tsx|jsx|ts|js)$/g, '');\n}\n\n/**\n * @name excludeRelativePath\n * @description Removes relative path from path.\n * @example\n * ```ts\n * excludeRelativePath(\"./index.tsx\") // \"index.tsx\"\n * excludeRelativePath(\"./list/detail.tsx\") // \"list/detail.tsx\"\n * excludeRelativePath(\"../../index.tsx\") // \"index.tsx\"\n * ```\n */\nexport function excludeRelativePath(filePath: string): string {\n  return filePath.replace(/^(?:\\.\\.?\\/)+/g, '');\n}\n\n/**\n * @name excludeDynamicNamePattern\n * @description Removes `[` `]` from dynamic route pattern.\n * @example\n * ```ts\n * excludeDynamicNamePattern(\"[id]\") // \"id\"\n * excludeDynamicNamePattern(\"[id]/[name]\") // \"id/name\"\n * ```\n */\nexport function excludeDynamicNamePattern(filePath: string): string {\n  return filePath.replace(/\\[|\\]/g, '');\n}\n\n/**\n * @name getRoutePath\n * @description Converts to route path.\n * @example\n * ```ts\n * getRoutePath('./index.tsx') // \"/\"\n * getRoutePath('./list/index.tsx') // \"/list\"\n * getRoutePath('./list/detail.tsx') // \"/list/detail\"\n * getRoutePath('./list/[id].js') // \"/list/:id\"\n * ```\n */\nexport function getRoutePath(filePath: string): string {\n  const posixBasedPath = toPosixBasedPath(filePath);\n  const normalPath = excludeRelativePath(excludeFileExtension(posixBasedPath));\n\n  const routePath = normalPath\n    .split('/')\n    .map((segment) => {\n      if (segment === 'index') {\n        return '';\n      }\n\n      if (matchDynamicName(segment)) {\n        return `:${excludeDynamicNamePattern(segment)}`;\n      }\n\n      return segment;\n    })\n    .filter((segment) => segment.length > 0)\n    .join('/');\n\n  return '/' + routePath;\n}\n\n/**\n * @name getFileNameFromPath\n * @description Extracts filename from file path.\n * @example\n * ```ts\n * getFileNameFromPath('/path/to/file.txt') // \"file.txt\"\n * getFileNameFromPath('file.txt') // \"file.txt\"\n * getFileNameFromPath('') // \"\"\n * getFileNameFromPath('/path/to/directory/') // \"\"\n * getFileNameFromPath('/path/to/file.txt', { withExtension: false }) // \"file\"\n * ```\n */\nexport function getFileNameFromPath(\n  filePath: string,\n  options: { withExtension?: boolean } = {\n    withExtension: true,\n  }\n): string {\n  const fileName = filePath.split('/').pop() || '';\n  return options.withExtension ? fileName : fileName.replace(/\\.[^.]+$/g, '');\n}\n"
  },
  {
    "path": "packages/react-native/src/router/utils/screen.tsx",
    "content": "import { getRoutePath } from './path';\nimport { routeMap } from '../createRoute';\nimport { RequireContext, RouteScreen } from '../types';\nimport { validateRouteParams } from './validateRouteParams';\n\n/**\n * @kind function\n * @name getRouteScreens\n * @description\n * Gets screens from the pages folder.\n *\n * @param {RequireContext} context - Object containing information about screens in Router\n * @returns {RouteScreen[]} screens - Returns a list of screens that can be navigated to.\n *\n * @example\n * ```tsx\n * import { getRouteScreens } from '@granite-js/react-native';\n *\n * const context = require.context('../pages');\n * const screens = getRouteScreens(context);\n * ```\n */\nexport function getRouteScreens(context: RequireContext): RouteScreen[] {\n  const screens = context.keys().map((key) => {\n    const path = getRoutePath(key);\n\n    /**\n     * Keep export default option for backward compatibility.\n     * If migrated to type-safe, only export Route will be needed.\n     */\n    const component = context(key)?.default ?? routeMap.get(context(key)?.Route?._path)?.component;\n\n    if (component == null) {\n      throw new Error(`Page component not found in ${key}.`);\n    }\n\n    // Retrieve route configuration from routeMap\n    const routeMapEntry = routeMap.get(context(key)?.Route?._path);\n    const errorComponent = routeMapEntry?.errorComponent;\n\n    // Get screenOptions from routeMap or component (routeMap takes priority)\n    const rawScreenOptions = routeMapEntry?.screenOptions ?? component.screenOptions;\n\n    // If screenOptions is a function, wrap it to apply parserParams and validateParams\n    const screenOptions =\n      typeof rawScreenOptions === 'function'\n        ? ({ route }: { route: { params?: Record<string, unknown> }; navigation: unknown }) => {\n            const rawParams = route.params ?? {};\n            const parserParams = routeMapEntry?.options?.parserParams;\n            const validateParams = routeMapEntry?.options?.validateParams;\n\n            // Apply parserParams if available\n            const parsedParams = parserParams ? parserParams(rawParams) : rawParams;\n\n            // Apply validateParams if available\n            try {\n              const validatedParams = validateParams ? validateRouteParams(validateParams, parsedParams) : parsedParams;\n              return rawScreenOptions({ params: validatedParams });\n            } catch {\n              return rawScreenOptions({ params: { _error: true } });\n            }\n          }\n        : rawScreenOptions;\n\n    return {\n      path,\n      component,\n      errorComponent,\n      screenOptions,\n    };\n  });\n\n  return screens;\n}\n\n/**\n * @kind function\n * @name getScreenPathMapConfig\n * @description Maps paths of screens.\n *\n * @param {RouteScreen[]} routeScreens - List of screens that can be navigated to\n */\nexport function getScreenPathMapConfig(routeScreens: RouteScreen[]) {\n  const screensConfig: ScreenPath = {};\n\n  routeScreens.forEach((routeScreen) => {\n    const routePath = routeScreen.path;\n\n    if (screensConfig[routePath] != null) {\n      throw new Error(`${routePath} is already registered. Please check for duplicate paths.`);\n    }\n\n    screensConfig[routePath] = {\n      path: routePath,\n    };\n  });\n\n  // @see https://reactnavigation.org/docs/configuring-links/#matching-exact-paths\n  // This is a mapping for the root path ('/') for deep link handling.\n  // Example: To handle URLs like scheme://{service_name}?name=John,\n  // map the root path to an empty string to correctly extract query parameters.\n  screensConfig['/'] = {\n    path: '',\n  };\n\n  const notFoundPage = routeScreens.find((screen) => screen.path === '/_404');\n\n  if (notFoundPage == null) {\n    throw new Error('404 page not found. Please create a `_404.ts` or `_404.tsx` file in the `pages/*` folder.');\n  }\n\n  // https://reactnavigation.org/docs/configuring-links/#handling-unmatched-routes-or-404\n  screensConfig['/_404'] = {\n    path: '*',\n  };\n\n  return screensConfig;\n}\n\n/**\n * @name ScreenPath\n * @description\n * Type representing screen paths.\n *\n * @typedef {Record<string, { path?: string }>} ScreenPath\n */\nexport type ScreenPath = Record<\n  string,\n  {\n    path?: string;\n  }\n>;\n"
  },
  {
    "path": "packages/react-native/src/router/utils/standardSchema.ts",
    "content": "import type { StandardSchemaV1 } from '@standard-schema/spec';\n\n/**\n * Type guard to check if a value is a StandardSchema v1 compliant schema\n */\nexport function isStandardSchema(value: unknown): value is StandardSchemaV1 {\n  return typeof value === 'object' && value !== null && '~standard' in value;\n}\n\n/**\n * Infer the output type from a StandardSchema\n */\nexport type InferOutput<TSchema> = TSchema extends StandardSchemaV1<any, infer Output> ? Output : never;\n\n/**\n * Infer the input type from a StandardSchema\n */\nexport type InferInput<TSchema> = TSchema extends StandardSchemaV1<infer Input, any> ? Input : never;\n"
  },
  {
    "path": "packages/react-native/src/router/utils/validateRouteParams.ts",
    "content": "import type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { isStandardSchema } from './standardSchema';\n\n/**\n * Validates route parameters using either a StandardSchema or a validation function.\n *\n * @param validateParams - The validation schema or function to apply\n * @param parsedParams - The parsed parameters to validate\n * @returns The validated parameters\n * @throws Error if validation fails or async validation is attempted\n */\nexport function validateRouteParams(\n  validateParams: ((params: Readonly<object | undefined>) => any) | StandardSchemaV1<any, any>,\n  parsedParams: Readonly<object | undefined>\n): any {\n  // Check if validateParams is a StandardSchema\n  if (isStandardSchema(validateParams)) {\n    const result = validateParams['~standard'].validate(parsedParams);\n\n    // Handle async results\n    if (result instanceof Promise) {\n      throw new Error('Async validation is not supported');\n    }\n\n    // Handle validation failures\n    if ('issues' in result && result.issues) {\n      const messages = result.issues.map((i) => i.message).join(', ');\n      throw new Error(`Parameter validation failed: ${messages}`);\n    }\n\n    return result.value;\n  }\n\n  // Function pattern\n  if (typeof validateParams === 'function') {\n    return validateParams(parsedParams);\n  }\n\n  return parsedParams;\n}\n"
  },
  {
    "path": "packages/react-native/src/scroll-view-inertial-background/ScrollViewInertialBackground.tsx",
    "content": "import type { ComponentProps } from 'react';\nimport { useWindowDimensions, View } from 'react-native';\n\ninterface ScrollViewInertialBackgroundProps {\n  topColor?: string;\n  bottomColor?: string;\n  spacer?: number;\n}\n\n/**\n * @public\n * @category UI\n * @name ScrollViewInertialBackground\n * @description\n * Adds background colors to the top and bottom spaces of iOS `ScrollView` content to provide a natural visual effect when scrolling.\n * In iOS, when scrolling reaches the end, a slight bouncing effect occurs, known as the [Bounce effect](https://medium.com/@wcandillon/ios-bounce-list-effect-with-react-native-5102e3a83999). Setting background colors in the spaces above and below the content can provide a more consistent user experience.\n *\n * @param {object} [props] - `props` object passed to the component.\n * @param {string} [props.topColor] - Background color to apply to the top area of the scroll. Default is `adaptive.background` which is automatically applied based on the system theme.\n * @param {string} [props.bottomColor] - Background color to apply to the bottom area of the scroll. Default is `adaptive.background` which is automatically applied based on the system theme.\n * @param {number} [props.spacer] - Specifies the size of the space between the top and bottom areas where the background color is applied. Default uses the screen height obtained from [`useWindowDimensions`](https://reactnative.dev/docs/next/usewindowdimensions).\n *\n * @example\n *\n * ### Adding background colors to the top and bottom of a scroll view\n *\n * Adds red background color to the top and blue to the bottom of the scroll view. The background color is applied to areas outside the scroll.\n *\n * ```tsx\n * import { ScrollView, View, Text } from 'react-native';\n * import { ScrollViewInertialBackground } from '@granite-js/react-native';\n *\n * const dummies = Array.from({ length: 20 }, (_, i) => i);\n *\n * export function InertialBackgroundExample() {\n *   return (\n *     <ScrollView>\n *       <ScrollViewInertialBackground topColor=\"red\" bottomColor=\"blue\" />\n *       {dummies.map((i) => (\n *         <View\n *           key={`dummy-${i}`}\n *           style={{ width: '100%', height: 100, borderBottomColor: 'black', borderBottomWidth: 1 }}\n *         >\n *           <Text>Try scrolling.</Text>\n *         </View>\n *       ))}\n *     </ScrollView>\n *   );\n * }\n * ```\n */\nexport function ScrollViewInertialBackground({\n  topColor,\n  bottomColor,\n  spacer: _spacer,\n}: ScrollViewInertialBackgroundProps) {\n  const windowHeight = useWindowDimensions().height;\n\n  const spacer = _spacer ?? windowHeight;\n  const topBackgroundColor = topColor ?? DEFAULT_BACKGROUND_COLOR;\n  const bottomBackgroundColor = bottomColor ?? DEFAULT_BACKGROUND_COLOR;\n\n  return (\n    <>\n      <HiddenView\n        style={{\n          height: spacer,\n          top: -spacer,\n          backgroundColor: topBackgroundColor,\n        }}\n      />\n      <HiddenView\n        style={{\n          height: spacer,\n          /** Reduces by the CTA GradientHeight area. */\n          bottom: -spacer + GRADIENT_HEIGHT,\n          backgroundColor: bottomBackgroundColor,\n        }}\n      />\n    </>\n  );\n}\n\nfunction HiddenView({ style, pointerEvents = 'none', ...props }: ComponentProps<typeof View>) {\n  return (\n    <View\n      pointerEvents={pointerEvents}\n      style={[{ position: 'absolute', width: '100%', zIndex: -1, left: 0, right: 0 }, style]}\n      {...props}\n    />\n  );\n}\n\n/**\n * FIXME:\n * Gradient value for BottomCTA. Set as a fixed value to avoid peerDeps.\n */\nconst GRADIENT_HEIGHT = 37;\nconst DEFAULT_BACKGROUND_COLOR = 'transparent';\n"
  },
  {
    "path": "packages/react-native/src/scroll-view-inertial-background/index.ts",
    "content": "export * from './ScrollViewInertialBackground';\n"
  },
  {
    "path": "packages/react-native/src/status-bar/StatusBar.android.tsx",
    "content": "import { useLayoutEffect } from 'react';\nimport { StatusBar as BaseStatusBar, useColorScheme } from 'react-native';\nimport type { StatusBarProps } from './types';\nimport { toStatusBarContentStyle } from './utils';\n\nexport function StatusBar({ style, animated, hidden, backgroundColor, translucent = true }: StatusBarProps) {\n  const colorScheme = useColorScheme() ?? 'light';\n  const translucentWithNoBackgroundColor = translucent && backgroundColor == null;\n\n  return (\n    <BaseStatusBar\n      translucent={translucent}\n      barStyle={toStatusBarContentStyle(style, colorScheme)}\n      backgroundColor={translucentWithNoBackgroundColor ? 'transparent' : backgroundColor}\n      animated={animated}\n      hidden={hidden}\n    />\n  );\n}\n\nexport function useStatusBar({ style, animated, hidden, backgroundColor, translucent = true }: StatusBarProps) {\n  const colorScheme = useColorScheme() ?? 'light';\n  const translucentWithNoBackgroundColor = translucent && backgroundColor == null;\n\n  useLayoutEffect(() => {\n    BaseStatusBar.setTranslucent(translucent);\n    BaseStatusBar.setBarStyle(toStatusBarContentStyle(style, colorScheme));\n    BaseStatusBar.setBackgroundColor(\n      translucentWithNoBackgroundColor ? 'transparent' : (backgroundColor ?? 'transparent')\n    );\n\n    if (hidden !== undefined) {\n      BaseStatusBar.setHidden(hidden);\n    }\n  }, [colorScheme, translucentWithNoBackgroundColor, style, animated, hidden, backgroundColor, translucent]);\n}\n"
  },
  {
    "path": "packages/react-native/src/status-bar/StatusBar.d.ts",
    "content": "import type { StatusBarProps } from './types';\n\nexport declare function StatusBar(props: StatusBarProps): JSX.Element;\nexport declare function useStatusBar(props: StatusBarProps): void;\n"
  },
  {
    "path": "packages/react-native/src/status-bar/StatusBar.ios.tsx",
    "content": "import { useLayoutEffect } from 'react';\nimport { useColorScheme } from 'react-native';\nimport type { StatusBarProps } from './types';\nimport { toStatusBarContentStyle } from './utils';\nimport { useNavigation } from '../router/createRoute';\n\nexport function StatusBar(props: StatusBarProps) {\n  useStatusBar(props);\n\n  return null;\n}\n\nexport function useStatusBar({ style, hidden }: StatusBarProps) {\n  const navigation = useNavigation();\n  const colorScheme = useColorScheme() ?? 'light';\n\n  useLayoutEffect(() => {\n    let statusBarStyle: 'light' | 'dark';\n\n    switch (toStatusBarContentStyle(style, colorScheme)) {\n      case 'light-content':\n        statusBarStyle = 'light';\n        break;\n      case 'dark-content':\n        statusBarStyle = 'dark';\n        break;\n    }\n\n    navigation.setOptions({\n      statusBarStyle,\n      statusBarHidden: hidden,\n    });\n  }, [navigation, colorScheme, style, hidden]);\n}\n"
  },
  {
    "path": "packages/react-native/src/status-bar/index.ts",
    "content": "export { StatusBar, useStatusBar } from './StatusBar';\nexport type { StatusBarProps, StatusBarStyle } from './types';\n"
  },
  {
    "path": "packages/react-native/src/status-bar/types.ts",
    "content": "export type StatusBarStyle = 'light' | 'dark' | 'auto' | 'inverted';\n\nexport type StatusBarProps = {\n  /**\n   * @default 'auto'\n   */\n  style?: StatusBarStyle;\n  hidden?: boolean;\n  /**\n   * @platform android\n   */\n  animated?: boolean;\n  /**\n   * @platform android\n   */\n  backgroundColor?: string;\n  /**\n   * @platform android\n   */\n  translucent?: boolean;\n};\n"
  },
  {
    "path": "packages/react-native/src/status-bar/utils.ts",
    "content": "import { ColorSchemeName } from 'react-native';\nimport type { StatusBarStyle } from './types';\n\nexport function toStatusBarContentStyle(\n  statusBarStyle: StatusBarStyle = 'auto',\n  colorPreference: ColorSchemeName = 'light'\n): 'light-content' | 'dark-content' {\n  const resolvedStyle = (() => {\n    switch (statusBarStyle) {\n      case 'auto':\n        return colorPreference === 'light' ? 'dark' : 'light';\n      case 'inverted':\n        return colorPreference === 'light' ? 'light' : 'dark';\n      default:\n        return statusBarStyle;\n    }\n  })();\n\n  return resolvedStyle === 'light' ? 'light-content' : 'dark-content';\n}\n"
  },
  {
    "path": "packages/react-native/src/types/global.ts",
    "content": "/* eslint-disable @typescript-eslint/naming-convention */\n\nimport type { ComponentType } from 'react';\n\nexport interface GraniteGlobal {\n  app: {\n    name: string;\n    scheme: string;\n    host: string;\n  };\n}\n\ndeclare global {\n  // @internal\n  var __granite: GraniteGlobal;\n\n  // @internal\n  var Page: ComponentType<any>;\n}\n"
  },
  {
    "path": "packages/react-native/src/use-back-event/index.ts",
    "content": "export * from './useBackEvent';\n"
  },
  {
    "path": "packages/react-native/src/use-back-event/useBackEvent.tsx",
    "content": "import { createContext, ReactNode, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { useVisibility } from '../visibility';\n\nexport interface BackEventControls {\n  addEventListener: (...handlers: Array<() => void>) => void;\n  removeEventListener: (...handlers: Array<() => void>) => void;\n}\n\ninterface PrivateBackEventControls extends BackEventControls {\n  handlersRef: Set<() => void>;\n  hasBackEvent: boolean;\n  onBack: () => void;\n}\n\nconst BackEventContext = createContext<PrivateBackEventControls | null>(null);\n\n/**\n * @component\n * @name BackEventProvider\n * @description\n * A component that provides a `Context` for handling back events within the app. Using this component, child components can subscribe to and manage back events. Placing `BackEventProvider` at the top of the tree allows all back events to be handled centrally.\n *\n * @param {ReactNode} children Child components that will control back events.\n * @param {BackEventControls} backEvent Control object for handling back events. You can register back events using the `addEventListener` method and remove registered back events using the `removeEventListener` method.\n * @returns {JSX.Element} A component that can handle back events.\n *\n * By adding `BackEventProvider` as shown below, child components can handle back events.\n *\n * @example\n * ```jsx\n * const backEventControls = {\n *   addEventListener: (handler) => { ... },\n *   removeEventListener: (handler) => { ... },\n * };\n *\n * <BackEventProvider backEvent={backEventControls}>\n *   <App />\n * </BackEventProvider>\n * ```\n */\nexport function BackEventProvider({ children }: { children: ReactNode }) {\n  const backEventState = useBackEventState();\n\n  return <BackEventContext.Provider value={backEventState}>{children}</BackEventContext.Provider>;\n}\n\n/**\n * @name useBackEventState\n * @description\n * A hook that returns the current back event state and control methods managed by `BackEventProvider`. Using this hook, you can add or remove back event handlers and check the current state.\n *\n * @returns {{ handlers: Array<() => void>, backEvent: BackEventControls, routerProps: { canGoBack: boolean, onBack: () => void } }} Returns an array of back event handlers, the event control method `backEvent`, and `routerProps` that can be used when handling back functionality in the router.\n *\n * Using this Hook, you can add or remove back event handlers and integrate with the router.\n *\n * @example\n * ```javascript\n * const { backEvent, routerProps } = useBackEventState();\n * // Handle back events in the router through routerProps\n * backEvent.addEventListener(() => {\n *   console.log('Back event triggered');\n * });\n *\n * return (\n *   <BackEventProvider backEvent={backEvent}>\n *     <GraniteRouter {...routerProps} context={context} prefix={'scheme://testbench'} />\n *   </BackEventProvider>\n * );\n *\n * ```\n */\nexport function useBackEventState() {\n  const handlersRef = useRef<Set<() => void>>(new Set()).current;\n  const [hasBackEvent, setHasBackEvent] = useState(false);\n\n  const addEventListener = useCallback(\n    (...handlers: Array<() => void>) => {\n      for (const handler of handlers) {\n        handlersRef.add(handler);\n      }\n\n      if (handlersRef.size > 0) {\n        setHasBackEvent(true);\n      }\n    },\n    [handlersRef]\n  );\n\n  const removeEventListener = useCallback(\n    (...handlers: Array<() => void>) => {\n      for (const handler of handlers) {\n        handlersRef.delete(handler);\n      }\n\n      if (handlersRef.size === 0) {\n        setHasBackEvent(false);\n      }\n    },\n    [handlersRef]\n  );\n\n  const backEvent = useMemo((): PrivateBackEventControls => {\n    return {\n      addEventListener,\n      removeEventListener,\n      handlersRef,\n      hasBackEvent,\n      onBack: () => {\n        handlersRef.forEach((handler) => handler());\n      },\n    };\n  }, [addEventListener, handlersRef, hasBackEvent, removeEventListener]);\n\n  return backEvent;\n}\n\n/**\n * @public\n * @category Screen Control\n * @name useBackEvent\n * @description\n * A Hook that returns a controller object for registering and removing back events. Using this Hook, you can handle back events only when a specific component is active.\n * Use `addEventListener` to register back events and `removeEventListener` to remove them.\n * Registered back events are only active when the user is viewing the screen. The condition for viewing the screen is determined using [useVisibility](/en/reference/react-native/Screen%20Control/useVisibility).\n *\n * Using this Hook, you can define logic to handle back events in specific components.\n *\n * @returns {BackEventControls} An object that can control back events. This object includes the `addEventListener` method for registering events and the `removeEventListener` method for removing them.\n *\n * @throws {Error} Throws an error if this hook is not used within a `BackEventProvider`.\n *\n * @example\n *\n * ### Example of Registering and Removing Back Events\n *\n * - **When the \"Add BackEvent\" button is pressed, a back event is registered.** After that, pressing the back button shows an alert with \"back\" and prevents actual navigation.\n * - **When the \"Remove BackEvent\" button is pressed, the registered event is removed.** After that, pressing the back button navigates back normally as per default behavior.\n *\n * ```tsx\n * import { useEffect, useState } from 'react';\n * import { Alert, Button, View } from 'react-native';\n * import { useBackEvent } from '@granite-js/react-native';\n *\n * export function UseBackEventExample() {\n *   const backEvent = useBackEvent();\n *\n *   const [handler, setHandler] = useState<{ callback: () => void } | undefined>(undefined);\n *\n *   useEffect(() => {\n *     const callback = handler?.callback;\n *\n *     if (callback != null) {\n *       backEvent.addEventListener(callback);\n *\n *       return () => {\n *         backEvent.removeEventListener(callback);\n *       };\n *     }\n *\n *     return;\n *   }, [backEvent, handler]);\n *\n *   return (\n *     <View>\n *       <Button\n *         title=\"Add BackEvent\"\n *         onPress={() => {\n *           setHandler({ callback: () => Alert.alert('back') });\n *         }}\n *       />\n *       <Button\n *         title=\"Remove BackEvent\"\n *         onPress={() => {\n *           setHandler(undefined);\n *         }}\n *       />\n *     </View>\n *   );\n * }\n * ```\n */\nexport function useBackEvent() {\n  const context = useContext(BackEventContext);\n  const handlersRef = useRef<Set<() => void>>(new Set()).current;\n\n  const isVisible = useVisibility();\n\n  if (context == null) {\n    throw new Error('useBackEvent must be used within a BackEventProvider');\n  }\n\n  const contextAddEventListener = context.addEventListener;\n  const contextRemoveEventListener = context.removeEventListener;\n\n  const addEventListener = useCallback(\n    (...handlers: Array<() => void>) => {\n      for (const handler of handlers) {\n        handlersRef.add(handler);\n        contextAddEventListener(handler);\n      }\n    },\n    [contextAddEventListener, handlersRef]\n  );\n\n  const removeEventListener = useCallback(\n    (...handlers: Array<() => void>) => {\n      for (const handler of handlers) {\n        handlersRef.delete(handler);\n        contextRemoveEventListener(handler);\n      }\n    },\n    [contextRemoveEventListener, handlersRef]\n  );\n\n  /**\n   * Events must be removed when navigating to another page.\n   * If events are not removed, interference will occur.\n   */\n  useEffect(() => {\n    if (!isVisible) {\n      return;\n    }\n\n    /** Re-register handlers stored locally. */\n    for (const handler of handlersRef) {\n      contextAddEventListener(handler);\n    }\n\n    return () => {\n      for (const handler of handlersRef) {\n        contextRemoveEventListener(handler);\n      }\n    };\n  }, [contextAddEventListener, contextRemoveEventListener, handlersRef, isVisible]);\n\n  const backEvent = useMemo((): BackEventControls => {\n    return {\n      addEventListener,\n      removeEventListener,\n    };\n  }, [addEventListener, removeEventListener]);\n\n  return backEvent;\n}\n\nexport function useBackEventContext() {\n  const context = useContext(BackEventContext);\n  if (context == null) {\n    throw new Error('useBackEvent must be used within a BackEventProvider');\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/react-native/src/utils/getSchemePrefix.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { getSchemePrefix } from './getSchemePrefix';\n\ndescribe('getSchemePrefix', () => {\n  it('should return correct URL when host is empty', () => {\n    const result = getSchemePrefix({\n      scheme: 'myapp',\n      appName: 'testapp',\n      host: '',\n    });\n\n    expect(result).toBe('myapp://testapp');\n  });\n\n  it('should return correct URL when host is provided', () => {\n    const result = getSchemePrefix({\n      scheme: 'myapp',\n      appName: 'testapp',\n      host: 'super',\n    });\n\n    expect(result).toBe('myapp://super/testapp');\n  });\n\n  it('should handle different schemes', () => {\n    const result = getSchemePrefix({\n      scheme: 'https',\n      appName: 'webapp',\n      host: 'myhost',\n    });\n\n    expect(result).toBe('https://myhost/webapp');\n  });\n\n  it('should handle different app names', () => {\n    const result = getSchemePrefix({\n      scheme: 'myapp',\n      appName: 'production-app',\n      host: 'myhost',\n    });\n\n    expect(result).toBe('myapp://myhost/production-app');\n  });\n});\n"
  },
  {
    "path": "packages/react-native/src/utils/getSchemePrefix.ts",
    "content": "export function getSchemePrefix({ scheme, appName, host }: { scheme: string; appName: string; host: string }) {\n  return host.length > 0 ? `${scheme}://${host}/${appName}` : `${scheme}://${appName}`;\n}\n"
  },
  {
    "path": "packages/react-native/src/utils/isNewArchEnabled.ts",
    "content": "export function isNewArchEnabled() {\n  const globalObject = globalThis as typeof globalThis & {\n    RN$Bridgeless?: boolean;\n    nativeFabricUIManager?: unknown;\n    __turboModuleProxy?: unknown;\n  };\n\n  return (\n    globalObject.RN$Bridgeless === true ||\n    globalObject.nativeFabricUIManager != null ||\n    globalObject.__turboModuleProxy != null\n  );\n}\n"
  },
  {
    "path": "packages/react-native/src/utils/noop.ts",
    "content": "export const noop = () => {};\n"
  },
  {
    "path": "packages/react-native/src/utils/usePreservedCallback.ts",
    "content": "import { useCallback, useEffect, useRef } from 'react';\n\nexport function usePreservedCallback<Callback extends (...args: any[]) => any>(callback: Callback) {\n  const callbackRef = useRef<Callback>(callback);\n\n  useEffect(() => {\n    callbackRef.current = callback;\n  }, [callback]);\n\n  return useCallback(\n    (...args: any[]) => {\n      return callbackRef.current(...args);\n    },\n    [callbackRef]\n  ) as Callback;\n}\n"
  },
  {
    "path": "packages/react-native/src/video/Video.tsx",
    "content": "import VideoBase, { type VideoRef } from '@granite-js/video';\nimport { ComponentProps, forwardRef, useMemo, useState } from 'react';\nimport { Animated, Platform } from 'react-native';\nimport { useVisibility } from '../visibility';\n\nconst AnimatedRNVideo = Animated.createAnimatedComponent(VideoBase);\n\ntype VideoProps = ComponentProps<typeof AnimatedRNVideo>;\n\n/**\n * @public\n * @name Video\n * @category UI\n * @description\n * The Video component implements audio focus control logic to prevent the sandbox app from stopping music playing in other apps. It automatically plays or pauses based on the app's state. For example, when the app transitions to the background, the video automatically pauses.\n *\n * @property {boolean} [isAvailable] Value to check if the `Video` component can be used. You can check this value to determine if the user can render the video or if video functionality is unavailable due to environmental constraints (e.g., network connection issues, unsupported devices). If this value is `false`, you should handle it by not rendering the video or providing alternative content.\n *\n * @param {string} [props.source.uri] Source of the video to play. Can be set to a file path or URL.\n * @param {boolean} [props.muted=false] Controls the mute state of the video. If `true`, the video's audio is muted; if `false`, the audio plays. Default is `false`.\n * @param {boolean} [props.paused=false] Property to control video playback. If `true`, the video is paused; if `false`, the video plays. Default is `false`, and it autoplays.\n * @param {OnAudioFocusChanged} [props.onAudioFocusChanged] Callback function called when audio focus changes. Must be implemented when `muted` is `false`. For more details, see [OnAudioFocusChanged](/reference/react-native/Types/OnAudioFocusChanged.html).\n * @param {Ref<VideoRef>} ref Reference object to access the video instance. Through this ref, you can access various methods of the video instance.\n *\n * @returns {JSX.Element} Returns a JSX element that renders the video. Uses `Animated` to provide smooth animation effects during video playback.\n *\n * @example\n *\n * ### Video Autoplay Example\n *\n * ```tsx\n * import { useRef } from 'react';\n * import { View } from 'react-native';\n * import { Video } from '@granite-js/react-native';\n *\n * export function VideoExample() {\n *   const videoRef = useRef(null);\n *\n *   return (\n *     <View>\n *       <Video\n *         ref={videoRef}\n *         source={{ uri: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' }}\n *         muted={true}\n *         paused={false}\n *         resizeMode=\"cover\"\n *         style={{ width: 300, height: 200, borderWidth: 1 }}\n *       />\n *     </View>\n *   );\n * }\n * ```\n */\nconst VideoImpl = forwardRef<VideoRef, VideoProps>((props, ref) => {\n  const [isFocused, setIsFocused] = useState(props.muted || props.paused);\n  const visible = useVisibility();\n\n  // If focus state is not managed directly by the service through onAudioFocusChanged, control the paused value based on internal state.\n  const paused = useMemo(\n    () => !visible || props.paused || (!props.onAudioFocusChanged && !isFocused),\n    [props.onAudioFocusChanged, props.paused, visible, isFocused]\n  );\n\n  const disableFocus = props.muted || props.paused;\n  const mixWithOthers = props.muted ? 'mix' : undefined;\n\n  return (\n    <AnimatedRNVideo\n      ref={ref}\n      progressUpdateInterval={16}\n      disableFocus={Platform.OS === 'ios' ? false : disableFocus}\n      playWhenInactive\n      onAudioFocusChanged={(event) => {\n        setIsFocused(event.hasAudioFocus);\n        props.onAudioFocusChanged?.(event);\n      }}\n      {...props}\n      // Internal state is used to control the component's states.\n      paused={paused}\n      mixWithOthers={mixWithOthers}\n    />\n  );\n});\n\nexport const Video = Object.defineProperty(VideoImpl, 'isAvailable', {\n  get: () => VideoBase.isAvailable,\n  configurable: false,\n}) as typeof VideoImpl & { isAvailable: boolean };\n\nexport type { VideoRef, VideoProps };\n"
  },
  {
    "path": "packages/react-native/src/video/index.ts",
    "content": "export * from './Video';\n"
  },
  {
    "path": "packages/react-native/src/visibility/VisibilityProvider.tsx",
    "content": "import { GraniteBrownfieldModule } from '@granite-js/brownfield-module';\nimport { ReactElement, ReactNode, useEffect, useState } from 'react';\nimport { AppStateProvider } from './useIsAppForeground';\nimport { VisibilityChangedProvider } from './useVisibilityChanged';\n\ninterface Props {\n  isVisible: boolean;\n  children: ReactNode;\n}\n\n/**\n * @name VisibilityProvider\n * @description\n * A Provider that manages whether a ReactNative view is currently in the foreground state.\n * It subscribes to the app's `visibilityChanged` event to detect and manage screen visibility.\n * @param {boolean} isVisible - Whether the app is in the foreground state.\n * @param {ReactNode | undefined} children - Child components that observe `visibilityChanged` and `AppState` event.\n * @returns {ReactElement} - A React Provider component wrapped with `VisibilityChangedProvider`.\n * @example\n * ```typescript\n *\n * function App() {\n *  return (\n *   <VisibilityProvider isVisible={true}>\n *     <MyApp />\n *   </VisibilityProvider>\n *  );\n * }\n *\n * ```\n */\nexport function VisibilityProvider({ isVisible, children }: Props): ReactElement {\n  const [visible, setVisible] = useState(isVisible);\n\n  useEffect(() => {\n    const subscription = GraniteBrownfieldModule.onVisibilityChanged(({ visible }) => {\n      setVisible(visible);\n    });\n\n    return () => {\n      subscription.remove();\n    };\n  }, []);\n\n  return (\n    <VisibilityChangedProvider isVisible={visible}>\n      <AppStateProvider>{children}</AppStateProvider>\n    </VisibilityChangedProvider>\n  );\n}\n"
  },
  {
    "path": "packages/react-native/src/visibility/index.ts",
    "content": "export * from './react-navigation';\nexport * from './useIsAppForeground';\nexport * from './useVisibility';\nexport * from './useVisibilityChanged';\nexport * from './useVisibilityChange';\nexport * from './VisibilityProvider';\nexport * from './onVisibilityChanged';"
  },
  {
    "path": "packages/react-native/src/visibility/onVisibilityChanged.ts",
    "content": "import { GraniteBrownfieldModule } from '@granite-js/brownfield-module';\n\nexport const onVisibilityChanged = GraniteBrownfieldModule.onVisibilityChanged;\n"
  },
  {
    "path": "packages/react-native/src/visibility/react-navigation/index.ts",
    "content": "export * from './useIsFocusedSafely';\nexport * from './useNavigationSafely';\n"
  },
  {
    "path": "packages/react-native/src/visibility/react-navigation/useIsFocusedSafely.tsx",
    "content": "import { useDebugValue, useEffect, useState } from 'react';\nimport { useNavigationSafely } from './useNavigationSafely';\n\n/**\n * @name useIsFocusedSafely\n * @category Hooks\n * @kind function\n * @link https://github.com/react-navigation/react-navigation/blob/%40react-navigation/native%406.1.18/packages/core/src/useIsFocused.tsx\n * @description\n * Returns whether the current screen is in focus.\n *\n * A Hook that safely uses `useIsFocused` provided by `@react-navigation/native`.\n * This Hook is based on `useIsFocused` from `@react-navigation/native`, but modified to not throw errors when `navigation` or `root` objects are `null` or `undefined`.\n * It ensures that users don't see errors even when the code is used in environments where `@react-navigation/native` is not used.\n *\n * @returns {boolean} - Returns the focus state of the current screen.\n * @example\n * ```typescript\n *  const isFocused = useIsFocusedSafely();\n *  console.log(isFocused); // true or false\n * ```\n */\nexport function useIsFocusedSafely(): boolean {\n  const navigation = useNavigationSafely();\n  const isNavigationFocused = () => navigation?.isFocused() ?? true;\n\n  const [isFocused, setIsFocused] = useState(isNavigationFocused());\n\n  const valueToReturn = isNavigationFocused();\n\n  if (isFocused !== valueToReturn) {\n    // If the value has changed since the last render, we need to update it.\n    // This could happen if we missed an update from the event listeners during re-render.\n    // React will process this update immediately, so the old subscription value won't be committed.\n    // It is still nice to avoid returning a mismatched value though, so let's override the return value.\n    // This is the same logic as in https://github.com/facebook/react/tree/master/packages/use-subscription\n    setIsFocused(valueToReturn);\n  }\n\n  useEffect(() => {\n    if (navigation == null) {\n      return;\n    }\n\n    const unsubscribeFocus = navigation.addListener('focus', () => setIsFocused(true));\n\n    const unsubscribeBlur = navigation.addListener('blur', () => setIsFocused(false));\n\n    return () => {\n      unsubscribeFocus();\n      unsubscribeBlur();\n    };\n  }, [navigation]);\n\n  useDebugValue(valueToReturn);\n\n  return valueToReturn;\n}\n"
  },
  {
    "path": "packages/react-native/src/visibility/react-navigation/useNavigationSafely.tsx",
    "content": "import {\n  NavigationContainerRefContext,\n  NavigationContext,\n  NavigationProp,\n} from '@granite-js/native/@react-navigation/native';\nimport { useContext } from 'react';\n\n/**\n * @name useNavigationSafely\n * @category Hooks\n * @kind function\n * @link https://github.com/react-navigation/react-navigation/blob/d1cd940d9a3fb46bec0eb6bf4f8023789fc93b28/packages/core/src/useNavigation.tsx#L13\n * @description\n * A Hook that safely uses [`useNavigation`](https://reactnavigation.org/docs/use-navigation/) from `@react-navigation/native` for managing navigation between screens.\n * This Hook is based on `useNavigation` provided by `@react-navigation/native`, but operates more safely by not throwing errors when `navigation` or `root` objects are `null` or `undefined`.\n * It also ensures the code runs safely in environments where `@react-navigation/native` is not used, preventing users from experiencing errors.\n *\n * @returns {NavigationProp<ReactNavigation.RootParamList> | undefined} - The screen is in a visible state.\n * @example\n * ```typescript\n *  const navigation = useNavigationSafely();\n *  const isNavigationFocused = () => navigation?.isFocused() ?? true;\n * ```\n */\nexport function useNavigationSafely(): NavigationProp<ReactNavigation.RootParamList> | undefined {\n  const root = useContext(NavigationContainerRefContext);\n  const navigation = useContext(NavigationContext);\n\n  return (navigation ?? root ?? undefined) as NavigationProp<ReactNavigation.RootParamList> | undefined;\n}\n"
  },
  {
    "path": "packages/react-native/src/visibility/useIsAppForeground.tsx",
    "content": "import { createContext, ReactElement, ReactNode, useContext, useEffect, useState } from 'react';\nimport { AppState, AppStateStatus } from 'react-native';\n\ninterface Props {\n  children: ReactNode;\n}\n\nconst AppStateContext = createContext<AppStateStatus | undefined>(undefined);\n\n/**\n * @name AppStateProvider\n * @description\n * A Provider that manages the `AppState` of React Native screens. This Provider manages the app's state (active, background, etc.) and passes it to child components that subscribe to it.\n * @link https://reactnative.dev/docs/appstate\n * @param {Props} children - Child components to be wrapped by `AppStateProvider`. These components can detect and respond to changes in `AppState`.\n * @returns {ReactElement} - A React Provider component wrapped with `AppStateProvider`.\n * @example\n * ```tsx\n * export function App() {\n *   return (\n *     <AppStateProvider>\n *      <MyApp />\n *     </AppStateProvider>\n *   );\n * }\n * ```\n */\nexport function AppStateProvider({ children }: Props): ReactElement {\n  const [appState, setAppState] = useState<AppStateStatus>(AppState.currentState);\n\n  const handleAppStateChange = (status: AppStateStatus) => {\n    setAppState(status);\n  };\n\n  useEffect(() => {\n    const subscription = AppState.addEventListener('change', handleAppStateChange);\n\n    return () => {\n      subscription.remove();\n    };\n  }, []);\n\n  return <AppStateContext.Provider value={appState}>{children}</AppStateContext.Provider>;\n}\n\n/**\n * @category Hooks\n * @name useIsAppForeground\n * @description\n * Returns whether the React Native app is in the foreground state.\n *\n * @see https://reactnative.dev/docs/0.72/appstate#app-states\n * @returns {boolean} - Returns whether the app is in the foreground state.\n * @throws {Error} Throws an error when the managed AppState is `null`.\n * @example\n * ```typescript\n *  const isForeground = useIsAppForeground();\n * ```\n */\nexport const useIsAppForeground = (): boolean => {\n  const appState = useContext(AppStateContext);\n\n  if (appState == null) {\n    throw new Error('useIsAppForeground must be used within a AppStateProvider');\n  }\n\n  /**\n   * In iOS, the 'inactive' state is also considered as foreground.\n   * 'inactive' is a state that only exists in iOS, for example, when the control center or notification panel is open.\n   * @see https://reactnative.dev/docs/0.72/appstate#app-states\n   */\n  return appState === 'active' || appState === 'inactive';\n};\n"
  },
  {
    "path": "packages/react-native/src/visibility/useVisibility.tsx",
    "content": "import { Platform } from 'react-native';\nimport { useIsFocusedSafely } from './react-navigation/useIsFocusedSafely';\nimport { useIsAppForeground } from './useIsAppForeground';\nimport { useVisibilityChanged } from './useVisibilityChanged';\n\n/**\n * @public\n * @category Screen Control\n * @name useVisibility\n * @description\n * Returns whether the screen is visible to the user.\n * Returns `true` if the app's screen is currently visible to the user, and `false` if it's not. However, the screen visibility state does not change when opening and closing the system share modal ([share](/reference/react-native/Share/share)).\n *\n * Usage examples:\n * - Returns `false` when switching to another app or pressing the home button.\n * - Returns `true` when returning to the granite app or when the screen becomes visible.\n * - Returns `false` when navigating to another service within the granite app.\n *\n * @returns {boolean} - Whether the current screen is visible to the user.\n * @example\n *\n * ### Example of checking screen visibility\n *\n * ```tsx\n * import { useEffect } from 'react';\n * import { Text } from 'react-native';\n * import { useVisibility } from '@granite-js/react-native';\n *\n * export function UseVisibilityExample() {\n *   const visibility = useVisibility();\n *\n *   useEffect(() => {\n *     console.log({ visibility });\n *   }, [visibility]);\n *\n *   return <Text>Logs are created when leaving and returning to the home screen.</Text>;\n * }\n * ```\n */\nexport function useVisibility(): boolean {\n  const visible = useVisibilityChanged();\n  const isForeground = useIsAppForeground();\n  const isReactNavigationFocused = useIsFocusedSafely();\n\n  /**\n   * We don't use AppState in Android. (AppState uses `onHostPause` and `onHostResume`.)\n   * From Android version 5.172.0, `visibilityChanged` uses `onHostStop` and `onHostStart`.\n   *  - For example, in Android, the `visible` state is maintained even when the share modal appears (share app bridge call).\n   */\n  const androidCondition = visible && isReactNavigationFocused;\n  const iOSCondition = visible && isForeground && isReactNavigationFocused;\n\n  return Platform.OS === 'android' ? androidCondition : iOSCondition;\n}\n"
  },
  {
    "path": "packages/react-native/src/visibility/useVisibilityChange.ts",
    "content": "import { useEffect } from 'react';\nimport { useVisibility } from './useVisibility';\nimport { usePrevious } from './utils/usePrevious';\n\n/**\n * String representing whether the screen is visible.\n * @typedef {string} VisibilityState\n * @property {'visible'} visible - The screen is visible.\n * @property {'hidden'} hidden - The screen is not visible.\n */\nexport type VisibilityState = 'visible' | 'hidden';\n\n/**\n * @callback VisibilityCallback\n * @param {VisibilityState} state - String representing the visibility state of the screen.\n */\nexport type VisibilityCallback = (state: VisibilityState) => void;\n\n/**\n * @public\n * @category Screen Control\n * @name useVisibilityChange\n * @kind function\n * @description\n * Calls a callback function with the visibility state when the screen's visibility changes.\n * The callback function receives the return value from [useVisibility](/en/reference/react-native/Screen%20Control/useVisibility). If the return value is `true`, it passes 'visible', and if `false`, it passes 'hidden'.\n *\n * @param {VisibilityCallback} callback - Calls a callback function that receives visibility changes when the screen's visibility changes.\n * @example\n *\n * ### Example of logging when screen visibility changes\n *\n * ```tsx\n * import { useState } from 'react';\n * import { Text, View } from 'react-native';\n * import { useVisibilityChange, VisibilityState } from '@granite-js/react-native';\n *\n * export function UseVisibilityChangeExample() {\n *   const [visibilityHistory, setVisibilityHistory] = useState<VisibilityState[]>([]);\n *\n *   useVisibilityChange((visibility) => {\n *     setVisibilityHistory((prev) => [...prev, visibility]);\n *   });\n *\n *   return (\n *     <View>\n *       <Text>Logs are created when leaving and returning to the home screen.</Text>\n *\n *       {visibilityHistory.map((visibility, index) => (\n *         <Text key={index}>{JSON.stringify(visibility)}</Text>\n *       ))}\n *     </View>\n *   );\n * }\n * ```\n */\nexport function useVisibilityChange(callback: VisibilityCallback) {\n  const isVisible = useVisibility();\n\n  const prevValue = usePrevious<boolean>(isVisible) ?? false;\n\n  useEffect(() => {\n    if (prevValue === isVisible) {\n      return;\n    }\n\n    callback(isVisible ? 'visible' : 'hidden');\n  }, [callback, isVisible, prevValue]);\n}\n\n"
  },
  {
    "path": "packages/react-native/src/visibility/useVisibilityChanged.tsx",
    "content": "import { createContext, PropsWithChildren, ReactElement, useContext } from 'react';\n\nconst VisibilityChangedContext = createContext<boolean | undefined>(undefined);\n\n/**\n * @name VisibilityChangedProvider\n * @kind function\n * @description\n * A Provider that manages whether a React Native screen is visible provider.\n *\n * @param {ReactNode | undefined} children - Child components that check screen visibility.\n * @param {boolean} isVisible - A boolean value indicating whether the screen is visible.\n * @returns {ReactElement} - A React Provider component wrapped with `VisibilityChangedContext.Provider`.\n * @example\n * ```typescript\n * export function VisibilityProvider({ isVisible, children }: Props) {\n *   return (\n *     <VisibilityChangedProvider isVisible={isVisible}>\n *       {children}\n *     </VisibilityChangedProvider>\n *   );\n * }\n * ```\n */\nexport function VisibilityChangedProvider({\n  children,\n  isVisible,\n}: PropsWithChildren<{ isVisible: boolean }>): ReactElement {\n  return <VisibilityChangedContext.Provider value={isVisible}>{children}</VisibilityChangedContext.Provider>;\n}\n\n/**\n * @name useVisibilityChanged\n * @category Hooks\n * @kind function\n * @description\n * A Hook that returns whether a React Native screen is visible.\n * @returns {boolean} - Returns whether the screen is visible.\n * @throws {Error} Throws an error when not used within a `VisibilityChangedProvider`.\n * @example\n * ```typescript\n * const isVisible = useVisibilityChanged();\n * console.log(isVisible);\n * // true or false\n * ```\n */\nexport function useVisibilityChanged(): boolean {\n  const isVisible = useContext(VisibilityChangedContext);\n\n  if (isVisible == null) {\n    throw new Error('useVisibilityChanged must be used within a VisibilityChangedProvider');\n  }\n\n  return isVisible;\n}\n"
  },
  {
    "path": "packages/react-native/src/visibility/utils/usePrevious.tsx",
    "content": "import { useEffect, useRef } from 'react';\n\n/**\n * @name usePrevious\n * @category Hooks\n * @kind function\n * @description\n * A Hook that returns the previous value.\n * @param {T} value - The value to return the previous value of.\n * @returns {T} - Returns the previous value.\n * @example\n * ```typescript\n *  const isVisible = useVisibility();\n *  const prevValue = usePrevious<boolean>(isVisible) ?? false;\n * ```\n */\nexport function usePrevious<T>(value: T): T {\n  const ref: any = useRef<T>(null);\n  useEffect(() => {\n    ref.current = value;\n  }, [value]);\n\n  return ref.current;\n}\n"
  },
  {
    "path": "packages/react-native/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"emitDeclarationOnly\": true,\n    \"stripInternal\": true,\n    \"rootDir\": \"./src\",\n    \"outDir\": \"./dist\"\n  },\n  \"exclude\": [\"**/dist/*\", \"**/*.test.*\", \"**/*.spec.*\", \"**/*.e2e.*\", \"**/__fixtures__/*\"],\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/react-native/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\", \"types\"]\n}\n"
  },
  {
    "path": "packages/react-native/tsup.config.ts",
    "content": "import { defineConfig } from 'tsup';\n\nexport default defineConfig({\n  entry: ['src/config.ts', 'src/cli.ts', 'src/jest.ts', 'src/async-bridges.ts', 'src/constant-bridges.ts'],\n  outDir: 'dist',\n  format: ['esm', 'cjs'],\n  dts: true,\n});\n"
  },
  {
    "path": "packages/react-native/types.d.ts",
    "content": "export * from './dist/types/global.d.ts';\n"
  },
  {
    "path": "packages/react-native/vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  cacheDir: '.vitest',\n  test: {\n    environment: 'jsdom',\n    include: ['src/**/*.spec.{ts,tsx}'],\n    testTimeout: 600_000,\n    hookTimeout: 600_000,\n    typecheck: {\n      enabled: true,\n      include: ['src/**/*.test-d.{ts,tsx}'],\n    },\n  },\n});\n"
  },
  {
    "path": "packages/style-utils/CHANGELOG.md",
    "content": "# @granite-js/style-utils\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n## 1.0.18\n\n## 1.0.17\n\n## 1.0.16\n\n## 1.0.15\n\n## 1.0.14\n\n## 1.0.13\n\n## 1.0.12\n\n## 1.0.11\n\n## 1.0.10\n\n## 1.0.9\n\n## 1.0.8\n\n## 1.0.7\n\n## 1.0.6\n\n## 1.0.5\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "packages/style-utils/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/style-utils/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/style-utils\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@babel/core**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n2. **@babel/plugin-transform-flow-strip-types**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n3. **@babel/plugin-transform-private-methods**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n4. **@babel/preset-env**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n5. **@babel/preset-react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n6. **@babel/preset-typescript**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/babel/babel.git\n\t\n7. **@testing-library/jest-native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/testing-library/jest-native.git\n\t\n8. **@testing-library/react-native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://www.github.com/callstack/react-native-testing-library.git\n\t\n9. **@types/jest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n10. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n11. **@types/react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n12. **@types/react-test-renderer**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n13. **babel-jest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/jestjs/jest.git\n\t\n14. **babel-plugin-syntax-hermes-parser**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git@github.com:facebook/hermes.git\n\t\n15. **eslint**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/eslint/eslint.git\n\t\n16. **jest**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/jestjs/jest.git\n\t\n17. **jest-environment-jsdom**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/jestjs/jest.git\n\t\n18. **react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/react.git\n\t\n19. **react-native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/react-native.git\n\t\n20. **react-test-renderer**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/react.git\n\t\n21. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/style-utils/README.md",
    "content": "# @granite-js/style-utils\n\nA package for Style utilities\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/style-utils/babel.config.js",
    "content": "module.exports = {\n  presets: [\n    ['@babel/preset-env', { targets: { node: 'current' } }],\n    '@babel/preset-typescript',\n    [\n      '@babel/preset-react',\n      {\n        runtime: 'automatic',\n      },\n    ],\n  ],\n  plugins: ['babel-plugin-syntax-hermes-parser', '@babel/plugin-transform-flow-strip-types', '@babel/plugin-transform-private-methods'],\n};\n"
  },
  {
    "path": "packages/style-utils/jest.config.js",
    "content": "const sharedConfig = require('../jest.config.js');\n\n/**\n * @type {import('@jest/types').Config.InitialOptions}\n */\nmodule.exports = {\n  ...sharedConfig,\n  rootDir: __dirname,\n  testEnvironment: 'node',\n  setupFilesAfterEnv: ['<rootDir>/jest.setup-matchers.js'],\n  transformIgnorePatterns: [],\n  globals: {\n    __DEV__: true,\n  },\n  preset: '@testing-library/react-native',\n};\n"
  },
  {
    "path": "packages/style-utils/jest.setup-matchers.js",
    "content": "require('@testing-library/jest-native/extend-expect');\n"
  },
  {
    "path": "packages/style-utils/package.json",
    "content": "{\n  \"name\": \"@granite-js/style-utils\",\n  \"version\": \"1.0.23\",\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"eslint .\",\n    \"test\": \"yarn jest\",\n    \"build\": \"rm -rf dist && tsc -p tsconfig.build.json\"\n  },\n  \"main\": \"./src/index.ts\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/style-utils\"\n  },\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.ts\",\n      \"default\": \"./src/index.ts\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\"\n  ],\n  \"devDependencies\": {\n    \"@babel/core\": \"7.28.5\",\n    \"@babel/plugin-transform-flow-strip-types\": \"catalog:react-native\",\n    \"@babel/plugin-transform-private-methods\": \"^7.24.7\",\n    \"@babel/preset-env\": \"7.28.5\",\n    \"@babel/preset-react\": \"7.28.5\",\n    \"@babel/preset-typescript\": \"7.28.5\",\n    \"@granite-js/native\": \"workspace:*\",\n    \"@testing-library/jest-native\": \"^5.4.3\",\n    \"@testing-library/react-native\": \"^12.5.3\",\n    \"@types/jest\": \"^29.5.12\",\n    \"@types/node\": \"catalog:tools\",\n    \"@types/react\": \"catalog:react-native\",\n    \"@types/react-test-renderer\": \"^18\",\n    \"babel-jest\": \"^29.7.0\",\n    \"babel-plugin-syntax-hermes-parser\": \"^0.32.0\",\n    \"eslint\": \"^9.7.0\",\n    \"jest\": \"^29.7.0\",\n    \"jest-environment-jsdom\": \"^29.7.0\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"react-test-renderer\": \"19.2.3\",\n    \"typescript\": \"catalog:tools\"\n  },\n  \"peerDependencies\": {\n    \"@types/react\": \"*\",\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/style-utils/src/box-spacing.spec.tsx",
    "content": "import { render, screen } from '@testing-library/react-native';\nimport { View } from 'react-native';\nimport { margin, padding, type BoxSpacingPresets } from './box-spacing';\n\nconst properties = ['x', 'y', 'top', 'right', 'bottom', 'left'];\nconst units = [4, 8, 12, 16, 24, 32];\n\ndescribe('padding', () => {\n  it('can apply padding style by specifying top, right, bottom, left', () => {\n    render(\n      <View\n        testID=\"view\"\n        style={padding({\n          top: 8,\n          right: 16,\n          bottom: 24,\n          left: 32,\n        })}\n      />\n    );\n    expect(screen.getByTestId('view')).toHaveStyle({\n      paddingTop: 8,\n      paddingRight: 16,\n      paddingBottom: 24,\n      paddingLeft: 32,\n    });\n  });\n\n  it('can apply padding style by specifying x, y', () => {\n    render(\n      <View\n        testID=\"view\"\n        style={padding({\n          x: 10,\n          y: 5,\n        })}\n      />\n    );\n    expect(screen.getByTestId('view')).toHaveStyle({\n      paddingLeft: 10,\n      paddingRight: 10,\n      paddingTop: 5,\n      paddingBottom: 5,\n    });\n  });\n\n  it('can apply padding style by specifying top, bottom, x', () => {\n    render(\n      <View\n        testID=\"view\"\n        style={padding({\n          x: 10,\n          top: 8,\n          bottom: 24,\n        })}\n      />\n    );\n    expect(screen.getByTestId('view')).toHaveStyle({\n      paddingLeft: 10,\n      paddingRight: 10,\n      paddingTop: 8,\n      paddingBottom: 24,\n    });\n  });\n\n  it('can apply padding style by specifying left, right, y', () => {\n    render(\n      <View\n        testID=\"view\"\n        style={padding({\n          y: 10,\n          right: 16,\n          left: 32,\n        })}\n      />\n    );\n    expect(screen.getByTestId('view')).toHaveStyle({\n      paddingLeft: 32,\n      paddingRight: 16,\n      paddingTop: 10,\n      paddingBottom: 10,\n    });\n  });\n\n  it('can apply padding style using method', () => {\n    render(<View testID=\"view\" style={padding.x(10)} />);\n    expect(screen.getByTestId('view')).toHaveStyle({\n      paddingLeft: 10,\n      paddingRight: 10,\n    });\n    expect(screen.getByTestId('view')).not.toHaveStyle({\n      paddingTop: 10,\n      paddingBottom: 10,\n    });\n  });\n\n  it('when passing only a number to padding style, {padding:30} is applied', () => {\n    render(<View testID=\"view\" style={padding(30)} />);\n    expect(screen.getByTestId('view')).toHaveStyle({\n      padding: 30,\n    });\n  });\n\n  it('presets exist', () => {\n    for (const property of properties) {\n      for (const unit of units) {\n        const key = `${property}${unit}` as keyof BoxSpacingPresets;\n\n        expect(padding[key]).not.toBeUndefined();\n      }\n    }\n  });\n});\n\ndescribe('margin', () => {\n  it('can apply margin style by specifying top, right, bottom, left', () => {\n    render(\n      <View\n        testID=\"view\"\n        style={margin({\n          top: 8,\n          right: 16,\n          bottom: 24,\n          left: 32,\n        })}\n      />\n    );\n    expect(screen.getByTestId('view')).toHaveStyle({\n      marginTop: 8,\n      marginRight: 16,\n      marginBottom: 24,\n      marginLeft: 32,\n    });\n  });\n\n  it('can apply margin style by specifying x, y', () => {\n    render(\n      <View\n        testID=\"view\"\n        style={margin({\n          x: 10,\n          y: 5,\n        })}\n      />\n    );\n    expect(screen.getByTestId('view')).toHaveStyle({\n      marginLeft: 10,\n      marginRight: 10,\n      marginTop: 5,\n      marginBottom: 5,\n    });\n  });\n\n  it('can apply margin style by specifying top, bottom, x', () => {\n    render(\n      <View\n        testID=\"view\"\n        style={margin({\n          x: 10,\n          top: 8,\n          bottom: 24,\n        })}\n      />\n    );\n    expect(screen.getByTestId('view')).toHaveStyle({\n      marginLeft: 10,\n      marginRight: 10,\n      marginTop: 8,\n      marginBottom: 24,\n    });\n  });\n\n  it('can apply margin style by specifying left, right, y', () => {\n    render(\n      <View\n        testID=\"view\"\n        style={margin({\n          y: 10,\n          right: 16,\n          left: 32,\n        })}\n      />\n    );\n    expect(screen.getByTestId('view')).toHaveStyle({\n      marginLeft: 32,\n      marginRight: 16,\n      marginTop: 10,\n      marginBottom: 10,\n    });\n  });\n\n  it('can apply margin style using method', () => {\n    render(<View testID=\"view\" style={margin.x(10)} />);\n    expect(screen.getByTestId('view')).toHaveStyle({\n      marginLeft: 10,\n      marginRight: 10,\n    });\n    expect(screen.getByTestId('view')).not.toHaveStyle({\n      marginTop: 10,\n      marginBottom: 10,\n    });\n  });\n\n  it('when passing only a number to margin style, {margin:30} is applied', () => {\n    render(<View testID=\"view\" style={margin(30)} />);\n    expect(screen.getByTestId('view')).toHaveStyle({\n      margin: 30,\n    });\n  });\n\n  it('presets exist', () => {\n    for (const property of properties) {\n      for (const unit of units) {\n        const key = `${property}${unit}` as keyof BoxSpacingPresets;\n\n        expect(margin[key]).not.toBeUndefined();\n      }\n    }\n  });\n});\n"
  },
  {
    "path": "packages/style-utils/src/box-spacing.tsx",
    "content": "import type { ViewStyle } from 'react-native';\n\ninterface BoxSpacingOptionObject {\n  x?: never;\n  y?: never;\n  top?: never;\n  bottom?: never;\n  left?: never;\n  right?: never;\n}\n\ntype BoxSpacingOptionObjectCase<Option extends keyof BoxSpacingOptionObject> = {\n  [O in Option]?: number;\n} & {\n  [P in Exclude<keyof BoxSpacingOptionObject, Option>]?: never;\n};\n\nexport type BoxSpacingOption =\n  | BoxSpacingOptionObjectCase<'x' | 'y'>\n  | BoxSpacingOptionObjectCase<'x' | 'top' | 'bottom'>\n  | BoxSpacingOptionObjectCase<'y' | 'left' | 'right'>\n  | BoxSpacingOptionObjectCase<'top' | 'right' | 'bottom' | 'left'>\n  | number;\n\nexport function spacing(styleProperty: string, option: BoxSpacingOption): ViewStyle {\n  if (typeof option === 'number') {\n    return {\n      [styleProperty]: option,\n    };\n  }\n\n  const box: {\n    top?: number;\n    right?: number;\n    bottom?: number;\n    left?: number;\n  } = {};\n\n  if (option.x !== undefined) {\n    box.left = box.right = option.x;\n  }\n  if (option.y !== undefined) {\n    box.top = box.bottom = option.y;\n  }\n  if (option.top !== undefined) {\n    box.top = option.top;\n  }\n  if (option.right !== undefined) {\n    box.right = option.right;\n  }\n  if (option.bottom !== undefined) {\n    box.bottom = option.bottom;\n  }\n  if (option.left !== undefined) {\n    box.left = option.left;\n  }\n\n  /** Changes margin left to marginLeft */\n  const styleObject = Object.entries(box).reduce((_styleObject, [dir, value]) => {\n    return {\n      ..._styleObject,\n      [`${styleProperty}${capitalizeFirstLetter(dir)}`]: value,\n    };\n  }, {});\n\n  return styleObject;\n}\n\ntype Property = 'x' | 'y' | 'top' | 'right' | 'bottom' | 'left';\ntype Unit = '4' | '8' | '12' | '16' | '24' | '32';\n\nexport interface BoxSpacingPresets {\n  readonly x: (value: number) => ViewStyle;\n  readonly x4: ViewStyle;\n  readonly x8: ViewStyle;\n  readonly x12: ViewStyle;\n  readonly x16: ViewStyle;\n  readonly x24: ViewStyle;\n  readonly x32: ViewStyle;\n\n  readonly y: (value: number) => ViewStyle;\n  readonly y4: ViewStyle;\n  readonly y8: ViewStyle;\n  readonly y12: ViewStyle;\n  readonly y16: ViewStyle;\n  readonly y24: ViewStyle;\n  readonly y32: ViewStyle;\n\n  readonly top: (value: number) => ViewStyle;\n  readonly top4: ViewStyle;\n  readonly top8: ViewStyle;\n  readonly top12: ViewStyle;\n  readonly top16: ViewStyle;\n  readonly top24: ViewStyle;\n  readonly top32: ViewStyle;\n\n  readonly right: (value: number) => ViewStyle;\n  readonly right4: ViewStyle;\n  readonly right8: ViewStyle;\n  readonly right12: ViewStyle;\n  readonly right16: ViewStyle;\n  readonly right24: ViewStyle;\n  readonly right32: ViewStyle;\n\n  readonly bottom: (value: number) => ViewStyle;\n  readonly bottom4: ViewStyle;\n  readonly bottom8: ViewStyle;\n  readonly bottom12: ViewStyle;\n  readonly bottom16: ViewStyle;\n  readonly bottom24: ViewStyle;\n  readonly bottom32: ViewStyle;\n\n  readonly left: (value: number) => ViewStyle;\n  readonly left4: ViewStyle;\n  readonly left8: ViewStyle;\n  readonly left12: ViewStyle;\n  readonly left16: ViewStyle;\n  readonly left24: ViewStyle;\n  readonly left32: ViewStyle;\n}\n\nexport interface BoxSpacing extends BoxSpacingPresets {\n  (option: BoxSpacingOption): ViewStyle;\n}\n\nconst properties: Property[] = ['x', 'y', 'top', 'right', 'bottom', 'left'];\nconst units: Unit[] = ['4', '8', '12', '16', '24', '32'];\n\nfunction createSpacingWithProperty(cssProperty: string) {\n  const _spacing = (option: BoxSpacingOption) => spacing(cssProperty, option);\n\n  for (const property of properties) {\n    (_spacing as any)[property] = (value: number) => spacing(cssProperty, { [property]: value });\n    for (const unit of units) {\n      const key = `${property}${unit}` as keyof BoxSpacingPresets;\n\n      (_spacing as any)[key] = _spacing({\n        [property]: Number(unit),\n      });\n    }\n  }\n\n  return _spacing as BoxSpacing;\n}\n\n/**\n * @public\n * @category UI\n * @name padding\n * @description\n * The `padding` function sets the inner spacing of a component to create appropriate spacing between content and boundaries. You can specify horizontal (x), vertical (y), and individual direction (top, right, bottom, left) spacing using numbers.\n * You can apply the same value to all directions by entering a number, or set individual values for each direction. There are also presets for commonly used values for easy application.\n *\n * @param {BoxSpacingOption} option - The option value to specify inner spacing. If you enter a number, it applies the same value to all directions,\n * or you can set individual values for each direction.\n * @property {(value: number) => ViewStyle} x - Returns a style object that sets the inner spacing of the component's horizontal direction (left and right) by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} x4 - A style object that applies 4px inner spacing in the horizontal direction\n * @property {ViewStyle} x8 - A style object that applies 8px inner spacing in the horizontal direction\n * @property {ViewStyle} x12 - A style object that applies 12px inner spacing in the horizontal direction\n * @property {ViewStyle} x16 - A style object that applies 16px inner spacing in the horizontal direction\n * @property {ViewStyle} x24 - A style object that applies 24px inner spacing in the horizontal direction\n * @property {ViewStyle} x32 - A style object that applies 32px inner spacing in the horizontal direction\n * @property {(value: number) => ViewStyle} y - Returns a style object that sets the inner spacing of the component's vertical direction (top and bottom) by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} y4 - A style object that applies 4px inner spacing in the vertical direction\n * @property {ViewStyle} y8 - A style object that applies 8px inner spacing in the vertical direction\n * @property {ViewStyle} y12 - A style object that applies 12px inner spacing in the vertical direction\n * @property {ViewStyle} y16 - A style object that applies 16px inner spacing in the vertical direction\n * @property {ViewStyle} y24 - A style object that applies 24px inner spacing in the vertical direction\n * @property {ViewStyle} y32 - A style object that applies 32px inner spacing in the vertical direction\n * @property {(value: number) => ViewStyle} top - Returns a style object that sets the inner spacing of the component's top direction by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} top4 - A style object that applies 4px inner spacing to the top\n * @property {ViewStyle} top8 - A style object that applies 8px inner spacing to the top\n * @property {ViewStyle} top12 - A style object that applies 12px inner spacing to the top\n * @property {ViewStyle} top16 - A style object that applies 16px inner spacing to the top\n * @property {ViewStyle} top24 - A style object that applies 24px inner spacing to the top\n * @property {ViewStyle} top32 - A style object that applies 32px inner spacing to the top\n * @property {(value: number) => ViewStyle} right - Returns a style object that sets the inner spacing of the component's right direction by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} right4 - A style object that applies 4px inner spacing to the right\n * @property {ViewStyle} right8 - A style object that applies 8px inner spacing to the right\n * @property {ViewStyle} right12 - A style object that applies 12px inner spacing to the right\n * @property {ViewStyle} right16 - A style object that applies 16px inner spacing to the right\n * @property {ViewStyle} right24 - A style object that applies 24px inner spacing to the right\n * @property {ViewStyle} right32 - A style object that applies 32px inner spacing to the right\n * @property {(value: number) => ViewStyle} bottom - Returns a style object that sets the inner spacing of the component's bottom direction by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} bottom4 - A style object that applies 4px inner spacing to the bottom\n * @property {ViewStyle} bottom8 - A style object that applies 8px inner spacing to the bottom\n * @property {ViewStyle} bottom12 - A style object that applies 12px inner spacing to the bottom\n * @property {ViewStyle} bottom16 - A style object that applies 16px inner spacing to the bottom\n * @property {ViewStyle} bottom24 - A style object that applies 24px inner spacing to the bottom\n * @property {ViewStyle} bottom32 - A style object that applies 32px inner spacing to the bottom\n * @property {(value: number) => ViewStyle} left - Returns a style object that sets the inner spacing of the component's left direction by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} left4 - A style object that applies 4px inner spacing to the left\n * @property {ViewStyle} left8 - A style object that applies 8px inner spacing to the left\n * @property {ViewStyle} left12 - A style object that applies 12px inner spacing to the left\n * @property {ViewStyle} left16 - A style object that applies 16px inner spacing to the left\n * @property {ViewStyle} left24 - A style object that applies 24px inner spacing to the left\n * @property {ViewStyle} left32 - A style object that applies 32px inner spacing to the left\n *\n * @example\n * ### Example of applying 8px inner spacing in horizontal and vertical directions, and 100px spacing in the bottom direction\n *\n * ```tsx\n * import { padding } from '@granite-js/react-native';\n * import { View } from 'react-native';\n *\n * function Component() {\n *   return (\n *     <View>\n *       <View style={padding.x8}>\n *         <Text>Has horizontal spacing</Text>\n *       </View>\n *       <View style={padding.y8}>\n *         <Text>Has vertical spacing</Text>\n *       </View>\n *       <View style={padding.bottom(100)}>\n *         <Text>Has 100px spacing at the bottom</Text>\n *       </View>\n *     </View>\n *   );\n * }\n * ```\n */\nexport const padding = createSpacingWithProperty('padding');\n\n/**\n * @public\n * @category UI\n * @name margin\n * @description\n * The `margin` function sets the outer spacing of a component to create appropriate spacing between components. You can specify horizontal (x), vertical (y), and individual direction (top, right, bottom, left) spacing using numbers.\n * You can apply the same value to all directions by entering a number, or set individual values for each direction. There are also presets for commonly used values for easy application.\n *\n * @param {BoxSpacingOption} option - The option value to specify outer spacing. If you enter a number, it applies the same value to all directions,\n * or you can set individual values for each direction.\n * @property {(value: number) => ViewStyle} x - Returns a style object that sets the outer spacing of the component's horizontal direction (left and right) by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} x4 - A style object that applies 4px outer spacing in the horizontal direction\n * @property {ViewStyle} x8 - A style object that applies 8px outer spacing in the horizontal direction\n * @property {ViewStyle} x12 - A style object that applies 12px outer spacing in the horizontal direction\n * @property {ViewStyle} x16 - A style object that applies 16px outer spacing in the horizontal direction\n * @property {ViewStyle} x24 - A style object that applies 24px outer spacing in the horizontal direction\n * @property {ViewStyle} x32 - A style object that applies 32px outer spacing in the horizontal direction\n * @property {(value: number) => ViewStyle} y - Returns a style object that sets the outer spacing of the component's vertical direction (top and bottom) by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} y4 - A style object that applies 4px outer spacing in the vertical direction\n * @property {ViewStyle} y8 - A style object that applies 8px outer spacing in the vertical direction\n * @property {ViewStyle} y12 - A style object that applies 12px outer spacing in the vertical direction\n * @property {ViewStyle} y16 - A style object that applies 16px outer spacing in the vertical direction\n * @property {ViewStyle} y24 - A style object that applies 24px outer spacing in the vertical direction\n * @property {ViewStyle} y32 - A style object that applies 32px outer spacing in the vertical direction\n * @property {(value: number) => ViewStyle} top - Returns a style object that sets the outer spacing of the component's top direction by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} top4 - A style object that applies 4px outer spacing to the top\n * @property {ViewStyle} top8 - A style object that applies 8px outer spacing to the top\n * @property {ViewStyle} top12 - A style object that applies 12px outer spacing to the top\n * @property {ViewStyle} top16 - A style object that applies 16px outer spacing to the top\n * @property {ViewStyle} top24 - A style object that applies 24px outer spacing to the top\n * @property {ViewStyle} top32 - A style object that applies 32px outer spacing to the top\n * @property {(value: number) => ViewStyle} right - Returns a style object that sets the outer spacing of the component's right direction by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} right4 - A style object that applies 4px outer spacing to the right\n * @property {ViewStyle} right8 - A style object that applies 8px outer spacing to the right\n * @property {ViewStyle} right12 - A style object that applies 12px outer spacing to the right\n * @property {ViewStyle} right16 - A style object that applies 16px outer spacing to the right\n * @property {ViewStyle} right24 - A style object that applies 24px outer spacing to the right\n * @property {ViewStyle} right32 - A style object that applies 32px outer spacing to the right\n * @property {(value: number) => ViewStyle} bottom - Returns a style object that sets the outer spacing of the component's bottom direction by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} bottom4 - A style object that applies 4px outer spacing to the bottom\n * @property {ViewStyle} bottom8 - A style object that applies 8px outer spacing to the bottom\n * @property {ViewStyle} bottom12 - A style object that applies 12px outer spacing to the bottom\n * @property {ViewStyle} bottom16 - A style object that applies 16px outer spacing to the bottom\n * @property {ViewStyle} bottom24 - A style object that applies 24px outer spacing to the bottom\n * @property {ViewStyle} bottom32 - A style object that applies 32px outer spacing to the bottom\n * @property {(value: number) => ViewStyle} left - Returns a style object that sets the outer spacing of the component's left direction by the input number. The returned object is passed to the component's `style` property to apply the spacing.\n * @property {ViewStyle} left4 - A style object that applies 4px outer spacing to the left\n * @property {ViewStyle} left8 - A style object that applies 8px outer spacing to the left\n * @property {ViewStyle} left12 - A style object that applies 12px outer spacing to the left\n * @property {ViewStyle} left16 - A style object that applies 16px outer spacing to the left\n * @property {ViewStyle} left24 - A style object that applies 24px outer spacing to the left\n * @property {ViewStyle} left32 - A style object that applies 32px outer spacing to the left\n *\n * @example\n * ### Example of applying 8px outer spacing in horizontal and vertical directions, and 100px spacing in the bottom direction\n *\n * ```tsx\n * import { margin } from '@granite-js/react-native';\n * import { View } from 'react-native';\n *\n * function Component() {\n *   return (\n *     <View>\n *       <View style={margin.x8}>\n *         <Text>Has horizontal spacing</Text>\n *       </View>\n *       <View style={margin.y8}>\n *         <Text>Has vertical spacing</Text>\n *       </View>\n *       <View style={margin.bottom(100)}>\n *         <Text>Has 100px spacing at the bottom</Text>\n *       </View>\n *     </View>\n *   );\n * }\n * ```\n */\nexport const margin = createSpacingWithProperty('margin');\n\nfunction capitalizeFirstLetter(str: string) {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n}\n"
  },
  {
    "path": "packages/style-utils/src/children.spec.tsx",
    "content": "import { render } from '@testing-library/react-native';\nimport { View } from 'react-native';\nimport type { ReactTestRendererJSON } from 'react-test-renderer';\nimport { Children } from './children';\nimport { Spacing } from './spacing';\n\ndescribe('Children', () => {\n  describe('Gap', () => {\n    function Spacing16() {\n      return <Spacing size={16} />;\n    }\n\n    it(`Children.Gap renders with gap components added between child elements`, () => {\n      const childCount = 5;\n      const children = new Array(childCount).fill(null).map((_, index) => <View key={index} />);\n      const treeJSON = render(\n        <Children.Gap gap={<Spacing16 />}>{children}</Children.Gap>\n      ).toJSON() as ReactTestRendererJSON[];\n\n      // Number of children + number of gaps between children\n      expect(treeJSON.length).toBe(childCount + childCount - 1);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/style-utils/src/children.tsx",
    "content": "import React, { Fragment, type ReactNode } from 'react';\n\n/**\n * @category Constants\n * @name Children\n * @description\n * `Children` provides various components for controlling layouts related to child elements.\n *\n * @property {ChildrenGap} Gap - `Children.Gap` is a component used to add a specified component (gap) between multiple child elements when rendering.\n */\nexport const Children = {\n  /**\n   * @name Children.Gap\n   * @description Renders a gap component between ReactNode children.\n   */\n  Gap: ChildrenGap,\n};\n\ninterface ChildrenGapProps {\n  children: ReactNode;\n  gap: ReactNode;\n}\n\n/**\n * @category Components\n * @name ChildrenGap\n * @description\n * `Children.Gap` is a useful component for maintaining consistent layouts by adding spacing (gap) between multiple child elements.\n * Using this component allows you to apply consistent spacing between child elements, resulting in a cleaner and more consistent UI design.\n *\n * @param {object} props - The `props` object passed to the component.\n * @param {ReactNode} props.children - The child components to be rendered.\n * @param {ReactNode} props.gap - The component to be placed between child elements. `gap` must be a valid React component.\n *\n * @throws {Error} An error occurs when `gap` is not a valid React component. `gap` must use `React.Element`.\n *\n * @example\n * ## When you want to add 16px spacing between child elements\n *\n * ```tsx\n * import { Children, Spacing } from '@granite-js/react-native';\n * import { Text } from 'react-native';\n *\n * function Component() {\n *   return (\n *     <Children.Gap gap={<Spacing size={16} />}>\n *       <Text>First</Text>\n *       <Text>Second</Text>\n *       <Text>Third</Text>\n *     </Children.Gap>\n *   );\n * }\n * ```\n */\nfunction ChildrenGap({ children, gap }: ChildrenGapProps) {\n  if (!React.isValidElement(gap)) {\n    throw new Error('gap prop must be a component.');\n  }\n\n  return (\n    <>\n      {React.Children.map(children, (child, index) => {\n        const isLastChild = index === React.Children.count(children) - 1;\n\n        return (\n          <Fragment key={index}>\n            {child}\n            {!isLastChild && child != null ? gap : undefined}\n          </Fragment>\n        );\n      })}\n    </>\n  );\n}\n"
  },
  {
    "path": "packages/style-utils/src/flex.spec.tsx",
    "content": "import { render, renderHook, screen } from '@testing-library/react-native';\nimport { useRef } from 'react';\nimport { View } from 'react-native';\nimport type { ReactTestRendererJSON } from 'react-test-renderer';\nimport { flex, Flex } from './flex';\n\ndescribe('Flex', () => {\n  it(`Flex is rendered as <View />`, () => {\n    const treeJSON = render(<Flex />).toJSON() as ReactTestRendererJSON;\n    expect(treeJSON.type).toBe('View');\n  });\n\n  it('Flex.Center applies align=\"center\" justify=\"center\"', () => {\n    render(<Flex.Center testID=\"flex\" />);\n    expect(screen.getByTestId('flex')).toHaveStyle({\n      display: 'flex',\n      justifyContent: 'center',\n      alignItems: 'center',\n      flexDirection: 'column',\n    });\n  });\n\n  it('Flex.CenterVertical applies justify=\"center\"', () => {\n    render(<Flex.CenterVertical testID=\"flex\" />);\n    expect(screen.getByTestId('flex')).toHaveStyle({\n      display: 'flex',\n      justifyContent: 'center',\n      alignItems: 'stretch',\n      flexDirection: 'column',\n    });\n  });\n\n  it('Flex.CenterHorizontal applies justyfyContent=\"center\"', () => {\n    render(<Flex.CenterHorizontal testID=\"flex\" />);\n    expect(screen.getByTestId('flex')).toHaveStyle({\n      display: 'flex',\n      justifyContent: 'flex-start',\n      alignItems: 'center',\n      flexDirection: 'column',\n    });\n  });\n\n  describe('ref', () => {\n    it(`Flex should be able to receive ref`, () => {\n      const {\n        result: { current: ref },\n      } = renderHook(() => useRef<View>(null));\n\n      render(<Flex ref={ref} />);\n\n      expect(ref.current).not.toBeNull();\n    });\n  });\n});\n\ndescribe('flex', () => {\n  it(`when passing an empty object to flex, it returns defaultProps with display=\"flex\" direction=\"column\" justify=\"flex-start\" align=\"stretch\"`, () => {\n    const result = flex({});\n    expect(result).toMatchInlineSnapshot(`\n      {\n        \"alignItems\": \"stretch\",\n        \"display\": \"flex\",\n        \"flexDirection\": \"column\",\n        \"justifyContent\": \"flex-start\",\n      }\n    `);\n  });\n\n  it(`when passing string to flex, it returns with align, justify, direction applied`, () => {\n    const result = flex('flex-start', 'center', 'row');\n    expect(result).toMatchInlineSnapshot(`\n      {\n        \"alignItems\": \"flex-start\",\n        \"display\": \"flex\",\n        \"flexDirection\": \"row\",\n        \"justifyContent\": \"center\",\n      }\n    `);\n  });\n\n  it('flex.center() returns with justyfy=\"center\" align=\"center\"', () => {\n    const result = flex.center();\n    expect(result).toMatchInlineSnapshot(`\n      {\n        \"alignItems\": \"center\",\n        \"display\": \"flex\",\n        \"flexDirection\": \"column\",\n        \"justifyContent\": \"center\",\n      }\n    `);\n  });\n});\n"
  },
  {
    "path": "packages/style-utils/src/flex.tsx",
    "content": "import { forwardRef, type ReactElement, type ReactNode, type Ref } from 'react';\nimport { View, type ViewProps, type ViewStyle } from 'react-native';\n\ninterface FlexOptions {\n  align?: ViewStyle['alignItems'];\n  justify?: ViewStyle['justifyContent'];\n  direction?: ViewStyle['flexDirection'];\n}\n\ninterface Props extends FlexOptions, ViewProps {\n  style?: ViewProps['style'];\n  children?: ReactNode;\n}\n\ntype FlexReturnType = (props: Props & { ref?: Ref<View> }) => ReactElement | null;\n\nexport function flex(options: FlexOptions | ViewStyle['alignItems']): ViewStyle;\nexport function flex(\n  align: ViewStyle['alignItems'] | FlexOptions,\n  justify?: ViewStyle['justifyContent'],\n  direction?: ViewStyle['flexDirection']\n): ViewStyle;\nexport function flex(\n  alignOrFlexOptions: FlexOptions | ViewStyle['alignItems'],\n  justify: ViewStyle['justifyContent'] = 'flex-start',\n  direction: ViewStyle['flexDirection'] = 'column'\n): ViewStyle {\n  if (typeof alignOrFlexOptions === 'object') {\n    const { align = 'stretch', direction = 'column', justify = 'flex-start' } = alignOrFlexOptions;\n\n    return {\n      alignItems: align,\n      display: 'flex',\n      flexDirection: direction,\n      justifyContent: justify,\n    };\n  }\n\n  return {\n    display: 'flex',\n    alignItems: alignOrFlexOptions,\n    flexDirection: direction,\n    justifyContent: justify,\n  };\n}\n\nflex.center = (direction?: FlexOptions['direction']) => flex({ justify: 'center', align: 'center', direction });\n\nconst BaseFlex = forwardRef<View, Props>(function (\n  { align = 'stretch', justify = 'flex-start', direction = 'column', style, ...restProps },\n  ref\n) {\n  return <View ref={ref} style={[flex({ align, direction, justify }), style]} {...restProps} />;\n}) as FlexReturnType;\n\ntype FlexType = typeof BaseFlex & {\n  Center: typeof BaseFlex;\n  CenterVertical: typeof BaseFlex;\n  CenterHorizontal: typeof BaseFlex;\n};\n\n/**\n * @public\n * @category UI\n * @name Flex\n * @description\n * `Flex` is a component that arranges child elements based on [**Flexbox Layout**](https://reactnative.dev/docs/0.72/flexbox). Using Flexbox, you can easily align elements horizontally and vertically, and set center alignment with ease.\n * Use `Flex.Center` to place child elements in the center, `Flex.CenterVertical` for vertical center alignment, and `Flex.CenterHorizontal` for horizontal center alignment.\n *\n * @param {object} [props] - The `props` object passed to the component.\n * @param {'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'} [props.align = 'stretch'] - The alignment value for child elements along the main axis (Flex direction). For example, in `'column'` direction, `'center'` places elements at the horizontal center, and `'stretch'` expands elements to match the parent's width when their width is `'auto'`. This value is applied to [`alignItems`](https://reactnative.dev/docs/0.72/layout-props#alignitems), with a default value of `'stretch'`.\n * @param {'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'} [props.justify = 'flex-start'] - The alignment value for child elements along the cross axis (perpendicular to Flex direction). For example, in `'column'` direction, `flex-start` places elements at the top of the parent, and `'center'` places them at the vertical center. This value is applied to [`justifyContent`](https://reactnative.dev/docs/0.72/layout-props#justifycontent), with a default value of `'flex-start'`.\n * @param {'column' | 'row'} [props.direction = 'column'] - The value that sets the direction in which child elements are arranged. This is applied to [`flexDirection`](https://reactnative.dev/docs/0.72/layout-props#flexdirection), with a default value of `'column'`.\n * @param {ViewProps['style']} [props.style] - The `style` object to be applied to the `Flex` component. Used to specify styles other than Flexbox layout, such as background color, border, and margin. Default value is `undefined`.\n *\n * @property {FlexCenter} [Center] - `Flex.Center` is a component that places child elements at the exact center both horizontally and vertically based on **Flex Layout**.\n * @property {FlexCenterVertical} [CenterVertical] - `Flex.CenterVertical` is a component for **vertically centering** child elements based on Flex Layout.\n * @property {FlexCenterHorizontal} [CenterHorizontal] - `Flex.CenterHorizontal` is a component for **horizontally centering** child elements based on Flex Layout.\n *\n * @example\n * ### Example of arranging elements horizontally and vertically\n *\n * ```tsx\n * import { Flex } from '@granite-js/react-native';\n * import { Text } from 'react-native';\n *\n * function FlexExample() {\n *   return (\n *     <>\n *       <Flex direction=\"column\">\n *         <Text>Arrange vertically</Text>\n *         <Text>1</Text>\n *         <Text>2</Text>\n *         <Text>3</Text>\n *       </Flex>\n *       <Flex direction=\"row\">\n *         <Text>Arrange horizontally</Text>\n *         <Text>1</Text>\n *         <Text>2</Text>\n *         <Text>3</Text>\n *       </Flex>\n *     </>\n *   );\n * }\n * ```\n */\nexport const Flex = BaseFlex as FlexType;\n\n/**\n * @public\n * @category UI\n * @name FlexCenter\n * @description\n * `Flex.Center` is a component that places child elements at the exact center both horizontally and vertically based on [**Flexbox Layout**](https://reactnative.dev/docs/0.72/flexbox).\n * Both `alignItems` and `justifyContent` properties are set to `'center'`, placing child elements at the center of the parent component.\n * You can easily center-align elements using `Flexbox`.\n *\n * @param {object} [props] - The props object passed to the component.\n * @param {'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'} [props.align = 'center'] - The alignment value for child elements along the main axis (Flex direction). For example, in `'column'` direction, `'center'` places elements at the horizontal center, and `'stretch'` expands elements to match the parent's width when their width is `'auto'`. This value is applied to [`alignItems`](https://reactnative.dev/docs/0.72/layout-props#alignitems), with a default value of `'center'`.\n * @param {'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'} [props.justify = 'center'] - The alignment value for child elements along the cross axis (perpendicular to Flex direction). For example, in `'column'` direction, `flex-start` places elements at the top of the parent, and `'center'` places them at the vertical center. This value is applied to [`justifyContent`](https://reactnative.dev/docs/0.72/layout-props#justifycontent), with a default value of `'center'`.\n * @param {'column' | 'row'} [props.direction = 'column'] - The value that sets the direction in which child elements are arranged. Default value is `'column'`, arranging elements vertically.\n * @param {ViewProps['style']} [props.style] - The `style` object to be applied to the `Flex.Center` component. Used to specify styles other than Flexbox layout, such as background color, border, and margin. Default value is `undefined`.\n *\n * @example\n * ### Example of placing elements at the exact center\n *\n * ```tsx\n * import { Flex } from '@granite-js/react-native';\n * import { Text } from 'react-native';\n *\n * function FlexCenterExample() {\n *   return (\n *     <Flex.Center style={{ width: '100%', height: 100, borderWidth: 1 }}>\n *       <Text>Place at the exact center</Text>\n *     </Flex.Center>\n *   );\n * }\n * ```\n */\nexport const FlexCenter = forwardRef<View, Props>(function FlexCenter(props, ref) {\n  return <BaseFlex align=\"center\" justify=\"center\" {...props} ref={ref} />;\n});\n\n/**\n * @public\n * @category UI\n * @name FlexCenterVertical\n * @description\n * `Flex.CenterVertical` is a component for **vertically centering** child elements based on [**Flexbox Layout**](https://reactnative.dev/docs/0.72/flexbox).\n * The `justifyContent` property is set to `'center'`, placing child elements at the vertical center of the parent component.\n *\n * @param {object} [props] - The props object passed to the component.\n * @param {'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'} [props.align = 'center'] - The alignment value for child elements along the main axis (Flex direction). For example, in `'column'` direction, `'center'` places elements at the horizontal center, and `'stretch'` expands elements to match the parent's width when their width is `'auto'`. This value is applied to [`alignItems`](https://reactnative.dev/docs/0.72/layout-props#alignitems), with a default value of `'stretch'`.\n * @param {'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'} [props.justify = 'center'] - The alignment value for child elements along the cross axis (perpendicular to Flex direction). For example, in `'column'` direction, `flex-start` places elements at the top of the parent, and `'center'` places them at the vertical center. This value is applied to [`justifyContent`](https://reactnative.dev/docs/0.72/layout-props#justifycontent), with a default value of `'center'`.\n * @param {'column' | 'row'} [props.direction = 'column'] - The value that sets the direction in which child elements are arranged. Default value is `'column'`, arranging elements vertically.\n * @param {ViewProps['style']} [props.style] - The `style` object to be applied to the `Flex.CenterVertical` component. Used to specify styles other than Flexbox layout, such as background color, border, and margin. Default value is `undefined`.\n *\n * @example\n * ### Example of vertically centering elements\n *\n * ```tsx\n * import { Flex } from '@granite-js/react-native';\n * import { Text } from 'react-native';\n *\n * function FlexCenterVerticalExample() {\n *   return (\n *     <Flex.CenterVertical style={{ width: '100%', height: 100, borderWidth: 1 }}>\n *       <Text>Place at the vertical center</Text>\n *     </Flex.CenterVertical>\n *   );\n * }\n * ```\n */\nexport const FlexCenterVertical = forwardRef<View, Props>(function FlexCenterVertical(props, ref) {\n  return <BaseFlex justify=\"center\" {...props} ref={ref} />;\n});\n\n/**\n * @public\n * @category UI\n * @name FlexCenterHorizontal\n * @description\n * `Flex.CenterHorizontal` is a component for **horizontally centering** child elements based on [**Flexbox Layout**](https://reactnative.dev/docs/0.72/flexbox).\n * The `alignItems` property is set to `'center'`, placing child elements at the horizontal center of the parent component.\n *\n * @param {object} [props] - The props object passed to the component.\n * @param {'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'} [props.align = 'center'] - The alignment value for child elements along the main axis (Flex direction). For example, in `'column'` direction, `'center'` places elements at the horizontal center, and `'stretch'` expands elements to match the parent's width when their width is `'auto'`. This value is applied to [`alignItems`](https://reactnative.dev/docs/0.72/layout-props#alignitems), with a default value of `'center'`.\n * @param {'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'} [props.justify = 'flex-start'] - The alignment value for child elements along the cross axis (perpendicular to Flex direction). For example, in `'column'` direction, `flex-start` places elements at the top of the parent, and `'center'` places them at the vertical center. This value is applied to [`justifyContent`](https://reactnative.dev/docs/0.72/layout-props#justifycontent), with a default value of `'flex-start'`.\n * @param {'column' | 'row'} [props.direction = 'column'] - The value that sets the direction in which child elements are arranged. Default value is `'column'`, arranging elements vertically.\n * @param {ViewProps['style']} [props.style] - The `style` object to be applied to the `Flex.CenterHorizontal` component. Used to specify styles other than Flexbox layout, such as background color, border, and margin. Default value is `undefined`.\n *\n * @example\n * ### Example of horizontally centering elements\n *\n * ```tsx\n * import { Flex } from '@granite-js/react-native';\n * import { Text } from 'react-native';\n *\n * function FlexCenterHorizontalExample() {\n *   return (\n *     <Flex.CenterHorizontal style={{ width: '100%', height: 100, borderWidth: 1 }}>\n *       <Text>Place at the horizontal center</Text>\n *     </Flex.CenterHorizontal>\n *   );\n * }\n * ```\n */\nexport const FlexCenterHorizontal = forwardRef<View, Props>(function FlexCenterHorizontal(props, ref) {\n  return <BaseFlex align=\"center\" {...props} ref={ref} />;\n});\n\nFlex.Center = FlexCenter as FlexReturnType;\nFlex.CenterVertical = FlexCenterVertical as FlexReturnType;\nFlex.CenterHorizontal = FlexCenterHorizontal as FlexReturnType;\n"
  },
  {
    "path": "packages/style-utils/src/index.ts",
    "content": "export { margin, padding } from './box-spacing';\nexport { Flex } from './flex';\nexport { Spacing } from './spacing';\nexport { Stack } from './stack';\n"
  },
  {
    "path": "packages/style-utils/src/spacing.spec.tsx",
    "content": "import { render, screen } from '@testing-library/react-native';\nimport type { ReactTestRendererJSON } from 'react-test-renderer';\nimport { Spacing } from './spacing';\n\ndescribe('Spacing', () => {\n  it('Spacing is rendered as <View />', () => {\n    const rendererJSON = render(<Spacing size={8} />).toJSON() as ReactTestRendererJSON;\n    expect(rendererJSON.type).toBe('View');\n  });\n\n  it('When Spacing is vertical, it is rendered with \"height\" props', () => {\n    render(<Spacing size={8} testID=\"spacing\" />);\n    expect(screen.getByTestId('spacing')).toHaveStyle({\n      height: 8,\n    });\n  });\n\n  it('When Spacing is horizontal, it is rendered with \"width\" props', () => {\n    render(<Spacing size={8} direction=\"horizontal\" testID=\"spacing\" />);\n    expect(screen.getByTestId('spacing')).toHaveStyle({\n      width: 8,\n    });\n  });\n});\n"
  },
  {
    "path": "packages/style-utils/src/spacing.tsx",
    "content": "import { memo } from 'react';\nimport { View, type StyleProp, type ViewProps, type ViewStyle } from 'react-native';\n\ninterface Props extends ViewProps {\n  size: number;\n  direction?: 'vertical' | 'horizontal';\n  style?: StyleProp<ViewStyle>;\n}\n\n/**\n * @public\n * @category UI\n * @name Spacing\n * @description\n * `Spacing` is a component that adds margin by occupying empty space. You can specify the size of the margin in either horizontal or vertical direction.\n *\n * @param {object} [props] - The `props` object passed to the component.\n * @param {number} props.size - A numeric value that sets the size of the margin.\n * @param {'vertical' | 'horizontal'} [props.direction = 'vertical'] - Sets the direction in which the margin will occupy space. Default value is `'vertical'`.\n * @param {StyleProp<ViewStyle>} [props.style] - The `style` value to be applied to the `Spacing` component. Default value is `undefined`, used when applying additional styles.\n *\n * @example\n * ### Example of creating empty space by adding margins of size `16` in both horizontal and vertical directions\n *\n * ```tsx\n * import { View, Text } from 'react-native';\n * import { Spacing } from '@granite-js/react-native';\n *\n * export function SpacingExample() {\n *   return (\n *     <View>\n *       <Text>Top</Text>\n *       <Spacing size={16} direction=\"vertical\" style={{ backgroundColor: 'red', width: 5 }} />\n *       <Text>Bottom, positioned below by the vertical margin</Text>\n *\n *       <View style={{ flexDirection: 'row' }}>\n *         <Text>Left</Text>\n *         <Spacing size={16} direction=\"horizontal\" style={{ backgroundColor: 'red', height: 5 }} />\n *         <Text>Right, positioned to the side by the horizontal margin</Text>\n *       </View>\n *     </View>\n *   );\n * }\n * ```\n */\nexport const Spacing = memo(function Spacing({ size, direction = 'vertical', style, ...restProps }: Props) {\n  const directionStyle =\n    direction === 'vertical'\n      ? {\n          height: size,\n        }\n      : {\n          width: size,\n        };\n\n  return <View style={[directionStyle, style]} {...restProps} />;\n});\n"
  },
  {
    "path": "packages/style-utils/src/stack.spec.tsx",
    "content": "import { render } from '@testing-library/react-native';\nimport type { ReactTestRendererJSON } from 'react-test-renderer';\nimport { Stack } from './stack';\n\ndescribe('Stack', () => {\n  it('Default Stack is rendered in vertical direction', () => {\n    const rendererJSON = render(<Stack gutter={16} />).toJSON() as ReactTestRendererJSON;\n\n    expect(rendererJSON.props.style[0]).toEqual(\n      expect.objectContaining({\n        flexDirection: 'column',\n      })\n    );\n  });\n\n  describe('Stack.Vertical', () => {\n    it('Stack.Vertical is rendered in vertical direction', () => {\n      const rendererJSON = render(<Stack.Vertical gutter={16} />).toJSON() as ReactTestRendererJSON;\n\n      expect(rendererJSON.props.style[0]).toEqual(\n        expect.objectContaining({\n          flexDirection: 'column',\n        })\n      );\n    });\n  });\n\n  describe('Stack.Horizontal', () => {\n    it('Stack.Horizontal is rendered in horizontal direction', () => {\n      const rendererJSON = render(<Stack.Horizontal gutter={16} />).toJSON() as ReactTestRendererJSON;\n\n      expect(rendererJSON.props.style[0]).toEqual(\n        expect.objectContaining({\n          flexDirection: 'row',\n        })\n      );\n    });\n  });\n});\n"
  },
  {
    "path": "packages/style-utils/src/stack.tsx",
    "content": "import { forwardRef, type ReactElement } from 'react';\nimport { View, type ViewProps, type ViewStyle } from 'react-native';\nimport { Children } from './children';\nimport { Flex } from './flex';\nimport { Spacing } from './spacing';\n\ntype Direction = 'horizontal' | 'vertical';\n\ninterface StackProps extends ViewProps {\n  direction?: Direction;\n  gutter?: number | ReactElement;\n  align?: ViewStyle['alignItems'];\n  justify?: ViewStyle['justifyContent'];\n}\n\nconst BaseStack = forwardRef<View, StackProps>(function BaseStack(props, ref) {\n  const { direction = 'vertical', gutter = 0, children, ...rest } = props;\n\n  return (\n    <Flex ref={ref} direction={direction === 'vertical' ? 'column' : 'row'} {...rest}>\n      <Children.Gap\n        gap={typeof gutter === 'number' ? <Spacing direction={direction} size={gutter ?? 24} /> : props.gutter}\n      >\n        {children}\n      </Children.Gap>\n    </Flex>\n  );\n});\n\n/**\n * @public\n * @category UI\n * @name Stack\n * @description\n * `Stack` is a component that arranges child elements in a stack layout either horizontally or vertically, and allows you to set spacing between child elements.\n * You can specify the direction as horizontal or vertical using the `direction` property, and control the spacing between child elements using the `gutter` property.\n * You can use `Stack.Horizontal` for horizontal arrangement and `Stack.Vertical` for vertical arrangement.\n *\n * @param {object} [props] - The props object passed to the component.\n * @param {'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'} [props.align] - The alignment value for child elements along the main axis (Flex direction). For example, in `'column'` direction, `'center'` places elements at the horizontal center, and `'stretch'` expands elements to match the parent's width when their width is `'auto'`. This value is applied to [`alignItems`](https://reactnative.dev/docs/0.72/layout-props#alignitems).\n * @param {'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'} [props.justify] - The alignment value for child elements along the cross axis (perpendicular to Flex direction). For example, in `'column'` direction, `flex-start` places elements at the top of the parent, and `'center'` places them at the vertical center. This value is applied to [`justifyContent`](https://reactnative.dev/docs/0.72/layout-props#justifycontent).\n * @param {'vertical' | 'horizontal'} [props.direction = 'vertical'] - The value that sets the direction in which child elements are arranged. Default value is `'vertical'`.\n * @param {number | ReactElement} [props.gutter] - The value that sets the spacing between child elements. When a number is provided, it sets the margin in pixels, and when a `ReactElement` is passed, that component is used as the spacing. Using a number allows for precise control of spacing, while using a `ReactElement` enables more complex custom spacing implementations.\n *\n * @property {StackHorizontal} [Horizontal] - `Stack.Horizontal` is a component that arranges child elements in a **horizontal** stack.\n * @property {StackVertical} [Vertical] - `Stack.Vertical` is a component that arranges child elements in a **vertical** stack.\n *\n * @example\n * ### Example of arranging elements horizontally and vertically with a spacing of 16\n *\n * ```tsx\n * import { Text } from 'react-native';\n * import { Stack } from '@granite-js/react-native';\n *\n * export function StackExample() {\n *   return (\n *     <>\n *       <Stack gutter={16} direction=\"horizontal\">\n *         <Text>Arrange horizontally with 16 spacing</Text>\n *         <Text>1</Text>\n *         <Text>2</Text>\n *         <Text>3</Text>\n *       </Stack>\n *       <Stack gutter={16} direction=\"vertical\">\n *         <Text>Arrange vertically with 16 spacing</Text>\n *         <Text>1</Text>\n *         <Text>2</Text>\n *         <Text>3</Text>\n *       </Stack>\n *     </>\n *   );\n * }\n * ```\n */\nexport const Stack = BaseStack as StackType;\n\ntype StackType = typeof BaseStack & {\n  Vertical: typeof StackVertical;\n  Horizontal: typeof StackHorizontal;\n};\n\ntype StackWithoutDirectionProps = Omit<StackProps, 'direction'>;\n\n/**\n * @public\n * @category UI\n * @name StackHorizontal\n * @description\n * `Stack.Horizontal` is a component that arranges child elements in a horizontal stack. Using this component, you can easily control the spacing between child elements with the `gutter` property, maintaining a consistent layout in the horizontal direction.\n *\n * @param {object} [props] - The props object passed to the component.\n * @param {'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'} [props.align = 'stretch'] - The value that sets the horizontal alignment of child elements. Works the same as Flexbox's `align-items` property, with a default value of `'stretch'` that expands child elements to match the parent's width when their width is `'auto'`.\n * @param {'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'} [props.justify = 'flex-start'] - The value that sets the horizontal alignment of child elements. Works the same as Flexbox's `justify-content` property, with a default value of `'flex-start'` that aligns child elements to the top.\n * @param {number | ReactElement} [props.gutter] - The value that sets the spacing between child elements. When a number is provided, it sets the margin in pixels, and when a `ReactElement` is passed, that component is used as the spacing. Using a number allows for precise control of spacing, while using a `ReactElement` enables more complex custom spacing implementations.\n *\n * @example\n * ### Example of arranging elements horizontally with a spacing of 16\n *\n * ```tsx\n * import { Stack } from '@granite-js/react-native';\n * import { View, Text } from 'react-native';\n *\n * function StackHorizontalExample() {\n *   return (\n *     <Stack.Horizontal gutter={16}>\n *       <Text>Arrange horizontally with 16 spacing</Text>\n *       <Text>1</Text>\n *       <Text>2</Text>\n *       <Text>3</Text>\n *     </Stack.Horizontal>\n *   );\n * }\n * ```\n */\nconst StackHorizontal = forwardRef<View, StackWithoutDirectionProps>(function StackHorizontal(props, ref) {\n  return <Stack direction=\"horizontal\" {...props} ref={ref} />;\n});\n\n/**\n * @public\n * @category UI\n * @name StackVertical\n * @description\n * `Stack.Vertical` is a component that arranges child elements in a vertical stack. Using this component, you can easily control the spacing between child elements with the `gutter` property, maintaining a consistent layout in the vertical direction.\n *\n * @param {object} [props] - The props object passed to the component.\n * @param {string} [props.align = 'stretch'] - The value that sets the vertical alignment of child elements. Works the same as Flexbox's `align-items` property, with a default value of `'stretch'` that expands child elements to match the parent's height when their height is `'auto'`.\n * @param {string} [props.justify = 'flex-start'] - The value that sets the horizontal alignment of child elements. Works the same as Flexbox's `justify-content` property, with a default value of `'flex-start'` that aligns child elements to the left.\n * @param {number | ReactElement} [props.gutter] - The value that sets the spacing between child elements. When a number is provided, it sets the margin in pixels, and when a `ReactElement` is passed, that component is used as the spacing. Using a number allows for precise control of spacing, while using a `ReactElement` enables more complex custom spacing implementations.\n *\n * @example\n * ### Example of arranging elements vertically with a spacing of 16\n *\n * ```tsx\n * import { Stack } from '@granite-js/react-native';\n * import { View, Text } from 'react-native';\n *\n * function StackVerticalExample() {\n *   return (\n *     <Stack.Vertical gutter={16}>\n *       <Text>Arrange vertically with 16 spacing</Text>\n *       <Text>1</Text>\n *       <Text>2</Text>\n *       <Text>3</Text>\n *     </Stack.Vertical>\n *   );\n * }\n * ```\n */\nconst StackVertical = forwardRef<View, StackWithoutDirectionProps>(function StackVertical(props, ref) {\n  return <Stack direction=\"vertical\" {...props} ref={ref} />;\n});\n\nStack.Horizontal = StackHorizontal;\nStack.Vertical = StackVertical;\n"
  },
  {
    "path": "packages/style-utils/style-utils.code-workspace",
    "content": "{\n  \"folders\": [\n    {\n      \"path\": \".\",\n    },\n  ],\n  \"settings\": {\n    \"eslint.useFlatConfig\": true,\n    \"eslint.nodePath\": \"../../.yarn/sdks\",\n    \"typescript.enablePromptUseWorkspaceTsdk\": true,\n    \"typescript.tsdk\": \"../../.yarn/sdks/typescript/lib\",\n    \"prettier.prettierPath\": \"../../.yarn/sdks/prettier/index.cjs\",\n    \"prettier.configPath\": \"../../.prettierrc\",\n    \"jest.rootPath\": \".\",\n    \"jest.jestCommandLine\": \"yarn jest\",\n    \"jest.enable\": false,\n  },\n}\n"
  },
  {
    "path": "packages/style-utils/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"emitDeclarationOnly\": true,\n    \"rootDir\": \"./src\",\n    \"outDir\": \"./dist\"\n  },\n  \"exclude\": [\"**/dist/*\", \"**/esm/*\", \"**/*.test.*\", \"**/*.spec.*\", \"**/*.e2e.*\", \"**/__fixtures__/*\"],\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/style-utils/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\", \"@testing-library/jest-native\", \"jest\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/utils/CHANGELOG.md",
    "content": "# @granite-js/utils\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n## 1.0.18\n\n## 1.0.17\n\n## 1.0.16\n\n## 1.0.15\n\n## 1.0.14\n\n## 1.0.13\n\n## 1.0.12\n\n## 1.0.11\n\n## 1.0.10\n\n## 1.0.9\n\n## 1.0.8\n\n## 1.0.7\n\n## 1.0.6\n\n## 1.0.5\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "packages/utils/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "packages/utils/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/utils\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@types/node**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n2. **@types/yauzl**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n3. **tsup**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/egoist/tsup.git\n\t\n4. **yauzl**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/thejoshwolfe/yauzl.git\n\t\n5. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/utils/README.md",
    "content": "# @granite-js/utils\n\n## License\n\nThis software is licensed under the [Apache 2 license](LICENSE), quoted below.\n\n```\nCopyright 2025 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n"
  },
  {
    "path": "packages/utils/package.json",
    "content": "{\n  \"name\": \"@granite-js/utils\",\n  \"type\": \"module\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Utilities for Granite\",\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"build\": \"tsup\"\n  },\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/utils\"\n  },\n  \"exports\": {\n    \".\": {\n      \"import\": {\n        \"types\": \"./dist/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/index.d.cts\",\n        \"default\": \"./dist/index.cjs\"\n      }\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"devDependencies\": {\n    \"@types/node\": \"catalog:tools\",\n    \"@types/yauzl\": \"^2.10.3\",\n    \"tsup\": \"^8.5.0\",\n    \"typescript\": \"catalog:tools\"\n  },\n  \"dependencies\": {\n    \"yauzl\": \"^3.2.0\"\n  },\n  \"sideEffects\": false\n}\n"
  },
  {
    "path": "packages/utils/src/ensureSafetyInvoke.ts",
    "content": "type Fn<T> = (...args: any[]) => T;\n\nexport function ensureSafetyInvokeSync<T>(fn: Fn<T>): Fn<T | null> {\n  return (...args: any[]) => {\n    try {\n      return fn.call(null, ...args);\n    } catch (error) {\n      console.error(error);\n      return null;\n    }\n  };\n}\n"
  },
  {
    "path": "packages/utils/src/getPackageRoot.ts",
    "content": "import fs from 'fs';\nimport path from 'path';\n\nexport function getPackageRoot(): string {\n  let cwd = process.cwd();\n  const root = path.parse(cwd).root;\n\n  while (cwd !== root) {\n    if (fs.existsSync(path.join(cwd, 'package.json'))) {\n      return cwd;\n    }\n    cwd = path.dirname(cwd);\n  }\n\n  return cwd;\n}\n"
  },
  {
    "path": "packages/utils/src/index.ts",
    "content": "export * from './getPackageRoot';\nexport * from './readZipContent';\nexport * from './ensureSafetyInvoke';\nexport * from './localTempDirectory';\n"
  },
  {
    "path": "packages/utils/src/localTempDirectory.ts",
    "content": "import fs from 'fs';\nimport path from 'path';\n\nexport function getLocalTempDirectoryPath(rootDir: string) {\n  return path.resolve(rootDir, '.granite');\n}\n\nexport function prepareLocalDirectory(rootDir: string) {\n  const localDir = getLocalTempDirectoryPath(rootDir);\n\n  if (!fs.existsSync(localDir)) {\n    fs.mkdirSync(localDir, { recursive: true });\n  }\n\n  return localDir;\n}\n"
  },
  {
    "path": "packages/utils/src/readZipContent.ts",
    "content": "import yauzl from 'yauzl';\n\nexport function readZipContent(zipPath: string, fileName: string) {\n  return new Promise<string>((resolve, reject) => {\n    yauzl.open(zipPath, { lazyEntries: true }, (error, zipFile) => {\n      if (error) {\n        reject(error);\n        return;\n      }\n\n      zipFile\n        .on('entry', (entry) => {\n          if (entry.fileName === fileName) {\n            zipFile.openReadStream(entry, (error, readStream) => {\n              if (error) {\n                throw error;\n              }\n\n              let fileData = '';\n              readStream\n                .on('data', (chunk) => (fileData += chunk.toString('utf8')))\n                .on('end', () => {\n                  zipFile.close();\n                  resolve(fileData);\n                });\n            });\n          } else {\n            zipFile.readEntry();\n          }\n        })\n        .on('end', () => {\n          zipFile.close();\n          reject(new Error(`'${fileName}' not found in zip file`));\n        })\n        .on('error', (error) => {\n          zipFile.close();\n          reject(error);\n        });\n\n      zipFile.readEntry();\n    });\n  });\n}\n\nexport function readZipEntries(zipPath: string) {\n  return new Promise<Record<string, string>>((resolve, reject) => {\n    yauzl.open(zipPath, { lazyEntries: true }, (error, zipFile) => {\n      if (error || !zipFile) {\n        reject(error || new Error('Failed to open zip file'));\n        return;\n      }\n\n      const contents: Record<string, string> = {};\n      let processing = 0;\n      let finished = false;\n\n      const maybeFinish = () => {\n        if (finished && processing === 0) {\n          zipFile.close();\n          resolve(contents);\n        }\n      };\n\n      zipFile.readEntry();\n\n      zipFile.on('entry', (entry) => {\n        if (/\\/$/.test(entry.fileName)) {\n          // Ignore directories\n          zipFile.readEntry();\n          return;\n        }\n\n        processing++;\n\n        zipFile.openReadStream(entry, (error, readStream) => {\n          if (error || !readStream) {\n            zipFile.close();\n            reject(error || new Error('Failed to open read stream'));\n            return;\n          }\n\n          const chunks: Buffer[] = [];\n          readStream\n            .on('data', (chunk) => chunks.push(chunk))\n            .on('end', () => {\n              contents[entry.fileName] = Buffer.concat(chunks).toString('utf8');\n              processing--;\n              maybeFinish();\n              zipFile.readEntry();\n            })\n            .on('error', (error) => {\n              zipFile.close();\n              reject(error);\n            });\n        });\n      });\n\n      zipFile.on('end', () => {\n        finished = true;\n        maybeFinish();\n      });\n\n      zipFile.on('error', (error) => {\n        zipFile.close();\n        reject(error);\n      });\n    });\n  });\n}\n"
  },
  {
    "path": "packages/utils/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/utils/tsup.config.ts",
    "content": "import { defineConfig } from 'tsup';\n\nexport default defineConfig({\n  entry: ['src/index.ts'],\n  format: ['esm', 'cjs'],\n  dts: true,\n});\n"
  },
  {
    "path": "packages/video/CHANGELOG.md",
    "content": "# @granite-js/video\n\n## 1.0.23\n\n## 1.0.22\n\n## 1.0.21\n\n## 1.0.20\n\n## 1.0.19\n\n## 1.0.18\n\n## 1.0.17\n\n### Patch Changes\n\n- c090579: Add disableAudioFocus prop and ViewManager stubs for progressUpdateInterval and textTracks\n\n## 1.0.16\n\n## 1.0.15\n\n### Patch Changes\n\n- dfa2f63: Fix iOS video source headers not being passed to the native player\n\n## 1.0.14\n\n### Patch Changes\n\n- 4263c41: fix: video native prop\n\n## 1.0.13\n\n### Patch Changes\n\n- 4218c46: Fix Fabric view recycling bug where video fails to play when remounted with the same source URI\n- dcffed6: fix: make @granite-js/video compatible with react-native-video@6.0.0\n\n## 1.0.12\n\n### Patch Changes\n\n- 61b8058: Add iOS native implementation for onVideoAudioFocusChanged event\n- 61b8058: Improvement to Granite Video Props\n\n## 1.0.11\n\n## 1.0.10\n\n## 1.0.9\n\n## 1.0.8\n\n### Patch Changes\n\n- 503118a: feat(js): add react-native-video v6 compat\n- e059176: feat(android): add react-native-video v6 compat\n\n## 1.0.7\n\n## 1.0.6\n\n### Patch Changes\n\n- 93e31cb: fix(android): fix wrong event name topVideoTransferEnd -> topTransferEnd\n\n## 1.0.5\n\n## 1.0.4\n\n## 1.0.3\n\n### Patch Changes\n\n- 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up\n\n## 1.0.2\n\n### Patch Changes\n\n- b325495: fix(react-native-svg): buffer deps\n\n## 1.0.1\n\n### Patch Changes\n\n- ee26531: fix: align exports map\n\n## 1.0.0\n\n### Major Changes\n\n- 260daab: feat: introduce support react native 0.84\n"
  },
  {
    "path": "packages/video/GraniteVideo.podspec",
    "content": "require \"json\"\n\npackage = JSON.parse(File.read(File.join(__dir__, \"package.json\")))\n\n# ============================================================\n# GraniteVideo Default Provider Configuration\n# ============================================================\n# Priority: GRANITE_VIDEO_DEFAULT_PROVIDER > GRANITE_DEFAULT_PROVIDER_ALL > true (default)\n#\n# Examples:\n#   Include default provider (default):\n#     pod install\n#\n#   Exclude default provider for video only:\n#     GRANITE_VIDEO_DEFAULT_PROVIDER=false pod install\n#\n#   Exclude default providers for all Granite packages:\n#     GRANITE_DEFAULT_PROVIDER_ALL=false pod install\n#\n#   Exclude all but override video to include:\n#     GRANITE_DEFAULT_PROVIDER_ALL=false GRANITE_VIDEO_DEFAULT_PROVIDER=true pod install\n# ============================================================\nresolve_default_provider = lambda do |specific_key, fallback_key, default_value|\n  if ENV.key?(specific_key)\n    ENV[specific_key] == 'true'\n  elsif ENV.key?(fallback_key)\n    ENV[fallback_key] == 'true'\n  else\n    default_value\n  end\nend\n\nuse_default_provider = resolve_default_provider.call(\n  'GRANITE_VIDEO_DEFAULT_PROVIDER',\n  'GRANITE_DEFAULT_PROVIDER_ALL',\n  true\n)\n\n# Exclude AVPlayerProvider when not using default provider\nexclude_patterns = []\nexclude_patterns << \"ios/Providers/AVPlayerProvider.swift\" unless use_default_provider\n\nPod::Spec.new do |s|\n  s.name         = \"GraniteVideo\"\n  s.version      = package[\"version\"]\n  s.summary      = package[\"description\"]\n  s.homepage     = package[\"homepage\"]\n  s.license      = package[\"license\"]\n  s.authors      = package[\"author\"]\n\n  s.platforms    = { :ios => min_ios_version_supported }\n  s.source       = { :git => \"https://github.com/toss/granite.git\", :tag => \"#{s.version}\" }\n\n  s.source_files = \"ios/**/*.{h,m,mm,swift,cpp}\"\n  s.exclude_files = exclude_patterns if exclude_patterns.any?\n\n  # Preprocessor definitions for conditional compilation\n  preprocessor_defs = ['$(inherited)']\n  preprocessor_defs << 'GRANITE_VIDEO_DEFAULT_PROVIDER=1' if use_default_provider\n\n  s.pod_target_xcconfig = {\n    'CLANG_ENABLE_MODULES' => 'YES',\n    'DEFINES_MODULE' => 'YES',\n    'SWIFT_OBJC_INTERFACE_HEADER_NAME' => 'GraniteVideo-Swift.h',\n    'GCC_PREPROCESSOR_DEFINITIONS' => preprocessor_defs.join(' ')\n  }\n\n  s.frameworks = [\"AVFoundation\", \"AVKit\", \"CoreMedia\"]\n\n  # React Native modules dependencies (Fabric/TurboModule)\n  install_modules_dependencies(s)\nend\n"
  },
  {
    "path": "packages/video/NOTICE",
    "content": "NOTICE\n\nThis project makes use of third-party libraries that are licensed under their respective open-source licenses. Below is a list of these libraries, their licenses, and their links for further reference.\n\n================================================================================\nProject Name: @granite-js/video\nCopyright 2026 Viva Republica, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\nThird-Party Libraries:\n\n1. **@granite-js/video**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/toss/granite.git\n\t\n2. **@types/react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/DefinitelyTyped/DefinitelyTyped.git\n\t\n3. **del-cli**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/sindresorhus/del-cli.git\n\t\n4. **eslint**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/eslint/eslint.git\n\t\n5. **react**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/facebook/react.git\n\t\n6. **react-native**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: git+https://github.com/facebook/react-native.git\n\t\n7. **react-native-builder-bob**\n\t\n   - License: MIT\n   - License Text: https://opensource.org/licenses/MIT\n   - Repository: https://github.com/callstack/react-native-builder-bob.git\n\t\n8. **typescript**\n\t\n   - License: Apache-2.0\n   - License Text: https://www.apache.org/licenses/LICENSE-2.0\n   - Repository: https://github.com/microsoft/TypeScript.git\n\t\n\n================================================================================\n\nFor further details about each license, please refer to the provided links. If there are updates to these dependencies, this file should also be updated."
  },
  {
    "path": "packages/video/android/README.md",
    "content": "# GraniteVideo Android\n\nAndroid native module for React Native video player library.\n\n## Module Structure\n\n```\npackages/video/\n├── android/           → granite-video (Core)\n└── android-media3/    → granite-video-media3 (Media3 ExoPlayer implementation)\n```\n\n- **granite-video**: Video player interface, registry, React Native view\n- **granite-video-media3**: Default implementation based on Media3 ExoPlayer\n\n---\n\n## Basic Usage\n\n### 1. Add Dependencies\n\n```gradle\n// app/build.gradle\ndependencies {\n    implementation project(':granite-video')\n    implementation project(':granite-video-media3')  // Media3 ExoPlayer\n}\n```\n\n### 2. Register React Native Packages\n\n```kotlin\n// MainApplication.kt\nimport run.granite.video.GraniteVideoPackage\nimport run.granite.video.media3.GraniteVideoMedia3Package\n\noverride fun getPackages(): List<ReactPackage> {\n    val packages = PackageList(this).packages.toMutableList()\n    packages.add(GraniteVideoPackage())\n    packages.add(GraniteVideoMedia3Package())  // Auto-registers Media3 provider\n    return packages\n}\n```\n\n---\n\n## Media3 Provider (Default)\n\nMedia3 ExoPlayer is the default video provider and is enabled by default.\n\n### Disabling Media3\n\nTo disable Media3 and use a custom provider, you can use either:\n\n**Option 1: gradle.properties**\n\n```properties\ngraniteVideo.useMedia3=false\n```\n\n**Option 2: Environment variable** (takes priority)\n\n```bash\nexport GRANITE_VIDEO_USE_MEDIA3=false\n```\n\nPriority: Environment variable > gradle.properties > default (true)\n\n### Custom Provider Registration\n\nWhen Media3 is disabled, register your custom provider in your Application class:\n\n```kotlin\nclass MyApplication : Application() {\n    override fun onCreate() {\n        super.onCreate()\n\n        GraniteVideoRegistry.registerFactory(\"custom\") { MyCustomProvider() }\n        GraniteVideoRegistry.setDefaultProvider(\"custom\")\n    }\n}\n```\n\n---\n\n## Custom Provider Implementation\n\nTo use a different player (VLC, ijkplayer, etc.) instead of Media3, implement a custom provider.\n\n### 1. Implement GraniteVideoProvider Interface\n\n```kotlin\npackage com.example.video\n\nimport android.content.Context\nimport android.view.View\nimport run.granite.video.provider.*\n\nclass MyCustomProvider : GraniteVideoProvider {\n\n    // Required: Provider identification\n    override val providerId: String = \"custom\"\n    override val providerName: String = \"My Custom Player\"\n\n    // Required: Delegate (event callbacks)\n    override var delegate: GraniteVideoDelegate? = null\n\n    // Required: State properties\n    override val currentTime: Double get() = /* current playback position */\n    override val duration: Double get() = /* total duration */\n    override val isPlaying: Boolean get() = /* is playing */\n\n    // Required: Create player view\n    override fun createPlayerView(context: Context): View {\n        // Return player view (e.g., SurfaceView, TextureView)\n        return MyPlayerView(context)\n    }\n\n    // Required: Load source\n    override fun loadSource(source: GraniteVideoSource) {\n        val uri = source.uri ?: return\n        // Load media from URI\n        // Handle source.headers, source.drm, etc.\n\n        // Fire load start event\n        delegate?.onLoadStart(\n            isNetwork = uri.startsWith(\"http\"),\n            type = source.type ?: \"unknown\",\n            uri = uri\n        )\n    }\n\n    override fun unload() {\n        // Release resources\n    }\n\n    // Required: Playback control\n    override fun play() {\n        // Start playback\n        delegate?.onPlaybackStateChanged(isPlaying = true, isSeeking = false, isLooping = false)\n    }\n\n    override fun pause() {\n        // Pause playback\n        delegate?.onPlaybackStateChanged(isPlaying = false, isSeeking = false, isLooping = false)\n    }\n\n    override fun seek(time: Double, tolerance: Double) {\n        val previousTime = currentTime\n        // Seek to position\n        delegate?.onSeek(currentTime = previousTime, seekTime = time)\n    }\n\n    // Optional: Volume, rate, repeat, etc.\n    override fun setVolume(volume: Float) { /* ... */ }\n    override fun setRate(rate: Float) { /* ... */ }\n    override fun setRepeat(shouldRepeat: Boolean) { /* ... */ }\n\n    // Optional: Release resources\n    fun release() {\n        unload()\n        delegate = null\n    }\n}\n```\n\n### 2. Create Provider Initialization Package\n\n```kotlin\npackage com.example.video\n\nimport com.facebook.react.ReactPackage\nimport com.facebook.react.bridge.NativeModule\nimport com.facebook.react.bridge.ReactApplicationContext\nimport com.facebook.react.uimanager.ViewManager\nimport run.granite.video.provider.GraniteVideoRegistry\n\nclass MyCustomVideoPackage : ReactPackage {\n\n    init {\n        // Register provider when package is instantiated\n        GraniteVideoRegistry.registerFactory(\"custom\") { MyCustomProvider() }\n        GraniteVideoRegistry.setDefaultProvider(\"custom\")\n    }\n\n    override fun createNativeModules(ctx: ReactApplicationContext): List<NativeModule> = emptyList()\n    override fun createViewManagers(ctx: ReactApplicationContext): List<ViewManager<*, *>> = emptyList()\n}\n```\n\n### 3. Register Package in MainApplication\n\n```kotlin\n// MainApplication.kt\nimport run.granite.video.GraniteVideoPackage\nimport com.example.video.MyCustomVideoPackage\n\noverride fun getPackages(): List<ReactPackage> {\n    val packages = PackageList(this).packages.toMutableList()\n\n    // Core Package (required)\n    packages.add(GraniteVideoPackage())\n\n    // Custom Provider Package (instead of Media3Package)\n    packages.add(MyCustomVideoPackage())\n\n    return packages\n}\n```\n\n---\n\n## Provider Event Callbacks\n\nProviders communicate events via `delegate`:\n\n| Method                                                    | Description                                |\n| --------------------------------------------------------- | ------------------------------------------ |\n| `onLoadStart(isNetwork, type, uri)`                       | Source load started                        |\n| `onLoad(data)`                                            | Load complete (duration, dimensions, etc.) |\n| `onProgress(data)`                                        | Playback progress                          |\n| `onError(error)`                                          | Error occurred                             |\n| `onEnd()`                                                 | Playback ended                             |\n| `onBuffer(isBuffering)`                                   | Buffering state changed                    |\n| `onPlaybackStateChanged(isPlaying, isSeeking, isLooping)` | Playback state changed                     |\n| `onSeek(currentTime, seekTime)`                           | Seek completed                             |\n\n---\n\n## License\n\nApache License 2.0\n"
  },
  {
    "path": "packages/video/android/build.gradle",
    "content": "buildscript {\n  ext.getExtOrDefault = {name ->\n    return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['GraniteVideo_' + name]\n  }\n\n  repositories {\n    google()\n    mavenCentral()\n  }\n\n  dependencies {\n    classpath \"com.android.tools.build:gradle:8.7.2\"\n    // noinspection DifferentKotlinGradleVersion\n    classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}\"\n  }\n}\n\n\napply plugin: \"com.android.library\"\napply plugin: \"kotlin-android\"\n\napply plugin: \"com.facebook.react\"\n\ndef getExtOrIntegerDefault(name) {\n  return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties[\"GraniteVideo_\" + name]).toInteger()\n}\n\n// Check useMedia3 flag from environment variable or gradle.properties (default: true)\n// Priority: Environment variable > root gradle.properties > module gradle.properties > default (true)\ndef useMedia3Flag = System.getenv('GRANITE_VIDEO_USE_MEDIA3') ?: rootProject.findProperty('graniteVideo.useMedia3')?.toString() ?: project.findProperty('graniteVideo.useMedia3')?.toString()\ndef useMedia3 = useMedia3Flag != 'false'\n\nandroid {\n  namespace \"run.granite.video\"\n\n  compileSdkVersion getExtOrIntegerDefault(\"compileSdkVersion\")\n\n  defaultConfig {\n    minSdkVersion getExtOrIntegerDefault(\"minSdkVersion\")\n    targetSdkVersion getExtOrIntegerDefault(\"targetSdkVersion\")\n\n    // Pass flag to BuildConfig for conditional registration\n    buildConfigField \"boolean\", \"USE_MEDIA3\", useMedia3.toString()\n  }\n\n  buildFeatures {\n    buildConfig true\n  }\n\n  buildTypes {\n    release {\n      minifyEnabled false\n    }\n  }\n\n  lintOptions {\n    disable \"GradleCompatible\"\n  }\n\n  compileOptions {\n    sourceCompatibility JavaVersion.VERSION_1_8\n    targetCompatibility JavaVersion.VERSION_1_8\n  }\n\n  sourceSets {\n    main {\n      java {\n        srcDirs += [\"generated/java\", \"generated/jni\"]\n        // Conditionally include Media3 sources\n        if (useMedia3) {\n          srcDirs += [\"src/media3/java\"]\n        }\n      }\n      // Use different manifest based on Media3 flag\n      // - media3 manifest includes ContentProvider for auto-initialization\n      // - main manifest is empty (for custom provider use case)\n      if (useMedia3) {\n        manifest.srcFile \"src/media3/AndroidManifest.xml\"\n      }\n    }\n  }\n}\n\nrepositories {\n  mavenCentral()\n  google()\n}\n\ndef kotlin_version = getExtOrDefault(\"kotlinVersion\")\n\ndependencies {\n  implementation \"com.facebook.react:react-android\"\n  implementation \"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version\"\n\n  // Media3 ExoPlayer dependencies (conditional)\n  if (useMedia3) {\n    implementation \"androidx.media3:media3-exoplayer:1.2.1\"\n    implementation \"androidx.media3:media3-exoplayer-dash:1.2.1\"\n    implementation \"androidx.media3:media3-exoplayer-hls:1.2.1\"\n    implementation \"androidx.media3:media3-exoplayer-smoothstreaming:1.2.1\"\n    implementation \"androidx.media3:media3-datasource:1.2.1\"\n    implementation \"androidx.media3:media3-ui:1.2.1\"\n  }\n\n  // Test dependencies\n  testImplementation \"io.kotest:kotest-runner-junit5:5.9.1\"\n  testImplementation \"io.kotest:kotest-assertions-core:5.9.1\"\n  testImplementation \"io.kotest:kotest-property:5.9.1\"\n  testImplementation \"io.mockk:mockk:1.13.9\"\n  testImplementation \"org.robolectric:robolectric:4.11.1\"\n  testImplementation \"junit:junit:4.13.2\"\n}\n\ntasks.withType(Test).configureEach {\n  useJUnitPlatform()\n}\n\n"
  },
  {
    "path": "packages/video/android/gradle.properties",
    "content": "GraniteVideo_kotlinVersion=2.1.20\nGraniteVideo_minSdkVersion=24\nGraniteVideo_targetSdkVersion=35\nGraniteVideo_compileSdkVersion=35\nGraniteVideo_ndkVersion=27.1.12297006\n\n# Media3 provider enabled by default\ngraniteVideo.useMedia3=true\n"
  },
  {
    "path": "packages/video/android/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n</manifest>\n"
  },
  {
    "path": "packages/video/android/src/main/java/run/granite/video/GraniteVideoModule.kt",
    "content": "package run.granite.video\n\nimport com.facebook.react.bridge.ReactApplicationContext\nimport com.facebook.react.bridge.ReactContextBaseJavaModule\nimport com.facebook.react.bridge.ReactMethod\nimport com.facebook.react.bridge.Promise\nimport com.facebook.react.bridge.ReadableMap\nimport run.granite.video.provider.GraniteVideoRegistry\n\nclass GraniteVideoModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {\n\n    override fun getName(): String = NAME\n\n    @ReactMethod\n    fun clearCache(promise: Promise) {\n        try {\n            GraniteVideoRegistry.createProvider()?.clearCache()\n            promise.resolve(null)\n        } catch (e: Exception) {\n            promise.reject(\"CLEAR_CACHE_ERROR\", e.message, e)\n        }\n    }\n\n    @ReactMethod\n    fun getWidevineLevel(promise: Promise) {\n        try {\n            val level = GraniteVideoRegistry.createProvider()?.getWidevineLevel() ?: 0\n            promise.resolve(level)\n        } catch (e: Exception) {\n            promise.reject(\"WIDEVINE_ERROR\", e.message, e)\n        }\n    }\n\n    @ReactMethod\n    fun isCodecSupported(mimeType: String, width: Int, height: Int, promise: Promise) {\n        try {\n            val supported = GraniteVideoRegistry.createProvider()?.isCodecSupported(mimeType, width, height) ?: false\n            promise.resolve(supported)\n        } catch (e: Exception) {\n            promise.reject(\"CODEC_ERROR\", e.message, e)\n        }\n    }\n\n    @ReactMethod\n    fun isHEVCSupported(promise: Promise) {\n        try {\n            val supported = GraniteVideoRegistry.createProvider()?.isHEVCSupported() ?: false\n            promise.resolve(supported)\n        } catch (e: Exception) {\n            promise.reject(\"HEVC_ERROR\", e.message, e)\n        }\n    }\n\n    @ReactMethod\n    fun getCurrentPosition(viewTag: Int, promise: Promise) {\n        // This would need to find the view by tag and get the current position\n        // For now, return 0\n        promise.resolve(0.0)\n    }\n\n    @ReactMethod\n    fun save(viewTag: Int, options: ReadableMap?, promise: Promise) {\n        // Save functionality - would need implementation\n        promise.reject(\"NOT_IMPLEMENTED\", \"Save is not implemented on Android\")\n    }\n\n    companion object {\n        const val NAME = \"GraniteVideoModule\"\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/main/java/run/granite/video/GraniteVideoPackage.kt",
    "content": "package run.granite.video\n\nimport com.facebook.react.ReactPackage\nimport com.facebook.react.bridge.NativeModule\nimport com.facebook.react.bridge.ReactApplicationContext\nimport com.facebook.react.uimanager.ViewManager\n\n/**\n * React Native package for GraniteVideo core functionality.\n *\n * This package provides the video view and module.\n * Video provider registration is handled automatically via ContentProvider\n * when USE_MEDIA3 is enabled (default).\n *\n * ## Basic Usage\n * ```kotlin\n * // Default configuration (uses Media3)\n * packages.add(GraniteVideoPackage())\n * ```\n *\n * ## Custom Provider Configuration\n * To disable Media3 and use a custom provider:\n * ```\n * // In gradle.properties\n * graniteVideo.useMedia3=false\n * ```\n *\n * Then register your custom provider:\n * ```kotlin\n * GraniteVideoRegistry.registerFactory(\"custom\") { MyCustomProvider() }\n * GraniteVideoRegistry.setDefaultProvider(\"custom\")\n * ```\n */\nclass GraniteVideoPackage : ReactPackage {\n\n    override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {\n        return listOf(GraniteVideoViewManager())\n    }\n\n    override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {\n        return listOf(GraniteVideoModule(reactContext))\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/main/java/run/granite/video/GraniteVideoView.kt",
    "content": "package run.granite.video\n\nimport android.content.Context\nimport android.widget.FrameLayout\nimport run.granite.video.provider.*\n\n/**\n * Video view that wraps a GraniteVideoProvider.\n *\n * Provider selection:\n * - Default: Uses the provider set via GraniteVideoRegistry.setDefaultProvider()\n * - Custom: Can inject a custom providerFactory for unit tests\n *\n * If no provider is registered, an IllegalStateException will be thrown.\n *\n * To change the default provider at runtime, use GraniteVideoModule.setDefaultProvider()\n * from JavaScript before creating new video views.\n */\nclass GraniteVideoView @JvmOverloads constructor(\n    context: Context,\n    private val providerFactory: (() -> GraniteVideoProvider)? = null\n) : FrameLayout(context), GraniteVideoDelegate {\n\n    private var provider: GraniteVideoProvider? = null\n    private var playerView: android.view.View? = null\n\n    // State\n    private var paused: Boolean = true\n    private var muted: Boolean = false\n    private var volume: Float = 1.0f\n    private var rate: Float = 1.0f\n    private var repeat: Boolean = false\n    private var resizeMode: String = \"contain\"\n\n    // Event listener\n    var eventListener: GraniteVideoEventListener? = null\n\n    // Expose provider for testing\n    val currentProvider: GraniteVideoProvider?\n        get() = provider\n\n    init {\n        setupProvider(context)\n    }\n\n    private fun setupProvider(context: Context) {\n        // Create provider using:\n        // 1. Custom factory (for testing)\n        // 2. Default from registry (set via GraniteVideoRegistry.setDefaultProvider)\n        provider = providerFactory?.invoke()\n            ?: GraniteVideoRegistry.createProvider()\n            ?: throw IllegalStateException(\n                \"No video provider registered. Either register a provider via \" +\n                \"GraniteVideoRegistry.registerFactory() or enable the default provider \" +\n                \"by setting GRANITE_VIDEO_DEFAULT_PROVIDER=true.\"\n            )\n\n        provider?.delegate = this\n\n        // Create player view\n        playerView = provider?.createPlayerView(context)\n        playerView?.let {\n            it.layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)\n            addView(it)\n        }\n    }\n\n    // Source\n    @Suppress(\"UNCHECKED_CAST\")\n    fun setSource(source: Map<String, Any>?) {\n        source ?: return\n\n        val headers = source[\"headers\"] as? Map<String, String>\n\n        val videoSource = GraniteVideoSource(\n            uri = source[\"uri\"] as? String,\n            type = source[\"type\"] as? String,\n            startTime = (source[\"startTime\"] as? Number)?.toDouble() ?: 0.0,\n            endTime = (source[\"endTime\"] as? Number)?.toDouble() ?: 0.0,\n            headers = headers,\n            drm = parseDrm(source[\"drm\"] as? Map<String, Any>),\n            isNetwork = source[\"isNetwork\"] as? Boolean,\n            isAsset = source[\"isAsset\"] as? Boolean ?: false,\n            isLocalAssetFile = source[\"isLocalAssetFile\"] as? Boolean ?: false,\n            shouldCache = source[\"shouldCache\"] as? Boolean ?: true,\n            mainVer = (source[\"mainVer\"] as? Number)?.toInt() ?: 0,\n            patchVer = (source[\"patchVer\"] as? Number)?.toInt() ?: 0,\n            contentStartTime = (source[\"contentStartTime\"] as? Number)?.toDouble() ?: -1.0,\n            minLoadRetryCount = (source[\"minLoadRetryCount\"] as? Number)?.toInt() ?: 3,\n            textTracksAllowChunklessPreparation = source[\"textTracksAllowChunklessPreparation\"] as? Boolean ?: true,\n            metadata = parseMetadata(source[\"metadata\"] as? Map<String, Any>),\n            cmcd = parseCmcd(source[\"cmcd\"] as? Map<String, Any>),\n            textTracks = parseTextTracks(source[\"textTracks\"] as? List<Map<String, Any>>),\n            ad = parseAdsConfig(source[\"ad\"] as? Map<String, Any>),\n            bufferConfig = parseBufferConfig(source[\"bufferConfig\"] as? Map<String, Any>)\n        )\n\n        provider?.loadSource(videoSource)\n\n        if (!paused) {\n            provider?.play()\n        }\n    }\n\n    // Source parsing helper methods\n\n    private fun parseDrm(map: Map<String, Any>?): GraniteVideoDrmConfig? {\n        map ?: return null\n        val typeStr = map[\"type\"] as? String\n        val drmType = when (typeStr) {\n            \"widevine\" -> GraniteVideoDrmType.WIDEVINE\n            \"playready\" -> GraniteVideoDrmType.PLAYREADY\n            \"clearkey\" -> GraniteVideoDrmType.CLEARKEY\n            else -> GraniteVideoDrmType.NONE\n        }\n        val headers = map[\"headers\"] as? Map<String, String>\n        return GraniteVideoDrmConfig(\n            type = drmType,\n            licenseServer = map[\"licenseServer\"] as? String,\n            headers = headers,\n            contentId = map[\"contentId\"] as? String\n        )\n    }\n\n    private fun parseMetadata(map: Map<String, Any>?): GraniteVideoMetadata? {\n        map ?: return null\n        return GraniteVideoMetadata(\n            title = map[\"title\"] as? String,\n            subtitle = map[\"subtitle\"] as? String,\n            description = map[\"description\"] as? String,\n            artist = map[\"artist\"] as? String,\n            imageUri = map[\"imageUri\"] as? String\n        )\n    }\n\n    private fun parseCmcd(map: Map<String, Any>?): GraniteVideoCmcdConfig? {\n        map ?: return null\n        return GraniteVideoCmcdConfig(\n            mode = (map[\"mode\"] as? Number)?.toInt() ?: 1,\n            request = map[\"request\"] as? Map<String, String>,\n            session = map[\"session\"] as? Map<String, String>,\n            obj = map[\"object\"] as? Map<String, String>,\n            status = map[\"status\"] as? Map<String, String>\n        )\n    }\n\n    private fun parseTextTracks(list: List<Map<String, Any>>?): List<GraniteVideoTextTrack>? {\n        list ?: return null\n        return list.map { item ->\n            GraniteVideoTextTrack(\n                title = item[\"title\"] as? String ?: \"\",\n                language = item[\"language\"] as? String ?: \"\",\n                type = item[\"type\"] as? String ?: \"\",\n                uri = item[\"uri\"] as? String ?: \"\"\n            )\n        }.ifEmpty { null }\n    }\n\n    private fun parseAdsConfig(map: Map<String, Any>?): GraniteVideoAdsConfig? {\n        map ?: return null\n        return GraniteVideoAdsConfig(\n            type = map[\"type\"] as? String,\n            streamType = map[\"streamType\"] as? String,\n            adTagUrl = map[\"adTagUrl\"] as? String,\n            adLanguage = map[\"adLanguage\"] as? String,\n            contentSourceId = map[\"contentSourceId\"] as? String,\n            videoId = map[\"videoId\"] as? String,\n            assetKey = map[\"assetKey\"] as? String,\n            format = map[\"format\"] as? String,\n            fallbackUri = map[\"fallbackUri\"] as? String,\n            adTagParameters = map[\"adTagParameters\"] as? Map<String, String>\n        )\n    }\n\n    @Suppress(\"UNCHECKED_CAST\")\n    private fun parseBufferConfig(map: Map<String, Any>?): GraniteVideoBufferConfig? {\n        map ?: return null\n        val liveMap = map[\"live\"] as? Map<String, Any>\n        return GraniteVideoBufferConfig(\n            minBufferMs = (map[\"minBufferMs\"] as? Number)?.toInt() ?: 15000,\n            maxBufferMs = (map[\"maxBufferMs\"] as? Number)?.toInt() ?: 50000,\n            bufferForPlaybackMs = (map[\"bufferForPlaybackMs\"] as? Number)?.toInt() ?: 2500,\n            bufferForPlaybackAfterRebufferMs = (map[\"bufferForPlaybackAfterRebufferMs\"] as? Number)?.toInt() ?: 5000,\n            backBufferDurationMs = (map[\"backBufferDurationMs\"] as? Number)?.toInt() ?: 0,\n            cacheSizeMB = (map[\"cacheSizeMB\"] as? Number)?.toInt() ?: 0,\n            live = liveMap?.let {\n                GraniteVideoBufferConfigLive(\n                    maxPlaybackSpeed = (it[\"maxPlaybackSpeed\"] as? Number)?.toFloat() ?: -1f,\n                    minPlaybackSpeed = (it[\"minPlaybackSpeed\"] as? Number)?.toFloat() ?: -1f,\n                    maxOffsetMs = (it[\"maxOffsetMs\"] as? Number)?.toInt() ?: -1,\n                    minOffsetMs = (it[\"minOffsetMs\"] as? Number)?.toInt() ?: -1,\n                    targetOffsetMs = (it[\"targetOffsetMs\"] as? Number)?.toInt() ?: -1\n                )\n            }\n        )\n    }\n\n    // Playback Control\n    fun setPaused(paused: Boolean) {\n        this.paused = paused\n        if (paused) {\n            provider?.pause()\n        } else {\n            provider?.play()\n        }\n    }\n\n    fun setMuted(muted: Boolean) {\n        this.muted = muted\n        provider?.setMuted(muted)\n    }\n\n    fun setVolume(volume: Float) {\n        this.volume = volume\n        provider?.setVolume(volume)\n    }\n\n    fun setRate(rate: Float) {\n        this.rate = rate\n        provider?.setRate(rate)\n    }\n\n    fun setRepeat(repeat: Boolean) {\n        this.repeat = repeat\n        provider?.setRepeat(repeat)\n    }\n\n    fun setResizeMode(mode: String) {\n        this.resizeMode = mode\n        val resizeModeEnum = when (mode) {\n            \"cover\" -> GraniteVideoResizeMode.COVER\n            \"stretch\" -> GraniteVideoResizeMode.STRETCH\n            \"none\" -> GraniteVideoResizeMode.NONE\n            else -> GraniteVideoResizeMode.CONTAIN\n        }\n        provider?.setResizeMode(resizeModeEnum)\n    }\n\n    // Controls\n    fun setControls(enabled: Boolean) {\n        provider?.setControlsEnabled(enabled)\n    }\n\n    fun setFullscreen(fullscreen: Boolean) {\n        provider?.setFullscreen(fullscreen)\n    }\n\n    fun setPictureInPicture(enabled: Boolean) {\n        provider?.setPictureInPictureEnabled(enabled)\n    }\n\n    fun setDisableAudioFocus(disable: Boolean) {\n        provider?.setDisableAudioFocus(disable)\n    }\n\n    fun setPlayInBackground(enabled: Boolean) {\n        provider?.setPlayInBackground(enabled)\n    }\n\n    fun setPlayWhenInactive(enabled: Boolean) {\n        provider?.setPlayWhenInactive(enabled)\n    }\n\n    // Buffer\n    @Suppress(\"UNCHECKED_CAST\")\n    fun setBufferConfig(config: Map<String, Any>?) {\n        config ?: return\n\n        val liveMap = config[\"live\"] as? Map<String, Any>\n        val bufferConfig = GraniteVideoBufferConfig(\n            minBufferMs = (config[\"minBufferMs\"] as? Number)?.toInt() ?: 15000,\n            maxBufferMs = (config[\"maxBufferMs\"] as? Number)?.toInt() ?: 50000,\n            bufferForPlaybackMs = (config[\"bufferForPlaybackMs\"] as? Number)?.toInt() ?: 2500,\n            bufferForPlaybackAfterRebufferMs = (config[\"bufferForPlaybackAfterRebufferMs\"] as? Number)?.toInt() ?: 5000,\n            backBufferDurationMs = (config[\"backBufferDurationMs\"] as? Number)?.toInt() ?: 0,\n            cacheSizeMB = (config[\"cacheSizeMB\"] as? Number)?.toInt() ?: 0,\n            live = liveMap?.let {\n                GraniteVideoBufferConfigLive(\n                    maxPlaybackSpeed = (it[\"maxPlaybackSpeed\"] as? Number)?.toFloat() ?: -1f,\n                    minPlaybackSpeed = (it[\"minPlaybackSpeed\"] as? Number)?.toFloat() ?: -1f,\n                    maxOffsetMs = (it[\"maxOffsetMs\"] as? Number)?.toInt() ?: -1,\n                    minOffsetMs = (it[\"minOffsetMs\"] as? Number)?.toInt() ?: -1,\n                    targetOffsetMs = (it[\"targetOffsetMs\"] as? Number)?.toInt() ?: -1\n                )\n            }\n        )\n        provider?.setBufferConfig(bufferConfig)\n    }\n\n    fun setMaxBitRate(bitRate: Int) {\n        provider?.setMaxBitRate(bitRate)\n    }\n\n    fun setMinLoadRetryCount(count: Int) {\n        provider?.setMinLoadRetryCount(count)\n    }\n\n    // Content Start Time\n    fun setContentStartTime(time: Double) {\n        provider?.setContentStartTime(time)\n    }\n\n    // Track Selection\n    fun setSelectedAudioTrack(track: Map<String, Any>?) {\n        track ?: return\n        val selectedTrack = GraniteVideoSelectedTrack(\n            type = track[\"type\"] as? String ?: \"system\",\n            value = track[\"value\"] as? String\n        )\n        provider?.setSelectedAudioTrack(selectedTrack)\n    }\n\n    fun setSelectedTextTrack(track: Map<String, Any>?) {\n        track ?: return\n        val selectedTrack = GraniteVideoSelectedTrack(\n            type = track[\"type\"] as? String ?: \"system\",\n            value = track[\"value\"] as? String\n        )\n        provider?.setSelectedTextTrack(selectedTrack)\n    }\n\n    fun setSelectedVideoTrack(type: String, value: Int) {\n        provider?.setSelectedVideoTrack(type, value)\n    }\n\n    // View Settings\n    fun setUseTextureView(useTexture: Boolean) {\n        provider?.setUseTextureView(useTexture)\n    }\n\n    fun setUseSecureView(useSecure: Boolean) {\n        provider?.setUseSecureView(useSecure)\n    }\n\n    fun setShutterColor(color: Int) {\n        provider?.setShutterColor(color)\n    }\n\n    fun setHideShutterView(hide: Boolean) {\n        provider?.setHideShutterView(hide)\n    }\n\n    // Commands\n    fun seek(time: Double, tolerance: Double = 0.0) {\n        provider?.seek(time, tolerance)\n    }\n\n    fun seekCommand(time: Double, tolerance: Double) {\n        seek(time, tolerance)\n    }\n\n    fun pauseCommand() {\n        provider?.pause()\n    }\n\n    fun resumeCommand() {\n        provider?.play()\n    }\n\n    fun setVolumeCommand(volume: Float) {\n        setVolume(volume)\n    }\n\n    fun setFullScreenCommand(fullscreen: Boolean) {\n        setFullscreen(fullscreen)\n    }\n\n    fun setSourceCommand(uri: String) {\n        setSource(mapOf(\"uri\" to uri))\n    }\n\n    fun enterPictureInPictureCommand() {\n        provider?.enterPictureInPicture()\n    }\n\n    fun exitPictureInPictureCommand() {\n        provider?.exitPictureInPicture()\n    }\n\n    // GraniteVideoDelegate Implementation\n    override fun onLoadStart(isNetwork: Boolean, type: String, uri: String) {\n        eventListener?.onLoadStart(isNetwork, type, uri)\n    }\n\n    override fun onLoad(data: GraniteVideoLoadData) {\n        eventListener?.onLoad(data)\n    }\n\n    override fun onError(error: GraniteVideoErrorData) {\n        eventListener?.onError(error)\n    }\n\n    override fun onProgress(data: GraniteVideoProgressData) {\n        eventListener?.onProgress(data)\n    }\n\n    override fun onSeek(currentTime: Double, seekTime: Double) {\n        eventListener?.onSeek(currentTime, seekTime)\n    }\n\n    override fun onEnd() {\n        eventListener?.onEnd()\n    }\n\n    override fun onBuffer(isBuffering: Boolean) {\n        eventListener?.onBuffer(isBuffering)\n    }\n\n    override fun onBandwidthUpdate(bitrate: Double, width: Int, height: Int) {\n        eventListener?.onBandwidthUpdate(bitrate, width, height)\n    }\n\n    override fun onPlaybackStateChanged(isPlaying: Boolean, isSeeking: Boolean, isLooping: Boolean) {\n        eventListener?.onPlaybackStateChanged(isPlaying, isSeeking, isLooping)\n    }\n\n    override fun onPlaybackRateChange(rate: Float) {\n        eventListener?.onPlaybackRateChange(rate)\n    }\n\n    override fun onVolumeChange(volume: Float) {\n        eventListener?.onVolumeChange(volume)\n    }\n\n    override fun onIdle() {\n        eventListener?.onIdle()\n    }\n\n    override fun onReadyForDisplay() {\n        eventListener?.onReadyForDisplay()\n    }\n\n    override fun onAudioFocusChanged(hasAudioFocus: Boolean) {\n        eventListener?.onAudioFocusChanged(hasAudioFocus)\n    }\n\n    override fun onAudioBecomingNoisy() {\n        eventListener?.onAudioBecomingNoisy()\n    }\n\n    override fun onFullscreenPlayerWillPresent() {\n        eventListener?.onFullscreenPlayerWillPresent()\n    }\n\n    override fun onFullscreenPlayerDidPresent() {\n        eventListener?.onFullscreenPlayerDidPresent()\n    }\n\n    override fun onFullscreenPlayerWillDismiss() {\n        eventListener?.onFullscreenPlayerWillDismiss()\n    }\n\n    override fun onFullscreenPlayerDidDismiss() {\n        eventListener?.onFullscreenPlayerDidDismiss()\n    }\n\n    override fun onPictureInPictureStatusChanged(isActive: Boolean) {\n        eventListener?.onPictureInPictureStatusChanged(isActive)\n    }\n\n    override fun onControlsVisibilityChanged(isVisible: Boolean) {\n        eventListener?.onControlsVisibilityChanged(isVisible)\n    }\n\n    override fun onAspectRatioChanged(width: Double, height: Double) {\n        eventListener?.onAspectRatioChanged(width, height)\n    }\n\n    override fun onTransferEnd(uri: String, bytesTransferred: Long) {\n        eventListener?.onTransferEnd(uri, bytesTransferred)\n    }\n\n    // Cleanup\n    private fun releaseProvider() {\n        provider?.release()\n        provider = null\n    }\n\n    fun release() {\n        releaseProvider()\n    }\n\n    override fun onDetachedFromWindow() {\n        super.onDetachedFromWindow()\n        release()\n    }\n}\n\n// Event Listener Interface\ninterface GraniteVideoEventListener {\n    fun onLoadStart(isNetwork: Boolean, type: String, uri: String)\n    fun onLoad(data: GraniteVideoLoadData)\n    fun onError(error: GraniteVideoErrorData)\n    fun onProgress(data: GraniteVideoProgressData)\n    fun onSeek(currentTime: Double, seekTime: Double)\n    fun onEnd()\n    fun onBuffer(isBuffering: Boolean)\n    fun onBandwidthUpdate(bitrate: Double, width: Int, height: Int)\n    fun onPlaybackStateChanged(isPlaying: Boolean, isSeeking: Boolean, isLooping: Boolean)\n    fun onPlaybackRateChange(rate: Float)\n    fun onVolumeChange(volume: Float)\n    fun onIdle()\n    fun onReadyForDisplay()\n    fun onAudioFocusChanged(hasAudioFocus: Boolean)\n    fun onAudioBecomingNoisy()\n    fun onFullscreenPlayerWillPresent()\n    fun onFullscreenPlayerDidPresent()\n    fun onFullscreenPlayerWillDismiss()\n    fun onFullscreenPlayerDidDismiss()\n    fun onPictureInPictureStatusChanged(isActive: Boolean)\n    fun onControlsVisibilityChanged(isVisible: Boolean)\n    fun onAspectRatioChanged(width: Double, height: Double)\n    fun onTransferEnd(uri: String, bytesTransferred: Long) {}\n}\n"
  },
  {
    "path": "packages/video/android/src/main/java/run/granite/video/GraniteVideoViewManager.kt",
    "content": "package run.granite.video\n\nimport android.graphics.Color\nimport com.facebook.react.bridge.ReadableArray\nimport com.facebook.react.bridge.ReadableMap\nimport com.facebook.react.module.annotations.ReactModule\nimport com.facebook.react.uimanager.SimpleViewManager\nimport com.facebook.react.uimanager.ThemedReactContext\nimport com.facebook.react.uimanager.ViewManagerDelegate\nimport com.facebook.react.uimanager.annotations.ReactProp\nimport com.facebook.react.viewmanagers.GraniteVideoViewManagerInterface\nimport com.facebook.react.viewmanagers.GraniteVideoViewManagerDelegate\nimport com.facebook.react.common.MapBuilder\nimport run.granite.video.event.DefaultVideoEventDispatcherFactory\nimport run.granite.video.event.VideoEventDispatcherFactory\nimport run.granite.video.event.VideoEventListenerAdapter\n\n/**\n * React Native ViewManager for GraniteVideoView.\n *\n * This manager supports:\n * - Provider selection via `providerId` prop\n * - All standard video props (source, paused, volume, etc.)\n * - Commands for playback control\n *\n * The ViewManager uses dependency injection for the event dispatcher factory,\n * making it testable without React Native context.\n */\n@ReactModule(name = GraniteVideoViewManager.NAME)\nclass GraniteVideoViewManager(\n    private val eventDispatcherFactory: VideoEventDispatcherFactory = DefaultVideoEventDispatcherFactory()\n) : SimpleViewManager<GraniteVideoView>(),\n    GraniteVideoViewManagerInterface<GraniteVideoView> {\n\n    private val mDelegate: ViewManagerDelegate<GraniteVideoView> = GraniteVideoViewManagerDelegate(this)\n\n    override fun getDelegate(): ViewManagerDelegate<GraniteVideoView> = mDelegate\n\n    override fun getName(): String = NAME\n\n    override fun createViewInstance(context: ThemedReactContext): GraniteVideoView {\n        val view = GraniteVideoView(context)\n\n        // Set up event dispatcher and listener\n        val dispatcher = eventDispatcherFactory.create(view)\n        view.eventListener = VideoEventListenerAdapter(\n            dispatcher = dispatcher,\n            viewIdProvider = { view.id }\n        )\n\n        return view\n    }\n\n    override fun onDropViewInstance(view: GraniteVideoView) {\n        super.onDropViewInstance(view)\n        view.release()\n    }\n\n    override fun setProgressUpdateInterval(view: GraniteVideoView?, value: Double) {\n    }\n\n    // Props\n    @ReactProp(name = \"source\")\n    override fun setSource(view: GraniteVideoView?, source: ReadableMap?) {\n        @Suppress(\"UNCHECKED_CAST\")\n        view?.setSource(source?.toHashMap()?.filterValues { it != null } as? Map<String, Any>)\n    }\n\n    @ReactProp(name = \"paused\")\n    override fun setPaused(view: GraniteVideoView?, paused: Boolean) {\n        view?.setPaused(paused)\n    }\n\n    @ReactProp(name = \"muted\")\n    override fun setMuted(view: GraniteVideoView?, muted: Boolean) {\n        view?.setMuted(muted)\n    }\n\n    @ReactProp(name = \"volume\", defaultFloat = 1.0f)\n    override fun setVolume(view: GraniteVideoView?, volume: Float) {\n        view?.setVolume(volume)\n    }\n\n    @ReactProp(name = \"rate\", defaultFloat = 1.0f)\n    override fun setRate(view: GraniteVideoView?, rate: Float) {\n        view?.setRate(rate)\n    }\n\n    @ReactProp(name = \"repeat\")\n    override fun setRepeat(view: GraniteVideoView?, repeat: Boolean) {\n        view?.setRepeat(repeat)\n    }\n\n    @ReactProp(name = \"resizeMode\")\n    override fun setResizeMode(view: GraniteVideoView?, resizeMode: String?) {\n        view?.setResizeMode(resizeMode ?: \"contain\")\n    }\n\n    @ReactProp(name = \"controls\")\n    override fun setControls(view: GraniteVideoView?, controls: Boolean) {\n        view?.setControls(controls)\n    }\n\n    @ReactProp(name = \"fullscreen\")\n    override fun setFullscreen(view: GraniteVideoView?, fullscreen: Boolean) {\n        view?.setFullscreen(fullscreen)\n    }\n\n    @ReactProp(name = \"pictureInPicture\")\n    override fun setPictureInPicture(view: GraniteVideoView?, pictureInPicture: Boolean) {\n        view?.setPictureInPicture(pictureInPicture)\n    }\n\n    @ReactProp(name = \"disableAudioFocus\")\n    override fun setDisableAudioFocus(view: GraniteVideoView?, disableAudioFocus: Boolean) {\n        view?.setDisableAudioFocus(disableAudioFocus)\n    }\n\n    @ReactProp(name = \"playInBackground\")\n    override fun setPlayInBackground(view: GraniteVideoView?, playInBackground: Boolean) {\n        view?.setPlayInBackground(playInBackground)\n    }\n\n    @ReactProp(name = \"playWhenInactive\")\n    override fun setPlayWhenInactive(view: GraniteVideoView?, playWhenInactive: Boolean) {\n        view?.setPlayWhenInactive(playWhenInactive)\n    }\n\n    @ReactProp(name = \"bufferConfig\")\n    override fun setBufferConfig(view: GraniteVideoView?, bufferConfig: ReadableMap?) {\n        @Suppress(\"UNCHECKED_CAST\")\n        view?.setBufferConfig(bufferConfig?.toHashMap()?.filterValues { it != null } as? Map<String, Any>)\n    }\n\n    @ReactProp(name = \"maxBitRate\")\n    override fun setMaxBitRate(view: GraniteVideoView?, maxBitRate: Int) {\n        view?.setMaxBitRate(maxBitRate)\n    }\n\n    @ReactProp(name = \"minLoadRetryCount\")\n    override fun setMinLoadRetryCount(view: GraniteVideoView?, minLoadRetryCount: Int) {\n        view?.setMinLoadRetryCount(minLoadRetryCount)\n    }\n\n    @ReactProp(name = \"selectedAudioTrack\")\n    override fun setSelectedAudioTrack(view: GraniteVideoView?, selectedAudioTrack: ReadableMap?) {\n        @Suppress(\"UNCHECKED_CAST\")\n        view?.setSelectedAudioTrack(selectedAudioTrack?.toHashMap()?.filterValues { it != null } as? Map<String, Any>)\n    }\n\n    @ReactProp(name = \"selectedTextTrack\")\n    override fun setSelectedTextTrack(view: GraniteVideoView?, selectedTextTrack: ReadableMap?) {\n        @Suppress(\"UNCHECKED_CAST\")\n        view?.setSelectedTextTrack(selectedTextTrack?.toHashMap()?.filterValues { it != null } as? Map<String, Any>)\n    }\n\n    @ReactProp(name = \"selectedVideoTrack\")\n    override fun setSelectedVideoTrack(view: GraniteVideoView?, selectedVideoTrack: ReadableMap?) {\n        val type = selectedVideoTrack?.getString(\"type\") ?: \"auto\"\n        val value = selectedVideoTrack?.getInt(\"value\") ?: 0\n        view?.setSelectedVideoTrack(type, value)\n    }\n\n    override fun setTextTracks(view: GraniteVideoView?, value: ReadableArray?) {\n    }\n\n    @ReactProp(name = \"viewType\")\n    override fun setViewType(view: GraniteVideoView?, viewType: String?) {\n        view?.setUseTextureView(viewType == \"texture\")\n    }\n\n    @ReactProp(name = \"useTextureView\")\n    override fun setUseTextureView(view: GraniteVideoView?, useTextureView: Boolean) {\n        view?.setUseTextureView(useTextureView)\n    }\n\n    @ReactProp(name = \"useSecureView\")\n    override fun setUseSecureView(view: GraniteVideoView?, useSecureView: Boolean) {\n        view?.setUseSecureView(useSecureView)\n    }\n\n    @ReactProp(name = \"shutterColor\")\n    override fun setShutterColor(view: GraniteVideoView?, shutterColor: String?) {\n        shutterColor?.let {\n            try {\n                view?.setShutterColor(Color.parseColor(it))\n            } catch (e: Exception) {\n                // Invalid color\n            }\n        }\n    }\n\n    @ReactProp(name = \"hideShutterView\")\n    override fun setHideShutterView(view: GraniteVideoView?, hideShutterView: Boolean) {\n        view?.setHideShutterView(hideShutterView)\n    }\n\n    // Other props with default implementations\n    @ReactProp(name = \"poster\")\n    override fun setPoster(view: GraniteVideoView?, poster: String?) {}\n\n    @ReactProp(name = \"posterResizeMode\")\n    override fun setPosterResizeMode(view: GraniteVideoView?, posterResizeMode: String?) {}\n\n    @ReactProp(name = \"automaticallyWaitsToMinimizeStalling\")\n    override fun setAutomaticallyWaitsToMinimizeStalling(view: GraniteVideoView?, value: Boolean) {}\n\n    @ReactProp(name = \"preferredForwardBufferDuration\")\n    override fun setPreferredForwardBufferDuration(view: GraniteVideoView?, value: Double) {}\n\n    @ReactProp(name = \"drm\")\n    override fun setDrm(view: GraniteVideoView?, drm: ReadableMap?) {}\n\n    @ReactProp(name = \"localSourceEncryptionKeyScheme\")\n    override fun setLocalSourceEncryptionKeyScheme(view: GraniteVideoView?, value: String?) {}\n\n    @ReactProp(name = \"adTagUrl\")\n    override fun setAdTagUrl(view: GraniteVideoView?, value: String?) {}\n\n    @ReactProp(name = \"adLanguage\")\n    override fun setAdLanguage(view: GraniteVideoView?, value: String?) {}\n\n    @ReactProp(name = \"showNotificationControls\")\n    override fun setShowNotificationControls(view: GraniteVideoView?, value: Boolean) {}\n\n    @ReactProp(name = \"disableFocus\")\n    override fun setDisableFocus(view: GraniteVideoView?, value: Boolean) {}\n\n    @ReactProp(name = \"disableDisconnectError\")\n    override fun setDisableDisconnectError(view: GraniteVideoView?, value: Boolean) {}\n\n    @ReactProp(name = \"focusable\")\n    override fun setFocusable(view: GraniteVideoView?, value: Boolean) {}\n\n    @ReactProp(name = \"preventsDisplaySleepDuringVideoPlayback\")\n    override fun setPreventsDisplaySleepDuringVideoPlayback(view: GraniteVideoView?, value: Boolean) {}\n\n    @ReactProp(name = \"fullscreenAutorotate\")\n    override fun setFullscreenAutorotate(view: GraniteVideoView?, value: Boolean) {}\n\n    @ReactProp(name = \"fullscreenOrientation\")\n    override fun setFullscreenOrientation(view: GraniteVideoView?, value: String?) {}\n\n    @ReactProp(name = \"contentStartTime\")\n    override fun setContentStartTime(view: GraniteVideoView?, value: Double) {\n        view?.setContentStartTime(value)\n    }\n\n    @ReactProp(name = \"allowsExternalPlayback\")\n    override fun setAllowsExternalPlayback(view: GraniteVideoView?, value: Boolean) {}\n\n    @ReactProp(name = \"audioOutput\")\n    override fun setAudioOutput(view: GraniteVideoView?, value: String?) {}\n\n    @ReactProp(name = \"ignoreSilentSwitch\")\n    override fun setIgnoreSilentSwitch(view: GraniteVideoView?, value: String?) {}\n\n    @ReactProp(name = \"mixWithOthers\")\n    override fun setMixWithOthers(view: GraniteVideoView?, value: String?) {}\n\n    @ReactProp(name = \"enableDebug\")\n    override fun setEnableDebug(view: GraniteVideoView?, value: Boolean) {}\n\n    @ReactProp(name = \"enableDebugThread\")\n    override fun setEnableDebugThread(view: GraniteVideoView?, value: Boolean) {}\n\n    // Commands\n    override fun seek(view: GraniteVideoView?, time: Double, tolerance: Double) {\n        view?.seekCommand(time, tolerance)\n    }\n\n    override fun adjustVolume(view: GraniteVideoView?, volume: Float) {\n        view?.setVolumeCommand(volume)\n    }\n\n    override fun setFullScreen(view: GraniteVideoView?, fullscreen: Boolean) {\n        view?.setFullScreenCommand(fullscreen)\n    }\n\n    override fun loadSource(view: GraniteVideoView?, uri: String?) {\n        uri?.let { view?.setSourceCommand(it) }\n    }\n\n    override fun pause(view: GraniteVideoView?) {\n        view?.pauseCommand()\n    }\n\n    override fun resume(view: GraniteVideoView?) {\n        view?.resumeCommand()\n    }\n\n    override fun enterPictureInPicture(view: GraniteVideoView?) {\n        view?.enterPictureInPictureCommand()\n    }\n\n    override fun exitPictureInPicture(view: GraniteVideoView?) {\n        view?.exitPictureInPictureCommand()\n    }\n\n    // Event registration\n    override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any> {\n        return MapBuilder.builder<String, Any>()\n            .put(\"topVideoLoadStart\", MapBuilder.of(\"registrationName\", \"onVideoLoadStart\"))\n            .put(\"topVideoLoad\", MapBuilder.of(\"registrationName\", \"onVideoLoad\"))\n            .put(\"topVideoError\", MapBuilder.of(\"registrationName\", \"onVideoError\"))\n            .put(\"topVideoProgress\", MapBuilder.of(\"registrationName\", \"onVideoProgress\"))\n            .put(\"topVideoSeek\", MapBuilder.of(\"registrationName\", \"onVideoSeek\"))\n            .put(\"topVideoEnd\", MapBuilder.of(\"registrationName\", \"onVideoEnd\"))\n            .put(\"topVideoBuffer\", MapBuilder.of(\"registrationName\", \"onVideoBuffer\"))\n            .put(\"topVideoBandwidthUpdate\", MapBuilder.of(\"registrationName\", \"onVideoBandwidthUpdate\"))\n            .put(\"topVideoPlaybackStateChanged\", MapBuilder.of(\"registrationName\", \"onVideoPlaybackStateChanged\"))\n            .put(\"topVideoPlaybackRateChange\", MapBuilder.of(\"registrationName\", \"onVideoPlaybackRateChange\"))\n            .put(\"topVideoVolumeChange\", MapBuilder.of(\"registrationName\", \"onVideoVolumeChange\"))\n            .put(\"topVideoIdle\", MapBuilder.of(\"registrationName\", \"onVideoIdle\"))\n            .put(\"topVideoReadyForDisplay\", MapBuilder.of(\"registrationName\", \"onVideoReadyForDisplay\"))\n            .put(\"topVideoAudioFocusChanged\", MapBuilder.of(\"registrationName\", \"onVideoAudioFocusChanged\"))\n            .put(\"topVideoAudioBecomingNoisy\", MapBuilder.of(\"registrationName\", \"onVideoAudioBecomingNoisy\"))\n            .put(\"topVideoFullscreenPlayerWillPresent\", MapBuilder.of(\"registrationName\", \"onVideoFullscreenPlayerWillPresent\"))\n            .put(\"topVideoFullscreenPlayerDidPresent\", MapBuilder.of(\"registrationName\", \"onVideoFullscreenPlayerDidPresent\"))\n            .put(\"topVideoFullscreenPlayerWillDismiss\", MapBuilder.of(\"registrationName\", \"onVideoFullscreenPlayerWillDismiss\"))\n            .put(\"topVideoFullscreenPlayerDidDismiss\", MapBuilder.of(\"registrationName\", \"onVideoFullscreenPlayerDidDismiss\"))\n            .put(\"topVideoPictureInPictureStatusChanged\", MapBuilder.of(\"registrationName\", \"onVideoPictureInPictureStatusChanged\"))\n            .put(\"topVideoControlsVisibilityChange\", MapBuilder.of(\"registrationName\", \"onVideoControlsVisibilityChange\"))\n            .put(\"topVideoAspectRatio\", MapBuilder.of(\"registrationName\", \"onVideoAspectRatio\"))\n            .put(\"topTransferEnd\", MapBuilder.of(\"registrationName\", \"onTransferEnd\"))\n            .build()\n    }\n\n    companion object {\n        const val NAME = \"GraniteVideoView\"\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/main/java/run/granite/video/event/GraniteVideoEvents.kt",
    "content": "package run.granite.video.event\n\nimport com.facebook.react.bridge.Arguments\nimport com.facebook.react.bridge.WritableMap\nimport com.facebook.react.uimanager.events.Event\nimport run.granite.video.provider.GraniteVideoLoadData\nimport run.granite.video.provider.GraniteVideoErrorData\nimport run.granite.video.provider.GraniteVideoProgressData\n\nclass GraniteVideoLoadStartEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val isNetwork: Boolean,\n    private val type: String,\n    private val uri: String\n) : Event<GraniteVideoLoadStartEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoLoadStart\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putBoolean(\"isNetwork\", isNetwork)\n        putString(\"type\", type)\n        putString(\"uri\", uri)\n    }\n}\n\nclass GraniteVideoLoadEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val data: GraniteVideoLoadData\n) : Event<GraniteVideoLoadEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoLoad\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putDouble(\"currentTime\", data.currentTime)\n        putDouble(\"duration\", data.duration)\n\n        val naturalSize = Arguments.createMap().apply {\n            putDouble(\"width\", data.naturalWidth)\n            putDouble(\"height\", data.naturalHeight)\n            putString(\"orientation\", data.orientation)\n        }\n        putMap(\"naturalSize\", naturalSize)\n    }\n}\n\nclass GraniteVideoErrorEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val error: GraniteVideoErrorData\n) : Event<GraniteVideoErrorEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoError\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        val errorMap = Arguments.createMap().apply {\n            putInt(\"code\", error.code)\n            putString(\"domain\", error.domain)\n            putString(\"localizedDescription\", error.localizedDescription)\n            putString(\"localizedFailureReason\", \"\")\n            putString(\"localizedRecoverySuggestion\", \"\")\n            putString(\"errorString\", error.errorString)\n        }\n        putMap(\"error\", errorMap)\n    }\n}\n\nclass GraniteVideoProgressEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val data: GraniteVideoProgressData\n) : Event<GraniteVideoProgressEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoProgress\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putDouble(\"currentTime\", data.currentTime)\n        putDouble(\"playableDuration\", data.playableDuration)\n        putDouble(\"seekableDuration\", data.seekableDuration)\n    }\n}\n\nclass GraniteVideoSeekEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val currentTime: Double,\n    private val seekTime: Double\n) : Event<GraniteVideoSeekEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoSeek\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putDouble(\"currentTime\", currentTime)\n        putDouble(\"seekTime\", seekTime)\n    }\n}\n\nclass GraniteVideoEndEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteVideoEndEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoEnd\"\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n\nclass GraniteVideoBufferEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val isBuffering: Boolean\n) : Event<GraniteVideoBufferEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoBuffer\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putBoolean(\"isBuffering\", isBuffering)\n    }\n}\n\nclass GraniteVideoBandwidthUpdateEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val bitrate: Double,\n    private val width: Int,\n    private val height: Int\n) : Event<GraniteVideoBandwidthUpdateEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoBandwidthUpdate\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putDouble(\"bitrate\", bitrate)\n        putInt(\"width\", width)\n        putInt(\"height\", height)\n    }\n}\n\nclass GraniteVideoPlaybackStateChangedEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val isPlaying: Boolean,\n    private val isSeeking: Boolean,\n    private val isLooping: Boolean\n) : Event<GraniteVideoPlaybackStateChangedEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoPlaybackStateChanged\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putBoolean(\"isPlaying\", isPlaying)\n        putBoolean(\"isSeeking\", isSeeking)\n        putBoolean(\"isLooping\", isLooping)\n    }\n}\n\nclass GraniteVideoPlaybackRateChangeEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val rate: Float\n) : Event<GraniteVideoPlaybackRateChangeEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoPlaybackRateChange\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putDouble(\"playbackRate\", rate.toDouble())\n    }\n}\n\nclass GraniteVideoVolumeChangeEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val volume: Float\n) : Event<GraniteVideoVolumeChangeEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoVolumeChange\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putDouble(\"volume\", volume.toDouble())\n    }\n}\n\nclass GraniteVideoIdleEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteVideoIdleEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoIdle\"\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n\nclass GraniteVideoReadyForDisplayEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteVideoReadyForDisplayEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoReadyForDisplay\"\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n\nclass GraniteVideoAudioFocusChangedEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val hasAudioFocus: Boolean\n) : Event<GraniteVideoAudioFocusChangedEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoAudioFocusChanged\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putBoolean(\"hasAudioFocus\", hasAudioFocus)\n    }\n}\n\nclass GraniteVideoAudioBecomingNoisyEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteVideoAudioBecomingNoisyEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoAudioBecomingNoisy\"\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n\nclass GraniteVideoFullscreenPlayerWillPresentEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteVideoFullscreenPlayerWillPresentEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoFullscreenPlayerWillPresent\"\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n\nclass GraniteVideoFullscreenPlayerDidPresentEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteVideoFullscreenPlayerDidPresentEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoFullscreenPlayerDidPresent\"\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n\nclass GraniteVideoFullscreenPlayerWillDismissEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteVideoFullscreenPlayerWillDismissEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoFullscreenPlayerWillDismiss\"\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n\nclass GraniteVideoFullscreenPlayerDidDismissEvent(\n    surfaceId: Int,\n    viewId: Int\n) : Event<GraniteVideoFullscreenPlayerDidDismissEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoFullscreenPlayerDidDismiss\"\n    override fun getEventData(): WritableMap = Arguments.createMap()\n}\n\nclass GraniteVideoPictureInPictureStatusChangedEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val isActive: Boolean\n) : Event<GraniteVideoPictureInPictureStatusChangedEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoPictureInPictureStatusChanged\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putBoolean(\"isActive\", isActive)\n    }\n}\n\nclass GraniteVideoControlsVisibilityChangeEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val isVisible: Boolean\n) : Event<GraniteVideoControlsVisibilityChangeEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoControlsVisibilityChange\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putBoolean(\"isVisible\", isVisible)\n    }\n}\n\nclass GraniteVideoAspectRatioEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val width: Double,\n    private val height: Double\n) : Event<GraniteVideoAspectRatioEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topVideoAspectRatio\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putDouble(\"width\", width)\n        putDouble(\"height\", height)\n    }\n}\n\nclass GraniteVideoOnTransferEndEvent(\n    surfaceId: Int,\n    viewId: Int,\n    private val uri: String, \n    private val bytesTransferred: Long\n) : Event<GraniteVideoOnTransferEndEvent>(surfaceId, viewId) {\n    override fun getEventName(): String = \"topTransferEnd\"\n    override fun getEventData(): WritableMap = Arguments.createMap().apply {\n        putString(\"uri\", uri)\n        putLong(\"bytesTransferred\", bytesTransferred)\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/main/java/run/granite/video/event/VideoEventDispatcher.kt",
    "content": "package run.granite.video.event\n\nimport android.view.View\nimport com.facebook.react.bridge.ReactContext\nimport com.facebook.react.uimanager.UIManagerHelper\nimport com.facebook.react.uimanager.events.Event\nimport com.facebook.react.uimanager.events.EventDispatcher\n\n/**\n * Interface for dispatching video events to React Native.\n * Uses modern Event-based dispatching compatible with RN 0.84+.\n */\ninterface VideoEventDispatcher {\n    /**\n     * Dispatch an event to React Native.\n     * @param event The Event object to dispatch.\n     */\n    fun dispatchEvent(event: Event<*>)\n\n    /**\n     * Get the surface ID for creating events.\n     * @return The surface ID for this view.\n     */\n    fun getSurfaceId(): Int\n}\n\n/**\n * Modern implementation using UIManagerHelper EventDispatcher.\n * Compatible with React Native 0.84+.\n */\nclass ModernVideoEventDispatcher(\n    private val view: View\n) : VideoEventDispatcher {\n\n    private fun getEventDispatcher(): EventDispatcher? {\n        val reactContext = view.context as? ReactContext ?: return null\n        return UIManagerHelper.getEventDispatcherForReactTag(reactContext, view.id)\n    }\n\n    override fun dispatchEvent(event: Event<*>) {\n        getEventDispatcher()?.dispatchEvent(event)\n    }\n\n    override fun getSurfaceId(): Int = UIManagerHelper.getSurfaceId(view)\n}\n\n/**\n * Factory interface for creating VideoEventDispatcher instances.\n */\ninterface VideoEventDispatcherFactory {\n    /**\n     * Create a VideoEventDispatcher for the given view.\n     * @param view The view to dispatch events for.\n     * @return A new VideoEventDispatcher instance.\n     */\n    fun create(view: View): VideoEventDispatcher\n}\n\n/**\n * Default factory implementation.\n */\nclass DefaultVideoEventDispatcherFactory : VideoEventDispatcherFactory {\n    override fun create(view: View): VideoEventDispatcher {\n        return ModernVideoEventDispatcher(view)\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/main/java/run/granite/video/event/VideoEventListenerAdapter.kt",
    "content": "package run.granite.video.event\n\nimport run.granite.video.GraniteVideoEventListener\nimport run.granite.video.provider.GraniteVideoErrorData\nimport run.granite.video.provider.GraniteVideoLoadData\nimport run.granite.video.provider.GraniteVideoProgressData\n\n/**\n * Adapter that bridges GraniteVideoEventListener to VideoEventDispatcher.\n * Separated from ViewManager for testability.\n */\nclass VideoEventListenerAdapter(\n    private val dispatcher: VideoEventDispatcher,\n    private val viewIdProvider: () -> Int\n) : GraniteVideoEventListener {\n\n    private val viewId: Int\n        get() = viewIdProvider()\n\n    override fun onLoadStart(isNetwork: Boolean, type: String, uri: String) {\n        dispatcher.dispatchEvent(\n            GraniteVideoLoadStartEvent(dispatcher.getSurfaceId(), viewId, isNetwork, type, uri)\n        )\n    }\n\n    override fun onLoad(data: GraniteVideoLoadData) {\n        dispatcher.dispatchEvent(\n            GraniteVideoLoadEvent(dispatcher.getSurfaceId(), viewId, data)\n        )\n    }\n\n    override fun onError(error: GraniteVideoErrorData) {\n        dispatcher.dispatchEvent(\n            GraniteVideoErrorEvent(dispatcher.getSurfaceId(), viewId, error)\n        )\n    }\n\n    override fun onProgress(data: GraniteVideoProgressData) {\n        dispatcher.dispatchEvent(\n            GraniteVideoProgressEvent(dispatcher.getSurfaceId(), viewId, data)\n        )\n    }\n\n    override fun onSeek(currentTime: Double, seekTime: Double) {\n        dispatcher.dispatchEvent(\n            GraniteVideoSeekEvent(dispatcher.getSurfaceId(), viewId, currentTime, seekTime)\n        )\n    }\n\n    override fun onEnd() {\n        dispatcher.dispatchEvent(\n            GraniteVideoEndEvent(dispatcher.getSurfaceId(), viewId)\n        )\n    }\n\n    override fun onBuffer(isBuffering: Boolean) {\n        dispatcher.dispatchEvent(\n            GraniteVideoBufferEvent(dispatcher.getSurfaceId(), viewId, isBuffering)\n        )\n    }\n\n    override fun onBandwidthUpdate(bitrate: Double, width: Int, height: Int) {\n        dispatcher.dispatchEvent(\n            GraniteVideoBandwidthUpdateEvent(dispatcher.getSurfaceId(), viewId, bitrate, width, height)\n        )\n    }\n\n    override fun onPlaybackStateChanged(isPlaying: Boolean, isSeeking: Boolean, isLooping: Boolean) {\n        dispatcher.dispatchEvent(\n            GraniteVideoPlaybackStateChangedEvent(dispatcher.getSurfaceId(), viewId, isPlaying, isSeeking, isLooping)\n        )\n    }\n\n    override fun onPlaybackRateChange(rate: Float) {\n        dispatcher.dispatchEvent(\n            GraniteVideoPlaybackRateChangeEvent(dispatcher.getSurfaceId(), viewId, rate)\n        )\n    }\n\n    override fun onVolumeChange(volume: Float) {\n        dispatcher.dispatchEvent(\n            GraniteVideoVolumeChangeEvent(dispatcher.getSurfaceId(), viewId, volume)\n        )\n    }\n\n    override fun onIdle() {\n        dispatcher.dispatchEvent(\n            GraniteVideoIdleEvent(dispatcher.getSurfaceId(), viewId)\n        )\n    }\n\n    override fun onReadyForDisplay() {\n        dispatcher.dispatchEvent(\n            GraniteVideoReadyForDisplayEvent(dispatcher.getSurfaceId(), viewId)\n        )\n    }\n\n    override fun onAudioFocusChanged(hasAudioFocus: Boolean) {\n        dispatcher.dispatchEvent(\n            GraniteVideoAudioFocusChangedEvent(dispatcher.getSurfaceId(), viewId, hasAudioFocus)\n        )\n    }\n\n    override fun onAudioBecomingNoisy() {\n        dispatcher.dispatchEvent(\n            GraniteVideoAudioBecomingNoisyEvent(dispatcher.getSurfaceId(), viewId)\n        )\n    }\n\n    override fun onFullscreenPlayerWillPresent() {\n        dispatcher.dispatchEvent(\n            GraniteVideoFullscreenPlayerWillPresentEvent(dispatcher.getSurfaceId(), viewId)\n        )\n    }\n\n    override fun onFullscreenPlayerDidPresent() {\n        dispatcher.dispatchEvent(\n            GraniteVideoFullscreenPlayerDidPresentEvent(dispatcher.getSurfaceId(), viewId)\n        )\n    }\n\n    override fun onFullscreenPlayerWillDismiss() {\n        dispatcher.dispatchEvent(\n            GraniteVideoFullscreenPlayerWillDismissEvent(dispatcher.getSurfaceId(), viewId)\n        )\n    }\n\n    override fun onFullscreenPlayerDidDismiss() {\n        dispatcher.dispatchEvent(\n            GraniteVideoFullscreenPlayerDidDismissEvent(dispatcher.getSurfaceId(), viewId)\n        )\n    }\n\n    override fun onPictureInPictureStatusChanged(isActive: Boolean) {\n        dispatcher.dispatchEvent(\n            GraniteVideoPictureInPictureStatusChangedEvent(dispatcher.getSurfaceId(), viewId, isActive)\n        )\n    }\n\n    override fun onControlsVisibilityChanged(isVisible: Boolean) {\n        dispatcher.dispatchEvent(\n            GraniteVideoControlsVisibilityChangeEvent(dispatcher.getSurfaceId(), viewId, isVisible)\n        )\n    }\n\n    override fun onAspectRatioChanged(width: Double, height: Double) {\n        dispatcher.dispatchEvent(\n            GraniteVideoAspectRatioEvent(dispatcher.getSurfaceId(), viewId, width, height)\n        )\n    }\n\n    override fun onTransferEnd(uri: String, bytesTransferred: Long) {\n        dispatcher.dispatchEvent(\n            GraniteVideoOnTransferEndEvent(dispatcher.getSurfaceId(), viewId, uri, bytesTransferred)\n        )\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/main/java/run/granite/video/provider/GraniteVideoProvider.kt",
    "content": "package run.granite.video.provider\n\nimport android.content.Context\nimport android.view.View\n\n// ============================================================\n// Enums\n// ============================================================\n\nenum class GraniteVideoResizeMode {\n    CONTAIN,\n    COVER,\n    STRETCH,\n    NONE\n}\n\nenum class GraniteVideoDrmType {\n    NONE,\n    WIDEVINE,\n    PLAYREADY,\n    CLEARKEY\n}\n\nenum class GraniteVideoAudioOutput {\n    SPEAKER,\n    EARPIECE\n}\n\n// ============================================================\n// Data Classes\n// ============================================================\n\ndata class GraniteVideoSource(\n    val uri: String? = null,\n    val type: String? = null,\n    val startTime: Double = 0.0,\n    val endTime: Double = 0.0,\n    val headers: Map<String, String>? = null,\n    val drm: GraniteVideoDrmConfig? = null,\n    val isNetwork: Boolean? = null,\n    val isAsset: Boolean = false,\n    val isLocalAssetFile: Boolean = false,\n    val shouldCache: Boolean = true,\n    val mainVer: Int = 0,\n    val patchVer: Int = 0,\n    val contentStartTime: Double = -1.0,\n    val minLoadRetryCount: Int = 3,\n    val textTracksAllowChunklessPreparation: Boolean = true,\n    val metadata: GraniteVideoMetadata? = null,\n    val cmcd: GraniteVideoCmcdConfig? = null,\n    val textTracks: List<GraniteVideoTextTrack>? = null,\n    val ad: GraniteVideoAdsConfig? = null,\n    val bufferConfig: GraniteVideoBufferConfig? = null\n)\n\ndata class GraniteVideoDrmConfig(\n    val type: GraniteVideoDrmType = GraniteVideoDrmType.NONE,\n    val licenseServer: String? = null,\n    val headers: Map<String, String>? = null,\n    val contentId: String? = null\n)\n\ndata class GraniteVideoBufferConfig(\n    val minBufferMs: Int = 15000,\n    val maxBufferMs: Int = 50000,\n    val bufferForPlaybackMs: Int = 2500,\n    val bufferForPlaybackAfterRebufferMs: Int = 5000,\n    val backBufferDurationMs: Int = 0,\n    val cacheSizeMB: Int = 0,\n    val live: GraniteVideoBufferConfigLive? = null\n)\n\ndata class GraniteVideoBufferConfigLive(\n    val maxPlaybackSpeed: Float = -1f,\n    val minPlaybackSpeed: Float = -1f,\n    val maxOffsetMs: Int = -1,\n    val minOffsetMs: Int = -1,\n    val targetOffsetMs: Int = -1\n)\n\ndata class GraniteVideoSelectedTrack(\n    val type: String = \"system\",\n    val value: String? = null\n)\n\ndata class GraniteVideoMetadata(\n    val title: String? = null,\n    val subtitle: String? = null,\n    val description: String? = null,\n    val artist: String? = null,\n    val imageUri: String? = null\n)\n\ndata class GraniteVideoCmcdConfig(\n    val mode: Int = 1, // 0=HEADER, 1=QUERY_PARAM (default)\n    val request: Map<String, String>? = null,\n    val session: Map<String, String>? = null,\n    val obj: Map<String, String>? = null, // 'object' is a Kotlin reserved keyword\n    val status: Map<String, String>? = null\n)\n\ndata class GraniteVideoTextTrack(\n    val title: String = \"\",\n    val language: String = \"\",\n    val type: String = \"\",\n    val uri: String = \"\"\n)\n\ndata class GraniteVideoAdsConfig(\n    val type: String? = null, // \"csai\" | \"ssai\"\n    val streamType: String? = null, // \"vod\" | \"live\"\n    val adTagUrl: String? = null,\n    val adLanguage: String? = null,\n    val contentSourceId: String? = null,\n    val videoId: String? = null,\n    val assetKey: String? = null,\n    val format: String? = null, // \"hls\" | \"dash\"\n    val fallbackUri: String? = null,\n    val adTagParameters: Map<String, String>? = null\n)\n\n// ============================================================\n// Event Data Classes\n// ============================================================\n\ndata class GraniteVideoLoadData(\n    val currentTime: Double = 0.0,\n    val duration: Double = 0.0,\n    val naturalWidth: Double = 0.0,\n    val naturalHeight: Double = 0.0,\n    val orientation: String = \"landscape\"\n)\n\ndata class GraniteVideoProgressData(\n    val currentTime: Double = 0.0,\n    val playableDuration: Double = 0.0,\n    val seekableDuration: Double = 0.0\n)\n\ndata class GraniteVideoErrorData(\n    val code: Int = 0,\n    val domain: String = \"\",\n    val localizedDescription: String = \"\",\n    val errorString: String = \"\"\n)\n\n// ============================================================\n// Delegate Interface\n// ============================================================\n\ninterface GraniteVideoDelegate {\n    fun onLoadStart(isNetwork: Boolean, type: String, uri: String) {}\n    fun onLoad(data: GraniteVideoLoadData) {}\n    fun onError(error: GraniteVideoErrorData) {}\n    fun onProgress(data: GraniteVideoProgressData) {}\n    fun onSeek(currentTime: Double, seekTime: Double) {}\n    fun onEnd() {}\n    fun onBuffer(isBuffering: Boolean) {}\n    fun onBandwidthUpdate(bitrate: Double, width: Int, height: Int) {}\n    fun onPlaybackStateChanged(isPlaying: Boolean, isSeeking: Boolean, isLooping: Boolean) {}\n    fun onPlaybackRateChange(rate: Float) {}\n    fun onVolumeChange(volume: Float) {}\n    fun onIdle() {}\n    fun onReadyForDisplay() {}\n    fun onAudioFocusChanged(hasAudioFocus: Boolean) {}\n    fun onAudioBecomingNoisy() {}\n    fun onFullscreenPlayerWillPresent() {}\n    fun onFullscreenPlayerDidPresent() {}\n    fun onFullscreenPlayerWillDismiss() {}\n    fun onFullscreenPlayerDidDismiss() {}\n    fun onPictureInPictureStatusChanged(isActive: Boolean) {}\n    fun onControlsVisibilityChanged(isVisible: Boolean) {}\n    fun onAspectRatioChanged(width: Double, height: Double) {}\n    fun onTransferEnd(uri: String, bytesTransferred: Long) {}\n}\n\n// ============================================================\n// Provider Interface\n// ============================================================\n\ninterface GraniteVideoProvider {\n    // Required - Provider Identification\n    val providerId: String\n    val providerName: String\n\n    // Required - View Creation\n    fun createPlayerView(context: Context): View\n\n    // Required - Source Loading\n    fun loadSource(source: GraniteVideoSource)\n    fun unload()\n\n    // Required - Playback Control\n    fun play()\n    fun pause()\n    fun seek(time: Double, tolerance: Double = 0.0)\n\n    // Required - Properties\n    var delegate: GraniteVideoDelegate?\n    val currentTime: Double\n    val duration: Double\n    val isPlaying: Boolean\n\n    // Optional - Volume\n    fun setVolume(volume: Float) {}\n    fun setMuted(muted: Boolean) {}\n\n    // Optional - Rate\n    fun setRate(rate: Float) {}\n\n    // Optional - Repeat\n    fun setRepeat(shouldRepeat: Boolean) {}\n\n    // Optional - Resize Mode\n    fun setResizeMode(mode: GraniteVideoResizeMode) {}\n\n    // Optional - Audio Focus\n    fun setDisableAudioFocus(disable: Boolean) {}\n\n    // Optional - Background Playback\n    fun setPlayInBackground(enabled: Boolean) {}\n    fun setPlayWhenInactive(enabled: Boolean) {}\n\n    // Optional - Audio Output\n    fun setAudioOutput(output: GraniteVideoAudioOutput) {}\n\n    // Optional - Fullscreen\n    fun setFullscreen(fullscreen: Boolean, animated: Boolean = true) {}\n    fun setFullscreenAutorotate(autorotate: Boolean) {}\n    fun setFullscreenOrientation(orientation: String) {}\n\n    // Optional - Picture in Picture\n    fun setPictureInPictureEnabled(enabled: Boolean) {}\n    fun enterPictureInPicture() {}\n    fun exitPictureInPicture() {}\n\n    // Optional - Controls\n    fun setControlsEnabled(enabled: Boolean) {}\n    fun setPreventsDisplaySleepDuringVideoPlayback(prevents: Boolean) {}\n\n    // Optional - Buffer Config\n    fun setBufferConfig(config: GraniteVideoBufferConfig) {}\n    fun setMaxBitRate(bitRate: Int) {}\n    fun setMinLoadRetryCount(count: Int) {}\n\n    // Optional - Track Selection\n    fun setSelectedAudioTrack(track: GraniteVideoSelectedTrack) {}\n    fun setSelectedTextTrack(track: GraniteVideoSelectedTrack) {}\n    fun setSelectedVideoTrack(type: String, value: Int) {}\n\n    // Optional - DRM\n    fun setDrmConfig(config: GraniteVideoDrmConfig) {}\n\n    // Optional - View Type\n    fun setUseTextureView(useTexture: Boolean) {}\n    fun setUseSecureView(useSecure: Boolean) {}\n\n    // Optional - Shutter\n    fun setShutterColor(color: Int) {}\n    fun setHideShutterView(hide: Boolean) {}\n\n    // Optional - Cache Management\n    fun clearCache() {}\n\n    // Optional - Codec Support\n    fun isCodecSupported(mimeType: String, width: Int, height: Int): Boolean = false\n    fun isHEVCSupported(): Boolean = false\n    fun getWidevineLevel(): Int = 0\n\n    // Optional - Content Start Time (SSAI)\n    fun setContentStartTime(time: Double) {}\n\n    // Lifecycle - Release resources\n    fun release() {}\n}\n\n// ============================================================\n// Provider Info\n// ============================================================\n\ndata class ProviderInfo(\n    val id: String,\n    val name: String\n)\n\n// ============================================================\n// Registry Singleton\n// ============================================================\n\nobject GraniteVideoRegistry {\n    // Multi-provider storage: id -> factory\n    private val providers = mutableMapOf<String, () -> GraniteVideoProvider>()\n    private var defaultProviderId: String? = null\n\n    // Legacy support\n    private var legacyFactory: (() -> GraniteVideoProvider)? = null\n    private var legacyProvider: GraniteVideoProvider? = null\n\n    // ============================================================\n    // New API - Multi-Provider Support\n    // ============================================================\n\n    /**\n     * Register a provider factory with a specific ID.\n     * If the ID already exists, it will be overwritten.\n     */\n    fun registerFactory(id: String, factory: () -> GraniteVideoProvider) {\n        providers[id] = factory\n    }\n\n    /**\n     * Create a provider instance by ID.\n     * Returns null if the ID is not registered.\n     */\n    fun createProvider(id: String): GraniteVideoProvider? {\n        return providers[id]?.invoke()\n    }\n\n    /**\n     * Set the default provider ID.\n     * When createProvider() is called without an ID, this provider will be created.\n     */\n    fun setDefaultProvider(id: String) {\n        defaultProviderId = id\n    }\n\n    /**\n     * Get list of all registered provider IDs.\n     */\n    fun getAvailableProviders(): List<String> {\n        return providers.keys.toList()\n    }\n\n    /**\n     * Get provider info by ID.\n     * Creates a temporary instance to read providerId and providerName.\n     */\n    fun getProviderInfo(id: String): ProviderInfo? {\n        val factory = providers[id] ?: return null\n        val provider = factory()\n        return ProviderInfo(id = provider.providerId, name = provider.providerName)\n    }\n\n    /**\n     * Clear all registered providers and reset state.\n     * Primarily used for testing.\n     */\n    @androidx.annotation.VisibleForTesting\n    fun clear() {\n        providers.clear()\n        defaultProviderId = null\n        legacyFactory = null\n        legacyProvider = null\n    }\n\n    // ============================================================\n    // Legacy API - Backward Compatibility\n    // ============================================================\n\n    /**\n     * Register a provider instance (legacy).\n     */\n    fun register(provider: GraniteVideoProvider) {\n        legacyProvider = provider\n        // Also register in new system if it has an ID\n        registerFactory(provider.providerId) { provider }\n    }\n\n    /**\n     * Register a provider factory without ID (legacy).\n     * The factory will be used as fallback when no ID is specified.\n     */\n    fun registerFactory(factory: () -> GraniteVideoProvider) {\n        legacyFactory = factory\n        // Create one instance to get the ID and register\n        val instance = factory()\n        registerFactory(instance.providerId, factory)\n    }\n\n    /**\n     * Create a provider instance (legacy/default).\n     * Priority:\n     * 1. Default provider ID if set\n     * 2. Legacy factory\n     * 3. Legacy provider instance\n     * 4. First available provider\n     */\n    fun createProvider(): GraniteVideoProvider? {\n        // 1. Try default provider\n        defaultProviderId?.let { id ->\n            return providers[id]?.invoke()\n        }\n\n        // 2. Try legacy factory (also registered in providers map)\n        legacyFactory?.let { return it() }\n\n        // 3. Try legacy provider\n        legacyProvider?.let { return it }\n\n        // 4. Return first available\n        return providers.values.firstOrNull()?.invoke()\n    }\n\n    /**\n     * Check if any provider is registered.\n     */\n    fun hasProvider(): Boolean {\n        return providers.isNotEmpty() || legacyFactory != null || legacyProvider != null\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/media3/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <application>\n        <provider\n            android:name=\"run.granite.video.provider.media3.Media3ContentProvider\"\n            android:authorities=\"${applicationId}.granite-video-media3-init\"\n            android:exported=\"false\" />\n    </application>\n</manifest>\n"
  },
  {
    "path": "packages/video/android/src/media3/java/run/granite/video/provider/media3/ExoPlayerProvider.kt",
    "content": "package run.granite.video.provider.media3\n\nimport android.content.Context\nimport android.net.Uri\nimport android.view.View\nimport android.view.SurfaceView\nimport android.view.TextureView\nimport android.widget.FrameLayout\nimport android.graphics.Color\nimport androidx.media3.common.Player\nimport androidx.media3.common.util.UnstableApi\nimport androidx.media3.datasource.DefaultDataSource\nimport androidx.media3.datasource.DefaultHttpDataSource\nimport androidx.media3.exoplayer.ExoPlayer\nimport androidx.media3.exoplayer.trackselection.DefaultTrackSelector\nimport androidx.media3.exoplayer.DefaultLoadControl\nimport run.granite.video.provider.GraniteVideoAudioOutput\nimport run.granite.video.provider.GraniteVideoBufferConfig\nimport run.granite.video.provider.GraniteVideoDelegate\nimport run.granite.video.provider.GraniteVideoProvider\nimport run.granite.video.provider.GraniteVideoResizeMode\nimport run.granite.video.provider.GraniteVideoSelectedTrack\nimport run.granite.video.provider.GraniteVideoSource\nimport run.granite.video.provider.GraniteVideoProgressData\nimport run.granite.video.provider.media3.factory.DefaultExoPlayerFactory\nimport run.granite.video.provider.media3.factory.DefaultMediaSourceFactory\nimport run.granite.video.provider.media3.factory.DefaultTrackSelectorFactory\nimport run.granite.video.provider.media3.factory.DefaultVideoSurfaceFactory\nimport run.granite.video.provider.media3.factory.ExoPlayerFactory\nimport run.granite.video.provider.media3.factory.MediaSourceFactory\nimport run.granite.video.provider.media3.factory.TrackSelectorFactory\nimport run.granite.video.provider.media3.factory.VideoSurfaceFactory\nimport run.granite.video.provider.media3.listener.ExoPlayerEventListener\nimport run.granite.video.provider.media3.listener.PlaybackStateProvider\nimport run.granite.video.provider.media3.scheduler.HandlerProgressScheduler\nimport run.granite.video.provider.media3.scheduler.ProgressScheduler\n\n/**\n * Built-in ExoPlayer Provider (Default, using AndroidX Media3)\n *\n * This provider uses dependency injection for all external dependencies,\n * making it fully testable. Default implementations are provided for\n * production use.\n */\n@UnstableApi\nclass ExoPlayerProvider(\n    private val exoPlayerFactory: ExoPlayerFactory = DefaultExoPlayerFactory(),\n    private val videoSurfaceFactory: VideoSurfaceFactory = DefaultVideoSurfaceFactory(),\n    private val mediaSourceFactory: MediaSourceFactory = DefaultMediaSourceFactory(),\n    private val progressScheduler: ProgressScheduler = HandlerProgressScheduler(),\n    private val trackSelectorFactory: TrackSelectorFactory = DefaultTrackSelectorFactory()\n) : GraniteVideoProvider, PlaybackStateProvider {\n\n    // Provider Identification\n    override val providerId: String = \"media3\"\n    override val providerName: String = \"Media3 ExoPlayer\"\n\n    // Properties\n    override var delegate: GraniteVideoDelegate? = null\n\n    private var player: ExoPlayer? = null\n    private var playerView: FrameLayout? = null\n    private var surfaceView: SurfaceView? = null\n    private var textureView: TextureView? = null\n    private var context: Context? = null\n    private var trackSelector: DefaultTrackSelector? = null\n    private var eventListener: ExoPlayerEventListener? = null\n\n    private var _isPlaying: Boolean = false\n    private var _isSeeking: Boolean = false\n    private var _shouldRepeat: Boolean = false\n    private var _resizeMode: GraniteVideoResizeMode = GraniteVideoResizeMode.CONTAIN\n    private var _useTextureView: Boolean = false\n    private var _useSecureView: Boolean = false\n    private var _playInBackground: Boolean = false\n    private var _volume: Float = 1.0f\n    private var _muted: Boolean = false\n    private var _rate: Float = 1.0f\n    private var _shutterColor: Int = Color.BLACK\n\n    // PlaybackStateProvider implementation\n    override val isPlaying: Boolean\n        get() = _isPlaying\n\n    override val isSeeking: Boolean\n        get() = _isSeeking\n\n    override val isLooping: Boolean\n        get() = _shouldRepeat\n\n    override val currentTime: Double\n        get() = (player?.currentPosition ?: 0L) / 1000.0\n\n    override val duration: Double\n        get() = (player?.duration ?: 0L) / 1000.0\n\n    // Required - View Creation\n    override fun createPlayerView(context: Context): View {\n        this.context = context\n\n        playerView = videoSurfaceFactory.createContainer(context).apply {\n            setBackgroundColor(_shutterColor)\n        }\n\n        // Initialize player\n        trackSelector = trackSelectorFactory.create(context)\n        player = exoPlayerFactory.create(context, trackSelector!!)\n\n        // Create and attach event listener\n        eventListener = ExoPlayerEventListener(\n            delegateProvider = { delegate },\n            stateProvider = this,\n            onPlayingChanged = { isPlaying -> _isPlaying = isPlaying },\n            onVideoSizeChanged = { _, _ -> /* Handled by listener */ }\n        )\n        player?.addListener(eventListener!!)\n\n        // Create surface/texture view\n        setupVideoSurface(context)\n\n        return playerView!!\n    }\n\n    private fun setupVideoSurface(context: Context) {\n        // Remove existing views\n        surfaceView?.let { playerView?.removeView(it) }\n        textureView?.let { playerView?.removeView(it) }\n\n        if (_useTextureView) {\n            textureView = videoSurfaceFactory.createTextureView(context)\n            player?.setVideoTextureView(textureView)\n            playerView?.addView(textureView)\n        } else {\n            surfaceView = videoSurfaceFactory.createSurfaceView(context)\n            player?.setVideoSurfaceView(surfaceView)\n            playerView?.addView(surfaceView)\n        }\n    }\n\n    // Required - Source Loading\n    override fun loadSource(source: GraniteVideoSource) {\n        val uri = source.uri ?: return\n        val ctx = context ?: return\n\n        delegate?.onLoadStart(\n            isNetwork = uri.startsWith(\"http\"),\n            type = source.type ?: detectMediaType(uri),\n            uri = uri\n        )\n\n        // Create data source factory with headers\n        val httpDataSourceFactory = DefaultHttpDataSource.Factory().apply {\n            source.headers?.let { headers ->\n                setDefaultRequestProperties(headers)\n            }\n        }\n\n        val dataSourceFactory = DefaultDataSource.Factory(ctx, httpDataSourceFactory)\n\n        // Create media source using factory\n        val mediaSource = mediaSourceFactory.create(source, dataSourceFactory)\n\n        player?.setMediaSource(mediaSource)\n        player?.prepare()\n\n        // Seek to start time if specified\n        if (source.startTime > 0) {\n            player?.seekTo(source.startTime.toLong())\n        }\n    }\n\n    override fun unload() {\n        progressScheduler.cancel()\n        player?.stop()\n        player?.clearMediaItems()\n    }\n\n    // Required - Playback Control\n    override fun play() {\n        player?.play()\n        _isPlaying = true\n        startProgressUpdates()\n        delegate?.onPlaybackStateChanged(isPlaying = true, isSeeking = false, isLooping = _shouldRepeat)\n    }\n\n    override fun pause() {\n        player?.pause()\n        _isPlaying = false\n        progressScheduler.cancel()\n        delegate?.onPlaybackStateChanged(isPlaying = false, isSeeking = false, isLooping = _shouldRepeat)\n    }\n\n    override fun seek(time: Double, tolerance: Double) {\n        _isSeeking = true\n        delegate?.onPlaybackStateChanged(isPlaying = _isPlaying, isSeeking = true, isLooping = _shouldRepeat)\n\n        val positionMs = (time * 1000).toLong()\n        player?.seekTo(positionMs)\n\n        delegate?.onSeek(currentTime = currentTime, seekTime = time)\n        _isSeeking = false\n        delegate?.onPlaybackStateChanged(isPlaying = _isPlaying, isSeeking = false, isLooping = _shouldRepeat)\n    }\n\n    // Optional - Volume\n    override fun setVolume(volume: Float) {\n        _volume = volume\n        player?.volume = if (_muted) 0f else volume\n        delegate?.onVolumeChange(volume)\n    }\n\n    override fun setMuted(muted: Boolean) {\n        _muted = muted\n        player?.volume = if (muted) 0f else _volume\n    }\n\n    // Optional - Rate\n    override fun setRate(rate: Float) {\n        _rate = rate\n        player?.setPlaybackSpeed(rate)\n        delegate?.onPlaybackRateChange(rate)\n    }\n\n    // Optional - Repeat\n    override fun setRepeat(shouldRepeat: Boolean) {\n        _shouldRepeat = shouldRepeat\n        player?.repeatMode = if (shouldRepeat) Player.REPEAT_MODE_ONE else Player.REPEAT_MODE_OFF\n    }\n\n    // Optional - Resize Mode\n    override fun setResizeMode(mode: GraniteVideoResizeMode) {\n        _resizeMode = mode\n        // ExoPlayer handles resize mode differently - would need AspectRatioFrameLayout\n    }\n\n    // Optional - Background Playback\n    override fun setPlayInBackground(enabled: Boolean) {\n        _playInBackground = enabled\n    }\n\n    override fun setPlayWhenInactive(enabled: Boolean) {\n        // Similar to playInBackground for Android\n    }\n\n    // Optional - Audio Output\n    override fun setAudioOutput(output: GraniteVideoAudioOutput) {\n        // Would require AudioManager configuration\n    }\n\n    // Optional - Fullscreen\n    override fun setFullscreen(fullscreen: Boolean, animated: Boolean) {\n        if (fullscreen) {\n            delegate?.onFullscreenPlayerWillPresent()\n            delegate?.onFullscreenPlayerDidPresent()\n        } else {\n            delegate?.onFullscreenPlayerWillDismiss()\n            delegate?.onFullscreenPlayerDidDismiss()\n        }\n    }\n\n    // Optional - Controls\n    override fun setControlsEnabled(enabled: Boolean) {\n        // Would need to add/remove control views\n        delegate?.onControlsVisibilityChanged(enabled)\n    }\n\n    // Optional - Buffer Config\n    override fun setBufferConfig(config: GraniteVideoBufferConfig) {\n        val ctx = context ?: return\n\n        val loadControl = DefaultLoadControl.Builder()\n            .setBufferDurationsMs(\n                config.minBufferMs,\n                config.maxBufferMs,\n                config.bufferForPlaybackMs,\n                config.bufferForPlaybackAfterRebufferMs\n            )\n            .setBackBuffer(config.backBufferDurationMs, true)\n            .build()\n\n        // Note: Would need to rebuild player with new load control\n    }\n\n    override fun setMaxBitRate(bitRate: Int) {\n        trackSelector?.setParameters(\n            trackSelector!!.buildUponParameters()\n                .setMaxVideoBitrate(bitRate)\n        )\n    }\n\n    // Optional - Track Selection\n    override fun setSelectedAudioTrack(track: GraniteVideoSelectedTrack) {\n        // Would use trackSelector to select audio track\n    }\n\n    override fun setSelectedTextTrack(track: GraniteVideoSelectedTrack) {\n        // Would use trackSelector to select text track\n    }\n\n    override fun setSelectedVideoTrack(type: String, value: Int) {\n        // Would use trackSelector to select video track\n    }\n\n    // Optional - View Type\n    override fun setUseTextureView(useTexture: Boolean) {\n        if (_useTextureView != useTexture) {\n            _useTextureView = useTexture\n            context?.let { setupVideoSurface(it) }\n        }\n    }\n\n    override fun setUseSecureView(useSecure: Boolean) {\n        _useSecureView = useSecure\n        if (useSecure) {\n            surfaceView?.setSecure(true)\n        }\n    }\n\n    // Optional - Shutter\n    override fun setShutterColor(color: Int) {\n        _shutterColor = color\n        playerView?.setBackgroundColor(color)\n    }\n\n    override fun setHideShutterView(hide: Boolean) {\n        playerView?.setBackgroundColor(if (hide) Color.TRANSPARENT else _shutterColor)\n    }\n\n    // Optional - Cache Management\n    override fun clearCache() {\n        // Would need cache implementation\n    }\n\n    // Optional - Codec Support\n    override fun isCodecSupported(mimeType: String, width: Int, height: Int): Boolean {\n        // Would check MediaCodecList\n        return true\n    }\n\n    override fun isHEVCSupported(): Boolean {\n        return isCodecSupported(\"video/hevc\", 1920, 1080)\n    }\n\n    override fun getWidevineLevel(): Int {\n        // Would check Widevine security level\n        return 1\n    }\n\n    // Private helpers\n    private fun detectMediaType(uri: String): String {\n        return when {\n            uri.contains(\".m3u8\") -> \"hls\"\n            uri.contains(\".mpd\") -> \"dash\"\n            uri.contains(\".ism\") -> \"smoothstreaming\"\n            uri.contains(\".mp4\") -> \"mp4\"\n            uri.contains(\".webm\") -> \"webm\"\n            else -> \"unknown\"\n        }\n    }\n\n    private fun startProgressUpdates() {\n        progressScheduler.schedule(250) {\n            player?.let { p ->\n                val progressData = GraniteVideoProgressData(\n                    currentTime = p.currentPosition / 1000.0,\n                    playableDuration = p.bufferedPosition / 1000.0,\n                    seekableDuration = p.duration / 1000.0\n                )\n                delegate?.onProgress(progressData)\n            }\n        }\n    }\n\n    // Cleanup\n    override fun release() {\n        progressScheduler.cancel()\n        eventListener?.let { player?.removeListener(it) }\n        player?.release()\n        player = null\n        eventListener = null\n        surfaceView = null\n        textureView = null\n        playerView = null\n        context = null\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/media3/java/run/granite/video/provider/media3/Media3ContentProvider.kt",
    "content": "package run.granite.video.provider.media3\n\nimport android.content.ContentProvider\nimport android.content.ContentValues\nimport android.database.Cursor\nimport android.net.Uri\n\n/**\n * ContentProvider for automatic Media3 initialization.\n *\n * This provider is automatically instantiated by Android before Application.onCreate(),\n * ensuring Media3 ExoPlayer is registered as the default video provider early in the app lifecycle.\n *\n * No manual registration required - just include this module in your build.\n */\nclass Media3ContentProvider : ContentProvider() {\n\n    override fun onCreate(): Boolean {\n        Media3Initializer.initialize()\n        return true\n    }\n\n    // Required ContentProvider methods - not used for initialization\n    override fun query(uri: Uri, projection: Array<String>?, selection: String?, selectionArgs: Array<String>?, sortOrder: String?): Cursor? = null\n    override fun getType(uri: Uri): String? = null\n    override fun insert(uri: Uri, values: ContentValues?): Uri? = null\n    override fun delete(uri: Uri, selection: String?, selectionArgs: Array<String>?): Int = 0\n    override fun update(uri: Uri, values: ContentValues?, selection: String?, selectionArgs: Array<String>?): Int = 0\n}\n"
  },
  {
    "path": "packages/video/android/src/media3/java/run/granite/video/provider/media3/Media3Initializer.kt",
    "content": "package run.granite.video.provider.media3\n\nimport run.granite.video.BuildConfig\nimport run.granite.video.provider.GraniteVideoRegistry\n\n/**\n * Initializes Media3 ExoPlayer as the default video provider.\n *\n * Called by GraniteVideoPackage when USE_MEDIA3 is enabled.\n */\nobject Media3Initializer {\n    private var initialized = false\n\n    /**\n     * Initialize Media3 provider and register it as default.\n     * Safe to call multiple times - only executes once.\n     */\n    fun initialize() {\n        if (initialized) return\n        initialized = true\n\n        GraniteVideoRegistry.registerFactory(\"media3\") { ExoPlayerProvider() }\n        GraniteVideoRegistry.setDefaultProvider(\"media3\")\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/media3/java/run/granite/video/provider/media3/factory/ExoPlayerFactory.kt",
    "content": "package run.granite.video.provider.media3.factory\n\nimport android.content.Context\nimport androidx.media3.common.util.UnstableApi\nimport androidx.media3.exoplayer.ExoPlayer\nimport androidx.media3.exoplayer.trackselection.DefaultTrackSelector\n\n/**\n * Factory interface for creating ExoPlayer instances.\n * Abstracted to allow for testability.\n */\ninterface ExoPlayerFactory {\n    /**\n     * Create an ExoPlayer instance.\n     * @param context The Android context.\n     * @param trackSelector The track selector to use.\n     * @return A new ExoPlayer instance.\n     */\n    fun create(context: Context, trackSelector: DefaultTrackSelector): ExoPlayer\n}\n\n/**\n * Default implementation that creates a standard ExoPlayer.\n */\n@UnstableApi\nclass DefaultExoPlayerFactory : ExoPlayerFactory {\n    override fun create(context: Context, trackSelector: DefaultTrackSelector): ExoPlayer {\n        return ExoPlayer.Builder(context)\n            .setTrackSelector(trackSelector)\n            .build()\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/media3/java/run/granite/video/provider/media3/factory/MediaSourceFactory.kt",
    "content": "package run.granite.video.provider.media3.factory\n\nimport android.net.Uri\nimport androidx.media3.common.MediaItem\nimport androidx.media3.common.util.UnstableApi\nimport androidx.media3.datasource.DataSource\nimport androidx.media3.exoplayer.dash.DashMediaSource\nimport androidx.media3.exoplayer.hls.HlsMediaSource\nimport androidx.media3.exoplayer.smoothstreaming.SsMediaSource\nimport androidx.media3.exoplayer.source.MediaSource\nimport androidx.media3.exoplayer.source.ProgressiveMediaSource\nimport run.granite.video.provider.GraniteVideoSource\n\n/**\n * Factory interface for creating MediaSource instances.\n * Abstracted to allow for testability.\n */\ninterface MediaSourceFactory {\n    /**\n     * Create a MediaSource for the given video source.\n     * @param source The video source configuration.\n     * @param dataSourceFactory The data source factory to use.\n     * @return A new MediaSource.\n     */\n    fun create(source: GraniteVideoSource, dataSourceFactory: DataSource.Factory): MediaSource\n}\n\n/**\n * Default implementation that creates appropriate MediaSource based on content type.\n */\n@UnstableApi\nclass DefaultMediaSourceFactory : MediaSourceFactory {\n\n    override fun create(source: GraniteVideoSource, dataSourceFactory: DataSource.Factory): MediaSource {\n        val uri = Uri.parse(source.uri ?: \"\")\n        val type = source.type ?: inferType(uri)\n\n        val mediaItem = MediaItem.fromUri(uri)\n\n        return when (type.lowercase()) {\n            \"hls\", \"m3u8\" -> HlsMediaSource.Factory(dataSourceFactory)\n                .createMediaSource(mediaItem)\n            \"dash\", \"mpd\" -> DashMediaSource.Factory(dataSourceFactory)\n                .createMediaSource(mediaItem)\n            \"ss\", \"ism\", \"smoothstreaming\" -> SsMediaSource.Factory(dataSourceFactory)\n                .createMediaSource(mediaItem)\n            else -> ProgressiveMediaSource.Factory(dataSourceFactory)\n                .createMediaSource(mediaItem)\n        }\n    }\n\n    private fun inferType(uri: Uri): String {\n        val path = uri.path?.lowercase() ?: \"\"\n        return when {\n            path.endsWith(\".m3u8\") -> \"hls\"\n            path.endsWith(\".mpd\") -> \"dash\"\n            path.contains(\".ism\") -> \"ss\"\n            else -> \"progressive\"\n        }\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/media3/java/run/granite/video/provider/media3/factory/TrackSelectorFactory.kt",
    "content": "package run.granite.video.provider.media3.factory\n\nimport android.content.Context\nimport androidx.media3.exoplayer.trackselection.DefaultTrackSelector\n\n/**\n * Factory interface for creating TrackSelector instances.\n * Abstracted to allow for testability.\n */\ninterface TrackSelectorFactory {\n    /**\n     * Create a DefaultTrackSelector instance.\n     * @param context The Android context.\n     * @return A new DefaultTrackSelector instance.\n     */\n    fun create(context: Context): DefaultTrackSelector\n}\n\n/**\n * Default implementation that creates a standard DefaultTrackSelector.\n */\nclass DefaultTrackSelectorFactory : TrackSelectorFactory {\n    override fun create(context: Context): DefaultTrackSelector {\n        return DefaultTrackSelector(context)\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/media3/java/run/granite/video/provider/media3/factory/VideoSurfaceFactory.kt",
    "content": "package run.granite.video.provider.media3.factory\n\nimport android.content.Context\nimport android.view.SurfaceView\nimport android.view.TextureView\nimport android.view.View\nimport android.widget.FrameLayout\n\n/**\n * Factory interface for creating video surface views.\n * Abstracted to allow for testability.\n */\ninterface VideoSurfaceFactory {\n    /**\n     * Create a SurfaceView for video rendering.\n     * @param context The Android context.\n     * @return A new SurfaceView.\n     */\n    fun createSurfaceView(context: Context): SurfaceView\n\n    /**\n     * Create a TextureView for video rendering.\n     * @param context The Android context.\n     * @return A new TextureView.\n     */\n    fun createTextureView(context: Context): TextureView\n\n    /**\n     * Create a container FrameLayout for the video player.\n     * @param context The Android context.\n     * @return A new FrameLayout.\n     */\n    fun createContainer(context: Context): FrameLayout\n}\n\n/**\n * Default implementation that creates standard Android views.\n */\nclass DefaultVideoSurfaceFactory : VideoSurfaceFactory {\n\n    override fun createSurfaceView(context: Context): SurfaceView {\n        return SurfaceView(context).apply {\n            layoutParams = FrameLayout.LayoutParams(\n                FrameLayout.LayoutParams.MATCH_PARENT,\n                FrameLayout.LayoutParams.MATCH_PARENT\n            )\n        }\n    }\n\n    override fun createTextureView(context: Context): TextureView {\n        return TextureView(context).apply {\n            layoutParams = FrameLayout.LayoutParams(\n                FrameLayout.LayoutParams.MATCH_PARENT,\n                FrameLayout.LayoutParams.MATCH_PARENT\n            )\n        }\n    }\n\n    override fun createContainer(context: Context): FrameLayout {\n        return FrameLayout(context)\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/media3/java/run/granite/video/provider/media3/listener/ExoPlayerEventListener.kt",
    "content": "package run.granite.video.provider.media3.listener\n\nimport androidx.media3.common.PlaybackException\nimport androidx.media3.common.Player\nimport androidx.media3.common.VideoSize\nimport androidx.media3.common.util.UnstableApi\nimport run.granite.video.provider.GraniteVideoDelegate\nimport run.granite.video.provider.GraniteVideoErrorData\nimport run.granite.video.provider.GraniteVideoLoadData\n\n/**\n * Callback interface for playback state changes.\n */\ninterface PlaybackStateProvider {\n    val isPlaying: Boolean\n    val isSeeking: Boolean\n    val isLooping: Boolean\n    val currentTime: Double\n    val duration: Double\n}\n\n/**\n * ExoPlayer event listener that delegates events to GraniteVideoDelegate.\n * Separated from ExoPlayerProvider for testability.\n */\n@UnstableApi\nclass ExoPlayerEventListener(\n    private val delegateProvider: () -> GraniteVideoDelegate?,\n    private val stateProvider: PlaybackStateProvider,\n    private val onPlayingChanged: (Boolean) -> Unit = {},\n    private val onVideoSizeChanged: (Int, Int) -> Unit = { _, _ -> }\n) : Player.Listener {\n\n    private val delegate: GraniteVideoDelegate?\n        get() = delegateProvider()\n\n    override fun onPlaybackStateChanged(playbackState: Int) {\n        when (playbackState) {\n            Player.STATE_IDLE -> {\n                delegate?.onIdle()\n            }\n            Player.STATE_BUFFERING -> {\n                delegate?.onBuffer(true)\n            }\n            Player.STATE_READY -> {\n                delegate?.onBuffer(false)\n                delegate?.onReadyForDisplay()\n                delegate?.onLoad(\n                    GraniteVideoLoadData(\n                        currentTime = stateProvider.currentTime,\n                        duration = stateProvider.duration,\n                        naturalWidth = 0.0, // Will be updated in onVideoSizeChanged\n                        naturalHeight = 0.0,\n                        orientation = \"landscape\"\n                    )\n                )\n            }\n            Player.STATE_ENDED -> {\n                delegate?.onEnd()\n            }\n        }\n    }\n\n    override fun onIsPlayingChanged(isPlaying: Boolean) {\n        onPlayingChanged(isPlaying)\n        delegate?.onPlaybackStateChanged(\n            isPlaying = isPlaying,\n            isSeeking = stateProvider.isSeeking,\n            isLooping = stateProvider.isLooping\n        )\n    }\n\n    override fun onPlayerError(error: PlaybackException) {\n        delegate?.onError(\n            GraniteVideoErrorData(\n                code = error.errorCode,\n                domain = \"ExoPlayer\",\n                localizedDescription = error.message ?: \"Unknown error\",\n                errorString = error.errorCodeName\n            )\n        )\n    }\n\n    override fun onVideoSizeChanged(videoSize: VideoSize) {\n        val width = videoSize.width\n        val height = videoSize.height\n\n        if (width > 0 && height > 0) {\n            onVideoSizeChanged(width, height)\n            delegate?.onAspectRatioChanged(width.toDouble(), height.toDouble())\n\n            // Update load data with actual dimensions\n            delegate?.onLoad(\n                GraniteVideoLoadData(\n                    currentTime = stateProvider.currentTime,\n                    duration = stateProvider.duration,\n                    naturalWidth = width.toDouble(),\n                    naturalHeight = height.toDouble(),\n                    orientation = if (width > height) \"landscape\" else \"portrait\"\n                )\n            )\n        }\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/media3/java/run/granite/video/provider/media3/scheduler/ProgressScheduler.kt",
    "content": "package run.granite.video.provider.media3.scheduler\n\nimport android.os.Handler\nimport android.os.Looper\n\n/**\n * Interface for scheduling periodic progress updates.\n * Abstracted to allow for testability.\n */\ninterface ProgressScheduler {\n    /**\n     * Schedule a periodic action.\n     * @param intervalMs The interval in milliseconds.\n     * @param action The action to execute periodically.\n     */\n    fun schedule(intervalMs: Long, action: () -> Unit)\n\n    /**\n     * Cancel any scheduled actions.\n     */\n    fun cancel()\n}\n\n/**\n * Default implementation using Android Handler.\n */\nclass HandlerProgressScheduler(\n    private val handler: Handler = Handler(Looper.getMainLooper())\n) : ProgressScheduler {\n\n    private var runnable: Runnable? = null\n    private var intervalMs: Long = 0\n    private var action: (() -> Unit)? = null\n\n    override fun schedule(intervalMs: Long, action: () -> Unit) {\n        cancel()\n\n        this.intervalMs = intervalMs\n        this.action = action\n\n        runnable = object : Runnable {\n            override fun run() {\n                action()\n                handler.postDelayed(this, intervalMs)\n            }\n        }\n\n        handler.post(runnable!!)\n    }\n\n    override fun cancel() {\n        runnable?.let { handler.removeCallbacks(it) }\n        runnable = null\n        action = null\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/test/java/run/granite/video/GraniteVideoViewRobolectricTest.kt",
    "content": "package run.granite.video\n\nimport android.content.Context\nimport android.view.View\nimport io.mockk.*\nimport org.junit.After\nimport org.junit.Before\nimport org.junit.Test\nimport org.junit.runner.RunWith\nimport org.robolectric.RobolectricTestRunner\nimport org.robolectric.RuntimeEnvironment\nimport org.robolectric.annotation.Config\nimport run.granite.video.provider.*\nimport org.junit.Assert.*\n\n/**\n * GraniteVideoView tests using Robolectric for Android view testing.\n * These tests require a real Android environment provided by Robolectric.\n */\n@RunWith(RobolectricTestRunner::class)\n@Config(sdk = [28])\nclass GraniteVideoViewRobolectricTest {\n\n    private lateinit var context: Context\n    private lateinit var mockProvider: GraniteVideoProvider\n    private lateinit var mockPlayerView: View\n    private lateinit var mockEventListener: GraniteVideoEventListener\n\n    @Before\n    fun setUp() {\n        context = RuntimeEnvironment.getApplication()\n        mockProvider = mockk(relaxed = true)\n        mockPlayerView = View(context)\n        mockEventListener = mockk(relaxed = true)\n\n        every { mockProvider.createPlayerView(any()) } returns mockPlayerView\n        every { mockProvider.providerId } returns \"test-provider\"\n        every { mockProvider.providerName } returns \"Test Provider\"\n\n        GraniteVideoRegistry.clear()\n    }\n\n    @After\n    fun tearDown() {\n        clearAllMocks()\n        GraniteVideoRegistry.clear()\n    }\n\n    // ============================================================\n    // Initialization Tests\n    // ============================================================\n\n    @Test\n    fun `view created with provider factory should use the provided factory`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        assertEquals(mockProvider, view.currentProvider)\n    }\n\n    @Test\n    fun `view should set delegate on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        verify { mockProvider.delegate = view }\n    }\n\n    @Test\n    fun `view should create player view on initialization`() {\n        GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        verify { mockProvider.createPlayerView(context) }\n    }\n\n    @Test\n    fun `view created with default provider from registry should use registry provider`() {\n        GraniteVideoRegistry.registerFactory(\"default\") { mockProvider }\n        GraniteVideoRegistry.setDefaultProvider(\"default\")\n\n        val view = GraniteVideoView(context = context)\n\n        assertEquals(mockProvider, view.currentProvider)\n    }\n\n    @Test\n    fun `view created with no registry and no factory should have a fallback provider`() {\n        val view = GraniteVideoView(context = context)\n\n        assertNotNull(view.currentProvider)\n    }\n\n    // ============================================================\n    // setSource Tests\n    // ============================================================\n\n    @Test\n    fun `setSource with valid source should call loadSource on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        val source = mapOf(\n            \"uri\" to \"https://example.com/video.mp4\",\n            \"type\" to \"mp4\",\n            \"headers\" to mapOf(\"Authorization\" to \"Bearer token\")\n        )\n        view.setSource(source)\n\n        verify {\n            mockProvider.loadSource(match<GraniteVideoSource> {\n                it.uri == \"https://example.com/video.mp4\" &&\n                it.type == \"mp4\" &&\n                it.headers?.get(\"Authorization\") == \"Bearer token\"\n            })\n        }\n    }\n\n    @Test\n    fun `setSource with null source should not call loadSource`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setSource(null)\n\n        verify(exactly = 0) { mockProvider.loadSource(any()) }\n    }\n\n    @Test\n    fun `setSource when not paused should call play after loading`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n        view.setPaused(false)\n        clearMocks(mockProvider, answers = false)\n        every { mockProvider.createPlayerView(any()) } returns mockPlayerView\n\n        view.setSource(mapOf(\"uri\" to \"https://example.com/video.mp4\"))\n\n        verifyOrder {\n            mockProvider.loadSource(any())\n            mockProvider.play()\n        }\n    }\n\n    // ============================================================\n    // Playback Control Tests\n    // ============================================================\n\n    @Test\n    fun `setPaused(true) should call pause on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setPaused(true)\n\n        verify { mockProvider.pause() }\n    }\n\n    @Test\n    fun `setPaused(false) should call play on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setPaused(false)\n\n        verify { mockProvider.play() }\n    }\n\n    @Test\n    fun `setMuted should call setMuted on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setMuted(true)\n\n        verify { mockProvider.setMuted(true) }\n    }\n\n    @Test\n    fun `setVolume should call setVolume on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setVolume(0.5f)\n\n        verify { mockProvider.setVolume(0.5f) }\n    }\n\n    @Test\n    fun `setRate should call setRate on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setRate(1.5f)\n\n        verify { mockProvider.setRate(1.5f) }\n    }\n\n    @Test\n    fun `setRepeat should call setRepeat on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setRepeat(true)\n\n        verify { mockProvider.setRepeat(true) }\n    }\n\n    @Test\n    fun `seek should call seek on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.seek(30.0, 0.5)\n\n        verify { mockProvider.seek(30.0, 0.5) }\n    }\n\n    // ============================================================\n    // Resize Mode Tests\n    // ============================================================\n\n    @Test\n    fun `setResizeMode cover should call setResizeMode with COVER`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setResizeMode(\"cover\")\n\n        verify { mockProvider.setResizeMode(GraniteVideoResizeMode.COVER) }\n    }\n\n    @Test\n    fun `setResizeMode stretch should call setResizeMode with STRETCH`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setResizeMode(\"stretch\")\n\n        verify { mockProvider.setResizeMode(GraniteVideoResizeMode.STRETCH) }\n    }\n\n    @Test\n    fun `setResizeMode none should call setResizeMode with NONE`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setResizeMode(\"none\")\n\n        verify { mockProvider.setResizeMode(GraniteVideoResizeMode.NONE) }\n    }\n\n    @Test\n    fun `setResizeMode contain should call setResizeMode with CONTAIN`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setResizeMode(\"contain\")\n\n        verify { mockProvider.setResizeMode(GraniteVideoResizeMode.CONTAIN) }\n    }\n\n    // ============================================================\n    // Controls Tests\n    // ============================================================\n\n    @Test\n    fun `setControls should call setControlsEnabled on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setControls(true)\n\n        verify { mockProvider.setControlsEnabled(true) }\n    }\n\n    @Test\n    fun `setFullscreen should call setFullscreen on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setFullscreen(true)\n\n        verify { mockProvider.setFullscreen(true, true) }\n    }\n\n    @Test\n    fun `setPictureInPicture should call setPictureInPictureEnabled on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setPictureInPicture(true)\n\n        verify { mockProvider.setPictureInPictureEnabled(true) }\n    }\n\n    // ============================================================\n    // Buffer Config Tests\n    // ============================================================\n\n    @Test\n    fun `setBufferConfig with valid config should call setBufferConfig on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        val config = mapOf(\n            \"minBufferMs\" to 10000,\n            \"maxBufferMs\" to 30000,\n            \"bufferForPlaybackMs\" to 2000\n        )\n        view.setBufferConfig(config)\n\n        verify {\n            mockProvider.setBufferConfig(match<GraniteVideoBufferConfig> {\n                it.minBufferMs == 10000 &&\n                it.maxBufferMs == 30000 &&\n                it.bufferForPlaybackMs == 2000\n            })\n        }\n    }\n\n    @Test\n    fun `setBufferConfig with null should not call setBufferConfig`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setBufferConfig(null)\n\n        verify(exactly = 0) { mockProvider.setBufferConfig(any()) }\n    }\n\n    // ============================================================\n    // Delegate Events Tests\n    // ============================================================\n\n    @Test\n    fun `onLoadStart should forward to eventListener`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n        view.eventListener = mockEventListener\n\n        view.onLoadStart(true, \"mp4\", \"https://example.com/video.mp4\")\n\n        verify { mockEventListener.onLoadStart(true, \"mp4\", \"https://example.com/video.mp4\") }\n    }\n\n    @Test\n    fun `onLoad should forward to eventListener`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n        view.eventListener = mockEventListener\n\n        val data = GraniteVideoLoadData(\n            currentTime = 0.0,\n            duration = 60.0,\n            naturalWidth = 1920.0,\n            naturalHeight = 1080.0,\n            orientation = \"landscape\"\n        )\n        view.onLoad(data)\n\n        verify { mockEventListener.onLoad(data) }\n    }\n\n    @Test\n    fun `onError should forward to eventListener`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n        view.eventListener = mockEventListener\n\n        val error = GraniteVideoErrorData(\n            code = 1001,\n            domain = \"ExoPlayer\",\n            localizedDescription = \"Test error\",\n            errorString = \"ERROR_TEST\"\n        )\n        view.onError(error)\n\n        verify { mockEventListener.onError(error) }\n    }\n\n    @Test\n    fun `onProgress should forward to eventListener`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n        view.eventListener = mockEventListener\n\n        val data = GraniteVideoProgressData(\n            currentTime = 10.0,\n            playableDuration = 20.0,\n            seekableDuration = 60.0\n        )\n        view.onProgress(data)\n\n        verify { mockEventListener.onProgress(data) }\n    }\n\n    @Test\n    fun `onEnd should forward to eventListener`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n        view.eventListener = mockEventListener\n\n        view.onEnd()\n\n        verify { mockEventListener.onEnd() }\n    }\n\n    @Test\n    fun `onBuffer should forward to eventListener`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n        view.eventListener = mockEventListener\n\n        view.onBuffer(true)\n\n        verify { mockEventListener.onBuffer(true) }\n    }\n\n    @Test\n    fun `onPlaybackStateChanged should forward to eventListener`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n        view.eventListener = mockEventListener\n\n        view.onPlaybackStateChanged(true, false, true)\n\n        verify { mockEventListener.onPlaybackStateChanged(true, false, true) }\n    }\n\n    // ============================================================\n    // Provider Selection Tests\n    // ============================================================\n\n    @Test\n    fun `default provider set before view creation should be used`() {\n        val mockProvider2 = mockk<GraniteVideoProvider>(relaxed = true)\n        val mockPlayerView2 = View(context)\n        every { mockProvider2.createPlayerView(any()) } returns mockPlayerView2\n        every { mockProvider2.providerId } returns \"provider2\"\n\n        GraniteVideoRegistry.registerFactory(\"provider1\") { mockProvider }\n        GraniteVideoRegistry.registerFactory(\"provider2\") { mockProvider2 }\n        GraniteVideoRegistry.setDefaultProvider(\"provider2\")\n\n        val view = GraniteVideoView(context = context)\n\n        assertEquals(mockProvider2, view.currentProvider)\n    }\n\n    @Test\n    fun `different default providers for different views`() {\n        val mockProvider2 = mockk<GraniteVideoProvider>(relaxed = true)\n        val mockPlayerView2 = View(context)\n        every { mockProvider2.createPlayerView(any()) } returns mockPlayerView2\n        every { mockProvider2.providerId } returns \"provider2\"\n\n        GraniteVideoRegistry.registerFactory(\"provider1\") { mockProvider }\n        GraniteVideoRegistry.registerFactory(\"provider2\") { mockProvider2 }\n\n        GraniteVideoRegistry.setDefaultProvider(\"provider1\")\n        val view1 = GraniteVideoView(context = context)\n\n        GraniteVideoRegistry.setDefaultProvider(\"provider2\")\n        val view2 = GraniteVideoView(context = context)\n\n        assertEquals(mockProvider, view1.currentProvider)\n        assertEquals(mockProvider2, view2.currentProvider)\n    }\n\n    // ============================================================\n    // Commands Tests\n    // ============================================================\n\n    @Test\n    fun `pauseCommand should call pause on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.pauseCommand()\n\n        verify { mockProvider.pause() }\n    }\n\n    @Test\n    fun `resumeCommand should call play on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.resumeCommand()\n\n        verify { mockProvider.play() }\n    }\n\n    @Test\n    fun `seekCommand should call seek on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.seekCommand(30.0, 0.1)\n\n        verify { mockProvider.seek(30.0, 0.1) }\n    }\n\n    @Test\n    fun `setVolumeCommand should call setVolume on provider`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setVolumeCommand(0.7f)\n\n        verify { mockProvider.setVolume(0.7f) }\n    }\n\n    @Test\n    fun `setSourceCommand should call loadSource with uri`() {\n        val view = GraniteVideoView(\n            context = context,\n            providerFactory = { mockProvider }\n        )\n\n        view.setSourceCommand(\"https://example.com/video.mp4\")\n\n        verify {\n            mockProvider.loadSource(match<GraniteVideoSource> {\n                it.uri == \"https://example.com/video.mp4\"\n            })\n        }\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/test/java/run/granite/video/event/VideoEventListenerAdapterTest.kt",
    "content": "package run.granite.video.event\n\nimport com.facebook.react.bridge.Arguments\nimport com.facebook.react.bridge.WritableMap\nimport com.facebook.react.uimanager.events.Event\nimport io.kotest.core.spec.style.FunSpec\nimport io.kotest.matchers.shouldBe\nimport io.mockk.*\nimport run.granite.video.provider.GraniteVideoErrorData\nimport run.granite.video.provider.GraniteVideoLoadData\nimport run.granite.video.provider.GraniteVideoProgressData\n\nclass VideoEventListenerAdapterTest : FunSpec({\n\n    lateinit var mockDispatcher: VideoEventDispatcher\n    lateinit var mockWritableMap: WritableMap\n    lateinit var adapter: VideoEventListenerAdapter\n    val viewId = 123\n    val surfaceId = 1\n\n    beforeTest {\n        mockDispatcher = mockk(relaxed = true)\n        mockWritableMap = mockk(relaxed = true)\n\n        // Mock static Arguments.createMap() to return our mock\n        mockkStatic(Arguments::class)\n        every { Arguments.createMap() } returns mockWritableMap\n\n        // Mock getSurfaceId() to return test surfaceId\n        every { mockDispatcher.getSurfaceId() } returns surfaceId\n\n        adapter = VideoEventListenerAdapter(\n            dispatcher = mockDispatcher,\n            viewIdProvider = { viewId }\n        )\n    }\n\n    afterTest {\n        clearAllMocks()\n        unmockkStatic(Arguments::class)\n    }\n\n    // ============================================================\n    // onLoadStart Tests\n    // ============================================================\n\n    test(\"onLoadStart should dispatch topVideoLoadStart event\") {\n        adapter.onLoadStart(true, \"mp4\", \"https://example.com/video.mp4\")\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoLoadStartEvent> {\n                it.getEventName() == \"topVideoLoadStart\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onLoad Tests\n    // ============================================================\n\n    test(\"onLoad should dispatch topVideoLoad event\") {\n        val data = GraniteVideoLoadData(\n            currentTime = 0.0,\n            duration = 60.0,\n            naturalWidth = 1920.0,\n            naturalHeight = 1080.0,\n            orientation = \"landscape\"\n        )\n\n        adapter.onLoad(data)\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoLoadEvent> {\n                it.getEventName() == \"topVideoLoad\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onError Tests\n    // ============================================================\n\n    test(\"onError should dispatch topVideoError event\") {\n        val error = GraniteVideoErrorData(\n            code = 1001,\n            domain = \"ExoPlayer\",\n            localizedDescription = \"Test error\",\n            errorString = \"ERROR_TEST\"\n        )\n\n        adapter.onError(error)\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoErrorEvent> {\n                it.getEventName() == \"topVideoError\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onProgress Tests\n    // ============================================================\n\n    test(\"onProgress should dispatch topVideoProgress event\") {\n        val data = GraniteVideoProgressData(\n            currentTime = 10.0,\n            playableDuration = 20.0,\n            seekableDuration = 60.0\n        )\n\n        adapter.onProgress(data)\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoProgressEvent> {\n                it.getEventName() == \"topVideoProgress\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onSeek Tests\n    // ============================================================\n\n    test(\"onSeek should dispatch topVideoSeek event\") {\n        adapter.onSeek(5.0, 10.0)\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoSeekEvent> {\n                it.getEventName() == \"topVideoSeek\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onEnd Tests\n    // ============================================================\n\n    test(\"onEnd should dispatch topVideoEnd event\") {\n        adapter.onEnd()\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoEndEvent> {\n                it.getEventName() == \"topVideoEnd\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onBuffer Tests\n    // ============================================================\n\n    test(\"onBuffer should dispatch topVideoBuffer event\") {\n        adapter.onBuffer(true)\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoBufferEvent> {\n                it.getEventName() == \"topVideoBuffer\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onBandwidthUpdate Tests\n    // ============================================================\n\n    test(\"onBandwidthUpdate should dispatch topVideoBandwidthUpdate event\") {\n        adapter.onBandwidthUpdate(5000000.0, 1920, 1080)\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoBandwidthUpdateEvent> {\n                it.getEventName() == \"topVideoBandwidthUpdate\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onPlaybackStateChanged Tests\n    // ============================================================\n\n    test(\"onPlaybackStateChanged should dispatch topVideoPlaybackStateChanged event\") {\n        adapter.onPlaybackStateChanged(true, false, false)\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoPlaybackStateChangedEvent> {\n                it.getEventName() == \"topVideoPlaybackStateChanged\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onPlaybackRateChange Tests\n    // ============================================================\n\n    test(\"onPlaybackRateChange should dispatch topVideoPlaybackRateChange event\") {\n        adapter.onPlaybackRateChange(1.5f)\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoPlaybackRateChangeEvent> {\n                it.getEventName() == \"topVideoPlaybackRateChange\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onVolumeChange Tests\n    // ============================================================\n\n    test(\"onVolumeChange should dispatch topVideoVolumeChange event\") {\n        adapter.onVolumeChange(0.5f)\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoVolumeChangeEvent> {\n                it.getEventName() == \"topVideoVolumeChange\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onIdle Tests\n    // ============================================================\n\n    test(\"onIdle should dispatch topVideoIdle event\") {\n        adapter.onIdle()\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoIdleEvent> {\n                it.getEventName() == \"topVideoIdle\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // onReadyForDisplay Tests\n    // ============================================================\n\n    test(\"onReadyForDisplay should dispatch topVideoReadyForDisplay event\") {\n        adapter.onReadyForDisplay()\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoReadyForDisplayEvent> {\n                it.getEventName() == \"topVideoReadyForDisplay\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // Fullscreen Events Tests\n    // ============================================================\n\n    test(\"onFullscreenPlayerWillPresent should dispatch topVideoFullscreenPlayerWillPresent event\") {\n        adapter.onFullscreenPlayerWillPresent()\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoFullscreenPlayerWillPresentEvent> {\n                it.getEventName() == \"topVideoFullscreenPlayerWillPresent\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    test(\"onFullscreenPlayerDidPresent should dispatch topVideoFullscreenPlayerDidPresent event\") {\n        adapter.onFullscreenPlayerDidPresent()\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoFullscreenPlayerDidPresentEvent> {\n                it.getEventName() == \"topVideoFullscreenPlayerDidPresent\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // PiP Tests\n    // ============================================================\n\n    test(\"onPictureInPictureStatusChanged should dispatch topVideoPictureInPictureStatusChanged event\") {\n        adapter.onPictureInPictureStatusChanged(true)\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoPictureInPictureStatusChangedEvent> {\n                it.getEventName() == \"topVideoPictureInPictureStatusChanged\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // Aspect Ratio Tests\n    // ============================================================\n\n    test(\"onAspectRatioChanged should dispatch topVideoAspectRatio event\") {\n        adapter.onAspectRatioChanged(16.0, 9.0)\n\n        verify {\n            mockDispatcher.dispatchEvent(match<GraniteVideoAspectRatioEvent> {\n                it.getEventName() == \"topVideoAspectRatio\" && it.viewTag == viewId\n            })\n        }\n    }\n\n    // ============================================================\n    // Dynamic viewId Tests\n    // ============================================================\n\n    test(\"viewId changes dynamically should use updated viewId for each dispatch\") {\n        var currentViewId = 100\n\n        val dynamicAdapter = VideoEventListenerAdapter(\n            dispatcher = mockDispatcher,\n            viewIdProvider = { currentViewId }\n        )\n\n        dynamicAdapter.onEnd()\n        currentViewId = 200\n        dynamicAdapter.onEnd()\n\n        verifyOrder {\n            mockDispatcher.dispatchEvent(match<GraniteVideoEndEvent> { it.viewTag == 100 })\n            mockDispatcher.dispatchEvent(match<GraniteVideoEndEvent> { it.viewTag == 200 })\n        }\n    }\n})\n"
  },
  {
    "path": "packages/video/android/src/test/java/run/granite/video/helpers/FakeGraniteVideoProvider.kt",
    "content": "package run.granite.video.helpers\n\nimport android.content.Context\nimport android.view.View\nimport io.mockk.mockk\nimport run.granite.video.provider.*\n\nclass FakeGraniteVideoProvider(\n    override val providerId: String = \"fake\",\n    override val providerName: String = \"Fake Provider\"\n) : GraniteVideoProvider {\n\n    override var delegate: GraniteVideoDelegate? = null\n\n    var playCount = 0\n        private set\n    var pauseCount = 0\n        private set\n    var seekCount = 0\n        private set\n    var lastLoadedSource: GraniteVideoSource? = null\n        private set\n    var lastSeekTime: Double = 0.0\n        private set\n\n    private var _isPlaying = false\n    private var _currentTime = 0.0\n    private var _duration = 0.0\n    private var _volume = 1.0f\n    private var _muted = false\n    private var _rate = 1.0f\n    private var _repeat = false\n\n    override val currentTime: Double get() = _currentTime\n    override val duration: Double get() = _duration\n    override val isPlaying: Boolean get() = _isPlaying\n\n    override fun createPlayerView(context: Context): View = mockk(relaxed = true)\n\n    override fun loadSource(source: GraniteVideoSource) {\n        lastLoadedSource = source\n        _duration = 0.0\n        _currentTime = source.startTime\n        delegate?.onLoadStart(\n            isNetwork = source.uri?.startsWith(\"http\") == true,\n            type = source.type ?: \"unknown\",\n            uri = source.uri ?: \"\"\n        )\n    }\n\n    override fun unload() {\n        _isPlaying = false\n        _currentTime = 0.0\n        _duration = 0.0\n        lastLoadedSource = null\n    }\n\n    override fun play() {\n        playCount++\n        _isPlaying = true\n        delegate?.onPlaybackStateChanged(isPlaying = true, isSeeking = false, isLooping = _repeat)\n    }\n\n    override fun pause() {\n        pauseCount++\n        _isPlaying = false\n        delegate?.onPlaybackStateChanged(isPlaying = false, isSeeking = false, isLooping = _repeat)\n    }\n\n    override fun seek(time: Double, tolerance: Double) {\n        seekCount++\n        lastSeekTime = time\n        val previousTime = _currentTime\n        _currentTime = time\n        delegate?.onSeek(currentTime = previousTime, seekTime = time)\n    }\n\n    override fun setVolume(volume: Float) {\n        _volume = volume\n        delegate?.onVolumeChange(volume)\n    }\n\n    override fun setMuted(muted: Boolean) {\n        _muted = muted\n        delegate?.onVolumeChange(if (muted) 0f else _volume)\n    }\n\n    override fun setRate(rate: Float) {\n        _rate = rate\n        delegate?.onPlaybackRateChange(rate)\n    }\n\n    override fun setRepeat(shouldRepeat: Boolean) {\n        _repeat = shouldRepeat\n    }\n\n    // Test helpers\n    fun simulateLoad(duration: Double, width: Double = 1920.0, height: Double = 1080.0) {\n        _duration = duration\n        delegate?.onLoad(\n            GraniteVideoLoadData(\n                currentTime = _currentTime,\n                duration = duration,\n                naturalWidth = width,\n                naturalHeight = height,\n                orientation = if (width > height) \"landscape\" else \"portrait\"\n            )\n        )\n    }\n\n    fun simulateProgress(currentTime: Double) {\n        _currentTime = currentTime\n        delegate?.onProgress(\n            GraniteVideoProgressData(\n                currentTime = currentTime,\n                playableDuration = _duration,\n                seekableDuration = _duration\n            )\n        )\n    }\n\n    fun simulateEnd() {\n        _isPlaying = false\n        delegate?.onEnd()\n    }\n\n    fun simulateError(code: Int, message: String) {\n        delegate?.onError(\n            GraniteVideoErrorData(\n                code = code,\n                domain = \"Fake\",\n                localizedDescription = message,\n                errorString = message\n            )\n        )\n    }\n\n    fun simulateBuffer(isBuffering: Boolean) {\n        delegate?.onBuffer(isBuffering)\n    }\n\n    override fun release() {\n        reset()\n    }\n\n    fun reset() {\n        playCount = 0\n        pauseCount = 0\n        seekCount = 0\n        lastLoadedSource = null\n        lastSeekTime = 0.0\n        _isPlaying = false\n        _currentTime = 0.0\n        _duration = 0.0\n        _volume = 1.0f\n        _muted = false\n        _rate = 1.0f\n        _repeat = false\n        delegate = null\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/test/java/run/granite/video/helpers/TestProgressScheduler.kt",
    "content": "package run.granite.video.helpers\n\nimport run.granite.video.provider.media3.scheduler.ProgressScheduler\n\nclass TestProgressScheduler : ProgressScheduler {\n    private var action: (() -> Unit)? = null\n    private var _intervalMs: Long = 0\n\n    var scheduledCount = 0\n        private set\n    var cancelCount = 0\n        private set\n\n    val intervalMs: Long get() = _intervalMs\n    val isScheduled: Boolean get() = action != null\n\n    override fun schedule(intervalMs: Long, action: () -> Unit) {\n        this.action = action\n        this._intervalMs = intervalMs\n        scheduledCount++\n    }\n\n    override fun cancel() {\n        action = null\n        cancelCount++\n    }\n\n    fun tick() {\n        action?.invoke()\n    }\n\n    fun tick(times: Int) {\n        repeat(times) { tick() }\n    }\n\n    fun reset() {\n        action = null\n        _intervalMs = 0\n        scheduledCount = 0\n        cancelCount = 0\n    }\n}\n"
  },
  {
    "path": "packages/video/android/src/test/java/run/granite/video/provider/GraniteVideoRegistryTest.kt",
    "content": "package run.granite.video.provider\n\nimport io.kotest.core.spec.style.FunSpec\nimport io.kotest.matchers.collections.shouldBeEmpty\nimport io.kotest.matchers.collections.shouldContain\nimport io.kotest.matchers.collections.shouldContainAll\nimport io.kotest.matchers.nulls.shouldBeNull\nimport io.kotest.matchers.nulls.shouldNotBeNull\nimport io.kotest.matchers.shouldBe\nimport io.kotest.matchers.shouldNotBe\nimport run.granite.video.helpers.FakeGraniteVideoProvider\n\nclass GraniteVideoRegistryTest : FunSpec({\n\n    beforeTest {\n        GraniteVideoRegistry.clear()\n    }\n\n    afterTest {\n        GraniteVideoRegistry.clear()\n    }\n\n    // ============================================================\n    // Clear API Tests\n    // ============================================================\n\n    test(\"clear() should remove all providers\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n        GraniteVideoRegistry.registerFactory(\"exoplayer2\") { FakeGraniteVideoProvider(\"exoplayer2\", \"ExoPlayer2\") }\n\n        GraniteVideoRegistry.clear()\n\n        GraniteVideoRegistry.getAvailableProviders().shouldBeEmpty()\n    }\n\n    test(\"clear() should make hasProvider() return false\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n\n        GraniteVideoRegistry.clear()\n\n        GraniteVideoRegistry.hasProvider() shouldBe false\n    }\n\n    test(\"clear() should make createProvider() return null\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n\n        GraniteVideoRegistry.clear()\n\n        GraniteVideoRegistry.createProvider().shouldBeNull()\n    }\n\n    // ============================================================\n    // Multi-Provider Registration Tests\n    // ============================================================\n\n    test(\"registerFactory should make provider available\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n\n        GraniteVideoRegistry.getAvailableProviders() shouldContain \"media3\"\n    }\n\n    test(\"registerFactory should make hasProvider() return true\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n\n        GraniteVideoRegistry.hasProvider() shouldBe true\n    }\n\n    test(\"createProvider with unknown id should return null\") {\n        val provider = GraniteVideoRegistry.createProvider(\"unknown\")\n\n        provider.shouldBeNull()\n    }\n\n    test(\"multiple providers should all be available\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n        GraniteVideoRegistry.registerFactory(\"exoplayer2\") { FakeGraniteVideoProvider(\"exoplayer2\", \"ExoPlayer2\") }\n        GraniteVideoRegistry.registerFactory(\"vlc\") { FakeGraniteVideoProvider(\"vlc\", \"VLC\") }\n\n        GraniteVideoRegistry.getAvailableProviders() shouldContainAll listOf(\"media3\", \"exoplayer2\", \"vlc\")\n    }\n\n    // ============================================================\n    // Provider Creation by ID Tests\n    // ============================================================\n\n    test(\"createProvider with valid id should return provider with matching id\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n        GraniteVideoRegistry.registerFactory(\"exoplayer2\") { FakeGraniteVideoProvider(\"exoplayer2\", \"ExoPlayer2\") }\n\n        val provider = GraniteVideoRegistry.createProvider(\"exoplayer2\")\n\n        provider.shouldNotBeNull()\n        provider.providerId shouldBe \"exoplayer2\"\n    }\n\n    test(\"createProvider called multiple times should create new instance each time\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n\n        val provider1 = GraniteVideoRegistry.createProvider(\"media3\")\n        val provider2 = GraniteVideoRegistry.createProvider(\"media3\")\n\n        provider1.shouldNotBeNull()\n        provider2.shouldNotBeNull()\n        provider1 shouldNotBe provider2\n    }\n\n    // ============================================================\n    // Default Provider Tests\n    // ============================================================\n\n    test(\"createProvider without id should return default provider\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n        GraniteVideoRegistry.registerFactory(\"exoplayer2\") { FakeGraniteVideoProvider(\"exoplayer2\", \"ExoPlayer2\") }\n        GraniteVideoRegistry.setDefaultProvider(\"exoplayer2\")\n\n        val provider = GraniteVideoRegistry.createProvider()\n\n        provider.shouldNotBeNull()\n        provider.providerId shouldBe \"exoplayer2\"\n    }\n\n    test(\"setDefaultProvider should change the default\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n        GraniteVideoRegistry.registerFactory(\"exoplayer2\") { FakeGraniteVideoProvider(\"exoplayer2\", \"ExoPlayer2\") }\n        GraniteVideoRegistry.setDefaultProvider(\"exoplayer2\")\n\n        GraniteVideoRegistry.setDefaultProvider(\"media3\")\n        val provider = GraniteVideoRegistry.createProvider()\n\n        provider.shouldNotBeNull()\n        provider.providerId shouldBe \"media3\"\n    }\n\n    test(\"setDefaultProvider with unknown id should make createProvider return null\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n        GraniteVideoRegistry.setDefaultProvider(\"unknown\")\n\n        val provider = GraniteVideoRegistry.createProvider()\n\n        provider.shouldBeNull()\n    }\n\n    // ============================================================\n    // Provider Info Tests\n    // ============================================================\n\n    test(\"getProviderInfo with valid id should return provider info\") {\n        GraniteVideoRegistry.registerFactory(\"vlc\") { FakeGraniteVideoProvider(\"vlc\", \"VLC Player\") }\n\n        val info = GraniteVideoRegistry.getProviderInfo(\"vlc\")\n\n        info.shouldNotBeNull()\n        info.id shouldBe \"vlc\"\n        info.name shouldBe \"VLC Player\"\n    }\n\n    test(\"getProviderInfo with unknown id should return null\") {\n        val info = GraniteVideoRegistry.getProviderInfo(\"unknown\")\n\n        info.shouldBeNull()\n    }\n\n    // ============================================================\n    // Overwrite Tests\n    // ============================================================\n\n    test(\"registering same id again should overwrite previous factory\") {\n        GraniteVideoRegistry.registerFactory(\"custom\") { FakeGraniteVideoProvider(\"custom\", \"Custom V1\") }\n\n        GraniteVideoRegistry.registerFactory(\"custom\") { FakeGraniteVideoProvider(\"custom\", \"Custom V2\") }\n        val info = GraniteVideoRegistry.getProviderInfo(\"custom\")\n\n        info.shouldNotBeNull()\n        info.name shouldBe \"Custom V2\"\n    }\n\n    // ============================================================\n    // Backward Compatibility Tests\n    // ============================================================\n\n    test(\"legacy registerFactory without id should work\") {\n        GraniteVideoRegistry.registerFactory { FakeGraniteVideoProvider(\"legacy\", \"Legacy\") }\n\n        val provider = GraniteVideoRegistry.createProvider()\n        provider.shouldNotBeNull()\n        provider.providerId shouldBe \"legacy\"\n    }\n\n    test(\"legacy registerFactory should make hasProvider() return true\") {\n        GraniteVideoRegistry.registerFactory { FakeGraniteVideoProvider(\"legacy\", \"Legacy\") }\n\n        GraniteVideoRegistry.hasProvider() shouldBe true\n    }\n\n    // ============================================================\n    // Custom Provider Override Tests\n    // ============================================================\n\n    test(\"custom provider should be used when registered before default\") {\n        GraniteVideoRegistry.registerFactory(\"custom\") { FakeGraniteVideoProvider(\"custom\", \"Custom\") }\n        GraniteVideoRegistry.setDefaultProvider(\"custom\")\n\n        // Even after registering media3\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n\n        val provider = GraniteVideoRegistry.createProvider()\n        provider.shouldNotBeNull()\n        provider.providerId shouldBe \"custom\"\n    }\n\n    test(\"custom provider should override default when set after registration\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n        GraniteVideoRegistry.setDefaultProvider(\"media3\")\n\n        GraniteVideoRegistry.registerFactory(\"custom\") { FakeGraniteVideoProvider(\"custom\", \"Custom\") }\n        GraniteVideoRegistry.setDefaultProvider(\"custom\")\n\n        val provider = GraniteVideoRegistry.createProvider()\n        provider.shouldNotBeNull()\n        provider.providerId shouldBe \"custom\"\n    }\n\n    test(\"createProvider with specific id should work even when different default is set\") {\n        GraniteVideoRegistry.registerFactory(\"media3\") { FakeGraniteVideoProvider(\"media3\", \"Media3\") }\n        GraniteVideoRegistry.registerFactory(\"custom\") { FakeGraniteVideoProvider(\"custom\", \"Custom\") }\n        GraniteVideoRegistry.setDefaultProvider(\"custom\")\n\n        val provider = GraniteVideoRegistry.createProvider(\"media3\")\n        provider.shouldNotBeNull()\n        provider.providerId shouldBe \"media3\"\n    }\n})\n"
  },
  {
    "path": "packages/video/android/src/test/java/run/granite/video/provider/ProviderContractTest.kt",
    "content": "package run.granite.video.provider\n\nimport io.kotest.core.spec.style.FunSpec\nimport io.kotest.matchers.shouldBe\nimport io.kotest.matchers.shouldNotBe\nimport io.kotest.matchers.string.shouldNotBeEmpty\nimport run.granite.video.helpers.FakeGraniteVideoProvider\n\n/**\n * Contract tests for GraniteVideoProvider interface.\n * These tests verify that any provider implementation follows the expected contract.\n */\nclass ProviderContractTest : FunSpec({\n\n    context(\"GraniteVideoProvider contract\") {\n\n        test(\"provider must have a non-empty providerId\") {\n            val provider = FakeGraniteVideoProvider()\n            provider.providerId.shouldNotBeEmpty()\n        }\n\n        test(\"provider must have a non-empty providerName\") {\n            val provider = FakeGraniteVideoProvider()\n            provider.providerName.shouldNotBeEmpty()\n        }\n\n        test(\"provider delegate should be settable\") {\n            val provider = FakeGraniteVideoProvider()\n            val delegate = object : GraniteVideoDelegate {}\n\n            provider.delegate = delegate\n            provider.delegate shouldBe delegate\n        }\n\n        test(\"provider should track play/pause state\") {\n            val provider = FakeGraniteVideoProvider()\n\n            provider.isPlaying shouldBe false\n\n            provider.play()\n            provider.isPlaying shouldBe true\n\n            provider.pause()\n            provider.isPlaying shouldBe false\n        }\n\n        test(\"provider should handle seek\") {\n            val provider = FakeGraniteVideoProvider()\n\n            provider.seek(30.0, 0.5)\n            provider.seekCount shouldBe 1\n            provider.lastSeekTime shouldBe 30.0\n        }\n\n        test(\"provider should handle volume\") {\n            val provider = FakeGraniteVideoProvider()\n\n            provider.setVolume(0.5f)\n            // Volume should be settable without error\n        }\n\n        test(\"provider should handle mute\") {\n            val provider = FakeGraniteVideoProvider()\n\n            provider.setMuted(true)\n            provider.setMuted(false)\n            // Should toggle without error\n        }\n\n        test(\"provider should handle rate\") {\n            val provider = FakeGraniteVideoProvider()\n\n            provider.setRate(1.5f)\n            provider.setRate(0.5f)\n            // Rate should be settable without error\n        }\n\n        test(\"provider should handle repeat\") {\n            val provider = FakeGraniteVideoProvider()\n\n            provider.setRepeat(true)\n            provider.setRepeat(false)\n            // Repeat should be settable without error\n        }\n\n        test(\"provider should handle resize mode\") {\n            val provider = FakeGraniteVideoProvider()\n\n            provider.setResizeMode(GraniteVideoResizeMode.CONTAIN)\n            provider.setResizeMode(GraniteVideoResizeMode.COVER)\n            provider.setResizeMode(GraniteVideoResizeMode.STRETCH)\n            provider.setResizeMode(GraniteVideoResizeMode.NONE)\n            // All resize modes should be accepted\n        }\n\n        test(\"provider should have valid currentTime and duration\") {\n            val provider = FakeGraniteVideoProvider()\n\n            provider.currentTime shouldNotBe null\n            provider.duration shouldNotBe null\n        }\n    }\n\n    context(\"GraniteVideoRegistry contract\") {\n\n        beforeTest {\n            GraniteVideoRegistry.clear()\n        }\n\n        afterTest {\n            GraniteVideoRegistry.clear()\n        }\n\n        test(\"registry should allow factory registration\") {\n            GraniteVideoRegistry.registerFactory(\"test\") { FakeGraniteVideoProvider() }\n\n            GraniteVideoRegistry.getAvailableProviders() shouldBe listOf(\"test\")\n        }\n\n        test(\"registry should create provider from factory\") {\n            GraniteVideoRegistry.registerFactory(\"test\") { FakeGraniteVideoProvider(\"test-id\") }\n\n            val provider = GraniteVideoRegistry.createProvider(\"test\")\n            provider shouldNotBe null\n            provider?.providerId shouldBe \"test-id\"\n        }\n\n        test(\"registry should return null for unknown provider\") {\n            val provider = GraniteVideoRegistry.createProvider(\"unknown\")\n            provider shouldBe null\n        }\n\n        test(\"registry should support default provider\") {\n            GraniteVideoRegistry.registerFactory(\"provider1\") { FakeGraniteVideoProvider(\"p1\") }\n            GraniteVideoRegistry.registerFactory(\"provider2\") { FakeGraniteVideoProvider(\"p2\") }\n\n            GraniteVideoRegistry.setDefaultProvider(\"provider2\")\n\n            val provider = GraniteVideoRegistry.createProvider()\n            provider?.providerId shouldBe \"p2\"\n        }\n\n        test(\"registry should create new instance each time\") {\n            GraniteVideoRegistry.registerFactory(\"test\") { FakeGraniteVideoProvider() }\n\n            val provider1 = GraniteVideoRegistry.createProvider(\"test\")\n            val provider2 = GraniteVideoRegistry.createProvider(\"test\")\n\n            // Should be different instances\n            (provider1 === provider2) shouldBe false\n        }\n\n        test(\"registry should provide provider info\") {\n            GraniteVideoRegistry.registerFactory(\"test\") {\n                FakeGraniteVideoProvider(\"test-id\", \"Test Provider Name\")\n            }\n\n            val info = GraniteVideoRegistry.getProviderInfo(\"test\")\n            info shouldNotBe null\n            info?.id shouldBe \"test-id\"\n            info?.name shouldBe \"Test Provider Name\"\n        }\n\n        test(\"registry clear should remove all providers\") {\n            GraniteVideoRegistry.registerFactory(\"test1\") { FakeGraniteVideoProvider() }\n            GraniteVideoRegistry.registerFactory(\"test2\") { FakeGraniteVideoProvider() }\n\n            GraniteVideoRegistry.clear()\n\n            GraniteVideoRegistry.getAvailableProviders() shouldBe emptyList()\n            GraniteVideoRegistry.hasProvider() shouldBe false\n        }\n    }\n})\n"
  },
  {
    "path": "packages/video/android/src/test/java/run/granite/video/provider/media3/listener/ExoPlayerEventListenerTest.kt",
    "content": "package run.granite.video.provider.media3.listener\n\nimport androidx.media3.common.Player\nimport androidx.media3.common.VideoSize\nimport io.kotest.core.spec.style.FunSpec\nimport io.kotest.matchers.shouldBe\nimport io.mockk.*\nimport run.granite.video.provider.GraniteVideoDelegate\nimport run.granite.video.provider.GraniteVideoErrorData\nimport run.granite.video.provider.GraniteVideoLoadData\n\nclass ExoPlayerEventListenerTest : FunSpec({\n\n    lateinit var mockDelegate: GraniteVideoDelegate\n    lateinit var mockStateProvider: PlaybackStateProvider\n    lateinit var listener: ExoPlayerEventListener\n\n    var capturedPlayingChanged: Boolean? = null\n    var capturedVideoWidth: Int? = null\n    var capturedVideoHeight: Int? = null\n\n    beforeTest {\n        mockDelegate = mockk(relaxed = true)\n        mockStateProvider = mockk(relaxed = true)\n\n        capturedPlayingChanged = null\n        capturedVideoWidth = null\n        capturedVideoHeight = null\n\n        every { mockStateProvider.isPlaying } returns false\n        every { mockStateProvider.isSeeking } returns false\n        every { mockStateProvider.isLooping } returns false\n        every { mockStateProvider.currentTime } returns 5.0\n        every { mockStateProvider.duration } returns 60.0\n\n        listener = ExoPlayerEventListener(\n            delegateProvider = { mockDelegate },\n            stateProvider = mockStateProvider,\n            onPlayingChanged = { capturedPlayingChanged = it },\n            onVideoSizeChanged = { w, h ->\n                capturedVideoWidth = w\n                capturedVideoHeight = h\n            }\n        )\n    }\n\n    afterTest {\n        clearAllMocks()\n    }\n\n    // ============================================================\n    // onPlaybackStateChanged Tests\n    // ============================================================\n\n    test(\"onPlaybackStateChanged with IDLE should call delegate.onIdle()\") {\n        listener.onPlaybackStateChanged(Player.STATE_IDLE)\n\n        verify { mockDelegate.onIdle() }\n    }\n\n    test(\"onPlaybackStateChanged with BUFFERING should call delegate.onBuffer(true)\") {\n        listener.onPlaybackStateChanged(Player.STATE_BUFFERING)\n\n        verify { mockDelegate.onBuffer(true) }\n    }\n\n    test(\"onPlaybackStateChanged with READY should call delegate.onBuffer(false)\") {\n        listener.onPlaybackStateChanged(Player.STATE_READY)\n\n        verify { mockDelegate.onBuffer(false) }\n    }\n\n    test(\"onPlaybackStateChanged with READY should call delegate.onReadyForDisplay()\") {\n        listener.onPlaybackStateChanged(Player.STATE_READY)\n\n        verify { mockDelegate.onReadyForDisplay() }\n    }\n\n    test(\"onPlaybackStateChanged with READY should call delegate.onLoad with data from state provider\") {\n        listener.onPlaybackStateChanged(Player.STATE_READY)\n\n        verify {\n            mockDelegate.onLoad(match<GraniteVideoLoadData> {\n                it.currentTime == 5.0 && it.duration == 60.0\n            })\n        }\n    }\n\n    test(\"onPlaybackStateChanged with ENDED should call delegate.onEnd()\") {\n        listener.onPlaybackStateChanged(Player.STATE_ENDED)\n\n        verify { mockDelegate.onEnd() }\n    }\n\n    // ============================================================\n    // onIsPlayingChanged Tests\n    // ============================================================\n\n    test(\"onIsPlayingChanged with true should invoke onPlayingChanged callback\") {\n        listener.onIsPlayingChanged(true)\n\n        capturedPlayingChanged shouldBe true\n    }\n\n    test(\"onIsPlayingChanged with true should call delegate.onPlaybackStateChanged\") {\n        listener.onIsPlayingChanged(true)\n\n        verify {\n            mockDelegate.onPlaybackStateChanged(\n                isPlaying = true,\n                isSeeking = false,\n                isLooping = false\n            )\n        }\n    }\n\n    test(\"onIsPlayingChanged with false should invoke callback with false\") {\n        listener.onIsPlayingChanged(false)\n\n        capturedPlayingChanged shouldBe false\n    }\n\n    test(\"onIsPlayingChanged should include seeking and looping state from provider\") {\n        every { mockStateProvider.isSeeking } returns true\n        every { mockStateProvider.isLooping } returns true\n\n        listener.onIsPlayingChanged(true)\n\n        verify {\n            mockDelegate.onPlaybackStateChanged(\n                isPlaying = true,\n                isSeeking = true,\n                isLooping = true\n            )\n        }\n    }\n\n    // ============================================================\n    // onPlayerError Tests - Using error code directly instead of mocking final class\n    // ============================================================\n\n    test(\"onPlayerError should call delegate.onError with error data\") {\n        // Create a real error using reflection or error code\n        // Since PlaybackException is final, we test the behavior differently\n        // The listener should handle errors gracefully\n\n        // We'll test this indirectly by checking the listener's error handling capability\n        // For now, just verify the listener exists and can handle null delegate\n        val nullDelegateListener = ExoPlayerEventListener(\n            delegateProvider = { null },\n            stateProvider = mockStateProvider,\n            onPlayingChanged = {},\n            onVideoSizeChanged = { _, _ -> }\n        )\n\n        // Should not throw when delegate is null\n        nullDelegateListener.onPlaybackStateChanged(Player.STATE_IDLE)\n    }\n\n    // ============================================================\n    // onVideoSizeChanged Tests\n    // ============================================================\n\n    test(\"onVideoSizeChanged should invoke onVideoSizeChanged callback\") {\n        val videoSize = VideoSize(1920, 1080)\n\n        listener.onVideoSizeChanged(videoSize)\n\n        capturedVideoWidth shouldBe 1920\n        capturedVideoHeight shouldBe 1080\n    }\n\n    test(\"onVideoSizeChanged should call delegate.onAspectRatioChanged\") {\n        val videoSize = VideoSize(1920, 1080)\n\n        listener.onVideoSizeChanged(videoSize)\n\n        verify {\n            mockDelegate.onAspectRatioChanged(1920.0, 1080.0)\n        }\n    }\n\n    test(\"onVideoSizeChanged should call delegate.onLoad with landscape orientation\") {\n        val videoSize = VideoSize(1920, 1080)\n\n        listener.onVideoSizeChanged(videoSize)\n\n        verify {\n            mockDelegate.onLoad(match<GraniteVideoLoadData> {\n                it.naturalWidth == 1920.0 &&\n                it.naturalHeight == 1080.0 &&\n                it.orientation == \"landscape\"\n            })\n        }\n    }\n\n    test(\"onVideoSizeChanged with portrait size should report portrait orientation\") {\n        val videoSize = VideoSize(1080, 1920)\n\n        listener.onVideoSizeChanged(videoSize)\n\n        verify {\n            mockDelegate.onLoad(match<GraniteVideoLoadData> {\n                it.orientation == \"portrait\"\n            })\n        }\n    }\n\n    test(\"onVideoSizeChanged with zero width should not call delegate methods\") {\n        val videoSize = VideoSize(0, 1080)\n\n        listener.onVideoSizeChanged(videoSize)\n\n        verify(exactly = 0) { mockDelegate.onAspectRatioChanged(any(), any()) }\n        verify(exactly = 0) { mockDelegate.onLoad(any()) }\n    }\n\n    test(\"onVideoSizeChanged with zero height should not call delegate.onAspectRatioChanged\") {\n        val videoSize = VideoSize(1920, 0)\n\n        listener.onVideoSizeChanged(videoSize)\n\n        verify(exactly = 0) { mockDelegate.onAspectRatioChanged(any(), any()) }\n    }\n\n    // ============================================================\n    // Null Delegate Tests\n    // ============================================================\n\n    test(\"events should not throw when delegate is null\") {\n        val nullDelegateListener = ExoPlayerEventListener(\n            delegateProvider = { null },\n            stateProvider = mockStateProvider,\n            onPlayingChanged = {},\n            onVideoSizeChanged = { _, _ -> }\n        )\n\n        // These should not throw\n        nullDelegateListener.onPlaybackStateChanged(Player.STATE_READY)\n        nullDelegateListener.onIsPlayingChanged(true)\n        nullDelegateListener.onVideoSizeChanged(VideoSize(1920, 1080))\n    }\n})\n"
  },
  {
    "path": "packages/video/android/src/test/resources/kotest.properties",
    "content": "kotest.framework.test.severity=NORMAL\nkotest.framework.parallelism=1\n"
  },
  {
    "path": "packages/video/example/.bundle/config",
    "content": "BUNDLE_PATH: \"vendor/bundle\"\nBUNDLE_FORCE_RUBY_PLATFORM: 1\n"
  },
  {
    "path": "packages/video/example/.detoxrc.js",
    "content": "/** @type {Detox.DetoxConfig} */\nmodule.exports = {\n  testRunner: {\n    args: {\n      $0: 'jest',\n      config: 'e2e/jest.config.js',\n    },\n    jest: {\n      setupTimeout: 120000,\n    },\n  },\n  apps: {\n    'ios.debug': {\n      type: 'ios.app',\n      binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/GraniteVideoExample.app',\n      build:\n        'xcodebuild -workspace ios/GraniteVideoExample.xcworkspace -scheme GraniteVideoExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build',\n    },\n    'ios.release': {\n      type: 'ios.app',\n      binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/GraniteVideoExample.app',\n      build:\n        'xcodebuild -workspace ios/GraniteVideoExample.xcworkspace -scheme GraniteVideoExample -configuration Release -sdk iphonesimulator -derivedDataPath ios/build',\n    },\n    'android.debug': {\n      type: 'android.apk',\n      binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',\n      testBinaryPath: 'android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk',\n      build: 'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug',\n      reversePorts: [8081],\n    },\n    'android.release': {\n      type: 'android.apk',\n      binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',\n      build: 'cd android && ./gradlew assembleRelease',\n    },\n  },\n  devices: {\n    simulator: {\n      type: 'ios.simulator',\n      device: { type: 'iPhone 16 Pro' },\n    },\n    attached: {\n      type: 'android.attached',\n      device: { adbName: '.*' },\n    },\n    emulator: {\n      type: 'android.emulator',\n      device: { avdName: 'Pixel_8_Pro' },\n    },\n  },\n  configurations: {\n    'ios.sim.debug': {\n      device: 'simulator',\n      app: 'ios.debug',\n    },\n    'ios.sim.release': {\n      device: 'simulator',\n      app: 'ios.release',\n    },\n    'android.att.debug': {\n      device: 'attached',\n      app: 'android.debug',\n    },\n    'android.att.release': {\n      device: 'attached',\n      app: 'android.release',\n    },\n    'android.emu.debug': {\n      device: 'emulator',\n      app: 'android.debug',\n    },\n    'android.emu.release': {\n      device: 'emulator',\n      app: 'android.release',\n    },\n  },\n};\n"
  },
  {
    "path": "packages/video/example/.watchmanconfig",
    "content": "{}\n"
  },
  {
    "path": "packages/video/example/Gemfile",
    "content": "source 'https://rubygems.org'\n\n# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version\nruby \">= 2.6.10\"\n\n# Exclude problematic versions of cocoapods and activesupport that causes build failures.\ngem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'\ngem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'\ngem 'xcodeproj', '< 1.26.0'\ngem 'concurrent-ruby', '< 1.3.4'\n\n# Ruby 3.4.0 has removed some libraries from the standard library.\ngem 'bigdecimal'\ngem 'logger'\ngem 'benchmark'\ngem 'mutex_m'\n"
  },
  {
    "path": "packages/video/example/README.md",
    "content": "This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).\n\n# Getting Started\n\n> **Note**: Make sure you have completed the [Set Up Your Environment](https://reactnative.dev/docs/set-up-your-environment) guide before proceeding.\n\n## Step 1: Start Metro\n\nFirst, you will need to run **Metro**, the JavaScript build tool for React Native.\n\nTo start the Metro dev server, run the following command from the root of your React Native project:\n\n```sh\n# Using npm\nnpm start\n\n# OR using Yarn\nyarn start\n```\n\n## Step 2: Build and run your app\n\nWith Metro running, open a new terminal window/pane from the root of your React Native project, and use one of the following commands to build and run your Android or iOS app:\n\n### Android\n\n```sh\n# Using npm\nnpm run android\n\n# OR using Yarn\nyarn android\n```\n\n### iOS\n\nFor iOS, remember to install CocoaPods dependencies (this only needs to be run on first clone or after updating native deps).\n\nThe first time you create a new project, run the Ruby bundler to install CocoaPods itself:\n\n```sh\nbundle install\n```\n\nThen, and every time you update your native dependencies, run:\n\n```sh\nbundle exec pod install\n```\n\nFor more information, please visit [CocoaPods Getting Started guide](https://guides.cocoapods.org/using/getting-started.html).\n\n```sh\n# Using npm\nnpm run ios\n\n# OR using Yarn\nyarn ios\n```\n\nIf everything is set up correctly, you should see your new app running in the Android Emulator, iOS Simulator, or your connected device.\n\nThis is one way to run your app — you can also build it directly from Android Studio or Xcode.\n\n## Step 3: Modify your app\n\nNow that you have successfully run the app, let's make changes!\n\nOpen `App.tsx` in your text editor of choice and make some changes. When you save, your app will automatically update and reflect these changes — this is powered by [Fast Refresh](https://reactnative.dev/docs/fast-refresh).\n\nWhen you want to forcefully reload, for example to reset the state of your app, you can perform a full reload:\n\n- **Android**: Press the <kbd>R</kbd> key twice or select **\"Reload\"** from the **Dev Menu**, accessed via <kbd>Ctrl</kbd> + <kbd>M</kbd> (Windows/Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (macOS).\n- **iOS**: Press <kbd>R</kbd> in iOS Simulator.\n\n## Congratulations! :tada:\n\nYou've successfully run and modified your React Native App. :partying_face:\n\n### Now what?\n\n- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).\n- If you're curious to learn more about React Native, check out the [docs](https://reactnative.dev/docs/getting-started).\n\n# Troubleshooting\n\nIf you're having issues getting the above steps to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.\n\n# Learn More\n\nTo learn more about React Native, take a look at the following resources:\n\n- [React Native Website](https://reactnative.dev) - learn more about React Native.\n- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.\n- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.\n- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.\n- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.\n"
  },
  {
    "path": "packages/video/example/android/app/build.gradle",
    "content": "apply plugin: \"com.android.application\"\napply plugin: \"org.jetbrains.kotlin.android\"\napply plugin: \"com.facebook.react\"\n\n/**\n * This is the configuration block to customize your React Native Android app.\n * By default you don't need to apply any configuration, just uncomment the lines you need.\n */\nreact {\n    /* Folders */\n    //   The root of your project, i.e. where \"package.json\" lives. Default is '../..'\n    // root = file(\"../../\")\n    //   The folder where the react-native NPM package is. Default is ../../node_modules/react-native\n    // reactNativeDir = file(\"../../node_modules/react-native\")\n    //   The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen\n    // codegenDir = file(\"../../node_modules/@react-native/codegen\")\n    //   The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js\n    // cliFile = file(\"../../node_modules/react-native/cli.js\")\n\n    /* Variants */\n    //   The list of variants to that are debuggable. For those we're going to\n    //   skip the bundling of the JS bundle and the assets. By default is just 'debug'.\n    //   If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.\n    // debuggableVariants = [\"liteDebug\", \"prodDebug\"]\n\n    /* Bundling */\n    //   A list containing the node command and its flags. Default is just 'node'.\n    // nodeExecutableAndArgs = [\"node\"]\n    //\n    //   The command to run when bundling. By default is 'bundle'\n    // bundleCommand = \"ram-bundle\"\n    //\n    //   The path to the CLI configuration file. Default is empty.\n    // bundleConfig = file(../rn-cli.config.js)\n    //\n    //   The name of the generated asset file containing your JS bundle\n    // bundleAssetName = \"MyApplication.android.bundle\"\n    //\n    //   The entry file for bundle generation. Default is 'index.android.js' or 'index.js'\n    // entryFile = file(\"../js/MyApplication.android.js\")\n    //\n    //   A list of extra flags to pass to the 'bundle' commands.\n    //   See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle\n    // extraPackagerArgs = []\n\n    /* Hermes Commands */\n    //   The hermes compiler command to run. By default it is 'hermesc'\n    // hermesCommand = \"$rootDir/my-custom-hermesc/bin/hermesc\"\n    //\n    //   The list of flags to pass to the Hermes compiler. By default is \"-O\", \"-output-source-map\"\n    // hermesFlags = [\"-O\", \"-output-source-map\"]\n\n    /* Autolinking */\n    autolinkLibrariesWithApp()\n}\n\n/**\n * Set this to true to Run Proguard on Release builds to minify the Java bytecode.\n */\ndef enableProguardInReleaseBuilds = false\n\n/**\n * The preferred build flavor of JavaScriptCore (JSC)\n *\n * For example, to use the international variant, you can use:\n * `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`\n *\n * The international variant includes ICU i18n library and necessary data\n * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that\n * give correct results when using with locales other than en-US. Note that\n * this variant is about 6MiB larger per architecture than default.\n */\ndef jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'\n\nandroid {\n    ndkVersion rootProject.ext.ndkVersion\n    buildToolsVersion rootProject.ext.buildToolsVersion\n    compileSdk rootProject.ext.compileSdkVersion\n\n    namespace \"run.granite.video.example\"\n    defaultConfig {\n        applicationId \"run.granite.video.example\"\n        minSdkVersion rootProject.ext.minSdkVersion\n        targetSdkVersion rootProject.ext.targetSdkVersion\n        versionCode 1\n        versionName \"1.0\"\n\n        // Detox instrumentation test runner\n        testBuildType System.getProperty('testBuildType', 'debug')\n        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'\n    }\n    signingConfigs {\n        debug {\n            storeFile file('debug.keystore')\n            storePassword 'android'\n            keyAlias 'androiddebugkey'\n            keyPassword 'android'\n        }\n    }\n    buildTypes {\n        debug {\n            signingConfig signingConfigs.debug\n        }\n        release {\n            // Caution! In production, you need to generate your own keystore file.\n            // see https://reactnative.dev/docs/signed-apk-android.\n            signingConfig signingConfigs.debug\n            minifyEnabled enableProguardInReleaseBuilds\n            proguardFiles getDefaultProguardFile(\"proguard-android.txt\"), \"proguard-rules.pro\"\n        }\n    }\n}\n\ndependencies {\n    // The version of react-native is set by the React Native Gradle Plugin\n    implementation(\"com.facebook.react:react-android\")\n\n    if (hermesEnabled.toBoolean()) {\n        implementation(\"com.facebook.react:hermes-android\")\n    } else {\n        implementation jscFlavor\n    }\n\n    // Detox\n    androidTestImplementation('com.wix:detox:+')\n    androidTestImplementation 'junit:junit:4.13.2'\n}\n"
  },
  {
    "path": "packages/video/example/android/app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n"
  },
  {
    "path": "packages/video/example/android/app/src/androidTest/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    <application tools:replace=\"android:usesCleartextTraffic\"\n        android:usesCleartextTraffic=\"true\">\n\n        <activity\n            android:name=\"androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity\"\n            android:exported=\"true\"\n            tools:node=\"merge\" />\n\n        <activity\n            android:name=\"androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity\"\n            android:exported=\"true\"\n            tools:node=\"merge\" />\n\n        <activity\n            android:name=\"androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity\"\n            android:exported=\"true\"\n            tools:node=\"merge\" />\n    </application>\n</manifest>\n"
  },
  {
    "path": "packages/video/example/android/app/src/androidTest/java/run/granite/video/example/DetoxTest.java",
    "content": "package run.granite.video.example;\n\nimport com.wix.detox.Detox;\nimport com.wix.detox.config.DetoxConfig;\n\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport androidx.test.ext.junit.runners.AndroidJUnit4;\nimport androidx.test.filters.LargeTest;\nimport androidx.test.rule.ActivityTestRule;\n\n@RunWith(AndroidJUnit4.class)\n@LargeTest\npublic class DetoxTest {\n    @Rule\n    public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);\n\n    @Test\n    public void runDetoxTests() {\n        DetoxConfig detoxConfig = new DetoxConfig();\n        detoxConfig.idlePolicyConfig.masterTimeoutSec = 90;\n        detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60;\n        detoxConfig.rnContextLoadTimeoutSec = 180;\n\n        Detox.runTests(mActivityRule, detoxConfig);\n    }\n}\n"
  },
  {
    "path": "packages/video/example/android/app/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n\n    <application\n      android:name=\".MainApplication\"\n      android:label=\"@string/app_name\"\n      android:icon=\"@mipmap/ic_launcher\"\n      android:roundIcon=\"@mipmap/ic_launcher_round\"\n      android:allowBackup=\"false\"\n      android:theme=\"@style/AppTheme\"\n      android:usesCleartextTraffic=\"${usesCleartextTraffic}\"\n      android:supportsRtl=\"true\">\n      <activity\n        android:name=\".MainActivity\"\n        android:label=\"@string/app_name\"\n        android:configChanges=\"keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode\"\n        android:launchMode=\"singleTask\"\n        android:windowSoftInputMode=\"adjustResize\"\n        android:exported=\"true\">\n        <intent-filter>\n            <action android:name=\"android.intent.action.MAIN\" />\n            <category android:name=\"android.intent.category.LAUNCHER\" />\n        </intent-filter>\n      </activity>\n    </application>\n</manifest>\n"
  },
  {
    "path": "packages/video/example/android/app/src/main/java/run/granite/video/example/MainActivity.kt",
    "content": "package run.granite.video.example\n\nimport com.facebook.react.ReactActivity\nimport com.facebook.react.ReactActivityDelegate\nimport com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled\nimport com.facebook.react.defaults.DefaultReactActivityDelegate\n\nclass MainActivity : ReactActivity() {\n\n  /**\n   * Returns the name of the main component registered from JavaScript. This is used to schedule\n   * rendering of the component.\n   */\n  override fun getMainComponentName(): String = \"GraniteVideoExample\"\n\n  /**\n   * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]\n   * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]\n   */\n  override fun createReactActivityDelegate(): ReactActivityDelegate =\n      DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)\n}\n"
  },
  {
    "path": "packages/video/example/android/app/src/main/java/run/granite/video/example/MainApplication.kt",
    "content": "package run.granite.video.example\n\nimport android.app.Application\nimport com.facebook.react.PackageList\nimport com.facebook.react.ReactApplication\nimport com.facebook.react.ReactHost\nimport com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative\nimport com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost\n\nclass MainApplication : Application(), ReactApplication {\n\n  override val reactHost: ReactHost by lazy {\n    getDefaultReactHost(\n      context = applicationContext,\n      packageList =\n        PackageList(this).packages.apply {\n          // Packages that cannot be autolinked yet can be added manually here, for example:\n          // add(MyReactNativePackage())\n        },\n    )\n  }\n\n  override fun onCreate() {\n    super.onCreate()\n    loadReactNative(this)\n  }\n}\n"
  },
  {
    "path": "packages/video/example/android/app/src/main/res/drawable/rn_edit_text_material.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2014 The Android Open Source Project\n\n     Licensed under the Apache License, Version 2.0 (the \"License\");\n     you may not use this file except in compliance with the License.\n     You may obtain a copy of the License at\n\n          http://www.apache.org/licenses/LICENSE-2.0\n\n     Unless required by applicable law or agreed to in writing, software\n     distributed under the License is distributed on an \"AS IS\" BASIS,\n     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n     See the License for the specific language governing permissions and\n     limitations under the License.\n-->\n<inset xmlns:android=\"http://schemas.android.com/apk/res/android\"\n       android:insetLeft=\"@dimen/abc_edit_text_inset_horizontal_material\"\n       android:insetRight=\"@dimen/abc_edit_text_inset_horizontal_material\"\n       android:insetTop=\"@dimen/abc_edit_text_inset_top_material\"\n       android:insetBottom=\"@dimen/abc_edit_text_inset_bottom_material\"\n       >\n\n    <selector>\n        <!--\n          This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).\n          The item below with state_pressed=\"false\" and state_focused=\"false\" causes a NullPointerException.\n          NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'\n\n          <item android:state_pressed=\"false\" android:state_focused=\"false\" android:drawable=\"@drawable/abc_textfield_default_mtrl_alpha\"/>\n\n          For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.\n        -->\n        <item android:state_enabled=\"false\" android:drawable=\"@drawable/abc_textfield_default_mtrl_alpha\"/>\n        <item android:drawable=\"@drawable/abc_textfield_activated_mtrl_alpha\"/>\n    </selector>\n\n</inset>\n"
  },
  {
    "path": "packages/video/example/android/app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">GraniteVideoExample</string>\n</resources>\n"
  },
  {
    "path": "packages/video/example/android/app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.DayNight.NoActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"android:editTextBackground\">@drawable/rn_edit_text_material</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "packages/video/example/android/build.gradle",
    "content": "buildscript {\n    ext {\n        buildToolsVersion = \"36.0.0\"\n        minSdkVersion = 24\n        compileSdkVersion = 36\n        targetSdkVersion = 36\n        ndkVersion = \"27.1.12297006\"\n        kotlinVersion = \"2.1.20\"\n    }\n    repositories {\n        google()\n        mavenCentral()\n    }\n    dependencies {\n        classpath(\"com.android.tools.build:gradle\")\n        classpath(\"com.facebook.react:react-native-gradle-plugin\")\n        classpath(\"org.jetbrains.kotlin:kotlin-gradle-plugin\")\n    }\n}\n\napply plugin: \"com.facebook.react.rootproject\"\n"
  },
  {
    "path": "packages/video/example/android/gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-9.0.0-bin.zip\nnetworkTimeout=10000\nvalidateDistributionUrl=true\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "packages/video/example/android/gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\n# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m\norg.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app's APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n\n# Use this property to specify which architecture you want to build.\n# You can also override it from the CLI using\n# ./gradlew <task> -PreactNativeArchitectures=x86_64\nreactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64\n\n# Use this property to enable support to the new architecture.\n# This will allow you to use TurboModules and the Fabric render in\n# your application. You should enable this flag either if you want\n# to write custom TurboModules/Fabric components OR use libraries that\n# are providing them.\nnewArchEnabled=true\n\n# Use this property to enable or disable the Hermes JS engine.\n# If set to false, you will be using JSC instead.\nhermesEnabled=true\n\n# Use this property to enable edge-to-edge display support.\n# This allows your app to draw behind system bars for an immersive UI.\n# Note: Only works with ReactActivity and should not be used with custom Activity.\nedgeToEdgeEnabled=false\n"
  },
  {
    "path": "packages/video/example/android/gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\n# This is normally unused\n# shellcheck disable=SC2034\nAPP_BASE_NAME=${0##*/}\n# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)\nAPP_HOME=$( cd -P \"${APP_HOME:-./}\" > /dev/null && printf '%s\\n' \"$PWD\" ) || exit\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=\"\\\\\\\"\\\\\\\"\"\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    if ! command -v java >/dev/null 2>&1\n    then\n        die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Collect all arguments for the java command:\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,\n#     and any embedded shellness will be escaped.\n#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be\n#     treated as '${Hostname}' itself on the command line.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        -jar \"$APP_HOME/gradle/wrapper/gradle-wrapper.jar\" \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "packages/video/example/android/gradlew.bat",
    "content": "@REM Copyright (c) Meta Platforms, Inc. and affiliates.\n@REM\n@REM This source code is licensed under the MIT license found in the\n@REM LICENSE file in the root directory of this source tree.\n\n@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\n@rem you may not use this file except in compliance with the License.\n@rem You may obtain a copy of the License at\n@rem\n@rem      https://www.apache.org/licenses/LICENSE-2.0\n@rem\n@rem Unless required by applicable law or agreed to in writing, software\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n@rem See the License for the specific language governing permissions and\n@rem limitations under the License.\n@rem\n@rem SPDX-License-Identifier: Apache-2.0\n@rem\n\n@if \"%DEBUG%\"==\"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\n@rem This is normally unused\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif %ERRORLEVEL% equ 0 goto execute\n\necho. 1>&2\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2\necho. 1>&2\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\necho location of your Java installation. 1>&2\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto execute\n\necho. 1>&2\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2\necho. 1>&2\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\necho location of your Java installation. 1>&2\n\ngoto fail\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=\n\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" -jar \"%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\" %*\n\n:end\n@rem End local scope for the variables with windows NT shell\nif %ERRORLEVEL% equ 0 goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nset EXIT_CODE=%ERRORLEVEL%\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\nexit /b %EXIT_CODE%\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "packages/video/example/android/settings.gradle",
    "content": "pluginManagement { includeBuild(\"../node_modules/@react-native/gradle-plugin\") }\nplugins { id(\"com.facebook.react.settings\") }\nextensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }\nrootProject.name = 'run.granite.video.example'\ninclude ':app'\nincludeBuild('../node_modules/@react-native/gradle-plugin')\n\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)\n    repositories {\n        google()\n        mavenCentral()\n        maven {\n            // Detox repository\n            url \"$rootDir/../node_modules/detox/Detox-android\"\n        }\n    }\n}\n"
  },
  {
    "path": "packages/video/example/app.json",
    "content": "{\n  \"name\": \"GraniteVideoExample\",\n  \"displayName\": \"GraniteVideoExample\"\n}\n"
  },
  {
    "path": "packages/video/example/babel.config.js",
    "content": "const path = require('path');\nconst { getConfig } = require('react-native-builder-bob/babel-config');\nconst pkg = require('../package.json');\n\nconst root = path.resolve(__dirname, '..');\n\nmodule.exports = getConfig(\n  {\n    presets: ['module:@react-native/babel-preset'],\n  },\n  { root, pkg }\n);\n"
  },
  {
    "path": "packages/video/example/e2e/GraniteVideo.e2e.ts",
    "content": "import { by, device, element, expect, waitFor } from 'detox';\n\ndescribe('GraniteVideo E2E Tests', () => {\n  beforeAll(async () => {\n    await device.launchApp();\n    // Disable synchronization because the video player's periodic time observer\n    // keeps the main queue busy, preventing Detox from detecting idle state\n    await device.disableSynchronization();\n  });\n\n  afterAll(async () => {\n    // Skip enableSynchronization as it can timeout with video players\n  });\n\n  beforeEach(async () => {\n    // Use launchApp with newInstance instead of reloadReactNative\n    // This avoids KVO observer issues that occur during reload with video players\n    await device.launchApp({ newInstance: true });\n    // Disable synchronization again after launching new instance\n    // The video player's periodic time observer keeps the main queue busy\n    await device.disableSynchronization();\n    // Add a small delay after launch to ensure app is ready\n    await new Promise((resolve) => setTimeout(resolve, 2000));\n    await waitFor(element(by.id('app-title')))\n      .toBeVisible()\n      .withTimeout(15000);\n  });\n\n  // Helper: Scroll to element\n  const scrollToElement = async (testID: string) => {\n    const maxAttempts = 20;\n    for (let i = 0; i < maxAttempts; i++) {\n      try {\n        await expect(element(by.id(testID))).toBeVisible();\n        return;\n      } catch {\n        await element(by.id('main-scroll')).swipe('up', 'slow', 0.3);\n        await new Promise((resolve) => setTimeout(resolve, 300));\n      }\n    }\n    await expect(element(by.id(testID))).toBeVisible();\n  };\n\n  // Helper: Scroll to top\n  const scrollToTop = async () => {\n    try {\n      for (let i = 0; i < 5; i++) {\n        await element(by.id('main-scroll')).swipe('down', 'fast', 0.8);\n      }\n      await new Promise((resolve) => setTimeout(resolve, 500));\n    } catch {\n      // If swipe fails, just wait and try to verify the element we need\n      await new Promise((resolve) => setTimeout(resolve, 500));\n    }\n  };\n\n  // ============================================================\n  // Basic Rendering Tests\n  // ============================================================\n\n  describe('Basic Rendering', () => {\n    it('should display app title', async () => {\n      await expect(element(by.id('app-title'))).toBeVisible();\n      await expect(element(by.id('app-title'))).toHaveText('GraniteVideo Example');\n    });\n\n    it('should display main video component', async () => {\n      await expect(element(by.id('main-video'))).toBeVisible();\n    });\n\n    it('should display progress bar', async () => {\n      await expect(element(by.id('progress-time'))).toBeVisible();\n    });\n  });\n\n  // ============================================================\n  // Playback Control Tests\n  // ============================================================\n\n  describe('Playback Controls', () => {\n    it('should toggle play/pause', async () => {\n      await expect(element(by.id('play-pause-button'))).toBeVisible();\n\n      // Click play - button text should change\n      await element(by.id('play-pause-button')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 500));\n\n      // Click pause\n      await element(by.id('play-pause-button')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 500));\n    });\n\n    it('should toggle mute', async () => {\n      await expect(element(by.id('mute-button'))).toBeVisible();\n      await element(by.id('mute-button')).tap();\n    });\n\n    it('should seek forward', async () => {\n      // First, start playback\n      await element(by.id('play-pause-button')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 2000));\n\n      await element(by.id('seek-forward-button')).tap();\n    });\n\n    it('should seek backward', async () => {\n      await element(by.id('play-pause-button')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 2000));\n\n      await element(by.id('seek-back-button')).tap();\n    });\n  });\n\n  // ============================================================\n  // Playback Rate Tests\n  // ============================================================\n\n  describe('Playback Rate', () => {\n    it('should display rate buttons', async () => {\n      await scrollToElement('rate-0.5');\n      await expect(element(by.id('rate-0.5'))).toBeVisible();\n      await expect(element(by.id('rate-1'))).toBeVisible();\n      await expect(element(by.id('rate-1.5'))).toBeVisible();\n      await expect(element(by.id('rate-2'))).toBeVisible();\n    });\n\n    it('should change playback rate to 0.5x', async () => {\n      await scrollToElement('rate-0.5');\n      await element(by.id('rate-0.5')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 300));\n      await scrollToElement('rate-label');\n      await expect(element(by.id('rate-label'))).toHaveText('Current: 0.5x');\n    });\n\n    it('should change playback rate to 2x', async () => {\n      await scrollToElement('rate-2');\n      await element(by.id('rate-2')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 300));\n      await scrollToElement('rate-label');\n      await expect(element(by.id('rate-label'))).toHaveText('Current: 2x');\n    });\n  });\n\n  // ============================================================\n  // Volume Tests\n  // ============================================================\n\n  describe('Volume Controls', () => {\n    it('should display volume buttons', async () => {\n      await scrollToElement('volume-0');\n      await expect(element(by.id('volume-0'))).toBeVisible();\n      await expect(element(by.id('volume-50'))).toBeVisible();\n      await expect(element(by.id('volume-100'))).toBeVisible();\n    });\n\n    it('should change volume to 50%', async () => {\n      await scrollToElement('volume-50');\n      await element(by.id('volume-50')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 300));\n      // Check that label contains \"50\" (percentage sign may have encoding issues)\n      await scrollToElement('volume-label');\n      await expect(element(by.id('volume-label'))).toBeVisible();\n    });\n\n    it('should mute volume (0%)', async () => {\n      await scrollToElement('volume-0');\n      await element(by.id('volume-0')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 300));\n      await scrollToElement('volume-label');\n      await expect(element(by.id('volume-label'))).toBeVisible();\n    });\n  });\n\n  // ============================================================\n  // Resize Mode Tests\n  // ============================================================\n\n  describe('Resize Mode', () => {\n    it('should display resize mode buttons', async () => {\n      await scrollToElement('resize-contain');\n      await expect(element(by.id('resize-contain'))).toBeVisible();\n      await expect(element(by.id('resize-cover'))).toBeVisible();\n      await expect(element(by.id('resize-stretch'))).toBeVisible();\n    });\n\n    it('should change resize mode to cover', async () => {\n      await scrollToElement('resize-cover');\n      await element(by.id('resize-cover')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 300));\n      await scrollToElement('resize-mode-label');\n      await expect(element(by.id('resize-mode-label'))).toBeVisible();\n    });\n\n    it('should change resize mode to stretch', async () => {\n      await scrollToElement('resize-stretch');\n      await element(by.id('resize-stretch')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 300));\n      await scrollToElement('resize-mode-label');\n      await expect(element(by.id('resize-mode-label'))).toBeVisible();\n    });\n\n    it('should change resize mode back to contain', async () => {\n      await scrollToElement('resize-contain');\n      await element(by.id('resize-contain')).tap();\n      await expect(element(by.id('resize-mode-label'))).toHaveText('Current: contain');\n    });\n  });\n\n  // ============================================================\n  // Repeat Tests\n  // ============================================================\n\n  describe('Repeat', () => {\n    it('should toggle repeat mode', async () => {\n      await scrollToElement('repeat-button');\n      await expect(element(by.id('repeat-button'))).toBeVisible();\n\n      // Toggle on\n      await element(by.id('repeat-button')).tap();\n\n      // Toggle off\n      await element(by.id('repeat-button')).tap();\n    });\n  });\n\n  // ============================================================\n  // Source Selection Tests\n  // ============================================================\n\n  describe('Source Selection', () => {\n    it('should display source selection buttons', async () => {\n      await scrollToElement('source-mp4');\n      await expect(element(by.id('source-mp4'))).toBeVisible();\n      await expect(element(by.id('source-hls'))).toBeVisible();\n    });\n\n    it('should change source to HLS', async () => {\n      await scrollToElement('source-hls');\n      await element(by.id('source-hls')).tap();\n      // Wait for source to load\n      await new Promise((resolve) => setTimeout(resolve, 2000));\n      // Verify video is still visible after source change\n      await scrollToTop();\n      await expect(element(by.id('main-video'))).toBeVisible();\n    });\n\n    it('should change source back to MP4', async () => {\n      await scrollToElement('source-mp4');\n      await element(by.id('source-mp4')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 2000));\n      await scrollToTop();\n      await expect(element(by.id('main-video'))).toBeVisible();\n    });\n  });\n\n  // ============================================================\n  // Error Handling Tests\n  // ============================================================\n\n  describe('Error Handling', () => {\n    it('should display error test section', async () => {\n      await scrollToElement('trigger-error');\n      await expect(element(by.id('trigger-error'))).toBeVisible();\n    });\n\n    it('should trigger error with invalid URL', async () => {\n      await scrollToElement('trigger-error');\n      await element(by.id('trigger-error')).tap();\n      // Wait for error to be processed\n      await new Promise((resolve) => setTimeout(resolve, 3000));\n      // App should not crash and remain responsive\n      await scrollToTop();\n      await expect(element(by.id('app-title'))).toBeVisible();\n    });\n  });\n\n  // ============================================================\n  // Event Logging Tests\n  // ============================================================\n\n  describe('Event Logging', () => {\n    it('should display log container', async () => {\n      await scrollToElement('log-container');\n      await expect(element(by.id('log-container'))).toBeVisible();\n    });\n\n    it('should clear logs', async () => {\n      // First create some logs\n      await element(by.id('play-pause-button')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      await scrollToElement('clear-logs');\n      await element(by.id('clear-logs')).tap();\n    });\n\n    it('should log onLoadStart event', async () => {\n      await scrollToElement('source-mp4');\n      await element(by.id('source-mp4')).tap();\n\n      await scrollToElement('log-container');\n      // Event should be logged\n      await waitFor(element(by.id('log-container')))\n        .toBeVisible()\n        .withTimeout(5000);\n    });\n  });\n\n  // ============================================================\n  // Stability Tests\n  // ============================================================\n\n  describe('App Stability', () => {\n    it('should remain stable after multiple state changes', async () => {\n      // Toggle play/pause multiple times\n      for (let i = 0; i < 3; i++) {\n        await element(by.id('play-pause-button')).tap();\n        await new Promise((resolve) => setTimeout(resolve, 500));\n      }\n\n      // Change resize modes\n      await scrollToElement('resize-cover');\n      await element(by.id('resize-cover')).tap();\n      await element(by.id('resize-contain')).tap();\n\n      // Change rates\n      await scrollToElement('rate-2');\n      await element(by.id('rate-2')).tap();\n      await element(by.id('rate-1')).tap();\n\n      // Scroll back to top and check app is responsive\n      await scrollToTop();\n      await expect(element(by.id('app-title'))).toBeVisible();\n    });\n\n    it('should handle rapid seek operations', async () => {\n      await element(by.id('play-pause-button')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 2000));\n\n      // Rapid seeking\n      for (let i = 0; i < 5; i++) {\n        await element(by.id('seek-forward-button')).tap();\n        await new Promise((resolve) => setTimeout(resolve, 200));\n      }\n\n      await expect(element(by.id('main-video'))).toBeVisible();\n    });\n\n    it('should handle source switching', async () => {\n      await scrollToElement('source-hls');\n\n      // Switch sources multiple times\n      await element(by.id('source-hls')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      await element(by.id('source-mp4')).tap();\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      // Scroll back to verify video\n      await scrollToTop();\n      await expect(element(by.id('main-video'))).toBeVisible();\n    });\n  });\n\n  // ============================================================\n  // Comprehensive Props Test\n  // ============================================================\n\n  describe('Comprehensive Props Test', () => {\n    it('should apply all props correctly', async () => {\n      // Start playback\n      await element(by.id('play-pause-button')).tap();\n\n      // Set rate to 1.5x\n      await scrollToElement('rate-1.5');\n      await element(by.id('rate-1.5')).tap();\n\n      // Set volume to 75%\n      await scrollToElement('volume-75');\n      await element(by.id('volume-75')).tap();\n\n      // Set resize mode to cover\n      await scrollToElement('resize-cover');\n      await element(by.id('resize-cover')).tap();\n\n      // Enable repeat\n      await scrollToElement('repeat-button');\n      await element(by.id('repeat-button')).tap();\n\n      // Verify states - scroll to each label to ensure visibility\n      await scrollToElement('rate-label');\n      await expect(element(by.id('rate-label'))).toBeVisible();\n\n      await scrollToElement('volume-label');\n      await expect(element(by.id('volume-label'))).toBeVisible();\n\n      await scrollToElement('resize-mode-label');\n      await expect(element(by.id('resize-mode-label'))).toBeVisible();\n    });\n  });\n});\n"
  },
  {
    "path": "packages/video/example/e2e/jest.config.js",
    "content": "/** @type {import('@jest/types').Config.InitialOptions} */\nmodule.exports = {\n  rootDir: '..',\n  testMatch: ['<rootDir>/e2e/**/*.e2e.ts'],\n  testTimeout: 120000,\n  maxWorkers: 1,\n  globalSetup: 'detox/runners/jest/globalSetup',\n  globalTeardown: 'detox/runners/jest/globalTeardown',\n  reporters: ['detox/runners/jest/reporter'],\n  testEnvironment: 'detox/runners/jest/testEnvironment',\n  verbose: true,\n  transform: {\n    '^.+\\\\.(ts|tsx)$': [\n      'ts-jest',\n      {\n        tsconfig: '<rootDir>/e2e/tsconfig.json',\n      },\n    ],\n  },\n};\n"
  },
  {
    "path": "packages/video/example/e2e/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"commonjs\",\n    \"lib\": [\"ES2020\"],\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"resolveJsonModule\": true,\n    \"declaration\": false,\n    \"noEmit\": true,\n    \"types\": [\"detox\", \"jest\", \"node\"]\n  },\n  \"include\": [\"./**/*.ts\"]\n}\n"
  },
  {
    "path": "packages/video/example/index.js",
    "content": "import { AppRegistry } from 'react-native';\nimport { name as appName } from './app.json';\nimport App from './src/App';\n\nAppRegistry.registerComponent(appName, () => App);\n"
  },
  {
    "path": "packages/video/example/ios/.xcode.env",
    "content": "# This `.xcode.env` file is versioned and is used to source the environment\n# used when running script phases inside Xcode.\n# To customize your local environment, you can create an `.xcode.env.local`\n# file that is not versioned.\n\n# NODE_BINARY variable contains the PATH to the node executable.\n#\n# Customize the NODE_BINARY variable here.\n# For example, to use nvm with brew, add the following line\n# . \"$(brew --prefix nvm)/nvm.sh\" --no-use\nexport NODE_BINARY=$(command -v node)\n"
  },
  {
    "path": "packages/video/example/ios/GraniteVideoExample/AppDelegate.swift",
    "content": "import UIKit\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\n\n@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n  var window: UIWindow?\n\n  var reactNativeDelegate: ReactNativeDelegate?\n  var reactNativeFactory: RCTReactNativeFactory?\n\n  func application(\n    _ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n  ) -> Bool {\n    let delegate = ReactNativeDelegate()\n    let factory = RCTReactNativeFactory(delegate: delegate)\n    delegate.dependencyProvider = RCTAppDependencyProvider()\n\n    reactNativeDelegate = delegate\n    reactNativeFactory = factory\n\n    window = UIWindow(frame: UIScreen.main.bounds)\n\n    factory.startReactNative(\n      withModuleName: \"GraniteVideoExample\",\n      in: window,\n      launchOptions: launchOptions\n    )\n\n    return true\n  }\n}\n\nclass ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {\n  override func sourceURL(for bridge: RCTBridge) -> URL? {\n    self.bundleURL()\n  }\n\n  override func bundleURL() -> URL? {\n#if DEBUG\n    RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: \"index\")\n#else\n    Bundle.main.url(forResource: \"main\", withExtension: \"jsbundle\")\n#endif\n  }\n}\n"
  },
  {
    "path": "packages/video/example/ios/GraniteVideoExample/Images.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\": [\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"2x\",\n      \"size\": \"20x20\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"3x\",\n      \"size\": \"20x20\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"2x\",\n      \"size\": \"29x29\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"3x\",\n      \"size\": \"29x29\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"2x\",\n      \"size\": \"40x40\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"3x\",\n      \"size\": \"40x40\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"2x\",\n      \"size\": \"60x60\"\n    },\n    {\n      \"idiom\": \"iphone\",\n      \"scale\": \"3x\",\n      \"size\": \"60x60\"\n    },\n    {\n      \"idiom\": \"ios-marketing\",\n      \"scale\": \"1x\",\n      \"size\": \"1024x1024\"\n    }\n  ],\n  \"info\": {\n    \"author\": \"xcode\",\n    \"version\": 1\n  }\n}\n"
  },
  {
    "path": "packages/video/example/ios/GraniteVideoExample/Images.xcassets/Contents.json",
    "content": "{\n  \"info\": {\n    \"version\": 1,\n    \"author\": \"xcode\"\n  }\n}\n"
  },
  {
    "path": "packages/video/example/ios/GraniteVideoExample/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>CADisableMinimumFrameDurationOnPhone</key>\n\t<true/>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>GraniteVideoExample</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</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>$(MARKETING_VERSION)</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>NSAppTransportSecurity</key>\n\t<dict>\n\t\t<key>NSAllowsArbitraryLoads</key>\n\t\t<false/>\n\t\t<key>NSAllowsLocalNetworking</key>\n\t\t<true/>\n\t</dict>\n\t<key>NSLocationWhenInUseUsageDescription</key>\n\t<string></string>\n\t<key>RCTNewArchEnabled</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>arm64</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UIViewControllerBasedStatusBarAppearance</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "packages/video/example/ios/GraniteVideoExample/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"15702\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <device id=\"retina4_7\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"15704\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"ReactNativeGraniteVideoExample\" textAlignment=\"center\" lineBreakMode=\"middleTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"18\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GJd-Yh-RWb\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"202\" width=\"375\" height=\"43\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"36\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Powered by React Native\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"MN2-I3-ftu\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"626\" width=\"375\" height=\"21\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                        </subviews>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\" cocoaTouchSystemColor=\"whiteColor\"/>\n                        <constraints>\n                            <constraint firstItem=\"Bcu-3y-fUS\" firstAttribute=\"bottom\" secondItem=\"MN2-I3-ftu\" secondAttribute=\"bottom\" constant=\"20\" id=\"OZV-Vh-mqD\"/>\n                            <constraint firstItem=\"Bcu-3y-fUS\" firstAttribute=\"centerX\" secondItem=\"GJd-Yh-RWb\" secondAttribute=\"centerX\" id=\"Q3B-4B-g5h\"/>\n                            <constraint firstItem=\"MN2-I3-ftu\" firstAttribute=\"centerX\" secondItem=\"Bcu-3y-fUS\" secondAttribute=\"centerX\" id=\"akx-eg-2ui\"/>\n                            <constraint firstItem=\"MN2-I3-ftu\" firstAttribute=\"leading\" secondItem=\"Bcu-3y-fUS\" secondAttribute=\"leading\" id=\"i1E-0Y-4RG\"/>\n                            <constraint firstItem=\"GJd-Yh-RWb\" firstAttribute=\"centerY\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"bottom\" multiplier=\"1/3\" constant=\"1\" id=\"moa-c2-u7t\"/>\n                            <constraint firstItem=\"GJd-Yh-RWb\" firstAttribute=\"leading\" secondItem=\"Bcu-3y-fUS\" secondAttribute=\"leading\" symbolic=\"YES\" id=\"x7j-FC-K8j\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"Bcu-3y-fUS\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"52.173913043478265\" y=\"375\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "packages/video/example/ios/GraniteVideoExample/PrivacyInfo.xcprivacy",
    "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>NSPrivacyAccessedAPITypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>NSPrivacyAccessedAPIType</key>\n\t\t\t<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>\n\t\t\t<key>NSPrivacyAccessedAPITypeReasons</key>\n\t\t\t<array>\n\t\t\t\t<string>C617.1</string>\n\t\t\t</array>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>NSPrivacyAccessedAPIType</key>\n\t\t\t<string>NSPrivacyAccessedAPICategoryUserDefaults</string>\n\t\t\t<key>NSPrivacyAccessedAPITypeReasons</key>\n\t\t\t<array>\n\t\t\t\t<string>CA92.1</string>\n\t\t\t</array>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>NSPrivacyAccessedAPIType</key>\n\t\t\t<string>NSPrivacyAccessedAPICategorySystemBootTime</string>\n\t\t\t<key>NSPrivacyAccessedAPITypeReasons</key>\n\t\t\t<array>\n\t\t\t\t<string>35F9.1</string>\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>NSPrivacyCollectedDataTypes</key>\n\t<array/>\n\t<key>NSPrivacyTracking</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "packages/video/example/ios/GraniteVideoExample.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 54;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t0C80B921A6F3F58F76C31292 /* libPods-GraniteVideoExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-GraniteVideoExample.a */; };\n\t\t13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };\n\t\t761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };\n\t\t81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };\n\t\tBBDDA150B27522F5C980C682 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t13B07F961A680F5B00A75B9A /* GraniteVideoExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GraniteVideoExample.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = GraniteVideoExample/Images.xcassets; sourceTree = \"<group>\"; };\n\t\t13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = GraniteVideoExample/Info.plist; sourceTree = \"<group>\"; };\n\t\t13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = GraniteVideoExample/PrivacyInfo.xcprivacy; sourceTree = \"<group>\"; };\n\t\t3B4392A12AC88292D35C810B /* Pods-GraniteVideoExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-GraniteVideoExample.debug.xcconfig\"; path = \"Target Support Files/Pods-GraniteVideoExample/Pods-GraniteVideoExample.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t5709B34CF0A7D63546082F79 /* Pods-GraniteVideoExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-GraniteVideoExample.release.xcconfig\"; path = \"Target Support Files/Pods-GraniteVideoExample/Pods-GraniteVideoExample.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t5DCACB8F33CDC322A6C60F78 /* libPods-GraniteVideoExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"libPods-GraniteVideoExample.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = GraniteVideoExample/AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = GraniteVideoExample/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\tED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t13B07F8C1A680F5B00A75B9A /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0C80B921A6F3F58F76C31292 /* libPods-GraniteVideoExample.a 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\t13B07FAE1A68108700A75B9A /* GraniteVideoExample */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07FB51A68108700A75B9A /* Images.xcassets */,\n\t\t\t\t761780EC2CA45674006654EE /* AppDelegate.swift */,\n\t\t\t\t13B07FB61A68108700A75B9A /* Info.plist */,\n\t\t\t\t81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,\n\t\t\t\t13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,\n\t\t\t);\n\t\t\tname = GraniteVideoExample;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t2D16E6871FA4F8E400B85C8A /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tED297162215061F000B7C4FE /* JavaScriptCore.framework */,\n\t\t\t\t5DCACB8F33CDC322A6C60F78 /* libPods-GraniteVideoExample.a */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t832341AE1AAA6A7D00B99B32 /* Libraries */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tname = Libraries;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t83CBB9F61A601CBA00E9B192 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07FAE1A68108700A75B9A /* GraniteVideoExample */,\n\t\t\t\t832341AE1AAA6A7D00B99B32 /* Libraries */,\n\t\t\t\t83CBBA001A601CBA00E9B192 /* Products */,\n\t\t\t\t2D16E6871FA4F8E400B85C8A /* Frameworks */,\n\t\t\t\tBBD78D7AC51CEA395F1C20DB /* Pods */,\n\t\t\t);\n\t\t\tindentWidth = 2;\n\t\t\tsourceTree = \"<group>\";\n\t\t\ttabWidth = 2;\n\t\t\tusesTabs = 0;\n\t\t};\n\t\t83CBBA001A601CBA00E9B192 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t13B07F961A680F5B00A75B9A /* GraniteVideoExample.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tBBD78D7AC51CEA395F1C20DB /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3B4392A12AC88292D35C810B /* Pods-GraniteVideoExample.debug.xcconfig */,\n\t\t\t\t5709B34CF0A7D63546082F79 /* Pods-GraniteVideoExample.release.xcconfig */,\n\t\t\t);\n\t\t\tpath = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t13B07F861A680F5B00A75B9A /* GraniteVideoExample */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget \"GraniteVideoExample\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tC38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t13B07F871A680F5B00A75B9A /* Sources */,\n\t\t\t\t13B07F8C1A680F5B00A75B9A /* Frameworks */,\n\t\t\t\t13B07F8E1A680F5B00A75B9A /* Resources */,\n\t\t\t\t00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,\n\t\t\t\t00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,\n\t\t\t\tE235C05ADACE081382539298 /* [CP] Copy Pods Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = GraniteVideoExample;\n\t\t\tproductName = GraniteVideoExample;\n\t\t\tproductReference = 13B07F961A680F5B00A75B9A /* GraniteVideoExample.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t83CBB9F71A601CBA00E9B192 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 1210;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t13B07F861A680F5B00A75B9A = {\n\t\t\t\t\t\tLastSwiftMigration = 1120;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject \"GraniteVideoExample\" */;\n\t\t\tcompatibilityVersion = \"Xcode 12.0\";\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 = 83CBB9F61A601CBA00E9B192;\n\t\t\tproductRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t13B07F861A680F5B00A75B9A /* GraniteVideoExample */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t13B07F8E1A680F5B00A75B9A /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,\n\t\t\t\tBBDDA150B27522F5C980C682 /* PrivacyInfo.xcprivacy 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\t00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"$(SRCROOT)/.xcode.env.local\",\n\t\t\t\t\"$(SRCROOT)/.xcode.env\",\n\t\t\t);\n\t\t\tname = \"Bundle React Native code and images\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"set -e\\n\\nWITH_ENVIRONMENT=\\\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\\\"\\nREACT_NATIVE_XCODE=\\\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\\\"\\n\\n/bin/sh -c \\\"\\\\\\\"$WITH_ENVIRONMENT\\\\\\\" \\\\\\\"$REACT_NATIVE_XCODE\\\\\\\"\\\"\\n\";\n\t\t};\n\t\t00EEFC60759A1932668264C0 /* [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-GraniteVideoExample/Pods-GraniteVideoExample-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-GraniteVideoExample/Pods-GraniteVideoExample-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-GraniteVideoExample/Pods-GraniteVideoExample-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tC38B50BA6285516D6DCD4F65 /* [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-GraniteVideoExample-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\tE235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {\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-GraniteVideoExample/Pods-GraniteVideoExample-resources-${CONFIGURATION}-input-files.xcfilelist\",\n\t\t\t);\n\t\t\tname = \"[CP] Copy Pods Resources\";\n\t\t\toutputFileListPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-GraniteVideoExample/Pods-GraniteVideoExample-resources-${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-GraniteVideoExample/Pods-GraniteVideoExample-resources.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t13B07F871A680F5B00A75B9A /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t761780ED2CA45674006654EE /* AppDelegate.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t13B07F941A680F5B00A75B9A /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-GraniteVideoExample.debug.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\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tINFOPLIST_FILE = GraniteVideoExample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\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\tMARKETING_VERSION = 1.0;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"-ObjC\",\n\t\t\t\t\t\"-lc++\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = anthropic.reactnativegranitevideo.example;\n\t\t\t\tPRODUCT_NAME = GraniteVideoExample;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t13B07F951A680F5B00A75B9A /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-GraniteVideoExample.release.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\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tINFOPLIST_FILE = GraniteVideoExample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\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\tMARKETING_VERSION = 1.0;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"-ObjC\",\n\t\t\t\t\t\"-lc++\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = anthropic.reactnativegranitevideo.example;\n\t\t\t\tPRODUCT_NAME = GraniteVideoExample;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t83CBBA201A601CBA00E9B192 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++20\";\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_COMMA = 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_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_IMPLICIT_RETAIN_SELF = 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\t\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = \"\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\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_SYMBOLS_PRIVATE_EXTERN = NO;\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_UNDECLARED_SELECTOR = YES;\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\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t/usr/lib/swift,\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tLIBRARY_SEARCH_PATHS = (\n\t\t\t\t\t\"\\\"$(SDKROOT)/usr/lib/swift\\\"\",\n\t\t\t\t\t\"\\\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\\\"\",\n\t\t\t\t\t\"\\\"$(inherited)\\\"\",\n\t\t\t\t);\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_CFLAGS = \"$(inherited)\";\n\t\t\t\tOTHER_CPLUSPLUSFLAGS = (\n\t\t\t\t\t\"$(OTHER_CFLAGS)\",\n\t\t\t\t\t\"-DFOLLY_NO_CONFIG\",\n\t\t\t\t\t\"-DFOLLY_MOBILE=1\",\n\t\t\t\t\t\"-DFOLLY_USE_LIBCPP=1\",\n\t\t\t\t\t\"-DFOLLY_CFG_NO_COROUTINES=1\",\n\t\t\t\t\t\"-DFOLLY_HAVE_CLOCK_GETTIME=1\",\n\t\t\t\t);\n\t\t\t\tREACT_NATIVE_PATH = \"${PODS_ROOT}/../../node_modules/react-native\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) DEBUG\";\n\t\t\t\tUSE_HERMES = true;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t83CBBA211A601CBA00E9B192 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++20\";\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_COMMA = 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_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_IMPLICIT_RETAIN_SELF = 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\t\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = \"\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\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_UNDECLARED_SELECTOR = YES;\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\tIPHONEOS_DEPLOYMENT_TARGET = 15.1;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t/usr/lib/swift,\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tLIBRARY_SEARCH_PATHS = (\n\t\t\t\t\t\"\\\"$(SDKROOT)/usr/lib/swift\\\"\",\n\t\t\t\t\t\"\\\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\\\"\",\n\t\t\t\t\t\"\\\"$(inherited)\\\"\",\n\t\t\t\t);\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tOTHER_CFLAGS = \"$(inherited)\";\n\t\t\t\tOTHER_CPLUSPLUSFLAGS = (\n\t\t\t\t\t\"$(OTHER_CFLAGS)\",\n\t\t\t\t\t\"-DFOLLY_NO_CONFIG\",\n\t\t\t\t\t\"-DFOLLY_MOBILE=1\",\n\t\t\t\t\t\"-DFOLLY_USE_LIBCPP=1\",\n\t\t\t\t\t\"-DFOLLY_CFG_NO_COROUTINES=1\",\n\t\t\t\t\t\"-DFOLLY_HAVE_CLOCK_GETTIME=1\",\n\t\t\t\t);\n\t\t\t\tREACT_NATIVE_PATH = \"${PODS_ROOT}/../../node_modules/react-native\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tUSE_HERMES = true;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget \"GraniteVideoExample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t13B07F941A680F5B00A75B9A /* Debug */,\n\t\t\t\t13B07F951A680F5B00A75B9A /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject \"GraniteVideoExample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t83CBBA201A601CBA00E9B192 /* Debug */,\n\t\t\t\t83CBBA211A601CBA00E9B192 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;\n}\n"
  },
  {
    "path": "packages/video/example/ios/GraniteVideoExample.xcodeproj/xcshareddata/xcschemes/GraniteVideoExample.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1210\"\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 = \"13B07F861A680F5B00A75B9A\"\n               BuildableName = \"GraniteVideoExample.app\"\n               BlueprintName = \"GraniteVideoExample\"\n               ReferencedContainer = \"container:GraniteVideoExample.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      <Testables>\n         <TestableReference\n            skipped = \"NO\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"00E356ED1AD99517003FC87E\"\n               BuildableName = \"GraniteVideoExampleTests.xctest\"\n               BlueprintName = \"GraniteVideoExampleTests\"\n               ReferencedContainer = \"container:GraniteVideoExample.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      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"13B07F861A680F5B00A75B9A\"\n            BuildableName = \"GraniteVideoExample.app\"\n            BlueprintName = \"GraniteVideoExample\"\n            ReferencedContainer = \"container:GraniteVideoExample.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"13B07F861A680F5B00A75B9A\"\n            BuildableName = \"GraniteVideoExample.app\"\n            BlueprintName = \"GraniteVideoExample\"\n            ReferencedContainer = \"container:GraniteVideoExample.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": "packages/video/example/ios/GraniteVideoExample.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:GraniteVideoExample.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "packages/video/example/ios/Podfile",
    "content": "ENV['RCT_NEW_ARCH_ENABLED'] = '1'\n\n# Resolve react_native_pods.rb with node to allow for hoisting\nrequire Pod::Executable.execute_command('node', ['-p',\n  'require.resolve(\n    \"react-native/scripts/react_native_pods.rb\",\n    {paths: [process.argv[1]]},\n  )', __dir__]).strip\n\nplatform :ios, min_ios_version_supported\nprepare_react_native_project!\n\nlinkage = ENV['USE_FRAMEWORKS']\nif linkage != nil\n  Pod::UI.puts \"Configuring Pod with #{linkage}ally linked Frameworks\".green\n  use_frameworks! :linkage => linkage.to_sym\nend\n\ntarget 'GraniteVideoExample' do\n  config = use_native_modules!\n\n  use_react_native!(\n    :path => config[:reactNativePath],\n    # An absolute path to your application root.\n    :app_path => \"#{Pod::Config.instance.installation_root}/..\"\n  )\n\n  post_install do |installer|\n    react_native_post_install(\n      installer,\n      config[:reactNativePath],\n      :mac_catalyst_enabled => false,\n      # :ccache_enabled => true\n    )\n  end\nend\n"
  },
  {
    "path": "packages/video/example/jest.config.js",
    "content": "module.exports = {\n  preset: 'react-native',\n};\n"
  },
  {
    "path": "packages/video/example/metro.config.js",
    "content": "const path = require('path');\nconst { getDefaultConfig } = require('@react-native/metro-config');\nconst { withMetroConfig } = require('react-native-monorepo-config');\n\nconst root = path.resolve(__dirname, '..');\n\n/**\n * Metro configuration\n * https://facebook.github.io/metro/docs/configuration\n *\n * @type {import('metro-config').MetroConfig}\n */\nmodule.exports = withMetroConfig(getDefaultConfig(__dirname), {\n  root,\n  dirname: __dirname,\n});\n"
  },
  {
    "path": "packages/video/example/package.json",
    "content": "{\n  \"name\": \"@granite-js/video-example\",\n  \"version\": \"0.0.1\",\n  \"private\": true,\n  \"scripts\": {\n    \"android\": \"react-native run-android\",\n    \"ios\": \"react-native run-ios\",\n    \"start\": \"react-native start\",\n    \"build:android\": \"react-native build-android --extra-params \\\"--no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a\\\"\",\n    \"build:ios\": \"react-native build-ios --mode Debug\"\n  },\n  \"dependencies\": {\n    \"@granite-js/video\": \"workspace:*\",\n    \"react\": \"19.2.0\",\n    \"react-native\": \"0.83.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.25.2\",\n    \"@babel/preset-env\": \"^7.25.3\",\n    \"@babel/runtime\": \"^7.25.0\",\n    \"@react-native-community/cli\": \"20.0.0\",\n    \"@react-native-community/cli-platform-android\": \"20.0.0\",\n    \"@react-native-community/cli-platform-ios\": \"20.0.0\",\n    \"@react-native/babel-preset\": \"0.83.0\",\n    \"@react-native/metro-config\": \"0.83.0\",\n    \"@react-native/typescript-config\": \"0.83.0\",\n    \"@types/jest\": \"^29.5.14\",\n    \"@types/react\": \"^19.2.0\",\n    \"detox\": \"^20.33.0\",\n    \"jest\": \"^29.7.0\",\n    \"react-native-builder-bob\": \"^0.40.17\",\n    \"react-native-monorepo-config\": \"^0.3.1\",\n    \"ts-jest\": \"^29.2.5\"\n  },\n  \"engines\": {\n    \"node\": \">=20\"\n  }\n}\n"
  },
  {
    "path": "packages/video/example/react-native.config.js",
    "content": "const path = require('path');\nconst pkg = require('../package.json');\n\nmodule.exports = {\n  project: {\n    ios: {\n      automaticPodsInstallation: true,\n    },\n  },\n  dependencies: {\n    [pkg.name]: {\n      root: path.join(__dirname, '..'),\n      platforms: {\n        // Codegen script incorrectly fails without this\n        // So we explicitly specify the platforms with empty object\n        ios: {},\n        android: {},\n      },\n    },\n  },\n};\n"
  },
  {
    "path": "packages/video/example/src/App.tsx",
    "content": "import { useState, useCallback, useRef } from 'react';\nimport { View, ScrollView, Text, TouchableOpacity, StyleSheet, SafeAreaView, Platform } from 'react-native';\nimport GraniteVideo, {\n  type VideoRef,\n  type OnLoadStartData,\n  type OnLoadData,\n  type OnProgressData,\n  type OnSeekData,\n  type OnBufferData,\n  type OnVideoErrorData,\n  type OnPlaybackStateChangedData,\n  type ResizeMode,\n} from '../../src';\n\n// Test video sources\nconst TEST_VIDEOS = {\n  mp4: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',\n  hls: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',\n  short: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4',\n};\n\nconst INVALID_URL = 'https://invalid-video-url.test/video.mp4';\n\nexport default function App() {\n  const videoRef = useRef<VideoRef>(null);\n\n  // State\n  const [logs, setLogs] = useState<string[]>([]);\n  const [paused, setPaused] = useState(true);\n  const [muted, setMuted] = useState(false);\n  const [volume, setVolume] = useState(1.0);\n  const [rate, setRate] = useState(1.0);\n  const [repeat, setRepeat] = useState(false);\n  const [resizeMode, setResizeMode] = useState<ResizeMode>('contain');\n  const [currentSource, setCurrentSource] = useState(TEST_VIDEOS.mp4);\n  const [, setShowError] = useState(false);\n  const [progress, setProgress] = useState({ currentTime: 0, duration: 0 });\n\n  // Logger\n  const addLog = useCallback((msg: string) => {\n    const timestamp = new Date().toLocaleTimeString();\n    setLogs((prev) => [`[${timestamp}] ${msg}`, ...prev.slice(0, 29)]);\n  }, []);\n\n  // Event Handlers\n  const handleLoadStart = useCallback(\n    (data: OnLoadStartData) => {\n      addLog(`onLoadStart: ${data.type} - ${data.uri.substring(0, 30)}...`);\n    },\n    [addLog]\n  );\n\n  const handleLoad = useCallback(\n    (data: OnLoadData) => {\n      addLog(`onLoad: ${data.naturalSize.width}x${data.naturalSize.height}, duration: ${data.duration.toFixed(1)}s`);\n      setProgress({ currentTime: 0, duration: data.duration });\n    },\n    [addLog]\n  );\n\n  const handleProgress = useCallback((data: OnProgressData) => {\n    setProgress({\n      currentTime: data.currentTime,\n      duration: data.seekableDuration,\n    });\n  }, []);\n\n  const handleSeek = useCallback(\n    (data: OnSeekData) => {\n      addLog(`onSeek: ${data.currentTime.toFixed(1)}s -> ${data.seekTime.toFixed(1)}s`);\n    },\n    [addLog]\n  );\n\n  const handleBuffer = useCallback(\n    (data: OnBufferData) => {\n      addLog(`onBuffer: ${data.isBuffering ? 'buffering' : 'ready'}`);\n    },\n    [addLog]\n  );\n\n  const handleError = useCallback(\n    (data: OnVideoErrorData) => {\n      addLog(`onError: ${data.error.localizedDescription || data.error.errorString}`);\n    },\n    [addLog]\n  );\n\n  const handleEnd = useCallback(() => {\n    addLog('onEnd');\n  }, [addLog]);\n\n  const handlePlaybackStateChanged = useCallback(\n    (data: OnPlaybackStateChangedData) => {\n      addLog(`playbackState: playing=${data.isPlaying}, seeking=${data.isSeeking}`);\n    },\n    [addLog]\n  );\n\n  const handleReadyForDisplay = useCallback(() => {\n    addLog('onReadyForDisplay');\n  }, [addLog]);\n\n  // Actions\n  const togglePlayPause = useCallback(() => {\n    setPaused((prev) => !prev);\n    addLog(paused ? 'Play' : 'Pause');\n  }, [paused, addLog]);\n\n  const toggleMute = useCallback(() => {\n    setMuted((prev) => !prev);\n    addLog(muted ? 'Unmuted' : 'Muted');\n  }, [muted, addLog]);\n\n  const seekForward = useCallback(() => {\n    videoRef.current?.seek(progress.currentTime + 10);\n    addLog('Seek +10s');\n  }, [progress.currentTime, addLog]);\n\n  const seekBackward = useCallback(() => {\n    videoRef.current?.seek(Math.max(0, progress.currentTime - 10));\n    addLog('Seek -10s');\n  }, [progress.currentTime, addLog]);\n\n  const changeRate = useCallback(\n    (newRate: number) => {\n      setRate(newRate);\n      addLog(`Rate: ${newRate}x`);\n    },\n    [addLog]\n  );\n\n  const changeVolume = useCallback(\n    (newVolume: number) => {\n      setVolume(newVolume);\n      addLog(`Volume: ${Math.round(newVolume * 100)}%`);\n    },\n    [addLog]\n  );\n\n  const changeResizeMode = useCallback(\n    (mode: ResizeMode) => {\n      setResizeMode(mode);\n      addLog(`ResizeMode: ${mode}`);\n    },\n    [addLog]\n  );\n\n  const changeSource = useCallback(\n    (source: string) => {\n      setCurrentSource(source);\n      setShowError(false);\n      addLog(`Source changed`);\n    },\n    [addLog]\n  );\n\n  const triggerError = useCallback(() => {\n    setShowError(true);\n    setCurrentSource(INVALID_URL);\n    addLog('Triggering error with invalid URL');\n  }, [addLog]);\n\n  const clearLogs = useCallback(() => {\n    setLogs([]);\n  }, []);\n\n  return (\n    <SafeAreaView style={styles.safeArea}>\n      <ScrollView testID=\"main-scroll\" style={styles.scrollView} contentContainerStyle={styles.scrollContent}>\n        <Text testID=\"app-title\" style={styles.title}>\n          GraniteVideo Example\n        </Text>\n\n        {/* Video Player */}\n        <View style={styles.videoContainer}>\n          <GraniteVideo\n            ref={videoRef}\n            testID=\"main-video\"\n            source={{ uri: currentSource }}\n            style={styles.video}\n            paused={paused}\n            muted={muted}\n            volume={volume}\n            rate={rate}\n            repeat={repeat}\n            resizeMode={resizeMode}\n            controls={false}\n            onLoadStart={handleLoadStart}\n            onLoad={handleLoad}\n            onProgress={handleProgress}\n            onSeek={handleSeek}\n            onBuffer={handleBuffer}\n            onError={handleError}\n            onEnd={handleEnd}\n            onPlaybackStateChanged={handlePlaybackStateChanged}\n            onReadyForDisplay={handleReadyForDisplay}\n          />\n        </View>\n\n        {/* Progress Bar */}\n        <View style={styles.progressContainer}>\n          <Text testID=\"progress-time\" style={styles.progressText}>\n            {formatTime(progress.currentTime)} / {formatTime(progress.duration)}\n          </Text>\n          <View style={styles.progressBar}>\n            <View\n              style={[\n                styles.progressFill,\n                {\n                  width: `${progress.duration > 0 ? (progress.currentTime / progress.duration) * 100 : 0}%`,\n                },\n              ]}\n            />\n          </View>\n        </View>\n\n        {/* Section 1: Basic Controls */}\n        <View style={styles.section}>\n          <Text style={styles.sectionTitle}>1. Basic Controls</Text>\n          <View style={styles.buttonRow}>\n            <TouchableOpacity testID=\"play-pause-button\" style={styles.button} onPress={togglePlayPause}>\n              <Text style={styles.buttonText}>{paused ? '▶ Play' : '⏸ Pause'}</Text>\n            </TouchableOpacity>\n            <TouchableOpacity testID=\"mute-button\" style={styles.button} onPress={toggleMute}>\n              <Text style={styles.buttonText}>{muted ? '🔇 Unmute' : '🔊 Mute'}</Text>\n            </TouchableOpacity>\n          </View>\n          <View style={styles.buttonRow}>\n            <TouchableOpacity testID=\"seek-back-button\" style={styles.button} onPress={seekBackward}>\n              <Text style={styles.buttonText}>⏪ -10s</Text>\n            </TouchableOpacity>\n            <TouchableOpacity testID=\"seek-forward-button\" style={styles.button} onPress={seekForward}>\n              <Text style={styles.buttonText}>⏩ +10s</Text>\n            </TouchableOpacity>\n          </View>\n        </View>\n\n        {/* Section 2: Playback Rate */}\n        <View style={styles.section}>\n          <Text style={styles.sectionTitle}>2. Playback Rate</Text>\n          <Text testID=\"rate-label\" style={styles.label}>\n            Current: {rate}x\n          </Text>\n          <View style={styles.buttonRow}>\n            {[0.5, 1.0, 1.5, 2.0].map((r) => (\n              <TouchableOpacity\n                key={r}\n                testID={`rate-${r}`}\n                style={[styles.smallButton, rate === r && styles.activeButton]}\n                onPress={() => changeRate(r)}\n              >\n                <Text style={styles.buttonText}>{r}x</Text>\n              </TouchableOpacity>\n            ))}\n          </View>\n        </View>\n\n        {/* Section 3: Volume */}\n        <View style={styles.section}>\n          <Text style={styles.sectionTitle}>3. Volume</Text>\n          <Text testID=\"volume-label\" style={styles.label}>\n            Current: {Math.round(volume * 100)}%\n          </Text>\n          <View style={styles.buttonRow}>\n            {[0, 0.25, 0.5, 0.75, 1.0].map((v) => (\n              <TouchableOpacity\n                key={v}\n                testID={`volume-${Math.round(v * 100)}`}\n                style={[styles.smallButton, volume === v && styles.activeButton]}\n                onPress={() => changeVolume(v)}\n              >\n                <Text style={styles.buttonText}>{Math.round(v * 100)}%</Text>\n              </TouchableOpacity>\n            ))}\n          </View>\n        </View>\n\n        {/* Section 4: Resize Mode */}\n        <View style={styles.section}>\n          <Text style={styles.sectionTitle}>4. Resize Mode</Text>\n          <Text testID=\"resize-mode-label\" style={styles.label}>\n            Current: {resizeMode}\n          </Text>\n          <View style={styles.buttonRow}>\n            {(['contain', 'cover', 'stretch'] as ResizeMode[]).map((mode) => (\n              <TouchableOpacity\n                key={mode}\n                testID={`resize-${mode}`}\n                style={[styles.smallButton, resizeMode === mode && styles.activeButton]}\n                onPress={() => changeResizeMode(mode)}\n              >\n                <Text style={styles.buttonText}>{mode}</Text>\n              </TouchableOpacity>\n            ))}\n          </View>\n        </View>\n\n        {/* Section 5: Repeat */}\n        <View style={styles.section}>\n          <Text style={styles.sectionTitle}>5. Repeat</Text>\n          <TouchableOpacity\n            testID=\"repeat-button\"\n            style={[styles.button, repeat && styles.activeButton]}\n            onPress={() => {\n              setRepeat((prev) => !prev);\n              addLog(`Repeat: ${!repeat}`);\n            }}\n          >\n            <Text style={styles.buttonText}>{repeat ? '🔁 Repeat ON' : '➡ Repeat OFF'}</Text>\n          </TouchableOpacity>\n        </View>\n\n        {/* Section 6: Source Selection */}\n        <View style={styles.section}>\n          <Text style={styles.sectionTitle}>6. Source Selection</Text>\n          <View style={styles.buttonRow}>\n            <TouchableOpacity testID=\"source-mp4\" style={styles.button} onPress={() => changeSource(TEST_VIDEOS.mp4)}>\n              <Text style={styles.buttonText}>MP4</Text>\n            </TouchableOpacity>\n            <TouchableOpacity testID=\"source-hls\" style={styles.button} onPress={() => changeSource(TEST_VIDEOS.hls)}>\n              <Text style={styles.buttonText}>HLS</Text>\n            </TouchableOpacity>\n          </View>\n        </View>\n\n        {/* Section 7: Error Handling */}\n        <View testID=\"error-test\" style={styles.section}>\n          <Text style={styles.sectionTitle}>7. Error Handling</Text>\n          <TouchableOpacity testID=\"trigger-error\" style={styles.button} onPress={triggerError}>\n            <Text style={styles.buttonText}>Trigger Error</Text>\n          </TouchableOpacity>\n        </View>\n\n        {/* Event Logs */}\n        <View style={styles.section}>\n          <View style={styles.logHeader}>\n            <Text style={styles.sectionTitle}>Event Logs</Text>\n            <TouchableOpacity testID=\"clear-logs\" onPress={clearLogs}>\n              <Text style={styles.clearText}>Clear</Text>\n            </TouchableOpacity>\n          </View>\n          <View testID=\"log-container\" style={styles.logContainer}>\n            {logs.length === 0 ? (\n              <Text style={styles.logEmpty}>No events yet...</Text>\n            ) : (\n              logs.map((log, index) => (\n                <Text\n                  key={index}\n                  testID={`log-${log.split(':')[1]?.trim().split(' ')[0] || index}`}\n                  style={styles.logText}\n                >\n                  {log}\n                </Text>\n              ))\n            )}\n          </View>\n        </View>\n      </ScrollView>\n    </SafeAreaView>\n  );\n}\n\n// Helper function\nfunction formatTime(seconds: number): string {\n  if (!isFinite(seconds) || seconds < 0) {\n    return '0:00';\n  }\n  const mins = Math.floor(seconds / 60);\n  const secs = Math.floor(seconds % 60);\n  return `${mins}:${secs.toString().padStart(2, '0')}`;\n}\n\nconst styles = StyleSheet.create({\n  safeArea: {\n    flex: 1,\n    backgroundColor: '#1a1a2e',\n  },\n  scrollView: {\n    flex: 1,\n  },\n  scrollContent: {\n    padding: 16,\n    paddingBottom: 40,\n  },\n  title: {\n    fontSize: 24,\n    fontWeight: 'bold',\n    color: '#fff',\n    textAlign: 'center',\n    marginBottom: 16,\n  },\n  videoContainer: {\n    width: '100%',\n    aspectRatio: 16 / 9,\n    backgroundColor: '#000',\n    borderRadius: 8,\n    overflow: 'hidden',\n    marginBottom: 8,\n  },\n  video: {\n    width: '100%',\n    height: '100%',\n  },\n  progressContainer: {\n    marginBottom: 16,\n  },\n  progressText: {\n    color: '#fff',\n    fontSize: 12,\n    textAlign: 'center',\n    marginBottom: 4,\n  },\n  progressBar: {\n    height: 4,\n    backgroundColor: '#333',\n    borderRadius: 2,\n    overflow: 'hidden',\n  },\n  progressFill: {\n    height: '100%',\n    backgroundColor: '#4CAF50',\n  },\n  section: {\n    marginBottom: 20,\n    padding: 12,\n    backgroundColor: '#16213e',\n    borderRadius: 8,\n  },\n  sectionTitle: {\n    fontSize: 16,\n    fontWeight: 'bold',\n    color: '#e94560',\n    marginBottom: 12,\n  },\n  label: {\n    color: '#fff',\n    marginBottom: 8,\n    fontSize: 14,\n  },\n  buttonRow: {\n    flexDirection: 'row',\n    flexWrap: 'wrap',\n    gap: 8,\n  },\n  button: {\n    backgroundColor: '#0f3460',\n    paddingVertical: 10,\n    paddingHorizontal: 16,\n    borderRadius: 6,\n    minWidth: 80,\n    alignItems: 'center',\n  },\n  smallButton: {\n    backgroundColor: '#0f3460',\n    paddingVertical: 8,\n    paddingHorizontal: 12,\n    borderRadius: 6,\n    minWidth: 50,\n    alignItems: 'center',\n  },\n  activeButton: {\n    backgroundColor: '#e94560',\n  },\n  buttonText: {\n    color: '#fff',\n    fontSize: 14,\n    fontWeight: '600',\n  },\n  logHeader: {\n    flexDirection: 'row',\n    justifyContent: 'space-between',\n    alignItems: 'center',\n    marginBottom: 8,\n  },\n  clearText: {\n    color: '#e94560',\n    fontSize: 14,\n  },\n  logContainer: {\n    backgroundColor: '#0a0a0a',\n    borderRadius: 6,\n    padding: 8,\n    maxHeight: 200,\n  },\n  logEmpty: {\n    color: '#666',\n    fontStyle: 'italic',\n  },\n  logText: {\n    color: '#4CAF50',\n    fontSize: 11,\n    fontFamily: Platform.OS === 'ios' ? 'Menlo' : 'monospace',\n    marginBottom: 2,\n  },\n});\n"
  },
  {
    "path": "packages/video/ios/GraniteVideoComponentsProvider.h",
    "content": "#import <Foundation/Foundation.h>\n\nNS_ASSUME_NONNULL_BEGIN\n\n// Forward declaration to avoid pulling in React C++ headers\n// The actual implementation is in the .mm file\n@protocol RCTComponentViewProtocol;\nClass<RCTComponentViewProtocol> GraniteVideoViewCls(void) __attribute__((used));\n\nNS_ASSUME_NONNULL_END\n"
  },
  {
    "path": "packages/video/ios/GraniteVideoProvider.swift",
    "content": "import UIKit\nimport AVFoundation\n\n// ============================================================\n// MARK: - Enums\n// ============================================================\n\n@objc public enum GraniteVideoResizeMode: Int {\n    case contain = 0\n    case cover = 1\n    case stretch = 2\n    case none = 3\n}\n\n@objc public enum GraniteVideoDrmType: Int {\n    case none = 0\n    case fairplay = 1\n    case widevine = 2\n    case playready = 3\n    case clearkey = 4\n}\n\n@objc public enum GraniteVideoAudioOutput: Int {\n    case speaker = 0\n    case earpiece = 1\n}\n\n@objc public enum GraniteVideoIgnoreSilentSwitch: Int {\n    case inherit = 0\n    case ignore = 1\n    case obey = 2\n}\n\n@objc public enum GraniteVideoMixWithOthers: Int {\n    case inherit = 0\n    case mix = 1\n    case duck = 2\n}\n\n// ============================================================\n// MARK: - Data Types\n// ============================================================\n\n@objc public class GraniteVideoDrmConfig: NSObject {\n    @objc public var type: GraniteVideoDrmType = .none\n    @objc public var licenseServer: String?\n    @objc public var headers: [String: String]?\n    @objc public var contentID: String?\n    @objc public var certificateURL: String?\n    @objc public var base64Certificate: Bool = false\n}\n\n@objc public class GraniteVideoSource: NSObject {\n    @objc public var uri: String?\n    @objc public var type: String?\n    @objc public var startTime: Double = 0\n    @objc public var endTime: Double = 0\n    @objc public var headers: [String: String]?\n    @objc public var drm: GraniteVideoDrmConfig?\n\n    @objc public override init() {\n        super.init()\n    }\n\n    @objc public convenience init(uri: String) {\n        self.init()\n        self.uri = uri\n    }\n}\n\n@objc public class GraniteVideoBufferConfig: NSObject {\n    @objc public var minBufferMs: Int = 15000\n    @objc public var maxBufferMs: Int = 50000\n    @objc public var bufferForPlaybackMs: Int = 2500\n    @objc public var bufferForPlaybackAfterRebufferMs: Int = 5000\n    @objc public var cacheSizeMB: Int = 0\n}\n\n@objc public class GraniteVideoSelectedTrack: NSObject {\n    @objc public var type: String = \"system\"\n    @objc public var value: String?\n}\n\n// ============================================================\n// MARK: - Event Data Types\n// ============================================================\n\n@objc public class GraniteVideoLoadData: NSObject {\n    @objc public var currentTime: Double = 0\n    @objc public var duration: Double = 0\n    @objc public var naturalWidth: Double = 0\n    @objc public var naturalHeight: Double = 0\n    @objc public var orientation: String = \"landscape\"\n}\n\n@objc public class GraniteVideoProgressData: NSObject {\n    @objc public var currentTime: Double = 0\n    @objc public var playableDuration: Double = 0\n    @objc public var seekableDuration: Double = 0\n}\n\n@objc public class GraniteVideoErrorData: NSObject {\n    @objc public var code: Int = 0\n    @objc public var domain: String = \"\"\n    @objc public var localizedDescription_: String = \"\"\n    @objc public var localizedFailureReason_: String = \"\"\n    @objc public var localizedRecoverySuggestion_: String = \"\"\n\n    @objc public override init() {\n        super.init()\n    }\n\n    @objc public convenience init(error: Error) {\n        self.init()\n        let nsError = error as NSError\n        self.code = nsError.code\n        self.domain = nsError.domain\n        self.localizedDescription_ = nsError.localizedDescription\n        self.localizedFailureReason_ = nsError.localizedFailureReason ?? \"\"\n        self.localizedRecoverySuggestion_ = nsError.localizedRecoverySuggestion ?? \"\"\n    }\n}\n\n// ============================================================\n// MARK: - Delegate Protocol\n// ============================================================\n\n@objc public protocol GraniteVideoDelegate: AnyObject {\n    @objc optional func videoDidLoadStart(isNetwork: Bool, type: String, uri: String)\n    @objc optional func videoDidLoad(data: GraniteVideoLoadData)\n    @objc optional func videoDidFail(error: GraniteVideoErrorData)\n    @objc optional func videoDidUpdateProgress(data: GraniteVideoProgressData)\n    @objc optional func videoDidSeek(currentTime: Double, seekTime: Double)\n    @objc optional func videoDidEnd()\n    @objc optional func videoBufferingStateChanged(isBuffering: Bool)\n    @objc optional func videoBandwidthDidUpdate(bitrate: Double, width: Int, height: Int)\n    @objc optional func videoPlaybackStateChanged(isPlaying: Bool, isSeeking: Bool, isLooping: Bool)\n    @objc optional func videoPlaybackRateChanged(rate: Float)\n    @objc optional func videoVolumeChanged(volume: Float)\n    @objc optional func videoDidBecomeIdle()\n    @objc optional func videoReadyForDisplay()\n    @objc optional func videoAudioBecomingNoisy()\n    @objc optional func videoAudioFocusChanged(hasAudioFocus: Bool)\n    @objc optional func videoFullscreenPlayerWillPresent()\n    @objc optional func videoFullscreenPlayerDidPresent()\n    @objc optional func videoFullscreenPlayerWillDismiss()\n    @objc optional func videoFullscreenPlayerDidDismiss()\n    @objc optional func videoPictureInPictureStatusChanged(isActive: Bool)\n    @objc optional func videoRestoreUserInterfaceForPictureInPictureStop()\n    @objc optional func videoControlsVisibilityChanged(isVisible: Bool)\n    @objc optional func videoExternalPlaybackChanged(isActive: Bool)\n    @objc optional func videoAspectRatioChanged(width: Double, height: Double)\n    @objc optional func videoTransferEnd(uri: String, bytesTransferred: Double)\n}\n\n// ============================================================\n// MARK: - Provider Protocol\n// ============================================================\n\n@objc public protocol GraniteVideoProvidable: NSObjectProtocol {\n    // Required - View Creation\n    @objc func createPlayerView() -> UIView\n\n    // Required - Source Loading\n    @objc func loadSource(_ source: GraniteVideoSource)\n    @objc func unload()\n\n    // Required - Playback Control\n    @objc func play()\n    @objc func pause()\n    @objc func seek(to time: Double, toleranceBefore: Double, toleranceAfter: Double)\n\n    // Required - Properties\n    @objc weak var delegate: GraniteVideoDelegate? { get set }\n    @objc var currentTime: Double { get }\n    @objc var duration: Double { get }\n    @objc var isPlaying: Bool { get }\n\n    // Optional - Volume\n    @objc optional func setVolume(_ volume: Float)\n    @objc optional func setMuted(_ muted: Bool)\n\n    // Optional - Rate\n    @objc optional func setRate(_ rate: Float)\n\n    // Optional - Repeat\n    @objc optional func setRepeat(_ shouldRepeat: Bool)\n\n    // Optional - Resize Mode\n    @objc optional func setResizeMode(_ mode: GraniteVideoResizeMode)\n\n    // Optional - Background Playback\n    @objc optional func setPlayInBackground(_ enabled: Bool)\n    @objc optional func setPlayWhenInactive(_ enabled: Bool)\n\n    // Optional - Audio Session\n    @objc optional func setAudioOutput(_ output: GraniteVideoAudioOutput)\n    @objc optional func setIgnoreSilentSwitch(_ mode: GraniteVideoIgnoreSilentSwitch)\n    @objc optional func setMixWithOthers(_ mode: GraniteVideoMixWithOthers)\n\n    // Optional - Fullscreen\n    @objc optional func setFullscreen(_ fullscreen: Bool, animated: Bool)\n    @objc optional func setFullscreenAutorotate(_ autorotate: Bool)\n    @objc optional func setFullscreenOrientation(_ orientation: String)\n\n    // Optional - Picture in Picture\n    @objc optional func setPictureInPictureEnabled(_ enabled: Bool)\n    @objc optional func enterPictureInPicture()\n    @objc optional func exitPictureInPicture()\n\n    // Optional - Controls\n    @objc optional func setControlsEnabled(_ enabled: Bool)\n    @objc optional func setPreventsDisplaySleepDuringVideoPlayback(_ prevents: Bool)\n\n    // Optional - Buffer Config\n    @objc optional func setBufferConfig(_ config: GraniteVideoBufferConfig)\n    @objc optional func setMaxBitRate(_ bitRate: Int)\n    @objc optional func setPreferredForwardBufferDuration(_ duration: Double)\n    @objc optional func setAutomaticallyWaitsToMinimizeStalling(_ waits: Bool)\n\n    // Optional - Track Selection\n    @objc optional func setSelectedAudioTrack(_ track: GraniteVideoSelectedTrack)\n    @objc optional func setSelectedTextTrack(_ track: GraniteVideoSelectedTrack)\n    @objc optional func setSelectedVideoTrack(type: String, value: Int)\n\n    // Optional - External Playback\n    @objc optional func setAllowsExternalPlayback(_ allows: Bool)\n\n    // Optional - DRM\n    @objc optional func setDrmConfig(_ config: GraniteVideoDrmConfig)\n\n    // Optional - Poster\n    @objc optional func setPoster(_ url: String, resizeMode: GraniteVideoResizeMode)\n\n    // Optional - Save\n    @objc optional func save(type: String, completion: @escaping (String?, Error?) -> Void)\n\n    // Optional - Cache Management\n    @objc optional func clearCache()\n}\n\n// ============================================================\n// MARK: - Registry\n// ============================================================\n\npublic typealias GraniteVideoProviderFactory = () -> GraniteVideoProvidable\n\n@objc public class GraniteVideoRegistry: NSObject {\n    @objc public static let shared = GraniteVideoRegistry()\n\n    private var internalProvider: GraniteVideoProvidable?\n    private var providerFactory: GraniteVideoProviderFactory?\n\n    private override init() {\n        super.init()\n    }\n\n    @objc public var provider: GraniteVideoProvidable? {\n        return internalProvider\n    }\n\n    @objc public func register(provider: GraniteVideoProvidable) {\n        internalProvider = provider\n    }\n\n    @objc public func register(factory: @escaping GraniteVideoProviderFactory) {\n        providerFactory = factory\n    }\n\n    @objc public func createProvider() -> GraniteVideoProvidable? {\n        if let factory = providerFactory {\n            return factory()\n        }\n        return internalProvider\n    }\n\n    @objc public func hasProvider() -> Bool {\n        return internalProvider != nil || providerFactory != nil\n    }\n}\n"
  },
  {
    "path": "packages/video/ios/GraniteVideoView.h",
    "content": "#import <UIKit/UIKit.h>\n\n#ifndef GraniteVideoViewNativeComponent_h\n#define GraniteVideoViewNativeComponent_h\n\nNS_ASSUME_NONNULL_BEGIN\n\n// Forward declare to avoid pulling in C++ headers\n// RCTViewComponentView import is in the .mm file\n@interface GraniteVideoView : UIView\n@end\n\nNS_ASSUME_NONNULL_END\n\n#endif /* GraniteVideoViewNativeComponent_h */\n"
  },
  {
    "path": "packages/video/ios/GraniteVideoView.mm",
    "content": "#import <UIKit/UIKit.h>\n#import <AVKit/AVKit.h>\n\n#import <React/RCTViewComponentView.h>\n#import <React/RCTConversions.h>\n#import <React/RCTFabricComponentsPlugins.h>\n#import <React/RCTComponentViewFactory.h>\n\n#import <react/renderer/components/GraniteVideoViewSpec/ComponentDescriptors.h>\n#import <react/renderer/components/GraniteVideoViewSpec/EventEmitters.h>\n#import <react/renderer/components/GraniteVideoViewSpec/Props.h>\n#import <react/renderer/components/GraniteVideoViewSpec/RCTComponentViewHelpers.h>\n\n// Import Swift module - the header is generated during build\n#if __has_include(<GraniteVideo/GraniteVideo-Swift.h>)\n#import <GraniteVideo/GraniteVideo-Swift.h>\n#elif __has_include(<granite_video/granite_video-Swift.h>)\n#import <granite_video/granite_video-Swift.h>\n#else\n#import \"GraniteVideo-Swift.h\"\n#endif\n\nusing namespace facebook::react;\n\n// Define GraniteVideoView inheriting from RCTViewComponentView here in .mm file\n// The header declares it as UIView to avoid exposing C++ headers to Swift module\n@interface GraniteVideoView : RCTViewComponentView <RCTGraniteVideoViewViewProtocol, GraniteVideoDelegate>\n@end\n\n@implementation GraniteVideoView {\n    UIView *_playerView;\n    id<GraniteVideoProvidable> _provider;\n    BOOL _paused;\n    float _volume;\n    float _rate;\n    BOOL _muted;\n    BOOL _repeat;\n    NSString *_resizeMode;\n}\n\n+ (ComponentDescriptorProvider)componentDescriptorProvider\n{\n    return concreteComponentDescriptorProvider<GraniteVideoViewComponentDescriptor>();\n}\n\n- (instancetype)initWithFrame:(CGRect)frame\n{\n    if (self = [super initWithFrame:frame]) {\n        static const auto defaultProps = std::make_shared<const GraniteVideoViewProps>();\n        _props = defaultProps;\n\n        // Default values\n        _paused = NO;\n        _volume = 1.0f;\n        _rate = 1.0f;\n        _muted = NO;\n        _repeat = NO;\n        _resizeMode = @\"contain\";\n\n        // Create provider from registry\n        _provider = [[GraniteVideoRegistry shared] createProvider];\n\n#if defined(GRANITE_VIDEO_DEFAULT_PROVIDER)\n        if (_provider == nil) {\n            // Use default AVPlayer provider\n            _provider = [[AVPlayerProvider alloc] init];\n        }\n#endif\n\n        if (_provider == nil) {\n            NSLog(@\"[GraniteVideo] No provider registered. Register a provider in AppDelegate or use default AVPlayer provider.\");\n            return self;\n        }\n\n        [_provider setDelegate:self];\n\n        // Create player view\n        _playerView = [_provider createPlayerView];\n        _playerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;\n\n        self.contentView = _playerView;\n    }\n\n    return self;\n}\n\n- (void)layoutSubviews\n{\n    [super layoutSubviews];\n    _playerView.frame = self.bounds;\n}\n\n- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps\n{\n    const auto &oldViewProps = *std::static_pointer_cast<GraniteVideoViewProps const>(_props);\n    const auto &newViewProps = *std::static_pointer_cast<GraniteVideoViewProps const>(props);\n\n    // Source\n    if (newViewProps.source.uri != oldViewProps.source.uri ||\n        newViewProps.source.type != oldViewProps.source.type) {\n        [self updateSource:newViewProps.source];\n    }\n\n    // Paused\n    if (newViewProps.paused != oldViewProps.paused) {\n        _paused = newViewProps.paused;\n        if (_paused) {\n            [_provider pause];\n        } else {\n            [_provider play];\n        }\n    }\n\n    // Muted\n    if (newViewProps.muted != oldViewProps.muted) {\n        _muted = newViewProps.muted;\n        if ([_provider respondsToSelector:@selector(setMuted:)]) {\n            [_provider setMuted:_muted];\n        }\n    }\n\n    // Volume\n    if (newViewProps.volume != oldViewProps.volume) {\n        _volume = newViewProps.volume;\n        if ([_provider respondsToSelector:@selector(setVolume:)]) {\n            [_provider setVolume:_volume];\n        }\n    }\n\n    // Rate\n    if (newViewProps.rate != oldViewProps.rate) {\n        _rate = newViewProps.rate;\n        if ([_provider respondsToSelector:@selector(setRate:)]) {\n            [_provider setRate:_rate];\n        }\n    }\n\n    // Repeat\n    if (newViewProps.repeat != oldViewProps.repeat) {\n        _repeat = newViewProps.repeat;\n        if ([_provider respondsToSelector:@selector(setRepeat:)]) {\n            [_provider setRepeat:_repeat];\n        }\n    }\n\n    // Resize Mode\n    if (newViewProps.resizeMode != oldViewProps.resizeMode) {\n        _resizeMode = [NSString stringWithUTF8String:newViewProps.resizeMode.c_str()];\n        [self updateResizeMode:_resizeMode];\n    }\n\n    // Controls\n    if (newViewProps.controls != oldViewProps.controls) {\n        if ([_provider respondsToSelector:@selector(setControlsEnabled:)]) {\n            [_provider setControlsEnabled:newViewProps.controls];\n        }\n    }\n\n    // Fullscreen\n    if (newViewProps.fullscreen != oldViewProps.fullscreen) {\n        if ([_provider respondsToSelector:@selector(setFullscreen:animated:)]) {\n            [_provider setFullscreen:newViewProps.fullscreen animated:YES];\n        }\n    }\n\n    // Picture in Picture\n    if (newViewProps.pictureInPicture != oldViewProps.pictureInPicture) {\n        if ([_provider respondsToSelector:@selector(setPictureInPictureEnabled:)]) {\n            [_provider setPictureInPictureEnabled:newViewProps.pictureInPicture];\n        }\n    }\n\n    // Play in Background\n    if (newViewProps.playInBackground != oldViewProps.playInBackground) {\n        if ([_provider respondsToSelector:@selector(setPlayInBackground:)]) {\n            [_provider setPlayInBackground:newViewProps.playInBackground];\n        }\n    }\n\n    // Play when Inactive\n    if (newViewProps.playWhenInactive != oldViewProps.playWhenInactive) {\n        if ([_provider respondsToSelector:@selector(setPlayWhenInactive:)]) {\n            [_provider setPlayWhenInactive:newViewProps.playWhenInactive];\n        }\n    }\n\n    // Max Bit Rate\n    if (newViewProps.maxBitRate != oldViewProps.maxBitRate) {\n        if ([_provider respondsToSelector:@selector(setMaxBitRate:)]) {\n            [_provider setMaxBitRate:newViewProps.maxBitRate];\n        }\n    }\n\n    // Preferred Forward Buffer Duration\n    if (newViewProps.preferredForwardBufferDuration != oldViewProps.preferredForwardBufferDuration) {\n        if ([_provider respondsToSelector:@selector(setPreferredForwardBufferDuration:)]) {\n            [_provider setPreferredForwardBufferDuration:newViewProps.preferredForwardBufferDuration];\n        }\n    }\n\n    // Automatically Waits to Minimize Stalling\n    if (newViewProps.automaticallyWaitsToMinimizeStalling != oldViewProps.automaticallyWaitsToMinimizeStalling) {\n        if ([_provider respondsToSelector:@selector(setAutomaticallyWaitsToMinimizeStalling:)]) {\n            [_provider setAutomaticallyWaitsToMinimizeStalling:newViewProps.automaticallyWaitsToMinimizeStalling];\n        }\n    }\n\n    // Allows External Playback\n    if (newViewProps.allowsExternalPlayback != oldViewProps.allowsExternalPlayback) {\n        if ([_provider respondsToSelector:@selector(setAllowsExternalPlayback:)]) {\n            [_provider setAllowsExternalPlayback:newViewProps.allowsExternalPlayback];\n        }\n    }\n\n    // Prevents Display Sleep\n    if (newViewProps.preventsDisplaySleepDuringVideoPlayback != oldViewProps.preventsDisplaySleepDuringVideoPlayback) {\n        if ([_provider respondsToSelector:@selector(setPreventsDisplaySleepDuringVideoPlayback:)]) {\n            [_provider setPreventsDisplaySleepDuringVideoPlayback:newViewProps.preventsDisplaySleepDuringVideoPlayback];\n        }\n    }\n\n    // DRM Config\n    if (newViewProps.drm.type != oldViewProps.drm.type ||\n        newViewProps.drm.licenseServer != oldViewProps.drm.licenseServer ||\n        newViewProps.drm.contentId != oldViewProps.drm.contentId ||\n        newViewProps.drm.certificateUrl != oldViewProps.drm.certificateUrl) {\n        [self updateDrmConfig:newViewProps.drm];\n    }\n\n    [super updateProps:props oldProps:oldProps];\n}\n\n- (void)updateSource:(const GraniteVideoViewSourceStruct &)source\n{\n    if (source.uri.empty()) {\n        return;\n    }\n\n    GraniteVideoSource *videoSource = [[GraniteVideoSource alloc] init];\n    videoSource.uri = [NSString stringWithUTF8String:source.uri.c_str()];\n\n    if (!source.type.empty()) {\n        videoSource.type = [NSString stringWithUTF8String:source.type.c_str()];\n    }\n\n    // source.headers (vector<{name, value}>) → NSDictionary 변환\n    if (!source.headers.empty()) {\n        NSMutableDictionary *headers = [NSMutableDictionary dictionary];\n        for (const auto &header : source.headers) {\n            NSString *name = [NSString stringWithUTF8String:header.name.c_str()];\n            NSString *value = [NSString stringWithUTF8String:header.value.c_str()];\n            headers[name] = value;\n        }\n        videoSource.headers = headers;\n    }\n\n    videoSource.startTime = source.startTime;\n    videoSource.endTime = source.endTime;\n\n    [_provider loadSource:videoSource];\n\n    if (!_paused) {\n        [_provider play];\n    }\n}\n\n- (void)updateResizeMode:(NSString *)mode\n{\n    if ([_provider respondsToSelector:@selector(setResizeMode:)]) {\n        GraniteVideoResizeMode resizeMode = GraniteVideoResizeModeContain;\n\n        if ([mode isEqualToString:@\"cover\"]) {\n            resizeMode = GraniteVideoResizeModeCover;\n        } else if ([mode isEqualToString:@\"stretch\"]) {\n            resizeMode = GraniteVideoResizeModeStretch;\n        } else if ([mode isEqualToString:@\"none\"]) {\n            resizeMode = GraniteVideoResizeModeNone;\n        }\n\n        [_provider setResizeMode:resizeMode];\n    }\n}\n\n- (void)updateDrmConfig:(const GraniteVideoViewDrmStruct &)drm\n{\n    if (drm.type.empty()) {\n        return;\n    }\n\n    GraniteVideoDrmConfig *drmConfig = [[GraniteVideoDrmConfig alloc] init];\n\n    // Map DRM type\n    NSString *typeStr = [NSString stringWithUTF8String:drm.type.c_str()];\n    if ([typeStr isEqualToString:@\"fairplay\"]) {\n        drmConfig.type = GraniteVideoDrmTypeFairplay;\n    } else if ([typeStr isEqualToString:@\"widevine\"]) {\n        drmConfig.type = GraniteVideoDrmTypeWidevine;\n    } else if ([typeStr isEqualToString:@\"playready\"]) {\n        drmConfig.type = GraniteVideoDrmTypePlayready;\n    } else if ([typeStr isEqualToString:@\"clearkey\"]) {\n        drmConfig.type = GraniteVideoDrmTypeClearkey;\n    }\n\n    if (!drm.licenseServer.empty()) {\n        drmConfig.licenseServer = [NSString stringWithUTF8String:drm.licenseServer.c_str()];\n    }\n\n    // Map JS contentId -> iOS contentID\n    if (!drm.contentId.empty()) {\n        drmConfig.contentID = [NSString stringWithUTF8String:drm.contentId.c_str()];\n    }\n\n    // Map JS certificateUrl -> iOS certificateURL\n    if (!drm.certificateUrl.empty()) {\n        drmConfig.certificateURL = [NSString stringWithUTF8String:drm.certificateUrl.c_str()];\n    }\n\n    drmConfig.base64Certificate = drm.base64Certificate;\n\n    if ([_provider respondsToSelector:@selector(setDrmConfig:)]) {\n        [_provider setDrmConfig:drmConfig];\n    }\n}\n\n#pragma mark - Native Commands\n\n- (void)seek:(double)time tolerance:(double)tolerance\n{\n    [_provider seekTo:time toleranceBefore:tolerance toleranceAfter:tolerance];\n}\n\n- (void)adjustVolume:(float)volume\n{\n    _volume = volume;\n    if ([_provider respondsToSelector:@selector(setVolume:)]) {\n        [_provider setVolume:volume];\n    }\n}\n\n- (void)setFullScreen:(BOOL)fullscreen\n{\n    if ([_provider respondsToSelector:@selector(setFullscreen:animated:)]) {\n        [_provider setFullscreen:fullscreen animated:YES];\n    }\n}\n\n- (void)loadSource:(NSString *)uri\n{\n    GraniteVideoSource *source = [[GraniteVideoSource alloc] initWithUri:uri];\n    [_provider loadSource:source];\n\n    if (!_paused) {\n        [_provider play];\n    }\n}\n\n- (void)pause\n{\n    [_provider pause];\n}\n\n- (void)resume\n{\n    [_provider play];\n}\n\n- (void)enterPictureInPicture\n{\n    if ([_provider respondsToSelector:@selector(enterPictureInPicture)]) {\n        [_provider enterPictureInPicture];\n    }\n}\n\n- (void)exitPictureInPicture\n{\n    if ([_provider respondsToSelector:@selector(exitPictureInPicture)]) {\n        [_provider exitPictureInPicture];\n    }\n}\n\n#pragma mark - GraniteVideoDelegate\n\n- (void)videoDidLoadStartWithIsNetwork:(BOOL)isNetwork type:(nonnull NSString *)type uri:(nonnull NSString *)uri\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoLoadStart event = {\n            .isNetwork = isNetwork,\n            .type = std::string([type UTF8String] ?: \"\"),\n            .uri = std::string([uri UTF8String] ?: \"\")\n        };\n        emitter->onVideoLoadStart(event);\n    }\n}\n\n- (void)videoDidLoadWithData:(nonnull GraniteVideoLoadData *)data\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoLoad event = {\n            .currentTime = data.currentTime,\n            .duration = data.duration,\n            .naturalSize = {\n                .width = data.naturalWidth,\n                .height = data.naturalHeight,\n                .orientation = std::string([data.orientation UTF8String] ?: \"landscape\")\n            }\n        };\n        emitter->onVideoLoad(event);\n    }\n}\n\n- (void)videoDidFailWithError:(nonnull GraniteVideoErrorData *)error\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoError event = {\n            .error = {\n                .code = (int)error.code,\n                .domain = std::string([error.domain UTF8String] ?: \"\"),\n                .localizedDescription = std::string([error.localizedDescription_ UTF8String] ?: \"\"),\n                .localizedFailureReason = std::string([error.localizedFailureReason_ UTF8String] ?: \"\"),\n                .localizedRecoverySuggestion = std::string([error.localizedRecoverySuggestion_ UTF8String] ?: \"\"),\n                .errorString = std::string([error.localizedDescription_ UTF8String] ?: \"\")\n            }\n        };\n        emitter->onVideoError(event);\n    }\n}\n\n- (void)videoDidUpdateProgressWithData:(nonnull GraniteVideoProgressData *)data\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoProgress event = {\n            .currentTime = data.currentTime,\n            .playableDuration = data.playableDuration,\n            .seekableDuration = data.seekableDuration\n        };\n        emitter->onVideoProgress(event);\n    }\n}\n\n- (void)videoDidSeekWithCurrentTime:(double)currentTime seekTime:(double)seekTime\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoSeek event = {\n            .currentTime = currentTime,\n            .seekTime = seekTime\n        };\n        emitter->onVideoSeek(event);\n    }\n}\n\n- (void)videoDidEnd\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        emitter->onVideoEnd({});\n    }\n}\n\n- (void)videoBufferingStateChangedWithIsBuffering:(BOOL)isBuffering\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoBuffer event = {\n            .isBuffering = isBuffering\n        };\n        emitter->onVideoBuffer(event);\n    }\n}\n\n- (void)videoBandwidthDidUpdateWithBitrate:(double)bitrate width:(NSInteger)width height:(NSInteger)height\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoBandwidthUpdate event = {\n            .bitrate = bitrate,\n            .width = (int)width,\n            .height = (int)height\n        };\n        emitter->onVideoBandwidthUpdate(event);\n    }\n}\n\n- (void)videoPlaybackStateChangedWithIsPlaying:(BOOL)isPlaying isSeeking:(BOOL)isSeeking isLooping:(BOOL)isLooping\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoPlaybackStateChanged event = {\n            .isPlaying = isPlaying,\n            .isSeeking = isSeeking,\n            .isLooping = isLooping\n        };\n        emitter->onVideoPlaybackStateChanged(event);\n    }\n}\n\n- (void)videoPlaybackRateChangedWithRate:(float)rate\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoPlaybackRateChange event = {\n            .playbackRate = rate\n        };\n        emitter->onVideoPlaybackRateChange(event);\n    }\n}\n\n- (void)videoVolumeChangedWithVolume:(float)volume\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoVolumeChange event = {\n            .volume = volume\n        };\n        emitter->onVideoVolumeChange(event);\n    }\n}\n\n- (void)videoDidBecomeIdle\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        emitter->onVideoIdle({});\n    }\n}\n\n- (void)videoReadyForDisplay\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        emitter->onVideoReadyForDisplay({});\n    }\n}\n\n- (void)videoAudioBecomingNoisy\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        emitter->onVideoAudioBecomingNoisy({});\n    }\n}\n\n- (void)videoAudioFocusChangedWithHasAudioFocus:(BOOL)hasAudioFocus\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoAudioFocusChanged event = {\n            .hasAudioFocus = hasAudioFocus\n        };\n        emitter->onVideoAudioFocusChanged(event);\n    }\n}\n\n- (void)videoFullscreenPlayerWillPresent\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        emitter->onVideoFullscreenPlayerWillPresent({});\n    }\n}\n\n- (void)videoFullscreenPlayerDidPresent\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        emitter->onVideoFullscreenPlayerDidPresent({});\n    }\n}\n\n- (void)videoFullscreenPlayerWillDismiss\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        emitter->onVideoFullscreenPlayerWillDismiss({});\n    }\n}\n\n- (void)videoFullscreenPlayerDidDismiss\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        emitter->onVideoFullscreenPlayerDidDismiss({});\n    }\n}\n\n- (void)videoPictureInPictureStatusChangedWithIsActive:(BOOL)isActive\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoPictureInPictureStatusChanged event = {\n            .isActive = isActive\n        };\n        emitter->onVideoPictureInPictureStatusChanged(event);\n    }\n}\n\n- (void)videoRestoreUserInterfaceForPictureInPictureStop\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        emitter->onVideoRestoreUserInterfaceForPictureInPictureStop({});\n    }\n}\n\n- (void)videoControlsVisibilityChangedWithIsVisible:(BOOL)isVisible\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoControlsVisibilityChange event = {\n            .isVisible = isVisible\n        };\n        emitter->onVideoControlsVisibilityChange(event);\n    }\n}\n\n- (void)videoExternalPlaybackChangedWithIsActive:(BOOL)isActive\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoExternalPlaybackChange event = {\n            .isExternalPlaybackActive = isActive\n        };\n        emitter->onVideoExternalPlaybackChange(event);\n    }\n}\n\n- (void)videoAspectRatioChangedWithWidth:(double)width height:(double)height\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnVideoAspectRatio event = {\n            .width = width,\n            .height = height\n        };\n        emitter->onVideoAspectRatio(event);\n    }\n}\n\n- (void)videoTransferEndWithUri:(NSString *)uri bytesTransferred:(double)bytesTransferred\n{\n    if (_eventEmitter) {\n        auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);\n        facebook::react::GraniteVideoViewEventEmitter::OnTransferEnd event = {\n            .uri = std::string([uri UTF8String] ?: \"\"),\n            .bytesTransferred = bytesTransferred\n        };\n        emitter->onTransferEnd(event);\n    }\n}\n\n#pragma mark - Command Handler\n\n- (void)handleCommand:(NSString const *)commandName args:(NSArray const *)args\n{\n    RCTGraniteVideoViewHandleCommand(self, commandName, args);\n}\n\n#pragma mark - Cleanup\n\n- (void)prepareForRecycle\n{\n    [super prepareForRecycle];\n    [_provider unload];\n    _props = std::make_shared<const GraniteVideoViewProps>();\n}\n\n- (void)dealloc\n{\n    [_provider unload];\n    _provider = nil;\n}\n\n@end\n\nClass<RCTComponentViewProtocol> GraniteVideoViewCls(void)\n{\n    return GraniteVideoView.class;\n}\n"
  },
  {
    "path": "packages/video/ios/Providers/AVPlayerProvider.swift",
    "content": "import UIKit\nimport AVFoundation\nimport AVKit\nimport Combine\n\n// MARK: - Player Container View\n\nprivate class AVPlayerContainerView: UIView {\n    var playerLayer: AVPlayerLayer? {\n        didSet {\n            if let layer = playerLayer {\n                self.layer.addSublayer(layer)\n                layer.frame = self.bounds\n            }\n        }\n    }\n\n    override func layoutSubviews() {\n        super.layoutSubviews()\n        playerLayer?.frame = self.bounds\n    }\n}\n\n// MARK: - AVPlayerProvider\n\n@objc public class AVPlayerProvider: NSObject, GraniteVideoProvidable {\n\n    // MARK: - Properties\n\n    @objc public weak var delegate: GraniteVideoDelegate?\n\n    private var player: AVPlayer\n    private var playerLayer: AVPlayerLayer\n    private var playerView: AVPlayerContainerView?\n    private var playerItem: AVPlayerItem?\n    private var timeObserver: Any?\n    private var pipController: AVPictureInPictureController?\n\n    private var shouldRepeat: Bool = false\n    private var isMuted: Bool = false\n    private var playerVolume: Float = 1.0\n    private var playerRate: Float = 1.0\n    private var playInBackgroundEnabled: Bool = false\n    private var playWhenInactiveEnabled: Bool = false\n    private var isFullscreen: Bool = false\n    private var pipEnabled: Bool = false\n    private var preferredForwardBuffer: Double = 0\n    private var automaticallyWaits: Bool = true\n    private var allowsExternalPlaybackEnabled: Bool = true\n    private var preventsDisplaySleep: Bool = true\n    private var maxBitRateValue: Int = 0\n\n    private var currentUri: String?\n    private var hasLoadedData: Bool = false\n    private var isSeekingFlag: Bool = false\n\n    // Combine subscriptions\n    private var cancellables = Set<AnyCancellable>()\n    private var itemCancellables = Set<AnyCancellable>()\n\n    // MARK: - Required Protocol Properties\n\n    @objc public var currentTime: Double {\n        guard playerItem != nil else { return 0 }\n        return CMTimeGetSeconds(player.currentTime())\n    }\n\n    @objc public var duration: Double {\n        guard let item = playerItem else { return 0 }\n        let duration = item.duration\n        if !duration.isValid || duration.isIndefinite {\n            return 0\n        }\n        return CMTimeGetSeconds(duration)\n    }\n\n    @objc public var isPlaying: Bool {\n        return player.rate != 0 && player.error == nil\n    }\n\n    // MARK: - Initialization\n\n    @objc public override init() {\n        player = AVPlayer()\n        playerLayer = AVPlayerLayer(player: player)\n        playerLayer.videoGravity = .resizeAspect\n\n        super.init()\n\n        player.allowsExternalPlayback = true\n\n        setupPlayerObservers()\n        setupNotificationObservers()\n    }\n\n    deinit {\n        unload()\n        cancellables.removeAll()\n    }\n\n    // MARK: - Combine Observers Setup\n\n    private func setupPlayerObservers() {\n        // Player rate changes (play/pause state)\n        player.publisher(for: \\.rate)\n            .receive(on: DispatchQueue.main)\n            .sink { [weak self] rate in\n                guard let self = self else { return }\n                let isPlaying = rate != 0\n                self.delegate?.videoPlaybackStateChanged?(isPlaying: isPlaying, isSeeking: self.isSeekingFlag, isLooping: self.shouldRepeat)\n                self.delegate?.videoPlaybackRateChanged?(rate: rate)\n            }\n            .store(in: &cancellables)\n\n        // Player time control status (buffering state)\n        player.publisher(for: \\.timeControlStatus)\n            .receive(on: DispatchQueue.main)\n            .sink { [weak self] status in\n                let isBuffering = (status == .waitingToPlayAtSpecifiedRate)\n                self?.delegate?.videoBufferingStateChanged?(isBuffering: isBuffering)\n            }\n            .store(in: &cancellables)\n    }\n\n    private func setupNotificationObservers() {\n        // App lifecycle notifications\n        NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification)\n            .receive(on: DispatchQueue.main)\n            .sink { [weak self] _ in\n                self?.handleAppDidEnterBackground()\n            }\n            .store(in: &cancellables)\n\n        NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)\n            .receive(on: DispatchQueue.main)\n            .sink { [weak self] _ in\n                self?.handleAppWillEnterForeground()\n            }\n            .store(in: &cancellables)\n\n        NotificationCenter.default.publisher(for: AVAudioSession.interruptionNotification)\n            .receive(on: DispatchQueue.main)\n            .sink { [weak self] _ in\n                self?.handleAudioSessionInterruption()\n            }\n            .store(in: &cancellables)\n\n        NotificationCenter.default.publisher(for: AVAudioSession.routeChangeNotification)\n            .receive(on: DispatchQueue.main)\n            .sink { [weak self] notification in\n                self?.handleAudioRouteChange(notification)\n            }\n            .store(in: &cancellables)\n    }\n\n    private func setupPlayerItemObservers(for item: AVPlayerItem) {\n        // Clear previous item observers\n        itemCancellables.removeAll()\n\n        // Player item status\n        item.publisher(for: \\.status)\n            .receive(on: DispatchQueue.main)\n            .sink { [weak self] status in\n                self?.handlePlayerItemStatusChange(status)\n            }\n            .store(in: &itemCancellables)\n\n        // Playback end notification\n        NotificationCenter.default.publisher(for: .AVPlayerItemDidPlayToEndTime, object: item)\n            .receive(on: DispatchQueue.main)\n            .sink { [weak self] _ in\n                self?.handlePlayerItemDidPlayToEndTime()\n            }\n            .store(in: &itemCancellables)\n    }\n\n    // MARK: - GraniteVideoProvidable Required\n\n    @objc public func createPlayerView() -> UIView {\n        let view = AVPlayerContainerView()\n        view.backgroundColor = .black\n        view.playerLayer = playerLayer\n        view.autoresizingMask = [.flexibleWidth, .flexibleHeight]\n        playerView = view\n        return view\n    }\n\n    @objc public func loadSource(_ source: GraniteVideoSource) {\n        guard let uri = source.uri, !uri.isEmpty else { return }\n\n        // Cleanup previous item\n        unloadPlayerItem()\n\n        currentUri = uri\n        hasLoadedData = false\n\n        // Notify load start\n        let isNetwork = uri.hasPrefix(\"http://\") || uri.hasPrefix(\"https://\")\n        let type = source.type ?? \"\"\n        delegate?.videoDidLoadStart?(isNetwork: isNetwork, type: type, uri: uri)\n\n        // Create URL\n        let url: URL?\n        if isNetwork {\n            url = URL(string: uri)\n        } else {\n            url = URL(fileURLWithPath: uri)\n        }\n\n        guard let validUrl = url else {\n            let errorData = GraniteVideoErrorData()\n            errorData.code = -1\n            errorData.domain = \"GraniteVideo\"\n            errorData.localizedDescription_ = \"Invalid URL\"\n            delegate?.videoDidFail?(error: errorData)\n            return\n        }\n\n        // Create player item\n        let asset = AVURLAsset(url: validUrl)\n        let item = AVPlayerItem(asset: asset)\n        playerItem = item\n\n        // Configure buffer\n        if preferredForwardBuffer > 0 {\n            item.preferredForwardBufferDuration = preferredForwardBuffer\n        }\n\n        if maxBitRateValue > 0 {\n            item.preferredPeakBitRate = Double(maxBitRateValue)\n        }\n\n        // Setup Combine observers for this item\n        setupPlayerItemObservers(for: item)\n\n        // Replace current item\n        player.replaceCurrentItem(with: item)\n\n        // Set start time if specified\n        if source.startTime > 0 {\n            let seekTime = CMTime(seconds: source.startTime, preferredTimescale: CMTimeScale(NSEC_PER_SEC))\n            player.seek(to: seekTime)\n        }\n\n        // Add time observer for progress\n        let interval = CMTime(seconds: 0.25, preferredTimescale: CMTimeScale(NSEC_PER_SEC))\n        timeObserver = player.addPeriodicTimeObserver(forInterval: interval, queue: .main) { [weak self] _ in\n            self?.handleProgressUpdate()\n        }\n\n        // Apply settings\n        player.isMuted = isMuted\n        player.volume = playerVolume\n        player.automaticallyWaitsToMinimizeStalling = automaticallyWaits\n        player.allowsExternalPlayback = allowsExternalPlaybackEnabled\n\n        // Setup PiP if available and enabled\n        if pipEnabled {\n            setupPictureInPicture()\n        }\n    }\n\n    @objc public func unload() {\n        unloadPlayerItem()\n        currentUri = nil\n        hasLoadedData = false\n    }\n\n    @objc public func play() {\n        player.rate = playerRate\n    }\n\n    @objc public func pause() {\n        player.pause()\n    }\n\n    @objc public func seek(to time: Double, toleranceBefore: Double, toleranceAfter: Double) {\n        guard playerItem != nil else { return }\n\n        isSeekingFlag = true\n\n        let seekTime = CMTime(seconds: time, preferredTimescale: CMTimeScale(NSEC_PER_SEC))\n        let toleranceBeforeTime = CMTime(seconds: toleranceBefore, preferredTimescale: CMTimeScale(NSEC_PER_SEC))\n        let toleranceAfterTime = CMTime(seconds: toleranceAfter, preferredTimescale: CMTimeScale(NSEC_PER_SEC))\n\n        let currentTimeBeforeSeek = CMTimeGetSeconds(player.currentTime())\n\n        player.seek(to: seekTime, toleranceBefore: toleranceBeforeTime, toleranceAfter: toleranceAfterTime) { [weak self] finished in\n            DispatchQueue.main.async {\n                guard let self = self else { return }\n                self.isSeekingFlag = false\n                if finished {\n                    self.delegate?.videoDidSeek?(currentTime: currentTimeBeforeSeek, seekTime: time)\n                }\n            }\n        }\n    }\n\n    // MARK: - GraniteVideoProvidable Optional\n\n    @objc public func setVolume(_ volume: Float) {\n        playerVolume = volume\n        player.volume = volume\n    }\n\n    @objc public func setMuted(_ muted: Bool) {\n        isMuted = muted\n        player.isMuted = muted\n    }\n\n    @objc public func setRate(_ rate: Float) {\n        playerRate = rate\n        if player.rate != 0 {\n            player.rate = rate\n        }\n    }\n\n    @objc public func setRepeat(_ shouldRepeat: Bool) {\n        self.shouldRepeat = shouldRepeat\n    }\n\n    @objc public func setResizeMode(_ mode: GraniteVideoResizeMode) {\n        switch mode {\n        case .contain:\n            playerLayer.videoGravity = .resizeAspect\n        case .cover:\n            playerLayer.videoGravity = .resizeAspectFill\n        case .stretch:\n            playerLayer.videoGravity = .resize\n        case .none:\n            playerLayer.videoGravity = .resizeAspect\n        @unknown default:\n            playerLayer.videoGravity = .resizeAspect\n        }\n    }\n\n    @objc public func setPlayInBackground(_ enabled: Bool) {\n        playInBackgroundEnabled = enabled\n    }\n\n    @objc public func setPlayWhenInactive(_ enabled: Bool) {\n        playWhenInactiveEnabled = enabled\n    }\n\n    @objc public func setPictureInPictureEnabled(_ enabled: Bool) {\n        pipEnabled = enabled\n        if enabled && playerItem != nil {\n            setupPictureInPicture()\n        }\n    }\n\n    @objc public func enterPictureInPicture() {\n        if let pipController = pipController, pipController.isPictureInPicturePossible {\n            pipController.startPictureInPicture()\n        }\n    }\n\n    @objc public func exitPictureInPicture() {\n        if let pipController = pipController, pipController.isPictureInPictureActive {\n            pipController.stopPictureInPicture()\n        }\n    }\n\n    @objc public func setFullscreen(_ fullscreen: Bool, animated: Bool) {\n        isFullscreen = fullscreen\n    }\n\n    @objc public func setMaxBitRate(_ bitRate: Int) {\n        maxBitRateValue = bitRate\n        playerItem?.preferredPeakBitRate = Double(bitRate)\n    }\n\n    @objc public func setPreferredForwardBufferDuration(_ duration: Double) {\n        preferredForwardBuffer = duration\n        playerItem?.preferredForwardBufferDuration = duration\n    }\n\n    @objc public func setAutomaticallyWaitsToMinimizeStalling(_ waits: Bool) {\n        automaticallyWaits = waits\n        player.automaticallyWaitsToMinimizeStalling = waits\n    }\n\n    @objc public func setAllowsExternalPlayback(_ allows: Bool) {\n        allowsExternalPlaybackEnabled = allows\n        player.allowsExternalPlayback = allows\n    }\n\n    @objc public func setPreventsDisplaySleepDuringVideoPlayback(_ prevents: Bool) {\n        preventsDisplaySleep = prevents\n        player.preventsDisplaySleepDuringVideoPlayback = prevents\n    }\n\n    @objc public func setControlsEnabled(_ enabled: Bool) {\n        // Native controls handled by AVPlayerViewController if needed\n    }\n\n    @objc public func onTransferEnd(uri: String, bytesTransferred: Int) {\n        delegate?.videoTransferEnd?(uri: uri, bytesTransferred: Double(bytesTransferred))\n    }\n\n    // MARK: - Private Methods\n\n    private func unloadPlayerItem() {\n        if let observer = timeObserver {\n            player.removeTimeObserver(observer)\n            timeObserver = nil\n        }\n\n        // Cancel all item-specific Combine subscriptions\n        itemCancellables.removeAll()\n        playerItem = nil\n\n        player.replaceCurrentItem(with: nil)\n        pipController = nil\n    }\n\n    private func setupPictureInPicture() {\n        if AVPictureInPictureController.isPictureInPictureSupported() {\n            pipController = AVPictureInPictureController(playerLayer: playerLayer)\n            pipController?.delegate = self\n        }\n    }\n\n    private func handleProgressUpdate() {\n        guard playerItem != nil, hasLoadedData else { return }\n\n        let currentTime = CMTimeGetSeconds(player.currentTime())\n        let duration = self.duration\n\n        var playableDuration: Double = 0\n        if let loadedRanges = playerItem?.loadedTimeRanges, let firstRange = loadedRanges.first {\n            let range = firstRange.timeRangeValue\n            let start = CMTimeGetSeconds(range.start)\n            let rangeDuration = CMTimeGetSeconds(range.duration)\n            playableDuration = start + rangeDuration\n        }\n\n        let progressData = GraniteVideoProgressData()\n        progressData.currentTime = currentTime\n        progressData.playableDuration = playableDuration\n        progressData.seekableDuration = duration\n\n        delegate?.videoDidUpdateProgress?(data: progressData)\n    }\n\n    // MARK: - Event Handlers\n\n    private func handlePlayerItemStatusChange(_ status: AVPlayerItem.Status) {\n        guard let item = playerItem else { return }\n\n        switch status {\n        case .readyToPlay:\n            if !hasLoadedData {\n                hasLoadedData = true\n\n                var naturalSize = CGSize.zero\n                if let tracks = item.asset.tracks(withMediaType: .video).first {\n                    naturalSize = tracks.naturalSize\n                    let transform = tracks.preferredTransform\n                    if transform.a == 0 && transform.d == 0 {\n                        naturalSize = CGSize(width: naturalSize.height, height: naturalSize.width)\n                    }\n                }\n\n                let loadData = GraniteVideoLoadData()\n                loadData.currentTime = CMTimeGetSeconds(player.currentTime())\n                loadData.duration = duration\n                loadData.naturalWidth = naturalSize.width\n                loadData.naturalHeight = naturalSize.height\n                loadData.orientation = naturalSize.width >= naturalSize.height ? \"landscape\" : \"portrait\"\n\n                delegate?.videoDidLoad?(data: loadData)\n                delegate?.videoReadyForDisplay?()\n            }\n\n        case .failed:\n            let nsError = item.error ?? NSError(domain: \"GraniteVideo\", code: -1, userInfo: [NSLocalizedDescriptionKey: \"Unknown error\"])\n            let errorData = GraniteVideoErrorData(error: nsError)\n            delegate?.videoDidFail?(error: errorData)\n\n        default:\n            break\n        }\n    }\n\n    private func handlePlayerItemDidPlayToEndTime() {\n        delegate?.videoDidEnd?()\n\n        if shouldRepeat {\n            player.seek(to: .zero)\n            player.play()\n        }\n    }\n\n    private func handleAppDidEnterBackground() {\n        if !playInBackgroundEnabled {\n            playerLayer.player = nil\n        }\n    }\n\n    private func handleAppWillEnterForeground() {\n        if playerLayer.player == nil {\n            playerLayer.player = player\n        }\n    }\n\n    private func handleAudioSessionInterruption() {\n        // Handle audio interruption\n    }\n\n    private func handleAudioRouteChange(_ notification: NotificationCenter.Publisher.Output) {\n        guard let userInfo = notification.userInfo,\n              let reasonValue = userInfo[AVAudioSessionRouteChangeReasonKey] as? UInt,\n              let reason = AVAudioSession.RouteChangeReason(rawValue: reasonValue) else {\n            return\n        }\n\n        if reason == .oldDeviceUnavailable {\n            delegate?.videoAudioBecomingNoisy?()\n            player.pause()\n        }\n    }\n}\n\n// MARK: - AVPictureInPictureControllerDelegate\n\nextension AVPlayerProvider: AVPictureInPictureControllerDelegate {\n    public func pictureInPictureControllerDidStartPictureInPicture(_ pictureInPictureController: AVPictureInPictureController) {\n        delegate?.videoPictureInPictureStatusChanged?(isActive: true)\n    }\n\n    public func pictureInPictureControllerDidStopPictureInPicture(_ pictureInPictureController: AVPictureInPictureController) {\n        delegate?.videoPictureInPictureStatusChanged?(isActive: false)\n    }\n\n    public func pictureInPictureController(_ pictureInPictureController: AVPictureInPictureController,\n                                           restoreUserInterfaceForPictureInPictureStopWithCompletionHandler completionHandler: @escaping (Bool) -> Void) {\n        delegate?.videoRestoreUserInterfaceForPictureInPictureStop?()\n        completionHandler(true)\n    }\n}\n"
  },
  {
    "path": "packages/video/package.json",
    "content": "{\n  \"name\": \"@granite-js/video\",\n  \"version\": \"1.0.23\",\n  \"description\": \"Pluggable video component for React Native with provider selection\",\n  \"type\": \"module\",\n  \"main\": \"./dist/module/index.js\",\n  \"types\": \"./dist/typescript/index.d.ts\",\n  \"react-native\": \"./src/index.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/typescript/index.d.ts\",\n      \"react-native\": \"./src/index.ts\",\n      \"default\": \"./dist/module/index.js\"\n    },\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"src\",\n    \"dist\",\n    \"android\",\n    \"ios\",\n    \"*.podspec\",\n    \"react-native.config.js\",\n    \"!example/**\",\n    \"!ios/build\",\n    \"!android/build\",\n    \"!android/gradle\",\n    \"!android/gradlew\",\n    \"!android/gradlew.bat\",\n    \"!android/local.properties\",\n    \"!**/__tests__\",\n    \"!**/__fixtures__\",\n    \"!**/__mocks__\",\n    \"!**/.*\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"example\": \"yarn workspace @granite-js/video-example\",\n    \"clean\": \"del-cli android/build example/android/build example/android/app/build example/ios/build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"eslint .\",\n    \"build\": \"bob build && tsc --project tsconfig.build.json\"\n  },\n  \"keywords\": [\n    \"react-native\",\n    \"ios\",\n    \"android\",\n    \"video\",\n    \"player\",\n    \"exoplayer\",\n    \"avplayer\",\n    \"vlc\",\n    \"streaming\",\n    \"hls\",\n    \"dash\",\n    \"drm\",\n    \"pluggable\",\n    \"provider\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/video\"\n  },\n  \"author\": \"Toss <platform@toss.im>\",\n  \"homepage\": \"https://github.com/toss/granite/tree/main/packages/video#readme\",\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@types/react\": \"catalog:react-native\",\n    \"del-cli\": \"^6.0.0\",\n    \"eslint\": \"^9.7.0\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"react-native-builder-bob\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\"\n  },\n  \"peerDependencies\": {\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"codegenConfig\": {\n    \"name\": \"GraniteVideoViewSpec\",\n    \"type\": \"all\",\n    \"jsSrcsDir\": \"src\",\n    \"android\": {\n      \"javaPackageName\": \"run.granite.video\"\n    },\n    \"ios\": {\n      \"componentProvider\": {\n        \"GraniteVideoView\": \"GraniteVideoView\"\n      }\n    }\n  },\n  \"sideEffects\": false,\n  \"react-native-builder-bob\": {\n    \"source\": \"src\",\n    \"output\": \"dist\",\n    \"targets\": [\n      [\n        \"module\",\n        {\n          \"esm\": true\n        }\n      ]\n    ]\n  }\n}\n"
  },
  {
    "path": "packages/video/src/GraniteVideo.tsx",
    "content": "import React, { forwardRef, useRef, useImperativeHandle, useCallback } from 'react';\nimport {\n  Platform,\n  StyleSheet,\n  View,\n  Image,\n  findNodeHandle,\n  NativeModules,\n  type StyleProp,\n  type ViewStyle,\n  type NativeSyntheticEvent,\n} from 'react-native';\nimport NativeGraniteVideoView, {\n  Commands,\n  type NativeProps,\n  OnVideoLoadStartEvent,\n  OnVideoLoadEvent,\n  OnVideoErrorEvent,\n  OnVideoProgressEvent,\n  OnVideoSeekEvent,\n  OnVideoBufferEvent,\n  OnVideoBandwidthUpdateEvent,\n  OnVideoPlaybackStateChangedEvent,\n  OnVideoPlaybackRateChangeEvent,\n  OnVideoVolumeChangeEvent,\n  OnVideoAudioFocusChangedEvent,\n  OnVideoPictureInPictureStatusChangedEvent,\n  OnVideoControlsVisibilityChangeEvent,\n  OnVideoExternalPlaybackChangeEvent,\n  OnVideoAspectRatioEvent,\n  TransferEndEvent,\n} from './GraniteVideoNativeComponent';\nimport type {\n  VideoRef,\n  VideoSource,\n  VideoProps,\n  OnLoadData,\n} from './types';\n\nconst { GraniteVideoModule } = NativeModules;\n\nfunction toNativeStringMapEntries(\n  value?: Record<string, string>\n): ReadonlyArray<{ name: string; value: string }> | undefined {\n  if (value === undefined) {\n    return undefined;\n  }\n\n  return Object.entries(value).map(([name, value]) => ({\n    name,\n    value,\n  }));\n}\n\nfunction normalizeDrm(drm: VideoProps['drm']): NativeProps['drm'] | undefined {\n  if (!drm) {\n    return undefined;\n  }\n\n  return {\n    ...drm,\n    headers: toNativeStringMapEntries(drm.headers),\n  };\n}\n\n// For Fabric (New Architecture), the component is always available through codegenNativeComponent\n// We don't need to check UIManager.getViewManagerConfig which is Old Architecture only\n\n// Convert CMCD config to native format.\nfunction normalizeCmcd(cmcd: VideoSource['cmcd']) {\n  if (cmcd === undefined || cmcd === null) {\n    return undefined;\n  }\n  if (typeof cmcd === 'boolean') {\n    if (!cmcd) {\n      return undefined;\n    }\n    // When true, use MODE_QUERY_PARAMETER as default\n    return { mode: 1 };\n  }\n\n  return {\n    mode: cmcd.mode ?? 1,\n    request: toNativeStringMapEntries(cmcd.request),\n    session: toNativeStringMapEntries(cmcd.session),\n    object: toNativeStringMapEntries(cmcd.object),\n    status: toNativeStringMapEntries(cmcd.status),\n  };\n}\n\nfunction normalizeAd(ad: VideoSource['ad']): NonNullable<NativeProps['source']>['ad'] | undefined {\n  if (!ad) {\n    return undefined;\n  }\n\n  return {\n    ...ad,\n    adTagParameters: ad.type === 'ssai' ? toNativeStringMapEntries(ad.adTagParameters) : undefined,\n  };\n}\n\nfunction normalizeSource(source: VideoSource | number): NativeProps['source'] | undefined {\n  if (typeof source === 'number') {\n    // require() - not yet supported in native\n    return undefined;\n  }\n\n  const drm = normalizeDrm(source.drm);\n  const cmcd = normalizeCmcd(source.cmcd);\n  const ad = normalizeAd(source.ad);\n\n  return {\n    ...source,\n    headers: toNativeStringMapEntries(source.headers),\n    drm,\n    cmcd,\n    ad,\n  };\n}\n\nfunction normalizeSelectedTrack(\n  track?: VideoProps['selectedAudioTrack']\n): NativeProps['selectedAudioTrack'] | undefined {\n  if (!track) {\n    return undefined;\n  }\n  return {\n    type: track.type,\n    value: track.value?.toString(),\n  };\n}\n\nfunction normalizeSelectedVideoTrack(\n  track?: VideoProps['selectedVideoTrack']\n): NativeProps['selectedVideoTrack'] | undefined {\n  if (!track) {\n    return undefined;\n  }\n  return {\n    type: track.type,\n    value: track.value,\n  };\n}\n\nfunction getPosterUri(poster?: VideoProps['poster']): string | undefined {\n  if (!poster) {\n    return undefined;\n  }\n  if (typeof poster === 'string') {\n    return poster;\n  }\n  if (typeof poster === 'object' && 'uri' in poster && poster.uri) {\n    return poster.uri;\n  }\n  const resolved = Image.resolveAssetSource(poster as any);\n  return resolved?.uri;\n}\n\nconst VideoBase = forwardRef<VideoRef, VideoProps>((props, ref) => {\n  const {\n    // Test ID\n    testID,\n    // Style\n    style,\n    // Progress\n    progressUpdateInterval,\n    // Source\n    source,\n    // Poster\n    poster,\n    posterResizeMode = 'contain',\n    // Playback Control\n    paused = false,\n    muted = false,\n    volume = 1.0,\n    rate = 1.0,\n    repeat = false,\n    playInBackground = false,\n    playWhenInactive = false,\n    automaticallyWaitsToMinimizeStalling = true,\n    shutterColor,\n    // Display\n    resizeMode = 'contain',\n    viewType = 'surface',\n    useTextureView = false,\n    useSecureView = false,\n    // Buffering\n    bufferConfig,\n    minLoadRetryCount = 3,\n    maxBitRate,\n    preferredForwardBufferDuration,\n    // Track Selection\n    selectedAudioTrack,\n    selectedTextTrack,\n    selectedVideoTrack,\n    textTracks,\n    // DRM\n    drm,\n    localSourceEncryptionKeyScheme,\n    // Ads\n    adTagUrl,\n    adLanguage,\n    // Controls\n    controls = false,\n    showNotificationControls = false,\n    disableFocus = false,\n    disableDisconnectError = false,\n    focusable = true,\n    hideShutterView = false,\n    preventsDisplaySleepDuringVideoPlayback = true,\n    // Fullscreen\n    fullscreen = false,\n    fullscreenAutorotate = true,\n    fullscreenOrientation = 'all',\n    // Picture in Picture\n    pictureInPicture = false,\n    // Content\n    contentStartTime,\n    allowsExternalPlayback = true,\n    audioOutput = 'speaker',\n    ignoreSilentSwitch = 'inherit',\n    mixWithOthers = 'inherit',\n    // Debug\n    debug,\n    // Events\n    onLoadStart,\n    onLoad,\n    onError,\n    onProgress,\n    onSeek,\n    onEnd,\n    onBuffer,\n    onBandwidthUpdate,\n    onPlaybackStateChanged,\n    onPlaybackRateChange,\n    onVolumeChange,\n    onIdle,\n    onReadyForDisplay,\n    onAudioFocusChanged,\n    onAudioBecomingNoisy,\n    onFullscreenPlayerWillPresent,\n    onFullscreenPlayerDidPresent,\n    onFullscreenPlayerWillDismiss,\n    onFullscreenPlayerDidDismiss,\n    onPictureInPictureStatusChanged,\n    onRestoreUserInterfaceForPictureInPictureStop,\n    onControlsVisibilityChange,\n    onExternalPlaybackChange,\n    onAspectRatio,\n    onTransferEnd,\n  } = props;\n\n  const nativeRef = useRef<React.ElementRef<typeof NativeGraniteVideoView>>(null);\n\n  // === Imperative Handle ===\n  useImperativeHandle(ref, () => ({\n    seek: (time: number, tolerance?: number) => {\n      if (nativeRef.current) {\n        Commands.seek(nativeRef.current, time, tolerance ?? 0);\n      }\n    },\n    pause: () => {\n      if (nativeRef.current) {\n        Commands.pause(nativeRef.current);\n      }\n    },\n    resume: () => {\n      if (nativeRef.current) {\n        Commands.resume(nativeRef.current);\n      }\n    },\n    setVolume: (vol: number) => {\n      if (nativeRef.current) {\n        Commands.adjustVolume(nativeRef.current, vol);\n      }\n    },\n    setFullScreen: (fs: boolean) => {\n      if (nativeRef.current) {\n        Commands.setFullScreen(nativeRef.current, fs);\n      }\n    },\n    presentFullscreenPlayer: () => {\n      if (nativeRef.current) {\n        Commands.setFullScreen(nativeRef.current, true);\n      }\n    },\n    dismissFullscreenPlayer: () => {\n      if (nativeRef.current) {\n        Commands.setFullScreen(nativeRef.current, false);\n      }\n    },\n    enterPictureInPicture: () => {\n      if (nativeRef.current) {\n        Commands.enterPictureInPicture(nativeRef.current);\n      }\n    },\n    exitPictureInPicture: () => {\n      if (nativeRef.current) {\n        Commands.exitPictureInPicture(nativeRef.current);\n      }\n    },\n    setSource: (newSource: VideoSource) => {\n      if (nativeRef.current && newSource.uri) {\n        Commands.loadSource(nativeRef.current, newSource.uri);\n      }\n    },\n    getCurrentPosition: async () => {\n      const handle = findNodeHandle(nativeRef.current);\n      if (handle && GraniteVideoModule?.getCurrentPosition) {\n        return GraniteVideoModule.getCurrentPosition(handle);\n      }\n      return 0;\n    },\n    save: async (options?: { type?: string }) => {\n      const handle = findNodeHandle(nativeRef.current);\n      if (handle && GraniteVideoModule?.save) {\n        return GraniteVideoModule.save(handle, options ?? {});\n      }\n      return { uri: '' };\n    },\n    restoreUserInterfaceForPictureInPictureStopCompleted: () => {\n      // iOS specific - handled internally\n    },\n  }));\n\n  // === Event Handlers ===\n  const handleLoadStart = useCallback(\n    (event: NativeSyntheticEvent<OnVideoLoadStartEvent>) => {\n      onLoadStart?.(event.nativeEvent);\n    },\n    [onLoadStart]\n  );\n\n  const handleLoad = useCallback(\n    (event: NativeSyntheticEvent<OnVideoLoadEvent>) => {\n      const nativeEvent = event.nativeEvent;\n      const loadData = {\n        ...nativeEvent,\n        naturalSize: {\n          ...nativeEvent.naturalSize,\n          orientation: nativeEvent.naturalSize.orientation as OnLoadData['naturalSize']['orientation'],\n        },\n      } as OnLoadData;\n      onLoad?.(loadData);\n    },\n    [onLoad]\n  );\n\n  const handleError = useCallback(\n    (event: NativeSyntheticEvent<OnVideoErrorEvent>) => {\n      onError?.(event.nativeEvent);\n    },\n    [onError]\n  );\n\n  const handleProgress = useCallback(\n    (event: NativeSyntheticEvent<OnVideoProgressEvent>) => {\n      onProgress?.(event.nativeEvent);\n    },\n    [onProgress]\n  );\n\n  const handleSeek = useCallback(\n    (event: NativeSyntheticEvent<OnVideoSeekEvent>) => {\n      onSeek?.(event.nativeEvent);\n    },\n    [onSeek]\n  );\n\n  const handleEnd = useCallback(() => {\n    onEnd?.();\n  }, [onEnd]);\n\n  const handleBuffer = useCallback(\n    (event: NativeSyntheticEvent<OnVideoBufferEvent>) => {\n      onBuffer?.(event.nativeEvent);\n    },\n    [onBuffer]\n  );\n\n  const handleBandwidthUpdate = useCallback(\n    (event: NativeSyntheticEvent<OnVideoBandwidthUpdateEvent>) => {\n      onBandwidthUpdate?.(event.nativeEvent);\n    },\n    [onBandwidthUpdate]\n  );\n\n  const handlePlaybackStateChanged = useCallback(\n    (event: NativeSyntheticEvent<OnVideoPlaybackStateChangedEvent>) => {\n      onPlaybackStateChanged?.(event.nativeEvent);\n    },\n    [onPlaybackStateChanged]\n  );\n\n  const handlePlaybackRateChange = useCallback(\n    (event: NativeSyntheticEvent<OnVideoPlaybackRateChangeEvent>) => {\n      onPlaybackRateChange?.(event.nativeEvent);\n    },\n    [onPlaybackRateChange]\n  );\n\n  const handleVolumeChange = useCallback(\n    (event: NativeSyntheticEvent<OnVideoVolumeChangeEvent>) => {\n      onVolumeChange?.(event.nativeEvent);\n    },\n    [onVolumeChange]\n  );\n\n  const handleIdle = useCallback(() => {\n    onIdle?.();\n  }, [onIdle]);\n\n  const handleReadyForDisplay = useCallback(() => {\n    onReadyForDisplay?.();\n  }, [onReadyForDisplay]);\n\n  const handleAudioFocusChanged = useCallback(\n    (event: NativeSyntheticEvent<OnVideoAudioFocusChangedEvent>) => {\n      onAudioFocusChanged?.(event.nativeEvent);\n    },\n    [onAudioFocusChanged]\n  );\n\n  const handleAudioBecomingNoisy = useCallback(() => {\n    onAudioBecomingNoisy?.();\n  }, [onAudioBecomingNoisy]);\n\n  const handleFullscreenPlayerWillPresent = useCallback(() => {\n    onFullscreenPlayerWillPresent?.();\n  }, [onFullscreenPlayerWillPresent]);\n\n  const handleFullscreenPlayerDidPresent = useCallback(() => {\n    onFullscreenPlayerDidPresent?.();\n  }, [onFullscreenPlayerDidPresent]);\n\n  const handleFullscreenPlayerWillDismiss = useCallback(() => {\n    onFullscreenPlayerWillDismiss?.();\n  }, [onFullscreenPlayerWillDismiss]);\n\n  const handleFullscreenPlayerDidDismiss = useCallback(() => {\n    onFullscreenPlayerDidDismiss?.();\n  }, [onFullscreenPlayerDidDismiss]);\n\n  const handlePictureInPictureStatusChanged = useCallback(\n    (event: NativeSyntheticEvent<OnVideoPictureInPictureStatusChangedEvent>) => {\n      onPictureInPictureStatusChanged?.(event.nativeEvent);\n    },\n    [onPictureInPictureStatusChanged]\n  );\n\n  const handleRestoreUserInterfaceForPictureInPictureStop = useCallback(() => {\n    onRestoreUserInterfaceForPictureInPictureStop?.();\n  }, [onRestoreUserInterfaceForPictureInPictureStop]);\n\n  const handleControlsVisibilityChange = useCallback(\n    (event: NativeSyntheticEvent<OnVideoControlsVisibilityChangeEvent>) => {\n      onControlsVisibilityChange?.(event.nativeEvent);\n    },\n    [onControlsVisibilityChange]\n  );\n\n  const handleExternalPlaybackChange = useCallback(\n    (event: NativeSyntheticEvent<OnVideoExternalPlaybackChangeEvent>) => {\n      onExternalPlaybackChange?.(event.nativeEvent);\n    },\n    [onExternalPlaybackChange]\n  );\n\n  const handleAspectRatio = useCallback(\n    (event: NativeSyntheticEvent<OnVideoAspectRatioEvent>) => {\n      onAspectRatio?.(event.nativeEvent);\n    },\n    [onAspectRatio]\n  );\n\n  const handleTransferEnd = useCallback(\n    (event: NativeSyntheticEvent<TransferEndEvent>) => {\n      onTransferEnd?.(event.nativeEvent);\n    },\n    [onTransferEnd]\n  );\n\n  // === Render ===\n  const containerStyle: StyleProp<ViewStyle> = [styles.container, style];\n\n  return (\n    <View style={containerStyle} testID={testID}>\n      <NativeGraniteVideoView\n        ref={nativeRef}\n        style={styles.video}\n        progressUpdateInterval={progressUpdateInterval}\n        source={normalizeSource(source)}\n        poster={getPosterUri(poster)}\n        posterResizeMode={posterResizeMode}\n        paused={paused}\n        muted={muted}\n        volume={volume}\n        rate={rate}\n        repeat={repeat}\n        playInBackground={playInBackground}\n        playWhenInactive={playWhenInactive}\n        automaticallyWaitsToMinimizeStalling={automaticallyWaitsToMinimizeStalling}\n        shutterColor={shutterColor}\n        resizeMode={resizeMode}\n        viewType={viewType}\n        useTextureView={useTextureView}\n        useSecureView={useSecureView}\n        bufferConfig={bufferConfig}\n        minLoadRetryCount={minLoadRetryCount}\n        maxBitRate={maxBitRate}\n        preferredForwardBufferDuration={preferredForwardBufferDuration}\n        selectedAudioTrack={normalizeSelectedTrack(selectedAudioTrack)}\n        selectedTextTrack={normalizeSelectedTrack(selectedTextTrack)}\n        selectedVideoTrack={normalizeSelectedVideoTrack(selectedVideoTrack)}\n        textTracks={textTracks}\n        drm={normalizeDrm(drm)}\n        localSourceEncryptionKeyScheme={localSourceEncryptionKeyScheme}\n        adTagUrl={adTagUrl}\n        adLanguage={adLanguage}\n        controls={controls}\n        showNotificationControls={showNotificationControls}\n        disableFocus={disableFocus}\n        disableDisconnectError={disableDisconnectError}\n        focusable={focusable}\n        hideShutterView={hideShutterView}\n        preventsDisplaySleepDuringVideoPlayback={preventsDisplaySleepDuringVideoPlayback}\n        fullscreen={fullscreen}\n        fullscreenAutorotate={fullscreenAutorotate}\n        fullscreenOrientation={fullscreenOrientation}\n        pictureInPicture={pictureInPicture}\n        contentStartTime={contentStartTime}\n        allowsExternalPlayback={allowsExternalPlayback}\n        audioOutput={audioOutput}\n        ignoreSilentSwitch={ignoreSilentSwitch}\n        mixWithOthers={mixWithOthers}\n        enableDebug={debug?.enable}\n        enableDebugThread={debug?.thread}\n        onVideoLoadStart={handleLoadStart}\n        onVideoLoad={handleLoad}\n        onVideoError={handleError}\n        onVideoProgress={handleProgress}\n        onVideoSeek={handleSeek}\n        onVideoEnd={handleEnd}\n        onVideoBuffer={handleBuffer}\n        onVideoBandwidthUpdate={handleBandwidthUpdate}\n        onVideoPlaybackStateChanged={handlePlaybackStateChanged}\n        onVideoPlaybackRateChange={handlePlaybackRateChange}\n        onVideoVolumeChange={handleVolumeChange}\n        onVideoIdle={handleIdle}\n        onVideoReadyForDisplay={handleReadyForDisplay}\n        onVideoAudioFocusChanged={handleAudioFocusChanged}\n        onVideoAudioBecomingNoisy={handleAudioBecomingNoisy}\n        onVideoFullscreenPlayerWillPresent={handleFullscreenPlayerWillPresent}\n        onVideoFullscreenPlayerDidPresent={handleFullscreenPlayerDidPresent}\n        onVideoFullscreenPlayerWillDismiss={handleFullscreenPlayerWillDismiss}\n        onVideoFullscreenPlayerDidDismiss={handleFullscreenPlayerDidDismiss}\n        onVideoPictureInPictureStatusChanged={handlePictureInPictureStatusChanged}\n        onVideoRestoreUserInterfaceForPictureInPictureStop={handleRestoreUserInterfaceForPictureInPictureStop}\n        onVideoControlsVisibilityChange={handleControlsVisibilityChange}\n        onVideoExternalPlaybackChange={handleExternalPlaybackChange}\n        onVideoAspectRatio={handleAspectRatio}\n        onTransferEnd={handleTransferEnd}\n      />\n    </View>\n  );\n});\n\nVideoBase.displayName = 'Video';\n\n// Type for GraniteVideo with static properties\ntype VideoComponent = typeof VideoBase & {\n  isAvailable: boolean;\n};\n\n// Static property to indicate availability\n// For Fabric (New Architecture), the component is always available\n(VideoBase as VideoComponent).isAvailable = true;\n\nexport const Video = VideoBase as VideoComponent;\n\nconst styles = StyleSheet.create({\n  container: {\n    overflow: 'hidden',\n  },\n  video: {\n    ...StyleSheet.absoluteFillObject,\n  },\n});\n\n// === Static Methods ===\nexport async function clearCache(): Promise<void> {\n  if (GraniteVideoModule?.clearCache) {\n    return GraniteVideoModule.clearCache();\n  }\n}\n\nexport async function getWidevineLevel(): Promise<number> {\n  if (Platform.OS === 'android' && GraniteVideoModule?.getWidevineLevel) {\n    return GraniteVideoModule.getWidevineLevel();\n  }\n  return 0;\n}\n\nexport async function isCodecSupported(mimeType: string, width: number, height: number): Promise<boolean> {\n  if (GraniteVideoModule?.isCodecSupported) {\n    return GraniteVideoModule.isCodecSupported(mimeType, width, height);\n  }\n  return false;\n}\n\nexport async function isHEVCSupported(): Promise<boolean> {\n  if (GraniteVideoModule?.isHEVCSupported) {\n    return GraniteVideoModule.isHEVCSupported();\n  }\n  return false;\n}\n"
  },
  {
    "path": "packages/video/src/GraniteVideoNativeComponent.ts",
    "content": "import { type ViewProps, type HostComponent, codegenNativeCommands, codegenNativeComponent } from 'react-native';\nimport {\n  type Int32,\n  type Float,\n  type Double,\n  type DirectEventHandler,\n  type WithDefault,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\n// ============================================================\n// Native Props Interface\n// ============================================================\n\n// Native video metadata\ninterface NativeVideoMetadata {\n  title?: string;\n  subtitle?: string;\n  description?: string;\n  artist?: string;\n  imageUri?: string;\n}\n\ninterface NativeStringMapEntry {\n  name: string;\n  value: string;\n}\n\n// Native DRM config (source-embedded DRM)\ninterface NativeSourceDrmConfig {\n  type?: string;\n  licenseServer?: string;\n  headers?: ReadonlyArray<Readonly<NativeStringMapEntry>>;\n  contentId?: string;\n  certificateUrl?: string;\n  base64Certificate?: boolean;\n  multiDrm?: boolean;\n  localSourceEncryptionKeyScheme?: string; // iOS-Only offline DRM key scheme\n}\n\n// Native CMCD config\ninterface NativeCmcdConfiguration {\n  mode?: Int32;\n  request?: ReadonlyArray<Readonly<NativeStringMapEntry>>;\n  session?: ReadonlyArray<Readonly<NativeStringMapEntry>>;\n  object?: ReadonlyArray<Readonly<NativeStringMapEntry>>;\n  status?: ReadonlyArray<Readonly<NativeStringMapEntry>>;\n}\n\n// Native text track\ninterface NativeTextTrack {\n  title: string;\n  language: string;\n  type: string;\n  uri: string;\n}\n\n// Native ad config\ninterface NativeAdsConfig {\n  type?: string;\n  streamType?: string;\n  adTagUrl?: string;\n  adLanguage?: string;\n  contentSourceId?: string;\n  videoId?: string;\n  assetKey?: string;\n  format?: string;\n  adTagParameters?: ReadonlyArray<Readonly<NativeStringMapEntry>>;\n  fallbackUri?: string;\n}\n\n// Native live buffer config\ninterface NativeBufferConfigLive {\n  maxPlaybackSpeed?: Float;\n  minPlaybackSpeed?: Float;\n  maxOffsetMs?: Int32;\n  minOffsetMs?: Int32;\n  targetOffsetMs?: Int32;\n}\n\n// Native source-embedded buffer config\ninterface NativeSourceBufferConfig {\n  minBufferMs?: Int32;\n  maxBufferMs?: Int32;\n  bufferForPlaybackMs?: Int32;\n  bufferForPlaybackAfterRebufferMs?: Int32;\n  backBufferDurationMs?: Int32;\n  cacheSizeMB?: Int32;\n  live?: NativeBufferConfigLive;\n}\n\ninterface NativeVideoSource {\n  uri?: string;\n  type?: string;\n  headers?: ReadonlyArray<Readonly<NativeStringMapEntry>>;\n  startTime?: Double;\n  endTime?: Double;\n  isNetwork?: boolean;\n  isAsset?: boolean;\n  isLocalAssetFile?: boolean;\n  shouldCache?: boolean;\n  mainVer?: Int32;\n  patchVer?: Int32;\n  contentStartTime?: Double;\n  metadata?: NativeVideoMetadata;\n  drm?: NativeSourceDrmConfig;\n  cmcd?: NativeCmcdConfiguration;\n  textTracksAllowChunklessPreparation?: boolean;\n  textTracks?: ReadonlyArray<Readonly<NativeTextTrack>>;\n  ad?: NativeAdsConfig;\n  minLoadRetryCount?: Int32;\n  bufferConfig?: NativeSourceBufferConfig;\n}\n\ninterface NativeBufferConfig {\n  minBufferMs?: Int32;\n  maxBufferMs?: Int32;\n  bufferForPlaybackMs?: Int32;\n  bufferForPlaybackAfterRebufferMs?: Int32;\n  backBufferDurationMs?: Int32;\n  cacheSizeMB?: Int32;\n  live?: NativeBufferConfigLive;\n}\n\ninterface NativeSelectedTrack {\n  type?: string;\n  value?: string;\n}\n\ninterface NativeSelectedVideoTrack {\n  type?: string;\n  value?: Int32;\n}\n\ninterface NativeDrmConfig {\n  type?: string;\n  licenseServer?: string;\n  headers?: ReadonlyArray<Readonly<NativeStringMapEntry>>;\n  contentId?: string;\n  certificateUrl?: string;\n  base64Certificate?: boolean;\n  multiDrm?: boolean;\n  localSourceEncryptionKeyScheme?: string;\n}\n\nexport type OnVideoLoadStartEvent = Readonly<{\n  isNetwork: boolean;\n  type: string;\n  uri: string;\n}>;\n\nexport type OnVideoLoadEvent = Readonly<{\n  currentTime: Double;\n  duration: Double;\n  naturalSize: {\n    width: Double;\n    height: Double;\n    orientation: string;\n  };\n}>;\n\nexport type OnVideoErrorEvent = Readonly<{\n  error: {\n    code: Int32;\n    domain: string;\n    localizedDescription: string;\n    localizedFailureReason: string;\n    localizedRecoverySuggestion: string;\n    errorString: string;\n  };\n}>;\n\nexport type OnVideoProgressEvent = Readonly<{\n  currentTime: Double;\n  playableDuration: Double;\n  seekableDuration: Double;\n}>;\n\nexport type OnVideoSeekEvent = Readonly<{\n  currentTime: Double;\n  seekTime: Double;\n}>;\n\nexport type OnVideoBufferEvent = Readonly<{\n  isBuffering: boolean;\n}>;\n\nexport type OnVideoBandwidthUpdateEvent = Readonly<{\n  bitrate: Double;\n  width: Int32;\n  height: Int32;\n}>;\n\nexport type OnVideoPlaybackStateChangedEvent = Readonly<{\n  isPlaying: boolean;\n  isSeeking: boolean;\n  isLooping: boolean;\n}>;\n\nexport type OnVideoPlaybackRateChangeEvent = Readonly<{\n  playbackRate: Float;\n}>;\n\nexport type OnVideoVolumeChangeEvent = Readonly<{\n  volume: Float;\n}>;\n\nexport type OnVideoAudioFocusChangedEvent = Readonly<{\n  hasAudioFocus: boolean;\n}>;\n\nexport type OnVideoPictureInPictureStatusChangedEvent = Readonly<{\n  isActive: boolean;\n}>;\n\nexport type OnVideoControlsVisibilityChangeEvent = Readonly<{\n  isVisible: boolean;\n}>;\n\nexport type OnVideoExternalPlaybackChangeEvent = Readonly<{\n  isExternalPlaybackActive: boolean;\n}>;\n\nexport type OnVideoAspectRatioEvent = Readonly<{\n  width: Double;\n  height: Double;\n}>;\n\nexport type TransferEndEvent = Readonly<{\n  uri: string;\n  bytesTransferred: Double;\n}>;\n\nexport interface NativeProps extends ViewProps {\n  // Progress\n  progressUpdateInterval?: Double;\n\n  // Source\n  source?: NativeVideoSource;\n\n  // Poster\n  poster?: string;\n  posterResizeMode?: WithDefault<string, 'contain'>;\n\n  // Playback Control\n  paused?: boolean;\n  muted?: boolean;\n  volume?: Float;\n  rate?: Float;\n  repeat?: boolean;\n  disableAudioFocus?: boolean;\n  playInBackground?: boolean;\n  playWhenInactive?: boolean;\n  automaticallyWaitsToMinimizeStalling?: boolean;\n  shutterColor?: string;\n\n  // Display\n  resizeMode?: WithDefault<string, 'contain'>;\n  viewType?: WithDefault<string, 'surface'>;\n  useTextureView?: boolean;\n  useSecureView?: boolean;\n\n  // Buffering\n  bufferConfig?: NativeBufferConfig;\n  minLoadRetryCount?: Int32;\n  maxBitRate?: Int32;\n  preferredForwardBufferDuration?: Double;\n\n  // Track Selection\n  selectedAudioTrack?: NativeSelectedTrack;\n  selectedTextTrack?: NativeSelectedTrack;\n  selectedVideoTrack?: NativeSelectedVideoTrack;\n  textTracks?: ReadonlyArray<Readonly<NativeTextTrack>>;\n\n  // DRM\n  drm?: NativeDrmConfig;\n  localSourceEncryptionKeyScheme?: string;\n\n  // Ads\n  adTagUrl?: string;\n  adLanguage?: string;\n\n  // Controls\n  controls?: boolean;\n  showNotificationControls?: boolean;\n  disableFocus?: boolean;\n  disableDisconnectError?: boolean;\n  focusable?: boolean;\n  hideShutterView?: boolean;\n  preventsDisplaySleepDuringVideoPlayback?: boolean;\n\n  // Fullscreen\n  fullscreen?: boolean;\n  fullscreenAutorotate?: boolean;\n  fullscreenOrientation?: WithDefault<string, 'all'>;\n\n  // Picture in Picture\n  pictureInPicture?: boolean;\n\n  // Content\n  contentStartTime?: Double;\n  allowsExternalPlayback?: boolean;\n  audioOutput?: WithDefault<string, 'speaker'>;\n  ignoreSilentSwitch?: WithDefault<string, 'inherit'>;\n  mixWithOthers?: WithDefault<string, 'inherit'>;\n\n  // Debug\n  enableDebug?: boolean;\n  enableDebugThread?: boolean;\n\n  // === Events ===\n  onVideoLoadStart?: DirectEventHandler<OnVideoLoadStartEvent>;\n  onVideoLoad?: DirectEventHandler<OnVideoLoadEvent>;\n  onVideoError?: DirectEventHandler<OnVideoErrorEvent>;\n  onVideoProgress?: DirectEventHandler<OnVideoProgressEvent>;\n  onVideoSeek?: DirectEventHandler<OnVideoSeekEvent>;\n  onVideoEnd?: DirectEventHandler<null>;\n  onVideoBuffer?: DirectEventHandler<OnVideoBufferEvent>;\n  onVideoBandwidthUpdate?: DirectEventHandler<OnVideoBandwidthUpdateEvent>;\n  onVideoPlaybackStateChanged?: DirectEventHandler<OnVideoPlaybackStateChangedEvent>;\n  onVideoPlaybackRateChange?: DirectEventHandler<OnVideoPlaybackRateChangeEvent>;\n  onVideoVolumeChange?: DirectEventHandler<OnVideoVolumeChangeEvent>;\n  onVideoIdle?: DirectEventHandler<null>;\n  onVideoReadyForDisplay?: DirectEventHandler<null>;\n  onVideoAudioFocusChanged?: DirectEventHandler<OnVideoAudioFocusChangedEvent>;\n  onVideoAudioBecomingNoisy?: DirectEventHandler<null>;\n  onVideoFullscreenPlayerWillPresent?: DirectEventHandler<null>;\n  onVideoFullscreenPlayerDidPresent?: DirectEventHandler<null>;\n  onVideoFullscreenPlayerWillDismiss?: DirectEventHandler<null>;\n  onVideoFullscreenPlayerDidDismiss?: DirectEventHandler<null>;\n  onVideoPictureInPictureStatusChanged?: DirectEventHandler<OnVideoPictureInPictureStatusChangedEvent>;\n  onVideoRestoreUserInterfaceForPictureInPictureStop?: DirectEventHandler<null>;\n  onVideoControlsVisibilityChange?: DirectEventHandler<OnVideoControlsVisibilityChangeEvent>;\n  onVideoExternalPlaybackChange?: DirectEventHandler<OnVideoExternalPlaybackChangeEvent>;\n  onVideoAspectRatio?: DirectEventHandler<OnVideoAspectRatioEvent>;\n  onTransferEnd?: DirectEventHandler<TransferEndEvent>;\n}\n\n// ============================================================\n// Native Commands Interface\n// ============================================================\n\nexport interface NativeCommands {\n  seek: (viewRef: React.ElementRef<HostComponent<NativeProps>>, time: Double, tolerance: Double) => void;\n  adjustVolume: (viewRef: React.ElementRef<HostComponent<NativeProps>>, volume: Float) => void;\n  setFullScreen: (viewRef: React.ElementRef<HostComponent<NativeProps>>, fullscreen: boolean) => void;\n  loadSource: (viewRef: React.ElementRef<HostComponent<NativeProps>>, uri: string) => void;\n  pause: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;\n  resume: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;\n  enterPictureInPicture: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;\n  exitPictureInPicture: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({\n  supportedCommands: [\n    'seek',\n    'adjustVolume',\n    'setFullScreen',\n    'loadSource',\n    'pause',\n    'resume',\n    'enterPictureInPicture',\n    'exitPictureInPicture',\n  ],\n});\n\nexport default codegenNativeComponent<NativeProps>('GraniteVideoView');\n"
  },
  {
    "path": "packages/video/src/index.ts",
    "content": "import { Video } from './GraniteVideo';\n\nexport { Video, clearCache, getWidevineLevel, isCodecSupported, isHEVCSupported } from './GraniteVideo';\n\nexport * from './types';\nexport type * from './GraniteVideoNativeComponent';\n\nexport default Video;\n"
  },
  {
    "path": "packages/video/src/types.ts",
    "content": "import type { StyleProp, ViewStyle, ImageSourcePropType } from 'react-native';\nimport type {\n  OnVideoLoadStartEvent,\n  OnVideoLoadEvent,\n  OnVideoProgressEvent,\n  OnVideoSeekEvent,\n  OnVideoBufferEvent,\n  OnVideoBandwidthUpdateEvent,\n  OnVideoPlaybackStateChangedEvent,\n  OnVideoPlaybackRateChangeEvent,\n  OnVideoVolumeChangeEvent,\n  OnVideoAudioFocusChangedEvent,\n  OnVideoPictureInPictureStatusChangedEvent,\n  OnVideoControlsVisibilityChangeEvent,\n  OnVideoExternalPlaybackChangeEvent,\n  OnVideoAspectRatioEvent,\n  OnVideoErrorEvent,\n} from './GraniteVideoNativeComponent';\n\n// ============================================================\n// Source Types\n// ============================================================\n\nexport interface VideoSourceHeaders {\n  [key: string]: string;\n}\n\nexport interface DrmConfig {\n  type: 'widevine' | 'playready' | 'clearkey' | 'fairplay';\n  licenseServer?: string;\n  headers?: VideoSourceHeaders;\n  contentId?: string;\n  certificateUrl?: string;\n  base64Certificate?: boolean;\n  multiDrm?: boolean;\n  localSourceEncryptionKeyScheme?: string; // iOS Only: offline DRM key scheme\n}\n\nexport interface TextTrack {\n  title: string;\n  language: string;\n  type: 'application/x-subrip' | 'text/vtt' | 'application/ttml+xml';\n  uri: string;\n}\n\nexport interface BufferConfig {\n  minBufferMs?: number;\n  maxBufferMs?: number;\n  bufferForPlaybackMs?: number;\n  bufferForPlaybackAfterRebufferMs?: number;\n  backBufferDurationMs?: number;\n  cacheSizeMB?: number;\n  live?: {\n    maxPlaybackSpeed?: number;\n    minPlaybackSpeed?: number;\n    maxOffsetMs?: number;\n    minOffsetMs?: number;\n    targetOffsetMs?: number;\n  };\n}\n\n// CMCD (Common Media Client Data) - Android Only\nexport enum CmcdMode {\n  MODE_REQUEST_HEADER = 0,\n  MODE_QUERY_PARAMETER = 1,\n}\n\nexport type CmcdData = Record<string, string>;\n\nexport type CmcdConfiguration = Readonly<{\n  mode?: CmcdMode;\n  request?: CmcdData;\n  session?: CmcdData;\n  object?: CmcdData;\n  status?: CmcdData;\n}>;\n\nexport type Cmcd = boolean | CmcdConfiguration;\n\n// Ad configuration\nexport type AdConfigCSAI = Readonly<{\n  type: 'csai';\n  adTagUrl: string;\n  adLanguage?: string;\n}>;\n\nexport type AdConfigDAI = Readonly<{\n  type: 'ssai';\n  streamType: 'vod' | 'live';\n  contentSourceId?: string;\n  videoId?: string;\n  assetKey?: string;\n  format?: 'hls' | 'dash';\n  adTagParameters?: Record<string, string>;\n  fallbackUri?: string;\n  adLanguage?: string;\n}>;\n\nexport type AdConfig = AdConfigCSAI | AdConfigDAI;\n\nexport interface VideoSource {\n  uri?: string;\n  type?: string;\n  mainVer?: number;\n  patchVer?: number;\n  headers?: VideoSourceHeaders;\n  startTime?: number;\n  endTime?: number;\n  drm?: DrmConfig;\n  textTracks?: TextTrack[];\n  metadata?: VideoMetadata;\n  shouldCache?: boolean;\n  isNetwork?: boolean;\n  isAsset?: boolean;\n  isLocalAssetFile?: boolean;\n  contentStartTime?: number;\n  minLoadRetryCount?: number;\n  textTracksAllowChunklessPreparation?: boolean;\n  cmcd?: Cmcd;\n  ad?: AdConfig;\n  bufferConfig?: BufferConfig;\n}\n\nexport interface VideoMetadata {\n  title?: string;\n  subtitle?: string;\n  description?: string;\n  artist?: string;\n  imageUri?: string;\n}\n\n// ============================================================\n// Track Selection Types\n// ============================================================\n\nexport type SelectedTrackType = 'system' | 'disabled' | 'title' | 'language' | 'index';\nexport type SelectedVideoTrackType = 'auto' | 'disabled' | 'resolution' | 'index';\n\nexport interface SelectedTrack {\n  type: SelectedTrackType;\n  value?: string | number;\n}\n\nexport interface SelectedVideoTrack {\n  type: SelectedVideoTrackType;\n  value?: number;\n}\n\n// ============================================================\n// Resize Mode\n// ============================================================\n\nexport type ResizeMode = 'contain' | 'cover' | 'stretch' | 'none';\n\n// ============================================================\n// View Type (Android)\n// ============================================================\n\nexport type ViewType = 'surface' | 'texture';\n\n// ============================================================\n// Poster Source\n// ============================================================\n\nexport interface PosterSource {\n  uri?: string;\n}\n\nexport type Poster = ImageSourcePropType | PosterSource;\n\n// ============================================================\n// Event Data Types\n// ============================================================\n\nexport type OnLoadData = OnVideoLoadEvent & {\n  naturalSize: OnVideoLoadEvent['naturalSize'] & {\n    orientation: 'portrait' | 'landscape';\n  };\n  audioTracks: AudioTrack[];\n  textTracks: TextTrackInfo[];\n  videoTracks: VideoTrackInfo[];\n};\n\nexport interface AudioTrack {\n  index: number;\n  title?: string;\n  language?: string;\n  bitrate?: number;\n  type?: string;\n  selected?: boolean;\n}\n\nexport interface TextTrackInfo {\n  index: number;\n  title?: string;\n  language?: string;\n  type?: string;\n  selected?: boolean;\n}\n\nexport interface VideoTrackInfo {\n  index: number;\n  trackId?: string;\n  codecs?: string;\n  width?: number;\n  height?: number;\n  bitrate?: number;\n  selected?: boolean;\n}\n\nexport type OnSeekData = OnVideoSeekEvent & {\n  target?: number;\n};\n\nexport interface OnTimedMetadataData {\n  metadata: Array<{\n    value: string;\n    identifier: string;\n  }>;\n}\n\nexport interface OnReceiveAdEventData {\n  event: string;\n}\n\nexport interface OnTransferEndData {\n  uri: string;\n  bytesTransferred: number;\n}\n\n// ============================================================\n// Ref Methods\n// ============================================================\n\nexport interface VideoRef {\n  seek: (time: number, tolerance?: number) => void;\n  pause: () => void;\n  resume: () => void;\n  setVolume: (volume: number) => void;\n  setFullScreen: (fullscreen: boolean) => void;\n  presentFullscreenPlayer: () => void;\n  dismissFullscreenPlayer: () => void;\n  enterPictureInPicture: () => void;\n  exitPictureInPicture: () => void;\n  setSource: (source: VideoSource) => void;\n  getCurrentPosition: () => Promise<number>;\n  save: (options?: { type?: string }) => Promise<{ uri: string }>;\n  restoreUserInterfaceForPictureInPictureStopCompleted: (restored: boolean) => void;\n}\n\n// ============================================================\n// Component Props\n// ============================================================\n\nexport interface VideoProps {\n  // Test ID\n  testID?: string;\n\n  // Style\n  style?: StyleProp<ViewStyle>;\n\n  // Progress\n  progressUpdateInterval?: number;\n\n  // Source\n  source: VideoSource | number;\n\n  /**\n   * **NOTE**\n   *\n   * Value: string with a URL for the poster is deprecated, use poster as an object instead.\n   */\n  poster?: Poster | string;\n  posterResizeMode?: ResizeMode;\n\n  // Playback Control\n  paused?: boolean;\n  muted?: boolean;\n  volume?: number;\n  rate?: number;\n  repeat?: boolean;\n  playInBackground?: boolean;\n  playWhenInactive?: boolean;\n  automaticallyWaitsToMinimizeStalling?: boolean;\n  shutterColor?: string;\n\n  // Display\n  resizeMode?: ResizeMode;\n  viewType?: ViewType;\n  useTextureView?: boolean;\n  useSecureView?: boolean;\n\n  // Buffering\n  bufferConfig?: BufferConfig;\n  minLoadRetryCount?: number;\n  maxBitRate?: number;\n  preferredForwardBufferDuration?: number;\n\n  // Track Selection\n  selectedAudioTrack?: SelectedTrack;\n  selectedTextTrack?: SelectedTrack;\n  selectedVideoTrack?: SelectedVideoTrack;\n  textTracks?: TextTrack[];\n\n  // DRM\n  drm?: DrmConfig;\n  localSourceEncryptionKeyScheme?: string;\n\n  // Ads (Android/iOS)\n  adTagUrl?: string;\n  adLanguage?: string;\n\n  // Controls\n  controls?: boolean;\n  showNotificationControls?: boolean;\n  disableFocus?: boolean;\n  disableDisconnectError?: boolean;\n  focusable?: boolean;\n  hideShutterView?: boolean;\n  preventsDisplaySleepDuringVideoPlayback?: boolean;\n\n  // Fullscreen\n  fullscreen?: boolean;\n  fullscreenAutorotate?: boolean;\n  fullscreenOrientation?: 'all' | 'landscape' | 'portrait';\n\n  // Picture in Picture\n  pictureInPicture?: boolean;\n\n  // Content\n  contentStartTime?: number;\n  allowsExternalPlayback?: boolean;\n  audioOutput?: 'speaker' | 'earpiece';\n  ignoreSilentSwitch?: 'inherit' | 'ignore' | 'obey';\n  mixWithOthers?: 'inherit' | 'mix' | 'duck';\n\n  // Debug\n  debug?: {\n    enable?: boolean;\n    thread?: boolean;\n  };\n\n  // === Events ===\n\n  /**\n   * Callback when video starts loading\n   */\n  onLoadStart?: (data: OnVideoLoadStartEvent) => void;\n\n  /**\n   * Callback when video is loaded\n   */\n  onLoad?: (data: OnLoadData) => void;\n\n  /**\n   * Callback when video fails to load\n   */\n  onError?: (data: OnVideoErrorEvent) => void;\n\n  /**\n   * Callback during video playback progress\n   */\n  onProgress?: (data: OnVideoProgressEvent) => void;\n\n  /**\n   * Callback when video seek completes\n   */\n  onSeek?: (data: OnSeekData) => void;\n\n  /**\n   * Callback when video ends\n   */\n  onEnd?: () => void;\n\n  /**\n   * Callback when video buffering state changes\n   */\n  onBuffer?: (data: OnVideoBufferEvent) => void;\n\n  /**\n   * Callback when video bandwidth updates\n   */\n  onBandwidthUpdate?: (data: OnVideoBandwidthUpdateEvent) => void;\n\n  /**\n   * Callback when playback state changes\n   */\n  onPlaybackStateChanged?: (data: OnVideoPlaybackStateChangedEvent) => void;\n\n  /**\n   * Callback when playback rate changes\n   */\n  onPlaybackRateChange?: (data: OnVideoPlaybackRateChangeEvent) => void;\n\n  /**\n   * Callback when volume changes\n   */\n  onVolumeChange?: (data: OnVideoVolumeChangeEvent) => void;\n\n  /**\n   * Callback when video becomes idle\n   */\n  onIdle?: () => void;\n\n  /**\n   * Callback when video is ready for display\n   */\n  onReadyForDisplay?: () => void;\n\n  /**\n   * Callback when video aspect ratio changes\n   */\n  onAspectRatio?: (data: OnVideoAspectRatioEvent) => void;\n\n  /**\n   * Callback when audio focus changes\n   */\n  onAudioFocusChanged?: (data: OnVideoAudioFocusChangedEvent) => void;\n\n  /**\n   * Callback when audio becomes noisy\n   */\n  onAudioBecomingNoisy?: () => void;\n\n  /**\n   * Callback before fullscreen player presents\n   */\n  onFullscreenPlayerWillPresent?: () => void;\n\n  /**\n   * Callback after fullscreen player presents\n   */\n  onFullscreenPlayerDidPresent?: () => void;\n\n  /**\n   * Callback before fullscreen player dismisses\n   */\n  onFullscreenPlayerWillDismiss?: () => void;\n\n  /**\n   * Callback after fullscreen player dismisses\n   */\n  onFullscreenPlayerDidDismiss?: () => void;\n\n  /**\n   * Callback when picture-in-picture status changes\n   */\n  onPictureInPictureStatusChanged?: (data: OnVideoPictureInPictureStatusChangedEvent) => void;\n\n  /**\n   * Callback to restore user interface for picture-in-picture stop\n   */\n  onRestoreUserInterfaceForPictureInPictureStop?: () => void;\n\n  /**\n   * Callback when controls visibility changes\n   */\n  onControlsVisibilityChange?: (data: OnVideoControlsVisibilityChangeEvent) => void;\n\n  /**\n   * Callback when external playback changes\n   */\n  onExternalPlaybackChange?: (data: OnVideoExternalPlaybackChangeEvent) => void;\n\n  /**\n   * Callback when receive ad event occurs\n   */\n  onReceiveAdEvent?: (data: OnReceiveAdEventData) => void;\n\n  /**\n   * Callback when transfer end event occurs\n   */\n  onTransferEnd?: (data: OnTransferEndData) => void;\n}\n\n// ============================================================\n// Static Methods\n// ============================================================\n\nexport interface VideoStatic {\n  clearCache: () => Promise<void>;\n  getWidevineLevel: () => Promise<number>;\n  isCodecSupported: (mimeType: string, width: number, height: number) => Promise<boolean>;\n  isHEVCSupported: () => Promise<boolean>;\n}\n"
  },
  {
    "path": "packages/video/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"declarationDir\": \"dist/typescript\",\n    \"emitDeclarationOnly\": true\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/video/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/vitest/CHANGELOG.md",
    "content": "# Changelog\n\n## 1.0.23\n\n### Patch Changes\n\n- faf7ec4: feat: change react-native package tree to object + virtual\n\n## 1.0.22\n\n### Patch Changes\n\n- 3553158: feat(vitest): fast-flow-transform -> flow-remove-types\n\n## 1.0.21\n\n### Patch Changes\n\n- abce9e2: feat: vitest\n- e2f5dee: feat: remove dependency(@react-native/js-polyfill)\n\n## 1.0.20\n\n- Initial release.\n"
  },
  {
    "path": "packages/vitest/LICENSE",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2025 Viva Republica, Inc.\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License."
  },
  {
    "path": "packages/vitest/NOTICE",
    "content": "This package is published from the Granite monorepo.\nIt does not require Granite-specific runtime packages.\n"
  },
  {
    "path": "packages/vitest/README.md",
    "content": "# `@granite-js/vitest`\n\nVitest helpers for React Native projects.\n\nThis package is published from the Granite monorepo, but it does not require Granite-specific runtime packages. You can use it in a regular React Native project as long as you already have `react`, `react-native`, and `vitest`.\n\n## Installation\n\n```sh\nyarn add -D @granite-js/vitest vitest\n```\n\n## Usage\n\n```ts\nimport { defineConfig } from 'vitest/config';\nimport { reactNative } from '@granite-js/vitest';\n\nexport default defineConfig({\n  plugins: [reactNative()],\n});\n```\n\n`reactNative()` injects the React Native manifest resolver, the Vitest `node` environment, `globals: true`, Jest-like test globs, the packaged React Native runtime/setup files, and Jest-preset-style asset mocks.\n\n## Transform Cache\n\nReact Native sources are stored as a content-addressed flat transform cache:\n\n- cache root: `<cacheDir>/vitest-react-native-cache`\n- transformed objects: `<cacheDir>/vitest-react-native-cache/entries/<cache-key>/objects/<content-hash>.<ext>`\n- manifest: `<cacheDir>/vitest-react-native-cache/entries/<cache-key>/manifest.json`\n- metadata: `<cacheDir>/vitest-react-native-cache/entries/<cache-key>/meta.json`\n\nBy default, `cacheDir` is Vitest's `.vitest` directory unless your `vitest.config.*` overrides it.\n\nThe cache key is derived from:\n\n- the `react-native` and installed RN-family allowlist package contents\n- the local mirror/transform implementation\n- transform dependency versions\n\nIf the cache key matches, `reactNative()` reuses the existing transform cache immediately instead of rebuilding it.\nOnly one completed React Native transform cache entry is retained per cache directory. When the cache key changes,\nthe previous entry is removed before the new cache is transformed and materialized.\n\nThe cache intentionally does not materialize package trees such as `packages/react-native/package.json`.\nReact Native package and relative imports are resolved through `manifest.json` and then redirected to flat\nobject files, so file scanners do not discover duplicate package boundaries inside the cache.\n\nLocal garbage collection runs opportunistically while resolving the transform cache:\n\n- temporary entries left behind by interrupted builds are removed\n- inactive completed entries are removed\n\n## React Native Jest Preset Parity\n\n**Status:** tracked in [`JEST_PRESET_PARITY_CHECKLIST.md`](./JEST_PRESET_PARITY_CHECKLIST.md)\n\nThis package currently treats the following contract as the parity target:\n\n- `react-native/jest-preset.js`\n- `react-native/jest/react-native-env.js`\n- `react-native/jest/setup.js`\n- the top-level `react-native` facade exposed by `react-native/index.js`\n\nThe checklist tracks how much of that surface is implemented inside this package. It does not mean every React Native ecosystem package is mocked.\n\n## What Is Mocked\n\n### 1. Config / Environment parity\n\n`reactNative()` injects the preset-style config below:\n\n- `test.environment = 'node'`\n- `test.globals = true`\n- `test.include = ['**/__tests__/**/*.test.{js,jsx,ts,tsx}', '**/__tests__/**/*.spec.{js,jsx,ts,tsx}', '**/?(*.)test.{js,jsx,ts,tsx}', '**/?(*.)spec.{js,jsx,ts,tsx}']`\n- `test.setupFiles = [reactNativeRuntime, setup]`\n- `resolve.conditions = ['require', 'react-native']`\n- `resolve.extensions = ['.ios.tsx', '.ios.ts', '.ios.jsx', '.ios.js', '.native.tsx', '.native.ts', '.native.jsx', '.native.js', '.tsx', '.ts', '.jsx', '.js', '.json']`\n- asset imports resolve to Jest-preset-style `{ testUri }` objects\n- content-addressed React Native source mirroring plus Flow stripping before execution\n- installed `jest-react-native`, `@react-native/*`, and `@react-native-community/*` packages join the same mirror/transform pipeline\n- package-root-based resolution for Yarn PnP and regular installs\n\n### 2. Global bootstrap\n\nThe runtime installs the same core globals the preset expects:\n\n- `IS_REACT_ACT_ENVIRONMENT`\n- `IS_REACT_NATIVE_TEST_ENVIRONMENT`\n- `__DEV__`\n- `window`\n- `nativeFabricUIManager`\n- `performance.now`\n- `requestAnimationFrame`\n- `cancelAnimationFrame`\n- `nativeModuleProxy`\n- `__turboModuleProxy`\n- `__fbBatchedBridgeConfig`\n- `globalThis.jest` bridge backed by `vi`\n- guarded `prettier` mocking equivalent to the React Native Jest setup workaround\n\n### 3. Explicit `react-native/jest/setup.js`-style subpath mocks\n\nThe runtime explicitly mocks these subpaths:\n\n- `react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo`\n- `react-native/Libraries/Core/InitializeCore`\n- `react-native/Libraries/Core/NativeExceptionsManager`\n- `react-native/Libraries/Components/Clipboard/Clipboard`\n- `react-native/Libraries/Utilities/codegenNativeCommands`\n- `react-native/Libraries/Utilities/codegenNativeComponent`\n- `react-native/Libraries/Components/RefreshControl/RefreshControl`\n- `react-native/Libraries/Components/ActivityIndicator/ActivityIndicator`\n- `react-native/Libraries/Image/Image`\n- `react-native/Libraries/Text/Text`\n- `react-native/Libraries/Components/TextInput/TextInput`\n- `react-native/Libraries/Modal/Modal`\n- `react-native/Libraries/Components/View/View`\n- `react-native/Libraries/Components/ScrollView/ScrollView`\n- `react-native/Libraries/BatchedBridge/NativeModules`\n- `react-native/Libraries/ReactNative/UIManager`\n- `react-native/Libraries/AppState/AppState`\n- `react-native/Libraries/Linking/Linking`\n- `react-native/Libraries/Vibration/Vibration`\n- `react-native/Libraries/NativeComponent/NativeComponentRegistry`\n- `react-native/Libraries/ReactNative/requireNativeComponent`\n- `react-native/Libraries/Components/View/ViewNativeComponent`\n- `react-native/Libraries/Utilities/useColorScheme`\n- `react-native/Libraries/ReactNative/RendererProxy`\n\n### 4. Native bridge / `NativeModules` parity\n\nThe installed `nativeModuleProxy` includes these native-facing modules:\n\n- `AlertManager`\n- `AsyncLocalStorage`\n- `BlobModule`\n- `DevSettings`\n- `DeviceInfo`\n- `I18nManager`\n- `ImageLoader`\n- `ImageViewManager`\n- `KeyboardObserver`\n- `NativeAnimatedModule`\n- `Networking`\n- `PlatformConstants`\n- `PushNotificationManager`\n- `SourceCode`\n- `StatusBarManager`\n- `Timing`\n- `UIManager`\n- `WebSocketModule`\n\n### 5. Top-level `react-native` facade\n\nThe top-level `react-native` mock exports these components, APIs, and utilities:\n\n- `AccessibilityInfo`\n- `ActivityIndicator`\n- `ActionSheetIOS`\n- `Alert`\n- `Animated`\n- `Appearance`\n- `AppRegistry`\n- `AppState`\n- `BackHandler`\n- `Button`\n- `Clipboard`\n- `codegenNativeCommands`\n- `codegenNativeComponent`\n- `DevMenu`\n- `DevSettings`\n- `DeviceEventEmitter`\n- `DeviceInfo`\n- `Dimensions`\n- `DrawerLayoutAndroid`\n- `DynamicColorIOS`\n- `Easing`\n- `experimental_LayoutConformance`\n- `findNodeHandle`\n- `FlatList`\n- `I18nManager`\n- `Image`\n- `ImageBackground`\n- `InputAccessoryView`\n- `InteractionManager`\n- `Keyboard`\n- `KeyboardAvoidingView`\n- `LayoutAnimation`\n- `Linking`\n- `LogBox`\n- `Modal`\n- `NativeComponentRegistry`\n- `NativeAppEventEmitter`\n- `NativeDialogManagerAndroid`\n- `NativeEventEmitter`\n- `NativeModules`\n- `Networking`\n- `PanResponder`\n- `PermissionsAndroid`\n- `PixelRatio`\n- `Platform`\n- `PlatformColor`\n- `Pressable`\n- `processColor`\n- `ProgressBarAndroid`\n- `PushNotificationIOS`\n- `RefreshControl`\n- `registerCallableModule`\n- `requireNativeComponent`\n- `RootTagContext`\n- `SafeAreaView`\n- `ScrollView`\n- `SectionList`\n- `Settings`\n- `Share`\n- `StatusBar`\n- `StyleSheet`\n- `Switch`\n- `Systrace`\n- `Text`\n- `TextInput`\n- `ToastAndroid`\n- `Touchable`\n- `TouchableHighlight`\n- `TouchableNativeFeedback`\n- `TouchableOpacity`\n- `TouchableWithoutFeedback`\n- `TurboModuleRegistry`\n- `UIManager`\n- `unstable_batchedUpdates`\n- `unstable_NativeText`\n- `unstable_NativeView`\n- `unstable_TextAncestorContext`\n- `unstable_VirtualView`\n- `ReactNativeVersion`\n- `useAnimatedValue`\n- `useColorScheme`\n- `usePressability`\n- `useWindowDimensions`\n- `UTFSequence`\n- `Vibration`\n- `View`\n- `VirtualViewMode`\n- `VirtualizedList`\n- `VirtualizedSectionList`\n\n### 6. Removed React Native exports\n\nThe runtime also preserves the removed-export getters that throw when accessed:\n\n- `ART`\n- `AsyncStorage`\n- `CameraRoll`\n- `CheckBox`\n- `DatePickerAndroid`\n- `DatePickerIOS`\n- `ImageEditor`\n- `ImagePickerIOS`\n- `ImageStore`\n- `ListView`\n- `MaskedViewIOS`\n- `NetInfo`\n- `Picker`\n- `PickerIOS`\n- `ProgressViewIOS`\n- `SegmentedControlIOS`\n- `Slider`\n- `StatusBarIOS`\n- `SwipeableListView`\n- `TimePickerAndroid`\n- `ToolbarAndroid`\n- `ViewPagerAndroid`\n- `WebView`\n\n## Behavioral Notes\n\nThe runtime also reproduces the host rendering semantics that RNTL depends on:\n\n- host components render to string host nodes such as `View`, `Text`, `TextInput`, `ScrollView`\n- native components preserve `_nativeTag` and native-style instance methods\n- `requireNativeComponent()` and `NativeComponentRegistry` resolve to host-renderable mock components\n- `codegenNativeComponent()` delegates to the mocked `requireNativeComponent()` layer\n- `codegenNativeCommands()` delegates to mocked `RendererProxy.dispatchCommand()`\n- `Animated` includes the preset-style mock surface, including `Value`, `ValueXY`, `Color`, `Interpolation`, `Node`, `timing`, `spring`, `decay`, `sequence`, `parallel`, `stagger`, `loop`, arithmetic helpers, `event`, `attachNativeEvent`, `forkEvent`, `unforkEvent`, and `Event`\n\nFor the source of truth, see [src/reactNativeRuntime.ts](./src/reactNativeRuntime.ts), [src/runtimeBootstrap.ts](./src/runtimeBootstrap.ts), and [src/reactNative.ts](./src/reactNative.ts).\n"
  },
  {
    "path": "packages/vitest/package.json",
    "content": "{\n  \"name\": \"@granite-js/vitest\",\n  \"version\": \"1.0.23\",\n  \"type\": \"module\",\n  \"description\": \"Vitest helpers for React Native\",\n  \"types\": \"./dist/index.d.ts\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/toss/granite.git\",\n    \"directory\": \"packages/vitest\"\n  },\n  \"exports\": {\n    \".\": \"./dist/index.js\",\n    \"./reactNativeRuntime\": \"./dist/reactNativeRuntime.js\",\n    \"./setup\": \"./dist/setup.js\",\n    \"./package.json\": \"./package.json\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"eslint .\",\n    \"test\": \"vitest --run\",\n    \"build\": \"tsdown\"\n  },\n  \"dependencies\": {\n    \"flow-remove-types\": \"2.291.0\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"catalog:tools\",\n    \"@types/react\": \"catalog:react-native\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"tsdown\": \"catalog:tools\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"4.1.3\"\n  },\n  \"peerDependencies\": {\n    \"react\": \"*\",\n    \"react-native\": \"*\",\n    \"vitest\": \"*\"\n  },\n  \"sideEffects\": [\n    \"./dist/reactNativeRuntime.js\",\n    \"./dist/setup.js\"\n  ]\n}\n"
  },
  {
    "path": "packages/vitest/src/assets.ts",
    "content": "export const REACT_NATIVE_ASSET_EXTENSIONS = [\n  'bmp',\n  'gif',\n  'jpg',\n  'jpeg',\n  'mp4',\n  'png',\n  'psd',\n  'svg',\n  'webp',\n] as const;\n\nexport const REACT_NATIVE_ASSET_MODULE_ID_PATTERN = new RegExp(\n  `\\\\.(${REACT_NATIVE_ASSET_EXTENSIONS.join('|')})(?:[?#].*)?$`,\n  'i',\n);\n"
  },
  {
    "path": "packages/vitest/src/globals.d.ts",
    "content": "declare module 'flow-remove-types' {\n  declare const removeTypes: (\n    code: string,\n    options?: {\n      all?: boolean;\n      ignoreUninitializedFields?: boolean;\n      pretty?: boolean;\n      removeEmptyImports?: boolean;\n    }\n  ) => {\n    toString(): string;\n    generateMap(): {\n      version: number;\n      sources: string[];\n      names: string[];\n      mappings: string;\n    };\n  };\n\n  export = removeTypes;\n}\n\ninterface ImportMeta {\n  url: string;\n}\n"
  },
  {
    "path": "packages/vitest/src/index.ts",
    "content": "import { reactNative, resolveReactNativeSetupFiles } from './reactNative';\n\nexport * from './reactNative';\nexport default { reactNative, resolveReactNativeSetupFiles };\n"
  },
  {
    "path": "packages/vitest/src/jestBridge.spec.ts",
    "content": "import path from 'node:path';\nimport { afterEach, describe, expect, it, vi } from 'vitest';\nimport {\n  installVitestJestBridge,\n  installVitestPrettierWorkaround,\n} from './jestBridge';\n\ntype JestBridgeGlobals = typeof globalThis & {\n  jest?: {\n    fn: typeof vi.fn;\n    now: () => number;\n    requireActual: (moduleName: string) => unknown;\n    useFakeTimers: typeof vi.useFakeTimers;\n    useRealTimers: typeof vi.useRealTimers;\n  };\n};\n\ndescribe('jestBridge helpers', () => {\n  afterEach(() => {\n    const runtimeGlobals = globalThis as JestBridgeGlobals;\n\n    vi.doUnmock('prettier');\n    vi.resetModules();\n    vi.restoreAllMocks();\n    vi.useRealTimers();\n    delete runtimeGlobals.jest;\n  });\n\n  it('installs a Jest-shaped global on top of Vitest', () => {\n    const runtimeGlobals = globalThis as JestBridgeGlobals;\n\n    installVitestJestBridge();\n\n    expect(runtimeGlobals.jest).toBeDefined();\n    const jestBridge = runtimeGlobals.jest!;\n\n    expect(jestBridge).toMatchObject({\n      fn: expect.any(Function),\n      now: expect.any(Function),\n      requireActual: expect.any(Function),\n      useFakeTimers: expect.any(Function),\n      useRealTimers: expect.any(Function),\n    });\n\n    const mock = jestBridge.fn();\n    mock('value');\n\n    expect(mock).toHaveBeenCalledWith('value');\n\n    jestBridge.useFakeTimers();\n    vi.setSystemTime(new Date('2024-01-01T00:00:00Z'));\n\n    expect(jestBridge.now()).toBe(Date.parse('2024-01-01T00:00:00Z'));\n    expect(jestBridge.requireActual('node:path')).toBe(path);\n\n    jestBridge.useRealTimers();\n  });\n\n  it('lets setup skip optional prettier mocking when prettier is absent', () => {\n    const missingRequire = Object.assign(\n      () => {\n        throw new Error('should not load prettier');\n      },\n      {\n        resolve() {\n          throw Object.assign(new Error('missing prettier'), {\n            code: 'MODULE_NOT_FOUND',\n          });\n        },\n      },\n    );\n\n    expect(() =>\n      installVitestPrettierWorkaround(missingRequire as never),\n    ).not.toThrow();\n  });\n});\n"
  },
  {
    "path": "packages/vitest/src/jestBridge.ts",
    "content": "import { createRequire } from 'node:module';\nimport { vi } from 'vitest';\nimport { installRequestAnimationFrameShim } from './runtimeBootstrap';\n\ntype JestShim = {\n  advanceTimersByTime: typeof vi.advanceTimersByTime;\n  clearAllMocks: typeof vi.clearAllMocks;\n  doMock: typeof vi.doMock;\n  fn: typeof vi.fn;\n  getRealSystemTime: typeof vi.getRealSystemTime;\n  mock: typeof vi.mock;\n  now: () => number;\n  requireActual: (moduleName: string) => unknown;\n  resetAllMocks: typeof vi.resetAllMocks;\n  restoreAllMocks: typeof vi.restoreAllMocks;\n  spyOn: typeof vi.spyOn;\n  unmock: typeof vi.unmock;\n  useFakeTimers: typeof vi.useFakeTimers;\n  useRealTimers: typeof vi.useRealTimers;\n};\n\ntype RuntimeGlobals = typeof globalThis & {\n  jest?: JestShim;\n};\n\ntype RuntimeRequire = ReturnType<typeof createRequire>;\n\nexport function installVitestPrettierWorkaround(runtimeRequire: RuntimeRequire = createRequire(import.meta.url)) {\n  try {\n    const prettierPath = runtimeRequire.resolve('prettier');\n    vi.doMock('prettier', () => runtimeRequire(prettierPath));\n  } catch {}\n}\n\nexport function installVitestJestBridge() {\n  const runtimeGlobals = globalThis as RuntimeGlobals;\n  const runtimeRequire = createRequire(import.meta.url);\n\n  installRequestAnimationFrameShim(runtimeGlobals);\n\n  runtimeGlobals.jest = {\n    advanceTimersByTime: vi.advanceTimersByTime,\n    clearAllMocks: vi.clearAllMocks,\n    doMock: vi.doMock,\n    fn: vi.fn,\n    getRealSystemTime: vi.getRealSystemTime,\n    mock: vi.mock,\n    now: () => vi.getMockedSystemTime()?.valueOf() ?? Date.now(),\n    requireActual: (moduleName: string) => runtimeRequire(moduleName),\n    resetAllMocks: vi.resetAllMocks,\n    restoreAllMocks: vi.restoreAllMocks,\n    spyOn: vi.spyOn,\n    unmock: vi.unmock,\n    useFakeTimers: (...args) => {\n      const result = vi.useFakeTimers(...args);\n      installRequestAnimationFrameShim(runtimeGlobals);\n      return result;\n    },\n    useRealTimers: () => {\n      const result = vi.useRealTimers();\n      installRequestAnimationFrameShim(runtimeGlobals);\n      return result;\n    },\n  };\n}\n"
  },
  {
    "path": "packages/vitest/src/mirror.spec.ts",
    "content": "import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { describe, expect, it } from 'vitest';\nimport {\n  buildReactNativeTransformCache,\n  collectMirroredReactNativePackageNames,\n  GRANITE_VITEST_RN_CACHE_DIRECTORY,\n  GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY,\n  GRANITE_VITEST_RN_MANIFEST_FILENAME,\n  GRANITE_VITEST_RN_OBJECTS_DIRECTORY,\n  resolveReactNativeModuleFromManifest,\n} from './mirror';\n\nfunction collectBasenames(root: string): string[] {\n  return fs.readdirSync(root, { withFileTypes: true }).flatMap((entry) => {\n    const entryPath = path.join(root, entry.name);\n\n    if (entry.isDirectory()) {\n      return [entry.name, ...collectBasenames(entryPath)];\n    }\n\n    return [entry.name];\n  });\n}\n\ndescribe('mirror helpers', () => {\n  it('selects the React Native package set that should be mirrored', () => {\n    expect(\n      collectMirroredReactNativePackageNames(\n        {\n          dependencies: {\n            '@react-native-community/blur': '*',\n            '@react-native/js-polyfills': '*',\n            foo: '*',\n            'jest-react-native': '*',\n            'react-native': '*',\n          },\n        },\n        {\n          dependencies: {\n            '@react-native/js-polyfills': '*',\n            '@react-native/virtualized-lists': '*',\n            whatwg_fetch: '*',\n          },\n        }\n      )\n    ).toEqual([\n      '@react-native-community/blur',\n      '@react-native/js-polyfills',\n      '@react-native/virtualized-lists',\n      'jest-react-native',\n    ]);\n  });\n\n  it('materializes a flat transform cache under the Vitest cache directory and reuses it on the next build', async () => {\n    const resolvedCacheDir = fs.mkdtempSync(path.join(os.tmpdir(), 'granite-vitest-cache-dir-'));\n    const cache = await buildReactNativeTransformCache(process.cwd(), resolvedCacheDir);\n    const cacheRoot = path.join(resolvedCacheDir, GRANITE_VITEST_RN_CACHE_DIRECTORY);\n    const cacheEntriesRoot = path.join(cacheRoot, GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY);\n    const secondCache = await buildReactNativeTransformCache(process.cwd(), resolvedCacheDir);\n\n    expect(cache.objectsRoot).toContain(\n      path.join(resolvedCacheDir, GRANITE_VITEST_RN_CACHE_DIRECTORY, GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY)\n    );\n    expect(secondCache.objectsRoot).toBe(cache.objectsRoot);\n    expect(fs.existsSync(cache.objectsRoot)).toBe(true);\n    expect(fs.existsSync(cache.manifestPath)).toBe(true);\n    expect(fs.existsSync(cacheRoot)).toBe(true);\n    expect(fs.existsSync(cacheEntriesRoot)).toBe(true);\n    expect(path.basename(cache.objectsRoot)).toBe(GRANITE_VITEST_RN_OBJECTS_DIRECTORY);\n    expect(path.basename(cache.manifestPath)).toBe(GRANITE_VITEST_RN_MANIFEST_FILENAME);\n\n    const cacheBasenames = collectBasenames(cache.entryRoot);\n    expect(cacheBasenames).not.toContain('packages');\n    expect(cacheBasenames).not.toContain('package.json');\n  }, 60_000);\n\n  it('resolves React Native requests through the flat manifest', async () => {\n    const resolvedCacheDir = fs.mkdtempSync(path.join(os.tmpdir(), 'granite-vitest-cache-dir-'));\n    const cache = await buildReactNativeTransformCache(process.cwd(), resolvedCacheDir);\n    const reactNative = resolveReactNativeModuleFromManifest('react-native', undefined, cache.manifest);\n    const reactNativeManifest = resolveReactNativeModuleFromManifest(\n      'react-native/package.json',\n      undefined,\n      cache.manifest\n    );\n    const platformShim = resolveReactNativeModuleFromManifest(\n      'react-native/Libraries/Utilities/Platform.js',\n      undefined,\n      cache.manifest\n    );\n    const platformFallback = resolveReactNativeModuleFromManifest(\n      './Platform',\n      platformShim?.objectPath,\n      cache.manifest\n    );\n\n    expect(reactNative?.objectPath).toMatch(new RegExp(`${GRANITE_VITEST_RN_OBJECTS_DIRECTORY}/[a-f0-9]+\\\\.js$`));\n    expect(reactNativeManifest?.objectPath).toMatch(\n      new RegExp(`${GRANITE_VITEST_RN_OBJECTS_DIRECTORY}/[a-f0-9]+\\\\.json$`)\n    );\n    expect(platformFallback?.sourcePath).toContain('Platform.ios.js');\n    expect(path.basename(reactNativeManifest?.objectPath ?? '')).not.toBe('package.json');\n  }, 60_000);\n});\n"
  },
  {
    "path": "packages/vitest/src/mirror.ts",
    "content": "import { createHash } from 'node:crypto';\nimport fs from 'node:fs';\nimport { createRequire } from 'node:module';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { REACT_NATIVE_ASSET_EXTENSIONS } from './assets';\nimport { shouldTransformReactNativeFile, transformReactNativeSource } from './transpile';\n\nexport const DEFAULT_PLATFORM = 'ios';\nexport const GRANITE_VITEST_RN_CACHE_DIRECTORY = 'vitest-react-native-cache';\nexport const GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY = 'entries';\nexport const GRANITE_VITEST_RN_OBJECTS_DIRECTORY = 'objects';\nexport const GRANITE_VITEST_RN_MANIFEST_FILENAME = 'manifest.json';\nexport const GRANITE_VITEST_RN_PACKAGES_DIRECTORY = 'packages';\nexport const REACT_NATIVE_PLATFORMS = ['android', 'ios', 'native'] as const;\n\nconst GRANITE_VITEST_RN_CACHE_GC_LOCK_FILENAME = '.gc.lock';\nconst GRANITE_VITEST_RN_CACHE_METADATA_FILENAME = 'meta.json';\nconst GRANITE_VITEST_RN_CACHE_TMP_PREFIX = '.tmp-';\nconst GRANITE_VITEST_RN_TEMP_ENTRY_MAX_AGE_MS = 60 * 60 * 1000;\nconst DEFAULT_VITEST_CACHE_DIRECTORY = '.vitest';\nconst MIRROR_CACHE_KEY_VERSION = 'v2-flat';\nconst PLATFORM_EXTENSION_SUFFIXES = ['tsx', 'ts', 'jsx', 'js'] as const;\nconst RESOLVE_EXTENSIONS = [\n  DEFAULT_PLATFORM,\n  'native',\n  ...REACT_NATIVE_PLATFORMS.filter((platform) => platform !== DEFAULT_PLATFORM && platform !== 'native'),\n].flatMap((platform) => PLATFORM_EXTENSION_SUFFIXES.map((extension) => `.${platform}.${extension}`));\nconst FALLBACK_EXTENSIONS = [\n  ...RESOLVE_EXTENSIONS,\n  '.tsx',\n  '.ts',\n  '.jsx',\n  '.js',\n  '.json',\n  ...REACT_NATIVE_ASSET_EXTENSIONS.map((extension) => `.${extension}`),\n] as const;\n\ntype MirrorCacheMetadata = {\n  cacheKey: string;\n  createdAt: string;\n  lastAccessedAt: string;\n  packageRoots: string[];\n  sizeBytes: number;\n  transformDependencyVersions: {\n    flowRemoveTypes: string;\n  };\n  transformImplementationHash: string;\n};\n\ntype PackageManifest = {\n  dependencies?: Record<string, string>;\n  devDependencies?: Record<string, string>;\n  main?: string;\n  module?: string;\n  optionalDependencies?: Record<string, string>;\n  peerDependencies?: Record<string, string>;\n  ['react-native']?: string;\n};\n\ntype MirroredReactNativePackage = {\n  packageName: string;\n  requireRoot: string;\n};\n\ntype ReactNativePackageEntry = {\n  packageName: string;\n  packageRoot: string;\n  requireRoot: string;\n};\n\nexport type ReactNativeTransformCacheManifest = {\n  cacheKey: string;\n  createdAt: string;\n  lastAccessedAt: string;\n  objectsRoot: string;\n  packageRoots: string[];\n  packages: ReactNativePackageEntry[];\n  sourceToObject: Record<string, string>;\n  objectToSource: Record<string, string>;\n  transformDependencyVersions: {\n    flowRemoveTypes: string;\n  };\n  transformImplementationHash: string;\n};\n\nexport type ReactNativeTransformCache = {\n  entryRoot: string;\n  manifest: ReactNativeTransformCacheManifest;\n  manifestPath: string;\n  objectsRoot: string;\n};\n\nexport type ReactNativeResolvedModule = {\n  objectPath: string;\n  sourcePath: string;\n};\n\nconst currentMirrorModulePath = fs.realpathSync(fileURLToPath(import.meta.url));\nconst currentMirrorModuleDirectory = path.dirname(currentMirrorModulePath);\n\nfunction normalizePath(filename: string) {\n  return path.resolve(filename.replace(/[?#].*$/, ''));\n}\n\nfunction getFlowRemoveTypesVersion() {\n  const packageRequire = createRequire(import.meta.url);\n  const flowRemoveTypesPackageJsonPath = packageRequire.resolve('flow-remove-types/package.json');\n  const flowRemoveTypesPackageJson = JSON.parse(fs.readFileSync(flowRemoveTypesPackageJsonPath, 'utf8')) as {\n    version?: string;\n  };\n\n  return flowRemoveTypesPackageJson.version ?? 'unknown';\n}\n\nfunction getPackageManifestDependencyNames(packageManifest: PackageManifest) {\n  return Object.keys({\n    ...(packageManifest.dependencies ?? {}),\n    ...(packageManifest.devDependencies ?? {}),\n    ...(packageManifest.optionalDependencies ?? {}),\n    ...(packageManifest.peerDependencies ?? {}),\n  }).sort();\n}\n\nfunction shouldMirrorReactNativeDependency(packageName: string) {\n  return (\n    packageName === 'jest-react-native' ||\n    packageName.startsWith('@react-native/') ||\n    packageName.startsWith('@react-native-community/')\n  );\n}\n\nfunction hashDirectoryContents(\n  hasher: ReturnType<typeof createHash>,\n  rootPath: string,\n  currentPath: string = rootPath\n) {\n  const entries = fs\n    .readdirSync(currentPath, { withFileTypes: true })\n    .sort((left, right) => left.name.localeCompare(right.name));\n\n  for (const entry of entries) {\n    const entryPath = path.join(currentPath, entry.name);\n\n    if (entry.isDirectory()) {\n      hashDirectoryContents(hasher, rootPath, entryPath);\n      continue;\n    }\n\n    if (!entry.isFile()) {\n      continue;\n    }\n\n    hasher.update(path.relative(rootPath, entryPath));\n    hasher.update('\\0');\n    hasher.update(fs.readFileSync(entryPath));\n    hasher.update('\\0');\n  }\n}\n\nfunction hashImplementationFiles() {\n  const hasher = createHash('sha256');\n  const extension = path.extname(currentMirrorModulePath);\n  const implementationFiles = [\n    currentMirrorModulePath,\n    path.join(currentMirrorModuleDirectory, `transpile${extension}`),\n  ]\n    .filter((implementationFile, index, allFiles) => {\n      if (!fs.existsSync(implementationFile)) {\n        return false;\n      }\n\n      return allFiles.indexOf(implementationFile) === index;\n    })\n    .sort();\n\n  for (const implementationFile of implementationFiles) {\n    hasher.update(path.basename(implementationFile));\n    hasher.update('\\0');\n    hasher.update(fs.readFileSync(implementationFile));\n    hasher.update('\\0');\n  }\n\n  return hasher.digest('hex');\n}\n\nexport function collectMirroredReactNativePackageNames(\n  workspacePackageManifest: PackageManifest,\n  reactNativePackageManifest: PackageManifest\n) {\n  const packageNames = new Set<string>();\n\n  for (const dependencyName of Object.keys(reactNativePackageManifest.dependencies ?? {})) {\n    if (dependencyName.startsWith('@react-native/')) {\n      packageNames.add(dependencyName);\n    }\n  }\n\n  for (const dependencyName of getPackageManifestDependencyNames(workspacePackageManifest)) {\n    if (dependencyName !== 'react-native' && shouldMirrorReactNativeDependency(dependencyName)) {\n      packageNames.add(dependencyName);\n    }\n  }\n\n  return [...packageNames].sort();\n}\n\nfunction getMirroredReactNativePackages(workspaceRoot: string): MirroredReactNativePackage[] {\n  const reactNativeRoot = resolvePackageRoot('react-native', workspaceRoot);\n  const workspacePackageManifest = JSON.parse(\n    fs.readFileSync(path.join(workspaceRoot, 'package.json'), 'utf8')\n  ) as PackageManifest;\n  const reactNativePackageManifest = JSON.parse(\n    fs.readFileSync(path.join(reactNativeRoot, 'package.json'), 'utf8')\n  ) as PackageManifest;\n  const workspaceDependencyNames = new Set(getPackageManifestDependencyNames(workspacePackageManifest));\n\n  return collectMirroredReactNativePackageNames(workspacePackageManifest, reactNativePackageManifest).map(\n    (packageName) => ({\n      packageName,\n      requireRoot: workspaceDependencyNames.has(packageName) ? workspaceRoot : reactNativeRoot,\n    })\n  );\n}\n\nfunction getReactNativePackageEntries(workspaceRoot: string): ReactNativePackageEntry[] {\n  return [\n    {\n      packageName: 'react-native',\n      packageRoot: resolvePackageRoot('react-native', workspaceRoot),\n      requireRoot: workspaceRoot,\n    },\n    ...getMirroredReactNativePackages(workspaceRoot).map(({ packageName, requireRoot }) => ({\n      packageName,\n      packageRoot: resolvePackageRoot(packageName, requireRoot),\n      requireRoot,\n    })),\n  ];\n}\n\nfunction computeReactNativeTransformCacheKey(workspaceRoot: string) {\n  const hasher = createHash('sha256');\n  const packageRoots = resolveReactNativePackageRoots(workspaceRoot).sort();\n  const transformImplementationHash = hashImplementationFiles();\n  const transformDependencyVersions = {\n    flowRemoveTypes: getFlowRemoveTypesVersion(),\n  };\n\n  hasher.update(`granite-vitest-rn-cache:${MIRROR_CACHE_KEY_VERSION}`);\n  hasher.update('\\0');\n  hasher.update(`flow-remove-types:${transformDependencyVersions.flowRemoveTypes}`);\n  hasher.update('\\0');\n  hasher.update(`transform:${transformImplementationHash}`);\n  hasher.update('\\0');\n\n  for (const packageRoot of packageRoots) {\n    hasher.update(path.basename(packageRoot));\n    hasher.update('\\0');\n    hashDirectoryContents(hasher, packageRoot);\n  }\n\n  return {\n    cacheKey: hasher.digest('hex'),\n    packageRoots,\n    transformDependencyVersions,\n    transformImplementationHash,\n  };\n}\n\nfunction getDirectorySize(targetPath: string): number {\n  const stat = fs.statSync(targetPath);\n\n  if (stat.isFile()) {\n    return stat.size;\n  }\n\n  if (!stat.isDirectory()) {\n    return 0;\n  }\n\n  return fs.readdirSync(targetPath, { withFileTypes: true }).reduce<number>((totalSize, entry) => {\n    const entryPath = path.join(targetPath, entry.name);\n\n    if (entry.isDirectory() || entry.isFile()) {\n      return totalSize + getDirectorySize(entryPath);\n    }\n\n    return totalSize;\n  }, 0);\n}\n\nfunction readMirrorCacheMetadata(entryRoot: string) {\n  const metadataPath = path.join(entryRoot, GRANITE_VITEST_RN_CACHE_METADATA_FILENAME);\n\n  if (!fs.existsSync(metadataPath)) {\n    return null;\n  }\n\n  try {\n    return JSON.parse(fs.readFileSync(metadataPath, 'utf8')) as MirrorCacheMetadata;\n  } catch {\n    return null;\n  }\n}\n\nfunction gcReactNativeMirrorCache(\n  workspaceRoot: string,\n  activeCacheKey: string,\n  resolvedCacheDir: string = path.join(workspaceRoot, DEFAULT_VITEST_CACHE_DIRECTORY)\n) {\n  void gcReactNativeMirrorCacheAsync(activeCacheKey, resolvedCacheDir).catch(() => undefined);\n}\n\nasync function gcReactNativeMirrorCacheAsync(activeCacheKey: string, resolvedCacheDir: string) {\n  const cacheRoot = path.join(resolvedCacheDir, GRANITE_VITEST_RN_CACHE_DIRECTORY);\n  const lockPath = path.join(cacheRoot, GRANITE_VITEST_RN_CACHE_GC_LOCK_FILENAME);\n\n  await fs.promises.mkdir(cacheRoot, { recursive: true });\n\n  let lockHandle: fs.promises.FileHandle | null = null;\n\n  try {\n    lockHandle = await fs.promises.open(lockPath, 'wx');\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException).code === 'EEXIST') {\n      return;\n    }\n\n    throw error;\n  }\n\n  try {\n    const entriesRoot = path.join(\n      resolvedCacheDir,\n      GRANITE_VITEST_RN_CACHE_DIRECTORY,\n      GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY\n    );\n\n    const entriesRootExists = await fs.promises\n      .access(entriesRoot)\n      .then(() => true)\n      .catch(() => false);\n\n    if (!entriesRootExists) {\n      return;\n    }\n\n    const now = Date.now();\n    const removeEntryPromises: Array<Promise<unknown>> = [];\n\n    for (const entry of await fs.promises.readdir(entriesRoot, { withFileTypes: true })) {\n      if (!entry.isDirectory()) {\n        continue;\n      }\n\n      const entryRoot = path.join(entriesRoot, entry.name);\n      const isTemporaryEntry = entry.name.startsWith(GRANITE_VITEST_RN_CACHE_TMP_PREFIX);\n\n      if (isTemporaryEntry) {\n        const stat = await fs.promises.stat(entryRoot).catch(() => null);\n        const ageMs = stat == null ? 0 : now - stat.mtimeMs;\n\n        if (ageMs > GRANITE_VITEST_RN_TEMP_ENTRY_MAX_AGE_MS) {\n          removeEntryPromises.push(fs.promises.rm(entryRoot, { force: true, recursive: true }));\n        }\n\n        continue;\n      }\n\n      if (entry.name === activeCacheKey) {\n        continue;\n      }\n\n      removeEntryPromises.push(fs.promises.rm(entryRoot, { force: true, recursive: true }));\n    }\n\n    await Promise.allSettled(removeEntryPromises);\n  } catch {\n    /* noop */\n  } finally {\n    if (lockHandle != null) {\n      await lockHandle.close().catch(() => undefined);\n      await fs.promises.rm(lockPath, { force: true, recursive: true }).catch(() => undefined);\n    }\n  }\n}\n\nexport function resolvePackageRoot(packageName: string, requireRoot: string) {\n  const packageRequire = createRequire(path.join(requireRoot, 'package.json'));\n  const packageJsonPath = packageRequire.resolve(`${packageName}/package.json`);\n\n  return path.dirname(packageJsonPath);\n}\n\nexport function resolveReactNativePackageRoots(workspaceRoot: string) {\n  return getReactNativePackageEntries(workspaceRoot).map(({ packageRoot }) => packageRoot);\n}\n\nfunction readPackageManifest(packageRoot: string) {\n  return JSON.parse(fs.readFileSync(path.join(packageRoot, 'package.json'), 'utf8')) as PackageManifest;\n}\n\nfunction findPackageForRequest(request: string, manifest: ReactNativeTransformCacheManifest) {\n  return manifest.packages\n    .sort((left, right) => right.packageName.length - left.packageName.length)\n    .find(({ packageName }) => request === packageName || request.startsWith(`${packageName}/`));\n}\n\nfunction getPackageSubpath(request: string, packageName: string) {\n  if (request === packageName) {\n    return null;\n  }\n\n  return request.slice(packageName.length + 1);\n}\n\nfunction getObjectForSourcePath(\n  sourcePath: string,\n  manifest: ReactNativeTransformCacheManifest\n): ReactNativeResolvedModule | null {\n  const normalizedSourcePath = normalizePath(sourcePath);\n  const objectPath = manifest.sourceToObject[normalizedSourcePath];\n\n  if (objectPath == null) {\n    return null;\n  }\n\n  return {\n    objectPath,\n    sourcePath: normalizedSourcePath,\n  };\n}\n\nfunction resolvePackageEntrySourcePath(\n  packageEntry: ReactNativePackageEntry,\n  manifest: ReactNativeTransformCacheManifest\n): ReactNativeResolvedModule | null {\n  const packageManifest = readPackageManifest(packageEntry.packageRoot);\n  const entryPath =\n    packageEntry.packageName === 'react-native'\n      ? 'index.js'\n      : (packageManifest['react-native'] ?? packageManifest.module ?? packageManifest.main ?? 'index.js');\n\n  if (typeof entryPath === 'string') {\n    return resolveSourcePathCandidate(path.join(packageEntry.packageRoot, entryPath), manifest);\n  }\n\n  return resolveSourcePathCandidate(path.join(packageEntry.packageRoot, 'index'), manifest);\n}\n\nfunction resolveSourcePathCandidate(\n  candidatePath: string,\n  manifest: ReactNativeTransformCacheManifest\n): ReactNativeResolvedModule | null {\n  const normalizedCandidatePath = normalizePath(candidatePath);\n\n  if (fs.existsSync(normalizedCandidatePath)) {\n    const stat = fs.statSync(normalizedCandidatePath);\n\n    if (stat.isFile()) {\n      return getObjectForSourcePath(normalizedCandidatePath, manifest);\n    }\n\n    if (stat.isDirectory()) {\n      const packageJsonPath = path.join(normalizedCandidatePath, 'package.json');\n      if (fs.existsSync(packageJsonPath)) {\n        const packageManifest = readPackageManifest(normalizedCandidatePath);\n        const entryPath =\n          packageManifest['react-native'] ?? packageManifest.module ?? packageManifest.main ?? 'index.js';\n\n        if (typeof entryPath === 'string') {\n          const resolvedEntry = resolveSourcePathCandidate(path.join(normalizedCandidatePath, entryPath), manifest);\n          if (resolvedEntry != null) {\n            return resolvedEntry;\n          }\n        }\n      }\n\n      return resolveSourcePathCandidate(path.join(normalizedCandidatePath, 'index'), manifest);\n    }\n  }\n\n  if (path.extname(normalizedCandidatePath).length > 0) {\n    return null;\n  }\n\n  for (const extension of FALLBACK_EXTENSIONS) {\n    const resolved = getObjectForSourcePath(`${normalizedCandidatePath}${extension}`, manifest);\n    if (resolved != null) {\n      return resolved;\n    }\n  }\n\n  return null;\n}\n\nexport function resolveReactNativeModuleFromManifest(\n  request: string,\n  importer: string | undefined,\n  manifest: ReactNativeTransformCacheManifest\n): ReactNativeResolvedModule | null {\n  if (request.startsWith('.') && importer != null) {\n    const importerSourcePath = manifest.objectToSource[normalizePath(importer)];\n\n    if (importerSourcePath == null) {\n      return null;\n    }\n\n    return resolveSourcePathCandidate(path.resolve(path.dirname(importerSourcePath), request), manifest);\n  }\n\n  const packageEntry = findPackageForRequest(request, manifest);\n  if (packageEntry == null) {\n    return null;\n  }\n\n  const subpath = getPackageSubpath(request, packageEntry.packageName);\n  if (subpath == null) {\n    return resolvePackageEntrySourcePath(packageEntry, manifest);\n  }\n\n  return resolveSourcePathCandidate(path.join(packageEntry.packageRoot, subpath), manifest);\n}\n\nasync function writeObjectFile(\n  sourcePath: string,\n  objectsRoot: string,\n  packageRoots: readonly string[],\n  manifest: ReactNativeTransformCacheManifest\n) {\n  const normalizedSourcePath = normalizePath(sourcePath);\n  const sourceBuffer = fs.readFileSync(normalizedSourcePath);\n  const extension = path.extname(normalizedSourcePath) || '.js';\n  let outputBuffer = sourceBuffer;\n\n  if (shouldTransformReactNativeFile(normalizedSourcePath, packageRoots)) {\n    try {\n      const transformed = await transformReactNativeSource(normalizedSourcePath, sourceBuffer.toString('utf8'));\n      outputBuffer = Buffer.from(transformed);\n    } catch {\n      outputBuffer = sourceBuffer;\n    }\n  }\n\n  const objectHash = createHash('sha256').update(normalizedSourcePath).update('\\0').update(outputBuffer).digest('hex');\n  const objectPath = path.join(objectsRoot, `${objectHash}${extension}`);\n\n  if (!fs.existsSync(objectPath)) {\n    fs.writeFileSync(objectPath, outputBuffer);\n  }\n\n  manifest.sourceToObject[normalizedSourcePath] = objectPath;\n  manifest.objectToSource[objectPath] = normalizedSourcePath;\n}\n\nasync function writePackageTreeObjects(\n  sourceRoot: string,\n  objectsRoot: string,\n  packageRoots: readonly string[],\n  manifest: ReactNativeTransformCacheManifest\n) {\n  const entries = fs\n    .readdirSync(sourceRoot, { withFileTypes: true })\n    .sort((left, right) => left.name.localeCompare(right.name));\n\n  for (const entry of entries) {\n    const sourcePath = path.join(sourceRoot, entry.name);\n\n    if (entry.isDirectory()) {\n      await writePackageTreeObjects(sourcePath, objectsRoot, packageRoots, manifest);\n      continue;\n    }\n\n    if (!entry.isFile()) {\n      continue;\n    }\n\n    await writeObjectFile(sourcePath, objectsRoot, packageRoots, manifest);\n  }\n}\n\nfunction readTransformCacheManifest(manifestPath: string) {\n  return JSON.parse(fs.readFileSync(manifestPath, 'utf8')) as ReactNativeTransformCacheManifest;\n}\n\nexport function loadReactNativeTransformCacheManifest(manifestPath: string) {\n  return readTransformCacheManifest(manifestPath);\n}\n\nexport async function buildReactNativeTransformCache(\n  workspaceRoot: string,\n  resolvedCacheDir: string = path.join(workspaceRoot, DEFAULT_VITEST_CACHE_DIRECTORY)\n): Promise<ReactNativeTransformCache> {\n  const cacheEntry = computeReactNativeTransformCacheKey(workspaceRoot);\n  const entriesRoot = path.join(\n    resolvedCacheDir,\n    GRANITE_VITEST_RN_CACHE_DIRECTORY,\n    GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY\n  );\n  const entryRoot = path.join(entriesRoot, cacheEntry.cacheKey);\n  const objectsRoot = path.join(entryRoot, GRANITE_VITEST_RN_OBJECTS_DIRECTORY);\n  const manifestPath = path.join(entryRoot, GRANITE_VITEST_RN_MANIFEST_FILENAME);\n  const metadataPath = path.join(entryRoot, GRANITE_VITEST_RN_CACHE_METADATA_FILENAME);\n\n  fs.mkdirSync(entriesRoot, { recursive: true });\n\n  if (fs.existsSync(entryRoot) && (!fs.existsSync(objectsRoot) || !fs.existsSync(manifestPath))) {\n    fs.rmSync(entryRoot, { force: true, recursive: true });\n  }\n\n  gcReactNativeMirrorCache(workspaceRoot, cacheEntry.cacheKey, resolvedCacheDir);\n\n  if (fs.existsSync(objectsRoot) && fs.existsSync(manifestPath) && fs.existsSync(metadataPath)) {\n    const manifest = readTransformCacheManifest(manifestPath);\n    const metadata = readMirrorCacheMetadata(entryRoot);\n    const lastAccessedAt = new Date().toISOString();\n\n    manifest.lastAccessedAt = lastAccessedAt;\n    fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));\n\n    if (metadata != null) {\n      metadata.lastAccessedAt = lastAccessedAt;\n      fs.writeFileSync(metadataPath, JSON.stringify(metadata, null, 2));\n    }\n\n    return {\n      entryRoot,\n      manifest,\n      manifestPath,\n      objectsRoot,\n    };\n  }\n\n  const temporaryEntryRoot = path.join(\n    entriesRoot,\n    `${GRANITE_VITEST_RN_CACHE_TMP_PREFIX}${process.pid}-${Date.now()}-${cacheEntry.cacheKey}`\n  );\n  const temporaryObjectsRoot = path.join(temporaryEntryRoot, GRANITE_VITEST_RN_OBJECTS_DIRECTORY);\n  const temporaryManifestPath = path.join(temporaryEntryRoot, GRANITE_VITEST_RN_MANIFEST_FILENAME);\n  const temporaryMetadataPath = path.join(temporaryEntryRoot, GRANITE_VITEST_RN_CACHE_METADATA_FILENAME);\n  const now = new Date().toISOString();\n  const packages = getReactNativePackageEntries(workspaceRoot);\n  const manifest: ReactNativeTransformCacheManifest = {\n    cacheKey: cacheEntry.cacheKey,\n    createdAt: now,\n    lastAccessedAt: now,\n    objectsRoot,\n    packageRoots: cacheEntry.packageRoots,\n    packages,\n    sourceToObject: {},\n    objectToSource: {},\n    transformDependencyVersions: cacheEntry.transformDependencyVersions,\n    transformImplementationHash: cacheEntry.transformImplementationHash,\n  };\n\n  fs.rmSync(temporaryEntryRoot, { force: true, recursive: true });\n  fs.mkdirSync(temporaryObjectsRoot, { recursive: true });\n\n  try {\n    const temporaryManifest = {\n      ...manifest,\n      objectsRoot: temporaryObjectsRoot,\n    };\n\n    for (const { packageRoot } of packages) {\n      await writePackageTreeObjects(packageRoot, temporaryObjectsRoot, cacheEntry.packageRoots, temporaryManifest);\n    }\n\n    const finalizedManifest = {\n      ...temporaryManifest,\n      objectsRoot,\n      sourceToObject: Object.fromEntries(\n        Object.entries(temporaryManifest.sourceToObject).map(([sourcePath, objectPath]) => [\n          sourcePath,\n          path.join(objectsRoot, path.basename(objectPath)),\n        ])\n      ),\n      objectToSource: Object.fromEntries(\n        Object.entries(temporaryManifest.objectToSource).map(([objectPath, sourcePath]) => [\n          path.join(objectsRoot, path.basename(objectPath)),\n          sourcePath,\n        ])\n      ),\n    };\n\n    fs.writeFileSync(temporaryManifestPath, JSON.stringify(finalizedManifest, null, 2));\n    fs.writeFileSync(\n      temporaryMetadataPath,\n      JSON.stringify(\n        {\n          cacheKey: cacheEntry.cacheKey,\n          createdAt: now,\n          lastAccessedAt: now,\n          packageRoots: cacheEntry.packageRoots,\n          sizeBytes: getDirectorySize(temporaryObjectsRoot),\n          transformDependencyVersions: cacheEntry.transformDependencyVersions,\n          transformImplementationHash: cacheEntry.transformImplementationHash,\n        },\n        null,\n        2\n      )\n    );\n\n    try {\n      fs.renameSync(temporaryEntryRoot, entryRoot);\n    } catch (error) {\n      const errorCode = (error as NodeJS.ErrnoException).code;\n\n      if (errorCode !== 'EEXIST' && errorCode !== 'ENOTEMPTY') {\n        throw error;\n      }\n    }\n  } finally {\n    fs.rmSync(temporaryEntryRoot, { force: true, recursive: true });\n  }\n\n  if (fs.existsSync(objectsRoot) && fs.existsSync(manifestPath) && fs.existsSync(metadataPath)) {\n    const manifest = readTransformCacheManifest(manifestPath);\n    const metadata = readMirrorCacheMetadata(entryRoot);\n    const lastAccessedAt = new Date().toISOString();\n\n    manifest.lastAccessedAt = lastAccessedAt;\n    fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));\n\n    if (metadata != null) {\n      metadata.lastAccessedAt = lastAccessedAt;\n      fs.writeFileSync(metadataPath, JSON.stringify(metadata, null, 2));\n    }\n\n    gcReactNativeMirrorCache(workspaceRoot, cacheEntry.cacheKey, resolvedCacheDir);\n    return {\n      entryRoot,\n      manifest,\n      manifestPath,\n      objectsRoot,\n    };\n  }\n\n  throw new Error(`Failed to materialize React Native transform cache at ${entryRoot}`);\n}\n\nexport async function buildReactNativeMirror(\n  workspaceRoot: string,\n  resolvedCacheDir: string = path.join(workspaceRoot, DEFAULT_VITEST_CACHE_DIRECTORY)\n) {\n  const cache = await buildReactNativeTransformCache(workspaceRoot, resolvedCacheDir);\n  return cache.objectsRoot;\n}\n"
  },
  {
    "path": "packages/vitest/src/reactNative.spec.ts",
    "content": "import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { describe, expect, it } from 'vitest';\nimport { mergeConfig } from 'vitest/config';\nimport * as vite from 'vitest/node';\nimport {\n  GRANITE_VITEST_RN_CACHE_DIRECTORY,\n  GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY,\n  GRANITE_VITEST_RN_MANIFEST_FILENAME,\n  JEST_LIKE_TEST_PATTERNS,\n  reactNative,\n  resolveReactNativeSetupFiles,\n} from './reactNative';\n\ntype PluginConfigResult = {\n  define?: Record<string, string>;\n  esbuild?: {\n    jsx: string;\n    jsxImportSource: string;\n  };\n  oxc?: {\n    jsx: {\n      importSource: string;\n      runtime: string;\n    };\n  };\n  resolve: {\n    alias?: Array<{ find: unknown; replacement: string }>;\n    conditions?: string[];\n    extensions: string[];\n  };\n  test: {\n    environment?: string;\n    globals?: boolean;\n    include?: string[];\n    setupFiles: string[];\n  };\n};\n\nasync function runPluginConfig(plugin: ReturnType<typeof reactNative>, conf = {}) {\n  const configHook = plugin.config;\n\n  if (configHook == null) {\n    throw new Error('reactNative plugin must expose a config hook');\n  }\n\n  if (typeof configHook === 'function') {\n    return (await configHook.call({} as never, conf as never, {} as never)) as unknown as PluginConfigResult;\n  }\n\n  return (await configHook.handler.call({} as never, conf as never, {} as never)) as unknown as PluginConfigResult;\n}\n\nasync function runPluginLoad(plugin: ReturnType<typeof reactNative>, id: string) {\n  const loadHook = plugin.load;\n\n  if (loadHook == null) {\n    return undefined;\n  }\n\n  if (typeof loadHook === 'function') {\n    return loadHook.call({} as never, id, undefined);\n  }\n\n  return loadHook.handler.call({} as never, id, undefined);\n}\n\nasync function runPluginResolveId(plugin: ReturnType<typeof reactNative>, id: string, importer?: string) {\n  const resolveIdHook = plugin.resolveId;\n\n  if (resolveIdHook == null) {\n    return undefined;\n  }\n\n  if (typeof resolveIdHook === 'function') {\n    return resolveIdHook.call({} as never, id, importer, {} as never);\n  }\n\n  return resolveIdHook.handler.call({} as never, id, importer, {} as never);\n}\n\ndescribe('reactNative plugin', () => {\n  it('prefers test.root when root is missing', async () => {\n    const plugin = reactNative();\n    const workspaceRoot = process.cwd();\n    const temporaryCwd = fs.mkdtempSync(path.join(os.tmpdir(), 'granite-vitest-cwd-'));\n    const originalCwd = process.cwd();\n\n    try {\n      process.chdir(temporaryCwd);\n\n      const config = await runPluginConfig(plugin, {\n        root: undefined,\n        test: {\n          root: workspaceRoot,\n        },\n      });\n\n      expect(config.define).toMatchObject({\n        'globalThis.__GRANITE_VITEST_RN_CACHE_MANIFEST__': expect.stringContaining(\n          path.join(\n            workspaceRoot,\n            '.vitest',\n            GRANITE_VITEST_RN_CACHE_DIRECTORY,\n            GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY\n          )\n        ),\n      });\n      expect(config.define?.['globalThis.__GRANITE_VITEST_RN_CACHE_MANIFEST__']).toContain(\n        GRANITE_VITEST_RN_MANIFEST_FILENAME\n      );\n    } finally {\n      process.chdir(originalCwd);\n    }\n  }, 60_000);\n\n  it('turns a Vitest config into a React Native-ready workspace setup', async () => {\n    const workspaceRoot = process.cwd();\n    const plugin = reactNative();\n    const config = await runPluginConfig(plugin, {\n      cacheDir: '.vitest',\n    });\n\n    expect(plugin.name).toBe('granite-react-native');\n    expect(config.test).toMatchObject({\n      environment: 'node',\n      globals: true,\n    });\n    expect(config.resolve.alias).toBeUndefined();\n    expect(config.resolve.extensions).toEqual(\n      expect.arrayContaining(['.android.tsx', '.android.ts', '.android.jsx', '.android.js'])\n    );\n    expect(config.test.setupFiles).toHaveLength(2);\n    for (const setupFile of config.test.setupFiles) {\n      expect(fs.existsSync(setupFile)).toBe(true);\n    }\n\n    if ('rolldownVersion' in vite) {\n      expect(config).toMatchObject({\n        oxc: {\n          jsx: {\n            importSource: 'react',\n            runtime: 'automatic',\n          },\n        },\n      });\n    } else {\n      expect(config).toMatchObject({\n        esbuild: {\n          jsx: 'automatic',\n          jsxImportSource: 'react',\n        },\n      });\n    }\n\n    expect(config.define).toMatchObject({\n      'globalThis.__GRANITE_VITEST_RN_CACHE_MANIFEST__': expect.stringContaining(\n        path.join(\n          workspaceRoot,\n          '.vitest',\n          GRANITE_VITEST_RN_CACHE_DIRECTORY,\n          GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY\n        )\n      ),\n    });\n    expect(config.define?.['globalThis.__GRANITE_VITEST_RN_CACHE_MANIFEST__']).toContain(\n      GRANITE_VITEST_RN_MANIFEST_FILENAME\n    );\n  }, 60_000);\n\n  it('preserves caller resolve and test config when Vitest merges plugin output', async () => {\n    const plugin = reactNative();\n    const callerConfig = {\n      resolve: {\n        alias: [{ find: '@', replacement: '/virtual/src' }],\n        conditions: ['custom-condition'],\n        extensions: ['.mjs'],\n      },\n      test: {\n        include: ['custom.test.ts'],\n        setupFiles: ['/virtual/setup.ts'],\n      },\n    };\n    const pluginConfig = await runPluginConfig(plugin, {});\n    const mergedConfig = mergeConfig(callerConfig, pluginConfig) as PluginConfigResult;\n\n    expect(mergedConfig.resolve.alias?.map(({ find }) => String(find))).toEqual(expect.arrayContaining(['@']));\n    expect(mergedConfig.resolve.conditions).toEqual(\n      expect.arrayContaining(['custom-condition', 'require', 'react-native'])\n    );\n    expect(mergedConfig.resolve.extensions).toEqual(expect.arrayContaining(['.mjs', '.ios.tsx', '.android.tsx']));\n    expect(mergedConfig.test.include).toEqual(expect.arrayContaining(['custom.test.ts', ...JEST_LIKE_TEST_PATTERNS]));\n    expect(mergedConfig.test.setupFiles).toEqual(\n      expect.arrayContaining(['/virtual/setup.ts', ...resolveReactNativeSetupFiles()])\n    );\n  });\n\n  it('loads React Native assets as tiny testUri modules', async () => {\n    const plugin = reactNative();\n    const assetModuleCode = await runPluginLoad(plugin, '/virtual/project/src/logo.png');\n\n    expect(assetModuleCode).toContain('testUri');\n    expect(assetModuleCode).toContain('logo.png');\n  });\n\n  it('resolves React Native modules through plugin resolveId without aliases', async () => {\n    const plugin = reactNative();\n    await runPluginConfig(plugin, {\n      cacheDir: fs.mkdtempSync(path.join(os.tmpdir(), 'granite-vitest-plugin-cache-')),\n    });\n\n    const resolvedReactNative = await runPluginResolveId(plugin, 'react-native');\n    const platformShim = await runPluginResolveId(plugin, 'react-native/Libraries/Utilities/Platform.js');\n    const platformFallback = await runPluginResolveId(plugin, './Platform', String(platformShim));\n\n    expect(String(resolvedReactNative)).toMatch(/[a-f0-9]+\\.js$/);\n    expect(String(platformShim)).toMatch(/[a-f0-9]+\\.js$/);\n    expect(String(platformFallback)).toMatch(/[a-f0-9]+\\.js$/);\n    expect(platformFallback).not.toBe(platformShim);\n  }, 60_000);\n});\n"
  },
  {
    "path": "packages/vitest/src/reactNative.ts",
    "content": "import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { Plugin } from 'vitest/config';\nimport * as vite from 'vitest/node';\nimport { REACT_NATIVE_ASSET_EXTENSIONS, REACT_NATIVE_ASSET_MODULE_ID_PATTERN } from './assets';\nimport {\n  DEFAULT_PLATFORM,\n  buildReactNativeMirror,\n  buildReactNativeTransformCache,\n  GRANITE_VITEST_RN_CACHE_DIRECTORY,\n  GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY,\n  GRANITE_VITEST_RN_MANIFEST_FILENAME,\n  GRANITE_VITEST_RN_OBJECTS_DIRECTORY,\n  GRANITE_VITEST_RN_PACKAGES_DIRECTORY,\n  REACT_NATIVE_PLATFORMS,\n  resolveReactNativeModuleFromManifest,\n  resolvePackageRoot,\n  resolveReactNativePackageRoots,\n  type ReactNativeTransformCache,\n} from './mirror';\nimport {\n  REACT_NATIVE_TRANSFORM_ALLOWLIST,\n  REACT_NATIVE_TRANSFORM_EXTENSIONS,\n  shouldInlineReactNativeDependency,\n  shouldTransformReactNativeFile,\n} from './transpile';\n\nconst PLATFORM_RESOLUTION_ORDER = [\n  DEFAULT_PLATFORM,\n  'native',\n  ...REACT_NATIVE_PLATFORMS.filter((platform) => platform !== DEFAULT_PLATFORM && platform !== 'native'),\n] as const;\nconst PLATFORM_EXTENSION_SUFFIXES = ['tsx', 'ts', 'jsx', 'js'] as const;\n\nexport const REACT_NATIVE_RESOLVE_EXTENSIONS = [\n  ...PLATFORM_RESOLUTION_ORDER.flatMap((platform) =>\n    PLATFORM_EXTENSION_SUFFIXES.map((extension) => `.${platform}.${extension}`)\n  ),\n  '.tsx',\n  '.ts',\n  '.jsx',\n  '.js',\n  '.json',\n] as const;\nexport const REACT_NATIVE_EXPORT_CONDITIONS = ['require', 'react-native'] as const;\nexport const JEST_LIKE_TEST_PATTERNS = [\n  '**/__tests__/**/*.test.{js,jsx,ts,tsx}',\n  '**/__tests__/**/*.spec.{js,jsx,ts,tsx}',\n  '**/?(*.)test.{js,jsx,ts,tsx}',\n  '**/?(*.)spec.{js,jsx,ts,tsx}',\n] as const;\n\nconst currentFilePath = fs.realpathSync(fileURLToPath(import.meta.url));\nconst currentDirectory = path.dirname(currentFilePath);\n\nfunction getSetupFileExtension() {\n  const extension = path.extname(currentFilePath);\n\n  if (extension === '.ts' || extension === '.mts') {\n    return '.ts';\n  }\n\n  return '.js';\n}\n\nexport function resolveReactNativeSetupFiles() {\n  const extension = getSetupFileExtension();\n\n  return [\n    path.join(currentDirectory, `reactNativeRuntime${extension}`),\n    path.join(currentDirectory, `setup${extension}`),\n  ];\n}\n\nexport function reactNative(): Plugin {\n  let reactNativeTransformCache: ReactNativeTransformCache | null = null;\n\n  return {\n    enforce: 'pre',\n    name: 'granite-react-native',\n    async config(conf) {\n      const workspaceRoot = conf.root ?? conf.test?.root ?? process.cwd();\n      const cacheDir = conf.cacheDir ?? '.vitest';\n      const resolvedCacheDir = path.isAbsolute(cacheDir) ? cacheDir : path.join(workspaceRoot, cacheDir);\n\n      reactNativeTransformCache = await buildReactNativeTransformCache(workspaceRoot, resolvedCacheDir);\n\n      const resolve = {\n        conditions: [...REACT_NATIVE_EXPORT_CONDITIONS],\n        extensions: [...REACT_NATIVE_RESOLVE_EXTENSIONS],\n      };\n\n      const commonConfig = {\n        define: {\n          'globalThis.__GRANITE_VITEST_RN_CACHE_MANIFEST__': JSON.stringify(reactNativeTransformCache.manifestPath),\n        },\n        resolve,\n        test: {\n          environment: 'node',\n          globals: true,\n          include: [...JEST_LIKE_TEST_PATTERNS],\n          setupFiles: resolveReactNativeSetupFiles(),\n        },\n      };\n\n      if ('rolldownVersion' in vite) {\n        return {\n          oxc: {\n            jsx: {\n              importSource: 'react',\n              runtime: 'automatic',\n            },\n          },\n          ...commonConfig,\n        };\n      }\n\n      return {\n        esbuild: {\n          jsx: 'automatic',\n          jsxImportSource: 'react',\n        } as any,\n        ...commonConfig,\n      };\n    },\n    resolveId(id: string, importer?: string) {\n      if (reactNativeTransformCache == null) {\n        return undefined;\n      }\n\n      const resolved = resolveReactNativeModuleFromManifest(id, importer, reactNativeTransformCache.manifest);\n\n      return resolved?.objectPath;\n    },\n    load(id: string) {\n      const isReactNativeAsset = REACT_NATIVE_ASSET_MODULE_ID_PATTERN.test(id);\n\n      if (!isReactNativeAsset) {\n        return undefined;\n      }\n\n      // Match React Native's Jest asset transformer by exporting `{ testUri }`.\n      const asset = {\n        testUri: path.relative(currentDirectory, id.replace(/[?#].*$/, '')).replace(/\\\\/g, '/'),\n      };\n\n      return [\n        `const asset = ${JSON.stringify(asset)};`,\n        'export const testUri = asset.testUri;',\n        'export default asset;',\n      ].join('\\n');\n    },\n  };\n}\n\nexport {\n  DEFAULT_PLATFORM,\n  GRANITE_VITEST_RN_CACHE_DIRECTORY,\n  GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY,\n  GRANITE_VITEST_RN_MANIFEST_FILENAME,\n  GRANITE_VITEST_RN_OBJECTS_DIRECTORY,\n  GRANITE_VITEST_RN_PACKAGES_DIRECTORY,\n  REACT_NATIVE_PLATFORMS,\n  REACT_NATIVE_ASSET_EXTENSIONS,\n  REACT_NATIVE_TRANSFORM_ALLOWLIST,\n  REACT_NATIVE_TRANSFORM_EXTENSIONS,\n  buildReactNativeMirror,\n  buildReactNativeTransformCache,\n  resolvePackageRoot,\n  resolveReactNativeModuleFromManifest,\n  resolveReactNativePackageRoots,\n  shouldInlineReactNativeDependency,\n  shouldTransformReactNativeFile,\n};\n"
  },
  {
    "path": "packages/vitest/src/reactNativeRuntime.spec.ts",
    "content": "import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { afterAll, beforeAll, describe, expect, it, vi } from 'vitest';\nimport {\n  buildReactNativeTransformCache,\n  GRANITE_VITEST_RN_CACHE_DIRECTORY,\n  GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY,\n} from './reactNative';\n\ndescribe('reactNativeRuntime bootstrap', () => {\n  let ReactNative: Record<string, any>;\n  let RendererProxy: Record<string, any>;\n  const runtimeGlobals = globalThis as typeof globalThis & {\n    __DEV__?: boolean;\n    __GRANITE_VITEST_RN_CACHE_MANIFEST__?: string;\n    IS_REACT_ACT_ENVIRONMENT?: boolean;\n    IS_REACT_NATIVE_TEST_ENVIRONMENT?: boolean;\n    ErrorUtils?: Record<string, unknown>;\n    nativeFabricUIManager?: Record<string, unknown>;\n    window?: typeof globalThis;\n  };\n  const originalManifestPath = runtimeGlobals.__GRANITE_VITEST_RN_CACHE_MANIFEST__;\n  const originalErrorUtils = runtimeGlobals.ErrorUtils;\n\n  afterAll(() => {\n    if (originalManifestPath == null) {\n      delete runtimeGlobals.__GRANITE_VITEST_RN_CACHE_MANIFEST__;\n    } else {\n      runtimeGlobals.__GRANITE_VITEST_RN_CACHE_MANIFEST__ = originalManifestPath;\n    }\n\n    if (originalErrorUtils == null) {\n      delete runtimeGlobals.ErrorUtils;\n    } else {\n      runtimeGlobals.ErrorUtils = originalErrorUtils;\n    }\n  });\n\n  it('fails fast when reactNative() did not configure the mirror cache root', async () => {\n    delete runtimeGlobals.__GRANITE_VITEST_RN_CACHE_MANIFEST__;\n    vi.resetModules();\n\n    await expect(import('./reactNativeRuntime')).rejects.toThrow(\n      'reactNativeRuntime requires reactNative() in vitest.config'\n    );\n  });\n\n  describe('with a configured mirror cache root', () => {\n    beforeAll(async () => {\n      const cache = await buildReactNativeTransformCache(process.cwd());\n\n      runtimeGlobals.__GRANITE_VITEST_RN_CACHE_MANIFEST__ = cache.manifestPath;\n      vi.resetModules();\n\n      await import('./reactNativeRuntime');\n      ReactNative = await import('react-native');\n      RendererProxy = await import('react-native/Libraries/ReactNative/RendererProxy');\n    });\n\n    it('installs the React Native test globals needed to boot the runtime', () => {\n      expect(runtimeGlobals.__DEV__).toBe(true);\n      expect(runtimeGlobals.IS_REACT_ACT_ENVIRONMENT).toBe(true);\n      expect(runtimeGlobals.IS_REACT_NATIVE_TEST_ENVIRONMENT).toBe(true);\n      expect(runtimeGlobals.window).toBe(runtimeGlobals);\n      expect(runtimeGlobals.nativeFabricUIManager).toEqual({});\n      expect(runtimeGlobals.performance.now).toEqual(expect.any(Function));\n      expect(runtimeGlobals.requestAnimationFrame).toEqual(expect.any(Function));\n      expect(runtimeGlobals.cancelAnimationFrame).toEqual(expect.any(Function));\n      expect(runtimeGlobals.ErrorUtils).toMatchObject({\n        applyWithGuard: expect.any(Function),\n        applyWithGuardIfNeeded: expect.any(Function),\n        getGlobalHandler: expect.any(Function),\n        guard: expect.any(Function),\n        inGuard: expect.any(Function),\n        reportError: expect.any(Function),\n        reportFatalError: expect.any(Function),\n        setGlobalHandler: expect.any(Function),\n      });\n    });\n\n    it('exposes a representative React Native facade for tests', () => {\n      expect(ReactNative.unstable_NativeText).toBeDefined();\n      expect(ReactNative.unstable_NativeView).toBeDefined();\n      expect(ReactNative.unstable_TextAncestorContext).toBeDefined();\n      expect(ReactNative.unstable_VirtualView).toBeDefined();\n      expect(ReactNative.usePressability).toEqual(expect.any(Function));\n      expect(ReactNative.NativeComponentRegistry).toBeDefined();\n\n      expect(ReactNative.unstable_TextAncestorContext.displayName).toBe('TextAncestorContext');\n      expect(ReactNative.NativeComponentRegistry).toMatchObject({\n        get: expect.any(Function),\n        setRuntimeConfigProvider: expect.any(Function),\n      });\n      expect(ReactNative.usePressability(null)).toBeNull();\n      expect(\n        ReactNative.usePressability({\n          onBlur: () => undefined,\n          onPress: () => undefined,\n          unstable_pressDelay: 10,\n        })\n      ).toEqual({\n        onBlur: expect.any(Function),\n        onPress: expect.any(Function),\n      });\n      expect(ReactNative.VirtualViewMode).toMatchObject({\n        Hidden: expect.any(Number),\n        Prerender: expect.any(Number),\n        Visible: expect.any(Number),\n      });\n      expect(ReactNative.ReactNativeVersion.getVersionString()).toEqual(expect.any(String));\n    });\n\n    it('matches the React Native AppState contract shape', () => {\n      expect(ReactNative.AppState).toMatchObject({\n        addEventListener: expect.any(Function),\n        removeEventListener: expect.any(Function),\n      });\n      expect(ReactNative.AppState.currentState).toBe('active');\n    });\n\n    it('provides the renderer bridge RN test helpers expect', () => {\n      expect(RendererProxy).toMatchObject({\n        findNodeHandle: expect.any(Function),\n        unstable_batchedUpdates: expect.any(Function),\n      });\n    });\n\n    it('does not treat an existing mirror cache entry as the source package roots', async () => {\n      const resolvedCacheDir = fs.mkdtempSync(path.join(os.tmpdir(), 'granite-vitest-runtime-cache-'));\n      const cache = await buildReactNativeTransformCache(process.cwd(), resolvedCacheDir);\n      const metadataPath = path.join(cache.entryRoot, 'meta.json');\n      const metadata = JSON.parse(fs.readFileSync(metadataPath, 'utf8')) as {\n        packageRoots: string[];\n      };\n      const cacheEntriesPath = path.join(GRANITE_VITEST_RN_CACHE_DIRECTORY, GRANITE_VITEST_RN_CACHE_ENTRIES_DIRECTORY);\n\n      expect(metadata.packageRoots).toEqual(expect.not.arrayContaining([expect.stringContaining(cacheEntriesPath)]));\n    });\n\n    it('stores transformed React Native files without package boundaries', async () => {\n      const resolvedCacheDir = fs.mkdtempSync(path.join(os.tmpdir(), 'granite-vitest-runtime-cache-'));\n      const cache = await buildReactNativeTransformCache(process.cwd(), resolvedCacheDir);\n      const cacheEntryBasenames = fs\n        .readdirSync(cache.entryRoot, { recursive: true })\n        .map((entry) => path.basename(String(entry)));\n\n      expect(cacheEntryBasenames).not.toContain('packages');\n      expect(cacheEntryBasenames).not.toContain('package.json');\n    });\n  });\n});\n"
  },
  {
    "path": "packages/vitest/src/reactNativeRuntime.ts",
    "content": "/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/member-ordering, @typescript-eslint/no-inferrable-types, @typescript-eslint/no-unsafe-function-type, @typescript-eslint/no-unused-vars, import/order */\n// @ts-nocheck\nimport path from 'node:path';\nimport Module, { createRequire } from 'node:module';\nimport { fileURLToPath } from 'node:url';\nimport type { ReactNode } from 'react';\nimport { vi } from 'vitest';\nimport { REACT_NATIVE_ASSET_MODULE_ID_PATTERN } from './assets';\nimport {\n  loadReactNativeTransformCacheManifest,\n  resolveReactNativeModuleFromManifest,\n  type ReactNativeTransformCacheManifest,\n} from './mirror';\nimport {\n  defineGlobalProperty,\n  installNativeModuleProxy,\n  installReactNativeGlobals,\n  type RuntimeGlobals,\n} from './runtimeBootstrap';\n\ntype ModuleWithPrivateResolver = typeof Module & {\n  _load: (request: string, parent: any, isMain: boolean) => unknown;\n  _resolveFilename: (request: string, parent: any, isMain: boolean, options?: Record<string, unknown>) => string;\n};\n\ntype ReactModule = typeof import('react');\n\nconst runtimeGlobals = globalThis as RuntimeGlobals;\nconst runtimeDirectory = path.dirname(fileURLToPath(import.meta.url));\nconst runtimeRequire = createRequire(import.meta.url);\n\nfunction resolveReactNativeManifestPath() {\n  if (\n    typeof globalThis.__GRANITE_VITEST_RN_CACHE_MANIFEST__ === 'string' &&\n    globalThis.__GRANITE_VITEST_RN_CACHE_MANIFEST__.length > 0\n  ) {\n    return path.resolve(globalThis.__GRANITE_VITEST_RN_CACHE_MANIFEST__);\n  }\n\n  throw new Error(\n    '[@granite-js/vitest] reactNativeRuntime requires reactNative() in vitest.config to set __GRANITE_VITEST_RN_CACHE_MANIFEST__.'\n  );\n}\n\nconst reactNativeTransformCacheManifest = loadReactNativeTransformCacheManifest(resolveReactNativeManifestPath());\n\nfunction resolveReactNativeObjectPath(\n  request: string,\n  importer?: string,\n  manifest: ReactNativeTransformCacheManifest = reactNativeTransformCacheManifest\n) {\n  const resolved = resolveReactNativeModuleFromManifest(request, importer, manifest);\n\n  if (resolved == null) {\n    throw new Error(`[@granite-js/vitest] Failed to resolve React Native module: ${request}`);\n  }\n\n  return resolved.objectPath;\n}\n\nlet nextNativeTag = 1;\n\nfunction createMockNativeMethods() {\n  return {\n    blur: vi.fn(),\n    focus: vi.fn(),\n    measure: vi.fn(),\n    measureInWindow: vi.fn(),\n    measureLayout: vi.fn(),\n    setNativeProps: vi.fn(),\n  };\n}\n\nfunction createMockHostComponent(\n  React: ReactModule,\n  displayName: string,\n  hostType: string,\n  instanceMethods: Record<string, unknown> = {},\n  realComponent?: any\n): any {\n  const resolvedRealComponent = realComponent ?? null;\n  const superClass =\n    typeof resolvedRealComponent === 'function' &&\n    (resolvedRealComponent.prototype instanceof React.Component ||\n      resolvedRealComponent.prototype?.isReactComponent != null)\n      ? resolvedRealComponent\n      : React.Component;\n  const resolvedName =\n    resolvedRealComponent?.displayName ||\n    resolvedRealComponent?.name ||\n    resolvedRealComponent?.render?.displayName ||\n    resolvedRealComponent?.render?.name ||\n    displayName;\n  const resolvedHostType = hostType || resolvedName.replace(/^(RCT|RK)/, '');\n\n  class Component extends superClass {\n    render(): ReactNode {\n      const sourceProps = this.props as Record<string, unknown> & { children?: ReactNode };\n      const props = {\n        ...(resolvedRealComponent?.defaultProps ?? {}),\n      } as Record<string, unknown> & { children?: ReactNode };\n\n      Object.keys(sourceProps).forEach((propName) => {\n        if (sourceProps[propName] !== undefined) {\n          props[propName] = sourceProps[propName];\n        }\n      });\n\n      return React.createElement(resolvedHostType, props as any, props.children);\n    }\n  }\n\n  if (resolvedRealComponent != null) {\n    Object.keys(resolvedRealComponent).forEach((classStatic) => {\n      (Component as any)[classStatic] = resolvedRealComponent[classStatic];\n    });\n  }\n\n  Object.assign(Component.prototype, instanceMethods);\n\n  Object.defineProperty(Component, 'name', {\n    configurable: true,\n    enumerable: false,\n    value: resolvedName,\n    writable: false,\n  });\n\n  Object.defineProperty(Component, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: resolvedHostType,\n    writable: true,\n  });\n\n  return Component;\n}\n\nfunction createMockNativeComponent(React: ReactModule, viewName: string): any {\n  const hostName = viewName === 'RCTView' ? 'View' : viewName;\n\n  class Component extends React.Component<Record<string, unknown>> {\n    _nativeTag = nextNativeTag++;\n\n    render(): ReactNode {\n      const props = this.props as Record<string, unknown> & { children?: ReactNode };\n      return React.createElement(hostName, props as any, props.children);\n    }\n  }\n\n  Object.assign(Component.prototype, createMockNativeMethods());\n\n  Object.defineProperty(Component, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: hostName,\n    writable: true,\n  });\n\n  return Component;\n}\n\nfunction createAccessibilityInfoMockModule() {\n  return {\n    __esModule: true,\n    default: {\n      addEventListener: vi.fn(() => ({\n        remove: vi.fn(),\n      })),\n      announceForAccessibility: vi.fn(),\n      announceForAccessibilityWithOptions: vi.fn(),\n      getRecommendedTimeoutMillis: vi.fn(() => Promise.resolve(false)),\n      isAccessibilityServiceEnabled: vi.fn(() => Promise.resolve(false)),\n      isBoldTextEnabled: vi.fn(() => Promise.resolve(false)),\n      isDarkerSystemColorsEnabled: vi.fn(() => Promise.resolve(false)),\n      isGrayscaleEnabled: vi.fn(() => Promise.resolve(false)),\n      isHighTextContrastEnabled: vi.fn(() => Promise.resolve(false)),\n      isInvertColorsEnabled: vi.fn(() => Promise.resolve(false)),\n      isReduceMotionEnabled: vi.fn(() => Promise.resolve(false)),\n      isReduceTransparencyEnabled: vi.fn(() => Promise.resolve(false)),\n      isScreenReaderEnabled: vi.fn(() => Promise.resolve(false)),\n      prefersCrossFadeTransitions: vi.fn(() => Promise.resolve(false)),\n      sendAccessibilityEvent: vi.fn(),\n      setAccessibilityFocus: vi.fn(),\n    },\n  };\n}\n\nfunction createClipboardMockModule() {\n  return {\n    __esModule: true,\n    default: {\n      getString: vi.fn(() => ''),\n      setString: vi.fn(),\n    },\n  };\n}\n\nfunction createRefreshControlMockModule() {\n  const React = runtimeRequire('react') as ReactModule;\n  const RCTRefreshControl = createMockNativeComponent(React, 'RCTRefreshControl');\n\n  class RefreshControlMock extends React.Component<Record<string, unknown>> {\n    static latestRef: unknown;\n\n    componentDidMount() {\n      RefreshControlMock.latestRef = this;\n    }\n\n    render() {\n      return React.createElement(RCTRefreshControl);\n    }\n  }\n\n  return {\n    __esModule: true,\n    default: RefreshControlMock,\n  };\n}\n\nfunction createActivityIndicatorMockModule() {\n  const React = runtimeRequire('react') as ReactModule;\n  return {\n    __esModule: true,\n    default: createMockHostComponent(React, 'ActivityIndicator', 'ActivityIndicator'),\n  };\n}\n\nfunction createImageMockModule() {\n  const React = runtimeRequire('react') as ReactModule;\n  return {\n    __esModule: true,\n    default: createMockHostComponent(React, 'Image', 'Image'),\n  };\n}\n\nfunction createTextMockModule() {\n  const React = runtimeRequire('react') as ReactModule;\n  return {\n    __esModule: true,\n    default: createMockHostComponent(React, 'Text', 'Text', createMockNativeMethods()),\n  };\n}\n\nfunction createTextInputMockModule() {\n  const React = runtimeRequire('react') as ReactModule;\n  return {\n    __esModule: true,\n    default: createMockHostComponent(React, 'TextInput', 'TextInput', {\n      ...createMockNativeMethods(),\n      clear: vi.fn(),\n      getNativeRef: vi.fn(function getNativeRef(this: unknown) {\n        return this;\n      }),\n      isFocused: vi.fn(() => false),\n    }),\n  };\n}\n\nfunction createModalMockModule() {\n  const React = runtimeRequire('react') as ReactModule;\n  const BaseComponent = createMockHostComponent(React, 'Modal', 'Modal');\n\n  class ModalMock extends BaseComponent {\n    render(): ReactNode {\n      const props = this.props as Record<string, unknown> & {\n        children?: ReactNode;\n        visible?: boolean;\n      };\n\n      if (props.visible === false) {\n        return null;\n      }\n\n      return React.createElement(BaseComponent, props as any, props.children);\n    }\n  }\n\n  Object.defineProperty(ModalMock, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: 'Modal',\n    writable: true,\n  });\n\n  return {\n    __esModule: true,\n    default: ModalMock,\n  };\n}\n\nfunction createViewMockModule() {\n  const React = runtimeRequire('react') as ReactModule;\n  return {\n    __esModule: true,\n    default: createMockHostComponent(React, 'View', 'View', createMockNativeMethods()),\n  };\n}\n\nfunction createScrollViewMockModule(sharedView?: unknown) {\n  const React = runtimeRequire('react') as ReactModule;\n  const BaseComponent = createMockHostComponent(React, 'ScrollView', 'ScrollView', {\n    ...createMockNativeMethods(),\n    flashScrollIndicators: vi.fn(),\n    getInnerViewNode: vi.fn(),\n    getInnerViewRef: vi.fn(),\n    getNativeScrollRef: vi.fn(),\n    getScrollResponder: vi.fn(),\n    getScrollableNode: vi.fn(),\n    scrollResponderScrollNativeHandleToKeyboard: vi.fn(),\n    scrollResponderZoomTo: vi.fn(),\n    scrollTo: vi.fn(),\n    scrollToEnd: vi.fn(),\n  });\n  const View = sharedView ?? createViewMockModule().default;\n  const RCTScrollView = createMockNativeComponent(React, 'RCTScrollView');\n\n  class ScrollViewMock extends BaseComponent {\n    render(): ReactNode {\n      const props = this.props as Record<string, unknown> & {\n        children?: ReactNode;\n        refreshControl?: ReactNode;\n      };\n\n      return React.createElement(\n        RCTScrollView,\n        props as any,\n        props.refreshControl,\n        React.createElement(View, null, props.children)\n      );\n    }\n  }\n\n  Object.defineProperty(ScrollViewMock, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: 'ScrollView',\n    writable: true,\n  });\n\n  return {\n    __esModule: true,\n    default: ScrollViewMock,\n  };\n}\n\nfunction createAppStateMockModule() {\n  return {\n    __esModule: true,\n    default: {\n      addEventListener: vi.fn(() => ({\n        remove: vi.fn(),\n      })),\n      currentState: 'active',\n      removeEventListener: vi.fn(),\n    },\n  };\n}\n\nfunction createLinkingMockModule() {\n  return {\n    __esModule: true,\n    default: {\n      addEventListener: vi.fn(() => ({\n        remove: vi.fn(),\n      })),\n      canOpenURL: vi.fn(() => Promise.resolve(true)),\n      getInitialURL: vi.fn(() => Promise.resolve()),\n      openSettings: vi.fn(),\n      openURL: vi.fn(),\n      sendIntent: vi.fn(),\n    },\n  };\n}\n\nfunction createVibrationMockModule() {\n  return {\n    __esModule: true,\n    default: {\n      cancel: vi.fn(),\n      vibrate: vi.fn(),\n    },\n  };\n}\n\nfunction createViewNativeComponentMockModule() {\n  const React = runtimeRequire('react') as ReactModule;\n  return {\n    __esModule: true,\n    default: createMockHostComponent(React, 'View', 'View'),\n  };\n}\n\nfunction createUseColorSchemeMockModule() {\n  return {\n    __esModule: true,\n    default: vi.fn().mockReturnValue('light'),\n  };\n}\n\nfunction createPlatformMockModule() {\n  const platformConstants = runtimeGlobals.nativeModuleProxy?.PlatformConstants?.getConstants?.() ?? {\n    forceTouchAvailable: false,\n    interfaceIdiom: 'phone',\n    isDisableAnimations: false,\n    isMacCatalyst: false,\n    isTesting: true,\n    osVersion: '17.0',\n    reactNativeVersion: {\n      major: 0,\n      minor: 79,\n      patch: 5,\n      prerelease: undefined,\n    },\n    systemName: 'iOS',\n  };\n\n  const platform = {\n    OS: 'ios',\n    select: <T>(spec: { default?: T; ios?: T; native?: T }) =>\n      'ios' in spec ? spec.ios : 'native' in spec ? spec.native : spec.default,\n    get Version() {\n      return platformConstants.osVersion;\n    },\n    get constants() {\n      return platformConstants;\n    },\n    get isPad() {\n      return platformConstants.interfaceIdiom === 'pad';\n    },\n    get isTV() {\n      return platformConstants.interfaceIdiom === 'tv';\n    },\n    get isVision() {\n      return platformConstants.interfaceIdiom === 'vision';\n    },\n    get isTesting() {\n      return runtimeGlobals.__DEV__ ? platformConstants.isTesting : false;\n    },\n    get isDisableAnimations() {\n      return platformConstants.isDisableAnimations ?? platform.isTesting;\n    },\n    get isMacCatalyst() {\n      return platformConstants.isMacCatalyst ?? false;\n    },\n  };\n\n  return {\n    __esModule: true,\n    default: platform,\n  };\n}\n\nfunction createStyleSheetMockModule() {\n  const styleSheet = {\n    absoluteFill: {\n      bottom: 0,\n      left: 0,\n      position: 'absolute',\n      right: 0,\n      top: 0,\n    },\n    absoluteFillObject: {\n      bottom: 0,\n      left: 0,\n      position: 'absolute',\n      right: 0,\n      top: 0,\n    },\n    compose: vi.fn((left: unknown, right: unknown) => {\n      if (left == null) {\n        return right;\n      }\n\n      if (right == null) {\n        return left;\n      }\n\n      return [left, right];\n    }),\n    create: vi.fn(<T extends Record<string, unknown>>(styles: T) => styles),\n    flatten: vi.fn((style: unknown) => {\n      if (!Array.isArray(style)) {\n        return style ?? {};\n      }\n\n      return style.filter(Boolean).reduce<Record<string, unknown>>((accumulator, value) => {\n        if (typeof value === 'object' && value != null && !Array.isArray(value)) {\n          Object.assign(accumulator, value);\n        }\n\n        return accumulator;\n      }, {});\n    }),\n    hairlineWidth: 1,\n    setStyleAttributePreprocessor: vi.fn(),\n  };\n\n  return {\n    __esModule: true,\n    ...styleSheet,\n    default: styleSheet,\n  };\n}\n\nfunction createInitializeCoreMockModule() {\n  return {\n    __esModule: true,\n    default: {},\n  };\n}\n\nfunction createNativeExceptionsManagerMockModule() {\n  const nativeExceptionsManager = {\n    dismissRedbox: vi.fn(),\n    reportException: vi.fn(),\n    updateExceptionMessage: vi.fn(),\n  };\n\n  return {\n    __esModule: true,\n    default: nativeExceptionsManager,\n    ...nativeExceptionsManager,\n  };\n}\n\nfunction createRendererProxyMockModule() {\n  const rendererProxy = {\n    dispatchCommand: vi.fn(),\n    findHostInstance_DEPRECATED: vi.fn((component: unknown) => component ?? null),\n    findNodeHandle: vi.fn((component: { _nativeTag?: number } | null | undefined) => {\n      if (component == null) {\n        return null;\n      }\n\n      return component._nativeTag ?? 1;\n    }),\n    getNodeFromInternalInstanceHandle: vi.fn((handle: unknown) => handle ?? null),\n    getPublicInstanceFromInternalInstanceHandle: vi.fn((handle: unknown) => handle ?? null),\n    getPublicInstanceFromRootTag: vi.fn((rootTag: unknown) => rootTag ?? null),\n    isChildPublicInstance: vi.fn(() => false),\n    isProfilingRenderer: vi.fn(() => false),\n    renderElement: vi.fn(),\n    sendAccessibilityEvent: vi.fn(),\n    unstable_batchedUpdates: vi.fn(<T>(callback: (...args: any[]) => T, ...args: any[]) => callback(...args)),\n    unmountComponentAtNodeAndRemoveContainer: vi.fn(),\n  };\n\n  return {\n    __esModule: true,\n    ...rendererProxy,\n    default: rendererProxy,\n  };\n}\n\nfunction createUIManagerMockModule() {\n  return {\n    __esModule: true,\n    default: runtimeGlobals.nativeModuleProxy?.UIManager ?? {},\n  };\n}\n\nfunction createNativeModulesMockModule() {\n  return {\n    __esModule: true,\n    default: runtimeGlobals.nativeModuleProxy ?? {},\n  };\n}\n\nfunction createNativeComponentRegistryMockModule() {\n  const registry = {\n    get: vi.fn((name: string) => createMockNativeComponent(runtimeRequire('react') as ReactModule, name)),\n    getWithFallback_DEPRECATED: vi.fn((name: string) =>\n      createMockNativeComponent(runtimeRequire('react') as ReactModule, name)\n    ),\n    setRuntimeConfigProvider: vi.fn(),\n    unstable_hasStaticViewConfig: vi.fn(() => false),\n  };\n\n  return {\n    __esModule: true,\n    ...registry,\n    default: registry,\n  };\n}\n\nfunction createRequireNativeComponentMockModule() {\n  return {\n    __esModule: true,\n    default: vi.fn((name: string) => createMockNativeComponent(runtimeRequire('react') as ReactModule, name)),\n  };\n}\n\nfunction createCodegenNativeComponentMockModule() {\n  const codegenNativeComponent = vi.fn(\n    (\n      componentName: string,\n      options?: {\n        interfaceOnly?: boolean;\n        paperComponentName?: string;\n        paperComponentNameDeprecated?: string;\n      }\n    ) => {\n      const { requireNativeComponentModule, uiManagerModule } = getSharedReactNativeMockModules();\n      const requireNativeComponent = (requireNativeComponentModule as any).default ?? requireNativeComponentModule;\n      const uiManager = (uiManagerModule as any).default ?? uiManagerModule;\n\n      let componentNameInUse = options?.paperComponentName != null ? options.paperComponentName : componentName;\n\n      if (options?.paperComponentNameDeprecated != null && typeof uiManager?.hasViewManagerConfig === 'function') {\n        if (uiManager.hasViewManagerConfig(componentName)) {\n          componentNameInUse = componentName;\n        } else if (uiManager.hasViewManagerConfig(options.paperComponentNameDeprecated)) {\n          componentNameInUse = options.paperComponentNameDeprecated;\n        }\n      }\n\n      return requireNativeComponent(componentNameInUse);\n    }\n  );\n\n  return {\n    __esModule: true,\n    default: codegenNativeComponent,\n  };\n}\n\nfunction createCodegenNativeCommandsMockModule() {\n  const codegenNativeCommands = vi.fn((options: { supportedCommands?: string[] }) => {\n    const { rendererProxyModule } = getSharedReactNativeMockModules();\n    const rendererProxy = (rendererProxyModule as any).default ?? rendererProxyModule;\n    const commandObject: Record<string, ReturnType<typeof vi.fn>> = {};\n\n    for (const command of options.supportedCommands ?? []) {\n      commandObject[command] = vi.fn((ref: unknown, ...args: unknown[]) => {\n        rendererProxy.dispatchCommand(ref, command, args);\n      });\n    }\n\n    return commandObject;\n  });\n\n  return {\n    __esModule: true,\n    default: codegenNativeCommands,\n  };\n}\n\ntype SharedReactNativeMockModules = {\n  accessibilityInfoModule: ReturnType<typeof createAccessibilityInfoMockModule>;\n  activityIndicatorModule: ReturnType<typeof createActivityIndicatorMockModule>;\n  appStateModule: ReturnType<typeof createAppStateMockModule>;\n  clipboardModule: ReturnType<typeof createClipboardMockModule>;\n  codegenNativeCommandsModule: ReturnType<typeof createCodegenNativeCommandsMockModule>;\n  codegenNativeComponentModule: ReturnType<typeof createCodegenNativeComponentMockModule>;\n  imageModule: ReturnType<typeof createImageMockModule>;\n  initializeCoreModule: ReturnType<typeof createInitializeCoreMockModule>;\n  linkingModule: ReturnType<typeof createLinkingMockModule>;\n  modalModule: ReturnType<typeof createModalMockModule>;\n  nativeComponentRegistryModule: ReturnType<typeof createNativeComponentRegistryMockModule>;\n  nativeExceptionsManagerModule: ReturnType<typeof createNativeExceptionsManagerMockModule>;\n  nativeModulesModule: ReturnType<typeof createNativeModulesMockModule>;\n  platformModule: ReturnType<typeof createPlatformMockModule>;\n  refreshControlModule: ReturnType<typeof createRefreshControlMockModule>;\n  rendererProxyModule: ReturnType<typeof createRendererProxyMockModule>;\n  requireNativeComponentModule: ReturnType<typeof createRequireNativeComponentMockModule>;\n  scrollViewModule: ReturnType<typeof createScrollViewMockModule>;\n  styleSheetModule: ReturnType<typeof createStyleSheetMockModule>;\n  textInputModule: ReturnType<typeof createTextInputMockModule>;\n  textModule: ReturnType<typeof createTextMockModule>;\n  uiManagerModule: ReturnType<typeof createUIManagerMockModule>;\n  useColorSchemeModule: ReturnType<typeof createUseColorSchemeMockModule>;\n  vibrationModule: ReturnType<typeof createVibrationMockModule>;\n  viewModule: ReturnType<typeof createViewMockModule>;\n  viewNativeComponentModule: ReturnType<typeof createViewNativeComponentMockModule>;\n};\n\nlet sharedReactNativeMockModules: SharedReactNativeMockModules | null = null;\nlet sharedReactNativeExports: Record<string, unknown> | null = null;\n\n// Yarn PnP: subpath mocks, the top-level facade, and the CJS loader patch\n// must all reuse one registry so every caller observes the same RN instances.\nfunction getSharedReactNativeMockModules() {\n  if (sharedReactNativeMockModules != null) {\n    return sharedReactNativeMockModules;\n  }\n\n  const viewModule = createViewMockModule();\n\n  sharedReactNativeMockModules = {\n    accessibilityInfoModule: createAccessibilityInfoMockModule(),\n    activityIndicatorModule: createActivityIndicatorMockModule(),\n    appStateModule: createAppStateMockModule(),\n    clipboardModule: createClipboardMockModule(),\n    codegenNativeCommandsModule: createCodegenNativeCommandsMockModule(),\n    codegenNativeComponentModule: createCodegenNativeComponentMockModule(),\n    imageModule: createImageMockModule(),\n    initializeCoreModule: createInitializeCoreMockModule(),\n    linkingModule: createLinkingMockModule(),\n    modalModule: createModalMockModule(),\n    nativeComponentRegistryModule: createNativeComponentRegistryMockModule(),\n    nativeExceptionsManagerModule: createNativeExceptionsManagerMockModule(),\n    nativeModulesModule: createNativeModulesMockModule(),\n    platformModule: createPlatformMockModule(),\n    refreshControlModule: createRefreshControlMockModule(),\n    rendererProxyModule: createRendererProxyMockModule(),\n    requireNativeComponentModule: createRequireNativeComponentMockModule(),\n    scrollViewModule: createScrollViewMockModule((viewModule as any).default),\n    styleSheetModule: createStyleSheetMockModule(),\n    textInputModule: createTextInputMockModule(),\n    textModule: createTextMockModule(),\n    uiManagerModule: createUIManagerMockModule(),\n    useColorSchemeModule: createUseColorSchemeMockModule(),\n    vibrationModule: createVibrationMockModule(),\n    viewModule,\n    viewNativeComponentModule: createViewNativeComponentMockModule(),\n  };\n\n  return sharedReactNativeMockModules;\n}\n\n// Yarn PnP: Testing Library and app code can both reach `react-native`, so the\n// top-level facade also has to be a singleton instead of rebuilding per import.\nfunction getSharedReactNativeExports() {\n  if (sharedReactNativeExports != null) {\n    return sharedReactNativeExports;\n  }\n\n  const React = runtimeRequire('react') as ReactModule;\n  const {\n    accessibilityInfoModule,\n    activityIndicatorModule,\n    appStateModule,\n    clipboardModule,\n    codegenNativeCommandsModule,\n    codegenNativeComponentModule,\n    imageModule,\n    linkingModule,\n    modalModule,\n    nativeComponentRegistryModule,\n    nativeModulesModule,\n    platformModule,\n    refreshControlModule,\n    rendererProxyModule,\n    requireNativeComponentModule,\n    scrollViewModule,\n    styleSheetModule,\n    textInputModule,\n    textModule,\n    uiManagerModule,\n    useColorSchemeModule,\n    vibrationModule,\n    viewModule,\n    viewNativeComponentModule,\n  } = getSharedReactNativeMockModules();\n\n  const initialDimensions = runtimeGlobals.nativeModuleProxy?.DeviceInfo?.getConstants?.().Dimensions ?? {\n    screen: {\n      fontScale: 2,\n      height: 1334,\n      scale: 2,\n      width: 750,\n    },\n    window: {\n      fontScale: 2,\n      height: 1334,\n      scale: 2,\n      width: 750,\n    },\n  };\n  let dimensionsState = initialDimensions;\n  const dimensionListeners = new Set<(payload: typeof initialDimensions) => void>();\n  const Dimensions = {\n    addEventListener: vi.fn((type: string, handler: (payload: typeof initialDimensions) => void) => {\n      if (type === 'change') {\n        dimensionListeners.add(handler);\n      }\n\n      return {\n        remove: () => dimensionListeners.delete(handler),\n      };\n    }),\n    get: vi.fn((name: 'screen' | 'window') => dimensionsState[name]),\n    set: vi.fn((nextDimensions: Partial<typeof initialDimensions>) => {\n      dimensionsState = {\n        ...dimensionsState,\n        ...nextDimensions,\n      };\n      dimensionListeners.forEach((listener) => listener(dimensionsState));\n    }),\n  };\n  const useWindowDimensions = () => Dimensions.get('window');\n  const createEventEmitter = () => {\n    const listeners = new Map<string, Set<(...args: any[]) => void>>();\n\n    return {\n      addListener: vi.fn((eventType: string, listener: (...args: any[]) => void) => {\n        const eventListeners = listeners.get(eventType) ?? new Set();\n        eventListeners.add(listener);\n        listeners.set(eventType, eventListeners);\n\n        return {\n          remove: () => eventListeners.delete(listener),\n        };\n      }),\n      emit: vi.fn((eventType: string, ...args: any[]) => {\n        listeners.get(eventType)?.forEach((listener) => listener(...args));\n      }),\n      removeAllListeners: vi.fn((eventType?: string) => {\n        if (eventType == null) {\n          listeners.clear();\n          return;\n        }\n\n        listeners.delete(eventType);\n      }),\n      listenerCount: vi.fn((eventType: string) => listeners.get(eventType)?.size ?? 0),\n    };\n  };\n  const DeviceInfo = runtimeGlobals.nativeModuleProxy?.DeviceInfo ?? {\n    getConstants: vi.fn(() => ({\n      Dimensions: dimensionsState,\n    })),\n  };\n  const DevSettings = {\n    ...(runtimeGlobals.nativeModuleProxy?.DevSettings ?? {}),\n    addMenuItem: vi.fn(),\n    onFastRefresh: vi.fn(),\n    reload: vi.fn(),\n  };\n  const i18nConstants = runtimeGlobals.nativeModuleProxy?.I18nManager?.getConstants?.() ?? {\n    doLeftAndRightSwapInRTL: true,\n    isRTL: false,\n    localeIdentifier: 'en_US',\n  };\n  const I18nManager = {\n    allowRTL: vi.fn((shouldAllow: boolean) => runtimeGlobals.nativeModuleProxy?.I18nManager?.allowRTL?.(shouldAllow)),\n    doLeftAndRightSwapInRTL: i18nConstants.doLeftAndRightSwapInRTL,\n    forceRTL: vi.fn((shouldForce: boolean) => runtimeGlobals.nativeModuleProxy?.I18nManager?.forceRTL?.(shouldForce)),\n    getConstants: vi.fn(() => i18nConstants),\n    isRTL: i18nConstants.isRTL,\n    swapLeftAndRightInRTL: vi.fn((shouldSwap: boolean) =>\n      runtimeGlobals.nativeModuleProxy?.I18nManager?.swapLeftAndRightInRTL?.(shouldSwap)\n    ),\n  };\n  const PlatformColor = (...names: string[]) => ({ semantic: names });\n  const processColor = vi.fn((color: unknown) => color);\n  const turboModuleLookup = (name: string) =>\n    runtimeGlobals.__turboModuleProxy?.(name) ?? runtimeGlobals.nativeModuleProxy?.[name] ?? null;\n  const TurboModuleRegistry = {\n    get: vi.fn((name: string) => turboModuleLookup(name)),\n    getEnforcing: vi.fn((name: string) => {\n      const module = turboModuleLookup(name);\n      if (module == null) {\n        throw new Error(`TurboModuleRegistry.getEnforcing(...): '${name}' could not be found.`);\n      }\n      return module;\n    }),\n  };\n  const ActionSheetIOS = {\n    dismissActionSheet: vi.fn(),\n    showActionSheetWithOptions: vi.fn((_options: Record<string, unknown>, callback: (buttonIndex: number) => void) =>\n      callback(0)\n    ),\n    showShareActionSheetWithOptions: vi.fn(\n      (\n        _options: Record<string, unknown>,\n        _failureCallback: (error: unknown) => void,\n        successCallback: (success: boolean, method: string | null) => void\n      ) => successCallback(true, null)\n    ),\n  };\n  const Alert = {\n    alert: vi.fn(),\n    prompt: vi.fn(),\n  };\n  let appearanceColorScheme: 'light' | 'dark' | null = 'light';\n  const appearanceListeners = new Set<(state: { colorScheme: 'light' | 'dark' | null }) => void>();\n  const Appearance = {\n    addChangeListener: vi.fn((listener: (state: { colorScheme: 'light' | 'dark' | null }) => void) => {\n      appearanceListeners.add(listener);\n      return {\n        remove: () => appearanceListeners.delete(listener),\n      };\n    }),\n    getColorScheme: vi.fn(() => appearanceColorScheme),\n    setColorScheme: vi.fn((nextColorScheme: 'light' | 'dark' | null) => {\n      appearanceColorScheme = nextColorScheme;\n      appearanceListeners.forEach((listener) => listener({ colorScheme: appearanceColorScheme }));\n    }),\n  };\n  const backPressSubscriptions = new Set<() => boolean | null | undefined>();\n  const BackHandler = {\n    addEventListener: vi.fn((_eventName: string, handler: () => boolean | null | undefined) => {\n      backPressSubscriptions.add(handler);\n      return {\n        remove: () => backPressSubscriptions.delete(handler),\n      };\n    }),\n    exitApp: vi.fn(),\n  };\n  const DeviceEventEmitter = createEventEmitter();\n  const NativeAppEventEmitter = DeviceEventEmitter;\n  const Keyboard = {\n    ...createEventEmitter(),\n    dismiss: vi.fn(),\n    isVisible: vi.fn(() => false),\n    metrics: vi.fn(() => null),\n    scheduleLayoutAnimation: vi.fn(),\n  };\n  const PixelRatio = {\n    get: vi.fn(() => Dimensions.get('window').scale),\n    getFontScale: vi.fn(() => Dimensions.get('window').fontScale || Dimensions.get('window').scale),\n    getPixelSizeForLayoutSize: vi.fn((layoutSize: number) => Math.round(layoutSize * Dimensions.get('window').scale)),\n    roundToNearestPixel: vi.fn((layoutSize: number) => {\n      const ratio = Dimensions.get('window').scale;\n      return Math.round(layoutSize * ratio) / ratio;\n    }),\n    startDetecting: vi.fn(),\n  };\n  const settingsSubscriptions: Array<{ callback: Function | null; keys: string[] }> = [];\n  const Settings = {\n    _settings: {} as Record<string, unknown>,\n    clearWatch: vi.fn((watchId: number) => {\n      if (watchId < settingsSubscriptions.length) {\n        settingsSubscriptions[watchId] = { callback: null, keys: [] };\n      }\n    }),\n    get: vi.fn((key: string) => Settings._settings[key]),\n    set: vi.fn((nextSettings: Record<string, unknown>) => {\n      Settings._settings = {\n        ...Settings._settings,\n        ...nextSettings,\n      };\n\n      Object.keys(nextSettings).forEach((key) => {\n        settingsSubscriptions.forEach((subscription) => {\n          if (subscription.callback && subscription.keys.includes(key)) {\n            subscription.callback();\n          }\n        });\n      });\n    }),\n    watchKeys: vi.fn((keys: string | string[], callback: Function) => {\n      const normalizedKeys = Array.isArray(keys) ? keys : [keys];\n      const watchId = settingsSubscriptions.length;\n      settingsSubscriptions.push({ callback, keys: normalizedKeys });\n      return watchId;\n    }),\n  };\n  const Share = {\n    dismissedAction: 'dismissedAction',\n    share: vi.fn(async () => ({\n      action: 'sharedAction',\n      activityType: null,\n    })),\n    sharedAction: 'sharedAction',\n  };\n  const callableModules = runtimeGlobals.__rntlCallableModules ?? {\n    callable: {},\n    lazy: {},\n  };\n  defineGlobalProperty(runtimeGlobals, '__rntlCallableModules', callableModules);\n  const registerCallableModule = vi.fn(\n    (name: string, moduleOrFactory: Record<string, unknown> | (() => Record<string, unknown>)) => {\n      if (runtimeGlobals.RN$Bridgeless === true && typeof runtimeGlobals.RN$registerCallableModule === 'function') {\n        if (typeof moduleOrFactory === 'function') {\n          runtimeGlobals.RN$registerCallableModule(name, moduleOrFactory);\n          return;\n        }\n\n        runtimeGlobals.RN$registerCallableModule(name, () => moduleOrFactory);\n        return;\n      }\n\n      if (typeof moduleOrFactory === 'function') {\n        callableModules.lazy[name] = moduleOrFactory;\n        delete callableModules.callable[name];\n        return;\n      }\n\n      callableModules.callable[name] = moduleOrFactory;\n      delete callableModules.lazy[name];\n    }\n  );\n  const Button = ({\n    accessibilityState,\n    disabled,\n    title,\n    ...props\n  }: Record<string, unknown> & {\n    accessibilityState?: Record<string, unknown>;\n    disabled?: boolean;\n    title: string;\n  }) =>\n    React.createElement(\n      'View',\n      {\n        ...props,\n        accessibilityRole: 'button',\n        accessibilityState: {\n          ...(accessibilityState ?? {}),\n          disabled: Boolean(disabled),\n        },\n        accessible: props.accessible ?? true,\n      } as any,\n      React.createElement('Text', null, (platformModule as any).default?.OS === 'android' ? title.toUpperCase() : title)\n    );\n  Button.displayName = 'Button';\n  class DrawerLayoutAndroid extends React.Component<Record<string, unknown>> {\n    closeDrawer = vi.fn();\n    openDrawer = vi.fn();\n\n    render(): ReactNode {\n      const props = this.props as Record<string, unknown> & { children?: ReactNode };\n      return React.createElement('AndroidDrawerLayout', props as any, props.children);\n    }\n  }\n  Object.assign(DrawerLayoutAndroid.prototype, createMockNativeMethods());\n  Object.defineProperty(DrawerLayoutAndroid, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: 'DrawerLayoutAndroid',\n    writable: true,\n  });\n  const createListSeparators = () => ({\n    highlight: vi.fn(),\n    unhighlight: vi.fn(),\n    updateProps: vi.fn(),\n  });\n  const getItemKey = (item: any, index: number, keyExtractor?: (item: any, index: number) => string) =>\n    keyExtractor?.(item, index) ?? item?.key ?? String(index);\n  class FlatList extends React.PureComponent<Record<string, unknown>> {\n    flashScrollIndicators = vi.fn();\n    getNativeScrollRef = vi.fn(() => this.scrollViewRef);\n    getScrollResponder = vi.fn(() => this.scrollViewRef);\n    getScrollableNode = vi.fn(() => this.scrollViewRef);\n    recordInteraction = vi.fn();\n    scrollToEnd = vi.fn();\n    scrollToIndex = vi.fn();\n    scrollToItem = vi.fn();\n    scrollToOffset = vi.fn();\n    setNativeProps = vi.fn();\n    private scrollViewRef: unknown = null;\n\n    private setScrollViewRef = (ref: unknown) => {\n      this.scrollViewRef = ref;\n    };\n\n    render(): ReactNode {\n      const { data, keyExtractor, renderItem, ...props } = this.props as Record<string, unknown> & {\n        data?: any[];\n        keyExtractor?: (item: any, index: number) => string;\n        renderItem?: (info: {\n          item: any;\n          index: number;\n          separators: ReturnType<typeof createListSeparators>;\n        }) => ReactNode;\n      };\n      const ScrollViewComponent = (scrollViewModule as any).default ?? scrollViewModule;\n      const items = Array.isArray(data) ? data : [];\n\n      return React.createElement(\n        ScrollViewComponent,\n        { ...(props as any), ref: this.setScrollViewRef },\n        items.map((item, index) =>\n          React.createElement(\n            React.Fragment,\n            { key: getItemKey(item, index, keyExtractor) },\n            renderItem?.({\n              index,\n              item,\n              separators: createListSeparators(),\n            })\n          )\n        )\n      );\n    }\n  }\n  Object.defineProperty(FlatList, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: 'FlatList',\n    writable: true,\n  });\n  class VirtualizedList extends React.PureComponent<Record<string, unknown>> {\n    flashScrollIndicators = vi.fn();\n    getNativeScrollRef = vi.fn(() => this.scrollViewRef);\n    getScrollResponder = vi.fn(() => this.scrollViewRef);\n    getScrollableNode = vi.fn(() => this.scrollViewRef);\n    recordInteraction = vi.fn();\n    scrollToEnd = vi.fn();\n    scrollToIndex = vi.fn();\n    scrollToOffset = vi.fn();\n    setNativeProps = vi.fn();\n    private scrollViewRef: unknown = null;\n\n    private setScrollViewRef = (ref: unknown) => {\n      this.scrollViewRef = ref;\n    };\n\n    render(): ReactNode {\n      const { data, getItem, getItemCount, renderItem, ...props } = this.props as Record<string, unknown> & {\n        data?: unknown;\n        getItem?: (data: unknown, index: number) => any;\n        getItemCount?: (data: unknown) => number;\n        renderItem?: (info: {\n          index: number;\n          item: any;\n          separators: ReturnType<typeof createListSeparators>;\n        }) => ReactNode;\n      };\n      const ScrollViewComponent = (scrollViewModule as any).default ?? scrollViewModule;\n      const itemCount = getItemCount?.(data) ?? 0;\n\n      return React.createElement(\n        ScrollViewComponent,\n        { ...(props as any), ref: this.setScrollViewRef },\n        Array.from({ length: itemCount }, (_, index) => {\n          const item = getItem?.(data, index);\n\n          return React.createElement(\n            React.Fragment,\n            { key: getItemKey(item, index) },\n            renderItem?.({\n              index,\n              item,\n              separators: createListSeparators(),\n            })\n          );\n        })\n      );\n    }\n  }\n  Object.defineProperty(VirtualizedList, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: 'VirtualizedList',\n    writable: true,\n  });\n  class ImageBackground extends React.Component<Record<string, unknown>> {\n    private viewRef: { setNativeProps?: (props: Record<string, unknown>) => void } | null = null;\n\n    setNativeProps = vi.fn((props: Record<string, unknown>) => {\n      this.viewRef?.setNativeProps?.(props);\n    });\n\n    private captureViewRef = (ref: { setNativeProps?: (props: Record<string, unknown>) => void } | null) => {\n      this.viewRef = ref;\n    };\n\n    render(): ReactNode {\n      const { children, imageRef, imageStyle, style, ...props } = this.props as Record<string, unknown> & {\n        children?: ReactNode;\n        imageRef?: unknown;\n        imageStyle?: unknown;\n      };\n      const ViewComponent = (viewModule as any).default ?? viewModule;\n      const ImageComponent = (imageModule as any).default ?? imageModule;\n\n      return React.createElement(\n        ViewComponent,\n        {\n          accessibilityIgnoresInvertColors: true,\n          ref: this.captureViewRef,\n          style,\n        } as any,\n        React.createElement(ImageComponent, {\n          ...(props as any),\n          ref: imageRef,\n          style: imageStyle,\n        }),\n        children\n      );\n    }\n  }\n  Object.defineProperty(ImageBackground, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: 'ImageBackground',\n    writable: true,\n  });\n  const InputAccessoryView = ({ children, ...props }: Record<string, unknown> & { children?: ReactNode }) => {\n    if (React.Children.count(children) === 0) {\n      return null;\n    }\n\n    return React.createElement('InputAccessoryView', props as any, children);\n  };\n  InputAccessoryView.displayName = 'InputAccessoryView';\n  const LayoutConformance = createMockHostComponent(React, 'LayoutConformance', 'LayoutConformance');\n  const KeyboardAvoidingView = createMockHostComponent(\n    React,\n    'KeyboardAvoidingView',\n    'KeyboardAvoidingView',\n    createMockNativeMethods()\n  );\n  const ProgressBarAndroid = createMockHostComponent(React, 'ProgressBarAndroid', 'ProgressBarAndroid');\n  class StatusBar extends React.Component<Record<string, unknown>> {\n    static currentHeight = runtimeGlobals.nativeModuleProxy?.StatusBarManager?.getConstants?.().HEIGHT ?? 0;\n    static setBackgroundColor = vi.fn((color: string, animated?: boolean) =>\n      runtimeGlobals.nativeModuleProxy?.StatusBarManager?.setBackgroundColor?.(color, animated)\n    );\n    static setBarStyle = vi.fn((style: string, animated?: boolean) =>\n      runtimeGlobals.nativeModuleProxy?.StatusBarManager?.setStyle?.(style, animated)\n    );\n    static setHidden = vi.fn((hidden: boolean, animation?: string) =>\n      runtimeGlobals.nativeModuleProxy?.StatusBarManager?.setHidden?.(hidden, animation)\n    );\n    static setNetworkActivityIndicatorVisible = vi.fn((visible: boolean) =>\n      runtimeGlobals.nativeModuleProxy?.StatusBarManager?.setNetworkActivityIndicatorVisible?.(visible)\n    );\n    static setTranslucent = vi.fn((translucent: boolean) =>\n      runtimeGlobals.nativeModuleProxy?.StatusBarManager?.setTranslucent?.(translucent)\n    );\n\n    render() {\n      return null;\n    }\n  }\n  Object.defineProperty(StatusBar, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: 'StatusBar',\n    writable: true,\n  });\n  const Switch = createMockHostComponent(React, 'Switch', 'Switch', createMockNativeMethods());\n  const createTouchableComponent = (displayName: string) => {\n    class TouchableComponent extends React.Component<Record<string, unknown>> {\n      render() {\n        const props = {\n          ...this.props,\n          accessible: (this.props as Record<string, unknown>).accessible ?? true,\n        };\n\n        return React.createElement('View', props as any, (props as any).children);\n      }\n    }\n\n    Object.assign(TouchableComponent.prototype, createMockNativeMethods());\n    Object.defineProperty(TouchableComponent, 'displayName', {\n      configurable: true,\n      enumerable: true,\n      value: displayName,\n      writable: true,\n    });\n\n    return TouchableComponent;\n  };\n  const Touchable = createTouchableComponent('Touchable');\n  const TouchableHighlight = createTouchableComponent('TouchableHighlight');\n  const TouchableNativeFeedback = createTouchableComponent('TouchableNativeFeedback');\n  const TouchableOpacity = createTouchableComponent('TouchableOpacity');\n  const TouchableWithoutFeedback = createTouchableComponent('TouchableWithoutFeedback');\n  const appRegistryRunnables: Record<string, (...args: any[]) => void> = {};\n  const appRegistrySections: Record<string, (...args: any[]) => void> = {};\n  const AppRegistry = {\n    getAppKeys: vi.fn(() => Object.keys(appRegistryRunnables)),\n    getRegistry: vi.fn(() => ({\n      runnables: { ...appRegistryRunnables },\n      sections: Object.keys(appRegistrySections),\n    })),\n    getRunnable: vi.fn((appKey: string) => appRegistryRunnables[appKey]),\n    getSectionKeys: vi.fn(() => Object.keys(appRegistrySections)),\n    getSections: vi.fn(() => ({ ...appRegistrySections })),\n    registerComponent: vi.fn((appKey: string, componentProvider: () => unknown, section?: boolean) => {\n      const runnable = vi.fn(() => componentProvider());\n      appRegistryRunnables[appKey] = runnable;\n      if (section) {\n        appRegistrySections[appKey] = runnable;\n      }\n      return appKey;\n    }),\n    registerConfig: vi.fn((configs: Array<Record<string, unknown>>) => {\n      configs.forEach((config) => {\n        if (typeof config.run === 'function' && typeof config.appKey === 'string') {\n          AppRegistry.registerRunnable(config.appKey, config.run as (...args: any[]) => void);\n          return;\n        }\n\n        if (typeof config.appKey === 'string' && typeof config.component === 'function') {\n          AppRegistry.registerComponent(config.appKey, config.component as () => unknown, Boolean(config.section));\n        }\n      });\n    }),\n    registerRunnable: vi.fn((appKey: string, run: (...args: any[]) => void) => {\n      appRegistryRunnables[appKey] = run;\n      return appKey;\n    }),\n    registerSection: vi.fn((appKey: string, componentProvider: () => unknown) => {\n      AppRegistry.registerComponent(appKey, componentProvider, true);\n    }),\n    setRootViewStyleProvider: vi.fn(),\n    setWrapperComponentProvider: vi.fn(),\n  };\n  const Easing = {\n    back: vi.fn(\n      (s: number = 1.70158) =>\n        (t: number) =>\n          t * t * ((s + 1) * t - s)\n    ),\n    bezier: vi.fn(() => (t: number) => t),\n    bounce: vi.fn((t: number) => t * t),\n    circle: vi.fn((t: number) => 1 - Math.sqrt(1 - t * t)),\n    cubic: vi.fn((t: number) => t * t * t),\n    ease: vi.fn((t: number) => t * t * (3 - 2 * t)),\n    elastic: vi.fn(\n      (bounciness: number = 1) =>\n        (t: number) =>\n          1 - Math.pow(Math.cos((t * Math.PI) / 2), 3) * Math.cos(t * bounciness * Math.PI)\n    ),\n    exp: vi.fn((t: number) => Math.pow(2, 10 * (t - 1))),\n    in: vi.fn((easing: (t: number) => number) => (t: number) => easing(t)),\n    inOut: vi.fn(\n      (easing: (t: number) => number) => (t: number) => (t < 0.5 ? easing(t * 2) / 2 : 1 - easing((1 - t) * 2) / 2)\n    ),\n    linear: vi.fn((t: number) => t),\n    out: vi.fn((easing: (t: number) => number) => (t: number) => 1 - easing(1 - t)),\n    poly: vi.fn((n: number) => (t: number) => Math.pow(t, n)),\n    quad: vi.fn((t: number) => t * t),\n    sin: vi.fn((t: number) => 1 - Math.cos((t * Math.PI) / 2)),\n    step0: vi.fn((n: number) => (n > 0 ? 1 : 0)),\n    step1: vi.fn((n: number) => (n >= 1 ? 1 : 0)),\n  };\n  const interactionEventEmitter = createEventEmitter();\n  let nextInteractionHandle = 1;\n  const InteractionManager = {\n    Events: {\n      interactionComplete: 'interactionComplete',\n      interactionStart: 'interactionStart',\n    },\n    addListener: interactionEventEmitter.addListener,\n    clearInteractionHandle: vi.fn(() => undefined),\n    createInteractionHandle: vi.fn(() => nextInteractionHandle++),\n    runAfterInteractions: vi.fn((task?: (() => void) | { run?: () => void }) => {\n      let cancelled = false;\n      const promise = Promise.resolve().then(() => {\n        if (cancelled) {\n          return undefined;\n        }\n\n        if (typeof task === 'function') {\n          task();\n          return undefined;\n        }\n\n        task?.run?.();\n        return undefined;\n      });\n\n      return {\n        cancel: () => {\n          cancelled = true;\n        },\n        then: promise.then.bind(promise),\n      };\n    }),\n    setDeadline: vi.fn(),\n  };\n  let layoutAnimationEnabled = true;\n  const layoutAnimationTypes = {\n    easeInEaseOut: 'easeInEaseOut',\n    easeIn: 'easeIn',\n    easeOut: 'easeOut',\n    keyboard: 'keyboard',\n    linear: 'linear',\n    spring: 'spring',\n  };\n  const layoutAnimationProperties = {\n    opacity: 'opacity',\n    scaleX: 'scaleX',\n    scaleXY: 'scaleXY',\n    scaleY: 'scaleY',\n  };\n  const createLayoutAnimationConfig = (duration: number, type?: string, property?: string) => ({\n    create: { property, type },\n    delete: { property, type },\n    duration,\n    update: { type },\n  });\n  const layoutAnimationPresets = {\n    easeInEaseOut: createLayoutAnimationConfig(300, 'easeInEaseOut', 'opacity'),\n    linear: createLayoutAnimationConfig(500, 'linear', 'opacity'),\n    spring: {\n      create: {\n        property: 'opacity',\n        type: 'linear',\n      },\n      delete: {\n        property: 'opacity',\n        type: 'linear',\n      },\n      duration: 700,\n      update: {\n        springDamping: 0.4,\n        type: 'spring',\n      },\n    },\n  };\n  const LayoutAnimation = {\n    Properties: layoutAnimationProperties,\n    Presets: layoutAnimationPresets,\n    Types: layoutAnimationTypes,\n    checkConfig: vi.fn(),\n    configureNext: vi.fn(\n      (_config: Record<string, unknown>, onAnimationDidEnd?: () => void, _onAnimationDidFail?: () => void) => {\n        if (layoutAnimationEnabled) {\n          onAnimationDidEnd?.();\n        }\n      }\n    ),\n    create: vi.fn(createLayoutAnimationConfig),\n    easeInEaseOut: vi.fn((onAnimationDidEnd?: () => void) =>\n      LayoutAnimation.configureNext(layoutAnimationPresets.easeInEaseOut, onAnimationDidEnd)\n    ),\n    linear: vi.fn((onAnimationDidEnd?: () => void) =>\n      LayoutAnimation.configureNext(layoutAnimationPresets.linear, onAnimationDidEnd)\n    ),\n    setEnabled: vi.fn((value: boolean) => {\n      layoutAnimationEnabled = value;\n    }),\n    spring: vi.fn((onAnimationDidEnd?: () => void) =>\n      LayoutAnimation.configureNext(layoutAnimationPresets.spring, onAnimationDidEnd)\n    ),\n  };\n  const NativeDialogManagerAndroid = {\n    getConstants: vi.fn(() => ({\n      buttonClicked: 'buttonClicked',\n      buttonNegative: 'buttonNegative',\n      buttonNeutral: 'buttonNeutral',\n      buttonPositive: 'buttonPositive',\n      dismissed: 'dismissed',\n    })),\n    showAlert: vi.fn(\n      (\n        _config: Record<string, unknown>,\n        _onError: (message: string) => void,\n        onAction: (action: string, buttonKey: string) => void\n      ) => onAction('buttonClicked', 'buttonPositive')\n    ),\n  };\n  const networkingEventEmitter = createEventEmitter();\n  const Networking = {\n    abortRequest: vi.fn(),\n    addListener: networkingEventEmitter.addListener,\n    clearCookies: vi.fn((callback: (result: boolean) => void) => callback(true)),\n    sendRequest: vi.fn(\n      (\n        _method: string,\n        _trackingName: string | null,\n        _url: string,\n        _headers: Record<string, string>,\n        _data: unknown,\n        _responseType: string,\n        _incrementalUpdates: boolean,\n        _timeout: number,\n        callback: (requestId: number) => void\n      ) => callback(1)\n    ),\n  };\n  const permissionsResults = {\n    DENIED: 'denied',\n    GRANTED: 'granted',\n    NEVER_ASK_AGAIN: 'never_ask_again',\n  };\n  const permissions = {\n    CAMERA: 'android.permission.CAMERA',\n  };\n  const PermissionsAndroid = {\n    PERMISSIONS: permissions,\n    RESULTS: permissionsResults,\n    check: vi.fn(async () => true),\n    request: vi.fn(async () => permissionsResults.GRANTED),\n    requestMultiple: vi.fn(async (requestedPermissions: string[]) =>\n      Object.fromEntries(requestedPermissions.map((permission) => [permission, permissionsResults.GRANTED]))\n    ),\n    shouldShowRequestPermissionRationale: vi.fn(async () => false),\n  };\n  const ToastAndroid = {\n    BOTTOM: 80,\n    CENTER: 17,\n    LONG: 1,\n    SHORT: 0,\n    TOP: 49,\n    show: vi.fn(),\n    showWithGravity: vi.fn(),\n    showWithGravityAndOffset: vi.fn(),\n  };\n  const DevMenu = {\n    show: vi.fn(),\n  };\n  const LogBox = {\n    ignoreAllLogs: vi.fn(),\n    ignoreLogs: vi.fn(),\n    install: vi.fn(),\n    uninstall: vi.fn(),\n  };\n  class NativeEventEmitter {\n    private nativeModule?: {\n      addListener?: (eventType: string) => void;\n      removeListeners?: (count: number) => void;\n    };\n\n    constructor(nativeModule?: {\n      addListener?: (eventType: string) => void;\n      removeListeners?: (count: number) => void;\n    }) {\n      if ((platformModule as any).default?.OS === 'ios' && nativeModule == null) {\n        throw new Error('NativeEventEmitter requires a non-null argument.');\n      }\n\n      if (\n        nativeModule &&\n        typeof nativeModule.addListener === 'function' &&\n        typeof nativeModule.removeListeners === 'function'\n      ) {\n        this.nativeModule = nativeModule;\n      }\n    }\n\n    addListener(eventType: string, listener: (...args: any[]) => void) {\n      this.nativeModule?.addListener?.(eventType);\n      let subscription = DeviceEventEmitter.addListener(eventType, listener);\n\n      return {\n        remove: () => {\n          if (subscription != null) {\n            this.nativeModule?.removeListeners?.(1);\n            subscription.remove();\n            subscription = null as any;\n          }\n        },\n      };\n    }\n\n    emit(eventType: string, ...args: any[]) {\n      DeviceEventEmitter.emit(eventType, ...args);\n    }\n\n    removeAllListeners(eventType?: string) {\n      if (eventType == null) {\n        throw new Error('NativeEventEmitter.removeAllListeners requires a non-null argument.');\n      }\n\n      this.nativeModule?.removeListeners?.(DeviceEventEmitter.listenerCount(eventType));\n      DeviceEventEmitter.removeAllListeners(eventType);\n    }\n\n    listenerCount(eventType: string) {\n      return DeviceEventEmitter.listenerCount(eventType);\n    }\n  }\n  const PanResponder = {\n    create: vi.fn((callbacks: Record<string, (...args: any[]) => unknown> = {}) => {\n      const gestureState = {\n        _accountsForMovesUpTo: 0,\n        dx: 0,\n        dy: 0,\n        moveX: 0,\n        moveY: 0,\n        numberActiveTouches: 0,\n        stateID: 0,\n        vx: 0,\n        vy: 0,\n        x0: 0,\n        y0: 0,\n      };\n\n      return {\n        getInteractionHandle: vi.fn(() => null),\n        panHandlers: {\n          onMoveShouldSetResponder: (...args: any[]) =>\n            callbacks.onMoveShouldSetPanResponder?.(...args, gestureState) ?? false,\n          onMoveShouldSetResponderCapture: (...args: any[]) =>\n            callbacks.onMoveShouldSetPanResponderCapture?.(...args, gestureState) ?? false,\n          onResponderEnd: (...args: any[]) => callbacks.onPanResponderEnd?.(...args, gestureState),\n          onResponderGrant: (...args: any[]) => callbacks.onPanResponderGrant?.(...args, gestureState) ?? false,\n          onResponderMove: (...args: any[]) => callbacks.onPanResponderMove?.(...args, gestureState),\n          onResponderReject: (...args: any[]) => callbacks.onPanResponderReject?.(...args, gestureState),\n          onResponderRelease: (...args: any[]) => callbacks.onPanResponderRelease?.(...args, gestureState),\n          onResponderStart: (...args: any[]) => callbacks.onPanResponderStart?.(...args, gestureState),\n          onResponderTerminate: (...args: any[]) => callbacks.onPanResponderTerminate?.(...args, gestureState),\n          onResponderTerminationRequest: (...args: any[]) =>\n            callbacks.onPanResponderTerminationRequest?.(...args, gestureState) ?? true,\n          onStartShouldSetResponder: (...args: any[]) =>\n            callbacks.onStartShouldSetPanResponder?.(...args, gestureState) ?? false,\n          onStartShouldSetResponderCapture: (...args: any[]) =>\n            callbacks.onStartShouldSetPanResponderCapture?.(...args, gestureState) ?? false,\n        },\n      };\n    }),\n  };\n  const pushNotificationManager = runtimeGlobals.nativeModuleProxy?.PushNotificationManager;\n  const PushNotificationIOS = {\n    abandonPermissions: vi.fn(() => pushNotificationManager?.abandonPermissions?.()),\n    addEventListener: vi.fn(),\n    getApplicationIconBadgeNumber: vi.fn((callback: (badge: number) => void) =>\n      pushNotificationManager?.getApplicationIconBadgeNumber?.(callback)\n    ),\n    presentLocalNotification: vi.fn((notification: Record<string, unknown>) =>\n      pushNotificationManager?.presentLocalNotification?.(notification)\n    ),\n    removeAllDeliveredNotifications: vi.fn(() => pushNotificationManager?.removeAllDeliveredNotifications?.()),\n    removeEventListener: vi.fn(),\n    requestPermissions: vi.fn(() => pushNotificationManager?.requestPermissions?.()),\n  };\n  let systraceEnabled = false;\n  let systraceCookie = 0;\n  const Systrace = {\n    beginAsyncEvent: vi.fn(() => systraceCookie++),\n    beginEvent: vi.fn(),\n    counterEvent: vi.fn(),\n    endAsyncEvent: vi.fn(),\n    endEvent: vi.fn(),\n    isEnabled: vi.fn(() => systraceEnabled),\n    setEnabled: vi.fn((enabled: boolean) => {\n      systraceEnabled = enabled;\n    }),\n  };\n  const UTFSequence = Object.freeze({\n    BOM: '\\ufeff',\n    BULLET: '\\u2022',\n    BULLET_SP: '\\u00A0\\u2022\\u00A0',\n    MDASH: '\\u2014',\n    MDASH_SP: '\\u00A0\\u2014\\u00A0',\n    MIDDOT: '\\u00B7',\n    MIDDOT_KATAKANA: '\\u30FB',\n    MIDDOT_SP: '\\u00A0\\u00B7\\u00A0',\n    NBSP: '\\u00A0',\n    NDASH: '\\u2013',\n    NDASH_SP: '\\u00A0\\u2013\\u00A0',\n    NEWLINE: '\\u000A',\n    PIZZA: '\\uD83C\\uDF55',\n    TRIANGLE_LEFT: '\\u25c0',\n    TRIANGLE_RIGHT: '\\u25b6',\n  });\n  const DynamicColorIOS = vi.fn(() => {\n    throw new Error('DynamicColorIOS is not available on this platform.');\n  });\n  class SectionList extends React.PureComponent<Record<string, unknown>> {\n    flashScrollIndicators = vi.fn();\n    getScrollResponder = vi.fn(() => this.scrollViewRef);\n    getScrollableNode = vi.fn(() => this.scrollViewRef);\n    recordInteraction = vi.fn();\n    scrollToLocation = vi.fn();\n    setNativeProps = vi.fn();\n    private scrollViewRef: unknown = null;\n\n    private setScrollViewRef = (ref: unknown) => {\n      this.scrollViewRef = ref;\n    };\n\n    render(): ReactNode {\n      const { renderItem, renderSectionHeader, sections, ...props } = this.props as Record<string, unknown> & {\n        renderItem?: (info: {\n          index: number;\n          item: any;\n          section: Record<string, unknown>;\n          separators: ReturnType<typeof createListSeparators>;\n        }) => ReactNode;\n        renderSectionHeader?: (info: { section: Record<string, unknown> }) => ReactNode;\n        sections?: Array<Record<string, unknown> & { data?: any[] }>;\n      };\n      const ScrollViewComponent = (scrollViewModule as any).default ?? scrollViewModule;\n\n      return React.createElement(\n        ScrollViewComponent,\n        { ...(props as any), ref: this.setScrollViewRef },\n        (sections ?? []).map((section, sectionIndex) =>\n          React.createElement(\n            React.Fragment,\n            { key: String(section.key ?? section.title ?? sectionIndex) },\n            renderSectionHeader?.({ section }),\n            (section.data ?? []).map((item, itemIndex) =>\n              React.createElement(\n                React.Fragment,\n                {\n                  key: getItemKey(item, itemIndex, section.keyExtractor as any),\n                },\n                renderItem?.({\n                  index: itemIndex,\n                  item,\n                  section,\n                  separators: createListSeparators(),\n                })\n              )\n            )\n          )\n        )\n      );\n    }\n  }\n  Object.defineProperty(SectionList, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: 'SectionList',\n    writable: true,\n  });\n  class VirtualizedSectionList extends SectionList {}\n  Object.defineProperty(VirtualizedSectionList, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: 'VirtualizedSectionList',\n    writable: true,\n  });\n  const RootTagContext = React.createContext(0);\n  RootTagContext.displayName = 'RootTagContext';\n  const TextAncestorContext = React.createContext(false);\n  TextAncestorContext.displayName = 'TextAncestorContext';\n\n  const sharedNativeMethods = createMockNativeMethods();\n  const NativeText = createMockNativeComponent(React, 'RCTText');\n  const SafeAreaView = createMockHostComponent(React, 'SafeAreaView', 'View', sharedNativeMethods);\n  const VirtualView = createMockHostComponent(React, 'VirtualView', 'VirtualView', sharedNativeMethods);\n  const VirtualViewMode = Object.freeze({\n    Hidden: 2,\n    Prerender: 1,\n    Visible: 0,\n  });\n  class Pressable extends React.Component<Record<string, unknown>> {\n    render() {\n      const props = {\n        ...this.props,\n        accessible: (this.props as Record<string, unknown>).accessible ?? true,\n      };\n\n      return React.createElement('View', props as any, (props as any).children);\n    }\n  }\n  Object.assign(Pressable.prototype, sharedNativeMethods);\n  Object.defineProperty(Pressable, 'displayName', {\n    configurable: true,\n    enumerable: true,\n    value: 'Pressable',\n    writable: true,\n  });\n\n  class AnimatedNode {\n    private listeners = new Set<(value: number) => void>();\n    protected value: any;\n\n    constructor(initialValue: any) {\n      this.value = initialValue;\n    }\n\n    __getValue() {\n      return this.value;\n    }\n\n    addListener(listener: (state: { value: number }) => void) {\n      const wrapped = (value: number) => listener({ value });\n      this.listeners.add(wrapped);\n      return {\n        remove: () => this.listeners.delete(wrapped),\n      };\n    }\n\n    removeAllListeners() {\n      this.listeners.clear();\n    }\n\n    protected emitValue(nextValue: any) {\n      this.value = nextValue;\n      this.listeners.forEach((listener) => listener(nextValue));\n    }\n  }\n\n  class AnimatedValue extends AnimatedNode {\n    setValue(nextValue: number) {\n      this.emitValue(nextValue);\n    }\n  }\n\n  class AnimatedValueXY extends AnimatedNode {\n    x: AnimatedValue;\n    y: AnimatedValue;\n\n    constructor(initialValue: { x: number; y: number }) {\n      super(initialValue);\n      this.x = new AnimatedValue(initialValue.x);\n      this.y = new AnimatedValue(initialValue.y);\n    }\n\n    setValue(nextValue: { x: number; y: number }) {\n      this.x.setValue(nextValue.x);\n      this.y.setValue(nextValue.y);\n      this.emitValue({ x: nextValue.x, y: nextValue.y });\n    }\n  }\n\n  class AnimatedInterpolation extends AnimatedNode {}\n\n  class AnimatedColor extends AnimatedNode {}\n\n  const createAnimatedNode = (initialValue: any) => new AnimatedNode(initialValue);\n\n  const toAnimatedValue = (value: unknown) => (value instanceof AnimatedNode ? value.__getValue() : value);\n\n  const createAnimation = (startImpl: (callback?: (result: { finished: boolean }) => void) => void) => ({\n    reset: vi.fn(),\n    start: (callback?: (result: { finished: boolean }) => void) => {\n      startImpl(callback);\n    },\n    stop: vi.fn(),\n  });\n\n  const runValueAnimation = (\n    value: AnimatedValue,\n    nextValue: number,\n    duration: number | undefined,\n    callback?: (result: { finished: boolean }) => void\n  ) => {\n    setTimeout(() => {\n      value.setValue(nextValue);\n      callback?.({ finished: true });\n    }, duration ?? 0);\n  };\n\n  function resolveAnimatedStyle(style: unknown): unknown {\n    if (style instanceof AnimatedNode) {\n      return style.__getValue();\n    }\n\n    if (Array.isArray(style)) {\n      return style.map((value) => resolveAnimatedStyle(value));\n    }\n\n    if (style && typeof style === 'object') {\n      return Object.fromEntries(Object.entries(style).map(([key, value]) => [key, resolveAnimatedStyle(value)]));\n    }\n\n    return style;\n  }\n\n  class AnimatedView extends React.Component<Record<string, unknown>> {\n    private subscriptions: Array<{ remove: () => void }> = [];\n\n    componentDidMount() {\n      this.subscribe(this.props.style);\n    }\n\n    componentDidUpdate(previousProps: Record<string, unknown>) {\n      if (previousProps.style !== this.props.style) {\n        this.unsubscribe();\n        this.subscribe(this.props.style);\n      }\n    }\n\n    componentWillUnmount() {\n      this.unsubscribe();\n    }\n\n    private forceAnimatedUpdate = () => {\n      this.setState((state) => ({ ...(state ?? {}), animatedTick: Date.now() }));\n    };\n\n    private subscribe(style: unknown) {\n      const queue = [style];\n\n      while (queue.length > 0) {\n        const current = queue.shift();\n\n        if (current instanceof AnimatedNode) {\n          this.subscriptions.push(current.addListener(this.forceAnimatedUpdate));\n          continue;\n        }\n\n        if (Array.isArray(current)) {\n          queue.push(...current);\n          continue;\n        }\n\n        if (current && typeof current === 'object') {\n          queue.push(...Object.values(current));\n        }\n      }\n    }\n\n    private unsubscribe() {\n      this.subscriptions.forEach((subscription) => subscription.remove());\n      this.subscriptions = [];\n    }\n\n    render() {\n      const resolvedStyle = resolveAnimatedStyle(this.props.style);\n\n      return React.createElement(\n        'View',\n        { ...(this.props as any), style: resolvedStyle },\n        (this.props as any).children\n      );\n    }\n  }\n\n  class AnimatedEvent {\n    __isNative: boolean;\n    handler: (...args: any[]) => void;\n\n    constructor(\n      _argMapping: unknown[],\n      config?: {\n        listener?: (...args: any[]) => void;\n        useNativeDriver?: boolean;\n      }\n    ) {\n      this.__isNative = Boolean(config?.useNativeDriver);\n      this.handler = (...args: any[]) => {\n        config?.listener?.(...args);\n      };\n    }\n  }\n\n  const createAnimatedComputation = (value: unknown) => createAnimatedNode(value);\n  const createCombinedHandler = (\n    baseHandler: ((...args: any[]) => void) | undefined,\n    nextHandler: ((...args: any[]) => void) | undefined\n  ) =>\n    Object.assign(\n      (...args: any[]) => {\n        baseHandler?.(...args);\n        nextHandler?.(...args);\n      },\n      {\n        __rntlBaseHandler: baseHandler,\n        __rntlExtraHandler: nextHandler,\n      }\n    );\n\n  const Animated = {\n    Color: AnimatedColor,\n    Event: AnimatedEvent,\n    Interpolation: AnimatedInterpolation,\n    Node: AnimatedNode,\n    Value: AnimatedValue,\n    ValueXY: AnimatedValueXY,\n    add: (left: unknown, right: unknown) =>\n      createAnimatedComputation(Number(toAnimatedValue(left)) + Number(toAnimatedValue(right))),\n    attachNativeEvent: vi.fn(() => ({\n      detach: vi.fn(),\n    })),\n    View: AnimatedView,\n    createAnimatedComponent: <T>(component: T) => component,\n    decay: (value: AnimatedValue, config: { velocity?: number }) =>\n      createAnimation((callback) =>\n        runValueAnimation(value, value.__getValue() + Number(config.velocity ?? 0), 0, callback)\n      ),\n    delay: (duration: number) =>\n      createAnimation((callback) => {\n        setTimeout(() => callback?.({ finished: true }), duration);\n      }),\n    diffClamp: (value: unknown, min: number, max: number) =>\n      createAnimatedComputation(Math.max(min, Math.min(max, Number(toAnimatedValue(value))))),\n    divide: (left: unknown, right: unknown) =>\n      createAnimatedComputation(Number(toAnimatedValue(left)) / Number(toAnimatedValue(right))),\n    event: (\n      argMapping: unknown[],\n      config?: {\n        listener?: (...args: any[]) => void;\n        useNativeDriver?: boolean;\n      }\n    ) => new AnimatedEvent(argMapping, config).handler,\n    forkEvent: (event: ((...args: any[]) => void) | undefined, listener: ((...args: any[]) => void) | undefined) =>\n      createCombinedHandler(event, listener),\n    loop: (\n      animation: {\n        start: (callback?: (result: { finished: boolean }) => void) => void;\n        stop: () => void;\n        reset?: () => void;\n      },\n      config?: { iterations?: number }\n    ) =>\n      createAnimation((callback) => {\n        const iterations = config?.iterations ?? -1;\n        let runCount = 0;\n\n        const run = () => {\n          animation.start(() => {\n            runCount += 1;\n            if (iterations > 0 && runCount >= iterations) {\n              callback?.({ finished: true });\n              return;\n            }\n\n            run();\n          });\n        };\n\n        run();\n      }),\n    modulo: (left: unknown, right: unknown) =>\n      createAnimatedComputation(Number(toAnimatedValue(left)) % Number(toAnimatedValue(right))),\n    multiply: (left: unknown, right: unknown) =>\n      createAnimatedComputation(Number(toAnimatedValue(left)) * Number(toAnimatedValue(right))),\n    parallel: (\n      animations: Array<{\n        start: (callback?: (result: { finished: boolean }) => void) => void;\n        stop: () => void;\n        reset?: () => void;\n      }>\n    ) =>\n      createAnimation((callback) => {\n        if (animations.length === 0) {\n          callback?.({ finished: true });\n          return;\n        }\n\n        let completed = 0;\n        animations.forEach((animation) => {\n          animation.start(() => {\n            completed += 1;\n            if (completed === animations.length) {\n              callback?.({ finished: true });\n            }\n          });\n        });\n      }),\n    sequence: (\n      animations: Array<{\n        start: (callback?: (result: { finished: boolean }) => void) => void;\n        stop: () => void;\n        reset?: () => void;\n      }>\n    ) =>\n      createAnimation((callback) => {\n        let index = 0;\n        const run = () => {\n          if (index >= animations.length) {\n            callback?.({ finished: true });\n            return;\n          }\n\n          animations[index].start(() => {\n            index += 1;\n            run();\n          });\n        };\n\n        run();\n      }),\n    spring: (value: AnimatedValue, config: { toValue: number; useNativeDriver?: boolean }) =>\n      createAnimation((callback) => runValueAnimation(value, config.toValue, 0, callback)),\n    stagger: (\n      time: number,\n      animations: Array<{\n        start: (callback?: (result: { finished: boolean }) => void) => void;\n        stop: () => void;\n        reset?: () => void;\n      }>\n    ) =>\n      createAnimation((callback) => {\n        if (animations.length === 0) {\n          callback?.({ finished: true });\n          return;\n        }\n\n        let completed = 0;\n        animations.forEach((animation, index) => {\n          setTimeout(() => {\n            animation.start(() => {\n              completed += 1;\n              if (completed === animations.length) {\n                callback?.({ finished: true });\n              }\n            });\n          }, index * time);\n        });\n      }),\n    subtract: (left: unknown, right: unknown) =>\n      createAnimatedComputation(Number(toAnimatedValue(left)) - Number(toAnimatedValue(right))),\n    timing: (value: AnimatedValue, config: { duration?: number; toValue: number; useNativeDriver?: boolean }) =>\n      createAnimation((callback) => runValueAnimation(value, config.toValue, config.duration, callback)),\n    unforkEvent: (\n      event: ((...args: any[]) => void) & { __rntlBaseHandler?: (...args: any[]) => void },\n      _listener: ((...args: any[]) => void) | undefined\n    ) => event.__rntlBaseHandler ?? event,\n  };\n  const useAnimatedValue = (initialValue: number) => {\n    const ref = React.useRef<InstanceType<typeof AnimatedValue> | null>(null);\n\n    if (ref.current == null) {\n      ref.current = new Animated.Value(initialValue);\n    }\n\n    return ref.current;\n  };\n  const reactNativeVersion = (platformModule as any).default?.constants?.reactNativeVersion ?? {\n    major: 0,\n    minor: 0,\n    patch: 0,\n    prerelease: null,\n  };\n  class ReactNativeVersion {\n    static major = reactNativeVersion.major ?? 0;\n    static minor = reactNativeVersion.minor ?? 0;\n    static patch = reactNativeVersion.patch ?? 0;\n    static prerelease = reactNativeVersion.prerelease ?? null;\n\n    static getVersionString() {\n      const prereleaseSuffix = ReactNativeVersion.prerelease != null ? `-${ReactNativeVersion.prerelease}` : '';\n      return `${ReactNativeVersion.major}.${ReactNativeVersion.minor}.${ReactNativeVersion.patch}${prereleaseSuffix}`;\n    }\n  }\n  const usePressability = vi.fn(\n    (\n      config:\n        | (Record<string, unknown> & {\n            [key: `on${string}`]: unknown;\n          })\n        | null\n        | undefined\n    ) => {\n      if (config == null) {\n        return null;\n      }\n\n      return Object.fromEntries(\n        Object.entries(config).filter(([key, value]) => key.startsWith('on') && typeof value === 'function')\n      );\n    }\n  );\n\n  const reactNativeExports: Record<string, unknown> = {\n    __esModule: true,\n    AccessibilityInfo: (accessibilityInfoModule as any).default ?? accessibilityInfoModule,\n    ActivityIndicator: (activityIndicatorModule as any).default ?? activityIndicatorModule,\n    ActionSheetIOS,\n    Alert,\n    Animated,\n    Appearance,\n    AppRegistry,\n    AppState: (appStateModule as any).default ?? appStateModule,\n    BackHandler,\n    Button,\n    Clipboard: (clipboardModule as any).default ?? clipboardModule,\n    codegenNativeCommands: (codegenNativeCommandsModule as any).default ?? codegenNativeCommandsModule,\n    codegenNativeComponent: (codegenNativeComponentModule as any).default ?? codegenNativeComponentModule,\n    DevMenu,\n    DevSettings,\n    DeviceEventEmitter,\n    DeviceInfo,\n    DynamicColorIOS,\n    Dimensions,\n    DrawerLayoutAndroid,\n    findNodeHandle: (rendererProxyModule as any).findNodeHandle,\n    FlatList,\n    I18nManager,\n    Image: (imageModule as any).default ?? imageModule,\n    ImageBackground,\n    InputAccessoryView,\n    InteractionManager,\n    Keyboard,\n    KeyboardAvoidingView,\n    LayoutAnimation,\n    Linking: (linkingModule as any).default ?? linkingModule,\n    LogBox,\n    Modal: (modalModule as any).default ?? modalModule,\n    NativeComponentRegistry: (nativeComponentRegistryModule as any).default ?? nativeComponentRegistryModule,\n    NativeDialogManagerAndroid,\n    NativeEventEmitter,\n    NativeModules: (nativeModulesModule as any).default ?? nativeModulesModule,\n    NativeAppEventEmitter,\n    Networking,\n    PanResponder,\n    Platform: (platformModule as any).default ?? platformModule,\n    PlatformColor,\n    PixelRatio,\n    PermissionsAndroid,\n    Pressable,\n    processColor,\n    ProgressBarAndroid,\n    PushNotificationIOS,\n    RefreshControl: (refreshControlModule as any).default ?? refreshControlModule,\n    ReactNativeVersion,\n    registerCallableModule,\n    requireNativeComponent: (requireNativeComponentModule as any).default ?? requireNativeComponentModule,\n    RootTagContext,\n    SafeAreaView,\n    ScrollView: (scrollViewModule as any).default ?? scrollViewModule,\n    SectionList,\n    Settings,\n    Share,\n    StatusBar,\n    StyleSheet: (styleSheetModule as any).default ?? styleSheetModule,\n    Switch,\n    Systrace,\n    Text: (textModule as any).default ?? textModule,\n    TextInput: (textInputModule as any).default ?? textInputModule,\n    Touchable,\n    TouchableHighlight,\n    TouchableNativeFeedback,\n    TouchableOpacity,\n    TouchableWithoutFeedback,\n    TurboModuleRegistry,\n    UIManager: (uiManagerModule as any).default ?? uiManagerModule,\n    UTFSequence,\n    unstable_batchedUpdates: (rendererProxyModule as any).unstable_batchedUpdates,\n    unstable_NativeText: NativeText,\n    unstable_NativeView: (viewNativeComponentModule as any).default ?? viewNativeComponentModule,\n    unstable_TextAncestorContext: TextAncestorContext,\n    unstable_VirtualView: VirtualView,\n    useAnimatedValue,\n    useColorScheme: (useColorSchemeModule as any).default ?? useColorSchemeModule,\n    usePressability,\n    useWindowDimensions,\n    Vibration: (vibrationModule as any).default ?? vibrationModule,\n    View: (viewModule as any).default ?? viewModule,\n    VirtualViewMode,\n    VirtualizedList,\n    VirtualizedSectionList,\n    ToastAndroid,\n    Easing,\n    experimental_LayoutConformance: LayoutConformance,\n  };\n\n  const removedExports = [\n    'ART',\n    'ListView',\n    'SwipeableListView',\n    'WebView',\n    'NetInfo',\n    'CameraRoll',\n    'ImageStore',\n    'ImageEditor',\n    'TimePickerAndroid',\n    'ToolbarAndroid',\n    'ViewPagerAndroid',\n    'CheckBox',\n    'SegmentedControlIOS',\n    'StatusBarIOS',\n    'PickerIOS',\n    'Picker',\n    'DatePickerAndroid',\n    'MaskedViewIOS',\n    'AsyncStorage',\n    'ImagePickerIOS',\n    'ProgressViewIOS',\n    'DatePickerIOS',\n    'Slider',\n  ];\n\n  for (const exportedName of removedExports) {\n    Object.defineProperty(reactNativeExports, exportedName, {\n      configurable: true,\n      get() {\n        throw new Error(`${exportedName} has been removed from React Native.`);\n      },\n    });\n  }\n\n  sharedReactNativeExports = reactNativeExports;\n  return sharedReactNativeExports;\n}\n\n// Yarn PnP: keep ESM subpath imports on the same singleton mock registry that\n// the CommonJS loader patch uses below.\nvi.mock(\n  'react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo',\n  () => getSharedReactNativeMockModules().accessibilityInfoModule\n);\nvi.mock('react-native/Libraries/Core/InitializeCore', () => getSharedReactNativeMockModules().initializeCoreModule);\nvi.mock(\n  'react-native/Libraries/Core/NativeExceptionsManager',\n  () => getSharedReactNativeMockModules().nativeExceptionsManagerModule\n);\nvi.mock(\n  'react-native/Libraries/Components/Clipboard/Clipboard',\n  () => getSharedReactNativeMockModules().clipboardModule\n);\nvi.mock(\n  'react-native/Libraries/Utilities/codegenNativeCommands',\n  () => getSharedReactNativeMockModules().codegenNativeCommandsModule\n);\nvi.mock(\n  'react-native/Libraries/Utilities/codegenNativeComponent',\n  () => getSharedReactNativeMockModules().codegenNativeComponentModule\n);\nvi.mock(\n  'react-native/Libraries/Components/RefreshControl/RefreshControl',\n  () => getSharedReactNativeMockModules().refreshControlModule\n);\nvi.mock(\n  'react-native/Libraries/Components/ActivityIndicator/ActivityIndicator',\n  () => getSharedReactNativeMockModules().activityIndicatorModule\n);\nvi.mock('react-native/Libraries/Image/Image', () => getSharedReactNativeMockModules().imageModule);\nvi.mock('react-native/Libraries/Text/Text', () => getSharedReactNativeMockModules().textModule);\nvi.mock(\n  'react-native/Libraries/Components/TextInput/TextInput',\n  () => getSharedReactNativeMockModules().textInputModule\n);\nvi.mock('react-native/Libraries/Modal/Modal', () => getSharedReactNativeMockModules().modalModule);\nvi.mock('react-native/Libraries/Components/View/View', () => getSharedReactNativeMockModules().viewModule);\nvi.mock(\n  'react-native/Libraries/Components/ScrollView/ScrollView',\n  () => getSharedReactNativeMockModules().scrollViewModule\n);\nvi.mock(\n  'react-native/Libraries/BatchedBridge/NativeModules',\n  () => getSharedReactNativeMockModules().nativeModulesModule\n);\nvi.mock('react-native/Libraries/ReactNative/UIManager', () => getSharedReactNativeMockModules().uiManagerModule);\nvi.mock('react-native/Libraries/AppState/AppState', () => getSharedReactNativeMockModules().appStateModule);\nvi.mock('react-native/Libraries/Linking/Linking', () => getSharedReactNativeMockModules().linkingModule);\nvi.mock('react-native/Libraries/Vibration/Vibration', () => getSharedReactNativeMockModules().vibrationModule);\nvi.mock(\n  'react-native/Libraries/NativeComponent/NativeComponentRegistry',\n  () => getSharedReactNativeMockModules().nativeComponentRegistryModule\n);\nvi.mock(\n  'react-native/Libraries/ReactNative/requireNativeComponent',\n  () => getSharedReactNativeMockModules().requireNativeComponentModule\n);\nvi.mock(\n  'react-native/Libraries/Components/View/ViewNativeComponent',\n  () => getSharedReactNativeMockModules().viewNativeComponentModule\n);\nvi.mock('react-native/Libraries/StyleSheet/StyleSheet', () => getSharedReactNativeMockModules().styleSheetModule);\nvi.mock(\n  'react-native/Libraries/Utilities/useColorScheme',\n  () => getSharedReactNativeMockModules().useColorSchemeModule\n);\nvi.mock('react-native/Libraries/Utilities/Platform', () => getSharedReactNativeMockModules().platformModule);\nvi.mock(\n  'react-native/Libraries/ReactNative/RendererProxy',\n  () => getSharedReactNativeMockModules().rendererProxyModule\n);\n\n// Yarn PnP: some consumers still reach RN through CommonJS `require()`, so\n// redirect those loads back to the shared facade and shared subpath mocks\n// instead of letting mirrored package files create divergent instances.\nfunction patchReactNativeResolution() {\n  if (runtimeGlobals.__rntlVitestRnResolverPatched__ === true) {\n    return;\n  }\n\n  const moduleWithPrivateResolver = Module as ModuleWithPrivateResolver;\n  const originalResolveFilename = moduleWithPrivateResolver._resolveFilename;\n  const originalLoad = moduleWithPrivateResolver._load;\n  const reactNativeIndexPath = resolveReactNativeObjectPath('react-native');\n  const sharedMockModules = getSharedReactNativeMockModules();\n  const sharedMockModuleByPath = new Map<string, unknown>([\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/NativeComponent/NativeComponentRegistry.js'),\n      sharedMockModules.nativeComponentRegistryModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/ReactNative/requireNativeComponent.js'),\n      sharedMockModules.requireNativeComponentModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Core/InitializeCore.js'),\n      sharedMockModules.initializeCoreModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Core/NativeExceptionsManager.js'),\n      sharedMockModules.nativeExceptionsManagerModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js'),\n      sharedMockModules.accessibilityInfoModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Components/Clipboard/Clipboard.js'),\n      sharedMockModules.clipboardModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Utilities/codegenNativeCommands.js'),\n      sharedMockModules.codegenNativeCommandsModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Utilities/codegenNativeComponent.js'),\n      sharedMockModules.codegenNativeComponentModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Components/RefreshControl/RefreshControl.js'),\n      sharedMockModules.refreshControlModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js'),\n      sharedMockModules.activityIndicatorModule,\n    ],\n    [resolveReactNativeObjectPath('react-native/Libraries/Image/Image.js'), sharedMockModules.imageModule],\n    [resolveReactNativeObjectPath('react-native/Libraries/Text/Text.js'), sharedMockModules.textModule],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Components/TextInput/TextInput.js'),\n      sharedMockModules.textInputModule,\n    ],\n    [resolveReactNativeObjectPath('react-native/Libraries/Modal/Modal.js'), sharedMockModules.modalModule],\n    [resolveReactNativeObjectPath('react-native/Libraries/Components/View/View.js'), sharedMockModules.viewModule],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Components/ScrollView/ScrollView.js'),\n      sharedMockModules.scrollViewModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/BatchedBridge/NativeModules.js'),\n      sharedMockModules.nativeModulesModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/ReactNative/UIManager.js'),\n      sharedMockModules.uiManagerModule,\n    ],\n    [resolveReactNativeObjectPath('react-native/Libraries/AppState/AppState.js'), sharedMockModules.appStateModule],\n    [resolveReactNativeObjectPath('react-native/Libraries/Linking/Linking.js'), sharedMockModules.linkingModule],\n    [resolveReactNativeObjectPath('react-native/Libraries/Vibration/Vibration.js'), sharedMockModules.vibrationModule],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Components/View/ViewNativeComponent.js'),\n      sharedMockModules.viewNativeComponentModule,\n    ],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/Utilities/useColorScheme.js'),\n      sharedMockModules.useColorSchemeModule,\n    ],\n    [resolveReactNativeObjectPath('react-native/Libraries/Utilities/Platform.js'), sharedMockModules.platformModule],\n    [\n      resolveReactNativeObjectPath('react-native/Libraries/StyleSheet/StyleSheet.js'),\n      sharedMockModules.styleSheetModule,\n    ],\n  ]);\n  const isReactNativePackageManifestRequest = (request: string) =>\n    request === 'react-native/package.json' ||\n    request === 'jest-react-native/package.json' ||\n    (request.startsWith('@react-native/') && request.endsWith('/package.json')) ||\n    (request.startsWith('@react-native-community/') && request.endsWith('/package.json'));\n\n  moduleWithPrivateResolver._resolveFilename = function patchedResolveFilename(request, parent, isMain, options) {\n    if (isReactNativePackageManifestRequest(request)) {\n      return originalResolveFilename.call(this, request, parent, isMain, options);\n    }\n\n    const resolved = resolveReactNativeModuleFromManifest(request, parent?.filename, reactNativeTransformCacheManifest);\n    if (resolved != null) {\n      return resolved.objectPath;\n    }\n\n    return originalResolveFilename.call(this, request, parent, isMain, options);\n  };\n\n  moduleWithPrivateResolver._load = function patchedLoad(request, parent, isMain) {\n    const resolved = moduleWithPrivateResolver._resolveFilename(request, parent, isMain);\n\n    if (resolved === reactNativeIndexPath) {\n      return getSharedReactNativeExports();\n    }\n\n    if (sharedMockModuleByPath.has(resolved)) {\n      return sharedMockModuleByPath.get(resolved);\n    }\n\n    if (REACT_NATIVE_ASSET_MODULE_ID_PATTERN.test(resolved)) {\n      return {\n        testUri: path.relative(runtimeDirectory, resolved.replace(/[?#].*$/, '')).replace(/\\\\/g, '/'),\n      };\n    }\n\n    return originalLoad.call(this, request, parent, isMain);\n  };\n\n  runtimeGlobals.__rntlVitestRnResolverPatched__ = true;\n}\n\nruntimeRequire(resolveReactNativeObjectPath('@react-native/js-polyfills/error-guard.js'));\n\n// Yarn PnP: top-level ESM imports of `react-native` must resolve to the same\n// singleton facade that the CommonJS loader patch returns.\nvi.mock('react-native', () => getSharedReactNativeExports());\n\ninstallReactNativeGlobals(runtimeGlobals);\ninstallNativeModuleProxy(runtimeGlobals);\npatchReactNativeResolution();\n\nexport { createMockHostComponent, createMockNativeComponent };\n"
  },
  {
    "path": "packages/vitest/src/runtimeBootstrap.ts",
    "content": "/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars */\n// @ts-nocheck\nimport { vi } from 'vitest';\n\nexport type NativeModuleMap = Record<string, any>;\n\nexport type RuntimeGlobals = typeof globalThis & {\n  __DEV__?: boolean;\n  __fbBatchedBridgeConfig?: { remoteModuleConfig: unknown[] };\n  __rntlCallableModules?: {\n    callable: Record<string, unknown>;\n    lazy: Record<string, () => unknown>;\n  };\n  __rntlVitestRnResolverPatched__?: boolean;\n  __turboModuleProxy?: (name: string) => unknown;\n  IS_REACT_ACT_ENVIRONMENT?: boolean;\n  IS_REACT_NATIVE_TEST_ENVIRONMENT?: boolean;\n  RN$Bridgeless?: boolean;\n  RN$registerCallableModule?: (name: string, moduleFactory: () => unknown) => void;\n  nativeFabricUIManager?: Record<string, unknown>;\n  nativeModuleProxy?: NativeModuleMap;\n  jest?: { now?: () => number };\n  window?: unknown;\n};\n\nexport function defineGlobalProperty<Key extends keyof RuntimeGlobals>(\n  runtimeGlobals: RuntimeGlobals,\n  key: Key,\n  value: NonNullable<RuntimeGlobals[Key]>,\n) {\n  Object.defineProperty(runtimeGlobals, key, {\n    configurable: true,\n    enumerable: true,\n    value,\n    writable: true,\n  });\n}\n\nfunction createViewManagerConfig(name: string) {\n  return {\n    Commands: {},\n    Constants: {},\n    Manager: name,\n    NativeProps: {},\n    bubblingEventTypes: {},\n    directEventTypes: {},\n    uiViewClassName: name,\n    validAttributes: {},\n  };\n}\n\nexport function installRequestAnimationFrameShim(runtimeGlobals: RuntimeGlobals) {\n  Object.defineProperty(runtimeGlobals, 'requestAnimationFrame', {\n    configurable: true,\n    enumerable: true,\n    value: (callback: (time: number) => void) =>\n      setTimeout(() => callback(runtimeGlobals.jest?.now?.() ?? Date.now()), 0),\n    writable: true,\n  });\n\n  Object.defineProperty(runtimeGlobals, 'cancelAnimationFrame', {\n    configurable: true,\n    enumerable: true,\n    value: (id: ReturnType<typeof setTimeout>) => clearTimeout(id),\n    writable: true,\n  });\n}\n\nexport function installReactNativeGlobals(runtimeGlobals: RuntimeGlobals) {\n  const windowEventListeners = new Map<string, Set<(event: unknown) => void>>();\n\n  defineGlobalProperty(runtimeGlobals, 'IS_REACT_ACT_ENVIRONMENT', true);\n  defineGlobalProperty(runtimeGlobals, 'IS_REACT_NATIVE_TEST_ENVIRONMENT', true);\n  defineGlobalProperty(runtimeGlobals, '__DEV__', true);\n  defineGlobalProperty(runtimeGlobals, 'window', runtimeGlobals as any);\n  defineGlobalProperty(runtimeGlobals, 'nativeFabricUIManager', {});\n  defineGlobalProperty(\n    runtimeGlobals,\n    'addEventListener' as keyof RuntimeGlobals,\n    vi.fn((type: string, listener: (event: unknown) => void) => {\n      const listeners = windowEventListeners.get(type) ?? new Set();\n      listeners.add(listener);\n      windowEventListeners.set(type, listeners);\n    }) as any,\n  );\n  defineGlobalProperty(\n    runtimeGlobals,\n    'removeEventListener' as keyof RuntimeGlobals,\n    vi.fn((type: string, listener: (event: unknown) => void) => {\n      windowEventListeners.get(type)?.delete(listener);\n    }) as any,\n  );\n  defineGlobalProperty(\n    runtimeGlobals,\n    'dispatchEvent' as keyof RuntimeGlobals,\n    vi.fn((event: { type?: string }) => {\n      if (event?.type != null) {\n        windowEventListeners.get(event.type)?.forEach((listener) => listener(event));\n      }\n\n      return true;\n    }) as any,\n  );\n\n  Object.defineProperty(runtimeGlobals, 'performance', {\n    configurable: true,\n    enumerable: true,\n    value: {\n      now: vi.fn(Date.now),\n    },\n    writable: true,\n  });\n\n  installRequestAnimationFrameShim(runtimeGlobals);\n}\n\nexport function installNativeModuleProxy(runtimeGlobals: RuntimeGlobals) {\n  const dimensions = {\n    screen: {\n      fontScale: 2,\n      height: 1334,\n      scale: 2,\n      width: 750,\n    },\n    window: {\n      fontScale: 2,\n      height: 1334,\n      scale: 2,\n      width: 750,\n    },\n  };\n\n  const viewManagerConfigs: Record<string, ReturnType<typeof createViewManagerConfig>> = {\n    AndroidDrawerLayout: {\n      ...createViewManagerConfig('AndroidDrawerLayout'),\n      Constants: {\n        DrawerPosition: {\n          Left: 10,\n        },\n      },\n    },\n    AndroidTextInput: {\n      ...createViewManagerConfig('AndroidTextInput'),\n      Commands: {},\n    },\n    RCTMultilineTextInputView: createViewManagerConfig('RCTMultilineTextInputView'),\n    RCTSafeAreaView: createViewManagerConfig('RCTSafeAreaView'),\n    RCTScrollView: createViewManagerConfig('RCTScrollView'),\n    RCTSinglelineTextInputView: createViewManagerConfig('RCTSinglelineTextInputView'),\n    RCTText: createViewManagerConfig('RCTText'),\n    RCTView: createViewManagerConfig('RCTView'),\n    RCTVirtualText: createViewManagerConfig('RCTVirtualText'),\n    ScrollView: createViewManagerConfig('ScrollView'),\n    Text: createViewManagerConfig('Text'),\n    View: createViewManagerConfig('View'),\n  };\n\n  const uiManager: Record<string, any> = {\n    AndroidDrawerLayout: {\n      Constants: {\n        DrawerPosition: {\n          Left: 10,\n        },\n      },\n    },\n    AndroidViewPager: {\n      Commands: {\n        setPage: vi.fn(),\n        setPageWithoutAnimation: vi.fn(),\n      },\n    },\n    AndroidTextInput: {\n      Commands: {},\n    },\n    ScrollView: {\n      Constants: {},\n    },\n    View: {\n      Constants: {},\n    },\n    blur: vi.fn(),\n    createView: vi.fn(),\n    customBubblingEventTypes: {},\n    customDirectEventTypes: {},\n    dispatchViewManagerCommand: vi.fn(),\n    focus: vi.fn(),\n    lazilyLoadView: vi.fn(() => null),\n    manageChildren: vi.fn(),\n    measure: vi.fn(),\n    measureInWindow: vi.fn(),\n    measureLayout: vi.fn(),\n    measureLayoutRelativeToParent: vi.fn(),\n    setChildren: vi.fn(),\n    updateView: vi.fn(),\n  };\n\n  uiManager.getConstants = vi.fn(() => viewManagerConfigs);\n  uiManager.getConstantsForViewManager = vi.fn(\n    (name: string) => viewManagerConfigs[name] ?? createViewManagerConfig(name),\n  );\n  uiManager.getViewManagerConfig = vi.fn(\n    (name: string) => viewManagerConfigs[name] ?? uiManager.getConstantsForViewManager(name),\n  );\n  uiManager.hasViewManagerConfig = vi.fn((name: string) => uiManager.getViewManagerConfig(name) != null);\n\n  const nativeAnimatedModule = {\n    addAnimatedEventToView: vi.fn(),\n    addListener: vi.fn(),\n    connectAnimatedNodeToView: vi.fn(),\n    connectAnimatedNodes: vi.fn(),\n    createAnimatedNode: vi.fn(),\n    disconnectAnimatedNodeFromView: vi.fn(),\n    disconnectAnimatedNodes: vi.fn(),\n    dropAnimatedNode: vi.fn(),\n    extractAnimatedNodeOffset: vi.fn(),\n    finishOperationBatch: vi.fn(),\n    flattenAnimatedNodeOffset: vi.fn(),\n    getValue: vi.fn(),\n    queueAndExecuteBatchedOperations: vi.fn(),\n    removeAnimatedEventFromView: vi.fn(),\n    removeListener: vi.fn(),\n    removeListeners: vi.fn(),\n    restoreDefaultValues: vi.fn(),\n    setAnimatedNodeOffset: vi.fn(),\n    setAnimatedNodeValue: vi.fn(),\n    startAnimatingNode: vi.fn(\n      (\n        animationId: number,\n        nodeTag: number,\n        config: Record<string, unknown>,\n        endCallback?: (result: { finished: boolean }) => void,\n      ) => {\n        setTimeout(() => endCallback?.({ finished: true }), 16);\n      },\n    ),\n    startListeningToAnimatedNodeValue: vi.fn(),\n    startOperationBatch: vi.fn(),\n    stopAnimation: vi.fn(),\n    stopListeningToAnimatedNodeValue: vi.fn(),\n    updateAnimatedNodeConfig: vi.fn(),\n  };\n\n  const nativeModuleProxy: NativeModuleMap = {\n    AlertManager: {\n      alertWithArgs: vi.fn(),\n    },\n    AsyncLocalStorage: {\n      clear: vi.fn((callback?: (error: null) => void) => process.nextTick(() => callback?.(null))),\n      getAllKeys: vi.fn((callback: (error: null, keys: string[]) => void) =>\n        process.nextTick(() => callback(null, [])),\n      ),\n      multiGet: vi.fn((keys: string[], callback: (error: null, entries: string[][]) => void) =>\n        process.nextTick(() => callback(null, [])),\n      ),\n      multiMerge: vi.fn((entries: string[][], callback?: (error: null) => void) =>\n        process.nextTick(() => callback?.(null)),\n      ),\n      multiRemove: vi.fn((keys: string[], callback?: (error: null) => void) =>\n        process.nextTick(() => callback?.(null)),\n      ),\n      multiSet: vi.fn((entries: string[][], callback?: (error: null) => void) =>\n        process.nextTick(() => callback?.(null)),\n      ),\n    },\n    BlobModule: {\n      addNetworkingHandler: vi.fn(),\n      createFromParts: vi.fn(),\n      disableBlobSupport: vi.fn(),\n      enableBlobSupport: vi.fn(),\n      getConstants: () => ({ BLOB_URI_HOST: null, BLOB_URI_SCHEME: 'content' }),\n      release: vi.fn(),\n      sendBlob: vi.fn(),\n    },\n    DevSettings: {\n      addMenuItem: vi.fn(),\n      reload: vi.fn(),\n    },\n    DeviceInfo: {\n      getConstants: () => ({\n        Dimensions: dimensions,\n      }),\n    },\n    I18nManager: {\n      allowRTL: vi.fn(),\n      forceRTL: vi.fn(),\n      getConstants: () => ({\n        doLeftAndRightSwapInRTL: true,\n        isRTL: false,\n        localeIdentifier: 'en_US',\n      }),\n      swapLeftAndRightInRTL: vi.fn(),\n    },\n    ImageLoader: {\n      getSize: vi.fn((url: string) => Promise.resolve([320, 240])),\n      getSizeWithHeaders: vi.fn((url: string, headers: Record<string, string>) =>\n        Promise.resolve({ height: 222, width: 333 }),\n      ),\n      prefetchImage: vi.fn(),\n      prefetchImageWithMetadata: vi.fn(),\n      queryCache: vi.fn(),\n    },\n    ImageViewManager: {\n      getSize: vi.fn((uri: string, success: (width: number, height: number) => void) =>\n        process.nextTick(() => success(320, 240)),\n      ),\n      prefetchImage: vi.fn(),\n    },\n    KeyboardObserver: {\n      addListener: vi.fn(),\n      removeListeners: vi.fn(),\n    },\n    NativeAnimatedModule: nativeAnimatedModule,\n    Networking: {\n      abortRequest: vi.fn(),\n      addListener: vi.fn(),\n      removeListeners: vi.fn(),\n      sendRequest: vi.fn(),\n    },\n    PlatformConstants: {\n      getConstants: () => ({\n        forceTouchAvailable: false,\n        interfaceIdiom: 'phone',\n        isDisableAnimations: false,\n        isMacCatalyst: false,\n        isTesting: true,\n        osVersion: '17.0',\n        reactNativeVersion: {\n          major: 0,\n          minor: 79,\n          patch: 5,\n          prerelease: undefined,\n        },\n        systemName: 'iOS',\n      }),\n    },\n    PushNotificationManager: {\n      abandonPermissions: vi.fn(),\n      addListener: vi.fn(),\n      cancelAllLocalNotifications: vi.fn(),\n      cancelLocalNotifications: vi.fn(),\n      checkPermissions: vi.fn((callback: (permissions: { alert: boolean; badge: boolean; sound: boolean }) => void) =>\n        process.nextTick(() => callback({ alert: true, badge: true, sound: true })),\n      ),\n      getApplicationIconBadgeNumber: vi.fn((callback: (badge: number) => void) =>\n        process.nextTick(() => callback(0)),\n      ),\n      getDeliveredNotifications: vi.fn((callback: (notifications: unknown[]) => void) =>\n        process.nextTick(() => callback([])),\n      ),\n      getInitialNotification: vi.fn(() => Promise.resolve(null)),\n      getScheduledLocalNotifications: vi.fn((callback?: () => void) =>\n        process.nextTick(() => callback?.()),\n      ),\n      presentLocalNotification: vi.fn(),\n      removeAllDeliveredNotifications: vi.fn(),\n      removeDeliveredNotifications: vi.fn(),\n      removeListeners: vi.fn(),\n      requestPermissions: vi.fn(() =>\n        Promise.resolve({ alert: true, badge: true, sound: true }),\n      ),\n      scheduleLocalNotification: vi.fn(),\n      setApplicationIconBadgeNumber: vi.fn(),\n    },\n    SourceCode: {\n      getConstants: () => ({\n        scriptURL: null,\n      }),\n    },\n    StatusBarManager: {\n      getConstants: () => ({\n        HEIGHT: 42,\n      }),\n      setBackgroundColor: vi.fn(),\n      setColor: vi.fn(),\n      setHidden: vi.fn(),\n      setNetworkActivityIndicatorVisible: vi.fn(),\n      setStyle: vi.fn(),\n      setTranslucent: vi.fn(),\n    },\n    Timing: {\n      createTimer: vi.fn(),\n      deleteTimer: vi.fn(),\n    },\n    UIManager: uiManager,\n    WebSocketModule: {\n      addListener: vi.fn(),\n      close: vi.fn(),\n      connect: vi.fn(),\n      ping: vi.fn(),\n      removeListeners: vi.fn(),\n      send: vi.fn(),\n      sendBinary: vi.fn(),\n    },\n  };\n\n  defineGlobalProperty(runtimeGlobals, 'nativeModuleProxy', nativeModuleProxy);\n  defineGlobalProperty(runtimeGlobals, '__turboModuleProxy', (name: string) => nativeModuleProxy[name] ?? null);\n  defineGlobalProperty(runtimeGlobals, '__fbBatchedBridgeConfig', { remoteModuleConfig: [] });\n}\n"
  },
  {
    "path": "packages/vitest/src/setup.ts",
    "content": "import { installVitestJestBridge, installVitestPrettierWorkaround } from './jestBridge';\n\ninstallVitestPrettierWorkaround();\ninstallVitestJestBridge();\n"
  },
  {
    "path": "packages/vitest/src/transpile.spec.ts",
    "content": "import { describe, expect, it } from 'vitest';\nimport { shouldTransformReactNativeFile, transformReactNativeSource } from './transpile';\n\ndescribe('transpile helpers', () => {\n  it('turns Flow-annotated React Native source into executable test input', async () => {\n    const transformed = await transformReactNativeSource(\n      '/virtual/react-native/Libraries/Button.js',\n      'export function Button(props: { label: string }) { return <View foo={props.label} />; }',\n    );\n\n    expect(transformed).toContain('export function Button(props)');\n    expect(transformed).toContain('<View foo={props.label} />');\n    expect(transformed).not.toContain(': { label: string }');\n  });\n\n  it('only treats mirrored React Native package roots as transformable source', () => {\n    const communityPackageRoot = '/virtual/node_modules/@react-native-community/blur';\n    const jestReactNativeRoot = '/virtual/node_modules/jest-react-native';\n\n    expect(\n      shouldTransformReactNativeFile(\n        `${communityPackageRoot}/src/index.js`,\n        [communityPackageRoot],\n      ),\n    ).toBe(true);\n    expect(\n      shouldTransformReactNativeFile(\n        `${jestReactNativeRoot}/index.js`,\n        [jestReactNativeRoot],\n      ),\n    ).toBe(true);\n    expect(\n      shouldTransformReactNativeFile('/virtual/project/src/index.js', [\n        communityPackageRoot,\n        jestReactNativeRoot,\n      ]),\n    ).toBe(false);\n  });\n});\n"
  },
  {
    "path": "packages/vitest/src/transpile.ts",
    "content": "import path from 'node:path';\nimport flowRemoveTypes from 'flow-remove-types';\n\nexport const REACT_NATIVE_TRANSFORM_EXTENSIONS = ['.js', '.jsx', '.ts', '.tsx'] as const;\nexport const REACT_NATIVE_TRANSFORM_ALLOWLIST = [\n  'react-native',\n  'jest-react-native',\n  '@react-native',\n  '@react-native-community',\n] as const;\n\nfunction normalizePath(filename: string) {\n  return filename.replace(/\\\\/g, '/');\n}\n\nfunction isWithinPackageRoots(filename: string, packageRoots: readonly string[]) {\n  const normalizedFilename = normalizePath(path.resolve(filename));\n\n  return packageRoots.some((packageRoot) => {\n    const normalizedPackageRoot = normalizePath(path.resolve(packageRoot));\n\n    return (\n      normalizedFilename === normalizedPackageRoot ||\n      normalizedFilename.startsWith(`${normalizedPackageRoot}/`)\n    );\n  });\n}\n\nexport function shouldTransformReactNativeFile(\n  filename: string,\n  packageRoots: readonly string[] = [],\n) {\n  const normalized = normalizePath(filename);\n  const isReactNativeSource =\n    packageRoots.length > 0\n      ? isWithinPackageRoots(normalized, packageRoots)\n      : normalized.includes('/react-native/') || normalized.includes('/@react-native/');\n\n  return (\n    /\\.(?:js|jsx|ts|tsx)$/.test(normalized) &&\n    !normalized.includes('/Renderer/implementations/') &&\n    isReactNativeSource\n  );\n}\n\nexport function shouldInlineReactNativeDependency(\n  filename: string,\n  packageRoots: readonly string[] = [],\n) {\n  const normalized = normalizePath(filename);\n\n  if (packageRoots.length > 0) {\n    return isWithinPackageRoots(normalized, packageRoots);\n  }\n\n  return REACT_NATIVE_TRANSFORM_ALLOWLIST.some((allowlistEntry) =>\n    normalized.includes(`/${allowlistEntry}/`),\n  );\n}\n\nexport async function transformReactNativeSource(_sourcePath: string, source: string) {\n  return flowRemoveTypes(source, {\n    all: true,\n    pretty: true,\n    removeEmptyImports: true,\n  }).toString();\n}\n"
  },
  {
    "path": "packages/vitest/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\", \"vitest/globals\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "packages/vitest/tsdown.config.ts",
    "content": "import { defineConfig } from 'tsdown';\n\nexport default defineConfig({\n  entry: ['src/index.ts', 'src/reactNativeRuntime.ts', 'src/setup.ts'],\n  format: ['esm'],\n  dts: true,\n  exports: true,\n  fixedExtension: false,\n});\n"
  },
  {
    "path": "packages/vitest/vitest.config.mts",
    "content": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  cacheDir: '.vitest',\n  test: {\n    hookTimeout: 60_000,\n    include: ['src/**/*.spec.ts'],\n    testTimeout: 60_000,\n  },\n});\n"
  },
  {
    "path": "services/counter/README.md",
    "content": "# Granite App\n"
  },
  {
    "path": "services/counter/babel.config.js",
    "content": "module.exports = {\n  presets: ['babel-preset-granite'],\n};\n"
  },
  {
    "path": "services/counter/eslint.config.mjs",
    "content": "import pluginJs from '@eslint/js';\nimport pluginReact from 'eslint-plugin-react';\nimport tseslint from 'typescript-eslint';\n\n/** @type {import('eslint').Linter.Config[]} */\nexport default [\n  { ignores: ['**/node_modules/**', '**/dist/**', '*.{cjs,js}'] },\n  { files: ['pages/**/*.{ts,jsx,tsx}', 'src/**/*.{ts,jsx,tsx}'] },\n  pluginJs.configs.recommended,\n  ...tseslint.configs.recommended,\n  {\n    settings: {\n      react: {\n        version: 'detect',\n      },\n    },\n  },\n  pluginReact.configs.flat.recommended,\n];\n"
  },
  {
    "path": "services/counter/granite.config.ts",
    "content": "import { env } from '@granite-js/plugin-env';\nimport { hermes } from '@granite-js/plugin-hermes';\nimport { microFrontend } from '@granite-js/plugin-micro-frontend';\nimport { router } from '@granite-js/plugin-router';\nimport { defineConfig } from '@granite-js/react-native/config';\n\nexport default defineConfig({\n  /**\n   * granite://counter\n   */\n  scheme: 'granite',\n  appName: 'counter',\n  plugins: [\n    router(),\n    env({ MY_ENV: 'test' }),\n    hermes(),\n    microFrontend({\n      name: 'remoteApp',\n      exposes: {\n        './AppContainer': './src/_app.tsx',\n      },\n      shared: [\n        '@react-native-community/blur',\n        '@react-navigation/native',\n        '@react-navigation/native-stack',\n        '@shopify/flash-list',\n        'react-native-safe-area-context',\n        'react-native-screens',\n        'react-native-svg',\n        'react-native-gesture-handler',\n        'react-native',\n        'react',\n        'react-native-webview',\n      ],\n    }),\n    {\n      name: 'test',\n      build: {\n        order: 'post',\n        handler: function () {\n          console.debug('[DEBUG] Plugin meta:', this.meta);\n        },\n      },\n    },\n  ],\n});\n"
  },
  {
    "path": "services/counter/index.ts",
    "content": "import { register } from '@granite-js/react-native';\nimport App from './src/_app';\n\nregister(App);\n"
  },
  {
    "path": "services/counter/package.json",
    "content": "{\n  \"name\": \"@granite-app/counter\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"granite dev\",\n    \"build\": \"granite build\",\n    \"test\": \"jest --passWithNoTests\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"biome check --write\"\n  },\n  \"dependencies\": {\n    \"@granite-js/native\": \"workspace:*\",\n    \"@granite-js/react-native\": \"workspace:*\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"7.28.5\",\n    \"@babel/runtime\": \"7.18.9\",\n    \"@biomejs/biome\": \"^1.9.4\",\n    \"@granite-js/forge-cli\": \"workspace:*\",\n    \"@granite-js/plugin-env\": \"workspace:*\",\n    \"@granite-js/plugin-hermes\": \"workspace:*\",\n    \"@granite-js/plugin-micro-frontend\": \"workspace:*\",\n    \"@granite-js/plugin-router\": \"workspace:*\",\n    \"@testing-library/react-native\": \"^12.9.0\",\n    \"@types/babel__core\": \"^7.20.5\",\n    \"@types/jest\": \"^29.5.14\",\n    \"@types/node\": \"catalog:tools\",\n    \"@types/react\": \"catalog:react-native\",\n    \"babel-preset-granite\": \"workspace:*\",\n    \"jest\": \"^29.7.0\",\n    \"react-test-renderer\": \"18.2.0\",\n    \"typescript\": \"catalog:tools\"\n  }\n}\n"
  },
  {
    "path": "services/counter/pages/_404.tsx",
    "content": "import React from 'react';\nimport { Text, View } from 'react-native';\n\nexport default function NotFoundPage() {\n  return (\n    <View\n      style={{\n        flex: 1,\n        alignItems: 'center',\n        justifyContent: 'center',\n      }}\n    >\n      <Text>404 Not Found</Text>\n    </View>\n  );\n}\n"
  },
  {
    "path": "services/counter/pages/index.tsx",
    "content": "export { Route } from 'pages/index';\n"
  },
  {
    "path": "services/counter/react-native.config.js",
    "content": "module.exports = {\n  reactNativePath: require('path').dirname(require.resolve('react-native/package.json')),\n};\n"
  },
  {
    "path": "services/counter/require.context.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const context = require.context('./pages');\n"
  },
  {
    "path": "services/counter/src/_app.tsx",
    "content": "import { Granite, type InitialProps } from '@granite-js/react-native';\nimport React, { type PropsWithChildren } from 'react';\nimport { context } from '../require.context';\n\nfunction AppContainer({ children }: PropsWithChildren<InitialProps>) {\n  return <>{children}</>;\n}\n\nexport default Granite.registerApp(AppContainer, { context, appName: 'showcase' });\n"
  },
  {
    "path": "services/counter/src/env.d.ts",
    "content": "// Auto generated by env plugin. DO NOT EDIT.\ntype Env = {\n  MY_ENV: string;\n};\n\ninterface ImportMeta {\n  readonly env: Env & {};\n}\n"
  },
  {
    "path": "services/counter/src/pages/index.tsx",
    "content": "import { createRoute } from '@granite-js/react-native';\nimport React, { useState } from 'react';\nimport { StyleSheet, View, Text, TouchableOpacity, Dimensions } from 'react-native';\n\nexport const Route = createRoute('/', {\n  component: CounterPage,\n});\n\nfunction CounterPage() {\n  const [count, setCount] = useState(0);\n\n  const increment = () => setCount((prevCount) => prevCount + 1);\n  const decrement = () => setCount((prevCount) => prevCount - 1);\n  const reset = () => setCount(0);\n\n  return (\n    <View style={styles.container}>\n      <View style={styles.card}>\n        <Text style={styles.title}>Counter</Text>\n        <Text style={styles.countText}>{count}</Text>\n        <View style={styles.buttonContainer}>\n          <TouchableOpacity style={[styles.button, styles.decrementButton]} onPress={decrement}>\n            <Text style={styles.buttonText}>-</Text>\n          </TouchableOpacity>\n          <TouchableOpacity style={[styles.button, styles.incrementButton]} onPress={increment}>\n            <Text style={styles.buttonText}>+</Text>\n          </TouchableOpacity>\n        </View>\n        <TouchableOpacity style={[styles.button, styles.resetButton]} onPress={reset}>\n          <Text style={styles.resetButtonText}>Reset</Text>\n        </TouchableOpacity>\n      </View>\n    </View>\n  );\n}\n\nconst screenWidth = Dimensions.get('window').width;\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    backgroundColor: '#F0F4F8',\n    justifyContent: 'center',\n    alignItems: 'center',\n    padding: 16,\n  },\n  card: {\n    backgroundColor: 'white',\n    borderRadius: 16,\n    padding: 24,\n    alignItems: 'center',\n    shadowColor: '#000',\n    shadowOffset: {\n      width: 0,\n      height: 4,\n    },\n    shadowOpacity: 0.1,\n    shadowRadius: 8,\n    elevation: 8,\n    width: screenWidth * 0.85,\n    maxWidth: 400,\n  },\n  title: {\n    fontSize: 28,\n    fontWeight: 'bold',\n    color: '#1A202C',\n    marginBottom: 24,\n  },\n  countText: {\n    fontSize: 72,\n    fontWeight: 'bold',\n    color: '#0064FF',\n    marginBottom: 32,\n  },\n  buttonContainer: {\n    flexDirection: 'row',\n    justifyContent: 'center',\n    width: '100%',\n    marginBottom: 24,\n    gap: 20,\n  },\n  button: {\n    borderRadius: 50,\n    width: 64,\n    height: 64,\n    justifyContent: 'center',\n    alignItems: 'center',\n    shadowColor: '#000',\n    shadowOffset: {\n      width: 0,\n      height: 2,\n    },\n    shadowOpacity: 0.15,\n    shadowRadius: 4,\n    elevation: 4,\n  },\n  incrementButton: {\n    backgroundColor: '#0064FF',\n  },\n  decrementButton: {\n    backgroundColor: '#FF5A5F',\n  },\n  buttonText: {\n    color: 'white',\n    fontSize: 32,\n    fontWeight: 'bold',\n  },\n  resetButton: {\n    backgroundColor: '#718096',\n    paddingVertical: 12,\n    paddingHorizontal: 40,\n    borderRadius: 8,\n    width: 'auto',\n    height: 'auto',\n  },\n  resetButtonText: {\n    color: 'white',\n    fontSize: 18,\n    fontWeight: '600',\n  },\n});\n"
  },
  {
    "path": "services/counter/src/router.gen.ts",
    "content": " \n// This file is auto-generated by @granite-js/react-native. DO NOT EDIT.\nimport { Route as _IndexRoute } from '../pages/';\n\ndeclare module '@granite-js/react-native' {\n  interface RegisterScreenInput {\n    '/': (typeof _IndexRoute)['_inputType'];\n  }\n\n  interface RegisterScreen {\n    '/': (typeof _IndexRoute)['_outputType'];\n  }\n}\n"
  },
  {
    "path": "services/counter/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"moduleResolution\": \"bundler\",\n    \"baseUrl\": \"src\",\n    \"lib\": [\"ESNext\"],\n    \"jsx\": \"preserve\",\n    \"rootDir\": \".\",\n    \"allowJs\": true,\n    \"outDir\": \"./dist\"\n  },\n  \"include\": [\"**/*.ts\", \"**/*.tsx\", \"**/*.e2e.ts\"]\n}\n"
  },
  {
    "path": "services/pulumi-testbed/.gitignore",
    "content": "/bin/\n/node_modules/\n"
  },
  {
    "path": "services/pulumi-testbed/Pulumi.dev.yaml",
    "content": "config:\n  aws:region: ap-northeast-2\n  pulumi-testbed:bucketName: granite-js\n  pulumi-testbed:region: ap-northeast-2\n"
  },
  {
    "path": "services/pulumi-testbed/Pulumi.yaml",
    "content": "name: pulumi-testbed\ndescription: A minimal AWS TypeScript Pulumi program\nruntime:\n  name: nodejs\n  options:\n    packagemanager: yarn\nconfig:\n  pulumi:tags:\n    value:\n      pulumi:template: aws-typescript\n"
  },
  {
    "path": "services/pulumi-testbed/README.md",
    "content": "# AWS TypeScript Pulumi Template\n\nA minimal Pulumi template for provisioning AWS infrastructure using TypeScript. This template creates an Amazon S3 bucket and exports its name.\n\n## Prerequisites\n\n- Pulumi CLI (>= v3): https://www.pulumi.com/docs/get-started/install/\n- Node.js (>= 14): https://nodejs.org/\n- AWS credentials configured (e.g., via `aws configure` or environment variables)\n\n## Getting Started\n\n1.  Initialize a new Pulumi project:\n\n    ```bash\n    pulumi new aws-typescript\n    ```\n\n    Follow the prompts to set your:\n    - Project name\n    - Project description\n    - AWS region (defaults to `us-east-1`)\n\n2.  Preview and deploy your infrastructure:\n\n    ```bash\n    pulumi preview\n    pulumi up\n    ```\n\n3.  When you're finished, tear down your stack:\n\n    ```bash\n    pulumi destroy\n    pulumi stack rm\n    ```\n\n## Project Layout\n\n- `Pulumi.yaml` — Pulumi project and template metadata\n- `index.ts` — Main Pulumi program (creates an S3 bucket)\n- `package.json` — Node.js dependencies\n- `tsconfig.json` — TypeScript compiler options\n\n## Configuration\n\n| Key          | Description                             | Default     |\n| ------------ | --------------------------------------- | ----------- |\n| `aws:region` | The AWS region to deploy resources into | `us-east-1` |\n\nUse `pulumi config set <key> <value>` to customize configuration.\n\n## Next Steps\n\n- Extend `index.ts` to provision additional resources (e.g., VPCs, Lambda functions, DynamoDB tables).\n- Explore [Pulumi AWSX](https://www.pulumi.com/docs/reference/pkg/awsx/) for higher-level AWS components.\n- Consult the [Pulumi documentation](https://www.pulumi.com/docs/) for more examples and best practices.\n\n## Getting Help\n\nIf you encounter any issues or have suggestions, please open an issue in this repository.\n"
  },
  {
    "path": "services/pulumi-testbed/index.ts",
    "content": "import { ReactNativeBundleCDN } from '@granite-js/pulumi-aws';\nimport * as pulumi from '@pulumi/pulumi';\n\nconst config = new pulumi.Config();\n\nconst cdn = new ReactNativeBundleCDN('myReactNativeBundleCDN', {\n  bucketName: config.require('bucketName'),\n  region: config.require('region'),\n});\n\nexport const iosSharedUrl = pulumi.interpolate`https://${cdn.cloudfrontDomain}/ios/shared/1/bundle`;\nexport const androidSharedUrl = pulumi.interpolate`https://${cdn.cloudfrontDomain}/android/shared/1/bundle`;\n"
  },
  {
    "path": "services/pulumi-testbed/package.json",
    "content": "{\n  \"name\": \"pulumi-testbed\",\n  \"private\": true,\n  \"main\": \"index.ts\",\n  \"scripts\": {\n    \"pulumi:up\": \"pnpify pulumi up\",\n    \"pulumi:destroy\": \"pnpify pulumi destroy\"\n  },\n  \"devDependencies\": {\n    \"@granite-js/pulumi-aws\": \"workspace:*\",\n    \"@types/node\": \"catalog:tools\",\n    \"@yarnpkg/pnpify\": \"^4.1.4\",\n    \"typescript\": \"catalog:tools\"\n  },\n  \"dependencies\": {\n    \"@pulumi/aws\": \"^6.0.0\",\n    \"@pulumi/awsx\": \"^2.0.2\",\n    \"@pulumi/pulumi\": \"^3.113.0\"\n  }\n}\n"
  },
  {
    "path": "services/pulumi-testbed/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"outDir\": \"bin\",\n    \"target\": \"es2020\",\n    \"module\": \"commonjs\",\n    \"moduleResolution\": \"node\",\n    \"sourceMap\": true,\n    \"experimentalDecorators\": true,\n    \"pretty\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noImplicitReturns\": true,\n    \"forceConsistentCasingInFileNames\": true\n  },\n  \"files\": [\"index.ts\"]\n}\n"
  },
  {
    "path": "services/shared/README.md",
    "content": "# shared\n"
  },
  {
    "path": "services/shared/VERSION",
    "content": "1.0.0"
  },
  {
    "path": "services/shared/granite.config.ts",
    "content": "import { hermes } from '@granite-js/plugin-hermes';\nimport { microFrontend } from '@granite-js/plugin-micro-frontend';\nimport { defineConfig } from '@granite-js/react-native/config';\n\nconst SHARED_MODULES = [\n  // FIXME: Sandbox app update is required\n  // '@react-native-async-storage/async-storage',\n  '@react-native-community/blur',\n  '@react-navigation/native',\n  '@react-navigation/native-stack',\n  '@shopify/flash-list',\n  'react-native-safe-area-context',\n  'react-native-screens',\n  'react-native-svg',\n  'react-native-gesture-handler',\n  'react-native',\n  'react',\n  'react-native-webview',\n];\n\nexport default defineConfig({\n  appName: 'shared',\n  scheme: 'granite',\n  plugins: [\n    hermes(),\n    microFrontend({\n      name: 'shared',\n      remote: {\n        host: 'localhost',\n        port: 8082,\n      },\n      shared: SHARED_MODULES.reduce(\n        (prev, packageName) => ({\n          ...prev,\n          [packageName]: { eager: true },\n        }),\n        {} as Record<string, { eager: boolean }>\n      ),\n    }),\n  ],\n});\n"
  },
  {
    "path": "services/shared/index.ts",
    "content": "import { register } from '@granite-js/react-native';\nimport App from './src/_app';\n\nregister(App);\n"
  },
  {
    "path": "services/shared/package.json",
    "content": "{\n  \"name\": \"@granite-app/shared\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"granite dev\",\n    \"build\": \"granite build --no-cache\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"biome check --write\"\n  },\n  \"dependencies\": {\n    \"@granite-js/mpack\": \"workspace:*\",\n    \"@granite-js/react-native\": \"workspace:*\",\n    \"@react-native-async-storage/async-storage\": \"catalog:react-native\",\n    \"@react-native-community/blur\": \"catalog:react-native\",\n    \"@react-navigation/elements\": \"catalog:react-native\",\n    \"@react-navigation/native\": \"catalog:react-native\",\n    \"@react-navigation/native-stack\": \"catalog:react-native\",\n    \"@shopify/flash-list\": \"catalog:react-native\",\n    \"@toss/error-boundary\": \"^1.5.2\",\n    \"brick-module\": \"catalog:brick-module\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"react-native-gesture-handler\": \"catalog:react-native\",\n    \"react-native-pager-view\": \"catalog:react-native\",\n    \"react-native-safe-area-context\": \"catalog:react-native\",\n    \"react-native-screens\": \"catalog:react-native\",\n    \"react-native-svg\": \"catalog:react-native\",\n    \"react-native-webview\": \"catalog:react-native\"\n  },\n  \"devDependencies\": {\n    \"@babel/runtime\": \"7.18.9\",\n    \"@granite-js/forge-cli\": \"workspace:*\",\n    \"@granite-js/native\": \"workspace:*\",\n    \"@granite-js/plugin-hermes\": \"workspace:*\",\n    \"@granite-js/plugin-micro-frontend\": \"workspace:*\",\n    \"@react-native/babel-preset\": \"catalog:react-native\",\n    \"@types/node\": \"catalog:tools\",\n    \"@types/react\": \"catalog:react-native\",\n    \"typescript\": \"catalog:tools\"\n  }\n}\n"
  },
  {
    "path": "services/shared/src/_app.tsx",
    "content": "import { Granite, type InitialProps } from '@granite-js/react-native';\nimport { MainPage } from './pages/MainPage';\n\nfunction AppContainer(props: InitialProps) {\n  return <MainPage {...props} />;\n}\n\nexport default Granite.registerHostApp(AppContainer, { appName: 'shared' });\n"
  },
  {
    "path": "services/shared/src/components/ErrorPage.tsx",
    "content": "import { View, Text, StyleSheet, TouchableOpacity, DevSettings } from 'react-native';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\nexport interface ErrorPageProps {\n  reason?: string;\n}\n\nexport function ErrorPage(props: ErrorPageProps) {\n  const handleRetry = () => {\n    DevSettings.reload();\n  };\n\n  return (\n    <SafeAreaView style={styles.container}>\n      <View style={styles.content}>\n        <Text style={styles.errorIcon}>⚠️</Text>\n        <Text style={styles.title}>Oops! Something went wrong</Text>\n        <Text style={styles.subtitle}>We encountered an issue with React Native Framework.</Text>\n        <Text style={styles.errorReason}>{props.reason ?? 'Unknown error'}</Text>\n        <TouchableOpacity style={styles.retryButton} onPress={handleRetry}>\n          <Text style={styles.retryButtonText}>Reload</Text>\n        </TouchableOpacity>\n      </View>\n    </SafeAreaView>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n  },\n  backButton: {\n    position: 'absolute',\n    top: 50,\n    left: 20,\n    zIndex: 10,\n    width: 40,\n    height: 40,\n    justifyContent: 'center',\n    alignItems: 'center',\n  },\n  backButtonText: {\n    fontSize: 24,\n    color: '#333',\n    fontWeight: '300',\n  },\n  content: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    paddingHorizontal: 40,\n  },\n  errorIcon: {\n    fontSize: 80,\n    marginBottom: 30,\n  },\n  title: {\n    fontSize: 32,\n    fontWeight: 'bold',\n    color: '#333',\n    textAlign: 'center',\n    marginBottom: 20,\n    lineHeight: 40,\n  },\n  subtitle: {\n    fontSize: 16,\n    color: '#666',\n    textAlign: 'center',\n    marginBottom: 30,\n    lineHeight: 24,\n    maxWidth: 300,\n  },\n  errorReason: {\n    fontSize: 14,\n    color: '#888',\n    textAlign: 'center',\n    marginBottom: 40,\n    paddingHorizontal: 20,\n    lineHeight: 20,\n    fontStyle: 'italic',\n    maxWidth: 280,\n  },\n  retryButton: {\n    backgroundColor: '#0064FF',\n    paddingHorizontal: 40,\n    paddingVertical: 16,\n    borderRadius: 25,\n    elevation: 2,\n    shadowColor: '#0064FF',\n    shadowOffset: {\n      width: 0,\n      height: 2,\n    },\n    shadowOpacity: 0.25,\n    shadowRadius: 3.84,\n  },\n  retryButtonText: {\n    color: 'white',\n    fontSize: 16,\n    fontWeight: '600',\n    textAlign: 'center',\n  },\n});\n"
  },
  {
    "path": "services/shared/src/pages/MainPage.tsx",
    "content": "import type { InitialProps } from '@granite-js/react-native';\nimport { ErrorBoundary } from '@toss/error-boundary';\nimport React, { Suspense } from 'react';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\nimport { ErrorPage } from '../components/ErrorPage';\nimport { loadAppContent } from '../utils/loadAppContent';\n\nconst AppContent = React.lazy(() => loadAppContent('remoteApp/AppContainer'));\n\nexport function MainPage(props: InitialProps) {\n  return (\n    <ErrorBoundary renderFallback={(props) => <ErrorPage reason={props.error.message} />}>\n      <SafeAreaProvider>\n        <Suspense fallback={null}>\n          <AppContent {...props} />\n        </Suspense>\n      </SafeAreaProvider>\n    </ErrorBoundary>\n  );\n}\n"
  },
  {
    "path": "services/shared/src/types.ts",
    "content": "import type { RuntimeContext } from '@granite-js/plugin-micro-frontend/runtime';\n\nexport interface GraniteGlobal {\n  /**\n   * @internal\n   * Set of global functions injected in Mpack development mode\n   */\n  __mpackInternal: {\n    /**\n     * Function to load the preloaded remote bundle\n     */\n    loadRemote: () => Promise<void>;\n  };\n\n  /**\n   * @internal\n   * Micro frontend runtime\n   */\n  __MICRO_FRONTEND__: RuntimeContext;\n}\n"
  },
  {
    "path": "services/shared/src/utils/getGlobal.ts",
    "content": "import type { GraniteGlobal } from '../types';\n\ndeclare const window: unknown;\n\nexport function getGlobal(this: unknown) {\n  return (\n    typeof globalThis !== 'undefined'\n      ? globalThis\n      : typeof global !== 'undefined'\n        ? global\n        : typeof window !== 'undefined'\n          ? window\n          : this\n  ) as GraniteGlobal;\n}\n"
  },
  {
    "path": "services/shared/src/utils/isMetro.ts",
    "content": "import { getGlobal } from './getGlobal';\n\nexport function isMetro() {\n  const global = getGlobal() as any;\n  const metroGlobalPrefix = global.__METRO_GLOBAL_PREFIX__ ?? '';\n\n  // If `__r` (= metroRequire) is defined, current bundle is built by Metro.\n  return `${metroGlobalPrefix}__r` in global;\n}\n"
  },
  {
    "path": "services/shared/src/utils/loadAppContent.ts",
    "content": "import { BrickModule } from 'brick-module';\nimport type { ComponentType } from 'react';\nimport { getGlobal } from './getGlobal';\nimport { isMetro } from './isMetro';\nimport { resolveAppContent } from './resolveAppContent';\n\ninterface LoadResult {\n  default: ComponentType<any>;\n}\n\nconst global = getGlobal();\n\nfunction getCoreModule() {\n  const module = BrickModule.get<{\n    moduleName: 'TossBundleLoader';\n    importLazy: () => Promise<void>;\n  }>('TossBundleLoader');\n\n  return module;\n}\n\nexport function loadAppContent(remotePath: string): Promise<LoadResult> {\n  if (isMetro()) {\n    return Promise.reject(new Error('Dynamic bundle loading is not supported in Metro'));\n  }\n\n  const bundleLoadTask: Promise<void> = global?.__mpackInternal?.loadRemote\n    ? global?.__mpackInternal?.loadRemote()\n    : getCoreModule().importLazy();\n\n  return bundleLoadTask.then(() => resolveAppContent(remotePath)).then((Component) => ({ default: Component }));\n}\n"
  },
  {
    "path": "services/shared/src/utils/resolveAppContent.ts",
    "content": "import { getContainer, parseRemotePath, importRemoteModule } from '@granite-js/plugin-micro-frontend/runtime';\nimport type { ComponentType } from 'react';\nimport { waitForCondition } from './waitForCondition';\n\nexport async function resolveAppContent(remotePath: string): Promise<ComponentType<any>> {\n  const { remoteName } = parseRemotePath(remotePath);\n\n  const isRemoteReady = () => {\n    return Boolean(getContainer(remoteName));\n  };\n\n  const getAppComponent = () => {\n    const module = importRemoteModule(remotePath);\n    return module?.default || module;\n  };\n\n  if (isRemoteReady()) {\n    return getAppComponent();\n  } else {\n    const Component = await waitForCondition('AppContent', isRemoteReady)\n      .then(() => getAppComponent())\n      .catch((error) => {\n        console.error('resolveAppContent', error);\n        throw error;\n      });\n\n    return Component;\n  }\n}\n"
  },
  {
    "path": "services/shared/src/utils/waitForCondition.ts",
    "content": "const INTERVAL_TICK = 100;\nconst TIMEOUT = 3000;\n\nexport async function waitForCondition(waitingTarget: string, predicate: () => boolean) {\n  return new Promise<void>((resolve, reject) => {\n    const intervalId = setInterval(() => {\n      if (predicate()) {\n        clearTimeout(timeoutId);\n        clearInterval(intervalId);\n        resolve();\n      }\n    }, INTERVAL_TICK);\n\n    const timeoutId = setTimeout(() => {\n      clearInterval(intervalId);\n      reject(new Error(`waitForPage timeout: ${waitingTarget}`));\n    }, TIMEOUT);\n  });\n}\n"
  },
  {
    "path": "services/shared/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"moduleResolution\": \"bundler\",\n    \"jsx\": \"react-native\"\n  },\n  \"include\": [\"**/*.ts\", \"**/*.tsx\"]\n}\n"
  },
  {
    "path": "services/showcase/README.md",
    "content": "# Granite App\n"
  },
  {
    "path": "services/showcase/babel.config.js",
    "content": "module.exports = {\n  presets: ['babel-preset-granite'],\n};\n"
  },
  {
    "path": "services/showcase/eslint.config.mjs",
    "content": "import pluginJs from '@eslint/js';\nimport pluginReact from 'eslint-plugin-react';\nimport tseslint from 'typescript-eslint';\n\n/** @type {import('eslint').Linter.Config[]} */\nexport default [\n  { ignores: ['**/node_modules/**', '**/dist/**', '*.{cjs,js}'] },\n  { files: ['pages/**/*.{ts,jsx,tsx}', 'src/**/*.{ts,jsx,tsx}'] },\n  pluginJs.configs.recommended,\n  ...tseslint.configs.recommended,\n  {\n    settings: {\n      react: {\n        version: 'detect',\n      },\n    },\n  },\n  pluginReact.configs.flat.recommended,\n];\n"
  },
  {
    "path": "services/showcase/granite.config.ts",
    "content": "import { env } from '@granite-js/plugin-env';\nimport { hermes } from '@granite-js/plugin-hermes';\nimport { microFrontend } from '@granite-js/plugin-micro-frontend';\nimport { router } from '@granite-js/plugin-router';\nimport { sentry } from '@granite-js/plugin-sentry';\nimport { defineConfig } from '@granite-js/react-native/config';\n\nexport default defineConfig({\n  /**\n   * granite://showcase\n   */\n  scheme: 'granite',\n  appName: 'showcase',\n  plugins: [\n    router(),\n    env({ MY_ENV: 'from granite.config.ts' }),\n    hermes(),\n    sentry({ useClient: false }),\n    microFrontend({\n      name: 'remoteApp',\n      exposes: {\n        './AppContainer': './src/_app.tsx',\n      },\n      shared: [\n        '@react-native-community/blur',\n        '@react-navigation/native',\n        '@react-navigation/native-stack',\n        '@shopify/flash-list',\n        'react-native-safe-area-context',\n        'react-native-screens',\n        'react-native-svg',\n        'react-native-gesture-handler',\n        'react-native',\n        'react',\n        'react-native-webview',\n      ],\n    }),\n    {\n      name: 'test',\n      build: {\n        order: 'post',\n        handler: function () {\n          console.debug('[DEBUG] Plugin meta:', this.meta);\n        },\n      },\n    },\n    {\n      name: 'context-plugin',\n      config: (context) => {\n        console.debug('[DEBUG] Context:', context);\n      },\n    },\n  ],\n});\n"
  },
  {
    "path": "services/showcase/index.ts",
    "content": "import { register } from '@granite-js/react-native';\nimport App from './src/_app';\n\nregister(App);\n"
  },
  {
    "path": "services/showcase/package.json",
    "content": "{\n  \"name\": \"@granite-app/showcase\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"granite dev\",\n    \"build\": \"granite build\",\n    \"test\": \"vitest --run --passWithNoTests\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"lint\": \"biome check --write\"\n  },\n  \"dependencies\": {\n    \"@granite-js/native\": \"workspace:*\",\n    \"@granite-js/react-native\": \"workspace:*\",\n    \"brick-module\": \"catalog:brick-module\",\n    \"react\": \"catalog:react-native\",\n    \"react-native\": \"catalog:react-native\",\n    \"valibot\": \"^1.1.0\",\n    \"zod\": \"^4.1.12\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"7.28.5\",\n    \"@babel/runtime\": \"7.18.9\",\n    \"@biomejs/biome\": \"^1.9.4\",\n    \"@granite-js/forge-cli\": \"workspace:*\",\n    \"@granite-js/plugin-env\": \"workspace:*\",\n    \"@granite-js/plugin-hermes\": \"workspace:*\",\n    \"@granite-js/plugin-micro-frontend\": \"workspace:*\",\n    \"@granite-js/plugin-router\": \"workspace:*\",\n    \"@granite-js/plugin-sentry\": \"workspace:*\",\n    \"@granite-js/vitest\": \"workspace:*\",\n    \"@react-native/babel-preset\": \"catalog:react-native\",\n    \"@testing-library/react-native\": \"^12.9.0\",\n    \"@types/babel__core\": \"^7.20.5\",\n    \"@types/node\": \"catalog:tools\",\n    \"@types/react\": \"catalog:react-native\",\n    \"@types/react-test-renderer\": \"19.1.0\",\n    \"babel-preset-granite\": \"workspace:*\",\n    \"react-test-renderer\": \"19.2.3\",\n    \"typescript\": \"catalog:tools\",\n    \"vitest\": \"4.1.3\"\n  }\n}\n"
  },
  {
    "path": "services/showcase/pages/_404.tsx",
    "content": "import React from 'react';\nimport { Text, View } from 'react-native';\n\nexport default function NotFoundPage() {\n  return (\n    <View\n      style={{\n        flex: 1,\n        alignItems: 'center',\n        justifyContent: 'center',\n      }}\n    >\n      <Text>404 Not Found</Text>\n    </View>\n  );\n}\n"
  },
  {
    "path": "services/showcase/pages/about.tsx",
    "content": "export { Route } from 'pages/about';\n"
  },
  {
    "path": "services/showcase/pages/index.tsx",
    "content": "export { Route } from 'pages/index';\n"
  },
  {
    "path": "services/showcase/pages/showcase/_layout.tsx",
    "content": "import { useRoute } from '@granite-js/native/@react-navigation/native';\nimport { Top } from 'components/Top';\nimport React, { PropsWithChildren } from 'react';\n\nexport default function ShowcaseLayout({ children }: PropsWithChildren) {\n  const route = useRoute();\n  const isShowcaseRoot = route.name === '/showcase';\n\n  return (\n    <>\n      {isShowcaseRoot ? null : <Top label={`Path: ${route.name}`} />}\n      {children}\n    </>\n  );\n}\n"
  },
  {
    "path": "services/showcase/pages/showcase/image.tsx",
    "content": "import { createRoute, Image } from '@granite-js/react-native';\nimport { View } from 'react-native';\n\nexport const Route = createRoute('/showcase/image', {\n  validateParams: (params) => params,\n  component: ShowcaseImage,\n});\n\nfunction ShowcaseImage() {\n  return (\n    <View>\n      <Image\n        style={{ width: 100, height: 100 }}\n        source={{ uri: 'https://picsum.photos/200' }}\n        onLoadEnd={() => console.log('Image onLoadEnd')}\n        onError={() => console.log('Image onError')}\n      />\n      <Image\n        style={{ width: 100, height: 100 }}\n        source={{ uri: 'https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/helloworld.svg' }}\n        onLoadEnd={() => console.log('SvgImage onLoadEnd')}\n        onError={() => console.log('SvgImage onError')}\n      />\n    </View>\n  );\n}\n"
  },
  {
    "path": "services/showcase/pages/showcase/index.tsx",
    "content": "export { Route } from 'pages/showcase/index';\n"
  },
  {
    "path": "services/showcase/pages/showcase/initial-props.tsx",
    "content": "import { createRoute, useInitialProps } from '@granite-js/react-native';\nimport { Text, View } from 'react-native';\n\nexport const Route = createRoute('/showcase/initial-props', {\n  validateParams: (params) => params,\n  component: ShowcaseInitialProps,\n});\n\nfunction ShowcaseInitialProps() {\n  const initialProps = useInitialProps();\n\n  return (\n    <View>\n      <Text>{JSON.stringify(initialProps, undefined, 2)}</Text>\n    </View>\n  );\n}\n"
  },
  {
    "path": "services/showcase/pages/showcase/lottie.tsx",
    "content": "export { Route } from 'pages/showcase/lottie';\n"
  },
  {
    "path": "services/showcase/pages/showcase/search-params.tsx",
    "content": "import { createRoute, useInitialSearchParams } from '@granite-js/react-native';\nimport { Text, View } from 'react-native';\n\nexport const Route = createRoute('/showcase/search-params', {\n  validateParams: (params) => params,\n  component: ShowcaseSearchParams,\n});\n\nfunction ShowcaseSearchParams() {\n  const searchParams = useInitialSearchParams();\n\n  return (\n    <View>\n      <Text>{JSON.stringify(searchParams, undefined, 2)}</Text>\n    </View>\n  );\n}\n"
  },
  {
    "path": "services/showcase/pages/showcase/status-bar.tsx",
    "content": "export { Route } from 'pages/showcase/status-bar';\n"
  },
  {
    "path": "services/showcase/pages/showcase/use-back-event.tsx",
    "content": "export { Route } from 'pages/showcase/use-back-event';\n"
  },
  {
    "path": "services/showcase/pages/showcase/video.tsx",
    "content": "export { Route } from 'pages/showcase/video';\n"
  },
  {
    "path": "services/showcase/pages/showcase/webview.tsx",
    "content": "export { Route } from 'pages/showcase/webview';\n"
  },
  {
    "path": "services/showcase/react-native.config.js",
    "content": "module.exports = {\n  reactNativePath: require('path').dirname(require.resolve('react-native/package.json')),\n};\n"
  },
  {
    "path": "services/showcase/require.context.ts",
    "content": "// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const context = require.context('./pages');\n"
  },
  {
    "path": "services/showcase/src/_app.tsx",
    "content": "import { Granite, type InitialProps } from '@granite-js/react-native';\nimport type { PropsWithChildren } from 'react';\nimport { context } from '../require.context';\n\nfunction AppContainer({ children }: PropsWithChildren<InitialProps>) {\n  return <>{children}</>;\n}\n\nexport default Granite.registerApp(AppContainer, { context, appName: 'showcase' });\n"
  },
  {
    "path": "services/showcase/src/components/Button.test.tsx",
    "content": "import { fireEvent, render, screen } from \"@testing-library/react-native\";\nimport { describe, expect, it } from \"vitest\";\nimport { ButtonTestScenario } from \"./ButtonTestScenario\";\n\ndescribe(\"Button\", () => {\n\tit(\"runs the rendered button onPress flow when a user presses it\", () => {\n\t\trender(<ButtonTestScenario />);\n\n\t\texpect(screen.getByText(\"Pressed: 0\")).toBeTruthy();\n\n\t\tfireEvent.press(screen.getByLabelText(\"Go to About Page\"));\n\n\t\texpect(screen.getByText(\"Pressed: 1\")).toBeTruthy();\n\t});\n});\n"
  },
  {
    "path": "services/showcase/src/components/Button.tsx",
    "content": "import { StyleSheet, Text, TouchableOpacity } from \"react-native\";\n\ninterface ButtonProps {\n\tlabel: string;\n\tappearance?: \"default\" | \"text\";\n\tonPress: () => void;\n}\n\nexport function Button({\n\tlabel,\n\tappearance = \"default\",\n\tonPress,\n}: ButtonProps) {\n\treturn (\n\t\t<TouchableOpacity\n\t\t\taccessibilityLabel={label}\n\t\t\taccessibilityRole=\"button\"\n\t\t\tstyle={[\n\t\t\t\tstyles.buttonBase,\n\t\t\t\tappearance === \"default\" ? styles.button : undefined,\n\t\t\t]}\n\t\t\tonPress={onPress}\n\t\t>\n\t\t\t<Text style={appearance === \"default\" ? styles.buttonText : styles.text}>\n\t\t\t\t{label}\n\t\t\t</Text>\n\t\t</TouchableOpacity>\n\t);\n}\n\nconst styles = StyleSheet.create({\n\tbuttonBase: {\n\t\tpaddingVertical: 12,\n\t\tpaddingHorizontal: 32,\n\t},\n\tbutton: {\n\t\tbackgroundColor: \"#0064FF\",\n\t\tshadowColor: \"#000\",\n\t\tborderRadius: 8,\n\t\tshadowOffset: {\n\t\t\twidth: 0,\n\t\t\theight: 2,\n\t\t},\n\t\tshadowOpacity: 0.25,\n\t\tshadowRadius: 3.84,\n\t\televation: 5,\n\t},\n\tbuttonText: {\n\t\tcolor: \"white\",\n\t\tfontSize: 16,\n\t\tfontWeight: \"bold\",\n\t\ttextAlign: \"center\",\n\t},\n\ttext: {\n\t\tcolor: \"#202632\",\n\t\tfontSize: 16,\n\t\tfontWeight: \"bold\",\n\t\ttextAlign: \"center\",\n\t},\n});\n"
  },
  {
    "path": "services/showcase/src/components/ButtonTestScenario.tsx",
    "content": "import { useState } from \"react\";\nimport { Text } from \"react-native\";\nimport { Button } from \"./Button\";\n\nexport function ButtonTestScenario() {\n\tconst [pressCount, setPressCount] = useState(0);\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\tlabel=\"Go to About Page\"\n\t\t\t\tonPress={() => setPressCount((currentCount) => currentCount + 1)}\n\t\t\t/>\n\t\t\t<Text>Pressed: {pressCount}</Text>\n\t\t</>\n\t);\n}\n"
  },
  {
    "path": "services/showcase/src/components/Checkbox.tsx",
    "content": "import { StyleSheet, TouchableOpacity } from 'react-native';\n\ninterface CheckboxProps {\n  checked: boolean;\n  onPress: () => void;\n}\n\nexport function Checkbox({ checked, onPress }: CheckboxProps) {\n  return <TouchableOpacity style={[styles.base, checked ? styles.checked : undefined]} onPress={onPress} />;\n}\n\nconst styles = StyleSheet.create({\n  base: {\n    width: 24,\n    height: 24,\n    borderRadius: 24,\n    borderWidth: 2,\n    borderColor: '#1e1e1e',\n    shadowColor: '#000',\n    shadowOffset: {\n      width: 0,\n      height: 2,\n    },\n    shadowOpacity: 0.25,\n    shadowRadius: 3.84,\n    elevation: 5,\n  },\n  checked: {\n    backgroundColor: '#0064FF',\n    borderColor: '#0064FF',\n  },\n});\n"
  },
  {
    "path": "services/showcase/src/components/ReactNativeCodegenTestScenario.tsx",
    "content": "import { type ElementRef, type ReactNode , useRef, useState } from \"react\";\nimport { Text , codegenNativeCommands, codegenNativeComponent } from \"react-native\";\nimport { Button } from \"./Button\";\n\ntype GeneratedViewProps = {\n\tchildren?: ReactNode;\n\ttestID?: string;\n};\n\nconst GeneratedView =\n\tcodegenNativeComponent<GeneratedViewProps>(\"GraniteCodegenView\");\nconst commands = codegenNativeCommands<{\n\tplay: (ref: unknown, source: string) => void;\n}>({\n\tsupportedCommands: [\"play\"],\n});\n\nexport function ReactNativeCodegenTestScenario() {\n\tconst generatedViewRef = useRef<ElementRef<typeof GeneratedView> | null>(\n\t\tnull,\n\t);\n\tconst [lastPlayedSource, setLastPlayedSource] = useState(\"none\");\n\tconst [refStatus, setRefStatus] = useState(\"missing\");\n\n\treturn (\n\t\t<>\n\t\t\t<GeneratedView ref={generatedViewRef} testID=\"codegen-native-view\">\n\t\t\t\tCodegen Ready\n\t\t\t</GeneratedView>\n\t\t\t<Button\n\t\t\t\tlabel=\"Play intro\"\n\t\t\t\tonPress={() => {\n\t\t\t\t\tcommands.play(generatedViewRef.current, \"intro.mp4\");\n\t\t\t\t\tsetLastPlayedSource(\"intro.mp4\");\n\t\t\t\t\tsetRefStatus(\n\t\t\t\t\t\tgeneratedViewRef.current == null ? \"missing\" : \"attached\",\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t<Text>Last played: {lastPlayedSource}</Text>\n\t\t\t<Text>Generated view ref: {refStatus}</Text>\n\t\t</>\n\t);\n}\n"
  },
  {
    "path": "services/showcase/src/components/TextInput.tsx",
    "content": "import { StyleSheet, TextInput as BaseTextInput, type TextInputProps as BaseTextInputProps } from 'react-native';\n\ninterface TextInputProps extends Omit<BaseTextInputProps, 'style'> {\n  placeholder?: string;\n  value: string;\n  onChangeText: (text: string) => void;\n}\n\nexport function TextInput({ placeholder, value, onChangeText, ...rest }: TextInputProps) {\n  return (\n    <BaseTextInput style={styles.input} placeholder={placeholder} value={value} onChangeText={onChangeText} {...rest} />\n  );\n}\n\nconst styles = StyleSheet.create({\n  input: {\n    paddingVertical: 12,\n    paddingHorizontal: 16,\n    backgroundColor: 'white',\n    borderRadius: 8,\n    borderWidth: 1,\n    borderColor: '#E0E0E0',\n    fontSize: 16,\n    color: '#202632',\n    shadowColor: '#000',\n    shadowOffset: {\n      width: 0,\n      height: 1,\n    },\n    shadowOpacity: 0.1,\n    shadowRadius: 1.5,\n    elevation: 2,\n  },\n});\n"
  },
  {
    "path": "services/showcase/src/components/Top.tsx",
    "content": "import { View, Text, StyleSheet } from 'react-native';\n\ninterface TopProps {\n  label: string;\n}\n\nexport function Top({ label }: TopProps) {\n  return (\n    <View style={styles.container}>\n      <Text style={styles.label}>{label}</Text>\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    padding: 16,\n  },\n  label: {\n    color: '#202632',\n    fontWeight: 'bold',\n    fontSize: 24,\n  },\n});\n"
  },
  {
    "path": "services/showcase/src/components/react-native-codegen.test.tsx",
    "content": "import { fireEvent, render, screen } from \"@testing-library/react-native\";\nimport { describe, expect, it } from \"vitest\";\nimport { ReactNativeCodegenTestScenario } from \"./ReactNativeCodegenTestScenario\";\n\ndescribe(\"react-native codegen helpers\", () => {\n\tit(\"dispatches generated native commands when a rendered button triggers them\", () => {\n\t\trender(<ReactNativeCodegenTestScenario />);\n\n\t\texpect(screen.getByTestId(\"codegen-native-view\")).toBeTruthy();\n\t\texpect(screen.getByText(\"Last played: none\")).toBeTruthy();\n\t\texpect(screen.getByText(\"Generated view ref: missing\")).toBeTruthy();\n\n\t\tfireEvent.press(screen.getByLabelText(\"Play intro\"));\n\n\t\texpect(screen.getByText(\"Last played: intro.mp4\")).toBeTruthy();\n\t\texpect(screen.getByText(\"Generated view ref: attached\")).toBeTruthy();\n\t});\n});\n"
  },
  {
    "path": "services/showcase/src/env.d.ts",
    "content": "// Auto generated by env plugin. DO NOT EDIT.\ntype Env = {\n  MY_ENV: string;\n};\n\ninterface ImportMeta {\n  readonly env: Env & {};\n}\n"
  },
  {
    "path": "services/showcase/src/pages/about.tsx",
    "content": "import { createRoute, Stack } from '@granite-js/react-native';\nimport { StyleSheet, Text } from 'react-native';\nimport { Button } from '../components/Button';\n\nexport const Route = createRoute('/about', {\n  component: Page,\n});\n\nfunction Page() {\n  const navigation = Route.useNavigation();\n\n  const handleGoShowcase = () => {\n    navigation.navigate('/showcase');\n  };\n\n  const handleGoBack = () => {\n    navigation.goBack();\n  };\n\n  return (\n    <Stack.Vertical style={styles.container} gutter={16}>\n      <Text style={styles.title}>About Granite</Text>\n      <Text style={styles.description}>Granite is a powerful and flexible React Native Framework 🚀</Text>\n      <Button label=\"Show more\" onPress={handleGoShowcase} />\n      <Button label=\"Go Back\" appearance=\"text\" onPress={handleGoBack} />\n    </Stack.Vertical>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    padding: 24,\n    backgroundColor: '#F7FAFC',\n    alignItems: 'center',\n    justifyContent: 'center',\n  },\n  title: {\n    fontSize: 28,\n    fontWeight: 'bold',\n    color: '#1A202C',\n    marginBottom: 16,\n    textAlign: 'center',\n  },\n  description: {\n    fontSize: 18,\n    color: '#4A5568',\n    textAlign: 'center',\n    marginBottom: 12,\n    lineHeight: 26,\n  },\n  buttonBase: {\n    marginTop: 24,\n    paddingVertical: 12,\n    paddingHorizontal: 32,\n    borderRadius: 8,\n  },\n  button: {\n    backgroundColor: '#0064FF',\n    paddingVertical: 12,\n    paddingHorizontal: 32,\n    borderRadius: 8,\n    shadowColor: '#000',\n    shadowOffset: {\n      width: 0,\n      height: 2,\n    },\n    shadowOpacity: 0.25,\n    shadowRadius: 3.84,\n    elevation: 5,\n  },\n  buttonLabel: {\n    color: 'white',\n    fontSize: 16,\n    fontWeight: 'bold',\n    textAlign: 'center',\n  },\n  textButtonLabel: {\n    color: '#777',\n    fontSize: 16,\n    fontWeight: 'bold',\n    textAlign: 'center',\n  },\n});\n"
  },
  {
    "path": "services/showcase/src/pages/index.tsx",
    "content": "import { createRoute, Stack } from '@granite-js/react-native';\nimport { StyleSheet, Text } from 'react-native';\nimport { Button } from '../components/Button';\n\nexport const Route = createRoute('/', {\n  component: Page,\n});\n\nfunction Page() {\n  const navigation = Route.useNavigation();\n\n  const goToAboutPage = () => {\n    navigation.navigate('/about');\n  };\n\n  return (\n    <Stack.Vertical style={styles.container} gutter={16}>\n      <Text style={styles.title}>🎉 Welcome! 🎉</Text>\n      <Text style={styles.subtitle}>\n        This is a demo page for the <Text style={styles.brandText}>Granite</Text> Framework.\n      </Text>\n      <Text style={styles.description}>This page was created to showcase the features of the Granite.</Text>\n      <Button label=\"Go to About Page\" onPress={goToAboutPage} />\n    </Stack.Vertical>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    padding: 16,\n    backgroundColor: 'white',\n    justifyContent: 'center',\n    alignItems: 'center',\n  },\n  brandText: {\n    color: '#0064FF',\n    fontWeight: 'bold',\n  },\n  text: {\n    fontSize: 24,\n    color: '#202632',\n    textAlign: 'center',\n  },\n  title: {\n    fontSize: 32,\n    fontWeight: 'bold',\n    color: '#1A202C',\n    textAlign: 'center',\n  },\n  subtitle: {\n    fontSize: 18,\n    color: '#4A5568',\n    textAlign: 'center',\n  },\n  description: {\n    fontSize: 16,\n    color: '#718096',\n    textAlign: 'center',\n    lineHeight: 24,\n  },\n});\n"
  },
  {
    "path": "services/showcase/src/pages/showcase/index.tsx",
    "content": "import { createRoute, type RegisterScreen } from '@granite-js/react-native';\nimport { useMemo } from 'react';\nimport { ScrollView, StyleSheet, Text, TouchableOpacity } from 'react-native';\n\nexport const Route = createRoute('/showcase', {\n  validateParams: (params) => params,\n  component: Showcase,\n});\n\nfunction Showcase() {\n  const navigation = Route.useNavigation();\n  const showcasePages = useMemo(\n    () =>\n      navigation\n        .getState()\n        .routeNames.filter((key) => {\n          return key.startsWith('/showcase/') && !(key.endsWith('index.tsx') || key.endsWith('_layout.tsx'));\n        })\n        .map((key) => key.replace(/^\\.tsx$/g, '')) as (keyof RegisterScreen)[],\n    [navigation]\n  );\n\n  const handlePressShowcaseItem = (page: keyof RegisterScreen) => {\n    navigation.navigate(page);\n  };\n\n  return (\n    <ScrollView style={{ flex: 1 }}>\n      {showcasePages.map((page) => (\n        <ShowcaseItem key={page} page={page} onPress={handlePressShowcaseItem.bind(null, page)} />\n      ))}\n    </ScrollView>\n  );\n}\n\nfunction ShowcaseItem({ page, onPress }: { page: string; onPress: () => void }) {\n  return (\n    <TouchableOpacity style={styles.item} onPress={onPress}>\n      <Text style={styles.itemLabel}>{page}</Text>\n    </TouchableOpacity>\n  );\n}\n\nconst styles = StyleSheet.create({\n  header: {\n    width: '100%',\n    height: 50,\n    backgroundColor: 'white',\n  },\n  item: {\n    paddingHorizontal: 16,\n    paddingVertical: 18,\n  },\n  itemLabel: {\n    fontSize: 16,\n  },\n});\n"
  },
  {
    "path": "services/showcase/src/pages/showcase/lottie.tsx",
    "content": "import { createRoute, Lottie } from '@granite-js/react-native';\nimport { ScrollView } from 'react-native';\n\nexport const Route = createRoute('/showcase/lottie', {\n  validateParams: (params) => params,\n  component: ShowcaseLottie,\n});\n\nfunction ShowcaseLottie() {\n  return (\n    <ScrollView stickyHeaderIndices={[0]}>\n      <Lottie.AnimationObject\n        height={100}\n        animationObject={LOTTIE_DATA}\n        autoPlay={true}\n        loop={true}\n        onAnimationFailure={() => {\n          console.log('Animation Failed');\n        }}\n        onAnimationFinish={() => {\n          console.log('Animation Finished');\n        }}\n      />\n    </ScrollView>\n  );\n}\n\nconst LOTTIE_DATA = {\n  v: '5.5.7',\n  fr: 30,\n  ip: 0,\n  op: 60,\n  w: 100,\n  h: 100,\n  nm: 'dots loading',\n  ddd: 0,\n  assets: [],\n  layers: [\n    {\n      ddd: 0,\n      ind: 1,\n      ty: 4,\n      nm: 'dot',\n      sr: 1,\n      ks: {\n        o: { a: 0, k: 100 },\n        r: { a: 0, k: 0 },\n        p: {\n          a: 1,\n          k: [\n            { t: 0, s: [30, 50, 0], e: [70, 50, 0], i: { x: [0.42], y: [0] }, o: { x: [0.58], y: [1] } },\n            { t: 30, s: [70, 50, 0], e: [30, 50, 0], i: { x: [0.42], y: [0] }, o: { x: [0.58], y: [1] } },\n            { t: 60 },\n          ],\n        },\n        a: { a: 0, k: [0, 0, 0] },\n        s: { a: 0, k: [100, 100, 100] },\n      },\n      shapes: [\n        {\n          ty: 'el',\n          p: { a: 0, k: [0, 0] },\n          s: { a: 0, k: [20, 20] },\n          nm: 'Ellipse Path',\n        },\n        {\n          ty: 'fl',\n          c: { a: 0, k: [0.2, 0.6, 1, 1] },\n          o: { a: 0, k: 100 },\n          nm: 'Fill',\n        },\n        {\n          ty: 'tr',\n          p: { a: 0, k: [0, 0] },\n          a: { a: 0, k: [0, 0] },\n          s: { a: 0, k: [100, 100] },\n          r: { a: 0, k: 0 },\n          o: { a: 0, k: 100 },\n          sk: { a: 0, k: 0 },\n          sa: { a: 0, k: 0 },\n        },\n      ],\n      ip: 0,\n      op: 60,\n      st: 0,\n      bm: 0,\n    },\n  ],\n};\n"
  },
  {
    "path": "services/showcase/src/pages/showcase/status-bar.tsx",
    "content": "import { StatusBar, Stack, Spacing, createRoute, type StatusBarStyle } from '@granite-js/react-native';\nimport { Button } from 'components/Button';\nimport { Checkbox } from 'components/Checkbox';\nimport { useState, useEffect } from 'react';\nimport { Appearance, ScrollView, Text, type ColorSchemeName } from 'react-native';\n\nexport const Route = createRoute('/showcase/status-bar', {\n  validateParams: (params) => params,\n  component: ShowcaseStatusBar,\n});\n\nfunction ShowcaseStatusBar() {\n  const [colorScheme, setColorScheme] = useState<ColorSchemeName>(Appearance.getColorScheme() ?? 'light');\n  const [style, setStyle] = useState<StatusBarStyle>('auto');\n  const [backgroundColor, setBackgroundColor] = useState<string | undefined>(undefined);\n  const [translucent, setTranslucent] = useState(true);\n  const [animated, setAnimated] = useState(false);\n  const [hidden, setHidden] = useState(false);\n  const [networkActivityIndicatorVisible, setNetworkActivityIndicatorVisible] = useState(false);\n\n  useEffect(() => {\n    const subscription = Appearance.addChangeListener((preference) => {\n      setColorScheme(preference.colorScheme);\n    });\n\n    return () => subscription.remove();\n  }, []);\n\n  return (\n    <ScrollView style={{ flex: 1, padding: 16, backgroundColor: colorScheme === 'dark' ? '#333' : '#fff' }}>\n      <StatusBar\n        style={style}\n        animated={animated}\n        hidden={hidden}\n        backgroundColor={backgroundColor}\n        translucent={translucent}\n      />\n      <Stack.Vertical gutter={16}>\n        <Text>Style</Text>\n        <ScrollView horizontal>\n          <Stack.Horizontal gutter={16}>\n            <Button onPress={() => setStyle('auto')} label=\"auto\" />\n            <Button onPress={() => setStyle('light')} label=\"light\" />\n            <Button onPress={() => setStyle('dark')} label=\"dark\" />\n            <Button onPress={() => setStyle('inverted')} label=\"inverted\" />\n          </Stack.Horizontal>\n        </ScrollView>\n\n        <Text>Animated</Text>\n        <Stack.Horizontal gutter={16}>\n          <Checkbox checked={animated} onPress={() => setAnimated((value) => !value)} />\n        </Stack.Horizontal>\n\n        <Text>Hidden</Text>\n        <Stack.Horizontal gutter={16}>\n          <Checkbox checked={hidden} onPress={() => setHidden((value) => !value)} />\n        </Stack.Horizontal>\n\n        <Text>BackgroundColor (Android only)</Text>\n        <ScrollView horizontal>\n          <Stack.Horizontal gutter={16}>\n            <Button onPress={() => setBackgroundColor('#f44336')} label=\"Red\" />\n            <Button onPress={() => setBackgroundColor('#4caf50')} label=\"Green\" />\n            <Button onPress={() => setBackgroundColor('#2196f3')} label=\"Blue\" />\n            <Button onPress={() => setBackgroundColor(undefined)} label=\"Reset\" />\n          </Stack.Horizontal>\n        </ScrollView>\n\n        <Text>Translucent (Android only)</Text>\n        <Stack.Horizontal gutter={16}>\n          <Checkbox checked={translucent} onPress={() => setTranslucent((value) => !value)} />\n        </Stack.Horizontal>\n\n        <Text>Show network activity indicator (iOS only)</Text>\n        <Stack.Horizontal gutter={16}>\n          <Checkbox\n            checked={networkActivityIndicatorVisible}\n            onPress={() => setNetworkActivityIndicatorVisible((value) => !value)}\n          />\n        </Stack.Horizontal>\n      </Stack.Vertical>\n      <Spacing size={50} />\n    </ScrollView>\n  );\n}\n"
  },
  {
    "path": "services/showcase/src/pages/showcase/use-back-event.tsx",
    "content": "import { createRoute, useBackEvent } from '@granite-js/react-native';\nimport { useCallback } from 'react';\nimport { Alert, Button } from 'react-native';\n\nexport const Route = createRoute('/showcase/use-back-event', {\n  validateParams: (params) => params,\n  component: UseBackEvent,\n});\n\nfunction UseBackEvent() {\n  const backEvent = useBackEvent();\n\n  const backHandler = useCallback(() => {\n    Alert.alert('back pressed!');\n  }, []);\n\n  return (\n    <>\n      <Button\n        title=\"Add BackEvent Callback\"\n        onPress={() => {\n          backEvent.addEventListener(backHandler);\n        }}\n      />\n\n      <Button\n        title=\"Remove BackEvent Callback\"\n        onPress={() => {\n          backEvent.removeEventListener(backHandler);\n        }}\n      />\n    </>\n  );\n}\n"
  },
  {
    "path": "services/showcase/src/pages/showcase/video.tsx",
    "content": "import { createRoute, Video, VisibilityProvider, Stack } from '@granite-js/react-native';\nimport { useEffect, useState } from 'react';\nimport { StyleSheet } from 'react-native';\nimport { Button } from '../../components/Button';\nimport { TextInput } from '../../components/TextInput';\n\nexport const Route = createRoute('/showcase/video', {\n  validateParams: (params) => params,\n  component: ShowcaseVideo,\n});\n\nfunction ShowcaseVideo() {\n  const [url, setUrl] = useState('');\n  const [load, setLoad] = useState(false);\n\n  useEffect(() => {\n    console.log('Video.isAvailable', Video.isAvailable);\n  }, []);\n\n  return (\n    // @FIXME: Sandbox app doesn't provide visibility state in the `initialProps`.\n    <VisibilityProvider isVisible={true}>\n      <Stack.Vertical style={styles.textInputContainer} gutter={16}>\n        <TextInput\n          value={url}\n          onChangeText={setUrl}\n          placeholder=\"Enter video URL\"\n          autoCapitalize=\"none\"\n          autoCorrect={false}\n        />\n        <Button label=\"Load\" onPress={() => setLoad(Boolean(url))} />\n      </Stack.Vertical>\n      {url && load ? <Video muted style={styles.videoContainer} source={{ uri: url }} /> : null}\n    </VisibilityProvider>\n  );\n}\n\nconst styles = StyleSheet.create({\n  textInputContainer: {\n    padding: 16,\n    marginBottom: 16,\n  },\n  videoContainer: {\n    width: '100%',\n    height: 300,\n    backgroundColor: '#eee',\n  },\n});\n"
  },
  {
    "path": "services/showcase/src/pages/showcase/webview.tsx",
    "content": "import { WebView } from '@granite-js/native/react-native-webview';\nimport { createRoute } from '@granite-js/react-native';\nimport { View } from 'react-native';\n\nexport const Route = createRoute('/showcase/webview', {\n  validateParams: (params) => params,\n  component: ShowcaseWebview,\n});\n\nfunction ShowcaseWebview() {\n  return (\n    <View style={{ flex: 1 }}>\n      <WebView style={{ flex: 1, backgroundColor: '#ddd' }} source={{ uri: 'https://granite.run' }} />\n    </View>\n  );\n}\n"
  },
  {
    "path": "services/showcase/src/router.gen.ts",
    "content": "/* eslint-disable */\n// This file is auto-generated by @granite-js/react-native. DO NOT EDIT.\nimport { Route as _AboutRoute } from '../pages/about';\nimport { Route as _IndexRoute } from '../pages/';\nimport { Route as _ShowcaseImageRoute } from '../pages/showcase/image';\nimport { Route as _ShowcaseRoute } from '../pages/showcase';\nimport { Route as _ShowcaseInitialPropsRoute } from '../pages/showcase/initial-props';\nimport { Route as _ShowcaseLottieRoute } from '../pages/showcase/lottie';\nimport { Route as _ShowcaseSearchParamsRoute } from '../pages/showcase/search-params';\nimport { Route as _ShowcaseStatusBarRoute } from '../pages/showcase/status-bar';\nimport { Route as _ShowcaseUseBackEventRoute } from '../pages/showcase/use-back-event';\nimport { Route as _ShowcaseVideoRoute } from '../pages/showcase/video';\nimport { Route as _ShowcaseWebviewRoute } from '../pages/showcase/webview';\n\ndeclare module '@granite-js/react-native' {\n  interface RegisterScreenInput {\n    '/about': (typeof _AboutRoute)['_inputType'];\n    '/': (typeof _IndexRoute)['_inputType'];\n    '/showcase/image': (typeof _ShowcaseImageRoute)['_inputType'];\n    '/showcase': (typeof _ShowcaseRoute)['_inputType'];\n    '/showcase/initial-props': (typeof _ShowcaseInitialPropsRoute)['_inputType'];\n    '/showcase/lottie': (typeof _ShowcaseLottieRoute)['_inputType'];\n    '/showcase/search-params': (typeof _ShowcaseSearchParamsRoute)['_inputType'];\n    '/showcase/status-bar': (typeof _ShowcaseStatusBarRoute)['_inputType'];\n    '/showcase/use-back-event': (typeof _ShowcaseUseBackEventRoute)['_inputType'];\n    '/showcase/video': (typeof _ShowcaseVideoRoute)['_inputType'];\n    '/showcase/webview': (typeof _ShowcaseWebviewRoute)['_inputType'];\n  }\n\n  interface RegisterScreen {\n    '/about': (typeof _AboutRoute)['_outputType'];\n    '/': (typeof _IndexRoute)['_outputType'];\n    '/showcase/image': (typeof _ShowcaseImageRoute)['_outputType'];\n    '/showcase': (typeof _ShowcaseRoute)['_outputType'];\n    '/showcase/initial-props': (typeof _ShowcaseInitialPropsRoute)['_outputType'];\n    '/showcase/lottie': (typeof _ShowcaseLottieRoute)['_outputType'];\n    '/showcase/search-params': (typeof _ShowcaseSearchParamsRoute)['_outputType'];\n    '/showcase/status-bar': (typeof _ShowcaseStatusBarRoute)['_outputType'];\n    '/showcase/use-back-event': (typeof _ShowcaseUseBackEventRoute)['_outputType'];\n    '/showcase/video': (typeof _ShowcaseVideoRoute)['_outputType'];\n    '/showcase/webview': (typeof _ShowcaseWebviewRoute)['_outputType'];\n  }\n}\n"
  },
  {
    "path": "services/showcase/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"moduleResolution\": \"bundler\",\n    \"baseUrl\": \"src\",\n    \"lib\": [\"ESNext\"],\n    \"jsx\": \"preserve\",\n    \"rootDir\": \".\",\n    \"allowJs\": true,\n    \"outDir\": \"./dist\"\n  },\n  \"include\": [\"**/*.ts\", \"**/*.tsx\", \"**/*.e2e.ts\"]\n}\n"
  },
  {
    "path": "services/showcase/vitest.config.ts",
    "content": "import { reactNative } from '@granite-js/vitest';\nimport { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n  cacheDir: '.vitest',\n  plugins: [reactNative()],\n  test: {\n    globals: true,\n    environment: 'node',\n  },\n});"
  },
  {
    "path": "tools/README.md",
    "content": "# tools\n\nA set of commands for Granite.\n"
  },
  {
    "path": "tools/package.json",
    "content": "{\n  \"name\": \"@granite-internal/tools\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"scripts\": {\n    \"prepack\": \"yarn build\",\n    \"dev\": \"tsx src/index.ts --\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"build\": \"tsup\"\n  },\n  \"main\": \"./dist/index.js\",\n  \"devDependencies\": {\n    \"@commander-js/extra-typings\": \"^13.1.0\",\n    \"@nx/devkit\": \"^21.0.3\",\n    \"@types/node\": \"catalog:tools\",\n    \"@types/yargs\": \"^17.0.33\",\n    \"@types/yauzl\": \"^2.10.3\",\n    \"commander\": \"^13.1.0\",\n    \"es-toolkit\": \"^1.39.10\",\n    \"nx\": \"^21.0.3\",\n    \"picocolors\": \"^1.1.1\",\n    \"tsup\": \"^8.5.0\",\n    \"tsx\": \"^4.19.4\",\n    \"typescript\": \"catalog:tools\",\n    \"zx\": \"^8.5.4\"\n  }\n}\n"
  },
  {
    "path": "tools/src/commands/attw.ts",
    "content": "import { Command } from '@commander-js/extra-typings';\nimport pc from 'picocolors';\nimport { $ } from 'zx';\nimport { Project } from '../project';\n\nconst IGNORE_RULES = ['internal-resolution-error', 'false-export-default'];\nconst IGNORE_PACKAGE_PATHS = [\n  /**\n   * Not a library, just a tool\n   */\n  'packages/create-granite-app',\n  'infra/forge-cli',\n];\n\nexport function attw() {\n  return new Command('attw')\n    .description('Check package.json with `Are The Types Wrong`')\n    .option('--bail', 'Exit with non-zero code if any package fails', false)\n    .action(async (options) => {\n      const allPackages = await Project.getPackages({ ignorePrivate: true });\n      const packageRoots = allPackages\n        .map((packageInfo) => packageInfo.data.root)\n        .filter((path) => !IGNORE_PACKAGE_PATHS.includes(path));\n      const totalCount = packageRoots.length;\n\n      console.log(`👉 Target packages (Total: ${totalCount})\\n`);\n      for (const packageRoot of packageRoots) {\n        console.log(`- ${packageRoot}`);\n      }\n      console.log();\n\n      const passed: string[] = [];\n      const errors: { packageRoot: string; errorMessage: string }[] = [];\n      for (let i = 0; i < totalCount; i++) {\n        const packageRoot = packageRoots[i]!;\n        console.log(`Running attw for`, pc.cyan(packageRoot), `(${i + 1} of ${totalCount})`);\n\n        const errorMessage = await runAttw(packageRoot, options);\n\n        if (errorMessage != null) {\n          errors.push({ packageRoot, errorMessage });\n        } else {\n          passed.push(packageRoot);\n        }\n      }\n\n      if (passed.length > 0) {\n        console.log();\n        console.log(pc.green('✅ Command passed for the following packages:'));\n        for (const packageRoot of passed) {\n          console.log(`- ${packageRoot}`);\n        }\n      }\n\n      if (errors.length > 0) {\n        console.log();\n        console.log(pc.red('❌ Command failed for the following packages:'));\n        for (const error of errors) {\n          console.log(`- ${error.packageRoot}`);\n        }\n        process.exit(1);\n      }\n    });\n}\n\nasync function runAttw(packagePath: string, options: { bail: boolean }) {\n  const { exitCode, stderr, stdout } = await $({\n    nothrow: true,\n    stdio: 'inherit',\n  })`yarn attw ${packagePath} --pack --profile strict --ignore-rules ${IGNORE_RULES}`;\n\n  const errorMessage = stderr || stdout;\n  const isError = exitCode !== 0;\n\n  if (options.bail && isError) {\n    console.error(errorMessage);\n    process.exit(exitCode);\n  }\n\n  if (isError) {\n    return errorMessage;\n  }\n\n  return;\n}\n"
  },
  {
    "path": "tools/src/commands/linked-pack.ts",
    "content": "import { Command } from '@commander-js/extra-typings';\nimport { Project } from '../project';\n\nexport function linkedPack() {\n  return new Command('linked-pack')\n    .description('Pack the given package and its dependencies and replace workspace protocol with file protocol')\n    .argument('<string>', 'Target package to pack')\n    .option('-p, --packages [PACKAGES]', 'Additional packages to pack (comma separated)')\n    .action(async (packageName, options) => {\n      await Project.packAndLinkWorkspacePackages(\n        packageName,\n        typeof options.packages === 'string' ? options.packages.split(',') : undefined\n      );\n\n      process.exit(0);\n    });\n}\n"
  },
  {
    "path": "tools/src/index.ts",
    "content": "import { Command } from '@commander-js/extra-typings';\nimport { attw } from './commands/attw';\nimport { linkedPack } from './commands/linked-pack';\n\nconst program = new Command('tools');\n\nprogram.description('A set of commands for Granite');\nprogram.addCommand(linkedPack());\nprogram.addCommand(attw());\nprogram.parse();\n"
  },
  {
    "path": "tools/src/project.ts",
    "content": "import fs from 'fs';\nimport path from 'path';\nimport { createProjectGraphAsync, type ProjectGraph } from '@nx/devkit';\nimport { isNotNil } from 'es-toolkit';\nimport { $ } from 'zx';\nimport { ensureExecuteCommand } from './utils';\n\ninterface ProjectState {\n  projectGraph: ProjectGraph;\n  workspaceRoot: string;\n}\n\nlet cachedState: ProjectState | null = null;\n\nasync function loadProject() {\n  if (cachedState == null) {\n    cachedState = { projectGraph: await createProjectGraphAsync(), workspaceRoot: getProjectRootImpl() };\n  }\n\n  return cachedState;\n}\n\nfunction getProjectRootImpl() {\n  let currentPath = process.cwd();\n  let latestPackageJsonPath: string | null = null;\n  const root = path.parse(currentPath).root;\n\n  while (currentPath !== root) {\n    if (fs.existsSync(path.join(currentPath, 'package.json'))) {\n      latestPackageJsonPath = currentPath;\n    }\n\n    currentPath = path.dirname(currentPath);\n  }\n\n  if (latestPackageJsonPath == null) {\n    throw new Error('Cannot find project root');\n  }\n\n  return latestPackageJsonPath;\n}\n\nasync function projectRoot() {\n  const { workspaceRoot } = await loadProject();\n  return workspaceRoot;\n}\n\nasync function dependenciesOf(packageName: string) {\n  const { projectGraph, workspaceRoot } = await loadProject();\n  const visited = new Set<string>();\n  const result = new Set<string>();\n  const pathMap: Record<string, string> = {};\n\n  const traverse = (packageName: string) => {\n    if (visited.has(packageName)) {\n      return;\n    }\n\n    visited.add(packageName);\n\n    const dependencies = projectGraph.dependencies[packageName] ?? [];\n\n    for (const dependency of dependencies) {\n      const targetNode = projectGraph.nodes[dependency.target];\n      const targetPath = targetNode?.data.root;\n\n      if (dependency.target.startsWith('npm:') || targetPath == null) {\n        continue;\n      }\n\n      pathMap[dependency.target] = path.join(workspaceRoot, targetPath);\n      result.add(dependency.target);\n      traverse(dependency.target);\n    }\n  };\n\n  traverse(packageName);\n\n  return Array.from(result).map((name) => ({ name, path: pathMap[name]! }));\n}\n\nasync function locationOf(packageName: string) {\n  const { projectGraph, workspaceRoot } = await loadProject();\n  const targetNode = projectGraph.nodes[packageName];\n\n  if (targetNode == null) {\n    throw new Error(`Package '${packageName}' not found`);\n  }\n\n  return path.join(workspaceRoot, targetNode.data.root);\n}\n\nasync function build(packages: string[]) {\n  const globPattern = utils.toGlobPattern(packages);\n  const $$ = $({ stdio: 'inherit' });\n  const task = $$`yarn workspaces foreach -A --topological-dev --include ${globPattern} build`;\n\n  await ensureExecuteCommand(task);\n}\n\nasync function pack(packages: string[], outFile = 'package.tgz') {\n  const globPattern = utils.toGlobPattern(packages);\n  const $$ = $({ stdio: 'inherit' });\n  const task = $$`yarn workspaces foreach -A --topological-dev --include ${globPattern} pack --out ${outFile}`;\n\n  await ensureExecuteCommand(task);\n\n  return Promise.all(packages.map(async (name) => ({ file: path.resolve(await locationOf(name), outFile), name })));\n}\n\nasync function packAndLinkWorkspacePackages(targetPackage: string, additionalPackages?: string[]) {\n  const packedFile = 'package.tgz';\n  const dependencies = await dependenciesOf(targetPackage);\n  const combinedDependencies = [\n    ...(await Promise.all(\n      [targetPackage, ...(additionalPackages ?? [])].map(async (name) => ({\n        name,\n        path: await locationOf(name),\n      }))\n    )),\n    ...dependencies,\n  ];\n\n  if (dependencies.length === 0) {\n    console.log('👉 Dependencies not found');\n  } else {\n    console.log(`👉 ${dependencies.length} dependencies found`);\n    console.log(dependencies.map(({ name }) => name).join('\\n'));\n    console.log();\n\n    await Promise.all(\n      combinedDependencies.map(async ({ name: currentName, path: packageRoot }) => {\n        const packageJsonPath = path.join(packageRoot, 'package.json');\n        const rawPackageJson = await fs.promises.readFile(packageJsonPath, 'utf-8');\n        const packageJson = JSON.parse(rawPackageJson);\n        let edited = false;\n\n        for (const { name, path: packageRoot } of combinedDependencies) {\n          // Avoid self reference\n          if (currentName === name) {\n            continue;\n          }\n\n          const packedFilePath = path.join(packageRoot, packedFile);\n\n          if (typeof packageJson.dependencies !== 'undefined' && name in packageJson.dependencies) {\n            packageJson.dependencies[name] = packedFilePath;\n            edited = true;\n          }\n\n          if (typeof packageJson.devDependencies !== 'undefined' && name in packageJson.devDependencies) {\n            packageJson.devDependencies[name] = packedFilePath;\n            edited = true;\n          }\n        }\n\n        if (edited) {\n          await fs.promises.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\\n');\n          console.log(`✅ ${packageJsonPath} updated`);\n        }\n      })\n    );\n  }\n\n  const dependencyNames = combinedDependencies.map(({ name }) => name);\n\n  console.log('👉 Start packing...');\n  console.log(dependencyNames.join('\\n'));\n  console.log();\n\n  const packResults = await pack(dependencyNames, packedFile);\n\n  console.log(`✅ Packed successfully`);\n\n  return packResults;\n}\n\nasync function getPackages({ ignorePrivate = false }: { ignorePrivate?: boolean } = {}) {\n  const { projectGraph } = await loadProject();\n  const packages = Object.keys(projectGraph.nodes);\n\n  return packages\n    .map((name) => {\n      const targetPackage = projectGraph.nodes[name];\n\n      if (targetPackage == null) {\n        return;\n      }\n\n      if (ignorePrivate) {\n        const isPrivate = targetPackage?.data?.tags?.includes('npm:private');\n\n        if (isPrivate) {\n          return;\n        }\n      }\n\n      return targetPackage;\n    })\n    .filter(isNotNil);\n}\n\nconst utils = {\n  toGlobPattern: (packages: string[]) => (packages.length === 1 ? packages[0] : `{${packages.join(',')}}`),\n};\n\nexport const Project = {\n  projectRoot,\n  locationOf,\n  dependenciesOf,\n  build,\n  pack,\n  packAndLinkWorkspacePackages,\n  getPackages,\n};\n"
  },
  {
    "path": "tools/src/utils.ts",
    "content": "import type { ProcessOutput } from 'zx';\n\nexport async function ensureExecuteCommand(task: Promise<ProcessOutput>) {\n  const result = await task;\n\n  if (result.exitCode !== 0) {\n    throw result.cause;\n  }\n\n  return result;\n}\n"
  },
  {
    "path": "tools/tsconfig.json",
    "content": "{\n  \"extends\": \"../tsconfig.json\",\n  \"compilerOptions\": {\n    \"types\": [\"node\"]\n  },\n  \"include\": [\"src\"]\n}\n"
  },
  {
    "path": "tools/tsup.config.ts",
    "content": "import { defineConfig } from 'tsup';\n\nexport default defineConfig({\n  entry: ['src/index.ts'],\n  external: ['nx', '@nx/devkit'],\n  format: 'esm',\n  dts: false,\n  bundle: true,\n  shims: true,\n  banner: {\n    js: `globalThis.require=(await import('module')).createRequire(import.meta.url);`,\n  },\n});\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    /* Modules */\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"moduleDetection\": \"force\",\n    \"resolveJsonModule\": true,\n    \"isolatedModules\": true,\n\n    /* Type Checking */\n    \"noFallthroughCasesInSwitch\": true,\n    \"noImplicitReturns\": true,\n    \"noUncheckedIndexedAccess\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"strict\": true,\n\n    \"types\": [],\n    /* Language and Environment */\n    \"experimentalDecorators\": true,\n    \"jsx\": \"react-jsx\",\n    \"lib\": [\"ESNext\", \"ESNext.AsyncIterable\"],\n    \"target\": \"ESNext\",\n\n    /* Interop Constraints */\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n\n    /* Completeness */\n    \"allowJs\": false,\n    \"skipLibCheck\": true,\n\n    /* Others */\n    \"stripInternal\": true\n  },\n  \"exclude\": [\"**/dist/*\", \"**/esm/*\"]\n}\n"
  },
  {
    "path": "yarn.config.mjs",
    "content": "/** @type {import('@yarnpkg/types')} */\nconst { defineConfig } = require('@yarnpkg/types');\n\nconst defaultMinimumPeerDependencyVersion = {};\nconst CONSTRAINTS_PACKAGE_VERSIONS = {\n  '@types/node': '^22.10.2',\n  esbuild: '^0.25.9',\n  fastify: '4.14.0',\n};\n\nfunction uniq(arr) {\n  return [...new Set(arr)];\n}\n\nconst cache = new Map();\n\nfunction getPeerDependenciesOfPackage(pkgName, { Yarn }) {\n  const workspace = Yarn.workspace({ ident: pkgName });\n\n  if (!workspace) {\n    return [];\n  }\n\n  if (cache.has(pkgName)) {\n    return cache.get(pkgName);\n  }\n\n  const manifest = workspace.manifest;\n\n  const peerDependencies = Object.keys(manifest.peerDependencies ?? {});\n\n  const peerDependenciesOfDependencies = Object.keys(manifest.dependencies ?? {})\n    .map((dependency) => getPeerDependenciesOfPackage(dependency, { Yarn }))\n    .flat();\n\n  const result = uniq([\n    ...peerDependencies,\n    ...peerDependenciesOfDependencies.filter((dep) => !manifest.dependencies?.[dep]),\n  ]);\n\n  cache.set(pkgName, result);\n\n  return result;\n}\n\nmodule.exports = defineConfig({\n  async constraints({ Yarn }) {\n    for (const [packageName, version] of Object.entries(CONSTRAINTS_PACKAGE_VERSIONS)) {\n      for (const dep of Yarn.dependencies({ ident: packageName })) {\n        dep.update(version);\n      }\n    }\n\n    for (const workspace of Yarn.workspaces()) {\n      const name = workspace.ident;\n\n      if (workspace.manifest.private) {\n        continue;\n      }\n\n      const requiredPeerDependencies = getPeerDependenciesOfPackage(name, { Yarn });\n\n      if (requiredPeerDependencies.length === 0) {\n        continue;\n      }\n\n      for (const peerDependency of requiredPeerDependencies) {\n        const existingVersion = workspace.manifest.peerDependencies?.[peerDependency];\n        const requiredVersion = existingVersion ?? defaultMinimumPeerDependencyVersion[peerDependency] ?? '*';\n\n        workspace.set(`peerDependencies[${JSON.stringify(peerDependency)}]`, requiredVersion);\n      }\n    }\n  },\n});\n"
  }
]