+
    Nj                       ^ RI Ht ^ RIHt ^ RIt^ RIt^ RIHt ^ RIH	t	 ^RI
Ht ^RI
Ht ^RI
Ht ^RI
Ht ^R	I
Ht ^R
IHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt  ! R R]4      t ! R R]],          4      tR# )    )annotationsN)datetime)timezone)base64_decode)base64_encode)bytes_to_int)int_to_bytes)
want_bytes)BadSignature)BadTimeSignature)SignatureExpired)_TSerialized)
Serializer)Signerc                     a  ] tR t^tRtR R ltR R ltR R lt]P                  RR R	 ll4       t
]P                  RR
 R ll4       t
RR V 3R lllt
RR R lltRtV ;t# )TimestampSignerzWorks like the regular :class:`.Signer` but also records the time
of the signing and can be used to expire signatures. The
:meth:`unsign` method can raise :exc:`.SignatureExpired` if the
unsigning failed because the signature is expired.
c                   V ^8  d   QhRR/# )   returnint )formats   "T/data/cameron/venvs/serve_omidlab/lib/python3.14/site-packages/itsdangerous/timed.py__annotate__TimestampSigner.__annotate__   s        s      c                >    \        \        P                  ! 4       4      # )zDReturns the current timestamp. The function must return an
integer.
)r   time)selfs   &r   get_timestampTimestampSigner.get_timestamp   s     499;r   c                    V ^8  d   QhRRRR/# )r   tsr   r   r   r   )r   s   "r   r   r   #   s     ; ; ; ;r   c                N    \         P                  ! V\        P                  R7      # )zConvert the timestamp from :meth:`get_timestamp` into an
aware :class`datetime.datetime` in UTC.

.. versionchanged:: 2.0
    The timestamp is returned as a timezone-aware ``datetime``
    in UTC rather than a naive ``datetime`` assumed to be UTC.
)tz)r   fromtimestampr   utc)r   r#   s   &&r   timestamp_to_datetime%TimestampSigner.timestamp_to_datetime#   s     %%bX\\::r   c                    V ^8  d   QhRRRR/# )r   valuestr | bytesr   bytesr   )r   s   "r   r   r   -   s     7 7+ 7% 7r   c                    \        V4      p\        \        V P                  4       4      4      p\        V P                  4      pW,           V,           pW,           V P                  V4      ,           # )z:Signs the given string and also attaches time information.)r
   r   r	   r    sepget_signature)r   r+   	timestampr/   s   &&  r   signTimestampSigner.sign-   sV    5!!,t/A/A/C"DE	"i'{T//666r   c               (    V ^8  d   QhRRRRRRRR/# )	r   signed_valuer,   max_age
int | Nonereturn_timestampzt.Literal[False]r   r-   r   )r   s   "r   r   r   9   s2      !  +	
 
r   c                	    R # Nr   r   r5   r6   r8   s   &&&&r   unsignTimestampSigner.unsign8   s     r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r5   r,   r6   r7   r8   zt.Literal[True]r   ztuple[bytes, datetime]r   )r   s   "r   r   r   A   s2     % %!% % *	%
 
 %r   c                	    R # r:   r   r;   s   &&&&r   r<   r=   @   s     "%r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r5   r,   r6   r7   r8   boolr   ztuple[bytes, datetime] | bytesr   )r   s   "r   r   r   H   s8     V V!V V 	V
 
(Vr   c                X  <  \         SV `  V4      pRp\	        V P
                  4      pWt9  d   V'       d   Vh\        RVR7      hVP                  V^4      w  rRp
Rp \        \        V	4      4      p
Ve-   V
e    V P                  V
4      p\        \        V4      WR7      hV
f   \        RVR7      hVej   V P!                  4       V
,
          pW8  d%   \#        RV RV R	2VV P                  V
4      R7      hV^ 8  d"   \#        RV R
2VV P                  V
4      R7      hV'       d   WP                  V
4      3# V#   \         d$   pTpTP                  ;'       g    Rp Rp?ELRRp?ii ; i  \         d     EL	i ; i  \        \        \        3 d   p\        RTR7      ThRp?ii ; i)a  Works like the regular :meth:`.Signer.unsign` but can also
validate the time. See the base docstring of the class for
the general behavior. If ``return_timestamp`` is ``True`` the
timestamp of the signature will be returned as an aware
:class:`datetime.datetime` object in UTC.

.. versionchanged:: 2.0
    The timestamp is returned as a timezone-aware ``datetime``
    in UTC rather than a naive ``datetime`` assumed to be UTC.
Nr   ztimestamp missing)payloadzMalformed timestamp)rC   date_signedzSignature age z > z secondsz < 0 seconds)superr<   r   rC   r
   r/   r   rsplitr   r   	Exceptionr(   
ValueErrorOSErrorOverflowErrorstrr    r   )r   r5   r6   r8   result	sig_errorer/   r+   ts_bytests_intts_dtexcage	__class__s   &&&&          r   r<   r=   H   s    	&W^L1FI
 " "#6GG --Q/!!%	!-"9:F  ! 66v>E #3y>5TT >"#8%HH $$&/C}&$SEWIX>! $ : :6 B  Qw&$SE6! $ : :6 B  44V<<<G  	&IYY%%#F	&.  		 #G];  +-usA   D= E. <F  =E+E&&E+.E=<E= F)F$$F)c               $    V ^8  d   QhRRRRRR/# )r   r5   r,   r6   r7   r   rA   r   )r   s   "r   r   r      s"      [ : QU r   c                P     V P                  WR7       R#   \         d     R# i ; i)z]Only validates the given signed value. Returns ``True`` if
the signature exists and is valid.)r6   TF)r<   r   )r   r5   r6   s   &&&r   validateTimestampSigner.validate   s*    	KKK6 		s    %%r   )NF)NTr:   )__name__
__module____qualname____firstlineno____doc__r    r(   r2   toverloadr<   rW   __static_attributes____classcell__rT   s   @r   r   r      s^     ;7 ZZ  ZZ% %V Vp r   r   c                  f   a  ] tR t^t$ Rt]tR]R&   RR V 3R llltRR R llt	RR R	 llt
R
tV ;t# )TimedSerializerzGUses :class:`TimestampSigner` instead of the default
:class:`.Signer`.
ztype[TimestampSigner]default_signerc                    V ^8  d   QhRRRR/# )r   saltstr | bytes | Noner   cabc.Iterator[TimestampSigner]r   )r   s   "r   r   TimedSerializer.__annotate__   s      V V&V	'Vr   c                	L   < \         P                  ! R \        SV `  V4      4      # )ri   )r^   castrE   iter_unsigners)r   rg   rT   s   &&r   rm   TimedSerializer.iter_unsigners   s!     vv68Nt8TUUr   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   sr,   r6   r7   r8   rA   rg   rh   r   zt.Anyr   )r   s   "r   r   rj      s<     #3 #3#3 #3 	#3
 !#3 
#3r   c                :   \        V4      pRpV P                  V4       F9  p VP                  WRR7      w  rxV P                  V4      p	V'       d   W3u # V	u # 	  \        P                  ! \
        V4      h  \         d    h \
         d   p
T
p Rp
?
Kv  Rp
?
ii ; i)aV  Reverse of :meth:`dumps`, raises :exc:`.BadSignature` if the
signature validation fails. If a ``max_age`` is provided it will
ensure the signature is not older than that time in seconds. In
case the signature is outdated, :exc:`.SignatureExpired` is
raised. All arguments are forwarded to the signer's
:meth:`~TimestampSigner.unsign` method.
NT)r6   r8   )r
   rm   r<   load_payloadr   r   r^   rl   )r   rp   r6   r8   rg   last_exceptionsignerbase64dr1   rC   errs   &&&&&      r   loadsTimedSerializer.loads   s     qM))$/F%%+]] &3 &" ++G4#"-- 0$ ff\>22 $   %!$%s#   0A7A77BBBBc               (    V ^8  d   QhRRRRRRRR/# )	r   rp   r,   r6   r7   rg   rh   r   ztuple[bool, t.Any]r   )r   s   "r   r   rj      s8     R RR R !	R
 
Rr   c                	,    V P                  WR V/R7      # )r6   )load_kwargs)_loads_unsafe_impl)r   rp   r6   rg   s   &&&&r   loads_unsafeTimedSerializer.loads_unsafe   s     &&qY<P&QQr   r   r:   )NFN)NN)rY   rZ   r[   r\   r]   r   re   __annotations__rm   rw   r}   r`   ra   rb   s   @r   rd   rd      s3     -<N);V V#3JR Rr   rd   )
__future__r   collections.abcabccabcr   typingr^   r   r   encodingr   r   r   r	   r
   rR   r   r   r   
serializerr   r   rt   r   r   rd   r   r   r   <module>r      sZ    "      # # " "    ! ! $ " Qf Qh:Rj. :Rr   