
    +g                       S SK Jr  SSKJrJr  S SKJr  S SKrS SKr " S S\R                  5      r
 " S S	\R                  5      r " S
 S\R                  5      r " S S\R                  5      r\ " S S5      5       r S   SS jjrSS jr      S S jr      S!S jr        S"S jr S     S#S jjrSS jr\" S5      \ " S S5      5       5       r\" S5      \ " S S5      5       5       rg)$    )annotations   )event_classT_JSON_DICT)	dataclassNc                  6    \ rS rSrSrSrSrS r\S 5       r	Sr
g)	
LoginState   z
Whether this is a sign-up or sign-in action for this account, i.e.
whether this account has ever been used to sign in to this RP before.
SignInSignUpc                    U R                   $ Nvalueselfs    v/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/selenium/webdriver/common/devtools/v132/fed_cm.pyto_jsonLoginState.to_json       zz    c                    U " U5      $ r    clsjsons     r   	from_jsonLoginState.from_json       4yr   r   N)__name__
__module____qualname____firstlineno____doc__SIGN_INSIGN_UPr   classmethodr   __static_attributes__r   r   r   r	   r	      s,     GG  r   r	   c                  >    \ rS rSrSrSrSrSrSrS r	\
S 5       rS	rg
)
DialogType   z
The types of FedCM dialogs.
AccountChooserAutoReauthnConfirmIdpLoginErrorc                    U R                   $ r   r   r   s    r   r   DialogType.to_json&   r   r   c                    U " U5      $ r   r   r   s     r   r   DialogType.from_json)   r   r   r   N)r    r!   r"   r#   r$   ACCOUNT_CHOOSERAUTO_REAUTHNCONFIRM_IDP_LOGINERRORr   r'   r   r(   r   r   r   r*   r*      s7     'O L)E  r   r*   c                  :    \ rS rSrSrSrSrSrS r\	S 5       r
Srg	)
DialogButton.   z"
The buttons on the FedCM dialog.
ConfirmIdpLoginContinue
ErrorGotItErrorMoreDetailsc                    U R                   $ r   r   r   s    r   r   DialogButton.to_json6   r   r   c                    U " U5      $ r   r   r   s     r   r   DialogButton.from_json9   r   r   r   N)r    r!   r"   r#   r$   CONFIRM_IDP_LOGIN_CONTINUEERROR_GOT_ITERROR_MORE_DETAILSr   r'   r   r(   r   r   r   r9   r9   .   s3     ";L+  r   r9   c                  6    \ rS rSrSrSrSrS r\S 5       r	Sr
g)	AccountUrlType>   z 
The URLs that each account has
TermsOfServicePrivacyPolicyc                    U R                   $ r   r   r   s    r   r   AccountUrlType.to_jsonE   r   r   c                    U " U5      $ r   r   r   s     r   r   AccountUrlType.from_jsonH   r   r   r   N)r    r!   r"   r#   r$   TERMS_OF_SERVICEPRIVACY_POLICYr   r'   r   r(   r   r   r   rF   rF   >   s-     ($N  r   rF   c                      \ rS rSr% SrS\S'   S\S'   S\S'   S\S'   S\S'   S\S	'   S\S
'   S\S'   SrS\S'   SrS\S'   S r\	S 5       r
Srg)AccountM   z'
Corresponds to IdentityRequestAccount
str
account_idemailname
given_namepicture_urlidp_config_urlidp_login_urlr	   login_stateNtyping.Optional[str]terms_of_service_urlprivacy_policy_urlc                   [        5       nU R                  US'   U R                  US'   U R                  US'   U R                  US'   U R
                  US'   U R                  US'   U R                  US'   U R                  R                  5       US'   U R                  b  U R                  US	'   U R                  b  U R                  US
'   U$ )N	accountIdrU   rV   	givenName
pictureUrlidpConfigUrlidpLoginUrl
loginStatetermsOfServiceUrlprivacyPolicyUrl)dictrT   rU   rV   rW   rX   rY   rZ   r[   r   r]   r^   )r   r   s     r   r   Account.to_jsong   s    v OO[

WyyV OO[!--\#22^"00]!--557\$$0(,(A(AD$%"".'+'>'>D#$r   c                H   U " [        US   5      [        US   5      [        US   5      [        US   5      [        US   5      [        US   5      [        US   5      [        R                  US   5      S	U;   a  [        US	   5      OS S
U;   a  [        US
   5      S9
$ S S9
$ )Nr`   rU   rV   ra   rb   rc   rd   re   rf   rg   )
rT   rU   rV   rW   rX   rY   rZ   r[   r]   r^   )rS   r	   r   r   s     r   r   Account.from_jsonw   s    4,-d7m$T&\"4,-D./tN34d=12",,T,-?@CVZ^C^T*=%>!?dh@RVZ@Zs4(:#;<
 	
 ae
 	
r   r   )r    r!   r"   r#   r$   __annotations__r]   r^   r   r'   r   r(   r   r   r   rQ   rQ   M   sh     OJ
IO 26.5/3,3  
 
r   rQ   c              #  @   #    [        5       nU b  XS'   SUS.nUv ng7f)z
:param disable_rejection_delay: *(Optional)* Allows callers to disable the promise rejection delay that would normally happen, if this is unimportant to what's being tested. (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)
NdisableRejectionDelayzFedCm.enablemethodparamsrh   )disable_rejection_delayrq   cmd_dictr   s       r   enableru      s3      &F**A&' H >Ds   c               #     #    SS0n U v ng 7f)Nrp   zFedCm.disabler   rt   r   s     r   disablerx      s      	/H >D   
c              #  B   #    [        5       nXS'   XS'   SUS.nUv ng7f)z)
:param dialog_id:
:param account_index:
dialogIdaccountIndexzFedCm.selectAccountro   Nrr   )	dialog_idaccount_indexrq   rt   r   s        r   select_accountr      s4      &F":*>'H >Ds   c              #  `   #    [        5       nXS'   UR                  5       US'   SUS.nUv ng7f)z)
:param dialog_id:
:param dialog_button:
r{   dialogButtonzFedCm.clickDialogButtonro   Nrh   r   )r}   dialog_buttonrq   rt   r   s        r   click_dialog_buttonr      s?      &F":*224F>+H >Ds   ,.c              #  h   #    [        5       nXS'   XS'   UR                  5       US'   SUS.nUv ng7f)zB
:param dialog_id:
:param account_index:
:param account_url_type:
r{   r|   accountUrlTypezFedCm.openUrlro   Nr   )r}   r~   account_url_typerq   rt   r   s         r   open_urlr      sH      &F":*>/779F!H >Ds   02c              #  H   #    [        5       nXS'   Ub  XS'   SUS.nUv ng7f)z9
:param dialog_id:
:param trigger_cooldown: *(Optional)*
r{   NtriggerCooldownzFedCm.dismissDialogro   rr   )r}   trigger_cooldownrq   rt   r   s        r   dismiss_dialogr      s;      &F":#$4 !'H >Ds    "c               #     #    SS0n U v ng7f)z
Resets the cooldown time, if any, to allow the next FedCM call to show
a dialog even if one was recently dismissed by the user.
rp   zFedCm.resetCooldownNr   rw   s     r   reset_cooldownr      s      	'H >Dry   zFedCm.dialogShownc                  \    \ rS rSr% S\S'   S\S'   S\S'   S\S'   S	\S
'   \SS j5       rSrg)DialogShown   rS   r}   r*   dialog_typeztyping.List[Account]accountstitler\   subtitlec           
         U " [        US   5      [        R                  US   5      US    Vs/ s H  n[        R                  U5      PM     sn[        US   5      SU;   a  [        US   5      S9$ S S9$ s  snf )Nr{   
dialogTyper   r   r   )r}   r   r   r   r   )rS   r*   r   rQ   )r   r   is      r   r   DialogShown.from_json  s    $z*+",,T,-?@484DE4Dqg''*4DEd7m$.8D.@Sj)*
 	

 GK
 	
 Fs   A6r   N)r   r   returnr   )r    r!   r"   r#   rl   r'   r   r(   r   r   r   r   r      s4     N"" J""
 
r   r   zFedCm.dialogClosedc                  8    \ rS rSr% SrS\S'   \SS j5       rSrg)	DialogClosedi  zY
Triggered when a dialog is closed, either by user action, JS abort,
or a command below.
rS   r}   c                &    U " [        US   5      S9$ )Nr{   )r}   )rS   r   s     r   r   DialogClosed.from_json  s    $z*+
 	
r   r   N)r   r   r   r   )	r    r!   r"   r#   r$   rl   r'   r   r(   r   r   r   r   r     s      N
 
r   r   r   )rs   typing.Optional[bool]r   0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])r   r   )r}   rS   r~   intr   r   )r}   rS   r   r9   r   r   )r}   rS   r~   r   r   rF   r   r   )r}   rS   r   r   r   r   )
__future__r   utilr   r   dataclassesr   enumtypingEnumr	   r*   r9   rF   rQ   ru   rx   r   r   r   r   r   r   r   r   r   r   <module>r      sm   # * !     "499  TYY  6
 6
 6
t :>!6	7  
8$# 
8$ ) 
8	. 37/ 
8&  !

 
  "
( !"

 
  #
r   