ϪftddlZddlmZddlmZddlmZddlmZm Z ddl m Z ddl m Z dZe e d d d dd ed GddeZGddeZe eGddZe eGddZe eGddZe eGddZGddZGddZeej0Zeej4Zeej8Zeej<Zeej@Z!eejDZ#eejHZ%eejLZ'eejPZ)eejTZ+eejXZ-eej\Z/eej`Z1ee/e1geeeee!e#e%e'e)e+e-egdg Z2ee/geeee!e#e%e'e)e+e-g Z3eZ4y) N)idna)chain) ucd_3_2_0) Interface implementer)Version)deprecatedModuleAttributeFTwisted zcrippled is always FalsecrippledceZdZdZdZy) ILookupTablez1 Interface for character lookup classes. cy)z< Return whether character is in this table. Ncs P/usr/lib/python3/dist-packages/twisted/words/protocols/jabber/xmpp_stringprep.pylookupzILookupTable.lookupN)__name__ __module__ __qualname____doc__rrrrrr  rrceZdZdZdZy) IMappingTablez2 Interface for character mapping classes. cy)z/ Return mapping for character. Nrrs rmapzIMappingTable.map)rrN)rrrrr rrrrr$rrrceZdZdZy)LookupTableFromFunctionc||_yN)rselfin_table_functions r__init__z LookupTableFromFunction.__init__1s ' rNrrrr(rrrr"r"/s(rr"ceZdZdZdZy) LookupTablec||_yr$_table)r&tables rr(zLookupTable.__init__7s  rc||jvSr$r-r&rs rrzLookupTable.lookup:sDKKrN)rrrr(rrrrr+r+5s  rr+ceZdZdZy)MappingTableFromFunctionc||_yr$)r )r&map_table_functions rr(z!MappingTableFromFunction.__init__@s %rNr)rrrr3r3>s&rr3ceZdZdZdZy)EmptyMappingTablec||_yr$_in_table_functionr%s rr(zEmptyMappingTable.__init__Fs "3rc*|j|ry|Sr$r9r1s rr zEmptyMappingTable.mapIs  " "1 %HrN)rrrr(r rrrr7r7Ds 4rr7c<eZdZgdgddfdZdZdZdZdZdZy) ProfileTcJ||_||_||_||_||_yr$)mappings normalize prohibitedsdo_check_unassigneds do_check_bidi)r&r?r@rAcheck_unassigneds check_bidis rr(zProfile.__init__Qs*! "&$5!'rc|j|}|jrtjd|}|j||jr|j ||j r|j||S)NNFKC)r r@ unicodedatacheck_prohibitedsrBrDrCcheck_bidirectionals)r&stringresults rpreparezProfile.prepare_sj&! >> **66:F v&  $ $  " "6 *     % %f - rcg}|D]A}|}|jD]}|j|}||k7sn|1|j|Cdj|S)N)r?r appendjoin)r&rKrLrresult_cmappings rr z Profile.mapjsi (AH== ";;q>q=  # h' (wwvrc|D];}|jD]*}|j|stdt|z=yNzInvalid character %s)rAr UnicodeErrorrepr)r&rKrr/s rrIzProfile.check_prohibitedszsJ IA)) I<<?&'=Q'GHH I Ircj|D].}tj|stdt|zy)NzUnassigned code point %s) stringprep in_table_a1rVrWr&rKrs rrDzProfile.check_unassignedss6 IA%%a("#=Q#GHH Ircd}d}|D]1}tj|rd}tj|s0d}3|r |r td|r > 9 >? ? rN) rrrrrrangechrrArMrIrr).0nrzs000rrcrcsw0 $ ! $ ! $ ! $ ! $ !      A K/ E A sArc)"&'/:<>@)r?rA)5rY encodingsr itertoolsrrHrzope.interfacerr incrementalrtwisted.python.deprecater r rrrr"r+r3r7r=rc in_table_c11C_11 in_table_c12C_12 in_table_c21C_21 in_table_c22C_22 in_table_c3C_3 in_table_c4C_4 in_table_c5C_5 in_table_c6C_6 in_table_c7C_7 in_table_c8C_8 in_table_c9C_9 in_table_b1B_1 map_table_b2B_2nodeprep resourcepreprrrrrrs3 11>  Ir1a ">Bz667z667z667z667j445j445j445j445j445j445j445 ../z667 3Z           <=  $ tT3S#sCE   :r