236
     ˆÇÆÊ815ÅÀÈ /    ‹      Õ˜KsÚ0€ïùª½Ùò‹�‡q'ÅLË4è¤�NÂOc{$’þúÊÀ¤Ð�AõL/x×¬×ûYÚ]IÖ;gØ�~õÀçéÝ-}ýxÛïI†ðÞèBèL�òSQ5{	HcÙ„«ÕJYJJB8Ãˆ-bRF°Ë�y’}få÷ì3`E>òøX³Ø·û‰ç?�4 0]2Š=ß„KJ �ñáz©[x³`iÎÀÊƒ5K½çÜ±v¼n[¼Í
_¹Hl‹EàÅ8L:K3É¶ð"”¸	b7M(œÅ(yPBH Å¬#ýèw‡?¹dQþ´m!?èHº�Áõ°ãHö -|¢ý6wÜæF²oe`‘z8À¾wÐxROð¯Ã�ÒÆñ©KpÆpšlM!G¬£ºiL3ÄY[œ "u«ÒÄ{ík wçcŒnÆ½ÁÔé�ËOâå.¶ÑÉq%aÀÁÄwYJž« Kï“Í®×*¨B"8Œ˜d ƒ½–oà`þ«sL¿M÷z÷EWòÄÇu«Ô£}ž®ê†¬j²®­}e^pÀÐ0Ï¿4ÊaÔ9a¦i4ËQ£Å �·c+.¥’]\„Ä®´OŽ=FÏ<WëÑóª±?ú8S%óN°EPœ+§g^ Ð×wŠõÝ§¿PÐÇpMÁEº ŠcçÑÄGÄ�ªl¨)"8ÚªÑX�-C&;$•*„E@~Ë‚fy• [YÅ¥Ú>yDŽÏ� =æ�(üG²kŠ’–Ò\¿Àùê°�­,&ÓÍÆ(·”ù#•9ï/nˆY�h'Ï¯ �=ŸÔ‰­ X�ÀWã¿”õ µ®Tó`ü"V…ÇçGìL™g¼}¬%1�\m°}¯d¨$@k®.‹æh'3þ¸%dmÂ-šbÊø‹� •ó­®¼dÁEU¾ü!¤"kzã|/¨Äíªì.ÁtQ®æ7¢˜yzxÃ|ƒ &c@ƒ{BâÓtIÜÍ”ÚÕÅŒ‡Þ`].^Zæ�øÿu—eV"”×ÿ‘§\°:ÿ³`q„hÁòlò7&vÖþ    5   ˆl–Ðz¾”d
i?u8 ]¸n6Ò˜´o�þB gÁu–ÆøZóÌƒh¹ËÁÉ      disabled
  A   ˆl–Ü4ý('ÜZÔâ€vã,ÜÅ£�þZ‹8Ù’GšÎ»óÍƒÌ_ŠI|¥ŠGgYâ¯ÃË -    MIT License

Copyright (c) 2025, Tiptap GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
  1   ˆl–ßi~”Êa,jm@»q—î4Ú˜´o�þ@³‚+…•á>ßóÏ0ÎÄÌ  7   ˆl–Ým_Jõ0–52 Z¸î2Ê˜´o�þBÌ…Y¹[Y#M	Ö�üÿÐƒl9ÏÆÅÍ Þ    """
    pygments.formatters.groff
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for groff output.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import math
from pip._vendor.pygments.formatter import Formatter
from pip._vendor.pygments.util import get_bool_opt, get_int_opt

__all__ = ['GroffFormatter']


class GroffFormatter(Formatter):
    """
    Format tokens with groff escapes to change their color and font style.

    .. versionadded:: 2.11

    Additional options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `monospaced`
        If set to true, monospace font will be used (default: ``true``).

    `linenos`
        If set to true, print the line numbers (default: ``false``).

    `wrap`
        Wrap lines to the specified number of characters. Disabled if set to 0
        (default: ``0``).
    """

    name = 'groff'
    aliases = ['groff','troff','roff']
    filenames = []

    def __init__(self, **options):
        Formatter.__init__(self, **options)

        self.monospaced = get_bool_opt(options, 'monospaced', True)
        self.linenos = get_bool_opt(options, 'linenos', False)
        self._lineno = 0
        self.wrap = get_int_opt(options, 'wrap', 0)
        self._linelen = 0

        self.styles = {}
        self._make_styles()


    def _make_styles(self):
        regular = '\\f[CR]' if self.monospaced else '\\f[R]'
        bold = '\\f[CB]' if self.monospaced else '\\f[B]'
        italic = '\\f[CI]' if self.monospaced else '\\f[I]'

        for ttype, ndef in self.style:
            start = end = ''
            if ndef['color']:
                start += '\\m[%s]' % ndef['color']
                end = '\\m[]' + end
            if ndef['bold']:
                start += bold
                