
    Ng v                         d dl Z d dlmZ d dlmZ d dlmZmZmZm	Z	m
Z
mZmZ d dlZd dlmZ d dlmZmZmZmZ d dlmZ  e j        e          Z G d d	ee          Z G d
 de          ZdS )    N)Enum)BytesIO)AnyCallableDictIteratorListOptionalUnion)Document)before_sleep_logretrystop_after_attemptwait_exponential)
BaseLoaderc                   6    e Zd ZdZdZdZdZdZdZde	de
fd	Zd
S )ContentFormatz5Enumerator of the content formats of Confluence page.zbody.editorzbody.export_viewzbody.anonymous_export_viewzbody.storagez	body.viewpagereturnc                 X    |d         | j                                                  d         S )Nbodyvalue)namelower)selfr   s     k/var/www/html/ai-engine/env/lib/python3.11/site-packages/langchain_community/document_loaders/confluence.pyget_contentzContentFormat.get_content   s"    F|DIOO--.w77    N)__name__
__module____qualname____doc__EDITOREXPORT_VIEWANONYMOUS_EXPORT_VIEWSTORAGEVIEWdictstrr    r   r   r   r      sV        ??F$K8GD8 8 8 8 8 8 8 8r   r   c            4       h   e Zd ZdZ	 	 	 	 	 	 	 	 	 	 d>ddddddddej        dd	dddd
dedee         dee         deej	                 dee
         dee         dee         dee         dee         dee         dee
         dee         deee                  dee         dee         dedededededee         d ee         d!ee         d"ed#ef2d$Ze	 	 	 	 	 	 d?dee         dee         dee         deej	                 dee
         dee         d%eedf         fd&            Zd'ed(ed%efd)Zd(ed%ee         fd*Zd(ed%ee         fd+Zd%ee         fd,Z	 d@ded-ee         d(ed%ee
         fd.Zd/ed(ed%efd0Zd1e
d%efd2Z	 	 	 dAd3ee
         dedededed!ee         d"ee         d#ed%ee         fd4Z	 	 	 dAd1e
dededed!ee         d"ee         d#ed%efd5Z	 d@d6ed!ee         d%ee         fd7Z	 d@d8ed!ee         d%efd9Z 	 d@d8ed!ee         d%efd:Z!d8ed%efd;Z"d8ed%efd<Z#	 d@d8ed!ee         d%efd=Z$dS )BConfluenceLoadera  Load `Confluence` pages.

    Port of https://llamahub.ai/l/confluence
    This currently supports username/api_key, Oauth2 login or personal access token
    authentication.

    Specify a list page_ids and/or space_key to load in the corresponding pages into
    Document objects, if both are specified the union of both sets will be returned.

    You can also specify a boolean `include_attachments` to include attachments, this
    is set to False by default, if set to True all attachments will be downloaded and
    ConfluenceLoader will extract the text from the attachments and add it to the
    Document object. Currently supported attachment types are: PDF, PNG, JPEG/JPG,
    SVG, Word and Excel.

    Confluence API supports difference format of page content. The storage format is the
    raw XML representation for storage. The view format is the HTML representation for
    viewing with macros are rendered as though it is viewed by users. You can pass
    a enum `content_format` argument to specify the content format, this is
    set to `ContentFormat.STORAGE` by default, the supported values are:
    `ContentFormat.EDITOR`, `ContentFormat.EXPORT_VIEW`,
    `ContentFormat.ANONYMOUS_EXPORT_VIEW`, `ContentFormat.STORAGE`,
    and `ContentFormat.VIEW`.

    Hint: space_key and page_id can both be found in the URL of a page in Confluence
    - https://yoursite.atlassian.com/wiki/spaces/<space_key>/pages/<page_id>

    Example:
        .. code-block:: python

            from langchain_community.document_loaders import ConfluenceLoader

            loader = ConfluenceLoader(
                url="https://yoursite.atlassian.com/wiki",
                username="me",
                api_key="12345",
                space_key="SPACE",
                limit=50,
            )
            documents = loader.load()

            # Server on perm
            loader = ConfluenceLoader(
                url="https://confluence.yoursite.com/",
                username="me",
                api_key="your_password",
                cloud=False,
                space_key="SPACE",
                limit=50,
            )
            documents = loader.load()

    :param url: _description_
    :type url: str
    :param api_key: _description_, defaults to None
    :type api_key: str, optional
    :param username: _description_, defaults to None
    :type username: str, optional
    :param oauth2: _description_, defaults to {}
    :type oauth2: dict, optional
    :param token: _description_, defaults to None
    :type token: str, optional
    :param cloud: _description_, defaults to True
    :type cloud: bool, optional
    :param number_of_retries: How many times to retry, defaults to 3
    :type number_of_retries: Optional[int], optional
    :param min_retry_seconds: defaults to 2
    :type min_retry_seconds: Optional[int], optional
    :param max_retry_seconds:  defaults to 10
    :type max_retry_seconds: Optional[int], optional
    :param confluence_kwargs: additional kwargs to initialize confluence with
    :type confluence_kwargs: dict, optional
    :param space_key: Space key retrieved from a confluence URL, defaults to None
    :type space_key: Optional[str], optional
    :param page_ids: List of specific page IDs to load, defaults to None
    :type page_ids: Optional[List[str]], optional
    :param label: Get all pages with this label, defaults to None
    :type label: Optional[str], optional
    :param cql: CQL Expression, defaults to None
    :type cql: Optional[str], optional
    :param include_restricted_content: defaults to False
    :type include_restricted_content: bool, optional
    :param include_archived_content: Whether to include archived content,
                                     defaults to False
    :type include_archived_content: bool, optional
    :param include_attachments: defaults to False
    :type include_attachments: bool, optional
    :param include_comments: defaults to False
    :type include_comments: bool, optional
    :param content_format: Specify content format, defaults to
                            ContentFormat.STORAGE, the supported values are:
                            `ContentFormat.EDITOR`, `ContentFormat.EXPORT_VIEW`,
                            `ContentFormat.ANONYMOUS_EXPORT_VIEW`,
                            `ContentFormat.STORAGE`, and `ContentFormat.VIEW`.
    :type content_format: ContentFormat
    :param limit: Maximum number of pages to retrieve per request, defaults to 50
    :type limit: int, optional
    :param max_pages: Maximum number of pages to retrieve in total, defaults 1000
    :type max_pages: int, optional
    :param ocr_languages: The languages to use for the Tesseract agent. To use a
                          language, you'll first need to install the appropriate
                          Tesseract language pack.
    :type ocr_languages: str, optional
    :param keep_markdown_format: Whether to keep the markdown format, defaults to
        False
    :type keep_markdown_format: bool
    :param keep_newlines: Whether to keep the newlines format, defaults to
        False
    :type keep_newlines: bool
    :raises ValueError: Errors while validating input
    :raises ImportError: Required dependencies not installed.
    NT      
   F2   i  )	space_keypage_idslabelcqlinclude_restricted_contentinclude_archived_contentinclude_attachmentsinclude_commentscontent_formatlimit	max_pagesocr_languageskeep_markdown_formatkeep_newlinesurlapi_keyusernamesessionoauth2tokencloudnumber_of_retriesmin_retry_secondsmax_retry_secondsconfluence_kwargsr1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   c                \   || _         || _        || _        || _        || _        || _        || _        || _        || _        || _	        || _
        || _        || _        || _        |pi }t                              ||||||          }|rt!          d|           	 ddlm} n# t&          $ r t'          d          w xY w|| _        || _        |	| _        |
| _        |r |d
||d|| _        d S |r |d
|||d|| _        d S |r |d
|||d|| _        d S  |d
||||d	|| _        d S )N)r?   r@   rA   rB   rC   rD   z!Error(s) while validating input: r   )
ConfluencezL`atlassian` package not found, please run `pip install atlassian-python-api`)r?   rB   )r?   rC   rE   )r?   rD   rE   )r?   rA   passwordrE   r*   )r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r,   validate_init_args
ValueError	atlassianrK   ImportErrorbase_urlrF   rG   rH   
confluence)r   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   errorsrK   s                               r   __init__zConfluenceLoader.__init__   s
   : # 
*D'(@%#6  0,
"*$8!*-3!44 5 
 
  	KIIIJJJ	,,,,,,, 	 	 	5  	 !2!2!2 	(jWS'WWEVWWDOOO 	(j e 7H DOOO  	(j uE 5F DOOO )j ! 	 
 $ DOOOs   B# #B=r   c                    g }| |                     d           |r|r|r|s|                     d           t          d |p||||fD                       }t          |          dk    rDd}t          d t	          ||          D                       }	|                     d| d	|	            |rit          |                                          d
dhk    rBt          |d
                                                   ddhk    r|                     d           |rct          |                                          h dk    r<t          |                                          d
dhk    r|                     d           |pdS )z/Validates proper combinations of init argumentsNzMust provide `base_url`zIIf one of `api_key` or `username` is provided, the other must be as well.c              3      K   | ]}|d uV  	d S Nr*   ).0xs     r   	<genexpr>z6ConfluenceLoader.validate_init_args.<locals>.<genexpr>   s7       
 
ATM
 
 
 
 
 
r      )z(api_key, username)rB   rC   rD   c              3   $   K   | ]\  }}||V  d S rW   r*   )rX   rY   ns      r   rZ   z6ConfluenceLoader.validate_init_args.<locals>.<genexpr>  s+      OO41aQOQOOOOOOr   z-Cannot provide a value for more than one of: z. Received values for: rD   	client_idaccess_token
token_typezYou have either omitted require keys or added extra keys to the oauth2 dictionary. key values should be `['client_id', 'token': ['access_token', 'token_type']]`>   key_certr_   consumer_keyaccess_token_secretzYou have either omitted required keys or added extra keys to the oauth2 dictionary. key values should be `['access_token', 'access_token_secret', 'consumer_key', 'key_cert']` or `['client_id', 'token': ['access_token', 'token_type']]`)appendlistsumtuplezipsetkeys)
r?   r@   rA   rB   rC   rD   rS   non_null_creds	all_namesprovideds
             r   rM   z#ConfluenceLoader.validate_init_args   s    ;MM3444 	H 	( 	7 	MM-  
  
 
%,%87FE#R
 
 
 
 
 ~""MIOO3~y+I+IOOOOOHMM*	 * *'* *   	FKKMM"" 
 F7O((**++  MMK   	FKKMM""    FKKMM""  MMN   ~r   
param_namekwargsc                 :    ||v r||         nt          | |          S rW   )getattr)r   rn   ro   s      r   _resolve_paramzConfluenceLoader._resolve_param5  s&    %/6%9%9vj!!wtZ?X?XXr   c              +     K   |rt                               d| d           |                     d|          }|                     d|          }|                     d|          }|                     d|          }|                     d|          }|                     d|          }|                     d	|          }|                     d
|          }	|                     d|          }
|                     d|          }|                     d|          }|                     d|          }|                     d|          }|                     d|          }|s|s|s|st          d          |rT|                     | j        j        ||||rdnd|
j         d          }|                     ||||	|
|||          E d {V  |rm|                     | j        j	        |||          }d |D             }|r t          t          ||z                       }nt          t          |                    }|rK|                     | j        |||||
j         d          }|                     ||||	|
|||          E d {V  |r|D ]} t          dt          | j                  t!          d| j        | j                  t'          t           t(          j                            | j        j                  } |||
j         d          }|s|                     |          s|                     |||	|
||          V  d S d S ) NzReceived runtime arguments zd. Passing runtime args to `load` is deprecated. Please pass arguments during initialization instead.r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   zSMust specify at least one among `space_key`, `page_ids`, `label`, `cql` parameters.anycurrentz,version)spacer:   r;   statusexpandr<   r=   r>   )r3   r:   r;   c                     g | ]
}|d          S )idr*   )rX   r   s     r   
<listcomp>z/ConfluenceLoader._lazy_load.<locals>.<listcomp>r  s    9994DJ999r   )r4   r:   r;   include_archived_spacesrx   )r>   Tr[   
multiplierminmaxreraisestopwaitbefore_sleep)page_idrx   )loggerwarningrr   rN   paginate_requestrR   get_all_pages_from_spacer   process_pagesget_all_pages_by_labelre   ri   _search_content_by_cqlr   r   rF   r   rG   rH   r   loggingWARNINGget_page_by_idis_public_pageprocess_page)r   ro   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   pagesids_by_labelr   get_pager   s                        r   
_lazy_loadzConfluenceLoader._lazy_load8  s      	NNXf X X X   ''V<<	&&z6::##GV44!!%00%)%8%8(&&
 &
" $(#6#6&$
 $
  #112GPP../A6JJ,,-=vFF##GV44''V<<	++OVDD#223I6RR++OVDD 	 	% 	 	-  
  	))8# 8Guui(.888 *  E ))*# +%9+ * 	 	 	 	 	 	 	 	 	  	3))6#	 *  E :95999L 3H|$; < <==L 1 122 	))+#(@(.888 *  E ))*# $+ * 	 	 	 	 	 	 	 	 	  	#  5 +.  *#$ 2 2  
 "2&'/!J!J   /02 2  x#~/C,M,M,M   2 $:M:Md:S:S '''$"!(     '	 	 r   c                 6    t           | j        di |          S )Nr*   )re   r   )r   ro   s     r   loadzConfluenceLoader.load  s"    ODO--f--...r   c              #   >   K   |                                  E d {V  d S rW   )r   )r   s    r   	lazy_loadzConfluenceLoader.lazy_load  s.      ??$$$$$$$$$$$r   r}   c                     d}d|i}|                     |           |||d<   | j                            ||          }|                    dg           S )Nzrest/api/content/searchr4   includeArchivedSpaces)paramsresults)updaterR   get)r   r4   r}   ro   r?   r   responses          r   r   z'ConfluenceLoader._search_content_by_cql  sc     ("'f"..EF*+?&&s6&::||Ir***r   retrieval_methodc           
         |                     d          }g }t          |          |k     r t          dt          | j                  t          d| j        | j                  t          t          t          j                            |          } |di |dt          |          i}|sn(|                    |           t          |          |k     |d|         S )	a  Paginate the various methods to retrieve groups of pages.

        Unfortunately, due to page size, sometimes the Confluence API
        doesn't match the limit value. If `limit` is >100 confluence
        seems to cap the response to 100. Also, due to the Atlassian Python
        package, we don't get the "next" values from the "_links" key because
        they only return the value from the result key. So here, the pagination
        starts from 0 and goes until the max_pages, getting the `limit` number
        of pages with each request. We have to manually check if there
        are more docs based on the length of the returned list of pages, rather than
        just checking for the presence of a `next` key in the response like this page
        would have you do:
        https://developer.atlassian.com/server/confluence/pagination-in-the-rest-api/

        :param retrieval_method: Function used to retrieve docs
        :type retrieval_method: callable
        :return: List of documents
        :rtype: List
        r;   Tr[   r~   r   startNr*   )poplenr   r   rF   r   rG   rH   r   r   r   r   extend)r   r   ro   r;   docs	get_pagesbatchs          r   r   z!ConfluenceLoader.paginate_request  s   * JJ{++	$ii)##'*  & ..  
 .fgoFF      I I8888c$ii888E KK! $ii)##" JYJr   r   c                     | j                             |d                   }|d         dk    o5|d         d         d         d          o|d         d         d         d          S )	z'Check if a page is publicly accessible.r{   rw   ru   readrestrictionsuserr   group)rR    get_all_restrictions_for_content)r   r   r   s      r   r   zConfluenceLoader.is_public_page  sn    GGT
SS Ni' M (8@KKM (8A)LL	
r   r   c	           
   #      K   |D ]8}	|s|                      |	          s|                     |	||||||          V  9dS )z1Process a list of pages into a list of documents.ry   N)r   r   )
r   r   r5   r7   r8   r9   r<   r=   r>   r   s
             r   r   zConfluenceLoader.process_pages  s        	 	D- d6I6I$6O6O ### +%9+ $      	 	r   c                    |r%	 ddl m } n# t          $ r t          d          w xY w|s|s%	 ddlm n# t          $ r t          d          w xY w|r|                     |d         |          }	ng }	|                    |          }
|r$ ||
d          d	                    |	          z   }n|r^ |
                    d
d                              dd          d                              d          d	                    |	          z   }n7 |
d                              dd          d	                    |	          z   }|rO| j	        
                    |d         dd          d         }fd|D             }|d	                    |          z   }|d         |d         | j                            d          |d         d         z   d}d|v rd|d         v r|d         d         |d<   t          ||          S )Nr   )markdownifyzE`markdownify` package not found, please run `pip install markdownify`)BeautifulSoupzK`beautifulsoup4` package not found, please run `pip install beautifulsoup4`r{   ATX)heading_style z</p>z
</p>z<br />
lxml Tstripzbody.view.valueall)rx   depthr   c                 v    g | ]5} |d          d         d         d                               dd          6S )r   viewr   r   r   Tr   )get_text)rX   commentr   s     r   r|   z1ConfluenceLoader.process_page.<locals>.<listcomp>:  s`         gfof5g>GGPPt Q    r   title/_linkswebui)r   r{   sourceversionwhen)page_contentmetadata)r   rP   bs4r   process_attachmentr   joinreplacer   rR   get_page_commentsrQ   r   r   )r   r   r7   r8   r9   r<   r=   r>   r   attachment_textscontenttextcommentscomment_textsr   r   s                  @r   r   zConfluenceLoader.process_page  s      	3333333   !0  
  	#7 	-------   !3  
  	"#66tDz=QQ! ,,T22 	.;we<<<rwwGW?X?XXDD  .$}OOFH55==hMMv (3--"''*:";";< %}Wf55>>t ?  GG,--.  
	188T
#4E 9  H     (	  M "''-000D ']t*m))#..h1HH
 
 4	?!:!:#Iv6HV
 
 
 	
s    &5 Ar   c                    	 ddl m} n# t          $ r t          d          w xY w| j                            |          d         }g }|D ]/}|d         d         }| j        |d         d         z   }|d	         }		 |d
k    r|	|                     ||          z   }
n|dk    s|dk    s|dk    r|	|                     ||          z   }
n_|dk    r|	|                     |          z   }
n@|dk    r|	| 	                    |          z   }
n!|dk    r|	| 
                    ||          z   }
n|                    |
           # t          j        $ r.}|j        j        dk    rt!          d|            Y d }~( d }~ww xY w|S )Nr   Imagez;`Pillow` package not found, please run `pip install Pillow`r   r   	mediaTyper   downloadr   zapplication/pdfz	image/pngz	image/jpgz
image/jpegzGapplication/vnd.openxmlformats-officedocument.wordprocessingml.documentzapplication/vnd.ms-excelzimage/svg+xmli  zAttachment not found at )PILr   rP   rR   get_attachments_from_contentrQ   process_pdfprocess_imageprocess_docprocess_xlsprocess_svgrd   requests	HTTPErrorr   status_codeprint)r   r   r<   r   attachmentstexts
attachment
media_typeabsolute_urlr   r   es               r   r   z#ConfluenceLoader.process_attachmentP  s   
	!!!!!!! 	 	 	P  	 oBB7KKIV% 	 	J#J/<J=:h+?
+KKLw'E!222 4#3#3L-#P#PPDD+--![00!\11 4#5#5lM#R#RRDD #1 1 1 !4#3#3L#A#AADD#=== 4#3#3L#A#AADD?22 4#3#3L-#P#PPDDT""""%   :)S00C\CCDDDHHHH s-   	 #:B*D;%D;;E8
"E32E33E8linkc                    	 dd l }ddlm} n# t          $ r t          d          w xY w| j                            |d          }d}|j        dk    s|j        dk    s|j        |S 	  ||j                  }n# t          $ r |cY S w xY wt          |          D ]+\  }}	|
                    |	|	          }
|d
|dz    d|
 dz  },|S )Nr   )convert_from_bytesz^`pytesseract` or `pdf2image` package not found, please run `pip install pytesseract pdf2image`Tpathabsoluter      r   langzPage r[   :


)pytesseract	pdf2imager   rP   rR   requestr   r   rN   	enumerateimage_to_string)r   r   r<   r   r   r   r   imagesiimage
image_texts              r   r   zConfluenceLoader.process_pdf  sD   
	4444444 	 	 	A  	 ?**t*DD  C''3&&'K	''(899FF 	 	 	KKK	 "&)) 	7 	7HAu$44U4OOJ6AE66j6666DDs   
 '(A9 9BBc                 r   	 dd l }ddlm} n# t          $ r t          d          w xY w| j                            |d          }d}|j        dk    s|j        dk    s|j        |S 	 |                    t          |j                            }n# t          $ r |cY S w xY w|                    ||	          S )
Nr   r   zX`pytesseract` or `Pillow` package not found, please run `pip install pytesseract Pillow`Tr   r   r   r   r   )r   r   r   rP   rR   r   r   r   openr   OSErrorr   )r   r   r<   r   r   r   r   r   s           r   r   zConfluenceLoader.process_image  s	   
	!!!!!!! 	 	 	>  	 ?**t*DD  C''3&&'K	JJwx'78899EE 	 	 	KKK	 **5}*EEEs   
 '('B BBc                    	 dd l }n# t          $ r t          d          w xY w| j                            |d          }d}|j        dk    s|j        dk    s|j        |S t          |j                  }|                    |          S )Nr   z?`docx2txt` package not found, please run `pip install docx2txt`Tr   r   r   r   )docx2txtrP   rR   r   r   r   r   process)r   r   r  r   r   	file_datas         r   r   zConfluenceLoader.process_doc  s    	OOOO 	 	 	Q  	
 ?**t*DD  C''3&&'KH,--		***s    !c                    dd l }dd l}	 dd l}n# t          $ r t          d          w xY w	 dd l}n# t          $ r t          d          w xY w| j                            |d          }d}|j        dk    s|j        dk    s|j        |S |j	        
                    |          }|j	                            |          d	         }	|	                    d
          r`|j                            d          }
|                    |                    |
                    }||                    dd          dz   z  }n|                    |j                  }|                                D ]c}||j         dz  }t)          |j                  D ]:}t)          |j                  D ]}||                    ||           dz  }|dz  };|dz  }d|S )Nr   z7`xlrd` package not found, please run `pip install xlrd`z;`pandas` package not found, please run `pip install pandas`Tr   r   r   r   r[   z.csvzutf-8F)indexheaderr   )file_contentsr   	r   )ioosxlrdrP   pandasrR   r   r   r   r   basenamesplitext
startswithdecoderead_csvStringIO	to_stringopen_workbooksheetsr   rangenrowsncols
cell_value)r   r   r  r  r  pdr   r   filenamefile_extensioncontent_stringdfworkbooksheetrowcols                   r   r   zConfluenceLoader.process_xls  sA   							YKKKK 	Y 	Y 	YWXXX	Y	 	 	 	M  	
 ?**t*DD  C''3&&'K7##D)) ))(33A6$$
 
 	 &-44W==NR[[8899BBLLuUL;;fDDDD))8H)IIH!**  5:**** -- ! !C$U[11 B B5#3#3C#=#= A A AADLDDs    )2 Ac                    	 dd l }ddlm} ddlm} ddlm} n# t          $ r t          d          w xY w| j        	                    |d          }d}|j
        d	k    s|j        d
k    s|j        |S  |t          |j                            }	t                      }
|                    |	|
d           |
                    d           |                    |
          }|                    ||          S )Nr   r   )renderPM)svg2rlgz`pytesseract`, `Pillow`, `reportlab` or `svglib` package not found, please run `pip install pytesseract Pillow reportlab svglib`Tr   r   r   r   PNG)fmtr   )r   r   r   reportlab.graphicsr(  svglib.svglibr)  rP   rR   r   r   r   r   
drawToFileseekr  r   )r   r   r<   r   r   r(  r)  r   r   drawingimg_datar   s               r   r   zConfluenceLoader.process_svg
  sF   
		!!!!!!333333------- 	 	 	O  	 ?**t*DD  C''3&&'K''("2334499GX5999a

8$$**5}*EEEs    3)
NNNNNTr-   r.   r/   N)NNNNNNrW   )NFF)%r   r    r!   r"   r   r&   r)   r
   r   Sessionr(   boolintr	   rT   staticmethodr   rM   r   rr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r*   r   r   r,   r,   !   sF       o oh "&"&.2!%# $+,+,+-,0U $((,#!+0).$)!&(5(=!#''+%*#7U U UU #U 3-	U
 (*+U U }U ~U $C=U $C=U $C=U $D>U C=U 49%U  }!U" c]#U$ %)%U& #''U( ")U* +U, &-U. }/U0 C=1U2  }3U4 #5U6 7U U U Un !!%"&.2!%#H Hc]H#H 3-H (*+	H
 H }H 
tTz	H H H \HTY Yc Yc Y Y Y Yn3 n8H+= n n n n`/S /T(^ / / / /%8H- % % % % CG+ ++19$+RU+	d+ + + +(  ( S ( T (  (  (  ( T
4 
D 
 
 
 
" (,/4# Dz %) "	
  &  } 'tn  
(	   > (,/4#F
 F
F
 "F
 	F

 &F
  }F
 'tnF
 F
 
F
 F
 F
 F
V (,0 00  }0 
c	0 0 0 0j (,      }  
	       J (,F FF  }F 
	F F F F<+ + + + + +*1 1 1 1 1 1l (,!F !F!F  }!F 
	!F !F !F !F !F !Fr   r,   )r   enumr   r  r   typingr   r   r   r   r	   r
   r   r   langchain_core.documentsr   tenacityr   r   r   r   )langchain_community.document_loaders.baser   	getLoggerr   r   r)   r   r,   r*   r   r   <module>r<     sZ                G G G G G G G G G G G G G G G G G G  - - - - - -            A @ @ @ @ @		8	$	$
8 
8 
8 
8 
8C 
8 
8 
8JF JF JF JF JFz JF JF JF JF JFr   