Ë
    £ehÞ  ã                   óP   — d dl mZ d dlZd dlZd dlZdgZ G d„ de«      Zd„ Zd„ Z	y)é    )ÚNumberNÚVectorc                   ó  ‡ — e Zd ZdZdZdˆ fd„	Zˆ fd„Zd„ Zd„ Zd„ Z	d„ Z
e
Zd	„ Zd
„ Zd„ ZeZd„ Zd„ Zd„ Zd„ Zedœd„Zˆ fd„Zd„ Zd„ ZeZd„ Zd„ Zd„ Zd„ Zd„ Zed„ «       Z e jB                  d„ «       Z dd de"fd„Z#ˆ xZ$S ) r   zÛA math-like vector.

    Represents an n-dimensional numeric vector. ``Vector`` objects support
    vector addition and subtraction, scalar multiplication and division,
    negation, rounding, and comparison tests.
    © c                 óˆ   •— |durt        j                  dt        «       t        |«      t        k(  r|S t
        ‰| �  | |«      S )NFz'the 'keep' argument has been deprecated)ÚwarningsÚwarnÚDeprecationWarningÚtyper   ÚsuperÚ__new__)ÚclsÚvaluesÚkeepÚ	__class__s      €úS/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/fontTools/misc/vector.pyr   zVector.__new__   sA   ø€ Ø�uÑÜ�M‰MØ9Ü"ôô �‹<œ6Ò!àˆMÜ‰w‰˜s FÓ+Ð+ó    c                 óT   •— | j                   j                  › dt        ‰| �  «       › d�S )Nú(ú))r   Ú__name__r   Ú__repr__)Úselfr   s    €r   r   zVector.__repr__   s*   ø€ Ø—.‘.×)Ñ)Ð*¨!¬E©GÑ,<Ó,>Ð+?¸qÐAÐAr   c                 ó
  ‡‡— t        ‰t        «      r=t        | «      t        ‰«      k(  sJ ‚| j                  ˆfd„t	        | ‰«      D «       «      S t        ‰t
        «      r| j                  ˆˆfd„| D «       «      S t        «       ‚)Nc              3   ó6   •K  — | ]  \  }} ‰||«      –— Œ y ­w©Nr   )Ú.0ÚaÚbÚops      €r   ú	<genexpr>z#Vector._vectorOp.<locals>.<genexpr>%   s   øè ø€ Ò!H©t¨q°!¡" Q¨§(Ñ!Hùs   ƒc              3   ó0   •K  — | ]  } ‰|‰«      –— Œ y ­wr   r   ©r   Úvr    Úothers     €€r   r!   z#Vector._vectorOp.<locals>.<genexpr>'   ó   øè ø€ Ò!=°1¡" Q¨§,Ñ!=ùó   ƒ)Ú
isinstancer   Úlenr   Úzipr   ÚNotImplementedError©r   r%   r    s    ``r   Ú	_vectorOpzVector._vectorOp"   sg   ù€ Ü�eœVÔ$Ü�t“9¤ E£
Ò*Ð*Ð*Ø—>‘>Ó!H´s¸4ÀÓ7GÔ!HÓHÐHÜ�eœVÔ$Ø—>‘>Ô!=¸Ô!=Ó=Ð=Ü!Ó#Ð#r   c                 óp   ‡‡— t        ‰t        «      r| j                  ˆˆfd„| D «       «      S t        «       ‚)Nc              3   ó0   •K  — | ]  } ‰|‰«      –— Œ y ­wr   r   r#   s     €€r   r!   z#Vector._scalarOp.<locals>.<genexpr>,   r&   r'   )r(   r   r   r+   r,   s    ``r   Ú	_scalarOpzVector._scalarOp*   s+   ù€ Ü�eœVÔ$Ø—>‘>Ô!=¸Ô!=Ó=Ð=Ü!Ó#Ð#r   c                 ó8   ‡— | j                  ˆfd„| D «       «      S )Nc              3   ó.   •K  — | ]  } ‰|«      –— Œ y ­wr   r   )r   r$   r    s     €r   r!   z"Vector._unaryOp.<locals>.<genexpr>0   s   øè ø€ Ò2¨™b ŸeÑ2ùs   ƒ©r   )r   r    s    `r   Ú_unaryOpzVector._unaryOp/   s   ø€ Ø�~‰~Ó2¨TÔ2Ó2Ð2r   c                 óB   — | j                  |t        j                  «      S r   )r-   ÚoperatorÚadd©r   r%   s     r   Ú__add__zVector.__add__2   ó   € Ø�~‰~˜e¤X§\¡\Ó2Ð2r   c                 óB   — | j                  |t        j                  «      S r   )r-   r6   Úsubr8   s     r   Ú__sub__zVector.__sub__7   r:   r   c                 ó.   — | j                  |t        «      S r   )r-   Ú_operator_rsubr8   s     r   Ú__rsub__zVector.__rsub__:   s   € Ø�~‰~˜e¤^Ó4Ð4r   c                 óB   — | j                  |t        j                  «      S r   )r0   r6   Úmulr8   s     r   Ú__mul__zVector.__mul__=   r:   r   c                 óB   — | j                  |t        j                  «      S r   )r0   r6   Útruedivr8   s     r   Ú__truediv__zVector.__truediv__B   s   € Ø�~‰~˜e¤X×%5Ñ%5Ó6Ð6r   c                 ó.   — | j                  |t        «      S r   )r0   Ú_operator_rtruedivr8   s     r   Ú__rtruediv__zVector.__rtruediv__E   s   € Ø�~‰~˜eÔ%7Ó8Ð8r   c                 ó@   — | j                  t        j                  «      S r   )r4   r6   Úpos©r   s    r   Ú__pos__zVector.__pos__H   ó   € Ø�}‰}œXŸ\™\Ó*Ð*r   c                 ó@   — | j                  t        j                  «      S r   )r4   r6   ÚnegrL   s    r   Ú__neg__zVector.__neg__K   rN   r   )Úroundc                ó$   — | j                  |«      S r   )r4   )r   rR   s     r   Ú	__round__zVector.__round__N   s   € Ø�}‰}˜UÓ#Ð#r   c                 óX   •— t        |t        «      rt        |«      }t        ‰| �  |«      S r   )r(   ÚlistÚtupler   Ú__eq__)r   r%   r   s     €r   rX   zVector.__eq__Q   s%   ø€ Ü�eœTÔ"ä˜%“LˆEÜ‰w‰~˜eÓ$Ð$r   c                 ó&   — | j                  |«       S r   )rX   r8   s     r   Ú__ne__zVector.__ne__W   s   € Ø—;‘;˜uÓ%Ð%Ð%r   c                 ó   — t        | «      S r   )ÚanyrL   s    r   Ú__bool__zVector.__bool__Z   s   € Ü�4‹yÐr   c                 óL   — t        j                  t        d„ | D «       «      «      S )Nc              3   ó&   K  — | ]	  }||z  –— Œ y ­wr   r   )r   Úxs     r   r!   z!Vector.__abs__.<locals>.<genexpr>`   s   è ø€ Ò1 q˜Q �UÑ1ùs   ‚)ÚmathÚsqrtÚsumrL   s    r   Ú__abs__zVector.__abs___   s   € Ü�y‰yœÑ1¨DÔ1Ó1Ó2Ð2r   c                 ó   — t        | «      S )z;Return the length of the vector. Equivalent to abs(vector).©ÚabsrL   s    r   ÚlengthzVector.lengthb   s   € ä�4‹yÐr   c                 ó   — | t        | «      z  S )z+Return the normalized vector of the vector.rf   rL   s    r   Ú
normalizedzVector.normalizedf   s   € à”c˜$“iÑÐr   c                 ól   — t        | «      t        |«      k(  sJ ‚t        d„ t        | |«      D «       «      S )z[Performs vector dot product, returning the sum of
        ``a[0] * b[0], a[1] * b[1], ...``c              3   ó,   K  — | ]  \  }}||z  –— Œ y ­wr   r   )r   r   r   s      r   r!   zVector.dot.<locals>.<genexpr>n   s   è ø€ Ò6™T˜Q �1�q•5Ñ6ùs   ‚)r)   rc   r*   r8   s     r   Údotz
Vector.dotj   s2   € ô �4‹yœC ›JÒ&Ð&Ð&ÜÑ6¤S¨¨uÓ%5Ô6Ó6Ð6r   c                 óV   — t        j                  dt        «       | j                  «       S )NzAthe 'toInt' method has been deprecated, use round(vector) instead)r   r	   r
   rT   rL   s    r   ÚtoIntzVector.toIntr   s#   € Ü�‰ØOÜô	
ð �~‰~ÓÐr   c                 óL   — t        j                  dt        «       t        | «      S )NzPthe 'values' attribute has been deprecated, use the vector object itself instead)r   r	   r
   rV   rL   s    r   r   zVector.valuesy   s"   € ä�‰ð/äô	
ô
 �D‹zÐr   c                 ó   — t        d«      ‚)Nz?can't set attribute, the 'values' attribute has been deprecated)ÚAttributeError)r   r   s     r   r   zVector.values‚   s   € äØMó
ð 	
r   r%   Úreturnc                 ór   ‡— t        | «      t        |«      k(  sJ ‚t        ˆfd„t        | |«      D «       «      S )z5Return True if the vector is close to another Vector.c              3   óR   •K  — | ]  \  }}t        j                  ||fi ‰¤Ž–— Œ  y ­wr   )ra   Úisclose)r   r   r   Úkwargss      €r   r!   z!Vector.isclose.<locals>.<genexpr>‹   s%   øè ø€ ÒM±D°A°q”4—<‘<  1Ñ/¨Õ/ÑMùs   ƒ$')r)   Úallr*   )r   r%   rw   s     `r   rv   zVector.iscloseˆ   s1   ø€ ä�4‹yœC ›JÒ&Ð&Ð&ÜÓM¼CÀÀeÓ<LÔMÓMÐMr   )F)%r   Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r-   r0   r4   r9   Ú__radd__r=   r@   rC   Ú__rmul__rF   rI   rM   rQ   rR   rT   rX   rZ   r]   Ú__nonzero__rd   rh   rj   rm   ro   Úpropertyr   ÚsetterÚboolrv   Ú__classcell__r3   s   @r   r   r   
   sÚ   ø„ ñð €Iõ	,ôBò$ò$ò
3ò3ð €Hò3ò5ò3ð €Hò7ò9ò+ò+ð "'ô $ô%ò&òð €Kò3òò ò7ò ð ñó ðð ‡]�]ñ
ó ð
ð
N˜Xð N°D÷ Nr   c                 ó.   — t        j                  || «      S r   )r6   r<   ©r   r   s     r   r?   r?   Ž   s   € Ü�<‰<˜˜1ÓÐr   c                 ó.   — t        j                  || «      S r   )r6   rE   r…   s     r   rH   rH   ’   s   € Ü×Ñ˜A˜qÓ!Ð!r   )
Únumbersr   ra   r6   r   Ú__all__rW   r   r?   rH   r   r   r   ú<module>r‰      s5   ðÝ Û Û Û ð ˆ*€ôANˆUô ANòHó"r   