
    Vh                    2    d dl mZ d dlmZ ddZddZd Zy)	    )annotations)string_typesc                    t        | t              rA| j                  d      r0t        | j	                  dd            }t        |dz  |z        xs |S t        |       S )z|
    Converts a given value to a percentage if specified as "x%",
    otherwise converts the given value to an integer.
    % g      Y@)
isinstancer   endswithintreplace)value	num_items	min_value	value_pcts       E/home/dcms/DCMS/lib/python3.12/site-packages/ansible/utils/helpers.py
pct_to_intr      sR    
 %&5>>#+>c2./	I%23@y@5z    Nc                j     t        t              sg t         fdt               D              S )zg
    Converts an object into a dict making the properties into keys, allows excluding certain keys
    c              3  h   K   | ])  }|j                  d       r|v r|t        |      f + yw)_N)
startswithgetattr).0keyexcludeobjs     r   	<genexpr>z!object_to_dict.<locals>.<genexpr>)   s2     lSS^^TWEX\_cj\jgc3'(ls   222)r   listdictdir)r   r   s   ``r   object_to_dictr    #   s-     j$7lCHlllr   c                n    t               }| D cg c]  }||vs|j                  |      r| c}S c c}w )zW
    Creates a deduplicated list with the order in which each item is first found.
    )setadd)original_listseenxs      r   deduplicate_listr'   ,   s/     5D$J!dhhqkAJJJs   	222)   )N)
__future__r   ansible.module_utils.sixr   r   r    r'    r   r   <module>r,      s   $ # 1	mKr   