Qf>ddlZddlZddlmZmZddlmZddl m Z gdZ dxZ xZ xZxZZGddeZGdd eZd Zd Zd Zd ZdZdZdZdZdZdDdZdZGddZeZGddZ e Z GddZ!GddeZ"GddZ#Gdd e$Z%Gd!d"e&Z'e'Z(Gd#d$e'%Z Gd&d'e ZGd(d)e)eZ*Gd*d+e+eZ,d,Z-e-Z.d-Z/Gd.d/e,Z0e0\Z1Z2ZZ3Gd0d1e e12Z Gd3d4e)ee e32Z4d5Z5d6Z6d7Z7d8Z8d9Z9d:Z:dEd;Z;e fddd<d=Z<ed?Z=e=\Z>Z?Z@Gd@dAZAdBZBdDdd2dCZCe*e,e4fZy)FN)MappingProxyTypeDynamicClassAttribute)or_)reduce)EnumTypeEnumMetaEnumIntEnumStrEnumFlagIntFlagReprEnumautouniquepropertyverifymember nonmember FlagBoundarySTRICTCONFORMEJECTKEEPglobal_flag_reprglobal_enum_repr global_str global_enum EnumCheck CONTINUOUS NAMED_FLAGSUNIQUEpickle_by_global_namepickle_by_enum_nameceZdZ dZy)rc||_yNvalueselfr(s +/opt/alt/python312/lib64/python3.12/enum.py__init__znonmember.__init__  N__name__ __module__ __qualname__r,r.r+rr r.rceZdZ dZy)rc||_yr&r'r)s r+r,zmember.__init__#r-r.Nr/r3r.r+rrr4r.rcT t|dxst|dxs t|dS)N__get____set__ __delete__)hasattr)objs r+_is_descriptorr=&s6 C # ' C # ' C &r.cx t|dkDxr*|dd|ddcxk(xrdk(ncxr|ddk7xr|ddk7S)N___lennames r+ _is_dunderrI0sY IM  !HRS )T )  GsN  HO r.cx t|dkDxr*|d|dcxk(xrdk(ncxr|dddk7xr|dddk7S)Nr@rrCrArErGs r+ _is_sunderrM;s[ IM  GtBx &3 &  1I   BK3  r.ct|tsyt|dd}|dzt|ddz}d|z}||k(xs|j|S)NFr2.r0) isinstancetypegetattrendswith)cls_namer<qualname s_pattern e_patterns r+_is_internal_classrYFsX c4 sNB/H3j"!==IiI y @H$5$5i$@@r.cd|d}t|}t||kDr.|j|r|||dzdgk7r|ddk7s|ddk7ryy)NrCrBrLrKrATF)rF startswith)rUrHpatternpat_lens r+ _is_privater^Os[!$G'lG I (WWQY'C50bSDHOr.c* |dk(ry||dz z}|dk(S)NrFrLr3)nums r+_is_single_bitra]s) ax37NC !8Or.cv d}t|tr ||d<d|d<yt|d|t|ddy)Nctd|z)Nz%r cannot be pickled) TypeErrorr*protos r+_break_on_call_reducez6_make_class_unpicklable.._break_on_call_reducels.566r. __reduce_ex__z r1)rQdictsetattr)r<rgs r+_make_class_unpicklablerkfsC 7#t4O'L_&;<\;/r.c#K|}t|tr |j}|dkrtd|z|r||dzz}|||z}|ryyw)Nrz%r is not a positive integerrL)rQr r( ValueError)r`originalbs r+_iter_bits_lsbrpus\H#tii Qw7(BCC C4!8  q s AA  A c*tt|Sr&)listrpr's r+show_flag_valuesrss u% &&r.c& d|jz}|dk\r*tj||zjddd}ntj||dz |zz }|dd}|dd}|t ||kr|d|z|z| d}|d|S) Nr@r10rLrK ) bit_lengthbltnsbinreplacerF)r`max_bitsceilingssigndigitss r+r{r{s C##%%G ax IIcGm $ , ,S#q 9 IIsdgkW44 5 Ra5D qrUF v; !2h)F2XIJ?FF ##r.c |jd}d}t|dD] \}}|dk7s nt|D] \}}|d||<dj|S)N rrx)split enumeratejoin)textlinesblanksichjls r+_dedentrsp JJt E F58$2 9 %% 1QR5a! 99U r.ceZdZdZy) _not_givency)Nz r3r*s r+__repr__z_not_given.__repr__sr.Nr0r1r2rr3r.r+rrsr.rceZdZdZy) _auto_nullcy)Nrr3rs r+rz_auto_null.__repr__sr.Nrr3r.r+rrsr.rceZdZ efdZdZy)rc||_yr&r'r)s r+r,z auto.__init__r-r.c d|jzS)Nzauto(%r)r'rs r+rz auto.__repr__sDJJ&&r.N)r0r1r2rr,rr3r.r+rrs('r.rc4eZdZ dZdZdZddZdZdZdZ y)rNc|2|j |jSt|d|j|j|j|S|jdk(r t |j |jS|jdk(r t |j|jS |j|jS#t$rt|d|jdwxYw)Nz has no attribute attrdesc) rAttributeErrorrHfget _attr_typerS _cls_type_value_ _member_map_KeyError)r*instance ownerclasss r+r8zproperty.__get__s  {{&{{"$4> J 99 99X& & __ &4>>4995 5 __ &8++TYY7 7 **4995 5  0:DIIF  s 1C %C/c|j|j||Std|jd|j)N cannot set attribute )fsetrclsnamerH)r*rr(s r+r9zproperty.__set__s: 99 99Xu- -7;||TYYO r.c|j|j|Std|jd|j)Nrz> cannot delete attribute )fdelrrrH)r*rs r+r:zproperty.__delete__s8 99 99X& &:>,, R r.c4||_|j|_yr&)rHr0r)r*rrHs r+ __set_name__zproperty.__set_name__s !** r.r&) r0r1r2rrrr8r9r:rr3r.r+rrs,FJI 2+r.rceZdZ dZdZy) _proto_memberc||_yr&r'r)s r+r,z_proto_member.__init__r-r.c t|||j}t|ts|f}n|}|jtur|f}|j s|j |}n|j |g|}t|ds/|jtur||_ n |j||_ |j}||_ ||_|j|t!|j"|_t&zt)|t&rjt|t*r5|xj,|zc_t/|r|xj0|zc_d|j,j3zdz |_ |j6|}d} d} d} |j@ddD]\} | jBjE|}|!t|tFtHfr|} | } d} n tK|r|} | xsd} | xs| } Yd} | } ^| rtG}||_&|jO||| dvrltQ| d d|_)tQ| d d|_*tQ| d d|_+tQ| d d|_,tQ| d d|_-tQ| dd|_.| |_/| |_0tc|||n tc|||||j8|< |j6je||y#t$r}td}||_ |d}~wwxYw#t$r?|j8j;D]\}} | j|k(s| }nt<YwxYw#t<$rt&t)|t&s|j"j?|nLt&Ft)|t&r6t|t*r&t/|r|j"j?|YYwxYw#t$r|jfj?|YywxYw)Nrz/_value_ not set in __new__, unable to create itr@rLenumrr)rrrr8rr9rr:)4delattrr(rQtuple _member_type_ _use_args_ _new_member_r;objectr Exceptionrd __cause___name_ __objclass__r,rF_member_names_ _sort_order_r issubclassint _flag_mask_ra_singles_mask_ry _all_bits__value2member_map_ritemsrappend__mro____dict__getrrr=rrrSr_getr_setr_delrrrj setdefault_unhashable_values_)r* enum_class member_namer(args enum_memberexcnew_excrHcanonical_memberfound_descriptordescriptor_type class_typebaserredirects r+rz_proto_member.__set_name__s   K( %'9DD  # #u ,8D$$$11*=K1*11*DtDK{I.''61&+ #"*B**B*BD*IK'##( #-   d##&z'@'@#A    :t <%%&&%/&!%(--6-$%:+A+A*M*M*O$PST$TJ ! > #(;;EB 4  &&qr*D==$$[1DdX/D$EF'+$!%J&,O#D)'+$&5&?O!+!3tJ&,O!%J+ zH)HO  ! !*k :/1 '(8&$ G '(8)T J '(8&$ G '(8)T J '(8&$ G '(8, M "1H !+H  J X 6 J [ 9/:  , 9  ) ) 4 4UK Hy!"'MG),G%!M "2 #.8.E.E.K.K.M*D*'//58&6 /N #N  # >L%j$7))00=$":t4"5#.&u-))00=! >z 9  * * 1 1% 8 9s[K$6L O"$ L-LL 8M M MMMBOO"$P P N)r0r1r2r,rr3r.r+rrsw9r.rc0eZdZ fdZfdZdZxZS) _EnumDictcZt|i|_g|_g|_d|_y)NF)superr, _member_names _last_values_ignore _auto_called)r* __class__s r+r,z_EnumDict.__init__s-  !r.c B t|j|rddl}|jdtdt |j|rnt |r|dvrtd|d|dk(rD|jr td t|tr |jn|}t|d |nH|d k(rBt|tr!|jd d j!}n t#|}||_t'|t'|j(z}|rtd|t+|r |dk(rd}n||j(vrt|d||||j$vrnt|t,r|j.}nit1|rn\||vrt|d||t|t2r |j.}d}d}t|t4rd}|f}t|t6rt9d|Drg}t;|} |D]} t| t4r|d}| j.t<k(r@|j?|dtA|j(|jBdd| _d|_| j.} |jBjE| |jE| |r|d}n | |}d|j(|<|r|jBjE|tF |||y#t$r| |}YMwxYw)NrzzIn 3.13 classes created inside an enum will not become a member. Use the `member` decorator to keep the current behavior.r@ stacklevel)_order__generate_next_value__numeric_repr_ _missing__ignore_ _iter_member__iter_member_by_value__iter_member_by_def_z_sunder_ names, such as z", are reserved for future Enum userz4_generate_next_value_ must be defined before members_generate_next_valuer,rxz+_ignore_ cannot specify already set names: __order__rz already defined as TFc3<K|]}t|tywr&)rQr).0vs r+ z(_EnumDict.__setitem__..s/SU 1d0CUsrL)%rY _cls_namewarningswarnDeprecationWarningr^rMrmrrdrQ staticmethod__func__rjstrr|rrrrsetrrIrr(r=rrranyrRrrrFrrr __setitem__) r*keyr(r_gnvalreadynon_auto_storesingle auto_valuedtrrs r+rz_EnumDict.__setitem__s  dnne 4  MMO&   t~~s +  _ !"--$$#$Z[[)3E<)Hu~~e4d; "eS)!MM#c288:E KE$ e*s4+=+='>>$&*_k! D&& &#tCyIJ J DLL  y )KKE E "  d{c49 MNNE6* !NF%& %'C/SU/S,S! KA!!T*).77j0&*&?&?$'C0B0B,CTEVEVWXEY'&AG15D-GG))003&&q)'NE0 !+'+D  s #!!((/ C' %0 !;0sL LLc |jD] }||||<  |jD] \}}|||< y#t$r|D] \}}|||< Y8wxYwr&)keysrr)r*members more_membersrHr(s r+updatez_EnumDict.updatesn # $T]T ' (--/KD%DJ0 #& e"T  ' #s>AA)r0r1r2r,rr  __classcell__rs@r+rrxs "i(Vr.rc,eZdZ edZdddfd ZdZefddddddd Zd Z fd Z d Z d Z dZ dZej dZdZdZfdZdddddddZdddddZedZedZedZedZedZxZS)rc |j||t}||_|j||\}}|t |dd|d<|S)Nr)_check_for_existing_members_rr _get_mixins_rS)metaclsclsbaseskwds enum_dict member_type first_enums r+ __prepare__zEnumType.__prepare__s` ,,S%8K ! ")"6"6sE"B Z  !18 72I- .r.NFboundary_simplec $ |rt |||||fi|S|jdgjd|d}|D]}|j |d|j } t | ddhz} | r$tddjd| Dz|j dd} |jd} | t| tur t| } t|j}| | |d<|j||\} }|j|| |\}}}||d <||d <| D]}||}t!|||<g|d <i|d <i|d <g|d<| |d<|j#|||d<|xs t%|dd|d<d|d<d|d<d|d<d|d< d}t |||||fi|}||j1|j3j4t6t6|vr{| t8ur t;dd|vr | j<|_|j<|d<d|vr@| j>}|t8j>ur | j@}||_|j>|d<dD]O}||vst%||}t%||}t%t8|}t%| |}|||fvsCtC|||QtD>tG|tDr.dD])}||vst%tD|}tC||||||<+tH|r||_%tHj|_| 0tM| t(r | jOddjQ} tD|dk7stDMtG|tDs=tS|dtS|dtS|dtS|dtS|dntDtG|tDro|Dcgc]}|jT}}|tW|k7r|jX|_-| r5| Dcgc]*}||j\vst_||jTr|,} }| rc| Dcgc].}||j\vs||j\vr||j`vr|0} }| |j`k7rt;d|j`d| |S#t&$rS}t|t)|}|j*|_|j,|_|j.}Yd}~Fd}~wwxYwcc}wcc}wcc}w) NrmrorOzinvalid enum member name(s) %src32K|]}t|ywr&)repr)rns r+rz#EnumType.__new__..&s%D*+  15I- .#*"6"6sE"B Z&-&8&8; '#8%, .!"* ,!DdOE+E2IdO! ') "#$& .!*, &'+- '(%0 /"$+$<$(> %*4*?*? ,' )$,,V^^+)11F%+ "'1'9'9 )$JD9$%j$7 &z48 ' 5 #*;#= $4m#DDJk:K   :t < y(")$"5KJk:&1IdO  ,3 )!%J   '3'!//#s399; #Jz4,H J - J . J 0 1 J - J -  *Z">.89j199jK9f[11+5+J+J (")!(AJ$;$;;~jYZmNcNc?d!( %$!8!88j555!z?X?X:X $ *333%44g? s !$q'#a&/CKKCMmmCOB !z: s+ R$T /T3T $ T-AS;;Tc yNTr3rs r+__bool__zEnumType.__bool__s  r.rL)modulerVrRstartrc  |jr!|tur||f|z}|j||S|tur|t|d|j ||turdn||||||S)NzM has no members; specify `names=()` if you meant to create a new, empty, enum) class_namenamesrOrVrRrPr)rrr2rd_create_) rr(rSrOrVrRrPrvaluess r+__call__zEnumType.__call__s 4   J&/;;sE* * J 4<ehi || #z1du!! r.cZ t||ry||jvxs||jvSrL)rQrrrr(s r+ __contains__zEnumType.__contains__s7 eS !...R%3;R;R2RRr.cv||jvrt|jd|dt||y)Nz cannot delete member rP)rrr0r __delattr__)rrrs r+r[zEnumType.__delattr__s5 3## # #,,PT!UV V D!r.cxtgd|jz}|jtjur|j d|j tj ur|j d|jtur t|Sttt|j|zS)N) rrY__doc__ __getitem____iter____len__ __members__r1r0r2r2__init_subclass__) rrrrr2addrbrr:dir)r interestings r+__dir__zEnumType.__dir__s $$ %    6>> 1 OOI &  (@(@ @ OO/ 0    &+& &#c#"3"345 CD Dr.c" |j|Sr&r)rrHs r+r^zEnumType.__getitem__*s %%r.c0 fdjDS)Nc3<K|]}j|ywr&rhrrHrs r+rz$EnumType.__iter__..4sF3E4  &3ErrMs`r+r_zEnumType.__iter__0s G33E3EFFr.c. t|jSr&)rFrrMs r+r`zEnumType.__len__6s 3%%&&r.c. t|jSr&)rrrMs r+razEnumType.__members__<s   0 011r.cjtt|trd|jzSd|jzS)Nz z )r rr0rMs r+rzEnumType.__repr__Fs/   3 5- -- -r.cB fdtjDS)Nc3<K|]}j|ywr&rhrks r+rz(EnumType.__reversed__..PsP3O4  &3Orl)reversedrrMs`r+ __reversed__zEnumType.__reversed__Ls! Q8C 003 > #I .&,Il #  (0In %w E9xXX"  ]]1-77 CF& H=  s6E"" F,,"FF,F&#F,%F&&F,+F,)r as_globalct tj|j}|r |j}n|}|jDcgc]\}}||r||f} }} | j d| D cic] } | d| d } } || d<t tf| } t||xst| }|r t|n@tj|jjj|j|||<|Scc}}w#t $r| j dYwxYwcc} w)Nc|d|dfSNrLrr3rs r+z$EnumType._convert_..s!ad|r.rc |dSNrr3rs r+rz$EnumType._convert_..sqtr.rrLr1)etyper)rzmodulesrrsortrdrRr _simple_enumrrr1r ra) rrHrOfiltersourcerrmodule_globalsr(r rbodytmp_clss r+ _convert_zEnumType._convert_s4 V,55 __F#F $*<<>!#1KD%$<u #1 ! - LL3L 4%,,Gq!ad G,#\tfZ.@lx/?4@I    KK ' 0 0 7 7 H"t '! - LL^L , --sD D4D5D21D2c|D]A}|jD]0}t|ts|js!t d|d|Cy)Nrz> cannot extend )rrQrrrdmclsrRrchainrs r+rz%EnumType._check_for_existing_members_sCE dH-$2E2E#)41&r.c |s ttfS|d}t|ts t d|j ||xst}||fS)NrKzZnew enumerations should be created as `EnumName([mixin_type, ...] [data_type,] enum_type)`)rr rQrrd_find_data_type_)rrRrrrs r+rzEnumType._get_mixins_sb 4< 2Y *h/KL L++J>H& J&&r.cF|D]}|jD]}|tur t|tr|jccSd|j vs;d|j vr1d|j vr#|j dj r tccS|j dccSy)Nr__dataclass_fields____dataclass_params__)rrrQrr%rr"_dataclass_reprrs r+r5zEnumType._find_data_repr_sE 6>h/,,,4==03dmmC 6$-- G $ .D E J J..#}}Z88!&$r.ct}t}|D]}d}|jD]}|j||turt |t r0|j tus@|j|j nd|jvsd|jvr|j|xs||xs|}t|dkDrtd|d||r|jSy)Nr2rrLztoo many data types for : ) rrrcrrQrrrrFrdr3)rrRr data_types base_chainr candidaters r+rzEnumType._find_data_type_sU U EI t$6>h/))7"t'9'9:$--/3IT]]3ZNN9#45 ) 1TI& z?Q  JWX X >># #r.cb |jdd}|duxr|du}|cdD]N}||fD]A}t||d}|ddjtjtjhvs?|}n|Nntj}|"|tjtjfvrd} nd} ||| fS)Nr2)r9r2FT)rrSr2rr ) rr;rrr2r?rCpossibletargetr@s r+r4zEnumType._find_new_ s -- 40T)AgT.A ?8!,j 9H$Xvt>,J!JHH(**r.r&)r0r1r2 classmethodrr2rNrrVrYr[rfr^r_r`rzrrarrtrvrTrrrr5rr4rrs@r+rrs   =A%~@ $..tdY]efqu.` S"E$& G '  ^^22. Q )48$TYZei6Yp$dV[$L''$*4*+*+r.rceZdZ edZdZdZedZedZ dZ dZ dZ d Z d Zd Zd Zd ZedZedZy)r c|jryy)Nz (*values)z\(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)rmrMs r+ __signature__zEnum.__signature__bs   qr.ct||ur|S |j|S#t$rYnBt$r7|jj D]}|j |k(s|ccYSYnwxYw|jstd|z d}|j|}n#t$r}|}d}Yd}~nd}~wwxYw t||r|d}d}St8t|tr(|jturt|tr|d}d}St|d|j }||||td|j"d|d}t|ts||_|#d}d}wxYw)Nz%r has no members defined is not a valid z error in z._missing_: returned z" instead of None or a valid member)rRrrrdrrUrrrrQr rr&rrrmr2r0r6)rr(rrresultrAve_excs r+r2z Enum.__new__isx ;# L "))%0 0   "**113>>U*!M4 "7#=> > C]]5)F CF  &#&(CF'$C)>%/Jvs4KCF$eSEUEU$VW>ck L[#"||V5C"#z2&,CO CFsQ A*4A* A*&A*)A*B B3%B..B37 E 9EAEE$cyr&r3)r*rrs r+r,z Enum.__init__s r.c |s|S |d}|j||dk(r|dzSt#t$rIddl}|jdtdt |D]} |dzccYS#t$rYwxYw|cYSwxYw)NrKrLrzIn 3.13 the default `auto()`/`_generate_next_value_` will require all values to be sortable and support adding +1 and the value returned will be the largest value in the enum incremented by 1rwr)rrdrrrrs)rHrPrrlastrrs r+rzEnum._generate_next_value_s L r?D    {2&ax    MMd&   k*q5L + L s7!//3B#A,'B, A85B7A88BBcyr&r3rXs r+rzEnum._missing_sr.c|jjxst}d|jjd|jd||j dS)N)rr%r"r0rr)r*v_reprs r+rz Enum.__repr__s:,,4 $ 7 7fT\\FZ[[r.cL|jjd|jS)NrP)rr0rrs r+r)z Enum.__str__s..114;;AAr.c t}|jjturttj |}t |dgD]+}|ddk7s ||j vs|j|-|jjD]}|jjD]|\}}|ddk(rt|tr>|j||j vr|j|K|j|]||j vsl|j|~ttgd|z}|S)NrrrC)rr]__eq____hash__r1)rrrrrfrSrrcr rrrQrrdiscardr:)r*rerHrr<rSs r+rfz Enum.__dir__s) e >> ' 'v 5fnnT23KD*b1DAw#~$d.?.?"?%2>>%%'C \\//1 c7c>c8,xx+t4;L;L/L#-$++D1!2!22OOD)2(PQ r.c@tjt||Sr&)rr()r* format_specs r+r(zEnum.__format__s~~c$i55r.c,t|jSr&)hashrrs r+rz Enum.__hash__sDKK  r.c4|j|jffSr&)rrres r+rhzEnum.__reduce_ex__s~~ ///r.c|Sr&r3)r*memos r+ __deepcopy__zEnum.__deepcopy__ r.c|Sr&r3rs r+__copy__z Enum.__copy__rr.c |jSr&)rrs r+rHz Enum.names*{{r.c |jSr&)rrs r+r(z Enum.value s+||r.N)r0r1r2rrr2r,rrrrr)rfr(rrhrrrrHr(r3r.r+r r :s%Nrr 6p !!F\B:6!0r.r ) metaclassc eZdZy)rNr0r1r2r3r.r+rrr.rc eZdZy)r Nrr3r.r+r r rr.r c$eZdZ dZedZy)r c t|dkDrtd|t|dk(r$t|dtst|ddt|dk\r$t|dtstd|dt|dk(r$t|dtstd|dzt|}tj ||}||_|S) Nrwztoo many arguments for str(): rLrz is not a stringr@zencoding must be a string, not zerrors must be a string, not %r)rFrdrQrr2r)rrUr(rs r+r2zStrEnum.__new__#s. v;?&KL L v;! fQi-q DEE v;! fQi-vay STT v;! fQi- AVAY OPPV S%( r.c$ |jSr&)lower)rHrPrrs r+rzStrEnum._generate_next_value_8s zz|r.N)r0r1r2r2rrr3r.r+r r s *r.r c|jSr&rGres r+r"r"@s 99r.c>t|j|jffSr&)rSrrres r+r#r#Es T^^T[[1 11r.cFeZdZ eZeZeZeZy)rN)r0r1r2rrrrrr3r.r+rrIs%VFfG FE 6Dr.rceZdZ eZedZedZeZ edZ edZ dZ dZ dZdZd Zd Zd Zd Zd ZdZdZeZeZeZy)r c |s||SdSt|} t|}d|dzzS#t$rtd|zdwxYw)NrLzinvalid flag value %rr@)max _high_bitrrd)rHrPrr last_valuehigh_bits r+rzFlag._generate_next_value__sm !-5 41 4%  L ,HXaZ   L3j@At K Ls )Ac#K t||jzD]}|jj|!ywr&)rprrr)rr(vals r+rzFlag._iter_member_by_value_rs< "%#//"9:C((,,S1 1;s=?c#\K t|j|dEd{y7w)Nc|jSr&)r)rHs r+rz+Flag._iter_member_by_def_..sannr.r)r:rrXs r+rzFlag._iter_member_by_def_|s0 **51,  s ",*,c  t|tst|d|j|j}|j }|j }d}||cxkr|kr nn|||z zr|jturRt|j|j}t|d|dt||dt|||jtur||z}ni|jtur|S|jtur)|dkr>t|dzd|jz|z}nt|d|j|dkr |}|dz|z}||z}||z}||z} |r<|jtur*t|jd |d |d t|d |j t"urt"j%|} n|j j%||} t'| d s|| _| s|r=g} d} |j+| D]"} | j-| | | j(z} $|rv| |z}|j.j1D]T\}}|| vs |j(s|j(|z|j(k(s5| j-|| |j(z} V|| z }dj3| D cgc]} | j4c} | _| sd| _nU|r"|jturt|d||r/| xj4d|j7|zz c_nd| _|j8j;|| } || |j8|<| Scc} w)Nrz invalid value z given z allowed rrLr@z unknown flag boundary (z) --> unknown values z []r|z: no members with value z|%s)rQrrmr2rrrr&rrryr{rrrr0rrr2r;rrrrrrrrrr)rr( flag_mask singles_maskall_bits neg_valuer}unknownaliasesr pseudo_memberr combined_valuerHr#pms r+rzFlag._missing_sc %%.3S5E5EF OO )) >> I2(2Hy01~~'u//193G3G3IJ E8(V7* )5( 4'19 A0@0@0B,CD#$ !9>**,,4 ;; !)6$,,+?@ @ %-dkk6$,,;OP Pr.c|jj}|j|d|jdS|d|jS)Nr)rP)rr0rrr*rUs r+r)z Flag.__str__s9>>** ;; '6 6& 4 4r.c,t|jSr&)boolrrs r+rNz Flag.__bool__sDLL!!r.ct||jr |jS|jturt||jr|St Sr&)rQrrrrNotImplemented)r*flags r+ _get_valuezFlag._get_valuesB dDNN +<<    v -*T4CUCU2VKr.c|j|}|turtS||fD]"}|j|td|d|j}|j ||zS)N'z,' cannot be combined with other flags with |rrrdrrr*r other_valuerr(s r+r+z Flag.__or__oooe, . (! !%KDt$,!D6)U VWW  ~~ek122r.c|j|}|turtS||fD]"}|j|td|d|j}|j ||zS)Nrz,' cannot be combined with other flags with &rrs r+r,z Flag.__and__rr.c|j|}|turtS||fD]"}|j|td|d|j}|j ||z S)Nrz,' cannot be combined with other flags with ^rrs r+r-z Flag.__xor__%rr.cX|j|td|d|js|jtt fvr-|j |j|_|jS|j |j|jz|_|jS)Nrz' cannot be inverted) rrdr'r&rrrrrrs r+r1zFlag.__invert__0s ??4 (av%9:; ; ?? "5$-/"&..$,,"?#'..1D1D }1T"Ur.N)r0r1r2r"rrrrrrrrrYr_r`rr)rNrr+r,r-r1r/r.r0r3r.r+r r XsN!!$22+MZZx=4 (Q5" 3 3 3 HGHr.r ryc eZdZy)r Nrr3r.r+r r @rr.r c* |jdz S)NrL)ryr's r+rrFs     !!r.c . g}|jjD]2\}}||jk7s|j||jf4|r:dj |Dcgc] \}}|d|c}}}t d|d||Scc}}w)N,  -> zduplicate values found in r)rarrHrrrm) enumeration duplicatesrHralias alias_detailss r+rrLsJ#//557 f 6;;    tV[[1 28 AKL ud+LN m-. . Ms%B cpjdjfdjDS)Nr c3^K|]$}|jr|dt|&yw)=N)r"rS)rkdcfr*s r+rz"_dataclass_repr..]s01v{{'$* +s*-)rrr )r*rs`@r+rr[s2  # #C 99XXZ r.cv |jjjdd}|d|jS)NrPrK)rr1rr)r*rOs r+rrcs7 ^^ & & , ,S 1" 5Fdkk **r.c |jjjdd}|jj}|j|d|d|j dSt |j r|d|jS|jtjur=dj|jjdDcgc] }|d| c}Sg}|jjdD]=}|djr|j|(|j|d|?dj|Scc}w)NrPrKrrrr)rr1rr0rrrar&rrrrHisdigitr)r*rOrUrHr#s r+rrls ^^ & & , ,S 1" 5F~~&&H {{$h ==dll# $++.. l///xxdiiooc>RS>RdFD1>RSTT""3'At||~ A vq12 ( xx~Ts Ec |j(|jj}|d|jdS|jS)Nrr)rrr0rrs r+rrs; {{>>**#T\\22{{r.c t|tr t|_n t|_t|t r|r t |_tj|jjj|j|Sr&)rr rrrrrr)rzrr1rr ra)r update_strs r+rrs^ #t' ' c8 $   KK((//@ Jr.)rr@c fd}|S)Nc |j} j|jjd}| |j}nj j }i}i}|||d<||d<|d<jx|d<}gx|d<}ix|d<}ix|d<} g|d <j x|d <} j|d <ttrxs j|d <d|d <d|d<d|d<d|d<tj|d<tj|d<tj|d<tj|d<tj |d<tj"|d<tj$|d<|jj'D]B\} } | dvr t)| s"t+|| st-| s t/| r| || <>| || <D|jjdd|d<t1|f|d} dD]O} | |vst3| }t3| | }t3t4| }t3| | }|||fvsCt7| | |Qg}t| trdx}}|j'D]U\} }t9|t:r*t:j<t>ur|| dtA||}|| vr;| |}tC}||_"|jG| | t7| | |||| <r"t9|tHs|f}|| g|}|d}n|| }|||_%| |_&| |_'|jQ|tC}||_"|jG| | t7| | |||| <tA||_)|| |<tU|r|jW| ||z}n||z}|jW|X||z| _,|| _-d ||zj]zdz | _/| Dcgc]}|jJ}}|ta|k7rs| jb| _2n`|j'D]L\} }t9|t:r7|j<t>ur|| dtA|||_|j<}|| vr;| |}tC}||_"|jG| | t7| | |||| <r"t9|tHs|f}|| g|}|d}n|| }|||_%| |_&| |_'|jQ|tA||_)tC}||_"|jG| | t7| | |||| <|| |<|jW| |jW|Od|vr| j | _3thj | _| Scc}w)!Nr2r9rrrrrrrrr%r&rrrr'r+r-r,r.r0r/r1)r __weakref__r]zAn enumeration.Trr*rrLr@)5r0rrrrrr2rr%rr r&r+r-r,r.r0r/r1rrIr^rMr=rRrSrrjrQrr(rrFrrrrrrrr,rrarrrryrr:rrr9r )rrUr2 new_memberattrsrgnvr=rwvalue2member_maprrHr<rrDrErFrGgnv_last_values single_bits multi_bitsr(rrrHrIrrr@s r+ convert_classz#_simple_enum..convert_classs <<  ''H,,""9-   ))J,,44J  %/D! ")^%\.3.I.II $%022 ,..^z8:: !"%5&( "#.3.A.AA_ $11^ eT "!)!=U-=-=D "&D !%D %)D! "!%D ![[DN"llDO"llDO"llDO#}}D #}}D !%D ++-ID#22$;x#>*TBRVdehVi T !d . <<  I & ./DO (UIthPTU JD4%eT2 &z48 ' 5 #*;#= $4m#DDJk:K j$ ''( (K*${{} eeT*tzzZ/Ga\):OLE,,-e4F'zH&,HO))*d;Jh7'-Jt$ )%7%*IE!+J!?!? %a!+J!7).$(FM*4F'OOE*'zH&,HO))*d;Jh7'-Jt$*-l*;F'.4$U+%e,$++D1#u, "e+ #**51M -N&1:%=J "(3J %$%;z+A*M*M*O$PST$TJ !.89j199jK9f[11+5+J+J ( %{{} eeT*{{j0&)$3|3Do&V !KKE,,-e4F'zH&,HO))*d;Jh7'-Jt$ )%7%*IE!+J!?!? %a!+J!7).$(FM*4F'OOE**-l*;F''zH&,HO))*d;Jh7'-Jt$.4$U+ ''-#**51G -H  (2(:(:J %!\\ Y:sWr3)rrr@r$s``` r+rrsWp r.ceZdZ dZdZdZy)rzno skipped integer valuesz0multi-flag aliases may not contain unnamed flagszone name per valueN)r0r1r2rr r!r3r.r+rrFs-JDK !Fr.rceZdZ dZdZy)rc||_yr&)checks)r*r(s r+r,zverify.__init__Us  r.c <|j}|j}tt|trd}nt|trd}n t d|D]}|t urg}|jjD]2\}}||jk7s|j||jf4|s`dj|D cgc] \} }| d|c}} } td|d| |turtd|D} t| d krt!| t#| } } g}|dk(rCt%t'| d zt'| D]}d |z| vs |jd |z n>|dk(r+t%| d z| D]}|| vs|j|nt)d |z|setd |d |ddjd|Ddd|t*us|j,}|Dcgc]}|j.}}g}d}|j0jD]s\}} ||vr | j.dkrt3t5| j.} | Dcgc] }||vs| }}|sP|j||t7t8|z}u|sYt|d k(r d|dz} nddj|ddd|dd} t;|rd|z}nd|z}td|d| d |d|Scc}} wcc}wcc}w)Nrrz4the 'verify' decorator only works with Enum and Flagr r zaliases found in rc34K|]}|jywr&r')rrAs r+rz"verify.__call__..ms:kQWWksr@rLzverify: unknown type %rzinvalid rxz: missing values c32K|]}t|ywr&)r)rrHs r+rz"verify.__call__..s;TGqCFGr$rzalias %s is missingzaliases rKrz are missingz value 0x%xzcombined values of 0x%xz invalid Flag z/ [use enum.show_flag_values(value) for details])r(r0r rr rdr!rarrHrrrmrrrFminrrangerrr rr(rrrrpr_or_ra)r*r r(rU enum_typecheckr rHrr rrUlowhighmissingrr=rH member_values missing_names missing_valuermissedr(s r+rVzverify.__call__Ws6''   ; =I  T *IRS SE $/$;$;$A$A$CLD&v{{*"))4*=>%D$(IIMWXZMUD5$7ZX%ZM$(-&9::*$:k::v;?KVT&"9S>!#3Yt_Ea4v-#NN1a40F&("3q5$/F?#NN1-0$$= $IJJ$%x;TG;T1U'W"s&$%%+%*99 2= >+Q+ > " ! #.#;#;#A#A#CKD%|+ {{Q !."=>F)/JA1M3IaFJ%,,T2%f)== $D!=)Q. 5 a8H H/!% -*< =}R?P!"&m4 ,} < 9M I$'7AHwY:!?KsL >L. L8LN)r0r1r2r,rVr3r.r+rrQsMr.rc ^ g}|j|jk7rq|j}t|j}|j}t|j}tt|jjt|jjz}t||zD]}|dvr ||vr||vr|j d|'||vr|j d|@||} ||} t | st| tjrp|dk(rj| jddjdd} | jddjdd} | | k7s|j |dd | d d | | | k7s|j |dd | d d | |j|D]/} g}| |vr|j d | zn| |vr|j d | zn|| j}t|j}|| j}t|j}t||zD]n}|dvr||vr|j d|d| $||vr|j d|d| @||} ||} | | k7sP|j |dd| d d| p|s |j | ddj|2dD]x}||vr||vr ||vri||vret||d}t||d}t|dr|j}|j}||k7sX|j |dd |ddd|yz|rt!ddj|zy)N)r1rrr]z missing key: z extra key: r]rxrO z : z checked -> z z simple -> z#missing member from simple enum: %rzextra member in simple enum: %r)r1rr'z missing key z not in the simple enum member z extra key z in simple enum member zchecked member -> zsimple member -> z member mismatch: z )r)rrhr(__getnewargs_ex____getnewargs__rh __reduce__rz: 30z simple -> zenum mismatch: %sz )rrrr rrrcallablerQrzrr|rrrSr;rrd) checked_enum simple_enumfailed checked_dict checked_keys simple_dict simple_keysr=r checked_value simple_valuecompressed_checked_valuecompressed_simple_valuerH failed_memberchecked_member_dictchecked_member_keyssimple_member_dictsimple_member_keysrCchecked_method simple_methods r+_test_simple_enumrRs$F 4 44#,, L--/0 !** ;++-. \..3356{//44678 |k12CUU $K' 39:L( 39: ,S 1 *3/ M*j.W)#/#73@   DM;& CdJK\) ?$FG&24&8&A&A#&*+>+C+C+E&F#%0%6%?%?"%)*<*A*A*C%D"25GGHCJJ $66%,,begk-lm$77%,,X[]a-bc(;C(@ '9#'> (L8)00$'>K$N>J$M2&'I" joom<;!@F$<)?{*v\/I!(vt!D ' VT B >:6%3%<%#/0/',,v2FFGGr.c\ tj|j}|r |j}n|}|jDcgc]\}}||r||f}}} |j d||||xst } | Scc}}w#t $r|j dY:wxYw)Nc|d|dfSrr3rs r+rz_old_convert_..6sAaD!A$.9s1Q4r.)rOr)rzrrrrrdr) rrHrOrrrrr(r rs r+ _old_convert_rVs[[(11N  &||~- ed|5M- ) / 0 gfx7G4 HC J )  ()sBB B+*B+r&)F)Drzbuiltinsrztypesrroperatorrr/ functoolsr__all__r r r _stdlib_enumsrrrrr=rIrMrYr^rarkrprsr{rrrrrrrirrRrrrr rr r"_reduce_ex_by_global_namer#rrrrr rrrrrrrrrrr r!rrRrVr3r.r+r^s 9  2655t5e5mhV  A  0 '$0 \ \ ''6+$6+r99DAAHz+tz+v UXUpt c8 c8D22 7  ,e4&ePc8TD " +. hhTg"""#, KSSjwHr<') r.