diff --git a/.gitignore b/.gitignore index b6e4761..078cf38 100644 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,4 @@ dmypy.json # Pyre type checker .pyre/ +.idea/ \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/make.bat b/make.bat new file mode 100644 index 0000000..9534b01 --- /dev/null +++ b/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..995cfe8 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +sphinx +sphinx_rtd_theme +sphinx_copybutton +sphinx_tabs +pypandoc +requests +sphinx-autobuild \ No newline at end of file diff --git a/source/_images/big.png b/source/_images/big.png new file mode 100644 index 0000000..5a95786 Binary files /dev/null and b/source/_images/big.png differ diff --git a/source/_images/favicon.ico b/source/_images/favicon.ico new file mode 100644 index 0000000..f8d098d Binary files /dev/null and b/source/_images/favicon.ico differ diff --git a/source/_images/xtaothon.png b/source/_images/xtaothon.png new file mode 100644 index 0000000..fc3b80e Binary files /dev/null and b/source/_images/xtaothon.png differ diff --git a/source/_static/big.png b/source/_static/big.png new file mode 100644 index 0000000..5a95786 Binary files /dev/null and b/source/_static/big.png differ diff --git a/source/_static/css/theme.css b/source/_static/css/theme.css new file mode 100644 index 0000000..812b9fe --- /dev/null +++ b/source/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a,.wy-menu-vertical li.current>a span.toctree-expand:before,.wy-menu-vertical li.on a,.wy-menu-vertical li.on a span.toctree-expand:before,.wy-menu-vertical li span.toctree-expand:before,.wy-nav-top a,.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a span.toctree-expand,.wy-menu-vertical li.on a span.toctree-expand,.wy-menu-vertical li span.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p.caption .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a span.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a span.fa-pull-left.toctree-expand,.wy-menu-vertical li span.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p.caption .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a span.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a span.fa-pull-right.toctree-expand,.wy-menu-vertical li span.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p.caption .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a span.pull-left.toctree-expand,.wy-menu-vertical li.on a span.pull-left.toctree-expand,.wy-menu-vertical li span.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p.caption .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a span.pull-right.toctree-expand,.wy-menu-vertical li.on a span.pull-right.toctree-expand,.wy-menu-vertical li span.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a span.toctree-expand:before,.wy-menu-vertical li.on a span.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li span.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a span.toctree-expand,.wy-menu-vertical li.on a span.toctree-expand,.wy-menu-vertical li span.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a span.toctree-expand:before,.wy-menu-vertical li.on a span.toctree-expand:before,.wy-menu-vertical li span.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a span.toctree-expand,.wy-menu-vertical li.on a span.toctree-expand,.wy-menu-vertical li a span.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li span.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p.caption .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a span.toctree-expand,.btn .wy-menu-vertical li.on a span.toctree-expand,.btn .wy-menu-vertical li span.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p.caption .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a span.toctree-expand,.nav .wy-menu-vertical li.on a span.toctree-expand,.nav .wy-menu-vertical li span.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p.caption .btn .headerlink,.rst-content p.caption .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn span.toctree-expand,.wy-menu-vertical li.current>a .btn span.toctree-expand,.wy-menu-vertical li.current>a .nav span.toctree-expand,.wy-menu-vertical li .nav span.toctree-expand,.wy-menu-vertical li.on a .btn span.toctree-expand,.wy-menu-vertical li.on a .nav span.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p.caption .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li span.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p.caption .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li span.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p.caption .btn .fa-large.headerlink,.rst-content p.caption .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn span.fa-large.toctree-expand,.wy-menu-vertical li .nav span.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p.caption .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li span.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p.caption .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li span.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p.caption .btn .fa-spin.headerlink,.rst-content p.caption .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn span.fa-spin.toctree-expand,.wy-menu-vertical li .nav span.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p.caption .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li span.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p.caption .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li span.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p.caption .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li span.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p.caption .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini span.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol li,.rst-content ol.arabic li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content ol.arabic li p:last-child,.rst-content ol.arabic li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol li ul li,.rst-content ol.arabic li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs li{display:inline-block}.wy-breadcrumbs li.wy-breadcrumbs-aside{float:right}.wy-breadcrumbs li a{display:inline-block;padding:5px}.wy-breadcrumbs li a:first-child{padding-left:0}.rst-content .wy-breadcrumbs li tt,.wy-breadcrumbs li .rst-content tt,.wy-breadcrumbs li code{padding:5px;border:none;background:none}.rst-content .wy-breadcrumbs li tt.literal,.wy-breadcrumbs li .rst-content tt.literal,.wy-breadcrumbs li code.literal{color:#404040}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li span.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover span.toctree-expand,.wy-menu-vertical li.on a:hover span.toctree-expand{color:grey}.wy-menu-vertical li.current>a span.toctree-expand,.wy-menu-vertical li.on a span.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover span.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover span.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover span.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover span.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover span.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover span.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover span.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover span.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover span.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 span.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 span.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover span.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active span.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#F7DC6F;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p.caption .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p.caption .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li span.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version span.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content img{max-width:100%;height:auto}.rst-content div.figure{margin-bottom:24px}.rst-content div.figure p.caption{font-style:italic}.rst-content div.figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp{user-select:none;pointer-events:none}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content table>caption .headerlink{visibility:hidden;font-size:14px}.rst-content .code-block-caption .headerlink:after,.rst-content .toctree-wrapper>p.caption .headerlink:after,.rst-content dl dt .headerlink:after,.rst-content h1 .headerlink:after,.rst-content h2 .headerlink:after,.rst-content h3 .headerlink:after,.rst-content h4 .headerlink:after,.rst-content h5 .headerlink:after,.rst-content h6 .headerlink:after,.rst-content p.caption .headerlink:after,.rst-content table>caption .headerlink:after{content:"\f0c1";font-family:FontAwesome}.rst-content .code-block-caption:hover .headerlink:after,.rst-content .toctree-wrapper>p.caption:hover .headerlink:after,.rst-content dl dt:hover .headerlink:after,.rst-content h1:hover .headerlink:after,.rst-content h2:hover .headerlink:after,.rst-content h3:hover .headerlink:after,.rst-content h4:hover .headerlink:after,.rst-content h5:hover .headerlink:after,.rst-content h6:hover .headerlink:after,.rst-content p.caption:hover .headerlink:after,.rst-content table>caption:hover .headerlink:after{visibility:visible}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .hlist{width:100%}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl dt span.classifier:before{content:" : "}html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.field-list>dt:after,html.writer-html5 .rst-content dl.footnote>dt:after{content:":"}html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.footnote>dt>span.brackets{margin-right:.5rem}html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{font-style:italic}html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.footnote>dd p,html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{font-size:inherit;line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code,html.writer-html4 .rst-content dl:not(.docutils) tt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel{border:1px solid #7fbbe3;background:#e7f2fa;font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/source/_static/favicon.ico b/source/_static/favicon.ico new file mode 100644 index 0000000..f8d098d Binary files /dev/null and b/source/_static/favicon.ico differ diff --git a/source/_static/xtaothon.png b/source/_static/xtaothon.png new file mode 100644 index 0000000..fc3b80e Binary files /dev/null and b/source/_static/xtaothon.png differ diff --git a/source/api/bound-methods/index.rst b/source/api/bound-methods/index.rst new file mode 100644 index 0000000..f3d4089 --- /dev/null +++ b/source/api/bound-methods/index.rst @@ -0,0 +1,53 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +绑定方法 +============= + +某些 Telethon 类型定义了所谓的绑定方法。绑定方法是指附加到该类实例的类的函数。 + +.. code-block:: python + :emphasize-lines: 6 + + from telethon.sync import TelegramClient, events + + app = Client("my_account", api_id, api_hash) + + async def handler(context): + await context.reply('绑定方法。') + + app.add_event_handler(handler, events.NewMessage(**args)) + + app.run_until_disconnected() + +.. contents:: 目录 + :backlinks: none + :local: + +----- + +.. currentmodule:: telethon.tl.types + +消息 +------- + +.. hlist:: + :columns: 3 + + - :meth:`~message.reply` + - :meth:`~message.forward_to` + - :meth:`~message.edit` + - :meth:`~message.delete` + - :meth:`~message.mark_read` + - :meth:`~message.pin` + - :meth:`~message.unpin` + +.. toctree:: + :hidden: + + message.reply + message.forward_to + message.edit + message.delete + message.mark_read + message.pin + message.unpin diff --git a/source/api/bound-methods/message.delete.rst b/source/api/bound-methods/message.delete.rst new file mode 100644 index 0000000..bcff9ce --- /dev/null +++ b/source/api/bound-methods/message.delete.rst @@ -0,0 +1,4 @@ +message.delete() +================== + +.. automethod:: telethon.tl.types.message.delete() \ No newline at end of file diff --git a/source/api/bound-methods/message.edit.rst b/source/api/bound-methods/message.edit.rst new file mode 100644 index 0000000..02b0f41 --- /dev/null +++ b/source/api/bound-methods/message.edit.rst @@ -0,0 +1,4 @@ +message.edit() +================ + +.. automethod:: telethon.tl.types.message.edit() \ No newline at end of file diff --git a/source/api/bound-methods/message.forward_to.rst b/source/api/bound-methods/message.forward_to.rst new file mode 100644 index 0000000..5795445 --- /dev/null +++ b/source/api/bound-methods/message.forward_to.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +message.forward_to() +======================= + +.. automethod:: telethon.tl.types.message.forward_to() \ No newline at end of file diff --git a/source/api/bound-methods/message.mark_read.rst b/source/api/bound-methods/message.mark_read.rst new file mode 100644 index 0000000..f0879cb --- /dev/null +++ b/source/api/bound-methods/message.mark_read.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +message.mark_read() +====================== + +.. automethod:: telethon.tl.types.message.mark_read() \ No newline at end of file diff --git a/source/api/bound-methods/message.pin.rst b/source/api/bound-methods/message.pin.rst new file mode 100644 index 0000000..fc1b8ad --- /dev/null +++ b/source/api/bound-methods/message.pin.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +message.pin() +================= + +.. automethod:: telethon.tl.types.message.pin() \ No newline at end of file diff --git a/source/api/bound-methods/message.reply.rst b/source/api/bound-methods/message.reply.rst new file mode 100644 index 0000000..8ecc98e --- /dev/null +++ b/source/api/bound-methods/message.reply.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +message.reply() +================== + +.. automethod:: telethon.tl.types.message.reply() \ No newline at end of file diff --git a/source/api/bound-methods/message.unpin.rst b/source/api/bound-methods/message.unpin.rst new file mode 100644 index 0000000..40766a7 --- /dev/null +++ b/source/api/bound-methods/message.unpin.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +message.unpin() +=================== + +.. automethod:: telethon.tl.types.message.unpin() \ No newline at end of file diff --git a/source/api/client.rst b/source/api/client.rst new file mode 100644 index 0000000..78807a4 --- /dev/null +++ b/source/api/client.rst @@ -0,0 +1,29 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +客户端 +======== + +您已进入API参考部分,您可以在其中找到有关 Telethon 的 API 的详细信息。 + +此页面是关于 Client 类的,它公开了一些高级方法,以便更加轻松访问 API 。 + +.. code-block:: python + :emphasize-lines: 1-3 + + from telethon.sync import TelegramClient, events + + app = Client("my_account", api_id, api_hash) + + async def handler(context): + print(context.text) + + app.add_event_handler(handler, events.NewMessage(**args)) + + app.run_until_disconnected() + +----- + +详细信息 +------------- + +.. autoclass:: telethon.Client() diff --git a/source/api/handlers.rst b/source/api/handlers.rst new file mode 100644 index 0000000..67031fb --- /dev/null +++ b/source/api/handlers.rst @@ -0,0 +1,45 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +消息更新处理器 +=============== + +Handlers 用于告诉 Telethon 处理哪种类型的消息更新。 + +.. code-block:: python + :emphasize-lines: 8, 10 + + from telethon.sync import TelegramClient, events + + app = Client("my_account", api_id, api_hash) + + async def handler(context): + print(context.text) + + app.add_event_handler(handler, events.NewMessage(**args)) + + app.run_until_disconnected() + +.. contents:: 目录 + :backlinks: none + :depth: 1 + :local: + +----- + +.. currentmodule:: telethon.events + +索引 +----- + +.. hlist:: + :columns: 3 + + - :class:`NewMessage` + +----- + +详细信息 +---------- + +.. Handlers +.. autoclass:: NewMessage() diff --git a/source/api/methods/delete_messages.rst b/source/api/methods/delete_messages.rst new file mode 100644 index 0000000..2eeb709 --- /dev/null +++ b/source/api/methods/delete_messages.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +delete_messages() +================== + +.. automethod:: telethon.Client.delete_messages() \ No newline at end of file diff --git a/source/api/methods/disconnect.rst b/source/api/methods/disconnect.rst new file mode 100644 index 0000000..647ad25 --- /dev/null +++ b/source/api/methods/disconnect.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +disconnect() +================== + +.. automethod:: telethon.Client.disconnect() \ No newline at end of file diff --git a/source/api/methods/download_media.rst b/source/api/methods/download_media.rst new file mode 100644 index 0000000..e6d4e2a --- /dev/null +++ b/source/api/methods/download_media.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +download_media() +================== + +.. automethod:: telethon.Client.download_media() \ No newline at end of file diff --git a/source/api/methods/edit_message.rst b/source/api/methods/edit_message.rst new file mode 100644 index 0000000..d379b15 --- /dev/null +++ b/source/api/methods/edit_message.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +edit_message() +================== + +.. automethod:: telethon.Client.edit_message() \ No newline at end of file diff --git a/source/api/methods/forward_messages.rst b/source/api/methods/forward_messages.rst new file mode 100644 index 0000000..7901d40 --- /dev/null +++ b/source/api/methods/forward_messages.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +forward_messages() +================== + +.. automethod:: telethon.Client.forward_messages() \ No newline at end of file diff --git a/source/api/methods/get_entity.rst b/source/api/methods/get_entity.rst new file mode 100644 index 0000000..08087e2 --- /dev/null +++ b/source/api/methods/get_entity.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +get_entity() +================== + +.. automethod:: telethon.Client.get_entity() \ No newline at end of file diff --git a/source/api/methods/get_input_entity.rst b/source/api/methods/get_input_entity.rst new file mode 100644 index 0000000..98b77a5 --- /dev/null +++ b/source/api/methods/get_input_entity.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +get_input_entity() +================== + +.. automethod:: telethon.Client.get_input_entity() \ No newline at end of file diff --git a/source/api/methods/get_me.rst b/source/api/methods/get_me.rst new file mode 100644 index 0000000..48ebfcb --- /dev/null +++ b/source/api/methods/get_me.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +get_me() +================== + +.. automethod:: telethon.Client.get_me() \ No newline at end of file diff --git a/source/api/methods/get_messages.rst b/source/api/methods/get_messages.rst new file mode 100644 index 0000000..9cfb8d4 --- /dev/null +++ b/source/api/methods/get_messages.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +get_messages() +================== + +.. automethod:: telethon.Client.get_messages() \ No newline at end of file diff --git a/source/api/methods/index.rst b/source/api/methods/index.rst new file mode 100644 index 0000000..9e9fc0d --- /dev/null +++ b/source/api/methods/index.rst @@ -0,0 +1,110 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +可用方法 +================= + +此页面是关于 Telethon 方法的。这里列出的所有方法都绑定到 :class:`~telethon.Client` 类。 + +.. code-block:: python + :emphasize-lines: 4 + + from telethon.sync import TelegramClient, events + + with TelegramClient('name', api_id, api_hash) as client: + client.send_message('me', 'Hello, myself!') + +.. contents:: 目录 + :backlinks: none + :local: + +----- + +.. currentmodule:: telethon.Client + +基础 +--------- + +.. autosummary:: + :nosignatures: + + start + disconnect + +.. toctree:: + :hidden: + + start + disconnect + + +消息 +--------- + +.. autosummary:: + :nosignatures: + + send_message + edit_message + delete_messages + forward_messages + iter_messages + get_messages + pin_message + unpin_message + send_read_acknowledge + +.. toctree:: + :hidden: + + send_message + edit_message + delete_messages + forward_messages + iter_messages + get_messages + pin_message + unpin_message + send_read_acknowledge + +上传 +--------- + +.. autosummary:: + :nosignatures: + + send_file + +.. toctree:: + :hidden: + + send_file + +下载 +--------- + +.. autosummary:: + :nosignatures: + + download_media + +.. toctree:: + :hidden: + + download_media + +用户 +--------- + +.. autosummary:: + :nosignatures: + + get_me + get_entity + get_input_entity + +.. toctree:: + :hidden: + + get_me + get_entity + get_input_entity diff --git a/source/api/methods/iter_messages.rst b/source/api/methods/iter_messages.rst new file mode 100644 index 0000000..ba9c3a2 --- /dev/null +++ b/source/api/methods/iter_messages.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +iter_messages() +================== + +.. automethod:: telethon.Client.iter_messages() \ No newline at end of file diff --git a/source/api/methods/pin_message.rst b/source/api/methods/pin_message.rst new file mode 100644 index 0000000..283dcea --- /dev/null +++ b/source/api/methods/pin_message.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +pin_message() +================== + +.. automethod:: telethon.Client.pin_message() \ No newline at end of file diff --git a/source/api/methods/send_file.rst b/source/api/methods/send_file.rst new file mode 100644 index 0000000..cf3efe2 --- /dev/null +++ b/source/api/methods/send_file.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +send_file() +================== + +.. automethod:: telethon.Client.send_file() \ No newline at end of file diff --git a/source/api/methods/send_message.rst b/source/api/methods/send_message.rst new file mode 100644 index 0000000..f09fc61 --- /dev/null +++ b/source/api/methods/send_message.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +send_message() +================== + +.. automethod:: telethon.Client.send_message() \ No newline at end of file diff --git a/source/api/methods/send_read_acknowledge.rst b/source/api/methods/send_read_acknowledge.rst new file mode 100644 index 0000000..8fdfe74 --- /dev/null +++ b/source/api/methods/send_read_acknowledge.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +send_read_acknowledge() +======================== + +.. automethod:: telethon.Client.send_read_acknowledge() \ No newline at end of file diff --git a/source/api/methods/start.rst b/source/api/methods/start.rst new file mode 100644 index 0000000..8006f30 --- /dev/null +++ b/source/api/methods/start.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +start() +======= + +.. automethod:: telethon.Client.start() \ No newline at end of file diff --git a/source/api/methods/unpin_message.rst b/source/api/methods/unpin_message.rst new file mode 100644 index 0000000..1adf519 --- /dev/null +++ b/source/api/methods/unpin_message.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +unpin_message() +================== + +.. automethod:: telethon.Client.unpin_message() \ No newline at end of file diff --git a/source/api/types/channel.rst b/source/api/types/channel.rst new file mode 100644 index 0000000..00bbe2b --- /dev/null +++ b/source/api/types/channel.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +Channel() +================== + +.. autoclass:: telethon.tl.types.channel() \ No newline at end of file diff --git a/source/api/types/chat.rst b/source/api/types/chat.rst new file mode 100644 index 0000000..5f9aeca --- /dev/null +++ b/source/api/types/chat.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +Chat() +================== + +.. autoclass:: telethon.tl.types.chat() \ No newline at end of file diff --git a/source/api/types/index.rst b/source/api/types/index.rst new file mode 100644 index 0000000..e361efc --- /dev/null +++ b/source/api/types/index.rst @@ -0,0 +1,33 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +可用类型 +================= + +这是客户端方法或其他模块返回的对象的快速参考。 + +.. contents:: 目录 + :backlinks: none + :local: + +----- + +.. currentmodule:: telethon.tl.types + +消息 +--------- + +.. autosummary:: + :nosignatures: + + message + user + chat + channel + +.. toctree:: + :hidden: + + message + user + chat + channel \ No newline at end of file diff --git a/source/api/types/message.rst b/source/api/types/message.rst new file mode 100644 index 0000000..2fd7147 --- /dev/null +++ b/source/api/types/message.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +Message() +================== + +.. autoclass:: telethon.tl.types.message() \ No newline at end of file diff --git a/source/api/types/user.rst b/source/api/types/user.rst new file mode 100644 index 0000000..ddaf306 --- /dev/null +++ b/source/api/types/user.rst @@ -0,0 +1,6 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +User() +================== + +.. autoclass:: telethon.tl.types.user() \ No newline at end of file diff --git a/source/conf.py b/source/conf.py new file mode 100644 index 0000000..054253e --- /dev/null +++ b/source/conf.py @@ -0,0 +1,112 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +from datetime import datetime +from pygments.styles.friendly import FriendlyStyle + +sys.path.insert(0, os.path.abspath('.')) +FriendlyStyle.background_color = "#f3f2f1" + +# -- Project information ----------------------------------------------------- + +project = 'xtaothon' +project_copyright = f'2020-{datetime.now().year}, xtao-labs' +author = 'xtao-labs' + +# The full version, including alpha/beta/rc tags +release = '1.21.1' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.napoleon", + "sphinx.ext.autosummary", + "sphinx_copybutton", + "sphinx_tabs.tabs" +] + +master_doc = "index" +source_suffix = ".rst" +autodoc_member_order = "bysource" + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = 'zh_CN' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +napoleon_use_rtype = False + +pygments_style = "friendly" + +copybutton_prompt_text = "$ " + +html_css_files = [ + 'css/theme.css', +] +html_title = "Xtaothon Documentation" +html_show_sourcelink = True +html_show_copyright = False +html_theme_options = { + "canonical_url": "https://docs.xtaolabs.com/", + "collapse_navigation": True, + "sticky_navigation": False, + "logo_only": True, + "display_version": True, + "style_external_links": True, +} + +napoleon_use_param = False + +html_logo = "_images/xtaothon.png" +html_favicon = "_images/favicon.ico" + +latex_engine = "xelatex" +latex_logo = "_images/xtaothon.png" + +latex_elements = { + "pointsize": "12pt", + "fontpkg": r""" + \setmainfont{Open Sans} + \setsansfont{Bitter} + \setmonofont{Ubuntu Mono} + """ +} \ No newline at end of file diff --git a/source/faq.rst b/source/faq.rst new file mode 100644 index 0000000..d6b089b --- /dev/null +++ b/source/faq.rst @@ -0,0 +1,124 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +FAQ +============ + +.. role:: strike + :class: strike + +此常见问题解答页面提供了有关 Telethon 的常见问题的答案。 + +.. contents:: 目录 + :backlinks: none + :depth: 1 + :local: + +----- + +为什么什么都不提示? +---------------------------- + +那么它可能有错误,但你还没有启用日志记录。 要启用日志记录,请在主文件顶部添加以下代码: + +.. code-block:: python + + import logging + logging.basicConfig(format='[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s', + level=logging.WARNING) + +您可以将日志记录级别更改为不同的内容,从较少信息到更多信息: + +.. code-block:: python + + level=logging.CRITICAL # 不会显示错误(与禁用相同) + level=logging.ERROR # 只会显示你没有处理的错误 + level=logging.WARNING # 还将显示中等严重性的消息,例如内部 Telegram 问题 + level=logging.INFO # 还将显示信息性消息,例如连接或断开连接 + level=logging.DEBUG # 将显示大量输出以帮助调试库中的问题 + +我怎样才能过滤 FloodWaitError ? +----------------------------------------- + +您可以通过导入 API 中的自定义错误来过滤: + +.. code-block:: python + + from telethon import errors + try: + await client.send_message(chat, 'Hi') + except errors.FloodWaitError as e: + # e.seconds 是您被限制了多少秒才能重新调用此 API 。 + print('Flood for', e.seconds) + +使用 Telethon 时我的帐户被删除/限制 +------------------------------------------ + +如果您出于恶意使用 Telethon ,Telegram 可能会禁止您。 + +但是,您也可能是某个限制国家/地区的一部分,例如伊朗或俄罗斯。在这种情况下,我们有一个坏消息要告诉你。 +Telegram 更有可能禁止这些号码,因为它们经常被用来向其他帐户发送垃圾消息,并且可能是通过使用这样的库。 +我们可以给您的最佳建议是不要滥用 API,例如非常快速地调用许多请求,并且建议您通过官方应用程序注册账户。 + +我们也收到了来自哈萨克斯坦和中国的报告,在那里会无法连接 Telegram 服务器。要解决这些连接问题,您应该:doc:`使用代理 `。 + +Telegram 还可能禁止虚拟 (VoIP) 电话号码,因为它们很可能被用于发送垃圾消息。 + +如果您想检查您的帐户是否受到限制,只需向 Telegram 官方 Bot ``@SpamBot`` 发送消息即可。 +您应该通过收到 ``PeerFloodError`` 之类的错误来注意到这一点,这意味着您受到限制。 + +sqlite3.OperationalError: database is locked +--------------------------------------------------------- + +较旧的进程仍在运行并使用相同的 “session” 文件。 + +当两个或多个客户端使用同一个会话时,会出现此错误: + +您有一个使用相同会话文件的旧进程。 +您有两个不同的脚本正在运行(交互式会话也算在内)。 +您在同一脚本中有两个客户端同时运行。 + +解决方案是,如果您需要两个客户端,请使用两个会话。如果问题仍然存在并且您使用的是 Linux,则可以使用 ``fuser my.session`` 找出锁定文件的进程。 +作为最后的手段,您可以重新启动系统。 + +event.chat or event.sender is None +----------------------------------------- + +Telegram 为节省带宽并不总是发送此信息。如果您需要这些信息,您应该自己获取,因为除非您需要,否则库不会做不必要的工作: + +.. code-block:: python + + async def handler(event): + chat = await event.get_chat() + sender = await event.get_sender() + + +我想将我的帐户从 DCX 迁移到 DCY 。 +--------------------------------------------- + +首次注册帐户时,由 Telegram 根据电话号码来源决定将在哪个 DC 中创建新用户。 + +尽管 `Telegram 文档 `_ 说明:服务器可能会自动迁移用户, +尽管 Telegram 本身也 `确认 `_ 存在此机制,但目前无法在任何情况下手动迁移您的帐户。 +仅仅是因为该功能曾经计划但尚未实施。 + +感谢 `@gabriel `_ 确认该功能尚未实现。 + +为什么我的客户端在超级群组中反应缓慢? +--------------------------------------- + +此问题仅影响某些超级群组或超级群组中的某些成员。 + +由于 Telegram 内部的工作方式,您从其他成员接收和发送给其他成员的每条消息都必须通过群组创建者的 DC,在最坏的情况下,你、创建者和其他成员属于三个不同的 +DC,其他成员的消息必须从他的 DC 传递到创建者的 DC,最后到达您的 DC。这个过程将不可避免地需要时间。 + +另一个导致响应缓慢的原因是消息是 **按优先级调度** 的。 根据成员身份,一些用户比其他用户更快地接收消息,对于大而繁忙的超级群组,延迟可能会变得 +令人注意,特别是如果您属于优先级列表的低端: + +1. 创建者。 +2. 管理员。 +3. Bots。 +4. 提及到的用户。 +5. 近期在线用户。 +6. 其他成员。 + +感谢 `@Manuel15 `_ 提供优先级列表 diff --git a/source/glossary.rst b/source/glossary.rst new file mode 100644 index 0000000..caeb1cd --- /dev/null +++ b/source/glossary.rst @@ -0,0 +1,53 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +常见短语 +================= + +此页面包含常见短语列表。 + +.. contents:: 目录 + :backlinks: none + :depth: 1 + :local: + +----- + +列表 +----- + +.. glossary:: + :sorted: + + API + 应用程序编程接口:一组方法、协议和工具,通过为开发人员提供实用的组件,使程序开发变得更容易。 + + API key + 用于向 Telegram ``验证`` 和/或 ``授权`` 特定应用程序的密码,以便其控制 API 的使用方式,例如,防止滥用 API。 + :doc:`API keys `。 + + DC + 也称为 *数据中心* ,是一个放置大量计算机系统并一起使用以实现服务的高质量和可用性的地方。 + + RPC + 远程过程调用的首字母缩写词,即在某个远程位置(即 Telegram 服务器)而不是在您的本地机器上执行的函数。 + + RPCError + 由 RPC 引起的错误,必须返回以代替成功的结果,以便让调用者知道出现问题。 + + Bot API + Telegram Bot API 只能使用 HTTP 作为应用层协议将普通机器人连接到 Telegram,并允许执行 Telegram API 。 + + Userbot + 也称为 *user bot* 或简称 *ubot*,是通过第三方 Telegram 库登录的用户 --- 例如 + Telethon --- 自动执行某些行为,例如发送消息或对文本命令作出反应或任何其他事件。不要与 *bot* 混淆,即由 + `@BotFather `_ 创建的普通 Telegram bot 。 + + Session + 也称为 *登录会话* ,是由双方(客户端和服务器)创建和持有的严格个人数据,用于向单个帐户授予权限,而无需从头开始新的授权过程。 + + Callback + 也称为 *回调函数* ,是一个用户定义的通用函数, *可以* 注册到框架,然后在发生特定事件时由框架回调。 + + Handler + 一个环绕回调函数的对象,该函数 *实际上意味着* 要注册到框架中,然后将能够处理特定类型的事件,例如新传入的消息。 + :doc:`消息更新处理器 `. diff --git a/source/index.rst b/source/index.rst new file mode 100644 index 0000000..0a7c740 --- /dev/null +++ b/source/index.rst @@ -0,0 +1,132 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +欢迎来到 Xtaothon +=================== + +.. raw:: html + +
+ +
Xtaothon Logo
+
+
+ +

+ Telegram MTProto API Framework for Python + +
+ + Source Code + + • + + Releases + + • + + Community + +

+ +.. code-block:: python + + from telethon.sync import TelegramClient, events + + with TelegramClient('name', api_id, api_hash) as client: + client.send_message('me', 'Hello, myself!') + print(client.download_profile_photo('me')) + + @client.on(events.NewMessage(pattern='(?i).*Hello')) + async def handler(event): + await event.reply('Hey!') + + client.run_until_disconnected() + +Telegram 是一款十分受欢迎的简洁的即时通讯软件。**Telethon** 旨在使您能够轻松使用 `Python` 编写可以与 Telegram_ 进行交互的 Python 程序。 + +.. _Telegram: https://telegram.org + +快速使用这篇文档 +---------------------------------- + +内容总共被分成几大独立主题,这些主题可以从侧边栏或通过页面下方的 :guilabel:`下一项` 按钮来访问。 +下方我们提供了几个常用的主题以供快速访问。 + +.. admonition :: 云服务器优惠 + :class: tip + + 如果您需要服务器来托管您的程序我们推荐使用 **NSD Cloud**. 通过 + `链接 `_ 注册就可以帮助 Xtaothon 。 + +出发 +^^^^^^^^^^^ + +.. hlist:: + :columns: 2 + + - :doc:`快速开始 `: 快速使用 Telethon 创建一个应用程序。 + - :doc:`调用方法 `: 快速调用 Telethon 的内置方法来与 Telegram 交互。 + - :doc:`处理消息 `: 快速处理来自 Telegram 的新消息。 + +API +^^^^^^^^^^^^^ + +.. hlist:: + :columns: 2 + + - :doc:`Telethon Client `: Client 类的详细可配置参数。 + - :doc:`内置方法 `: 可用的高级方法列表。 + - :doc:`内置类型 `: 可用的高级类型列表。 + - :doc:`绑定方法 `: 方便的绑定方法列表。 + +更多 +^^^^ + +.. hlist:: + :columns: 2 + + - :doc:`Telethon FAQ `: Telethon 常见问题。 + - :doc:`常见短语 `: 一些常见短语的释意。 + - :doc:`支持 Xtaothon `: 支持 Xtaothon 的方式。 + +最后更新于 |today| + +.. toctree:: + :hidden: + :caption: 简介 + + intro/quickstart + intro/install + +.. toctree:: + :hidden: + :caption: 开始 + + start/auth + start/invoking + start/updates + +.. toctree:: + :hidden: + :caption: API + + api/client + api/methods/index + api/types/index + api/bound-methods/index + api/handlers + +.. toctree:: + :hidden: + :caption: 主题指南 + + topics/proxy + topics/text-formatting + +.. toctree:: + :hidden: + :caption: 更多 + + faq + glossary + support \ No newline at end of file diff --git a/source/intro/install.rst b/source/intro/install.rst new file mode 100644 index 0000000..ca6468f --- /dev/null +++ b/source/intro/install.rst @@ -0,0 +1,51 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +安装指南 +============= + +**Telethon** 所需要的 Python 的版本至少为 3.5 。我们推荐您使用最新的 Python 和 pip 版本。 + +- 从 https://www.python.org/downloads/ 中下载 **Python 3** (或者使用系统包管理器)。 +- 从 https://pip.pypa.io/en/latest/installing/ 中安装 **pip** 。 + +.. important:: + + Telethon 仅支持 **Python 3.5+** 。 + +.. contents:: 目录 + :backlinks: none + :depth: 1 + :local: + +----- + +安装 +---------------- + +- 将 Telethon 安装和升级到其最新稳定版本的最简单方法是使用 **pip**: + + .. code-block:: text + + $ python3 -m pip install --upgrade telethon + +安装开发版本 +------------- + +如果您希望尝试新功能,则可以运行以下命令安装开发版本: + +.. important:: + + 开发版本可能会发生错误,不建议用于生产环境。 + +.. code-block:: text + + $ python3 -m pip install --upgrade https://github.com/LonamiWebs/Telethon/archive/master.zip + +验证安装 +--------- + +要验证是否正确安装了 Telethon ,请运行以下命令:(如果没有错误显示即安装成功) + +.. code-block:: text + + $ python3 -c "import telethon; print(telethon.__version__)" \ No newline at end of file diff --git a/source/intro/quickstart.rst b/source/intro/quickstart.rst new file mode 100644 index 0000000..aa01978 --- /dev/null +++ b/source/intro/quickstart.rst @@ -0,0 +1,44 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +快速开始 +=========== + +通过下面的步骤您就可以创建一个 Telethon 应用程序了,快开始吧! + +安装 Telethon +---------------------- + +1. 使用命令 ``pip3 install -U telethon`` 安装 Telethon 。 + +2. 打开网站 https://my.telegram.org/apps :doc:`申请属于您自己的 Telegram API key <../start/auth>` 。 + +3. 打开文本编辑器并粘贴以下内容: + + .. code-block:: python + + from telethon.sync import TelegramClient, events + + api_id = 12345 + api_hash = "0123456789abcdef0123456789abcdef" + + with TelegramClient('name', api_id, api_hash) as client: + client.send_message('me', 'Hello, myself!') + +4. 用您在第二步生成的值替换 *api_id* 和 *api_hash* 。 + +5. 报错文件名为 ``main.py`` 。 + +6. 使用命令 ``python3 main.py`` 开始运行。 + +7. 通过控制台提示进行账户授权。 + +8. 加入我们的 `交流社区`_. + +享受 API +------------- + +这只是运行 Telethon 的一个简单例子,在接下来的文档中,我们可以学习使用更加高级的方法。 + +想要继续学习吗? 你可以点击 :doc:`调用方法 <../start/invoking>` 继续学习。 + +.. _交流社区: https://t.me/Telethon_CN_Chat \ No newline at end of file diff --git a/source/start/auth.rst b/source/start/auth.rst new file mode 100644 index 0000000..f95d19d --- /dev/null +++ b/source/start/auth.rst @@ -0,0 +1,65 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +授权 +============= + +本节教程将会教会您如何使用 Telethon 登录 Bot 或者 User 。 + +.. contents:: 目录 + :backlinks: none + :depth: 1 + :local: + +----- + +API key +------------------ + +在 :doc:`快速开始 <../intro/quickstart>` 中需要您申请属于您自己的 Telegram API key 。 + +#. 访问 https://my.telegram.org/apps 并且使用您的 Telegram 账户登录。 +#. 填写表格以注册新的 Telegram 应用程序。 +#. 完成! API key 由这两个值组成: **api_id** 和 **api_hash**. + + +.. note:: + + API key 对每个用户是唯一的,并且仅一个值就可以授权多个 User (和 bot) 通过 MTProto API 访问 Telegram 数据库。 + +登录 +------------------ + +为了使用这个 API, Telegram 要求用户通过电话号码授权。 +Telethon 将会自动处理此过程,您需要做的只是创建一个实例 :class:`~telethon.Client` 类并且定义一个 ``session_name`` (e.g.: "my_account") +并且调用 :meth:`~telethon.Client.start` 方法: + +.. code-block:: python + + from telethon import TelegramClient + + client = TelegramClient('my_account', api_id, api_hash) + + # 使用 Bot token 登录 + await client.start(bot_token='bot_token') + + # 使用 User 账户登录 + await client.start() + # Enter phone number: +86********** + # Please enter the code you received: 12345 + # Please enter your password: ******* + # (You are now logged in) + + # 使用一个 context manager 来登录 (这相当于直接调用 start()): + with client: + pass + +这会创建一个交互 Shell 要求您输入 **电话号码** (包括您的 `国家代码`_) 和 **验证码**: + +成功登录后,将创建一个名为 ``my_account.session`` 的新文件,允许 Telethon 使用您的登录的账户信息执行 API。 +重新启动应用程序时,将自动加载此文件,只要您的账户登录文件还是可用的,Telethon 将不会要求您重新登录。 + +.. important:: + + 您的 ``*.session`` 文件是私密的并且必须保证安全。 + +.. _国家代码: https://en.wikipedia.org/wiki/List_of_country_calling_codes \ No newline at end of file diff --git a/source/start/invoking.rst b/source/start/invoking.rst new file mode 100644 index 0000000..ac87a99 --- /dev/null +++ b/source/start/invoking.rst @@ -0,0 +1,93 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +调用方法 +=============== + +此时,我们已成功 :doc:`安装 Telethon <../intro/install>` 并且 :doc:`授权 ` 了我们的帐户。 +是时候开始调用 API 与 Telegram 交互了! + +.. contents:: 目录 + :backlinks: none + :depth: 1 + :local: + +----- + +基础用法 +----------- + +使用 Telegram 进行 API 方法调用非常简单。下面是我们将逐步讲解的基本示例代码: + +.. code-block:: python + + from telethon.sync import TelegramClient, events + + app = TelegramClient("my_account", api_id, api_hash) + + async def main(): + await client.send_message('me', 'Hello, myself!') + + with app: + app.loop.run_until_complete(main()) + +逐步讲解 +^^^^^^^^^^^^^^^^^^ + +#. 导入 Client 类: + + .. code-block:: python + + from telethon.sync import TelegramClient, events + +#. 现在实例化一个新的 Client 对象: + + .. code-block:: python + + app = TelegramClient("my_account", api_id, api_hash) + +#. 定义客户端要执行的 main 函数: + + .. code-block:: python + + async def main(): + # 给自己发送 “Hello, myself!” + await client.send_message('me', 'Hello, myself!') + +#. ``with`` context manager 是启动,执行和停止客户端的快捷方式: + + .. code-block:: python + + with app: + +#. 现在你可以调用 main 函数: + + .. code-block:: python + + app.loop.run_until_complete(main()) + +Context Manager +--------------- + +``with`` 语句启动一个 context manager ,用作自动调用 :meth:`~telethon.Client.start` +和 :meth:`~telethon.Client.disconnect`,这是 Telethon 正常工作所需的方法。context manager 也会优雅地停止客户端, +即使您的代码中出现了未处理的异常时也是如此。 + +异步调用 +------------------ + +.. important:: + + 请注意,Telethon 是一个异步库,因此,您应该习惯它并学习一些基本的 asyncio 。这将对您编写应用程序有很大的帮助。 + +.. code-block:: python + + from telethon.sync import TelegramClient, events + + app = TelegramClient("my_account", api_id, api_hash) + + async def main(): + await client.send_message('me', 'Hello, myself!') + + with app: + app.loop.run_until_complete(main()) + diff --git a/source/start/updates.rst b/source/start/updates.rst new file mode 100644 index 0000000..bf97000 --- /dev/null +++ b/source/start/updates.rst @@ -0,0 +1,42 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +处理消息 +================ + +手动调用 :doc:`API 方法 ` 非常方便,但是如何让程序在新消息到达时做出反应呢? +此页面将告诉您 Telethon 如何处理更新以及如何在 Telethon 中处理此类事件。让我们来看看它们是如何工作的。 + +.. contents:: 目录 + :backlinks: none + :depth: 1 + :local: + +----- + +定义处理程序 +---------------- + +首先您需要在 :doc:`Handlers <../api/handlers>` 中找到需要处理的事件的处理程序。 + +每个处理程序处理特定事件。支持同一事件注册多个回调函数。 + +注册处理程序 +--------------------- + +使用 add_handler() +^^^^^^^^^^^^^^^^^^^ + +使用 :meth:`~pyrogram.client.add_handler` 方法注册新的处理程序: + +.. code-block:: python + + from telethon.sync import TelegramClient, events + + app = Client("my_account", api_id, api_hash) + + async def handler(context): + print(context.text) + + app.add_event_handler(handler, events.NewMessage(**args)) + + app.run_until_disconnected() diff --git a/source/support.rst b/source/support.rst new file mode 100644 index 0000000..1ce79df --- /dev/null +++ b/source/support.rst @@ -0,0 +1,35 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +支持 Xtaothon +================ + +作为开发人员,您可能理解“开源”并不意味着“免费工作”。您的支持意义重大,有助于保持我们更新的动力! + +----- + +Star +---- + +Xtaothon 是一个第三方免费开源文档,并且由您的爱和支持驱动!如果您喜欢该项目并发现它很有用,请在 GitHub 上给 Xtaothon 一个 `Star`_. + +赞助 +------ + +您可以通过微信/支付宝赞助我们: + +.. raw:: html + +
+ + +
+ +----- + +云服务器优惠 +------------- + +如果您需要服务器来托管您的程序我们推荐使用 **NSD Cloud**. 通过 +`链接 `_ 注册就可以帮助 Xtaothon 。 + +.. _Star on GitHub: https://github.com/Xtao-Labs/docs-all \ No newline at end of file diff --git a/source/topics/proxy.rst b/source/topics/proxy.rst new file mode 100644 index 0000000..9ba2d13 --- /dev/null +++ b/source/topics/proxy.rst @@ -0,0 +1,40 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +SOCKS5 Proxy +============ + +Telethon 支持带有或者不带有验证的代理。 + +.. contents:: 目录 + :backlinks: none + :depth: 1 + :local: + +----- + +使用 +----- + +- 您可以使用 Client 类中的 *proxy* 参数来设置代理: + + .. code-block:: python + + from telethon.sync import TelegramClient + import socks + + app = Client( + session_name="example", + proxy=( + socks.SOCKS5, + "socks.example.com", + 1080, + username="", + password="" + ) + ) + + app.start() + + ... + +.. note:: 如果您的代理不需要授权,您可以将 ``username`` 和 ``password`` 的值留空或者直接在参数中删除这两项。 \ No newline at end of file diff --git a/source/topics/text-formatting.rst b/source/topics/text-formatting.rst new file mode 100644 index 0000000..9d119f2 --- /dev/null +++ b/source/topics/text-formatting.rst @@ -0,0 +1,137 @@ +:github_url: https://github.com/Xtao-Labs/docs-all + +文本格式 +=============== + +.. role:: strike + :class: strike + +.. role:: underline + :class: underline + +.. role:: bold-underline + :class: bold-underline + +.. role:: strike-italic + :class: strike-italic + +Telethon 支持格式化消息为 Markdown 或者 HTML 。 + +.. contents:: 目录 + :backlinks: none + :depth: 1 + :local: + +----- + +基本样式 +------------ + +您可以在 Markdown 样式,HTML 样式之间进行选择。以下是 Telethon 目前支持的基本样式列表。 + +- **bold** +- *italic* +- :strike:`strike` +- :underline:`underline` +- `text URL `_ +- `user text mention `_ +- `inline fixed-width code` + +.. note:: + + 提及用户功能仅适用于您在对话中见过此用户。 + +Markdown 样式 +-------------- + +:meth:`~telethon.client.send_message` 在消息中使用以下语法: + +.. code-block:: text + + **bold** + + __italic__ + + --underline-- + + ~~strike~~ + + [text URL](https://docs.xtaolabs.com/) + + [text user mention](tg://user?id=347437156) + + `inline fixed-width code` + +**Example**: + +.. code-block:: python + + app.send_message( + "me", + ( + "**bold**, " + "__italic__, " + "--underline--, " + "~~strike~~, " + "[mention](tg://user?id=347437156), " + "[URL](https://docs.xtaolabs.com), " + "`code`" + ) + ) + +HTML 样式 +---------- + +:meth:`~telethon.client.send_message` 在消息中使用以下语法: + +.. code-block:: text + + bold, bold + + italic, italic + + underline + + strike, strike, strike + + text URL + + inline mention + + inline fixed-width code + +**Example**: + +.. code-block:: python + + app.send_message( + "haskell", + ( + "bold, " + "italic, " + "underline, " + "strike, " + "mention, " + "URL, " + "code" + ), + parse_mode="html" + ) + +.. note:: + + 所有不属于标签或 HTML 实体的 ``<``, ``>`` 和 ``&`` 符号必须替换为相应的 HTML 实体( + ``<`` 替换为 ``<``, ``>`` 替换为 ``>`` 和 ``&`` 替换为 ``&``)。您可以使用此代码段快速转义这些字符: + + .. code-block:: python + + import html + + text = "" + text = html.escape(text) + + print(text) + + .. code-block:: text + + <my text> diff --git a/telethon/__init__.py b/telethon/__init__.py new file mode 100644 index 0000000..6fb0d7e --- /dev/null +++ b/telethon/__init__.py @@ -0,0 +1,671 @@ +# noinspection PyUnresolvedReferences +class Client: + """Telethon Client,与 Telegram 互动的主要手段。 + + 参数: + session (``str``): + 如果给出了字符串(它可以是完整路径)则将会保存 ``.session`` 文件;如果没有,则不会保存会话,并且在程序结束后,您应该调用 + `client.log_out()` 。 + + 请注意,如果传递字符串,则文件将保存为当前工作目录下,并且您还可以传递绝对路径。 + + api_id (``int`` | ``str``): + 从 https://my.telegram.org 获取到的 *api_id* 。 + + api_hash (``str``, *optional*): + 从 https://my.telegram.org 获取到的 *api_hash* 。 + + bot_token (``str``, *可选*): + 如果设置了 Bot token,则将直接使用 Bot 身份登录。 + + app_version (``str``, *可选*): + 应用版本号,默认设置为 `telethon.version.__version__` 。 + + device_model (``str``, *optional*): + 设备型号,默认设置为 `·`platform.uname().machine` 。 + + system_version (``str``, *optional*): + 操作系统版本,默认设置为 `platform.uname().release` 。 + + lang_code (``str``, *optional*): + 客户端上使用的 ISO 639-1 标准的语言代码。默认为 “en”。 + + use_ipv6 (``bool``, *可选*): + 如果设置为 `True` ,则将使用 ipv6 连接 Telegram 服务器。默认关闭 (通过 IPv4). + + proxy (``tuple``, ``str``, ``dict``, *可选*): + MTProxy: `('hostname', port, 'secret')` ;socks5: `(socks.SOCKS5, "socks.example.com", 1080)` 获取更多 + 代理配置详情:https://github.com/Anorov/PySocks#usage-1 + + timeout (``int``, ``float``, *可选*): + 设置链接超时所要等待的秒数。 + + flood_sleep_threshold (``int``, ``float``, *可选*): + 设置当出现 `FloodWaitError` 时自动休眠应用程序的时间。 + """ + + def start(self): + """启动客户端(在必要时连接和登录)。 + + 此方法将使客户端连接到 Telegram 服务器,如果是一个新的客户端,会自动进行交互式的授权过程。 + + 返回: + :obj:`~telethon.Client`: 启动的 client本身。 + + Raises: + ConnectionError: 如果您尝试启动已启动客户端。 + + Example: + .. code-block:: python + :emphasize-lines: 4 + + from telethon.sync import TelegramClient, events + + app = Client("my_account", api_id, api_hash) + app.start() + + # Call API methods + + app.disconnect() + + """ + + def disconnect(self): + """断开客户端与 Telegram 服务器的连接。 + + 此方法将客户端与 Telegram 服务器断开连接,并停止底层任务。 + + 返回: + :obj:`~telethon.Client`: 停止的 client本身。 + + Raises: + OSError: 如果您尝试停止已停止的客户端。 + + Example: + .. code-block:: python + :emphasize-lines: 8 + + from telethon.sync import TelegramClient, events + + app = Client("my_account", api_id, api_hash) + app.start() + + # Call API methods + + app.disconnect() + + """ + + # Message + def send_message(self): + """向指定的用户,群组或频道发送消息。 + + 默认文本解析模式与官方应用程序相同(Markdown) + + 向 bot 发送 start 参数命令 (例如 ``?start=data``) 同样可行,请直接发送 ``/start data`` 。 + + 参数: + entity (:obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`): + 接收消息的对象 + + message (``str`` | :obj:`~telethon.tl.types.message`): + 要发送的消息或消息对象。 + + 消息的最大长度为 ``35,000`` 字节或 ``4,096`` 个字符。较长的消息不会自动分割,如果要发送的文本长于最大长度,则应手动分割。 + + reply_to (``int`` | :obj:`~telethon.tl.types.message`, *可选*): + 要回复的消息 id 或者消息对象。 + + parse_mode (``str``, *可选*): + 文本格式解析器配置。值支持 `markdown` (`md`), `html` (`htm`), `None`。 + + link_preview (``bool``, *可选*): + 配置是否展示消息预览,默认开启。 + + buttons (``list``), *可选*): + 配置消息按钮,参见示例,仅支持 bot 登录时。 + + 限制: + 最多可以有 ``100`` 个按钮(更多将被忽略)。 + 每行最多可以有 ``8`` 个按钮(更多将被忽略)。 + 按钮的最大回调数据为 ``64`` 字节。 + + silent (``bool``, *可选*): + 配置是否静默消息,默认关闭。 + + schedule (``float``, *可选*): + 配置是否定时消息,默认不配置。 + + 返回: + :obj:`~telethon.tl.types.message`: 成功则将返回已发送的消息。 + + Example: + .. code-block:: python + + # 默认使用 Markdown 解析器解析文本。 + await client.send_message('me', 'Hello **world**!') + + # 更改客户端的默认解析器。 + client.parse_mode = 'html' + + await client.send_message('me', 'Some bold and italic text') + await client.send_message('me', 'An URL') + await client.send_message('me', 'Mentions') + + # 混合解析 + client.parse_mode = None + + # 手动配置单条消息的解析器为 Markdown 。 + await client.send_message('me', 'Hello, **world**!', parse_mode='md') + + # 手动配置单条消息的解析器为 Html 。 + await client.send_message('me', 'Hello, world!', parse_mode='html') + + # 如果使用 Bot 登录,则您可以使用按钮: + from telethon import events, Button + + @client.on(events.CallbackQuery) + async def callback(event): + await event.edit('感谢点击 {}!'.format(event.data)) + + # 单个按钮 + await client.send_message(chat, '只是一个会回调 "clk1" 的按钮。', + buttons=Button.inline('点我', b'clk1')) + + # 多个按钮 + await client.send_message(chat, '选一个吧!', buttons=[ + [Button.inline('回调'), Button.inline('这是回调')], + [Button.url('访问网站', 'https://example.com')] + ]) + + # 消息需要回复 + await client.send_message(chat, '欢迎', buttons=[ + Button.text('感谢!', resize=True, single_use=True), + Button.request_phone('发送电话号码'), + Button.request_location('发送位置') + ]) + + # 强制回复或清除按钮。 + await client.send_message(chat, '回复我', buttons=Button.force_reply()) + await client.send_message(chat, '清楚按钮', buttons=Button.clear()) + + # 定时 5 分钟后发送消息 + from datetime import timedelta + await client.send_message(chat, '你好,未来!', schedule=timedelta(minutes=5)) + """ + + def edit_message(self): + """编辑指定消息,更改其文本或媒体文件。 + + 参数: + entity (:obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`): + 接收消息的对象 + + text (``str``, *可选*): + 要编辑的消息文本。 + + 消息的最大长度为 ``35,000`` 字节或 ``4,096`` 个字符。 + + message (``int`` | ``str`` | :obj:`~telethon.tl.types.message`, *可选*): + 要编辑的消息 id 或者消息对象。 + + parse_mode (``str``, *可选*): + 文本格式解析器配置。值支持 `markdown` (`md`), `html` (`htm`), `None`。 + + link_preview (``bool``, *可选*): + 配置是否展示消息预览,默认开启。 + + file (``str``, ``bytes``, *可选*): + 如果参数为 ``str`` ,则将再此路径下寻找文件(支持相对/绝对路径)。 + + 请注意:如果原消息为纯文本时,配置此项将会报错。 + + buttons (``list``), *可选*): + 配置消息按钮,参见示例,仅支持 bot 登录时。 + + 限制: + 最多可以有 ``100`` 个按钮(更多将被忽略)。 + 每行最多可以有 ``8`` 个按钮(更多将被忽略)。 + 按钮的最大回调数据为 ``64`` 字节。 + + schedule (``float``, *可选*): + 配置是否定时消息,默认不配置。 + + Raises: + MessageAuthorRequiredError: 如果您不是消息的发送者。 + + MessageNotModifiedError: 如果要编辑的消息和原消息一样。 + + MessageIdInvalidError: 如果消息的 ID 无效(消息 ID 本身可能是正确的,但无法编辑此 ID 对应的消息。) + + Example: + .. code-block:: python + + message = await client.send_message(chat, '你好') + + await client.edit_message(chat, message, '你好!') + # 或者 + await client.edit_message(chat, message.id, '你好!!') + # 或者 + await client.edit_message(message, '你好!!!') + """ + + def delete_messages(self): + """删除指定消息。 + + 参数: + entity (:obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`): + 接收消息的对象 + + message_ids (``list`` | ``int`` | :obj:`~telethon.tl.types.message`, *可选*): + 要删除的消息 id 列表或者单个消息 id 或者消息对象。 + + Example: + .. code-block:: python + + await client.delete_messages(chat, messages) + """ + + def forward_messages(self): + """转发指定消息。 + + 参数: + entity (:obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`): + 接收消息的对象 + + message_ids (``list`` | ``int`` | :obj:`~telethon.tl.types.message`, *可选*): + 要删除的消息 id 列表或者单个消息 id 或者消息对象。 + + from_peer (:obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`): + 指定转发消息的来源。如果 message_ids 传递的参数是数字。 + + silent (``bool``, *可选*): + 配置是否静默消息,默认关闭。 + + schedule (``float``, *可选*): + 配置是否定时消息,默认不配置。 + + 返回: + :obj:`~telethon.tl.types.message`: 成功则将返回已转发的消息。(如果转发的是一组消息,则返回列表) + + 请注意:批量转发时,如果所有需要转发的消息都无效(即删除)则会抛出 ``MessageIdInvalidError`` 错误; + 如果只有一些消息无效,则只是返回的列表中没有这些消息。 + + Raises: + MessageIdInvalidError: 如果消息的 ID 无效 + + Example: + .. code-block:: python + + # 单条消息 + await client.forward_messages(chat, message) + # 或者 + await client.forward_messages(chat, message_id, from_chat) + # 或者 + await message.forward_to(chat) + + # 多条消息 + await client.forward_messages(chat, messages) + + # 作为一个副本发送(不带转发来源) + await client.send_message(chat, message) + """ + + def iter_messages(self): + """搜索指定对话中的消息。 + + 参数: + entity (:obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`): + 需要检索的对话的对象 + + limit (``int`` | ``None``, *可选*): + 限制要检索的消息数。由于API的限制,检索超过 ``3000`` 条消息将需要超过半分钟。 + + 配置为 ``None`` ,并不会返回所有历史。 + + offset_date (``float``, *可选*): + 将从此时间之前开始检索消息。 + + offset_id (``int``, *可选*): + 将从此消息 id 之前开始检索消息。 + + max_id (``int``, *可选*): + 配置要检索到的消息的最大 id 值。 + + min_id (``int``, *可选*): + 配置要检索到的消息的最小 id 值。 + + search (``str``, *可选*): + 配置检索的字符串。 + + filter (``MessagesFilter``, *可选*): + 过滤消息类型。 + + from_user (:obj:`~telethon.tl.types.user`, *可选*) + 指定消息发送者。 + + reverse (``bool``, *可选*): + 如果设置为 ``True``,则消息将以相反的顺序返回。这意味着 ``offset_id`` 或者 ``offset_date`` 参数的含义是相反的。 + ``min_id`` 等同于 ``offset_id`` 。 + + reply_to (``int``, *可选*): + 返回频道消息的所有评论消息。 + + 此功能只能用于链接了某个频道的*讨论组*。在其他对话中使用它将抛出 ``PeridInValiderror`` 错误。 + + 使用此参数时,``filter`` 和 ``search`` 参数无效,因为 Telegram 的 API 不支持搜索回复中的消息。 + + Yields: + + 消息对象 :obj:`~telethon.tl.types.message` + + Raises: + + PeridInValiderror: 此对话不是链接了频道的讨论组。 + + Example: + .. code-block:: python + + # 从最新消息开始检索 + async for message in client.iter_messages(chat): + print(message.id, message.text) + + # 从第一条消息开始检索 + async for message in client.iter_messages(chat, reverse=True): + print(message.id, message.text) + + # 只返回我发送的消息 + async for message in client.iter_messages(chat, from_user='me'): + print(message.text) + + # 通过 Telegram 服务器检索匹配的文本消息 + async for message in client.iter_messages(chat, search='hello'): + print(message.id) + + # 检索特定类型的消息(例如:图片) + from telethon.tl.types import InputMessagesFilterPhotos + async for message in client.iter_messages(chat, filter=InputMessagesFilterPhotos): + print(message.photo) + + # 检索指定频道消息的评论 + async for message in client.iter_messages(channel, reply_to=123): + print(message.chat.title, message.text) + """ + + def get_messages(self): + """ + 和 .. automethod:: telethon.Client.iter_messages() 一样,但是返回的是一个 ``List`` 。 + + Example: + .. code-block:: python + + # 获取对话所有照片数 + from telethon.tl.types import InputMessagesFilterPhotos + photos = await client.get_messages(chat, None, filter=InputMessagesFilterPhotos) + print(photos.total) + + # 通过消息 id 获取消息 + message_1337 = await client.get_messages(chat, ids=1337) + """ + + def pin_message(self): + """置顶指定消息 + + 参数: + entity (:obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`): + 需要置顶的对话的对象。 + + message (``int`` | ``None`` | :obj:`~telethon.tl.types.message`, *可选*): + 要置顶的消息 id 或者消息对象。如果值为 ``None``,则将取消置顶所有消息。 + + notify (``bool``, *可选*): + 配置是否通知群成员。与官方应用程序不同,默认不通知所有成员。 + + Example: + .. code-block:: python + + # 置顶消息 + message = await client.send_message(chat, 'Pinotifying is fun!') + await client.pin_message(chat, message, notify=True) + """ + + def unpin_message(self): + """取消置顶指定消息 + + 参数: + entity (:obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`): + 需要取消置顶的对话的对象。 + + message (``int`` | ``None`` | :obj:`~telethon.tl.types.message`, *可选*): + 要置顶的消息 id 或者消息对象。如果值为 ``None``,则将取消置顶所有消息。 + + Example: + .. code-block:: python + + # 取消置顶所有消息 + await client.unpin_message(chat) + """ + + def send_read_acknowledge(self): + """将消息标记为已读,可选择是否清除提及提示。 + + 如果不提供消息和 ``max_id`` ,则将标记所有消息为已读。 + + 参数: + entity (:obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`): + 需要标记已读的对话的对象。 + + message (``list`` | :obj:`~telethon.tl.types.message`, *可选*): + 标记此消息及其之前的所有消息为已读。 + + max_id (``int``, *可选*): + 标记此消息 id 及其之前的所有消息为已读。 + + clear_mentions (``bool``, *可选*): + 配置是否清除提及按钮。 + + Example: + .. code-block:: python + + # 使用消息对象 + await client.send_read_acknowledge(chat, message) + # 或者使用消息 id + await client.send_read_acknowledge(chat, message_id) + # 或者已读所有消息 + await client.send_read_acknowledge(chat, messages) + """ + + # Upload + def send_file(self): + """向指定对话发送文件。 + + .. note:: + + 安装 ``hachoir3`` 包(``hachoir`` 模块),它可以被用于获取音频和视频元信息。 + + 安装 ``pillow`` 包,它可以自动调整图片尺寸以支持 Telegram 上传,但是,如果使用 ``InputFile`` 发送图片,则无法完成。 + + 参数: + entity (:obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`): + 需要发送文件的对话的对象。 + + file (``str`` | ``bytes`` | ``file`` | ``media``): + 支持路径、包含文件的 ``bytes``、网络链接、``file_id``、文件句柄(例如 ``message.media``)。 + + caption (``str``, *可选*): + 配置媒体文件的说明文字。 + + force_document (``bool``, *可选*): + 强制以文件方式发送图片等。 + + reply_to (``int`` | :obj:`~telethon.tl.types.message`, *可选*): + 要回复的消息 id 或者消息对象。 + + parse_mode (``str``, *可选*): + 文本格式解析器配置。值支持 `markdown` (`md`), `html` (`htm`), `None`。 + + buttons (``list``), *可选*): + 配置消息按钮,参见示例,仅支持 bot 登录时。 + + 限制: + 最多可以有 ``100`` 个按钮(更多将被忽略)。 + 每行最多可以有 ``8`` 个按钮(更多将被忽略)。 + 按钮的最大回调数据为 ``64`` 字节。 + + silent (``bool``, *可选*): + 配置是否静默消息,默认关闭。 + + schedule (``float``, *可选*): + 配置是否定时消息,默认不配置。 + + 返回: + :obj:`~telethon.tl.types.message`: 如果成功则返回消息对象。 + + Example: + .. code-block:: python + + # 图片文件 + await client.send_file(chat, '/my/photos/me.jpg', caption="It's me!") + # 或者 + await client.send_message(chat, "It's me!", file='/my/photos/me.jpg') + + # 语音文件 + await client.send_file(chat, '/my/songs/song.mp3', voice_note=True) + await client.send_file(chat, '/my/videos/video.mp4', video_note=True) + + # 自定义缩略图 + await client.send_file(chat, '/my/documents/doc.txt', thumb='photo.jpg') + + # 文件 + await client.send_file(chat, '/my/photos/photo.png', force_document=True) + + # 图辑 + await client.send_file(chat, [ + '/my/photos/holiday1.jpg', + '/my/photos/holiday2.jpg', + '/my/drawings/portrait.png' + ]) + + # 提示上传进度 + def callback(current, total): + print('Uploaded', current, 'out of', total, + 'bytes: {:.2%}'.format(current / total)) + + await client.send_file(chat, file, progress_callback=callback) + + # 骰子,包括飞镖和其他动态表情符号 + from telethon.tl import types + await client.send_file(chat, types.InputMediaDice('')) + await client.send_file(chat, types.InputMediaDice('🎯')) + + # 联系人 + await client.send_file(chat, types.InputMediaContact( + phone_number='+34 123 456 789', + first_name='Example', + last_name='', + vcard='' + )) + """ + + # Download + def download_media(self): + """下载消息对象包含的媒体文件。 + + .. note:: + + 如果下载太慢,则应考虑安装 ``cryptg`` (``pip3 install cryptg``) + + 参数: + entity (:obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`): + 需要发送文件的对话的对象。 + + file (``str`` | ``file``): + 输出文件路径,目录或流等对象。如果该路径存在并且是文件,则将覆盖。 + + 返回: + None: 如果消息中不存在媒体文件,如果为指定路径则将返回文件路径。 + + Example: + .. code-block:: python + + path = await client.download_media(message) + await client.download_media(message, filename) + # 或者 + path = await message.download_media() + await message.download_media(filename) + + # 提示下载进度 + def callback(current, total): + print('Downloaded', current, 'out of', total, + 'bytes: {:.2%}'.format(current / total)) + + await client.download_media(message, progress_callback=callback) + """ + + # Users + def get_me(self): + """获取当前客户端所登录的用户信息。 + + 返回: + :obj:`~telethon.tl.types.user`: 如果成功则返回用户对象。 + + Example: + .. code-block:: python + + me = await client.get_me() + """ + + def get_entity(self): + """获取指定对话信息。 + + .. note:: + + 使用此方法解析用户名不会自带缓存,对时间内您一般解析 ``50`` 个用户名就会收到请求过快错误。 + 推荐优先使用 .. automethod:: telethon.Client.get_input_entity() 来请求缓存的用户名数据。 + + 参数: + entity (``str`` | ``int``): + 需要获取的对话的对象。 + + Raise: + ValueError: 指定的对话不存在。 + + Return: + :obj:`~telethon.tl.types.user` | :obj:`~telethon.tl.types.chat` | :obj:`~telethon.tl.types.channel`: 如果请求成功。 + + Example: + .. code-block:: python + + from telethon import utils + + me = await client.get_entity('me') + print(utils.get_display_name(me)) + + chat = await client.get_input_entity('username') + async for message in client.iter_messages(chat): + ... + + # 可以直接使用用户名 + async for message in client.iter_messages('username'): + ... + + # 请注意,您的联系人中必须拥有此电话号码才可以请求到数据。 + some_id = await client.get_peer_id('+34123456789') + """ + + def get_input_entity(self): + """获取指定对话的对象。 + + 参数: + entity (``str`` | ``int``): + 需要获取的对话的对象。 + + Raise: + ValueError: 指定的对话不存在。 + + Example: + .. code-block:: python + + user = await client.get_input_entity('username') + chat = await client.get_input_entity(-123456789) + """ diff --git a/telethon/events/__init__.py b/telethon/events/__init__.py new file mode 100644 index 0000000..c825163 --- /dev/null +++ b/telethon/events/__init__.py @@ -0,0 +1 @@ +from .newmessage import NewMessage diff --git a/telethon/events/newmessage.py b/telethon/events/newmessage.py new file mode 100644 index 0000000..16df6d9 --- /dev/null +++ b/telethon/events/newmessage.py @@ -0,0 +1,35 @@ +class NewMessage: + """``chats=None, incoming=None, outgoing=None, from_users=None, forwards=None, pattern=None`` + + 消息处理程序类。用于处理来自任何对话(私聊、群组、频道)的文本,媒体消息。 + 它需要与 :meth:`~telethon.Client.add_handler` 一起使用。 + + 参数: + incoming (``bool``,``可选``): + 如果设置为 ``True`` ,则只能处理接收到的消息。与 ``outgoing`` 相互排斥(只能设置一个 ``False``)。 + outgoing (``bool``,``可选``): + 如果设置为 ``True`` ,则只能处理此账户通过其他客户端发出的消息。与 ``incoming`` 相互排斥(只能设置一个 ``False``)。 + from_users (:obj:`User`,``可选``): + 不像 ``chats`` 参数,此项会筛选出来自此/这些用户的所有消息。如果您只想筛选出来自此/这些用户的私聊对话,请使用 ``chats`` 参数。 + forwards (``bool``,``可选``): + 是否处理转发消息。默认情况下,将处理转发和普通消息。如果设置为 ``True``,则只处理转发消息;如果设置为 ``False``,则只处理普通消息。 + pattern (``str``,``callable``,``Pattern``,``可选``): + 如果设置,只有匹配此模式的消息将被处理。您可以指定 Regex 字符串或者编译的正则表达式模式,如果与消息匹配则将被处理; + 如果是可调函数,返回值为 ``True`` 时消息将被处理。 + + Example + .. code-block:: python + + import asyncio + from telethon import events + @client.on(events.NewMessage(pattern='(?i)hello.+')) + async def handler(event): + # Respond whenever someone says "Hello" and something else + await event.reply('Hey!') + @client.on(events.NewMessage(outgoing=True, pattern='!ping')) + async def handler(event): + # Say "!pong" whenever you send "!ping", then delete both messages + m = await event.respond('!pong') + await asyncio.sleep(5) + await client.delete_messages(event.chat_id, [event.id, m.id]) + """ diff --git a/telethon/tl/types/__init__.py b/telethon/tl/types/__init__.py new file mode 100644 index 0000000..8b3d121 --- /dev/null +++ b/telethon/tl/types/__init__.py @@ -0,0 +1,168 @@ +# noinspection PyUnresolvedReferences +class message: + """一条消息。 + + 参数: + id (``int``): + 对话中消息的唯一消息标识符。 + + from_id (``PeerUser`` | ``PeerChat`` | ``PeerChannel``, *可选*): + 发送人。 + + peer_id (``PeerUser`` | ``PeerChat`` | ``PeerChannel``, *可选*): + 对话信息。 + + text (``str``) + 文本 + + raw_text (``str``) + 纯文本 + + is_reply (``bool``) + 如果此消息是回复消息则值为 ``True`` + + date (``int``) + 消息发送时间 + """ + + def reply(self): + """快速回复消息。 + + 参见方法 :meth:`~telethon.Client.send_message` + + 参数 ``entity`` 和 ``reply_to`` 已经自动配置。""" + + def forward_to(self): + """快速转发消息。 + + 参见方法 :meth:`~telethon.Client.forward_messages` + + 参数 ``messages`` 和 ``from_peer`` 已经自动配置。""" + + def edit(self): + """快速编辑消息。 + + 参见方法 :meth:`~telethon.Client.edit_message` + + 参数 ``entity`` 和 ``message`` 已经自动配置。""" + + def delete(self): + """快速删除消息。 + + 参见方法 :meth:`~telethon.Client.delete_messages` + + 参数 ``entity`` 和 ``message_ids`` 已经自动配置。""" + + def mark_read(self): + """快速已读消息。 + + 参见方法 :meth:`~telethon.Client.send_read_acknowledge` + + 参数 ``entity`` 和 ``message`` 已经自动配置。""" + + def pin(self): + """快速置顶消息。 + + 参见方法 :meth:`~telethon.Client.pin_message` + + 参数 ``entity`` 和 ``message`` 已经自动配置。""" + + def unpin(self): + """快速取消置顶消息。 + + 参见方法 :meth:`~telethon.Client.unpin_message` + + 参数 ``entity`` 和 ``message`` 已经自动配置。""" + + +class user: + """A Telegram user or bot. + + 参数: + id (``int``): + 唯一标识符。 + is_self (``bool``): + 如果是当前客户端登录用户,则返回 ``True`` 。 + bot (``bool``): + 如果是机器人,则返回 ``True`` 。 + verified (``bool``): + 如果是官方认证,则返回 ``True`` 。 + restricted (``bool``): + 如果是收到限制,则返回 ``True`` 。 + fake (``bool``): + 如果是被标记为冒充,则返回 ``True`` 。 + first_name (``str``): + first name + last_name (``str``, *可选*): + 如果未配置,则返回 ``None`` 。 + username (``str``, *可选*): + 如果未配置,则返回 ``None`` 。 + phone (``str``, *可选*): + 如果无法读取,则返回 ``None`` 。 + lang_code (``str``, *可选*): + 如果无法读取,则返回 ``None`` 。 + """ + + +class chat: + """A chat. + + 参数: + id (``int``): + 唯一标识符。 + title (``str``): + 标题 + username (``str``, *可选*): + 如果未配置,则返回 ``None`` 。 + participants_count (``int``): + 群成员数 + date (``int``): + 可能是创建日期? + slowmode_enabled (``bool``): + 是否开启慢速模式,如果无法获取则返回 ``None`` 。 + creator (``bool``): + 如果当前客户端登录用户是创建者,则返回 ``True`` 。 + kicked (``bool``): + 如果当前客户端登录用户被踢出,则返回 ``True`` 。 + left (``bool``): + 如果当前客户端登录用户已退出,则返回 ``True`` 。 + call_active (``bool``): + 如果群语音已激活,则返回 ``True`` 。 + call_not_empty (``bool``): + 如果群语音有成员,则返回 ``True`` 。 + """ + + +class channel: + """A channel. + + 参数: + id (``int``): + 唯一标识符。 + title (``str``): + 标题 + username (``str``, *可选*): + 如果未配置,则返回 ``None`` 。 + participants_count (``int``): + 成员数,如果无法获取则返回 ``None`` 。 + date (``int``): + 可能是创建日期? + creator (``bool``): + 如果当前客户端登录用户是创建者,则返回 ``True`` 。 + left (``bool``): + 如果当前客户端登录用户已退出,则返回 ``True`` 。 + verified (``bool``): + 如果是官方认证,则返回 ``True`` 。 + restricted (``bool``): + 如果是收到限制,则返回 ``True`` 。 + fake (``bool``): + 如果是被标记为冒充,则返回 ``True`` 。 + has_link (``bool``): + 如果链接到了一个讨论群,则返回 ``True``。 + has_geo (``bool``): + 如果拥有地理位置信息,则返回 ``True`` 。 + call_active (``bool``): + 如果语音已激活,则返回 ``True`` 。 + call_not_empty (``bool``): + 如果语音有成员,则返回 ``True`` 。 + """ \ No newline at end of file