gh8pdZdZddlZddlZddlZddlZddlmZmZmZddl m Z ej ej ejdej ej edZdZGd d e jZGd d e jZdS) z S5/HTML Slideshow Writer. reStructuredTextN)frontendnodesutils) html4css1dummythemesctjt|}tj|st jd|d|d|S)NzTheme directory not found: z (path: ))ospathjointhemes_dir_pathisdirdocutilsApplicationError)namer s /builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib/python3.11/site-packages/docutils/writers/s5_html/__init__.py find_themers` 7<< . .D 7==  G'':>$$ EGG G KceZdZejjddddgddddfd d gd d d fddgdejdfddgdddfddgddgdddfddgddejd fd!d"gd#ddfd$d%gdejdfd&d'gd(ddff fzZd)d*iZd+Z d,Z d-Z d.S)/WriterzS5 Slideshow Specific OptionszFor the S5/HTML writer, the --no-toc-backlinks option (defined in General Docutils Options above) is the default, and should not be changed.aBSpecify an installed S5 theme by name. Overrides --theme-url. The default theme name is "default". The theme files will be copied into a "ui/" directory, in the same directory as the destination file (output HTML). Note that existing theme files will not be overwritten (unless --overwrite-theme-files is used).z--themedefaultz theme_url)rmetavar overrideszSpecify an S5 theme URL. The destination file (output HTML) will link to this theme; nothing will be copied. Overrides --theme.z --theme-urlztheme)rrz{Allow existing theme files in the ``ui/`` directory to be overwritten. The default is not to overwrite theme files.z--overwrite-theme-files store_true)action validatorzfKeep existing theme files in the ``ui/`` directory; do not overwrite any. This is the default.z--keep-theme-filesoverwrite_theme_files store_false)destrz@Set the initial view mode to "slideshow" [default] or "outline".z --view-mode slideshowoutlinez)choicesrrzONormally hide the presentation controls in slideshow mode. This is the default.z--hidden-controlsT)rrr z^Always show the presentation controls in slideshow mode. The default is to hide the controls.z--visible-controlshidden_controlszMEnable the current slide indicator ("1 / 15"). The default is to disable it.z--current-slidez:Disable the current slide indicator. This is the default.z--no-current-slide current_slide toc_backlinksrzs5_html writer)writersz html writerszhtml4css1 writerc\tj|t|_dSN)rr__init__S5HTMLTranslatortranslator_classselfs rr-zWriter.__init__Ys'!!$''' 0rN) __name__ __module__ __qualname__rr settings_specrvalidate_booleansettings_default_overridesconfig_sectionconfig_section_dependenciesr-rrrr#s$2' % N +H# % %  & L /G 4 4 6 G $ %!0I J J L 1  *m D D F M /"I.;   ! !  !d 1 3 3 4  1  $ > > @ *  !0I J J L G  "m < < >K' @ ,6A,AM\#21!5%N#711111rrceZdZdZdZdZdZ dZ dZ dZ e ezZ dZ d Z d Z ejd Zd Zd ZdZdZdZdZdZdS)r.a zA z
r__base__)z slides.cssz outline.cssz print.cssz opera.cssz slides.js)z s5-core.cssz framing.cssz pretty.cssctjj|g|Rd|_||jjj}d|jjj}|j |j |j||dz|jjj s|j |j |j dg|_g|_d|_d|_dS)N)visiblehidden)r view_modecontrol_visibilityz) r)rHTMLTranslatorr-theme_file_path setup_themedocumentsettingsr@r' stylesheetappends5_stylesheet_templater(disable_current_slidemeta s5_footer s5_header section_counttheme_files_copied)r1argsr@rAs rr-zS5HTMLTranslator.__init__s )$66666# M*4 24=3I4CE t:*.*>/88J"L"L L M M M}%3 ? O " "4#= > > > EFFF"&rc|jjjr|dS|jjjr|jjj|_dSt jd)Nz&No theme specified for S5/HTML writer.)rErFr copy_themerrCrrr0s rrDzS5HTMLTranslator.setup_themesf = ! ' : OO      ] # - :#'=#9#CD +8:: :rc|jj}t|j}|g}i|_i}dd|j|_|jr|tj tj |jd|j}tj |stj |ndSd}|r_tj |D]3}||jkr||||r||jvrd||<4|rntj ||j}tj|rt%|d5}|} dddn #1swxYwY| D]Z} | } | rB| ds-t| }||vrd}n||n[d}nd}|s+t|j}||d }|_t1|t1|jkrtt3|j} |D]}| |t9jd d d | DzdS) a Locate & copy theme files. A theme may be explicitly based on another theme via a '__base__' file. The default base theme is 'default'. Files are accumulated from the specified theme, any base themes, and 'default'. ui/NFzutf-8)encoding#TzTheme files not found: %sz, c3 K|] }d|zV dS)z%rNr:).0fs r z.S5HTMLTranslator.copy_theme..s&77D1H777777r)rErFrrrOrC _destinationr r rdirnamermakedirslistdirbase_theme_file copy_filerequired_theme_filesisfileopen readlinesstrip startswithrH default_themelenlistkeysremoverr) r1rFr theme_pathsrequired_files_copiedr#rr[ralineslinerequireds rrRzS5HTMLTranslator.copy_themes!=)(.))f "$ "*.$$?   7<< 566hnNND7==&& " D!!! F Z%% 1 1,,,NN1dD111T666/0)!,  gll41EFFOw~~o.. /G<<<*KKMME***************!   D::<>& ! ! )0088 t}-Hw~~d## 9H,J 9,006666&$''/8'}}H///////////////$%%;'//<>$   1  s%0DDD,B GGGc|j|j|jd|jjizg|j|j|jdd|j z|_ |j rJ|j dkr |j |j n|j |j |j |j dd|j|jd|j}d|j}d|jdd}|j|||dz}|j||jd|j|d gd gd d |js|jd |jdd |j|jdd|jz|jz|jz|jddzdS)NlangmathjaxrVz

z

)headertitlefooterz
slideslide0)classesidsdivz
r) head_prefixextenddoctypehead_prefix_templaterF language_code html_prologrHrKhead math_header math_outputrG html_headfragmentbodyrrMrL html_titler|layout_template body_prefixstarttagrN body_suffixinsert html_bodybody_pre_docinfodocinfo)r1noderrrlayouts rdepart_documentz S5HTMLTranslator.depart_documentsm !%!:"($-*E!F"G!H I I I  ---IaaaL49,   99,,   !12222&&t'7888 dim,,, TY'''((((((001EvNN%62739););; '''  >???  MMwi CCU K K M M M! ) I  Z ( ( ( :... d.qrr2T5JJ $ -/3y9 $ 0" 56 7 7 7 7 7rc|j}|jd|j|j|d|jd|j|d=dS)Nz

z

)contextpoprLrHrr)r1rstarts r depart_footerzS5HTMLTranslator.depart_footer9sv   "" f%%% di/000 g&&& Ieff   rc|j}dg}||j|d|d|j|d=|j|dS)Nz )rrrrrHrM)r1rrrs r depart_headerzS5HTMLTranslator.depart_header@sv   ""'( di'((( l### Ieff  f%%%%%rcb|js|jd|xjdz c_|xjdz c_|jdkr2|j||dddS|j||dddS)NrrVrsection)CLASSr)rNrrH section_levelrr1rs r visit_sectionzS5HTMLTranslator.visit_sectionHs! + I  \ * * * a a   ! ! I  T]]4i]HH I I I I I I  T]]4g]FF G G G G Grc^t|jtjrm|j|jzdz }|dkrd}d|z}|j|||d|j d|zdStj ||dS)NrVzh%srz ) isinstanceparentrrrinitial_header_levelrrHrrrrBvisit_subtitle)r1rleveltags rrzS5HTMLTranslator.visit_subtitleSs dk5= 1 1 @&)BBQFEzz%-C I  T]]4b99 : : : L   C 0 0 0 0 0  $ 3 3D$ ? ? ? ? ?rcFtj||dSr,)rrB visit_titlers rrzS5HTMLTranslator.visit_title^s! ,,T488888rN)r2r3r4rIrJrriradirect_theme_filesindirect_theme_filesrcr-rDrRrecompilervrbrrrrrrr:rrr.r.^s ?$  O M$ OALD402DD)'''(:::?9?9?9B'BJ'CDD>777B&&& H H H @ @ @99999rr.)__doc__ __docformat__rr rrrrrdocutils.writersr relative_pathr rgetcwdr^__file__rrrrBr.r:rrrs: #  ++++++++++&&&&&&%%%GLLg&&GLL**H5577 8181818181Y 818181vA9A9A9A9A9y/A9A9A9A9A9r