HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/1991109/cwd/usr/lib/python3/dist-packages/gyp/__pycache__/
Upload File :
Current File : //proc/1991109/cwd/usr/lib/python3/dist-packages/gyp/__pycache__/xcodeproj_file.cpython-311.pyc
�

�"Kb"���l�dZddlZddlZddlZddlZddlZddlZ	ddlZej	Z
n#e$rddlZej
Z
YnwxYw	en
#e$reZYnwxYw	en#e$rd�ZYnwxYwejd��Zejd��Zejd��Zejd��Zd�Zd	�ZGd
�de��ZGd�d
e��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�deee��Z Gd�dee��Z!Gd�de��Z"Gd�de��Z#Gd�de��Z$Gd �d!e��Z%Gd"�d#e%��Z&Gd$�d%e%��Z'Gd&�d'e%��Z(Gd(�d)e%��Z)Gd*�d+e%��Z*Gd,�d-e%��Z+Gd.�d/e��Z,Gd0�d1e��Z-Gd2�d3e��Z.Gd4�d5e��Z/Gd6�d7e��Z0e0e.j1d8d9<Gd:�d;e0��Z2Gd<�d=e0��Z3Gd>�d?e��Z4Gd@�dAe��Z5dS)BauXcode project file generator.

This module is both an Xcode project file generator and a documentation of the
Xcode project file format.  Knowledge of the project file format was gained
based on extensive experience with Xcode, and by making changes to projects in
Xcode.app and observing the resultant changes in the associated project files.

XCODE PROJECT FILES

The generator targets the file format as written by Xcode 3.2 (specifically,
3.2.6), but past experience has taught that the format has not changed
significantly in the past several years, and future versions of Xcode are able
to read older project files.

Xcode project files are "bundled": the project "file" from an end-user's
perspective is actually a directory with an ".xcodeproj" extension.  The
project file from this module's perspective is actually a file inside this
directory, always named "project.pbxproj".  This file contains a complete
description of the project and is all that is needed to use the xcodeproj.
Other files contained in the xcodeproj directory are simply used to store
per-user settings, such as the state of various UI elements in the Xcode
application.

The project.pbxproj file is a property list, stored in a format almost
identical to the NeXTstep property list format.  The file is able to carry
Unicode data, and is encoded in UTF-8.  The root element in the property list
is a dictionary that contains several properties of minimal interest, and two
properties of immense interest.  The most important property is a dictionary
named "objects".  The entire structure of the project is represented by the
children of this property.  The objects dictionary is keyed by unique 96-bit
values represented by 24 uppercase hexadecimal characters.  Each value in the
objects dictionary is itself a dictionary, describing an individual object.

Each object in the dictionary is a member of a class, which is identified by
the "isa" property of each object.  A variety of classes are represented in a
project file.  Objects can refer to other objects by ID, using the 24-character
hexadecimal object key.  A project's objects form a tree, with a root object
of class PBXProject at the root.  As an example, the PBXProject object serves
as parent to an XCConfigurationList object defining the build configurations
used in the project, a PBXGroup object serving as a container for all files
referenced in the project, and a list of target objects, each of which defines
a target in the project.  There are several different types of target object,
such as PBXNativeTarget and PBXAggregateTarget.  In this module, this
relationship is expressed by having each target type derive from an abstract
base named XCTarget.

The project.pbxproj file's root dictionary also contains a property, sibling to
the "objects" dictionary, named "rootObject".  The value of rootObject is a
24-character object key referring to the root PBXProject object in the
objects dictionary.

In Xcode, every file used as input to a target or produced as a final product
of a target must appear somewhere in the hierarchy rooted at the PBXGroup
object referenced by the PBXProject's mainGroup property.  A PBXGroup is
generally represented as a folder in the Xcode application.  PBXGroups can
contain other PBXGroups as well as PBXFileReferences, which are pointers to
actual files.

Each XCTarget contains a list of build phases, represented in this module by
the abstract base XCBuildPhase.  Examples of concrete XCBuildPhase derivations
are PBXSourcesBuildPhase and PBXFrameworksBuildPhase, which correspond to the
"Compile Sources" and "Link Binary With Libraries" phases displayed in the
Xcode application.  Files used as input to these phases (for example, source
files in the former case and libraries and frameworks in the latter) are
represented by PBXBuildFile objects, referenced by elements of "files" lists
in XCTarget objects.  Each PBXBuildFile object refers to a PBXBuildFile
object as a "weak" reference: it does not "own" the PBXBuildFile, which is
owned by the root object's mainGroup or a descendant group.  In most cases, the
layer of indirection between an XCBuildPhase and a PBXFileReference via a
PBXBuildFile appears extraneous, but there's actually one reason for this:
file-specific compiler flags are added to the PBXBuildFile object so as to
allow a single file to be a member of multiple targets while having distinct
compiler flags for each.  These flags can be modified in the Xcode applciation
in the "Build" tab of a File Info window.

When a project is open in the Xcode application, Xcode will rewrite it.  As
such, this module is careful to adhere to the formatting used by Xcode, to
avoid insignificant changes appearing in the file when it is used in the
Xcode application.  This will keep version control repositories happy, and
makes it possible to compare a project file used in Xcode to one generated by
this module to determine if any significant changes were made in the
application.

Xcode has its own way of assigning 24-character identifiers to each object,
which is not duplicated here.  Because the identifier only is only generated
once, when an object is created, and is then left unchanged, there is no need
to attempt to duplicate Xcode's behavior in this area.  The generator is free
to select any identifier, even at random, to refer to the objects it creates,
and Xcode will retain those identifiers and use them when subsequently
rewriting the project file.  However, the generator would choose new random
identifiers each time the project files are generated, leading to difficulties
comparing "used" project files to "pristine" ones produced by this module,
and causing the appearance of changes as every object identifier is changed
when updated projects are checked in to a version control repository.  To
mitigate this problem, this module chooses identifiers in a more deterministic
way, by hashing a description of each object as well as its parent and ancestor
objects.  This strategy should result in minimal "shift" in IDs as successive
generations of project files are produced.

THIS MODULE

This module introduces several classes, all derived from the XCObject class.
Nearly all of the "brains" are built into the XCObject class, which understands
how to create and modify objects, maintain the proper tree structure, compute
identifiers, and print objects.  For the most part, classes derived from
XCObject need only provide a _schema class object, a dictionary that
expresses what properties objects of the class may contain.

Given this structure, it's possible to build a minimal project file by creating
objects of the appropriate types and making the proper connections:

  config_list = XCConfigurationList()
  group = PBXGroup()
  project = PBXProject({'buildConfigurationList': config_list,
                        'mainGroup': group})

With the project object set up, it can be added to an XCProjectFile object.
XCProjectFile is a pseudo-class in the sense that it is a concrete XCObject
subclass that does not actually correspond to a class type found in a project
file.  Rather, it is used to represent the project file's root dictionary.
Printing an XCProjectFile will print the entire project file, including the
full "objects" dictionary.

  project_file = XCProjectFile({'rootObject': project})
  project_file.ComputeIDs()
  project_file.Print()

Xcode project files are always encoded in UTF-8.  This module will accept
strings of either the str class or the unicode class.  Strings of class str
are assumed to already be encoded in UTF-8.  Obviously, if you're just using
ASCII, you won't encounter difficulties because ASCII is a UTF-8 subset.
Strings of class unicode are handled properly and encoded in UTF-8 when
a project file is output.
�Nc��||k||kz
S�N�)�a�bs  �4/usr/lib/python3/dist-packages/gyp/xcodeproj_file.py�cmpr	�s��
��E�a�!�e���z^[A-Za-z0-9$./_]+$�___z[\\"]|[-]z^\$\((.*?)\)(/(.*))?$c��t�|��}|r+|�d��}|�d��}nd}|}||fS)z�Given input_path, returns a tuple with sourceTree and path values.

  Examples:
    input_path     (source_tree, output_path)
    '$(VAR)/path'  ('VAR', 'path')
    '$(VAR)'       ('VAR', None)
    'path'         (None, 'path')
  ��N)�_path_leading_variable�match�group)�
input_path�source_group_match�source_tree�output_paths    r�SourceTreeAndPathFromPathr�s]��.�3�3�J�?�?����$�*�*�1�-�-�K�$�*�*�1�-�-�K�K��K��K�
�{�	#�#r
c�.�tjdd|��S)Nz\$\((.*?)\)z${\1})�re�sub)�input_strings r�ConvertVariablesToShellSyntaxr�s��	����,�	7�	7�7r
c��eZdZdZiZdZgZdZeed��kr,e�	dez��edzZeed��k�,ded<d	ed
<ded<d
ed<ded<ded<d
ed<e
e��Zed��ed<ed��ed<ed��ed<d1d�Z
d�Zd�Zd�Zd�Zd�Zd�Zd2d�Zd�Zd�Zd �Zd!�Zd"�Zd#�Zd$�Zd%�Zd3d&�Zd'�Zej fd(�Z!d3d)�Z"d*�Z#d+�Z$d,�Z%d-�Z&d.�Z'd/�Z(d0�Z)dS)4�XCObjecta�The abstract base of all class types used in Xcode project files.

  Class variables:
    _schema: A dictionary defining the properties of this class.  The keys to
             _schema are string property keys as used in project files.  Values
             are a list of four or five elements:
             [ is_list, property_type, is_strong, is_required, default ]
             is_list: True if the property described is a list, as opposed
                      to a single element.
             property_type: The type to use as the value of the property,
                            or if is_list is True, the type to use for each
                            element of the value's list.  property_type must
                            be an XCObject subclass, or one of the built-in
                            types str, int, or dict.
             is_strong: If property_type is an XCObject subclass, is_strong
                        is True to assert that this class "owns," or serves
                        as parent, to the property value (or, if is_list is
                        True, values).  is_strong must be False if
                        property_type is not an XCObject subclass.
             is_required: True if the property is required for the class.
                          Note that is_required being True does not preclude
                          an empty string ("", in the case of property_type
                          str) or list ([], in the case of is_list True) from
                          being set for the property.
             default: Optional.  If is_requried is True, default may be set
                      to provide a default value for objects that do not supply
                      their own value.  If is_required is True and default
                      is not provided, users of the class must supply their own
                      value for the property.
             Note that although the values of the array are expressed in
             boolean terms, subclasses provide values as integers to conserve
             horizontal space.
    _should_print_single_line: False in XCObject.  Subclasses whose objects
                               should be written to the project file in the
                               alternate single-line format, such as
                               PBXFileReference and PBXBuildFile, should
                               set this to True.
    _encode_transforms: Used by _EncodeString to encode unprintable characters.
                        The index into this list is the ordinal of the
                        character to transform; each value is a string
                        used to represent the character in the output.  XCObject
                        provides an _encode_transforms list suitable for most
                        XCObject subclasses.
    _alternate_encode_transforms: Provided for subclasses that wish to use
                                  the alternate encoding rules.  Xcode seems
                                  to use these rules when printing objects in
                                  single-line format.  Subclasses that desire
                                  this behavior should set _encode_transforms
                                  to _alternate_encode_transforms.
    _hashables: A list of XCObject subclasses that can be hashed by ComputeIDs
                to construct this object's ID.  Most classes that need custom
                hashing behavior should do it by overriding Hashables,
                but in some cases an object's parent may wish to push a
                hashable value into its child, and it can do so by appending
                to _hashables.
  Attributes:
    id: The object's identifier, a 24-character uppercase hexadecimal string.
        Usually, objects being created should not set id until the entire
        project file structure is built.  At that point, UpdateIDs() should
        be called on the root object to assign deterministic values for id to
        each object in the tree.
    parent: The object's parent.  This is set by a parent XCObject when a child
            object is added to it.
    _properties: The object's property dictionary.  An object's properties are
                 described by its class' _schema variable.
  Fr� z\U%04xr
z\a�z\b�z\t�	z\n�
z\v�z\f��
Nc��||_||_i|_g|_|���|�|��dSr)�id�parent�_properties�
_hashables�_SetDefaultsFromSchema�UpdateProperties)�self�
propertiesr'r(s    r�__init__zXCObject.__init__0sK���D�G��D�K��D���D�O����!�!�!����*�%�%�%�%�%r
c���	|���}n.#t$r!d|jjt	|��fzcYSwxYwd|jj|t	|��fzS)Nz<%s at 0x%x>�<%s %r at 0x%x>)�Name�NotImplementedError�	__class__�__name__r'�r-�names  r�__repr__zXCObject.__repr__8st��B�
�Y�Y�[�[�d�d���B�B�B�
�t�~�6��4���A�
A�A�A�A�B������� 7��r�$�x�x�H�H�Hs��(A�Ac��|�|j|j���}|j���D�]�\}}|j|d}t
|t��r3|r&|���}||_||j|<�V||j|<�at
|t��st
|t��r||j|<��t
|t��ra|rKg|j|<|D]=}|���}||_|j|�|���>��|dd�|j|<��t
|t��rB|r"td|zdz|jjz���|���|j|<��ctd|jjzdz|zdz|jjz���|S)alMake a copy of this object.

    The new object will have its own copy of lists and dicts.  Any XCObject
    objects owned by this object (marked "strong") will be copied in the
    new object, even those found in lists.  If this object has any weak
    references to other XCObjects, the same references are added to the new
    object without making a copy.
    )r'r(�NzStrong dict for key � in zUnexpected type z	 for key )r4r'r(r)�items�_schema�
isinstancer�Copy�
basestring�int�list�append�dict�	TypeErrorr5�copy)r-�that�key�value�	is_strong�	new_value�item�new_items        rr?z
XCObject.Copy?s���>�>�T�W�T�[�>�9�9�D��&�,�,�.�.� N� N�
��U��,�s�#�A�&�i�	�E�8�	$�	$�N��	(��j�j�l�l�)�!�)�
�"+�$�
�3�
�
�"'�$�
�3�
�
��e�Z�(�(�N�J�u�c�,B�,B�N� %�������e�T�"�"�N��		+�#%�$�
�3�
��3�3�d��y�y�{�{�H�"�H�O���S�!�(�(��2�2�2�2�3�
#(����(�$�
�3�
�
��e�T�"�"�	N��	/��0�3�6��?��.�1�2�3�3�3�#(�*�*�,�,�$�
�3�
�
��*�U�_�-E�E�#�$�&)�*�,2�3�59�^�5L�M�N�N�	N��Kr
c��d|jvsd|jvr |jddr
|jdSt|jjdz���)z�Return the name corresponding to an object.

    Not all objects necessarily need to be nameable, and not all that do have
    a "name" property.  Override as needed.
    r7rz must implement Name)r)r=r3r4r5�r-s rr2z
XCObject.NamensW����!�!�!�	�4�<�	�	�D�L��$8��$;�	�
�
�f�
%�%�
�d�n�5�8N�N�
O�
O�Or
c�*�|���S)z�Return a comment string for the object.

    Most objects just use their name as the comment, but PBXProject uses
    different values.

    The returned comment is not escaped and does not have any comment marker
    strings applied to it.
    )r2rOs r�CommentzXCObject.Comments���9�9�;�;�r
c��|jjg}|���}|dkr|�|��|�|j��|Sr)r4r5r2rC�extendr*)r-�	hashablesr7s   r�	HashableszXCObject.Hashables�sU����(�)�I��9�9�;�;�D��t�|�|����t����
���T�_�%�%�%��r
c��dSrrrOs r�HashablesForChildzXCObject.HashablesForChild�s���4r
Tc��d�}|�t��}|���}|���}t|��dksJ�|D]}|||���|r�|���}|�|}	n:t|��dksJ�|���}	|D]}||	|���|���D]}
|
�|||	���|s|j��|jdzdksJ�|jdz}tj
dd|zz|�����}gd�}
td|��D]}|
|dzxx||zcc<�d	t|
��z|_dSdS)
a�Set "id" properties deterministically.

    An object's "id" property is set based on a hash of its class type and
    name, as well as the class type and name of all ancestor objects.  As
    such, it is only advisable to call ComputeIDs once an entire project file
    tree is built.

    If recursive is True, recurse into all descendant objects and update their
    hashes.

    If overwrite is True, any existing value set in the "id" property will be
    replaced.
    c��|�tjdt|������|�|�d����dS)aUUpdate hash with data's length and contents.

      If the hash were updated only with the value of data, it would be
      possible for clowns to induce collisions by manipulating the names of
      their objects.  By adding the length, it's exceedingly less likely that
      ID collisions will be encountered, intentionally or not.
      z>i�utf-8N)�update�struct�pack�len�encode)�hash�datas  r�_HashUpdatez(XCObject.ComputeIDs.<locals>._HashUpdate�sL���k�k�&�+�d�C��I�I�.�.�/�/�/�
�k�k�$�+�+�g�&�&�'�'�'�'�'r
Nr��>�I)rrrrz%08X%08X%08X)�	_new_sha1rFrUr^rW�Children�
ComputeIDsr'�digest_sizer\�unpack�digest�range�tuple)r-�	recursive�	overwrite�	seed_hashrbr`rT�hashable�hashables_for_child�
child_hash�child�digest_int_count�digest_ints�id_ints�indexs               rrhzXCObject.ComputeIDs�s���
(�
(�
(����+�+�i��>�>���D���� � �I��y�>�>�A������"�"���k�$��!�!�!�!��;� �2�2�4�4��	�	$��
�
��&�'�'�!�+�+�+�+��^�^�%�%�
�+�	,�	,�H�
�+�j�(�
+�
+�
+�
+��=�=�?�?�;�;�%�
����I�z�:�:�:�:��
0�D�G�O��
��
!�Q�
&�
&�
&�
&��)�Q�.���M�#��.>�(>�">����
�
�N�N�k��	�	�g���,�-�-�1�1�%����	����k�%�0�0�������w���/�d�g�g�g�$�Or
c�@�i}|���}|D]�}|j|vro||j}td|j�dt|j���dt|j���d|jd����d�	���|||j<��dS)zLVerifies that no two objects have the same ID.  Checks all descendants.
    z
Duplicate ID z, objects "z" and "z" in "�
rootObject�"N)�Descendantsr'�KeyError�strr)r2)r-�ids�descendants�
descendant�others     r�EnsureNoIDCollisionszXCObject.EnsureNoIDCollisions�s���
�C��"�"�$�$�K�!�&�&�
�	��#�	�	��J�M�"���h��}�}�}�c�*�"8�9�9�9�9��5�$�%�%�%�%�t�'7��'E�'J�'J�'L�'L�'L�'L�N�O�O�	O�&�c�*�-���&�&r
c��g}|j���D]a\}}|dd�\}}}|rL||jvrC|s!|�|j|���A|�|j|���b|S)z?Returns a list of all of this object's owned (strong) children.rr)r=r<r)rCrS)r-�children�property�
attributes�is_list�
property_typerJs       rrgzXCObject.Children�s����H� $�� 2� 2� 4� 4�6�6���*�,6�q��s�O�)�w�
�y�	�6�x�4�#3�3�3��	6�
�/�/�$�*�8�4�
5�
5�
5�
5�
�/�/�$�*�8�4�
5�
5�
5���Or
c��|���}|g}|D])}|�|������*|S)zSReturns a list of all of this object's descendants, including this
    object.
    )rgrSr|)r-r�r�rts    rr|zXCObject.Descendants�sP��
�}�}���H��&�K��.�.������*�*�,�,�-�-�-�-��r
c�F�|jr|j���SdSr)r(�PBXProjectAncestorrOs rr�zXCObject.PBXProjectAncestor�s%���{�.�
�[�
+�
+�
-�
-�-��4r
c�:�d|�dd��zdzS)z\Encodes a comment to be placed in the project file output, mimicing
    Xcode behavior.
    z/* z*/z(*)/z */)�replace)r-�comments  r�_EncodeCommentzXCObject._EncodeComments"���7�?�?�4��0�0�0�5�8�8r
c��|�d��}|dkrdS|dkrdS|jt|��S)Nr�\z\\r{z\")r�_encode_transforms�ord)r-r�chars   r�_EncodeTransformzXCObject._EncodeTransformsE���;�;�q�>�>�D�
�t�|�|�
�V��s�{�{�
�U��"�3�t�9�9�-�-r
c��t�|��rt�|��s|Sdt�|j|��zdzS)z[Encodes a string to be placed in the project file output, mimicing
    Xcode behavior.
    r{)�	_unquoted�search�_quoted�_escapedrr��r-rIs  r�
_EncodeStringzXCObject._EncodeString sT��D�������w�~�~�e�'<�'<��
�l�����d�3�U�;�;�;�c�A�Ar
c�<�|�d|z|z��dS)N�	)�write)r-�file�tabs�lines    r�_XCPrintzXCObject._XCPrintGs#���J�J�t�d�{�T�!�"�"�"�"�"r
c���d}d}|jrd}d}d}nd}d|dzz}d|z}t|t��r ||jz
}|���}�n�t|t
��r||�|��z
}�n�t|t��r-||�|�d����z
}�n�t|t��r|t|��z
}�n\t|t��r�|r_t|��dkrLt|��dkr||�d��z
}�n||�|d��z
}n�d	|z}|D](}	|||�|dz|	|��zd
z|zz
}�)||dzz
}n�t|t��ryd|z}t|�����D]I\}
}|||�|dz|
|��zd
z|�|dz||��zdz|zz
}�J||dzz
}nt!d|jjzdz���|dkr|d|�|��zz
}|S)aNReturns a representation of value that may be printed in a project file,
    mimicing Xcode's behavior.

    _XCPrintableValue can handle str and int values, XCObjects (which are
    made printable by returning their id property), and list and dict objects
    composed of any of the above types.  When printing a list or dict, and
    _should_print_single_line is False, the tabs parameter is used to determine
    how much to indent the lines corresponding to the items in the list or
    dict.

    If flatten_list is True, single-element lists will be transformed into
    strings.
    �Nr�
r�r
rZr�(�,�)�{� = �;�}zCan't make z
 printable)�_should_print_single_liner>rr'rQr~r�r@r_rArBr^�_XCPrintableValuerD�sortedr<rEr4r5r�)r-r�rI�flatten_list�	printabler��sep�element_tabs�end_tabsrL�item_key�
item_values            rr�zXCObject._XCPrintableValueJs����I��G��%���c��l��h�h��c��T�A�X�&�l����h��%��"�"�$O��5�8��i��
�
���g�g�	�E�3�	�	�!O��4�%�%�e�,�,�,�i�i�
�E�:�	&�	&�O��4�%�%�e�l�l�7�&;�&;�<�<�<�i�i�	�E�3�	�	�O��3�u�:�:��i�i�	�E�4�	 �	 �O�	�$�#�e�*�*��/�/��u�:�:��?�?�
�t�)�)�"�-�-�
-�)�)�
�t�)�)�%��(�3�3�
3�)�)��#�I�	��	!�	!�D�
�|��-�-�d�Q�h��l�K�K�L��� �!�!�)�)�	�X��^�#�	�	�	�E�4�	 �	 �	O���)�i�"(������"7�"7���
�(�J��\��"�"�4�!�8�X�|�D�D�E�GL�M��"�"�4�!�8�Z��F�F�G�IL�M�
��	�	�	��8�c�>�!�i�i��m�e�o�&>�>��M�N�N�N��$����3��,�,�W�5�5�5�5�i��r
c��|jrd}d}nd|z}d}|dkrt|t��r|j}n|}|dkrt|t��rd}nd}|d	krt|t
��rd}	nd}		|�|||	��}
|�|||	��}|r5t|��d
kr"|ddkr|d
dkr
|d
d
�}||
dz|zdz|zz
}n6#t$r)}tj
�|d|z���d}~wwxYw|�|d|��dS)a,Prints a key and value, members of an XCObject's _properties dictionary,
    to file.

    tabs is an int identifying the indentation level.  If the class'
    _should_print_single_line variable is True, tabs is ignored and the
    key-value pair will be followed by a space insead of a newline.
    r�rr�r��remoteGlobalIDString�settingsTF�
buildSettingsr
rr{���r�r�zwhile printing key "%s"N)
r�r>�PBXContainerItemProxyr'�PBXBuildFile�XCBuildConfigurationr�r^rE�gyp�common�ExceptionAppendr�)
r-r�r�rHrIr��after_kv�value_to_print�strip_value_quotesr��
printable_key�printable_value�es
             r�
_XCKVPrintzXCObject._XCKVPrint�s����%���i��h�h���+�i��h��$�$�$��D�4I�*K�*K�$��x�n�n��n�
�j���Z��l�;�;����� ���o���*�T�3G�"H�"H���l�l��l���,�,�T�3��E�E�m��.�.�t�^�/;�=�=�o�	�0��O� 4� 4�q� 8� 8�
�!�
��
#�
#���(;�s�(B�(B�)�!�B�$�/���=�5�(�?�:�S�@�8�K�K�i�i������	�j� � ��!:�S�!@�B�B�B����������
	�M�M�$��9�%�%�%�%�%s�:A6C1�1
D$�;$D�D$c��|���|jrd}d}nd}d}|�|d|�d|��dz|z��|�|dd|jj��t|j�	����D]\}}|�|d||���|�||d��d	S)
z[Prints a reprentation of this object to file, adhering to Xcode output
    formatting.
    r�rr�r:z = {r�isa�};
N)
�VerifyHasRequiredPropertiesr�r�r�r�r4r5r�r)r<)r-r�r�r�r�rIs      r�PrintzXCObject.Print�s���
	�$�$�&�&�&��%��
�c��h�h��c��h�	�M�M�$��4�1�1�!�T�:�:�V�C�c�I�J�J�J�
	�O�O�D�!�U�D�N�$;�<�<�<�"�$�"2�"8�"8�":�":�;�;�0�0���%�
�o�o�d�A�x��/�/�/�/�	�M�M�$��&�)�)�)�)�)r
c��|�dS|���D�]�\}}||jvrt|dz|jjz���|j|dd�\}}}|r�|jt
kr/t
|dz|jjzdz|jjz���|D]o}t||��s]t|t��r|tks=t
d|zdz|jjzdz|jzd	z|jjz����pnjt||��sZt|t��r|tks:t
|dz|jjzdz|jzd	z|jjz���|�rFt|t��r,|r|���|j|<�n||j|<�nt|t��st|t��r||j|<n�t|t
��rW|rBg|j|<|D]4}|j|�|������5n�|dd�|j|<nnt|t��r|���|j|<n<t
d
|jjzdz|zdz|jjz���||j|<|r-|s||j|_���|j|D]	}||_�
���dS)
a�Merge the supplied properties into the _properties dictionary.

    The input properties must adhere to the class schema or a KeyError or
    TypeError exception will be raised.  If adding an object of an XCObject
    subclass and the schema indicates a strong relationship, the object's
    parent will be set to this object.

    If do_copy is True, then lists, dicts, strong-owned XCObjects, and
    strong-owned XCObjects in lists will be copied instead of having their
    references added.
    N� not in rr� of z must be list, not �item of �	 must be �, not zDon't know how to copy a z object for r;)r<r=r}r4r5rBrEr>r@r~rr?r)rArCrDrFr()	r-r.�do_copyr�rIr�r�rJrLs	         rr,zXCObject.UpdateProperties�s������f�%�+�+�-�-�?�?���%�
���
%�
%��x�*�,�t�~�/F�F�G�G�G�-1�L��,B�1�Q�3�,G�)�w�
�y�	�L��?�d�"�"���6�!�D�N�$;�;�%�&�(-��(@�A�B�B�B��	+�	+�D��D�-�0�0�+��T�:�.�.�+�3@�C�3G�3G���x�'�&�0�4�>�3J�J��� -� 6�7�9A�B��.�)�*�+�+�
+��	+��%��/�/�L��5�*�-�-�L�2?�3�2F�2F�����$�.�"9�9�K�G��$�%�'/�0�27�/�2J�K�L�L�	L�

�+��e�X�&�&�	G�
�/�).�����D��X�&�&�).�D��X�&�&�
��z�
*�
*�	G�j���.D�.D�	G�',�$�
�8�
$�
$�
��t�
$�
$�	G�
�2�*,�D��X�&��
=�
=����x�(�/�/��	�	���<�<�<�<�
=�*/�q�q�q��D��X�&�&�
��t�
$�
$�	G�',�z�z�|�|�$�
�8�
$�
$��5��/�2�3�5C�D�"�#�%+�,�.2�n�.E�F�G�G�G�&+����"�
���	�.2�$�
�8�
$�
+�
+��&�x�0���d��D�K�K��?�?r
c��||jvSr�r)�r-rHs  r�HasPropertyzXCObject.HasPropertyEs���$�"�"�"r
c��|j|Srr�r�s  r�GetPropertyzXCObject.GetPropertyHs����C� � r
c�4�|�||i��dSr)r,�r-rHrIs   r�SetPropertyzXCObject.SetPropertyKs �����3��,�'�'�'�'�'r
c�,�||jvr
|j|=dSdSrr�r�s  r�DelPropertyzXCObject.DelPropertyNs)��
�d����
�
�3�
�
�
��r
c���||jvrt|dz|jjz���|j|dd�\}}}|s"t	|dz|jjzdz���t||��s=t	d|zdz|jjzdz|jzdz|jjz���||jvr
g|j|<|r||_|j|�|��dS)	Nr�rrr�z
 must be listr�r�r�)	r=r}r4r5rEr>r)r(rC)r-rHrIr�r�rJs      r�AppendPropertyzXCObject.AppendPropertyRs)���$�,����S�:�%���(?�?�@�@�@�*.�,�s�*;�A�a�C�*@�'�W�m�Y��P��c�F�l�T�^�%<�<��N�O�O�O��e�]�+�+�0��j�3�&��/�$�.�2I�I�!�"�$1�$:�;�=E�F��o�.�/�
0�
0�0��$�"�"�"� �d��s�����e�l�	��S�� � ��'�'�'�'�'r
c��|j���D]>\}}|dd�\}}}}|r(||jvrt|jjdz|z����?dS)zQEnsure that all properties identified as required by the schema are
    set.
    rrcz
 requires N)r=r<r)r}r4r5)r-r�r�r�r�rJ�is_requireds       rr�z$XCObject.VerifyHasRequiredPropertiesms~��!%�� 2� 2� 4� 4�J�J���*�9C�A�a�C��6�w�
�y�+�	�J�X��)9�9�9��t�~�.��=��H�I�I�I��J�Jr
c��i}|j���D]?\}}|dd�\}}}}|r)t|��dkr||jvr
|d}|||<�@t|��dkr|�|d���dSdS)zyAssign object default values according to the schema.  This will not
    overwrite properties that have already been set.rrc�T)r�N)r=r<r^r)r,)	r-�defaultsr�r�r�r�rJr��defaults	         rr+zXCObject._SetDefaultsFromSchemays����H� $�� 2� 2� 4� 4�%�%���*�9C�A�a�C��6�w�
�y�+�	�%��Z���A�-�-��$�*�*�*��Q�-��$�����
�8�}�}�q������H�d��3�3�3�3�3��r
�NNN�TTN�F)*r5�
__module__�__qualname__�__doc__r=r�r��ir�rCrB�_alternate_encode_transforms�chrr/r8r?r2rQrUrWrhr�rgr|r�r�r�r�r�r�r��sys�stdoutr�r,r�r�r�r�r�r�r+rr
rrr�s�������A�A�F
�'�#�����!�	�C�C��H�H������i�!�m�,�,�,�	�A��A�	
�C�C��H�H��� ��Q����Q����Q�� ��R�� ��R�� ��R�� ��R��!%��&8�!9�!9��$'�C��F�F��q�!�%(�S��W�W��r�"�%(�S��W�W��r�"�&�&�&�&�I�I�I�-�-�-�^P�P�P�"
�
�
�	�	�	����<0�<0�<0�<0�|
&�
&�
&����	�	�	����9�9�9�
.�
.�
.�%B�%B�%B�N#�#�#�D�D�D�D�L<&�<&�<&�|�z�$*�$*�$*�$*�LO�O�O�O�b#�#�#�!�!�!�(�(�(� � � �(�(�(�6
J�
J�
J�4�4�4�4�4r
rc��eZdZdZej���Ze�deddgdeddgde	ddgde	ddgde	ddgdedddgde	ddgde	ddgde	ddgd�	��dd�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�ZdS)�XCHierarchicalElementzVAbstract base for PBXGroup and PBXFileReference.  Not represented in a
  project file.rr
�<group>)	�comments�fileEncoding�includeInIndex�indentWidth�
lineEnding�
sourceTree�tabWidth�usesTabs�
wrapsLinesNc��t�||||��d|jvrLd|jvrC|jd}tj|��}|dkr||kr|�d|��d|jvr|d|jvs|jddkrdt
|jd��\}}|dkr
||jd<|dkr
||jd<|dkr#|�#d|jvr|jd=||jd<dSdSdSdSdSdS)N�pathr7r�r�r�)rr/r)�	posixpath�basenamer�r)r-r.r'r(rr7rs       rr/zXCHierarchicalElement.__init__�sQ�����d�J��F�3�3�3�
��!�!�!�&�D�4D�*D�*D�
�
�f�
%�d�
�
��
%�
%�d�	
�������������&�&�&�
��!�!�!�
�T�-�
-�
-�	
�	�,�	'�9�	4�	4�6�d�6F�v�6N�O�O��{�D�	��	�	�)4����&�	
����#'���� �	��	�	���
�t�'�
'�
'�
��V�$�#.���� � � �#"�!�	4�	4�
�	���
'�
'r
c�^�d|jvr
|jdSd|jvr
|jdSdS)Nr7rr�rOs rr2zXCHierarchicalElement.Name�sA��
��!�!�!�
�
�f�
%�%�	�4�#�	#�	#�
�
�f�
%�%��Tr
c�8�||���jdkrt�|��Sg}d|jvrB|�|jjdz��|�|jd��|���}|dkr[|�tj
��}|D]9}|�|jjdz��|�|���:|�|j��|S)aCCustom hashables for XCHierarchicalElements.

    XCHierarchicalElements are special.  Generally, their hashes shouldn't
    change if the paths don't change.  The normal XCObject implementation of
    Hashables adds a hashable for each object, which means that if
    the hierarchical structure changes (possibly due to changes caused when
    TakeOverOnlyChild runs and encounters slight changes in the hierarchy),
    the hashes will change.  For example, if a project file initially contains
    a/b/f1 and a/b becomes collapsed into a/b, f1 will have a single parent
    a/b.  If someone later adds a/f2 to the project file, a/b can no longer be
    collapsed, and f1 winds up with parent b and grandparent a.  That would
    be sufficient to change f1's hash.

    To counteract this problem, hashables for all XCHierarchicalElements except
    for the main group (which has neither a name nor a path) are taken to be
    just the set of path components.  Because hashables are inherited from
    parents, this provides assurance that a/b/f1 has the same set of hashables
    whether its parent is b or a/b.

    The main group is a special case.  As it is permitted to have no name or
    path, it is permitted to use the standard XCObject hash mechanism.  This
    is not considered a problem because there can be only one main group.
    �	mainGroupr7z.nameNz.path)
r�r)rrUrCr4r5�PathFromSourceTreeAndPath�splitrr�rSr*)r-rTr�
components�	components     rrUzXCHierarchicalElement.Hashables�s��2�t�&�&�(�(�4�[�A�A�A�
�
�
��
%�
%�%��I�
��!�!�!����t�~�.��8�9�9�9����t�'��/�0�0�0��)�)�+�+�D��t�|�|��:�:�i�m�,�,�j�!�$�$�)������0�7�:�;�;�;�����#�#�#�#�
���T�_�%�%�%��r
c���tdtdtdi}||j}||j}||kr4t	|���|�����S|dkrdSdS)Nr�rr�r
)�PBXFileReference�PBXGroup�PBXVariantGroupr4r	r2)r-r��valid_class_types�	self_type�
other_types     r�ComparezXCHierarchicalElement.Compare�sw����������
"�$�.�1�I�"�5�?�3�J��J���
������e�j�j�l�l�
+�
+�+��G���
�R��1r
c��gd�}|���}|���}t|t��o||v}t|t��o||v}|s|s|�|��S||vr||vrdS||vr||vrdS|�|��}|�|��}||krdS||krdSdS)N)�Source�
Intermediates�Projects�
Frameworks�Products�Buildr�r
r)r2r>rrrx)	r-r��order�	self_name�
other_name�self_in�other_in�
self_index�other_indexs	         r�CompareRootGroupz&XCHierarchicalElement.CompareRootGroups���
�
�
�E��	�	���I������J���x�(�(�?�Y�%�-?�G��$��)�)�A�j�E�.A�H��!�8�!�
�\�\�%�
 �
 � ��E���*��"5�"5�
�R��U���9��#5�#5�
�Q����Y�'�'�J��+�+�j�)�)�K��K���
�R��K���
�Q��1r
c��g}|jddkr&|�d|jdzdz��d|jvr |�|jd��t|��dkrtj|�SdS)Nr�r�z$(r�rr)r)rCr^r�join)r-r
s  rrz/XCHierarchicalElement.PathFromSourceTreeAndPath3s���
�J����%��2�2�����t�/��=�=��C�D�D�D�
��!�!�!�����(��0�1�1�1�
�:������
�^�Z�
(�(��4r
c��|}d}t|t��r�|�*|�d��s�|�d��s�|���}|dkr|dkrt	j||��}n|dkr|}|j}t|t��r,|�\|�d��s|�d����|S)N�/�$)r>r��
startswithrrr$r()r-�xcher�	this_paths    r�FullPathzXCHierarchicalElement.FullPathCs����D��D�
�T�0�
1�
1���<�����$�$��-1�_�_�S�-A�-A���0�0�2�2�i�	�d�	�	�t�t�|�|��~�i��.�.���������
�[�d��T�0�
1�
1���<�����$�$��-1�_�_�S�-A�-A���Kr
r�)r5r�r�r�rr=rFr[r~rAr/r2rUrr"rr+rr
rr�r��s*��������
��!�!�#�#�'�	�.�.��#�q�!�n��#�q�!�n��#�q�!�n��#�q�!�n��#�q�!�n��#�q�!�Y�/��#�q�!�n��#�q�!�n��#�q�!�n�
�
�
�
�
�/�/�/�/�8���5�5�5�n
�
�
�(
�
�
�B��� ����r
r�c���eZdZdZej���Ze�deddggdeddgdeddgd���dd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zdd�Zd�ZdS)ra
  Attributes:
    _children_by_path: Maps pathnames of children of this PBXGroup to the
      actual child XCHierarchicalElement objects.
    _variant_children_by_name_and_path: Maps (name, path) tuples of
      PBXVariantGroup children to the actual child PBXVariantGroup objects.
  r
r)r�r7rNc���t�||||��i|_i|_|j�dg��D]}|�|���dS�Nr�)r�r/�_children_by_path�"_variant_children_by_name_and_pathr)�get�_AddChildToDicts)r-r.r'r(rts     rr/zPBXGroup.__init__hso���"�"�4��R��@�@�@��D��.0�D�+��!�%�%�j�"�5�5�#�#��
���E�"�"�"�"�#�#r
c���t�|��}|j�dg��D]1}|���}|dkr|�|���2|Sr.)r�rUr)r1r2rC)r-rTrt�
child_names    rrUzPBXGroup.Hashablespsl��%�/�/��5�5�I��!�%�%�j�"�5�5�%�%���:�:�<�<�j�	�t�	�	�����$�$�$���r
c�6�t�|��Sr)r�rUrOs rrWzPBXGroup.HashablesForChilds��!�*�*�4�0�0�0r
c�r�|���}|r%||jvrtd|z���||j|<t|t��rf|j�dd��}||f}||jvr2tdt|��zdzt|��z���||j|<dSdS)Nz"Found multiple children with path r7z2Found multiple PBXVariantGroup children with name z
 and path )	rr/�
ValueErrorr>rr)r1r0r~)r-rt�
child_pathr4rHs     rr2zPBXGroup._AddChildToDicts�s����0�0�2�2�J��1�	�t�-�	-�	-��=�
�J�K�K�K�+0�d��Z�(��%��)�)�;��$�(�(���6�6�j�
��$�c�	��7�	7�	7��!�#&�z�?�?�3�5A�B��Z���)�*�*�	*�6;�d�-�c�2�2�2�;�;r
c�\�|�d|��|�|��dSr.)r�r2�r-rts  r�AppendChildzPBXGroup.AppendChild�s4��	���
�E�*�*�*����%� � � � � r
c�t�d|jvrdS|jdD]}|���|kr|cS�dSr.)r)r2)r-r7rts   r�GetChildByNamezPBXGroup.GetChildByName�sV����)�)�)�
�T��!�*�-����	������	�	�����
��4r
c�:�|sdS||jvr
|j|SdSr)r/�r-rs  r�GetChildByPathzPBXGroup.GetChildByPath�s0����
�T��t�%�%�%�
�
#�D�
)�)��4r
c��d|jvrdS|jdD]:}t|t��s�|jd}|jd|kr|cS�;dS)Nr��	remoteRefr�)r)r>�PBXReferenceProxy)r-�
remote_objectrt�container_proxys    r�GetChildByRemoteObjectzPBXGroup.GetChildByRemoteObject�s{����)�)�)�
�T��!�*�-����
��0�
1�
1����)�+�6�o�	�	$�%;�	<�
�	M�	M�����
N��4r
c��d}|�d��rd}tj|��}|r|dz}d}tj|��}tj|��}tj|��}tj|��\}}	|	dkr|}|dkrd}|r|�J�|�tj��}
t|
��dks|s|dkrt|
��dks|�s|�U|�	|��}|dkr|j
tksJ�n�td	|i��}|�|��n�tj|��}|�
||��}
tj�|
d
d���}|
�	|��}|dkr|j
tksJ�n't||d���}|
�|��|
}|S|
d}|�	|��}|dkr|j
tksJ�n&td	|i��}|�|��|�tj�|
dd���|��S)
abReturns an existing or new file reference corresponding to path.

    If hierarchical is True, this method will create or use the necessary
    hierarchical group structure corresponding to path.  Otherwise, it will
    look in and create an item in the current group only.

    If an existing matching reference is found, it is returned, otherwise, a
    new one will be created, added to the correct group, and returned.

    If path identifies a directory by virtue of carrying a trailing slash,
    this method returns a PBXFileReference of "folder" type.  If path
    identifies a variant, by virtue of it identifying a file inside a directory
    with an ".lproj" extension, this method returns a PBXVariantGroup
    containing the variant named by path, and possibly other variants.  For
    all other paths, a "normal" PBXFileReference will be returned.
    Fr&TNz.lprojr�r
r:r���)r7rr)�endswithr�normpath�dirnamer�splitextr	r�r^r@r4r
r;�!AddOrGetVariantGroupByNameAndPathr$r�AddOrGetFileByPath)r-r�hierarchical�is_dir�variant_namer(�grandparent�parent_basename�parent_root�
parent_ext�
path_split�file_ref�variant_group_name�variant_group_ref�variant_path�variant_ref�next_dir�	group_refs                  rrNzPBXGroup.AddOrGetFileByPath�s���&�F��}�}�S�����f���d�#�#�D�
��
�C�Z�d��L�
�
�t�
$�
$�F��#�F�+�+�K��(��0�0�O� )� 2�?� C� C��[�*��X��� �l��b����k��-��-�-�-����I�M�*�*�J�
�:���!���	���4�'�'�S��_�_��-A�-A��.B�
�	��&�&�t�,�,���t����#�'7�7�7�7�7�7�%�v�t�n�5�5�(�
�
�
�8�
$�
$�
$�
$�'�/��5�5�� �B�B���-�-�� �}�)�)�*�R�S�S�/�:�:��'�6�6�|�D�D���$����&�*:�:�:�:�:�:�(�,�2>�*@�*@�A�A�+�
�
'�
'��
4�
4�
4�%��
�o�
�A��h��%�%�h�/�/�i�	�d�	�	��"�h�.�.�.�.�.��f�h�/�0�0�	�����#�#�#�
�
)�
)�)�-�*<�*<�Z����^�*L�*L�*6�8�8�8r
c���||f}||jvr!|j|}|jtksJ�|Sd|i}|dkr||d<t|��}|�|��|S)a�Returns an existing or new PBXVariantGroup for name and path.

    If a PBXVariantGroup identified by the name and path arguments is already
    present as a child of this object, it is returned.  Otherwise, a new
    PBXVariantGroup with the correct properties is created, added as a child,
    and returned.

    This method will generally be called by AddOrGetFileByPath, which knows
    when to create a variant group based on the structure of the pathnames
    passed to it.
    r7Nr)r0r4rr;)r-r7rrHrY�variant_group_propertiess      rrMz*PBXGroup.AddOrGetVariantGroupByNameAndPath*s�����,�C�
�d�5�5�5��A�#�F��
�
(�O�
;�
;�
;�
;�
�� &��~���t�|�|�)-��v�&�'�(@�A�A�����&�'�'�'��r
Fc���t|jd��dk�r�|jddjtk�rw|jdd}|j}|j|_|j|_d|jvs|jddkr`d|vrHd|jvr/tj|d|jd��|jd<n|d|jd<d|vr|d|jd<d|vr:|ddkr.|d|���kr|d|jd<d|jvr-d|jvr$|jd|jdkr|jd=|jdD]	}||_�
t|jd��dkr"|jddjtk��w|r5|jdD])}|jtkr|�	|���(dSdS)	a!If this PBXGroup has only one child and it's also a PBXGroup, take
    it over by making all of its children this object's children.

    This function will continue to take over only children when those children
    are groups.  If there are three PBXGroups representing a, b, and c, with
    c inside b and b inside a, and a and b have no other children, this will
    result in a taking over both b and c, forming a PBXGroup for a/b/c.

    If recurse is True, this function will recurse into children and ask them
    to collapse themselves by taking over only children as well.  Assuming
    an example hierarchy with files at a/b/c/d1, a/b/c/d2, and a/b/c/d3/e/f
    (d1, d2, and f are files, the rest are groups), recursion will result in
    a group for a/b/c containing a group for d3/e.
    r�r
rr�r�rr7N)
r^r)r4rr/rr$r2r(�TakeOverOnlyChild)r-�recursert�old_propertiess    rrazPBXGroup.TakeOverOnlyChildEsE��(�d��z�*�
+�
+�q�
0�
0�
�
�:�
&�q�
)�
3�x�
?�
?���z�*�1�-�e�
�'�n��*�d��$�6�d��
�T�-�
-�
-�	
�	�,�	'�9�	4�	4��^�#�#�
�t�'�
'�
'�'0�~�n�V�6L�6:�6F�v�6N�(P�(P�D��V�$�$�(6�f�'=�D��V�$��>�)�)�+9�,�+G�$�
�<�
(�

�>�	!�	!�n�V�&<��&D�&D�	��	�4�9�9�;�;�	.�	.�#1�&�#9���� �	�4�#�	#�	#��$�2B�(B�(B�	
�	�&�	!�T�%5�f�%=�	=�	=���V�$��#�J�/���%�����U�d��z�*�
+�
+�q�
0�
0�
�
�:�
&�q�
)�
3�x�
?�
?�X�+��#�J�/�+�+�%��?�h�&�&�
�
!�
!�'�
*�
*�
*��+�+�+�+r
c��t|jdtjtj�����|jd<|jdD]+}t
|t��r|����,dS)Nr��rH)	r�r)�	functools�
cmp_to_keyr�rr>r�	SortGroupr:s  rrhzPBXGroup.SortGroup�s����t��
�+��'�(=�(E�F�F�	H�	H�	H�	��Z� �
�!�*�-����	�E�8�	$�	$��
��������r
r�r�)r5r�r�r�r�r=rFr[r~r/rUrWr2r;r=r@rFrNrMrarhrr
rrrXsB��������
"�)�.�.�0�0�'�	�.�.��)�1�a��4��C�1�a�0��C�1�a�0������#�#�#�#�
�
�
�1�1�1�
;�;�;�"!�!�!����$������,[8�[8�[8�z���6D+�D+�D+�D+�L����r
rc��eZdZd�ZdS)�XCFileLikeElementc��g}|}|dkrvt|t��ra|���}t|��D]\}}|�||���|j}|dkrt|t���a|Sr)r>r�rU�	enumerate�insertr()r-rTr)�xche_hashablesrx�
xche_hashables      r�
PathHashableszXCFileLikeElement.PathHashables�s����I��D�
�$�,�,�:�d�,A�B�B�,��~�~�'�'�n�"+�N�";�";�/�/�
�%������
�.�.�.�.�
�[�d�	�$�,�,�:�d�,A�B�B�,�
�r
N)r5r�r�rprr
rrjrj�s#����������r
rjc��eZdZdS)�XCContainerPortalN�r5r�r�rr
rrrrr���������$r
rrc��eZdZdS)�XCRemoteObjectNrsrr
rrvrv�rtr
rvc	��eZdZej���Ze�deddgdeddgdeddgdeddgd���dZej	Z
dd�ZdS)r
rr
)�explicitFileType�lastKnownFileTyper7rTNc�B�t�||||��d|jvr@|jd�d��r |jddd�|jd<d}nd}d|jv�r(d|jv�r d|jv�ridd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�d$d%�id&d'�d(d)�d*d+�d,d-�d.d/�d0d1�d2d3�d4d5�d6d7�d8d9�d:d7�d;d<�d=d>�d?d@�dAd@�dBdC�dDdE��dFdGd
dHdIdJdKdLdMdNdO�
�}ddddP�}|rdQ}d}n�t	j|jd��}	t	j|	��\}
}|dRkr|dSd����}|�|dT��}|�|d��}||j|<dSdSdSdS)UNrr&r�TFryrxr�
archive.ar�app�wrapper.application�bdicr��bundle�wrapper.cfbundle�czsourcecode.c.c�cczsourcecode.cpp.cpp�cpp�cssztext.css�cxx�dart�
sourcecode�dylib�compiled.mach-o.dylib�	framework�wrapper.frameworkr��gypi�hzsourcecode.c.h�hxxzsourcecode.cpp.h�icnsz
image.icns�javazsourcecode.java�jszsourcecode.javascript�kext�wrapper.kext�mzsourcecode.c.objc�mmzsourcecode.cpp.objcpp�nibzwrapper.nib�ozcompiled.mach-o.objfile�pdfz	image.pdf�plztext.script.perl�plistztext.plist.xml�pm�pngz	image.png�pyztext.script.python�rzsourcecode.rez�rez�szsourcecode.asm�
storyboardzfile.storyboardztext.plist.stringszsourcecode.swiftzfolder.assetcatalogz
text.xcconfigzwrapper.xcdatamodelzwrapper.xcdatamodeldzfile.xibzsourcecode.yaccz&sourcecode.text-based-dylib-definition)
�strings�swift�ttf�xcassets�xcconfig�xcdatamodel�xcdatamodeld�xib�y�tbd)r�r�r��folderr�r
�text)	rjr/r)rIrrrL�lowerr1)r-r.r'r(rP�
extension_map�prop_map�	file_type�	prop_namer�root�exts            rr/zPBXFileReference.__init__�sY�����t�Z��V�<�<�<�
��!�!�!�d�&6�v�&>�&G�&G��&L�&L�!�!%�!1�&�!9�#�2�#�!>�d��v���f�f��f�
��!�!�!��4�#3�3�3��$�"2�2�2�-��|�-�
�,�-�	�v�-�	�)�	-�
	�'�-�	
�+�
-�	�+�-�	�z�-�	�+�-�	�|�-�	�.�-�	�*�-�	�|�-�	�|�-�	�'�-� 	�)�!-�"	�|�#-�-�$	�(�%-�&	
�.�'-�(	�~�)-�*	�*�+-�,	
�.�--�.	�}�/-�0	�0�1-�2	�{�3-�4	
�)�5-�6	�'�7-�8	
�)�9-�:	�{�;-�<	
�+�=-�>	�'�?-�@	�'�A-�B	�'�C-�D	�(�E-�-�F,�)��,�&�,�-�!�(�?�Y-�-�-�m�`*�)�)���h�
�;��	�'�	�	��%�d�&6�v�&>�?�?���(��2�2���s�
�"�9�9��A�B�B��
�
���#�
"�%�%�c�6�2�2�	��L�L��&9�:�:�	�$-�d��y�!�!�!�["�!�3�3�2�2r
r�)r5r�r�rjr=rFr[r~r�r�r�r/rr
rr
r
�s��������%�*�*�,�,�'�	�.�.��S�!�Q���S�!�Q���S�!�Q���S�!�Q��	�����#��(�E��V.�V.�V.�V.�V.�V.r
r
c��eZdZdZdS)rz<PBXVariantGroup is used by Xcode to represent localizations.N)r5r�r�r�rr
rrrs������D�D��$r
rc��eZdZej���Ze�deddgdeddigde	ddgd���d�Z
d�Zd�Zd�Z
d�Zd	�Zd
S)r�rr
)�baseConfigurationReferencer�r7c� �||jdvS�Nr�r�r�s  r�HasBuildSettingz$XCBuildConfiguration.HasBuildSetting1s���$�"�?�3�3�3r
c�(�|jd|Sr�r�r�s  r�GetBuildSettingz$XCBuildConfiguration.GetBuildSetting4s����O�,�S�1�1r
c�&�||jd|<dSr�r�r�s   r�SetBuildSettingz$XCBuildConfiguration.SetBuildSetting7s��-2�D��_�%�c�*�*�*r
c��||jdvrg|jd|<|jd|�|��dSr�)r)rCr�s   r�AppendBuildSettingz'XCBuildConfiguration.AppendBuildSetting;sN���$�"�?�3�3�3�/1�d���'��,���_�%�c�*�1�1�%�8�8�8�8�8r
c�D�||jdvr|jd|=dSdSr�r�r�s  r�DelBuildSettingz$XCBuildConfiguration.DelBuildSetting@s3��
�d���/�/�/�
�
�?�
+�C�
0�
0�
0�0�/r
c��||jd<dS)Nr�r�r�s  r�SetBaseConfigurationz)XCBuildConfiguration.SetBaseConfigurationDs��5:�D��1�2�2�2r
N)r5r�r�rr=rFr[r
rDr~r�r�r�r�r�r�rr
rr�r�)s���������!�!�#�#�'�	�.�.�#$�&6��1�"=�#$�d�A�q�"�"5�#$�c�A�q�/������4�4�4�2�2�2�3�3�3�9�9�9�
1�1�1�;�;�;�;�;r
r�c	��eZdZeddi��eddi��gZej���Ze�deddegde	dddgde
dddgd���d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�ZdS)�XCConfigurationListr7�Debug�Releaser
r)�buildConfigurations�defaultConfigurationIsVisible�defaultConfigurationNamec�j�d|jjjzdz|j���zdzS)NzBuild configuration list for z "r{)r(r4r5r2rOs rr2zXCConfigurationList.NameSsC��*��;� �)�*�,0�1�37�;�3C�3C�3E�3E�F�HK�L�Lr
c�j�|jdD]}|jd|kr|cS�t|���)z?Convenience accessor to obtain an XCBuildConfiguration by name.r�r7)r)r})r-r7�
configurations   r�ConfigurationNamedz&XCConfigurationList.ConfigurationNamedWsL���)�*?�@���
�	�	"�6�	*�d�	2�	2�����
3��4�.�.�r
c�B�|�|jd��S)z@Convenience accessor to obtain the default XCBuildConfiguration.r�)r�r)rOs r�DefaultConfigurationz(XCConfigurationList.DefaultConfiguration_s���"�"�4�#3�4N�#O�P�P�Pr
c���d}d}|jdD]J}|�|��}|�|}n	||krdS|r#|�|��}|�|}�A||krdS�K|sdSdS)a�Determines the state of a build setting in all XCBuildConfiguration
    child objects.

    If all child objects have key in their build settings, and the value is the
    same in all child objects, returns 1.

    If no child objects have the key in their build settings, returns 0.

    If some, but not all, child objects have the key in their build settings,
    or if any children have different values for the key, returns -1.
    Nr�r�rr
)r)r�r�)r-rH�hasrIr��configuration_has�configuration_values       rr�z#XCConfigurationList.HasBuildSettingcs����C��E��)�*?�@���
�'�7�7��<�<��	������#�#�#��r�r�	��+�;�;�C�@�@���=�%�%�%�
�)�
)�
)�������
�Q��1r
c��d}|jdD]4}|�|��}|�|}�||krtd|z����5|S)z�Gets the build setting for key.

    All child XCConfiguration objects must have the same value set for the
    setting, or a ValueError will be raised.
    Nr�zVariant values for )r)r�r7)r-rHrIr�r�s     rr�z#XCConfigurationList.GetBuildSetting�sm��
�E��)�*?�@�8�8�
�)�9�9�#�>�>��	��#����'�'�'��0�3�6�7�7�
7�(��Lr
c�R�|jdD]}|�||���dS)z[Sets the build setting for key to value in all child
    XCBuildConfiguration objects.
    r�N�r)r��r-rHrIr�s    rr�z#XCConfigurationList.SetBuildSetting�s?��
�)�*?�@�0�0�
��#�#�C��/�/�/�/�0�0r
c�R�|jdD]}|�||���dS)z{Appends value to the build setting for key, which is treated as a list,
    in all child XCBuildConfiguration objects.
    r�N�r)r�r�s    rr�z&XCConfigurationList.AppendBuildSetting�s?��
�)�*?�@�3�3�
��&�&�s�E�2�2�2�2�3�3r
c�P�|jdD]}|�|���dS)zSDeletes the build setting key from all child XCBuildConfiguration
    objects.
    r�N�r)r�)r-rHr�s   rr�z#XCConfigurationList.DelBuildSetting�s=��
�)�*?�@�)�)�
��#�#�C�(�(�(�(�)�)r
c�P�|jdD]}|�|���dS)zLSets the build configuration in all child XCBuildConfiguration objects.
    r�N)r)r�)r-rIr�s   rr�z(XCConfigurationList.SetBaseConfiguration�s=���)�*?�@�0�0�
��(�(��/�/�/�/�0�0r
N)r5r�r�r��_configsrr=rFr[rAr~r2r�r�r�r�r�r�r�r�rr
rr�r�Gs0������#�#�V�W�$5�6�6�#�#�V�Y�$7�8�8�;�(�
��!�!�#�#�'�	�.�.�&'�)=�q�!�X�%N�&'��q�!�Q�%G�&'��q�!�Y�%O������L�L�L����Q�Q�Q� 
� 
� 
�D���*0�0�0�3�3�3�)�)�)�0�0�0�0�0r
r�c��eZdZej���Ze�deddgdeddgd���dZ	ej
Zd�Zd�Z
dS)r�rr
��fileRefr�Tc�z�|jd���dz|j���zS)Nr�r;)r)r2r(rOs rr2zPBXBuildFile.Name�s4����I�&�+�+�-�-��6���9I�9I�9K�9K�K�Kr
c��t�|��}|�|jd�����|S)Nr�)rrUrSr)rp�r-rTs  rrUzPBXBuildFile.Hashables�sE���"�"�4�(�(�I����T�%�i�0�>�>�@�@�A�A�A��r
N)r5r�r�rr=rFr[rjr~r�r�r�r2rUrr
rr�r��s���������!�!�#�#�'�	�.�.��%�q�!�,��C�q�!�,������#���<��L�L�L�����r
r�c	��eZdZdZej���Ze�dedddgde	ddggdedddgd���d
d�Z
d�Zd	�Zdd
�Z
dd�Zdd�ZdS)�XCBuildPhasea{Abstract base for build phase classes.  Not represented in a project
  file.

  Attributes:
    _files_by_path: A dict mapping each path of a child in the files list by
      path (keys) to the corresponding PBXBuildFile children (values).
    _files_by_xcfilelikeelement: A dict mapping each XCFileLikeElement (keys)
      to the corresponding PBXBuildFile children (values).
  rr
i���)�buildActionMask�files�"runOnlyForDeploymentPostprocessingNc���t�||||��i|_i|_|j�dg��D]}|�|���dS�Nr�)rr/�_files_by_path�_files_by_xcfilelikeelementr)r1�_AddBuildFileToDicts)r-r.r'r(�pbxbuildfiles     rr/zXCBuildPhase.__init__�so�����d�J��F�3�3�3��D��')�D�$��(�,�,�W�b�9�9�.�.��
����-�-�-�-�.�.r
c�:�t|jjdz���)Nz must implement FileGroup)r3r4r5r?s  r�	FileGroupzXCBuildPhase.FileGroup�s'���
�.�
!�$?�
?�A�A�Ar
c�P�||jvrtd|z���||j|<dS)z�Adds path to the dict tracking paths belonging to this build phase.

    If the path is already a member of this build phase, raises an exception.
    z%Found multiple build files with path N)r�r7�r-r�rs   r�_AddPathToDictzXCBuildPhase._AddPathToDicts9���t�"�"�"��>��E�F�F�F� ,�D�����r
c�4�|jd}g}|dkr+t|t��r|�|��ntt|t��r8|jdD])}|�|������*n'|�|�����|D]}|�||���||jvr5|j||kr$td|���z���||j|<dS)a6Maintains the _files_by_path and _files_by_xcfilelikeelement dicts.

    If path is specified, then it is the path that is being added to the
    phase, and pbxbuildfile must contain either a PBXFileReference directly
    referencing that path, or it must contain a PBXVariantGroup that itself
    contains a PBXFileReference referencing the path.

    If path is not specified, either the PBXFileReference's path or the paths
    of all children of the PBXVariantGroup are taken as being added to the
    phase.

    If the path is already present in the phase, raises an exception.

    If the PBXFileReference or PBXVariantGroup referenced by pbxbuildfile
    are already present in the phase, referenced by a different PBXBuildFile
    object, raises an exception.  This does not raise an exception when
    a PBXFileReference or PBXVariantGroup reappear and are referenced by the
    same PBXBuildFile that has already introduced them, because in the case
    of PBXVariantGroup objects, they may correspond to multiple paths that are
    not all added simultaneously.  When this situation occurs, the path needs
    to be added to _files_by_path, but nothing needs to change in
    _files_by_xcfilelikeelement, and the caller should have avoided adding
    the PBXBuildFile if it is already present in the list of children.
    r�Nr�zFound multiple build files for )	r)r>rrCr+r�r�r7r2)r-r�r�xcfilelikeelement�paths�variant�a_paths       rr�z!XCBuildPhase._AddBuildFileToDictssD��4%�0��;���E��t�|�|�	�%��	7�	7��
���T�����
�%��	7�	7�3�(�4�Z�@�	+�	+�G�
�,�,�w�'�'�)�)�
*�
*�
*�
*�	+�	���&�/�/�1�1�2�2�2�
�0�0��
���,��/�/�/�/��D�<�<�<��'�(9�:�l�J�J��8�(�-�-�/�/�0�
1�
1�1�:F�D�$�%6�7�7�7r
c�^�|�d|��|�||��dSr�)r�r�r�s   r�AppendBuildFilezXCBuildPhase.AppendBuildFileFs6��	�����.�.�.����l�D�1�1�1�1�1r
c�`�|�|��\}}|�||��}||jvr:t|t��r%|j|}|�||��dS|�t
d|i��}nt
||d���}|�||��dS)Nr�r�)r�rNr�r>rr�r�r�)r-rr��
file_grouprOrWr�s       r�AddFilezXCBuildPhase.AddFileOs���!%����!5�!5��Z���,�,�T�<�@�@�H��4�3�3�3��(�O�,�,�4�
�5�h�?�l�
����d�3�3�3�3�3�
�	�#�Y��$9�:�:���#��h�$O�$O�P�P��
���<��.�.�.�.�.r
r�r)r5r�r�r�rr=rFr[rAr�r/r�r�r�r�r�rr
rr�r��s���������$
��!�!�#�#�'�	�.�.�+,�c�A�q�*�*M�+,�l�A�q�"�*E�+,�c�A�q�!�*D������.�.�.�.�A�A�A�-�-�-�6G�6G�6G�6G�p2�2�2�2�/�/�/�/�/�/r
r�c��eZdZd�Zd�ZdS)�PBXHeadersBuildPhasec��dS)N�HeadersrrOs rr2zPBXHeadersBuildPhase.Namef����9r
c�P�|����|��Sr�r��RootGroupForPathr?s  rr�zPBXHeadersBuildPhase.FileGroupi�"���"�"�$�$�5�5�d�;�;�;r
N�r5r�r�r2r�rr
rrrc�2���������<�<�<�<�<r
rc��eZdZd�Zd�ZdS)�PBXResourcesBuildPhasec��dS)N�	ResourcesrrOs rr2zPBXResourcesBuildPhase.Nameps���;r
c�P�|����|��Srrr?s  rr�z PBXResourcesBuildPhase.FileGroupsrr
Nr	rr
rrrms2���������<�<�<�<�<r
rc��eZdZd�Zd�ZdS)�PBXSourcesBuildPhasec��dS)N�SourcesrrOs rr2zPBXSourcesBuildPhase.Namezrr
c�P�|����|��Srrr?s  rr�zPBXSourcesBuildPhase.FileGroup}rr
Nr	rr
rrrwr
r
rc��eZdZd�Zd�ZdS)�PBXFrameworksBuildPhasec��dS�NrrrOs rr2zPBXFrameworksBuildPhase.Name�s���<r
c��tj|��\}}|dkr|dd����}|dkr'|����|��S|������dfS)Nr�r
r�F)rrLr�r�r�FrameworksGroup)r-rr�r�s    rr�z!PBXFrameworksBuildPhase.FileGroup�s����$�T�*�*�K�T�3�
�b�y�y�����G�M�M�O�O�c�
�c�z�z��
$�
$�
&�
&�
7�
7��
=�
=�=��%�%�'�'�7�7�9�9�5�
A�Ar
Nr	rr
rrr�s7���������
B�
B�
B�
B�
Br
rc��eZdZej���Ze�deddggdeddgdeddggdedddgdeddgdeddgd���d�Z	dS)�PBXShellScriptBuildPhaser
rz/bin/sh)�
inputPathsr7�outputPaths�	shellPath�shellScript�showEnvVarsInLogc�2�d|jvr
|jdSdS)Nr7�ShellScriptr�rOs rr2zPBXShellScriptBuildPhase.Name�s#��
��!�!�!�
�
�f�
%�%��=r
N)
r5r�r�r�r=rFr[r~rAr2rr
rrr�s�������� �%�%�'�'�'�	�.�.��C��A�r�*��C��A���C��A�r�*��C��A�y�1��C��A���C��A��
���������r
rc
���eZdZej���Ze�deddgdeddgdeddgd���e	j
d��Zddd�Zddd	d
dddd
dd�	Z
d�Zd�Zd�ZdS)�PBXCopyFilesBuildPhaserr
)�dstPath�dstSubfolderSpecr7z,^\$\((.*?)\)(/(\$\((.*?)\)(/(.*)|)|(.*)|)|)$�r")�BUILT_PRODUCTS_DIR�BUILT_FRAMEWORKS_DIR�r�r#r$r%)	�WRAPPER_NAME�EXECUTABLE_FOLDER_PATH�!UNLOCALIZED_RESOURCES_FOLDER_PATH�JAVA_FOLDER_PATH�FRAMEWORKS_FOLDER_PATH�SHARED_FRAMEWORKS_FOLDER_PATH�SHARED_SUPPORT_FOLDER_PATH�PLUGINS_FOLDER_PATH�XPCSERVICES_FOLDER_PATHc�2�d|jvr
|jdSdS)Nr7�	CopyFilesr�rOs rr2zPBXCopyFilesBuildPhase.Name�s#��
��!�!�!�
�
�f�
%�%��;r
c�P�|����|��Srrr?s  rr�z PBXCopyFilesBuildPhase.FileGroup�rr
c��|j�|��}|r�|�d��}||jvr�|j|}|�d��}|�d}|dkr�|�d���l|�d��}|�d��}d}||jvr"|j|}|�d}d}|d	krd
|z|z}n\|�d��}nFd}|}nA|�d��r
d}|dd�}nt
d|�d
|jj�����||j	d<||j	d<dS)z�Set the dstSubfolderSpec and dstPath properties from path.

    path may be specified in the same notation used for XCHierarchicalElements,
    specifically, "$(DIR)/path".
    r
rNr�r(rcr+r&r5z#$(CONTENTS_FOLDER_PATH)/XPCServicesrzCan't use path z in a r&r')
�path_tree_rer�r�path_tree_first_to_subfolder�path_tree_second_to_subfolderr(r7r4r5r))r-r�path_tree_match�	path_tree�	subfolder�
relative_path�	separators       r�SetDestinationz%PBXCopyFilesBuildPhase.SetDestination�s����'�.�.�t�4�4�O��D8�!�'�'��*�*�i�	�d�7�	7�	7��5�i�@�	�'�-�-�a�0�0�
�� ��-���?�?��4�4�Q�7�7�C�<&�+�+�A�.�.�)�)�/�/��2�2�-��)�
�$�<�
<�
<��:�9�E�I��$� �m��i��5�5�5�C� )�*�,9�:�m��,�1�1�!�4�4�M���	��
�
�	
����	�	�8��i��1�2�2�h�m�m��J����d�n�5�5�7�
8�
8�8�#0�D��Y��+4�D��'�(�(�(r
N)r5r�r�r�r=rFr[r~rAr�compiler:r;r<r2r�rBrr
rr%r%�s�������� �%�%�'�'�'�	�.�.��C��A���C��A���C��A����������K�L�L�,�)+�(*�"�"��*+�*+�)*�(*�(*�(*�(*�(*�)+�#�#��$���<�<�<�O5�O5�O5�O5�O5r
r%c��eZdZej���Ze�deddgdeddgdeddgdedddgdeddggdeddgd���d�Z	d�Z
dS)�PBXBuildRulerr
)�compilerSpec�filePatterns�fileType�
isEditable�outputFiles�scriptc��|jjSr�r4r5rOs rr2zPBXBuildRule.Name8�
���>�"�"r
c���t�|��}|�|jd��d|jvr |�|jd��|S)NrHrG)rrUrCr)r�s  rrUzPBXBuildRule.Hashables<sc���"�"�4�(�(�I����T�%�j�1�2�2�2���)�)�)����t�'��7�8�8�8��r
N)r5r�r�rr=rFr[r~rAr2rUrr
rrErE-s���������!�!�#�#�'�	�.�.���Q��N���Q��N���Q��N���Q��1�%���Q��2�&���Q��N�
�����#�#�#�����r
rEc	��eZdZej���Ze�deddgdeddgde	ddgde
ddgd���d�Zd�Zd�Z
dS)r�rr
��containerPortal�	proxyTyper��
remoteInfoc��|j}|d����d|d��}d|jj|t	|��fzS)NrRz.gyp:rTr1)r)r2r4r5r')r-�propsr7s   rr8zPBXContainerItemProxy.__repr__asQ����E�� 1�2�7�7�9�9�9�9�5��;N�;N�O�D���� 7��r�$�x�x�H�H�Hr
c��|jjSrrMrOs rr2zPBXContainerItemProxy.NamefrNr
c��t�|��}|�|jd�����|�|jd�����|S)NrRr��rrUrSr)r�s  rrUzPBXContainerItemProxy.Hashablesjso���"�"�4�(�(�I����T�%�&7�8�B�B�D�D�E�E�E�
���T�%�&<�=�G�G�I�I�J�J�J��r
N)r5r�r�rr=rFr[rrrArvr~r8r2rUrr
rr�r�Gs�������$
��!�!�#�#�'�	�.�.�� 1�1�a�8���1�a�8���1�a�8���1�a�8�	�����I�I�I�
#�#�#�����r
r�c��eZdZej���Ze�deddgddjddgde	ddgd���d�Z
d�Zd�ZdS)�PBXTargetDependencyrNr
)r7�target�targetProxyc��|j�d��p|jd���}d|jj|t|��fzS)Nr7r\r1)r)r1r2r4r5r'r6s  rr8zPBXTargetDependency.__repr__�sN�������'�'�L�4�+;�H�+E�+J�+J�+L�+L�D���� 7��r�$�x�x�H�H�Hr
c��|jjSrrMrOs rr2zPBXTargetDependency.Name�rNr
c��t�|��}|�|jd�����|S)Nr]rYr�s  rrUzPBXTargetDependency.Hashables�sE���"�"�4�(�(�I����T�%�m�4�>�>�@�@�A�A�A��r
)
r5r�r�rr=rFr[r~r4r�r8r2rUrr
rr[r[ts�������
��!�!�#�#�'�	�.�.��s�a��3��t�~�a��3��,�a��3������I�I�I�#�#�#�����r
r[c��eZdZej���Ze�deddgdeddgdeddgd���dS)rCrr
)rHrrBN)	r5r�r�rjr=rFr[r~r�rr
rrCrC�sm�������%�*�*�,�,�'�	�.�.��S�A�q�1��S�A�q�1��*�A�q�1�������r
rCc
���eZdZej���Ze�dedde��gdeddggde	ddggde
ddgde
ddgd���		dd�Zd�Zd�Z
d�Zd	�Zd
�Zd�Zd�Zd
�ZdS)�XCTargetrr
)�buildConfigurationList�buildPhases�dependenciesr7�productNameNc�d�t�||||��d|jvr*d|jvr!|�d|jd��d|jvrRd|jvrK|jd}|�d��dkr'|�d|jd��dSdSdSdS)Nr7rgrd�PRODUCT_NAMEr)rvr/r)r�r�r�)r-r.r'r(�force_outdir�force_prefix�force_extension�configss        rr/zXCTarget.__init__�s������D�*�b�&�9�9�9���!�!�!�
�d�.�
.�
.������(8��(@�A�A�A���(�(�(�	!�T�%5�	5�	5��"�#;�<���"�"�>�2�2�a�7�7�
�
!�
!�.�"&�"2�=�"A�C�C�C�C�C�	)�(�	5�	5�7�7r
c��|���}|���}||krPt|d||���d���}t||d���}|�d|��dS|�|��d}t|d||���d���}t|���|d���}|�d|��dS)Nr
rQ)r\r]rf)r7r])r�r�r2r[r��AddOrGetProjectReference)r-r��
pbxproject�other_pbxproject�	container�
dependency�other_project_refs       r�
AddDependencyzXCTarget.AddDependency�s4���(�(�*�*�J��/�/�1�1���%�%�%�'��AB�AF�AF�����)O�)O�P�P�i�'�u�7@�(B�(B�C�C�j�
���.�*�5�5�5�5�5��
-�
-�.>�
?�
?��
B��'�$5�$%�$)�$)�J�J�L�L�	)�)�
�
�i�'�u�z�z�|�|�7@�(B�(B�C�C�j�
���.�*�5�5�5�5�5r
c�B�|jd�|��S�Nrd)r)r�r6s  rr�zXCTarget.ConfigurationNamed�s����4�5�H�H��N�N�Nr
c�@�|jd���Srw)r)r�rOs rr�zXCTarget.DefaultConfiguration�s����4�5�J�J�L�L�Lr
c�B�|jd�|��Srw)r)r�r�s  rr�zXCTarget.HasBuildSetting������4�5�E�E�c�J�J�Jr
c�B�|jd�|��Srw)r)r�r�s  rr�zXCTarget.GetBuildSetting�rzr
c�D�|jd�||��Srwr�r�s   rr�zXCTarget.SetBuildSetting�s+����4�5�E�E�c�FK�M�M�Mr
c�D�|jd�||��Srwr�r�s   rr�zXCTarget.AppendBuildSetting�s+����4�5�H�H��IN�P�P�Pr
c�B�|jd�|��Srwr�r�s  rr�zXCTarget.DelBuildSetting�rzr
�NNNNNN)r5r�r�rvr=rFr[r�r�r[r~r/rur�r�r�r�r�r�r�rr
rrcrc�sI������
�"�'�'�)�)�'�	�.�.� �"5�q�!�2�2�4�4�6� �,�q�!�R�@� �"5�q�!�R�@� �#�q�!�<� �#�q�!�<�
�����7;�EI�C�C�C�C�(6�6�6�8O�O�O�M�M�M�K�K�K�K�K�K�M�M�M�P�P�P�K�K�K�K�Kr
rcr\r
c�@�eZdZej���Ze�dedde��e	��ggde
ddggdeddgdeddgd���gd�gd�gd�gd�gd�gd�gd�gd	�gd
�gd�gd�gd�gd
�d�
Z
		dd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS)�PBXNativeTargetr
r)re�
buildRules�productReference�productType)r}r�z.app)zwrapper.app-extensionr�z.appex)r�r�z.bundle)r�r�z
.framework)r��libz.dylib)r{r�z.a)�compiled.mach-o.executabler�r�)r�r�z.xctest)r�r�z.so)r�r�z.kext)
z"com.apple.product-type.applicationz+com.apple.product-type.application.watchappz)com.apple.product-type.watchkit-extensionz$com.apple.product-type.app-extensionzcom.apple.product-type.bundle� com.apple.product-type.framework�&com.apple.product-type.library.dynamic�%com.apple.product-type.library.staticzcom.apple.product-type.toolz'com.apple.product-type.bundle.unit-testz(com.apple.product-type.bundle.ui-testing�com.googlecode.gyp.xcode.bundlez'com.apple.product-type.kernel-extensionNc���t�||||��d|jv�r�d|jv�r�d|jv�r�|jd|jv�r�d}|���}|dkr|���}|dk�rb|j|jd\}	}
}|jddkrXd|jd<|�dd��|�dd	��|�d
d	��|�
|dd�}|jddks|jdd
kr|�
|dd�}|��d|z}|	�d��r|�d|��n|�d|��|	�d��r@|jd}||z
}d	}|�d|��|�d|��|�|}
|	�d��r|�d|
��n|�d|
��|�|�d|��|jd}t|
��}
|
rD|d|
�|
kr6||
d�}|�d|��|�d|��|	d|
|z|zdd�}t|��}|�|��|�d|��dSdSdSdSdSdS)Nrgr�r�r�r��MACH_O_TYPE�	mh_bundle�DYLIB_CURRENT_VERSIONr��DYLIB_COMPATIBILITY_VERSIONr
z'com.apple.product-type-bundle.unit.testz(com.apple.product-type-bundle.ui-testing�.zwrapper.�WRAPPER_EXTENSION�EXECUTABLE_EXTENSIONr�ri�WRAPPER_PREFIX�EXECUTABLE_PREFIX�TARGET_BUILD_DIRrr))rxr�rr�)rcr/r)�_product_filetypesr��
ProductsGroupr�r(r�r^r
r;)r-r.r'r(rjrkrl�products_grouprp�filetype�prefix�suffix�product_name�
prefix_len�	ref_propsrWs                rr/zPBXNativeTarget.__init__1	s���
���d�J��F�3�3�3���(�(�(���(�(�(���!1�1�1���
�&�$�*A�A�A��n��*�*�,�,�j�	�t�	�	�#�1�1�3�3��	�4�	�	��#�D�$4�]�$C�D�	#��6�6�2��M�*�.O�O�O�6��
�=�
)�
�
�
�}�k�
:�
:�
:�
�
�
�6��
;�
;�
;�
�
�
�<�b�
A�
A�
A�
�
$�$�Q�R�R�j�O���M�*�4�5�5���M�*�5�6�6�
�
$�$�Q�R�R�j�O��&���(�&�
�
 �
 ��
,�
,�J�� � �!4�o�F�F�F�F�� � �!7��I�I�I�
�
 �
 �!=�
>�
>�?��+�M�:�L��F�"�L��F����]�L�9�9�9�� � ���>�>�>��#��&����z�*�*�	<�
�
�
�/��
8�
8�
8�
8�
�
�
�2�F�
;�
;�
;��#�
�
�
�1�<�
@�
@�
@��'�
�6����[�[�
��	=�<����4��>�>�%�j�k�k�2�,�
�
�
�=�,�
7�
7�
7�
�
�
�~�|�
<�
<�
<�'��$�|�3�f�<�2�	
�
�	�$�I�.�.���"�"�8�,�,�,����+�X�6�6�6�6�6�Q)�(�(�(�1�1�A�A�
 �	r
c�l�d|jvrdSd}|jdD]}t||��r|�J�|}�|S�Nre)r)r>)r-�type�	the_phase�phases    r�GetBuildPhaseByTypez#PBXNativeTarget.GetBuildPhaseByType�	s]���D�,�,�,�
�T��I��!�-�0����	�E�4�	 �	 ��� � � ��	���r
c��|�t��}|��t��}t|jd��}t	|jd��D]H\}}t|t��s*t|t��st|t��r|}n�I|jd�	||��||_
|Sr�)r�rr^r)rlr>rrrrmr()r-�
headers_phase�	insert_atrxr�s     r�HeadersPhasezPBXNativeTarget.HeadersPhase�	s����,�,�-A�B�B�M���*�,�,�m��d�&�}�5�6�6�i�#�D�$4�]�$C�D�D���,�%���e�3�4�4�	��e�1�2�2�	��e�4�5�5�	��)�
�%�		���}�%�,�,�Y�
�F�F�F�!�m���r
c�z�|�t��}|��t��}t|jd��}t	|jd��D]3\}}t|t��st|t��r|}n�4|jd�||��||_	|Sr�)
r�rr^r)rlr>rrrmr()r-�resources_phaser�rxr�s     r�ResourcesPhasezPBXNativeTarget.ResourcesPhase�	s����.�.�/E�F�F�O���.�0�0�o��d�&�}�5�6�6�i�#�D�$4�]�$C�D�D���,�%���e�1�2�2�	��e�4�5�5�	��)�
�%�	�
��}�%�,�,�Y��H�H�H�#�o���r
c��|�t��}|�$t��}|�d|��|Sr�)r�rr�)r-�
sources_phases  r�SourcesPhasezPBXNativeTarget.SourcesPhase�	sC���,�,�-A�B�B�M���*�,�,�m�
���-��7�7�7��r
c��|�t��}|�$t��}|�d|��|Sr�)r�rr�)r-�frameworks_phases  r�FrameworksPhasezPBXNativeTarget.FrameworksPhase�	sF���/�/�0G�H�H����0�2�2��
���-�)9�:�:�:��r
c���t�||��d}d}d}t|t���r3d|jv�r+|jd|k�rd|jv�r|jd|ksP|jd|ks|jd|kr�|�d��r|�d��dkr�|�d��}|���}|���}||kr0|�	|��d}|�
|��}|����d	td
|i����dSdSdSdSdSdSdS)Nr�r�r�r�r�r�r�rr�r�)rcrur>r�r)r�r�r�r�rorFr�r�r�)	r-r��static_library_type�shared_library_type�framework_typerWrprq�other_project_product_groups	         rruzPBXNativeTarget.AddDependency�	s������4��'�'�'�A��B��7�N��%��)�)�Q���(�(�(���
�&�*=�=�=���)�)�)�
��-�(�,?�?�?�
�
�M�
*�.A�
A�
A�
�
�M�
*�n�
<�
<��$�$�]�3�3�=�
�
�
�
�
.�
.�+�
=�
=��"�"�#5�6�6�h��*�*�,�,�j��1�1�3�3��	�'�	'�	'��/�/�0@�A�A�!�D�	$�.�E�E�h�O�O��
�����+�+�G�,8�)�X�9N�,O�,O�Q�Q�Q�Q�Q�'Q�Q�(�(�=�=�)�)�=�
<�
=�
=r
r)r5r�r�rcr=rFr[r�rrrEr
r~r�r/r�r�r�r�r�rurr
rr�r��s������
��!�!�#�#�'�	�.�.��L�a��.�.�0�0�2I�2I�2K�2K�L�N��L�a��B�7��,�a��3��C�a��3������5A�5A�5A�5A�5A�5A�5C�5C�5C�5C�5C�5C�1@�1@�1@�1C�1C�1C�1B�1B�1B�1>�1>�1>�19�19�19�1@�1@�1@�2A�2A�2A�1<�1<�1<�1>�1>�1>�3���:7;�EI�m7�m7�m7�m7�^���"���(���&������Q�Q�Q�Q�Qr
r�c��eZdZdS)�PBXAggregateTargetNrsrr
rr�r�
s�������$r
r�c��eZdZdZej���Ze�deddgde	dde	��gde
dddgdedddgdedde��gde
dddgdeddgde
dddgde
ddggd�	��dd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd d�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#dS)!�
PBXProjectaE

  Attributes:
    path: "sample.xcodeproj".  TODO(mark) Document me!
    _other_pbxprojects: A dictionary, keyed by other PBXProject objects.  Each
                        value is a reference to the dict in the
                        projectReferences list associated with the keyed
                        PBXProject.
  rr
z	Xcode 3.2r�)	r�rd�compatibilityVersion�hasScannedForEncodingsr�projectDirPath�projectReferences�projectRoot�targetsNc�X�||_i|_t�||||��Sr)r�_other_pbxprojectsrrr/)r-r.r'r(rs     rr/zPBXProject.__init__&
s+���D�I� �D���%�%�d�J��F�C�C�Cr
c�h�|j}|dd�dkr
|dd�}tj|��S)Ni����z
.xcodeproj)rrrr6s  rr2zPBXProject.Name,
s:���9�D��C�D�D�z�\�!�!�
�$�3�$�Z�d���d�#�#�#r
c��|jSr)rrOs r�PathzPBXProject.Path2
s
���9�r
c��dS)NzProject objectrrOs rrQzPBXProject.Comment5
s���r
c��t�|��}d|jvr+|jdD]}|�|d���|S)Nr��ProductGroup)rrrgr)rC)r-r��	references   rrgzPBXProject.Children8
s\�� �)�)�$�/�/�H��d�.�.�.��'�(;�<�3�3�)����	�.�1�2�2�2�2��Or
c��|SrrrOs rr�zPBXProject.PBXProjectAncestorF
s���Kr
c���d|jvr"|�dt����|jd}|�|��}|�&td|i��}|�|��|S)Nrr7)r)r�rr=r;)r-r7�
main_grouprs    r�_GroupByNamezPBXProject._GroupByNameI
sy���$�*�*�*�
���{�H�J�J�/�/�/��!�+�.�J��%�%�d�+�+�E��}����~�&�&�e����U�#�#�#��Lr
c�,�|�d��S)Nr�r�rOs r�SourceGroupzPBXProject.SourceGroupW
s�����X�&�&�&r
c�,�|�d��S)Nrr�rOs rr�zPBXProject.ProductsGroupZ
������Z�(�(�(r
c�,�|�d��S)Nrr�rOs r�IntermediatesGroupzPBXProject.IntermediatesGroup`
s�����_�-�-�-r
c�,�|�d��Srr�rOs rrzPBXProject.FrameworksGroupe
s�����\�*�*�*r
c�,�|�d��S)Nrr�rOs r�
ProjectsGroupzPBXProject.ProjectsGrouph
r�r
c���|jdf|jdf|jdf|jdfd�}t|��\}}|dkr||vr||\}}|��}||fS|���dfS)a�Returns a PBXGroup child of this object to which path should be added.

    This method is intended to choose between SourceGroup and
    IntermediatesGroup on the basis of whether path is present in a source
    directory or an intermediates directory.  For the purposes of this
    determination, any path located within a derived file directory such as
    PROJECT_DERIVED_FILE_DIR is treated as being in an intermediates
    directory.

    The returned value is a two-element tuple.  The first element is the
    PBXGroup, and the second element specifies whether that group should be
    organized hierarchically (True) or as a single flat list (False).
    T)�DERIVED_FILE_DIR�INTERMEDIATE_DIR�PROJECT_DERIVED_FILE_DIR�SHARED_INTERMEDIATE_DIRN)r�rr�)r-r�source_tree_groupsr�
group_funcrOrs       rrzPBXProject.RootGroupForPathk
s���*$(�#:�D�"A�#'�#:�D�"A�#'�#:�D�"A�#'�#:�D�"A�	���4�D�9�9��[�$��d���{�.@�@�@�#5�k�#B� �z�<��j�l�l�e��\�
"�"�
������%�%r
c�^�|�|��\}}|�||��S)z�Returns a PBXFileReference corresponding to path in the correct group
    according to RootGroupForPath's heuristics.

    If an existing PBXFileReference for path exists, it will be returned.
    Otherwise, one will be created and returned.
    )rrN)r-rrrOs    r�AddOrGetFileInRootGroupz"PBXProject.AddOrGetFileInRootGroup�
s2��!�1�1�$�7�7��U�L��#�#�D�,�7�7�7r
Fc��|jdjdD],}t|t��r|�|���-dS)z9Calls TakeOverOnlyChild for all groups in the main group.rr�N)r)r>rra)r-rbrs   r�RootGroupsTakeOverOnlyChildrenz)PBXProject.RootGroupsTakeOverOnlyChildren�
sT���!�+�.�:�:�F�)�)��	�E�8�	$�	$�)�
����(�(�(��)�)r
c��t|jdjdtjtj�����|jdjd<|jdjdD]�}t
|t��s�|���dkr�g}|jdD]K}t
|t��s�|jd}||jdvsJ�|�
|���Lt|��t|jd��ksJ�||jd<��|�����dS)Nrr�rerr�r�)
r�r)rfrgr�r"r>rr2r�rCr^rh)r-r�productsr\�products     r�
SortGroupszPBXProject.SortGroups�
s`��	�t���,�8��D��'�(=�(N�O�O�	Q�	Q�	Q�	��[�!�-�j�9��!�+�.�:�:�F����
��x�
(�
(���	������	#�	#�
���&�y�1�	#�	#�F��F�O�4�4����&�'9�:�'��E�-�j�9�9�9�9�9�
�/�/�'�
"�
"�
"�
"��8�}�}��E�$5�j�$A� B� B�B�B�B�B�(0���*�%�%�
�������/�r
c�h���d�jvr
g�jd<d}d}|�jv�rjtddi��}�|_|j�|�����tj��	����}��
d��}|r2tj|d��r|}ntj||��}tj�|�	��|��}t!d|dd	���}�����|��||d
�}|�j|<��d|��t)�jdd�����jd<n�j|}|d
}|d}��|||����|d���|�
d��}	t/��fd�|	D����r'|jd}
|j�|
��||gS)a&Add a reference to another project file (via PBXProject object) to this
    one.

    Returns [ProductGroup, ProjectRef].  ProductGroup is a PBXGroup object in
    this project file that contains a PBXReferenceProxy object for each
    product of each PBXNativeTarget in the other project file.  ProjectRef is
    a PBXFileReference to the other project file.

    If this project file already references the other project file, the
    existing ProductGroup and ProjectRef are returned.  The ProductGroup will
    still be updated if necessary.
    r�Nr7rr�rzwrapper.pb-project�SOURCE_ROOT)ryrr�)r��
ProjectRefc�Z�|d������S)Nr�)r2r���xs r�<lambda>z5PBXProject.AddOrGetProjectReference.<locals>.<lambda>s"��q���3�3�5�5�;�;�=�=�r
rer�r�Fr�c3�D�K�|]}��|���V��dSr)�_AllSymrootsUnique)�.0�t�inherit_unique_symrootr-s  ��r�	<genexpr>z6PBXProject.AddOrGetProjectReference.<locals>.<genexpr>s4�����
O�
O�!�4�"�"�1�&<�=�=�
O�
O�
O�
O�
O�
Or
r)r)r�rr(r*rSrUrrKr�r��isabsr$r�r��RelativePathr
r�r;r�r��_SetUpProductReferencesr��all)r-rq�
product_group�project_refr*r��
other_path�ref_dict�project_ref_dictr��dir_pathr�s`          @rroz#PBXProject.AddOrGetProjectReference�
sv�����$�"2�2�2�.0�d��*�+��M��K��t�6�6�6���
�3�4�4�m�"�m����%�%�&6�&@�&@�&B�&B�C�C�C��#�D�I�I�K�K�0�0�i��'�'�(8�9�9�n�	�@��?�>�!�,�-�-�	@�$�)�)��n�Y��?�?�)��:�*�*�+;�+@�+@�+B�+B�I�N�N�j�%�!5�!+�!.�&�&�
�
�k�
�����&�&�{�3�3�3�"/�{�K�K�h�2:�d��.�/�
���-�x�8�8�8���!�"5�6�=�=�?�?�?���*�+�+�
�0�1A�B��&�~�6�m�$�\�2�k�� � �!1�=�+�N�N�N�!�4�4�5E�u�M�M���*�*�9�5�5�G�
�
O�
O�
O�
O�
O�w�
O�
O�
O�O�O�0��(��0�h���%�%�h�/�/�/��;�'�'r
c��|�|��}|�|��D] }|�|�|��r|�|sdS�!|rdn|S)NFT)�_DefinedSymroots�_IsUniqueSymrootForTarget)r-r\r��symrootsr�s     rr�zPBXProject._AllSymrootsUniquesm��
�$�$�V�,�,�H�
�
"�
"�6�
*�
*����
�-�� >� >�q� A� A�-�
�)�2�)��u�u���7�4�4�!7�7r
c�Z�|�d��}t��}|�d��D]L}|�d��}d|vr|�|d���7|�d���Mt|��dkrd|vrt��S|S)Nrdr�r��SYMROOTr
)r��set�addr^)r-r\�config_listr�config�settings      rr�zPBXProject._DefinedSymroots s����$�$�%=�>�>�K��u�u�H��)�)�*?�@�@�����"�"�?�3�3�g�	�g�	�	����W�Y�'�(�(�(�(����T�����
�8�}�}����d�h�.�.�
�U�U�l��Or
c�J��ddg}t�fd�|D����rdSdS)Nz$SRCROOTz
$(SRCROOT)c3� �K�|]}|�vV��	dSrr)r�r��symroots  �rr�z7PBXProject._IsUniqueSymrootForTarget.<locals>.<genexpr>7s'�����
,�
,�A�1��<�
,�
,�
,�
,�
,�
,r
TF)�any)r-r�
uniquifiers ` rrz$PBXProject._IsUniqueSymrootForTarget2s>����l�+�J�
�
,�
,�
,�
,��
,�
,�
,�,�,��
�T��5r
c�v�|jdD]�}t|t��s�|jd}|�|���pt	|d||���d���}t
|jd|jd|jd|d���}|�|����dS)	Nr�r�r:rQrxrr�)rHrr�rB)r)r>r�rFr�r2rCr;)r-rqr�r�r\�
other_fileref�container_item�reference_proxys        rr�z"PBXProject._SetUpProductReferences;s���#�.�y�9�3�3��
���
0�
0����(�);�<�m�	�	-�	-�m�	<�	<�	D�/�&1�&'�&3�&,�k�k�m�m�	0�0����,�)�5�6H�I�)�5�f�=�)�5�l�C�*�	-�-����	�!�!�/�2�2�2��73�3r
c�4��|j���D]|\}}g�|jdD]8}t|t��s���|jd���9|d}t
|jd�fd����|jd<�}dS)Nr�r�r�r�c�Z����|jdjd��S)NrBr�)rxr))r��remote_productss �rr�z8PBXProject.SortRemoteProductReferences.<locals>.<lambda>rs%����-�-�a�m�K�.H�.T�Uk�.l�m�m�r
re)r�r<r)r>r�rCr�)r-rqr�r\r�rs     @r�SortRemoteProductReferencesz&PBXProject.SortRemoteProductReferences_s����
'+�&=�&C�&C�&E�&E�o�o�"��(��o�$�0��;�G�G�&��&�/�2�2�	�
����v�1�2D�E�F�F�F�F��~�.�m�.4�
�
#�J�
/�m�m�m�m�/o�/o�/o�m��
�+�+�o�or
)NNNNr�)$r5r�r�r�rrr=rFr[rDr�r~rArrcr/r2r�rQrgr�r�r�r�r�rr�rr�r�r�ror�r�rr�rrr
rr�r�

sE��������
�%�*�*�,�,�'�	�.�.� �$�q�!�<� �"5�q�!�2�2�4�4�6� �#�q�!�[�I� �#�q�!�Q�?� �(�q�!�X�X�Z�Z�H� �#�q�!�R�@� �$�q�!�<� �#�q�!�R�@� �(�q�!�R�@������D�D�D�D�$�$�$�������������
�
�
�'�'�'�)�)�)�.�.�.�
+�+�+�)�)�)�#&�#&�#&�J	8�	8�	8�)�)�)�)�!�!�!�FM(�M(�M(�^
8�
8�
8����$���"3�"3�"3�Ho�o�o�o�or
r�c	��eZdZej���Ze�dedddgdeddigdedddgde	ddgd���d
d�Z
ejfd�Z
d	�ZdS)�
XCProjectFilerr
�.)�archiveVersion�classes�
objectVersionrzTNc�R�|r$|jd�|||��dSdS)Nrz)r)rh)r-rnror`s    rrhzXCProjectFile.ComputeIDs~s?���L�
��|�$�/�/�	�9�d�K�K�K�K�K�L�Lr
c���|���i|jd<|�|dd��|jr|�|dd��n|�|dd��t	|j�����D]9\}}|dkr|�|���!|�|d||���:|�|dd��|jd=dS)N�objectsrz// !$*UTF8*$!
z{ z{
r
z}
)r�r)r�r�r�r<�
_PrintObjectsr�)r-r�r�rIs    rr�zXCProjectFile.Print�s���$�$�&�&�&�
#%�D��Y���M�M�$��,�-�-�-��%�$�
�m�m�D�!�T�"�"�"�"�
�m�m�D�!�U�#�#�#�!�$�"2�"8�"8�":�":�;�;�2�2���%�	�Y�	�	����4� � � � �����a��5�1�1�1�1��M�M�$��5�!�!�!����#�#�#r
c��|jr|�|dd��n|�|dd��i}|���D]9}||kr�	|jj}||vrg||<||�|���:t
|��D]�}|�|dd��|�|dd|zdz��t
||d��	��D]}|�|���|�|dd
|zdz����|jr|�|dd��dS|�|dd��dS)
Nrzobjects = {r
zobjects = {
r�z	/* Begin z section */
c��|jSr)r'r�s rr�z-XCProjectFile._PrintObjects.<locals>.<lambda>�s����r
rez/* End z}; r�)r�r�r|r4r5rCr�r�)r-r��objects_by_class�object�
class_names     rrzXCProjectFile._PrintObjects�s����%�.�
�m�m�D�!�]�+�+�+�+�
�m�m�D�!�_�-�-�-����"�"�$�$�2�2��	�4�����#�,�j�
�+�
+�
+�')���$��z�"�)�)�&�1�1�1�1��-�.�.�G�G�
�
�m�m�D�!�T�"�"�"�
�m�m�D�!�[�:�5��G�H�H�H��+�J�7�-�~�/�/�/���&����T�����
�m�m�D�!�Y��3�o�E�F�F�F�F��%�%�
�m�m�D�!�U�#�#�#�#�#�
�m�m�D�!�V�$�$�$�$�$r
r�)r5r�r�rr=rFr[rArDr�rhr�r�r�rrr
rrrus���������!�!�#�#�'�	�.�.��#�a��A�.��$�a��B�/��#�a��B�/��*�a��+�	�����L�L�L�L��z�$�$�$�$�(%�%�%�%�%r
r)6r�rf�
gyp.commonr�rrr\r��hashlib�sha1rf�ImportError�sha�newr@�	NameErrorr~r	rCr�r�r�rrrr#rr�rrjrrrvr
rr�r�r�r�rrrrrr%rEr�r[rCrcr=r�r�r�rrr
r�<module>r,s���
E�E�N������������	�	�	�	�
�
�
�
�
�
�
�
���.�.�.��l�)�)�������*�*�*��g�)�)�)�������*�*�������*�*�*�������#�#���������������
�B�J�+�,�,�	��"�*�U�
�
���2�:�+�,�,��$���$<�=�=��$�$�$�(8�8�8�s
4�s
4�s
4�s
4�s
4�v�s
4�s
4�s
4�lI�I�I�I�I�H�I�I�I�X{�{�{�{�{�$�{�{�{�|	�����-����,��������������X����d.�d.�d.�d.�d.�(�*;�^�d.�d.�d.�N�����h� 1����;�;�;�;�;�8�;�;�;�<p0�p0�p0�p0�p0�(�p0�p0�p0�f�����8����<H/�H/�H/�H/�H/�8�H/�H/�H/�V<�<�<�<�<�<�<�<�<�<�<�<�<�<�\�<�<�<�<�<�<�<�<�<�<�<�<�B�B�B�B�B�l�B�B�B�&�����|����$D5�D5�D5�D5�D5�\�D5�D5�D5�N�����8����4*�*�*�*�*�H�*�*�*�Z�����(����D�����)����WK�WK�WK�WK�WK�~�WK�WK�WK�x,4���H�%�a�(�EQ�EQ�EQ�EQ�EQ�h�EQ�EQ�EQ�P���������ho�ho�ho�ho�ho�"�ho�ho�ho�V>%�>%�>%�>%�>%�H�>%�>%�>%�>%�>%s/�(�;�;�A�A�A�A�A�A