R`i2 r d dl mZ ddlZddlZddlZddlmZmZ d dlm Z dZ dZ ej d Z G d d e Z G d de Z G d de Z G d de ZdedefdZdededefdZdedefdZdedefdZdeeef defdZdeeef dedefdZd1dededefdZdedefdZdedefd Zdeddfd!Z ded"edefd#Z!d1ded"ed$edefd%Z"deeee#f ddfd&Z$dedefd'Z%deeee#f defd(Z&d2d)ed*ed+edefd,Z'd3deeee#f d-ed.ed*ed+edefd/Z(d4deeee#f d-ed.ed*edef d0Z)y)5 )idnadata N)UnionOptional)intranges_contain s xn--u [.。.。]c e Zd ZdZy) IDNAErrorz7 Base exception for all IDNA-encoding related problems N__name__ __module____qualname____doc__ /builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/idna/core.pyr r s Ar r c e Zd ZdZy) IDNABidiErrorz= Exception when bidirectional requirements are not satisfied Nr r r r r r s Gr r c e Zd ZdZy)InvalidCodepointz> Exception when a disallowed or unallocated codepoint is used Nr r r r r r s Hr r c e Zd ZdZy)InvalidCodepointContextzE Exception when the codepoint is not valid in the context it is used Nr r r r r r s Or r cpreturnc t j t | }|dk( r)t j t | st d |S )Nr z Unknown character in unicodedata)unicodedata combiningchrname ValueError)r vs r _combining_classr" s@ c"g&AAvB(?@@Hr scriptc N t t | t j | S )N)r ordr scripts)r r# s r _is_scriptr' ' s SWh&6&6v&>??r sc $ | j d S )Npunycode)encoder( s r _punycoder- * s 88Jr c $ dj | S )NzU+{:04X})formatr, s r _unotr0 - s Qr labelc " t | dkD ryy)N? FTlenr1 s r valid_label_lengthr7 1 s 5zBr trailing_dotc * t | |rdndkD ryy)N FTr4 )r1 r8 s r valid_string_lengthr<