+
     Bibt              	          R t . R0Ot^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RI	t	^ RI
t
^ RIt^ RIHt ]P                  ! RR]R7      t]! 4       P%                  ]P&                  4        ! R	 R4      tR
t]
P,                  ! R4      tR1R ltR t]
P,                  ! R]
P4                  4      tR tR tR t ! R R4      t ! R R4      t  ! R R] 4      t!R t" ! R R]#4      t$^R^R^R^R/t%]&! 4       t' ! R R4      t(R  t)]*]+],]P                  ]-3t. ! R! R"]&4      t/R# t0]1]2! ]"]]!R$7      ]3]2! ]0](]/R$7      /t4R%RR&]2R'R(/R) lt5R%RR&]2R'R(/R* lt6R%]1R+R,R-R(R'R(/R. lt7R%]1R-R(R+R,R'R(/R/ lt8R# )2a>  plistlib.py -- a tool to generate and parse MacOSX .plist files.

The property list (.plist) file format is a simple XML pickle supporting
basic object types, like dictionaries, lists, numbers and strings.
Usually the top level object is a dictionary.

To write out a plist file, use the dump(value, file)
function. 'value' is the top level object, 'file' is
a (writable) file object.

To parse a plist from a file, use the load(file) function,
with a (readable) file object as the only argument. It
returns the top level object (again, usually a dictionary).

To work with plist data in bytes objects, you can use loads()
and dumps().

Values can be strings, integers, floats, booleans, tuples, lists,
dictionaries (but only with string keys), Data, bytes, bytearray, or
datetime.datetime objects.

Generate Plist example:

    import datetime
    import plistlib

    pl = dict(
        aString = "Doodah",
        aList = ["A", "B", 12, 32.1, [1, 2, 3]],
        aFloat = 0.1,
        anInt = 728,
        aDict = dict(
            anotherString = "<hello & hi there!>",
            aThirdString = "M\xe4ssig, Ma\xdf",
            aTrueValue = True,
            aFalseValue = False,
        ),
        someData = b"<binary gunk>",
        someMoreData = b"<lots of binary gunk>" * 10,
        aDate = datetime.datetime.now()
    )
    print(plistlib.dumps(pl).decode())

Parse Plist example:

    import plistlib

    plist = b'''<plist version="1.0">
    <dict>
        <key>foo</key>
        <string>bar</string>
    </dict>
    </plist>'''
    pl = plistlib.loads(plist)
    print(pl["foo"])
InvalidFileExceptionUIDN)BytesIO)ParserCreatePlistFormatzFMT_XML FMT_BINARY)modulec                   D   a  ] tR t^Mt o R tR tR tR tR tR t	Rt
V tR# )	r   c                    \        V\        4      '       g   \        R 4      hVR8  d   \        R4      hV^ 8  d   \        R4      hWn        R# )zdata must be an intzUIDs cannot be >= 2**64UIDs must be positiveN            )
isinstanceint	TypeError
ValueErrordataselfr   s   &&/usr/lib/python3.14/plistlib.py__init__UID.__init__N   sF    $$$1227?677!8455	    c                    V P                   # Nr   r   s   &r   	__index__UID.__index__W   s    yyr   c                d    V P                   P                  : R \        V P                  4      : R2# )())	__class____name__reprr   r   s   &r   __repr__UID.__repr__Z   s    >>22DODDr   c                4    V P                   V P                  33# r   )r    r   r   s   &r   
__reduce__UID.__reduce__]   s    ~~		|++r   c                l    \        V\        4      '       g   \        # V P                  VP                  8H  # r   )r   r   NotImplementedr   )r   others   &&r   __eq__
UID.__eq__`   s(    %%%!!yyEJJ&&r   c                ,    \        V P                  4      # r   )hashr   r   s   &r   __hash__UID.__hash__e   s    DIIr   r   N)r!   
__module____qualname____firstlineno__r   r   r#   r&   r+   r/   __static_attributes____classdictcell____classdict__s   @r   r   r   M   s)     E,'
 r   s   <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
zv[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]c                     V^,          ^,          p. p\        ^ \        V 4      V4       F2  pWWB,            pVP                  \        P                  ! V4      4       K4  	  RP                  V4      # )   r   )rangelenappendbinascii
b2a_base64join)smaxlinelength
maxbinsizepiecesichunks   &&    r   _encode_base64rF   y   sa    "A%JF1c!fj)an%h))%01 * 88Fr   c                     \        V \        4      '       d&   \        P                  ! V P	                  R 4      4      # \        P                  ! V 4      # )utf-8)r   strr=   
a2b_base64encode)r@   s   &r   _decode_base64rL      s<    !S""188G#455 ""1%%r   z{(?P<year>\d\d\d\d)(?:-(?P<month>\d\d)(?:-(?P<day>\d\d)(?:T(?P<hour>\d\d)(?::(?P<minute>\d\d)(?::(?P<second>\d\d))?)?)?)?)?Zc                 2   Rp\         P                  V 4      P                  4       p. pV F+  pW5,          pVf    MVP                  \	        V4      4       K-  	  V'       d%   \
        P
                  ! VR\
        P                  / # \
        P
                  ! V!  # )yeartzinfo)rN   monthdayhourminutesecond)_dateParsermatch	groupdictr<   r   datetimeUTC)r@   aware_datetimeordergdlstkeyvals   &&     r   _date_from_stringr`      s~    @E			1		'	'	)B
Cg;

3s8	 
   #;hll;;c""r   c                     V'       d    V P                  \        P                  4      p R V P                  V P                  V P
                  V P                  V P                  V P                  3,          # )z%04d-%02d-%02dT%02d:%02d:%02dZ)	
astimezonerX   rY   rN   rP   rQ   rR   rS   rT   )drZ   s   &&r   _date_to_stringrd      sO    LL&+		!((/  r   c                    \         P                  V 4      pVe   \        R4      hV P                  RR4      p V P                  RR4      p V P                  RR4      p V P                  RR4      p V P                  R	R
4      p V # )Nz;strings can't contain control characters; use bytes insteadz

&z&amp;<z&lt;>z&gt;)_controlCharPatsearchr   replace)textms   & r   _escaperp      s~    t$A} - . 	.<<%D<<d#D<<W%D<<V$D<<V$DKr   c                      a  ] tR t^t o RR ltR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tRtV tR# )_PlistParserc                H    . V n         R V n        R V n        Wn        W n        R # r   )stackcurrent_keyroot
_dict_type_aware_datetimer   	dict_typerZ   s   &&&r   r   _PlistParser.__init__   s#    
	#-r   c                F   \        4       V n        V P                  V P                  n        V P                  V P                  n        V P                  V P                  n        V P                  V P                  n	        V P                  P                  V4       V P                  # r   )r   parserhandle_begin_elementStartElementHandlerhandle_end_elementEndElementHandlerhandle_dataCharacterDataHandlerhandle_entity_declEntityDeclHandler	ParseFilerv   )r   fileobjs   &&r   parse_PlistParser.parse   so    "n*.*C*C'(,(?(?%+/+;+;((,(?(?%g&yyr   c                    \        R 4      h)z8XML entity declarations are not supported in plist files)r   )r   entity_nameis_parameter_entityvaluebase	system_id	public_idnotation_names   &&&&&&&&r   r   _PlistParser.handle_entity_decl   s     ##]^^r   c                X    . V n         \        V R V,           R4      pVe   V! V4       R# R# )begin_N)r   getattr)r   elementattrshandlers   &&& r   r~   !_PlistParser.handle_begin_element   s.    	$7 2D9EN r   c                H    \        V R V,           R4      pVe
   V! 4        R# R# )end_N)r   )r   r   r   s   && r   r   _PlistParser.handle_end_element   s%    $ 0$7I r   c                <    V P                   P                  V4       R # r   )r   r<   r   s   &&r   r   _PlistParser.handle_data   s    		r   c                   V P                   ev   \        V P                  R,          \        4      '       g'   \	        RV P
                  P                  ,          4      hWP                  R,          V P                   &   R V n         R # V P                  '       g	   Wn        R # \        V P                  R,          \        4      '       g'   \	        RV P
                  P                  ,          4      hV P                  R,          P                  V4       R # )Nzunexpected element at line %d)
ru   r   rt   dictr   r}   CurrentLineNumberrv   listr<   r   r   s   &&r   
add_object_PlistParser.add_object   s    'djjnd33 !@!%!>!>"? @ @/4JJrN4++,#DIdjjnd33 !@!%!>!>"? @ @JJrN!!%(r   c                J    R P                  V P                  4      p. V n        V# ) )r?   r   r   s   & r   get_data_PlistParser.get_data   s     wwtyy!	r   c                ~    V P                  4       pV P                  V4       V P                  P                  V4       R # r   )rw   r   rt   r<   )r   r   rc   s   && r   
begin_dict_PlistParser.begin_dict   s,    OO

!r   c                    V P                   '       d3   \        R V P                   V P                  P                  3,          4      hV P                  P                  4        R# )z%missing value for key '%s' at line %dN)ru   r   r}   r   rt   popr   s   &r   end_dict_PlistParser.end_dict   sL    D"..t{{/L/LMN O O

r   c                    V P                   '       g(   \        V P                  R,          \        4      '       g'   \	        RV P
                  P                  ,          4      hV P                  4       V n         R# )   zunexpected key at line %dNr   )ru   r   rt   r   r   r}   r   r   r   s   &r   end_key_PlistParser.end_key   sR    :djjnd#C#C8![[::; < <==?r   c                b    . pV P                  V4       V P                  P                  V4       R # r   )r   rt   r<   )r   r   as   && r   begin_array_PlistParser.begin_array   s%    

!r   c                :    V P                   P                  4        R # r   )rt   r   r   s   &r   	end_array_PlistParser.end_array  s    

r   c                (    V P                  R 4       R# )TNr   r   s   &r   end_true_PlistParser.end_true  s    r   c                (    V P                  R 4       R# )FNr   r   s   &r   	end_false_PlistParser.end_false	  s    r   c                    V P                  4       pVP                  R 4      '       g   VP                  R4      '       d   V P                  \        V^4      4       R# V P                  \        V4      4       R# )0x0XN)r   
startswithr   r   )r   raws   & r   end_integer_PlistParser.end_integer  sL    mmo>>$3>>$#7#7OOCRL)OOCH%r   c                V    V P                  \        V P                  4       4      4       R # r   )r   floatr   r   s   &r   end_real_PlistParser.end_real  s    dmmo./r   c                D    V P                  V P                  4       4       R # r   )r   r   r   s   &r   
end_string_PlistParser.end_string  s    (r   c                V    V P                  \        V P                  4       4      4       R # r   )r   rL   r   r   s   &r   end_data_PlistParser.end_data  s    t}}78r   c                n    V P                  \        V P                  4       V P                  R 7      4       R# ))rZ   N)r   r`   r   rx   r   s   &r   end_date_PlistParser.end_date  s)    )$--/9=9M9MO 	Pr   )rx   rw   ru   r   r}   rv   rt   NF)r!   r1   r2   r3   r   r   r   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r4   r5   r6   s   @r   rr   rr      sq     ._
) 
+
&0)9P Pr   rr   c                   F   a  ] tR tRt o R	R ltR tR tR
R ltR tRt	V t
R# )_DumbXMLWriteri!  c                8    Wn         . V n        W n        W0n        R # r   )filert   _indent_levelindent)r   r   indent_levelr   s   &&&&r   r   _DumbXMLWriter.__init__"  s    	
)r   c                    V P                   P                  V4       V P                  R V,          4       V ;P                  ^,          un        R# )z<%s>N)rt   r<   writelnr   r   r   s   &&r   begin_element_DumbXMLWriter.begin_element(  s6    

'"Vg%&ar   c                h    V ;P                   ^,          un         V P                  RV,          4       R# )r   z</%s>N)r   r   r   s   &&r   end_element_DumbXMLWriter.end_element-  s&     	aWw&'r   Nc           	         Ve,   \        V4      pV P                  RV: RV: RV: R24       R # V P                  RV,          4       R # )Nri   rj   z</z<%s/>)rp   r   )r   r   r   s   &&&r   simple_element_DumbXMLWriter.simple_element3  s7    ENELL'5'BC LL7*+r   c                <   V'       dy   \        V\        4      '       d   VP                  R 4      pV P                  P	                  V P
                  V P                  ,          4       V P                  P	                  V4       V P                  P	                  R4       R# )rH      
N)r   rI   rK   r   writer   r   )r   lines   &&r   r   _DumbXMLWriter.writeln;  sa     $$${{7+IIOOD..<=IIOOD!		r   )r   r   r   rt   )    	r   )r!   r1   r2   r3   r   r   r   r   r   r4   r5   r6   s   @r   r   r   !  s#      
(,	 	r   r   c                   H   a  ] tR tRt o R
R ltR tR tR tR tR t	Rt
V tR	# )_PlistWriteriG  c                    V'       d   VP                  \        4       \        P                  WW#4       WPn        W`n        Wpn        R # r   )r   PLISTHEADERr   r   
_sort_keys	_skipkeysrx   )r   r   r   r   writeHeader	sort_keysskipkeysrZ   s   &&&&&&&&r   r   _PlistWriter.__init__H  s3     JJ{#LA#!-r   c                l    V P                  R 4       V P                  V4       V P                  R4       R# )z<plist version="1.0">z</plist>N)r   write_valuer   s   &&r   r   _PlistWriter.writeS  s)    ./Z r   c                   \        V\        4      '       d   V P                  R V4       R
# VRJ d   V P                  R4       R
# VRJ d   V P                  R4       R
# \        V\        4      '       d9   RTu;8:  d   R8  d   M MV P                  RRV,          4       R
# \	        V4      h\        V\
        4      '       d   V P                  R\        V4      4       R
# \        V\        4      '       d   V P                  V4       R
# \        V\        \        34      '       d   V P                  V4       R
# \        V\        P                  4      '       d(   V P                  R\        WP                  4      4       R
# \        V\        \         34      '       d   V P#                  V4       R
# \%        R	\'        V4      ,          4      h)stringTtrueFfalseintegerz%drealdatezunsupported type: %sNl         r   )r   rI   r   r   OverflowErrorr   r"   r   
write_dictbytes	bytearraywrite_bytesrX   rd   rx   tupler   write_arrayr   typer   s   &&r   r   _PlistWriter.write_valueX  sF   eS!!%0d]'e^(s##5*7*##Ite|<#E**u%%U4t$$OOE"y122U#x0011 /7K7K LN t}--U# 2T%[@AAr   c           
        V P                  R 4       V ;P                  ^,          un        \        ^^L\        V P                  P                  RR4      V P                  ,          4      ,
          4      p\        W4      P                  R4       F  pV'       g   K  V P                  V4       K   	  V ;P                  ^,          un        V P                  R 4       R# )r      	r   Ns           )
r   r   maxr;   r   rm   rF   splitr   r   )r   r   rA   r   s   &&  r   r  _PlistWriter.write_bytes{  s    6"aT[[((9D<N<NNOOQ #47==eDDtT" E 	a r   c                   V'       d   V P                  R 4       V P                  '       d   \        VP                  4       4      pMVP                  4       pV F]  w  r4\	        V\
        4      '       g    V P                  '       d   K/  \        R4      hV P                  RV4       V P                  V4       K_  	  V P                  R 4       R# V P                  R 4       R# )r   keys must be stringsr^   N)r   r   sorteditemsr   rI   r   r   r   r   r   )r   rc   r  r^   r   s   &&   r   r  _PlistWriter.write_dict  s    v&qwwy)	#
!#s++~~~ #$:;;##E3/  ' $ V$ 'r   c                    V'       d?   V P                  R 4       V F  pV P                  V4       K  	  V P                  R 4       R# V P                  R 4       R# )arrayN)r   r   r   r   )r   r  r   s   && r   r  _PlistWriter.write_array  sI    w'  ' W% (r   )rx   r   r   N)r   r  r   TFF)r!   r1   r2   r3   r   r   r   r  r  r  r4   r5   r6   s   @r   r   r   G  s*     	.!
!BF!(() )r   r   c                    RpV F  pV P                  V4      '       g   K   R# 	  \        P                  R3\        P                  R3\        P                  R33 Fd  w  r4V P                  V4      '       g   K  V F@  pW5P                  R4      P                  V4      ,           pV R\        V4       V8X  g   K>    R# 	  Kf  	  R# )	   <?xmlTrH   z	utf-16-bez	utf-16-leasciiNF)r  s   <plist)r   codecsBOM_UTF8BOM_UTF16_BEBOM_UTF16_LEdecoderK   r;   )headerprefixespfxbomencodingstartprefixs   &      r   _is_fmt_xmlr,    s    $HS!!  '*$$k2$$k2   %%E<<077AAFls6{#v-   r   c                   *   a  ] tR tRt o RR ltRtV tR# )r   i  c                0    \         P                  W4       R # r   )r   r   )r   messages   &&r   r   InvalidFileException.__init__  s    D*r    N)zInvalid file)r!   r1   r2   r3   r   r4   r5   r6   s   @r   r   r     s     + +r   BHLQc                   L   a  ] tR tRt o RtRR ltR tR tR tR t	R t
R	tV tR
# )_BinaryPlistParseri  z
Read or write a binary plist file, following the description of the binary
format.  Raise InvalidFileException in case of error, otherwise return the
root object.

see also: http://opensource.apple.com/source/CF/CF-744.18/CFBinaryPList.c
c                    Wn         W n        R # r   )rw   _aware_datimery   s   &&&r   r   _BinaryPlistParser.__init__  s    #+r   c                (    Wn         V P                   P                  R\        P                  4       V P                   P	                  ^ 4      p\        V4      ^ 8w  d   \        4       h\        P                  ! RV4      w  q0n	        rEpV P                   P                  V4       V P                  WC4      V n        \        .V,          V n        V P                  V4      #   \        \         \        P"                  \$        \&        3 d    \        4       hi ; i)    z>6xBBQQQi)_fpseekosSEEK_ENDreadr;   r   structunpack	_ref_size
_read_ints_object_offsets
_undefined_objects_read_objectOSError
IndexErrorerrorr  r   )r   fptraileroffset_sizenum_objects
top_objectoffset_table_offsets   &&     r   r   _BinaryPlistParser.parse  s    	) HHHMM#r{{+hhmmB'G7|r!*,, j'2^[#HHMM-.#'??;#LD 'L;6DM$$Z00V\\= 	)&((	)s   CC 5Dc                   V^8X  d}   V P                   P                  ^4      ^ ,          ^,          p^V,          pR\        V,          ,           p\        P                  ! W@P                   P                  V4      4      ^ ,          # V# )z#return the size of the next object.rj   )r=  rA  _BINARY_FORMATrB  rC  )r   tokenLro   r@   fs   &&   r   	_get_size_BinaryPlistParser._get_size  sc    S=a #c)AQAnQ''A==HHMM!$45a88r   c                  aa V P                   P                  SV,          4      oS\        9   d(   \        P                  ! R V \        S,           2S4      # S'       d   \        S4      SV,          8w  d   \        4       h\        ;QJ d*    . VV3R l\        ^ SV,          S4       4       F  NK  	  5# ! VV3R l\        ^ SV,          S4       4       4      # )rj   c              3   b   <"   T F$  p\         P                  SWS,            R 4      x  K&  	  R# 5i)bigN)r   
from_bytes).0rD   r   sizes   & r   	<genexpr>0_BinaryPlistParser._read_ints.<locals>.<genexpr>  s/      <":Q QD(95AA":s   ,/)	r=  rA  rU  rB  rC  r;   r   r  r:   )r   nr_  r   s   &&f@r   rE  _BinaryPlistParser._read_ints  s    xx}}TAX&>!==1QCt(<'=!>EE3t9q0*,,5 <"'4!8T":<5 <5 <"'4!8T":< < <r   c                8    V P                  WP                  4      # r   )rE  rD  )r   rb  s   &&r   
_read_refs_BinaryPlistParser._read_refs	  s    q..11r   c                J	   V P                   V,          pV\        Jd   V# V P                  V,          pV P                  P	                  V4       V P                  P                  ^4      ^ ,          pV^,          V^,          reV^ 8X  d   RpEMV^8X  d   RpEMV^	8X  d   RpEMV^8X  d   RpEMV^8X  d>   \        P                  V P                  P                  ^V,          4      RV^8  R7      pEMV^"8X  d:   \        P                  ! RV P                  P                  ^4      4      ^ ,          pEMKV^#8X  d:   \        P                  ! RV P                  P                  ^4      4      ^ ,          pEMV^38X  d   \        P                  ! RV P                  P                  ^4      4      ^ ,          pV P                  '       d*   \        P                  ! R	^^\        P                  R
7      pM\        P                  ! R	^^4      pV\        P                  ! VR7      ,           pEMZV^@8X  dI   V P                  V4      p	V P                  P                  V	4      p\        V4      V	8w  d   \!        4       hEMV^P8X  dZ   V P                  V4      p	V P                  P                  V	4      p
\        V
4      V	8w  d   \!        4       hV
P#                  R4      pEMV^`8X  da   V P                  V4      ^,          p	V P                  P                  V	4      p
\        V
4      V	8w  d   \!        4       hV
P#                  R4      pEMDV^8X  dA   \%        \        P                  V P                  P                  ^V,           4      R4      4      pMV^8X  d]   V P                  V4      p	V P'                  V	4      p. pW P                   V&   V F#  pVP)                  V P+                  V4      4       K%  	  MV^8X  d   V P                  V4      p	V P'                  V	4      pV P'                  V	4      pV P-                  4       pW P                   V&    \/        W4       F'  w  rV P+                  V4      W P+                  V4      &   K)  	  M
\!        4       hW P                   V&   V#   \0         d    \!        4       hi ; i)z`
read the object by reference.

May recursively read sub-objects (content of an array/dict/set)
NFTr   r\  signedz>fz>d  rO   )secondsr  utf-16be)rH  rG  rF  r=  r>  rA  r   r]  rB  rC  r9  rX   rY   	timedeltarX  r;   r   r$  r   re  r<   rI  rw   zipr   )r   refresultoffsettokentokenHrV  rW  epochr@   r   obj_refsxkey_refskos   &&              r   rI  _BinaryPlistParser._read_object  s    s##M%%c*fa #ut|D=Fd]Fd]F
 d]Ft^^^DHHMM!v+$>$)&A+ $ ?F d]]]4q)9:1=Fd]]]4q)9:1=Fd]dDHHMM!$45a8A !!! ))$1X\\J ))$15X//::Ft^v&AXX]]1%F6{a*,,   t^v&A88==#D4yA~*,,[[)Ft^v&*A88==#D4yA~*,,[[,Ft^a&j(A5IJFt^v&Aq)HF!'MM#d//23  t^v&Aq)Hq)H__&F!'MM#-3DA373D3DQ3GF,,Q/0 4
 '((#c  -*,,-s   ;6R R")r9  rw   r=  rF  rH  rD  Nr   )r!   r1   r2   r3   __doc__r   r   rX  rE  re  rI  r4   r5   r6   s   @r   r7  r7    s/     ,)2<2g gr   r7  c                 <    V R8  d   ^# V R8  d   ^# V R8  d   ^# ^# )r                 r1  )counts   &r   _count_to_sizer  u  s%    v~		 r   c                   H   a  ] tR tRt o R
R ltR tR tR tR tR t	Rt
V tR	# )_BinaryPlistWriteri  c                6    Wn         W n        W0n        W@n        R # r   )r=  r   r   rx   )r   rM  r   r   rZ   s   &&&&&r   r   _BinaryPlistWriter.__init__  s    #!-r   c                   . V n         / V n        / V n        V P                  V4       \	        V P                   4      p^ .V,          V n        \        V4      V n        \        V P                  ,          V n	        V P                  P                  R4       V P                    F  pV P                  V4       K  	  V P                  V4      pV P                  P                  4       p\        V4      pR\        V,          V,          ,           pV P                  P                  \        P                   ! V.V P
                  O5!  4       ^ pWV P                  VWE3p	V P                  P                  \        P                   ! R.V	O5!  4       R# )r      bplist00rj   z	>5xBBBQQQN)_objlist	_objtable_objidtable_flattenr;   rF  r  rD  rU  _ref_formatr=  r   _write_object
_getrefnumtellrB  pack)
r   r   rP  objrQ  rR  rO  offset_formatsort_versionrN  s
   &&        r   r   _BinaryPlistWriter.write  s4      	e $--( !s;'4)$..9 	{# ==Cs# ! __U+
"hhmmo$%89n[9KGGv{{=H43G3GHI t~~{
 	v{{;99:r   c                   \        V\        4      '       d    \        V4      V3V P                  9   d   R # M\	        V4      V P
                  9   d   R # \        V P                  4      pV P                  P                  V4       \        V\        4      '       d   W P                  \        V4      V3&   MW P
                  \	        V4      &   \        V\        4      '       d   . p. pVP                  4       pV P                  '       d   \        V4      pV F\  w  rg\        V\        4      '       g    V P                  '       d   K/  \        R4      hVP                  V4       VP                  V4       K^  	  \         P"                  ! W44       F  pV P%                  V4       K  	  R # \        V\&        \(        34      '       d   V F  pV P%                  V4       K  	  R # R # )Nr  )r   _scalarsr  r  idr  r;   r  r<   r   r  r   r  rI   r   r   	itertoolschainr  r   r  )	r   r   refnumkeysvaluesr  ry  vrz  s	   &&       r   r  _BinaryPlistWriter._flatten  sh    eX&&UU#t~~5 6 Y$*** T]]#U#eX&&39NNDK/0*0RY' eT""DFKKMEu!!S))~~~ #$:;;Aa   __T2a  3 e}--a   .r   c                    \        V\        4      '       d   V P                  \        V4      V3,          # V P                  \        V4      ,          # r   )r   r  r  r  r  r  r   s   &&r   r  _BinaryPlistWriter._getrefnum  s<    eX&&>>4;"677##BuI..r   c                   V^8  d9   V P                   P                  \        P                  ! RW,          4      4       R# VR8  d<   V P                   P                  \        P                  ! RV^,          ^V4      4       R# VR8  d<   V P                   P                  \        P                  ! RV^,          ^V4      4       R# VR	8  d<   V P                   P                  \        P                  ! RV^,          ^V4      4       R# V P                   P                  \        P                  ! RV^,          ^V4      4       R# )
   z>Bz>BBBz>BBHz>BBLz>BBQNr~  r  r  )r=  r   rB  r  )r   rs  r_  s   &&&r   _write_size_BinaryPlistWriter._write_size  s    "9HHNN6;;tU\:;F]HHNN6;;vus{D$GHG^HHNN6;;vus{D$GHG^HHNN6;;vus{D$GH HHNN6;;vus{D$GHr   c           	        V P                  V4      pV P                  P                  4       V P                  V&   Vf   V P                  P	                  R4       R # VRJ d   V P                  P	                  R4       R # VRJ d   V P                  P	                  R4       R # \        V\        4      '       Edl   V^ 8  d5    V P                  P	                  \        P                  ! R^V4      4       R # VR8  d4   V P                  P	                  \        P                  ! R^V4      4       R # VR8  d4   V P                  P	                  \        P                  ! R^V4      4       R # VR8  d4   V P                  P	                  \        P                  ! R	^V4      4       R # VR8  d4   V P                  P	                  \        P                  ! R
^V4      4       R # VR8  d7   V P                  P	                  RVP                  ^RRR7      ,           4       R # \        V4      h\        V\        4      '       d4   V P                  P	                  \        P                  ! R^#V4      4       R # \        V\        P                  4      '       d   V P                  '       d`   VP                  \        P                   4      pV\        P                  ! R^^\        P                   R7      ,
          pVP#                  4       pM-V\        P                  ! R^^4      ,
          P#                  4       pV P                  P	                  \        P                  ! R^3V4      4       R # \        V\$        \&        34      '       d9   V P)                  ^@\+        V4      4       V P                  P	                  V4       R # \        V\,        4      '       dK    VP/                  R4      pV P)                  ^P\+        V4      4       V P                  P	                  V4       R # \        V\2        4      '       Ed8   VP4                  ^ 8  d   \7        R4      hVP4                  R8  d4   V P                  P	                  \        P                  ! R^V4      4       R # VP4                  R8  d4   V P                  P	                  \        P                  ! R^V4      4       R # VP4                  R8  d4   V P                  P	                  \        P                  ! R	^V4      4       R # VP4                  R8  d4   V P                  P	                  \        P                  ! R
^V4      4       R # \        V4      h\        V\8        \:        34      '       d   V Uu. uF  qpP                  V4      NK  	  pp\+        V4      p	V P)                  ^V	4       V P                  P	                  \        P                  ! RV P<                  V	,          ,           .VO5!  4       R # \        V\>        4      '       Edq   . . rV P@                  '       d   \C        VPE                  4       4      pMVPE                  4       pV Fz  w  r\        V\,        4      '       g    V PF                  '       d   K/  \I        R4      hV
PK                  V P                  V4      4       VPK                  V P                  V4      4       K|  	  \+        V
4      p	V P)                  ^V	4       V P                  P	                  \        P                  ! RV P<                  V	,          ,           .V
O5!  4       V P                  P	                  \        P                  ! RV P<                  V	,          ,           .VO5!  4       R # \I        V4      h  \        P                   d    \        T4      R hi ; i  \0         d8    TP/                  R4      pT P)                  ^`\+        T4      ^,          4        ELi ; iu upi )N    F   Tr  z>Bqz>BBz>BHz>BLz>BQ   r\  rh  z>Bdrj  rk  r  rm  r
   rj   r  r~  r  r  l            r   )&r  r=  r  rF  r   r   r   rB  r  rL  r  to_bytesr   rX   rx   rb   rY   total_secondsr	  r
  r  r;   rI   rK   UnicodeEncodeErrorr   r   r   r   r  r  r   r   r  r  r   r   r<   )r   r   rp  dtrr  rW  trz  refsr@   keyRefsvalRefs	rootItemsry  r  s   &&             r   r   _BinaryPlistWriter._write_object  sk   ooe$$(HHMMOS!=HHNN7#e^HHNN7#d]HHNN7#s##qy9HHNN6;;udE#BC v{{5$>?v{{5$>?v{{5$>?v{{5$>?wE$)OOP#E**u%%HHNN6;;udE:;x0011###%%hll3h//a8<<PP((*X..tQ::IIKHHNN6;;udA67y122T3u:.HHNN5!s##4LL)  s5z2
 HHNN1s##zzA~ !899f$v{{5$>?g%v{{5$>?g%v{{5$>?g%v{{5$>?#E**e}--0561OOA&D6D	AT1%HHNN6;;sT-=-=-A'AIDIJt$$!2W"5;;=1	!KKM	!!!S))~~~ #$:;;tq12tq12 " GAT1%HHNN6;;sT-=-=-A'ALGLMHHNN6;;sT-=-=-A'ALGLM E""g || 9'.D89F & 4LL,  s1v{34* 7s$   ?1^ ,^8 >_="^58>_:9_:)
rx   r=  rF  r  r  r  r  rD  r   r   Nr   )r!   r1   r2   r3   r   r   r  r  r  r  r4   r5   r6   s   @r   r  r    s-     .+;Z(!T/I c# c#r   r  c                     V R ,          R8H  # ):N   Nr  r1  )r%  s   &r   _is_fmt_binaryr  ^  s    ":$$r   )detectr}   writerfmtrz   rZ   Fc               4   Vfh   V P                  ^ 4      pV P                  ^ 4       \        P                  4        F#  pVR,          ! V4      '       g   K  VR,          p M 	  \	        4       h\        V,          R,          pV! W#R7      pVP                  V 4      # )zRead a .plist file. 'fp' should be a readable and binary file object.
Return the unpacked root object (which usually is a dictionary).
r  r}   )rz   rZ   )rA  r>  _FORMATSr  r   r   )rM  r  rz   rZ   r%  infoPps   &$$$    r   loadr  t  s     {

OO%DH~f%%N & '(( SM(#	I=A772;r   c                   \        V \        4      '       d'   V\        8X  d   \        R4      hV P	                  4       p \        V 4      p\        WAW#R7      # )ziRead a .plist file from a bytes object.
Return the unpacked root object (which usually is a dictionary).
z6value must be bytes-like object when fmt is FMT_BINARY)r  rz   rZ   )r   rI   
FMT_BINARYr   rK   r   r  )r   r  rz   rZ   rM  s   &$$$ r   loadsr    sL     %* ) * *	ByPPr   r   Tr   c                   V\         9  d   \        RV: 24      h\         V,          R,          ! WVVR7      pVP                  V 4       R# )zOWrite 'value' to a .plist file. 'fp' should be a writable,
binary file object.
zUnsupported format: r  )r   r   rZ   N)r  r   r   )r   rM  r  r   r   rZ   r  s   &&$$$$ r   dumpr    sA    
 (3899c]8$Rx4BDF
LLr   c          	     T    \        4       p\        WWVVR7       VP                  4       # )z?Return a bytes object with the contents for a .plist file.
    )r  r   r   rZ   )r   r  getvalue)r   r  r   r   rZ   rM  s   &$$$$ r   dumpsr    s(     
B)&(;;=r   )r   FMT_XMLr  r  r  r  r  r   )L   )9r|  __all__r=   r   rX   enumior   r  r?  rerB  xml.parsers.expatr   Enumr!   r   globalsupdate__members__r   r   compilerk   rF   rL   ASCIIrU   r`   rd   rp   rr   r   r   r,  r   r   rU  objectrG  r7  r  rI   r   r   r	  r  r  r  r  r   r  r  r  r  r  r  r1  r   r   <module>r     s  7p       	 	  * ii';HM 	  (( ) B **IJ& jj  X  Z\  Zb  Zb  c#
mP mP`# #L])> ])@B+J + S!S!S!S1X
c cJ eX..6W#& W#t% T
 !!
D D  ,
Q 
Q 
QU 
Q
7 
d 
U 

 % 4 r   