+
    ]j                    :    ^ RI Ht ^ RIt^ RIHt  ! R R4      tR# )    )annotationsN)Pathc                      ] tR t^tRtR R ltR R ltR R ltR R	 ltR
 R lt	]
R R l4       t]
R R l4       t]
R R l4       tR R ltR R ltRtR# )QuotaNotificationStorezEdge-triggered per-window exhaustion state.

reset_at values drift between polls (providers report relative reset
seconds), so equality on them cannot deduplicate; only the
exhausted/recovered transition can.
c                    V ^8  d   QhRRRR/# )   pathr   returnNone )formats   "f/home/user/overdeck-private-tests/workstation-ai-indicator/modules/systray/quota_notification_store.py__annotate__#QuotaNotificationStore.__annotate__   s      T d     c                	    Wn         R # )N_path)selfr	   s   &&r   __init__QuotaNotificationStore.__init__   s    
r   c               $    V ^8  d   QhRRRRRR/# r   account_keystrwindowr
   boolr   )r   s   "r   r   r      s!      # s t r   c                    V P                  4       pV P                  W4      pVP                  V/ 4      P                  R4      RJ d   R# RR/W4&   V P                  V4       R# )zTrue only the first time a window crosses its warning threshold.

Stays true until record_warning_reset sees usage back above the
threshold, so restarts and polls that carry no reading cannot re-warn.
warnedTF_read_warning_keyget_writer   r   r   statekeys   &&&  r   record_warning%QuotaNotificationStore.record_warning   s[     

499S"!!(+t3%
Er   c               $    V ^8  d   QhRRRRRR/# r   r   )r   s   "r   r   r       s!       S T r   c                	    V P                  4       pV P                  W4      pVP                  V/ 4      P                  R 4      RJd   R# R R/W4&   V P                  V4       R# )r   TFr    r%   s   &&&  r   record_warning_reset+QuotaNotificationStore.record_warning_reset    sY    

499S"!!(+47&
Er   c               (    V ^8  d   QhRRRRRRRR/# r   r   r   r   reset_atr
   r   r   )r   s   "r   r   r   )   s)      S #  QU r   c                	    V P                  4       pV P                  W4      pVP                  V/ 4      pV P                  V4      '       d   R # RRRVRVP                  R4      /WE&   V P	                  V4       R# )F	exhaustedTexhausted_reset_atreset_notified_atr!   _keyr#   _is_exhaustedr$   r   r   r   r0   r&   r'   records   &&&&   r   record_exhaustion(QuotaNotificationStore.record_exhaustion)   sr    

ii,3#f%% (,?!@


 	Er   c               (    V ^8  d   QhRRRRRRRR/# r/   r   )r   s   "r   r   r   7   s(     
 
 
S 
C 
D 
r   c                	    V P                  4       pV P                  W4      pVP                  V4      pVe   V P                  V4      '       g   R# RVR&   W6R&   WdV&   V P	                  V4       R# )NFr2   r4   Tr5   r8   s   &&&&   r   record_reset#QuotaNotificationStore.record_reset7   si    

ii,3>!3!3F!;!;#{&."#c
Er   c                    V ^8  d   QhRRRR/# )r   r9   zdict[str, object]r
   r   r   )r   s   "r   r   r   D   s     < </ <D <r   c                	\    R V 9   d   V P                  R 4      RJ # V P                  R4      RJ# )r2   Tr3   N)r#   )r9   s   &r   r7   $QuotaNotificationStore._is_exhaustedC   s3    & ::k*d22zz./t;;r   c               $    V ^8  d   QhRRRRRR/# r   r   r   r   r
   r   )r   s   "r   r   r   J   s!     ) )# )s )s )r   c                	    V  R V 2# ):r   r   r   s   &&r   r6   QuotaNotificationStore._keyI   s    ax((r   c               $    V ^8  d   QhRRRRRR/# rD   r   )r   s   "r   r   r   N   s!     . .# .s .s .r   c                	    R V  RV 2# )zwarn:rF   r   rG   s   &&r   r"   #QuotaNotificationStore._warning_keyM   s    {m1VH--r   c                   V ^8  d   QhRR/# )r   r
   dict[str, dict[str, object]]r   )r   s   "r   r   r   Q   s     6 63 6r   c                	"   V P                   P                  4       '       g   / #  \        P                  ! V P                   P	                  R R7      4      p\        T\        4      '       d   T# / #   \
        \        P                  3 d    / u # i ; i)utf-8encoding)	r   existsjsonloads	read_textOSErrorJSONDecodeError
isinstancedict)r   datas   & r   r!   QuotaNotificationStore._readQ   sy    zz  ""I	::djj22G2DED "$--t525 --. 	I	s   0A. .BBc                    V ^8  d   QhRRRR/# )r   r&   rM   r
   r   r   )r   s   "r   r   r   Z   s     & &8 &T &r   c                	P   V P                   P                  P                  R R R7       V P                   P                  V P                   P                   R24      pVP                  \        P                  ! V^R R7      R,           RR7       VP                  V P                   4       R# )T)parentsexist_okz.tmp)indent	sort_keys
rO   rP   N)	r   parentmkdirwith_suffixsuffix
write_textrS   dumpsreplace)r   r&   	temporarys   && r   r$   QuotaNotificationStore._writeZ   s}    

t<JJ**djj.?.?-@+EF	TZZa4H4OZab$**%r   r   N)__name__
__module____qualname____firstlineno____doc__r   r(   r,   r:   r>   staticmethodr7   r6   r"   r!   r$   __static_attributes__r   r   r   r   r      sk    
 < <
 ) ) . .6& &r   r   )
__future__r   rS   pathlibr   r   r   r   r   <module>ru      s    "  W& W&r   