
    Ii                     ^   S SK r S SKrS SKrS SKrS SKrS SKJrJr  S SKJrJ	r	  S SK
Jr  S SKJr  S SKJr  S SKJr  S SKJrJrJr  S S	KJrJr  S S
KJr  S SKJrJrJrJrJ r J!r!  S SK"J#r#J$r$J%r%J&r&  S SK'J(r(   S SK)r)\RX                  \\4r-Sr. " S S\/5      r0S r1S r2g! \* a    S SK+r) N/f = f)    N)datetime	timedelta)UUIDuuid4)tzutc)string_types)Consumer)ExceptionCapture)exc_info_from_errorexceptions_from_error_tuplehandle_in_app)InconclusiveMatchErrormatch_feature_flag_properties)Poller)DEFAULT_HOSTAPIError
batch_postdecidedetermine_server_hostget)SizeLimitedDictcleanguess_timezoneremove_trailing_slash)VERSIONiP  c                      \ rS rSrSr\R                  " S5      r                        S)S jrS*S jr	 S+S	 jr
 S+S
 jr S+S jrS+S jr         S,S jrS*S jrS*S jr       S-S jrS*S jr S-S jr       S-S jrS rS rS rS rS rS r0 0 0 SS.S jr0 0 0 SSSS.S jr0 0 0 SSSS.S jrS0 0 0 SSSS.S  jrS! r0 0 0 SSS".S# jr 0 0 0 SSS".S$ jr!0 0 0 SS.S% jr"S& r#S' r$S(r%g).Client   zCreate a new PostHog client.posthogNFTc                    [         R                  " U5      U l         U=(       d    UU l        [        SU R                  [        5        X`l        X0l        XPl        Xl        U=(       d    [        U l
        [        U5      U l        Xl        Xl        S U l        S U l        S U l        S U l        Xl        UU l        S U l        [-        [.        [0        5      U l        UU l        UU l        UU l        UU l        UU l        UU l        S U l         Uc   [B        RD                  " 5       nUU l$        Xl%        U(       a?  [L        RN                  " 5         U RP                  RS                  [L        RT                  5        O)U RP                  RS                  [L        RV                  5        U R<                  (       a  [Y        X R>                  S9U l         U(       a  S U l-        g U(       a   [\        R^                  " U R`                  5        [c        U5       Hn  n/ U l-        [e        U R                   U R                  U R                  UUUU	U
UUS9
nU RZ                  Rg                  U5        U(       d  M^  URi                  5         Mp     g ! [F         a    S n GNhf = f)Napi_key)integrations)hoston_errorflush_atflush_intervalgzipretriestimeouthistorical_migration)5queueQueuer!   requirer   r$   debugsend	sync_moder   raw_hostr   r#   r'   r)   feature_flagsfeature_flags_by_keygroup_type_mappingcohortspoll_interval%feature_flags_request_timeout_secondspollerr   MAX_DICT_SIZEset#distinct_ids_feature_flags_reporteddisableddisable_geoipr*   super_propertiesenable_exception_autocapture"exception_autocapture_integrationsexception_captureosgetcwd	Exceptionproject_rootpersonal_api_keyloggingbasicConfiglogsetLevelDEBUGWARNINGr
   	consumersatexitregisterjoinranger	   appendstart)selfr!   r#   r.   max_queue_sizer/   r$   r%   r&   r'   max_retriesr0   r)   threadr6   rF   project_api_keyr<   r=   r*   r7   r>   r?   r@   rE   nconsumers                              4/venv/lib/python3.13/site-packages/posthog/client.py__init__Client.__init__$   s   6 [[0
 '1'	4<<6 
	",)$/		!$(!"&*5Z23B=RU3V0 *$8! 0,H)2T/!%$!yy{ ) !1 !HHgmm,HHgoo.,,%5dIpIp%qD"!DN 		*6]!##JJLL%%#1'#)= %%h/ 4NN$% #;  $#$s   I; ;J
Jc                     U=(       d    0 nU=(       d    0 n[        SU[        5        [        SU[        5        UUUUSUS.nU R                  Xv5      $ )Ndistinct_id
propertiesz	$identify	timestampcontextr_   $seteventuuidr-   ID_TYPESdict_enqueuerT   r_   r`   rc   rb   rf   r=   msgs           r[   identifyClient.identify   sY    %2
-R{H5j$/ #& 
 }}S00    c                 2    U R                  XX4U5      nUS   $ )NfeatureFlags
get_deciderT   r_   groupsperson_propertiesgroup_propertiesr=   	resp_datas          r[   get_feature_variantsClient.get_feature_variants   s#     OOK9J^kl	((ro   c                 2    U R                  XX4U5      nUS   $ )NfeatureFlagPayloadsrr   rt   s          r[   get_feature_payloadsClient.get_feature_payloads   s$     OOK9J^kl	.//ro   c                 >    U R                  XX4U5      nUS   US   S.$ )Nrq   r|   rq   r|   rr   rt   s          r[   get_feature_flags_and_payloads%Client.get_feature_flags_and_payloads   s3     OOK9J^kl	%n5#,-B#C
 	
ro   c                     [        SU[        5        Uc  U R                  nU(       a  [        SU[        5        O0 nUUUUUS.n[	        U R
                  U R                  4SU R                  0UD6nU$ )Nr_   ru   )r_   ru   rv   rw   r=   r)   )r-   rh   r=   ri   r   r!   r#   r7   )rT   r_   ru   rv   rw   r=   request_datarx   s           r[   rs   Client.get_decide   sx    {H5  ..MHfd+F '!2 0*
 4<<wD<f<fwjvw	ro   c
                    U=(       d    0 nU=(       d    0 n[        SU[        5        [        SU[        5        [        SU[        5        UUUUUUS.n
U(       a  [        SU[        5        XzS   S'   0 n0 nU(       a   U R	                  XU	S9nO+U R                  (       a  U R                  X=(       d    0 U	S	S
9nUR                  5        H  u  pXSU 3'   M     UR                  5        VVs/ s H  u  nnUSLd  M  UPM     nnnU(       a  UUS'   U(       a  0 UEU
S   EU
S'   U R                  X5      $ ! [
         a(  nU R                  R                  SU 35         S nANS nAff = fs  snnf )Nr_   r`   re   )r`   rb   rc   r_   re   rf   ru   z$groups)r=   z0[FEATURE FLAGS] Unable to get feature variants: T)ru   r=   only_evaluate_locally	$feature/Fz$active_feature_flags)r-   rh   ri   r   ry   rD   rI   	exceptionr2   get_all_flagsitemsrj   )rT   r_   re   r`   rc   rb   rf   ru   send_feature_flagsr=   rl   extra_propertiesfeature_variantsefeaturevariantkeyvalueactive_feature_flagss                      r[   captureClient.capture   s     %2
-R{H5j$/- %"&
 Hfd++1i([#'#<#<[`m#<#n  #11\r-gk  2   !1 6 6 8G6=y	23 !9 9I8N8N8Pg8PeTYafTf8Pg8L45 I#3 Is<7H IC}}S00'  [""%UVWUX#YZZ[  hs$   >D6 -E+=E+6
E( E##E(c                     U=(       d    0 nU=(       d    0 n[        SU[        5        [        SU[        5        UUUUSUS.nU R                  Xv5      $ )Nr_   r`   rd   ra   rg   rk   s           r[   r:   
Client.set  sY    %2
-R{H5j$/ #&
 }}S00ro   c                     U=(       d    0 nU=(       d    0 n[        SU[        5        [        SU[        5        UUUUSUS.nU R                  Xv5      $ )Nr_   r`   	$set_once)rb   rc   r_   r   re   rf   rg   rk   s           r[   set_onceClient.set_once  sY    %2
-R{H5j$/ #&# 
 }}S00ro   c                     U=(       d    0 nU=(       d    0 n[        SU[        5        [        SU[        5        [        SU[        5        SUUUS.SR                  X5      UUUS.nU R	                  X5      $ )N
group_type	group_keyr`   z$groupidentify)z$group_type
$group_keyz
$group_setz${}_{})re   r`   r_   rb   rc   rf   )r-   rh   ri   formatrj   )	rT   r   r   r`   rc   rb   rf   r=   rl   s	            r[   group_identifyClient.group_identify*  s}      %2
-Rj(3Y1j$/ &)'(
 $??:A"
 }}S00ro   c                     U=(       d    0 n[        SU[        5        [        SU[        5        UUS.UUSUS.nU R                  Xv5      $ )Nprevious_idr_   )r_   aliasz$create_alias)r`   rb   rc   re   r_   )r-   rh   rj   )rT   r   r_   rc   rb   rf   r=   rl   s           r[   r   Client.aliasI  sV    -R{H5{H5  +$ #$&	
 }}S00ro   c                     U=(       d    0 nU=(       d    0 n[        SU[        5        [        SU[        5        [        SU[        5        X#S'   SUUUUUS.nU R	                  X5      $ )Nr_   r`   urlz$current_urlz	$pageview)re   r`   rb   rc   r_   rf   )r-   rh   ri   r   rj   )	rT   r_   r   r`   rc   rb   rf   r=   rl   s	            r[   pageClient.page\  so      %2
-R{H5j$/sL)%(>" !$"&
 }}S00ro   c           	          U=(       d    0 nUc  SUS'   [        5       n[        SU[        5        [        SU[        5        Ub  [	        U5      nO[
        R                  " 5       nUb  US:X  a  U R                  R                  S5        g [        U5      n	[        SSU	00U R                  S	9n
U
S   S   nUS
   R                  S5      US
   R                  S5      U[        U R                  5       SU R                   SU 3S.UEnU R!                  USX4XVU5      $ ! ["         a(  nU R                  R%                  SU 35         S nAg S nAff = f)NFz$process_person_profiler_   r`   )NNNz"No exception information availabler   values)rE   r   typer   z	/project/z/person/)z$exception_typez$exception_messagez$exception_listz$exception_personURLz
$exceptionzFailed to capture exception: )r   r-   rh   ri   r   sysexc_inforI   warningr   r   rE   r   r   r1   r!   r   rD   r   )rT   r   r_   r`   rc   rb   rf   ru   r   all_exceptions_with_tracere   $all_exceptions_with_trace_and_in_appr   s                r[   capture_exceptionClient.capture_exceptions  s   -	D#)rJ "8=
45#gM;9L*d3$.y9<<>8/A#A  !EF )DH(M% " ";"
 "..E 493Eh3O0 $H#J#N#Nv#V&J1&M&Q&QRY&Z#G+@+O*PPYZ^ZfZfYggop{o|(}	
 J <<\:PYaghh 	DHH!>qcBCC	Ds   BD 
BD 
E&E		Ec           	         U R                   (       a  gUS   nUc  [        R                  " [        5       S9n[	        SU[        5        [	        SUS   [
        5        [        U5      nUR                  5       US'   SU;   a&  UR                  S5      nU(       a  [        U5      US'   UR                  S5      (       d  0 US'   SUS   S	'   [        US   S
'   Uc  U R                  nU(       a  SUS   S'   U R                  (       a  0 US   EU R                  EUS'   [        UR                  SS5      5      US'   [        U5      nU R                  R!                  SU5        U R"                  (       d  SU4$ U R$                  (       ad  U R                  R!                  SUS   5        ['        U R(                  U R*                  U R,                  U R.                  U/U R0                  S9  SU4$  U R2                  R5                  USS9  U R                  R!                  SUS   5        SU4$ ! [2        R6                   a"    U R                  R9                  S5        SU4s $ f = f)z8Push a new `msg` onto the queue, return `(success, msg)`)Fr<   rb   Ntzrc   rf   r`   zposthog-pythonz$libz$lib_versionTz$geoip_disabler_   zqueueing: %szenqueued with blocking %s.re   )r'   r)   batchr*   F)blockzenqueued %s.zanalytics-python queue is full)r<   r   nowr   r-   ri   r   	isoformatpopstringify_idr   r   r=   r>   r   rI   r.   r/   r0   r   r!   r#   r'   r)   r*   r+   putFullr   )rT   rl   r=   rb   rf   s        r[   rj   Client._enqueue  s     ==$$	 0IY1	3y>40 #9-	$..0K S=776?D*40Fww|$$ "C$4L&!,3L.)  ..M26C./   N3|#4 N8M8M NC)#''-*FGMCj~s+ yy9>>HHNN7WF		YYe%)%>%> 9	JJNN3eN,HHNN>3w<89zz 	HH=>#:	s   *<H' '3IIc                     U R                   nUR                  " 5       nUR                  " 5         U R                  R	                  SU5        g)z4Forces a flush from the internal queue to the serverz$successfully flushed about %s items.N)r+   qsizerP   rI   r.   )rT   r+   sizes      r[   flushClient.flush  s2    

{{}

=tDro   c                     U R                    H$  nUR                  5          UR                  5         M&     U R                  (       a  U R                  R                  5         gg! [         a     Mb  f = f)zREnds the consumer thread once the queue is empty.
Blocks execution until finished
N)rM   pauserP   RuntimeErrorr8   stop)rT   rZ   s     r[   rP   Client.join  s\     HNN ' ;;KK 	   s   A""
A0/A0c                     U R                  5         U R                  5         U R                  (       a  U R                  R                  5         gg)z2Flush all messages and cleanly shutdown the clientN)r   rP   rA   closerT   s    r[   shutdownClient.shutdown  s4    

		!!""((* "ro   c                 <    [        U R                  SU R                   S3U R                  SS9nUS   =(       d    / U l        U R                   Vs0 s H  o"R                  S5      c  M  US   U_M     snU l        US   =(       d    0 U l        US   =(       d    0 U l        [         R"                  " [%        5       S9U l        g s  snf ! [         as  nUR                  S	:X  a;  U R                  R                  S
5        U R                  (       a
  [        S	SS9e S nAN|U R                  R                  SU 35         S nANS nAf[         aM  nU R                  R                  SU R                  -  5        U R                  R                  U5         S nANS nAff = f)Nz*/api/feature_flag/local_evaluation/?token=z&send_cohorts
   )r)   flagsr   r4   r5   i  z[FEATURE FLAGS] Error loading feature flags: To use feature flags, please set a valid personal_api_key. More information: https://posthog.com/docs/api/overviewzYou are using a write-only key with feature flags. To use feature flags, please set a personal_api_key More information: https://posthog.com/docs/api/overview)statusmessagez-[FEATURE FLAGS] Error loading feature flags: z`[FEATURE FLAGS] Fetching feature flags failed with following error. We will retry in %s seconds.r   )r   rF   r!   r#   r2   r3   r4   r5   r   r   rI   errorr.   rD   r   r6   r   r   r   _last_feature_flag_poll)rT   responseflagr   s       r[   _load_feature_flagsClient._load_feature_flags  sw   "	 %%<T\\N-X			H "*'!2!8bD.2.@.@).@dHHUO!UT!.@)D% '//C&D&JD##I.4"DL. (0||uw'?$7)  	Txx3 v ::""!R   !NqcRSS 	 HHr$$% HHQ	 sD   AC	 C*
C4.C	 C	 	
FAEEFAFFc                 v   U R                   (       d#  U R                  R                  S5        / U l        g U R	                  5         U R
                  (       a  U R
                  R                  5       (       dE  [        [        U R                  S9U R                  S9U l        U R
                  R                  5         g g )NzL[FEATURE FLAGS] You have to specify a personal_api_key to use feature flags.)seconds)intervalexecute)rF   rI   r   r2   r   r8   is_aliver   r   r6   rS   r   s    r[   load_feature_flagsClient.load_feature_flags7  s    $$HHkl!#D  " 4 4 6 6 )D<N<N*OY]YqYqrDKKK !7ro   ru   rv   rw   warn_on_unknown_groupsc                z   UR                  SS5      (       a  [        S5      eUR                  S5      (       d  gUR                  S5      =(       d    0 nUR                  S5      nUb  U R                  R                  [        U5      5      n	U	(       d/  U R                  R                  SU SUS	    35        [        S
5      eX;  aM  U(       a#  U R                  R                  SUS	    S35        gU R                  R                  SUS	    S35        gXY   n
[        XU	   U
5      $ [        XX@R                  5      $ )Nensure_experience_continuityFz&Flag has experience continuity enabledactivefiltersaggregation_group_type_indexz)[FEATURE FLAGS] Unknown group type index z for feature flag r   z!Flag has unknown group type indexz2[FEATURE FLAGS] Can't compute group feature flag: z without group names passed in)	r   r   r4   strrI   r   r.   r   r5   )rT   feature_flagr_   ru   rv   rw   r   flag_filtersr   
group_namefocused_group_propertiess              r[   _compute_flag_locallyClient._compute_flag_locallyB  se    :EBB()QRR))#''	28b'3'7'78V'W$'30044S9U5VWJ  ?@\?]]op|  ~C  qD  pE  F --PQQ' *HH$$L\Z_M`Laa  A  HHNNL\Z_M`Laa  A '7'C$0j?QSkll0L]_k_kllro   ru   rv   rw   r   send_feature_flag_eventsr=   c                L    U R                  UUUUUUUUS9n	U	c  g [        U	5      $ )Nr   )get_feature_flagbool)
rT   r   r_   ru   rv   rw   r   r   r=   r   s
             r[   feature_enabledClient.feature_enabledp  sF     ((/-"7%=' ) 	
 H~ro   c                   [        SU[        5        [        SU[        5        [        SU[        5        U R                  (       a  g U R                  X#XE5      u  pEU R                  c!  U R                  (       a  U R                  5         S n	U R                  (       aS  U R                   HC  n
U
S   U:X  d  M   U R                  U
UUUUS9n	U R                  R                  SU SU	 35        ME     U	S LnU(       dR  U(       dK   U R                  UUUUUS
9nUR!                  U5      n	U	c  Sn	U R                  R                  SU SU	 35        U S[#        U	5       3nXR$                  U   ;  aC  U(       a<  U R'                  USSUSU	SUSU 3U	0UUS9  U R$                  U   R)                  U5        U	$ ! [         a-  nU R                  R                  SU SU 35         S nAGM=  S nAf[         a*  nU R                  R                  S	U 35         S nAGMo  S nAff = f! [         a)  nU R                  R                  SU 35         S nAGNS nAff = f)Nr   r_   ru   ru   rv   rw   z$Successfully computed flag locally: z -> zFailed to compute flag z
 locally: z7[FEATURE FLAGS] Error while computing variant locally: ru   rv   rw   r=   Fz&Successfully computed flag remotely: #z -> #z-[FEATURE FLAGS] Unable to get flag remotely: _$feature_flag_called$feature_flag$feature_flag_responselocally_evaluatedr   ru   r=   )r-   r   rh   ri   r<   &_add_local_person_and_group_propertiesr2   rF   r   r   rI   r.   r   rD   r   ry   r   r   r;   r   add)rT   r   r_   ru   rv   rw   r   r   r=   r   r   r   flag_was_locally_evaluatedr2   feature_flag_reported_keys                  r[   r   Client.get_feature_flag  s|    	sL){H5&$'==.2.Y.Y!2/
+ %$*?*?##% **;#%!#'#=#= '#).?-= $> $ )McURVW_V`'ab +$ &.T%9")2GX $ 9 9!&7%5"/ !: ! ),,S1#$H!GuERZQ[\] (+e1S]O$<!%-U-UVa-bb(LL&#S,h')Cu%x	 +   44[AEEF_`U 2 !)@ZPQs'ST $ !**-defdg+hi !$  X""%RSTRU#VWWXs=   64F2A
H 2
H<!G$$H1HH
I(II)match_valueru   rv   rw   r   r   r=   c                   U R                   (       a  g Uc  U R                  UUUUUSSU	S9nS n
S nUb  U R                  X5      nUS LnU(       d\  U(       dU   U R                  X$XVU	5      nUS   R	                  US 5      n
US   R	                  [        U5      R                  5       S 5      nU S[        U
5       3nXR                  U   ;  aE  U(       a>  U R                  USS	US
U
SUSUSU 3U
0UU	S9  U R                  U   R                  U5        U$ ! [         a(  nU R                  R                  SU 35         S nANS nAff = f)NFT)ru   rv   rw   r   r   r=   rq   r|   :[FEATURE FLAGS] Unable to get feature flags and payloads: r   r   r   r   z$feature_flag_payloadr   r   r   )r<   r   _compute_payload_locallyr   r   r   lowerrD   rI   r   r;   r   r  )rT   r   r_   r  ru   rv   rw   r   r   r=   r   payloadr  responses_and_payloadsr   r  s                   r[   get_feature_flag_payloadClient.get_feature_flag_payload  s    ==//"3!1). '++ 0 K "33CEG%,D%8")2Ge)-)L)L):m*& 2.AEEc4P01FGKKCPSHNNL\^bc (+e1S]O$<! &-U-UVa-bb(LL&#S,h+W')Cu%x +   44[AEEF_`1  e""%_`a_b#cddes   AD 
EEEc                 *   S nU R                   c  U$ U R                   R                  U5      =(       d    0 nUR                  S5      =(       d    0 nUR                  S5      =(       d    0 nUR                  [        U5      R                  5       S 5      nU$ )Nr   payloads)r3   r   r   r
  )rT   r   r  r  flag_definitionr   flag_payloadss          r[   r	  Client._compute_payload_locally%  s    $$,N3377<B&**95;$((4:##C$4$:$:$<dCro   ru   rv   rw   r   r=   c          	      4    U R                  UUUUUUS9nUS   $ )Nr  rq   )get_all_flags_and_payloads)rT   r_   ru   rv   rw   r   r=   r   s           r[   r   Client.get_all_flags1  s8     ///-"7' 0 
 ^$$ro   c                @   U R                   (       a  S S S.$ U R                  XX45      u  p4U R                  XX4S9u  pxn	XxS.n
U	(       a  U(       d   U R                  UUUUUS9nUn
U
$ U
$ ! [         a)  nU R
                  R                  SU 35         S nAU
$ S nAff = f)Nr   r   r   r  )r<   r  #_get_all_flags_and_payloads_locallyrs   rD   rI   r   )rT   r_   ru   rv   rw   r   r=   r   r  fallback_to_decider   flags_and_payloadsr   s                r[   r  !Client.get_all_flags_and_payloadsE  s     ==$(FF.2.Y.Y!2/
+ /3.V.V:K /W /
++ %*K&;
e%)__!&7%5"/ &5 &" . x  e""%_`a_b#cddes   A* *
B4BBc          
         [        SU[        5        [        SU[        5        U R                  c!  U R                  (       a  U R                  5         0 n0 nSnU R                  (       aX  U R                   HG  n	 U R                  U	UUUUUS9XiS   '   U R                  U	S   XiS      5      n
U
(       a	  XU	S   '   MG  MI     OSnXgU4$ ! [         a    Sn Ma  [         a+  nU R                  R                  SU 35        Sn S nAM  S nAff = f)Nr_   ru   Fr   r   Tz;[FEATURE FLAGS] Error while computing variant and payload: )r-   rh   ri   r2   rF   r   r   r	  r   rD   rI   r   )rT   r_   ru   rv   rw   r   r   r  r  r   matched_payloadr   s               r[   r  *Client._get_all_flags_and_payloads_locallyj  s%    	{H5&$'%$*?*?##%"**.)-)C)C#%*;)9/E *D *Eu+& '+&C&CDKQV\aWbQc&dO&0?e- ' +( "& 222 . .)-&  .HH&&)defdg'hi)-&.s   8ACD		D	 DD	c                     U R                   $ N)r2   r   s    r[   feature_flag_definitionsClient.feature_flag_definitions  s    !!!ro   c                     SU0U=(       d    0 En0 nU(       a+  U H%  nSX'   0UR                  U5      =(       d    0 EXg'   M'     XV4$ )Nr_   r   )r   )rT   r_   ru   rv   rw   all_person_propertiesall_group_propertiesr   s           r[   r  -Client._add_local_person_and_group_properties  sb    !. Y@Q@WUW Y!$
 &"44'++J7=24$0 % %::ro   )r   r!   r5   rM   r.   r=   r<   r;   r?   r@   rA   r2   r3   r7   r4   r'   r*   r#   r$   rF   r6   r8   rE   r+   r1   r/   r>   r0   r)   )NNFi'  TNd   g      ?F   F         NNFTFr)  NFNN)NNNNNN)NNNN)	NNNNNNNFN)NNNNNNN)&__name__
__module____qualname____firstlineno____doc__rG   	getLoggerrI   r\   rm   ry   r}   r   rs   r   r:   r   r   r   r   r   rj   r   rP   r   r   r   r   r   r   r  r	  r   r  r  r"  r  __static_attributes__ ro   r[   r   r      s   &


I
&C "./%*+/3m%^1$ fj) fj0 fj
0  71r1"1& 1>1( sw12 9DvAFE+%@N	   #,mf #!%@ #!%Rr #!%DL
  #%0 ##L &(2PRkp$3L";ro   r   c                 ^    [        X5      (       d  SR                  XU5      n[        U5      eg)z8Require that the named `field` has the right `data_type`z{0} must have {1}, got: {2}N)
isinstancer   AssertionError)namefield	data_typerl   s       r[   r-   r-     s/    e''+224EJS!! (ro   c                 N    U c  g [        U [        5      (       a  U $ [        U 5      $ r!  )r6  r   r   )vals    r[   r   r     s%    
{#|$$
s8Oro   )3rN   rG   numbersrB   r   r   r   rf   r   r   dateutil.tzr   sixr   posthog.consumerr	   posthog.exception_capturer
   posthog.exception_utilsr   r   r   posthog.feature_flagsr   r   posthog.pollerr   posthog.requestr   r   r   r   r   r   posthog.utilsr   r   r   r   posthog.versionr   r+   ImportErrorr,   Numberrh   r9   objectr   r-   r   r4  ro   r[   <module>rK     s       	 
 (    % 6 c c W ! b b W W #
 NNL$/;V ;D"c  s   8B 
B,+B,