o
    -Œ?ic  ã                   @  s†   d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZmZ d dlmZ ee d	¡ƒZddd„Zddd„ZdS )é    )ÚannotationsN)ÚSequence)ÚAny)Úurlsplit)Úsettings)ÚCheckMessageÚError)ÚconfÚ Úkwargsr   Úreturnúlist[CheckMessage]c            	      K  st  g }t tjtƒs| tddd�¡ t tjtƒs | tddd�¡ ttjt	ƒs/| tddd�¡ ttj
t	ƒs>| tdd	d�¡ ttjtƒrItjd
k rR| tddd�¡ ttjt	ƒsnttdƒr`d}nd}| t|› d�dd�¡ ttdƒrvd}nd}t tjtƒs‹| t|› d�dd�¡ nOd}tjD ]I}||v r—q�t|ƒ}|jdks¥|jdkr¹| tdt|ƒ› d|› d�ddd�¡ q�dD ]}t||ƒdkrØ| tdt|ƒ› d|› d|› �dd�¡ q»q�ttd ƒrâd }nd!}t tjttfƒsø| t|› d"�d#d�¡ t tjtƒ�s| td$d%d�¡ ttjttfƒ�s| td&d'd�¡ ttd(ƒ�r)| td)d*d�¡ ttd+ƒ�r8| td,dd�¡ |S )-Nz3CORS_ALLOW_HEADERS should be a sequence of strings.zcorsheaders.E001)Úidz3CORS_ALLOW_METHODS should be a sequence of strings.zcorsheaders.E002z(CORS_ALLOW_CREDENTIALS should be a bool.zcorsheaders.E003z,CORS_ALLOW_PRIVATE_NETWORK should be a bool.zcorsheaders.E015r   zJCORS_PREFLIGHT_MAX_AGE should be an integer greater than or equal to zero.zcorsheaders.E004ÚCORS_ALLOW_ALL_ORIGINSÚCORS_ORIGIN_ALLOW_ALLz should be a bool.zcorsheaders.E005ÚCORS_ALLOWED_ORIGINSÚCORS_ORIGIN_WHITELISTz! should be a sequence of strings.zcorsheaders.E006)Únullzfile://r
   zOrigin z in z is missing scheme or netloczcorsheaders.E013z:Add a scheme (e.g. https://) or netloc (e.g. example.com).)r   Úhint)ÚpathÚqueryÚfragmentz should not have zcorsheaders.E014ÚCORS_ALLOWED_ORIGIN_REGEXESÚCORS_ORIGIN_REGEX_WHITELISTz9 should be a sequence of strings and/or compiled regexes.zcorsheaders.E007z)CORS_EXPOSE_HEADERS should be a sequence.zcorsheaders.E008z,CORS_URLS_REGEX should be a string or regex.zcorsheaders.E009Ú
CORS_MODELzKThe CORS_MODEL setting has been removed - see django-cors-headers' HISTORY.zcorsheaders.E012ÚCORS_REPLACE_HTTPS_REFERERz]The CORS_REPLACE_HTTPS_REFERER setting has been removed - see django-cors-headers' CHANGELOG.)Úis_sequencer	   ÚCORS_ALLOW_HEADERSÚstrÚappendr   ÚCORS_ALLOW_METHODSÚ
isinstanceÚCORS_ALLOW_CREDENTIALSÚboolÚCORS_ALLOW_PRIVATE_NETWORKÚCORS_PREFLIGHT_MAX_AGEÚintr   Úhasattrr   r   r   ÚschemeÚnetlocÚreprÚgetattrr   Úre_typeÚCORS_EXPOSE_HEADERSÚCORS_URLS_REGEX)	r   ÚerrorsÚallow_all_aliasÚallowed_origins_aliasÚspecial_origin_valuesÚoriginÚparsedÚpartÚallowed_regexes_alias© r7   úR/var/www/html/premium_crap/venv/lib/python3.10/site-packages/corsheaders/checks.pyÚcheck_settings   sÞ   þÿþÿ
ÿþÿ
ÿ
ûÿ

þÿ
þÿ
üÿþÿ€þ
	þÿ
ÿ
ÿûÿ
ûÿ
r9   ÚthingÚtype_or_typesú!type[Any] | tuple[type[Any], ...]r#   c                   s    t | tƒot‡ fdd„| D ƒƒS )Nc                 3  s   � | ]}t |ˆ ƒV  qd S )N)r!   )Ú.0Úx©r;   r7   r8   Ú	<genexpr>©   s   € 

ÿzis_sequence.<locals>.<genexpr>)r!   r   Úall)r:   r;   r7   r?   r8   r   ¨   s   ÿr   )r   r   r   r   )r:   r   r;   r<   r   r#   )Ú
__future__r   ÚreÚcollections.abcr   Útypingr   Úurllib.parser   Údjango.confr   Údjango.core.checksr   r   Úcorsheaders.confr	   ÚtypeÚcompiler,   r9   r   r7   r7   r7   r8   Ú<module>   s    
 