+
     h:K  c            
      sV   ^ RI Ht ^ RIt^ RIHtHtHt ^RIHtH	t	H
t
HtHtHtHtHt ^RIHtHtHtHtHt ^RIHtHtHtHt ^RIHt ^RIHtHt ^R	I H!t!H"t"H#t#H$t$H%t% ]'       d   ^ RI&t&^R
IH't' ] ! R R]]!4      4       t(] ! R R](]"]#]$]%4      4       t)] ! R R]]#]$]!4      4       t*R# )i    )annotationsN)TYPE_CHECKINGListTuple)MemberProfileMemberStatistics
PartialTagProfile
ResultList
Statistics	Thumbnail_parse_results)GroupCategory
MembershipSearchCategoryThumbnailType	TimeFrame)LOGGERconcat_docsget_pagejoin)Blog)BaseMetaClassPageMetaClass)GetAddonsMixinGetEnginesMixinGetGamesMixinGetModsMixinGetWaresMixin)CommentListc                  s<    ] tR t^tRtRtR R ltR R ltR tRt	R# )	Groupa!  This object represents the group model of  Certain attributes can be None if the group
has been set to private. If you wish to see a group you have access to then you can login with the
login

Parameters
-----------
html : bs4.BeautifulSoup
    The html to parse. Allows for finer control.

Filtering
----------
subscriptions : :class:`.Membership`
    The subscription system of the group (private, invitation)
category : :class:`.GroupCategory`
    The category of the group (funny, literature)

Sorting
--------
    * **id** - order group by date, asc is most recent first, desc is oldest first
    * **ranktoday** - order by daily ranking, asc is highest ranked, desc is lowest rank
    * **visitstotal** - order by most views, asc is highest views, desc is lowest views
    * **name** - order alphabetically, asc is a-z, desc is z-a
    * **membercount** - order by number of members, asc is most members first, desc is lest member first

Attributes
-----------
name : str
    The name of the group
private : bool
    Whether or not the group is private
profile : Profile
    The profile object for the group
stats : Statistics
    The stats of the Group
tags : List[PartialTag]
    A list of partial tags. You can use `get_tags` and then use the name id to get the right one.
embed : str
    The html for athe group embed
medias : List[Thumbnail]
    A list of media like thumbnail objects representing all the images, videos and audio
    clips that a group has published.
suggestions : List[Thumbnail]
    A list of group like thumbnail objects representing the suggestions made by moddb to
    members visiting this group
articles : List[Thumbnail]
    A list of article like thumbnail objects representing some of the articles published
    by the group
description : str
    The plaintext description of the group
Nc                   V ^8  d   QhRR/#    htmlbs4.BeautifulSoup Zformat   "7/usr/lib/python3.14/site-packages/moddb/pages/entity.py__annotate__Group.__annotate__S   s     Y4 Y4. Y4    c                	s	   VP                  R RR7      P                  P                  P                  V n        \
        P                  ! W4       RV n         \        V4      V n	         \!        V4      V n         VP                  R	R
R/R7      P%                  R4      pV Uu. uFW  pVP                  f   K  \'        VP                  \)        VR,          4      VR,          P+                  R4      R*,          4      NKY  	  upV n         VP                  RRRR7      R,          V n        T P7                  T4      T n         TP                  RRR7      P:                  P:                  P:                  P                  R RR7      pTP%                  R RRR7      pT Uu. uF  p\=        TP                  R,          TP                  R,          TP                  P>                  R,          TP                  R4      P                  TP                  R 4      R!,          \@        PB                  R"7      NK  	  upT n"         TP                  R R$R%7      PF                  T n$        T PK                  ^TR)7      T n&        R#   \         dU    \        P                  ! RT P                  \        P                  \        P                  8  R7       RT n	        RT n         ELhi ; i  \         dN    \        P                  ! RT P                  \        P                  \        P                  8  R7       RT n         ELi ; iu upi   \         dN    \        P                  ! RT P                  \        P                  \        P                  8  R7       . T n         ELi ; i  \0         d     \3        TP%                  R4      ^,          P                  4      T n         EL  \4         dO    \        P                  ! RT P                  \        P                  \        P                  8  R7       RT n          ELi ; ii ; iu upi   \         dN    \        P                  ! R#T P                  \        P                  \        P                  8  R7       . T n"         ELUi ; i  \         dD    TP                  R R&R'.R7      P                  R R(R7      P:                  PF                  T n$         ELi ; i)+divtitleclass_Fz$Entity '%s' has no profile (private)Zexc_infoNTz"Entity '%s' has no stats (private)ZformnameZtagsform)Zattrsahref/z!Entity '%s' has no tags (private)Zinputtextztext textembed)typer.   valueZtextareazGroup '%s' has no embedspanZArticlesstringtablezrow rowcontent clear)r.   	recursivesrcpZtimeZdatetime)r0   urlimageZsummaryZdater5   z%Group '%s' has no article suggestionsprofiledescriptionZidZcolumnzspan-allZtooltip)r"   i)'findZh2r1   r9   r0   r   __init__privater   profileAttributeErrorr   infolevelloggingDEBUGr	   statsfind_allr   r   splittagsembed	TypeErrorstrZ
IndexError_get_suggestionssuggestionsparentr
   imgr   articlearticlesr4   descriptionZ
_get_mediamedias)selfr"   Zraw_tagsxZarticles_rawZ
thumbnailss   &&    r'   rC   ZGroup.__init__S   s   IIeGI47799@@	t*		 "4=DL	#D)DJ	yy
/CyDMMcRH "!A88 P
188T!F)_aiooc6J26NO!DI		"7@PQRYZDJ  006	99VJ9?FFMMTTYYg Z L &..4 / J $
 $A WF##''%.FF3K..
3&.. $
DM&	#yy3GyHMMD ooado3e  	 KK6		6
  DLDL	   	KK4		6
 DJ	
  	KK3		6
 DI	  	"" z!:1!=!?!?@
 "-tyy6<<SZS`S`C` "

	"	"$
  	KK7		6
 DM	  			%:(>	?eI. 	s   I/ &K 7(L1 L,4AL,<L1  N <AP0 BP+*P0 3"R /AKKAL)(L),L1 1AN	N	P(0OAP$P(#P$$P(+P0 0ARRA
SSc               s     V ^8  d   QhRRRR/# )r!   r"   r#   returnzList[Thumbnail]r$   r%   r&   r'   r(   r)      s     + +%6 +? +r*   c                s    VP                  RRR7      P                  P                  P                  P                  RRR7      P                  RRR7      p. pT F  p TP                  R
RR7      pTR,          P                  R4      ^,          P                  RR4      p\        TR,          TR,          TP                  R,          \        T,          R7      pTP                  T4       K  	  T#   \         dH    \        P
                  ! RT P                  \        P                  \        P                  8  R	7       . u # i ; i  \        \         3 d     K  i ; i)a  Hidden method used to get the list of suggestions on the page. As with most things, this list of suggestions
will be a list of Thumbnail objects that can be parsed individually. Slightly modified to fit a group

Parameters
-----------
html : bs4.BeautifulSoup
    The html page we are trying to parse the suggestions for

Returns
--------
List[Thumbnail]
    The list of suggestions as thumbnails.
r7   r8   r+   r:   r-   Fr;   z%Group '%s' has no sidebar suggestionsr/   r1   r?   r2   r3   ZsZ r,   r<   )r0   r>   r?   r5   )zYou may also likezPopular Articles)rB   rT   rL   rF   r   rG   r0   rH   rI   rJ   rM   Zreplacer
   rU   r   ZappendrP   )rZ   r"   Zsuggestions_rawrS   r[   ZlinkZsuggestion_typeZ
suggestions   &&      r'   rR   ZGroup._get_suggestions   s,   			&)R	Svvdd5d&A%51   Avvc'v2"&v,"4"4S"9!"<"D"DS""M&gV((5/&7	
 "":. ! /  	KK7		6
 I	( #I. s&   AC/ BE/AE EEEc                	s"    R V P                    R2# )z<Group name=>)r0   rZ      &r'   __repr__ZGroup.__repr__   s    dii[**r*   )
rW   rX   rO   rY   r0   rD   rE   rK   rS   rN   )
__name__
__module____qualname____firstlineno____doc__Zget_reviewsrC   rR   ra   __static_attributes__r$   r*   r'   r   r      s!    1f KY4v+Z+r*   r   c                  s2   a  ] tR t^tRtR V 3R lltRtV ;t# )Teama  A team is a group of people, which are the author of a game, a mod or an engine. A group has members which all
have rights on those page. Like a member but instead of a single person authoring various mods and games it's several.

Parameters
------------
html : bs4.BeautifulSoup
    The html to parse. Allows for finer control.

Filtering
----------
subscriptions : :class:`.Membership`
    The subscription system of the company (private, invitation)
category : :class:`.TeamCategory`
    What does the team do (publisher, developer)

Sorting
--------
    * **id** - order by creation, desc is most recent first, asc is oldest first
    * **ranktoday** - order by daily ranking, asc is highest ranked, desc is lowest rank
    * **visitstotal** - order by most views, asc is highest views, desc is lowest views
    * **name** - order alphabetically, asc is a-z, desc is z-a
    * **game** - order by game???
    * **dateup** - order by latest update, asc is most recent update first, desc is oldest update first

Attributes
-----------
games : List[Thumbnail]
    A list of game like thumbnails that the team has authored.
engines : List[Thumbnail]
    A list of engine like objects that the team has authored.

c               r   r    r$   r%   r&   r'   r(   ZTeam.__annotate__  s        .  r*   c           
     	sB  < \         SV `  V4        V P                  V4      V n         V P                  V4      V n         VP                  RRR7      P                  P                  P                  P                  RRR7      P                  RR	R
7      R,          pV Uu. uF]  p\!        VP"                  R,          VP"                  R,          \$        P&                  VP"                  P(                  R,          R7      NK_  	  upV n        R#   \         dN    \
        P                  ! R T P                  \
        P                  \        P                  8  R7       . T n         EL:i ; i  \         dN    \
        P                  ! RT P                  \
        P                  \        P                  8  R7       . T n         EL~i ; iu upi   \         dN    \
        P                  ! RT P                  \
        P                  \        P                  8  R7       . T n         R# i ; i)zTeam '%s' has no gamesr/   zTeam '%s' has no enginesr7   zPopular Modsr8   r+   r:   r-   Fr]      NNr,   r2   r<   )r0   r>   r5   r?   zTeam '%s' has no modsN)superrC   Z
_get_gamesgamesrF   r   rG   r0   rH   rI   rJ   Z_get_enginesenginesrB   rT   rL   r
   r1   r   ZmodrU   mods)rZ   r"   rn   r[   	__class__s   &&  r'   rC   ZTeam.__init__  s   	.DJ
	,,T2DL			&	8vvdd5d&A%51"6   A WF&**##''%.	 DI#  	KK0$))fllV]VcVcFcdDJ	  	KK*DIIPWP]P]@] DL		  	KK/V\\U\UbUbEbcDI	sK   D E&  AG A#GG AE#"E#&AF>=F>G AHH)rm   rl   rn   )rb   rc   rd   re   rf   rC   rg   __classcell__ro      @r'   rh   rh      s    B   r*   rh   c                  s   a  ] tR tRtRtR V 3R lltR tRRRRRR	R/R
 R llltRRR/R R llltRRR/R R lllt	RRRRRRR/R R lllt
RtV ;t# )Memberi%  a  The object to represent an individual member on ModDB

Parameters
-----------
html : bs4.BeautifulSoup
    The html to parse. Allows for finer control.

Sorting
--------
* **username** - sort alphabetically by username, asc is z-a and desc is a-z
* **id** - sort by member creation date, asc is most recent, desc is oldest
* **online** - sort by last online, asc is most recently seen online and desc is least recently

Attributes
-----------
profile : MemberProfile
    Since member profile boxes have no overlap with other profiles, they are a separate object type
    but serve the same function of making the side box "Profile" into an object, except exclusively
    for a member page.
stats : MemberStatistics
    Since member statistics have no overlap with regular statistic pages, they are a separate object type
    but serve the same function of making the side box "Statistics" into an object, but exclusively for
    the member page.
description : str
    Description written on the member profile
groups : List[Thumbnail]
    A list of group/team like thumbnail objects representing both the Teams the member is part of and the
    Groups the member is part of.
blog : Blog
    The front page blog shown on the member page
blogs : List[Thumbnail]
    A list of blog like thumbnails representing the blog suggestion of a member's frontpage
friends : List[Thumnails]
    A list of member like thumbnails representing some of the friends shown on the member's front
    page
c               r   r    r$   r%   r&   r'   r(   Member.__annotate__L  s     a a. ar*   c           	     	s
  < \         SV `  V\        P                  4        \	        V4      V n         \        V4      V n         VP                  RRR7      P                   P"                  V n         VP                  RR	R
7      P&                  P&                  P&                  P                  RRR7      P)                  RRR7      RR pV Uu. uFA  p\+        VP,                  R,          VP,                  R,          \.        P0                  R7      NKC  	  upV n         VP                  RRR
7      P&                  P&                  P&                  P                  RRR7      P)                  RRR7      p\5        VP7                  ^ 4      VP7                  ^ 4      R7      V n         VP                  RRR
7      P&                  P&                  P&                  P                  RRR7      P)                  RRR7      pVRR  Uu. uFD  p\+        VP,                  P"                  VP,                  R,          \.        P8                  R7      NKF  	  upV n         VP                  RRR7      P)                  RRR7      R,          pV Uu. uFA  p\+        VP,                  R,          VP,                  R,          \.        P>                  R7      NKC  	  upV n         R#   \         dN    \        P                  ! R T P                  \        P                  \        P                  8  R7       RT n         ELi ; i  \         dN    \        P                  ! RT P                  \        P                  \        P                  8  R7       RT n         EL;i ; i  \         dN    \        P                  ! RT P                  \        P                  \        P                  8  R7       RT n         ELii ; iu upi   \         dN    \        P                  ! RT P                  \        P                  \        P                  8  R7       . T n         ELi ; i  \:        \        3 dN    RT n        \        P                  ! RT P                  \        P                  \        P                  8  R7        ELi ; iu upi   \:        \        3 dN    . T n        \        P                  ! RT P                  \        P                  \        P                  8  R7        ELi ; iu upi   \         dN    . T n         \        P                  ! RT P                  \        P                  \        P                  8  R7        R# i ; i)z$Member '%s' has no profile (private)r/   Nz"Member '%s' has no stats (private)r+   r@   rA   zMember '%s' has no descriptionr7   ZGroupsr8   r:   r-   Fr]   r,   r2   )r0   r>   r5   z#Member '%s' doesn't have any groupszMy Blogs)Zheadingr4   z"Member '%s' has no front page blogz#Member '%s' has no blog suggestionsztable tablerelatedri   zMember '%s' has no friends ;(i)!rk   rC   r   Zmembersr   rE   rF   r   rG   r0   rH   rI   rJ   r   rK   rB   r=   r9   rX   rT   rL   r
   r1   r   Zgroupgroupsr   ZpopblogrP   blogsZmemberfriends)	rZ   r"   Z
groups_rawr+   Z	blogs_rawrv   rx   Zfriendro   s	   &&      r'   rC   ZMember.__init__L  s9   ~556	 (.DL	)$/DJ	$#yy3GyHJJQQD			&	2vvdd5d&A%51#27  &%C suuW~355=}GZGZ[%DK			&	4vvdd5d&A%51 
 Y]]1%5IMM!<LMDI			&	4vvdd5d&A%51  &crN*D tvv}}$&&.}GYGYZ*DJ	ii.BiCLL M G & &F '*(&--
 &DLc  	 KK6		6
  DL	   	KK4		6
 DJ	  	$KK0$))fllV]VcVcFc  $D		$  	KK5		6
 DK	 >* 	DIKK4		6 	 >* 	DJKK5		6 	  	DLKK/V\\U\UbUbEb 	s   K L& ,N 0AO! 
AOO! BP< AR" 8A
RR" /T :ATT AL#"L#&AM>=M>AOOO! !AP98P9<ARRR" "AT ?T T AU U c                	sP    R V P                    RV P                  P                   R2# )z<Member name=z level=r^   )r0   rE   rH   r_   r`   r'   ra   ZMember.__repr__  s&    tyyk1C1C0DAFFr*   queryN	timeframesortc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r!   indexintry   rQ   rz   r   r{   zTuple[str, str]r\   r   r$   r%   r&   r'   r(   rt     s<     ,
 ,
,
 	,

 ,
 ,
 
,
r*   c               s    RRRTRV'       d   VP                   MRRV'       d   V^ ,           RV^,           2MR/pV P                   R2p\        V R	V 2VR
7      p\        V4      w  rr\	        VVVV	V
VR7      # )a  Search through a member's blogs one page at a time with certain filters.

Parameters
-----------
index : int
    The page index you wish to get the blogs for, allows to hop around.
timeframe : TimeFrame
    The date the blog was added, optional
query : str
    The string to look for in the blog title, optional.
sort : Tuple[str, str]
    The sorting tuple to sort by

Returns
--------
ResultList[Blog]
    The list of blogs on this page.
filtertkwrz   Nr{   Z-z/blogsz/page/params)resultsr   r>   current_pagetotal_pagestotal_results)r6   r>   r   r   r   )rZ   r}   ry   rz   r{   r   r>   r"   r   r   r   r   s   &&$$$       r'   	get_blogsZMember.get_blogs  s    6 c%I4dtAwiqa	*	
 
&!3%veW-f=<J4<P9{%#'
 	
r*   show_deletedFc               $    V ^8  d   QhRRRRRR/# )r!   r}   r~   r   Zboolr\   r   r$   r%   r&   r'   r(   rt     s"     ( ( (4 (T_ (r*   c               sx    RV'       d   RMR/p\        V P                   RV 2VR7      pV P                  V4      # )a_  Gets a page of all the comments a member has posted.

Parameters
-----------
index : int
    The page number to get the comments from.
show_deleted : Optional[bool]
    Pass true to show deleted user comments. Only works if it is a page
    you have permissions on.

Returns
--------
CommentList[Comment]
    A list of the comments made by the user.

Zdeletedr   Nz/comments/page/r   )r   r>   Z_get_comments)rZ   r}   r   r   r"   s   &&$  r'   get_member_commentsZMember.get_member_comments  s>    " LSd;488*OE7;FK!!$''r*   usernamec               r   )r!   r}   r~   r   rQ   r\   r   r$   r%   r&   r'   r(   rt     s&     L L Ls Lj Lr*   c               sR    RRRV/pV P                  V P                   RV 2VR7      # )a(  Get a page of the friends of the member

Parameters
-----------
index : int
    The page number to get the friends from.
username : Optional[str]
    The username of the user you are looking for

Returns
--------
ResultList[Thumbnail]
    A list of member like thumbnails of the member's friends
r   r   r   z/friends/page/r   )_getr>   )rZ   r}   r   r   s   &&$ r'   get_friendsZMember.get_friends  s4     CX6yyDHH:^E7;FyKKr*   subscriptioncategoryc          
     r|   )r!   r}   r~   ry   rQ   r   r   r   r   r\   r   r$   r%   r&   r'   r(   rt   	  sC     !K !K!K 	!K
 !!K  !K 
!Kr*   c               s    RRRTRV'       d   VP                   MRRV'       d   VP                   MR/pV P                  V P                   RV 2VR7      # )	a  Get a page of the groups and teams a member is part of.

Parameters
-----------
index : int
    The page number to get the friends from.
query : Optional[str]
    The text to look for in the group's name
subscription : Optional[Membership]
    The membership rules
category : Optional[GroupCategory]
    The category of groups to search for

Returns
--------
ResultList[Thumbnail]
    A list of team/group like thumbnails the member is part of
r   r   r   r   Nr   z/groups/page/r   )r6   r   r>   )rZ   r}   ry   r   r   r   s   &&$$$ r'   
get_groupsZMember.get_groups	  sU    6 c%,L..D(	
 yyDHH:]5':6yJJr*   )rv   rw   rX   rx   ru   rE   rK   )rj   )rb   rc   rd   re   rf   rC   ra   r   r   r   r   rg   rp   rq   rr   r'   rs   rs   %  s    #Ja aFG,
 	,

  $,
 !%,
 ,
\(% ( (,LT L L&!K 	!K
 $(!K #'!K !Kr*   rs   )+Z
__future__r    rI   Ztypingr   r   r   Zboxesr   r   r   r   r   r	   r
   r   Zenumsr   r   r   r   r   Zutilsr   r   r   r   rV   r   Zbaser   r   Zmixinsr   r   r   r   r   Zbs4r   r   rh   rs   r$   r*   r'   <module>r      s    "  - -	 	 	 X W 7 7  . _ _# +M> + +D B5/=, B BJ DK]M< DK DKr*   