+
    Tj                     f    ^ RI t ^ RIHt ^ RIHtHt  ! R R]4      t ! R R]4      tR tR
R	 lt	R# )    N)StrEnum)SimpleLazyObjectemptyc                   F    ] tR t^tRtRtRtRtRtRt	Rt
RtR	tR
tRtRtRtR# )CSPa  
Content Security Policy constants for directive values and special tokens.

These constants represent:
1. Standard quoted string values from the CSP spec (e.g., 'self',
   'unsafe-inline')
2. Special placeholder tokens (NONCE) that get replaced by the middleware

Using this enum instead of raw strings provides better type checking,
autocompletion, and protection against common mistakes like:

- Typos (e.g., 'noone' instead of 'none')
- Missing quotes (e.g., ["self"] instead of ["'self'"])
- Inconsistent quote styles (e.g., ["'self'", ""unsafe-inline""])

Example usage in Django settings:

    SECURE_CSP = {
        "default-src": [CSP.NONE],
        "script-src": [CSP.SELF, CSP.NONCE],
    }

zContent-Security-Policyz#Content-Security-Policy-Report-Onlyz'none'z'report-sample'z'self'z'strict-dynamic'z'unsafe-eval'z'unsafe-hashes'z'unsafe-inline'z'wasm-unsafe-eval'z<CSP_NONCE_SENTINEL> N)__name__
__module____qualname____firstlineno____doc__HEADER_ENFORCEHEADER_REPORT_ONLYNONEREPORT_SAMPLESELFSTRICT_DYNAMICUNSAFE_EVALUNSAFE_HASHESUNSAFE_INLINEWASM_UNSAFE_EVALNONCE__static_attributes__r       E/var/www/idalgo/venv/lib/python3.14/site-packages/django/utils/csp.pyr   r      sF    2 /N> D%MD'N!K%M%M+
 #Er   r   c                   <   a a ] tR t^4t oRtV 3R ltR tRtVtV ;t	# )	LazyNonceaK  
Lazily generates a cryptographically secure nonce string, for use in CSP
headers.

The nonce is only generated when first accessed (e.g., via string
interpolation or inside a template).

The nonce will evaluate as `True` if it has been generated, and `False` if
it has not. This is useful for third-party Django libraries that want to
support CSP without requiring it.

Example Django template usage with context processors enabled:

    <script{% if csp_nonce %} nonce="{{ csp_nonce }}"...{% endif %}>

The `{% if %}` block will only render if the nonce has been evaluated
elsewhere.

c                .   < \         SV `  \        4       R # N)super__init__generate_nonce)self	__class__s   &r   r!   LazyNonce.__init__I   s    (r   c                &    V P                   \        J# r   )_wrappedr   )r#   s   &r   __bool__LazyNonce.__bool__L   s    }}E))r   r   )
r	   r
   r   r   r   r!   r(   r   __classdictcell____classcell__)r$   __classdict__s   @@r   r   r   4   s     ()* *r   r   c                  .    \         P                  ! ^4      # )   )secretstoken_urlsafer   r   r   r"   r"   P   s      $$r   c                    . pV P                  4        EF  w  r4VR9   d   K  VRJ d   RpM\        V\        4      '       d   \        V4      pM$\        V\        \
        ,          4      '       g   V.p\        P                  V9   ;p'       d5   V'       d-   V Uu. uF  qw\        P                  8X  d   RV R2MTNK!  	  ppM/V'       d(   V Uu. uF  qw\        P                  8w  g   K  VNK  	  ppV'       g   K  RP                  V4      pVP                  V RV 2P                  4       4       EK  	  RP                  V4      # u upi u upi )NT z'nonce-' z; )NF)items
isinstancesetsortedlisttupler   r   joinappendrstrip)confignoncepolicy	directivevaluesrendered_valuehas_sentinelvs   &&      r   build_policyrF   T   s   F#\\^	]"T>N&#&&  u55  !$		V 333OUVv!SYYGE7!,AEvV%+>VCII~!!V> XXf-N1^$45<<>?5 ,8 99V W>s   %EE	'E	r   )
r/   enumr   django.utils.functionalr   r   r   r   r"   rF   r   r   r   <module>rI      s2      ;*#' *#Z*  *8%r   