+
    .pÐjCr  ã                  ód  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt	^ RI
HtHtHt ^ RIHtHtHt ^ RIHtHtHt ]Rf,          tRgt^<tRsR]R&   ]P4                  ! 4       t]! RR	7       ! R
 R4      4       t]! RR	7       ! R R4      4       t]! RR	7       ! R R4      4       tRtRt Rt!R R lt"R R lt#]! RR	7       ! R R4      4       t$RhR R llt%RhR R llt&RRRRR RR!R"/R# R$ llt'R!R"/R% R& llt(R' R( lt)R)R"R*^</R+ R, llt*R- R. lt+R/ R0 lt,R1 R2 lt-R3 R4 lt.R5 R6 lt/R7 R8 lt0R9 R: lt1R; R< lt2R= R> lt3RhR? R@ llt4RA RB lt5RC RD lt6RE RF lt7RG RH lt8RI RJ lt9RKRRLRRMR/RN RO llt:RP RQ lt;RR RS lt<RT RU lt=RV RW lt>RX RY lt?RZ R[ lt@R\ R] ltAR^ R_ ltBR`]@Ra]ARbRc RdRe /tCR# )iz3Normalized Nous Portal account entitlement helpers.)ÚannotationsN)Ú	dataclassÚfieldÚfields)ÚdatetimeÚtimezoneÚUTC)ÚAnyÚLiteralÚOptionalz/tuple[str, float, NousPortalAccountInfo] | NoneÚ_account_info_cacheT)Úfrozenc                  óz   € ] tR t^t$ RtR]R&   RtR]R&   RtR]R&   RtR]R&   Rt	R]R	&   Rt
R]R
&   RtR]R&   RtR# )ÚNousPortalSubscriptionInfoNúOptional[str]ÚplanúOptional[int]ÚtierúOptional[float]Úmonthly_chargeÚmonthly_creditsÚcurrent_period_endÚcredits_remainingÚrollover_credits© )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   Ú__annotations__r   r   r   r   r   r   Ú__static_attributes__r   ó    Ú&/opt/hermes/hermes_cli/nous_account.pyr   r      sK   ‡ à€Dˆ-ÓØ€Dˆ-ÓØ&*€N�OÓ*Ø'+€O�_Ó+Ø(,Ð˜Ó,Ø)-Ð�Ó-Ø(,Ð�o×,r!   r   c                  óø   € ] tR t^&t$ RtR]R&   RtR]R&   RtR]R&   RtR]R&   Rt	R]R	&   Rt
R]R
&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR# )ÚNousPaidServiceAccessInfoNúOptional[bool]ÚallowedÚpaid_accessr   ÚreasonÚorganisation_idr   Úeffective_at_msÚhas_active_subscriptionÚactive_subscription_is_paidÚsubscription_tierr   Úsubscription_monthly_chargeÚsubscription_credits_remainingÚpurchased_credits_remainingÚtotal_usable_creditsÚmember_spend_cap_exceededÚmember_spend_cap_usdÚmember_spend_usdÚmember_spend_cap_remaining_usdr   )r   r   r   r   r&   r   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r    r   r!   r"   r$   r$   &   s­   ‡ à"€Gˆ^Ó"Ø"&€K�Ó&Ø €FˆMÓ Ø%)€O�]Ó)Ø%)€O�]Ó)Ø.2Ð˜^Ó2Ø26Ð Ó6Ø'+Ð�}Ó+Ø37Ð Ó7Ø6:Ð" OÓ:Ø37Ð Ó7Ø,0Ð˜/Ó0Ø04Ð˜~Ó4Ø,0Ð˜/Ó0Ø(,Ð�oÓ,Ø6:Ð" O×:r!   r$   c                  óF   € ] tR t^:t$ RtRtR]R&   ]! ]R7      t	R]R&   Rt
R	# )
ÚNousToolAccessInfozìFree tool-pool entitlement (Portal ``tool_access``), decoupled from paid/billing access.

``enabled``: a positive pool balance is live and not gated off; ``coverage``: tool category ->
whether the pool funds it (FAL video is excluded).
FÚboolÚenabled)Údefault_factoryzdict[str, bool]Úcoverager   N)r   r   r   r   Ú__doc__r9   r   r   Údictr;   r    r   r!   r"   r7   r7   :   s"   ‡ ñð €GˆTÓÙ %°dÔ ;€Hˆo×;r!   r7   Ú	anonymousz5This needs a Nous account. Run `hermes auth upgrade`.z1This needs a Nous account. Use /login to sign in.c               ó    € V ^8„  d   QhRRRR/# )é   Úaccount_infoúOptional[NousPortalAccountInfo]Úreturnr8   r   )Úformats   "r"   Ú__annotate__rE   L   s   € ÷ Gñ GÐ%Dð GÈñ Gr!   c                ó2   € V R J;'       d    V P                   # ©N)Úis_anonymous_tier)rA   s   &r"   Ú_is_anonymous_tierrI   L   s   € Ø˜tÐ#×FÐF¨×(FÑ(FÐFr!   c               ó    € V ^8„  d   QhRRRR/# )r@   ÚvalueÚobjectrC   Ústrr   )rD   s   "r"   rE   rE   P   s   € ÷ Cñ C˜6ð C cñ Cr!   c                ón   € \        V \        4      '       d   V P                  4       P                  4       # R# )zÒTier claims arrive verbatim from the JWT claim or the account payload, neither of which
strips or casefolds. Compare them normalized so casing or padding can never turn the
anonymous tier into a registered one.Ú )Ú
isinstancerM   ÚstripÚlower©rK   s   &r"   Ú_normalize_tierrT   P   s*   € ô %/¨u´c×$:Ò$:ˆ5�;‰;‹=×ÑÓ ÐBÀÐBr!   c                  óò  € ] tR t^Wt$ R]R&   R]R&   R]R&   RtR]R&   RtR]R	&   RtR]R
&   RtR]R&   Rt	R]R&   Rt
R]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR ]R!&   RtR ]R"&   RtR]R#&   RtR]R$&   RtR]R%&   ]R& R' l4       t]R( R) l4       t]R* R+ l4       t]R, R- l4       t R. R/ lt!]R0 R1 l4       t"R2t#R# )3ÚNousPortalAccountInfor8   Ú	logged_inÚNousAccountInfoSourceÚsourceÚfreshNr   Úuser_idÚorg_idÚorg_slugÚorg_nameÚ	client_idÚ
product_idÚnous_clientÚportal_base_urlÚinference_base_urlFÚinference_credential_presentÚcredential_sourcezOptional[datetime]Ú
expires_atÚemailÚ	privy_didú$Optional[NousPortalSubscriptionInfo]Úsubscriptionr%   Úpaid_service_accessz#Optional[NousPaidServiceAccessInfo]Úpaid_service_access_infoúOptional[NousToolAccessInfo]Útool_accessúOptional[dict[str, Any]]Ú
raw_claimsÚraw_accountÚerrorÚaccount_tierÚmanaged_toolsc               ó   € V ^8„  d   QhRR/# ©r@   rC   r8   r   )rD   s   "r"   rE   Ú"NousPortalAccountInfo.__annotate__x   s   € ÷ 0ñ 0˜ñ 0r!   c                	ó   € V P                   R J # )T©rk   ©Úselfs   &r"   Úis_paidÚNousPortalAccountInfo.is_paidw   s   € à×'Ñ'¨4Ð/Ð/r!   c               ó   € V ^8„  d   QhRR/# rv   r   )rD   s   "r"   rE   rw   |   s   € ÷ Hñ H 4ñ Hr!   c                ó:   € \        V P                  4      \        8H  # )u›   The free tier: no Nous account, so no billing, credits, or entitlement to speak of.
Compared case- and whitespace-insensitively â€” the claim is wire data.)rT   rs   Ú_ANON_ACCOUNT_TIERrz   s   &r"   rH   Ú'NousPortalAccountInfo.is_anonymous_tier{   s   € ô ˜t×0Ñ0Ó1Ô5GÑGÐGr!   c               ó   € V ^8„  d   QhRR/# rv   r   )rD   s   "r"   rE   rw   ‚   s   € ÷ 1ñ 1˜dñ 1r!   c                	ó   € V P                   R J # )Fry   rz   s   &r"   Úis_free_tierÚ"NousPortalAccountInfo.is_free_tier�   s   € à×'Ñ'¨5Ð0Ð0r!   c               ó   € V ^8„  d   QhRR/# rv   r   )rD   s   "r"   rE   rw   †   s   € ÷ gñ g tñ gr!   c                ó”   € V P                   RJ ;'       g4    \        V P                  ;'       d    V P                  P                  4      # )zUPaid access OR a live free tool pool; use ``tool_gateway_entitled_for`` per category.T)rk   r8   rn   r9   rz   s   &r"   Útool_gateway_entitledÚ+NousPortalAccountInfo.tool_gateway_entitled…   s<   € ð ×'Ñ'¨4Ð/×fÐf´4¸×8HÑ8H×8eÐ8eÈT×M]ÑM]×MeÑMeÓ3fÐfr!   c               ó    € V ^8„  d   QhRRRR/# )r@   ÚcategoryrM   rC   r8   r   )rD   s   "r"   rE   rw   Š   s   € ÷ qñ q°#ð q¸$ñ qr!   c                óÎ   € V P                   pV P                  RJ ;'       gE    \        T;'       d2    VP                  ;'       d    VP                  P                  V4      RJ 4      # )zYPaid users are entitled everywhere; pool users only where ``coverage[category]`` is true.T)rn   rk   r8   r9   r;   Úget)r{   r‹   Útas   && r"   Útool_gateway_entitled_forÚ/NousPortalAccountInfo.tool_gateway_entitled_forŠ   sS   € à×ÑˆØ×'Ñ'¨4Ð/×pÐp´4¸×8oÐ8o¸r¿z¹z×8oÐ8oÈbÏkÉkÏoÉoÐ^fÓNgÐkoÐNoÓ3pÐpr!   c               ó   € V ^8„  d   QhRR/# rv   r   )rD   s   "r"   rE   rw   �   s   € ÷ *ñ *¨$ñ *r!   c                ó   € V P                   RJ # )zTOnly a literal ``true`` from the portal counts; absent and unknown both read as out.T)rt   rz   s   &r"   Úmanaged_tools_rolled_outÚ.NousPortalAccountInfo.managed_tools_rolled_out�   s   € ð ×!Ñ! TÐ)Ð)r!   r   )$r   r   r   r   r   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   rj   rk   rl   rn   rp   rq   rr   rs   rt   Úpropertyr|   rH   r„   rˆ   r�   r“   r    r   r!   r"   rV   rV   W   sq  ‡ àƒOØ!Ó!ØƒKØ!€Gˆ]Ó!Ø €FˆMÓ Ø"€HˆmÓ"Ø"€HˆmÓ"Ø#€Iˆ}Ó#Ø $€J�Ó$Ø!%€K�Ó%Ø%)€O�]Ó)Ø(,Ð˜Ó,Ø).Ð  $Ó.Ø'+Ð�}Ó+Ø%)€JÐ"Ó)Ø€Eˆ=ÓØ#€Iˆ}Ó#Ø9=€LÐ6Ó=Ø*.Ð˜Ó.ØDHÐÐAÓHØ04€KÐ-Ó4Ø+/€JÐ(Ó/Ø,0€KÐ)Ó0Ø€Eˆ=Óà"&€L�-Ó&ð %)€M�>Ó(àô0ó ð0ð ôHó ðHð
 ô1ó ð1ð ôgó ðgõqð
 ô*ó ô*r!   rV   c               ó    € V ^8„  d   QhRRRR/# ©r@   rA   rB   rC   rM   r   )rD   s   "r"   rE   rE   •   s   € ÷ 
)ñ 
)Ð*Ið 
)ÐUXñ 
)r!   c                ó¨   €  ^ RI Hp V e   V P                  MRp\	        V4      '       g   TpVP                  R4       R2#   \         d    Rp LHi ; i)z>Return the billing URL for a normalized Nous account snapshot.)ÚDEFAULT_NOUS_PORTAL_URLúhttps://portal.nousresearch.comNÚ/ú/billing)Úhermes_cli.authr™   Ú	Exceptionrb   Ú	_nonblankÚrstrip)rA   r™   Úbases   &  r"   Únous_portal_billing_urlr¢   •   s]   € ðDÝ;ð ,8Ò+Cˆ<×'Ò'È€DÜ�T�?Š?Ø&ˆØ�k‰k˜#ÓÐ˜xÐ(Ð(øô ô DØ"CÒðDús   ‚A ÁAÁAc               ó    € V ^8„  d   QhRRRR/# r—   r   )rD   s   "r"   rE   rE   ¢   s   € ÷ (ñ (Ð(Gð (ÐSVñ (r!   c                óÌ   € \        V 4      R\        R4      )  pV e   \        V RR4      MRp\        V4      '       d%   ^ RIHp V RV! VP                  4       RR7       R2# V R2# )	u  Portal top-up URL (``?topup=open`` auto-opens the top-up modal).

Prefers the org-pinned ``{base}/orgs/{slug}/billing`` (skips the legacy shim's multi-org
re-resolution); falls back to ``{base}/billing`` when ``org_slug`` is null â€” never
``/orgs/None/billing``.
Nrœ   r]   )Úquotez/orgs/rO   )Úsafez/billing?topup=open)r¢   ÚlenÚgetattrrŸ   Úurllib.parser¥   rQ   )rA   r¡   Úslugr¥   s   &   r"   Únous_portal_topup_urlr«   ¢   so   € ô # <Ó0Ð1C´C¸
³OÐ3CÐD€DØ6BÒ6NŒ7�< ¨TÔ2ÐTX€DÜ�‡‚Ý&à��v™e D§J¡J£L°rÔ:Ð;Ð;NÐOÐOØˆVÐ&Ð'Ð'r!   Ú
capabilityzthis featureÚinclude_refresh_hintÚcoverage_categoryÚin_chatFc               ó0   € V ^8„  d   QhRRRRRRRRR	RR
R/# )r@   rA   rB   r¬   rM   r­   r8   r®   r   r¯   rC   r   )rD   s   "r"   rE   rE   ²   sH   € ÷ Bñ BØ1ðBØBEðBàðBà:GðBð ðBð ñ	Br!   c               ó@  € \        V 4      '       d   V'       d   \        # \        # \        V 4      pV eM   Ve5   V P	                  V4      '       d   R# V P
                  '       d	   V RV R2# MV P
                  '       d   R# V f
   RV RV R2# V P                  '       g%   V P                  '       d
   RV RV R2# RV R	V R2# V P                  fN   R
V R2pV P                  '       d   VRV P                   R2,          pV'       d
   VR,          pVRV R2,           # V P                  pV'       d   VP                  MRpVR8X  d   RV R2# VR8X  g   V P                  RJ d3   \        WWTR7      p	V'       d   V P                  '       g
   V	R,          p	V	# RV RV R2# )aò  User-facing guidance for a missing Nous tool-gateway entitlement; ``None`` when entitled.

Entitled = paid access OR a live free pool that covers it (normalized fields, not price:
purchased credits without a subscription count as paid, an exhausted paid subscription does
not). ``coverage_category`` scopes the check to one category; an otherwise-entitled user whose
access doesn't fund it gets a neutral billing nudge, never an "exhausted" message. The
pool-vs-paid distinction is never surfaced.
Nzd isn't included with your current Nous Portal access. Add credits or a subscription to enable it at Ú.z9Hermes could not verify your Nous Portal entitlement, so zO is unavailable. Run `hermes model` to refresh your login, or check billing at zeNous inference credentials are configured, but Hermes cannot verify your Nous Portal paid access for zc. Log in with `hermes model` to enable Portal-managed features. Billing and credits are managed at zLog in to Nous Portal to use z9: run `hermes model`. Billing and credits are managed at z9Hermes could not verify your Nous Portal paid access, so z is unavailable.z Account lookup failed: z, Run `hermes model` to refresh your session.z Check billing at Úaccount_missingzOHermes could not find a Nous Portal account or organisation for this login, so zi is unavailable. Run `hermes model` to authenticate again; if the problem persists, contact Nous support.Úno_usable_creditsF)r¯   zF If you recently bought credits, run `hermes model` to refresh Hermes.zIYour Nous Portal account does not currently have paid service access, so ú2 is unavailable. Add credits or update billing at )rI   ÚFREE_TIER_NEEDS_ACCOUNT_CHATÚFREE_TIER_NEEDS_ACCOUNTr¢   r�   rˆ   rW   rd   rk   rr   rl   r(   Ú_no_paid_access_messagerZ   )
rA   r¬   r­   r®   r¯   Úbilling_urlÚdetailÚaccessr(   Úmessages
   &$$$$     r"   Ú&format_nous_portal_entitlement_messager½   ²   s  € ô ˜,×'Ò'ß/6Ô+ÐSÔ<SÐSÜ)¨,Ó7€KàÒØÒ(Ø×5Ñ5Ð6G×HÒHÙØ×1×1Ð1à!�lð #EØEPÀMÐQRðTðð 2ð
 ×/×/Ð/ÙØÒàGÈ
À|ð TMØMXÈMÐYZð\ð	
ð ×!×!Ð!Ø×4×4Ð4ð#Ø#- ,ð /@Ø@K¸}ÈAðOðð ,¨J¨<ð 82Ø2=°¸aðAð	
ð ×'Ñ'Ò/ØLÈZÈLÐXhÐiˆØ××ÐØÐ0°×1CÑ1CÐ0DÀAÐFÕFˆFßØÐDÕDˆFØÐ,¨[¨M¸Ð;Õ;Ð;Ø×2Ñ2€Fß$ˆV�]Š]¨$€FØÐ"Ô"à]Ð^hÐ]ið jwð xð	
ð Ð$Ô$¨×(HÑ(HÈEÓ(QÜ)¨,ÀKÔaˆß¨×(:×(:Ð(:ØÐ_Õ_ˆGØˆðØˆ\ÐKÈKÈ=ÐXYð	[ðr!   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r@   rA   rV   r¬   rM   r¹   r¯   r8   rC   r   )rD   s   "r"   rE   rE   ÷   s4   € ÷ ,ñ ,Ø'ð,Ø58ð,ØGJð,ØX\ð,àñ,r!   c               óà  € \        V 4      '       d   V'       d   \        # \        # V P                  ;'       g    \	        4       pVP
                  VP                  reR VP                  3RVP                  3RVP                  33pV UU	u. uF  w  r‰V	f   K  V RV	R 2NK  	  p
pp	V
'       d   RRP                  V
4       R2MRpVP                  '       dD   VP                  VP                  rÜRpVe   Ve   R	VR R
VR R2pMVe   R	VR R2pRV V RV R2# V'       d   V'       d   RV RV RV R2# V'       d   VRJ d
   RV RV R2# VRJ d   RV RV RV R2# RV RV RV R2# u up	pi )Úusablerj   Ú	purchasedz $z.2fz (z, Ú)rO   z. Your organisation's per-member spend cap is $z and you've spent $z of it.r²   zlYour Nous Portal access is paused because you've exceeded the per-member spend cap set by your organisation.z> Ask your organisation admin to raise the member spend cap at z%, then run `hermes model` to refresh.z&Your Nous Portal credits are exhaustedz, so z, is unavailable. Top up or renew credits at FzGYour current Nous Portal plan does not include paid service access, so z+ is unavailable. Upgrade or add credits at zEYour Nous Portal account has no active subscription or usable creditsz- is unavailable. Subscribe or add credits at z3Your Nous Portal account has no usable paid creditsrµ   )rI   r¶   r·   rl   r$   r+   r,   r1   r/   r0   Újoinr2   r3   r4   )rA   r¬   r¹   r¯   r»   ÚactiveÚpaidÚlabelledÚlabelÚamountÚpartsÚcredit_detailÚcapÚspentÚ
cap_details   &&&$           r"   r¸   r¸   ÷   sù  € ô ˜,×'Ò'ß/6Ô+ÐSÔ<SÐSØ×2Ñ2×QÐQÔ6OÓ6Q€FØ×1Ñ1°6×3UÑ3UˆDà	�6×.Ñ.Ð/Ø	˜×>Ñ>Ð?Ø	�f×8Ñ8Ð9ð€Hñ
 <DÔZ¹8©-¨%ÀvÔ%�ˆw�b˜ ˜Ó%¹8€EÑZß05�b˜Ÿ™ 5Ó)Ð*¨!Ñ,¸2€MØ×'×'Ð'Ø×0Ñ0°&×2IÑ2IˆUØˆ
ØŠ?˜uÒ0ØIÈ#ÈcÈÐReÐfkÐloÐepÐpwÐx‰JØŠ_ØIÈ#ÈcÈÐRSÐTˆJð!Ø!+ ¨]¨Oð <#Ø#. -Ð/TðVð	
÷
 —$à4°]°OÀ5ÈÈð U*Ø*5¨°að9ð	
÷ �$˜%“-ðØ�ÐHÈÈÐUVðXð	
ð �ƒàSÐTaÐSbð cØ�ÐJÈ;È-ÐWXðZð	
ð
 >¸m¸_ÈEØˆ,ÐHÈÈÐUVð	Xðùó; [s   Â	E*ÂE*c               ó   € V ^8„  d   QhRR/# )r@   rC   ÚNoner   )rD   s   "r"   rE   rE   &  s   € ÷ ñ ¨dñ r!   c                 ó
   € Rs R# )z7Clear the short-lived account-info cache used by tests.N)r   r   r!   r"   Ú$reset_nous_portal_account_info_cacherÑ   &  s
   € ð Òr!   Úforce_freshÚmin_jwt_ttl_secondsc               ó$   € V ^8„  d   QhRRRRRR/# )r@   rÒ   r8   rÓ   ÚintrC   rV   r   )rD   s   "r"   rE   rE   ,  s(   € ÷ Dñ D°ð DÐTWð DÐavñ Dr!   c                óÂ  €  ^ RI Hp V! R4      ;'       g    / p^ RIHpHp T! T4      '       d   RMT! T4      ;'       g    Rp\        T4      p\        T4      '       g7   \        YT4      ;'       g#    \        T4      ;'       g    \        RRRTR	7      # T '       g   \        YsY�4      p	T	e   T	# \        Y0T4      #   \         d   p\        TRR7      u Rp?# Rp?ii ; i)
zçNormalized Nous Portal account entitlement.

A valid unexpired OAuth JWT serves as a local snapshot (UX gating only; the server stays
authoritative). ``force_fresh=True`` always calls ``/api/oauth/account`` and bypasses the cache.
)Úget_provider_auth_stateÚnousF)rr   rW   N)Úguest_without_free_tierÚheld_connectors_tokenrO   Únone)rW   rY   rZ   rb   )r�   r×   rž   Ú_error_infoÚhermes_cli.anon_authrÙ   rÚ   Ú_portal_base_urlrŸ   Ú_info_from_oauth_poolÚ_info_from_inference_key_poolrV   Ú_info_from_valid_jwtÚ_fresh_account_info)
rÒ   rÓ   r×   ÚstateÚexcrÙ   rÚ   Úaccess_tokenrb   Újwt_infos
   $$        r"   Úget_nous_portal_account_inforç   ,  sÞ   € ð7Ý;á'¨Ó/×5Ð5°2ˆ÷ Tá0°×7Ò7‘2Ñ>SÐTYÓ>Z×>`Ð>`Ð^`€LÜ& uÓ-€OÜ�\×"Ò"ä! +ÀOÓT÷ sð sÜ,¨_Ó=÷sð sä$¨u¸VÈ5ÐbqÔrð	
÷
 Ü'¨¸_ÓbˆØÒØˆOÜ˜u°?ÓCÐCøô' ô 7Ü °Ô6Õ6ûð7ús"   ‚B< —B< Â<CÃCÃCÃCc               ó   € V ^8„  d   QhRR/# )r@   rC   r%   r   )rD   s   "r"   rE   rE   L  s   € ÷ ñ ˜^ñ r!   c                 óø   €  ^ RI Hp Hp V ! R4      ;'       g    / P                  R4      p\	        V4      '       g   R# V! V4      pV'       d   \        VP                  R4      4      # R#   \         d     R# i ; i)z¤Whether the caller's org carries a restrictive model/provider policy.

``None`` is unknown (older mint / unreadable claim) and must not be reported as "no policy".
)r×   Ú_decode_jwt_claimsrØ   rå   NÚpolicy_present)r�   r×   rê   r�   rŸ   Ú_coerce_boolrž   )r×   rê   rå   Úclaimss       r"   Únous_policy_presentrî   L  sm   € ð
	ßOá/°Ó7×=Ð=¸2×BÑBÀ>ÓRˆÜ˜×&Ò&ÙÙ# LÓ1ˆß=CŒ|˜FŸJ™JÐ'7Ó8Ó9ÐMÈÐMøÜô Úðús'   ‚A* ™#A* ¾A* ÁA* Á(A* Á*A9Á8A9c               ó    € V ^8„  d   QhRRRR/# )r@   Úremovedr8   rC   rM   r   )rD   s   "r"   rE   rE   ]  s   € ÷ ñ  4ð ¨Cñ r!   c                ó8   € V '       d   \        4       RJd   R#  R# )uM  One-line notice for a list the org's policy narrowed, else ``""``.

Blocked models are omitted, which reads as "unsupported"; this says which it is without
enumerating them. ``removed`` must reflect whether the filter actually dropped anything â€” the
catalog read fails open, so the claim alone would label a full list as filtered.
TrO   ud   Your organization restricts which models are available â€” models outside its policy are not listed.)rî   )rð   s   $r"   Únous_policy_noticerò   ]  s   € ÷ Ô)Ó+°4Ó7Ùð	4ñr!   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r@   rã   údict[str, Any]rÒ   r8   rb   r   rC   rV   r   )rD   s   "r"   rE   rE   l  s0   € ÷ qñ q˜~ð q¸Dð qÐS`ð qÐezñ qr!   c                ób  €  ^ RI HpHp V! 4       pV! R4      ;'       g    T p\        V4      ;'       g    Tp\        P
                  ! VP                  R4      4      P                  4       pT;'       g    R RV 2p\        ;_uu_ 4        V'       gI   \        eA   \        w  ršpW˜8X  d2   \        P                  ! 4       V
,
          \        8  d   VuuRRR4       # RRR4       \        WVV4      pVP                  R8w  d2   \        ;_uu_ 4        V\        P                  ! 4       V3s	RRR4       V# V#   + '       g   i     L`; i  + '       g   i     T# ; i  \         dJ   p\!        T\#        T P%                  R4      4      T\'        T P%                  R	4      4      R
7      u Rp?# Rp?ii ; i)é    )r×   Úresolve_nous_access_tokenrØ   zutf-8rO   Ú:Nrr   rå   rs   ©rr   rW   rb   rs   )r�   r×   r÷   rÞ   ÚhashlibÚsha256ÚencodeÚ	hexdigestÚ_ACCOUNT_INFO_CACHE_LOCKr   ÚtimeÚ	monotonicÚ_ACCOUNT_INFO_CACHE_TTLÚ_info_from_fetched_accountrY   rž   rÜ   r8   r�   Ú_coerce_str)rã   rÒ   rb   r×   r÷   rå   Úrefreshed_stateÚdigestÚ	cache_keyÚ
cached_keyÚ	cached_atÚcached_infoÚinforä   s   &&&           r"   râ   râ   l  sU  € ðqßVá0Ó2ˆÙ1°&Ó9×BÐB¸UˆÜ*¨?Ó;×NÐN¸ˆÜ—’ × 3Ñ 3°GÓ <Ó=×GÑGÓIˆØ&×,Ð,¨"Ð-¨Q¨v¨hÐ7ˆ	ç%Ö%ßÔ#6Ò#BÜ5HÑ2�
 {ØÔ*´·²Ó0@À9Õ0LÔPgÔ/gØ&÷	 &×%Ò%ô *¨,ÈÓYˆØ�;‰;˜'Ô!ß)Ö)Ø'0´$·.².Ó2BÀDÐ&IÐ#÷ *àˆˆtˆ÷ &×%ú÷ *Ö)àˆûÜô qÜ ´°U·Y±Y¸~Ó5NÓ0OØ+:ÌÐUZ×U^ÑU^Ð_mÓUnÓIoôqõ 	qûðqúsp   ‚E  E µ>E Á4E Â
AD3Ã
E Ã3E ÄEÄ'	E Ä1E Ä3E	Ä>E ÅE	ÅE ÅE ÅF.Å%>F)Æ#F.Æ)F.c               ó    € V ^8„  d   QhRRRR/# )r@   rb   r   rC   rB   r   )rD   s   "r"   rE   rE   ˆ  s   € ÷ ñ °=ð ÐEdñ r!   c                ó,  €  \        4       pVf   R# \        \        VRR4      ;'       g    \        VRR4      4      '       g   R# \        RRR\        VRR4      ;'       g    T \	        V4      RR	\        VR
R4       2RR7      #   \
         d     R# i ; i)zEReturn an explicit unknown-entitlement snapshot for opaque Nous keys.NÚruntime_api_keyrå   rO   FÚinference_keyrb   Túpool:rÇ   ÚunknownÚportal_oauth_missing)rW   rY   rZ   rb   rc   rd   re   rr   )Ú_select_nous_pool_entryrŸ   r¨   rV   Ú_pool_entry_inference_urlrž   )rb   Úentrys   & r"   rà   rà   ˆ  s¡   € ðÜ'Ó)ˆØŠ=ÙÜœ Ð(9¸4Ó@×fÐfÄGÈEÐSaÐceÓDf×gÒgÙÜ$Ø O¸5Ü# EÐ+<¸dÓC×VÐVÀÜ8¸Ó?Ø)-Ø %¤g¨e°W¸iÓ&HÐ%IÐJØ(ô
ð 	
øô ô Úðús'   ‚B ’B «B ÁB Á!"B ÂBÂBc               ó(   € V ^8„  d   QhRRRRRRRR/# )	r@   rÒ   r8   rÓ   rÕ   rb   r   rC   rB   r   )rD   s   "r"   rE   rE   œ  s2   € ÷ Pñ PØðPØ,/ðPØBOðPà$ñPr!   c                óî  €  \        4       pTe   \        T4      '       g   R # TP                  p\	        TRR 4      ;'       g    TpRTR\	        TRR 4      R\        T4      R\	        TRR 4      RR\	        TRR	4       2/pT '       g   \        YFYQ4      pTe   T#  \        YFT4      #   \         d     R # i ; i  \         d2   p\        TR
T\        TP                  R4      4      R7      u R p?# R p?ii ; i)Nrb   rå   r_   rc   Ú	agent_keyre   r  rÇ   r  Trs   rù   )r  rž   Ú_pool_entry_is_portal_oauthrå   r¨   r  rá   r  rÜ   r  r�   )	rÒ   rÓ   rb   r  rå   Úentry_portal_urlrã   ræ   rä   s	   &&&      r"   rß   rß   œ  s  € ðÜ'Ó)ˆð ‚}Ô7¸×>Ò>ÙØ×%Ñ%€LÜ˜uÐ&7¸Ó>×QÐQÀ/Ðà˜ k´7¸5À+ÈtÓ3TØÔ7¸Ó>ÀÌWÐUZÐ\gÐimÓMnØ˜u¤W¨U°G¸YÓ%GÐ$HÐIð€E÷ Ü'¨Ð=MÓcˆØÒØˆOðPÜ)¨,Ð?OÓPÐPøô# ô Úðûô$ ô PÜ °ÐFVÜ(3°E·I±I¸nÓ4MÓ(NôPõ 	PûðPús/   ‚
B& ÂB8 Â&B5Â4B5Â8C4Ã&C/Ã)C4Ã/C4c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r@   rå   rM   rã   rô   rb   r   rC   rV   r   )rD   s   "r"   rE   rE   ¸  s2   € ÷ ]ñ ]Øð]Ø,ð]Ø?Lð]àñ]r!   c                ó  € \        W4      p\        VP                  R4      4      pV'       g   \        RRW$R7      # \	        VP                  R4      \
        4      '       d!   \        VR,          ;'       g    RRW#VR7      # \        W1VR7      # )	zZCall ``/api/oauth/account`` and normalize; empty or ``error`` payloads become error infos.rs   Úempty_account_responseTrù   rr   Úaccount_response_error©rr   rW   rb   rq   rs   )rã   rb   )Ú_fetch_nous_account_infor  r�   rÜ   rP   rM   Ú_info_from_account_payload)rå   rã   rb   Úpayloadr   s   &&&  r"   r  r  ¸  s…   € ô ' |ÓE€GÜ�u—y‘y Ó0Ó1€DßÜÐ!9ÀTØ+:ôOð 	Oä�'—+‘+˜gÓ&¬×,Ò,ÜØ˜'Õ"×>Ð>Ð&>È$Ø+Ètô
ð 	
ô & gÈOÔ\Ð\r!   c               ó    € V ^8„  d   QhRRRR/# )r@   r  r	   rC   r   r   )rD   s   "r"   rE   rE   É  s   € ÷ Fñ F Sð F¨]ñ Fr!   c                óp   € \        V R R4      ;'       g#    \        V RR4      ;'       g    \        V RR4      # )rc   NÚruntime_base_urlÚbase_url)r¨   )r  s   &r"   r  r  É  sQ   € Ü�5Ð.°Ó5÷  Fð  F¼ÀÐHZÐ\`Ó9a÷  Fð  FÔelÐmrÐt~ð  AEó  fFð  Fr!   c               ó   € V ^8„  d   QhRR/# )r@   rC   zOptional[Any]r   )rD   s   "r"   rE   rE   Í  s   € ÷ -ñ - ñ -r!   c                 óÈ   € ^ RI Hp  V ! R4      pV'       d   VP                  4       '       g   R# \        VP	                  4       4      pV'       g   R# R R lp\        W#R7      # )zVPool entry with the latest agent-key expiry, then access expiry, then lowest priority.)Ú	load_poolrØ   Nc               ó    € V ^8„  d   QhRRRR/# )r@   r  r	   rC   ztuple[float, float, int]r   )rD   s   "r"   rE   Ú-_select_nous_pool_entry.<locals>.__annotate__Ø  s   € ÷ Qñ Q˜sð QÐ'?ñ Qr!   c           	     óÈ   € \        \        V R R4      4      ;'       g    Rp\        \        V RR4      4      ;'       g    RpY\        \        V R^ 4      ;'       g    ^ 4      ) 3# )Úagent_key_expires_atNg        rf   Úpriority)Ú_parse_iso_timestampr¨   rÕ   )r  Ú	agent_expÚ
access_exps   &  r"   Ú_entry_sort_keyÚ0_select_nous_pool_entry.<locals>._entry_sort_keyØ  s`   € Ü(¬°Ð8NÐPTÓ)UÓV×]Ð]ÐZ]ˆ	Ü)¬'°%¸ÀtÓ*LÓM×TÐTÐQTˆ
Ø¬¬G°E¸:ÀqÓ,I×,NÐ,NÈQÓ(OÐ'OÐPÐPr!   )Úkey)Úagent.credential_poolr(  Úhas_credentialsÚlistÚentriesÚmax)r(  Úpoolr7  r1  s       r"   r  r  Í  sL   € å/á�VÓ€Dß�t×+Ñ+×-Ò-ÙÜ�4—<‘<“>Ó"€GßÙõQô
 ˆwÔ,Ð,r!   c               ó    € V ^8„  d   QhRRRR/# )r@   r  r	   rC   r8   r   )rD   s   "r"   rE   rE   à  s   € ÷ Xñ X sð X¨tñ Xr!   c                ó  € \        \        V R R4      4      '       g   R# \        \        V RR4      ;'       g    R4      P                  4       P	                  4       pVP                  R4      ;'       g    \        \        V RR4      4      # )rå   NFÚ	auth_typerO   ÚoauthÚrefresh_token)rŸ   r¨   rM   rQ   rR   Ú
startswithr8   )r  r<  s   & r"   r  r  à  sn   € Ü”W˜U N°DÓ9×:Ò:ÙÜ”G˜E ;°Ó3×9Ð9°rÓ:×@Ñ@ÓB×HÑHÓJ€IØ×Ñ Ó(×WÐW¬D´¸ÀÐQUÓ1VÓ,WÐWr!   c               ó$   € V ^8„  d   QhRRRRRR/# )r@   rå   rM   rb   r   rC   rô   r   )rD   s   "r"   rE   rE   ç  s"   € ÷ 8ñ 8¨3ð 8Àð 8ÐZhñ 8r!   c                ó´  € T;'       g    R P                  R4      pRRV  2RR/p\        P                  P                  V R2VR7      p\        P                  P	                  V^R7      ;_uu_ 4       p\
        P                  ! VP                  4       P                  4       4      pR	R	R	4       \        X\        4      '       d   V# / #   + '       g   i     L*; i)
rš   r›   ÚAuthorizationzBearer ÚAcceptzapplication/jsonz/api/oauth/account)Úheaders)ÚtimeoutN)r    ÚurllibÚrequestÚRequestÚurlopenÚjsonÚloadsÚreadÚdecoderP   r=   )rå   rb   r¡   rD  ÚreqÚrespr!  s   &&     r"   r  r  ç  s°   € Ø×@Ð@Ð@×HÑHÈÓM€DØ '¨,¨Ð 8¸(ÐDVÐW€GÜ
�.‰.×
 Ñ
  D 6Ð);Ð!<ÀgÐ
 Ó
N€CÜ	�‰×	Ñ	 ¨QÐ	×	/Ô	/°4Ü—*’*˜TŸY™Y›[×/Ñ/Ó1Ó2ˆ÷ 
0ä  ¬$×/Ò/ˆ7Ð7°RÐ7÷ 
0×	/ús   Á23CÃC	c          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r@   ÚtokenrM   rã   rô   rb   r   rÓ   rÕ   rC   rB   r   )rD   s   "r"   rE   rE   ð  s4   € ÷ #ñ #Øð#Ø%ð#Ø8Eð#Ø\_ð#à$ñ#r!   c           
     óø  €  ^ RI Hp T! T 4      pT'       g   R# \        TP	                  R4      \
        4      pTe5   T\        P                  ! 4       \        ^ \        T4      4      ,           8:  d   R# \        TP	                  R4      4      p\        Yw\        TP	                  R4      4      \        TP	                  R4      \        4      R7      p\        R / RR	bR
RbRRbR\        TP	                  R4      4      bR\        TP	                  R4      4      bR\        TP	                  R4      ;'       g    TP	                  R4      4      bR\        TP	                  R4      4      bR\        TP	                  R4      4      bRTbR\        TP	                  R4      4      bRR	bR\        TP	                  R4      4      ;'       g    RbR\        P                  ! T\        R7      bRTbRTbR\!        TP	                  R4      4      bR\#        T4      bR\        TP	                  R4      4      ;'       g    \        TP	                  R4      4      bR\        TP	                  R4      4      b #   \         d     R# i ; i)!rö   )rê   NÚexpr'   r\   r-   )r&   r'   r)   r-   rW   TrY   ÚjwtrZ   Fr[   Úsubr_   r`   ra   rb   rc   rd   re   Ú
auth_storerf   )Útzrk   rl   rn   rp   rs   rt   r   )r�   rê   rž   Ú_coerce_numr�   Úfloatrÿ   r8  rÕ   rì   r$   r  rV   r   Úfromtimestampr   Ú_tool_access_from_valuer=   )	rQ  rã   rb   rÓ   rê   rí   rS  r'   Úaccess_infos	   &&&&     r"   rá   rá   ð  sL  € ðÝ6ñ   Ó&€FßÙÜ
�f—j‘j Ó'¬Ó
/€CØ
‚{�cœTŸYšY›[¬3¨q´#Ð6IÓ2JÓ+KÕKÔKÙÜ˜vŸz™z¨-Ó8Ó9€KÜ+ØÄkÐRX×R\ÑR\Ð]eÓRfÓFgÜ% f§j¡jÐ1DÓ&EÄsÓKô€Kô !ò ÙðÙ$ðÙ,1ðä˜FŸJ™J uÓ-Ô.ðô ˜6Ÿ:™: hÓ/Ô0ðô ˜fŸj™j¨Ó5×OÐO¸¿¹À;Ó9OÔPð	ô
 ˜vŸz™z¨,Ó7Ô8ðô   §
¡
¨=Ó 9Ô:ðñ (ðô ' u§y¡yÐ1EÓ'FÔGðñ &*ðô & e§i¡iÐ0CÓ&DÓE×UÐUÈøðô ×)Ò)¨#´#Õ6ðñ (ðñ CNðô ,¨F¯J©J°}Ó,EÔFðô ˜”<ðô ! §¡¨NÓ!;Ó<×fÐfÄÈEÏIÉIÐVdÓLeÓ@føðô  # 6§:¡:¨oÓ#>Ô?ð!ð øô ô Úðús   ‚I* É*I9É8I9c               ó(   € V ^8„  d   QhRRRRRRRR/# )r@   r!  rô   rã   rb   r   rC   rV   r   )rD   s   "r"   rE   rE     s,   € ÷ ñ ØðØ'5ðØHUðàñr!   c          
     ó  € \        V P                  R 4      4      p\        V P                  R4      4      p\        \        V P                  R4      4      pRpVe'   VP                  e   VP                  MVP
                  p\        R/ RRbRRbRRbR	\        VP                  R
4      4      ;'       g    V'       d   VP                  MRbR\        VP                  R4      4      bR\        VP                  R4      4      bR\        VP                  R4      4      bRVbR\        VP                  R4      4      bR\        VP                  R4      ;'       g    VP                  R4      4      bR\        VP                  R4      4      ;'       g    RbR\        VP                  R4      4      bR\        VP                  R4      4      bR\        V P                  R4      4      bRVbRVbR\        V P                  R4      4      bR\        V 4      bR\        V P                  R4      4      ;'       g=    \        VP                  R4      4      ;'       g    \        VP                  R4      4      bR\        V P                  R4      4      b # ) ÚuserÚorganisationrk   NrW   TrY   Úaccount_apirZ   r\   Úidr]   rª   r^   Únamer_   rb   rc   rd   rå   r  re   rV  rg   rh   rj   rl   rn   rq   rs   rt   r   )Ú_dict_or_emptyr�   Ú_coerced_dataclassr$   r&   r'   rV   r  r)   r8   Ú_subscription_from_payloadr[  r=   rì   )r!  rã   rb   r_  r`  r»   r'   s   &$$    r"   r   r     s^  € ô ˜'Ÿ+™+ fÓ-Ó.€DÜ! '§+¡+¨nÓ"=Ó>€LÜÔ 9¸7¿;¹;ÐG\Ó;]Ó^€FØ€KØÒØ(.¯©Ò(B�f—n’nÈ×HZÑHZˆÜ ò ÙðÙ,ðÙ48ðä˜<×+Ñ+¨DÓ1Ó2×bÐb×QW°v×7MÒ7MÐ]aøðô ˜\×-Ñ-¨fÓ5Ô6ðô ˜\×-Ñ-¨fÓ5Ô6ð	ô
 ˜eŸi™i¨Ó4Ô5ðñ (ðô ' u§y¡yÐ1EÓ'FÔGðô &*¨%¯)©)°NÓ*C×*]Ð*]ÀuÇyÁyÐQ\ÓG]Ô%^ðô & e§i¡iÐ0CÓ&DÓE×UÐUÈøðô ˜$Ÿ(™( 7Ó+Ô,ðô ˜dŸh™h {Ó3Ô4ðô 0°·±¸NÓ0KÔLðñ (ðñ CIðô ,¨G¯K©K¸Ó,FÔGðô ˜”Mðô  ! §¡¨^Ó!<Ó=÷ 2ð 2ÄÈTÏXÉXÐVdÓMeÓAf÷ 2ð 2Ü�u—y‘y Ó0Ó1øð#ô$ # 7§;¡;¨Ó#?Ô@ð%ð r!   c               ó    € V ^8„  d   QhRRRR/# )r@   rK   r	   rC   rm   r   )rD   s   "r"   rE   rE   5  s   € ÷ 	Wñ 	W 3ð 	WÐ+Gñ 	Wr!   c                ó$  € \        V \        4      '       g   R# \        V P                  R4      4      P	                  4        UUu/ uF!  w  r\        V\
        4      '       g   K  WRJ bK#  	  ppp\        V P                  R4      RJ VR7      # u uppi )zµParse a Portal ``tool_access`` object (JWT claim or account API).

Fails closed: a non-object yields ``None``; only literal ``true`` counts for ``enabled`` and
each coverage entry.
Nr;   Tr9   )r9   r;   )rP   r=   rd  r�   ÚitemsrM   r7   )rK   ÚkÚvr;   s   &   r"   r[  r[  5  sx   € ô �eœT×"Ò"ÙÜ)7¸¿	¹	À*Ó8MÓ)N×)TÑ)TÔ)VÔmÑ)V¡ ÔZdÐefÔhk×Zl”�˜�9’Ñ)V€HÑmÜ e§i¡i°	Ó&:¸dÐ&BÈXÔVÐVùó ns   ÁBÁ#Bc               ó   € V ^8„  d   QhRR/# ©r@   rK   r	   r   )rD   s   "r"   rE   rE   A  s   € ÷ {ñ { 3ñ {r!   c                óú   € \        V\        4      '       d`   T ! R/ \        V 4       Uu/ uFC  q"P                  \        VP
                  ,          ! VP                  VP                  4      4      bKE  	  upB # R# u upi )zZBuild ``cls`` from a payload dict (field names = payload keys), coercing by declared type.Nr   )rP   r=   r   rc  Ú	_COERCERSÚtyper�   )ÚclsrK   Úfs   && r"   re  re  A  s\   € äYcÐdiÔko×YpÒYp‰3ÑUÌÈsÌÓTÉÀ1—&‘&œ) A§F¡FÖ+¨E¯I©I°a·f±fÓ,=Ó>Ò>ÉÑTÑUÐzÐvzÐzùÒTs   ¨A	A8c               ó    € V ^8„  d   QhRRRR/# )r@   rK   r	   rC   ri   r   )rD   s   "r"   rE   rE   F  s   € ÷ Añ A cð AÐ.Rñ Ar!   c                ó"   € \        \        V 4      # rG   )re  r   rS   s   &r"   rf  rf  F  s   € ÜÔ8¸%Ó@Ð@r!   rb   rq   rs   c               ó0   € V ^8„  d   QhRRRRRRRRR	RR
R/# )r@   rr   rL   rW   r8   rb   r   rq   ro   rs   rC   rV   r   )rD   s   "r"   rE   rE   J  s>   € ÷ 
ñ 
Øð
Ø!%ð
Ø8Eð
à)ð
à@Mð
ð ñ
r!   c           
     ó8   € \        VRRVV\        V 4      VR7      # )zßA failed-lookup snapshot. ``account_tier`` is carried through when the caller still holds the
stored state, so a guest whose lookup failed still gets the "needs a Nous account" copy rather
than billing or re-login guidance.rr   F)rW   rY   rZ   rb   rq   rr   rs   )rV   rM   r  s   $$$$$r"   rÜ   rÜ   J  s%   € ô !Ø G°5È/Ø¤s¨5£zÀôð r!   c               ó    € V ^8„  d   QhRRRR/# )r@   rK   r	   rC   r8   r   )rD   s   "r"   rE   rE   W  s   € ÷ :ñ :�Sð :˜Tñ :r!   c                ód   € \        V \        4      ;'       d    \        V P                  4       4      # rG   )rP   rM   r8   rQ   rS   s   &r"   rŸ   rŸ   W  s"   € Ü�eœSÓ!×9Ð9¤d¨5¯;©;«=Ó&9Ð9r!   c               ó    € V ^8„  d   QhRRRR/# )r@   rK   r	   rC   rô   r   )rD   s   "r"   rE   rE   [  s   € ÷ 4ñ 4˜#ð 4 .ñ 4r!   c                ó6   € \        V \        4      '       d   V # / # rG   )rP   r=   rS   s   &r"   rd  rd  [  s   € Ü˜u¤d×+Ò+ˆ5Ð3°Ð3r!   c               ó   € V ^8„  d   QhRR/# )r@   rC   rM   r   )rD   s   "r"   rE   rE   _  s   € ÷ Hñ H cñ Hr!   c                 óB   € ^ RI Hp Hp T ! V! R4      ;'       g    / 4      # )rö   ©Ú_nous_portal_base_urlr×   rØ   )r�   r~  r×   r}  s     r"   Úresolve_nous_portal_base_urlr  _  s   € ßNá Ñ!8¸Ó!@×!FÐ!FÀBÓGÐGr!   c               ó    € V ^8„  d   QhRRRR/# )r@   rã   rô   rC   r   r   )rD   s   "r"   rE   rE   e  s   € ÷ Cñ C˜Nð C¨}ñ Cr!   c                óˆ   € V P                  R 4      p\        V4      '       d    VP                  4       P                  R4      # R# )rb   r›   N)r�   rŸ   rQ   r    )rã   rK   s   & r"   rÞ   rÞ   e  s7   € Ø�I‰IÐ'Ó(€EÜ(1°%×(8Ò(8ˆ5�;‰;‹=×Ñ Ó$ÐB¸dÐBr!   c               ó    € V ^8„  d   QhRRRR/# )r@   rK   r	   rC   r   r   )rD   s   "r"   rE   rE   j  s   € ÷ 	ñ 	 ð 	¨ñ 	r!   c                ó  € \        V \        4      '       d	   V '       g   R # V P                  4       pVP                  R4      '       d   VR R R,           p \        P
                  ! V4      P                  4       #   \         d     R # i ; i)NÚZz+00:00éÿÿÿÿ)rP   rM   rQ   Úendswithr   ÚfromisoformatÚ	timestamprž   )rK   Útexts   & r"   r.  r.  j  so   € Ü�eœS×!Ò!¯ÙØ�;‰;‹=€DØ‡}�}�S×ÒØ�C�Rˆy˜8Õ#ˆðÜ×%Ò% dÓ+×5Ñ5Ó7Ð7øÜô Úðús   Á#A9 Á9BÂBc               ó    € V ^8„  d   QhRRRR/# )r@   rK   r	   rC   r   r   )rD   s   "r"   rE   rE   v  s   € ÷ ?ñ ?�sð ?˜}ñ ?r!   c                óF   € \        V \        4      '       d   V '       d   V # R # rG   )rP   rM   rS   s   &r"   r  r  v  s   € Ü˜u¤c×*Ò*¯uˆ5Ð>¸$Ð>r!   c               ó    € V ^8„  d   QhRRRR/# )r@   rK   r	   rC   r%   r   )rD   s   "r"   rE   rE   z  s   € ÷ 6ñ 6˜ð 6 ñ 6r!   c                ó6   € \        V \        4      '       d   V # R # rG   )rP   r8   rS   s   &r"   rì   rì   z  s   € Ü˜u¤d×+Ò+ˆ5Ð5°Ð5r!   c               ó   € V ^8„  d   QhRR/# rm  r   )rD   s   "r"   rE   rE   ~  s   € ÷ ñ �sñ r!   c                ó|   € V e   \        V \        4      '       d   R#  V! V 4      #   \        \        3 d     R# i ; i)zB``cast(value)`` or None; bools and None are rejected, not coerced.N)rP   r8   Ú	TypeErrorÚ
ValueError)rK   Úcasts   &&r"   rX  rX  ~  s<   € à‚}œ
 5¬$×/Ò/ÙðÙ�E‹{ÐøÜ”zÐ"ô Úðús   ž& ¦;º;r   r%   r   c                ó"   € \        V \        4      # rG   )rX  rÕ   ©rk  s   &r"   Ú<lambda>r•  Œ  s   € œ{¨1¬cÔ2r!   r   c                ó"   € \        V \        4      # rG   )rX  rY  r”  s   &r"   r•  r•  �  s   € ¤¨Q´Ô!6r!   )rT  ra  r  rÛ   rr   )Ú	firecrawlÚfalz	fal-videozopenai-audiozbrowser-useÚmodalrG   )DÚ__conditional_annotations__r<   Ú
__future__r   rú   rJ  Ú	threadingrÿ   Úurllib.requestrF  Údataclassesr   r   r   r   r   r   Útypingr	   r
   r   rX   ÚTOOL_COVERAGE_CATEGORIESr  r   r   ÚLockrþ   r   r$   r7   r€   r·   r¶   rI   rT   rV   r¢   r«   r½   r¸   rÑ   rç   rî   rò   râ   rà   rß   r  r  r  r  r  rá   r   r[  re  rf  rÜ   rŸ   rd  r  rÞ   r.  r  rì   rX  ro  )rš  s   @r"   Ú<module>r¢     s  øðÜ 9å "ã Û Û Û Û ß 0Ñ 0ß ,Ñ ,ß )Ñ )ð  Ð VÕWÐ ð
 eÐ àÐ ØGKÐ ÐDÓ KØ$Ÿ>š>Ó+Ð ñ �$Ô÷-ð -ó ð-ñ �$Ô÷;ð ;ó ð;ñ& �$Ô÷<ð <ó ð<ð !Ð àQÐ ØRÐ õGõCñ �$Ô÷:*ð :*ó ð:*÷z
)÷(ð BØHVðBà!%ðBàJNðBð ÷BðJ,Ø_d÷,õ^ðD¸ð DÐZ\÷ Dõ@õ"õqõ8õ(Põ8]õ"Fõ-õ&X÷8õ#õLõ>	Wõ{õ
Að
ØHLð
à,0ð
àPT÷
õ:õ4õHõCõ
	õ?õ6õð �[Ø�lØÑ2ØÑ6ð	‚	r!   