관리-도구
편집 파일: utils.cpython-311.pyc
� Q�Dg\$ � � � d dl Zn# e$ r d dlZY nw xY wd dlZd dlZd dlmZ d dlmZ d dl m Z d dlmZ d dl mZmZmZmZmZ d dlmZ dd lmZmZmZmZmZmZ e e� � � dedefd �� � Z e e� � � dedefd�� � Z e e� � � dedee fd�� � Z e e� � � dedefd�� � Z!dedefd�Z" e e� � � dedefd�� � Z# e e� � � dedefd�� � Z$ e e� � � dedefd�� � Z% e e� � � dedefd�� � Z& e e� � � dedefd�� � Z'dedefd�Z( e e� � � dedefd�� � Z) e e� � � dedefd�� � Z* e e� � � dedefd�� � Z+ e e� � � dedefd�� � Z, e e� � � dedefd�� � Z- e e.e� � � � � dedefd�� � Z/d8d e0d!e1dee fd"�Z2 e d#� � � d$edefd%�� � Z3d e0deee e0f fd&�Z4d'edefd(�Z5d9d*ed+edefd,�Z6d-edee fd.�Z7d/ed0ede8fd1�Z9d/ed0edefd2�Z:d3ej; d4fd$ed5e1d6eddfd7�Z<dS ):� N)�IncrementalDecoder)�aliases)� lru_cache)�findall)�List�Optional�Set�Tuple�Union)�MultibyteIncrementalDecoder� )�ENCODING_MARKS�IANA_SUPPORTED_SIMILAR�RE_POSSIBLE_ENCODING_INDICATION�UNICODE_RANGES_COMBINED�UNICODE_SECONDARY_RANGE_KEYWORD�UTF8_MAXIMAL_ALLOCATION)�maxsize� character�returnc � � t j | � � }n# t $ r Y dS w xY wd|v pd|v pd|v pd|v pd|v pd|v S )NFz WITH GRAVEz WITH ACUTEzWITH CEDILLAzWITH DIAERESISzWITH CIRCUMFLEXz WITH TILDE��unicodedata�name� ValueError�r �descriptions �x/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/charset_normalizer/utils.py�is_accentuatedr s� � ��!�&�y�1�1����� � � ��u�u����� ��#� '��;�&� '��[�(� '� �{�*� '� ��+� '� �;�&� � � � %�%c � � t j | � � }|s| S |� d� � }t t |d d� � � � S )N� r � )r � decomposition�split�chr�int)r � decomposed�codess r � remove_accentr* * sO � ��*�9�5�5�J�� ������S�!�!�E��s�5��8�R� � �!�!�!� c �f � t | � � }t j � � D ] \ }}||v r|c S �dS )zK Retrieve the Unicode range official name from a single character. N)�ordr �items)r � character_ord� range_name� ord_ranges r � unicode_ranger2 5 sO � � � �N�N�M�!8�!>�!@�!@� � �� �I��I�%�%����� &� �4r+ c �X � t j | � � }n# t $ r Y dS w xY wd|v S )NF�LATINr r s r �is_latinr5 C sF � ��!�&�y�1�1����� � � ��u�u������k�!�!r c �V � | � d� � n# t $ r Y dS w xY wdS )N�asciiFT)�encode�UnicodeEncodeError�r s r �is_asciir; L sE � ������!�!�!�!��� � � ��u�u������4s � � &�&c �d � t j | � � }d|v rdS t | � � }|�dS d|v S )N�PTF�Punctuation�r �categoryr2 �r �character_category�character_ranges r �is_punctuationrD T sG � �$�-�i�8�8�� � � � ��t�#�I�.�.�O����u��O�+�+r+ c �l � t j | � � }d|v sd|v rdS t | � � }|�dS d|v S )N�S�NTF�Formsr? rA s r � is_symbolrI c sR � �$�-�i�8�8�� � � � �C�+=�$=�$=��t�#�I�.�.�O����u��o�%�%r+ c �0 � t | � � }|�dS d|v S )NF� Emoticons)r2 )r rC s r �is_emoticonrL r s% � �#�I�.�.�O����u��/�)�)r+ c �f � | � � � s| dv rdS t j | � � }d|v S )N> � |�+�,�;�<�>T�Z)�isspacer r@ �r rB s r �is_separatorrW | sC � ������ �i�+K�K�K��t�$�-�i�8�8���$�$�$r+ c �V � | � � � | � � � k S �N)�islower�isupperr: s r �is_case_variabler\ � s% � ������)�"3�"3�"5�"5�5�5r+ c �6 � t j | � � }|dk S )N�Co)r r@ rV s r �is_private_use_onlyr_ � s � �$�-�i�8�8����%�%r+ c �X � t j | � � }n# t $ r Y dS w xY wd|v S )NF�CJKr �r �character_names r �is_cjkrd � sH � ��$�)�)�4�4����� � � ��u�u����� �N�"�"r c �X � t j | � � }n# t $ r Y dS w xY wd|v S )NF�HIRAGANAr rb s r �is_hiraganarg � �H � ��$�)�)�4�4����� � � ��u�u����� ��'�'r c �X � t j | � � }n# t $ r Y dS w xY wd|v S )NF�KATAKANAr rb s r �is_katakanark � rh r c �X � t j | � � }n# t $ r Y dS w xY wd|v S )NF�HANGULr rb s r � is_hangulrn � sH � ��$�)�)�4�4����� � � ��u�u����� �~�%�%r c �X � t j | � � }n# t $ r Y dS w xY wd|v S )NF�THAIr rb s r �is_thairq � sH � ��$�)�)�4�4����� � � ��u�u����� �^�#�#r r0 c �D � � t � fd�t D � � � � S )Nc 3 � �K � | ]}|�v V � � d S rY � )�.0�keywordr0 s �r � <genexpr>z-is_unicode_range_secondary.<locals>.<genexpr>� s( �� � � �T�T��w�*�$�T�T�T�T�T�Tr+ )�anyr )r0 s `r �is_unicode_range_secondaryry � s'