kf-ddlZddlmZmZmZmZmZmZmZddl m Z m Z ddl m Z dZdZdZdZd Zd Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(d Z)d!Z*d"Z+d#Z,d$Z-dS)%N) ensure_listequal extras_msgfind_additional_properties types_msgunbooluniq) FormatErrorValidationError) iteritemsc#K||dsdSt|D]O\}}t|D]:\}}tj||r |||||D]}|V;PdSNobjectpath schema_path)is_typer researchdescend) validatorpatternPropertiesinstanceschemapattern subschemakverrors v/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/jsonschema/_validators.pyrrs   Xx 0 0'(9::  h''  DAqy!$$ &..yqg/  E KKKK    c#K||dsdS|D] }|||D]}|V!dS)Nr)rr)rr)r propertyNamesrrpropertyrs r r#r#sx   Xx 0 0&& '    EKKKK  r!c #K||dsdStt||}||dr,|D]'}|||||D]}|V(dS|s|rd|vrt |d}t |dkrd}nd}dttt |d|d dtt|}t|VdSd }t|t|zVdSdSdS) Nrrrdoesdo,  z not match any of the regexes: z8Additional properties are not allowed (%s %s unexpected)) rsetrrsortedlenjoinmapreprr r) raPrrextrasextrarpatternsverbs r additionalPropertiesr7)s   Xx 0 0 +Hf== > >FX&&>  E"**8E?BU*KK      >F> & ( (f%89::H6{{a #dF6NN334444 #dH--...E "%(( ( ( ( ( (NE!%*V*<*<"<== = = = = =>>>>r!c#^K||dsdS||drHtt||D](\\}}}|||||D]}|V)dSt|D]$\}}||||D]}|V%dS)Narrayrr&)rzip enumerater)ritemsrrindexitemrrs r r<r<Es    Xw / /(( (+Ih,?,?(G(G   $MUD9"**ie+       %X..  KE4"**4U*CC      r!c #K||dr*||didrdSt|dg}||dr@t||d|D]$\}}||||D]}|V%dS|st|t|dgkrPd}t |t |t|dgdzVdSdSdS)Nr9r<r)startr&z3Additional items are not allowed (%s %s unexpected))rgetr.r;rr r)raIrr len_itemsr=r>rs r additionalItemsrDUs   h 0 0&**Wb118<< FJJw++,,IX&&  $Xijj%9KKK  KE4"**4%*@@       CMMC 7B(?(?$@$@@@E  xFJJw$;$; < < = => ? ? @         @@r!c#VKt||st|dVdSdS)Nz was expected)rr )rconstrrs r rFrFisC 5 ! !<555:;;;;;;;<zcontains..rs3MMy!!'844MMMMMMr!zNone of z! are valid under the given schema)ranyr )rrNrrs`` r rNrNns   Xw / / MMMMMHMMM M M o=EXX G         r!c#vK||dsdS||krt|d|VdSdS)Nnumberz) is less than or equal to the minimum of rr rminimumrrs r exclusiveMinimumrVxl   Xx 0 07''        r!c#vK||dsdS||krt|d|VdSdS)NrRz, is greater than or equal to the maximum of rSrmaximumrrs r exclusiveMaximumr[rWr!c#vK||dsdS||krt|d|VdSdS)NrRz is less than the minimum of rSrTs r rUrUsj   Xx 0 0'3;88WW E       r!c#vK||dsdS||krt|d|VdSdS)NrRz is greater than the maximum of rSrYs r rZrZsj   Xx 0 0'6>hh H       r!c#K||dsdSt|tr||z }t||k}n||z}|rt |d|VdSdS)NrRz is not a multiple of )r isinstancefloatintr )rdBrrquotientfaileds r multipleOfres   Xx 0 0"eb=X(*B MhhhKLLLLLLLMMr!c#K||dr)t||krt|dVdSdSdS)Nr9 is too shortrr.r rmIrrs r minItemsrks_7++?H 0B0B888=>>>>>>>??0B0Br!c#K||dr)t||krt|dVdSdSdS)Nr9 is too longrhris r maxItemsrns_7++>H 0B0B(((<=======>>0B0Br!c#K|r;||dr't|st|dVdSdSdSdS)Nr9z has non-unique elements)rr r )ruIrrs r uniqueItemsrqs J(G,,J NNJ hhhHIIIIIII JJJJJJr!c#K||dr-tj||st|d|VdSdSdS)Nstringz does not match )rrrr )rpatrnrrs r rrss(H--J IeX & &J%%HIIIIIII JJJJr!c#K|jS |j||dS#t$r(}t|j|jVYd}~dSd}~wwxYwdS)N)cause)format_checkercheckr r messagerv)rformatrrrs r rzrzs+ D  $ * *8V < < < < < D D D!%-u{CCC C C C C C C C C C D,+s( AAAc#K||dr)t||krt|dVdSdSdS)NrsrgrhrmLrrs r minLengthr~s_8,,?X1C1C888=>>>>>>>??1C1Cr!c#K||dr)t||krt|dVdSdSdS)Nrsrmrhr|s r maxLengthrs_8,,>X1C1C(((<=======>>1C1Cr!c#K||dsdSt|D]a\}}||vr ||dr"|D]}||vrd}t|||fzVB||||D]}|VbdS)Nrr9z%r is a dependency of %rr)rr r r) r dependenciesrrr$ dependencyeachryrs r rrs   Xx 0 0 ), 7 7  * 8 # #    Z 1 1 " F Fx''8G)'T84D*DEEEEE F #***(+      r!c#K|dks|dkrDt|tfd|Drt|d|VdSdS||vrt|d|VdSdS)Nrr'c3>K|]}t|kVdSrI)r)rLrunbooleds r rOzenum..s.::Dx6$<<'::::::r!z is not one of )rallr )renumsrrrs @r enumrs1}}A (## ::::E::: : : M!888UU"KLL L L L L L M M   xxxGHHHHHHH  r!c#Kt|jdd}|S|j|5}|||D]}|V ddddS#1swxYwYdS|j|\}}|j| |||D]}|V |jdS#|jwxYw)Nresolve)getattrresolver resolvingrr push_scope pop_scope)rrefrrrresolvedrscopes r rrsei()T::G   ) )# . . ("**8X>>                      $,44S99x%%e,,, +"**8X>>       ( ( * * * * *I  ( ( * * * *sA!!A%(A%&CC:c#Kt|}tfd|Ds!tt|VdSdS)Nc3DK|]}|VdSrI)r)rLtyperrs r rOztype..s3CCTy  400CCCCCCr!)rrPr r)rtypesrrs` ` r rr sk   E CCCCCUCCC C C:i%889999999::r!c#K||dsdSt|D]/\}}||vr&||||||D]}|V0dSr)rr r)r propertiesrrr$rrs r rrs   Xx 0 0(44) x  "**"$ +    r!c#tK||dsdS|D]}||vrtd|zVdS)Nrz%r is a required propertyrS)rrequiredrrr$s r rr#sf   Xx 0 0JJ 8 # #!"="HII I I IJJr!c#K||dr)t||krt|dVdSdSdS)Nrz does not have enough propertiesrhrmPrrs r minPropertiesr+sn8,, X1C1C4         1C1Cr!c#K||dsdS||dr)t||krt|dVdSdSdS)Nrz has too many propertiesrhrs r maxPropertiesr2s   Xx 0 08,,JX1C1ChhhHIIIIIIIJJ1C1Cr!c#rKt|D]$\}}||||D]}|V%dS)Nr)r;r)rallOfrrr=rrs r rr9s`%e,,y&&x&NN  EKKKK r!c#Kg}t|D]D\}}t||||}|sdS||Et |d|VdS)Nr, is not valid under any of the given schemascontext)r;listrextendr )ranyOfrr all_errorsr=rerrss r rr?sJ%e,,   yI%%h u%MMNN  EE$@H J        r!c#Kt|}g}|D]E\}}t||}|s|} n,||Ft d|Vfd|D} | rL| | dd| D} t d| VdSdS)NrrrcFg|]\}}||SrJ)rLisrrs r zoneOf..\s2NNN1i.@.@1.M.MN!NNNr!r*c34K|]}t|VdSrI)r1)rLrs r rOzoneOf.._s(@@6$v,,@@@@@@r!z is valid under each of )r;rrrr appendr/) roneOfrr subschemasrr=rr first_valid more_validreprss ` ` r rrMs@5!!JJ&   yI%%h u%MMNN #K E$@H J      ONNNN NNNJ +&&& @@Z@@@@@.6hh >         r!c#fK|||rt|d|VdSdS)Nz is not allowed for )rKr )r not_schemarrs r not_res\(J// *4**hh ?         r!c#K|||r/d|vr'|d}|||dD]}|VdSdSd|vr'|d}|||dD]}|VdSdS)Nthenrelse)rKr)r if_schemarrrrelse_s r if_rls(I.. f  '?D"**8Tv*NN        F  w&&xF&KK  EKKKK    r!).rjsonschema._utilsrrrrrrr jsonschema.exceptionsr r jsonschema.compatr rr#r7r<rDrFrNrVr[rUrZrerkrnrqrrzr~rrrrrrrrrrrrrrrr!r rs ?>>>>>>>''''''       >>>8       (<<<                   M M M??? >>> JJJJJJDDD??? >>> (III+++":::   JJJ   JJJ       0        r!