
    ~Zi                        S r SSKJr  SSKJr  SSKJr  SSKJr	  SSK
Jr  \(       a  SSKJr   " S S	\5      r " S
 S\5      r " S S\5      r " S S\5      rg)zxEmbedded Package part objects.

"Package" in this context means another OPC package, i.e. a DOCX, PPTX, or XLSX "file".
    )annotations)TYPE_CHECKING)PROG_ID)CONTENT_TYPE)Part)Packagec                  @    \ rS rSrSr\SS j5       r\SS j5       rSrg)	EmbeddedPackagePart   zA distinct OPC package, e.g. an Excel file, embedded in this PPTX package.

Has a partname like: `ppt/embeddings/Microsoft_Excel_Sheet1.xlsx`.
c                    [        U[        5      (       d(  U " UR                  S5      [        R                  UU5      $ [        R
                  [        [        R                  [        [        R                  [        0U   nUR                  X#5      $ )a5  Return a new |EmbeddedPackagePart| subclass instance added to *package*.

The subclass is determined by `prog_id` which corresponds to the "application"
used to open the "file-type" of `object_blob`. The returned part contains the
bytes of `object_blob` and has the content-type also determined by `prog_id`.
z/ppt/embeddings/oleObject%d.bin)
isinstancer   next_partnameCTOFC_OLE_OBJECTDOCXEmbeddedDocxPartPPTXEmbeddedPptxPartXLSXEmbeddedXlsxPartnew)clsprog_idobject_blobpackageEmbeddedPartClss        t/var/www/eduai.edurigo.com/question_generate/ques_gen_env/lib/python3.13/site-packages/pptx/parts/embeddedpackage.pyfactoryEmbeddedPackagePart.factory   s     '7++%%&GH!!	  LL*LL*LL*
 	 "";88    c                ^    U " UR                  U R                  5      U R                  UU5      $ )zwReturn new |EmbeddedPackagePart| subclass object.

The returned part object contains `blob` and is added to `package`.
)r   partname_templatecontent_type)r   blobr   s      r   r   EmbeddedPackagePart.new2   s4     !!#"7"78	
 	
r     N)r   zPROG_ID | strr   bytesr   r   )r$   r'   r   r   )	__name__
__module____qualname____firstlineno____doc__classmethodr   r   __static_attributes__r&   r    r   r
   r
      s/    
 9 92 

 

r    r
   c                  4    \ rS rSrSrSr\R                  rSr	g)r   @   zyA Word .docx file stored in a part.

This part-type arises when a Word document appears as an embedded OLE-object shape.
z./ppt/embeddings/Microsoft_Word_Document%d.docxr&   N)
r(   r)   r*   r+   r,   r"   r   WML_DOCUMENTr#   r.   r&   r    r   r   r   @   s    
 I??Lr    r   c                  4    \ rS rSrSrSr\R                  rSr	g)r   J   zA PowerPoint file stored in a part.

This part-type arises when a PowerPoint presentation (.pptx file) appears as an
embedded OLE-object shape.
z8/ppt/embeddings/Microsoft_PowerPoint_Presentation%d.pptxr&   N)
r(   r)   r*   r+   r,   r"   r   PML_PRESENTATIONr#   r.   r&   r    r   r   r   J   s     S&&Lr    r   c                  4    \ rS rSrSrSr\R                  rSr	g)r   U   zAn Excel file stored in a part.

This part-type arises as the data source for a chart, but may also be the OLE-object
for an embedded object shape.
z,/ppt/embeddings/Microsoft_Excel_Sheet%d.xlsxr&   N)
r(   r)   r*   r+   r,   r"   r   	SML_SHEETr#   r.   r&   r    r   r   r   U   s     G<<Lr    r   N)r,   
__future__r   typingr   pptx.enum.shapesr   pptx.opc.constantsr   r   pptx.opc.packager   pptx.packager   r
   r   r   r   r&   r    r   <module>r>      sU   
 #   $ 1 !$+
$ +
\#* #'* ' *  r    