{"version":3,"sources":["../../../src/components/runtime/ApplicationHandoffLink.tsx","../../../src/locale/en-US.ts","../../../src/locale/resolve-locale.ts","../../../src/provider/context.ts","../../../src/components/base/BasePortal.tsx","../../../src/components/base/internal/overlayPortal.tsx","../../../src/components/base/utils.ts","../../../src/components/base/theme.ts","../../../src/components/base/BaseDialog.tsx","../../../src/components/runtime/RenderNodeHost.tsx","../../../src/components/runtime/OverlayNodeHost.tsx","../../../src/components/runtime/RenderTreeHost.tsx","../../../src/components/runtime/RenderTreeRuntimeHost.tsx","../../../src/components/runtime/RenderTreeRegistryHost.tsx"],"names":["useState","useEffect","jsx","BaseDialog","Fragment","forwardRef","RenderNodeHost","useRef","useMemo","useCallback","scheduleFocus","compileRenderTree"],"mappings":";;;;;;;;;AAgBO,SAAS,sBAAA,CAAuB;AAAA,EACrC,OAAA;AAAA,EACA,UAAA,GAAa,QAAQ,MAAA,CAAO,IAAA;AAAA,EAC5B,YAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAgC;AAC9B,EAAA,MAAM,sBAAA,GAAyB,cAAc,IAAA,EAAK;AAClD,EAAA,MAAM,kBAAA,GAAqB,yBACvB,IAAI,GAAA,CAAI,YAAY,sBAAsB,CAAA,CAAE,UAAS,GACrD,UAAA;AAEJ,EAAA,uBACE,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,IAAA,EAAM,0BAAA,CAA2B,kBAAA,EAAoB,OAAO,CAAA;AAAA,MAC5D,2BAAyB,OAAA,CAAQ,SAAA;AAAA,MACjC,6BAAA,EAA6B,QAAQ,MAAA,CAAO,OAAA;AAAA,MAC5C,6BAAA,EAA6B,QAAQ,MAAA,CAAO,OAAA;AAAA,MAC5C,OAAA,EAAS,CAAC,KAAA,KAAU,UAAA,GAAa,SAAS,KAAK,CAAA;AAAA,MAE9C;AAAA;AAAA,GACH;AAEJ;;;ACvCO,IAAM,IAAA,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AAW,EAAC;AAAA,EACZ,cAAA,GAAiB,qBAAA;AAAA,EACjB,sBAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAgC;AAC9B,EAAA,uBACEA,GAAAA;AAAA,IAAC,qBAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,IAAA;AAAA,MACA,UAAA,EAAY,CAAC,OAAA,KAAY;AACvB,QAAA,MAAM,QAAA,GAAW,UAAA,CAAW,OAAA,CAAQ,IAAA,CAAK,cAAc,EAAE,CAAA;AACzD,QAAA,IAAI,CAAC,QAAA,EAAU;AACb,UAAA,OAAO,sBAAA,GAAyB,OAAO,CAAA,IAAK,OAAA,CAAQ,QAAA;AAAA,QACtD;AACA,QAAA,OAAO,QAAA,CAAS;AAAA,UACd,GAAG,OAAA;AAAA,UACH,OAAA,EAAS,cAAA,CAAe,OAAA,CAAQ,IAAA,EAAM,QAAQ,CAAA;AAAA,UAC9C,KAAA,EAAO,QAAQ,IAAA,CAAK;AAAA,SACrB,CAAA;AAAA,MACH;AAAA;AAAA,GACF;AAEJ","file":"index.mjs","sourcesContent":["import type { ApplicationHandoff } from '@inf-monkeys-tech/monkeys';\nimport { buildApplicationHandoffUrl } from '@inf-monkeys-tech/monkeys/runtime';\nimport type { AnchorHTMLAttributes, MouseEvent, ReactNode } from 'react';\n\nexport interface ApplicationHandoffLinkProps\n  extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'onClick'> {\n  handoff: ApplicationHandoff;\n  targetPath?: string;\n  targetOrigin?: string;\n  children?: ReactNode;\n  onActivate?: (\n    handoff: ApplicationHandoff,\n    event: MouseEvent<HTMLAnchorElement>,\n  ) => void;\n}\n\nexport function ApplicationHandoffLink({\n  handoff,\n  targetPath = handoff.target.path,\n  targetOrigin,\n  children,\n  onActivate,\n  ...props\n}: ApplicationHandoffLinkProps) {\n  const normalizedTargetOrigin = targetOrigin?.trim();\n  const resolvedTargetPath = normalizedTargetOrigin\n    ? new URL(targetPath, normalizedTargetOrigin).toString()\n    : targetPath;\n\n  return (\n    <a\n      {...props}\n      href={buildApplicationHandoffUrl(resolvedTargetPath, handoff)}\n      data-monkeys-handoff-id={handoff.handoffId}\n      data-monkeys-handoff-source={handoff.source.product}\n      data-monkeys-handoff-target={handoff.target.product}\n      onClick={(event) => onActivate?.(handoff, event)}\n    >\n      {children}\n    </a>\n  );\n}\n","import type { MonkeysLocale } from \"./types\";\n\nexport const enUS = {\n  locale: \"en-US\",\n  messages: {\n    pagination: {\n      navigation: \"Pagination\",\n      first: \"First\",\n      previous: \"Previous\",\n      next: \"Next\",\n      last: \"Last\",\n      page: ({ page, pageCount }) => `Page ${page} of ${pageCount}`,\n      currentPage: ({ page, pageCount }) =>\n        `Page ${page} of ${pageCount}, current page`,\n      emptyResults: \"0 results\",\n      range: ({ start, end, total }) => `${start}-${end} of ${total}`,\n      selected: ({ count }) => `${count} selected`,\n      pageSize: \"Items per page\",\n      perLoad: \"Items per load\",\n      jumpToPage: \"Jump to page\",\n      pages: \"pages\",\n      clickToJump: \"Click to jump to a page\",\n    },\n    dialog: {\n      close: \"Close dialog\",\n    },\n    dropdownMenu: {\n      actions: \"Actions\",\n    },\n    loading: {\n      spinner: \"Loading\",\n    },\n    layout: {\n      resizePanels: \"Resize panels\",\n    },\n    steps: {\n      label: \"Progress\",\n      current: \"Current\",\n      completed: \"Completed\",\n      error: \"Error\",\n      disabled: \"Disabled\",\n    },\n    numberInput: {\n      increment: \"Increase value\",\n      decrement: \"Decrease value\",\n    },\n    passwordInput: {\n      showPassword: \"Show password\",\n      hidePassword: \"Hide password\",\n    },\n    multiSelect: {\n      placeholder: \"Select options\",\n      empty: \"No options\",\n      removeOption: ({ value }) => `Remove ${value}`,\n    },\n    table: {\n      dragColumn: ({ columnId }) => `Drag column ${columnId}`,\n      resizeColumn: ({ columnId }) => `Resize column ${columnId}`,\n      sortColumn: ({ columnId }) =>\n        columnId ? `Sort column ${columnId}` : \"Sort column\",\n      loadingRow: \"Loading table row\",\n    },\n    toolbar: {\n      theme: {\n        label: \"Appearance\",\n        toggle: \"Toggle theme\",\n        auto: \"Auto\",\n        light: \"Light\",\n        dark: \"Dark\",\n      },\n      language: {\n        label: \"Language\",\n        switch: \"Switch language\",\n      },\n    },\n    toast: {\n      errorTitle: \"Error\",\n      warningTitle: \"Warning\",\n      defaultErrorDescription: \"Something went wrong.\",\n      defaultWarningDescription: \"Please check and try again.\",\n    },\n    dataExplorer: {\n      viewTree: {\n        actions: \"More actions\",\n        expand: \"Expand\",\n        collapse: \"Collapse\",\n        loading: \"Loading...\",\n        empty: \"No views\",\n        error: \"Unable to load views\",\n      },\n    },\n    workbench: {\n      collection: {\n        label: \"Collection\",\n        loading: \"Loading items\",\n        empty: \"No items\",\n        loadError: \"Unable to load items\",\n        refreshError: \"Unable to refresh items\",\n        retry: \"Retry\",\n        loadingMore: \"Loading more items\",\n        permission: \"You do not have permission to view this content\",\n        offline: \"You appear to be offline\",\n        requestAccess: \"Request access\",\n      },\n      interactiveTable: {\n        columnActions: \"Column actions\",\n        freezeColumn: \"Freeze to left\",\n        freezeEndColumn: \"Freeze to right\",\n        unfreezeColumn: \"Unfreeze from left\",\n        unfreezeEndColumn: \"Unfreeze from right\",\n        unfreezeAllColumns: \"Unfreeze all columns\",\n        resetColumnWidth: \"Reset column width\",\n        frozenColumnTitle: \"Frozen column\",\n      },\n    },\n    agentWorkbench: {\n      label: \"Session activity\",\n      reasoning: \"Reasoning\",\n      plan: \"Plan\",\n      taskNoDetail: \"No additional details\",\n      modes: { chat: \"Chat\", work: \"Work\" },\n      composer: {\n        send: \"Send message\",\n        stop: \"Stop generating\",\n        queue: \"Queue message\",\n        attach: \"Add photos or files\",\n        voice: \"Start voice input\",\n        webSearch: \"Web search\",\n        chatMode: \"Chat mode\",\n        model: \"Model\",\n        reasoning: \"Reasoning effort\",\n        permissions: \"Permissions\",\n        removeAttachment: \"Remove attachment\",\n        editQueued: \"Edit queued message\",\n        deleteQueued: \"Delete queued message\",\n        moveUp: \"Move message up\",\n        moveDown: \"Move message down\",\n        queued: \"Queued messages\",\n        uploading: \"Uploading\",\n        uploadFailed: \"Upload failed\",\n        retryAttachment: \"Retry attachment upload\",\n        noModels: \"No models available\",\n        message: \"Message\",\n        attachmentOnly: \"Attachment\",\n        reasoningOptions: {\n          low: \"Low\",\n          medium: \"Medium\",\n          high: \"High\",\n          xhigh: \"Extra high\",\n        },\n        permissionOptions: {\n          \"approval-required\": \"Approval required\",\n          \"auto-approve\": \"Auto approve\",\n          \"full-access\": \"Full access\",\n        },\n      },\n      quickStart: {\n        label: \"Quick start\",\n        back: \"Back\",\n        addFile: \"Add file\",\n      },\n      tool: {\n        input: \"Input\",\n        output: \"Output\",\n        status: {\n          pending: \"Pending\",\n          running: \"Running\",\n          completed: \"Completed\",\n          failed: \"Error\",\n          denied: \"Denied\",\n        },\n      },\n      approval: {\n        approve: \"Approve\",\n        reject: \"Reject\",\n        approved: \"Approved\",\n        rejected: \"Rejected\",\n      },\n      artifact: {\n        pending: \"Preparing\",\n        ready: \"Ready\",\n        failed: \"Failed\",\n        open: ({ name }) => `Open ${name}`,\n      },\n      run: {\n        stopping: \"Stopping...\",\n        stoppedAfter: ({ duration }) => `You stopped after ${duration}`,\n      },\n      process: {\n        running: \"Working\",\n        queued: \"Queued\",\n        waitingApproval: \"Waiting for approval\",\n        failed: \"Failed\",\n        stopped: \"Stopped\",\n        processed: \"Processed\",\n        processedFor: ({ duration }) => `Worked for ${duration}`,\n        completedCount: ({ completed, total }) =>\n          `${completed}/${total} completed`,\n      },\n      artifactWorkspace: {\n        outputs: \"Outputs\",\n        sources: \"Sources\",\n        viewAll: \"View all\",\n        toggleSummary: \"Toggle files\",\n        tabs: \"Open files\",\n        closeTab: ({ name }) => `Close ${name}`,\n        closeWorkspace: \"Close workspace\",\n        download: ({ name }) => `Download ${name}`,\n        openExternal: ({ name }) => `Open ${name} in a new window`,\n        loading: \"Loading preview...\",\n        failed: \"Preview unavailable\",\n        retry: \"Try again\",\n      },\n      usage: {\n        label: \"Context usage\",\n        context: ({ used, total }) => `${used} / ${total} tokens`,\n      },\n      navigation: {\n        search: \"Search agents and sessions\",\n        searchSessions: \"Search sessions\",\n        searchShortcut: \"Focus search\",\n        clearSearch: \"Clear search\",\n        tabsLabel: \"Agent workbench navigation\",\n        agents: \"Agents\",\n        sessions: \"Sessions\",\n        newAgent: \"New Agent\",\n        newSession: \"New Session\",\n        capabilities: \"Capabilities & Extensions\",\n        settings: \"Agent Settings\",\n        allAgents: \"All Agents\",\n        recentSessions: \"Recent Sessions\",\n        chat: \"Chat\",\n        work: \"Work\",\n        chats: \"Chats\",\n        builtIn: \"Built-in\",\n        noDescription: \"No description\",\n        loading: \"Loading...\",\n        emptyAgents: \"No agents yet\",\n        emptySessions: \"No sessions yet\",\n        noResults: \"No matching results\",\n        retry: \"Retry\",\n        pin: \"Pin\",\n        unpin: \"Unpin\",\n        rename: \"Rename\",\n        delete: \"Delete\",\n        actions: \"Actions\",\n        save: \"Save\",\n        cancel: \"Cancel\",\n        running: \"Running\",\n        completed: \"Completed\",\n        failed: \"Failed\",\n        contextUsage: ({ percent }) => `${percent}% context used`,\n      },\n      details: {\n        title: \"Task details\",\n        description: \"Summary and workspace activity\",\n        duration: \"Duration\",\n        updated: \"Updated\",\n        model: \"Model\",\n        mode: \"Mode\",\n        permissions: \"Permissions\",\n        tokenUsage: \"Token usage\",\n        summary: \"Summary\",\n        summaryEmpty: \"No summary is available yet.\",\n        summaryFailed: \"The summary could not be generated.\",\n        highlights: \"Highlights\",\n        pendingItems: \"Pending items\",\n        tabs: {\n          label: \"Task detail views\",\n          summary: \"Summary\",\n          workspace: \"Workspace\",\n        },\n        status: {\n          queued: \"Queued\",\n          running: \"Running\",\n          waiting_approval: \"Waiting for approval\",\n          stopping: \"Stopping\",\n          stopped: \"Stopped\",\n          completed: \"Completed\",\n          failed: \"Failed\",\n        },\n        state: {\n          loading: {\n            title: \"Loading task details\",\n            description: \"Restoring the latest session activity.\",\n          },\n          empty: {\n            title: \"No task selected\",\n            description: \"Select a task to inspect its details.\",\n          },\n          error: {\n            title: \"Unable to load task details\",\n            description: \"Try again after the session is available.\",\n          },\n        },\n        actions: {\n          close: \"Close task details\",\n          copySummary: \"Copy summary\",\n          retry: \"Retry\",\n          retrySummary: \"Retry summary\",\n          resume: \"Resume\",\n          continueInNewTask: \"Continue in new task\",\n          editAndRerun: \"Edit and rerun\",\n          export: \"Export\",\n        },\n        workspace: {\n          diffs: \"Code changes\",\n          files: \"Files\",\n          terminals: \"Terminals\",\n          tests: \"Tests\",\n          artifacts: \"Artifacts\",\n          exitCode: ({ code }) => `Exit code ${code}`,\n          diffStatus: {\n            added: \"Added\",\n            modified: \"Modified\",\n            deleted: \"Deleted\",\n            renamed: \"Renamed\",\n          },\n          fileOperation: { upsert: \"Updated\", delete: \"Deleted\" },\n        },\n      },\n    },\n  },\n} satisfies MonkeysLocale;\n","import { enUS } from './en-US';\nimport type {\n  MonkeysBuiltInLocaleId,\n  MonkeysLocale,\n  MonkeysLocaleInput,\n  MonkeysLocaleMessages,\n  MonkeysLocaleMessagesOverride,\n  MonkeysResolvedLocale,\n} from './types';\nimport { zhCN } from './zh-CN';\n\nconst BUILT_IN_LOCALES: Record<MonkeysBuiltInLocaleId, MonkeysLocale> = {\n  'en-US': enUS,\n  'zh-CN': zhCN,\n};\n\nfunction normalizeLocaleId(locale: unknown): string {\n  if (typeof locale !== 'string' || !locale.trim()) {\n    throw new TypeError('Monkeys locale must be a non-empty BCP 47 string.');\n  }\n\n  try {\n    return Intl.getCanonicalLocales(locale)[0];\n  } catch {\n    throw new RangeError(\n      `Monkeys locale \"${locale}\" is not a valid BCP 47 identifier.`,\n    );\n  }\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n  return Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n}\n\nfunction validateMessageOverride(\n  value: unknown,\n  schema: unknown,\n  path: string,\n) {\n  if (!isRecord(value) || !isRecord(schema)) {\n    throw new TypeError(`${path} must be an object.`);\n  }\n\n  for (const [key, candidate] of Object.entries(value)) {\n    if (candidate === undefined) continue;\n    if (!(key in schema)) {\n      throw new TypeError(`${path}.${key} is not a supported Monkeys message.`);\n    }\n\n    const expected = schema[key];\n    const candidatePath = `${path}.${key}`;\n    if (typeof expected === 'function') {\n      if (typeof candidate !== 'function') {\n        throw new TypeError(`${candidatePath} must be a function.`);\n      }\n    } else if (typeof expected === 'string') {\n      if (typeof candidate !== 'string') {\n        throw new TypeError(`${candidatePath} must be a string.`);\n      }\n    } else {\n      validateMessageOverride(candidate, expected, candidatePath);\n    }\n  }\n}\n\nfunction assertMessagesOverride(\n  value: unknown,\n  path: string,\n): asserts value is MonkeysLocaleMessagesOverride {\n  validateMessageOverride(value, enUS.messages, path);\n}\n\nfunction isBuiltInLocale(locale: string): locale is MonkeysBuiltInLocaleId {\n  return locale === 'en-US' || locale === 'zh-CN';\n}\n\nfunction normalizeLocaleInput(input: MonkeysLocaleInput | undefined): {\n  locale: string | undefined;\n  messages: MonkeysLocaleMessagesOverride | undefined;\n  hasExplicitLocale: boolean;\n} {\n  if (input === undefined) {\n    return {\n      locale: undefined,\n      messages: undefined,\n      hasExplicitLocale: false,\n    };\n  }\n\n  if (typeof input === 'string') {\n    const locale = normalizeLocaleId(input);\n    if (!isBuiltInLocale(locale)) {\n      throw new RangeError(\n        `Unsupported built-in Monkeys locale \"${locale}\". Provide a locale pack object for custom locales.`,\n      );\n    }\n    return { locale, messages: undefined, hasExplicitLocale: true };\n  }\n\n  if (!input || typeof input !== 'object' || Array.isArray(input)) {\n    throw new TypeError('Monkeys locale must be a locale id or locale pack object.');\n  }\n\n  const locale = normalizeLocaleId(input.locale);\n  assertMessagesOverride(input.messages, 'Monkeys locale messages');\n\n  return {\n    locale,\n    messages: input.messages,\n    hasExplicitLocale: true,\n  };\n}\n\nexport function mergeMonkeysLocaleMessages(\n  base: MonkeysLocaleMessages,\n  override?: MonkeysLocaleMessagesOverride,\n): MonkeysLocaleMessages {\n  if (!override) return base;\n\n  return {\n    pagination: { ...base.pagination, ...override.pagination },\n    dialog: { ...base.dialog, ...override.dialog },\n    dropdownMenu: { ...base.dropdownMenu, ...override.dropdownMenu },\n    loading: { ...base.loading, ...override.loading },\n    layout: { ...base.layout, ...override.layout },\n    steps: { ...base.steps, ...override.steps },\n    numberInput: { ...base.numberInput, ...override.numberInput },\n    passwordInput: { ...base.passwordInput, ...override.passwordInput },\n    multiSelect: { ...base.multiSelect, ...override.multiSelect },\n    table: { ...base.table, ...override.table },\n    toolbar: {\n      theme: { ...base.toolbar.theme, ...override.toolbar?.theme },\n      language: { ...base.toolbar.language, ...override.toolbar?.language },\n    },\n    toast: { ...base.toast, ...override.toast },\n    dataExplorer: {\n      viewTree: {\n        ...base.dataExplorer.viewTree,\n        ...override.dataExplorer?.viewTree,\n      },\n    },\n    workbench: {\n      collection: {\n        ...base.workbench.collection,\n        ...override.workbench?.collection,\n      },\n      interactiveTable: {\n        ...base.workbench.interactiveTable,\n        ...override.workbench?.interactiveTable,\n      },\n    },\n    agentWorkbench: {\n      ...base.agentWorkbench,\n      ...override.agentWorkbench,\n      modes: {\n        ...base.agentWorkbench.modes,\n        ...override.agentWorkbench?.modes,\n      },\n      composer: {\n        ...base.agentWorkbench.composer,\n        ...override.agentWorkbench?.composer,\n      },\n      quickStart: {\n        ...base.agentWorkbench.quickStart,\n        ...override.agentWorkbench?.quickStart,\n      },\n      tool: {\n        ...base.agentWorkbench.tool,\n        ...override.agentWorkbench?.tool,\n        status: {\n          ...base.agentWorkbench.tool.status,\n          ...override.agentWorkbench?.tool?.status,\n        },\n      },\n      approval: {\n        ...base.agentWorkbench.approval,\n        ...override.agentWorkbench?.approval,\n      },\n      artifact: {\n        ...base.agentWorkbench.artifact,\n        ...override.agentWorkbench?.artifact,\n      },\n      run: {\n        ...base.agentWorkbench.run,\n        ...override.agentWorkbench?.run,\n      },\n      process: {\n        ...base.agentWorkbench.process,\n        ...override.agentWorkbench?.process,\n      },\n      artifactWorkspace: {\n        ...base.agentWorkbench.artifactWorkspace,\n        ...override.agentWorkbench?.artifactWorkspace,\n      },\n      usage: {\n        ...base.agentWorkbench.usage,\n        ...override.agentWorkbench?.usage,\n      },\n      navigation: {\n        ...base.agentWorkbench.navigation,\n        ...override.agentWorkbench?.navigation,\n      },\n      details: {\n        ...base.agentWorkbench.details,\n        ...override.agentWorkbench?.details,\n        tabs: {\n          ...base.agentWorkbench.details.tabs,\n          ...override.agentWorkbench?.details?.tabs,\n        },\n        status: {\n          ...base.agentWorkbench.details.status,\n          ...override.agentWorkbench?.details?.status,\n        },\n        state: {\n          loading: {\n            ...base.agentWorkbench.details.state.loading,\n            ...override.agentWorkbench?.details?.state?.loading,\n          },\n          empty: {\n            ...base.agentWorkbench.details.state.empty,\n            ...override.agentWorkbench?.details?.state?.empty,\n          },\n          error: {\n            ...base.agentWorkbench.details.state.error,\n            ...override.agentWorkbench?.details?.state?.error,\n          },\n        },\n        actions: {\n          ...base.agentWorkbench.details.actions,\n          ...override.agentWorkbench?.details?.actions,\n        },\n        workspace: {\n          ...base.agentWorkbench.details.workspace,\n          ...override.agentWorkbench?.details?.workspace,\n          diffStatus: {\n            ...base.agentWorkbench.details.workspace.diffStatus,\n            ...override.agentWorkbench?.details?.workspace?.diffStatus,\n          },\n          fileOperation: {\n            ...base.agentWorkbench.details.workspace.fileOperation,\n            ...override.agentWorkbench?.details?.workspace?.fileOperation,\n          },\n        },\n      },\n    },\n  };\n}\n\nexport const defaultMonkeysLocale: MonkeysResolvedLocale = {\n  locale: enUS.locale,\n  messages: mergeMonkeysLocaleMessages(\n    enUS.messages as MonkeysLocaleMessages,\n  ),\n};\n\nexport function resolveMonkeysLocale(\n  input?: MonkeysLocaleInput,\n  override?: MonkeysLocaleMessagesOverride,\n  parent?: MonkeysResolvedLocale,\n): MonkeysResolvedLocale {\n  if (override !== undefined) {\n    assertMessagesOverride(override, 'MonkeysProvider messages');\n  }\n  const normalized = normalizeLocaleInput(input);\n  const locale = normalized.locale ?? parent?.locale ?? enUS.locale;\n  const builtInMessages = isBuiltInLocale(locale)\n    ? BUILT_IN_LOCALES[locale].messages\n    : undefined;\n  let messages = mergeMonkeysLocaleMessages(\n    enUS.messages as MonkeysLocaleMessages,\n    builtInMessages,\n  );\n\n  if (parent && (!normalized.hasExplicitLocale || parent.locale === locale)) {\n    messages = mergeMonkeysLocaleMessages(messages, parent.messages);\n  }\n\n  messages = mergeMonkeysLocaleMessages(messages, normalized.messages);\n  messages = mergeMonkeysLocaleMessages(messages, override);\n\n  return { locale, messages };\n}\n","import {\n  createContext,\n  useContext,\n  useMemo,\n  type Context,\n} from 'react';\n\nimport type { AssetIconResolver, AssetImageResolver } from '../components/base/BaseAssetIcon';\nimport type { BaseAppearance } from '../components/base/types';\nimport type { DataExplorerAppearance } from '../components/data-explorer/types';\nimport {\n  defaultMonkeysLocale,\n  type MonkeysLocaleMessages,\n  type MonkeysResolvedLocale,\n} from '../locale';\nimport type { CompiledThemeTokens } from '../theme-system';\n\nexport type MonkeysDirection = 'ltr' | 'rtl';\n\nexport interface MonkeysEnvironment {\n  getDocument?: () => Document | null;\n  getWindow?: () => Window | null;\n}\n\nexport type MonkeysPortalContainer =\n  | Element\n  | null\n  | (() => Element | null);\n\nexport interface MonkeysPortalOptions {\n  container?: MonkeysPortalContainer;\n  disabled?: boolean;\n}\n\nexport type MonkeysLoadingStateVariant = 'spinner' | 'skeleton';\nexport type MonkeysEmptyStateVariant = 'default' | 'compact';\nexport type MonkeysStatusStateDensity = 'compact' | 'default' | 'comfortable';\n\nexport type MonkeysListFooterPaginationMode = 'auto' | 'pages' | 'compact';\nexport type MonkeysListFooterAlignment = 'start' | 'end' | 'space-between';\n\nexport interface MonkeysListFooterConfig {\n  showTotal?: boolean;\n  showPageSize?: boolean;\n  pageSizeOptions?: number[];\n  paginationMode?: MonkeysListFooterPaginationMode;\n  alignment?: MonkeysListFooterAlignment;\n  density?: MonkeysStatusStateDensity;\n}\n\nexport interface MonkeysStatusStatesConfig {\n  loading?: { variant?: MonkeysLoadingStateVariant };\n  empty?: { variant?: MonkeysEmptyStateVariant };\n  error?: { showRetry?: boolean };\n  permission?: { showRequestAccess?: boolean };\n  density?: MonkeysStatusStateDensity;\n}\n\nexport interface MonkeysComponentAttributes {\n  dir?: MonkeysDirection;\n  'data-monkeys-direction'?: MonkeysDirection;\n  'data-monkeys-locale'?: string;\n  'data-monkeys-theme'?: string;\n  'data-monkeys-theme-mode'?: string;\n}\n\ninterface MonkeysLocaleContextValue extends MonkeysResolvedLocale {\n  provided: boolean;\n}\n\ninterface MonkeysThemeContextValue {\n  provided: boolean;\n  resolvedTheme?: CompiledThemeTokens;\n  themeId?: string;\n  baseAppearance?: BaseAppearance;\n  dataExplorerAppearance?: DataExplorerAppearance;\n  statusStates?: MonkeysStatusStatesConfig;\n  listFooter?: MonkeysListFooterConfig;\n}\n\ninterface MonkeysDirectionContextValue {\n  provided: boolean;\n  direction?: MonkeysDirection;\n}\n\ninterface MonkeysEnvironmentContextValue {\n  provided: boolean;\n  environment: MonkeysEnvironment;\n  portal: MonkeysPortalOptions;\n  iconResolver?: AssetIconResolver;\n  imageResolver?: AssetImageResolver;\n}\n\nconst EMPTY_ENVIRONMENT = Object.freeze({}) satisfies MonkeysEnvironment;\nconst EMPTY_PORTAL = Object.freeze({}) satisfies MonkeysPortalOptions;\n\ninterface MonkeysProviderContexts {\n  locale: Context<MonkeysLocaleContextValue>;\n  theme: Context<MonkeysThemeContextValue>;\n  direction: Context<MonkeysDirectionContextValue>;\n  environment: Context<MonkeysEnvironmentContextValue>;\n}\n\n// Every bundled public entry contains this module. Keep only the Context\n// identities in a realm-wide registry so root, provider, and component\n// subpaths interoperate in both CJS and ESM builds. Provider values remain in\n// React trees, so SSR requests are isolated. Bump the contract key only when\n// these Context value shapes become intentionally incompatible.\nconst MONKEYS_PROVIDER_CONTEXTS_KEY = Symbol.for(\n  '@inf-monkeys-tech/monkeys-design/provider-context@1',\n);\n\ntype MonkeysProviderContextHost = typeof globalThis & {\n  [MONKEYS_PROVIDER_CONTEXTS_KEY]?: MonkeysProviderContexts;\n};\n\nfunction createMonkeysProviderContexts(): MonkeysProviderContexts {\n  return Object.freeze({\n    locale: createContext<MonkeysLocaleContextValue>({\n      ...defaultMonkeysLocale,\n      provided: false,\n    }),\n    theme: createContext<MonkeysThemeContextValue>({\n      provided: false,\n    }),\n    direction: createContext<MonkeysDirectionContextValue>({\n      provided: false,\n    }),\n    environment: createContext<MonkeysEnvironmentContextValue>({\n      provided: false,\n      environment: EMPTY_ENVIRONMENT,\n      portal: EMPTY_PORTAL,\n    }),\n  });\n}\n\nfunction getMonkeysProviderContexts(): MonkeysProviderContexts {\n  const host = globalThis as MonkeysProviderContextHost;\n  const existing = host[MONKEYS_PROVIDER_CONTEXTS_KEY];\n  if (existing) return existing;\n\n  const contexts = createMonkeysProviderContexts();\n  Object.defineProperty(host, MONKEYS_PROVIDER_CONTEXTS_KEY, {\n    value: contexts,\n    enumerable: false,\n    configurable: false,\n    writable: false,\n  });\n  return contexts;\n}\n\nconst providerContexts = getMonkeysProviderContexts();\n\nexport const MonkeysLocaleContext = providerContexts.locale;\n\nexport const MonkeysThemeContext = providerContexts.theme;\n\nexport const MonkeysDirectionContext = providerContexts.direction;\n\nexport const MonkeysEnvironmentContext = providerContexts.environment;\n\nfunction mergeAppearance<T extends { slots?: object; styles?: object }>(\n  inherited: T | undefined,\n  explicit: T | undefined,\n): T | undefined {\n  if (explicit === undefined) return inherited;\n  if (inherited === undefined) return explicit;\n\n  return {\n    ...inherited,\n    ...explicit,\n    slots:\n      inherited.slots || explicit.slots\n        ? { ...inherited.slots, ...explicit.slots }\n        : undefined,\n    styles:\n      inherited.styles || explicit.styles\n        ? { ...inherited.styles, ...explicit.styles }\n        : undefined,\n  };\n}\n\nexport function useMonkeysLocale() {\n  try {\n    const context = useContext(MonkeysLocaleContext);\n    return context ?? { ...defaultMonkeysLocale, provided: false };\n  } catch {\n    return { ...defaultMonkeysLocale, provided: false };\n  }\n}\n\nexport function useMonkeysLocaleMessages(): MonkeysLocaleMessages {\n  return useContext(MonkeysLocaleContext).messages;\n}\n\nexport function useMonkeysResolvedTheme() {\n  return useContext(MonkeysThemeContext).resolvedTheme;\n}\n\nexport function useMonkeysBaseAppearance(\n  explicit?: BaseAppearance,\n): BaseAppearance | undefined {\n  const inherited = useContext(MonkeysThemeContext).baseAppearance;\n  return useMemo(\n    () => mergeAppearance(inherited, explicit),\n    [explicit, inherited],\n  );\n}\n\nexport function useMonkeysDataExplorerAppearance(\n  explicit?: DataExplorerAppearance,\n): DataExplorerAppearance | undefined {\n  const inherited = useContext(MonkeysThemeContext).dataExplorerAppearance;\n  return useMemo(\n    () => mergeAppearance(inherited, explicit),\n    [explicit, inherited],\n  );\n}\n\nexport function useMonkeysStatusStates(): MonkeysStatusStatesConfig {\n  return useContext(MonkeysThemeContext).statusStates ?? {};\n}\n\nexport function useMonkeysListFooter(): MonkeysListFooterConfig {\n  return useContext(MonkeysThemeContext).listFooter ?? {};\n}\n\nexport function useMonkeysDirection() {\n  return useContext(MonkeysDirectionContext).direction;\n}\n\nexport function useMonkeysEnvironment() {\n  return useContext(MonkeysEnvironmentContext).environment;\n}\n\nexport function useMonkeysPortalOptions() {\n  return useContext(MonkeysEnvironmentContext).portal;\n}\n\nexport function useMonkeysComponentAttributes(): MonkeysComponentAttributes {\n  const locale = useContext(MonkeysLocaleContext);\n  const theme = useContext(MonkeysThemeContext);\n  const direction = useContext(MonkeysDirectionContext);\n  const providerActive = locale.provided || theme.provided || direction.provided;\n\n  return useMemo(\n    () =>\n      providerActive\n        ? {\n            dir: direction.direction,\n            'data-monkeys-direction': direction.direction,\n            'data-monkeys-locale': locale.locale,\n            'data-monkeys-theme': theme.themeId,\n            'data-monkeys-theme-mode': theme.resolvedTheme?.colorMode,\n          }\n        : {},\n    [\n      direction.direction,\n      locale.locale,\n      providerActive,\n      theme.resolvedTheme?.colorMode,\n      theme.themeId,\n    ],\n  );\n}\n\nexport function useMonkeysAssetIconResolver(): AssetIconResolver | undefined {\n  return useContext(MonkeysEnvironmentContext).iconResolver;\n}\nexport function useMonkeysAssetImageResolver(): AssetImageResolver | undefined {\n  return useContext(MonkeysEnvironmentContext).imageResolver;\n}\n","import { useEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport {\n  useMonkeysEnvironment,\n  useMonkeysPortalOptions,\n} from '../../provider/context';\nimport type { BasePortalContainer, BasePortalProps } from './types';\n\nfunction resolveContainerValue(\n  value: BasePortalContainer,\n  source: string,\n): Element | null {\n  const candidate = typeof value === 'function' ? value() : value;\n  if (candidate === null) return null;\n  if (\n    !candidate ||\n    typeof candidate !== 'object' ||\n    candidate.nodeType !== 1\n  ) {\n    throw new TypeError(`${source} must resolve to an Element or null.`);\n  }\n  return candidate;\n}\n\ninterface ResolveBasePortalContainerOptions {\n  explicitProvided: boolean;\n  explicitContainer?: BasePortalContainer;\n  providerProvided: boolean;\n  providerContainer?: BasePortalContainer;\n  getDocument?: () => Document | null;\n}\n\nexport function resolveBasePortalContainer({\n  explicitProvided,\n  explicitContainer,\n  providerProvided,\n  providerContainer,\n  getDocument,\n}: ResolveBasePortalContainerOptions): Element | null {\n  if (explicitProvided) {\n    return resolveContainerValue(\n      explicitContainer as BasePortalContainer,\n      'BasePortal container',\n    );\n  }\n  if (providerProvided) {\n    return resolveContainerValue(\n      providerContainer as BasePortalContainer,\n      'MonkeysProvider portal.container',\n    );\n  }\n  if (!getDocument) return null;\n\n  const ownerDocument = getDocument();\n  if (ownerDocument === null) return null;\n  if (\n    !ownerDocument ||\n    typeof ownerDocument !== 'object' ||\n    !('body' in ownerDocument)\n  ) {\n    throw new TypeError(\n      'MonkeysProvider environment.getDocument must resolve to a Document or null.',\n    );\n  }\n  return resolveContainerValue(\n    ownerDocument.body,\n    'MonkeysProvider environment.getDocument().body',\n  );\n}\n\nexport function BasePortal(props: BasePortalProps) {\n  const environment = useMonkeysEnvironment();\n  const portalOptions = useMonkeysPortalOptions();\n  const [mounted, setMounted] = useState(false);\n\n  useEffect(() => {\n    setMounted(true);\n  }, []);\n\n  if (props.disabled !== undefined && typeof props.disabled !== 'boolean') {\n    throw new TypeError('BasePortal disabled must be a boolean.');\n  }\n  if (props.inline !== undefined && typeof props.inline !== 'boolean') {\n    throw new TypeError('BasePortal inline must be a boolean.');\n  }\n\n  const disabled = props.disabled ?? portalOptions.disabled ?? false;\n  if (!mounted || disabled || props.inline) {\n    return <>{props.children}</>;\n  }\n\n  const container = resolveBasePortalContainer({\n    explicitProvided: props.container !== undefined,\n    explicitContainer: props.container,\n    providerProvided: portalOptions.container !== undefined,\n    providerContainer: portalOptions.container,\n    getDocument: environment.getDocument,\n  });\n\n  return container\n    ? createPortal(props.children, container)\n    : <>{props.children}</>;\n}\n","import { useEffect, useState, type ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport {\n  useMonkeysEnvironment,\n  useMonkeysPortalOptions,\n  type MonkeysPortalContainer,\n} from '../../../provider/context';\nimport { resolveBasePortalContainer } from '../BasePortal';\n\ninterface ResolveBaseOverlayPortalStateOptions {\n  mounted: boolean;\n  explicitDisabled?: boolean;\n  explicitContainer?: MonkeysPortalContainer;\n  providerDisabled?: boolean;\n  providerContainer?: MonkeysPortalContainer;\n  getDocument?: () => Document | null;\n}\n\ninterface BaseOverlayPortalInlineState {\n  mounted: boolean;\n  disabled: boolean;\n  shouldPortal: false;\n  container: null;\n  radixPortalProps: undefined;\n}\n\ninterface BaseOverlayPortalReadyState {\n  mounted: true;\n  disabled: false;\n  shouldPortal: true;\n  container: Element;\n  radixPortalProps: Readonly<{ container: Element }>;\n}\n\nexport type BaseOverlayPortalState =\n  | BaseOverlayPortalInlineState\n  | BaseOverlayPortalReadyState;\n\nexport function resolveBaseOverlayPortalState({\n  mounted,\n  explicitDisabled,\n  explicitContainer,\n  providerDisabled,\n  providerContainer,\n  getDocument,\n}: ResolveBaseOverlayPortalStateOptions): BaseOverlayPortalState {\n  const disabled = explicitDisabled ?? providerDisabled ?? false;\n  if (!mounted || disabled) {\n    return {\n      mounted,\n      disabled,\n      shouldPortal: false,\n      container: null,\n      radixPortalProps: undefined,\n    };\n  }\n\n  const container = resolveBasePortalContainer({\n    explicitProvided: explicitContainer !== undefined,\n    explicitContainer,\n    providerProvided: providerContainer !== undefined,\n    providerContainer,\n    getDocument,\n  });\n\n  if (!container) {\n    return {\n      mounted: true,\n      disabled: false,\n      shouldPortal: false,\n      container: null,\n      radixPortalProps: undefined,\n    };\n  }\n\n  return {\n    mounted: true,\n    disabled: false,\n    shouldPortal: true,\n    container,\n    radixPortalProps: Object.freeze({ container }),\n  };\n}\n\nexport interface UseBaseOverlayPortalOptions {\n  container?: MonkeysPortalContainer;\n  disabled?: boolean;\n}\n\nfunction getDefaultDocument(): Document | null {\n  return globalThis.document ?? null;\n}\n\nexport function useBaseOverlayPortal(\n  options: UseBaseOverlayPortalOptions = {},\n): BaseOverlayPortalState {\n  const environment = useMonkeysEnvironment();\n  const portalOptions = useMonkeysPortalOptions();\n  const [mounted, setMounted] = useState(false);\n\n  useEffect(() => {\n    setMounted(true);\n  }, []);\n\n  return resolveBaseOverlayPortalState({\n    mounted,\n    explicitDisabled: options.disabled,\n    explicitContainer: options.container,\n    providerDisabled: portalOptions.disabled,\n    providerContainer: portalOptions.container,\n    getDocument: environment.getDocument ?? getDefaultDocument,\n  });\n}\n\nexport interface BaseOverlayPortalProps extends UseBaseOverlayPortalOptions {\n  children?: ReactNode;\n}\n\nexport function renderBaseOverlayPortalContent(\n  children: ReactNode,\n  portal: BaseOverlayPortalState,\n) {\n  return portal.shouldPortal\n    ? createPortal(children, portal.container)\n    : <>{children}</>;\n}\n\nexport function BaseOverlayPortal({\n  children,\n  container,\n  disabled,\n}: BaseOverlayPortalProps) {\n  const portal = useBaseOverlayPortal({ container, disabled });\n  return renderBaseOverlayPortalContent(children, portal);\n}\n","import type { ReactNode } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...parts: Array<string | false | null | undefined>) {\n  return twMerge(parts.filter(Boolean).join(' '));\n}\n\nexport function hasRenderableNode(node: ReactNode) {\n  return node !== undefined && node !== null && typeof node !== 'boolean';\n}\n\nexport function hasNonEmptyRenderableNode(node: ReactNode) {\n  if (typeof node === 'string') return node.trim().length > 0;\n  return hasRenderableNode(node);\n}\n","import type {\n  BaseAppearance,\n  BaseBackground,\n  BaseBorder,\n  BaseControlTone,\n  BaseDensity,\n  BaseHeadingSize,\n  BaseLayoutAlign,\n  BaseLayoutJustify,\n  BaseLayoutLength,\n  BaseListMarker,\n  BaseListSpacing,\n  BaseRadius,\n  BaseResolvedTheme,\n  BaseThemePresetId,\n  BaseThemeSlots,\n  BaseThemeStyles,\n  BaseTypographySize,\n  BaseTypographyTone,\n} from './types';\nimport { cn } from './utils';\n\ntype ResolvedSlots = Required<BaseThemeSlots>;\n\nconst emptyStyles: BaseThemeStyles = {};\n\nconst motionBase =\n  'motion-safe:transition motion-safe:duration-300 motion-safe:ease-out';\n\nconst motionInteractive =\n  'motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out';\n\nconst motionTransform =\n  'motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out';\nconst tableScrollbarChrome = cn(\n  '[scrollbar-width:thin]',\n  '[scrollbar-color:hsl(var(--muted-foreground)/0.45)_transparent]',\n  '[&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2',\n  '[&::-webkit-scrollbar-button]:hidden [&::-webkit-scrollbar-button]:h-0 [&::-webkit-scrollbar-button]:w-0 [&::-webkit-scrollbar-button]:bg-transparent',\n  '[&::-webkit-scrollbar-button:single-button]:hidden [&::-webkit-scrollbar-button:single-button]:h-0 [&::-webkit-scrollbar-button:single-button]:w-0',\n  '[&::-webkit-scrollbar-button:double-button]:hidden [&::-webkit-scrollbar-button:double-button]:h-0 [&::-webkit-scrollbar-button:double-button]:w-0',\n  '[&::-webkit-scrollbar-corner]:bg-transparent',\n  '[&::-webkit-scrollbar-track]:bg-transparent',\n  '[&:has(thead.sticky)::-webkit-scrollbar-track]:mt-[var(--base-table-header-height)]',\n  '[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/40',\n  'hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/55',\n);\nconst tableStickyHeaderCells = cn(\n  '[&.sticky_th]:sticky [&.sticky_th]:top-0 [&.sticky_th]:z-[2]',\n  '[&.sticky_th]:bg-[var(--base-table-sticky-header-bg)]',\n  '[&.sticky_th]:shadow-[inset_0_-1px_0_var(--base-table-header-separator)]',\n);\n\nconst baseSlots: ResolvedSlots = {\n  buttonBase:\n    cn(\n      'group/button inline-flex min-w-0 items-center justify-center gap-2 rounded-md border px-3 text-sm font-medium focus-visible:outline-none',\n      'cursor-pointer disabled:!cursor-not-allowed',\n      motionInteractive,\n    ),\n  buttonDefault:\n    'border-border bg-background text-foreground hover:bg-accent/60',\n  buttonPrimary:\n    'border-primary/20 bg-primary/10 text-primary hover:bg-primary/15',\n  buttonSuccess:\n    'border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-[hsl(var(--success,142_72%_29%))] hover:bg-[hsl(var(--success,142_72%_29%)_/_0.15)]',\n  buttonWarning:\n    'border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))] hover:bg-[hsl(var(--warning,45_93%_47%)_/_0.15)]',\n  buttonDanger:\n    'border-destructive/20 bg-destructive/10 text-destructive-text hover:bg-destructive/15',\n  buttonMuted:\n    'border-border/60 bg-muted/45 text-muted-foreground hover:bg-muted/70 hover:text-foreground',\n  buttonActive: 'border-primary/35 bg-primary/10 text-primary',\n  buttonDisabled: '!cursor-not-allowed opacity-60',\n  buttonIconOnly: 'w-9 px-0',\n  buttonIcon:\n    'inline-flex h-4 w-4 shrink-0 items-center justify-center text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current [&_svg_*]:!stroke-current',\n  buttonLabel: 'min-w-0 truncate',\n  badgeBase:\n    cn(\n      'inline-flex max-w-full items-center gap-1.5 rounded-full border px-2 py-0.5 text-xs font-medium',\n      motionBase,\n    ),\n  badgeDefault: 'border-border/60 bg-background text-foreground',\n  badgePrimary: 'border-primary/30 bg-primary/10 text-primary',\n  badgeSuccess: 'border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-[hsl(var(--success,142_72%_29%))]',\n  badgeWarning: 'border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))]',\n  badgeDanger: 'border-destructive/30 bg-destructive/10 text-destructive-text',\n  badgeMuted: 'border-border/60 bg-muted text-muted-foreground',\n  badgeIcon: 'inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center',\n  badgeLabel: 'min-w-0 truncate',\n  textRoot: 'min-w-0 break-words leading-6',\n  textSizeXs: 'text-xs',\n  textSizeSm: 'text-sm',\n  textSizeMd: 'text-base',\n  textSizeLg: 'text-lg',\n  textSizeXl: 'text-xl',\n  typographyToneDefault: 'text-foreground',\n  typographyToneMuted: 'text-muted-foreground',\n  typographyTonePrimary: 'text-primary',\n  typographyToneSuccess: 'text-emerald-700 dark:text-emerald-400',\n  typographyToneWarning: 'text-amber-700 dark:text-amber-400',\n  typographyToneDanger: 'text-destructive-text',\n  typographyToneInherit: 'text-inherit',\n  headingRoot: 'min-w-0 break-words font-semibold tracking-tight',\n  headingSizeXs: 'text-sm leading-5',\n  headingSizeSm: 'text-base leading-6',\n  headingSizeMd: 'text-lg leading-7',\n  headingSizeLg: 'text-xl leading-7',\n  headingSizeXl: 'text-2xl leading-8',\n  headingSize2xl: 'text-3xl leading-9',\n  linkRoot:\n    'inline break-words underline decoration-current/40 underline-offset-4 hover:decoration-current focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30',\n  codeInline:\n    'rounded border border-border/70 bg-muted/60 px-1.5 py-0.5 font-mono text-[0.875em] leading-[1.45] text-foreground',\n  codeBlock:\n    'm-0 max-w-full overflow-x-auto rounded-md border border-border/70 bg-muted/60 p-4 text-foreground',\n  codeContent: 'font-mono text-sm leading-6',\n  kbdRoot:\n    'inline-flex min-h-5 items-center rounded border border-border bg-muted/70 px-1.5 font-mono text-[0.75em] font-medium leading-5 text-foreground shadow-[inset_0_-1px_0_hsl(var(--monkeys-color-border))]',\n  listRoot: 'm-0 min-w-0 list-outside break-words ps-5 text-foreground',\n  listSpacingCompact: '[&>li+li]:mt-1',\n  listSpacingDefault: '[&>li+li]:mt-2',\n  listSpacingRelaxed: '[&>li+li]:mt-3',\n  listMarkerNone: 'list-none ps-0',\n  listMarkerDisc: 'list-disc',\n  listMarkerCircle: 'list-[circle]',\n  listMarkerSquare: 'list-[square]',\n  listMarkerDecimal: 'list-decimal',\n  listMarkerLowerAlpha: 'list-[lower-alpha]',\n  listMarkerUpperAlpha: 'list-[upper-alpha]',\n  listItem: 'min-w-0 ps-1 leading-6 marker:text-muted-foreground',\n  stackRoot: 'flex min-w-0 flex-col',\n  inlineRoot: 'flex min-w-0 flex-row',\n  gridRoot: 'grid min-w-0',\n  containerRoot: 'mx-auto w-full min-w-0',\n  aspectRatioRoot:\n    'relative min-w-0 overflow-hidden [&>*]:h-full [&>*]:w-full',\n  spinnerRoot:\n    'inline-flex shrink-0 items-center justify-center text-current align-middle',\n  spinnerIndicator:\n    'h-5 w-5 rounded-full border-2 border-current border-r-transparent motion-safe:animate-spin motion-reduce:animate-none',\n  visuallyHiddenRoot: 'sr-only',\n  visuallyHiddenFocusable:\n    'focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[1000] focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-foreground focus:shadow-lg focus:outline-none focus:ring-2 focus:ring-ring focus-within:not-sr-only focus-within:fixed focus-within:left-4 focus-within:top-4 focus-within:z-[1000] focus-within:rounded-md focus-within:bg-background focus-within:px-4 focus-within:py-2 focus-within:text-foreground focus-within:shadow-lg focus-within:ring-2 focus-within:ring-ring',\n  fieldsetRoot: 'min-w-0 border-0 p-0 text-foreground',\n  fieldsetLegend: 'min-w-0 text-sm font-semibold leading-6 text-foreground',\n  fieldsetDescription: 'mt-1 text-sm leading-5 text-muted-foreground',\n  fieldsetError: 'mt-1 text-sm leading-5 text-destructive-text',\n  fieldsetContent: 'mt-3 grid min-w-0 gap-3',\n  stepsRoot: 'm-0 min-w-0 list-none p-0 text-foreground',\n  stepsHorizontal:\n    'flex w-full max-w-full items-start overflow-x-auto pb-2',\n  stepsVertical: 'grid',\n  stepsItem: 'relative min-w-0',\n  stepsItemHorizontal: 'flex min-w-52 flex-1 items-start',\n  stepsItemVertical: 'pb-6 last:pb-0',\n  stepsTrigger:\n    'flex min-w-0 flex-1 items-start gap-3 rounded-md border-0 bg-transparent p-1 text-start text-inherit',\n  stepsTriggerInteractive:\n    'cursor-pointer hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out',\n  stepsTriggerDisabled: '!cursor-not-allowed opacity-60',\n  stepsIndicator:\n    'relative z-[1] inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border text-xs font-semibold',\n  stepsIndicatorPending: 'border-border bg-background text-muted-foreground',\n  stepsIndicatorCurrent: 'border-primary/50 bg-primary/10 text-primary',\n  stepsIndicatorCompleted:\n    'border-primary bg-primary text-primary-foreground',\n  stepsIndicatorError:\n    'border-destructive bg-destructive text-destructive-foreground',\n  stepsContent: 'grid min-w-0 gap-1 pt-0.5',\n  stepsLabel: 'min-w-0 break-words text-sm font-medium leading-5',\n  stepsDescription:\n    'min-w-0 break-words text-sm leading-5 text-muted-foreground',\n  stepsStatus: 'sr-only',\n  stepsConnector: 'shrink-0 bg-border',\n  stepsConnectorHorizontal: 'mt-3.5 h-px w-8',\n  stepsConnectorVertical:\n    'absolute bottom-0 top-8 start-3.5 w-px -translate-x-1/2',\n  stepsConnectorCompleted: 'bg-primary/60',\n  stepsConnectorError: 'bg-destructive/60',\n  scrollAreaViewport: 'min-h-0 min-w-0',\n  numberInputControl: 'tabular-nums',\n  numberInputStepControls:\n    'me-1 flex shrink-0 self-stretch overflow-hidden border-s border-border',\n  numberInputStepButton:\n    'flex min-h-6 w-7 cursor-pointer items-center justify-center border-0 bg-transparent px-1 text-xs leading-none text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:z-[1] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40',\n  passwordInputControl: 'pe-2',\n  passwordInputToggle:\n    'me-1 inline-flex min-h-7 shrink-0 cursor-pointer items-center justify-center rounded px-2 text-xs font-medium text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-40',\n  inputGroupRoot:\n    cn(\n      'relative flex min-w-0 items-stretch overflow-hidden rounded-md border border-border bg-background text-foreground focus-within:border-primary/50 focus-within:ring-2 focus-within:ring-ring/30',\n      motionBase,\n    ),\n  inputGroupInvalid:\n    'border-destructive/55 focus-within:border-destructive/70 focus-within:ring-destructive/25',\n  inputGroupDisabled: '!cursor-not-allowed bg-muted/35',\n  inputGroupContent:\n    'flex min-w-0 flex-1 items-stretch [&>*]:min-w-0',\n  inputGroupStartElement:\n    'inline-flex shrink-0 items-center justify-center ps-3 pe-1 text-foreground/75',\n  inputGroupEndElement:\n    'inline-flex shrink-0 items-center justify-center ps-1 pe-3 text-foreground/75',\n  inputGroupStartAddon:\n    'inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-e border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0',\n  inputGroupEndAddon:\n    'inline-flex max-w-[min(40%,16rem)] shrink-0 items-center overflow-hidden border-s border-border bg-muted/60 px-3 text-sm text-foreground/75 text-ellipsis whitespace-nowrap [&>*]:min-w-0',\n  panelRoot:\n    cn(\n      'group relative flex min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background',\n      motionInteractive,\n    ),\n  panelInteractive:\n    'cursor-pointer hover:shadow-md',\n  panelSelected: 'border-primary/45 bg-primary/5',\n  panelDisabled: '!cursor-not-allowed opacity-60',\n  panelMedia:\n    'shrink-0 overflow-hidden',\n  panelHeader: 'min-w-0 p-4',\n  panelTitle: 'min-w-0 truncate text-sm font-semibold leading-none text-foreground',\n  panelDescription: 'mt-1 text-sm leading-5 text-foreground/75',\n  panelBody: 'min-w-0 px-4 pb-4 text-sm text-foreground',\n  panelBodyStandalone: 'pt-4',\n  panelFooter: 'shrink-0 border-t border-border/60 px-4 py-3',\n  stateRoot:\n    cn(\n      'flex min-h-48 flex-col items-center justify-center rounded-lg border border-border/70 bg-background px-6 py-10 text-center',\n      motionBase,\n    ),\n  stateIcon:\n    'mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted text-muted-foreground motion-safe:animate-in motion-safe:fade-in',\n  stateTitle: 'text-sm font-semibold text-foreground',\n  stateDescription: 'mt-2 max-w-md text-sm leading-6 text-muted-foreground',\n  stateActions: 'mt-5 flex flex-wrap items-center justify-center gap-2',\n  loadingSpinner:\n    'h-5 w-5 motion-safe:animate-spin motion-reduce:animate-none',\n  fieldRoot: 'grid min-w-0 gap-2',\n  fieldLabelRow: 'flex min-w-0 items-center justify-between gap-3',\n  fieldLabel: 'min-w-0 text-sm font-medium leading-none text-foreground',\n  fieldRequired: 'text-destructive-text',\n  fieldDescription: 'text-sm leading-5 text-muted-foreground',\n  fieldMessage: 'text-sm leading-5 text-muted-foreground',\n  fieldControl: 'min-w-0',\n  controlWrapper:\n    cn(\n      'relative flex min-w-0 items-center rounded-md border border-border bg-background text-foreground focus-within:border-primary/35',\n      motionBase,\n    ),\n  controlBase:\n    'min-w-0 flex-1 bg-transparent px-3 text-sm text-foreground outline-none placeholder:text-muted-foreground disabled:!cursor-not-allowed',\n  controlInput: 'h-9',\n  controlTextarea: 'min-h-24 resize-y py-2 leading-6',\n  controlSelect: 'h-9 cursor-pointer appearance-none pr-9 disabled:!cursor-not-allowed',\n  controlIcon:\n    'pointer-events-none ml-3 inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground',\n  controlTrailing:\n    'mr-3 inline-flex shrink-0 items-center justify-center text-muted-foreground',\n  controlInvalid:\n    'border-destructive/45 focus-within:border-destructive/60',\n  controlDisabled: '!cursor-not-allowed opacity-60',\n  controlReadOnly: 'bg-muted/35',\n  selectChevron:\n    cn(\n      'pointer-events-none absolute right-3 top-1/2 h-2 w-2 -translate-y-1/2 rotate-45 border-b border-r border-current text-muted-foreground',\n      motionTransform,\n    ),\n  selectMenu:\n    'absolute left-0 right-0 top-[calc(100%+0.375rem)] z-50 max-h-60 origin-top overflow-auto rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-none motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out',\n  selectOption:\n    cn(\n      'flex min-h-8 w-full min-w-0 cursor-pointer items-center rounded-sm px-2.5 py-1.5 text-left text-sm text-foreground',\n      motionInteractive,\n    ),\n  selectOptionActive: 'bg-accent text-accent-foreground',\n  selectOptionSelected: 'bg-primary/10 text-primary',\n  selectOptionDisabled: '!cursor-not-allowed opacity-50',\n  selectPlaceholder: 'text-muted-foreground',\n  selectNative: 'sr-only',\n  switchRoot: 'inline-flex min-w-0 cursor-pointer items-start gap-3',\n  switchInput: 'sr-only',\n  switchTrack:\n    cn(\n      'relative mt-0.5 inline-flex h-6 w-10 shrink-0 items-center rounded-full border border-border bg-muted focus-within:border-primary/35',\n      motionBase,\n    ),\n  switchThumb:\n    cn(\n      'h-4 w-4 translate-x-1 rounded-full bg-background shadow-sm',\n      motionTransform,\n    ),\n  switchChecked: 'border-primary/40 bg-primary/80 text-primary-foreground',\n  switchDisabled: '!cursor-not-allowed opacity-60',\n  switchContent: 'grid min-w-0 gap-1',\n  switchLabel: 'text-sm font-medium leading-none text-foreground',\n  switchDescription: 'text-sm leading-5 text-muted-foreground',\n  checkboxRoot: 'inline-flex min-w-0 cursor-pointer items-start gap-3',\n  checkboxInput: 'sr-only',\n  checkboxBox:\n    cn(\n      'mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border border-border bg-background text-primary focus-within:border-primary/40',\n      motionBase,\n    ),\n  checkboxBoxChecked: 'border-primary/45 bg-primary text-primary-foreground',\n  checkboxBoxInvalid: 'border-destructive/50',\n  checkboxIndicator: 'text-[11px] font-bold leading-none',\n  checkboxDisabled: '!cursor-not-allowed opacity-60',\n  checkboxContent: 'grid min-w-0 gap-1',\n  checkboxLabel: 'text-sm font-medium leading-none text-foreground',\n  checkboxDescription: 'text-sm leading-5 text-muted-foreground',\n  radioGroupRoot: 'grid min-w-0 gap-2',\n  radioOption:\n    cn(\n      'inline-flex min-w-0 cursor-pointer items-start gap-3 rounded-md border border-border/60 bg-background px-3 py-2 text-sm',\n      motionInteractive,\n      'hover:bg-muted/35',\n    ),\n  radioInput: 'sr-only',\n  radioMarker:\n    cn(\n      'mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border bg-background text-primary focus-within:border-primary/40',\n      motionBase,\n    ),\n  radioMarkerChecked: 'border-primary/50 bg-primary/10',\n  radioIndicator: 'h-2 w-2 rounded-full bg-primary',\n  radioOptionDisabled: '!cursor-not-allowed opacity-60 hover:bg-background',\n  radioContent: 'grid min-w-0 gap-1',\n  radioLabel: 'text-sm font-medium leading-none text-foreground',\n  radioDescription: 'text-sm leading-5 text-muted-foreground',\n  dialogRoot: 'relative',\n  dialogTrigger: '',\n  dialogTriggerDisabled: '!cursor-not-allowed opacity-60',\n  dialogOverlay:\n    'fixed inset-0 z-50 bg-background/70 backdrop-blur-sm motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out',\n  dialogContent:\n    'pointer-events-none fixed inset-0 z-50 flex min-h-0 items-center justify-center p-4',\n  dialogPanel:\n    cn(\n      'pointer-events-auto relative flex max-h-[min(85vh,720px)] w-full max-w-lg min-w-0 flex-col overflow-hidden rounded-lg border border-border/70 bg-background text-foreground shadow-xl',\n      'motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out',\n    ),\n  dialogHeader: 'grid min-w-0 gap-1 border-b border-border/60 px-5 py-4',\n  dialogTitle: 'min-w-0 pr-8 text-base font-semibold leading-6 text-foreground',\n  dialogDescription: 'text-sm leading-6 text-muted-foreground',\n  dialogBody: 'min-h-0 min-w-0 overflow-auto px-5 py-4 text-sm text-foreground',\n  dialogFooter:\n    'flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border/60 px-5 py-4',\n  dialogClose:\n    cn(\n      'absolute right-3 top-3 inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-muted/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30',\n      motionInteractive,\n    ),\n  dropdownRoot: 'relative inline-flex min-w-0',\n  dropdownTrigger: '',\n  dropdownTriggerDisabled: '!cursor-not-allowed opacity-60',\n  dropdownMenu:\n    'z-50 min-w-48 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out',\n  dropdownMenuTop: 'bottom-[calc(100%+0.375rem)] top-auto',\n  dropdownMenuEnd: 'left-auto right-0',\n  dropdownLabel:\n    'px-2.5 py-1.5 text-xs font-semibold uppercase tracking-[0.12em] text-muted-foreground',\n  dropdownSeparator: 'my-1 h-px bg-border/70',\n  dropdownItem:\n    cn(\n      'flex min-w-0 cursor-pointer items-center gap-2 rounded-sm px-2.5 py-2 text-left text-sm text-foreground hover:bg-accent/60 focus:bg-accent/60 data-[highlighted]:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30',\n      motionInteractive,\n    ),\n  dropdownItemDanger:\n    'text-destructive-text hover:bg-destructive/10 focus:bg-destructive/10 data-[highlighted]:bg-destructive/10',\n  dropdownItemDisabled:\n    '!cursor-not-allowed opacity-50 hover:bg-transparent focus:bg-transparent data-[highlighted]:bg-transparent',\n  dropdownItemIcon: 'inline-flex h-4 w-4 shrink-0 items-center justify-center',\n  dropdownItemContent: 'grid min-w-0 flex-1 gap-0.5',\n  dropdownItemLabel: 'min-w-0 truncate',\n  dropdownItemDescription:\n    'min-w-0 truncate text-xs leading-4 text-muted-foreground',\n  dropdownItemShortcut:\n    'ml-3 shrink-0 text-xs font-medium text-muted-foreground',\n  tooltipRoot: 'relative inline-flex min-w-0',\n  tooltipTrigger: 'inline-flex min-w-0',\n  tooltipContent:\n    'pointer-events-none z-50 max-w-xs rounded-md border border-border bg-popover px-2.5 py-1.5 text-xs leading-5 text-popover-foreground shadow-lg motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out',\n  noticeBase:\n    cn(\n      'flex min-w-0 gap-3 rounded-lg border px-4 py-3 text-sm',\n      motionBase,\n      'motion-safe:animate-in motion-safe:fade-in',\n    ),\n  noticeDefault: 'border-border bg-background text-foreground',\n  noticePrimary: 'border-primary/25 bg-primary/10 text-primary',\n  noticeSuccess:\n    'border-[hsl(var(--success,142_72%_29%)_/_0.30)] bg-[hsl(var(--success,142_72%_29%)_/_0.10)] text-foreground',\n  noticeWarning: 'border-[hsl(var(--warning,45_93%_47%)_/_0.30)] bg-[hsl(var(--warning,45_93%_47%)_/_0.10)] text-[hsl(var(--warning-foreground,28_73%_26%))]',\n  noticeDanger:\n    'border-destructive/30 bg-destructive/10 text-destructive-text',\n  noticeMuted: 'border-border/60 bg-muted/35 text-muted-foreground',\n  noticeIcon:\n    'mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center motion-safe:animate-in motion-safe:fade-in',\n  noticeTitle: 'font-semibold leading-5',\n  noticeDescription: 'leading-6',\n  noticeActions: 'mt-3 flex flex-wrap items-center gap-2',\n  dividerRoot: cn('shrink-0 border-border/70', motionBase),\n  dividerLabel:\n    'mx-3 shrink-0 text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground motion-safe:animate-in motion-safe:fade-in',\n  sectionHeaderRoot:\n    'flex min-w-0 flex-wrap items-start justify-between gap-3 motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out',\n  sectionHeaderContent: 'grid min-w-0 gap-1',\n  sectionHeaderEyebrow:\n    'text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground',\n  sectionHeaderTitle: 'text-base font-semibold leading-6 text-foreground',\n  sectionHeaderDescription: 'max-w-2xl text-sm leading-6 text-muted-foreground',\n  sectionHeaderActions: 'flex shrink-0 flex-wrap items-center gap-2',\n  tabsRoot: 'grid min-w-0 gap-3',\n  tabsList:\n    cn(\n      'inline-flex min-w-0 flex-wrap items-center gap-1 rounded-lg border border-border/70 bg-muted/30 p-1',\n      motionBase,\n    ),\n  tabsTrigger:\n    cn(\n      'inline-flex min-w-0 cursor-pointer items-center justify-center rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:ring-offset-1 motion-reduce:transition-none',\n      motionInteractive,\n    ),\n  tabsTriggerActive:\n    'bg-background text-foreground shadow-sm',\n  tabsTriggerDisabled: '!cursor-not-allowed opacity-50 hover:bg-transparent',\n  tabsPanel:\n    'min-w-0 rounded-lg border border-border/70 bg-background p-4 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none',\n  segmentedRoot:\n    cn(\n      'inline-flex min-w-0 items-center gap-1 rounded-lg border border-border/70 bg-muted/30 p-1',\n      motionBase,\n    ),\n  segmentedItem:\n    cn(\n      'inline-flex min-w-0 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground hover:bg-background/70 hover:text-foreground focus-visible:outline-none',\n      motionInteractive,\n    ),\n  segmentedItemActive:\n    'bg-background text-foreground shadow-sm',\n  segmentedItemDisabled: '!cursor-not-allowed opacity-50 hover:bg-transparent',\n  progressRoot: 'grid min-w-0 gap-2',\n  progressTrack:\n    'h-2 w-full overflow-hidden rounded-full bg-muted',\n  progressIndicator:\n    'h-full rounded-full bg-primary motion-safe:transition-[width] motion-safe:duration-500 motion-safe:ease-out',\n  progressLabelRow: 'flex min-w-0 items-center justify-between gap-3',\n  progressLabel: 'min-w-0 truncate text-sm font-medium text-foreground',\n  progressValue: 'shrink-0 text-xs font-medium text-muted-foreground',\n  skeletonRoot:\n    'relative overflow-hidden rounded-md bg-muted/70',\n  avatarRoot:\n    'relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border bg-muted text-sm font-semibold text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out',\n  avatarImage:\n    'h-full w-full object-cover',\n  avatarFallback:\n    'flex h-full w-full items-center justify-center bg-muted text-foreground',\n  avatarStatus:\n    'absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-muted-foreground motion-safe:animate-pulse',\n  avatarText: 'min-w-0 truncate text-sm font-medium text-foreground',\n  toolbarRoot:\n    cn(\n      'flex min-w-0 flex-wrap items-center justify-between gap-3 rounded-lg border border-border/70 bg-background px-4 py-3',\n      motionBase,\n    ),\n  toolbarLeading: 'flex min-w-0 items-center gap-3',\n  toolbarTitle: 'min-w-0 truncate text-sm font-semibold text-foreground',\n  toolbarDescription: 'mt-0.5 text-sm leading-5 text-muted-foreground',\n  toolbarContent: 'min-w-0 flex-1',\n  toolbarActions: 'flex shrink-0 flex-wrap items-center gap-2',\n  breadcrumbRoot: 'min-w-0 text-sm text-muted-foreground',\n  breadcrumbList: 'flex min-w-0 flex-wrap items-center gap-1.5',\n  breadcrumbItem: 'inline-flex min-w-0 items-center gap-1.5',\n  breadcrumbLink:\n    'min-w-0 cursor-pointer truncate text-muted-foreground hover:text-foreground disabled:!cursor-not-allowed disabled:opacity-50 aria-disabled:!cursor-not-allowed aria-disabled:opacity-50 aria-disabled:hover:text-muted-foreground motion-safe:transition motion-safe:duration-300 motion-safe:ease-out',\n  breadcrumbCurrent: 'min-w-0 truncate font-medium text-foreground',\n  breadcrumbSeparator: 'shrink-0 text-muted-foreground/70',\n  paginationRoot:\n    'flex min-w-0 flex-wrap items-center justify-between gap-3 text-sm',\n  paginationInfo: 'min-w-0 text-muted-foreground',\n  paginationControls: 'flex min-w-0 flex-wrap items-center justify-end gap-1.5',\n  paginationButton:\n    'inline-flex h-8 min-w-8 cursor-pointer items-center justify-center whitespace-nowrap rounded-md border border-border bg-background px-2.5 text-sm font-medium text-foreground hover:bg-accent/60 disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out',\n  paginationButtonDisabled: '!cursor-not-allowed opacity-50',\n  paginationPage:\n    'inline-flex h-8 min-w-8 cursor-default items-center justify-center rounded-md bg-muted/50 px-2.5 text-sm font-medium text-foreground hover:bg-muted/50',\n  paginationEllipsis:\n    'inline-flex h-8 min-w-6 items-center justify-center px-1 text-sm text-muted-foreground',\n  descriptionListRoot:\n    'grid min-w-0 gap-3 text-sm',\n  descriptionListItem:\n    'grid min-w-0 gap-1 rounded-md border border-border/60 bg-background px-3 py-2 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out hover:shadow-sm',\n  descriptionListTerm:\n    'min-w-0 truncate text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground',\n  descriptionListValue: 'min-w-0 text-sm leading-6 text-foreground',\n  accordionRoot: 'grid min-w-0 gap-2',\n  accordionItem:\n    'overflow-hidden rounded-lg border border-border/70 bg-background motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none',\n  accordionTrigger:\n    'flex w-full min-w-0 cursor-pointer items-center justify-between gap-3 px-4 py-3 text-start text-sm font-medium text-foreground hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:!cursor-not-allowed disabled:opacity-50 motion-safe:transition motion-safe:duration-300 motion-safe:ease-out motion-reduce:transition-none',\n  accordionTriggerIcon:\n    cn(\n      'h-2 w-2 shrink-0 rotate-45 border-b border-r border-current text-muted-foreground',\n      motionTransform,\n      'motion-reduce:transition-none',\n    ),\n  accordionPanel:\n    'border-t border-border/60 px-4 py-3 text-sm leading-6 text-muted-foreground motion-safe:animate-in motion-safe:fade-in motion-safe:duration-300 motion-safe:ease-out motion-reduce:animate-none',\n  menuTrigger: 'inline-flex min-w-0',\n  menuContent:\n    'z-50 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-none motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out',\n  menuLabel: 'px-2 py-1.5 text-xs font-medium text-muted-foreground',\n  menuSeparator: '-mx-1 my-1 h-px bg-border',\n  menuItem:\n    cn(\n      'relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground',\n      motionInteractive,\n    ),\n  menuItemDefault: 'text-foreground',\n  menuItemPrimary: 'text-primary focus:text-primary data-[highlighted]:text-primary',\n  menuItemSuccess:\n    'text-[hsl(var(--success,142_72%_29%))] focus:text-[hsl(var(--success,142_72%_29%))] data-[highlighted]:text-[hsl(var(--success,142_72%_29%))]',\n  menuItemWarning:\n    'text-[hsl(var(--warning-foreground,28_73%_26%))] focus:text-[hsl(var(--warning-foreground,28_73%_26%))] data-[highlighted]:text-[hsl(var(--warning-foreground,28_73%_26%))]',\n  menuItemDanger:\n    'text-destructive-text focus:text-destructive-text data-[highlighted]:text-destructive-text',\n  menuItemMuted:\n    'text-muted-foreground focus:text-foreground data-[highlighted]:text-foreground',\n  menuItemDisabled:\n    '!cursor-not-allowed opacity-50 data-[disabled]:pointer-events-none',\n  menuItemIcon: 'inline-flex h-4 w-4 shrink-0 items-center justify-center',\n  menuItemLabel: 'min-w-0 flex-1 truncate',\n  menuItemShortcut:\n    'ml-4 shrink-0 text-xs font-medium text-muted-foreground',\n  menuCheckboxIndicator:\n    'absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current',\n  menuRadioIndicator:\n    'absolute left-2 inline-flex h-4 w-4 items-center justify-center text-current',\n  menuSubTrigger:\n    cn(\n      'relative flex min-h-8 min-w-0 cursor-pointer select-none items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm text-foreground outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:!cursor-not-allowed data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n      motionInteractive,\n    ),\n  menuSubTriggerIcon:\n    'ml-auto inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground',\n  menuSubContent:\n    'z-50 min-w-40 overflow-hidden rounded-md border border-border bg-background p-1 text-sm text-foreground shadow-lg outline-none motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-95 motion-safe:duration-300 motion-safe:ease-out',\n  tableContainer:\n    cn(\n      'relative isolate min-w-0 overflow-auto rounded-lg border border-border/70 bg-background/95 bg-clip-padding [scrollbar-gutter:stable]',\n      '[--base-table-header-height:2.75rem] [--base-table-split-scrollbar-gutter:0.75rem]',\n      '[--base-table-sticky-header-bg:hsl(var(--background))] [--base-table-header-separator:hsl(var(--border)_/_0.7)]',\n      tableScrollbarChrome,\n      motionBase,\n    ),\n  tableContainerFooterAttached: '!rounded-b-none !shadow-none',\n  tableRoot: 'w-full caption-bottom border-separate border-spacing-0 text-sm text-foreground',\n  tableCaption: 'mt-3 text-sm text-muted-foreground',\n  tableHeader:\n    cn(\n      'relative z-[2] bg-transparent [&_tr]:bg-transparent',\n      tableStickyHeaderCells,\n    ),\n  tableBody: '[&_tr:last-child>*]:border-b-0',\n  tableFooter: 'bg-muted/30 font-medium [&_tr>*]:border-t [&_tr>*]:border-border/70',\n  tableFooterBar:\n    cn(\n      'flex min-w-0 flex-wrap items-center justify-between gap-3 rounded-lg border border-border/70 bg-muted/20 px-4 py-3 text-sm text-foreground shadow-none',\n      motionBase,\n    ),\n  tableFooterBarAttached:\n    '-mt-px rounded-t-none border-t border-border/70 shadow-none',\n  tableFooterBarLeading: 'flex min-w-0 items-center gap-2',\n  tableFooterBarContent: 'min-w-0 flex-1',\n  tableFooterBarActions: 'ms-auto flex shrink-0 flex-wrap items-center gap-2',\n  tableSplitRoot:\n    'grid w-full min-w-0 grid-cols-[minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)_auto] caption-bottom border-separate border-spacing-0 text-sm text-foreground',\n  tableSplitHeader:\n    'block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden bg-transparent',\n  tableSplitBody:\n    cn(\n      'block min-h-0 w-full min-w-0 max-w-full justify-self-stretch overflow-auto [scrollbar-gutter:stable]',\n      tableScrollbarChrome,\n    ),\n  tableSplitFooter:\n    'block w-full min-w-0 shrink-0 overflow-x-hidden overflow-y-hidden',\n  tableSplitRow:\n    'grid w-max min-w-full [grid-template-columns:var(--base-table-column-template)]',\n  tableSplitHead: 'flex min-w-0 overflow-hidden',\n  tableSplitCell: 'block min-w-0 overflow-hidden [overflow-wrap:anywhere]',\n  tableRow:\n    cn(\n      '[&>*]:border-b [&>*]:border-border/60 data-[state=selected]:bg-primary/5 data-[state=selected]:[&>*]:bg-primary/5',\n      motionBase,\n    ),\n  tableRowInteractive:\n    'cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)] hover:bg-[var(--base-table-row-hover-bg)] hover:[&>*]:bg-[var(--base-table-row-hover-bg)]',\n  tableRowSelected: 'bg-primary/5 [&>*]:bg-primary/5',\n  tableRowDisabled: '!cursor-not-allowed opacity-60',\n  tableHead:\n    'relative h-11 whitespace-nowrap px-3 py-2 text-left align-middle text-xs font-semibold text-muted-foreground shadow-[inset_0_-1px_0_var(--base-table-header-separator)]',\n  tableHeadContent: 'flex min-w-0 items-center justify-between gap-2',\n  tableHeadMain: 'flex min-w-0 items-center gap-2',\n  tableHeadIcon: 'inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground',\n  tableHeadText: 'grid min-w-0 gap-0.5',\n  tableHeadLabel: 'min-w-0 truncate text-xs font-semibold leading-4 text-foreground',\n  tableHeadDescription: 'min-w-0 truncate text-[11px] font-normal leading-4 text-muted-foreground',\n  tableHeadMeta: 'shrink-0 text-[11px] font-medium text-muted-foreground',\n  tableHeadActions: 'flex shrink-0 items-center gap-1',\n  tableHeadSortButton:\n    cn(\n      'inline-flex min-w-0 cursor-pointer items-center gap-1 rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-60',\n      motionBase,\n    ),\n  tableHeadSortIcon:\n    cn(\n      'inline-flex h-3 w-3 shrink-0 items-center justify-center text-muted-foreground',\n      motionTransform,\n    ),\n  tableHeadDragHandle:\n    cn(\n      'inline-flex h-5 w-4 shrink-0 cursor-grab items-center justify-center rounded-sm text-muted-foreground hover:bg-muted active:cursor-grabbing focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50',\n      motionBase,\n    ),\n  tableHeadResizeHandle:\n    cn(\n      'absolute end-0 top-1/2 h-7 w-2 -translate-y-1/2 cursor-col-resize touch-none rounded-sm after:absolute after:start-1/2 after:top-1/2 after:h-5 after:w-px after:-translate-x-1/2 after:-translate-y-1/2 after:bg-border hover:after:bg-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 disabled:!cursor-not-allowed disabled:opacity-50',\n      motionBase,\n    ),\n  tableCell: 'min-w-0 px-3 py-2 align-middle text-sm text-foreground [overflow-wrap:anywhere]',\n  tableCellAlignCenter: 'text-center',\n  tableCellAlignRight: 'text-right',\n  tableEmptyRow: '[&>*]:border-b [&>*]:border-border/60',\n  tableEmptyCell: 'px-4 py-10 text-center',\n  tableEmptyContent: 'mx-auto flex max-w-md flex-col items-center justify-center text-center',\n  tableEmptyIcon:\n    'mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-muted text-muted-foreground',\n  tableEmptyTitle: 'text-sm font-semibold text-foreground',\n  tableEmptyDescription: 'mt-1 text-sm leading-6 text-muted-foreground',\n  tableEmptyActions: 'mt-4 flex flex-wrap items-center justify-center gap-2',\n  tableLoadingRow: '[&>*]:border-b [&>*]:border-border/60',\n  tableLoadingCell: 'px-3 py-2',\n  tableLoadingSkeleton: 'h-4 w-full rounded-md bg-muted/70',\n  layoutRoot:\n    cn(\n      'grid min-w-0 overflow-hidden grid-rows-[auto_minmax(0,1fr)_auto] gap-3 rounded-lg border border-border/70 bg-background p-3 text-foreground',\n      motionBase,\n    ),\n  layoutRootFull: 'h-full min-h-0',\n  layoutHeader: 'min-w-0',\n  layoutBody: 'grid min-h-0 min-w-0 overflow-hidden gap-3',\n  layoutSidebar: 'min-h-0 min-w-0 overflow-hidden',\n  layoutMain: 'min-h-0 min-w-0 overflow-hidden',\n  layoutAside: 'min-h-0 min-w-0 overflow-hidden',\n  layoutFooter: 'min-w-0',\n  layoutPane:\n    cn(\n      'h-full max-h-full min-h-0 min-w-0 overflow-hidden rounded-lg bg-background text-foreground',\n      motionBase,\n    ),\n  layoutPaneScrollable: 'overflow-auto',\n  layoutPaneBordered: 'border border-border/70',\n  layoutPaneMuted: 'bg-muted/25',\n  layoutPaneSoft: 'bg-background/95 shadow-sm',\n  layoutPaneTransparent: 'bg-transparent shadow-none',\n  layoutSplitRoot: 'grid min-h-0 min-w-0 overflow-hidden',\n  layoutSplitHorizontal: 'grid-flow-col',\n  layoutSplitVertical: 'grid-flow-row',\n  layoutSplitPane: 'min-h-0 min-w-0 overflow-hidden',\n  layoutSplitPrimary: '',\n  layoutSplitSecondary: '',\n  layoutResizeHandle:\n    cn(\n      'group/resize relative z-10 flex shrink-0 items-center justify-center bg-transparent text-muted-foreground hover:bg-border/60 active:bg-border/70 focus-visible:bg-border/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30',\n      motionInteractive,\n    ),\n  layoutResizeHandleHorizontal: 'w-2 cursor-col-resize',\n  layoutResizeHandleVertical: 'h-2 cursor-row-resize',\n  layoutResizeHandleDisabled: 'cursor-default opacity-60',\n  layoutResizeHandleIndicator:\n    'rounded-full bg-muted-foreground/45 group-hover/resize:bg-primary/70',\n};\n\nconst densitySlots: Record<BaseDensity, Partial<BaseThemeSlots>> = {\n  compact: {\n    buttonBase: 'h-8 px-2.5 text-xs',\n    buttonIconOnly: 'h-8 w-8 px-0',\n    badgeBase: 'px-1.5 py-0 text-[11px]',\n    panelHeader: 'p-3',\n    panelBody: 'px-3 pb-3 text-xs',\n    panelBodyStandalone: 'pt-3',\n    panelFooter: 'px-3 py-2',\n    stateRoot: 'min-h-36 px-4 py-7',\n    stateIcon: 'mb-3 h-10 w-10',\n    fieldRoot: 'gap-1.5',\n    fieldLabel: 'text-xs',\n    fieldDescription: 'text-xs leading-5',\n    fieldMessage: 'text-xs leading-5',\n    controlInput: 'h-8 text-xs',\n    controlTextarea: 'min-h-20 text-xs',\n    controlSelect: 'h-8 text-xs',\n    selectMenu: 'text-xs',\n    selectOption: 'min-h-7 px-2 py-1 text-xs',\n    switchTrack: 'h-5 w-9',\n    switchThumb: 'h-3.5 w-3.5',\n    checkboxBox: 'h-3.5 w-3.5',\n    checkboxLabel: 'text-xs',\n    checkboxDescription: 'text-xs leading-5',\n    radioOption: 'px-2 py-1.5 text-xs',\n    radioMarker: 'h-3.5 w-3.5',\n    radioIndicator: 'h-1.5 w-1.5',\n    radioLabel: 'text-xs',\n    radioDescription: 'text-xs leading-5',\n    dialogPanel: 'max-w-md',\n    dialogHeader: 'px-4 py-3',\n    dialogTitle: 'text-sm leading-5',\n    dialogDescription: 'text-xs leading-5',\n    dialogBody: 'px-4 py-3 text-xs',\n    dialogFooter: 'px-4 py-3',\n    dropdownMenu: 'min-w-44 text-xs',\n    dropdownItem: 'px-2 py-1.5 text-xs',\n    tooltipContent: 'text-[11px] leading-4',\n    noticeBase: 'px-3 py-2 text-xs',\n    dividerLabel: 'text-[11px]',\n    sectionHeaderRoot: 'gap-2',\n    sectionHeaderTitle: 'text-sm leading-5',\n    sectionHeaderDescription: 'text-xs leading-5',\n    tabsList: 'gap-0.5 p-0.5',\n    tabsTrigger: 'px-2 py-1 text-xs',\n    tabsPanel: 'p-3 text-xs',\n    segmentedRoot: 'gap-0.5 p-0.5',\n    segmentedItem: 'px-2 py-1 text-xs',\n    progressTrack: 'h-1.5',\n    avatarRoot: 'text-xs',\n    toolbarRoot: 'gap-2 px-3 py-2',\n    toolbarTitle: 'text-xs',\n    toolbarDescription: 'text-xs leading-5',\n    paginationButton: 'h-7 min-w-7 px-2 text-xs',\n    paginationPage: 'h-7 min-w-7 px-2 text-xs',\n    descriptionListRoot: 'gap-2 text-xs',\n    descriptionListItem: 'px-2 py-1.5',\n    descriptionListTerm: 'text-[11px]',\n    descriptionListValue: 'text-xs leading-5',\n    accordionTrigger: 'px-3 py-2 text-xs',\n    accordionPanel: 'px-3 py-2 text-xs leading-5',\n    menuContent: 'min-w-40 p-0.5 text-xs',\n    menuSubContent: 'min-w-36 p-0.5 text-xs',\n    menuLabel: 'px-2 py-1 text-[11px]',\n    menuItem: 'min-h-7 px-2 py-1 text-xs',\n    menuSubTrigger: 'min-h-7 px-2 py-1 text-xs',\n    menuItemShortcut: 'text-[11px]',\n    tableContainer: '[--base-table-header-height:2.25rem]',\n    tableHead: 'h-9 px-2 py-1.5 text-[11px]',\n    tableCell: 'px-2 py-1.5 text-xs',\n    tableHeadLabel: 'text-[11px]',\n    tableHeadDescription: 'text-[10px] leading-3',\n    tableLoadingCell: 'px-2 py-1.5',\n    layoutRoot: 'gap-2 p-2',\n    layoutBody: 'gap-2',\n    layoutPane: 'rounded-md text-xs',\n    layoutResizeHandleHorizontal: 'w-1.5',\n    layoutResizeHandleVertical: 'h-1.5',\n  },\n  default: {\n    buttonBase: 'h-9',\n  },\n  comfortable: {\n    buttonBase: 'h-10 px-3.5',\n    buttonIconOnly: 'h-10 w-10 px-0',\n    badgeBase: 'px-2.5 py-1',\n    panelHeader: 'p-5',\n    panelBody: 'px-5 pb-5',\n    panelBodyStandalone: 'pt-5',\n    panelFooter: 'px-5 py-3.5',\n    stateRoot: 'min-h-56 px-8 py-12',\n    stateIcon: 'mb-5 h-14 w-14',\n    fieldRoot: 'gap-2.5',\n    controlInput: 'h-10',\n    controlTextarea: 'min-h-28',\n    controlSelect: 'h-10',\n    selectMenu: 'p-1.5',\n    selectOption: 'min-h-9 px-3 py-2',\n    switchTrack: 'h-7 w-12',\n    switchThumb: 'h-5 w-5',\n    checkboxBox: 'h-5 w-5',\n    radioOption: 'px-4 py-3',\n    radioMarker: 'h-5 w-5',\n    radioIndicator: 'h-2.5 w-2.5',\n    dialogPanel: 'max-w-xl',\n    dialogHeader: 'px-6 py-5',\n    dialogBody: 'px-6 py-5',\n    dialogFooter: 'px-6 py-5',\n    dropdownMenu: 'min-w-56',\n    dropdownItem: 'px-3 py-2.5',\n    noticeBase: 'px-5 py-4',\n    sectionHeaderTitle: 'text-lg leading-7',\n    tabsTrigger: 'px-3.5 py-2',\n    tabsPanel: 'p-5',\n    segmentedItem: 'px-3.5 py-2',\n    progressTrack: 'h-2.5',\n    toolbarRoot: 'px-5 py-4',\n    paginationButton: 'h-9 min-w-9 px-3',\n    paginationPage: 'h-9 min-w-9 px-3',\n    descriptionListItem: 'px-4 py-3',\n    accordionTrigger: 'px-5 py-4',\n    accordionPanel: 'px-5 py-4',\n    menuContent: 'min-w-48 p-1.5',\n    menuSubContent: 'min-w-44 p-1.5',\n    menuItem: 'min-h-9 px-3 py-2',\n    menuSubTrigger: 'min-h-9 px-3 py-2',\n    tableContainer: '[--base-table-header-height:3rem]',\n    tableHead: 'h-12 px-4 py-3',\n    tableCell: 'px-4 py-3',\n    tableLoadingCell: 'px-4 py-3',\n    layoutRoot: 'gap-4 p-4',\n    layoutBody: 'gap-4',\n    layoutPane: 'rounded-xl',\n    layoutResizeHandleHorizontal: 'w-2.5',\n    layoutResizeHandleVertical: 'h-2.5',\n  },\n};\n\nconst radiusSlots: Record<BaseRadius, Partial<BaseThemeSlots>> = {\n  none: {\n    buttonBase: 'rounded-none',\n    badgeBase: 'rounded-none',\n    panelRoot: 'rounded-none',\n    stateRoot: 'rounded-none',\n    stateIcon: 'rounded-none',\n    controlWrapper: 'rounded-none',\n    selectMenu: 'rounded-none',\n    selectOption: 'rounded-none',\n    switchTrack: 'rounded-none',\n    switchThumb: 'rounded-none',\n    checkboxBox: 'rounded-none',\n    radioOption: 'rounded-none',\n    dialogPanel: 'rounded-none',\n    dialogClose: 'rounded-none',\n    dropdownMenu: 'rounded-none',\n    dropdownItem: 'rounded-none',\n    tooltipContent: 'rounded-none',\n    noticeBase: 'rounded-none',\n    tabsList: 'rounded-none',\n    tabsTrigger: 'rounded-none',\n    tabsPanel: 'rounded-none',\n    segmentedRoot: 'rounded-none',\n    segmentedItem: 'rounded-none',\n    progressTrack: 'rounded-none',\n    progressIndicator: 'rounded-none',\n    skeletonRoot: 'rounded-none',\n    avatarRoot: 'rounded-none',\n    avatarStatus: 'rounded-none',\n    toolbarRoot: 'rounded-none',\n    paginationButton: 'rounded-none',\n    paginationPage: 'rounded-none',\n    descriptionListItem: 'rounded-none',\n    accordionItem: 'rounded-none',\n    menuContent: 'rounded-none',\n    menuItem: 'rounded-none',\n    menuSubTrigger: 'rounded-none',\n    menuSubContent: 'rounded-none',\n    tableContainer: 'rounded-none',\n    tableEmptyIcon: 'rounded-none',\n    tableLoadingSkeleton: 'rounded-none',\n    layoutRoot: 'rounded-none',\n    layoutPane: 'rounded-none',\n  },\n  sm: {\n    buttonBase: 'rounded-sm',\n    badgeBase: 'rounded-sm',\n    panelRoot: 'rounded-sm',\n    stateRoot: 'rounded-sm',\n    stateIcon: 'rounded-sm',\n    controlWrapper: 'rounded-sm',\n    selectMenu: 'rounded-sm',\n    selectOption: 'rounded-sm',\n    switchTrack: 'rounded-sm',\n    switchThumb: 'rounded-sm',\n    checkboxBox: 'rounded-sm',\n    radioOption: 'rounded-sm',\n    dialogPanel: 'rounded-sm',\n    dialogClose: 'rounded-sm',\n    dropdownMenu: 'rounded-sm',\n    dropdownItem: 'rounded-sm',\n    tooltipContent: 'rounded-sm',\n    noticeBase: 'rounded-sm',\n    tabsList: 'rounded-sm',\n    tabsTrigger: 'rounded-sm',\n    tabsPanel: 'rounded-sm',\n    segmentedRoot: 'rounded-sm',\n    segmentedItem: 'rounded-sm',\n    progressTrack: 'rounded-sm',\n    progressIndicator: 'rounded-sm',\n    skeletonRoot: 'rounded-sm',\n    avatarRoot: 'rounded-sm',\n    avatarStatus: 'rounded-sm',\n    toolbarRoot: 'rounded-sm',\n    paginationButton: 'rounded-sm',\n    paginationPage: 'rounded-sm',\n    descriptionListItem: 'rounded-sm',\n    accordionItem: 'rounded-sm',\n    menuContent: 'rounded-sm',\n    menuItem: 'rounded-sm',\n    menuSubTrigger: 'rounded-sm',\n    menuSubContent: 'rounded-sm',\n    tableContainer: 'rounded-sm',\n    tableEmptyIcon: 'rounded-sm',\n    tableLoadingSkeleton: 'rounded-sm',\n    layoutRoot: 'rounded-sm',\n    layoutPane: 'rounded-sm',\n  },\n  md: {},\n  lg: {\n    buttonBase: 'rounded-lg',\n    badgeBase: 'rounded-lg',\n    panelRoot: 'rounded-xl',\n    stateRoot: 'rounded-xl',\n    stateIcon: 'rounded-xl',\n    controlWrapper: 'rounded-lg',\n    selectMenu: 'rounded-lg',\n    selectOption: 'rounded-md',\n    switchTrack: 'rounded-full',\n    switchThumb: 'rounded-full',\n    checkboxBox: 'rounded-md',\n    radioOption: 'rounded-xl',\n    dialogPanel: 'rounded-xl',\n    dialogClose: 'rounded-lg',\n    dropdownMenu: 'rounded-lg',\n    dropdownItem: 'rounded-md',\n    tooltipContent: 'rounded-md',\n    noticeBase: 'rounded-xl',\n    tabsList: 'rounded-xl',\n    tabsTrigger: 'rounded-lg',\n    tabsPanel: 'rounded-xl',\n    segmentedRoot: 'rounded-xl',\n    segmentedItem: 'rounded-lg',\n    skeletonRoot: 'rounded-lg',\n    toolbarRoot: 'rounded-xl',\n    descriptionListItem: 'rounded-lg',\n    accordionItem: 'rounded-xl',\n    menuContent: 'rounded-lg',\n    menuItem: 'rounded-md',\n    menuSubTrigger: 'rounded-md',\n    menuSubContent: 'rounded-lg',\n    tableContainer: 'rounded-xl',\n    tableEmptyIcon: 'rounded-xl',\n    tableLoadingSkeleton: 'rounded-lg',\n    layoutRoot: 'rounded-xl',\n    layoutPane: 'rounded-xl',\n  },\n  xl: {\n    buttonBase: 'rounded-xl',\n    badgeBase: 'rounded-xl',\n    panelRoot: 'rounded-2xl',\n    stateRoot: 'rounded-2xl',\n    stateIcon: 'rounded-2xl',\n    controlWrapper: 'rounded-xl',\n    selectMenu: 'rounded-xl',\n    selectOption: 'rounded-lg',\n    switchTrack: 'rounded-full',\n    switchThumb: 'rounded-full',\n    checkboxBox: 'rounded-lg',\n    radioOption: 'rounded-2xl',\n    dialogPanel: 'rounded-2xl',\n    dialogClose: 'rounded-xl',\n    dropdownMenu: 'rounded-xl',\n    dropdownItem: 'rounded-lg',\n    tooltipContent: 'rounded-lg',\n    noticeBase: 'rounded-2xl',\n    tabsList: 'rounded-2xl',\n    tabsTrigger: 'rounded-xl',\n    tabsPanel: 'rounded-2xl',\n    segmentedRoot: 'rounded-2xl',\n    segmentedItem: 'rounded-xl',\n    skeletonRoot: 'rounded-xl',\n    toolbarRoot: 'rounded-2xl',\n    paginationButton: 'rounded-xl',\n    paginationPage: 'rounded-xl',\n    descriptionListItem: 'rounded-xl',\n    accordionItem: 'rounded-2xl',\n    menuContent: 'rounded-xl',\n    menuItem: 'rounded-lg',\n    menuSubTrigger: 'rounded-lg',\n    menuSubContent: 'rounded-xl',\n    tableContainer: 'rounded-2xl',\n    tableEmptyIcon: 'rounded-2xl',\n    tableLoadingSkeleton: 'rounded-xl',\n    layoutRoot: 'rounded-2xl',\n    layoutPane: 'rounded-2xl',\n  },\n  full: {\n    buttonBase: 'rounded-full',\n    badgeBase: 'rounded-full',\n    panelRoot: 'rounded-2xl',\n    stateRoot: 'rounded-2xl',\n    stateIcon: 'rounded-full',\n    controlWrapper: 'rounded-full',\n    selectMenu: 'rounded-2xl',\n    selectOption: 'rounded-full',\n    switchTrack: 'rounded-full',\n    switchThumb: 'rounded-full',\n    checkboxBox: 'rounded-full',\n    radioOption: 'rounded-2xl',\n    dialogPanel: 'rounded-2xl',\n    dialogClose: 'rounded-full',\n    dropdownMenu: 'rounded-2xl',\n    dropdownItem: 'rounded-full',\n    tooltipContent: 'rounded-full',\n    noticeBase: 'rounded-2xl',\n    tabsList: 'rounded-full',\n    tabsTrigger: 'rounded-full',\n    tabsPanel: 'rounded-2xl',\n    segmentedRoot: 'rounded-full',\n    segmentedItem: 'rounded-full',\n    progressTrack: 'rounded-full',\n    progressIndicator: 'rounded-full',\n    skeletonRoot: 'rounded-full',\n    avatarRoot: 'rounded-full',\n    avatarStatus: 'rounded-full',\n    toolbarRoot: 'rounded-2xl',\n    paginationButton: 'rounded-full',\n    paginationPage: 'rounded-full',\n    descriptionListItem: 'rounded-2xl',\n    accordionItem: 'rounded-2xl',\n    menuContent: 'rounded-2xl',\n    menuItem: 'rounded-full',\n    menuSubTrigger: 'rounded-full',\n    menuSubContent: 'rounded-2xl',\n    tableContainer: 'rounded-2xl',\n    tableEmptyIcon: 'rounded-full',\n    tableLoadingSkeleton: 'rounded-full',\n    layoutRoot: 'rounded-2xl',\n    layoutPane: 'rounded-2xl',\n  },\n};\n\nconst borderSlots: Record<BaseBorder, Partial<BaseThemeSlots>> = {\n  none: {\n    buttonBase: 'border-transparent',\n    badgeBase: 'border-transparent',\n    panelRoot: 'border-transparent',\n    panelFooter: 'border-transparent',\n    stateRoot: 'border-transparent',\n    controlWrapper: 'border-transparent',\n    selectMenu: 'border-transparent',\n    switchTrack: 'border-transparent',\n    checkboxBox: 'border-transparent',\n    radioOption: 'border-transparent',\n    radioMarker: 'border-transparent',\n    dialogPanel: 'border-transparent',\n    dialogHeader: 'border-transparent',\n    dialogFooter: 'border-transparent',\n    dropdownMenu: 'border-transparent',\n    tooltipContent: 'border-transparent',\n    noticeBase: 'border-transparent',\n    dividerRoot: 'border-transparent',\n    tabsList: 'border-transparent',\n    tabsPanel: 'border-transparent',\n    segmentedRoot: 'border-transparent',\n    avatarRoot: 'border-transparent',\n    toolbarRoot: 'border-transparent',\n    paginationButton: 'border-transparent',\n    descriptionListItem: 'border-transparent',\n    accordionItem: 'border-transparent',\n    accordionPanel: 'border-transparent',\n    menuContent: 'border-transparent',\n    menuSeparator: 'bg-transparent',\n    menuSubContent: 'border-transparent',\n    tableContainer: 'border-transparent [--base-table-header-separator:transparent]',\n    tableHeader: 'border-transparent',\n    tableFooter: '[&_tr>*]:border-transparent',\n    tableFooterBar: 'border-transparent',\n    tableFooterBarAttached: 'border-t border-transparent',\n    tableRow: '[&>*]:border-transparent',\n    tableEmptyRow: '[&>*]:border-transparent',\n    tableLoadingRow: '[&>*]:border-transparent',\n    layoutRoot: 'border-transparent',\n    layoutPaneBordered: 'border-transparent',\n    layoutResizeHandle: 'bg-transparent hover:bg-transparent active:bg-transparent focus-visible:bg-transparent',\n  },\n  subtle: {\n    buttonDefault: 'border-border/60',\n    badgeDefault: 'border-border/60',\n    panelRoot: 'border-border/60',\n    panelFooter: 'border-border/60',\n    stateRoot: 'border-border/60',\n    controlWrapper: 'border-border/60',\n    selectMenu: 'border-border/60',\n    switchTrack: 'border-border/60',\n    checkboxBox: 'border-border/60',\n    radioOption: 'border-border/60',\n    radioMarker: 'border-border/60',\n    dialogPanel: 'border-border/60',\n    dialogHeader: 'border-border/60',\n    dialogFooter: 'border-border/60',\n    dropdownMenu: 'border-border/60',\n    tooltipContent: 'border-border/60',\n    noticeDefault: 'border-border/60',\n    dividerRoot: 'border-border/60',\n    tabsList: 'border-border/60',\n    tabsPanel: 'border-border/60',\n    segmentedRoot: 'border-border/60',\n    avatarRoot: 'border-border/60',\n    toolbarRoot: 'border-border/60',\n    paginationButton: 'border-border/60',\n    descriptionListItem: 'border-border/60',\n    accordionItem: 'border-border/60',\n    accordionPanel: 'border-border/60',\n    menuContent: 'border-border/60',\n    menuSeparator: 'bg-border/60',\n    menuSubContent: 'border-border/60',\n    tableContainer: 'border-border/60 [--base-table-header-separator:hsl(var(--border)_/_0.6)]',\n    tableHeader: 'border-border/60',\n    tableFooter: '[&_tr>*]:border-border/60',\n    tableFooterBar: 'border-border/60',\n    tableFooterBarAttached: 'border-t border-border/60',\n    tableRow: '[&>*]:border-border/50',\n    tableEmptyRow: '[&>*]:border-border/50',\n    tableLoadingRow: '[&>*]:border-border/50',\n    layoutRoot: 'border-border/60',\n    layoutPaneBordered: 'border-border/60',\n  },\n  solid: {},\n  strong: {\n    buttonDefault: 'border-foreground/20',\n    badgeDefault: 'border-foreground/20',\n    panelRoot: 'border-foreground/20',\n    panelFooter: 'border-foreground/20',\n    stateRoot: 'border-foreground/20',\n    controlWrapper: 'border-foreground/20',\n    selectMenu: 'border-foreground/20',\n    switchTrack: 'border-foreground/20',\n    checkboxBox: 'border-foreground/20',\n    radioOption: 'border-foreground/20',\n    radioMarker: 'border-foreground/20',\n    dialogPanel: 'border-foreground/20',\n    dialogHeader: 'border-foreground/15',\n    dialogFooter: 'border-foreground/15',\n    dropdownMenu: 'border-foreground/20',\n    tooltipContent: 'border-foreground/20',\n    noticeDefault: 'border-foreground/20',\n    dividerRoot: 'border-foreground/20',\n    tabsList: 'border-foreground/20',\n    tabsPanel: 'border-foreground/20',\n    segmentedRoot: 'border-foreground/20',\n    avatarRoot: 'border-foreground/20',\n    toolbarRoot: 'border-foreground/20',\n    paginationButton: 'border-foreground/20',\n    descriptionListItem: 'border-foreground/20',\n    accordionItem: 'border-foreground/20',\n    accordionPanel: 'border-foreground/20',\n    menuContent: 'border-foreground/20',\n    menuSeparator: 'bg-foreground/15',\n    menuSubContent: 'border-foreground/20',\n    tableContainer:\n      'border-foreground/20 [--base-table-header-separator:hsl(var(--foreground)_/_0.15)]',\n    tableHeader: 'border-foreground/20',\n    tableFooter: '[&_tr>*]:border-foreground/20',\n    tableFooterBar: 'border-foreground/20',\n    tableFooterBarAttached: 'border-t border-foreground/20',\n    tableRow: '[&>*]:border-foreground/15',\n    tableEmptyRow: '[&>*]:border-foreground/15',\n    tableLoadingRow: '[&>*]:border-foreground/15',\n    layoutRoot: 'border-foreground/20',\n    layoutPaneBordered: 'border-foreground/20',\n    layoutResizeHandle: 'hover:bg-foreground/15 active:bg-foreground/20 focus-visible:bg-foreground/15',\n  },\n};\n\nconst backgroundSlots: Record<BaseBackground, Partial<BaseThemeSlots>> = {\n  plain: {},\n  muted: {\n    buttonDefault: 'bg-muted/20 hover:bg-muted/45',\n    panelRoot: 'bg-card',\n    panelFooter: 'bg-muted/20',\n    stateRoot: 'bg-muted/20',\n    controlWrapper: 'bg-background',\n    selectMenu: 'bg-background',\n    selectOptionActive: 'bg-muted/70 text-foreground',\n    checkboxBox: 'bg-background',\n    radioOption: 'bg-card hover:bg-muted/45',\n    radioMarker: 'bg-background',\n    dialogPanel: 'bg-card',\n    dropdownMenu: 'bg-background',\n    dropdownItem: 'hover:bg-muted/60',\n    tooltipContent: 'bg-popover',\n    noticeDefault: 'bg-muted/20',\n    tabsList: 'bg-muted/35',\n    tabsTriggerActive: 'bg-background',\n    tabsPanel: 'bg-card',\n    segmentedRoot: 'bg-muted/35',\n    segmentedItemActive: 'bg-background',\n    progressTrack: 'bg-muted/60',\n    skeletonRoot: 'bg-muted',\n    toolbarRoot: 'bg-card',\n    paginationButton: 'bg-background hover:bg-muted/60',\n    paginationPage: 'bg-muted/60',\n    descriptionListItem: 'bg-card',\n    accordionItem: 'bg-card',\n    menuContent: 'bg-background',\n    menuItem: 'focus:bg-muted/70 data-[highlighted]:bg-muted/70',\n    menuSubTrigger:\n      'focus:bg-muted/70 data-[highlighted]:bg-muted/70 data-[state=open]:bg-muted/70',\n    menuSubContent: 'bg-background',\n    tableContainer: 'bg-background/95 [scrollbar-gutter:stable]',\n    tableFooter: 'bg-muted/35',\n    tableFooterBar: 'bg-muted/30 shadow-none',\n    tableRowInteractive: 'cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.45)]',\n    tableLoadingSkeleton: 'bg-muted',\n    layoutRoot: 'bg-card',\n    layoutPane: 'bg-card',\n    layoutPaneMuted: 'bg-muted/35',\n    layoutResizeHandle: 'hover:bg-border/70 active:bg-border/80 focus-visible:bg-border/70',\n  },\n  soft: {\n    buttonDefault: 'bg-muted/30 hover:bg-muted/55',\n    panelRoot: 'bg-background/95 shadow-sm',\n    stateRoot: 'bg-background/95 shadow-sm',\n    controlWrapper: 'bg-background/95',\n    selectMenu: 'bg-background/95 shadow-xl',\n    selectOptionActive: 'bg-muted/60 text-foreground',\n    checkboxBox: 'bg-background/95',\n    radioOption: 'bg-background/95 shadow-sm hover:bg-muted/35',\n    radioMarker: 'bg-background/95',\n    dialogPanel: 'bg-background/95 shadow-xl',\n    dropdownMenu: 'bg-background/95 shadow-xl',\n    dropdownItem: 'hover:bg-muted/55',\n    tooltipContent: 'bg-popover shadow-xl',\n    noticeDefault: 'bg-background/95 shadow-sm',\n    tabsList: 'bg-background/60 shadow-sm',\n    tabsTriggerActive: 'bg-background',\n    tabsPanel: 'bg-background/95 shadow-sm',\n    segmentedRoot: 'bg-background/60 shadow-sm',\n    segmentedItemActive: 'bg-background',\n    skeletonRoot: 'bg-background/80',\n    toolbarRoot: 'bg-background/95 shadow-sm',\n    paginationButton: 'bg-background/95 hover:bg-muted/55',\n    descriptionListItem: 'bg-background/95 shadow-sm',\n    accordionItem: 'bg-background/95 shadow-sm',\n    menuContent: 'bg-background/95 shadow-xl',\n    menuItem: 'focus:bg-muted/60 data-[highlighted]:bg-muted/60',\n    menuSubTrigger:\n      'focus:bg-muted/60 data-[highlighted]:bg-muted/60 data-[state=open]:bg-muted/60',\n    menuSubContent: 'bg-background/95 shadow-xl',\n    tableContainer:\n      'bg-background/95 shadow-sm [scrollbar-gutter:stable]',\n    tableFooter: 'bg-muted/25',\n    tableFooterBar: 'bg-muted/25 shadow-none',\n    tableRowInteractive: 'cursor-pointer [--base-table-row-hover-bg:hsl(var(--muted)_/_0.35)]',\n    tableLoadingSkeleton: 'bg-muted/65',\n    layoutRoot: 'bg-background/95 shadow-sm',\n    layoutPane: 'bg-background/95 shadow-sm',\n    layoutPaneSoft: 'bg-background/95 shadow-md',\n  },\n  glass: {\n    buttonBase: 'backdrop-blur-md',\n    buttonDefault:\n      'border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]',\n    badgeDefault: 'border-white/10 bg-white/[0.08] text-foreground',\n    panelRoot: 'border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md',\n    panelFooter: 'border-white/10 bg-white/[0.05]',\n    stateRoot: 'border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md',\n    stateIcon: 'bg-white/10 text-foreground',\n    controlWrapper:\n      'border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md',\n    selectMenu:\n      'border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md',\n    selectOption: 'text-foreground',\n    selectOptionActive: 'bg-white/[0.14] text-foreground',\n    selectOptionSelected: 'bg-white/[0.18] text-foreground',\n    switchTrack: 'border-white/10 bg-white/[0.12] backdrop-blur-md',\n    checkboxBox: 'border-white/10 bg-white/[0.08] backdrop-blur-md',\n    checkboxBoxChecked: 'border-white/20 bg-white/[0.22] text-foreground',\n    radioOption: 'border-white/10 bg-white/[0.06] backdrop-blur-md hover:bg-white/[0.10]',\n    radioMarker: 'border-white/10 bg-white/[0.08] backdrop-blur-md',\n    radioMarkerChecked: 'border-white/25 bg-white/[0.16]',\n    dialogOverlay: 'bg-background/45 backdrop-blur-md',\n    dialogPanel: 'border-white/10 bg-white/[0.08] shadow-2xl backdrop-blur-md',\n    dialogHeader: 'border-white/10',\n    dialogFooter: 'border-white/10',\n    dropdownMenu:\n      'border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md',\n    dropdownItem: 'text-foreground hover:bg-white/[0.14]',\n    tooltipContent:\n      'border-foreground/10 bg-background/15 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md',\n    noticeDefault:\n      'border-white/10 bg-white/[0.08] text-foreground backdrop-blur-md',\n    dividerRoot: 'border-white/15',\n    tabsList: 'border-white/10 bg-white/[0.08] backdrop-blur-md',\n    tabsTrigger: 'text-muted-foreground hover:bg-white/[0.12] hover:text-foreground',\n    tabsTriggerActive: 'bg-white/[0.16] text-foreground shadow-none',\n    tabsPanel:\n      'border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md',\n    segmentedRoot: 'border-white/10 bg-white/[0.08] backdrop-blur-md',\n    segmentedItem: 'text-muted-foreground hover:bg-white/[0.12] hover:text-foreground',\n    segmentedItemActive: 'bg-white/[0.16] text-foreground shadow-none',\n    progressTrack: 'bg-white/[0.12]',\n    skeletonRoot: 'bg-white/[0.16]',\n    avatarRoot: 'border-white/10 bg-white/[0.12] text-foreground',\n    avatarFallback: 'bg-white/[0.12] text-foreground',\n    avatarStatus: 'border-background',\n    toolbarRoot:\n      'border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md',\n    paginationButton:\n      'border-white/10 bg-white/[0.08] text-foreground hover:bg-white/[0.14]',\n    paginationPage: 'bg-white/[0.12] text-foreground',\n    descriptionListItem:\n      'border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md',\n    accordionItem:\n      'border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md',\n    accordionPanel: 'border-white/10',\n    menuContent:\n      'border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md',\n    menuSeparator: 'bg-white/10',\n    menuItem:\n      'text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground',\n    menuSubTrigger:\n      'text-foreground focus:bg-white/[0.14] focus:text-foreground data-[highlighted]:bg-white/[0.14] data-[highlighted]:text-foreground data-[state=open]:bg-white/[0.16]',\n    menuSubContent:\n      'border-foreground/10 bg-background/10 text-foreground shadow-[0_18px_60px_hsl(var(--foreground)/0.18)] backdrop-blur-md',\n    tableContainer:\n      'border-foreground/10 bg-background/[0.06] shadow-none backdrop-blur-md [scrollbar-gutter:stable] [--base-table-sticky-header-bg:hsl(var(--background)/0.94)] [--base-table-header-separator:hsl(var(--foreground)/0.24)]',\n    tableHeader: 'border-white/10',\n    tableFooter: 'bg-white/[0.05] [&_tr>*]:border-white/10',\n    tableFooterBar:\n      'border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md',\n    tableFooterBarAttached: 'border-t border-white/10',\n    tableRow: '[&>*]:border-white/10',\n    tableRowInteractive: 'cursor-pointer [--base-table-row-hover-bg:hsl(var(--foreground)/0.08)]',\n    tableHeadLabel: 'text-foreground',\n    tableLoadingSkeleton: 'bg-white/[0.16]',\n    layoutRoot:\n      'border-white/10 bg-white/[0.05] shadow-none backdrop-blur-md',\n    layoutPane:\n      'border-white/10 bg-white/[0.06] shadow-none backdrop-blur-md',\n    layoutPaneMuted: 'bg-white/[0.08]',\n    layoutPaneSoft: 'bg-white/[0.10] shadow-none backdrop-blur-md',\n    layoutResizeHandle: 'text-foreground/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10',\n    layoutResizeHandleIndicator: 'bg-white/45 group-hover/resize:bg-white/75',\n  },\n  dark: {\n    buttonBase:\n      'border-white/15 text-white shadow-lg backdrop-blur',\n    buttonDefault: 'bg-black/30 hover:bg-black/[0.45]',\n    buttonPrimary: 'border-white/25 bg-white/20 text-white hover:bg-white/25',\n    buttonMuted:\n      'border-white/10 bg-black/20 text-white/70 hover:bg-black/[0.35] hover:text-white',\n    badgeDefault: 'border-white/10 bg-white/[0.08] text-white',\n    badgeMuted: 'border-white/10 bg-black/20 text-white/70',\n    panelRoot: 'border-white/10 bg-slate-950 text-white shadow-none',\n    panelTitle: 'text-white',\n    panelDescription: 'text-white/65',\n    panelBody: 'text-white/85',\n    panelFooter: 'border-white/10 bg-white/[0.04]',\n    stateRoot: 'border-white/10 bg-slate-950 text-white shadow-none',\n    stateIcon: 'bg-white/10 text-white/75',\n    stateTitle: 'text-white',\n    stateDescription: 'text-white/65',\n    fieldLabel: 'text-white',\n    fieldDescription: 'text-white/65',\n    fieldMessage: 'text-white/65',\n    controlWrapper:\n      'border-white/15 bg-black/30 text-white shadow-lg backdrop-blur focus-within:border-white/35',\n    controlBase: 'text-white placeholder:text-white/45',\n    selectChevron: 'text-white/65',\n    selectMenu: 'border-white/15 bg-slate-950 text-white shadow-2xl',\n    selectOption: 'text-white',\n    selectOptionActive: 'bg-white/[0.12] text-white',\n    selectOptionSelected: 'bg-white/[0.16] text-white',\n    selectPlaceholder: 'text-white/45',\n    switchTrack: 'border-white/15 bg-black/30 shadow-lg backdrop-blur',\n    switchChecked: 'border-white/25 bg-white/25 text-white',\n    switchLabel: 'text-white',\n    switchDescription: 'text-white/65',\n    checkboxBox: 'border-white/15 bg-black/30 text-white shadow-lg backdrop-blur',\n    checkboxBoxChecked: 'border-white/25 bg-white/25 text-white',\n    checkboxLabel: 'text-white',\n    checkboxDescription: 'text-white/65',\n    radioOption: 'border-white/10 bg-white/[0.06] text-white hover:bg-white/[0.08]',\n    radioMarker: 'border-white/15 bg-black/30 text-white shadow-lg backdrop-blur',\n    radioMarkerChecked: 'border-white/25 bg-white/25',\n    radioIndicator: 'bg-white',\n    radioLabel: 'text-white',\n    radioDescription: 'text-white/65',\n    dialogOverlay: 'bg-slate-950/75',\n    dialogPanel: 'border-white/10 bg-slate-950 text-white shadow-2xl',\n    dialogHeader: 'border-white/10',\n    dialogTitle: 'text-white',\n    dialogDescription: 'text-white/65',\n    dialogBody: 'text-white/85',\n    dialogFooter: 'border-white/10',\n    dialogClose: 'text-white/65 hover:bg-white/[0.08] hover:text-white',\n    dropdownMenu: 'border-white/15 bg-slate-950 text-white shadow-2xl',\n    dropdownLabel: 'text-white/55',\n    dropdownSeparator: 'bg-white/15',\n    dropdownItem: 'text-white hover:bg-white/[0.10]',\n    dropdownItemDescription: 'text-white/55',\n    dropdownItemShortcut: 'text-white/55',\n    tooltipContent: 'border-white/15 bg-slate-950 text-white shadow-2xl',\n    noticeDefault: 'border-white/10 bg-white/[0.08] text-white',\n    noticeMuted: 'border-white/10 bg-black/20 text-white/70',\n    dividerRoot: 'border-white/15',\n    dividerLabel: 'text-white/55',\n    sectionHeaderEyebrow: 'text-white/55',\n    sectionHeaderTitle: 'text-white',\n    sectionHeaderDescription: 'text-white/65',\n    tabsList: 'border-white/10 bg-white/[0.08]',\n    tabsTrigger: 'text-white/65 hover:bg-white/[0.12] hover:text-white',\n    tabsTriggerActive: 'bg-white/[0.16] text-white shadow-none',\n    tabsPanel: 'border-white/10 bg-white/[0.06] text-white',\n    segmentedRoot: 'border-white/10 bg-white/[0.08]',\n    segmentedItem: 'text-white/65 hover:bg-white/[0.12] hover:text-white',\n    segmentedItemActive: 'bg-white/[0.16] text-white shadow-none',\n    progressTrack: 'bg-white/[0.12]',\n    progressLabel: 'text-white',\n    progressValue: 'text-white/65',\n    skeletonRoot: 'bg-white/[0.14]',\n    avatarRoot: 'border-white/15 bg-white/[0.10] text-white',\n    avatarFallback: 'bg-white/[0.10] text-white/75',\n    avatarText: 'text-white',\n    avatarStatus: 'border-slate-950',\n    toolbarRoot: 'border-white/10 bg-white/[0.06] text-white',\n    toolbarTitle: 'text-white',\n    toolbarDescription: 'text-white/65',\n    breadcrumbLink: 'text-white/65 hover:text-white',\n    breadcrumbCurrent: 'text-white',\n    breadcrumbSeparator: 'text-white/45',\n    paginationInfo: 'text-white/65',\n    paginationButton: 'border-white/10 bg-white/[0.08] text-white hover:bg-white/[0.14]',\n    paginationPage: 'bg-white/[0.14] text-white',\n    descriptionListItem: 'border-white/10 bg-white/[0.06]',\n    descriptionListTerm: 'text-white/55',\n    descriptionListValue: 'text-white',\n    accordionItem: 'border-white/10 bg-white/[0.06]',\n    accordionTrigger: 'text-white hover:bg-white/[0.08]',\n    accordionPanel: 'border-white/10 text-white/70',\n    tableContainer:\n      'border-foreground/10 bg-background text-foreground shadow-none [scrollbar-gutter:stable] [--base-table-sticky-header-bg:hsl(var(--background)/0.98)] [--base-table-header-separator:hsl(var(--foreground)/0.16)]',\n    tableRoot: 'text-white',\n    tableHeader: 'border-white/10',\n    tableFooter: 'bg-white/[0.05] [&_tr>*]:border-white/10',\n    tableFooterBar: 'border-white/10 bg-white/[0.05] text-white/65',\n    tableFooterBarAttached: 'border-t border-white/10',\n    tableRow: '[&>*]:border-white/10',\n    tableRowInteractive: 'cursor-pointer [--base-table-row-hover-bg:hsl(var(--foreground)/0.06)]',\n    tableHead: 'text-white/65',\n    tableHeadLabel: 'text-white',\n    tableHeadDescription: 'text-white/55',\n    tableHeadMeta: 'text-white/55',\n    tableHeadIcon: 'text-white/55',\n    tableHeadSortIcon: 'text-white/55',\n    tableHeadDragHandle: 'text-white/55 hover:bg-white/[0.08]',\n    tableHeadResizeHandle: 'after:bg-white/20 hover:after:bg-white/60',\n    tableCell: 'text-white/85',\n    tableEmptyIcon: 'bg-white/10 text-white/65',\n    tableEmptyTitle: 'text-white',\n    tableEmptyDescription: 'text-white/60',\n    menuContent: 'border-white/10 bg-slate-950 text-white shadow-2xl',\n    menuLabel: 'text-white/55',\n    menuSeparator: 'bg-white/10',\n    menuItem:\n      'text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white',\n    menuItemDefault: 'text-white',\n    menuItemPrimary: 'text-primary focus:text-primary data-[highlighted]:text-primary',\n    menuItemSuccess:\n      'text-[hsl(var(--success,142_69%_58%))] focus:text-[hsl(var(--success,142_69%_58%))] data-[highlighted]:text-[hsl(var(--success,142_69%_58%))]',\n    menuItemWarning:\n      'text-[hsl(var(--warning-foreground,53_98%_77%))] focus:text-[hsl(var(--warning-foreground,53_98%_77%))] data-[highlighted]:text-[hsl(var(--warning-foreground,53_98%_77%))]',\n    menuItemDanger:\n      'text-destructive-text focus:text-destructive-text data-[highlighted]:text-destructive-text',\n    menuItemMuted:\n      'text-white/65 focus:text-white data-[highlighted]:text-white',\n    menuItemShortcut: 'text-white/45',\n    menuSubTrigger:\n      'text-white focus:bg-white/[0.10] focus:text-white data-[highlighted]:bg-white/[0.10] data-[highlighted]:text-white data-[state=open]:bg-white/[0.12]',\n    menuSubTriggerIcon: 'text-white/55',\n    menuSubContent: 'border-white/10 bg-slate-950 text-white shadow-2xl',\n    tableLoadingSkeleton: 'bg-white/[0.14]',\n    layoutRoot: 'border-white/10 bg-slate-950 text-white shadow-none',\n    layoutPane: 'border-white/10 bg-slate-950 text-white shadow-none',\n    layoutPaneMuted: 'bg-white/[0.06]',\n    layoutPaneSoft: 'bg-white/[0.08] shadow-none',\n    layoutResizeHandle: 'text-white/65 hover:bg-white/10 active:bg-white/15 focus-visible:bg-white/10',\n    layoutResizeHandleIndicator: 'bg-white/45 group-hover/resize:bg-white/75',\n  },\n};\n\nconst presetDefaults: Record<\n  BaseThemePresetId,\n  Pick<BaseAppearance, 'density' | 'radius' | 'border' | 'background'>\n> = {\n  default: {\n    density: 'default',\n    radius: 'md',\n    border: 'solid',\n    background: 'plain',\n  },\n  soft: {\n    density: 'default',\n    radius: 'lg',\n    border: 'subtle',\n    background: 'soft',\n  },\n  compact: {\n    density: 'compact',\n    radius: 'md',\n    border: 'subtle',\n    background: 'muted',\n  },\n  'tinted-glass': {\n    density: 'default',\n    radius: 'lg',\n    border: 'subtle',\n    background: 'glass',\n  },\n  glass: {\n    density: 'default',\n    radius: 'xl',\n    border: 'subtle',\n    background: 'glass',\n  },\n  'hard-edge': {\n    density: 'compact',\n    radius: 'none',\n    border: 'strong',\n    background: 'plain',\n  },\n};\n\nconst presetSlots: Record<string, Partial<BaseThemeSlots>> = {\n  soft: {\n    buttonBase: 'font-medium',\n    panelRoot: 'border-border/70',\n    controlWrapper: 'font-medium',\n    tabsTrigger: 'font-medium',\n    segmentedItem: 'font-medium',\n    toolbarRoot: 'border-border/70',\n    tableContainer: 'border-border/70',\n    tableFooterBar: 'border-border/70',\n    tableHeadLabel: 'font-semibold',\n    menuItemLabel: 'font-medium',\n  },\n  compact: {\n    buttonBase: 'text-xs',\n    badgeBase: 'text-[11px]',\n    fieldLabel: 'text-xs',\n    controlBase: 'text-xs',\n    selectOption: 'text-xs',\n    menuItem: 'text-xs',\n    menuSubTrigger: 'text-xs',\n    noticeBase: 'text-xs',\n    sectionHeaderTitle: 'text-sm',\n    tabsTrigger: 'text-xs',\n    segmentedItem: 'text-xs',\n    toolbarTitle: 'text-xs',\n    paginationRoot: 'text-xs',\n  },\n  'tinted-glass': {\n    buttonPrimary: 'border-primary/25 bg-primary/15 text-primary-foreground hover:bg-primary/20',\n    badgePrimary: 'border-primary/25 bg-primary/15 text-primary-foreground',\n    noticePrimary: 'border-primary/25 bg-primary/15 text-primary-foreground',\n    progressIndicator: 'bg-primary',\n    avatarStatus: 'border-background',\n  },\n  glass: {\n    panelRoot: 'shadow-[0_24px_80px_hsl(var(--foreground)/0.12)]',\n    stateRoot: 'shadow-[0_24px_80px_hsl(var(--foreground)/0.12)]',\n    noticeBase: 'shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]',\n    tabsPanel: 'shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]',\n    toolbarRoot: 'shadow-[0_18px_60px_hsl(var(--foreground)/0.10)]',\n    descriptionListItem: 'shadow-[0_12px_40px_hsl(var(--foreground)/0.08)]',\n    accordionItem: 'shadow-[0_12px_40px_hsl(var(--foreground)/0.08)]',\n  },\n  'hard-edge': {\n    buttonBase: 'shadow-none',\n    panelRoot: 'shadow-none',\n    stateRoot: 'shadow-none',\n    controlWrapper: 'shadow-none',\n    selectMenu: 'shadow-none',\n    menuContent: 'shadow-none',\n    menuSubContent: 'shadow-none',\n    noticeBase: 'shadow-none',\n    tabsList: 'shadow-none',\n    tabsTriggerActive: 'shadow-none',\n    tabsPanel: 'shadow-none',\n    segmentedRoot: 'shadow-none',\n    segmentedItemActive: 'shadow-none',\n    toolbarRoot: 'shadow-none',\n    descriptionListItem: 'shadow-none',\n    accordionItem: 'shadow-none',\n  },\n};\n\nfunction getPresetDefaults(preset: BaseThemePresetId) {\n  return (\n    presetDefaults[preset as keyof typeof presetDefaults] ?? presetDefaults.default\n  );\n}\n\nconst slotKeys = Object.keys(baseSlots) as Array<keyof BaseThemeSlots>;\n\nfunction mergeSlots(\n  ...sources: Array<Partial<BaseThemeSlots> | undefined>\n): ResolvedSlots {\n  return slotKeys.reduce((resolved, key) => {\n    resolved[key] = cn(...sources.map((source) => source?.[key]));\n    return resolved;\n  }, {} as ResolvedSlots);\n}\n\nfunction mergeStyles(...styleSets: Array<BaseThemeStyles | undefined>) {\n  return Object.assign({}, ...styleSets.filter(Boolean));\n}\n\nexport function resolveBaseAppearance(\n  appearance?: BaseAppearance,\n): BaseResolvedTheme {\n  const preset = appearance?.preset ?? 'default';\n  const variant = appearance?.variant ?? 'default';\n  const defaults = getPresetDefaults(preset);\n  const density = appearance?.density ?? defaults.density ?? 'default';\n  const state = appearance?.state ?? 'idle';\n  const radius = appearance?.radius ?? defaults.radius ?? 'md';\n  const border = appearance?.border ?? defaults.border ?? 'solid';\n  const background = appearance?.background ?? defaults.background ?? 'plain';\n\n  return {\n    preset,\n    variant,\n    density,\n    state,\n    radius,\n    border,\n    background,\n    styles: mergeStyles(emptyStyles, appearance?.styles),\n    slots: mergeSlots(\n      baseSlots,\n      presetSlots[preset],\n      densitySlots[density],\n      radiusSlots[radius],\n      borderSlots[border],\n      backgroundSlots[background],\n      appearance?.slots,\n    ),\n  };\n}\n\nexport function getBaseButtonToneClassName(\n  theme: BaseResolvedTheme,\n  tone: BaseControlTone = 'default',\n  active = false,\n) {\n  return cn(\n    tone === 'default' && theme.slots.buttonDefault,\n    tone === 'primary' && theme.slots.buttonPrimary,\n    tone === 'success' && theme.slots.buttonSuccess,\n    tone === 'warning' && theme.slots.buttonWarning,\n    tone === 'danger' && theme.slots.buttonDanger,\n    tone === 'muted' && theme.slots.buttonMuted,\n    active && theme.slots.buttonActive,\n  );\n}\n\nexport function getBaseBadgeToneClassName(\n  theme: BaseResolvedTheme,\n  tone: BaseControlTone = 'default',\n) {\n  return cn(\n    tone === 'default' && theme.slots.badgeDefault,\n    tone === 'primary' && theme.slots.badgePrimary,\n    tone === 'success' && theme.slots.badgeSuccess,\n    tone === 'warning' && theme.slots.badgeWarning,\n    tone === 'danger' && theme.slots.badgeDanger,\n    tone === 'muted' && theme.slots.badgeMuted,\n  );\n}\n\nexport function getBaseNoticeToneClassName(\n  theme: BaseResolvedTheme,\n  tone: BaseControlTone = 'default',\n) {\n  return cn(\n    tone === 'default' && theme.slots.noticeDefault,\n    tone === 'primary' && theme.slots.noticePrimary,\n    tone === 'success' && theme.slots.noticeSuccess,\n    tone === 'warning' && theme.slots.noticeWarning,\n    tone === 'danger' && theme.slots.noticeDanger,\n    tone === 'muted' && theme.slots.noticeMuted,\n  );\n}\n\nexport function getBaseMenuItemToneClassName(\n  theme: BaseResolvedTheme,\n  tone: BaseControlTone = 'default',\n) {\n  return cn(\n    tone === 'default' && theme.slots.menuItemDefault,\n    tone === 'primary' && theme.slots.menuItemPrimary,\n    tone === 'success' && theme.slots.menuItemSuccess,\n    tone === 'warning' && theme.slots.menuItemWarning,\n    tone === 'danger' && theme.slots.menuItemDanger,\n    tone === 'muted' && theme.slots.menuItemMuted,\n  );\n}\n\nexport function getBaseTypographyToneClassName(\n  theme: BaseResolvedTheme,\n  tone: BaseTypographyTone = 'default',\n) {\n  return cn(\n    tone === 'default' && theme.slots.typographyToneDefault,\n    tone === 'muted' && theme.slots.typographyToneMuted,\n    tone === 'primary' && theme.slots.typographyTonePrimary,\n    tone === 'success' && theme.slots.typographyToneSuccess,\n    tone === 'warning' && theme.slots.typographyToneWarning,\n    tone === 'danger' && theme.slots.typographyToneDanger,\n    tone === 'inherit' && theme.slots.typographyToneInherit,\n  );\n}\n\nexport function getBaseTextSizeClassName(\n  theme: BaseResolvedTheme,\n  size: BaseTypographySize = 'md',\n) {\n  return cn(\n    size === 'xs' && theme.slots.textSizeXs,\n    size === 'sm' && theme.slots.textSizeSm,\n    size === 'md' && theme.slots.textSizeMd,\n    size === 'lg' && theme.slots.textSizeLg,\n    size === 'xl' && theme.slots.textSizeXl,\n  );\n}\n\nexport function getBaseHeadingSizeClassName(\n  theme: BaseResolvedTheme,\n  size: BaseHeadingSize = 'lg',\n) {\n  return cn(\n    size === 'xs' && theme.slots.headingSizeXs,\n    size === 'sm' && theme.slots.headingSizeSm,\n    size === 'md' && theme.slots.headingSizeMd,\n    size === 'lg' && theme.slots.headingSizeLg,\n    size === 'xl' && theme.slots.headingSizeXl,\n    size === '2xl' && theme.slots.headingSize2xl,\n  );\n}\n\nexport function getBaseListSpacingClassName(\n  theme: BaseResolvedTheme,\n  spacing: BaseListSpacing = 'default',\n) {\n  return cn(\n    spacing === 'compact' && theme.slots.listSpacingCompact,\n    spacing === 'default' && theme.slots.listSpacingDefault,\n    spacing === 'relaxed' && theme.slots.listSpacingRelaxed,\n  );\n}\n\nexport function getBaseListMarkerClassName(\n  theme: BaseResolvedTheme,\n  marker: Exclude<BaseListMarker, 'auto'>,\n) {\n  return cn(\n    marker === 'none' && theme.slots.listMarkerNone,\n    marker === 'disc' && theme.slots.listMarkerDisc,\n    marker === 'circle' && theme.slots.listMarkerCircle,\n    marker === 'square' && theme.slots.listMarkerSquare,\n    marker === 'decimal' && theme.slots.listMarkerDecimal,\n    marker === 'lower-alpha' && theme.slots.listMarkerLowerAlpha,\n    marker === 'upper-alpha' && theme.slots.listMarkerUpperAlpha,\n  );\n}\n\nconst cssLengthPattern = /^(?:0+(?:\\.0+)?|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:%|cap|ch|cm|dvb|dvh|dvi|dvw|em|ex|ic|in|lh|lvb|lvh|lvi|lvw|mm|pc|pt|px|q|rem|rlh|svb|svh|svi|svw|vb|vh|vi|vmax|vmin|vw))$/i;\nconst cssLengthFunctions = new Set(['calc', 'clamp', 'max', 'min', 'var']);\nconst unsafeCssValuePattern = /[;{}<>\"'\\\\\\u0000-\\u001f\\u007f]/;\nconst gridTemplateTokenPattern = /(?:\\b(?:auto|fit-content|max-content|min-content|subgrid)\\b|(?:calc|clamp|max|min|minmax|repeat|var)\\s*\\(|(?:^|[\\s,(])(?:0+(?:\\.0+)?|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:%|cap|ch|cm|dvb|dvh|dvi|dvw|em|ex|fr|ic|in|lh|lvb|lvh|lvi|lvw|mm|pc|pt|px|q|rem|rlh|svb|svh|svi|svw|vb|vh|vi|vmax|vmin|vw))(?:$|[\\s,)\\]]))/i;\n\nfunction hasBalancedDelimiters(value: string) {\n  const pairs: Record<string, string> = { ')': '(', ']': '[' };\n  const stack: string[] = [];\n\n  for (const character of value) {\n    if (character === '(' || character === '[') {\n      stack.push(character);\n    } else if (character === ')' || character === ']') {\n      if (stack.pop() !== pairs[character]) return false;\n    }\n  }\n\n  return stack.length === 0;\n}\n\nfunction isSupportedCssLengthFunction(value: string) {\n  const match = /^([a-z]+)\\(([\\s\\S]+)\\)$/i.exec(value);\n  if (!match || !cssLengthFunctions.has(match[1].toLowerCase())) return false;\n  if (!match[2].trim() || !hasBalancedDelimiters(value)) return false;\n\n  if (match[1].toLowerCase() === 'var') {\n    return /^\\s*--[a-z0-9_-]+(?:\\s*,[\\s\\S]+)?\\s*$/i.test(match[2]);\n  }\n\n  return cssLengthPattern.test(match[2].trim()) || /\\b(?:calc|clamp|max|min|var)\\s*\\(/i.test(match[2]) || /(?:^|[\\s,(])(?:0+(?:\\.0+)?|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:%|cap|ch|cm|dvb|dvh|dvi|dvw|em|ex|ic|in|lh|lvb|lvh|lvi|lvw|mm|pc|pt|px|q|rem|rlh|svb|svh|svi|svw|vb|vh|vi|vmax|vmin|vw))(?:$|[\\s,)])/i.test(match[2]);\n}\n\nexport function resolveBaseLayoutLength(\n  componentName: string,\n  propName: string,\n  value: BaseLayoutLength,\n) {\n  if (typeof value === 'number') {\n    if (!Number.isFinite(value) || value < 0) {\n      throw new RangeError(\n        `${componentName} ${propName} must be a finite, non-negative number or a supported CSS length string.`,\n      );\n    }\n    return `${value}px`;\n  }\n\n  if (typeof value !== 'string') {\n    throw new TypeError(\n      `${componentName} ${propName} must be a finite, non-negative number or a supported CSS length string.`,\n    );\n  }\n\n  const normalized = value.trim();\n  if (\n    !normalized ||\n    unsafeCssValuePattern.test(normalized) ||\n    (!cssLengthPattern.test(normalized) &&\n      !isSupportedCssLengthFunction(normalized))\n  ) {\n    throw new TypeError(\n      `${componentName} ${propName} must be a non-empty, non-negative CSS length (for example 12px, 1rem, 5%, or var(--space)).`,\n    );\n  }\n\n  return normalized;\n}\n\nexport function resolveBaseGridColumns(value: number | string) {\n  if (typeof value === 'number') {\n    if (!Number.isInteger(value) || value <= 0) {\n      throw new RangeError(\n        'BaseGrid columns must be a positive integer or a supported CSS grid-template-columns string.',\n      );\n    }\n    return `repeat(${value}, minmax(0, 1fr))`;\n  }\n\n  if (typeof value !== 'string') {\n    throw new TypeError(\n      'BaseGrid columns must be a positive integer or a supported CSS grid-template-columns string.',\n    );\n  }\n\n  const normalized = value.trim();\n  if (\n    !normalized ||\n    unsafeCssValuePattern.test(normalized) ||\n    /\\burl\\s*\\(/i.test(normalized) ||\n    !hasBalancedDelimiters(normalized) ||\n    !gridTemplateTokenPattern.test(normalized)\n  ) {\n    throw new TypeError(\n      'BaseGrid columns must be a non-empty CSS grid-template-columns value such as \"12rem minmax(0, 1fr)\" or \"repeat(3, minmax(0, 1fr))\".',\n    );\n  }\n\n  return normalized;\n}\n\ntype BaseLayoutAlignValue =\n  | 'flex-start'\n  | 'center'\n  | 'flex-end'\n  | 'stretch'\n  | 'baseline';\n\ntype BaseLayoutJustifyValue =\n  | 'flex-start'\n  | 'center'\n  | 'flex-end'\n  | 'space-between'\n  | 'space-around'\n  | 'space-evenly';\n\nconst layoutAlignValues: Record<BaseLayoutAlign, BaseLayoutAlignValue> = {\n  start: 'flex-start',\n  center: 'center',\n  end: 'flex-end',\n  stretch: 'stretch',\n  baseline: 'baseline',\n};\n\nconst layoutJustifyValues: Record<\n  BaseLayoutJustify,\n  BaseLayoutJustifyValue\n> = {\n  start: 'flex-start',\n  center: 'center',\n  end: 'flex-end',\n  between: 'space-between',\n  around: 'space-around',\n  evenly: 'space-evenly',\n};\n\nexport function resolveBaseLayoutAlign(\n  componentName: string,\n  value: BaseLayoutAlign,\n): BaseLayoutAlignValue {\n  if (!Object.prototype.hasOwnProperty.call(layoutAlignValues, value)) {\n    throw new TypeError(\n      `${componentName} align must be one of: start, center, end, stretch, baseline.`,\n    );\n  }\n  return layoutAlignValues[value];\n}\n\nexport function resolveBaseLayoutJustify(\n  componentName: string,\n  value: BaseLayoutJustify,\n): BaseLayoutJustifyValue {\n  if (!Object.prototype.hasOwnProperty.call(layoutJustifyValues, value)) {\n    throw new TypeError(\n      `${componentName} justify must be one of: start, center, end, between, around, evenly.`,\n    );\n  }\n  return layoutJustifyValues[value];\n}\n","import * as Dialog from '@radix-ui/react-dialog';\nimport { forwardRef, useEffect, useRef, useState } from 'react';\n\nimport {\n  useMonkeysBaseAppearance,\n  useMonkeysComponentAttributes,\n  useMonkeysLocaleMessages,\n} from '../../provider/context';\nimport { useBaseOverlayPortal } from './internal/overlayPortal';\nimport type { BaseControlTone, BaseDialogProps } from './types';\nimport {\n  getBaseButtonToneClassName,\n  resolveBaseAppearance,\n} from './theme';\nimport { cn, hasRenderableNode } from './utils';\n\nconst dialogTriggerTones = [\n  'default',\n  'primary',\n  'success',\n  'warning',\n  'danger',\n  'muted',\n] as const;\n\nfunction validateBoolean(value: unknown, name: string) {\n  if (typeof value !== 'boolean') {\n    throw new TypeError(`BaseDialog ${name} must be a boolean.`);\n  }\n}\n\nfunction validateTriggerTone(value: unknown) {\n  if (\n    !dialogTriggerTones.includes(\n      value as (typeof dialogTriggerTones)[number],\n    )\n  ) {\n    throw new TypeError(\n      'BaseDialog triggerTone must be \"default\", \"primary\", \"success\", \"warning\", \"danger\", or \"muted\".',\n    );\n  }\n}\n\nfunction renderTrigger({\n  trigger,\n  triggerLabel,\n  triggerIcon,\n  triggerTone,\n  triggerDisabled,\n  theme,\n}: Pick<\n  BaseDialogProps,\n  'trigger' | 'triggerDisabled' | 'triggerIcon' | 'triggerLabel'\n> & {\n  triggerTone: BaseControlTone;\n  theme: ReturnType<typeof resolveBaseAppearance>;\n}) {\n  if (hasRenderableNode(trigger)) {\n    return (\n      <span\n        role=\"button\"\n        tabIndex={triggerDisabled ? -1 : 0}\n        aria-disabled={triggerDisabled || undefined}\n        onKeyDown={(event) => {\n          if (triggerDisabled) return;\n          if (event.key === 'Enter' || event.key === ' ') {\n            event.preventDefault();\n            event.currentTarget.click();\n          }\n        }}\n      >\n        {trigger}\n      </span>\n    );\n  }\n\n  if (!hasRenderableNode(triggerLabel)) return null;\n\n  return (\n    <button\n      type=\"button\"\n      disabled={triggerDisabled}\n      aria-label={\n        typeof triggerLabel === 'string' && triggerLabel.trim()\n          ? triggerLabel\n          : undefined\n      }\n      className={cn(\n        theme.slots.buttonBase,\n        getBaseButtonToneClassName(theme, triggerTone),\n        triggerDisabled && theme.slots.buttonDisabled,\n      )}\n      style={{\n        ...theme.styles.button,\n        ...(triggerDisabled ? theme.styles.buttonDisabled : undefined),\n      }}\n    >\n      {hasRenderableNode(triggerIcon) ? (\n        <span data-slot=\"icon\" className={theme.slots.buttonIcon}>\n          {triggerIcon}\n        </span>\n      ) : null}\n      <span data-slot=\"label\" className={theme.slots.buttonLabel}>\n        {triggerLabel}\n      </span>\n    </button>\n  );\n}\n\nexport const BaseDialog = forwardRef<HTMLDivElement, BaseDialogProps>(\n  function BaseDialog(\n    {\n      open,\n      defaultOpen = false,\n      title,\n      description,\n      header,\n      footer,\n      trigger,\n      triggerLabel,\n      triggerIcon,\n      triggerTone = 'default',\n      triggerDisabled = false,\n      closeLabel,\n      closeOnEscape = true,\n      closeOnOverlayClick = true,\n      showCloseButton = true,\n      keepMounted = false,\n      trapFocus = true,\n      restoreFocus = true,\n      initialFocus = 'first-interactive',\n      initialFocusRef,\n      zIndex,\n      portal = false,\n      appearance,\n      className,\n      classNames,\n      style,\n      children,\n      onOpenChange,\n      id,\n      ...dialogProps\n    },\n    ref,\n  ) {\n    if (open !== undefined) validateBoolean(open, 'open');\n    validateBoolean(defaultOpen, 'defaultOpen');\n    validateBoolean(triggerDisabled, 'triggerDisabled');\n    validateBoolean(closeOnEscape, 'closeOnEscape');\n    validateBoolean(closeOnOverlayClick, 'closeOnOverlayClick');\n    validateBoolean(showCloseButton, 'showCloseButton');\n    validateBoolean(keepMounted, 'keepMounted');\n    validateBoolean(trapFocus, 'trapFocus');\n    validateBoolean(restoreFocus, 'restoreFocus');\n    validateBoolean(portal, 'portal');\n    validateTriggerTone(triggerTone);\n    if (\n      initialFocus !== 'first-interactive' &&\n      initialFocus !== 'container' &&\n      initialFocus !== 'explicit'\n    ) {\n      throw new TypeError(\n        'BaseDialog initialFocus must be \"first-interactive\", \"container\", or \"explicit\".',\n      );\n    }\n    if (zIndex !== undefined && !Number.isFinite(zIndex)) {\n      throw new TypeError('BaseDialog zIndex must be a finite number.');\n    }\n\n    const messages = useMonkeysLocaleMessages().dialog;\n    const resolvedAppearance = useMonkeysBaseAppearance(appearance);\n    const componentAttributes = useMonkeysComponentAttributes();\n    const resolvedCloseLabel =\n      closeLabel === undefined ? messages.close : closeLabel;\n    const theme = resolveBaseAppearance(resolvedAppearance);\n    const overlayPortal = useBaseOverlayPortal({ disabled: !portal });\n    const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);\n    const panelRef = useRef<HTMLDivElement | null>(null);\n    const returnFocusRef = useRef<HTMLElement | null>(null);\n    const isControlled = open !== undefined;\n    const isOpen = isControlled ? open : uncontrolledOpen;\n    const portalState =\n      portal && overlayPortal.shouldPortal ? 'portaled' : 'inline';\n    const hasTitle = hasRenderableNode(title);\n    const hasDescription = hasRenderableNode(description);\n    const hasCustomHeader = hasRenderableNode(header);\n\n    if (\n      showCloseButton &&\n      (typeof resolvedCloseLabel !== 'string' || !resolvedCloseLabel.trim())\n    ) {\n      throw new TypeError(\n        'BaseDialog closeLabel must be a non-empty string when showCloseButton is true.',\n      );\n    }\n\n    const handleOpenChange = (nextOpen: boolean) => {\n      if (!isControlled) {\n        setUncontrolledOpen(nextOpen);\n      }\n      onOpenChange?.(nextOpen);\n    };\n\n    useEffect(() => {\n      if (!isOpen || !keepMounted) return undefined;\n      const panel = panelRef.current;\n      const ownerDocument = panel?.ownerDocument;\n      const ownerWindow = ownerDocument?.defaultView;\n      if (!panel || !ownerDocument || !ownerWindow) return undefined;\n\n      returnFocusRef.current =\n        ownerDocument.activeElement instanceof ownerWindow.HTMLElement\n          ? ownerDocument.activeElement\n          : null;\n      const focusableSelector = [\n        'a[href]',\n        'button:not([disabled])',\n        'input:not([disabled])',\n        'select:not([disabled])',\n        'textarea:not([disabled])',\n        '[tabindex]:not([tabindex=\"-1\"])',\n      ].join(',');\n      const focusInitial = () => {\n        const firstInteractive = panel.querySelector<HTMLElement>(focusableSelector);\n        const target =\n          initialFocus === 'container'\n            ? panel\n            : initialFocus === 'explicit'\n              ? initialFocusRef?.current ?? panel\n              : firstInteractive ?? panel;\n        target.focus();\n      };\n      const frame = ownerWindow.requestAnimationFrame(focusInitial);\n      const handleKeyDown = (event: KeyboardEvent) => {\n        if (event.key === 'Escape' && closeOnEscape) {\n          event.preventDefault();\n          event.stopPropagation();\n          handleOpenChange(false);\n          return;\n        }\n        if (event.key !== 'Tab' || !trapFocus) return;\n        const focusable = Array.from(\n          panel.querySelectorAll<HTMLElement>(focusableSelector),\n        );\n        if (focusable.length === 0) {\n          event.preventDefault();\n          panel.focus();\n          return;\n        }\n        const first = focusable[0];\n        const last = focusable[focusable.length - 1];\n        if (event.shiftKey && ownerDocument.activeElement === first) {\n          event.preventDefault();\n          last.focus();\n        } else if (!event.shiftKey && ownerDocument.activeElement === last) {\n          event.preventDefault();\n          first.focus();\n        }\n      };\n      ownerWindow.addEventListener('keydown', handleKeyDown);\n      return () => {\n        ownerWindow.cancelAnimationFrame(frame);\n        ownerWindow.removeEventListener('keydown', handleKeyDown);\n        if (restoreFocus && returnFocusRef.current?.isConnected) {\n          returnFocusRef.current.focus();\n        }\n      };\n    }, [\n      closeOnEscape,\n      initialFocus,\n      initialFocusRef,\n      isOpen,\n      keepMounted,\n      restoreFocus,\n      trapFocus,\n    ]);\n\n    const semanticHeader =\n      hasCustomHeader || hasTitle || hasDescription ? (\n        <div\n          {...componentAttributes}\n          data-monkeys-component=\"dialog\"\n          data-slot=\"header\"\n          data-state={isOpen ? 'open' : 'closed'}\n          data-portal={portalState}\n          className={cn(theme.slots.dialogHeader, classNames?.header)}\n        >\n          {hasCustomHeader ? header : null}\n          {hasTitle ? (\n            <Dialog.Title\n              {...componentAttributes}\n              data-monkeys-component=\"dialog\"\n              data-slot=\"title\"\n              data-state={isOpen ? 'open' : 'closed'}\n              data-portal={portalState}\n              className={\n                hasCustomHeader\n                  ? 'sr-only'\n                  : cn(theme.slots.dialogTitle, classNames?.title)\n              }\n            >\n              {title}\n            </Dialog.Title>\n          ) : null}\n          {hasDescription ? (\n            <Dialog.Description\n              {...componentAttributes}\n              data-monkeys-component=\"dialog\"\n              data-slot=\"description\"\n              data-state={isOpen ? 'open' : 'closed'}\n              data-portal={portalState}\n              className={\n                hasCustomHeader\n                  ? 'sr-only'\n                  : cn(\n                      theme.slots.dialogDescription,\n                      classNames?.description,\n                    )\n              }\n            >\n              {description}\n            </Dialog.Description>\n          ) : null}\n        </div>\n      ) : null;\n\n    const triggerNode = renderTrigger({\n      trigger,\n      triggerLabel,\n      triggerIcon,\n      triggerTone,\n      triggerDisabled,\n      theme,\n    });\n\n    const dialogLayers = isOpen || keepMounted ? (\n      <>\n        <Dialog.Overlay\n          forceMount={keepMounted || undefined}\n          hidden={!isOpen}\n          {...componentAttributes}\n          aria-hidden=\"true\"\n          data-monkeys-component=\"dialog\"\n          data-slot=\"overlay\"\n          data-portal={portalState}\n          className={cn(theme.slots.dialogOverlay, classNames?.overlay)}\n          style={{ ...theme.styles.dialogOverlay, zIndex }}\n        />\n        <div\n          {...componentAttributes}\n          hidden={!isOpen}\n          data-monkeys-component=\"dialog\"\n          data-slot=\"content\"\n          data-state={isOpen ? 'open' : 'closed'}\n          data-portal={portalState}\n          className={cn(theme.slots.dialogContent, classNames?.content)}\n          style={{ zIndex }}\n        >\n          <Dialog.Content\n            forceMount={keepMounted || undefined}\n            {...componentAttributes}\n            {...(!hasTitle ? { 'aria-labelledby': undefined } : {})}\n            {...(!hasDescription ? { 'aria-describedby': undefined } : {})}\n            asChild\n            onOpenAutoFocus={(event) => {\n              if (keepMounted) event.preventDefault();\n            }}\n            onCloseAutoFocus={(event) => {\n              if (keepMounted) event.preventDefault();\n            }}\n            onEscapeKeyDown={(event) => {\n              if (keepMounted || !closeOnEscape) event.preventDefault();\n            }}\n            onPointerDownOutside={(event) => {\n              if (!closeOnOverlayClick) event.preventDefault();\n            }}\n          >\n            <div\n              {...componentAttributes}\n              ref={panelRef}\n              tabIndex={-1}\n              aria-modal=\"true\"\n              data-monkeys-component=\"dialog\"\n              data-slot=\"panel\"\n              data-portal={portalState}\n              className={cn(theme.slots.dialogPanel, classNames?.panel)}\n              style={theme.styles.dialogPanel}\n            >\n              {semanticHeader}\n\n              {showCloseButton ? (\n                <Dialog.Close asChild>\n                  <button\n                    {...componentAttributes}\n                    type=\"button\"\n                    aria-label={resolvedCloseLabel}\n                    title={resolvedCloseLabel}\n                    data-monkeys-component=\"dialog\"\n                    data-slot=\"close\"\n                    data-state={isOpen ? 'open' : 'closed'}\n                    data-portal={portalState}\n                    className={cn(\n                      theme.slots.dialogClose,\n                      classNames?.close,\n                    )}\n                  >\n                    ×\n                  </button>\n                </Dialog.Close>\n              ) : null}\n\n              <div\n                {...componentAttributes}\n                data-monkeys-component=\"dialog\"\n                data-slot=\"body\"\n                data-state={isOpen ? 'open' : 'closed'}\n                data-portal={portalState}\n                className={cn(theme.slots.dialogBody, classNames?.body)}\n              >\n                {children}\n              </div>\n\n              {hasRenderableNode(footer) ? (\n                <div\n                  {...componentAttributes}\n                  data-monkeys-component=\"dialog\"\n                  data-slot=\"footer\"\n                  data-state={isOpen ? 'open' : 'closed'}\n                  data-portal={portalState}\n                  className={cn(theme.slots.dialogFooter, classNames?.footer)}\n                >\n                  {footer}\n                </div>\n              ) : null}\n            </div>\n          </Dialog.Content>\n        </div>\n      </>\n    ) : null;\n\n    return (\n      <div\n        {...componentAttributes}\n        {...dialogProps}\n        ref={ref}\n        id={id}\n        data-monkeys-component=\"dialog\"\n        data-slot=\"root\"\n        data-state={isOpen ? 'open' : 'closed'}\n        data-portal={portalState}\n        className={cn(theme.slots.dialogRoot, classNames?.root, className)}\n        style={style}\n      >\n        <Dialog.Root\n          open={isOpen}\n          onOpenChange={handleOpenChange}\n          modal={!keepMounted && trapFocus}\n        >\n          {triggerNode ? (\n            <Dialog.Trigger\n              {...componentAttributes}\n              asChild\n              disabled={triggerDisabled}\n              data-monkeys-component=\"dialog\"\n              data-slot=\"trigger\"\n              data-portal={portalState}\n              data-tone={triggerTone}\n              data-disabled={triggerDisabled || undefined}\n              className={cn(\n                theme.slots.dialogTrigger,\n                triggerDisabled && theme.slots.dialogTriggerDisabled,\n                classNames?.trigger,\n              )}\n            >\n              {triggerNode}\n            </Dialog.Trigger>\n          ) : null}\n          {portal && overlayPortal.shouldPortal ? (\n            <Dialog.Portal\n              {...overlayPortal.radixPortalProps}\n              forceMount={keepMounted || undefined}\n            >\n              {dialogLayers}\n            </Dialog.Portal>\n          ) : (\n            dialogLayers\n          )}\n        </Dialog.Root>\n      </div>\n    );\n  },\n);\n","import { Slot } from '@radix-ui/react-slot';\nimport type { RenderActivation, RenderLayout, RenderNode, RenderStyle, RenderResponsiveRule } from '@inf-monkeys-tech/monkeys';\nimport {\n  forwardRef,\n  useCallback,\n  useEffect,\n  useMemo,\n  useRef,\n  useState,\n} from 'react';\nimport type {\n  CSSProperties,\n  HTMLAttributes,\n  MutableRefObject,\n  ReactNode,\n  Ref,\n} from 'react';\n\nimport { cn } from '../base/utils';\n\nexport type RenderNodeHostElement = 'article' | 'aside' | 'div' | 'main' | 'nav' | 'section';\n\nexport interface RenderNodeScrollPosition {\n  x: number;\n  y: number;\n}\n\nexport interface RenderNodeScrollRestoration {\n  read(key: string): RenderNodeScrollPosition | undefined;\n  write(key: string, position: RenderNodeScrollPosition): void;\n  remove?(key: string): void;\n}\n\nexport interface RenderNodePolicyState {\n  active: boolean;\n  visible: boolean;\n  mounted: boolean;\n  queryEnabled: boolean;\n}\n\nexport interface RenderNodeRuntimeState extends RenderNodePolicyState {\n  elementProps?: HTMLAttributes<HTMLElement> & { ref?: Ref<HTMLElement> };\n  activate(): void;\n  setManualQueryEnabled(enabled: boolean): void;\n}\n\nexport interface RenderNodeHostProps\n  extends Omit<HTMLAttributes<HTMLElement>, 'children'> {\n  node: RenderNode;\n  as?: RenderNodeHostElement;\n  asChild?: boolean;\n  unframed?: boolean;\n  active?: boolean;\n  visible?: boolean;\n  manualQueryEnabled?: boolean;\n  children?: ReactNode | ((runtime: RenderNodeRuntimeState) => ReactNode);\n  loading?: ReactNode;\n  empty?: ReactNode;\n  error?: ReactNode;\n  elementRef?: Ref<HTMLElement>;\n  scrollRestoration?: RenderNodeScrollRestoration | false;\n  onActivate?: (activation: RenderActivation, node: RenderNode) => void;\n  onManualQueryEnabledChange?: (enabled: boolean, node: RenderNode) => void;\n  onRuntimeStateChange?: (state: RenderNodePolicyState, node: RenderNode) => void;\n}\n\nconst refIdentity = (reference: RenderNode['pageRef'] | undefined) => reference?.id;\n\nexport const getRenderNodeDataAttributes = (node: RenderNode) => ({\n  'data-monkeys-node-id': node.nodeId,\n  'data-monkeys-node-kind': node.kind,\n  'data-monkeys-node-version': node.version,\n  'data-monkeys-owner': node.ownerRepo,\n  'data-monkeys-parent-node': node.parentNodeId,\n  'data-monkeys-slot': node.slot,\n  'data-monkeys-page-id': refIdentity(node.pageRef),\n  'data-monkeys-semantic-id': refIdentity(node.semanticRef),\n  'data-monkeys-data-context-id': refIdentity(node.dataContextRef),\n  'data-monkeys-capability-id': refIdentity(node.capabilityRef),\n  'data-monkeys-provider-id': refIdentity(node.providerRef),\n  'data-monkeys-state-id': refIdentity(node.stateRef),\n  'data-monkeys-frame-owner': node.surface.frameOwner,\n  'data-monkeys-surface-tone': node.surface.tone,\n  'data-monkeys-density': node.surface.density,\n  'data-monkeys-scroll-owner': node.scroll.owner,\n  'data-monkeys-scroll-axis': node.scroll.axis,\n  'data-monkeys-scroll-restore-key': node.scroll.restoreKey,\n  'data-monkeys-virtualization-boundary': node.scroll.virtualizationBoundary,\n  'data-monkeys-activation-id': node.activation.activationId,\n  'data-monkeys-activation-mode': node.activation.mode,\n  'data-monkeys-mount-policy': node.lifecycle.mountPolicy,\n  'data-monkeys-query-policy': node.lifecycle.queryPolicy,\n  'data-monkeys-deep-link': node.lifecycle.deepLink,\n  'data-monkeys-focus-return': node.lifecycle.focusReturn,\n  'data-monkeys-layout-mode': node.layout.mode,\n  'data-monkeys-responsive-rules': node.responsive.length,\n  'data-monkeys-child-count': node.children.length,\n  'data-monkeys-access-id': refIdentity(node.accessRef),\n  'data-monkeys-evidence-id': refIdentity(node.evidenceRef),\n  'data-monkeys-render-state': node.state,\n});\n\nconst sessionStorageKey = (key: string) => `monkeys.render.scroll.${key}`;\n\nexport const sessionRenderNodeScrollRestoration: RenderNodeScrollRestoration = {\n  read(key) {\n    if (typeof window === 'undefined') return undefined;\n    try {\n      const value = window.sessionStorage.getItem(sessionStorageKey(key));\n      if (!value) return undefined;\n      const parsed = JSON.parse(value) as Partial<RenderNodeScrollPosition>;\n      return typeof parsed.x === 'number' && typeof parsed.y === 'number'\n        ? { x: parsed.x, y: parsed.y }\n        : undefined;\n    } catch {\n      return undefined;\n    }\n  },\n  write(key, position) {\n    if (typeof window === 'undefined') return;\n    try {\n      window.sessionStorage.setItem(sessionStorageKey(key), JSON.stringify(position));\n    } catch {\n      // Storage may be unavailable in private or embedded browser contexts.\n    }\n  },\n  remove(key) {\n    if (typeof window === 'undefined') return;\n    try {\n      window.sessionStorage.removeItem(sessionStorageKey(key));\n    } catch {\n      // Storage may be unavailable in private or embedded browser contexts.\n    }\n  },\n};\n\nexport const resolveRenderNodeLayout = (node: RenderNode, viewportWidth?: number): RenderLayout => {\n  if (viewportWidth === undefined) return node.layout;\n  const matching = node.responsive.filter((rule) =>\n    (rule.minWidthPx === undefined || viewportWidth >= rule.minWidthPx)\n    && (rule.maxWidthPx === undefined || viewportWidth <= rule.maxWidthPx));\n  return matching.length === 0 ? node.layout : matching[matching.length - 1].layout;\n};\n\nexport const resolveRenderNodeResponsiveStyle = (\n  style: RenderStyle | undefined,\n  responsive: readonly (RenderResponsiveRule & { style?: RenderStyle })[],\n  viewportWidth?: number,\n): RenderStyle | undefined => {\n  const matching = viewportWidth === undefined\n    ? []\n    : responsive.filter((rule) =>\n      (rule.minWidthPx === undefined || viewportWidth >= rule.minWidthPx)\n      && (rule.maxWidthPx === undefined || viewportWidth <= rule.maxWidthPx)\n      && rule.style,\n    );\n  if (matching.length === 0) return style;\n  return matching.reduce<RenderStyle>(\n    (resolved, rule) => ({ ...resolved, ...rule.style }),\n    { ...(style ?? {}) },\n  );\n};\n\nconst LAYOUT_MODE_CLASSES: Record<RenderLayout['mode'], string> = {\n  contents: 'contents',\n  block: 'block',\n  flex: 'flex',\n  grid: 'grid',\n  absolute: 'absolute',\n};\nconst ALIGN_CLASSES = { start: 'items-start', center: 'items-center', end: 'items-end', stretch: 'items-stretch' } as const;\nconst JUSTIFY_CLASSES = { start: 'justify-start', center: 'justify-center', end: 'justify-end', between: 'justify-between', around: 'justify-around' } as const;\n\nconst tokenPathToCssVariable = (value: string): string => {\n  const path = value.slice(1).trim();\n  if (!/^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*$/i.test(path)) throw new TypeError(`Invalid Design Token path ${value}.`);\n  return `var(--monkeys-${path.replace(/\\./g, '-').replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase()})`;\n};\n\nexport const resolveRenderNodeStyle = (style: RenderStyle | undefined): CSSProperties | undefined =>\n  style\n    ? (Object.fromEntries(Object.entries(style).map(([property, value]) => [property, typeof value === 'string' && value.startsWith('$') ? tokenPathToCssVariable(value) : value])) as CSSProperties)\n    : undefined;\n\nexport const getRenderLayoutClassName = (layout: RenderLayout): string => cn(\n  LAYOUT_MODE_CLASSES[layout.mode],\n  layout.mode === 'flex' && (layout.direction === 'row' ? 'flex-row' : 'flex-col'),\n  layout.align && ALIGN_CLASSES[layout.align],\n  layout.justify && JUSTIFY_CLASSES[layout.justify],\n);\n\nconst shouldMountNode = (node: RenderNode, active: boolean, visible: boolean) => {\n  if (node.lifecycle.mountPolicy === 'always') return true;\n  if (node.lifecycle.mountPolicy === 'when-visible') return visible;\n  return active;\n};\n\nconst shouldQueryNode = (\n  node: RenderNode,\n  active: boolean,\n  visible: boolean,\n  manualQueryEnabled: boolean,\n) => {\n  if (node.lifecycle.queryPolicy === 'always') return true;\n  if (node.lifecycle.queryPolicy === 'when-visible') return visible;\n  if (node.lifecycle.queryPolicy === 'when-active') return active;\n  return manualQueryEnabled;\n};\n\nexport const resolveRenderNodePolicyState = (\n  node: RenderNode,\n  input: {\n    active: boolean;\n    visible: boolean;\n    manualQueryEnabled?: boolean;\n    previouslyMounted?: boolean;\n  },\n): RenderNodePolicyState => {\n  const policyMounted = shouldMountNode(node, input.active, input.visible);\n  return {\n    active: input.active,\n    visible: input.visible,\n    mounted: policyMounted || (node.lifecycle.retainOnDeactivate && input.previouslyMounted === true),\n    queryEnabled: shouldQueryNode(node, input.active, input.visible, input.manualQueryEnabled === true),\n  };\n};\n\nconst resolveRenderNodeContent = (\n  node: RenderNode,\n  content: ReactNode,\n  loading: ReactNode,\n  empty: ReactNode,\n  error: ReactNode,\n) => {\n  if (node.state === 'loading' && loading !== undefined) return loading;\n  if (node.state === 'empty' && empty !== undefined) return empty;\n  if (node.state === 'error' && error !== undefined) return error;\n  return content;\n};\n\nconst assignRef = (ref: Ref<HTMLElement> | undefined, value: HTMLElement | null) => {\n  if (typeof ref === 'function') ref(value);\n  else if (ref) (ref as MutableRefObject<HTMLElement | null>).current = value;\n};\n\nexport const RenderNodeHost = forwardRef<HTMLElement, RenderNodeHostProps>(function RenderNodeHost({\n  node,\n  as = 'div',\n  active = true,\n  visible = active,\n  manualQueryEnabled = false,\n  asChild = false,\n  unframed = false,\n  children,\n  loading,\n  empty,\n  error,\n  elementRef,\n  scrollRestoration = sessionRenderNodeScrollRestoration,\n  onActivate,\n  onManualQueryEnabledChange,\n  onRuntimeStateChange,\n  onScroll,\n  className,\n  hidden,\n  role,\n  'aria-live': ariaLive,\n  'aria-atomic': ariaAtomic,\n  ...props\n}: RenderNodeHostProps, forwardedRef) {\n  const Component = asChild ? Slot : as;\n  const hostRef = useRef<HTMLElement | null>(null);\n  const [viewportWidth, setViewportWidth] = useState<number | undefined>(() =>\n    typeof window === 'undefined' ? undefined : window.innerWidth);\n  const [mountedNodeId, setMountedNodeId] = useState<string | undefined>(() =>\n    shouldMountNode(node, active, visible) ? node.nodeId : undefined);\n  const policyMounted = shouldMountNode(node, active, visible);\n\n  useEffect(() => {\n    if (node.responsive.length === 0 || typeof window === 'undefined') return undefined;\n    const handleResize = () => setViewportWidth(window.innerWidth);\n    handleResize();\n    window.addEventListener('resize', handleResize, { passive: true });\n    return () => window.removeEventListener('resize', handleResize);\n  }, [node.responsive.length]);\n\n  const resolvedLayout = useMemo(() => resolveRenderNodeLayout(node, viewportWidth), [node, viewportWidth]);\n  const resolvedStyle = useMemo(\n    () => resolveRenderNodeResponsiveStyle(node.style, node.responsive, viewportWidth),\n    [node.responsive, node.style, viewportWidth],\n  );\n\n  useEffect(() => {\n    if (!active || !visible || !node.lifecycle.deepLink || !['page', 'record'].includes(node.kind)) return;\n    const element = hostRef.current;\n    if (!element || element.style.display === 'contents') return;\n    element.focus({ preventScroll: true });\n  }, [active, node.kind, node.lifecycle.deepLink, node.nodeId, visible]);\n\n  useEffect(() => {\n    if (policyMounted) setMountedNodeId(node.nodeId);\n    else if (!node.lifecycle.retainOnDeactivate) setMountedNodeId(undefined);\n  }, [node.lifecycle.retainOnDeactivate, node.nodeId, policyMounted]);\n\n  const policyState = useMemo(() => resolveRenderNodePolicyState(node, {\n    active,\n    visible,\n    manualQueryEnabled,\n    previouslyMounted: mountedNodeId === node.nodeId,\n  }), [active, manualQueryEnabled, mountedNodeId, node, visible]);\n\n  const activate = useCallback(() => {\n    onActivate?.(node.activation, node);\n  }, [node, onActivate]);\n\n  const setManualQueryEnabled = useCallback((enabled: boolean) => {\n    onManualQueryEnabledChange?.(enabled, node);\n  }, [node, onManualQueryEnabledChange]);\n\n  const runtimeState = useMemo<RenderNodeRuntimeState>(() => ({\n    ...policyState,\n    activate,\n    setManualQueryEnabled,\n  }), [activate, policyState, setManualQueryEnabled]);\n\n  useEffect(() => {\n    onRuntimeStateChange?.(policyState, node);\n  }, [node, onRuntimeStateChange, policyState]);\n\n  const setHostRef = useCallback((value: HTMLElement | null) => {\n    hostRef.current = value;\n    assignRef(elementRef, value);\n    assignRef(forwardedRef, value);\n  }, [elementRef, forwardedRef]);\n\n  const scrollAdapter = scrollRestoration === false ? undefined : scrollRestoration;\n  const restoresHostScroll = scrollAdapter !== undefined\n    && node.scroll.owner !== 'provider'\n    && !node.scroll.virtualizationBoundary\n    && node.scroll.axis !== 'none'\n    && node.scroll.restoreKey !== undefined;\n\n  const readPosition = useCallback((): RenderNodeScrollPosition => {\n    const element = hostRef.current;\n    if (!element) return { x: 0, y: 0 };\n    return {\n      x: node.scroll.axis === 'y' ? 0 : element.scrollLeft,\n      y: node.scroll.axis === 'x' ? 0 : element.scrollTop,\n    };\n  }, [node.scroll.axis]);\n\n  useEffect(() => {\n    if (!policyState.mounted || !restoresHostScroll || !scrollAdapter) return undefined;\n    const key = node.scroll.restoreKey!;\n    const element = hostRef.current;\n    const position = scrollAdapter.read(key);\n    let frame: number | undefined;\n    if (element && position) {\n      const restore = () => element.scrollTo({\n        left: node.scroll.axis === 'y' ? element.scrollLeft : position.x,\n        top: node.scroll.axis === 'x' ? element.scrollTop : position.y,\n        behavior: 'auto',\n      });\n      if (typeof window !== 'undefined' && typeof window.requestAnimationFrame === 'function') {\n        frame = window.requestAnimationFrame(restore);\n      } else {\n        restore();\n      }\n    }\n    return () => {\n      if (frame !== undefined && typeof window !== 'undefined') window.cancelAnimationFrame(frame);\n      scrollAdapter.write(key, readPosition());\n    };\n  }, [node.scroll.axis, node.scroll.restoreKey, policyState.mounted, readPosition, restoresHostScroll, scrollAdapter]);\n\n  if (!policyState.mounted) return null;\n\n  const elementProps: NonNullable<RenderNodeRuntimeState['elementProps']> & Record<`data-${string}`, unknown> = {\n    ...props,\n    ...getRenderNodeDataAttributes(node),\n    ref: setHostRef,\n    className: cn((!unframed || resolvedLayout.mode !== 'contents') && getRenderLayoutClassName(resolvedLayout), className),\n    style: {\n      ...(resolvedLayout.mode === 'grid' && resolvedLayout.columns ? { gridTemplateColumns: `repeat(${resolvedLayout.columns}, minmax(0, 1fr))` } : {}),\n      ...resolveRenderNodeStyle(resolvedStyle),\n      ...props.style,\n    },\n    hidden: hidden || !policyState.visible || undefined,\n    role: role ?? (node.state === 'error' ? 'alert' : node.state === 'loading' || node.state === 'empty' ? 'status' : undefined),\n    tabIndex: props.tabIndex ?? (node.lifecycle.deepLink && ['page', 'record'].includes(node.kind) ? -1 : undefined),\n    'data-monkeys-active': policyState.active,\n    'data-monkeys-mounted': policyState.mounted,\n    'data-monkeys-query-enabled': policyState.queryEnabled,\n    'aria-busy': node.state === 'loading' || undefined,\n    'aria-disabled': node.state === 'disabled' || undefined,\n    'aria-hidden': !policyState.visible || undefined,\n    'aria-live': ariaLive ?? (node.state === 'error' ? 'assertive' : node.state === 'loading' || node.state === 'empty' ? 'polite' : undefined),\n    'aria-atomic': ariaAtomic ?? (node.state === 'loading' || node.state === 'empty' || node.state === 'error' ? true : undefined),\n    onScroll: (event) => {\n      if (restoresHostScroll && scrollAdapter && node.scroll.restoreKey) scrollAdapter.write(node.scroll.restoreKey, readPosition());\n      onScroll?.(event);\n    },\n  };\n  const renderedChildren = typeof children === 'function'\n    ? children(unframed ? { ...runtimeState, elementProps } : runtimeState)\n    : children;\n  if (unframed) return <>{resolveRenderNodeContent(node, renderedChildren, loading, empty, error)}</>;\n\n  return (\n    <Component {...elementProps} ref={setHostRef as never}\n    >\n      {resolveRenderNodeContent(node, renderedChildren, loading, empty, error)}\n    </Component>\n  );\n});\n","import type { OverlayNode, OverlayZIndexLane } from '@inf-monkeys-tech/monkeys';\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\nimport type { ReactNode, RefObject } from 'react';\n\nimport { BaseDialog } from '../base/BaseDialog';\nimport type { BaseAppearance, BaseDialogClassNames } from '../base/types';\nimport {\n  getRenderNodeDataAttributes,\n  RenderNodeHost,\n} from './RenderNodeHost';\nimport type {\n  RenderNodeHostProps,\n  RenderNodeRuntimeState,\n} from './RenderNodeHost';\n\nexport interface OverlayHistoryAdapter {\n  getCurrentUrl(): string;\n  push(url: string): void;\n  replace(url: string): void;\n  back(): void;\n  subscribe(listener: (url: string) => void): () => void;\n}\n\nexport interface OverlayNodeRuntimeContext extends RenderNodeRuntimeState {\n  open: boolean;\n  zIndexLane: OverlayZIndexLane;\n  zIndex: number;\n  initialFocusRef?: RefObject<HTMLElement | null>;\n  focusReturnRef?: RefObject<HTMLElement | null>;\n  renderNodeAttributes: ReturnType<typeof getRenderNodeDataAttributes>;\n  onOpenChange(open: boolean): void;\n  requestClose(): void;\n}\n\nexport interface OverlayNodeHostProps {\n  node: OverlayNode;\n  open: boolean;\n  renderStrategy?: 'dialog' | 'delegate';\n  title?: ReactNode;\n  description?: ReactNode;\n  footer?: ReactNode;\n  closeLabel?: string;\n  children?: ReactNode | ((runtime: OverlayNodeRuntimeContext) => ReactNode);\n  appearance?: BaseAppearance;\n  className?: string;\n  classNames?: BaseDialogClassNames;\n  initialFocusRef?: RefObject<HTMLElement | null>;\n  focusReturnRef?: RefObject<HTMLElement | null>;\n  historyAdapter?: OverlayHistoryAdapter | false;\n  manualQueryEnabled?: boolean;\n  onActivate?: RenderNodeHostProps['onActivate'];\n  onRuntimeStateChange?: RenderNodeHostProps['onRuntimeStateChange'];\n  onOpenChange: (open: boolean) => void;\n}\n\nconst OVERLAY_Z_INDEX: Record<OverlayZIndexLane, number> = {\n  popover: 40,\n  drawer: 50,\n  modal: 60,\n  fullscreen: 70,\n  system: 80,\n};\n\nexport const getOverlayZIndex = (lane: OverlayZIndexLane) => OVERLAY_Z_INDEX[lane];\n\nconst OVERLAY_PRESENTATION_CLASS_NAMES: Record<\n  OverlayNode['presentation'],\n  Pick<BaseDialogClassNames, 'body' | 'content' | 'panel'>\n> = {\n  drawer: {\n    content: '!items-stretch !justify-end !p-0',\n    panel: '!h-dvh !max-h-none !w-full !max-w-[min(100vw,40rem)] !rounded-none !border-y-0 !border-r-0',\n    body: 'min-h-0 flex-1 overflow-auto',\n  },\n  modal: {},\n  fullscreen: {\n    content: '!items-stretch !justify-stretch !p-0',\n    panel: '!h-dvh !max-h-none !w-screen !max-w-none !rounded-none !border-0',\n    body: 'min-h-0 flex-1 overflow-auto',\n  },\n};\n\nexport const getOverlayPresentationClassNames = (\n  presentation: OverlayNode['presentation'],\n): Pick<BaseDialogClassNames, 'body' | 'content' | 'panel'> => ({\n  ...OVERLAY_PRESENTATION_CLASS_NAMES[presentation],\n});\n\nconst relativeUrl = (input: string, url: URL) =>\n  input.startsWith('/') && !input.startsWith('//')\n    ? `${url.pathname}${url.search}${url.hash}`\n    : url.toString();\n\nexport const isOverlayUrlActive = (node: OverlayNode, input: string): boolean => {\n  const url = new URL(input, 'https://monkeys.local');\n  return url.searchParams.get(node.url.parameter) === node.url.value;\n};\n\nexport const buildOverlayUrl = (node: OverlayNode, input: string, open: boolean): string => {\n  const url = new URL(input, 'https://monkeys.local');\n  if (open) url.searchParams.set(node.url.parameter, node.url.value);\n  else if (url.searchParams.get(node.url.parameter) === node.url.value) url.searchParams.delete(node.url.parameter);\n  return relativeUrl(input, url);\n};\n\nexport const browserOverlayHistoryAdapter: OverlayHistoryAdapter = {\n  getCurrentUrl() {\n    return typeof window === 'undefined' ? 'https://monkeys.local/' : window.location.href;\n  },\n  push(url) {\n    if (typeof window !== 'undefined') window.history.pushState(window.history.state, '', url);\n  },\n  replace(url) {\n    if (typeof window !== 'undefined') window.history.replaceState(window.history.state, '', url);\n  },\n  back() {\n    if (typeof window !== 'undefined') window.history.back();\n  },\n  subscribe(listener) {\n    if (typeof window === 'undefined') return () => undefined;\n    const handlePopState = () => listener(window.location.href);\n    window.addEventListener('popstate', handlePopState);\n    return () => window.removeEventListener('popstate', handlePopState);\n  },\n};\n\nconst scheduleFocus = (target: HTMLElement | null | undefined) => {\n  if (!target?.isConnected) return;\n  if (typeof window !== 'undefined' && typeof window.requestAnimationFrame === 'function') {\n    window.requestAnimationFrame(() => target.focus());\n  } else {\n    target.focus();\n  }\n};\n\nexport function OverlayNodeHost({\n  node,\n  open,\n  renderStrategy = 'dialog',\n  title,\n  description,\n  footer,\n  closeLabel,\n  children,\n  appearance,\n  className,\n  classNames,\n  initialFocusRef,\n  focusReturnRef,\n  historyAdapter = browserOverlayHistoryAdapter,\n  manualQueryEnabled = false,\n  onActivate,\n  onRuntimeStateChange,\n  onOpenChange,\n}: OverlayNodeHostProps) {\n  const historyEntryOwnedRef = useRef(false);\n  const initializedUrlRef = useRef(false);\n  const zIndex = getOverlayZIndex(node.zIndexLane);\n  const syncUrl = useCallback((nextOpen: boolean) => {\n    if (!node.renderNode.lifecycle.deepLink || historyAdapter === false) return;\n    const currentUrl = historyAdapter.getCurrentUrl();\n    if (isOverlayUrlActive(node, currentUrl) === nextOpen) return;\n    const nextUrl = buildOverlayUrl(node, currentUrl, nextOpen);\n    if (nextOpen) {\n      if (node.url.openMode === 'push') {\n        historyAdapter.push(nextUrl);\n        historyEntryOwnedRef.current = true;\n      } else {\n        historyAdapter.replace(nextUrl);\n        historyEntryOwnedRef.current = false;\n      }\n      return;\n    }\n    if (node.url.closeMode === 'back' && historyEntryOwnedRef.current) {\n      historyEntryOwnedRef.current = false;\n      historyAdapter.back();\n    } else {\n      historyAdapter.replace(nextUrl);\n      historyEntryOwnedRef.current = false;\n    }\n  }, [historyAdapter, node]);\n\n  const requestOpenChange = useCallback((nextOpen: boolean) => {\n    syncUrl(nextOpen);\n    onOpenChange(nextOpen);\n  }, [onOpenChange, syncUrl]);\n\n  useEffect(() => {\n    if (!node.renderNode.lifecycle.deepLink || historyAdapter === false) return undefined;\n    const urlOpen = isOverlayUrlActive(node, historyAdapter.getCurrentUrl());\n    if (!initializedUrlRef.current) {\n      initializedUrlRef.current = true;\n      if (urlOpen && !open) onOpenChange(true);\n      else if (!urlOpen && open) syncUrl(true);\n    } else if (urlOpen !== open) {\n      syncUrl(open);\n    }\n    return historyAdapter.subscribe((url) => {\n      historyEntryOwnedRef.current = false;\n      const nextOpen = isOverlayUrlActive(node, url);\n      if (nextOpen !== open) onOpenChange(nextOpen);\n    });\n  }, [historyAdapter, node, onOpenChange, open, syncUrl]);\n\n  useEffect(() => {\n    if (!open || !node.renderNode.lifecycle.focusReturn || typeof document === 'undefined') return undefined;\n    const target = focusReturnRef?.current\n      ?? (document.activeElement instanceof HTMLElement ? document.activeElement : null);\n    return () => scheduleFocus(focusReturnRef?.current ?? target);\n  }, [focusReturnRef, node.renderNode.lifecycle.focusReturn, open]);\n\n  const renderNodeAttributes = useMemo(\n    () => getRenderNodeDataAttributes(node.renderNode),\n    [node.renderNode],\n  );\n  const presentationClassNames = getOverlayPresentationClassNames(node.presentation);\n  const resolvedClassNames: BaseDialogClassNames = {\n    ...classNames,\n    body: classNames?.body ?? presentationClassNames.body,\n    content: classNames?.content ?? presentationClassNames.content,\n    panel: classNames?.panel ?? presentationClassNames.panel,\n  };\n\n  return (\n    <RenderNodeHost\n      node={node.renderNode}\n      active={open}\n      visible={open}\n      manualQueryEnabled={manualQueryEnabled}\n      className={className}\n      style={renderStrategy === 'delegate' ? { display: 'contents' } : undefined}\n      onActivate={onActivate}\n      onRuntimeStateChange={onRuntimeStateChange}\n    >\n      {(runtime) => {\n        const context: OverlayNodeRuntimeContext = {\n          ...runtime,\n          open,\n          zIndexLane: node.zIndexLane,\n          zIndex,\n          initialFocusRef,\n          focusReturnRef,\n          renderNodeAttributes,\n          onOpenChange: requestOpenChange,\n          requestClose: () => requestOpenChange(false),\n        };\n        const content = typeof children === 'function' ? children(context) : children;\n        if (renderStrategy === 'delegate') return content;\n        return (\n          <BaseDialog\n            id={node.overlayId}\n            open={open}\n            title={title}\n            description={description}\n            footer={footer}\n            closeLabel={closeLabel}\n            closeOnEscape={node.close.escape}\n            closeOnOverlayClick={node.close.backdrop}\n            keepMounted={node.renderNode.lifecycle.retainOnDeactivate}\n            trapFocus={node.focus.trap}\n            restoreFocus={false}\n            initialFocus={node.focus.initial}\n            initialFocusRef={initialFocusRef}\n            zIndex={zIndex}\n            appearance={appearance}\n            classNames={resolvedClassNames}\n            data-monkeys-overlay-presentation={node.presentation}\n            data-monkeys-overlay-z-index-lane={node.zIndexLane}\n            onOpenChange={requestOpenChange}\n          >\n            {content}\n          </BaseDialog>\n        );\n      }}\n    </RenderNodeHost>\n  );\n}\n","import type { JsonObject, RenderNode, RenderTree } from '@inf-monkeys-tech/monkeys';\nimport { compileRenderTree } from '@inf-monkeys-tech/monkeys/runtime';\nimport { useMemo } from 'react';\nimport type { ReactNode, Ref } from 'react';\n\nimport { RenderNodeHost } from './RenderNodeHost';\nimport type { RenderNodeHostElement, RenderNodeHostProps, RenderNodeRuntimeState } from './RenderNodeHost';\n\nexport interface RenderTreeNodeContext extends RenderNodeRuntimeState {\n  node: RenderNode;\n  scope?: JsonObject;\n  instanceKey?: string;\n  children: ReactNode;\n  childNodes: readonly RenderNode[];\n  childrenBySlot: Readonly<Record<string, ReactNode>>;\n}\n\nexport interface RenderTreeHostProps {\n  tree: RenderTree;\n  maxMaterializedNodes?: number;\n  resolveNodeInstances?: (node: RenderNode, parentScope?: JsonObject) => readonly { key: string; scope: JsonObject }[] | undefined;\n  wrapNode?: (context: { node: RenderNode; scope?: JsonObject; instanceKey?: string; content: ReactNode }) => ReactNode;\n  activeNodeIds?: ReadonlySet<string>;\n  visibleNodeIds?: ReadonlySet<string>;\n  manualQueryNodeIds?: ReadonlySet<string>;\n  loading?: ReactNode;\n  empty?: ReactNode;\n  error?: ReactNode;\n  unframedForNode?: (node: RenderNode) => boolean;\n  asChildForNode?: (node: RenderNode) => boolean;\n  elementForNode?: (node: RenderNode) => RenderNodeHostElement;\n  classNameForNode?: (node: RenderNode) => string | undefined;\n  elementRefForNode?: (node: RenderNode) => Ref<HTMLElement> | undefined;\n  scrollRestoration?: RenderNodeHostProps['scrollRestoration'];\n  renderNode?: (context: RenderTreeNodeContext) => ReactNode;\n  onActivate?: RenderNodeHostProps['onActivate'];\n  onManualQueryEnabledChange?: RenderNodeHostProps['onManualQueryEnabledChange'];\n  onRuntimeStateChange?: RenderNodeHostProps['onRuntimeStateChange'];\n}\n\nconst defaultElementForNode = (node: RenderNode): RenderNodeHostElement => {\n  if (node.kind === 'shell') return 'main';\n  if (node.kind === 'navigation') return 'nav';\n  if (node.kind === 'detail') return 'aside';\n  if (node.kind === 'record') return 'article';\n  return 'section';\n};\n\nexport function RenderTreeHost({\n  tree,\n  maxMaterializedNodes = 4096,\n  resolveNodeInstances,\n  wrapNode,\n  activeNodeIds,\n  visibleNodeIds,\n  manualQueryNodeIds,\n  loading,\n  empty,\n  error,\n  elementForNode = defaultElementForNode,\n  asChildForNode,\n  unframedForNode,\n  classNameForNode,\n  elementRefForNode,\n  scrollRestoration,\n  renderNode,\n  onActivate,\n  onManualQueryEnabledChange,\n  onRuntimeStateChange,\n}: RenderTreeHostProps) {\n  const compiled = useMemo(() => compileRenderTree(tree), [tree]);\n  if (!Number.isSafeInteger(maxMaterializedNodes) || maxMaterializedNodes < 1 || maxMaterializedNodes > 4096) throw new RangeError('RenderTree materialization budget must be an integer from 1 to 4096.');\n  let materializedNodes = 0;\n\n  const renderBranch = (node: RenderNode, parentScope?: JsonObject, parentInstanceKey?: string): ReactNode => {\n    const instances = resolveNodeInstances?.(node, parentScope);\n    if (instances === undefined) return renderInstance(node, parentScope, parentInstanceKey);\n    const keys = new Set<string>();\n    const rendered = instances.map(({ key, scope }) => {\n      if (!key || keys.has(key)) throw new TypeError(`RenderNode ${node.nodeId} requires unique non-empty instance keys.`);\n      keys.add(key);\n      return renderInstance(node, scope, JSON.stringify([parentInstanceKey ?? null, node.nodeId, key]));\n    });\n    return rendered.length === 1 ? rendered[0] : rendered;\n  };\n\n  const renderInstance = (node: RenderNode, scope?: JsonObject, instanceKey?: string): ReactNode => {\n    if (++materializedNodes > maxMaterializedNodes) throw new RangeError('RenderTree materialization budget exceeded.');\n    const runtimeNode = instanceKey && node.scroll.restoreKey\n      ? { ...node, scroll: { ...node.scroll, restoreKey: JSON.stringify([node.scroll.restoreKey, instanceKey]) } }\n      : node;\n    const childNodes = compiled.childrenOf(node.nodeId);\n    const descendants = childNodes.map((child) => renderBranch(child, scope, instanceKey));\n    const descendantsBySlot = childNodes.reduce<Record<string, ReactNode[]>>((slots, child, index) => {\n      const slot = child.slot ?? child.nodeId;\n      (slots[slot] ??= []).push(descendants[index]);\n      return slots;\n    }, {});\n    const childrenBySlot = Object.freeze(Object.fromEntries(\n      Object.entries(descendantsBySlot).map(([slot, slotDescendants]) => [\n        slot,\n        slotDescendants.length === 1 ? slotDescendants[0] : <>{slotDescendants}</>,\n      ]),\n    ));\n    return (\n      <RenderNodeHost\n        key={JSON.stringify([node.nodeId, instanceKey ?? null])}\n        node={runtimeNode}\n        data-monkeys-instance-key={instanceKey}\n        as={elementForNode(node)}\n        asChild={asChildForNode?.(node)}\n        unframed={unframedForNode?.(node)}\n        active={activeNodeIds?.has(node.nodeId) ?? true}\n        visible={visibleNodeIds?.has(node.nodeId) ?? true}\n        manualQueryEnabled={manualQueryNodeIds?.has(node.nodeId) ?? false}\n        loading={loading}\n        empty={empty}\n        error={error}\n        className={classNameForNode?.(node)}\n        elementRef={elementRefForNode?.(node)}\n        scrollRestoration={scrollRestoration}\n        onActivate={onActivate}\n        onManualQueryEnabledChange={onManualQueryEnabledChange}\n        onRuntimeStateChange={onRuntimeStateChange}\n      >\n        {(runtime) => {\n          const content = renderNode?.({\n            ...runtime,\n            node: runtimeNode,\n            scope,\n            instanceKey,\n            children: descendants,\n            childNodes,\n            childrenBySlot,\n          }) ?? descendants;\n          return wrapNode ? wrapNode({ node: runtimeNode, scope, instanceKey, content }) : content;\n        }}\n      </RenderNodeHost>\n    );\n  };\n\n  return <>{renderBranch(compiled.root)}</>;\n}\n","import type { RenderActivation, RenderNode, RenderTree } from '@inf-monkeys-tech/monkeys';\nimport { compileRenderTree } from '@inf-monkeys-tech/monkeys/runtime';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { RenderTreeHost } from './RenderTreeHost';\nimport type { RenderTreeHostProps } from './RenderTreeHost';\n\nexport interface RenderTreeRuntimeSnapshot {\n  contract: 'RenderTreeRuntimeSnapshot';\n  treeId: string;\n  activeNodeIds: string[];\n  manualQueryNodeIds: string[];\n  selectedActivationId?: string;\n}\n\nexport interface RenderTreeHistoryAdapter {\n  read(): RenderTreeRuntimeSnapshot | undefined;\n  replace(snapshot: RenderTreeRuntimeSnapshot): void;\n  push(snapshot: RenderTreeRuntimeSnapshot): void;\n  navigate(path: string, mode: 'push' | 'replace', snapshot: RenderTreeRuntimeSnapshot): void;\n  subscribe(listener: (snapshot: RenderTreeRuntimeSnapshot | undefined) => void): () => void;\n}\n\nconst STATE_KEY = '__monkeysRenderTree';\n\nconst readBrowserSnapshot = (): RenderTreeRuntimeSnapshot | undefined => {\n  if (typeof window === 'undefined') return undefined;\n  const value = window.history.state?.[STATE_KEY] as RenderTreeRuntimeSnapshot | undefined;\n  return value?.contract === 'RenderTreeRuntimeSnapshot' ? value : undefined;\n};\n\nconst withSnapshot = (snapshot: RenderTreeRuntimeSnapshot) => ({\n  ...(typeof window === 'undefined' || !window.history.state || typeof window.history.state !== 'object'\n    ? {}\n    : window.history.state),\n  [STATE_KEY]: snapshot,\n});\n\nconst notifyBrowserHistory = () => {\n  if (typeof window === 'undefined') return;\n  window.dispatchEvent(new PopStateEvent('popstate', { state: window.history.state }));\n};\n\nexport const browserRenderTreeHistoryAdapter: RenderTreeHistoryAdapter = {\n  read: readBrowserSnapshot,\n  replace(snapshot) {\n    if (typeof window !== 'undefined') window.history.replaceState(withSnapshot(snapshot), '', window.location.href);\n  },\n  push(snapshot) {\n    if (typeof window !== 'undefined') window.history.pushState(withSnapshot(snapshot), '', window.location.href);\n  },\n  navigate(path, mode, snapshot) {\n    if (typeof window === 'undefined') return;\n    window.history[mode === 'replace' ? 'replaceState' : 'pushState'](withSnapshot(snapshot), '', path);\n    notifyBrowserHistory();\n  },\n  subscribe(listener) {\n    if (typeof window === 'undefined') return () => undefined;\n    const onPopState = () => listener(readBrowserSnapshot());\n    window.addEventListener('popstate', onPopState);\n    return () => window.removeEventListener('popstate', onPopState);\n  },\n};\n\nexport interface RenderTreeRuntimeHostProps\n  extends Omit<\n    RenderTreeHostProps,\n    | 'activeNodeIds'\n    | 'visibleNodeIds'\n    | 'manualQueryNodeIds'\n    | 'onActivate'\n    | 'onManualQueryEnabledChange'\n    | 'elementRefForNode'\n  > {\n  tree: RenderTree;\n  historyAdapter?: RenderTreeHistoryAdapter | false;\n  onActivate?: RenderTreeHostProps['onActivate'];\n}\n\nconst scheduleFocus = (target: HTMLElement | undefined) => {\n  if (!target?.isConnected) return;\n  if (typeof window !== 'undefined' && typeof window.requestAnimationFrame === 'function') {\n    window.requestAnimationFrame(() => target.focus({ preventScroll: true }));\n  } else {\n    target.focus({ preventScroll: true });\n  }\n};\n\nexport function RenderTreeRuntimeHost({\n  tree,\n  historyAdapter = browserRenderTreeHistoryAdapter,\n  onActivate,\n  onRuntimeStateChange,\n  ...props\n}: RenderTreeRuntimeHostProps) {\n  const compiled = useMemo(() => compileRenderTree(tree), [tree]);\n  const allNodeIds = useMemo(() => new Set(compiled.traversal.map((node) => node.nodeId)), [compiled]);\n  const [activeNodeIds, setActiveNodeIds] = useState<Set<string>>(() => new Set(allNodeIds));\n  const [manualQueryNodeIds, setManualQueryNodeIds] = useState<Set<string>>(() => new Set());\n  const selectedActivationIdRef = useRef<string>();\n  const activeNodeIdsRef = useRef(activeNodeIds);\n  const manualQueryNodeIdsRef = useRef(manualQueryNodeIds);\n  const focusReturnTargets = useRef(new Map<string, HTMLElement>());\n\n  const snapshot = useCallback((\n    nextActive = activeNodeIdsRef.current,\n    nextManual = manualQueryNodeIdsRef.current,\n    selectedActivationId = selectedActivationIdRef.current,\n  ): RenderTreeRuntimeSnapshot => ({\n    contract: 'RenderTreeRuntimeSnapshot',\n    treeId: tree.treeId,\n    activeNodeIds: [...nextActive],\n    manualQueryNodeIds: [...nextManual],\n    selectedActivationId,\n  }), [tree.treeId]);\n\n  const applySnapshot = useCallback((value: RenderTreeRuntimeSnapshot | undefined) => {\n    if (!value || value.treeId !== tree.treeId) return false;\n    if (value.activeNodeIds.some((nodeId) => !allNodeIds.has(nodeId))) return false;\n    if (value.manualQueryNodeIds.some((nodeId) => !allNodeIds.has(nodeId))) return false;\n    const active = new Set(value.activeNodeIds);\n    if (!active.has(tree.rootNodeId)) return false;\n    const manual = new Set(value.manualQueryNodeIds);\n    selectedActivationIdRef.current = value.selectedActivationId;\n    activeNodeIdsRef.current = active;\n    manualQueryNodeIdsRef.current = manual;\n    setActiveNodeIds(active);\n    setManualQueryNodeIds(manual);\n    return true;\n  }, [allNodeIds, tree.rootNodeId, tree.treeId]);\n\n  useEffect(() => {\n    const initial = historyAdapter === false ? undefined : historyAdapter.read();\n    if (!applySnapshot(initial)) {\n      const active = new Set(allNodeIds);\n      const manual = new Set<string>();\n      activeNodeIdsRef.current = active;\n      manualQueryNodeIdsRef.current = manual;\n      selectedActivationIdRef.current = undefined;\n      setActiveNodeIds(active);\n      setManualQueryNodeIds(manual);\n      historyAdapter !== false && historyAdapter.replace(snapshot(active, manual));\n    }\n    return historyAdapter === false ? undefined : historyAdapter.subscribe(applySnapshot);\n  }, [allNodeIds, applySnapshot, historyAdapter, snapshot]);\n\n  const selectNode = useCallback((node: RenderNode) => {\n    const next = new Set(compiled.ancestorsOf(node.nodeId).map((ancestor) => ancestor.nodeId));\n    const addDescendants = (current: RenderNode) => {\n      next.add(current.nodeId);\n      compiled.childrenOf(current.nodeId).forEach(addDescendants);\n    };\n    addDescendants(node);\n    return next;\n  }, [compiled]);\n\n  const handleActivate = useCallback((activation: RenderActivation, node: RenderNode) => {\n    if (node.lifecycle.focusReturn && typeof document !== 'undefined' && document.activeElement instanceof HTMLElement) {\n      focusReturnTargets.current.set(node.nodeId, document.activeElement);\n    }\n    selectedActivationIdRef.current = activation.activationId;\n    const nextActive = activation.mode === 'select' || activation.mode === 'inline'\n      ? selectNode(node)\n      : activeNodeIdsRef.current;\n    activeNodeIdsRef.current = nextActive;\n    setActiveNodeIds(nextActive);\n    const nextSnapshot = snapshot(nextActive);\n\n    if (activation.mode === 'navigate') {\n      if (!activation.targetPath) throw new TypeError(`Navigate activation ${activation.activationId} has no targetPath.`);\n      if (historyAdapter !== false) historyAdapter.navigate(activation.targetPath, activation.history ?? 'push', nextSnapshot);\n    } else if (historyAdapter !== false && node.lifecycle.deepLink) {\n      if (activation.history === 'push') historyAdapter.push(nextSnapshot);\n      else historyAdapter.replace(nextSnapshot);\n    }\n    onActivate?.(activation, node);\n  }, [historyAdapter, onActivate, selectNode, snapshot]);\n\n  const handleManualQueryEnabledChange = useCallback((enabled: boolean, node: RenderNode) => {\n    const next = new Set(manualQueryNodeIdsRef.current);\n    if (enabled) next.add(node.nodeId);\n    else next.delete(node.nodeId);\n    manualQueryNodeIdsRef.current = next;\n    setManualQueryNodeIds(next);\n    historyAdapter !== false && historyAdapter.replace(snapshot(activeNodeIdsRef.current, next));\n  }, [historyAdapter, snapshot]);\n\n  const previousActive = useRef(activeNodeIds);\n  useEffect(() => {\n    for (const nodeId of previousActive.current) {\n      if (activeNodeIds.has(nodeId)) continue;\n      const node = compiled.nodesById.get(nodeId);\n      if (node?.lifecycle.focusReturn) scheduleFocus(focusReturnTargets.current.get(nodeId));\n    }\n    previousActive.current = activeNodeIds;\n  }, [activeNodeIds, compiled.nodesById]);\n\n  return (\n    <RenderTreeHost\n      {...props}\n      tree={tree}\n      activeNodeIds={activeNodeIds}\n      visibleNodeIds={activeNodeIds}\n      manualQueryNodeIds={manualQueryNodeIds}\n      onActivate={handleActivate}\n      onManualQueryEnabledChange={handleManualQueryEnabledChange}\n      onRuntimeStateChange={onRuntimeStateChange}\n    />\n  );\n}\n","import type { RenderNode, RenderTree } from '@inf-monkeys-tech/monkeys';\nimport type { ReactNode } from 'react';\n\nimport { RenderTreeRuntimeHost } from './RenderTreeRuntimeHost';\nimport type { RenderTreeRuntimeHostProps } from './RenderTreeRuntimeHost';\nimport type { RenderTreeNodeContext } from './RenderTreeHost';\n\nexport interface RenderTreeRegistryNodeContext<TBinding = unknown> extends RenderTreeNodeContext {\n  binding: TBinding | undefined;\n  model: RenderNode['renderModel'];\n}\n\nexport type RenderTreeComponentRenderer<TBinding = unknown> = (\n  context: RenderTreeRegistryNodeContext<TBinding>,\n) => ReactNode;\n\nexport type RenderTreeComponentRegistry = Readonly<\n  Record<string, RenderTreeComponentRenderer>\n>;\n\nexport type RenderTreeBindingRegistry = Readonly<Record<string, unknown>>;\n\nexport interface RenderTreeRegistryHostProps\n  extends Omit<RenderTreeRuntimeHostProps, 'renderNode' | 'tree'> {\n  tree: RenderTree;\n  components: RenderTreeComponentRegistry;\n  bindings?: RenderTreeBindingRegistry;\n  resolveBinding?: (\n    node: RenderNode,\n    bindings: RenderTreeBindingRegistry,\n  ) => unknown;\n  renderMissingComponent?: (context: RenderTreeNodeContext) => ReactNode;\n}\n\nconst defaultResolveBinding = (\n  node: RenderNode,\n  bindings: RenderTreeBindingRegistry,\n) => {\n  const bindingId = node.dataContextRef?.id;\n  return bindingId ? bindings[bindingId] : undefined;\n};\n\nexport function RenderTreeRegistryHost({\n  tree,\n  components,\n  bindings = {},\n  resolveBinding = defaultResolveBinding,\n  renderMissingComponent,\n  ...props\n}: RenderTreeRegistryHostProps) {\n  return (\n    <RenderTreeRuntimeHost\n      {...props}\n      tree={tree}\n      renderNode={(context) => {\n        const renderer = components[context.node.capabilityRef.id];\n        if (!renderer) {\n          return renderMissingComponent?.(context) ?? context.children;\n        }\n        return renderer({\n          ...context,\n          binding: resolveBinding(context.node, bindings),\n          model: context.node.renderModel,\n        });\n      }}\n    />\n  );\n}\n"]}