[
  {
    "id": "class:1ynrixc:epubreaderservice",
    "kind": "class",
    "fileId": "file:q4k94a:epubreaderservice-cs",
    "path": "NexusReader.Infrastructure/Services/EpubReaderService.cs",
    "canonicalName": "EpubReaderService",
    "shortLabel": "EpubReaderService",
    "longLabel": "EpubReaderService",
    "purpose": "Service that locates an EPUB file for an ebook in the DB, reads and parses a chapter into content blocks (text segments and AI-trigger blocks) for the reader UI."
  },
  {
    "id": "method:1y3guy7:epubreaderservice",
    "kind": "method",
    "fileId": "file:q4k94a:epubreaderservice-cs",
    "path": "NexusReader.Infrastructure/Services/EpubReaderService.cs",
    "line": 21,
    "canonicalName": "EpubReaderService",
    "shortLabel": "EpubReaderService()",
    "longLabel": "EpubReaderService(dbContextFactory: IDbContextFactory<AppDbContext>, logger: ILogger<EpubReaderService>) -> EpubReaderService",
    "signature": "(dbContextFactory: IDbContextFactory<AppDbContext>, logger: ILogger<EpubReaderService>) -> EpubReaderService",
    "purpose": "Constructor that injects the DB context factory and logger."
  },
  {
    "id": "method:bamm0e:getepubcontentasync",
    "kind": "method",
    "fileId": "file:q4k94a:epubreaderservice-cs",
    "path": "NexusReader.Infrastructure/Services/EpubReaderService.cs",
    "line": 30,
    "canonicalName": "GetEpubContentAsync",
    "shortLabel": "GetEpubContentAsync()",
    "longLabel": "GetEpubContentAsync(ebookId: Guid, chapterIndex: int, userId: string?) -> Task<Result<ReaderPageViewModel>>",
    "signature": "(ebookId: Guid, chapterIndex: int, userId: string?) -> Task<Result<ReaderPageViewModel>>",
    "purpose": "Main runtime method: resolves the ebook file via DB, parses an EPUB, extracts chapter text into content blocks, inserts AI triggers based on word threshold, and returns a ReaderPageViewModel or a failure result."
  },
  {
    "id": "method:fxyqm0:resolvepath",
    "kind": "method",
    "fileId": "file:q4k94a:epubreaderservice-cs",
    "path": "NexusReader.Infrastructure/Services/EpubReaderService.cs",
    "line": 124,
    "canonicalName": "ResolvePath",
    "shortLabel": "ResolvePath()",
    "longLabel": "ResolvePath(relativePath: string) -> string?",
    "signature": "(relativePath: string) -> string?",
    "purpose": "Resolves a web-relative storage path to an absolute filesystem path by searching up the app base directory for wwwroot (and a development src path)."
  },
  {
    "id": "method:1tcm0y0:extractparagraphs",
    "kind": "method",
    "fileId": "file:q4k94a:epubreaderservice-cs",
    "path": "NexusReader.Infrastructure/Services/EpubReaderService.cs",
    "line": 145,
    "canonicalName": "ExtractParagraphs",
    "shortLabel": "ExtractParagraphs()",
    "longLabel": "ExtractParagraphs(html: string) -> List<string>",
    "signature": "(html: string) -> List<string>",
    "purpose": "Extracts paragraph-like blocks from HTML by selecting <p>, headings, lists, blockquote, pre, hr or splitting on breaks when none found."
  },
  {
    "id": "method:1mthy2:sanitizeparagraph",
    "kind": "method",
    "fileId": "file:q4k94a:epubreaderservice-cs",
    "path": "NexusReader.Infrastructure/Services/EpubReaderService.cs",
    "line": 166,
    "canonicalName": "SanitizeParagraph",
    "shortLabel": "SanitizeParagraph()",
    "longLabel": "SanitizeParagraph(html: string) -> string",
    "signature": "(html: string) -> string",
    "purpose": "Sanitizes HTML paragraph content by removing scripts/styles, stripping disallowed tags, normalizing allowed tags, HTML-decoding and trimming."
  },
  {
    "id": "method:85035t:countwords",
    "kind": "method",
    "fileId": "file:q4k94a:epubreaderservice-cs",
    "path": "NexusReader.Infrastructure/Services/EpubReaderService.cs",
    "line": 175,
    "canonicalName": "CountWords",
    "shortLabel": "CountWords()",
    "longLabel": "CountWords(text: string) -> int",
    "signature": "(text: string) -> int",
    "purpose": "Counts words in a text by splitting on whitespace characters; returns 0 for null/whitespace input."
  },
  {
    "id": "method:9ls8js:createaitrigger",
    "kind": "method",
    "fileId": "file:q4k94a:epubreaderservice-cs",
    "path": "NexusReader.Infrastructure/Services/EpubReaderService.cs",
    "line": 181,
    "canonicalName": "CreateAiTrigger",
    "shortLabel": "CreateAiTrigger()",
    "longLabel": "CreateAiTrigger(id: string) -> AiActionTriggerBlock",
    "signature": "(id: string) -> AiActionTriggerBlock",
    "purpose": "Factory that creates an AiActionTriggerBlock with localized prompt and action labels."
  },
  {
    "id": "method:12jssth:findtitleinnavigation",
    "kind": "method",
    "fileId": "file:q4k94a:epubreaderservice-cs",
    "path": "NexusReader.Infrastructure/Services/EpubReaderService.cs",
    "line": 186,
    "canonicalName": "FindTitleInNavigation",
    "shortLabel": "FindTitleInNavigation()",
    "longLabel": "FindTitleInNavigation(navigation: IEnumerable<EpubNavigationItemRef>, filePath: string?) -> string?",
    "signature": "(navigation: IEnumerable<EpubNavigationItemRef>, filePath: string?) -> string?",
    "purpose": "Recursively searches EPUB navigation items for a title that matches a given file path or file name."
  }
]