+
    Tj1                        ^ RI t ^ RIHt ^ RIHt ^ RIHt ^ RIHtH	t	 ^ RI
HtHtHtHtHt ^ RIHt ^ RIHtHt ^ R	IHt ^R
IHtHt ^RIHt R.t ! R R]]]4      t ! R R4      t]P>                   ! R R]]P@                  4      4       t!]P>                   ! R R]]PD                  4      4       t#]P>                   ! R R]]4      4       t$]P>                   ! R R]]PJ                  4      4       t&]P>                   ! R R]4      4       t']P>                   ! R R]4      4       t( ! R R]4      t) ! R R4      t* ! R  R!]4      t+ ! R" R#4      t,R# )$    N)lookups)SimpleArrayField)ArrayMaxLengthValidator)checks
exceptions)FieldFuncIntegerField	TransformValue)CheckFieldDefaultMixin)ExactIn)gettext_lazy)CheckPostgresInstalledMixinprefix_validation_error)AttributeSetter
ArrayFieldc                   P  a a ] tR t^t oRtR]! R4      R]! R4      /tRtRV 3R llt]	R 4       t
]
P                  R 4       t
]V 3R	 l4       tV 3R
 ltV 3R lt]	R 4       tR tR tV 3R ltR tRR ltV 3R ltR tR tR tV 3R ltV 3R ltV 3R ltV 3R ltR tRtVt V ;t!# )r   Fitem_invalidz+Item %(nth)s in the array did not validate:nested_array_mismatchz(Nested arrays must have the same length.c                F  < Wn         \        V P                   R R4      V n        W n        V P                  '       d)   . V P                  O\        V P                  4      NV n        \        V P                   R4      '       d   V P                  V n        \        SV `(  ! R/ VB  R# )db_collationNfrom_db_value )
base_fieldgetattrr   sizedefault_validatorsr   hasattr_from_db_valuer   super__init__)selfr   r   kwargs	__class__s   &&&,Y/var/www/idalgo/venv/lib/python3.14/site-packages/django/contrib/postgres/fields/array.pyr#   ArrayField.__init__   s    $#DOO^TJ	999'((''		2'D# 4??O44!%!4!4D"6"    c                     V P                   R ,          #   \         d(    \        RT P                  P                  ,          4      hi ; i)modelz$'%s' object has no attribute 'model')__dict__KeyErrorAttributeErrorr&   __name__r$   s   &r'   r+   ArrayField.model)   sD    	==)) 	 69P9PP 	s	    2Ac                B    WP                   R &   WP                  n        R# )r+   N)r,   r   r+   )r$   r+   s   &&r'   r+   r1   2   s    !&g %r)   c                ^   < \        V\        \        34      ;'       g    \        SV `  V4      # N)
isinstancelisttupler"   _choices_is_value)clsvaluer&   s   &&r'   r8   ArrayField._choices_is_value7   s&    %$/SS573LU3SSr)   c                4  < \         SV `  ! R
/ VB pV P                  P                  '       d+   VP	                  \
        P                  ! R V RR7      4       V# V P                  P                  4       pV'       d   RP                  R V 4       4      pV'       d0   VP	                  \
        P                  ! RV,          V RR7      4       RP                  R V 4       4      pV'       d0   VP	                  \
        P                  ! RV,          V R	R7      4       V# )z/Base field for array cannot be a related field.zpostgres.E002)objidz
    c              3      "   T FX  p\        V\        P                  4      '       g   K%  VP                  R 8X  d   K8  VP                  : RVP                  : R2x  KZ  	  R# 5i)zpostgres.E005 ()N)r5   r   Errorr>   msg.0
base_checks   & r'   	<genexpr>#ArrayField.check.<locals>.<genexpr>H   sI      /&1
!*fll; @ 'MM_<	 @?&1s   "A"A"&A"z'Base field for array has errors:
    %szpostgres.E001c              3      "   T FE  p\        V\        P                  4      '       g   K%  VP                  : R VP                  : R2x  KG  	  R# 5i)r@   rA   N)r5   r   WarningrC   r>   rD   s   & r'   rG   rH   W   s5      1&1
!*fnn= @?&1s
   "A&Az)Base field for array has warnings:
    %szpostgres.W004r   )	r"   checkr   remote_fieldappendr   rB   joinrJ   )r$   r%   errorsbase_checkserror_messageswarning_messagesr&   s   &,    r'   rK   ArrayField.check;   s    ((??'''MME&N ? ////1K!) /&1/ " "MMFW $. $,== 1&11 $ 
 $MMH./ $.	 r)   c                \   < \         SV `  V4       V P                  P                  V4       R # r4   )r"   set_attributes_from_namer   )r$   namer&   s   &&r'   rU   #ArrayField.set_attributes_from_nameg   s"    (.006r)   c                <    R V P                   P                  ,          # )zArray of %s)r   descriptionr0   s   &r'   rY   ArrayField.descriptionk   s    t::::r)   c                t    V P                   ;'       g    R pV P                  P                  V4      : RV: R2#  [])r   r   db_typer$   
connectionr   s   && r'   r`   ArrayField.db_typeo   s+    yyB??22:>EEr)   c                t    V P                   ;'       g    R pV P                  P                  V4      : RV: R2# r\   )r   r   cast_db_typera   s   && r'   re   ArrayField.cast_db_types   s+    yyB??77
CTJJr)   c                D   < \         SV `  V4      pV P                  VR &   V# )	collation)r"   db_parametersr   )r$   rb   	db_paramsr&   s   && r'   ri   ArrayField.db_parametersw   s(    G)*5	!%!2!2	+r)   c                B    R P                  V P                  V4      4      # )z%s::{})formatr`   )r$   r:   compilerrb   s   &&&&r'   get_placeholderArrayField.get_placeholder|   s    t||J788r)   c           	         \        V\        \        34      '       d.   V Uu. uF   pV P                  P	                  WBR R7      NK"  	  up# V# u upi )F)prepared)r5   r6   r7   r   get_db_prep_value)r$   r:   rb   rr   is   &&&& r'   rs   ArrayField.get_db_prep_value   sU    edE]++ A 11!%1P  	s   &Ac                   < \         SV `  4       w  rr4VR 8X  d   RpV P                  P                  4       VR&   V P                  e   V P                  VR&   WW43# )z/django.contrib.postgres.fields.array.ArrayFieldz)django.contrib.postgres.fields.ArrayFieldr   r   )r"   deconstructr   cloner   )r$   rV   pathargsr%   r&   s   &    r'   rw   ArrayField.deconstruct   s\    #(7#6#8 DDD>D#446|99 !YYF6N4''r)   c                    \        V\        4      '       d@   \        P                  ! V4      pV Uu. uF  q0P                  P                  V4      NK  	  ppV# u upi r4   )r5   strjsonloadsr   	to_python)r$   r:   valsvals   &&  r'   r   ArrayField.to_python   sI    eS!!::e$D?CDt__..s3tED Es   #Ac                p    Vf   V# V Uu. uF  pV P                   P                  WBV4      NK!  	  up# u upi r4   )r   r   )r$   r:   
expressionrb   items   &&&& r'   r!   ArrayField._from_db_value   sD    =L 
 OO))$JG
 	
 
s   %3c                   . pV P                  V4      pV P                  pV FP  pVf   VP                  R 4       K  \        VP                  V4      pVP                  VP                  V4      4       KR  	  \        P                  ! VRR7      # )NF)ensure_ascii)value_from_objectr   rM   r   attnamevalue_to_stringr~   dumps)r$   r=   valuesr   r   r   s   &&    r'   r   ArrayField.value_to_string   sw    %%c*__
C{d#%j&8&8#>j88=>  zz&u55r)   c                V  < \         SV `  V4      pV'       d   V# R V9  d+    \        V4      pV^,          p\        W0P                  4      #  VP                  R 4      w  rE\        V4      ^,           p\        V4      p\        WE4      #   \
         d     LIi ; i  \
         d     R# i ; i)_N)r"   get_transformintIndexTransformFactoryr   
ValueErrorsplitSliceTransformFactory)r$   rV   	transformindexstartendr&   s   &&    r'   r   ArrayField.get_transform   s    G)$/	d?ED	 
,UOODD	5CJEJNEc(C )44    		s#   B 0B BBB('B(c           
       < \         SV `  W4       \        V4       F!  w  r4 V P                  P                  WB4       K#  	  \        V P                  \        4      '       dU   \        V Uu0 uF  p\        V4      kK  	  up4      ^8  d*   \        P
                  ! V P                  R,          RR7      hR# R#   \        P
                   d/   p\        TT P                  R ,          R RT^,           /R7      hRp?ii ; iu upi )r   nthprefixcodeparamsNr   )r   )r"   validate	enumerater   r   ValidationErrorr   rQ   r5   r   len)r$   r:   model_instancer   parterrorrt   r&   s   &&&    r'   r   ArrayField.validate   s    /$U+KE((> , dooz22E*EqCFE*+a/ 00''(?@0  0 3 -- -..~>'!519-	  +s   B7*C=7C:)C55C:c           
       < \         SV `  V4       \        V4       F!  w  r# V P                  P                  V4       K#  	  R#   \        P
                   d/   p\        TT P                  R ,          R RT^,           /R7      hRp?ii ; i)r   r   r   N)r"   run_validatorsr   r   r   r   r   rQ   )r$   r:   r   r   r   r&   s   &&   r'   r   ArrayField.run_validators   s}    u%$U+KE..t4 , -- -..~>'!519-	 s   AB)BBc           
        < \         SV `  ! R/ R \        RV P                  P                  4       RV P                  /VCB # )
form_classr   
max_lengthr   )r"   	formfieldr   r   r   )r$   r%   r&   s   &,r'   r   ArrayField.formfield   sJ    w  
.doo779dii 	
 	
r)   c                D    Vf   R MW#,           ^,
          p\        W$V4      # r4   )SliceTransform)r$   r   r   lengthr   s   &&&& r'   slice_expressionArrayField.slice_expression   s#     nd%.1*<e*55r)   )r   r   r   r   r   )r6   z[]r4   )F)"r/   
__module____qualname____firstlineno__empty_strings_allowedr   default_error_messages_default_hintr#   propertyr+   setterclassmethodr8   rK   rU   rY   r`   re   ri   ro   rs   rw   r   r!   r   r   r   r   r   r   __static_attributes____classdictcell____classcell__r&   __classdict__s   @@r'   r   r      s     !GH#M!N #M#   \\& & T T*X7 ; ;FK
9(
65*&
6 6r)   c                   D   a a ] tR t^t oV 3R ltV 3R ltR tRtVtV ;t	# )ArrayRHSMixinc                t  < \        V\        \        34      '       d   \        V P	                  V4      4      '       dl   . pV FV  p\        VR 4      '       g1   VP                  p\        VP                  P                  V4      4      pVP                  V4       KX  	  \        VRRRR/ p\        SV `5  W4       R# )resolve_expressionfunctionARRAYtemplatez%(function)s[%(expressions)s]N)r5   r7   r6   any_rhs_not_none_valuesr    output_fieldr   r   get_prep_valuerM   r	   r"   r#   )r$   lhsrhsexpressionsr:   fieldr&   s   &&&   r'   r#   ArrayRHSMixin.__init__   s     cE4=))c$2K2KC2P.Q.QKu&:;;,,E!%"2"2"A"A%"HIE""5)	 
   9C
 	"r)   c                   < \         SV `  W4      w  r4V P                  P                  P	                  V4      pV: R V: 2V3# )z::)r"   process_rhsr   r   re   )r$   rn   rb   r   
rhs_params	cast_typer&   s   &&&   r'   r   ArrayRHSMixin.process_rhs  s>    '-hCHH))66zB		*J66r)   c              #     "   V FD  p\        V\        \        34      '       d   V P                  V4       R j  xL
  K:  Vf   K@  Rx  KF  	  R #  L5i)NT)r5   r6   r7   r   )r$   r   xs   && r'   r   "ArrayRHSMixin._rhs_not_none_values	  sA     A!dE]++44Q777
	 7s   6AAAAr   )
r/   r   r   r   r#   r   r   r   r   r   r   s   @@r'   r   r      s     #"7
 r)   r   c                       ] tR tRtRtR# )ArrayContainsi  r   Nr/   r   r   r   r   r   r)   r'   r   r         r)   r   c                       ] tR tRtRtR# )ArrayContainedByi  r   Nr   r   r)   r'   r   r     r   r)   r   c                       ] tR tRtRtR# )
ArrayExacti  r   Nr   r   r)   r'   r   r     r   r)   r   c                       ] tR tRtRtR# )ArrayOverlapi   r   Nr   r   r)   r'   r   r      r   r)   r   c                   8   a  ] tR tRt o Rt]! 4       tR tRtV t	R# )ArrayLenTransformi%  r   c                d    VP                  V P                  4      w  r4R RV/,          V^,          3# )zRCASE WHEN %(lhs)s IS NULL THEN NULL ELSE coalesce(array_length(%(lhs)s, 1), 0) ENDr   )compiler   r$   rn   rb   r   r   s   &&&  r'   as_sqlArrayLenTransform.as_sql*  s<    &&txx08CL !1*% 	%r)   r   N)
r/   r   r   r   lookup_namer
   r   r   r   r   r   s   @r'   r   r   %  s     K>L% %r)   r   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )ArrayInLookupi3  c                   < \         SV `  4       p\        VR 4      '       d   V# . pV FB  p\        VR 4      '       d   VP                  V4       K(  VP                  \	        V4      4       KD  	  V# )r   )r"   get_prep_lookupr    rM   r7   )r$   r   prepared_valuesr:   r&   s   &   r'   r   ArrayInLookup.get_prep_lookup5  sj    (*6/00M Eu233&&u-&&uU|4	 
 r)   r   )r/   r   r   r   r   r   r   r   r   s   @@r'   r   r   3  s      r)   r   c                   H   a a ] tR tRt oV 3R ltR t]R 4       tRtVt	V ;t
# )IndexTransformiD  c                @   < \         SV `  ! V/ VB  Wn        W n        R # r4   )r"   r#   r   r   )r$   r   r   rz   r%   r&   s   &&&*,r'   r#   IndexTransform.__init__E  s    $)&)
$r)   c                    VP                  V P                  4      w  r4VP                  R 4      '       g
   RV,          pRV,          . VOV P                  N53# )r_   z(%s)z%s[%%s])r   r   endswithr   r   s   &&&  r'   r   IndexTransform.as_sqlJ  sN    &&txx0||C  3,C3 5& 5$** 555r)   c                    V P                   # r4   )r   r0   s   &r'   r   IndexTransform.output_fieldP  s    r)   r   r   )r/   r   r   r   r#   r   r   r   r   r   r   r   s   @@r'   r   r   D  s(     %
6   r)   r   c                   ,   a  ] tR tRt o R tR tRtV tR# )r   iU  c                    Wn         W n        R # r4   )r   r   )r$   r   r   s   &&&r'   r#   IndexTransformFactory.__init__V  s    
$r)   c                J    \        V P                  V P                  .VO5/ VB # r4   )r   r   r   r$   rz   r%   s   &*,r'   __call__IndexTransformFactory.__call__Z  s!    djj$//KDKFKKr)   r   Nr/   r   r   r   r#   r  r   r   r   s   @r'   r   r   U  s     %L Lr)   r   c                   8   a a ] tR tRt oV 3R ltR tRtVtV ;t# )r   i^  c                @   < \         SV `  ! V/ VB  Wn        W n        R # r4   )r"   r#   r   r   )r$   r   r   rz   r%   r&   s   &&&*,r'   r#   SliceTransform.__init___  s    $)&)
r)   c                    VP                  V P                  4      w  r4V P                  f   RV R2. VOV P                  N53# RV R2. VOV P                  NV P                  N53# )N(z)[%s:]z)[%s:%s])r   r   r   r   r   s   &&&  r'   r   SliceTransform.as_sqld  sp    &&txx088se6?$9f$9djj$999se8$&E&E

&EDHH&EEEr)   r   r   )	r/   r   r   r   r#   r   r   r   r   r   s   @@r'   r   r   ^  s     
F Fr)   r   c                   ,   a  ] tR tRt o R tR tRtV tR# )r   im  c                    Wn         W n        R # r4   )r   r   )r$   r   r   s   &&&r'   r#   SliceTransformFactory.__init__n  s    
r)   c                J    \        V P                  V P                  .VO5/ VB # r4   )r   r   r   r  s   &*,r'   r  SliceTransformFactory.__call__r  s!    djj$((DTDVDDr)   r  Nr  r   s   @r'   r   r   m  s     E Er)   r   )-r~   django.contrib.postgresr   django.contrib.postgres.formsr   "django.contrib.postgres.validatorsr   django.corer   r   django.db.modelsr   r	   r
   r   r   django.db.models.fields.mixinsr   django.db.models.lookupsr   r   django.utils.translationr   r   utilsr   r   r   __all__r   r   register_lookupDataContainsr   ContainedByr   r   Overlapr   r   r   r   r   r   r   r   r)   r'   <module>r#     s_    + : F * H H A . 6 H ".]6,.De ]6@ > 	M7#7#7 	 	 	}g&9&9 	 	 	 	 	 	='// 	 	 
%	 
% 
% B   Y "L LFY FE Er)   