@Override
  public int getOffsetInHost(int offsetInDecoded, final @NotNull TextRange rangeInsideHost) {
    int result = mySourceOffsets.getOffsetInHost(offsetInDecoded);
    if (result == -1) return -1;
    return Math.min(result, rangeInsideHost.getLength()) + rangeInsideHost.getStartOffset();
  }
@Override
  public int getOffsetInHost(int offsetInDecoded, final @NotNull TextRange rangeInsideHost)