+
    ÆÚjND  ã                  ó†  € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t
^ RIt
^ RIt
^ RIHt ^ RIHt 0 Rmt^$t]P&                  ! R4      tRtRt ! R R	4      t]! 4       tR
 R lt]t ! R R]4      t] ! R R4      4       t] ! R R4      4       tR R ltR R lt R R lt!RR R llt"R R R llt#R R R llt$R# )!a¥  
Browser-Use Fetch - HTTP client service.

Features:
- Session-based IP persistence
- Automatic retry with exponential backoff
- Proxy routing by country
- Server-side cookie persistence per session

Environment variables:
- BROWSER_USE_API_KEY: Required for authentication (Browser Use API key, starts with 'bu_')
- SESSION_ID: Optional, enables session/IP persistence and server-side cookies.
  If not set, a random session ID is generated per call (ephemeral, no persistence).
- FETCH_USE_URL: Optional, override service URL for testing

Note: Cookies are persisted server-side per session. Pass cookies via the
`cookies` parameter to add or override cookies for a request.
)ÚannotationsN)Ú	dataclass)ÚAnyz^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$iÀÔ zhttps://fetch.browser-use.comc                  ó„   € ] tR t^0tRtR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tR# )Ú_ConfigCachez™Caches environment variables for performance.

Reads env vars once on first access, then caches them.
Call clear() to force re-reading from environment.
c               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚNone© )Úformats   "Ú‡/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/fetch_use/client.pyÚ__annotate__Ú_ConfigCache.__annotate__9   s   € ÷ "ñ "˜$ñ "ó    c                	ó>   € R V n         R V n        R V n        RV n        R # )NF©Ú_api_keyÚ_session_idÚ_service_urlÚ_initialized©Úselfs   &r   Ú__init__Ú_ConfigCache.__init__9   s!   € Ø$(ˆŒØ'+ˆÔØ(,ˆÔØ!ˆÖr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   ?   s   € ÷ %ñ % Tñ %r   c                	ó"  € V P                   '       g}   \        P                  P                  R R4      V n        \        P                  P                  RR4      V n        \        P                  P                  R\        4      V n        RV n         R# R# )ÚBROWSER_USE_API_KEYÚ Ú
SESSION_IDÚFETCH_USE_URLTN)r   ÚosÚenvironÚgetr   r   ÚDEFAULT_FETCH_USE_URLr   r   s   &r   Ú_ensure_initializedÚ _ConfigCache._ensure_initialized?   sa   € Ø× × Ð ÜŸJ™JŸN™NÐ+@À"ÓEˆDŒMÜ!Ÿz™zŸ~™~¨l¸BÓ?ˆDÔÜ "§
¡
§¡¨Ô@UÓ VˆDÔØ $ˆDÖñ	 !r   c               ó   € V ^8„  d   QhRR/# ©r	   r
   Ústrr   )r   s   "r   r   r   G   s   € ÷ #ñ #˜ñ #r   c                	óN   € V P                  4        V P                  ;'       g    R # ©r   )r&   r   r   s   &r   Úapi_keyÚ_ConfigCache.api_keyF   s    € à× Ñ Ô"Ø�}‰}×"Ð" Ð"r   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   r   L   s   € ÷ &ñ &˜Cñ &r   c                	óN   € V P                  4        V P                  ;'       g    R # r,   )r&   r   r   s   &r   Ú
session_idÚ_ConfigCache.session_idK   s"   € à× Ñ Ô"Ø×Ñ×%Ð% 2Ð%r   c               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   r   Q   s   € ÷ :ñ :˜Sñ :r   c                	óV   € V P                  4        V P                  ;'       g    \        # ©N)r&   r   r%   r   s   &r   Úservice_urlÚ_ConfigCache.service_urlP   s#   € à× Ñ Ô"Ø× Ñ ×9Ð9Ô$9Ð9r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   U   s   € ÷ "ñ "�tñ "r   c                ó>   € RV n         RV n        RV n        RV n        R# )zAClear the cache, forcing re-read from environment on next access.NFr   r   s   &r   ÚclearÚ_ConfigCache.clearU   s!   € àˆŒØˆÔØ ˆÔØ!ˆÖr   )r   r   r   r   Nr   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r   r&   Úpropertyr-   r1   r6   r:   Ú__static_attributes__r   r   r   r   r   0   s_   † ñð L€Iõ"õ%ð ô#ó ð#ð ô&ó ð&ð ô:ó ð:÷"ñ "r   r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   a   s   € ÷ ñ ˜Dñ r   c                 ó.   € \         P                  4        R# )zŽClear the environment variable cache.

Call this if you change environment variables at runtime and want
fetch-use to pick up the new values.
N)Ú_configr:   r   r   r   Úclear_config_cacherG   a   s   € ô ‡M�M†Or   c                  ó6   a € ] tR t^ntRtRR V 3R llltRtV ;t# )Ú
FetchErrorzÓError from fetch-use service.

Attributes:
    code: HTTP status code or error code from the service
    details: Additional error details from the service
    url: The URL that was being fetched (if available)
c               ó(   € V ^8„  d   QhRRRRRRRR/# )r	   Úmessager*   ÚcodeÚintÚdetailsÚurlr   )r   s   "r   r   ÚFetchError.__annotate__w   s(   € ÷ ñ  ð ¨3ð ¸Sð ÈCñ r   c                	óJ   <€ \         SV `  V4       W n        W0n        W@n        R # r5   )Úsuperr   rL   rN   rO   )r   rK   rL   rN   rO   Ú	__class__s   &&&&&€r   r   ÚFetchError.__init__w   s   ø€ Ü‰Ñ˜Ô!ØŒ	ØŒØŽr   ©rL   rN   rO   )é    r   r   )r<   r=   r>   r?   r@   r   rC   Ú__classcell__)rS   s   @r   rI   rI   n   s   ø† ñ÷÷ ð r   rI   c                  óÚ   € ] tR t^~t$ RtR]R&   R]R&   R]R&   R]R&   R]R	&   R
]R&   R]R&   R]R&   R]R&   R]R&   ]R R l4       t]R R l4       tR R lt	]R R l4       t
R R ltRtR# )ÚFetchResponsea  Response from fetch-use service.

Attributes:
    status_code: HTTP status code (e.g., 200, 404)
    status: Full status string (e.g., "200 OK")
    headers: Response headers as dict
    body: Response body as string (for text content)
    body_base64: Response body as base64 (for binary content)
    is_binary: Whether the response body is binary
    final_url: URL after following redirects
    redirect_count: Number of redirects followed
    protocol: HTTP protocol version (e.g., "HTTP/2.0")
    error: Error message if request failed
rM   Ústatus_coder*   Ústatuszdict[str, str]ÚheadersÚbodyÚbody_base64ÚboolÚ	is_binaryÚ	final_urlÚredirect_countÚprotocolÚerrorc               ó   € V ^8„  d   QhRR/# r)   r   )r   s   "r   r   ÚFetchResponse.__annotate__›   s   € ÷ ñ �cñ r   c                ó   € V P                   # )zGet response body as text.)r]   r   s   &r   ÚtextÚFetchResponse.textš   s   € ð �y‰yÐr   c               ó   € V ^8„  d   QhRR/# )r	   r
   Úbytesr   )r   s   "r   r   rf       s   € ÷ )ñ )˜ñ )r   c                óÀ   € V P                   '       d3   V P                  '       d!   \        P                  ! V P                  4      # V P                  P                  R4      # )zƒGet response body as bytes.

For binary responses, decodes the base64-encoded body.
For text responses, encodes the body as UTF-8.
úutf-8)r`   r^   Úbase64Ú	b64decoder]   Úencoder   s   &r   ÚcontentÚFetchResponse.contentŸ   sD   € ð �>�>ˆ>˜d×.×.Ð.Ü×#Ò# D×$4Ñ$4Ó5Ð5Ø�y‰y×Ñ Ó(Ð(r   c               ó   € V ^8„  d   QhRR/# )r	   r
   r   r   )r   s   "r   r   rf   ª   s   € ÷ Mñ M�cñ Mr   c                óÖ   € V P                   '       g   \        R4      h \        P                  ! V P                   4      #   \        P                   d   p\        RT 24      ThRp?ii ; i)zYParse response body as JSON.

Raises:
    ValueError: If body is empty or not valid JSON
z,Response body is empty, cannot parse as JSONz!Response body is not valid JSON: N)r]   Ú
ValueErrorÚjsonÚloadsÚJSONDecodeError)r   Úes   & r   rv   ÚFetchResponse.jsonª   s_   € ð �y�yˆyÜÐKÓLÐLð	MÜ—:’:˜dŸi™iÓ(Ð(øÜ×#Ñ#ô 	MÜÐ@ÀÀÐDÓEÈ1ÐLûð	Mús   Ÿ? ¿A(ÁA#Á#A(c               ó   € V ^8„  d   QhRR/# )r	   r
   r_   r   )r   s   "r   r   rf   ¸   s   € ÷ -ñ -�Dñ -r   c                óB   € ^ÈV P                   u;8*  ;'       d    R8  # u # )z-Check if response status is successful (2xx).i,  )rZ   r   s   &r   ÚokÚFetchResponse.ok·   s#   € ð �d×&Ñ&×,Ô,¨Ñ,Ð,Ñ,Ð,r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   rf   ¼   s   € ÷ ñ  $ñ r   c                ó    € V P                   R8¼  d=   \        RV P                    RV P                   2V P                   V P                  R7      hR# )zzRaise FetchError if response status indicates an error (>= 400).

Raises:
    FetchError: If status_code is 400 or higher
i�  úHTTP ú: ©rL   rO   N)rZ   rI   r[   ra   r   s   &r   Úraise_for_statusÚFetchResponse.raise_for_status¼   sO   € ð ×Ñ˜sÔ"ÜØ˜×(Ñ(Ð)¨¨D¯K©K¨=Ð9Ø×%Ñ%Ø—N‘Nôð ñ #r   r   N)r<   r=   r>   r?   r@   Ú__annotations__rB   rh   rq   rv   r}   r„   rC   r   r   r   rY   rY   ~   s‰   ‡ ñð ÓØƒKØÓØ
ƒIØÓØƒOØƒNØÓØƒMØƒJàôó ðð ô)ó ð)õMð ô-ó ð-÷ñ r   rY   c                  óR   € ] tR t^Êt$ Rt^tR]R&   RtR]R&   ^dtR]R&   R R	 lt	R
t
R# )ÚRetryConfiga  Configuration for automatic retries.

Attributes:
    count: Number of retry attempts (default: 3)
    on_status: List of status codes that trigger a retry (default: [500, 502, 503, 504])
    backoff_ms: Initial backoff duration in milliseconds (default: 100)
rM   ÚcountNzlist[int] | NoneÚ	on_statusÚ
backoff_msc               ó   € V ^8„  d   QhRR/# )r	   r
   zdict[str, Any]r   )r   s   "r   r   ÚRetryConfig.__annotate__Ø   s   € ÷ 
ñ 
˜ñ 
r   c                	ór   € R V P                   RV P                  f   . ROMV P                  RV P                  /# )r‰   rŠ   r‹   )iô  iö  i÷  iø  )r‰   rŠ   r‹   r   s   &r   Úto_dictÚRetryConfig.to_dictØ   s3   € à�T—Z‘ZØ°·±Ò1GÓ-ÈTÏ^É^Ø˜$Ÿ/™/ð
ð 	
r   r   )r<   r=   r>   r?   r@   r‰   r†   rŠ   r‹   r�   rC   r   r   r   rˆ   rˆ   Ê   s1   ‡ ñð €Eˆ3ƒNØ"&€IÐÓ&Ø€J�Ó÷
ñ 
r   rˆ   c               ó    € V ^8„  d   QhRRRR/# )r	   rO   r*   r
   r   r   )r   s   "r   r   r   à   s   € ÷ >ñ >�sð >˜tñ >r   c                ó  € \         P                  P                  V 4      pVP                  '       g   \	        RV  24      hVP                  R9  d   \	        RVP                   R24      hVP
                  '       g   \	        RV  24      hR# )z[Validate URL format.

Raises:
    ValueError: If URL is invalid or uses unsupported scheme
z*Invalid URL: missing scheme (http/https): zInvalid URL scheme: z. Only http/https supported.zInvalid URL: missing host: N)ÚhttpÚhttps)ÚurllibÚparseÚurlparseÚschemeru   Únetloc)rO   Úparseds   & r   Ú_validate_urlr›   à   s|   € ô �\‰\×"Ñ" 3Ó'€FØ�=�=ˆ=ÜÐEÀcÀUÐKÓLÐLØ‡}�}Ð-Ô-ÜÐ/°·±¨Ð>ZÐ[Ó\Ð\Ø�=�=ˆ=ÜÐ6°s°eÐ<Ó=Ð=ñ r   c               ó    € V ^8„  d   QhRRRR/# )r	   Úmethodr*   r
   r   )r   s   "r   r   r   ï   s   € ÷ ñ ˜Sð  Sñ r   c                óf   € V P                  4       pV\        9  d   \        RV  R\         24      hV# )zyValidate and normalize HTTP method.

Returns:
    Uppercased method string

Raises:
    ValueError: If method is invalid
zInvalid HTTP method: z. Must be one of )ÚupperÚVALID_METHODSru   )r�   Úmethod_uppers   & r   Ú_validate_methodr¢   ï   s7   € ð —<‘<“>€LØœ=Ô(ÜÐ0°°Ð8IÌ-ÈÐYÓZÐZØÐr   c               ó    € V ^8„  d   QhRRRR/# )r	   r1   r*   r
   r   r   )r   s   "r   r   r   þ   s   € ÷ Wñ W Sð W¨Tñ Wr   c                ó¤   € V '       g   R# \        V 4      \        8”  d   \        R4      h\        P	                  V 4      '       g   \        R4      hR# )zNValidate session ID format.

Raises:
    ValueError: If session ID is invalid
Nz'session_id too long (max 36 characters)z:session_id must be alphanumeric with hyphens as separators)ÚlenÚMAX_SESSION_ID_LENGTHru   ÚVALID_SESSION_ID_REGEXÚmatch)r1   s   &r   Ú_validate_session_idr©   þ   sE   € ÷ ÙÜ
ˆ:ƒÔ.Ô.ÜÐBÓCÐCÜ!×'Ñ'¨
×3Ò3ÜÐUÓVÐVñ 4r   c          $     ó`   € V ^8„  d   QhRRRRRRRRRRR	R
RRRRRRRRRRRRRRRRRRRRRRRR/# )r	   rO   r*   r�   r\   údict[str, str] | Noner]   ú
str | Noner^   Ú	json_bodyúdict[str, Any] | NoneÚcookiesÚ
timeout_msrM   Úfollow_redirectsr_   Úmax_redirectsÚproxy_countryÚretryúRetryConfig | NoneÚcontent_typeÚinsecure_skip_verifyr-   r1   Úoutput_formatr
   rY   r   )r   s   "r   r   r     sÐ   € ÷ Xñ XØ	ðXàðXð #ðXð ð	Xð
 ðXð %ðXð #ðXð ðXð ðXð ðXð ðXð ðXð ðXð ðXð ðXð  ð!Xð" ð#Xð$ ñ%Xr   c                ó  € \        V 4       \        V4      pV^ 8:  d   \        R4      hV	^ 8  d   \        R4      hT;'       g    \        P                  pV'       g   \        R4      hT;'       g    \        P
                  pV'       g   ^ RIp\        VP                  4       4      p\        V4       V'       d   \        V4      M/ pV'       d¨   VP                  4        UUu. uFK  w  pp\        P                  P                  VRR7       R\        P                  P                  VRR7       2NKM  	  pppVP                  RR4      pV'       d   VP!                  ^ V4       R	P#                  V4      VR&   TpTpTpVe!   \$        P&                  ! V4      pV'       g   R
pRV RVR\)        V\*        4      RVRV	RV
RV/pV'       d   VVR&   V'       d   VVR&   V'       d   VVR&   V'       d   VVR&   V'       d   VP-                  4       VR&   V'       d   RVR&   V'       d   VVR&   \        P.                   R2p\$        P&                  ! V4      P1                  R4      pRR
RV/p\2        P4                  P                  RR4      pV'       d   VVR&   \        P6                  P9                  VVVR R!7      p  VR",          ^
,           p!\        P6                  P;                  V V!R#7      ;_uu_ 4       p"\$        P<                  ! V"P?                  4       PA                  R4      4      p#RRR4       X#P                  R'4      '       d   \G        T#R',          T R&7      h\U        T#P                  R/^ 4      T#P                  R0R4      T#P                  R/ 4      T#P                  RR4      T#P                  RR4      T#P                  R1R24      T#P                  R3T 4      T#P                  R4^ 4      T#P                  R5R4      T#P                  R'R4      R67
      # u uppi   + '       g   i     Lö; i  \B        PD                   d   p$\G        R$T R%2T R&7      T$hRp$?$i\        PH                  PJ                   dÝ   p$ \$        P<                  ! T$P?                  4       PA                  R4      4      p%\G        T%P                  R'R(T$PL                   24      T%P                  R)T$PL                  4      T%P                  R*R4      T R+7      T$h  \$        PN                   d5    \G        R(T$PL                   R,T$PP                   2T$PL                  T R-7      T$hi ; iRp$?$i\        PH                  PR                   d!   p$\G        R.T$PP                   2T R&7      T$hRp$?$ii ; i)7z*Internal synchronous fetch implementation.ztimeout_ms must be positivez"max_redirects must be non-negativezˆBROWSER_USE_API_KEY environment variable is required. Set it to your Browser Use API key (starts with 'bu_'), or pass api_key parameter.Nr   )ÚsafeÚ=ÚCookiez; zapplication/jsonrO   r�   r°   r±   r²   r³   r1   r\   r]   r^   r¶   r´   Tr·   r¸   z/fetchrm   zContent-TypezX-Browser-Use-API-KeyÚFETCH_USE_AUTH_TOKENzX-Fetch-TokenÚPOST)Údatar\   r�   iè  )ÚtimeoutzRequest timed out after Úms)rO   rd   r�   rL   rN   rU   r‚   rƒ   zConnection error: rZ   r[   r`   Fra   rb   rc   )
rZ   r[   r\   r]   r^   r`   ra   rb   rc   rd   )+r›   r¢   ru   rF   r-   r1   Úuuidr*   Úuuid4r©   ÚdictÚitemsr•   r–   Úquoter$   ÚinsertÚjoinrv   ÚdumpsÚminÚMAX_TIMEOUT_MSr�   r6   rp   r"   r#   ÚrequestÚRequestÚurlopenrw   ÚreadÚdecodeÚsocketrÀ   rI   rd   Ú	HTTPErrorrL   rx   ÚreasonÚURLErrorrY   )&rO   r�   r\   r]   r^   r­   r¯   r°   r±   r²   r³   r´   r¶   r·   r-   r1   r¸   Úresolved_api_keyÚresolved_session_idrÂ   Úreq_headersÚkÚvÚcookie_partsÚexisting_cookieÚreq_bodyÚreq_body_base64Úresolved_content_typeÚfetch_requestÚapi_urlÚrequest_dataÚ_fetch_tokenÚreqÚhttp_timeoutÚrespÚresultry   Ú
error_bodys&   &&&&&&&&&&&&&&&&&                     r   Ú	_do_fetchrè     sé  € ô* �#Ôô ˜fÓ%€Fð �Q„ÜÐ6Ó7Ð7Ø�qÔÜÐ=Ó>Ð>ð ×1Ð1¤'§/¡/ÐßÜðaó
ð 	
ð
 %×:Ð:¬×(:Ñ(:ÐßÛä! $§*¡*£,Ó/ÐÜÐ,Ô-÷ $+”$�w”-°€K÷ ð  Ÿ™œô
á'‘��1ô �|‰|×!Ñ! !¨"Ð!Ó-Ð.¨a´·±×0BÑ0BÀ1È2Ð0BÓ0NÐ/OÓPÙ'ð 	ñ 
ð &Ÿ/™/¨(°BÓ7ˆßØ×Ñ  ?Ô3Ø $§	¡	¨,Ó 7ˆ�HÑð €HØ!€OØ(ÐØÒÜ—:’:˜iÓ(ˆß$Ø$6Ð!ð 	ˆsØ�&Ø”c˜*¤nÓ5ØÐ,Ø˜Ø˜ØÐ)ð%€M÷ Ø#.ˆ�iÑ ßØ (ˆ�fÑßØ'6ˆ�mÑ$ßØ(=ˆ�nÑ%ßØ!&§¡£ˆ�gÑßØ04ˆÐ,Ñ-ßØ)6ˆ�oÑ&ô ×$Ñ$Ð% VÐ,€GÜ—:’:˜mÓ,×3Ñ3°GÓ<€Lð 	Ð*ØÐ!1ð€Kô —:‘:—>‘>Ð"8¸"Ó=€LßØ'3ˆ�OÑ$ä
�.‰.×
 Ñ
 ØØØØð	 !ó €CðJà" TÕ)¨RÕ/ˆÜ�^‰^×#Ñ# C°Ð#×>Ô>À$Ü—Z’Z §	¡	£× 2Ñ 2°7Ó ;Ó<ˆF÷ ?ð( ‡z�z�'×ÒÜ˜ �¨cÔ2Ð2äØ—J‘J˜}¨aÓ0Ø�z‰z˜( BÓ'Ø—
‘
˜9 bÓ)Ø�Z‰Z˜ Ó#Ø—J‘J˜}¨bÓ1Ø—*‘*˜[¨%Ó0Ø—*‘*˜[¨#Ó.Ø—z‘zÐ"2°AÓ6Ø—‘˜J¨Ó+Ø�j‰j˜ "Ó%ôð ùós
÷D ?×>ûä�>‰>ô TÜÐ3°J°<¸rÐBÈÔLÐRSÐSûÜ�<‰<×!Ñ!ô Xð		XÜŸš A§F¡F£H§O¡O°GÓ$<Ó=ˆJÜØ—‘˜w¨%°·±¨xÐ(8Ó9Ø—^‘^ F¨A¯F©FÓ3Ø"Ÿ™ y°"Ó5Øô	ð
 ðøô ×#Ñ#ô 	XÜ˜u Q§V¡V H¨B¨q¯x©x¨jÐ9ÀÇÁÈCÔPÐVWÐWð	Xþä�<‰<× Ñ ô JÜÐ-¨a¯h©h¨ZÐ8¸cÔBÈÐIûðJúso   Ã"APÊ69P$ Ë/4PÌ#P$ ÐP!	ÐP$ Ð!P$ Ð$VÐ9QÑ VÑ,VÑ.B
S8Ó8A	UÕUÕ VÕ%VÕ&VÖVc          "     ó\   € V ^8„  d   QhRRRRRRRRRRR	R
RRRRRRRRRRRRRRRRRRRRRR/# ©r	   rO   r*   r�   r\   r«   r]   r¬   r^   r­   r®   r¯   r°   rM   r±   r_   r²   r³   r´   rµ   r¶   r·   r1   r¸   r
   rY   r   )r   s   "r   r   r   §  sÅ   € ÷ Xñ XØ	ðXàðXð #ðXð ð	Xð
 ðXð %ðXð #ðXð ðXð ðXð ðXð ðXð ðXð ðXð ðXð ðXð  ð!Xð" ñ#Xr   c              ƒ  ót   "  € \         P                  ! \        V VVVVVVVVV	V
VVVRVV4      G Rj  x€L
 #  L5i)a™  
Make HTTP request via Browser-Use Fetch service.

Requires BROWSER_USE_API_KEY environment variable to be set.

Args:
    url: Target URL (required, must be http or https)
    method: HTTP method - GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
    headers: Additional HTTP headers to include
    body: Request body as string (for text content)
    body_base64: Request body as base64 (for binary content)
    json_body: Request body as dict (will be JSON-encoded, sets Content-Type)
    cookies: Cookies as dict (merged into Cookie header, URL-encoded)
    timeout_ms: Request timeout in milliseconds (default: 30000, max: 120000)
    follow_redirects: Whether to follow HTTP redirects (default: True)
    max_redirects: Maximum redirects to follow (default: 10)
    proxy_country: ISO 3166-1 alpha-2 country code for proxy routing (default: US)
    retry: Retry configuration for automatic retries
    content_type: Explicit Content-Type header (overrides auto-detection)
    insecure_skip_verify: Skip TLS certificate verification (use with caution)

Returns:
    FetchResponse with status_code, headers, body, etc.

Raises:
    FetchError: If the request fails or service returns an error
    ValueError: If URL, method, or parameters are invalid

Example:
    >>> response = await fetch("https://example.com/api")
    >>> if response.ok:
    ...     data = response.json()
    ...     print(data)

    >>> # With error handling
    >>> try:
    ...     response = await fetch("https://api.example.com/data")
    ...     response.raise_for_status()
    ...     data = response.json()
    ... except FetchError as e:
    ...     print(f"Request failed: {e}")

    >>> # Binary data
    >>> response = await fetch("https://example.com/image.png")
    >>> image_bytes = response.content

Note:
    This function uses a thread pool for async execution. For high-concurrency
    scenarios, consider the concurrency limits of the default executor.
N)ÚasyncioÚ	to_threadrè   ©rO   r�   r\   r]   r^   r­   r¯   r°   r±   r²   r³   r´   r¶   r·   r1   r¸   s   &&&&&&&&&&&&&&&&r   Úfetchrï   §  s[   é € ôJ ×"Ò"ÜØØØØØØØØØØØØØØØØØó%÷ ð ñ ùs   ‚/8±6²8c          "     ó\   € V ^8„  d   QhRRRRRRRRRRR	R
RRRRRRRRRRRRRRRRRRRRRR/# rê   r   )r   s   "r   r   r     s²   € ÷ ,ñ ,Ø	ð,àð,ð #ð,ð ð	,ð
 ð,ð %ð,ð #ð,ð ð,ð ð,ð ð,ð ð,ð ð,ð ð,ð ð,ð ð,ð  ð!,ð" ñ#,r   c                ó8   € \        V VVVVVVVVV	V
VVVRVV4      # )zä
Synchronous version of fetch().

Requires BROWSER_USE_API_KEY environment variable to be set.

Use this when you're not in an async context and don't want to use asyncio.run().
See fetch() for full documentation of parameters.
N)rè   rî   s   &&&&&&&&&&&&&&&&r   Ú
fetch_syncrò     sD   € ô4 ØØØØØØØØØØØØØØØØØó#ð r   >   ÚGETÚPUTÚHEADr¾   ÚPATCHÚDELETEÚOPTIONSr5   )ró   NNNNNi0u  Té
   ÚUSNNFNN)%r@   Ú
__future__r   rì   rn   rv   r"   ÚrerÑ   Úurllib.errorr•   Úurllib.parseÚurllib.requestÚdataclassesr   Útypingr   r    r¦   Úcompiler§   rË   r%   r   rF   rG   r!   Ú	ExceptionrI   rY   rˆ   r›   r¢   r©   rè   rï   rò   r   r   r   Ú<module>r     sé   ðñõ& #ã Û Û Û 	Û 	Û Û Û Û Ý !Ý ò M€ð Ð ØŸšÐ$EÓFÐ ð €ð 8Ð ÷*"ñ *"ñ\ ‹.€õð &€ô�ô ð  ÷Hð Hó ðHðV ÷
ð 
ó ð
õ*>õõW÷X÷vX÷v,ñ ,r   