RenddlmZddlmZddlmZddlmZddlm Z ddl m Z m Z GddeZ d S) )MultiByteCharSetProber)CodingStateMachine)SJISDistributionAnalysis)SJISContextAnalysis) SJIS_SM_MODEL) ProbingState MachineStatec`eZdZfdZfdZedZedZdZdZ xZ S) SJISProberctt|tt|_t |_t|_ | dSN) superr __init__rr coding_smrdistribution_analyzerrcontext_analyzerresetself __class__s /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/chardet/sjisprober.pyrzSJISProber.__init__%s[ j$((***+M::%=%?%?" 3 5 5 ctt||jdSr )rr rrrs rrzSJISProber.reset,s: j$%%''' ##%%%%%rc|jjSr )r charset_namers rrzSJISProber.charset_name0s$11rcdS)NJapanesers rlanguagezSJISProber.language4szrctt|D]u}|j||}|tjkr;|jd|j|j |tj |_ n |tj krtj|_ n|tjkr|j}|dkr]|d|jd<|j|jd|z d||j|j||j||dz|z |dz|z ||j||dz |dz|w|d|jd<|jtjkrG|jr.||jkrtj|_ |jS)Nz!%s %s prober hit error at byte %sr)rangelenr next_stater ERRORloggerdebugrr rNOT_ME_stateITS_MEFOUND_ITSTARTget_current_charlen _last_charrfeedrstate DETECTINGgot_enough_dataget_confidenceSHORTCUT_THRESHOLD)rbyte_stri coding_statechar_lens rr3zSJISProber.feed8ss8}}%% > >A>44Xa[AAL|111 !!"E"&"3T]AGGG*1 !444*3 !333>==??66)1!DOA&)..tq8|}}/M/7999.33DOXNNNN)..xA8HQ:BJC9C0DEMOOO.33HQU1q5[4I4<>>>&b\ :/ / /%5577 4##%%(???*3 zrc|j}|j}t||Sr )rr7rmax)r context_conf distrib_confs rr7zSJISProber.get_confidenceYs:,;;== 1@@BB <...r) __name__ __module__ __qualname__rrpropertyrr r3r7 __classcell__)rs@rr r $s&&&&&22X2XB///////rr N)mbcharsetproberrcodingstatemachinerchardistributionrjpcntxrmbcssmrenumsrr r rrrrLs8433333222222666666''''''!!!!!!--------8/8/8/8/8/'8/8/8/8/8/r