
    liL                    F    d Z ddlmZ ddlmZ ddlmZmZ  G d de      Zy)z:lxml custom element classes for text-related XML elements.    )annotations)	XsdString)BaseOxmlElementOptionalAttributec                  n    e Zd ZU dZ ede      Zded<    ede      Zded<   e	d
d       Z
e	dd       Zy	)CT_Hyperlinkz1Custom element class for <a:hlinkClick> elements.zr:idstrrIdaction
str | Nonec                    | j                   }|i S |j                  d      }t        |      dk(  ri S |d   j                  d      }t        |D cg c]  }|j                  d       c}      S c c}w )a	  Query portion of the `ppaction://` URL as dict.

        For example `{'id':'0', 'return':'true'}` in 'ppaction://customshow?id=0&return=true'.

        Returns an empty dict if the URL contains no query string or if no action attribute is
        present.
        ?   &=)r   splitlendict)selfurlhalveskey_value_pairspairs        N/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/pptx/oxml/action.pyaction_fieldszCT_Hyperlink.action_fields   sh     kk;I3v;!I )//#.ATZZ_ABBAs   A.c                V    | j                   }|y|j                  d      d   }|dd }|S )zThe host portion of the `ppaction://` URL contained in the action attribute.

        For example 'customshow' in 'ppaction://customshow?id=0&return=true'. Returns |None| if no
        action attribute is present.
        Nr   r      )r   r   )r   r   protocol_and_hosthosts       r   action_verbzCT_Hyperlink.action_verb&   s9     kk;IIcN1- %    N)returnzdict[str, str])r"   r   )__name__
__module____qualname____doc__r   r   r
   __annotations__r   propertyr   r     r!   r   r   r   	   sV    ; 3C3*)FJ  C C(  r!   r   N)	r&   
__future__r   pptx.oxml.simpletypesr   pptx.oxml.xmlchemyr   r   r   r)   r!   r   <module>r-      s    @ " + A,? ,r!   