├── .gitignore ├── .pre-commit-config.yaml ├── LICENSE ├── MANIFEST.in ├── README.rst ├── azure-pipelines.yml ├── ci_tools ├── debug.py └── run_tests.yml ├── docs ├── _config.yml ├── example_dashboard │ ├── assets │ │ ├── css │ │ │ ├── bootstrap.min.css │ │ │ └── light-bootstrap-dashboard.css │ │ ├── img │ │ │ ├── CheckFailed.svg │ │ │ ├── CheckPassed.svg │ │ │ └── Readme │ │ └── js │ │ │ ├── core │ │ │ ├── bootstrap.min.js │ │ │ ├── jquery.3.2.1.min.js │ │ │ └── popper.min.js │ │ │ ├── light-bootstrap-dashboard.js │ │ │ └── plotly-latest.min.js │ └── index.html └── index.md ├── flake8_dashboard ├── __init__.py ├── code_description.json ├── plugin.py ├── templates │ ├── assets │ │ ├── css │ │ │ ├── bootstrap.min.css │ │ │ └── light-bootstrap-dashboard.css │ │ ├── img │ │ │ ├── CheckFailed.svg │ │ │ ├── CheckPassed.svg │ │ │ └── Readme │ │ └── js │ │ │ ├── core │ │ │ ├── bootstrap.min.js │ │ │ ├── jquery.3.2.1.min.js │ │ │ └── popper.min.js │ │ │ ├── light-bootstrap-dashboard.js │ │ │ └── plotly-latest.min.js │ └── index.html ├── tests │ ├── __init__.py │ └── test_path_handling.py └── utils.py ├── mkdocs.yml ├── pyproject.toml ├── requirements.txt ├── scripts ├── clone_pylint_tests.py └── download_codes_description.py ├── setup.cfg ├── setup.py └── tox.ini /.gitignore: -------------------------------------------------------------------------------- 1 | notebooks 2 | 3 | # Byte-compiled / optimized / DLL files 4 | __pycache__/ 5 | *.py[cod] 6 | *$py.class 7 | 8 | # C extensions 9 | *.so 10 | 11 | # Distribution / packaging 12 | .Python 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | sdist/ 21 | wheels/ 22 | pip-wheel-metadata/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | .hypothesis/ 50 | .pytest_cache/ 51 | 52 | # Translations 53 | *.mo 54 | *.pot 55 | 56 | # Django stuff: 57 | *.log 58 | local_settings.py 59 | db.sqlite3 60 | db.sqlite3-journal 61 | 62 | # Flask stuff: 63 | instance/ 64 | .webassets-cache 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # Jupyter Notebook 70 | .ipynb_checkpoints 71 | 72 | # IPython 73 | profile_default/ 74 | ipython_config.py 75 | 76 | # pyenv 77 | .python-version 78 | 79 | # Environments 80 | .env 81 | .venv 82 | env/ 83 | venv/ 84 | ENV/ 85 | env.bak/ 86 | venv.bak/ 87 | 88 | # project settings 89 | .spyderproject 90 | .spyproject 91 | .idea 92 | .ropeproject 93 | 94 | # mypy 95 | .mypy_cache/ 96 | .dmypy.json 97 | dmypy.json 98 | 99 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/psf/black 3 | rev: stable 4 | hooks: 5 | - id: black 6 | language_version: python3.7 7 | - repo: https://gitlab.com/PyCQA/flake8 8 | rev: 3.7.9 9 | hooks: 10 | - id: flake8 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache Software License 2.0 2 | 3 | Copyright (c) 2019, Andres Perez Hortal (flake8-dashboard) 4 | Copyright (c) 2017, Daniel Pope (flake8-html) 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | 18 | 19 | ################################################################################ 20 | light-bootstrap-dashboard template license 21 | 22 | MIT License 23 | 24 | Copyright (c) 2019 Creative Tim 25 | 26 | Permission is hereby granted, free of charge, to any person obtaining a copy 27 | of this software and associated documentation files (the "Software"), to deal 28 | in the Software without restriction, including without limitation the rights 29 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 30 | copies of the Software, and to permit persons to whom the Software is 31 | furnished to do so, subject to the following conditions: 32 | 33 | The above copyright notice and this permission notice shall be included in all 34 | copies or substantial portions of the Software. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 37 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 38 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 39 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 40 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 41 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 42 | SOFTWARE. 43 | 44 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | include README.rst 3 | include requirements.txt 4 | 5 | include flake8_dashboard/code_description.json 6 | 7 | recursive-include flake8_dashboard/templates * 8 | 9 | recursive-exclude * __pycache__ 10 | recursive-exclude * *.py[co] 11 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | flake8-dashboard 3 | ================ 4 | 5 | A flake8 plugin to generate a responsive HTML dashboard summarizing all the flake8 violations. 6 | The resulting dashboard has an easy-to-read format across a variety of devices and web 7 | browsers. 8 | 9 | Installation 10 | ============ 11 | 12 | If flake8 is not installed, run: 13 | 14 | .. code-block:: bash 15 | 16 | $ pip install flake8 17 | 18 | Finally, to install the latest release of the plugin from the 19 | Python Package Index, run: 20 | 21 | .. code-block:: bash 22 | 23 | $ pip install flake8-dashboard 24 | 25 | Alternatively, to install the latest development version (master branch), run: 26 | 27 | .. code-block:: bash 28 | 29 | $ pip install git+https://github.com/aperezhortal/flake8-dashboard 30 | 31 | Usage 32 | ===== 33 | 34 | Run flake8 with the ``--format=dashboard`` option to create a nice-looking 35 | dashboard. 36 | 37 | Options: 38 | 39 | - ``--outputdir=``: Directory to save the HTML output 40 | ("./flake8_dashboard" by default). 41 | - ``--debug``: Write additional debugging information as csv format 42 | (flake8 violations and aggregations). 43 | - ``--title=``: Set the dashboard's title. No title by default. 44 | 45 | Simple usage example: 46 | 47 | .. code-block:: bash 48 | 49 | $ flake8 --format=dashboard --outputdir=flake-report --title="My dashboard" 50 | 51 | 52 | Demo 53 | ~~~~ 54 | 55 | `Check a demo here! <https://aperezhortal.github.io/flake8-dashboard/example_dashboard/index.html>`_ 56 | 57 | 58 | Credits 59 | ======= 60 | 61 | - This package was created using the `flake8-html`_ package as a template. 62 | 63 | - The dashboard html page was created using the 64 | `light-bootstrap-dashboard`_ template by `Creative Tim`_. 65 | 66 | - The interactive plots are created using `Plotly Python`_ . 67 | 68 | .. _light-bootstrap-dashboard: https://demos.creative-tim.com/light-bootstrap-dashboard/ 69 | .. _`Creative Tim`: https://www.creative-tim.com/ 70 | .. _`Plotly Python`: https://plot.ly/python/ 71 | .. _flake8-html: https://github.com/lordmauve/flake8-html 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | # Python package 2 | # Create and test a Python package on multiple Python versions. 3 | # Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: 4 | # https://docs.microsoft.com/azure/devops/pipelines/languages/python 5 | 6 | jobs: 7 | 8 | - template: ci_tools/run_tests.yml 9 | parameters: 10 | name: Linux_test 11 | vmImage: ubuntu-18.04 12 | 13 | - template: ci_tools/run_tests.yml 14 | parameters: 15 | name: Win_test 16 | vmImage: vs2017-win2016 17 | -------------------------------------------------------------------------------- /ci_tools/debug.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import os 3 | import pandas as pd 4 | 5 | parser = argparse.ArgumentParser() 6 | 7 | parser.add_argument("dashboard_dir") 8 | args = parser.parse_args() 9 | 10 | print("-----------------------------------------------------------------------") 11 | print("-----------------------------------------------------------------------") 12 | print("-----------------------------------------------------------------------") 13 | print("-----------------------------------------------------------------------") 14 | report = pd.read_csv(os.path.join(args.dashboard_dir, "report.csv")) 15 | report = report[["path", "code", "line_number", "text"]] 16 | print(report) 17 | print("-----------------------------------------------------------------------") 18 | 19 | print("\n\n\n") 20 | print("-----------------------------------------------------------------------") 21 | print("-----------------------------------------------------------------------") 22 | print("-----------------------------------------------------------------------") 23 | print("-----------------------------------------------------------------------") 24 | quality = pd.read_csv(os.path.join(args.dashboard_dir, "quality.csv")) 25 | print(quality) 26 | print("-----------------------------------------------------------------------") 27 | -------------------------------------------------------------------------------- /ci_tools/run_tests.yml: -------------------------------------------------------------------------------- 1 | # Python package 2 | # Create and test a Python package on multiple Python versions. 3 | # Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: 4 | # https://docs.microsoft.com/azure/devops/pipelines/languages/python 5 | 6 | parameters: 7 | name: '' 8 | vmImage: '' 9 | 10 | jobs: 11 | - job: ${{ parameters.name }} 12 | 13 | pool: 14 | vmImage: ${{ parameters.vmImage }} 15 | 16 | strategy: 17 | matrix: 18 | Python36: 19 | python.version: '3.6' 20 | 21 | steps: 22 | - task: UsePythonVersion@0 23 | inputs: 24 | versionSpec: '$(python.version)' 25 | displayName: 'Use Python $(python.version)' 26 | 27 | - script: | 28 | python -m pip install --upgrade pip 29 | pip install -r requirements.txt 30 | displayName: 'Install dependencies' 31 | 32 | - script: | 33 | pip install -U . 34 | displayName: 'Install dependencies' 35 | 36 | - script: | 37 | pip install pytest 38 | pytest 39 | displayName: 'Run pytest' 40 | 41 | - script: | 42 | git clone --depth=20 https://github.com/aperezhortal/pylint --branch only_tests --single-branch pylint_tests 43 | flake8 --exit-zero --debug --format=dashboard --outputdir=dash_out pylint_tests 44 | displayName: 'flake8-dashboard test' 45 | 46 | - script: | 47 | python ci_tools/debug.py dash_out 48 | displayName: 'Extra debug info' 49 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-leap-day -------------------------------------------------------------------------------- /docs/example_dashboard/assets/img/CheckFailed.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <svg 3 | xmlns:dc="http://purl.org/dc/elements/1.1/" 4 | xmlns:cc="http://creativecommons.org/ns#" 5 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 6 | xmlns:svg="http://www.w3.org/2000/svg" 7 | xmlns="http://www.w3.org/2000/svg" 8 | xmlns:xlink="http://www.w3.org/1999/xlink" 9 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" 10 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" 11 | version="1.0" 12 | width="620" 13 | height="620" 14 | viewBox="0 0 62 62" 15 | id="svg0" 16 | sodipodi:version="0.32" 17 | inkscape:version="0.46" 18 | sodipodi:docname="ambox_delete1.svg" 19 | inkscape:output_extension="org.inkscape.output.svg.inkscape"> 20 | <metadata 21 | id="metadata2478"> 22 | <rdf:RDF> 23 | <cc:Work 24 | rdf:about=""> 25 | <dc:format>image/svg+xml</dc:format> 26 | <dc:type 27 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> 28 | </cc:Work> 29 | </rdf:RDF> 30 | </metadata> 31 | <sodipodi:namedview 32 | inkscape:window-height="749" 33 | inkscape:window-width="1024" 34 | inkscape:pageshadow="2" 35 | inkscape:pageopacity="0.0" 36 | guidetolerance="10.0" 37 | gridtolerance="10.0" 38 | objecttolerance="10.0" 39 | borderopacity="1.0" 40 | bordercolor="#666666" 41 | pagecolor="#ffffff" 42 | id="base" 43 | showgrid="false" 44 | inkscape:zoom="0.74516129" 45 | inkscape:cx="273.38252" 46 | inkscape:cy="330.49409" 47 | inkscape:window-x="-4" 48 | inkscape:window-y="-4" 49 | inkscape:current-layer="svg0" /> 50 | <defs 51 | id="defs4"> 52 | <inkscape:perspective 53 | sodipodi:type="inkscape:persp3d" 54 | inkscape:vp_x="0 : 310 : 1" 55 | inkscape:vp_y="0 : 1000 : 0" 56 | inkscape:vp_z="620 : 310 : 1" 57 | inkscape:persp3d-origin="310 : 206.66667 : 1" 58 | id="perspective2480" /> 59 | <radialGradient 60 | id="shadowGradient"> 61 | <stop 62 | id="stop17" 63 | style="stop-color:#c0c0c0;stop-opacity:1" 64 | offset="0" /> 65 | <stop 66 | id="stop19" 67 | style="stop-color:#c0c0c0;stop-opacity:1" 68 | offset="0.88" /> 69 | <stop 70 | id="stop21" 71 | style="stop-color:#c0c0c0;stop-opacity:0" 72 | offset="1" /> 73 | </radialGradient> 74 | <linearGradient 75 | x1="42.986301" 76 | y1="7.0127001" 77 | x2="22.0144" 78 | y2="51.987099" 79 | id="fieldGradient" 80 | gradientUnits="userSpaceOnUse"> 81 | <stop 82 | id="stop7" 83 | style="stop-color:#ffafaf;stop-opacity:1;" 84 | offset="0" /> 85 | <stop 86 | id="stop9" 87 | style="stop-color:#e31313;stop-opacity:1;" 88 | offset="1" /> 89 | </linearGradient> 90 | <linearGradient 91 | x1="54.509937" 92 | y1="41.179295" 93 | x2="9.5471001" 94 | y2="16.248501" 95 | id="edgeGradient" 96 | gradientUnits="userSpaceOnUse" 97 | xlink:href="#fieldGradient"> 98 | <stop 99 | id="stop12" 100 | style="stop-color:#9a1212;stop-opacity:1;" 101 | offset="0" /> 102 | <stop 103 | id="stop14" 104 | style="stop-color:#d33e3e;stop-opacity:1;" 105 | offset="1" /> 106 | </linearGradient> 107 | </defs> 108 | <circle 109 | cx="32.5" 110 | cy="29.5" 111 | r="26.5" 112 | id="shadow" 113 | style="fill:url(#shadowGradient);stroke:none" 114 | transform="matrix(1.0648,0,0,1.064822,-2.1,1.0864)" /> 115 | <circle 116 | cx="31" 117 | cy="31" 118 | r="25.8" 119 | id="field" 120 | style="fill:url(#fieldGradient);fill-opacity:1;stroke:url(#edgeGradient);stroke-width:2" /> 121 | <rect 122 | style="fill:#ffffff" 123 | id="rect3254" 124 | width="35.294373" 125 | height="7.2467527" 126 | x="-17.647186" 127 | y="40.217243" 128 | transform="matrix(0.7071068,-0.7071068,0.7071068,0.7071068,0,0)" /> 129 | <rect 130 | style="fill:#ffffff" 131 | id="rect3256" 132 | width="7.2467527" 133 | height="35.42857" 134 | x="-3.6233766" 135 | y="26.126335" 136 | transform="matrix(0.7071068,-0.7071068,0.7071068,0.7071068,0,0)" /> 137 | </svg> 138 | -------------------------------------------------------------------------------- /docs/example_dashboard/assets/img/CheckPassed.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15"> 3 | <circle cx="7.5" cy="7.5" r="7.5" fill="#40ce78" /> 4 | <path d="M2.90625 8.59375 c 1.7561681,0.7702427 2.7523447,1.871153 3.6875,3.3125 0.6687211,-2.8631278 2.0524127,-7.3946548 4.6875,-8.71875" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" /> 5 | </svg> 6 | -------------------------------------------------------------------------------- /docs/example_dashboard/assets/img/Readme: -------------------------------------------------------------------------------- 1 | Licensing 2 | ========= 3 | 4 | All the images are release under CC0 license. 5 | 6 | Sources: https://commons.wikimedia.org -------------------------------------------------------------------------------- /docs/example_dashboard/assets/js/core/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.0.0-beta (https://getbootstrap.com) 3 | * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");!function(t){var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(t){function e(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(t){return(t[0]||t).nodeType}function i(){return{bindType:s.end,delegateType:s.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}}function o(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in a)if(void 0!==t.style[e])return{end:a[e]};return!1}function r(e){var n=this,i=!1;return t(this).one(l.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||l.triggerTransitionEnd(n)},e),this}var s=!1,a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(e){var n=e.getAttribute("data-target");n&&"#"!==n||(n=e.getAttribute("href")||"");try{return t(n).length>0?n:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger(s.end)},supportsTransitionEnd:function(){return Boolean(s)},typeCheckConfig:function(t,i,o){for(var r in o)if(o.hasOwnProperty(r)){var s=o[r],a=i[r],l=a&&n(a)?"element":e(a);if(!new RegExp(s).test(l))throw new Error(t.toUpperCase()+': Option "'+r+'" provided type "'+l+'" but expected type "'+s+'".')}}};return s=o(),t.fn.emulateTransitionEnd=r,l.supportsTransitionEnd()&&(t.event.special[l.TRANSITION_END]=i()),l}(jQuery),s=(function(t){var e="alert",i=t.fn[e],s={DISMISS:'[data-dismiss="alert"]'},a={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},l={ALERT:"alert",FADE:"fade",SHOW:"show"},h=function(){function e(t){n(this,e),this._element=t}return e.prototype.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.prototype.dispose=function(){t.removeData(this._element,"bs.alert"),this._element=null},e.prototype._getRootElement=function(e){var n=r.getSelectorFromElement(e),i=!1;return n&&(i=t(n)[0]),i||(i=t(e).closest("."+l.ALERT)[0]),i},e.prototype._triggerCloseEvent=function(e){var n=t.Event(a.CLOSE);return t(e).trigger(n),n},e.prototype._removeElement=function(e){var n=this;t(e).removeClass(l.SHOW),r.supportsTransitionEnd()&&t(e).hasClass(l.FADE)?t(e).one(r.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(150):this._destroyElement(e)},e.prototype._destroyElement=function(e){t(e).detach().trigger(a.CLOSED).remove()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data("bs.alert");o||(o=new e(this),i.data("bs.alert",o)),"close"===n&&o[n](this)})},e._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),e}();t(document).on(a.CLICK_DATA_API,s.DISMISS,h._handleDismiss(new h)),t.fn[e]=h._jQueryInterface,t.fn[e].Constructor=h,t.fn[e].noConflict=function(){return t.fn[e]=i,h._jQueryInterface}}(jQuery),function(t){var e="button",i=t.fn[e],r={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},s={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},a={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},l=function(){function e(t){n(this,e),this._element=t}return e.prototype.toggle=function(){var e=!0,n=!0,i=t(this._element).closest(s.DATA_TOGGLE)[0];if(i){var o=t(this._element).find(s.INPUT)[0];if(o){if("radio"===o.type)if(o.checked&&t(this._element).hasClass(r.ACTIVE))e=!1;else{var a=t(i).find(s.ACTIVE)[0];a&&t(a).removeClass(r.ACTIVE)}if(e){if(o.hasAttribute("disabled")||i.hasAttribute("disabled")||o.classList.contains("disabled")||i.classList.contains("disabled"))return;o.checked=!t(this._element).hasClass(r.ACTIVE),t(o).trigger("change")}o.focus(),n=!1}}n&&this._element.setAttribute("aria-pressed",!t(this._element).hasClass(r.ACTIVE)),e&&t(this._element).toggleClass(r.ACTIVE)},e.prototype.dispose=function(){t.removeData(this._element,"bs.button"),this._element=null},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data("bs.button");i||(i=new e(this),t(this).data("bs.button",i)),"toggle"===n&&i[n]()})},o(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),e}();t(document).on(a.CLICK_DATA_API,s.DATA_TOGGLE_CARROT,function(e){e.preventDefault();var n=e.target;t(n).hasClass(r.BUTTON)||(n=t(n).closest(s.BUTTON)),l._jQueryInterface.call(t(n),"toggle")}).on(a.FOCUS_BLUR_DATA_API,s.DATA_TOGGLE_CARROT,function(e){var n=t(e.target).closest(s.BUTTON)[0];t(n).toggleClass(r.FOCUS,/^focus(in)?$/.test(e.type))}),t.fn[e]=l._jQueryInterface,t.fn[e].Constructor=l,t.fn[e].noConflict=function(){return t.fn[e]=i,l._jQueryInterface}}(jQuery),function(t){var e="carousel",s="bs.carousel",a="."+s,l=t.fn[e],h={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},c={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},u={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},d={SLIDE:"slide"+a,SLID:"slid"+a,KEYDOWN:"keydown"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a,TOUCHEND:"touchend"+a,LOAD_DATA_API:"load.bs.carousel.data-api",CLICK_DATA_API:"click.bs.carousel.data-api"},f={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},p={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},_=function(){function l(e,i){n(this,l),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(i),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(p.INDICATORS)[0],this._addEventListeners()}return l.prototype.next=function(){this._isSliding||this._slide(u.NEXT)},l.prototype.nextWhenVisible=function(){document.hidden||this.next()},l.prototype.prev=function(){this._isSliding||this._slide(u.PREV)},l.prototype.pause=function(e){e||(this._isPaused=!0),t(this._element).find(p.NEXT_PREV)[0]&&r.supportsTransitionEnd()&&(r.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},l.prototype.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},l.prototype.to=function(e){var n=this;this._activeElement=t(this._element).find(p.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(d.SLID,function(){return n.to(e)});else{if(i===e)return this.pause(),void this.cycle();var o=e>i?u.NEXT:u.PREV;this._slide(o,this._items[e])}},l.prototype.dispose=function(){t(this._element).off(a),t.removeData(this._element,s),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},l.prototype._getConfig=function(n){return n=t.extend({},h,n),r.typeCheckConfig(e,n,c),n},l.prototype._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(d.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(d.MOUSEENTER,function(t){return e.pause(t)}).on(d.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(d.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},l.prototype._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next();break;default:return}},l.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(p.ITEM)),this._items.indexOf(e)},l.prototype._getItemByDirection=function(t,e){var n=t===u.NEXT,i=t===u.PREV,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=(o+(t===u.PREV?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},l.prototype._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),o=this._getItemIndex(t(this._element).find(p.ACTIVE_ITEM)[0]),r=t.Event(d.SLIDE,{relatedTarget:e,direction:n,from:o,to:i});return t(this._element).trigger(r),r},l.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(p.ACTIVE).removeClass(f.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(f.ACTIVE)}},l.prototype._slide=function(e,n){var i=this,o=t(this._element).find(p.ACTIVE_ITEM)[0],s=this._getItemIndex(o),a=n||o&&this._getItemByDirection(e,o),l=this._getItemIndex(a),h=Boolean(this._interval),c=void 0,_=void 0,g=void 0;if(e===u.NEXT?(c=f.LEFT,_=f.NEXT,g=u.LEFT):(c=f.RIGHT,_=f.PREV,g=u.RIGHT),a&&t(a).hasClass(f.ACTIVE))this._isSliding=!1;else if(!this._triggerSlideEvent(a,g).isDefaultPrevented()&&o&&a){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(a);var m=t.Event(d.SLID,{relatedTarget:a,direction:g,from:s,to:l});r.supportsTransitionEnd()&&t(this._element).hasClass(f.SLIDE)?(t(a).addClass(_),r.reflow(a),t(o).addClass(c),t(a).addClass(c),t(o).one(r.TRANSITION_END,function(){t(a).removeClass(c+" "+_).addClass(f.ACTIVE),t(o).removeClass(f.ACTIVE+" "+_+" "+c),i._isSliding=!1,setTimeout(function(){return t(i._element).trigger(m)},0)}).emulateTransitionEnd(600)):(t(o).removeClass(f.ACTIVE),t(a).addClass(f.ACTIVE),this._isSliding=!1,t(this._element).trigger(m)),h&&this.cycle()}},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(s),o=t.extend({},h,t(this).data());"object"===(void 0===e?"undefined":i(e))&&t.extend(o,e);var r="string"==typeof e?e:o.slide;if(n||(n=new l(this,o),t(this).data(s,n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if(void 0===n[r])throw new Error('No method named "'+r+'"');n[r]()}else o.interval&&(n.pause(),n.cycle())})},l._dataApiClickHandler=function(e){var n=r.getSelectorFromElement(this);if(n){var i=t(n)[0];if(i&&t(i).hasClass(f.CAROUSEL)){var o=t.extend({},t(i).data(),t(this).data()),a=this.getAttribute("data-slide-to");a&&(o.interval=!1),l._jQueryInterface.call(t(i),o),a&&t(i).data(s).to(a),e.preventDefault()}}},o(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return h}}]),l}();t(document).on(d.CLICK_DATA_API,p.DATA_SLIDE,_._dataApiClickHandler),t(window).on(d.LOAD_DATA_API,function(){t(p.DATA_RIDE).each(function(){var e=t(this);_._jQueryInterface.call(e,e.data())})}),t.fn[e]=_._jQueryInterface,t.fn[e].Constructor=_,t.fn[e].noConflict=function(){return t.fn[e]=l,_._jQueryInterface}}(jQuery),function(t){var e="collapse",s="bs.collapse",a=t.fn[e],l={toggle:!0,parent:""},h={toggle:"boolean",parent:"string"},c={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},u={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},d={WIDTH:"width",HEIGHT:"height"},f={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},p=function(){function a(e,i){n(this,a),this._isTransitioning=!1,this._element=e,this._config=this._getConfig(i),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var o=t(f.DATA_TOGGLE),s=0;s<o.length;s++){var l=o[s],h=r.getSelectorFromElement(l);null!==h&&t(h).filter(e).length>0&&this._triggerArray.push(l)}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return a.prototype.toggle=function(){t(this._element).hasClass(u.SHOW)?this.hide():this.show()},a.prototype.show=function(){var e=this;if(!this._isTransitioning&&!t(this._element).hasClass(u.SHOW)){var n=void 0,i=void 0;if(this._parent&&((n=t.makeArray(t(this._parent).children().children(f.ACTIVES))).length||(n=null)),!(n&&(i=t(n).data(s))&&i._isTransitioning)){var o=t.Event(c.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){n&&(a._jQueryInterface.call(t(n),"hide"),i||t(n).data(s,null));var l=this._getDimension();t(this._element).removeClass(u.COLLAPSE).addClass(u.COLLAPSING),this._element.style[l]=0,this._triggerArray.length&&t(this._triggerArray).removeClass(u.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var h=function(){t(e._element).removeClass(u.COLLAPSING).addClass(u.COLLAPSE).addClass(u.SHOW),e._element.style[l]="",e.setTransitioning(!1),t(e._element).trigger(c.SHOWN)};if(r.supportsTransitionEnd()){var d="scroll"+(l[0].toUpperCase()+l.slice(1));t(this._element).one(r.TRANSITION_END,h).emulateTransitionEnd(600),this._element.style[l]=this._element[d]+"px"}else h()}}}},a.prototype.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(u.SHOW)){var n=t.Event(c.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",r.reflow(this._element),t(this._element).addClass(u.COLLAPSING).removeClass(u.COLLAPSE).removeClass(u.SHOW),this._triggerArray.length)for(var o=0;o<this._triggerArray.length;o++){var s=this._triggerArray[o],a=r.getSelectorFromElement(s);null!==a&&(t(a).hasClass(u.SHOW)||t(s).addClass(u.COLLAPSED).attr("aria-expanded",!1))}this.setTransitioning(!0);var l=function(){e.setTransitioning(!1),t(e._element).removeClass(u.COLLAPSING).addClass(u.COLLAPSE).trigger(c.HIDDEN)};this._element.style[i]="",r.supportsTransitionEnd()?t(this._element).one(r.TRANSITION_END,l).emulateTransitionEnd(600):l()}}},a.prototype.setTransitioning=function(t){this._isTransitioning=t},a.prototype.dispose=function(){t.removeData(this._element,s),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},a.prototype._getConfig=function(n){return n=t.extend({},l,n),n.toggle=Boolean(n.toggle),r.typeCheckConfig(e,n,h),n},a.prototype._getDimension=function(){return t(this._element).hasClass(d.WIDTH)?d.WIDTH:d.HEIGHT},a.prototype._getParent=function(){var e=this,n=t(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(a._getTargetFromElement(n),[n])}),n},a.prototype._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(u.SHOW);n.length&&t(n).toggleClass(u.COLLAPSED,!i).attr("aria-expanded",i)}},a._getTargetFromElement=function(e){var n=r.getSelectorFromElement(e);return n?t(n)[0]:null},a._jQueryInterface=function(e){return this.each(function(){var n=t(this),o=n.data(s),r=t.extend({},l,n.data(),"object"===(void 0===e?"undefined":i(e))&&e);if(!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||(o=new a(this,r),n.data(s,o)),"string"==typeof e){if(void 0===o[e])throw new Error('No method named "'+e+'"');o[e]()}})},o(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return l}}]),a}();t(document).on(c.CLICK_DATA_API,f.DATA_TOGGLE,function(e){/input|textarea/i.test(e.target.tagName)||e.preventDefault();var n=t(this),i=r.getSelectorFromElement(this);t(i).each(function(){var e=t(this),i=e.data(s)?"toggle":n.data();p._jQueryInterface.call(e,i)})}),t.fn[e]=p._jQueryInterface,t.fn[e].Constructor=p,t.fn[e].noConflict=function(){return t.fn[e]=a,p._jQueryInterface}}(jQuery),function(t){if("undefined"==typeof Popper)throw new Error("Bootstrap dropdown require Popper.js (https://popper.js.org)");var e="dropdown",s="bs.dropdown",a="."+s,l=t.fn[e],h=new RegExp("38|40|27"),c={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api",KEYUP_DATA_API:"keyup.bs.dropdown.data-api"},u={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left"},d={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled)"},f={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end"},p={placement:f.BOTTOM,offset:0,flip:!0},_={placement:"string",offset:"(number|string)",flip:"boolean"},g=function(){function l(t,e){n(this,l),this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}return l.prototype.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(u.DISABLED)){var e=l._getParentFromElement(this._element),n=t(this._menu).hasClass(u.SHOW);if(l._clearMenus(),!n){var i={relatedTarget:this._element},o=t.Event(c.SHOW,i);if(t(e).trigger(o),!o.isDefaultPrevented()){var r=this._element;t(e).hasClass(u.DROPUP)&&(t(this._menu).hasClass(u.MENULEFT)||t(this._menu).hasClass(u.MENURIGHT))&&(r=e),this._popper=new Popper(r,this._menu,this._getPopperConfig()),"ontouchstart"in document.documentElement&&!t(e).closest(d.NAVBAR_NAV).length&&t("body").children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(u.SHOW),t(e).toggleClass(u.SHOW).trigger(t.Event(c.SHOWN,i))}}}},l.prototype.dispose=function(){t.removeData(this._element,s),t(this._element).off(a),this._element=null,this._menu=null,null!==this._popper&&this._popper.destroy(),this._popper=null},l.prototype.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},l.prototype._addEventListeners=function(){var e=this;t(this._element).on(c.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},l.prototype._getConfig=function(n){var i=t(this._element).data();return void 0!==i.placement&&(i.placement=f[i.placement.toUpperCase()]),n=t.extend({},this.constructor.Default,t(this._element).data(),n),r.typeCheckConfig(e,n,this.constructor.DefaultType),n},l.prototype._getMenuElement=function(){if(!this._menu){var e=l._getParentFromElement(this._element);this._menu=t(e).find(d.MENU)[0]}return this._menu},l.prototype._getPlacement=function(){var e=t(this._element).parent(),n=this._config.placement;return e.hasClass(u.DROPUP)||this._config.placement===f.TOP?(n=f.TOP,t(this._menu).hasClass(u.MENURIGHT)&&(n=f.TOPEND)):t(this._menu).hasClass(u.MENURIGHT)&&(n=f.BOTTOMEND),n},l.prototype._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},l.prototype._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:{offset:this._config.offset},flip:{enabled:this._config.flip}}};return this._inNavbar&&(t.modifiers.applyStyle={enabled:!this._inNavbar}),t},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(s),o="object"===(void 0===e?"undefined":i(e))?e:null;if(n||(n=new l(this,o),t(this).data(s,n)),"string"==typeof e){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},l._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=t.makeArray(t(d.DATA_TOGGLE)),i=0;i<n.length;i++){var o=l._getParentFromElement(n[i]),r=t(n[i]).data(s),a={relatedTarget:n[i]};if(r){var h=r._menu;if(t(o).hasClass(u.SHOW)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&t.contains(o,e.target))){var f=t.Event(c.HIDE,a);t(o).trigger(f),f.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),n[i].setAttribute("aria-expanded","false"),t(h).removeClass(u.SHOW),t(o).removeClass(u.SHOW).trigger(t.Event(c.HIDDEN,a)))}}}},l._getParentFromElement=function(e){var n=void 0,i=r.getSelectorFromElement(e);return i&&(n=t(i)[0]),n||e.parentNode},l._dataApiKeydownHandler=function(e){if(!(!h.test(e.which)||/button/i.test(e.target.tagName)&&32===e.which||/input|textarea/i.test(e.target.tagName)||(e.preventDefault(),e.stopPropagation(),this.disabled||t(this).hasClass(u.DISABLED)))){var n=l._getParentFromElement(this),i=t(n).hasClass(u.SHOW);if((i||27===e.which&&32===e.which)&&(!i||27!==e.which&&32!==e.which)){var o=t(n).find(d.VISIBLE_ITEMS).get();if(o.length){var r=o.indexOf(e.target);38===e.which&&r>0&&r--,40===e.which&&r<o.length-1&&r++,r<0&&(r=0),o[r].focus()}}else{if(27===e.which){var s=t(n).find(d.DATA_TOGGLE)[0];t(s).trigger("focus")}t(this).trigger("click")}}},o(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return p}},{key:"DefaultType",get:function(){return _}}]),l}();t(document).on(c.KEYDOWN_DATA_API,d.DATA_TOGGLE,g._dataApiKeydownHandler).on(c.KEYDOWN_DATA_API,d.MENU,g._dataApiKeydownHandler).on(c.CLICK_DATA_API+" "+c.KEYUP_DATA_API,g._clearMenus).on(c.CLICK_DATA_API,d.DATA_TOGGLE,function(e){e.preventDefault(),e.stopPropagation(),g._jQueryInterface.call(t(this),"toggle")}).on(c.CLICK_DATA_API,d.FORM_CHILD,function(t){t.stopPropagation()}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=l,g._jQueryInterface}}(jQuery),function(t){var e="modal",s=".bs.modal",a=t.fn[e],l={backdrop:!0,keyboard:!0,focus:!0,show:!0},h={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},c={HIDE:"hide.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},u={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},d={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},f=function(){function a(e,i){n(this,a),this._config=this._getConfig(i),this._element=e,this._dialog=t(e).find(d.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return a.prototype.toggle=function(t){return this._isShown?this.hide():this.show(t)},a.prototype.show=function(e){var n=this;if(!this._isTransitioning){r.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE)&&(this._isTransitioning=!0);var i=t.Event(c.SHOW,{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),t(document.body).addClass(u.OPEN),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(c.CLICK_DISMISS,d.DATA_DISMISS,function(t){return n.hide(t)}),t(this._dialog).on(c.MOUSEDOWN_DISMISS,function(){t(n._element).one(c.MOUSEUP_DISMISS,function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(e)}))}},a.prototype.hide=function(e){var n=this;if(e&&e.preventDefault(),!this._isTransitioning&&this._isShown){var i=r.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE);i&&(this._isTransitioning=!0);var o=t.Event(c.HIDE);t(this._element).trigger(o),this._isShown&&!o.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),t(document).off(c.FOCUSIN),t(this._element).removeClass(u.SHOW),t(this._element).off(c.CLICK_DISMISS),t(this._dialog).off(c.MOUSEDOWN_DISMISS),i?t(this._element).one(r.TRANSITION_END,function(t){return n._hideModal(t)}).emulateTransitionEnd(300):this._hideModal())}},a.prototype.dispose=function(){t.removeData(this._element,"bs.modal"),t(window,document,this._element,this._backdrop).off(s),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},a.prototype.handleUpdate=function(){this._adjustDialog()},a.prototype._getConfig=function(n){return n=t.extend({},l,n),r.typeCheckConfig(e,n,h),n},a.prototype._showElement=function(e){var n=this,i=r.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&r.reflow(this._element),t(this._element).addClass(u.SHOW),this._config.focus&&this._enforceFocus();var o=t.Event(c.SHOWN,{relatedTarget:e}),s=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,t(n._element).trigger(o)};i?t(this._dialog).one(r.TRANSITION_END,s).emulateTransitionEnd(300):s()},a.prototype._enforceFocus=function(){var e=this;t(document).off(c.FOCUSIN).on(c.FOCUSIN,function(n){document===n.target||e._element===n.target||t(e._element).has(n.target).length||e._element.focus()})},a.prototype._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(c.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||t(this._element).off(c.KEYDOWN_DISMISS)},a.prototype._setResizeEvent=function(){var e=this;this._isShown?t(window).on(c.RESIZE,function(t){return e.handleUpdate(t)}):t(window).off(c.RESIZE)},a.prototype._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass(u.OPEN),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(c.HIDDEN)})},a.prototype._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},a.prototype._showBackdrop=function(e){var n=this,i=t(this._element).hasClass(u.FADE)?u.FADE:"";if(this._isShown&&this._config.backdrop){var o=r.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=u.BACKDROP,i&&t(this._backdrop).addClass(i),t(this._backdrop).appendTo(document.body),t(this._element).on(c.CLICK_DISMISS,function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide())}),o&&r.reflow(this._backdrop),t(this._backdrop).addClass(u.SHOW),!e)return;if(!o)return void e();t(this._backdrop).one(r.TRANSITION_END,e).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(u.SHOW);var s=function(){n._removeBackdrop(),e&&e()};r.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE)?t(this._backdrop).one(r.TRANSITION_END,s).emulateTransitionEnd(150):s()}else e&&e()},a.prototype._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},a.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},a.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},a.prototype._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){t(d.FIXED_CONTENT).each(function(n,i){var o=t(i)[0].style.paddingRight,r=t(i).css("padding-right");t(i).data("padding-right",o).css("padding-right",parseFloat(r)+e._scrollbarWidth+"px")}),t(d.NAVBAR_TOGGLER).each(function(n,i){var o=t(i)[0].style.marginRight,r=t(i).css("margin-right");t(i).data("margin-right",o).css("margin-right",parseFloat(r)+e._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=t("body").css("padding-right");t("body").data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},a.prototype._resetScrollbar=function(){t(d.FIXED_CONTENT).each(function(e,n){var i=t(n).data("padding-right");void 0!==i&&t(n).css("padding-right",i).removeData("padding-right")}),t(d.NAVBAR_TOGGLER).each(function(e,n){var i=t(n).data("margin-right");void 0!==i&&t(n).css("margin-right",i).removeData("margin-right")});var e=t("body").data("padding-right");void 0!==e&&t("body").css("padding-right",e).removeData("padding-right")},a.prototype._getScrollbarWidth=function(){var t=document.createElement("div");t.className=u.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},a._jQueryInterface=function(e,n){return this.each(function(){var o=t(this).data("bs.modal"),r=t.extend({},a.Default,t(this).data(),"object"===(void 0===e?"undefined":i(e))&&e);if(o||(o=new a(this,r),t(this).data("bs.modal",o)),"string"==typeof e){if(void 0===o[e])throw new Error('No method named "'+e+'"');o[e](n)}else r.show&&o.show(n)})},o(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return l}}]),a}();t(document).on(c.CLICK_DATA_API,d.DATA_TOGGLE,function(e){var n=this,i=void 0,o=r.getSelectorFromElement(this);o&&(i=t(o)[0]);var s=t(i).data("bs.modal")?"toggle":t.extend({},t(i).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var a=t(i).one(c.SHOW,function(e){e.isDefaultPrevented()||a.one(c.HIDDEN,function(){t(n).is(":visible")&&n.focus()})});f._jQueryInterface.call(t(i),s,this)}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=a,f._jQueryInterface}}(jQuery),function(t){var e="scrollspy",s=t.fn[e],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},h={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},c={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},u={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},d={OFFSET:"offset",POSITION:"position"},f=function(){function s(e,i){var o=this;n(this,s),this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(i),this._selector=this._config.target+" "+u.NAV_LINKS+","+this._config.target+" "+u.LIST_ITEMS+","+this._config.target+" "+u.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(h.SCROLL,function(t){return o._process(t)}),this.refresh(),this._process()}return s.prototype.refresh=function(){var e=this,n=this._scrollElement!==this._scrollElement.window?d.POSITION:d.OFFSET,i="auto"===this._config.method?n:this._config.method,o=i===d.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n=void 0,s=r.getSelectorFromElement(e);if(s&&(n=t(s)[0]),n){var a=n.getBoundingClientRect();if(a.width||a.height)return[t(n)[i]().top+o,s]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},s.prototype.dispose=function(){t.removeData(this._element,"bs.scrollspy"),t(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},s.prototype._getConfig=function(n){if("string"!=typeof(n=t.extend({},a,n)).target){var i=t(n.target).attr("id");i||(i=r.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return r.typeCheckConfig(e,n,l),n},s.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},s.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},s.prototype._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},s.prototype._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}},s.prototype._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",");n=n.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var i=t(n.join(","));i.hasClass(c.DROPDOWN_ITEM)?(i.closest(u.DROPDOWN).find(u.DROPDOWN_TOGGLE).addClass(c.ACTIVE),i.addClass(c.ACTIVE)):(i.addClass(c.ACTIVE),i.parents(u.NAV_LIST_GROUP).prev(u.NAV_LINKS+", "+u.LIST_ITEMS).addClass(c.ACTIVE)),t(this._scrollElement).trigger(h.ACTIVATE,{relatedTarget:e})},s.prototype._clear=function(){t(this._selector).filter(u.ACTIVE).removeClass(c.ACTIVE)},s._jQueryInterface=function(e){return this.each(function(){var n=t(this).data("bs.scrollspy"),o="object"===(void 0===e?"undefined":i(e))&&e;if(n||(n=new s(this,o),t(this).data("bs.scrollspy",n)),"string"==typeof e){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},o(s,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return a}}]),s}();t(window).on(h.LOAD_DATA_API,function(){for(var e=t.makeArray(t(u.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);f._jQueryInterface.call(i,i.data())}}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=s,f._jQueryInterface}}(jQuery),function(t){var e=t.fn.tab,i={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},s={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},a={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},l=function(){function e(t){n(this,e),this._element=t}return e.prototype.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(s.ACTIVE)||t(this._element).hasClass(s.DISABLED))){var n=void 0,o=void 0,l=t(this._element).closest(a.NAV_LIST_GROUP)[0],h=r.getSelectorFromElement(this._element);l&&(o=t.makeArray(t(l).find(a.ACTIVE)),o=o[o.length-1]);var c=t.Event(i.HIDE,{relatedTarget:this._element}),u=t.Event(i.SHOW,{relatedTarget:o});if(o&&t(o).trigger(c),t(this._element).trigger(u),!u.isDefaultPrevented()&&!c.isDefaultPrevented()){h&&(n=t(h)[0]),this._activate(this._element,l);var d=function(){var n=t.Event(i.HIDDEN,{relatedTarget:e._element}),r=t.Event(i.SHOWN,{relatedTarget:o});t(o).trigger(n),t(e._element).trigger(r)};n?this._activate(n,n.parentNode,d):d()}}},e.prototype.dispose=function(){t.removeData(this._element,"bs.tab"),this._element=null},e.prototype._activate=function(e,n,i){var o=this,l=t(n).find(a.ACTIVE)[0],h=i&&r.supportsTransitionEnd()&&l&&t(l).hasClass(s.FADE),c=function(){return o._transitionComplete(e,l,h,i)};l&&h?t(l).one(r.TRANSITION_END,c).emulateTransitionEnd(150):c(),l&&t(l).removeClass(s.SHOW)},e.prototype._transitionComplete=function(e,n,i,o){if(n){t(n).removeClass(s.ACTIVE);var l=t(n.parentNode).find(a.DROPDOWN_ACTIVE_CHILD)[0];l&&t(l).removeClass(s.ACTIVE),n.setAttribute("aria-expanded",!1)}if(t(e).addClass(s.ACTIVE),e.setAttribute("aria-expanded",!0),i?(r.reflow(e),t(e).addClass(s.SHOW)):t(e).removeClass(s.FADE),e.parentNode&&t(e.parentNode).hasClass(s.DROPDOWN_MENU)){var h=t(e).closest(a.DROPDOWN)[0];h&&t(h).find(a.DROPDOWN_TOGGLE).addClass(s.ACTIVE),e.setAttribute("aria-expanded",!0)}o&&o()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data("bs.tab");if(o||(o=new e(this),i.data("bs.tab",o)),"string"==typeof n){if(void 0===o[n])throw new Error('No method named "'+n+'"');o[n]()}})},o(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),e}();t(document).on(i.CLICK_DATA_API,a.DATA_TOGGLE,function(e){e.preventDefault(),l._jQueryInterface.call(t(this),"show")}),t.fn.tab=l._jQueryInterface,t.fn.tab.Constructor=l,t.fn.tab.noConflict=function(){return t.fn.tab=e,l._jQueryInterface}}(jQuery),function(t){if("undefined"==typeof Popper)throw new Error("Bootstrap tooltips require Popper.js (https://popper.js.org)");var e="tooltip",s=".bs.tooltip",a=t.fn[e],l=new RegExp("(^|\\s)bs-tooltip\\S+","g"),h={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)"},c={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},u={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip"},d={SHOW:"show",OUT:"out"},f={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,INSERTED:"inserted"+s,CLICK:"click"+s,FOCUSIN:"focusin"+s,FOCUSOUT:"focusout"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s},p={FADE:"fade",SHOW:"show"},_={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},g={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},m=function(){function a(t,e){n(this,a),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return a.prototype.enable=function(){this._isEnabled=!0},a.prototype.disable=function(){this._isEnabled=!1},a.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},a.prototype.toggle=function(e){if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(p.SHOW))return void this._leave(null,this);this._enter(null,this)}},a.prototype.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},a.prototype.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var o=this.getTipElement(),s=r.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&t(o).addClass(p.FADE);var l="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var c=!1===this.config.container?document.body:t(this.config.container);t(o).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(o).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Popper(this.element,o,{placement:h,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:_.ARROW}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(o).addClass(p.SHOW),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var u=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d.OUT&&e._leave(null,e)};r.supportsTransitionEnd()&&t(this.tip).hasClass(p.FADE)?t(this.tip).one(r.TRANSITION_END,u).emulateTransitionEnd(a._TRANSITION_DURATION):u()}},a.prototype.hide=function(e){var n=this,i=this.getTipElement(),o=t.Event(this.constructor.Event.HIDE),s=function(){n._hoverState!==d.SHOW&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(o),o.isDefaultPrevented()||(t(i).removeClass(p.SHOW),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[g.CLICK]=!1,this._activeTrigger[g.FOCUS]=!1,this._activeTrigger[g.HOVER]=!1,r.supportsTransitionEnd()&&t(this.tip).hasClass(p.FADE)?t(i).one(r.TRANSITION_END,s).emulateTransitionEnd(150):s(),this._hoverState="")},a.prototype.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},a.prototype.isWithContent=function(){return Boolean(this.getTitle())},a.prototype.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},a.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},a.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(_.TOOLTIP_INNER),this.getTitle()),e.removeClass(p.FADE+" "+p.SHOW)},a.prototype.setElementContent=function(e,n){var o=this.config.html;"object"===(void 0===n?"undefined":i(n))&&(n.nodeType||n.jquery)?o?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[o?"html":"text"](n)},a.prototype.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},a.prototype._getAttachment=function(t){return c[t.toUpperCase()]},a.prototype._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==g.MANUAL){var i=n===g.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,o=n===g.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(o,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},a.prototype._fixTitle=function(){var t=i(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},a.prototype._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?g.FOCUS:g.HOVER]=!0),t(n.getTipElement()).hasClass(p.SHOW)||n._hoverState===d.SHOW?n._hoverState=d.SHOW:(clearTimeout(n._timeout),n._hoverState=d.SHOW,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===d.SHOW&&n.show()},n.config.delay.show):n.show())},a.prototype._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?g.FOCUS:g.HOVER]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=d.OUT,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===d.OUT&&n.hide()},n.config.delay.hide):n.hide())},a.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},a.prototype._getConfig=function(n){return(n=t.extend({},this.constructor.Default,t(this.element).data(),n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.title&&"number"==typeof n.title&&(n.title=n.title.toString()),n.content&&"number"==typeof n.content&&(n.content=n.content.toString()),r.typeCheckConfig(e,n,this.constructor.DefaultType),n},a.prototype._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},a.prototype._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(l);null!==n&&n.length>0&&e.removeClass(n.join(""))},a.prototype._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},a.prototype._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(p.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data("bs.tooltip"),o="object"===(void 0===e?"undefined":i(e))&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new a(this,o),t(this).data("bs.tooltip",n)),"string"==typeof e)){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},o(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return f}},{key:"EVENT_KEY",get:function(){return s}},{key:"DefaultType",get:function(){return h}}]),a}();return t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=a,m._jQueryInterface},m}(jQuery));!function(r){var a="popover",l=".bs.popover",h=r.fn[a],c=new RegExp("(^|\\s)bs-popover\\S+","g"),u=r.extend({},s.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),d=r.extend({},s.DefaultType,{content:"(string|element|function)"}),f={FADE:"fade",SHOW:"show"},p={TITLE:".popover-header",CONTENT:".popover-body"},_={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,INSERTED:"inserted"+l,CLICK:"click"+l,FOCUSIN:"focusin"+l,FOCUSOUT:"focusout"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l},g=function(s){function h(){return n(this,h),t(this,s.apply(this,arguments))}return e(h,s),h.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},h.prototype.addAttachmentClass=function(t){r(this.getTipElement()).addClass("bs-popover-"+t)},h.prototype.getTipElement=function(){return this.tip=this.tip||r(this.config.template)[0]},h.prototype.setContent=function(){var t=r(this.getTipElement());this.setElementContent(t.find(p.TITLE),this.getTitle()),this.setElementContent(t.find(p.CONTENT),this._getContent()),t.removeClass(f.FADE+" "+f.SHOW)},h.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},h.prototype._cleanTipClass=function(){var t=r(this.getTipElement()),e=t.attr("class").match(c);null!==e&&e.length>0&&t.removeClass(e.join(""))},h._jQueryInterface=function(t){return this.each(function(){var e=r(this).data("bs.popover"),n="object"===(void 0===t?"undefined":i(t))?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new h(this,n),r(this).data("bs.popover",e)),"string"==typeof t)){if(void 0===e[t])throw new Error('No method named "'+t+'"');e[t]()}})},o(h,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return a}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return l}},{key:"DefaultType",get:function(){return d}}]),h}(s);r.fn[a]=g._jQueryInterface,r.fn[a].Constructor=g,r.fn[a].noConflict=function(){return r.fn[a]=h,g._jQueryInterface}}(jQuery)}(); 7 | -------------------------------------------------------------------------------- /docs/example_dashboard/assets/js/core/popper.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) Federico Zivolo 2017 3 | Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). 4 | */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=window.getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e||-1!==['HTML','BODY','#document'].indexOf(e.nodeName))return window.document.body;var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:window.document.documentElement}function p(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return window.document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var f=a.commonAncestorContainer;if(e!==f&&t!==f||i.contains(n))return p(f)?f:r(f);var l=s(e);return l.host?d(l.host,t):d(e,s(t).host)}function a(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',i=e.nodeName;if('BODY'===i||'HTML'===i){var n=window.document.documentElement,r=window.document.scrollingElement||n;return r[o]}return e[o]}function f(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=a(t,'top'),n=a(t,'left'),r=o?-1:1;return e.top+=i*r,e.bottom+=i*r,e.left+=n*r,e.right+=n*r,e}function l(e,t){var o='x'===t?'Left':'Top',i='Left'==o?'Right':'Bottom';return+e['border'+o+'Width'].split('px')[0]+ +e['border'+i+'Width'].split('px')[0]}function m(e,t,o,i){return _(t['offset'+e],o['client'+e],o['offset'+e],ie()?o['offset'+e]+i['margin'+('Height'===e?'Top':'Left')]+i['margin'+('Height'===e?'Bottom':'Right')]:0)}function h(){var e=window.document.body,t=window.document.documentElement,o=ie()&&window.getComputedStyle(t);return{height:m('Height',e,t,o),width:m('Width',e,t,o)}}function c(e){return se({},e,{right:e.left+e.width,bottom:e.top+e.height})}function g(e){var o={};if(ie())try{o=e.getBoundingClientRect();var i=a(e,'top'),n=a(e,'left');o.top+=i,o.left+=n,o.bottom+=i,o.right+=n}catch(e){}else o=e.getBoundingClientRect();var r={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},p='HTML'===e.nodeName?h():{},s=p.width||e.clientWidth||r.right-r.left,d=p.height||e.clientHeight||r.bottom-r.top,f=e.offsetWidth-s,m=e.offsetHeight-d;if(f||m){var g=t(e);f-=l(g,'x'),m-=l(g,'y'),r.width-=f,r.height-=m}return c(r)}function u(e,o){var i=ie(),r='HTML'===o.nodeName,p=g(e),s=g(o),d=n(e),a=t(o),l=+a.borderTopWidth.split('px')[0],m=+a.borderLeftWidth.split('px')[0],h=c({top:p.top-s.top-l,left:p.left-s.left-m,width:p.width,height:p.height});if(h.marginTop=0,h.marginLeft=0,!i&&r){var u=+a.marginTop.split('px')[0],b=+a.marginLeft.split('px')[0];h.top-=l-u,h.bottom-=l-u,h.left-=m-b,h.right-=m-b,h.marginTop=u,h.marginLeft=b}return(i?o.contains(d):o===d&&'BODY'!==d.nodeName)&&(h=f(h,o)),h}function b(e){var t=window.document.documentElement,o=u(e,t),i=_(t.clientWidth,window.innerWidth||0),n=_(t.clientHeight,window.innerHeight||0),r=a(t),p=a(t,'left'),s={top:r-o.top+o.marginTop,left:p-o.left+o.marginLeft,width:i,height:n};return c(s)}function y(e){var i=e.nodeName;return'BODY'===i||'HTML'===i?!1:'fixed'===t(e,'position')||y(o(e))}function w(e,t,i,r){var p={top:0,left:0},s=d(e,t);if('viewport'===r)p=b(s);else{var a;'scrollParent'===r?(a=n(o(e)),'BODY'===a.nodeName&&(a=window.document.documentElement)):'window'===r?a=window.document.documentElement:a=r;var f=u(a,s);if('HTML'===a.nodeName&&!y(s)){var l=h(),m=l.height,c=l.width;p.top+=f.top-f.marginTop,p.bottom=m+f.top,p.left+=f.left-f.marginLeft,p.right=c+f.left}else p=f}return p.left+=i,p.top+=i,p.right-=i,p.bottom-=i,p}function v(e){var t=e.width,o=e.height;return t*o}function E(e,t,o,i,n){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var p=w(o,i,r,n),s={top:{width:p.width,height:t.top-p.top},right:{width:p.right-t.right,height:p.height},bottom:{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-p.left,height:p.height}},d=Object.keys(s).map(function(e){return se({key:e},s[e],{area:v(s[e])})}).sort(function(e,t){return t.area-e.area}),a=d.filter(function(e){var t=e.width,i=e.height;return t>=o.clientWidth&&i>=o.clientHeight}),f=0<a.length?a[0].key:d[0].key,l=e.split('-')[1];return f+(l?'-'+l:'')}function x(e,t,o){var i=d(t,o);return u(o,i)}function O(e){var t=window.getComputedStyle(e),o=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight),n={width:e.offsetWidth+i,height:e.offsetHeight+o};return n}function L(e){var t={left:'right',right:'left',bottom:'top',top:'bottom'};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function S(e,t,o){o=o.split('-')[0];var i=O(e),n={width:i.width,height:i.height},r=-1!==['right','left'].indexOf(o),p=r?'top':'left',s=r?'left':'top',d=r?'height':'width',a=r?'width':'height';return n[p]=t[p]+t[d]/2-i[d]/2,n[s]=o===s?t[s]-i[a]:t[L(s)],n}function T(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function C(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var i=T(e,function(e){return e[t]===o});return e.indexOf(i)}function N(t,o,i){var n=void 0===i?t:t.slice(0,C(t,'name',i));return n.forEach(function(t){t.function&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var i=t.function||t.fn;t.enabled&&e(i)&&(o.offsets.popper=c(o.offsets.popper),o.offsets.reference=c(o.offsets.reference),o=i(o,t))}),o}function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=x(this.state,this.popper,this.reference),e.placement=E(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=S(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position='absolute',e=N(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some(function(e){var o=e.name,i=e.enabled;return i&&o===t})}function B(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length-1;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof window.document.body.style[r])return r}return null}function D(){return this.state.isDestroyed=!0,W(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[B('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function H(e,t,o,i){var r='BODY'===e.nodeName,p=r?window:e;p.addEventListener(t,o,{passive:!0}),r||H(n(p.parentNode),t,o,i),i.push(p)}function P(e,t,o,i){o.updateBound=i,window.addEventListener('resize',o.updateBound,{passive:!0});var r=n(e);return H(r,'scroll',o.updateBound,o.scrollParents),o.scrollElement=r,o.eventsEnabled=!0,o}function A(){this.state.eventsEnabled||(this.state=P(this.reference,this.options,this.state,this.scheduleUpdate))}function M(e,t){return window.removeEventListener('resize',t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function I(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=M(this.reference,this.state))}function R(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function U(e,t){Object.keys(t).forEach(function(o){var i='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&R(t[o])&&(i='px'),e.style[o]=t[o]+i})}function Y(e,t){Object.keys(t).forEach(function(o){var i=t[o];!1===i?e.removeAttribute(o):e.setAttribute(o,t[o])})}function F(e,t,o){var i=T(e,function(e){var o=e.name;return o===t}),n=!!i&&e.some(function(e){return e.name===o&&e.enabled&&e.order<i.order});if(!n){var r='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+r+' modifier in order to work, be sure to include it before '+r+'!')}return n}function j(e){return'end'===e?'start':'start'===e?'end':e}function K(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=ae.indexOf(e),i=ae.slice(o+1).concat(ae.slice(0,o));return t?i.reverse():i}function q(e,t,o,i){var n=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+n[1],p=n[2];if(!r)return e;if(0===p.indexOf('%')){var s;switch(p){case'%p':s=o;break;case'%':case'%r':default:s=i;}var d=c(s);return d[t]/100*r}if('vh'===p||'vw'===p){var a;return a='vh'===p?_(document.documentElement.clientHeight,window.innerHeight||0):_(document.documentElement.clientWidth,window.innerWidth||0),a/100*r}return r}function G(e,t,o,i){var n=[0,0],r=-1!==['right','left'].indexOf(i),p=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=p.indexOf(T(p,function(e){return-1!==e.search(/,|\s/)}));p[s]&&-1===p[s].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var d=/\s*,\s*|\s+/,a=-1===s?[p]:[p.slice(0,s).concat([p[s].split(d)[0]]),[p[s].split(d)[1]].concat(p.slice(s+1))];return a=a.map(function(e,i){var n=(1===i?!r:r)?'height':'width',p=!1;return e.reduce(function(e,t){return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?(e[e.length-1]+=t,p=!1,e):e.concat(t)},[]).map(function(e){return q(e,n,t,o)})}),a.forEach(function(e,t){e.forEach(function(o,i){R(o)&&(n[t]+=o*('-'===e[i-1]?-1:1))})}),n}for(var z=Math.min,V=Math.floor,_=Math.max,X=['native code','[object MutationObserverConstructor]'],Q=function(e){return X.some(function(t){return-1<(e||'').toString().indexOf(t)})},J='undefined'!=typeof window,Z=['Edge','Trident','Firefox'],$=0,ee=0;ee<Z.length;ee+=1)if(J&&0<=navigator.userAgent.indexOf(Z[ee])){$=1;break}var i,te=J&&Q(window.MutationObserver),oe=te?function(e){var t=!1,o=0,i=document.createElement('span'),n=new MutationObserver(function(){e(),t=!1});return n.observe(i,{attributes:!0}),function(){t||(t=!0,i.setAttribute('x-index',o),++o)}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},$))}},ie=function(){return void 0==i&&(i=-1!==navigator.appVersion.indexOf('MSIE 10')),i},ne=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},re=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),pe=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},se=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},de=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'],ae=de.slice(3),fe={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},le=function(){function t(o,i){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};ne(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=oe(this.update.bind(this)),this.options=se({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=o.jquery?o[0]:o,this.popper=i.jquery?i[0]:i,this.options.modifiers={},Object.keys(se({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=se({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return se({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnabled=p}return re(t,[{key:'update',value:function(){return k.call(this)}},{key:'destroy',value:function(){return D.call(this)}},{key:'enableEventListeners',value:function(){return A.call(this)}},{key:'disableEventListeners',value:function(){return I.call(this)}}]),t}();return le.Utils=('undefined'==typeof window?global:window).PopperUtils,le.placements=de,le.Defaults={placement:'bottom',eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')[0],i=t.split('-')[1];if(i){var n=e.offsets,r=n.reference,p=n.popper,s=-1!==['bottom','top'].indexOf(o),d=s?'left':'top',a=s?'width':'height',f={start:pe({},d,r[d]),end:pe({},d,r[d]+r[a]-p[a])};e.offsets.popper=se({},p,f[i])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var o,i=t.offset,n=e.placement,r=e.offsets,p=r.popper,s=r.reference,d=n.split('-')[0];return o=R(+i)?[+i,0]:G(i,p,s,d),'left'===d?(p.top+=o[0],p.left-=o[1]):'right'===d?(p.top+=o[0],p.left+=o[1]):'top'===d?(p.left+=o[0],p.top-=o[1]):'bottom'===d&&(p.left+=o[0],p.top+=o[1]),e.popper=p,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||r(e.instance.popper);e.instance.reference===o&&(o=r(o));var i=w(e.instance.popper,e.instance.reference,t.padding,o);t.boundaries=i;var n=t.priority,p=e.offsets.popper,s={primary:function(e){var o=p[e];return p[e]<i[e]&&!t.escapeWithReference&&(o=_(p[e],i[e])),pe({},e,o)},secondary:function(e){var o='right'===e?'left':'top',n=p[o];return p[e]>i[e]&&!t.escapeWithReference&&(n=z(p[o],i[e]-('right'===e?p.width:p.height))),pe({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=se({},p,s[t](e))}),e.offsets.popper=p,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=V,p=-1!==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]<r(i[d])&&(e.offsets.popper[d]=r(i[d])-o[a]),o[d]>r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!F(e.instance.modifiers,'arrow','keepTogether'))return e;var o=t.element;if('string'==typeof o){if(o=e.instance.popper.querySelector(o),!o)return e;}else if(!e.instance.popper.contains(o))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var i=e.placement.split('-')[0],n=e.offsets,r=n.popper,p=n.reference,s=-1!==['left','right'].indexOf(i),d=s?'height':'width',a=s?'top':'left',f=s?'left':'top',l=s?'bottom':'right',m=O(o)[d];p[l]-m<r[a]&&(e.offsets.popper[a]-=r[a]-(p[l]-m)),p[a]+m>r[l]&&(e.offsets.popper[a]+=p[a]+m-r[l]);var h=p[a]+p[d]/2-m/2,g=h-c(e.offsets.popper)[a];return g=_(z(r[d]-m,g),0),e.arrowElement=o,e.offsets.arrow={},e.offsets.arrow[a]=Math.round(g),e.offsets.arrow[f]='',e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=w(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=L(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case fe.FLIP:p=[i,n];break;case fe.CLOCKWISE:p=K(i);break;case fe.COUNTERCLOCKWISE:p=K(i,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')[0],n=L(i);var a=e.offsets.popper,f=e.offsets.reference,l=V,m='left'===i&&l(a.right)>l(f.left)||'right'===i&&l(a.left)<l(f.right)||'top'===i&&l(a.bottom)>l(f.top)||'bottom'===i&&l(a.top)<l(f.bottom),h=l(a.left)<l(o.left),c=l(a.right)>l(o.right),g=l(a.top)<l(o.top),u=l(a.bottom)>l(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&g||'bottom'===i&&u,y=-1!==['top','bottom'].indexOf(i),w=!!t.flipVariations&&(y&&'start'===r&&h||y&&'end'===r&&c||!y&&'start'===r&&g||!y&&'end'===r&&u);(m||b||w)&&(e.flipped=!0,(m||b)&&(i=p[d+1]),w&&(r=j(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=se({},e.offsets.popper,S(e.instance.popper,e.offsets.reference,e.placement)),e=N(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return n[p?'left':'top']=r[t]-(s?n[p?'width':'height']:0),e.placement=L(t),e.offsets.popper=c(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=T(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-of-boundaries']=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,i=t.y,n=e.offsets.popper,p=T(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;void 0!==p&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s,d,a=void 0===p?t.gpuAcceleration:p,f=r(e.instance.popper),l=g(f),m={position:n.position},h={left:V(n.left),top:V(n.top),bottom:V(n.bottom),right:V(n.right)},c='bottom'===o?'top':'bottom',u='right'===i?'left':'right',b=B('transform');if(d='bottom'==c?-l.height+h.bottom:h.top,s='right'==u?-l.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[u]=0,m.willChange='transform';else{var y='bottom'==c?-1:1,w='right'==u?-1:1;m[c]=d*y,m[u]=s*w,m.willChange=c+', '+u}var v={"x-placement":e.placement};return e.attributes=se({},v,e.attributes),e.styles=se({},m,e.styles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return U(e.instance.popper,e.styles),Y(e.instance.popper,e.attributes),e.offsets.arrow&&U(e.arrowElement,e.offsets.arrow),e},onLoad:function(e,t,o,i,n){var r=x(n,t,e),p=E(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),U(t,{position:'absolute'}),o},gpuAcceleration:void 0}}},le}); 5 | -------------------------------------------------------------------------------- /docs/example_dashboard/assets/js/light-bootstrap-dashboard.js: -------------------------------------------------------------------------------- 1 | // ========================================================= 2 | // Light Bootstrap Dashboard - v2.0.1 3 | // ========================================================= 4 | // 5 | // Product Page: https://www.creative-tim.com/product/light-bootstrap-dashboard 6 | // Copyright 2019 Creative Tim (https://www.creative-tim.com) 7 | // Licensed under MIT (https://github.com/creativetimofficial/light-bootstrap-dashboard/blob/master/LICENSE) 8 | // 9 | // Coded by Creative Tim 10 | // 11 | // ========================================================= 12 | // 13 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | 15 | var searchVisible = 0; 16 | var transparent = true; 17 | 18 | var transparentDemo = true; 19 | var fixedTop = false; 20 | 21 | var navbar_initialized = false; 22 | var mobile_menu_visible = 0, 23 | mobile_menu_initialized = false, 24 | toggle_initialized = false, 25 | bootstrap_nav_initialized = false, 26 | $sidebar, 27 | isWindows; 28 | 29 | $(document).ready(function() { 30 | window_width = $(window).width(); 31 | 32 | // check if there is an image set for the sidebar's background 33 | lbd.checkSidebarImage(); 34 | 35 | // Init navigation toggle for small screens 36 | if (window_width <= 991) { 37 | lbd.initRightMenu(); 38 | } 39 | 40 | // Activate the tooltips 41 | $('[rel="tooltip"]').tooltip(); 42 | 43 | // Activate regular switches 44 | if ($("[data-toggle='switch']").length != 0) { 45 | $("[data-toggle='switch']").bootstrapSwitch(); 46 | } 47 | 48 | $('.form-control').on("focus", function() { 49 | $(this).parent('.input-group').addClass("input-group-focus"); 50 | }).on("blur", function() { 51 | $(this).parent(".input-group").removeClass("input-group-focus"); 52 | }); 53 | 54 | // Fixes sub-nav not working as expected on IOS 55 | $('body').on('touchstart.dropdown', '.dropdown-menu', function(e) { 56 | e.stopPropagation(); 57 | }); 58 | }); 59 | 60 | // activate collapse right menu when the windows is resized 61 | $(window).resize(function() { 62 | if ($(window).width() <= 991) { 63 | lbd.initRightMenu(); 64 | } 65 | }); 66 | 67 | lbd = { 68 | misc: { 69 | navbar_menu_visible: 0 70 | }, 71 | checkSidebarImage: function() { 72 | $sidebar = $('.sidebar'); 73 | image_src = $sidebar.data('image'); 74 | 75 | if (image_src !== undefined) { 76 | sidebar_container = '<div class="sidebar-background" style="background-image: url(' + image_src + ') "/>' 77 | $sidebar.append(sidebar_container); 78 | } else if (mobile_menu_initialized == true) { 79 | // reset all the additions that we made for the sidebar wrapper only if the screen is bigger than 991px 80 | $sidebar_wrapper.find('.navbar-form').remove(); 81 | $sidebar_wrapper.find('.nav-mobile-menu').remove(); 82 | 83 | mobile_menu_initialized = false; 84 | } 85 | }, 86 | 87 | initRightMenu: function() { 88 | $sidebar_wrapper = $('.sidebar-wrapper'); 89 | 90 | if (!mobile_menu_initialized) { 91 | 92 | $navbar = $('nav').find('.navbar-collapse').first().clone(true); 93 | 94 | nav_content = ''; 95 | mobile_menu_content = ''; 96 | 97 | //add the content from the regular header to the mobile menu 98 | $navbar.children('ul').each(function() { 99 | 100 | content_buff = $(this).html(); 101 | nav_content = nav_content + content_buff; 102 | }); 103 | 104 | nav_content = '<ul class="nav nav-mobile-menu">' + nav_content + '</ul>'; 105 | 106 | $navbar_form = $('nav').find('.navbar-form').clone(true); 107 | 108 | $sidebar_nav = $sidebar_wrapper.find(' > .nav'); 109 | 110 | // insert the navbar form before the sidebar list 111 | $nav_content = $(nav_content); 112 | $nav_content.insertBefore($sidebar_nav); 113 | $navbar_form.insertBefore($nav_content); 114 | 115 | $(".sidebar-wrapper .dropdown .dropdown-menu > li > a").click(function(event) { 116 | event.stopPropagation(); 117 | 118 | }); 119 | 120 | mobile_menu_initialized = true; 121 | } else { 122 | console.log('window with:' + $(window).width()); 123 | if ($(window).width() > 991) { 124 | // reset all the additions that we made for the sidebar wrapper only if the screen is bigger than 991px 125 | $sidebar_wrapper.find('.navbar-form').remove(); 126 | $sidebar_wrapper.find('.nav-mobile-menu').remove(); 127 | 128 | mobile_menu_initialized = false; 129 | } 130 | } 131 | 132 | if (!toggle_initialized) { 133 | $toggle = $('.navbar-toggler'); 134 | 135 | $toggle.click(function() { 136 | 137 | if (mobile_menu_visible == 1) { 138 | $('html').removeClass('nav-open'); 139 | 140 | $('.close-layer').remove(); 141 | setTimeout(function() { 142 | $toggle.removeClass('toggled'); 143 | }, 400); 144 | 145 | mobile_menu_visible = 0; 146 | } else { 147 | setTimeout(function() { 148 | $toggle.addClass('toggled'); 149 | }, 430); 150 | 151 | 152 | main_panel_height = $('.main-panel')[0].scrollHeight; 153 | $layer = $('<div class="close-layer"></div>'); 154 | $layer.css('height', main_panel_height + 'px'); 155 | $layer.appendTo(".main-panel"); 156 | 157 | setTimeout(function() { 158 | $layer.addClass('visible'); 159 | }, 100); 160 | 161 | $layer.click(function() { 162 | $('html').removeClass('nav-open'); 163 | mobile_menu_visible = 0; 164 | 165 | $layer.removeClass('visible'); 166 | 167 | setTimeout(function() { 168 | $layer.remove(); 169 | $toggle.removeClass('toggled'); 170 | 171 | }, 400); 172 | }); 173 | 174 | $('html').addClass('nav-open'); 175 | mobile_menu_visible = 1; 176 | 177 | } 178 | }); 179 | 180 | toggle_initialized = true; 181 | } 182 | } 183 | } 184 | 185 | 186 | 187 | // Returns a function, that, as long as it continues to be invoked, will not 188 | // be triggered. The function will be called after it stops being called for 189 | // N milliseconds. If `immediate` is passed, trigger the function on the 190 | // leading edge, instead of the trailing. 191 | 192 | function debounce(func, wait, immediate) { 193 | var timeout; 194 | return function() { 195 | var context = this, 196 | args = arguments; 197 | clearTimeout(timeout); 198 | timeout = setTimeout(function() { 199 | timeout = null; 200 | if (!immediate) func.apply(context, args); 201 | }, wait); 202 | if (immediate && !timeout) func.apply(context, args); 203 | }; 204 | }; 205 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | flake8-dashboard 2 | ================ 3 | 4 | A flake8 plugin to generate a responsive HTML dashboard summarizing all 5 | the flake8 violations. The resulting dashboard has an easy-to-read 6 | format across a variety of devices and web browsers. 7 | 8 | Installation 9 | ------------ 10 | 11 | If flake8 is not installed, run: 12 | 13 | ``` {.bash} 14 | $ pip install flake8 15 | ``` 16 | 17 | Finally, to install the latest release of the plugin from the Python 18 | Package Index, run: 19 | 20 | ``` {.bash} 21 | $ pip install flake8-dashboard 22 | ``` 23 | 24 | Alternatively, to install the latest development version (master 25 | branch), run: 26 | 27 | ``` {.bash} 28 | $ pip install git+https://github.com/aperezhortal/flake8-dashboard 29 | ``` 30 | 31 | Usage 32 | ----- 33 | 34 | Run flake8 with the `--format=dashboard` option to create a nice-looking 35 | dashboard. 36 | 37 | Options: 38 | 39 | - `--outputdir=<output_dir>`: Directory to save the HTML output 40 | (\"./flake8\_dashboard\" by default). 41 | - `--debug-info`: Write additional debugging information as csv format 42 | (flake8 violations and aggregations). 43 | - `--title=<title>`: Set the dashboard\'s title. No title by default. 44 | 45 | Simple usage example: 46 | 47 | ``` {.bash} 48 | $ flake8 --format=dashboard --outputdir=flake-report --title="My dashboard" 49 | ``` 50 | 51 | ### Demo 52 | 53 | [Check a demo 54 | here!](https://aperezhortal.github.io/flake8-dashboard/example_dashboard/index.html) 55 | 56 | Credits 57 | ------- 58 | 59 | - This package was created using the 60 | [flake8-html](https://github.com/lordmauve/flake8-html) package as a 61 | template. 62 | - The dashboard html page was created using the 63 | [light-bootstrap-dashboard](https://demos.creative-tim.com/light-bootstrap-dashboard/) 64 | template by [Creative Tim](https://www.creative-tim.com/). 65 | - The interactive plots are created using [Plotly 66 | Python](https://plot.ly/python/) . 67 | -------------------------------------------------------------------------------- /flake8_dashboard/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | flake8-dashboard 4 | ================ 5 | 6 | A flake8 plugin to generate a HTML dashboard with all the flake8 violations. 7 | """ 8 | 9 | __version__ = "0.1.4" 10 | 11 | from .plugin import DashboardReporter 12 | 13 | __all__ = ("DashboardReporter",) 14 | -------------------------------------------------------------------------------- /flake8_dashboard/code_description.json: -------------------------------------------------------------------------------- 1 | { 2 | "C": "McCabe complexity", 3 | "C9": "McCabe complexity", 4 | "E": "pep8 error", 5 | "E1": "Indentation", 6 | "E101": "indentation contains mixed spaces and tabs", 7 | "E111": "indentation is not a multiple of four", 8 | "E112": "expected an indented block", 9 | "E113": "unexpected indentation", 10 | "E114": "indentation is not a multiple of four (comment)", 11 | "E115": "expected an indented block (comment)", 12 | "E116": "unexpected indentation (comment)", 13 | "E117": "over-indented", 14 | "E121": "continuation line under-indented for hanging indent", 15 | "E122": "continuation line missing indentation or outdented", 16 | "E123": "closing bracket does not match indentation of opening bracket\u2019s line", 17 | "E124": "closing bracket does not match visual indentation", 18 | "E125": "continuation line with same indent as next logical line", 19 | "E126": "continuation line over-indented for hanging indent", 20 | "E127": "continuation line over-indented for visual indent", 21 | "E128": "continuation line under-indented for visual indent", 22 | "E129": "visually indented line with same indent as next logical line", 23 | "E131": "continuation line unaligned for hanging indent", 24 | "E133": "closing bracket is missing indentation", 25 | "E2": "Whitespace", 26 | "E201": "whitespace after \u2018(\u2018", 27 | "E202": "whitespace before \u2018)\u2019", 28 | "E203": "whitespace before \u2018:\u2019", 29 | "E211": "whitespace before \u2018(\u2018", 30 | "E221": "multiple spaces before operator", 31 | "E222": "multiple spaces after operator", 32 | "E223": "tab before operator", 33 | "E224": "tab after operator", 34 | "E225": "missing whitespace around operator", 35 | "E226": "missing whitespace around arithmetic operator", 36 | "E227": "missing whitespace around bitwise or shift operator", 37 | "E228": "missing whitespace around modulo operator", 38 | "E231": "missing whitespace after \u2018,\u2019, \u2018;\u2019, or \u2018:\u2019", 39 | "E241": "multiple spaces after \u2018,\u2019", 40 | "E242": "tab after \u2018,\u2019", 41 | "E251": "unexpected spaces around keyword / parameter equals", 42 | "E261": "at least two spaces before inline comment", 43 | "E262": "inline comment should start with \u2018# \u2018", 44 | "E265": "block comment should start with \u2018# \u2018", 45 | "E266": "too many leading \u2018#\u2019 for block comment", 46 | "E271": "multiple spaces after keyword", 47 | "E272": "multiple spaces before keyword", 48 | "E273": "tab after keyword", 49 | "E274": "tab before keyword", 50 | "E275": "missing whitespace after keyword", 51 | "E3": "Blank line", 52 | "E301": "expected 1 blank line, found 0", 53 | "E302": "expected 2 blank lines, found 0", 54 | "E303": "too many blank lines (3)", 55 | "E304": "blank lines found after function decorator", 56 | "E305": "expected 2 blank lines after end of function or class", 57 | "E306": "expected 1 blank line before a nested definition", 58 | "E4": "Import", 59 | "E401": "multiple imports on one line", 60 | "E402": "module level import not at top of file", 61 | "E5": "Line length", 62 | "E501": "line too long (82 > 79 characters)", 63 | "E502": "the backslash is redundant between brackets", 64 | "E7": "Statement", 65 | "E701": "multiple statements on one line (colon)", 66 | "E702": "multiple statements on one line (semicolon)", 67 | "E703": "statement ends with a semicolon", 68 | "E704": "multiple statements on one line (def)", 69 | "E711": "comparison to None should be \u2018if cond is None:\u2019", 70 | "E712": "comparison to True should be \u2018if cond is True:\u2019 or \u2018if cond:\u2019", 71 | "E713": "test for membership should be \u2018not in\u2019", 72 | "E714": "test for object identity should be \u2018is not\u2019", 73 | "E721": "do not compare types, use \u2018isinstance()\u2019", 74 | "E722": "do not use bare except, specify exception instead", 75 | "E731": "do not assign a lambda expression, use a def", 76 | "E741": "do not use variables named \u2018l\u2019, \u2018O\u2019, or \u2018I\u2019", 77 | "E742": "do not define classes named \u2018l\u2019, \u2018O\u2019, or \u2018I\u2019", 78 | "E743": "do not define functions named \u2018l\u2019, \u2018O\u2019, or \u2018I\u2019", 79 | "E9": "Runtime", 80 | "E901": "SyntaxError or IndentationError", 81 | "E902": "IOError", 82 | "F": "pyFlakes", 83 | "F401": "module imported but unused", 84 | "F402": "import module from line N shadowed by loop variable", 85 | "F403": "\u2018from module import *\u2019 used; unable to detect undefined names", 86 | "F404": "future import(s) name after other statements", 87 | "F405": "name may be undefined, or defined from star imports: module", 88 | "F406": "\u2018from module import *\u2019 only allowed at module level", 89 | "F407": "an undefined __future__ feature name was imported", 90 | "F601": "dictionary key name repeated with different values", 91 | "F602": "dictionary key variable name repeated with different values", 92 | "F621": "too many expressions in an assignment with star-unpacking", 93 | "F622": "two or more starred expressions in an assignment (a, *b, *c = d)", 94 | "F631": "assertion test is a tuple, which are always True", 95 | "F632": "use ==/!= to compare str, bytes, and int literals", 96 | "F633": "assertion test is a tuple, which are always True", 97 | "F701": "a break statement outside of a while or for loop", 98 | "F702": "a continue statement outside of a while or for loop", 99 | "F703": "a continue statement in a finally block in a loop", 100 | "F704": "a yield or yield from statement outside of a function", 101 | "F705": "a return statement with arguments inside a generator", 102 | "F706": "a return statement outside of a function/method", 103 | "F707": "an except: block as not the last exception handler", 104 | "F721": "syntax error in doctest", 105 | "F722": "syntax error in forward annotation", 106 | "F723": "syntax error in type comment", 107 | "F811": "redefinition of unused name from line N", 108 | "F812": "list comprehension redefines name from line N", 109 | "F821": "undefined name name", 110 | "F822": "undefined name name in __all__", 111 | "F823": "local variable name \u2026 referenced before assignment", 112 | "F831": "duplicate argument name in function definition", 113 | "F841": "local variable name is assigned to but never used", 114 | "F901": "raise NotImplemented should be raise NotImplementedError", 115 | "N8": "Naming convention", 116 | "N801": "class names should use CapWords convention", 117 | "N802": "function name should be lowercase", 118 | "N803": "argument name should be lowercase", 119 | "N804": "first argument of a classmethod should be named 'cls'", 120 | "N805": "first argument of a method should be named 'self'", 121 | "N806": "variable in function should be lowercase", 122 | "N807": "function name should not start and end with '__'", 123 | "N811": "constant imported as non constant", 124 | "N812": "lowercase imported as non lowercase", 125 | "N813": "camelcase imported as lowercase", 126 | "N814": "camelcase imported as constant", 127 | "N815": "mixedCase variable in class scope", 128 | "N816": "mixedCase variable in global scope", 129 | "W": "pep8 warning", 130 | "W1": "Indentation warning", 131 | "W191": "indentation contains tabs", 132 | "W2": "Whitespace warning", 133 | "W291": "trailing whitespace", 134 | "W292": "no newline at end of file", 135 | "W293": "blank line contains whitespace", 136 | "W3": "Blank line warning", 137 | "W391": "blank line at end of file", 138 | "W5": "Line break warning", 139 | "W503": "line break before binary operator", 140 | "W504": "line break after binary operator", 141 | "W505": "doc line too long (82 > 79 characters)", 142 | "W6": "Deprecation warning", 143 | "W601": ".has_key() is deprecated, use \u2018in\u2019", 144 | "W602": "deprecated form of raising exception", 145 | "W603": "\u2018<>\u2019 is deprecated, use \u2018!=\u2019", 146 | "W604": "backticks are deprecated, use \u2018repr()\u2019", 147 | "W605": "invalid escape sequence \u2018x\u2019", 148 | "W606": "\u2018async\u2019 and \u2018await\u2019 are reserved keywords starting with Python 3.7" 149 | } -------------------------------------------------------------------------------- /flake8_dashboard/plugin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """A plugin for flake8 to generate HTML dashboard reports.""" 3 | from collections import defaultdict 4 | 5 | import codecs 6 | import itertools 7 | import json 8 | import os 9 | import pandas 10 | import plotly 11 | from bs4 import BeautifulSoup 12 | from distutils import dir_util 13 | from flake8.formatting import base 14 | from jinja2 import Environment, PackageLoader 15 | from jsmin import jsmin 16 | from pathlib import PurePath 17 | 18 | from flake8_dashboard.utils import ( 19 | full_split, 20 | create_dir, 21 | ASTWalker, 22 | map_values_to_cmap, 23 | relative_path, 24 | ) 25 | 26 | jinja2_env = Environment(loader=PackageLoader("flake8_dashboard")) 27 | 28 | # A sequence of error code prefixes 29 | # The first matching prefix determines the severity 30 | 31 | SEVERITY_ORDER = [("E9", 1), ("F", 1), ("E", 2), ("W", 2), ("C", 2), ("D", 3)] 32 | DEFAULT_SEVERITY = 3 33 | 34 | SEVERITY_NAMES = dict() 35 | SEVERITY_NAMES[1] = "High" 36 | SEVERITY_NAMES[2] = "Medium" 37 | SEVERITY_NAMES[3] = "Low" 38 | 39 | # red, blue, green 40 | SEVERITY_COLORS = dict(High="#EF553B", Medium="#636EFA", Low="#00CC96") 41 | 42 | SEVERITY_DESCRIPTION = dict() 43 | SEVERITY_DESCRIPTION[1] = "SyntaxError, IndentationError, IOError, and PyFlakes errors" 44 | SEVERITY_DESCRIPTION[2] = "Pep8 and McCabe complexity errors" 45 | SEVERITY_DESCRIPTION[3] = "Docstrings format errors" 46 | 47 | 48 | def find_severity(code): 49 | """Given a flake8-style error code, return an ordinal severity.""" 50 | for prefix, sev in SEVERITY_ORDER: 51 | if code.startswith(prefix): 52 | return sev 53 | return DEFAULT_SEVERITY 54 | 55 | 56 | class DashboardReporter(base.BaseFormatter): 57 | """A plugin for flake8 to render errors as HTML reports.""" 58 | 59 | name = "DashboardReporter" 60 | 61 | def format(self, error): 62 | pass 63 | 64 | def __init__(self, *args, **kwargs): 65 | """ Initialize the formatter.""" 66 | super().__init__(*args, **kwargs) 67 | 68 | self.html_output_dir = self.options.outputdir 69 | 70 | create_dir(self.html_output_dir) 71 | 72 | self.errors = [] 73 | self.files_analized = 0 74 | 75 | self.code_description = defaultdict(lambda: "") 76 | code_descriptoion_file = os.path.join( 77 | os.path.dirname(__file__), "code_description.json" 78 | ) 79 | with open(code_descriptoion_file) as json_file: 80 | self.code_description.update(json.load(json_file)) 81 | 82 | self.statements_per_file = pandas.Series(dtype='float64') 83 | self._astroid_walker = ASTWalker() 84 | 85 | def handle(self, error): 86 | """Record this error against the current file.""" 87 | 88 | severity = find_severity(error.code) 89 | 90 | error_input = error._asdict() 91 | 92 | error_input["severity"] = severity 93 | 94 | self.errors.append(error_input) 95 | 96 | def beginning(self, filename): 97 | """Start processing a file""" 98 | self.files_analized += 1 99 | 100 | def finished(self, filename): 101 | """Finish the processing of a file.""" 102 | 103 | self.statements_per_file[filename] = self._astroid_walker.count_statements( 104 | filename 105 | ) 106 | 107 | def stop(self): 108 | """After the flake8 run, write the stylesheet and index.""" 109 | 110 | # Save in a pandas dataframe all the errors 111 | params = { 112 | "total_errors": len(self.errors), 113 | "errors_found": len(self.errors) > 0, 114 | "files_analized": self.files_analized, 115 | } 116 | 117 | if params["total_errors"] > 0: 118 | error_db = pandas.DataFrame( 119 | self.errors, 120 | columns=[ 121 | "filename", 122 | "code", 123 | "line_number", 124 | "text", 125 | "column_number", 126 | "physical_line", 127 | "severity", 128 | ], 129 | ) 130 | 131 | error_db.rename(columns={"filename": "path"}, inplace=True) 132 | 133 | file_list = error_db["path"].to_list() 134 | 135 | # Remove the project's root from the path 136 | common_prefix = os.path.commonprefix(file_list) 137 | if self.options.title is None: 138 | params["dashboard_title"] = os.path.abspath(common_prefix) 139 | else: 140 | params["dashboard_title"] = self.options.title 141 | error_db["path"] = error_db["path"].apply( 142 | lambda _path: relative_path(_path, common_prefix) 143 | ) 144 | 145 | self.statements_per_file = self.statements_per_file.reset_index( 146 | name="statements" 147 | ) 148 | self.statements_per_file.rename(columns={"index": "path"}, inplace=True) 149 | 150 | self.statements_per_file["path"] = self.statements_per_file["path"].apply( 151 | lambda _path: relative_path(_path, common_prefix) 152 | ) 153 | 154 | ############################################################################ 155 | # Pie plot with errors by severity 156 | 157 | error_severity = error_db.severity.apply(lambda x: SEVERITY_NAMES[x]) 158 | error_severity = pandas.DataFrame(error_severity.value_counts()) 159 | 160 | plot_id, plot_js = self._create_pie_plot_js( 161 | error_severity.index, error_severity.severity.values 162 | ) 163 | params["id_severity_pie_plot"] = plot_id 164 | params["js_severity_pie_plot"] = plot_js 165 | 166 | errors_by_module = self._aggregate_by_folder_or_file(error_db) 167 | 168 | high_severity_by_folder = self._aggregate_by_folder_or_file( 169 | error_db[error_db["severity"] == 1] 170 | ) 171 | medium_severity_warnings_by_folder = self._aggregate_by_folder_or_file( 172 | error_db[error_db["severity"] == 2] 173 | ) 174 | low_severity_warnings_by_folder = self._aggregate_by_folder_or_file( 175 | error_db[error_db["severity"] == 3] 176 | ) 177 | 178 | errors_by_module["errors"] = high_severity_by_folder["counts"] 179 | errors_by_module["warnings"] = medium_severity_warnings_by_folder["counts"] 180 | errors_by_module["low_severity"] = low_severity_warnings_by_folder["counts"] 181 | errors_by_module.fillna(0, inplace=True) 182 | del high_severity_by_folder, medium_severity_warnings_by_folder 183 | 184 | self.statements_per_file["n_files"] = 1 185 | 186 | ############################################################################ 187 | # Sunburst plot of number of errors by directory and file 188 | statements_by_folder = self._aggregate_by_folder_or_file( 189 | self.statements_per_file, logic="sum" 190 | ) 191 | errors_by_module.rename(columns={"counts": "error_counts"}, inplace=True) 192 | 193 | errors_by_module["statements"] = statements_by_folder["statements"] 194 | 195 | error_penalty = 5 * errors_by_module["errors"].astype(float) 196 | warnings_penalty = errors_by_module["warnings"].astype(float) 197 | low_severity_penalty = 0.25 * errors_by_module["low_severity"].astype(float) 198 | statements = errors_by_module["statements"].astype(float) 199 | 200 | penalty = ( 201 | error_penalty + warnings_penalty + low_severity_penalty 202 | ) / statements 203 | 204 | errors_by_module["rating"] = 10.0 - 10 * penalty 205 | 206 | errors_by_module["rating"].fillna(0, inplace=True) 207 | errors_by_module["rating"] = errors_by_module["rating"].apply( 208 | lambda x: max(0, x) 209 | ) 210 | 211 | plot_id, plot_js = self._create_sunburst_plot_js( 212 | parents=errors_by_module["parent"], 213 | values=errors_by_module["error_counts"], 214 | ids=errors_by_module["path"], 215 | labels=errors_by_module["label"], 216 | textinfo="label + value + text", 217 | ) 218 | 219 | params["id_plot_error_by_folder"] = plot_id 220 | params["js_plot_error_by_folder"] = plot_js 221 | 222 | ############################################################################ 223 | # Sunburst plot of number of errors by code 224 | errors_by_code = self._aggregate_by_code(error_db, self.code_description) 225 | errors_by_code.rename(columns={"counts": "error_counts"}, inplace=True) 226 | 227 | plot_id, plot_js = self._create_sunburst_plot_js( 228 | parents=errors_by_code["parent"], 229 | values=errors_by_code["error_counts"], 230 | ids=errors_by_code["code"], 231 | labels=errors_by_code["code"], 232 | text=errors_by_code["code_description"].values, 233 | textinfo="label + value + text", 234 | ) 235 | params["id_plot_error_by_code"] = plot_id 236 | params["js_plot_error_by_code"] = plot_js 237 | 238 | ############################################################################ 239 | # Sunburst plot with quality score for each directory, module, and file 240 | 241 | errors_by_module["level"] = errors_by_module["path"].apply( 242 | lambda _path: len(PurePath(_path).parts) 243 | ) 244 | 245 | errors_by_module.loc["All", "level"] = 0 246 | errors_by_module.sort_values(["level"], inplace=True) 247 | 248 | # Before plotting we compute each sector size in a way that at each level, 249 | # the sector size is the same for all the elements in that level. 250 | n_childs = errors_by_module["parent"].value_counts() 251 | 252 | sector_by_parent = n_childs.copy() 253 | for path, parent in errors_by_module["parent"].iteritems(): 254 | if parent == "": 255 | sector_by_parent[parent] = 1 256 | errors_by_module.loc[path, "sector_size"] = 1000 257 | elif parent == "All": 258 | errors_by_module.loc[path, "sector_size"] = 1000 / n_childs[parent] 259 | 260 | else: 261 | errors_by_module.loc[path, "sector_size"] = ( 262 | errors_by_module.loc[parent, "sector_size"] / n_childs[parent] 263 | ) 264 | # The resulting sector sizes have rounding errors due to the floating point 265 | # operations. 266 | # But, the sunburst plot needs the total value for node (parent) bigger or 267 | # equal than the sum of its children. 268 | # In some cases, the values were slightly smaller and the plot was not 269 | # shown. 270 | # This is a fix that by adding a small margin to each node. 271 | errors_by_module.sort_values(["level"], ascending=False, inplace=True) 272 | levels = errors_by_module["level"] 273 | max_level = levels.max() 274 | 275 | for parent in errors_by_module.parent.unique(): 276 | 277 | if parent == "": 278 | continue 279 | 280 | percentual_diff = (max_level - levels[parent]) * 1e-5 281 | diff_sector_size = ( 282 | errors_by_module.loc[parent, "sector_size"] * percentual_diff 283 | ) 284 | 285 | errors_by_module.loc[parent, "sector_size"] += diff_sector_size 286 | 287 | plot_id, plot_js = self._create_sunburst_plot_js( 288 | parents=errors_by_module["parent"], 289 | values=errors_by_module["sector_size"], 290 | ids=errors_by_module["path"], 291 | labels=errors_by_module["label"], 292 | text=errors_by_module["rating"].map(lambda x: f"{x:.1f}"), 293 | maxdepth=2, 294 | hoverinfo="label+text", 295 | marker={ 296 | "line": {"width": 2}, 297 | "colors": map_values_to_cmap( 298 | errors_by_module["rating"].values / 10 299 | ), 300 | }, 301 | layout_kwargs=dict( 302 | xaxis=dict(visible=False, showgrid=False), 303 | yaxis=dict(visible=False, showgrid=False, showline=False), 304 | plot_bgcolor="#fff", 305 | font=dict(size=18, color="#7f7f7f"), 306 | legend={ 307 | "orientation": "h", 308 | "font": dict(size=22), 309 | "x": 0.5, 310 | "y": 1.02, 311 | "xanchor": "center", 312 | "yanchor": "bottom", 313 | "itemclick": False, 314 | }, 315 | ), 316 | ) 317 | 318 | params["id_plot_code_rating"] = plot_id 319 | params["js_plot_code_rating"] = plot_js 320 | 321 | self.write_index(params) 322 | 323 | if self.options.debug: 324 | file_path = os.path.join(self.options.outputdir, "quality.csv") 325 | errors_by_module.to_csv(file_path) 326 | print("Debug file saved: " + file_path) 327 | 328 | file_path = os.path.join(self.options.outputdir, "report.csv") 329 | error_db.to_csv(file_path) 330 | print("Debug file saved: " + file_path) 331 | 332 | def write_index(self, params): 333 | report_template = jinja2_env.get_template("index.html") 334 | rendered = report_template.render(params) 335 | 336 | report_filename = os.path.join(self.html_output_dir, "index.html") 337 | with codecs.open(report_filename, "w", encoding="utf8") as f: 338 | f.write(rendered) 339 | 340 | dir_util.copy_tree( 341 | os.path.join(os.path.dirname(__file__), "templates", "assets"), 342 | os.path.join(self.html_output_dir, "assets"), 343 | ) 344 | 345 | @staticmethod 346 | def _create_pie_plot_js(labels, values): 347 | colors = [SEVERITY_COLORS[sev] for sev in labels] 348 | trace = plotly.graph_objs.Pie( 349 | labels=labels, 350 | values=values, 351 | hoverinfo="label+text", 352 | textinfo="text", 353 | text=[ 354 | f"{value}<br>({value * 100 / values.sum():.3g}%)" for value in values 355 | ], 356 | textfont=dict(size=22), 357 | marker={"line": {"width": 2}, "colors": colors}, 358 | ) 359 | 360 | layout = plotly.graph_objs.Layout( 361 | margin=plotly.graph_objs.layout.Margin(t=1, l=1, r=1, b=1), showlegend=False 362 | ) 363 | 364 | fig = plotly.graph_objs.Figure([trace], layout) 365 | 366 | div = plotly.offline.plot( 367 | fig, 368 | config={ 369 | "responsive": True, 370 | "displaylogo": False, 371 | "modeBarButtonsToRemove": ["sendDataToCloud", "hoverClosestPie"], 372 | }, 373 | include_plotlyjs=False, 374 | output_type="div", 375 | ) 376 | 377 | soup = BeautifulSoup(div, features="html.parser") 378 | return soup.div.div["id"], jsmin(soup.div.script.decode_contents()) 379 | 380 | @staticmethod 381 | def _create_sunburst_plot_js( 382 | parents=None, 383 | values=None, 384 | ids=None, 385 | labels=None, 386 | text=None, 387 | maxdepth=3, 388 | **kwargs, 389 | ): 390 | 391 | extra_traces = kwargs.pop("extra_traces", list()) 392 | layout_kwargs = kwargs.pop("layout_kwargs", dict()) 393 | trace = plotly.graph_objs.Sunburst( 394 | parents=parents, 395 | values=values, 396 | ids=ids, 397 | labels=labels, 398 | text=text, 399 | branchvalues="total", 400 | maxdepth=maxdepth, 401 | **kwargs, 402 | ) 403 | 404 | layout = plotly.graph_objs.Layout( 405 | margin=plotly.graph_objs.layout.Margin(t=0, l=0, r=0, b=0), **layout_kwargs 406 | ) 407 | fig = plotly.graph_objs.Figure([trace] + extra_traces, layout) 408 | 409 | div = plotly.offline.plot( 410 | fig, 411 | config={ 412 | "responsive": True, 413 | "displaylogo": False, 414 | "modeBarButtonsToRemove": ["sendDataToCloud", "toggleHover"], 415 | }, 416 | include_plotlyjs=False, 417 | output_type="div", 418 | ) 419 | 420 | soup = BeautifulSoup(div, features="html.parser") 421 | return soup.div.div["id"], jsmin(soup.div.script.decode_contents()) 422 | 423 | @staticmethod 424 | def _aggregate_by_folder_or_file(error_db, logic="counts"): 425 | """ 426 | Aggregate DataFrame by module/directory and by file. 427 | The input DataFrame must contain only file information. 428 | """ 429 | 430 | if error_db.shape[0] == 0: 431 | return pandas.DataFrame( 432 | columns=["path", "counts", "parent", "id"] 433 | ).set_index("path", drop=False) 434 | 435 | files_names = error_db["path"].drop_duplicates() 436 | 437 | if logic == "counts": 438 | total_errors_by_file = error_db["path"].value_counts() 439 | total_errors_by_file = pandas.DataFrame( 440 | data=total_errors_by_file.values, 441 | index=total_errors_by_file.index, 442 | columns=["counts"], 443 | ) 444 | else: 445 | _error_db = error_db.copy() 446 | _error_db["counts"] = 1 447 | total_errors_by_file = _error_db.groupby("path").sum() 448 | 449 | total_errors_by_file["n_files"] = 1 450 | aggregated_by_folder = total_errors_by_file.copy() 451 | 452 | intermediate_paths = files_names.apply(full_split) 453 | 454 | intermediate_paths = set( 455 | itertools.chain.from_iterable(intermediate_paths.values) 456 | ) 457 | 458 | for _path in intermediate_paths: 459 | sel = total_errors_by_file.index.get_level_values(0).str.match(f"^{_path}/") 460 | aggregated_by_folder.loc[_path] = total_errors_by_file[sel].sum() 461 | 462 | aggregated_by_folder["path"] = aggregated_by_folder.index 463 | 464 | aggregated_by_folder.reset_index(inplace=True, drop=True) 465 | 466 | tmp = aggregated_by_folder["path"].apply(os.path.split) 467 | aggregated_by_folder["parent"] = tmp.apply(lambda x: x[0]) 468 | # Keep the last directory/module as id 469 | aggregated_by_folder["label"] = tmp.apply(lambda x: x[1]) 470 | 471 | sel = aggregated_by_folder["parent"] == "" # Select root path 472 | 473 | aggregated_by_folder.loc[sel, "parent"] = "All" 474 | aggregated_by_folder.loc[sel, "label"] = aggregated_by_folder.loc[sel, "path"] 475 | 476 | aggregated_by_folder.set_index("path", drop=False, inplace=True) 477 | sel = aggregated_by_folder["parent"] == "All" 478 | aggregated_by_folder.loc["All"] = aggregated_by_folder.loc[sel].sum() 479 | aggregated_by_folder.loc["All", "path"] = "All" 480 | aggregated_by_folder.loc["All", "label"] = "All" 481 | aggregated_by_folder.loc["All", "parent"] = "" 482 | 483 | return aggregated_by_folder 484 | 485 | @staticmethod 486 | def _aggregate_by_code(error_db, code_description): 487 | """Compute the total number of errors aggregated by error code.""" 488 | 489 | error_codes = error_db.code.value_counts() 490 | error_codes = error_codes.reset_index(name="counts") 491 | error_codes.rename(columns={"index": "code"}, inplace=True) 492 | parents = error_codes["code"].apply(lambda x: (x[0], x[:2])) 493 | parents = set(itertools.chain.from_iterable(parents.values)) 494 | 495 | aggregated_by_code = pandas.DataFrame(columns=error_codes.columns) 496 | for i, parent in enumerate(parents): 497 | sel = error_codes.code.str.match(f"^{parent}") 498 | row = [parent, error_codes[sel]["counts"].sum()] 499 | aggregated_by_code.loc[i + 1, ["code", "counts"]] = row 500 | 501 | row = ["", error_codes["counts"].sum()] 502 | aggregated_by_code.loc[0, ["code", "counts"]] = row 503 | 504 | aggregated_by_code = pandas.concat( 505 | [error_codes, aggregated_by_code], sort=True 506 | ).reset_index(drop=True) 507 | 508 | def get_parent(code): 509 | if len(code) > 2: 510 | return code[:2] 511 | elif len(code) == 2: 512 | return code[0] 513 | elif len(code) == 1: 514 | return "All" 515 | else: 516 | return "" 517 | 518 | parents = aggregated_by_code["code"].apply(get_parent) 519 | aggregated_by_code["parent"] = parents 520 | 521 | aggregated_by_code.loc[aggregated_by_code["code"] == "", "code"] = "All" 522 | aggregated_by_code.sort_values(["parent"], inplace=True) 523 | 524 | aggregated_by_code["code_description"] = aggregated_by_code["code"].apply( 525 | lambda x: code_description[x] 526 | ) 527 | aggregated_by_code["severity"] = ( 528 | aggregated_by_code["code"] 529 | .apply(find_severity) 530 | .apply(lambda x: SEVERITY_NAMES[x]) 531 | ) 532 | 533 | return aggregated_by_code 534 | 535 | @classmethod 536 | def add_options(cls, options): 537 | """Add options to the OptionsManager.""" 538 | 539 | cls.option_manager = options 540 | 541 | options.add_option( 542 | "--outputdir", 543 | help="Directory to save the HTML output.", 544 | parse_from_config=True, 545 | default="./flake8_dashboard", 546 | ) 547 | 548 | options.add_option( 549 | "--debug", 550 | help="Write additional debugging information as csv format.", 551 | parse_from_config=True, 552 | default=False, 553 | action="store_true", 554 | ) 555 | 556 | options.add_option( 557 | "--title", 558 | help="Set the dashboard's title. No title by default.", 559 | parse_from_config=True, 560 | default=None, 561 | ) 562 | -------------------------------------------------------------------------------- /flake8_dashboard/templates/assets/img/CheckFailed.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <svg 3 | xmlns:dc="http://purl.org/dc/elements/1.1/" 4 | xmlns:cc="http://creativecommons.org/ns#" 5 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 6 | xmlns:svg="http://www.w3.org/2000/svg" 7 | xmlns="http://www.w3.org/2000/svg" 8 | xmlns:xlink="http://www.w3.org/1999/xlink" 9 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" 10 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" 11 | version="1.0" 12 | width="620" 13 | height="620" 14 | viewBox="0 0 62 62" 15 | id="svg0" 16 | sodipodi:version="0.32" 17 | inkscape:version="0.46" 18 | sodipodi:docname="ambox_delete1.svg" 19 | inkscape:output_extension="org.inkscape.output.svg.inkscape"> 20 | <metadata 21 | id="metadata2478"> 22 | <rdf:RDF> 23 | <cc:Work 24 | rdf:about=""> 25 | <dc:format>image/svg+xml</dc:format> 26 | <dc:type 27 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> 28 | </cc:Work> 29 | </rdf:RDF> 30 | </metadata> 31 | <sodipodi:namedview 32 | inkscape:window-height="749" 33 | inkscape:window-width="1024" 34 | inkscape:pageshadow="2" 35 | inkscape:pageopacity="0.0" 36 | guidetolerance="10.0" 37 | gridtolerance="10.0" 38 | objecttolerance="10.0" 39 | borderopacity="1.0" 40 | bordercolor="#666666" 41 | pagecolor="#ffffff" 42 | id="base" 43 | showgrid="false" 44 | inkscape:zoom="0.74516129" 45 | inkscape:cx="273.38252" 46 | inkscape:cy="330.49409" 47 | inkscape:window-x="-4" 48 | inkscape:window-y="-4" 49 | inkscape:current-layer="svg0" /> 50 | <defs 51 | id="defs4"> 52 | <inkscape:perspective 53 | sodipodi:type="inkscape:persp3d" 54 | inkscape:vp_x="0 : 310 : 1" 55 | inkscape:vp_y="0 : 1000 : 0" 56 | inkscape:vp_z="620 : 310 : 1" 57 | inkscape:persp3d-origin="310 : 206.66667 : 1" 58 | id="perspective2480" /> 59 | <radialGradient 60 | id="shadowGradient"> 61 | <stop 62 | id="stop17" 63 | style="stop-color:#c0c0c0;stop-opacity:1" 64 | offset="0" /> 65 | <stop 66 | id="stop19" 67 | style="stop-color:#c0c0c0;stop-opacity:1" 68 | offset="0.88" /> 69 | <stop 70 | id="stop21" 71 | style="stop-color:#c0c0c0;stop-opacity:0" 72 | offset="1" /> 73 | </radialGradient> 74 | <linearGradient 75 | x1="42.986301" 76 | y1="7.0127001" 77 | x2="22.0144" 78 | y2="51.987099" 79 | id="fieldGradient" 80 | gradientUnits="userSpaceOnUse"> 81 | <stop 82 | id="stop7" 83 | style="stop-color:#ffafaf;stop-opacity:1;" 84 | offset="0" /> 85 | <stop 86 | id="stop9" 87 | style="stop-color:#e31313;stop-opacity:1;" 88 | offset="1" /> 89 | </linearGradient> 90 | <linearGradient 91 | x1="54.509937" 92 | y1="41.179295" 93 | x2="9.5471001" 94 | y2="16.248501" 95 | id="edgeGradient" 96 | gradientUnits="userSpaceOnUse" 97 | xlink:href="#fieldGradient"> 98 | <stop 99 | id="stop12" 100 | style="stop-color:#9a1212;stop-opacity:1;" 101 | offset="0" /> 102 | <stop 103 | id="stop14" 104 | style="stop-color:#d33e3e;stop-opacity:1;" 105 | offset="1" /> 106 | </linearGradient> 107 | </defs> 108 | <circle 109 | cx="32.5" 110 | cy="29.5" 111 | r="26.5" 112 | id="shadow" 113 | style="fill:url(#shadowGradient);stroke:none" 114 | transform="matrix(1.0648,0,0,1.064822,-2.1,1.0864)" /> 115 | <circle 116 | cx="31" 117 | cy="31" 118 | r="25.8" 119 | id="field" 120 | style="fill:url(#fieldGradient);fill-opacity:1;stroke:url(#edgeGradient);stroke-width:2" /> 121 | <rect 122 | style="fill:#ffffff" 123 | id="rect3254" 124 | width="35.294373" 125 | height="7.2467527" 126 | x="-17.647186" 127 | y="40.217243" 128 | transform="matrix(0.7071068,-0.7071068,0.7071068,0.7071068,0,0)" /> 129 | <rect 130 | style="fill:#ffffff" 131 | id="rect3256" 132 | width="7.2467527" 133 | height="35.42857" 134 | x="-3.6233766" 135 | y="26.126335" 136 | transform="matrix(0.7071068,-0.7071068,0.7071068,0.7071068,0,0)" /> 137 | </svg> 138 | -------------------------------------------------------------------------------- /flake8_dashboard/templates/assets/img/CheckPassed.svg: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15"> 3 | <circle cx="7.5" cy="7.5" r="7.5" fill="#40ce78" /> 4 | <path d="M2.90625 8.59375 c 1.7561681,0.7702427 2.7523447,1.871153 3.6875,3.3125 0.6687211,-2.8631278 2.0524127,-7.3946548 4.6875,-8.71875" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" /> 5 | </svg> 6 | -------------------------------------------------------------------------------- /flake8_dashboard/templates/assets/img/Readme: -------------------------------------------------------------------------------- 1 | Licensing 2 | ========= 3 | 4 | All the images are release under CC0 license. 5 | 6 | Sources: https://commons.wikimedia.org -------------------------------------------------------------------------------- /flake8_dashboard/templates/assets/js/core/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.0.0-beta (https://getbootstrap.com) 3 | * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");!function(t){var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(t){function e(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(t){return(t[0]||t).nodeType}function i(){return{bindType:s.end,delegateType:s.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}}function o(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in a)if(void 0!==t.style[e])return{end:a[e]};return!1}function r(e){var n=this,i=!1;return t(this).one(l.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||l.triggerTransitionEnd(n)},e),this}var s=!1,a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(e){var n=e.getAttribute("data-target");n&&"#"!==n||(n=e.getAttribute("href")||"");try{return t(n).length>0?n:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger(s.end)},supportsTransitionEnd:function(){return Boolean(s)},typeCheckConfig:function(t,i,o){for(var r in o)if(o.hasOwnProperty(r)){var s=o[r],a=i[r],l=a&&n(a)?"element":e(a);if(!new RegExp(s).test(l))throw new Error(t.toUpperCase()+': Option "'+r+'" provided type "'+l+'" but expected type "'+s+'".')}}};return s=o(),t.fn.emulateTransitionEnd=r,l.supportsTransitionEnd()&&(t.event.special[l.TRANSITION_END]=i()),l}(jQuery),s=(function(t){var e="alert",i=t.fn[e],s={DISMISS:'[data-dismiss="alert"]'},a={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},l={ALERT:"alert",FADE:"fade",SHOW:"show"},h=function(){function e(t){n(this,e),this._element=t}return e.prototype.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.prototype.dispose=function(){t.removeData(this._element,"bs.alert"),this._element=null},e.prototype._getRootElement=function(e){var n=r.getSelectorFromElement(e),i=!1;return n&&(i=t(n)[0]),i||(i=t(e).closest("."+l.ALERT)[0]),i},e.prototype._triggerCloseEvent=function(e){var n=t.Event(a.CLOSE);return t(e).trigger(n),n},e.prototype._removeElement=function(e){var n=this;t(e).removeClass(l.SHOW),r.supportsTransitionEnd()&&t(e).hasClass(l.FADE)?t(e).one(r.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(150):this._destroyElement(e)},e.prototype._destroyElement=function(e){t(e).detach().trigger(a.CLOSED).remove()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data("bs.alert");o||(o=new e(this),i.data("bs.alert",o)),"close"===n&&o[n](this)})},e._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),e}();t(document).on(a.CLICK_DATA_API,s.DISMISS,h._handleDismiss(new h)),t.fn[e]=h._jQueryInterface,t.fn[e].Constructor=h,t.fn[e].noConflict=function(){return t.fn[e]=i,h._jQueryInterface}}(jQuery),function(t){var e="button",i=t.fn[e],r={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},s={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},a={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},l=function(){function e(t){n(this,e),this._element=t}return e.prototype.toggle=function(){var e=!0,n=!0,i=t(this._element).closest(s.DATA_TOGGLE)[0];if(i){var o=t(this._element).find(s.INPUT)[0];if(o){if("radio"===o.type)if(o.checked&&t(this._element).hasClass(r.ACTIVE))e=!1;else{var a=t(i).find(s.ACTIVE)[0];a&&t(a).removeClass(r.ACTIVE)}if(e){if(o.hasAttribute("disabled")||i.hasAttribute("disabled")||o.classList.contains("disabled")||i.classList.contains("disabled"))return;o.checked=!t(this._element).hasClass(r.ACTIVE),t(o).trigger("change")}o.focus(),n=!1}}n&&this._element.setAttribute("aria-pressed",!t(this._element).hasClass(r.ACTIVE)),e&&t(this._element).toggleClass(r.ACTIVE)},e.prototype.dispose=function(){t.removeData(this._element,"bs.button"),this._element=null},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data("bs.button");i||(i=new e(this),t(this).data("bs.button",i)),"toggle"===n&&i[n]()})},o(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),e}();t(document).on(a.CLICK_DATA_API,s.DATA_TOGGLE_CARROT,function(e){e.preventDefault();var n=e.target;t(n).hasClass(r.BUTTON)||(n=t(n).closest(s.BUTTON)),l._jQueryInterface.call(t(n),"toggle")}).on(a.FOCUS_BLUR_DATA_API,s.DATA_TOGGLE_CARROT,function(e){var n=t(e.target).closest(s.BUTTON)[0];t(n).toggleClass(r.FOCUS,/^focus(in)?$/.test(e.type))}),t.fn[e]=l._jQueryInterface,t.fn[e].Constructor=l,t.fn[e].noConflict=function(){return t.fn[e]=i,l._jQueryInterface}}(jQuery),function(t){var e="carousel",s="bs.carousel",a="."+s,l=t.fn[e],h={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},c={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},u={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},d={SLIDE:"slide"+a,SLID:"slid"+a,KEYDOWN:"keydown"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a,TOUCHEND:"touchend"+a,LOAD_DATA_API:"load.bs.carousel.data-api",CLICK_DATA_API:"click.bs.carousel.data-api"},f={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},p={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},_=function(){function l(e,i){n(this,l),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(i),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(p.INDICATORS)[0],this._addEventListeners()}return l.prototype.next=function(){this._isSliding||this._slide(u.NEXT)},l.prototype.nextWhenVisible=function(){document.hidden||this.next()},l.prototype.prev=function(){this._isSliding||this._slide(u.PREV)},l.prototype.pause=function(e){e||(this._isPaused=!0),t(this._element).find(p.NEXT_PREV)[0]&&r.supportsTransitionEnd()&&(r.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},l.prototype.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},l.prototype.to=function(e){var n=this;this._activeElement=t(this._element).find(p.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(d.SLID,function(){return n.to(e)});else{if(i===e)return this.pause(),void this.cycle();var o=e>i?u.NEXT:u.PREV;this._slide(o,this._items[e])}},l.prototype.dispose=function(){t(this._element).off(a),t.removeData(this._element,s),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},l.prototype._getConfig=function(n){return n=t.extend({},h,n),r.typeCheckConfig(e,n,c),n},l.prototype._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(d.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(d.MOUSEENTER,function(t){return e.pause(t)}).on(d.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(d.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},l.prototype._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next();break;default:return}},l.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(p.ITEM)),this._items.indexOf(e)},l.prototype._getItemByDirection=function(t,e){var n=t===u.NEXT,i=t===u.PREV,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=(o+(t===u.PREV?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},l.prototype._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),o=this._getItemIndex(t(this._element).find(p.ACTIVE_ITEM)[0]),r=t.Event(d.SLIDE,{relatedTarget:e,direction:n,from:o,to:i});return t(this._element).trigger(r),r},l.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(p.ACTIVE).removeClass(f.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(f.ACTIVE)}},l.prototype._slide=function(e,n){var i=this,o=t(this._element).find(p.ACTIVE_ITEM)[0],s=this._getItemIndex(o),a=n||o&&this._getItemByDirection(e,o),l=this._getItemIndex(a),h=Boolean(this._interval),c=void 0,_=void 0,g=void 0;if(e===u.NEXT?(c=f.LEFT,_=f.NEXT,g=u.LEFT):(c=f.RIGHT,_=f.PREV,g=u.RIGHT),a&&t(a).hasClass(f.ACTIVE))this._isSliding=!1;else if(!this._triggerSlideEvent(a,g).isDefaultPrevented()&&o&&a){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(a);var m=t.Event(d.SLID,{relatedTarget:a,direction:g,from:s,to:l});r.supportsTransitionEnd()&&t(this._element).hasClass(f.SLIDE)?(t(a).addClass(_),r.reflow(a),t(o).addClass(c),t(a).addClass(c),t(o).one(r.TRANSITION_END,function(){t(a).removeClass(c+" "+_).addClass(f.ACTIVE),t(o).removeClass(f.ACTIVE+" "+_+" "+c),i._isSliding=!1,setTimeout(function(){return t(i._element).trigger(m)},0)}).emulateTransitionEnd(600)):(t(o).removeClass(f.ACTIVE),t(a).addClass(f.ACTIVE),this._isSliding=!1,t(this._element).trigger(m)),h&&this.cycle()}},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(s),o=t.extend({},h,t(this).data());"object"===(void 0===e?"undefined":i(e))&&t.extend(o,e);var r="string"==typeof e?e:o.slide;if(n||(n=new l(this,o),t(this).data(s,n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if(void 0===n[r])throw new Error('No method named "'+r+'"');n[r]()}else o.interval&&(n.pause(),n.cycle())})},l._dataApiClickHandler=function(e){var n=r.getSelectorFromElement(this);if(n){var i=t(n)[0];if(i&&t(i).hasClass(f.CAROUSEL)){var o=t.extend({},t(i).data(),t(this).data()),a=this.getAttribute("data-slide-to");a&&(o.interval=!1),l._jQueryInterface.call(t(i),o),a&&t(i).data(s).to(a),e.preventDefault()}}},o(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return h}}]),l}();t(document).on(d.CLICK_DATA_API,p.DATA_SLIDE,_._dataApiClickHandler),t(window).on(d.LOAD_DATA_API,function(){t(p.DATA_RIDE).each(function(){var e=t(this);_._jQueryInterface.call(e,e.data())})}),t.fn[e]=_._jQueryInterface,t.fn[e].Constructor=_,t.fn[e].noConflict=function(){return t.fn[e]=l,_._jQueryInterface}}(jQuery),function(t){var e="collapse",s="bs.collapse",a=t.fn[e],l={toggle:!0,parent:""},h={toggle:"boolean",parent:"string"},c={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},u={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},d={WIDTH:"width",HEIGHT:"height"},f={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},p=function(){function a(e,i){n(this,a),this._isTransitioning=!1,this._element=e,this._config=this._getConfig(i),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var o=t(f.DATA_TOGGLE),s=0;s<o.length;s++){var l=o[s],h=r.getSelectorFromElement(l);null!==h&&t(h).filter(e).length>0&&this._triggerArray.push(l)}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return a.prototype.toggle=function(){t(this._element).hasClass(u.SHOW)?this.hide():this.show()},a.prototype.show=function(){var e=this;if(!this._isTransitioning&&!t(this._element).hasClass(u.SHOW)){var n=void 0,i=void 0;if(this._parent&&((n=t.makeArray(t(this._parent).children().children(f.ACTIVES))).length||(n=null)),!(n&&(i=t(n).data(s))&&i._isTransitioning)){var o=t.Event(c.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){n&&(a._jQueryInterface.call(t(n),"hide"),i||t(n).data(s,null));var l=this._getDimension();t(this._element).removeClass(u.COLLAPSE).addClass(u.COLLAPSING),this._element.style[l]=0,this._triggerArray.length&&t(this._triggerArray).removeClass(u.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var h=function(){t(e._element).removeClass(u.COLLAPSING).addClass(u.COLLAPSE).addClass(u.SHOW),e._element.style[l]="",e.setTransitioning(!1),t(e._element).trigger(c.SHOWN)};if(r.supportsTransitionEnd()){var d="scroll"+(l[0].toUpperCase()+l.slice(1));t(this._element).one(r.TRANSITION_END,h).emulateTransitionEnd(600),this._element.style[l]=this._element[d]+"px"}else h()}}}},a.prototype.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(u.SHOW)){var n=t.Event(c.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",r.reflow(this._element),t(this._element).addClass(u.COLLAPSING).removeClass(u.COLLAPSE).removeClass(u.SHOW),this._triggerArray.length)for(var o=0;o<this._triggerArray.length;o++){var s=this._triggerArray[o],a=r.getSelectorFromElement(s);null!==a&&(t(a).hasClass(u.SHOW)||t(s).addClass(u.COLLAPSED).attr("aria-expanded",!1))}this.setTransitioning(!0);var l=function(){e.setTransitioning(!1),t(e._element).removeClass(u.COLLAPSING).addClass(u.COLLAPSE).trigger(c.HIDDEN)};this._element.style[i]="",r.supportsTransitionEnd()?t(this._element).one(r.TRANSITION_END,l).emulateTransitionEnd(600):l()}}},a.prototype.setTransitioning=function(t){this._isTransitioning=t},a.prototype.dispose=function(){t.removeData(this._element,s),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},a.prototype._getConfig=function(n){return n=t.extend({},l,n),n.toggle=Boolean(n.toggle),r.typeCheckConfig(e,n,h),n},a.prototype._getDimension=function(){return t(this._element).hasClass(d.WIDTH)?d.WIDTH:d.HEIGHT},a.prototype._getParent=function(){var e=this,n=t(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(a._getTargetFromElement(n),[n])}),n},a.prototype._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(u.SHOW);n.length&&t(n).toggleClass(u.COLLAPSED,!i).attr("aria-expanded",i)}},a._getTargetFromElement=function(e){var n=r.getSelectorFromElement(e);return n?t(n)[0]:null},a._jQueryInterface=function(e){return this.each(function(){var n=t(this),o=n.data(s),r=t.extend({},l,n.data(),"object"===(void 0===e?"undefined":i(e))&&e);if(!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||(o=new a(this,r),n.data(s,o)),"string"==typeof e){if(void 0===o[e])throw new Error('No method named "'+e+'"');o[e]()}})},o(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return l}}]),a}();t(document).on(c.CLICK_DATA_API,f.DATA_TOGGLE,function(e){/input|textarea/i.test(e.target.tagName)||e.preventDefault();var n=t(this),i=r.getSelectorFromElement(this);t(i).each(function(){var e=t(this),i=e.data(s)?"toggle":n.data();p._jQueryInterface.call(e,i)})}),t.fn[e]=p._jQueryInterface,t.fn[e].Constructor=p,t.fn[e].noConflict=function(){return t.fn[e]=a,p._jQueryInterface}}(jQuery),function(t){if("undefined"==typeof Popper)throw new Error("Bootstrap dropdown require Popper.js (https://popper.js.org)");var e="dropdown",s="bs.dropdown",a="."+s,l=t.fn[e],h=new RegExp("38|40|27"),c={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api",KEYUP_DATA_API:"keyup.bs.dropdown.data-api"},u={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left"},d={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled)"},f={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end"},p={placement:f.BOTTOM,offset:0,flip:!0},_={placement:"string",offset:"(number|string)",flip:"boolean"},g=function(){function l(t,e){n(this,l),this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}return l.prototype.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(u.DISABLED)){var e=l._getParentFromElement(this._element),n=t(this._menu).hasClass(u.SHOW);if(l._clearMenus(),!n){var i={relatedTarget:this._element},o=t.Event(c.SHOW,i);if(t(e).trigger(o),!o.isDefaultPrevented()){var r=this._element;t(e).hasClass(u.DROPUP)&&(t(this._menu).hasClass(u.MENULEFT)||t(this._menu).hasClass(u.MENURIGHT))&&(r=e),this._popper=new Popper(r,this._menu,this._getPopperConfig()),"ontouchstart"in document.documentElement&&!t(e).closest(d.NAVBAR_NAV).length&&t("body").children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(u.SHOW),t(e).toggleClass(u.SHOW).trigger(t.Event(c.SHOWN,i))}}}},l.prototype.dispose=function(){t.removeData(this._element,s),t(this._element).off(a),this._element=null,this._menu=null,null!==this._popper&&this._popper.destroy(),this._popper=null},l.prototype.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},l.prototype._addEventListeners=function(){var e=this;t(this._element).on(c.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},l.prototype._getConfig=function(n){var i=t(this._element).data();return void 0!==i.placement&&(i.placement=f[i.placement.toUpperCase()]),n=t.extend({},this.constructor.Default,t(this._element).data(),n),r.typeCheckConfig(e,n,this.constructor.DefaultType),n},l.prototype._getMenuElement=function(){if(!this._menu){var e=l._getParentFromElement(this._element);this._menu=t(e).find(d.MENU)[0]}return this._menu},l.prototype._getPlacement=function(){var e=t(this._element).parent(),n=this._config.placement;return e.hasClass(u.DROPUP)||this._config.placement===f.TOP?(n=f.TOP,t(this._menu).hasClass(u.MENURIGHT)&&(n=f.TOPEND)):t(this._menu).hasClass(u.MENURIGHT)&&(n=f.BOTTOMEND),n},l.prototype._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},l.prototype._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:{offset:this._config.offset},flip:{enabled:this._config.flip}}};return this._inNavbar&&(t.modifiers.applyStyle={enabled:!this._inNavbar}),t},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(s),o="object"===(void 0===e?"undefined":i(e))?e:null;if(n||(n=new l(this,o),t(this).data(s,n)),"string"==typeof e){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},l._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=t.makeArray(t(d.DATA_TOGGLE)),i=0;i<n.length;i++){var o=l._getParentFromElement(n[i]),r=t(n[i]).data(s),a={relatedTarget:n[i]};if(r){var h=r._menu;if(t(o).hasClass(u.SHOW)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&t.contains(o,e.target))){var f=t.Event(c.HIDE,a);t(o).trigger(f),f.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),n[i].setAttribute("aria-expanded","false"),t(h).removeClass(u.SHOW),t(o).removeClass(u.SHOW).trigger(t.Event(c.HIDDEN,a)))}}}},l._getParentFromElement=function(e){var n=void 0,i=r.getSelectorFromElement(e);return i&&(n=t(i)[0]),n||e.parentNode},l._dataApiKeydownHandler=function(e){if(!(!h.test(e.which)||/button/i.test(e.target.tagName)&&32===e.which||/input|textarea/i.test(e.target.tagName)||(e.preventDefault(),e.stopPropagation(),this.disabled||t(this).hasClass(u.DISABLED)))){var n=l._getParentFromElement(this),i=t(n).hasClass(u.SHOW);if((i||27===e.which&&32===e.which)&&(!i||27!==e.which&&32!==e.which)){var o=t(n).find(d.VISIBLE_ITEMS).get();if(o.length){var r=o.indexOf(e.target);38===e.which&&r>0&&r--,40===e.which&&r<o.length-1&&r++,r<0&&(r=0),o[r].focus()}}else{if(27===e.which){var s=t(n).find(d.DATA_TOGGLE)[0];t(s).trigger("focus")}t(this).trigger("click")}}},o(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return p}},{key:"DefaultType",get:function(){return _}}]),l}();t(document).on(c.KEYDOWN_DATA_API,d.DATA_TOGGLE,g._dataApiKeydownHandler).on(c.KEYDOWN_DATA_API,d.MENU,g._dataApiKeydownHandler).on(c.CLICK_DATA_API+" "+c.KEYUP_DATA_API,g._clearMenus).on(c.CLICK_DATA_API,d.DATA_TOGGLE,function(e){e.preventDefault(),e.stopPropagation(),g._jQueryInterface.call(t(this),"toggle")}).on(c.CLICK_DATA_API,d.FORM_CHILD,function(t){t.stopPropagation()}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=l,g._jQueryInterface}}(jQuery),function(t){var e="modal",s=".bs.modal",a=t.fn[e],l={backdrop:!0,keyboard:!0,focus:!0,show:!0},h={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},c={HIDE:"hide.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},u={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},d={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},f=function(){function a(e,i){n(this,a),this._config=this._getConfig(i),this._element=e,this._dialog=t(e).find(d.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return a.prototype.toggle=function(t){return this._isShown?this.hide():this.show(t)},a.prototype.show=function(e){var n=this;if(!this._isTransitioning){r.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE)&&(this._isTransitioning=!0);var i=t.Event(c.SHOW,{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),t(document.body).addClass(u.OPEN),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(c.CLICK_DISMISS,d.DATA_DISMISS,function(t){return n.hide(t)}),t(this._dialog).on(c.MOUSEDOWN_DISMISS,function(){t(n._element).one(c.MOUSEUP_DISMISS,function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(e)}))}},a.prototype.hide=function(e){var n=this;if(e&&e.preventDefault(),!this._isTransitioning&&this._isShown){var i=r.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE);i&&(this._isTransitioning=!0);var o=t.Event(c.HIDE);t(this._element).trigger(o),this._isShown&&!o.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),t(document).off(c.FOCUSIN),t(this._element).removeClass(u.SHOW),t(this._element).off(c.CLICK_DISMISS),t(this._dialog).off(c.MOUSEDOWN_DISMISS),i?t(this._element).one(r.TRANSITION_END,function(t){return n._hideModal(t)}).emulateTransitionEnd(300):this._hideModal())}},a.prototype.dispose=function(){t.removeData(this._element,"bs.modal"),t(window,document,this._element,this._backdrop).off(s),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},a.prototype.handleUpdate=function(){this._adjustDialog()},a.prototype._getConfig=function(n){return n=t.extend({},l,n),r.typeCheckConfig(e,n,h),n},a.prototype._showElement=function(e){var n=this,i=r.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&r.reflow(this._element),t(this._element).addClass(u.SHOW),this._config.focus&&this._enforceFocus();var o=t.Event(c.SHOWN,{relatedTarget:e}),s=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,t(n._element).trigger(o)};i?t(this._dialog).one(r.TRANSITION_END,s).emulateTransitionEnd(300):s()},a.prototype._enforceFocus=function(){var e=this;t(document).off(c.FOCUSIN).on(c.FOCUSIN,function(n){document===n.target||e._element===n.target||t(e._element).has(n.target).length||e._element.focus()})},a.prototype._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(c.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||t(this._element).off(c.KEYDOWN_DISMISS)},a.prototype._setResizeEvent=function(){var e=this;this._isShown?t(window).on(c.RESIZE,function(t){return e.handleUpdate(t)}):t(window).off(c.RESIZE)},a.prototype._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass(u.OPEN),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(c.HIDDEN)})},a.prototype._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},a.prototype._showBackdrop=function(e){var n=this,i=t(this._element).hasClass(u.FADE)?u.FADE:"";if(this._isShown&&this._config.backdrop){var o=r.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=u.BACKDROP,i&&t(this._backdrop).addClass(i),t(this._backdrop).appendTo(document.body),t(this._element).on(c.CLICK_DISMISS,function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide())}),o&&r.reflow(this._backdrop),t(this._backdrop).addClass(u.SHOW),!e)return;if(!o)return void e();t(this._backdrop).one(r.TRANSITION_END,e).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(u.SHOW);var s=function(){n._removeBackdrop(),e&&e()};r.supportsTransitionEnd()&&t(this._element).hasClass(u.FADE)?t(this._backdrop).one(r.TRANSITION_END,s).emulateTransitionEnd(150):s()}else e&&e()},a.prototype._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},a.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},a.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},a.prototype._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){t(d.FIXED_CONTENT).each(function(n,i){var o=t(i)[0].style.paddingRight,r=t(i).css("padding-right");t(i).data("padding-right",o).css("padding-right",parseFloat(r)+e._scrollbarWidth+"px")}),t(d.NAVBAR_TOGGLER).each(function(n,i){var o=t(i)[0].style.marginRight,r=t(i).css("margin-right");t(i).data("margin-right",o).css("margin-right",parseFloat(r)+e._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=t("body").css("padding-right");t("body").data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},a.prototype._resetScrollbar=function(){t(d.FIXED_CONTENT).each(function(e,n){var i=t(n).data("padding-right");void 0!==i&&t(n).css("padding-right",i).removeData("padding-right")}),t(d.NAVBAR_TOGGLER).each(function(e,n){var i=t(n).data("margin-right");void 0!==i&&t(n).css("margin-right",i).removeData("margin-right")});var e=t("body").data("padding-right");void 0!==e&&t("body").css("padding-right",e).removeData("padding-right")},a.prototype._getScrollbarWidth=function(){var t=document.createElement("div");t.className=u.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},a._jQueryInterface=function(e,n){return this.each(function(){var o=t(this).data("bs.modal"),r=t.extend({},a.Default,t(this).data(),"object"===(void 0===e?"undefined":i(e))&&e);if(o||(o=new a(this,r),t(this).data("bs.modal",o)),"string"==typeof e){if(void 0===o[e])throw new Error('No method named "'+e+'"');o[e](n)}else r.show&&o.show(n)})},o(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return l}}]),a}();t(document).on(c.CLICK_DATA_API,d.DATA_TOGGLE,function(e){var n=this,i=void 0,o=r.getSelectorFromElement(this);o&&(i=t(o)[0]);var s=t(i).data("bs.modal")?"toggle":t.extend({},t(i).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var a=t(i).one(c.SHOW,function(e){e.isDefaultPrevented()||a.one(c.HIDDEN,function(){t(n).is(":visible")&&n.focus()})});f._jQueryInterface.call(t(i),s,this)}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=a,f._jQueryInterface}}(jQuery),function(t){var e="scrollspy",s=t.fn[e],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},h={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},c={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},u={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},d={OFFSET:"offset",POSITION:"position"},f=function(){function s(e,i){var o=this;n(this,s),this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(i),this._selector=this._config.target+" "+u.NAV_LINKS+","+this._config.target+" "+u.LIST_ITEMS+","+this._config.target+" "+u.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(h.SCROLL,function(t){return o._process(t)}),this.refresh(),this._process()}return s.prototype.refresh=function(){var e=this,n=this._scrollElement!==this._scrollElement.window?d.POSITION:d.OFFSET,i="auto"===this._config.method?n:this._config.method,o=i===d.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n=void 0,s=r.getSelectorFromElement(e);if(s&&(n=t(s)[0]),n){var a=n.getBoundingClientRect();if(a.width||a.height)return[t(n)[i]().top+o,s]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},s.prototype.dispose=function(){t.removeData(this._element,"bs.scrollspy"),t(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},s.prototype._getConfig=function(n){if("string"!=typeof(n=t.extend({},a,n)).target){var i=t(n.target).attr("id");i||(i=r.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return r.typeCheckConfig(e,n,l),n},s.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},s.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},s.prototype._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},s.prototype._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}},s.prototype._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",");n=n.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var i=t(n.join(","));i.hasClass(c.DROPDOWN_ITEM)?(i.closest(u.DROPDOWN).find(u.DROPDOWN_TOGGLE).addClass(c.ACTIVE),i.addClass(c.ACTIVE)):(i.addClass(c.ACTIVE),i.parents(u.NAV_LIST_GROUP).prev(u.NAV_LINKS+", "+u.LIST_ITEMS).addClass(c.ACTIVE)),t(this._scrollElement).trigger(h.ACTIVATE,{relatedTarget:e})},s.prototype._clear=function(){t(this._selector).filter(u.ACTIVE).removeClass(c.ACTIVE)},s._jQueryInterface=function(e){return this.each(function(){var n=t(this).data("bs.scrollspy"),o="object"===(void 0===e?"undefined":i(e))&&e;if(n||(n=new s(this,o),t(this).data("bs.scrollspy",n)),"string"==typeof e){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},o(s,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return a}}]),s}();t(window).on(h.LOAD_DATA_API,function(){for(var e=t.makeArray(t(u.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);f._jQueryInterface.call(i,i.data())}}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=s,f._jQueryInterface}}(jQuery),function(t){var e=t.fn.tab,i={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},s={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},a={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},l=function(){function e(t){n(this,e),this._element=t}return e.prototype.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(s.ACTIVE)||t(this._element).hasClass(s.DISABLED))){var n=void 0,o=void 0,l=t(this._element).closest(a.NAV_LIST_GROUP)[0],h=r.getSelectorFromElement(this._element);l&&(o=t.makeArray(t(l).find(a.ACTIVE)),o=o[o.length-1]);var c=t.Event(i.HIDE,{relatedTarget:this._element}),u=t.Event(i.SHOW,{relatedTarget:o});if(o&&t(o).trigger(c),t(this._element).trigger(u),!u.isDefaultPrevented()&&!c.isDefaultPrevented()){h&&(n=t(h)[0]),this._activate(this._element,l);var d=function(){var n=t.Event(i.HIDDEN,{relatedTarget:e._element}),r=t.Event(i.SHOWN,{relatedTarget:o});t(o).trigger(n),t(e._element).trigger(r)};n?this._activate(n,n.parentNode,d):d()}}},e.prototype.dispose=function(){t.removeData(this._element,"bs.tab"),this._element=null},e.prototype._activate=function(e,n,i){var o=this,l=t(n).find(a.ACTIVE)[0],h=i&&r.supportsTransitionEnd()&&l&&t(l).hasClass(s.FADE),c=function(){return o._transitionComplete(e,l,h,i)};l&&h?t(l).one(r.TRANSITION_END,c).emulateTransitionEnd(150):c(),l&&t(l).removeClass(s.SHOW)},e.prototype._transitionComplete=function(e,n,i,o){if(n){t(n).removeClass(s.ACTIVE);var l=t(n.parentNode).find(a.DROPDOWN_ACTIVE_CHILD)[0];l&&t(l).removeClass(s.ACTIVE),n.setAttribute("aria-expanded",!1)}if(t(e).addClass(s.ACTIVE),e.setAttribute("aria-expanded",!0),i?(r.reflow(e),t(e).addClass(s.SHOW)):t(e).removeClass(s.FADE),e.parentNode&&t(e.parentNode).hasClass(s.DROPDOWN_MENU)){var h=t(e).closest(a.DROPDOWN)[0];h&&t(h).find(a.DROPDOWN_TOGGLE).addClass(s.ACTIVE),e.setAttribute("aria-expanded",!0)}o&&o()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data("bs.tab");if(o||(o=new e(this),i.data("bs.tab",o)),"string"==typeof n){if(void 0===o[n])throw new Error('No method named "'+n+'"');o[n]()}})},o(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),e}();t(document).on(i.CLICK_DATA_API,a.DATA_TOGGLE,function(e){e.preventDefault(),l._jQueryInterface.call(t(this),"show")}),t.fn.tab=l._jQueryInterface,t.fn.tab.Constructor=l,t.fn.tab.noConflict=function(){return t.fn.tab=e,l._jQueryInterface}}(jQuery),function(t){if("undefined"==typeof Popper)throw new Error("Bootstrap tooltips require Popper.js (https://popper.js.org)");var e="tooltip",s=".bs.tooltip",a=t.fn[e],l=new RegExp("(^|\\s)bs-tooltip\\S+","g"),h={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)"},c={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},u={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip"},d={SHOW:"show",OUT:"out"},f={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,INSERTED:"inserted"+s,CLICK:"click"+s,FOCUSIN:"focusin"+s,FOCUSOUT:"focusout"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s},p={FADE:"fade",SHOW:"show"},_={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},g={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},m=function(){function a(t,e){n(this,a),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return a.prototype.enable=function(){this._isEnabled=!0},a.prototype.disable=function(){this._isEnabled=!1},a.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},a.prototype.toggle=function(e){if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(p.SHOW))return void this._leave(null,this);this._enter(null,this)}},a.prototype.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},a.prototype.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var o=this.getTipElement(),s=r.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&t(o).addClass(p.FADE);var l="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var c=!1===this.config.container?document.body:t(this.config.container);t(o).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(o).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Popper(this.element,o,{placement:h,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:_.ARROW}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(o).addClass(p.SHOW),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var u=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d.OUT&&e._leave(null,e)};r.supportsTransitionEnd()&&t(this.tip).hasClass(p.FADE)?t(this.tip).one(r.TRANSITION_END,u).emulateTransitionEnd(a._TRANSITION_DURATION):u()}},a.prototype.hide=function(e){var n=this,i=this.getTipElement(),o=t.Event(this.constructor.Event.HIDE),s=function(){n._hoverState!==d.SHOW&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(o),o.isDefaultPrevented()||(t(i).removeClass(p.SHOW),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[g.CLICK]=!1,this._activeTrigger[g.FOCUS]=!1,this._activeTrigger[g.HOVER]=!1,r.supportsTransitionEnd()&&t(this.tip).hasClass(p.FADE)?t(i).one(r.TRANSITION_END,s).emulateTransitionEnd(150):s(),this._hoverState="")},a.prototype.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},a.prototype.isWithContent=function(){return Boolean(this.getTitle())},a.prototype.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},a.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},a.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(_.TOOLTIP_INNER),this.getTitle()),e.removeClass(p.FADE+" "+p.SHOW)},a.prototype.setElementContent=function(e,n){var o=this.config.html;"object"===(void 0===n?"undefined":i(n))&&(n.nodeType||n.jquery)?o?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[o?"html":"text"](n)},a.prototype.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},a.prototype._getAttachment=function(t){return c[t.toUpperCase()]},a.prototype._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==g.MANUAL){var i=n===g.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,o=n===g.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(o,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},a.prototype._fixTitle=function(){var t=i(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},a.prototype._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?g.FOCUS:g.HOVER]=!0),t(n.getTipElement()).hasClass(p.SHOW)||n._hoverState===d.SHOW?n._hoverState=d.SHOW:(clearTimeout(n._timeout),n._hoverState=d.SHOW,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===d.SHOW&&n.show()},n.config.delay.show):n.show())},a.prototype._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?g.FOCUS:g.HOVER]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=d.OUT,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===d.OUT&&n.hide()},n.config.delay.hide):n.hide())},a.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},a.prototype._getConfig=function(n){return(n=t.extend({},this.constructor.Default,t(this.element).data(),n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.title&&"number"==typeof n.title&&(n.title=n.title.toString()),n.content&&"number"==typeof n.content&&(n.content=n.content.toString()),r.typeCheckConfig(e,n,this.constructor.DefaultType),n},a.prototype._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},a.prototype._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(l);null!==n&&n.length>0&&e.removeClass(n.join(""))},a.prototype._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},a.prototype._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(p.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data("bs.tooltip"),o="object"===(void 0===e?"undefined":i(e))&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new a(this,o),t(this).data("bs.tooltip",n)),"string"==typeof e)){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},o(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return f}},{key:"EVENT_KEY",get:function(){return s}},{key:"DefaultType",get:function(){return h}}]),a}();return t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=a,m._jQueryInterface},m}(jQuery));!function(r){var a="popover",l=".bs.popover",h=r.fn[a],c=new RegExp("(^|\\s)bs-popover\\S+","g"),u=r.extend({},s.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),d=r.extend({},s.DefaultType,{content:"(string|element|function)"}),f={FADE:"fade",SHOW:"show"},p={TITLE:".popover-header",CONTENT:".popover-body"},_={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,INSERTED:"inserted"+l,CLICK:"click"+l,FOCUSIN:"focusin"+l,FOCUSOUT:"focusout"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l},g=function(s){function h(){return n(this,h),t(this,s.apply(this,arguments))}return e(h,s),h.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},h.prototype.addAttachmentClass=function(t){r(this.getTipElement()).addClass("bs-popover-"+t)},h.prototype.getTipElement=function(){return this.tip=this.tip||r(this.config.template)[0]},h.prototype.setContent=function(){var t=r(this.getTipElement());this.setElementContent(t.find(p.TITLE),this.getTitle()),this.setElementContent(t.find(p.CONTENT),this._getContent()),t.removeClass(f.FADE+" "+f.SHOW)},h.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},h.prototype._cleanTipClass=function(){var t=r(this.getTipElement()),e=t.attr("class").match(c);null!==e&&e.length>0&&t.removeClass(e.join(""))},h._jQueryInterface=function(t){return this.each(function(){var e=r(this).data("bs.popover"),n="object"===(void 0===t?"undefined":i(t))?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new h(this,n),r(this).data("bs.popover",e)),"string"==typeof t)){if(void 0===e[t])throw new Error('No method named "'+t+'"');e[t]()}})},o(h,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return a}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return l}},{key:"DefaultType",get:function(){return d}}]),h}(s);r.fn[a]=g._jQueryInterface,r.fn[a].Constructor=g,r.fn[a].noConflict=function(){return r.fn[a]=h,g._jQueryInterface}}(jQuery)}(); 7 | -------------------------------------------------------------------------------- /flake8_dashboard/templates/assets/js/core/popper.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) Federico Zivolo 2017 3 | Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). 4 | */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=window.getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e||-1!==['HTML','BODY','#document'].indexOf(e.nodeName))return window.document.body;var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:window.document.documentElement}function p(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return window.document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var f=a.commonAncestorContainer;if(e!==f&&t!==f||i.contains(n))return p(f)?f:r(f);var l=s(e);return l.host?d(l.host,t):d(e,s(t).host)}function a(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',i=e.nodeName;if('BODY'===i||'HTML'===i){var n=window.document.documentElement,r=window.document.scrollingElement||n;return r[o]}return e[o]}function f(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=a(t,'top'),n=a(t,'left'),r=o?-1:1;return e.top+=i*r,e.bottom+=i*r,e.left+=n*r,e.right+=n*r,e}function l(e,t){var o='x'===t?'Left':'Top',i='Left'==o?'Right':'Bottom';return+e['border'+o+'Width'].split('px')[0]+ +e['border'+i+'Width'].split('px')[0]}function m(e,t,o,i){return _(t['offset'+e],o['client'+e],o['offset'+e],ie()?o['offset'+e]+i['margin'+('Height'===e?'Top':'Left')]+i['margin'+('Height'===e?'Bottom':'Right')]:0)}function h(){var e=window.document.body,t=window.document.documentElement,o=ie()&&window.getComputedStyle(t);return{height:m('Height',e,t,o),width:m('Width',e,t,o)}}function c(e){return se({},e,{right:e.left+e.width,bottom:e.top+e.height})}function g(e){var o={};if(ie())try{o=e.getBoundingClientRect();var i=a(e,'top'),n=a(e,'left');o.top+=i,o.left+=n,o.bottom+=i,o.right+=n}catch(e){}else o=e.getBoundingClientRect();var r={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},p='HTML'===e.nodeName?h():{},s=p.width||e.clientWidth||r.right-r.left,d=p.height||e.clientHeight||r.bottom-r.top,f=e.offsetWidth-s,m=e.offsetHeight-d;if(f||m){var g=t(e);f-=l(g,'x'),m-=l(g,'y'),r.width-=f,r.height-=m}return c(r)}function u(e,o){var i=ie(),r='HTML'===o.nodeName,p=g(e),s=g(o),d=n(e),a=t(o),l=+a.borderTopWidth.split('px')[0],m=+a.borderLeftWidth.split('px')[0],h=c({top:p.top-s.top-l,left:p.left-s.left-m,width:p.width,height:p.height});if(h.marginTop=0,h.marginLeft=0,!i&&r){var u=+a.marginTop.split('px')[0],b=+a.marginLeft.split('px')[0];h.top-=l-u,h.bottom-=l-u,h.left-=m-b,h.right-=m-b,h.marginTop=u,h.marginLeft=b}return(i?o.contains(d):o===d&&'BODY'!==d.nodeName)&&(h=f(h,o)),h}function b(e){var t=window.document.documentElement,o=u(e,t),i=_(t.clientWidth,window.innerWidth||0),n=_(t.clientHeight,window.innerHeight||0),r=a(t),p=a(t,'left'),s={top:r-o.top+o.marginTop,left:p-o.left+o.marginLeft,width:i,height:n};return c(s)}function y(e){var i=e.nodeName;return'BODY'===i||'HTML'===i?!1:'fixed'===t(e,'position')||y(o(e))}function w(e,t,i,r){var p={top:0,left:0},s=d(e,t);if('viewport'===r)p=b(s);else{var a;'scrollParent'===r?(a=n(o(e)),'BODY'===a.nodeName&&(a=window.document.documentElement)):'window'===r?a=window.document.documentElement:a=r;var f=u(a,s);if('HTML'===a.nodeName&&!y(s)){var l=h(),m=l.height,c=l.width;p.top+=f.top-f.marginTop,p.bottom=m+f.top,p.left+=f.left-f.marginLeft,p.right=c+f.left}else p=f}return p.left+=i,p.top+=i,p.right-=i,p.bottom-=i,p}function v(e){var t=e.width,o=e.height;return t*o}function E(e,t,o,i,n){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var p=w(o,i,r,n),s={top:{width:p.width,height:t.top-p.top},right:{width:p.right-t.right,height:p.height},bottom:{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-p.left,height:p.height}},d=Object.keys(s).map(function(e){return se({key:e},s[e],{area:v(s[e])})}).sort(function(e,t){return t.area-e.area}),a=d.filter(function(e){var t=e.width,i=e.height;return t>=o.clientWidth&&i>=o.clientHeight}),f=0<a.length?a[0].key:d[0].key,l=e.split('-')[1];return f+(l?'-'+l:'')}function x(e,t,o){var i=d(t,o);return u(o,i)}function O(e){var t=window.getComputedStyle(e),o=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight),n={width:e.offsetWidth+i,height:e.offsetHeight+o};return n}function L(e){var t={left:'right',right:'left',bottom:'top',top:'bottom'};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function S(e,t,o){o=o.split('-')[0];var i=O(e),n={width:i.width,height:i.height},r=-1!==['right','left'].indexOf(o),p=r?'top':'left',s=r?'left':'top',d=r?'height':'width',a=r?'width':'height';return n[p]=t[p]+t[d]/2-i[d]/2,n[s]=o===s?t[s]-i[a]:t[L(s)],n}function T(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function C(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var i=T(e,function(e){return e[t]===o});return e.indexOf(i)}function N(t,o,i){var n=void 0===i?t:t.slice(0,C(t,'name',i));return n.forEach(function(t){t.function&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var i=t.function||t.fn;t.enabled&&e(i)&&(o.offsets.popper=c(o.offsets.popper),o.offsets.reference=c(o.offsets.reference),o=i(o,t))}),o}function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=x(this.state,this.popper,this.reference),e.placement=E(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=S(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position='absolute',e=N(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some(function(e){var o=e.name,i=e.enabled;return i&&o===t})}function B(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length-1;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof window.document.body.style[r])return r}return null}function D(){return this.state.isDestroyed=!0,W(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[B('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function H(e,t,o,i){var r='BODY'===e.nodeName,p=r?window:e;p.addEventListener(t,o,{passive:!0}),r||H(n(p.parentNode),t,o,i),i.push(p)}function P(e,t,o,i){o.updateBound=i,window.addEventListener('resize',o.updateBound,{passive:!0});var r=n(e);return H(r,'scroll',o.updateBound,o.scrollParents),o.scrollElement=r,o.eventsEnabled=!0,o}function A(){this.state.eventsEnabled||(this.state=P(this.reference,this.options,this.state,this.scheduleUpdate))}function M(e,t){return window.removeEventListener('resize',t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function I(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=M(this.reference,this.state))}function R(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function U(e,t){Object.keys(t).forEach(function(o){var i='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&R(t[o])&&(i='px'),e.style[o]=t[o]+i})}function Y(e,t){Object.keys(t).forEach(function(o){var i=t[o];!1===i?e.removeAttribute(o):e.setAttribute(o,t[o])})}function F(e,t,o){var i=T(e,function(e){var o=e.name;return o===t}),n=!!i&&e.some(function(e){return e.name===o&&e.enabled&&e.order<i.order});if(!n){var r='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+r+' modifier in order to work, be sure to include it before '+r+'!')}return n}function j(e){return'end'===e?'start':'start'===e?'end':e}function K(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=ae.indexOf(e),i=ae.slice(o+1).concat(ae.slice(0,o));return t?i.reverse():i}function q(e,t,o,i){var n=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+n[1],p=n[2];if(!r)return e;if(0===p.indexOf('%')){var s;switch(p){case'%p':s=o;break;case'%':case'%r':default:s=i;}var d=c(s);return d[t]/100*r}if('vh'===p||'vw'===p){var a;return a='vh'===p?_(document.documentElement.clientHeight,window.innerHeight||0):_(document.documentElement.clientWidth,window.innerWidth||0),a/100*r}return r}function G(e,t,o,i){var n=[0,0],r=-1!==['right','left'].indexOf(i),p=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=p.indexOf(T(p,function(e){return-1!==e.search(/,|\s/)}));p[s]&&-1===p[s].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var d=/\s*,\s*|\s+/,a=-1===s?[p]:[p.slice(0,s).concat([p[s].split(d)[0]]),[p[s].split(d)[1]].concat(p.slice(s+1))];return a=a.map(function(e,i){var n=(1===i?!r:r)?'height':'width',p=!1;return e.reduce(function(e,t){return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?(e[e.length-1]+=t,p=!1,e):e.concat(t)},[]).map(function(e){return q(e,n,t,o)})}),a.forEach(function(e,t){e.forEach(function(o,i){R(o)&&(n[t]+=o*('-'===e[i-1]?-1:1))})}),n}for(var z=Math.min,V=Math.floor,_=Math.max,X=['native code','[object MutationObserverConstructor]'],Q=function(e){return X.some(function(t){return-1<(e||'').toString().indexOf(t)})},J='undefined'!=typeof window,Z=['Edge','Trident','Firefox'],$=0,ee=0;ee<Z.length;ee+=1)if(J&&0<=navigator.userAgent.indexOf(Z[ee])){$=1;break}var i,te=J&&Q(window.MutationObserver),oe=te?function(e){var t=!1,o=0,i=document.createElement('span'),n=new MutationObserver(function(){e(),t=!1});return n.observe(i,{attributes:!0}),function(){t||(t=!0,i.setAttribute('x-index',o),++o)}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},$))}},ie=function(){return void 0==i&&(i=-1!==navigator.appVersion.indexOf('MSIE 10')),i},ne=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},re=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),pe=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},se=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},de=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'],ae=de.slice(3),fe={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},le=function(){function t(o,i){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};ne(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=oe(this.update.bind(this)),this.options=se({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=o.jquery?o[0]:o,this.popper=i.jquery?i[0]:i,this.options.modifiers={},Object.keys(se({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=se({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return se({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnabled=p}return re(t,[{key:'update',value:function(){return k.call(this)}},{key:'destroy',value:function(){return D.call(this)}},{key:'enableEventListeners',value:function(){return A.call(this)}},{key:'disableEventListeners',value:function(){return I.call(this)}}]),t}();return le.Utils=('undefined'==typeof window?global:window).PopperUtils,le.placements=de,le.Defaults={placement:'bottom',eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')[0],i=t.split('-')[1];if(i){var n=e.offsets,r=n.reference,p=n.popper,s=-1!==['bottom','top'].indexOf(o),d=s?'left':'top',a=s?'width':'height',f={start:pe({},d,r[d]),end:pe({},d,r[d]+r[a]-p[a])};e.offsets.popper=se({},p,f[i])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var o,i=t.offset,n=e.placement,r=e.offsets,p=r.popper,s=r.reference,d=n.split('-')[0];return o=R(+i)?[+i,0]:G(i,p,s,d),'left'===d?(p.top+=o[0],p.left-=o[1]):'right'===d?(p.top+=o[0],p.left+=o[1]):'top'===d?(p.left+=o[0],p.top-=o[1]):'bottom'===d&&(p.left+=o[0],p.top+=o[1]),e.popper=p,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||r(e.instance.popper);e.instance.reference===o&&(o=r(o));var i=w(e.instance.popper,e.instance.reference,t.padding,o);t.boundaries=i;var n=t.priority,p=e.offsets.popper,s={primary:function(e){var o=p[e];return p[e]<i[e]&&!t.escapeWithReference&&(o=_(p[e],i[e])),pe({},e,o)},secondary:function(e){var o='right'===e?'left':'top',n=p[o];return p[e]>i[e]&&!t.escapeWithReference&&(n=z(p[o],i[e]-('right'===e?p.width:p.height))),pe({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=se({},p,s[t](e))}),e.offsets.popper=p,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=V,p=-1!==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]<r(i[d])&&(e.offsets.popper[d]=r(i[d])-o[a]),o[d]>r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!F(e.instance.modifiers,'arrow','keepTogether'))return e;var o=t.element;if('string'==typeof o){if(o=e.instance.popper.querySelector(o),!o)return e;}else if(!e.instance.popper.contains(o))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var i=e.placement.split('-')[0],n=e.offsets,r=n.popper,p=n.reference,s=-1!==['left','right'].indexOf(i),d=s?'height':'width',a=s?'top':'left',f=s?'left':'top',l=s?'bottom':'right',m=O(o)[d];p[l]-m<r[a]&&(e.offsets.popper[a]-=r[a]-(p[l]-m)),p[a]+m>r[l]&&(e.offsets.popper[a]+=p[a]+m-r[l]);var h=p[a]+p[d]/2-m/2,g=h-c(e.offsets.popper)[a];return g=_(z(r[d]-m,g),0),e.arrowElement=o,e.offsets.arrow={},e.offsets.arrow[a]=Math.round(g),e.offsets.arrow[f]='',e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=w(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=L(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case fe.FLIP:p=[i,n];break;case fe.CLOCKWISE:p=K(i);break;case fe.COUNTERCLOCKWISE:p=K(i,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')[0],n=L(i);var a=e.offsets.popper,f=e.offsets.reference,l=V,m='left'===i&&l(a.right)>l(f.left)||'right'===i&&l(a.left)<l(f.right)||'top'===i&&l(a.bottom)>l(f.top)||'bottom'===i&&l(a.top)<l(f.bottom),h=l(a.left)<l(o.left),c=l(a.right)>l(o.right),g=l(a.top)<l(o.top),u=l(a.bottom)>l(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&g||'bottom'===i&&u,y=-1!==['top','bottom'].indexOf(i),w=!!t.flipVariations&&(y&&'start'===r&&h||y&&'end'===r&&c||!y&&'start'===r&&g||!y&&'end'===r&&u);(m||b||w)&&(e.flipped=!0,(m||b)&&(i=p[d+1]),w&&(r=j(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=se({},e.offsets.popper,S(e.instance.popper,e.offsets.reference,e.placement)),e=N(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return n[p?'left':'top']=r[t]-(s?n[p?'width':'height']:0),e.placement=L(t),e.offsets.popper=c(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=T(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-of-boundaries']=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,i=t.y,n=e.offsets.popper,p=T(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;void 0!==p&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s,d,a=void 0===p?t.gpuAcceleration:p,f=r(e.instance.popper),l=g(f),m={position:n.position},h={left:V(n.left),top:V(n.top),bottom:V(n.bottom),right:V(n.right)},c='bottom'===o?'top':'bottom',u='right'===i?'left':'right',b=B('transform');if(d='bottom'==c?-l.height+h.bottom:h.top,s='right'==u?-l.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[u]=0,m.willChange='transform';else{var y='bottom'==c?-1:1,w='right'==u?-1:1;m[c]=d*y,m[u]=s*w,m.willChange=c+', '+u}var v={"x-placement":e.placement};return e.attributes=se({},v,e.attributes),e.styles=se({},m,e.styles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return U(e.instance.popper,e.styles),Y(e.instance.popper,e.attributes),e.offsets.arrow&&U(e.arrowElement,e.offsets.arrow),e},onLoad:function(e,t,o,i,n){var r=x(n,t,e),p=E(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),U(t,{position:'absolute'}),o},gpuAcceleration:void 0}}},le}); 5 | -------------------------------------------------------------------------------- /flake8_dashboard/templates/assets/js/light-bootstrap-dashboard.js: -------------------------------------------------------------------------------- 1 | // ========================================================= 2 | // Light Bootstrap Dashboard - v2.0.1 3 | // ========================================================= 4 | // 5 | // Product Page: https://www.creative-tim.com/product/light-bootstrap-dashboard 6 | // Copyright 2019 Creative Tim (https://www.creative-tim.com) 7 | // Licensed under MIT (https://github.com/creativetimofficial/light-bootstrap-dashboard/blob/master/LICENSE) 8 | // 9 | // Coded by Creative Tim 10 | // 11 | // ========================================================= 12 | // 13 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | 15 | var searchVisible = 0; 16 | var transparent = true; 17 | 18 | var transparentDemo = true; 19 | var fixedTop = false; 20 | 21 | var navbar_initialized = false; 22 | var mobile_menu_visible = 0, 23 | mobile_menu_initialized = false, 24 | toggle_initialized = false, 25 | bootstrap_nav_initialized = false, 26 | $sidebar, 27 | isWindows; 28 | 29 | $(document).ready(function() { 30 | window_width = $(window).width(); 31 | 32 | // check if there is an image set for the sidebar's background 33 | lbd.checkSidebarImage(); 34 | 35 | // Init navigation toggle for small screens 36 | if (window_width <= 991) { 37 | lbd.initRightMenu(); 38 | } 39 | 40 | // Activate the tooltips 41 | $('[rel="tooltip"]').tooltip(); 42 | 43 | // Activate regular switches 44 | if ($("[data-toggle='switch']").length != 0) { 45 | $("[data-toggle='switch']").bootstrapSwitch(); 46 | } 47 | 48 | $('.form-control').on("focus", function() { 49 | $(this).parent('.input-group').addClass("input-group-focus"); 50 | }).on("blur", function() { 51 | $(this).parent(".input-group").removeClass("input-group-focus"); 52 | }); 53 | 54 | // Fixes sub-nav not working as expected on IOS 55 | $('body').on('touchstart.dropdown', '.dropdown-menu', function(e) { 56 | e.stopPropagation(); 57 | }); 58 | }); 59 | 60 | // activate collapse right menu when the windows is resized 61 | $(window).resize(function() { 62 | if ($(window).width() <= 991) { 63 | lbd.initRightMenu(); 64 | } 65 | }); 66 | 67 | lbd = { 68 | misc: { 69 | navbar_menu_visible: 0 70 | }, 71 | checkSidebarImage: function() { 72 | $sidebar = $('.sidebar'); 73 | image_src = $sidebar.data('image'); 74 | 75 | if (image_src !== undefined) { 76 | sidebar_container = '<div class="sidebar-background" style="background-image: url(' + image_src + ') "/>' 77 | $sidebar.append(sidebar_container); 78 | } else if (mobile_menu_initialized == true) { 79 | // reset all the additions that we made for the sidebar wrapper only if the screen is bigger than 991px 80 | $sidebar_wrapper.find('.navbar-form').remove(); 81 | $sidebar_wrapper.find('.nav-mobile-menu').remove(); 82 | 83 | mobile_menu_initialized = false; 84 | } 85 | }, 86 | 87 | initRightMenu: function() { 88 | $sidebar_wrapper = $('.sidebar-wrapper'); 89 | 90 | if (!mobile_menu_initialized) { 91 | 92 | $navbar = $('nav').find('.navbar-collapse').first().clone(true); 93 | 94 | nav_content = ''; 95 | mobile_menu_content = ''; 96 | 97 | //add the content from the regular header to the mobile menu 98 | $navbar.children('ul').each(function() { 99 | 100 | content_buff = $(this).html(); 101 | nav_content = nav_content + content_buff; 102 | }); 103 | 104 | nav_content = '<ul class="nav nav-mobile-menu">' + nav_content + '</ul>'; 105 | 106 | $navbar_form = $('nav').find('.navbar-form').clone(true); 107 | 108 | $sidebar_nav = $sidebar_wrapper.find(' > .nav'); 109 | 110 | // insert the navbar form before the sidebar list 111 | $nav_content = $(nav_content); 112 | $nav_content.insertBefore($sidebar_nav); 113 | $navbar_form.insertBefore($nav_content); 114 | 115 | $(".sidebar-wrapper .dropdown .dropdown-menu > li > a").click(function(event) { 116 | event.stopPropagation(); 117 | 118 | }); 119 | 120 | mobile_menu_initialized = true; 121 | } else { 122 | console.log('window with:' + $(window).width()); 123 | if ($(window).width() > 991) { 124 | // reset all the additions that we made for the sidebar wrapper only if the screen is bigger than 991px 125 | $sidebar_wrapper.find('.navbar-form').remove(); 126 | $sidebar_wrapper.find('.nav-mobile-menu').remove(); 127 | 128 | mobile_menu_initialized = false; 129 | } 130 | } 131 | 132 | if (!toggle_initialized) { 133 | $toggle = $('.navbar-toggler'); 134 | 135 | $toggle.click(function() { 136 | 137 | if (mobile_menu_visible == 1) { 138 | $('html').removeClass('nav-open'); 139 | 140 | $('.close-layer').remove(); 141 | setTimeout(function() { 142 | $toggle.removeClass('toggled'); 143 | }, 400); 144 | 145 | mobile_menu_visible = 0; 146 | } else { 147 | setTimeout(function() { 148 | $toggle.addClass('toggled'); 149 | }, 430); 150 | 151 | 152 | main_panel_height = $('.main-panel')[0].scrollHeight; 153 | $layer = $('<div class="close-layer"></div>'); 154 | $layer.css('height', main_panel_height + 'px'); 155 | $layer.appendTo(".main-panel"); 156 | 157 | setTimeout(function() { 158 | $layer.addClass('visible'); 159 | }, 100); 160 | 161 | $layer.click(function() { 162 | $('html').removeClass('nav-open'); 163 | mobile_menu_visible = 0; 164 | 165 | $layer.removeClass('visible'); 166 | 167 | setTimeout(function() { 168 | $layer.remove(); 169 | $toggle.removeClass('toggled'); 170 | 171 | }, 400); 172 | }); 173 | 174 | $('html').addClass('nav-open'); 175 | mobile_menu_visible = 1; 176 | 177 | } 178 | }); 179 | 180 | toggle_initialized = true; 181 | } 182 | } 183 | } 184 | 185 | 186 | 187 | // Returns a function, that, as long as it continues to be invoked, will not 188 | // be triggered. The function will be called after it stops being called for 189 | // N milliseconds. If `immediate` is passed, trigger the function on the 190 | // leading edge, instead of the trailing. 191 | 192 | function debounce(func, wait, immediate) { 193 | var timeout; 194 | return function() { 195 | var context = this, 196 | args = arguments; 197 | clearTimeout(timeout); 198 | timeout = setTimeout(function() { 199 | timeout = null; 200 | if (!immediate) func.apply(context, args); 201 | }, wait); 202 | if (immediate && !timeout) func.apply(context, args); 203 | }; 204 | }; 205 | -------------------------------------------------------------------------------- /flake8_dashboard/templates/index.html: -------------------------------------------------------------------------------- 1 | <!-- 2 | Template based in the following dashboard template: 3 | 4 | ========================================================= 5 | Light Bootstrap Dashboard - v2.0.1 6 | ========================================================= 7 | 8 | Product Page: https://www.creative-tim.com/product/light-bootstrap-dashboard 9 | Copyright 2019 Creative Tim (https://www.creative-tim.com) 10 | Licensed under MIT (https://github.com/creativetimofficial/light-bootstrap-dashboard/blob/master/LICENSE) 11 | 12 | Coded by Creative Tim 13 | ========================================================= 14 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 15 | --> 16 | 17 | <!DOCTYPE html> 18 | 19 | <html lang="en"> 20 | 21 | <head> 22 | <meta charset="utf-8"/> 23 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> 24 | 25 | <title>Flake8 Dashboard 26 | 27 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 69 |
70 | 71 | 78 | 79 | 80 |
81 |
` 82 | 83 |
84 |
85 |
86 |
87 |

Report summary

88 | {% if errors_found %} 89 |

{{ total_errors }} warnings/errors found.

90 | {% else %} 91 |

No warnings or errors found 92 | in {{ files_analized }} files 93 | analyzed!

94 | CheckPassed.svg 96 | {% endif %} 97 |
98 |
99 |
100 |
101 | {% if errors_found %} 102 |
103 |
104 |
105 |
106 |

Violations by severity

107 |
108 | 109 |
110 |
113 |
114 |
115 |
116 |
117 | High 118 | Medium 119 | Low 120 |
121 |
122 |

High:SyntaxError, IndentationError, IOError, 123 | and PyFlakes errors

124 |

Medium:Pep8 and McCabe complexity errors

125 |

Low:Docstrings format errors

126 | 127 |
128 |
129 |
130 |
131 |
132 |

Code rating

133 |
134 |
135 |
138 |
139 |
140 |
141 |
142 | Needs cleanup 143 | Reasonable quality 144 | Great code! 145 |
146 |
147 |

rating=10.0 - 10*((5*error + warning + refactor 148 | + 149 | convention+ documentation*0.25) / statement)

150 | 151 |
152 |
153 | 154 |
155 |
156 |
157 |
158 |
159 |

Violations by module

160 |
161 |
162 |
165 |
166 |
167 |

Branch's values indicate the number of errors 168 | found

169 |
170 |
171 |
172 |
173 |
174 |

Violations by code

175 |
176 |
177 |
180 |
181 |
182 |

Branch's values indicate the number of errors 183 | found

184 |
185 |
186 | 187 |
188 | {% endif %} 189 |
190 |
191 |
192 |
193 | 198 |
199 |
200 |
201 |
202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | {% if errors_found %} 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | {% endif %} 219 | 220 | -------------------------------------------------------------------------------- /flake8_dashboard/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aperezhortal/flake8-dashboard/47ac0f03c3c345e1a765c1d04a14cec4f011343a/flake8_dashboard/tests/__init__.py -------------------------------------------------------------------------------- /flake8_dashboard/tests/test_path_handling.py: -------------------------------------------------------------------------------- 1 | from pathlib import PurePath, PurePosixPath, Path 2 | 3 | from flake8_dashboard.utils import relative_path, full_split 4 | 5 | 6 | def test_path_handling(): 7 | """Test that the relative paths are handled always as Linux paths.""" 8 | 9 | home = Path.cwd() 10 | subdirs = ["test", "a", "b", "c"] 11 | full_path = home.joinpath(PurePath(*subdirs)) 12 | 13 | rel_path = relative_path(full_path, home) 14 | 15 | assert rel_path == str(PurePosixPath(*subdirs)) 16 | 17 | assert list(full_split("/a/b/c/d")) == ["a", "a/b", "a/b/c"] 18 | assert list(full_split("a/b/c/d")) == ["a", "a/b", "a/b/c"] 19 | assert list(full_split("a")) == [] 20 | -------------------------------------------------------------------------------- /flake8_dashboard/utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """Common utilities.""" 3 | 4 | import os 5 | 6 | import numpy as np 7 | from astroid import MANAGER, AstroidSyntaxError 8 | from pathlib import PurePosixPath, PurePath 9 | 10 | 11 | class ASTWalker: 12 | """ 13 | Statements counter for Python source codes. 14 | 15 | Usage 16 | ===== 17 | my_counter = ASTWalker() 18 | statements = my_counter.count_statements("path/to/my/file") 19 | """ 20 | 21 | # Tested with astroid 2.3.0.dev0 22 | 23 | def __init__(self): 24 | self.nbstatements = 0 25 | 26 | def count_statements(self, filepath): 27 | self.nbstatements = 0 28 | try: 29 | ast_node = MANAGER.ast_from_file(filepath, source=True) 30 | self._walk(ast_node) 31 | except AstroidSyntaxError: 32 | self.nbstatements = np.nan 33 | return self.nbstatements 34 | 35 | def _walk(self, astroid_node): 36 | """ 37 | Recurse in the astroid node children and count the statements. 38 | """ 39 | if astroid_node.is_statement: 40 | self.nbstatements += 1 41 | 42 | # recurse on children 43 | for child in astroid_node.get_children(): 44 | self._walk(child) 45 | 46 | 47 | def create_dir(path): 48 | """Create directory if it does not exist.""" 49 | if not os.path.exists(path): 50 | os.makedirs(path) 51 | 52 | 53 | def relative_path(full_path, common_prefix): 54 | """Returns the relative path as a linux path to avoid problems with 55 | regular expressions in windows paths. 56 | """ 57 | 58 | rel_path = PurePath(full_path).relative_to(PurePath(common_prefix)) 59 | return rel_path.as_posix() 60 | 61 | 62 | def full_split(_path): 63 | """ 64 | Return a list with all the intermediate paths. 65 | The input path must be a POSIX path string (i.e., Linux or OSX). 66 | """ 67 | intermediate_paths = list() 68 | 69 | _path = PurePosixPath(_path) 70 | 71 | if _path.is_absolute(): 72 | _path = _path.relative_to("/") 73 | 74 | parts = _path.parts 75 | 76 | for i in range(1, len(parts)): 77 | intermediate_paths.append(PurePosixPath(*parts[0:i]).as_posix()) 78 | 79 | return intermediate_paths 80 | 81 | 82 | def interp_to_previous(x, xp, fp, **kwargs): 83 | """ 84 | One-dimensional linear interpolation. 85 | 86 | Returns the one-dimensional nearest-lower-neighbor interpolant to a function 87 | with given discrete data points (`xp`, `fp`), evaluated at `x`. 88 | 89 | Parameters 90 | ---------- 91 | x : array_like 92 | The x-coordinates at which to evaluate the interpolated values. 93 | 94 | xp : 1-D sequence of floats 95 | The x-coordinates of the data points, must be increasing if argument 96 | `period` is not specified. Otherwise, `xp` is internally sorted after 97 | normalizing the periodic boundaries with ``xp = xp % period``. 98 | 99 | fp : 1-D sequence of float or complex 100 | The y-coordinates of the data points, same length as `xp`. 101 | 102 | Returns 103 | ------- 104 | y : float or complex (corresponding to fp) or ndarray 105 | The interpolated values, same shape as `x`. 106 | 107 | Raises 108 | ------ 109 | ValueError 110 | If `xp` and `fp` have different length 111 | If `xp` or `fp` are not 1-D sequences 112 | If `period == 0` 113 | 114 | Notes 115 | ----- 116 | Does not check that the x-coordinate sequence `xp` is increasing. 117 | If `xp` is not increasing, the results are nonsense. 118 | A simple check for increasing is:: 119 | 120 | np.all(np.diff(xp) > 0) 121 | 122 | Use previous neighbour of x_new, y_new = f(x_new). 123 | 124 | Adapted from scipy.interpolate.interpolate.py 125 | """ 126 | del kwargs # Unused, needeed for compatibility with np.interp function. 127 | 128 | xp = np.asarray(xp) 129 | # 1. Get index of left value 130 | xp_shift = np.nextafter(xp, -np.inf) 131 | 132 | x_new_indices = np.searchsorted(xp_shift, x, side="left") 133 | 134 | # 2. Clip x_new_indices so that they are within the range of x indices. 135 | x_new_indices = x_new_indices.clip(1, len(xp)).astype(np.intp) 136 | 137 | # 3. Calculate the actual value for each entry in x_new. 138 | y_new = fp[x_new_indices - 1] 139 | 140 | return y_new 141 | 142 | 143 | def map_values_to_cmap(values, colormap=None, discrete=True): 144 | """ 145 | colormap : Mx4 array-like 146 | 147 | If a Mx4 array-like, the rows define the values (x, r, g, b), where r/g/b are 148 | number from 0-255. 149 | 150 | The x values must start with x=0, end with x=1. 151 | 152 | discrete true =-> map to discrete colorbar 153 | """ 154 | 155 | if colormap is None: 156 | colormap = np.asarray( 157 | [ 158 | [0.0, 239, 85, 59], # red 159 | [0.5, 99, 110, 250], # blue 160 | [0.75, 0, 204, 150], # green 161 | [1.0, 0, 204, 150], # green 162 | ] 163 | ) 164 | 165 | # 0.0-0.5 red! 166 | # 0.5-0.75 - blue 167 | # 0.75-1 - green 168 | try: 169 | colormap = np.asarray(colormap, dtype=float) 170 | values = np.asarray(values, dtype=float) 171 | except Exception: 172 | raise TypeError( 173 | "colormap and interpolation values must be convertible to an array." 174 | ) 175 | 176 | shape = colormap.shape 177 | if len(shape) != 2 or shape[1] != 4: 178 | raise ValueError("colormap must be Mx4 format") 179 | 180 | if len(values) == 0 or values.ndim != 1: 181 | raise ValueError("Mapping values must be 1D.") 182 | 183 | if discrete: 184 | interpolator = interp_to_previous 185 | else: 186 | interpolator = np.interp 187 | 188 | red = interpolator( 189 | values, colormap[:, 0], colormap[:, 1], left=0, right=255 190 | ).astype(int) 191 | green = interpolator(values, colormap[:, 0], colormap[:, 2]).astype(int) 192 | blue = interpolator(values, colormap[:, 0], colormap[:, 3]).astype(int) 193 | 194 | colorscale = [ 195 | f"#{red[i]:02x}{green[i]:02x}{blue[i]:02x}" for i in range(values.size) 196 | ] 197 | return colorscale 198 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: flake8-dashboard documentation 2 | 3 | nav: 4 | - Home: index.md 5 | - Demo : example_dashboard/index.html 6 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | exclude = ''' 3 | /( 4 | \.git 5 | | \.hg 6 | | \.mypy_cache 7 | | \.tox 8 | | \.venv 9 | | _build 10 | | buck-out 11 | | build 12 | | dist 13 | )/ 14 | ''' -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | setuptools 2 | plotly 3 | beautifulsoup4 4 | jsmin 5 | jinja2 6 | pip>=9.0.1 7 | bump2version 8 | wheel 9 | tox>=2.6.0 10 | requests 11 | pandas 12 | flake8 13 | astroid>=2.2.5 14 | -------------------------------------------------------------------------------- /scripts/clone_pylint_tests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Clone pylint tests from https://github.com/PyCQA/pylint 4 | 5 | Script used in tox tests 6 | """ 7 | 8 | import os 9 | 10 | from git import Repo 11 | 12 | tox_test_data_dir = os.environ["TOX_TEST_DATA_DIR"] 13 | build_dir = os.environ["PACKAGE_ROOT"] 14 | 15 | if not os.path.isdir(os.path.join(tox_test_data_dir, ".git")): 16 | Repo.clone_from( 17 | "https://github.com/aperezhortal/pylint", 18 | tox_test_data_dir, 19 | branch="only_tests", 20 | depth=1, 21 | ) 22 | else: 23 | test_data_repo = Repo(tox_test_data_dir) 24 | test_data_repo.remotes["origin"].pull() 25 | -------------------------------------------------------------------------------- /scripts/download_codes_description.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | import requests 4 | from bs4 import BeautifulSoup 5 | 6 | 7 | def parse_documentation(doc_url, tag="div", attributes={}): 8 | code_descriptions = dict() 9 | response = requests.get(doc_url) 10 | 11 | soup = BeautifulSoup(response.content, "html.parser") 12 | 13 | error_codes_div = soup.find_all(tag, attributes)[0] 14 | 15 | row_tags = error_codes_div.find_all("tr") 16 | 17 | for tag in row_tags: 18 | columns = tag.find_all("td") 19 | if len(columns) > 0: 20 | error_code = columns[0].text 21 | error_code = error_code.strip() 22 | if len(error_code) > 4: 23 | error_code = error_code[:4] 24 | 25 | if len(error_code) > 0: 26 | code_descriptions[error_code] = columns[1].text 27 | 28 | return code_descriptions 29 | 30 | 31 | # Parse flake8 codes's description from documentation 32 | code_description = parse_documentation( 33 | "http://flake8.pycqa.org/en/3.7.8/user/error-codes.html", 34 | attributes={"class": "section", "id": "error-violation-codes"}, 35 | ) 36 | 37 | # Parse pep8 codes's description from documentation 38 | code_description.update( 39 | parse_documentation( 40 | "https://pep8.readthedocs.io/en/latest/intro.html", 41 | attributes={"class": "section", "id": "error-codes"}, 42 | ) 43 | ) 44 | 45 | # Parse pep8-naming codes's description from documentation 46 | code_description.update( 47 | parse_documentation( 48 | "https://github.com/PyCQA/pep8-naming/blob/master/README.rst", tag="table" 49 | ) 50 | ) 51 | 52 | # Todo: add Mccabe codes and http://www.pydocstyle.org/en/2.1.1/error_codes.html 53 | 54 | code_description.update( 55 | { 56 | "E": "pep8 error", 57 | "W": "pep8 warning", 58 | "F": "pyFlakes", 59 | "C": "McCabe complexity", 60 | "C9": "McCabe complexity", 61 | "N8": "Naming convention", 62 | } 63 | ) 64 | 65 | code_description = json.dumps(code_description, indent=4, sort_keys=True) 66 | 67 | with open("../flake8_dashboard/code_description.json", "w") as file: 68 | file.write(code_description) 69 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 0.1.4 3 | commit = True 4 | tag = False 5 | parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+)(?P\d+))? 6 | serialize = 7 | {major}.{minor}.{patch}-{release}{build} 8 | {major}.{minor}.{patch} 9 | 10 | [bumpversion:part:release] 11 | optional_value = beta 12 | first_value = dev 13 | values = 14 | dev 15 | beta 16 | 17 | [bumpversion:file:setup.py] 18 | search = version="{current_version}" 19 | replace = version="{new_version}" 20 | 21 | [bumpversion:file:flake8_dashboard/__init__.py] 22 | search = __version__ = "{current_version}" 23 | replace = __version__ = "{new_version}" 24 | 25 | [flake8] 26 | max-line-length = 88 27 | ignore = W605,E741 28 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """Setuptools script for flake8-dashboard.""" 3 | 4 | from setuptools import setup, find_packages 5 | 6 | with open("README.rst") as readme_file: 7 | readme = readme_file.read() 8 | 9 | with open("requirements.txt") as fp: 10 | install_requires = fp.read() 11 | 12 | setup( 13 | name="flake8-dashboard", 14 | version="0.1.4", 15 | description="Generate different reports of flake8 violations", 16 | long_description=readme, 17 | author="Andres Perez Hortal", 18 | packages=find_packages(), 19 | include_package_data=True, 20 | install_requires=install_requires, 21 | license="Apache Software License 2.0", 22 | entry_points={"flake8.report": ["dashboard = flake8_dashboard:DashboardReporter"]}, 23 | python_requires=">=3.6", 24 | zip_safe=False, 25 | keywords="flake8 dashboard html", 26 | url="https://aperezhortal.github.io/flake8-dashboard/", 27 | classifiers=[ 28 | "Framework :: Flake8", 29 | "Intended Audience :: Developers", 30 | "License :: OSI Approved :: Apache Software License", 31 | "Natural Language :: English", 32 | "Programming Language :: Python :: 3", 33 | "Programming Language :: Python :: 3.6", 34 | "Programming Language :: Python :: 3.7", 35 | ], 36 | ) 37 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | # Tox configuration file 2 | # Needs conda, tox and tox-conda installed to run 3 | # 4 | # In conda run: 5 | # > conda install -c conda-forge tox tox-conda 6 | # 7 | # Alternatively, you can install them using pip: 8 | # > pip install tox tox-conda 9 | 10 | [tox] 11 | envlist = py38 12 | skip_missing_interpreters = true 13 | skipsdist = False 14 | 15 | [testenv] 16 | description = Test the plugin with the pylint's tests 17 | deps = 18 | -r{toxinidir}/requirements.txt 19 | gitpython 20 | setenv = 21 | TOX_TEST_DATA_DIR = {toxworkdir}/pylint_tests 22 | PACKAGE_ROOT = {toxinidir} 23 | commands = 24 | python {toxinidir}/scripts/clone_pylint_tests.py 25 | pip install -U {toxinidir}/ 26 | - flake8 --format=dashboard --debug --title="Demo dashboard" --outputdir={toxworkdir}/test_output {toxworkdir}/pylint_tests/tests 27 | 28 | 29 | [testenv:docs] 30 | description = Build the documentation 31 | deps = {[testenv]deps} 32 | conda_deps = pandoc 33 | setenv = {[testenv]setenv} 34 | commands = 35 | python {toxinidir}/scripts/clone_pylint_tests.py 36 | pip install -U {toxinidir}/ 37 | - flake8 --format=dashboard --title="Demo dashboard" --outputdir={toxinidir}/docs/example_dashboard {toxworkdir}/pylint_tests/tests 38 | {envbindir}/pandoc {toxinidir}/README.rst -f rst -o {toxinidir}/docs/index.md 39 | 40 | 41 | [testenv:install] 42 | description = Test the installation of the package in a clean environment 43 | deps = 44 | conda_deps = 45 | changedir = {homedir} 46 | commands = 47 | pip install -U {toxinidir}/ 48 | - flake8 --format=dashboard --outputdir={toxworkdir}/test_output {toxinidir} 49 | 50 | [testenv:pypi_test] 51 | description = Test the installation of the package from the PyPI in a clean environment 52 | deps = 53 | conda_deps = gitpython 54 | changedir = {homedir} 55 | commands = 56 | python {toxinidir}/scripts/clone_pylint_tests.py 57 | pip install --no-cache-dir --index-url https://test.pypi.org/simple/ --extra-index-url=https://pypi.org/simple/ flake8-dashboard 58 | - flake8 --format=dashboard --debug --title="Demo dashboard" --outputdir={toxworkdir}/test_output {toxworkdir}/pylint_tests/tests 59 | 60 | [flake8] 61 | ignore = E741, E501 62 | #E741: Ambiguous variable name 63 | #E501: line too long (>79 characters) 64 | exclude = 65 | .git, 66 | __pycache__, 67 | docs, 68 | notebooks, 69 | *.egg-info, 70 | .pytest*, 71 | .tox 72 | max-complexity = 10 73 | --------------------------------------------------------------------------------